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

修复海运非阶梯价包装类型回显异常,文案优化

parent 5ff6e2cc
...@@ -212,7 +212,7 @@ export default { ...@@ -212,7 +212,7 @@ export default {
<!--特性加价--> <!--特性加价-->
<template v-for="(special, specialIndex) in value.specialList"> <template v-for="(special, specialIndex) in value.specialList">
<el-form-item <el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + priceName" :label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('加价')"
:key="specialIndex + 'transport'" :key="specialIndex + 'transport'"
> >
<el-input-number v-model.number="special[`${fieldPrefix}Price`]" :controls="false" :min="0" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" /> <el-input-number v-model.number="special[`${fieldPrefix}Price`]" :controls="false" :min="0" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
...@@ -224,9 +224,9 @@ export default { ...@@ -224,9 +224,9 @@ export default {
<!--包装类型价格--> <!--包装类型价格-->
<template v-for="(item, i) in value.packagingList"> <template v-for="(item, i) in value.packagingList">
<el-form-item :label="$t('包装类型') + priceName + (i+1)" :key="i"> <el-form-item :label="$t('包装类型加价') + (i+1)" :key="i">
<template #label> <template #label>
<div class="el-form-item__label" style="width: 150px;">{{$t('包装类型') + priceName + (i+1)}}</div> <div class="el-form-item__label" style="width: 150px;">{{$t('包装类型加价') + (i+1)}}</div>
<div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型将被忽略')}}</div> <div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型将被忽略')}}</div>
</template> </template>
<el-select v-model="item.packagingTypes" multiple placeholder="请选择" style="width: 100%; max-width: 450px; margin-bottom: 5px; display: block"> <el-select v-model="item.packagingTypes" multiple placeholder="请选择" style="width: 100%; max-width: 450px; margin-bottom: 5px; display: block">
......
...@@ -25,9 +25,7 @@ export default { ...@@ -25,9 +25,7 @@ export default {
value:{ value:{
type: Object, type: Object,
default: () => { default: () => {
return { return {}
}
} }
} }
}, },
...@@ -175,7 +173,7 @@ export default { ...@@ -175,7 +173,7 @@ export default {
<template v-for="(special, specialIndex) in value.specialList"> <template v-for="(special, specialIndex) in value.specialList">
<div :key="specialIndex + 'transport'"> <div :key="specialIndex + 'transport'">
<el-form-item <el-form-item
:label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')" :label="getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('加价')"
> >
<el-input-number v-model.number="special[`${fieldPrefix}Price`]" :controls="false" :min="0" :disabled="readonly" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" /> <el-input-number v-model.number="special[`${fieldPrefix}Price`]" :controls="false" :min="0" :disabled="readonly" :placeholder="$t('整数或者两位小数')" class="w-100 mr-10" />
<selector disabled v-model="special[`${fieldPrefix}PriceUnit`]" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" class="w-100 mr-10" /> <selector disabled v-model="special[`${fieldPrefix}PriceUnit`]" :options="currencyList" :label-field="$l(null, 'title')" value-field="id" class="w-100 mr-10" />
...@@ -189,7 +187,7 @@ export default { ...@@ -189,7 +187,7 @@ export default {
<template v-for="(item, i) in value[packagingField]"> <template v-for="(item, i) in value[packagingField]">
<el-form-item :label="$t('包装类型') + priceName + (i+1)" :key="i"> <el-form-item :label="$t('包装类型') + priceName + (i+1)" :key="i">
<template #label> <template #label>
<div class="el-form-item__label" style="width: 150px;">{{$t('包装类型') + priceName + (i+1)}}</div> <div class="el-form-item__label" style="width: 150px;">{{$t('包装类型加价') + (i+1)}}</div>
<div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型将被忽略')}}</div> <div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型将被忽略')}}</div>
</template> </template>
<el-select v-model="item.packagingTypes" multiple placeholder="请选择" style="width: 100%; max-width: 450px; margin-bottom: 5px; display: block"> <el-select v-model="item.packagingTypes" multiple placeholder="请选择" style="width: 100%; max-width: 450px; margin-bottom: 5px; display: block">
......
...@@ -451,6 +451,27 @@ export default { ...@@ -451,6 +451,27 @@ export default {
} }
this.lineList = [res.data] this.lineList = [res.data]
// 如果不是阶梯价,需要初始化包装类型
if(this.form.stepPrice != 1){
if(this.form.freightPricePackagingList?.length){
this.form.freightPricePackagingList.forEach(item => {
if(!item.packagingTypes){
this.$set(item, 'packagingTypes', [])
}else if(typeof item.packagingTypes == 'string'){
item.packagingTypes = item.packagingTypes.split(',')
}
})
}
if(this.form.clearancePricePackagingList?.length){
this.form.clearancePricePackagingList.forEach(item => {
if(!item.packagingTypes){
this.$set(item, 'packagingTypes', [])
}else if(typeof item.packagingTypes == 'string'){
item.packagingTypes = item.packagingTypes.split(',')
}
})
}
}
} }
// action=batchUpdate且ids不为空 // action=batchUpdate且ids不为空
...@@ -673,10 +694,10 @@ export default { ...@@ -673,10 +694,10 @@ export default {
} }
this.form[packingField].forEach(item => { this.form[packingField].forEach(item => {
if(data.field.indexOf("PriceUnit") > -1){ if(data.field.indexOf("PriceUnit") > -1){
p['packagingPriceUnit'] = data.value item['packagingPriceUnit'] = data.value
} }
if(data.field.indexOf("VolumeUnit") > -1){ if(data.field.indexOf("VolumeUnit") > -1){
p['packagingVolumeUnit'] = data.value item['packagingVolumeUnit'] = data.value
} }
}) })
}, },
......
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