uu
This commit is contained in:
parent
530e9da7ca
commit
0b6575ac66
@ -14,7 +14,7 @@
|
||||
<view class="mr-10">
|
||||
<u-text text="预估" :bold="true" size="28"></u-text>
|
||||
</view>
|
||||
<u-text :text="80" mode="price" color="#B12D29" :bold="true" size="28"></u-text>
|
||||
<u-text :text="modelInfo.freight || 0" mode="price" color="#B12D29" :bold="true" size="28"></u-text>
|
||||
</u-row>
|
||||
<u-text margin="10rpx 0 0 0" text="温馨提示:具体费用以快递小哥核实为准" color="#999" size="26"></u-text>
|
||||
</view>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<tpx-checkitems :list="proTypeList" v-model:value="modelInfo.productType" v-model:text="modelInfo.productTypeName" v-slot="curPro" min-checked="1" type="single"
|
||||
:transKeyVal="{valKey: 'productType', titleKey: 'productTypeName'}"
|
||||
@onChange="handleChooseItem" :transKeyVal="{valKey: 'productType', titleKey: 'productTypeName'}"
|
||||
>
|
||||
<view slot :class="`yunf-item ${curPro.checked?'active':''}`">
|
||||
<u-row justify="between">
|
||||
@ -90,6 +90,9 @@
|
||||
async calcTypeFee(params = {}){
|
||||
let res = await apiService.preCalcWaybillFee({ custNo: this.modelInfo.custNo, ...params })
|
||||
this.proTypeList = res.data || []
|
||||
},
|
||||
handleChooseItem(val, text, checkedList){
|
||||
this.modelInfo.freight = checkedList?.[0]?.estFee
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ export const getOrderModels = () => {
|
||||
productType: undefined, // 产品
|
||||
customsClear: undefined, // 清关方式
|
||||
customsEclaration: undefined, // 报关方式
|
||||
packType: undefined, // 包装类型
|
||||
packType: 2, // 包装类型
|
||||
dispatchMethod: undefined, // 派送方式
|
||||
pickupMethod: undefined, // 取件方式
|
||||
pickStartDate: undefined,
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
<bpe-checkagree-tmp v-model:value="submitParam"></bpe-checkagree-tmp>
|
||||
</view>
|
||||
<u-row>
|
||||
<u-button size="large" shape="circle"
|
||||
<u-button @click="handleSave" size="large" shape="circle"
|
||||
custom-style="width: 200rpx;height:80rpx;font-size: 30rpx;" type="primary">下单</u-button>
|
||||
</u-row>
|
||||
</u-row>
|
||||
@ -184,6 +184,11 @@
|
||||
import * as apiService from "@/common/api"
|
||||
import { getOrderModels } from "./model"
|
||||
|
||||
const pageTypeEnum = {
|
||||
create: 'create',
|
||||
edit: 'edit'
|
||||
}
|
||||
|
||||
export default {
|
||||
components: { BpeAddressinfoTmp, BpeGoodstaticTmp, BpeGooditemEditTmp, BpeGoodphotoTmp, BpeBindedpostTmp, BpeChoosetypelistTmp, BpeRemarkTmp, BpeCheckagreeTmp },
|
||||
props: {
|
||||
@ -225,6 +230,12 @@
|
||||
getMonthpayAccountList: apiService.getMonthpayAccountList,
|
||||
getDefaultData() { // data的默认数据
|
||||
return {
|
||||
pageTypeEnum,
|
||||
pageTypeMap: {
|
||||
[pageTypeEnum.create]: { title: '上门取件', savedConfirmTitle: '是否操作下一单' },
|
||||
[pageTypeEnum.edit]: { title: '运单修改', savedConfirmTitle: '是否操作下一单' }
|
||||
},
|
||||
curPageType: {},
|
||||
pageLoading: true,
|
||||
isEdit: false,
|
||||
queryOption: {
|
||||
@ -250,6 +261,8 @@
|
||||
},
|
||||
async initData() { // 初始化
|
||||
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.isEdit = Boolean(this.queryOption.billCode || this.queryOption.orderSn)
|
||||
if(this.queryOption.defaultSubParams) {
|
||||
try{
|
||||
@ -302,7 +315,7 @@
|
||||
|
||||
},
|
||||
async updateDltSendSite({ lineCode }) {
|
||||
const { country, province, city, county, address } = this.submitParam.reciever
|
||||
const { country, province, city, county, address } = this.submitParam.sender
|
||||
let sendRes = await apiService.getCaculteSendSite({ lineCode, country, province, city, county, address })
|
||||
let data = sendRes.data || {}
|
||||
this.submitParam.sendSiteCode = data.siteCode
|
||||
@ -311,6 +324,29 @@
|
||||
|
||||
handleDialogClick(curModal){
|
||||
curModal.show = true
|
||||
},
|
||||
async handleSave(type) {
|
||||
let saveServerHand = apiService.submitOrder
|
||||
if(this.isEdit) { }
|
||||
let params = JSON.parse(JSON.stringify(this.submitParam));
|
||||
params.goodsPics = params.goodsPics.join(",")
|
||||
await saveServerHand(params)
|
||||
await this.saveSuccessBack()
|
||||
},
|
||||
async saveSuccessBack(){
|
||||
let { savedConfirmTitle } = this.curPageType
|
||||
if(savedConfirmTitle) {
|
||||
let cBl = await this.confirmModal(`操作成功,${savedConfirmTitle}`)
|
||||
if(cBl) {
|
||||
// 刷新当前页面状态
|
||||
this.reloadCurrentPage(this)
|
||||
} else {
|
||||
this.goBack()
|
||||
}
|
||||
} else {
|
||||
this.showToast('操作成功')
|
||||
this.goBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user