Browse Source

'修BUG'

main
hflllll 5 days ago
parent
commit
d88b3434fb
3 changed files with 20 additions and 9 deletions
  1. +9
    -5
      subPages/home/repairSubmit.vue
  2. +9
    -2
      subPages/repair/maintainSubmit.vue
  3. +2
    -2
      utils/upload.js

+ 9
- 5
subPages/home/repairSubmit.vue View File

@ -251,7 +251,7 @@
<uv-datetime-picker
ref="firstOccurTimePicker"
mode="date"
confirm-color="#C70019"
confirm-color="#C70019"
@confirm="confirmFirstOccurTime"
></uv-datetime-picker>
@ -436,14 +436,18 @@ export default {
uni.showToast({ title: '请选择故障紧急程度', icon: 'none' })
return
}
// if (!this.malfunctionStatus) {
// uni.showToast({ title: '', icon: 'none' })
// return
// }
if (!this.malfunctionImage.length) {
uni.showToast({ title: '请上传故障图片', icon: 'none' })
return
}
if (!this.malfunctionDesc.trim()) {
uni.showToast({ title: '请填写故障情况描述', icon: 'none' })
return
}
if (!this.firstDate.trim()) {
uni.showToast({ title: '请选择故障首次发生时间', icon: 'none' })
return
}
//
const formData = {


+ 9
- 2
subPages/repair/maintainSubmit.vue View File

@ -524,14 +524,21 @@ export default {
})
return
}
}else {
}
const tempData = {...this.processData}
delete tempData.costDetails
const tempDataList = [...this.processData.costDetails]
if (this.processData.isExpend === '1') {
tempData.expenseList = tempDataList.map(item => `${item.name},${item.quantity},${item.amount}`).join(';')
}else {
delete tempData.expenseList
}
const submitRes = await this.$api.exhibit.addRepair({
id: this.id,
...tempData,
amount: this.amount,
expenseList: tempDataList.map(item => `${item.name},${item.quantity},${item.amount}`).join(';')
amount: this.amount
})
if (submitRes.code === 200) {


+ 2
- 2
utils/upload.js View File

@ -131,7 +131,7 @@ const chooseAndUpload = async () => {
}
// 显示加载提示
uni.showLoading({ title: '上传到OSS中...' })
uni.showLoading({ title: '上传中...' })
// 上传文件到OSS
const uploadResult = await uploadImage(file)
@ -139,7 +139,7 @@ const chooseAndUpload = async () => {
uni.hideLoading()
if (uploadResult.success) {
uni.showToast({ title: 'OSS上传成功', icon: 'success' })
uni.showToast({ title: '上传成功', icon: 'success' })
return uploadResult
} else {
uni.showToast({ title: uploadResult.error, icon: 'error' })


Loading…
Cancel
Save