This commit is contained in:
aihe 2024-06-19 00:16:19 +08:00
parent fafdc131bf
commit 742ec072f1
6 changed files with 107 additions and 38 deletions

View File

@ -18,7 +18,12 @@
<text class="">{{item.billCode}}</text>
</u-col>
<u-col span="4">
<text class="clr-sub">{{item.scanDate}}</text>
<u-row>
<text class="clr-sub">{{item.scanDate}}</text>
<u-row v-if="canDel" @click="handleDel(index)" justify="center" custom-style="height: 60rpx;width: 60rpx;">
<u-icon name="trash" size="32"></u-icon>
</u-row>
</u-row>
</u-col>
</u-row>
</view>
@ -42,6 +47,11 @@
default () {
return { list: [] }
}
},
canDel: {
default () {
return false
}
}
},
data() {
@ -57,7 +67,9 @@
},
methods: {
handleDel(index){
this.modelRes.list.splice(index, 1)
}
}
}
</script>

View File

@ -180,7 +180,8 @@
},
data() {
return {
costModal: { item: {}, show: false }
costModal: { item: {}, show: false },
daiDianCode: '1002'
}
},
created() {
@ -193,17 +194,27 @@
},
methods: {
getNewCostItem(code, extData = {}){
return {
blAutoGen: 0, // 手动添加的费用标识
feeCode: code,
feeName: this.dicData.emis_fee_type.filter(t => t.val == code)[0].title,
...extData
}
},
handleDelFee(index) {
// 同步变量
if(this.modelInfo.feeItems[index].feeCode == this.daiDianCode) {
this.modelInfo.blPrepareInFreight = 0
this.modelInfo.prepareInEstFee = undefined
}
this.modelInfo.feeItems.splice(index, 1)
this.calteFreight()
},
handleAddFee(val) {
this.costModal.show = {}
this.costModal.item = {
blAutoGen: 0, // 手动添加的费用标识
feeCode: val,
feeName: this.dicData.emis_fee_type.filter(t => t.val == val)[0].title
}
this.costModal.item = this.getNewCostItem()
},
async calcWaybillFee(params = {}) {
// calcFeeType计算入参特殊处理
@ -217,6 +228,10 @@
setTimeout(()=> {
this.calteFreight()
}, 500)
// 同步外层变量
if(item.feeCode == this.daiDianCode) {
this.modelInfo.prepareInEstFee = val
}
},
handleAwPriceChange(item) {
setTimeout(()=> {
@ -258,6 +273,30 @@
setTimeout(()=>{
this.calteFreight()
}, 500)
},
getCostItemByFeeCode(code){
let item, index;
this.modelInfo.feeItems.map((t, i)=> {
if(t.feeCode == code) {
item = t;
index = i
}
})
return { item, index }
},
updateDaiDianFeeData() {
let { item, index } = this.getCostItemByFeeCode(this.daiDianCode)
// 开启 代垫运费开关,需要同步外层录入数据
if(this.modelInfo.blPrepareInFreight == '1'){
if(item) {
item.realFee = this.modelInfo.prepareInEstFee
} else {
item = this.getNewCostItem(this.daiDianCode, { realFee: this.modelInfo.prepareInEstFee })
this.handleCostItemSure(item)
}
} else if(typeof index != 'undefined'){
this.handleDelFee(index)
}
}
}
}

View File

@ -101,12 +101,9 @@
methods: {
handleDDianSwitch(val){
// if(val==1) {
// // 开启代垫运费,需要往 modelInfo.feeItems同步数据
// let curItem = modelInfo.feeItems?.filter(t=> t.val == '1002')[0]
// if(!curItem) {
// }
// }
if(val!=1) {
this.modelInfo.prepareInEstFee = undefined
}
}
}
}

View File

