Commit c289bcae authored by dragondean@qq.com's avatar dragondean@qq.com

箱明细组件优化

parent 829f9d1a
......@@ -93,7 +93,8 @@ export default {
"unit": "",
"usageIds": "",
"volume": undefined,
"weight": undefined
"weight": undefined,
"material": undefined
}]
} else {
this.dataList = JSON.parse(JSON.stringify(this.value))
......@@ -119,7 +120,8 @@ export default {
"unit": "",
"usageIds": "",
"volume": undefined,
"weight": undefined
"weight": undefined,
"material": undefined
})
},
handleDelete(index) {
......
......@@ -31,6 +31,11 @@
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('材质')">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="material" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('商品特性')">
<el-checkbox-group v-model="prodAttrIds">
......@@ -38,7 +43,7 @@
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item :label="$t('用途')">
<el-checkbox-group v-model="usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value" :disabled="readonly">{{ $l(item, 'label') }}</el-checkbox>
......@@ -46,7 +51,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<!--<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('长')">
<el-input v-model="boxGauge1" type="number" :disabled="readonly" />
......@@ -72,9 +77,9 @@
<el-input v-model="value.volume" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
</el-row>
</el-row>-->
<el-row :gutter="10">
<el-col :span="4">
<!--<el-col :span="4">
<el-form-item :label="$t('快递单号')">
<el-input v-model="value.expressNo" :disabled="readonly" />
</el-form-item>
......@@ -83,7 +88,7 @@
<el-form-item :label="$t('包装类型')">
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="value.unit" :disabled="readonly"></dict-selector>
</el-form-item>
</el-col>
</el-col>-->
<el-col :span="4">
<el-form-item :label="$t('数量')">
<el-input v-model="value.quantityAll" type="number" :disabled="readonly" />
......@@ -131,7 +136,7 @@ export default {
brandList: [],
prodAttrIds: [],
usageIds: [],
material: '',
boxGauge1: '',
boxGauge2: '',
boxGauge3: '',
......@@ -147,6 +152,10 @@ export default {
this.getProductBrandPage()
}
if(this.value.material){
this.material = this.value.material
}
if (typeof this.value.prodAttrIds === 'string' && this.value.prodAttrIds.length > 0) {
this.prodAttrIds = this.value.prodAttrIds.split(',').map(e => +e)
}
......@@ -220,6 +229,9 @@ export default {
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
},
material(material){
this.value.material = material
},
'value.volume'() {
if (this.value.volume < 0) {
this.value.volume = -this.value.volume
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment