uu
This commit is contained in:
parent
91c727fba7
commit
3d1f091640
@ -49,35 +49,43 @@
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
|
||||
<view class="edm-input-item">
|
||||
<tpx-text-item label="物品单价">
|
||||
<template v-slot:right>
|
||||
<u-input placeholder="请填写" v-model="modelInfo.price" inputAlign="right" font-size="26"
|
||||
custom-style="border:0;border-radius: 10rpx;padding: 14rpx 20rpx;"
|
||||
placeholder-style="color: #999; " type="digit"
|
||||
>
|
||||
<template #suffix>
|
||||
<text class="font-26 clr-sub pl-10">CNY</text>
|
||||
</template>
|
||||
</u-input>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
<bpe-gooditemsize-tmp v-model:value="modelInfo"></bpe-gooditemsize-tmp>
|
||||
|
||||
<view v-if="showMode!=1">
|
||||
<view class="edm-input-item">
|
||||
<tpx-text-item label="物品单价">
|
||||
<template v-slot:right>
|
||||
<u-input placeholder="请填写" v-model="modelInfo.price" inputAlign="right" font-size="26"
|
||||
custom-style="border:0;border-radius: 10rpx;padding: 14rpx 20rpx;"
|
||||
placeholder-style="color: #999; " type="digit"
|
||||
>
|
||||
<template #suffix>
|
||||
<text class="font-26 clr-sub pl-10">CNY</text>
|
||||
</template>
|
||||
</u-input>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
|
||||
<view class="edm-input-item">
|
||||
<tpx-text-item label="原产地">
|
||||
<template v-slot:right>
|
||||
<u-input placeholder="请填写" v-model="modelInfo.nationArea" inputAlign="right" font-size="26"
|
||||
custom-style="border:0;border-radius: 10rpx;padding: 14rpx 20rpx;"
|
||||
placeholder-style="color: #999; "
|
||||
></u-input>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="edm-input-item">
|
||||
<tpx-text-item label="原产地">
|
||||
<template v-slot:right>
|
||||
<u-input placeholder="请填写" v-model="modelInfo.nationArea" inputAlign="right" font-size="26"
|
||||
custom-style="border:0;border-radius: 10rpx;padding: 14rpx 20rpx;"
|
||||
placeholder-style="color: #999; "
|
||||
></u-input>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="dt-block" style="margin-top: 50rpx;">
|
||||
<view v-if="showMode!=1" class="dt-block" style="margin-top: 50rpx;">
|
||||
<view class="dt-tle">
|
||||
<view class="com-section grey">其他信息(按需填写)</view>
|
||||
</view>
|
||||
@ -165,7 +173,9 @@
|
||||
<script>
|
||||
import * as apiService from "@/common/api"
|
||||
import { transListKeyTitle } from "@/common/util"
|
||||
import BpeGooditemsizeTmp from "@/components/buns-post-edit-templates/bpe-gooditemsize-tmp"
|
||||
export default {
|
||||
components: { BpeGooditemsizeTmp },
|
||||
computed: {
|
||||
dicData() {
|
||||
return this.$store.getters.dicData
|
||||
@ -191,6 +201,11 @@
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
showMode: {
|
||||
default () {
|
||||
return '1' // 1 只显示商品名称、体积; 2:显示全部商品信息
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
89
components/buns-post-edit-templates/bpe-gooditemsize-tmp.vue
Normal file
89
components/buns-post-edit-templates/bpe-gooditemsize-tmp.vue
Normal file
@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<view class="">
|
||||
|
||||
<view class="jsfm-item">
|
||||
<u-row justify="between" align="top">
|
||||
<text class="font-28 pt-20 font-weight">尺寸</text>
|
||||
<view style="width: 70%;">
|
||||
<u-row justify="between">
|
||||
<u-col span="3.7">
|
||||
<tpx-input v-model:value="modelInfo.length" @change="calculateVplume" placeholder="长" inputAlign="right" suffix="cm" type="digit"></tpx-input>
|
||||
</u-col>
|
||||
<u-col span="3.7">
|
||||
<tpx-input v-model:value="modelInfo.width" @change="calculateVplume" placeholder="宽" inputAlign="right" suffix="cm" type="digit"></tpx-input>
|
||||
</u-col>
|
||||
<u-col span="3.7">
|
||||
<tpx-input v-model:value="modelInfo.height" @change="calculateVplume" placeholder="高" inputAlign="right" suffix="cm" type="digit"></tpx-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
<view class="jsfm-item">
|
||||
<u-row justify="between" align="top">
|
||||
<text class="font-28 font-weight">体积</text>
|
||||
<view style="">
|
||||
{{modelInfo.volume || '0'}}
|
||||
<text class="clr-sub">m³</text>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
modelInfo: {
|
||||
get(){
|
||||
return this.value
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
default () {
|
||||
return { }
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
onHide() {
|
||||
|
||||
},
|
||||
unmounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
calculateVplume() {
|
||||
setTimeout(()=> {
|
||||
let volume = this.modelInfo.volume
|
||||
const { length, width, height } = this.modelInfo
|
||||
if(length && width && height){
|
||||
volume = length/100 * width/100 * height/100
|
||||
}
|
||||
if(volume && volume.toFixed) {
|
||||
volume = volume.toFixed(5)
|
||||
this.modelInfo.volume = volume
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.shet-cont{
|
||||
padding: 0;
|
||||
}
|
||||
.jsfm-item{
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<view v-if="title" class="mb-20">{{title}}</view>
|
||||
<view class="mb-20">
|
||||
<slot name="title"></slot>
|
||||
<view v-if="title && !$slots.title">{{title}}</view>
|
||||
</view>
|
||||
<tpx-upload v-model:value="modelInfo[filedName]" maxLen="10"></tpx-upload>
|
||||
</template>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="shet-cont">
|
||||
<view class="jsfm-item">
|
||||
<u-row justify="between">
|
||||
<text class="font-28">件数</text>
|
||||
<text class="font-28 font-weight">总件数</text>
|
||||
<view>
|
||||
<uni-number-box v-model="modelInfo.parcelQty" :min="1" :max="10000"></uni-number-box>
|
||||
</view>
|
||||
@ -10,30 +10,18 @@
|
||||
</view>
|
||||
<view class="jsfm-item">
|
||||
<u-row justify="between">
|
||||
<text class="font-28">包裹重量</text>
|
||||
<text class="font-28 font-weight">包裹重量</text>
|
||||
<view>
|
||||
<tpx-input v-model:value="modelInfo.billWeight" :isWhite="true" placeholder="" inputAlign="right" suffix="kg" type="digit"></tpx-input>
|
||||
<tpx-input v-model:value="modelInfo.billWeight" placeholder="" inputAlign="right" suffix="kg" type="digit"></tpx-input>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
|
||||
<view class="jsfm-item">
|
||||
<u-row justify="between" align="top">
|
||||
<text class="font-28 pt-20">体积</text>
|
||||
<view style="width: 70%;">
|
||||
<u-row justify="between">
|
||||
<u-col span="3.7">
|
||||
<tpx-input v-model:value="modelInfo.length" :isWhite="true" placeholder="长" inputAlign="right" suffix="cm" type="digit"></tpx-input>
|
||||
</u-col>
|
||||
<u-col span="3.7">
|
||||
<tpx-input v-model:value="modelInfo.width" :isWhite="true" placeholder="宽" inputAlign="right" suffix="cm" type="digit"></tpx-input>
|
||||
</u-col>
|
||||
<u-col span="3.7">
|
||||
<tpx-input v-model:value="modelInfo.height" :isWhite="true" placeholder="高" inputAlign="right" suffix="cm" type="digit"></tpx-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
|
||||
<u-row v-if="totalVolume" customStyle="margin: 20rpx 0 0 0;" justify="end">{{modelInfo.totalVolume}}m³</u-row>
|
||||
<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>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
@ -51,14 +39,8 @@
|
||||
},
|
||||
totalVolume() {
|
||||
let totalVolume = this.modelInfo.totalVolume
|
||||
const { length, width, height } = this.modelInfo
|
||||
if(length && width && height){
|
||||
totalVolume = length/100 * width/100 * height/100
|
||||
}
|
||||
if(totalVolume && totalVolume.toFixed) {
|
||||
totalVolume = totalVolume.toFixed(5)
|
||||
this.modelInfo.totalVolume = totalVolume
|
||||
}
|
||||
|
||||
|
||||
return totalVolume
|
||||
}
|
||||
},
|
||||
|
||||
@ -245,14 +245,18 @@
|
||||
<view class="mb-20">托寄货物描述</view>
|
||||
<bpe-gooditem-edit-tmp :value="tempObject.value"></bpe-gooditem-edit-tmp>
|
||||
<view class="mt-30">
|
||||
<bpe-goodphoto-tmp title="货物照片" :value="tempObject.value" filedName="goodsPics"></bpe-goodphoto-tmp>
|
||||
<bpe-goodsize-tmp ref="goodSize" :value="tempObject.value"></bpe-goodsize-tmp>
|
||||
</view>
|
||||
<view class="mt-30">
|
||||
<bpe-goodphoto-tmp :value="tempObject.value" filedName="goodsPics">
|
||||
<template v-slot:title>
|
||||
<text class="font-weight font-28">货物照片</text>
|
||||
</template>
|
||||
</bpe-goodphoto-tmp>
|
||||
</view>
|
||||
<view class="mt-30">
|
||||
<bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp>
|
||||
</view>
|
||||
<view class="mt-30">
|
||||
<bpe-goodsize-tmp ref="goodSize" :value="tempObject.value"></bpe-goodsize-tmp>
|
||||
</view>
|
||||
</buns-edit-sheet>
|
||||
</tpx-page>
|
||||
</template>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user