emis-app/components/buns-post-edit-templates/bpe-goodsize-tmp.vue

94 lines
2.0 KiB
Vue
Raw Normal View History

2024-01-29 06:07:42 +00:00
<template>
<view class="shet-cont">
<view class="jsfm-item">
<u-row justify="between">
2024-05-25 15:33:49 +00:00
<text class="font-28 font-weight">总件数</text>
2024-01-29 06:07:42 +00:00
<view>
2024-04-27 15:19:55 +00:00
<uni-number-box v-model="modelInfo.parcelQty" :min="1" :max="10000"></uni-number-box>
2024-01-29 06:07:42 +00:00
</view>
</u-row>
</view>
<view class="jsfm-item">
<u-row justify="between">
2024-05-25 15:33:49 +00:00
<text class="font-28 font-weight">包裹重量</text>
2024-01-29 06:07:42 +00:00
<view>
2024-05-25 15:33:49 +00:00
<tpx-input v-model:value="modelInfo.billWeight" placeholder="" inputAlign="right" suffix="kg" type="digit"></tpx-input>
2024-01-29 06:07:42 +00:00
</view>
</u-row>
</view>
<view class="jsfm-item">
<u-row justify="between" align="top">
2024-05-25 15:33:49 +00:00
<text class="font-28 pt-20 font-weight">总体积</text>
<view v-if="totalVolume || true">
<tpx-input v-model:value="modelInfo.totalVolume" placeholder="" inputAlign="right" suffix="m³" type="digit"></tpx-input>
2024-01-31 06:45:51 +00:00
</view>
2024-01-29 06:07:42 +00:00
</u-row>
</view>
</view>
</template>
<script>
2024-05-01 16:46:30 +00:00
import * as apiService from "@/common/api"
2024-01-29 06:07:42 +00:00
export default {
computed: {
2024-04-27 15:19:55 +00:00
modelInfo: {
2024-01-29 06:07:42 +00:00
get(){
return this.value
}
2024-04-28 03:27:41 +00:00
},
totalVolume() {
let totalVolume = this.modelInfo.totalVolume
2024-05-25 15:33:49 +00:00
2024-04-28 03:27:41 +00:00
return totalVolume
2024-01-29 06:07:42 +00:00
}
},
props: {
value: {
default () {
return { }
}
}
},
data() {
return {
}
},
created() {
},
onHide() {
},
unmounted() {
},
methods: {
2024-05-01 16:46:30 +00:00
async calceOther() {
let { totalVolume, productType, billWeight } = this.modelInfo
2024-05-12 05:25:11 +00:00
let voRes = await apiService.calcVolumeWeight({ productType, totalVolume })
let { volumeWeight } = voRes.data
let stRes = await apiService.calcSetteldWeight({ volumeWeight, productType, billWeight })
const { settlementWeight } = stRes.data
2024-05-01 16:46:30 +00:00
this.modelInfo.volumeWeight = volumeWeight
this.modelInfo.settlementWeight = this.modelInfo.totalWeight = settlementWeight
2024-05-12 05:25:11 +00:00
//
2024-05-01 16:46:30 +00:00
},
async validData() {
await this.calceOther()
2024-04-28 05:25:25 +00:00
}
2024-01-29 06:07:42 +00:00
}
}
</script>
<style scoped lang="scss">
.shet-cont{
2024-02-01 07:51:22 +00:00
padding: 0;
2024-01-29 06:07:42 +00:00
}
.jsfm-item{
margin-top: 30rpx;
}
</style>