This commit is contained in:
aihe 2024-12-22 11:33:29 +08:00
parent e2b0358e75
commit 66f8003afe
2 changed files with 25 additions and 3 deletions

View File

@ -75,6 +75,11 @@
return true
}
},
sureCheckFun: {
default () {
return null
}
},
},
data() {
return {
@ -95,8 +100,14 @@
this.$emit('update:show', false)
this.$emit('onClose')
},
handleSubmitValue() {
async handleSubmitValue() {
const val = this.submitVals
if(this.sureCheckFun) {
let bl = await this.sureCheckFun(val)
if(!bl){
return false
}
}
this.$emit('onSure', val)
this.$emit('update:value', val)
this.okCloseModal && this.handleCloseModal()

View File

@ -214,7 +214,9 @@
<buns-revtime-sheet v-model:show="revtimeModal.show" v-model:value="submitParam"></buns-revtime-sheet>
<buns-edit-sheet percentHeight="70" title="货物信息" v-model:show="goodChooseModal.show" v-model:value="submitParam" v-slot="tempObject" @onSure="handleGoodInfoSure">
<buns-edit-sheet percentHeight="70" title="货物信息" v-model:show="goodChooseModal.show" v-model:value="submitParam" v-slot="tempObject" @onSure="handleGoodInfoSure"
:sureCheckFun="handleCheckGoodInfoSure"
>
<!-- 保证弹框内容重新渲染 -->
<view v-if="goodChooseModal.show">
<view class="">
@ -289,6 +291,7 @@
},
methods: {
getTransLineList: apiService.getTransLineList,
getLisWarehouse: apiService.getLisWarehouse,
getMonthpayAccountList: apiService.getMonthpayAccountList,
@ -427,6 +430,14 @@
handleDialogClick(curModal){
curModal.show = true
},
handleCheckGoodInfoSure(data){
let errmgs = []
if(!(data.billWeight > 0)) {
errmgs.push('实际重量必须大于零')
}
errmgs.length > 0 && this.showToast(errmgs[0])
return !Boolean(errmgs.length)
},
async handleSave(type) {
triggerSubscribeMessage() // 唤起消息订阅
let saveServerHand = apiService.submitOrder