This commit is contained in:
aihe 2024-12-15 01:05:09 +08:00
parent bff37ed0d9
commit 32a00cd534
2 changed files with 19 additions and 9 deletions

View File

@ -216,4 +216,15 @@ export const getBindTsm = async (info)=> {
} }
} }
info._bindTsmAvatar = _bindTsmAvatar info._bindTsmAvatar = _bindTsmAvatar
}
export const checkSubmitParams = (params = {})=> {
let errMsg = []
if(!params._agreePrivacy) {
errMsg.push('请同意《快件运单契约条款》')
}
if(params.cargoList.length == 0) {
errMsg.push('请添加货物信息')
}
return { bl: errMsg.length == 0, errMsg }
} }

View File

@ -106,7 +106,7 @@
<tpx-select v-model:value="submitParam.custNo" v-model:text="submitParam.custName" v-model:resObject="yuejieRes" :getListFun="getMonthpayAccountList" :transKeyVal="{valKey: 'custNo',titleKey: 'custName'}" <tpx-select v-model:value="submitParam.custNo" v-model:text="submitParam.custName" v-model:resObject="yuejieRes" :getListFun="getMonthpayAccountList" :transKeyVal="{valKey: 'custNo',titleKey: 'custName'}"
@onChange="handleYueJieSelect" placeholder="请选择月结账户" ref="yjSltRef" @onChange="handleYueJieSelect" placeholder="请选择月结账户" ref="yjSltRef"
> >
<tpx-text-item label="月结账户" :value="submitParam.custName"></tpx-text-item> <tpx-text-item :required="true" label="月结账户" :value="submitParam.custName"></tpx-text-item>
<template #listTop> <template #listTop>
<view class="mb-20" @click="handleToMonthCardManage"> <view class="mb-20" @click="handleToMonthCardManage">
<u-row> <u-row>
@ -155,7 +155,9 @@
<view class="com-section mt-30" @click="handleDialogClick(goodChooseModal)"> <view class="com-section mt-30" @click="handleDialogClick(goodChooseModal)">
<u-row justify="space-between"> <u-row justify="space-between">
<text>货物信息</text> <span class="pl-20">
<text class="lbRequiredDot">货物信息</text>
</span>
<u-icon name="edit-pen" size="42"></u-icon> <u-icon name="edit-pen" size="42"></u-icon>
</u-row> </u-row>
</view> </view>
@ -223,7 +225,7 @@
import { debounce } from "@/common/util" import { debounce } from "@/common/util"
import { triggerSubscribeMessage } from "@/common/componentEventHandle" import { triggerSubscribeMessage } from "@/common/componentEventHandle"
import * as apiService from "@/common/api" import * as apiService from "@/common/api"
import { getOrderModels, initDefaultModel, setBindTsm, getBindTsm } from "./model" import { getOrderModels, initDefaultModel, setBindTsm, getBindTsm, checkSubmitParams } from "./model"
const pageTypeEnum = { const pageTypeEnum = {
create: 'create', create: 'create',
@ -398,15 +400,12 @@
}, },
async handleSave(type) { async handleSave(type) {
triggerSubscribeMessage() // 唤起消息订阅 triggerSubscribeMessage() // 唤起消息订阅
let errMsg = ''
let saveServerHand = apiService.submitOrder let saveServerHand = apiService.submitOrder
if(this.isEdit) { } if(this.isEdit) { }
let params = JSON.parse(JSON.stringify(this.submitParam)); let params = JSON.parse(JSON.stringify(this.submitParam));
if(!errMsg && !params._agreePrivacy) { let { bl, errMsg } = checkSubmitParams(params)
errMsg = '请同意《快件运单契约条款》' if(errMsg[0]) {
} return this.showToast(errMsg[0])
if(errMsg) {
return this.showToast(errMsg)
} }
params.goodsPics = params.goodsPics.join(",") params.goodsPics = params.goodsPics.join(",")
params.totalVolume = params.totalVolume || 0 params.totalVolume = params.totalVolume || 0