@ -231,7 +231,7 @@
</u-row>
</view>
<view class="blcok-white">
<bpe-cost-tmp v-model:value="submitParam"></bpe-cost-tmp>
<bpe-cost-tmp v-model:value="submitParam" ref="bCostRef"></bpe-cost-tmp>
</view>
</view>
@ -481,6 +481,10 @@
async handleGoodInfoSure() {
// 校验各个组件的参数
let res = await this.$refs.goodEditInfo.validData()
// 同步 代垫运费 数据
setTimeout(()=> {
this.$refs.bCostRef.updateDaiDianFeeData()
}, 300)
},
async handleSave(type) {
let saveServerHand = apiService.submitOrder

View File

@ -2,32 +2,37 @@
<tpx-page>
<tpx-layout>
<template v-slot:header>
<view class="pt-30">
<view class="com-jianju" style="padding: 30rpx;background-color:#B12D29;border-radius: 30rpx;">
<u-row justify="between">
<view class="clr-wht font-32 font-weight">订单概况</view>
</u-row>
<view class="">
<view class="" style="padding: 20rpx;background-color:#B12D29;border-radius: 0;">
<u-row v-if="staticDataList.length > 0" justify="between" custom-style="margin-top:30rpx;">
<u-row v-if="staticDataList.length > 0" justify="between">
<template v-for="(mbItem, mIndex) in staticDataList">
<view style="flex: 1;text-align: center;">
<u-text :text="mbItem.subTitle" color="#fff" bold="true" size="40" align="center"></u-text>
<view class="pt-20 clr-wht font-26" style="opacity: 0.8;">
<u-row justify="center">
<u-icon name="order" color="#fff" custom-style="opacity: 0.8;" size="30"></u-icon>
<text class="pl-10">{{mbItem.title}}</text>
</u-row>
</view>
</view>
<view v-if="mIndex+1 != staticDataList.length">
<u-line direction="col" color="#fff" length="80"></u-line>
</view>
<u-row>
<text class="clr-wht font-26" style="opacity: 0.8;">{{mbItem.title}}</text>
<text class="pl-10 clr-wht font-38 font-weight">{{mbItem.subTitle}}</text>
</u-row>
</template>
</u-row>
</view>
</view>
<view class="com-jianju" style="padding-top: 30rpx;">
<view class="com-jianju" style="padding-top: 16rpx;">
<u-row justify="between">
<view style="width: 140rpx;" class="font-weight">运单号</view>
<view style="flex:1;">
<tpx-scan-input v-model:value="searchParam.billCode" placeholder="请输入或扫码"
@change="handleScanValChange" iconPos="right"></tpx-scan-input>
</view>
</u-row>
<u-row justify="between" custom-style="margin-top:16rpx;">
<view style="width: 140rpx;" class="font-weight">日期</view>
<view style="flex:1;">
<tpx-date-input v-model:value="searchParam._date" placeholder="请选择时间"></tpx-date-input>
</view>
</u-row>
</view>
<view class="com-jianju" style="padding-top: 16rpx;">
<u-row justify="between" align="top">
<u-col span="12">
<!-- 订单状态 -->
@ -141,12 +146,24 @@
onUnload() {
},
methods: {
getListFun: apiService.getOrderList,
transSearchPm(param){
let cpParam = JSON.parse(JSON.stringify(param))
cpParam['params.beginDate'] = cpParam._date[0]
cpParam['params.endDate'] = cpParam._date[1]
cpParam['params.waybillStatType'] = param.waybillStatType
return cpParam
},
async getListFun(param){
let cpParam = this.transSearchPm(param)
let res = await apiService.getOrderList(cpParam)
return res
},
initData(){
this.getStaticData()
},
async getStaticData(){
const staRes = await apiService.getWaybillStatMap()
let cpParam = this.transSearchPm(this.searchParam)
const staRes = await apiService.getWaybillStatMap(cpParam)
let { hasDoNum, waitDoNum, statNumList } = staRes.data
this.staticInfo.commStat = { hasDoNum, waitDoNum }
let orderStat = {}

View File

@ -25,7 +25,7 @@
</view>
</u-row>
<u-row custom-style="margin-top:20rpx;">
<tpx-input v-model:value="submitParam.scanWeight" placeholder="合包重量"></tpx-input>
<tpx-input v-model:value="submitParam.scanWeight" placeholder="合包重量" _digit="5" suffix="KG"></tpx-input>
</u-row>
<view class="mt-20">合包件数:{{resData.list.length}}</view>
@ -42,7 +42,7 @@
<view class="blcok-white-noradius">
<bo-scanlist-tmp :resData="resData"></bo-scanlist-tmp>
<bo-scanlist-tmp :resData="resData" :canDel="true"></bo-scanlist-tmp>
</view>
</template>