This commit is contained in:
aihe 2024-06-11 11:25:41 +08:00
parent d95fb5523a
commit 6c9ed9e20d
4 changed files with 64 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<tpx-dialog :show="show" :title="title" @onClose="handleCloseModal()"> <tpx-dialog :show="show" :title="title" @onClose="handleCloseModal()" rootStyle="min-height:auto;">
<view :style="`position: relative;height: calc(${percentHeight}vh);`"> <view :style="cptStyle">
<tpx-layout> <tpx-layout>
<template v-slot:body> <template v-slot:body>
<slot v-if="show" :value="submitVals"></slot> <slot v-if="show" :value="submitVals"></slot>
@ -21,6 +21,12 @@
<script> <script>
export default { export default {
computed:{
cptStyle(){
let sty = `position: relative;height: calc(${this.percentHeight}vh);`
return sty
}
},
components: { }, components: { },
watch: { watch: {
show(v){ show(v){

View File

@ -93,6 +93,36 @@
maxlength="50" count></u-textarea> maxlength="50" count></u-textarea>
</view> </view>
</view> </view>
<buns-edit-sheet percentHeight="40" :title="costModal.item.feeName" v-model:show="costModal.show" v-model:value="costModal.item" v-slot="tempObject" @onSure="handleCostItemSure">
<u-row custom-style="gap: 20rpx;margin-top:10rpx;">
<u-row custom-style="flex: 1">
<text class="font-26 pr-10">首重费</text>
<tpx-input v-model:value="tempObject.value.initialWeightFee" _digit="5" :isWhite="true"
custom-style="width: 120rpx;height: 46rpx;" suffix="CNY"></tpx-input>
</u-row>
<u-row custom-style="flex: 1">
<text class="font-26 pr-10">续重单价</text>
<tpx-input v-model:value="tempObject.value.addWeightPrice" _digit="5" :isWhite="true"
custom-style="width: 120rpx;height: 46rpx;" suffix="CNY"></tpx-input>
</u-row>
</u-row>
<u-row style="margin-top:30rpx;" justify="between">
<u-row custom-style="width:300rpx;">
<text class="pr-20">应收</text>
<tpx-input v-model:value="tempObject.value.fee" _digit="5" :isWhite="true" custom-style="width: 120rpx;height: 46rpx;"
suffix="CNY"></tpx-input>
</u-row>
<u-row custom-style="width:300rpx;">
<text class="font-26 pr-20">实收</text>
<tpx-input v-model:value="tempObject.value.realFee" _digit="5" :isWhite="true" custom-style="width: 120rpx;height: 46rpx;"
suffix="CNY"></tpx-input>
</u-row>
</u-row>
<view class="mt-30">
<tpx-input v-model:value="tempObject.value.remark" placeholder="费用描述" isWhite="true"></tpx-input>
</view>
</buns-edit-sheet>
</template> </template>
<script> <script>
@ -149,7 +179,9 @@
}, },
}, },
data() { data() {
return {} return {
costModal: { item: {}, show: false }
}
}, },
created() { created() {
}, },
@ -165,11 +197,12 @@
this.modelInfo.feeItems.splice(index, 1) this.modelInfo.feeItems.splice(index, 1)
}, },
handleAddFee(val) { handleAddFee(val) {
this.modelInfo.feeItems.push({ this.costModal.show = {}
this.costModal.item = {
blAutoGen: 0, // 手动添加的费用标识 blAutoGen: 0, // 手动添加的费用标识
feeCode: val, feeCode: val,
feeName: this.dicData.emis_fee_type.filter(t => t.val == val)[0].title feeName: this.dicData.emis_fee_type.filter(t => t.val == val)[0].title
}) }
}, },
async calcWaybillFee(params = {}) { async calcWaybillFee(params = {}) {
let res = await apiService.calcWaybillFee({ custNo: this.modelInfo.custNo, ...params }) let res = await apiService.calcWaybillFee({ custNo: this.modelInfo.custNo, ...params })
@ -215,6 +248,12 @@
total += (+t.realFee) total += (+t.realFee)
}) })
this.modelInfo.freight = total this.modelInfo.freight = total
},
handleCostItemSure(data){
this.modelInfo.feeItems.push({ ...data })
setTimeout(()=>{
this.calteFreight()
}, 500)
} }
} }
} }

View File

@ -3,7 +3,7 @@
mut-bind:touchmove="true"> mut-bind:touchmove="true">
<view @touchmove.stop="" class="dialog-mask" @click="handleClose()"></view> <view @touchmove.stop="" class="dialog-mask" @click="handleClose()"></view>
<view :class="`dialog-content ${type} pos-${closePosType}`" <view :class="`dialog-content ${type} pos-${closePosType}`"
:style="`padding: 20rpx 0rpx;background-color:${bgColor};`"> :style="compRootStyle">
<view v-if="title" style="margin-bottom: 30rpx;" > <view v-if="title" style="margin-bottom: 30rpx;" >
<u-row @touchmove.stop="" justify="between" custom-style="padding: 0 30rpx 20rpx; 30rpx;"> <u-row @touchmove.stop="" justify="between" custom-style="padding: 0 30rpx 20rpx; 30rpx;">
<view class="lgd-title">{{title}}</view> <view class="lgd-title">{{title}}</view>
@ -22,6 +22,13 @@
<script> <script>
export default { export default {
computed:{
compRootStyle(){
let sty = `padding: 20rpx 0rpx;background-color:${this.bgColor};`
sty += `${this.rootStyle || ''};`
return sty
}
},
props: { props: {
show: { show: {
default () { default () {
@ -58,6 +65,11 @@
return '' return ''
} }
}, },
rootStyle: {
default () {
return ''
}
},
zIndex: { zIndex: {
default () { default () {
return 990 return 990

View File

@ -271,7 +271,7 @@
</template> </template>
</bpe-goodphoto-tmp> </bpe-goodphoto-tmp>
</view> </view>
<view class="mt-30"> <view v-if="tempObject.value.pickupMethod == 1" class="mt-30">
<bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp> <bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp>
</view> </view>
</buns-edit-sheet> </buns-edit-sheet>