Browse Source

fix 小程序-计划开始/结束时间只需要到年月日

master
巴林闲侠 2 years ago
parent
commit
0c7c8c68dc
  1. 8
      weapp/package/troubleshooting/shootingForm/index.js
  2. 4
      weapp/package/troubleshooting/shootingForm/index.wxml

8
weapp/package/troubleshooting/shootingForm/index.js

@ -103,8 +103,8 @@ Page({
maintenancePersonDepartmentShow: maintenancePersonIndex >= 0 ? focusPerson[maintenancePersonIndex].department.name : '',
qualityPersonIndex: focusPerson.findIndex(f => f.id == issue.checkPerson.id),
planStartTime: moment(issue.startTime).unix(),
planStartTimeShow: moment(issue.startTime).format('YYYY-MM-DD HH:mm:ss'),
planEndTimeShow: moment(issue.endTime).format('YYYY-MM-DD HH:mm:ss'),
planStartTimeShow: moment(issue.startTime).format('YYYY-MM-DD'),
planEndTimeShow: moment(issue.endTime).format('YYYY-MM-DD'),
maintenanceRequirement: issue.repairAsk
})
}
@ -165,7 +165,7 @@ Page({
// this.setData({ planStartTime: '' })
} else if (e.target.dataset.option == 'confirmed') {
this.setData({
planStartTimeShow: this.data.planStartTime ? moment(this.data.planStartTime).format('YYYY-MM-DD HH:mm') : ''
planStartTimeShow: this.data.planStartTime ? moment(this.data.planStartTime).format('YYYY-MM-DD') : ''
})
}
},
@ -186,7 +186,7 @@ Page({
this.setData({ planEndTimePopupShow: false })
if (e.target.dataset.option == 'confirmed') {
this.setData({
planEndTimeShow: this.data.planEndTime ? moment(this.data.planEndTime).format('YYYY-MM-DD HH:mm') : ''
planEndTimeShow: this.data.planEndTime ? moment(this.data.planEndTime).format('YYYY-MM-DD') : ''
})
}
},

4
weapp/package/troubleshooting/shootingForm/index.wxml

@ -75,7 +75,7 @@
确定
</view>
</view>
<van-datetime-picker value="{{ planStartTime }}" min-date="{{1640966400000}}" bind:input="onPlanStartTimeChange" show-toolbar="{{false}}" />
<van-datetime-picker type="datetime" value="{{ planStartTime }}" min-date="{{1640966400000}}" bind:input="onPlanStartTimeChange" show-toolbar="{{false}}" />
</van-popup>
</view>
</van-cell>
@ -93,7 +93,7 @@
确定
</view>
</view>
<van-datetime-picker value="{{ planEndTime }}" min-date="{{1640966400000}}" bind:input="onPlanEndTimeChange" show-toolbar="{{false}}" />
<van-datetime-picker type="datetime" value="{{ planEndTime }}" min-date="{{1640966400000}}" bind:input="onPlanEndTimeChange" show-toolbar="{{false}}" />
</van-popup>
</view>
</van-cell>

Loading…
Cancel
Save