|
|
@ -34,6 +34,7 @@ Page({ |
|
|
|
repair: '', |
|
|
|
repairImgs: [], |
|
|
|
checkDesc: '', |
|
|
|
cost: '', |
|
|
|
checkImgs: [], |
|
|
|
|
|
|
|
// 表单控制
|
|
|
@ -124,6 +125,7 @@ Page({ |
|
|
|
if (issue.state > 4) { |
|
|
|
this.setData({ |
|
|
|
checkDesc: issue.checkOpinion, |
|
|
|
cost: issue.cost, |
|
|
|
checkImgs: issue.checkImage || [], |
|
|
|
}) |
|
|
|
} |
|
|
@ -198,8 +200,16 @@ Page({ |
|
|
|
}, |
|
|
|
|
|
|
|
onInputChange (e) { |
|
|
|
let value = e.detail.value |
|
|
|
if (e.target.dataset.type === 'cost' && !/^(\d?)+(\.\d{0,2})?$/.test(e.detail.value)) { |
|
|
|
wx.showToast({ |
|
|
|
title: '只能输入两位小数', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
value = value.substring(0, value.length - 1); |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
[e.target.dataset.type]: e.detail.value |
|
|
|
[e.target.dataset.type]: value |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
@ -322,7 +332,7 @@ Page({ |
|
|
|
maintenancePersonIndex, maintenancePersonDepartmentShow, qualityPersonIndex, planStartTime, planEndTime, planStartTimeShow, planEndTimeShow, maintenanceRequirement, |
|
|
|
userInfo, planApproval, |
|
|
|
repair, repairImgs, |
|
|
|
checkDesc, checkImgs |
|
|
|
checkDesc, cost, checkImgs |
|
|
|
} = this.data |
|
|
|
let nextState = '' |
|
|
|
let confirmData = {} |
|
|
@ -372,6 +382,7 @@ Page({ |
|
|
|
confirmData = { |
|
|
|
...confirmData, |
|
|
|
checkOpinion: checkDesc, |
|
|
|
cost, |
|
|
|
checkImage: checkImgs, |
|
|
|
checkPerson: { id: userInfo.id, name: userInfo.name } |
|
|
|
} |
|
|
|