uu
This commit is contained in:
parent
4a82957ea0
commit
92e11321c1
@ -5,6 +5,7 @@ export const createOrderNo = (data = {})=> {
|
||||
return coreRequest(url.createOrderNo, data, {})
|
||||
}
|
||||
|
||||
// 下单-- 新增
|
||||
export const submitOrder = (data = {})=> {
|
||||
return coreRequest(url.submitOrder, data, {})
|
||||
}
|
||||
@ -53,6 +54,12 @@ export const calcWaybillFee = (data = {})=> {
|
||||
return coreRequest(url.calcWaybillFee, data, {})
|
||||
}
|
||||
|
||||
// 计算结算重量、体积重量
|
||||
export const calcSetteldWeight = (data = {})=> {
|
||||
return coreRequest(url.calcSetteldWeight, data, {})
|
||||
}
|
||||
|
||||
|
||||
// 下单-进仓列表
|
||||
export const warehouseInList = (data = {})=> {
|
||||
return coreRequest(url.warehouseInList, data, {}, "GET")
|
||||
|
||||
@ -28,6 +28,7 @@ export default {
|
||||
getDestPositionList: `/emis/emisDestination/listSimple`, // 目的地 列表
|
||||
getCaculteDestSite: `/emis/emisDestination/getDestSite`, // 自动计算目的地
|
||||
calcWaybillFee: `/emis/emisQuotePrice/calcWaybillFee`, // 计算运费
|
||||
calcSetteldWeight: `/emis/emisWaybill/calcSetteldWeight`, // 计算结算重量、结算体积
|
||||
warehouseInList: `/emis/emisWarehouseIn/listSimple`, // 下单-进仓单列表
|
||||
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@
|
||||
<view class="edm-input-item" style="padding-top: 24rpx;padding-bottom: 24rpx;">
|
||||
<tpx-text-item label="保存物品信息">
|
||||
<template v-slot:right>
|
||||
<u-switch v-model="modelInfo.isSave" active-color="#B12D29" size="34"></u-switch>
|
||||
<u-switch v-model="modelInfo.isSave" activeValue="1" inactiveValue="0" active-color="#B12D29" size="34"></u-switch>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<view class="edm-input-item">
|
||||
<tpx-text-item label="是否需要代垫运费">
|
||||
<template v-slot:right>
|
||||
<u-switch v-model="modelInfo.blPrepareInFreight" active-color="#B12D29" size="34"></u-switch>
|
||||
<u-switch v-model="modelInfo.blPrepareInFreight" activeValue="1" inactiveValue="0" active-color="#B12D29" size="34"></u-switch>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as apiService from "@/common/api"
|
||||
export default {
|
||||
computed: {
|
||||
modelInfo: {
|
||||
@ -56,7 +57,7 @@
|
||||
}
|
||||
if(totalVolume && totalVolume.toFixed) {
|
||||
totalVolume = totalVolume.toFixed(2)
|
||||
this.calcuOther({ totalVolume })
|
||||
this.modelInfo.totalVolume = totalVolume
|
||||
}
|
||||
return totalVolume
|
||||
}
|
||||
@ -82,11 +83,15 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
calcuOther({ totalVolume }) {
|
||||
this.modelInfo.totalVolume = totalVolume
|
||||
this.modelInfo.volumeWeight = (this.modelInfo.totalVolume ) * (1000000 / this.modelInfo.meterRate)
|
||||
let maxVal = Math.max(this.modelInfo.volumeWeight, this.modelInfo.billWeight)
|
||||
this.modelInfo.settlementWeight = this.modelInfo.totalWeight = maxVal
|
||||
async calceOther() {
|
||||
let { totalVolume, productType, billWeight } = this.modelInfo
|
||||
let res = await apiService.calcSetteldWeight({ totalVolume, productType, billWeight })
|
||||
const { settlementWeight, volumeWeight } = res.data
|
||||
this.modelInfo.volumeWeight = volumeWeight
|
||||
this.modelInfo.settlementWeight = this.modelInfo.totalWeight = settlementWeight
|
||||
},
|
||||
async validData() {
|
||||
await this.calceOther()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ export const getOrderModels = () => {
|
||||
"customerDeliveryBeginTime": undefined,
|
||||
"goodsType": undefined,
|
||||
"goodsInfo": undefined,
|
||||
"totalWeight": undefined, // 总重量
|
||||
"totalWeight": undefined, // 总重量 = 结算重量
|
||||
"totalVolume": undefined, // 总体积
|
||||
"parcelQty": undefined, // 总件数
|
||||
"billWeight": undefined, // 实际重量
|
||||
@ -84,8 +84,8 @@ export const getOrderModels = () => {
|
||||
"payee": undefined, // 回款联系人
|
||||
"salesmen": undefined, // 销售员
|
||||
"operateEmployeeCode": undefined, // 操作员
|
||||
"blMessage": undefined, // 寄件 短信开关
|
||||
"blAcceptMessage": undefined, // 签收 短信开关
|
||||
"blMessage": 0, // 寄件 短信开关
|
||||
"blAcceptMessage": 0, // 签收 短信开关
|
||||
"remark": undefined, // 备注
|
||||
"customerCode": undefined, // 客户code
|
||||
"feeItems": [ // 计费信息
|
||||
@ -124,14 +124,15 @@ export const getOrderModels = () => {
|
||||
// "isSave": "是否保存 1-保存"
|
||||
// }
|
||||
],
|
||||
"blPrepareInFreight": undefined, // 是否入仓代垫运费 1-是 0-否
|
||||
"blPrepareInFreight": 0, // 是否入仓代垫运费 1-是 0-否
|
||||
"prepareInEstFee": undefined, // 入仓代垫运费
|
||||
"prepareInRealFee": undefined, // 代垫实际运费
|
||||
"prepareInExpress": undefined, // 快递公司
|
||||
"prepareInBillCode": undefined, // 快递单号
|
||||
"prepareInRemark": undefined, // 预入仓自定义标识
|
||||
"prepareInSupplier": undefined, // 预入仓供应商
|
||||
"warehouseInNo": undefined, // 进仓单号
|
||||
"warehouseInNo": "", // 进仓单号
|
||||
"meterRate": undefined, // 泡重比
|
||||
"goodsPics": "", // 货物图片
|
||||
}
|
||||
}
|
||||
@ -18,7 +18,7 @@
|
||||
<u-row justify="between" custom-style="margin-top:20rpx;">
|
||||
<view style="width: 130rpx;">客户</view>
|
||||
<view style="flex:1;">
|
||||
<tpx-select v-model:resObject="kehuRes" :getListFun="getCustomerUserList" :transKeyVal="{valKey: 'customerCode',titleKey: 'customerFullName'}" v-model:value="submitParam.customerCode" :isWhite="true"></tpx-select>
|
||||
<tpx-select v-model:resObject="kehuRes" :getListFun="getCustomerUserList" :transKeyVal="{valKey: 'customerCode',titleKey: 'customerName'}" v-model:value="submitParam.customerCode" :isWhite="true"></tpx-select>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
@ -160,7 +160,7 @@
|
||||
<tpx-text-item label="寄件短信">
|
||||
<template v-slot:right>
|
||||
<text class="pr-20 clr-sub">是否短信</text>
|
||||
<u-switch v-model="submitParam.blMessage" active-color="#B12D29" size="34"></u-switch>
|
||||
<u-switch v-model="submitParam.blMessage" activeValue="1" inactiveValue="0" active-color="#B12D29" size="34"></u-switch>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
@ -169,7 +169,7 @@
|
||||
<tpx-text-item label="收件短信">
|
||||
<template v-slot:right>
|
||||
<text class="pr-20 clr-sub">是否短信</text>
|
||||
<u-switch v-model="submitParam.blAcceptMessage" active-color="#B12D29" size="34"></u-switch>
|
||||
<u-switch v-model="submitParam.blAcceptMessage" activeValue="1" inactiveValue="0" active-color="#B12D29" size="34"></u-switch>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
@ -212,17 +212,17 @@
|
||||
<template v-slot:footer>
|
||||
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
|
||||
<u-row>
|
||||
<u-button size="large" shape="circle"
|
||||
<u-button @click="handleSave()" size="large" shape="circle"
|
||||
custom-style="width: 260rpx;height:80rpx;font-size: 30rpx;" :plain="true" type="primary">保存</u-button>
|
||||
|
||||
<u-button size="large" shape="circle"
|
||||
<u-button @click="handleSave('print')" size="large" shape="circle"
|
||||
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary" >确认并打印</u-button>
|
||||
</u-row>
|
||||
</view>
|
||||
</template>
|
||||
</tpx-layout>
|
||||
|
||||
<buns-edit-sheet percentHeight="70" title="商品信息" v-model:show="goodChooseModal.show" v-model:value="submitParam" v-slot="tempObject">
|
||||
<buns-edit-sheet percentHeight="70" title="商品信息" v-model:show="goodChooseModal.show" v-model:value="submitParam" v-slot="tempObject" @onSure="handleGoodInfoSure">
|
||||
<view class="mb-20">托寄货物描述</view>
|
||||
<bpe-gooditem-edit-tmp :value="tempObject.value"></bpe-gooditem-edit-tmp>
|
||||
<view class="mt-30">
|
||||
@ -232,7 +232,7 @@
|
||||
<bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp>
|
||||
</view>
|
||||
<view class="mt-30">
|
||||
<bpe-goodsize-tmp :value="tempObject.value"></bpe-goodsize-tmp>
|
||||
<bpe-goodsize-tmp ref="goodSize" :value="tempObject.value"></bpe-goodsize-tmp>
|
||||
</view>
|
||||
</buns-edit-sheet>
|
||||
</tpx-page>
|
||||
@ -285,17 +285,6 @@
|
||||
sendSiteCode: this.$store.getters.userInfo.ownerSiteCode,
|
||||
dispatchUnderlingSiteCode: info.dispatchUnderlingSiteCode,
|
||||
}
|
||||
// TODO
|
||||
param = {
|
||||
"productType": "24202",
|
||||
"customerCode": "1",
|
||||
"custNo": "1",
|
||||
"calcFeeType": "1",
|
||||
"settlementWeight": "2.3",
|
||||
"totalVolume": "0.03",
|
||||
"sendSiteCode": "25001",
|
||||
"dispatchUnderlingSiteCode": "95001"
|
||||
}
|
||||
return param
|
||||
},
|
||||
isShowJifei(){
|
||||
@ -305,6 +294,9 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryOption: {
|
||||
id: '', // 运单id
|
||||
},
|
||||
kehuRes: { list: [] },
|
||||
wayRes: { list: [] },
|
||||
productRes: { list: [] },
|
||||
@ -328,7 +320,8 @@
|
||||
// path: 'TODO'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(option) {
|
||||
this.queryOption = queryOption
|
||||
this.initData();
|
||||
this.initEvent()
|
||||
},
|
||||
@ -381,7 +374,23 @@
|
||||
// 更新路线推荐的默认目的地
|
||||
this.submitParam.destinationCode = res.data.destCode
|
||||
this.handleDestPostChange(this.submitParam.destinationCode)
|
||||
},
|
||||
async handleGoodInfoSure() {
|
||||
// 校验各个组件的参数
|
||||
let res = await this.$refs.goodSize.validData()
|
||||
},
|
||||
async handleSave(type) {
|
||||
let saveServerHand = apiService.submitOrder
|
||||
if(this.queryOption.id) {
|
||||
// 编辑订单 TODO
|
||||
}
|
||||
let params = JSON.parse(JSON.stringify(this.submitParam));
|
||||
params.warehouseInNo = params.warehouseInNo.join(",")
|
||||
params.goodsPics = params.goodsPics.join(",")
|
||||
await saveServerHand(params)
|
||||
this.showToast('操作成功')
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user