接车上传图片

This commit is contained in:
xiaofajia 2024-11-04 14:31:55 +08:00
parent e26e530757
commit b1e6a559b9

View File

@ -139,6 +139,12 @@
</template> </template>
<StaffChoose v-model="selectStaff" :is-get="'true'"/> <StaffChoose v-model="selectStaff" :is-get="'true'"/>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item>
<template slot="label">
接车图片
</template>
<ImageUpload v-model="formData.image" />
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
</el-col> </el-col>
@ -397,6 +403,7 @@ export default {
rescueMoney: 0, rescueMoney: 0,
threePackMoney: 0, threePackMoney: 0,
confirmFaultMoney: 0, confirmFaultMoney: 0,
image: null
}, },
selectUser: {}, selectUser: {},
selectCar: {}, selectCar: {},
@ -485,6 +492,15 @@ export default {
if (count > 0){ if (count > 0){
return return
} }
if (!this.formData.image){
this.$modal.msgError("接车图片不能为空")
return
}else{
const data = this.formData.image.split(",")
this.formData.image = data.map(item => {
return item.replace(process.env.VUE_APP_FILE_API, "")
}).join(",")
}
await createTickets(this.formData) await createTickets(this.formData)
this.$modal.msgSuccess("新增成功") this.$modal.msgSuccess("新增成功")
this.init() this.init()
@ -539,6 +555,7 @@ export default {
rescueMoney: 0, rescueMoney: 0,
threePackMoney: 0, threePackMoney: 0,
confirmFaultMoney: 0, confirmFaultMoney: 0,
image: null
} }
this.selectUser = {} this.selectUser = {}
this.selectCar = {} this.selectCar = {}