Commit 67a22f44 authored by dragondean@qq.com's avatar dragondean@qq.com

路线价格等Bug

parent 47027a14
......@@ -63,6 +63,10 @@ export default {
value(val){
// console.log('初始化内容', val)
this.init()
},
// 类型变了,清空内容
productType(){
this.list = []
}
},
created(){
......
......@@ -48,7 +48,7 @@
{{$l(row, 'destTitle')}}
</template>
</el-table-column>
<el-table-column :label="$t('渠道')" prop="startTitleZh">
<el-table-column :label="$t('渠道')" prop="startTitleZh" v-if="type == 'air'">
<template slot-scope="{row}">
{{$l(row.channel, 'name')}}
</template>
......
......@@ -777,19 +777,24 @@ export default {
}
}else{
// 全包价 的阶段 设置和运费(全包价)不能为空
let stepPriceEmpty = false
this.form.priceStepList.forEach(item => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
let stepPriceEmpty = []
this.form.priceStepList.forEach((item, index) => {
let notEmptyFields = ['endNum', 'weightUnit']
// 第一条阶梯的起始值可以是0,其他的不能为0
if(index){
notEmptyFields.push('startNum')
}
notEmptyFields.forEach(field => {
if(!item[field] || item[field].toString().trim() == ''){
stepPriceEmpty = true
stepPriceEmpty.push({index, field})
}
})
if((this.form.priceType == 0 && !item.transportPrice) || (this.form.priceType == 1 && !item.allPrice)){
stepPriceEmpty = true
stepPriceEmpty.push({index, field: !item.transportPrice ? 'transportPrice' : 'allPrice'})
}
})
if(stepPriceEmpty){
if(stepPriceEmpty.length){
console.log('stepPriceEmpty', stepPriceEmpty)
return this.$message.error(this.$t('阶梯和价格设置不能留空'))
}
}
......
......@@ -12,11 +12,11 @@
<el-option v-for="type in typeList" :key="type.id" :label="type.titleZh" :value="type.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportType">
<el-form-item :label="$t('运输方式')" prop="transportType" v-if="!transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number" clearable />
</el-form-item>
<!--海运不显示渠道-->
<el-form-item :label="$t('出货渠道')" prop="shippingChannelId" v-if="type == 'sea'">
<el-form-item :label="$t('出货渠道')" prop="shippingChannelId" v-if="type == 'air'">
<el-select v-model="queryParams.shippingChannelId" clearable>
<el-option v-for="item in channelList" :key="item.id" :label="$l(item, 'name')" :value="item.channelId" />
</el-select>
......
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