uu
This commit is contained in:
parent
84c450db77
commit
ce6f03fc32
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<u-row v-if="showPrivacy" align="top">
|
||||
<u-checkbox-group placement="column" @change="handleAgree()">
|
||||
<u-checkbox size="26" labelSize="26" :checked="modelInfo._agreePrivateRule" label="我已同意接受"
|
||||
<u-checkbox size="26" labelSize="26" :checked="modelInfo._agreePrivacy" label="我已同意接受"
|
||||
label-color=":#999" activeColor="#B12D29"
|
||||
custom-style="margin-bottom: 10rpx;"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
methods: {
|
||||
handleAgree() {
|
||||
this.modelInfo._agreePrivateRule = !this.modelInfo._agreePrivateRule
|
||||
this.modelInfo._agreePrivacy = !this.modelInfo._agreePrivacy
|
||||
},
|
||||
handleDialogClick(curModal){
|
||||
curModal.show = true
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<u-button @click="goto(`post/post?type=edit&billCode=${queryOption.billCode}&orderSn=${queryOption.orderSn}`)" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||
>修改
|
||||
</u-button>
|
||||
<u-button @click="handleCancel" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||
<u-button v-if="submitParam.orderStatus == 0" @click="handleCancel" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||
>取消
|
||||
</u-button>
|
||||
<u-button @click="goto(`post/post?copyBillCode=${queryOption.billCode}`)" type="primary" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||
|
||||
@ -3,6 +3,7 @@ import * as apiService from "@/common/api"
|
||||
|
||||
export const getOrderModels = () => {
|
||||
return {
|
||||
_agreePrivacy: true,
|
||||
sendDate: dayjs().format("YYYY-MM-DD HH:mm:ss"),// 下单时间
|
||||
reciever: { // 收件人信息
|
||||
country: undefined,
|
||||
|
||||
@ -183,7 +183,7 @@
|
||||
</view>
|
||||
<u-row>
|
||||
<u-button @click="handleSave" size="large" shape="circle"
|
||||
custom-style="width: 200rpx;height:80rpx;font-size: 30rpx;" type="primary">下单</u-button>
|
||||
custom-style="width: 200rpx;height:80rpx;font-size: 30rpx;" type="primary">{{curPageType.saveBtnTitle || '提交'}}</u-button>
|
||||
</u-row>
|
||||
</u-row>
|
||||
</view>
|
||||
@ -270,8 +270,8 @@
|
||||
return {
|
||||
pageTypeEnum,
|
||||
pageTypeMap: {
|
||||
[pageTypeEnum.create]: { title: '下单寄件', savedConfirmTitle: '是否操作下一单' },
|
||||
[pageTypeEnum.edit]: { title: '运单修改', savedConfirmTitle: '是否操作下一单' }
|
||||
[pageTypeEnum.create]: { title: '下单寄件', savedConfirmTitle: '是否操作下一单', saveBtnTitle: '下单' },
|
||||
[pageTypeEnum.edit]: { title: '运单修改', savedConfirmTitle: '是否操作下一单', saveBtnTitle: '保存' }
|
||||
},
|
||||
curPageType: {},
|
||||
pageLoading: true,
|
||||
@ -303,8 +303,8 @@
|
||||
// 初始化默认model
|
||||
await initDefaultModel(this.submitParam)
|
||||
this.queryOption.billCode = this.queryOption.billCode || this.queryOption.copyBillCode
|
||||
this.curPageType = this.pageTypeMap[this.queryOption.type] || {}
|
||||
this.setNavigationBarTitle(this.curPageType.title || this.pageTypeMap[pageTypeEnum.create].title)
|
||||
this.curPageType = this.pageTypeMap[this.queryOption.type || pageTypeEnum.create]
|
||||
this.setNavigationBarTitle(this.curPageType.title)
|
||||
this.isEdit = Boolean(this.queryOption.billCode || this.queryOption.orderSn)
|
||||
if(this.queryOption.defaultSubParams) {
|
||||
try{
|
||||
@ -321,6 +321,7 @@
|
||||
let res = await apiService.getOrderDetail({...this.queryOption, _loading: true})
|
||||
let data = res.data || {}
|
||||
data.goodsPics = (data.goodsPics && data.goodsPics.split(",")) || []
|
||||
data._agreePrivacy = true
|
||||
// 更新绑定业务员字段
|
||||
await getBindTsm(data)
|
||||
this.submitParam = res.data
|
||||
@ -384,9 +385,16 @@
|
||||
curModal.show = true
|
||||
},
|
||||
async handleSave(type) {
|
||||
let errMsg = ''
|
||||
let saveServerHand = apiService.submitOrder
|
||||
if(this.isEdit) { }
|
||||
let params = JSON.parse(JSON.stringify(this.submitParam));
|
||||
if(!errMsg && !params._agreePrivacy) {
|
||||
errMsg = '请同意《快件运单契约条款》'
|
||||
}
|
||||
if(errMsg) {
|
||||
return this.showToast(errMsg)
|
||||
}
|
||||
params.goodsPics = params.goodsPics.join(",")
|
||||
params.totalVolume = params.totalVolume || 0
|
||||
setBindTsm(params)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user