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

105 lines
2.1 KiB
Vue
Raw Normal View History

2024-01-29 10:48:55 +00:00
<template>
<view class="shet-cont">
2024-06-11 09:35:55 +00:00
<view class="jsfm-item" style="margin-top: 0;">
2024-01-29 10:48:55 +00:00
<u-row justify="between">
2024-05-31 10:42:15 +00:00
<text class="font-28 font-weight">总件数</text>
2024-01-29 10:48:55 +00:00
<view>
2024-06-02 15:02:19 +00:00
<u-number-box v-model="modelInfo.parcelQty" :min="1" :max="100000" buttonSize="50" inputWidth="100" iconStyle="font-size: 18rpx;"></u-number-box>
2024-01-29 10:48:55 +00:00
</view>
</u-row>
</view>
<view class="jsfm-item">
<u-row justify="between">
2024-12-22 03:18:02 +00:00
<text class="font-28 font-weight">实际重量</text>
2024-01-29 10:48:55 +00:00
<view>
2024-08-27 12:19:15 +00:00
<tpx-input v-model:value="modelInfo.billWeight" placeholder="" inputAlign="right" suffix="kg" _digit="4"></tpx-input>
2024-01-29 10:48:55 +00:00
</view>
</u-row>
</view>
<view class="jsfm-item">
<u-row justify="between" align="top">
2024-05-31 10:42:15 +00:00
<text class="font-28 pt-20 font-weight">总体积</text>
<view v-if="totalVolume || true">
2024-08-27 12:19:15 +00:00
<tpx-input v-model:value="modelInfo.totalVolume" placeholder="" inputAlign="right" suffix="m³" _digit="4"></tpx-input>
2024-01-31 06:48:01 +00:00
</view>
2024-01-29 10:48:55 +00:00
</u-row>
</view>
</view>
</template>
<script>
2024-05-31 10:42:15 +00:00
import * as apiService from "@/common/api"
2024-01-29 10:48:55 +00:00
export default {
computed: {
2024-05-31 10:42:15 +00:00
modelInfo: {
2024-01-29 10:48:55 +00:00
get(){
return this.value
}
2024-05-31 10:42:15 +00:00
},
totalVolume() {
let totalVolume = this.modelInfo.totalVolume
return totalVolume
},
isCargoListOnchange() {
return this.modelInfo.cargoList
}
},
watch: {
isCargoListOnchange: {
handler(newVal){
console.log("===bpe-goodsize-tmp isCargoListOnchange===")
this.handleCargoChange(newVal)
},
deep: true,
2024-01-29 10:48:55 +00:00
}
},
props: {
value: {
default () {
return { }
}
}
},
data() {
return {
}
},
created() {
},
onHide() {
},
unmounted() {
},
methods: {
2024-05-31 10:42:15 +00:00
handleCargoChange(list){
let parcelQty = 0, totalVolume = 0
list.map(t=> {
totalVolume += (+t.volume) || 0
})
2024-09-03 06:12:49 +00:00
this.modelInfo.totalVolume = totalVolume.toFixed(4)
2024-05-31 10:42:15 +00:00
},
async calceOther() {
},
async validData() {
await this.calceOther()
}
2024-01-29 10:48:55 +00:00
}
}
</script>
<style scoped lang="scss">
.shet-cont{
2024-02-01 07:52:00 +00:00
padding: 0;
2024-01-29 10:48:55 +00:00
}
.jsfm-item{
margin-top: 30rpx;
}
</style>