Commit 6d12a101 authored by 邓春圆's avatar 邓春圆

线路价格修改

parent d9111ce4
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<span class="mr-10">-</span> <span class="mr-10">-</span>
<el-input v-model="item.endNum" class="mr-10"></el-input > <el-input v-model="item.endNum" class="mr-10"></el-input >
<span class="mr-10">/</span> <span class="mr-10">/</span>
<weight-select @change="changeWeight" :disabled="index > 0" v-model="item.weightUnit" :options="unitList"></weight-select> <weight-select @change="setAirFreightWeight" :disabled="index > 0" v-model="item.clearanceVolumeUnit" :options="unitList"></weight-select>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -120,11 +120,6 @@ export default { ...@@ -120,11 +120,6 @@ export default {
}) })
}, },
methods:{ methods:{
changeWeight(e){
this.value1[this.keyArr].forEach(item => {
item.weightUnit = e
})
},
setCurrency(e){ setCurrency(e){
this.value1[this.keyArr].forEach(item => { this.value1[this.keyArr].forEach(item => {
item.clearancePriceUnit = e item.clearancePriceUnit = e
...@@ -137,14 +132,11 @@ export default { ...@@ -137,14 +132,11 @@ export default {
}, },
addInterval(){ addInterval(){
let p = { let p = {
"channelId":'',
"clearancePrice":'', "clearancePrice":'',
"clearancePriceUnit": this.value1[this.keyArr].length && this.value1[this.keyArr][0].clearancePriceUnit ? this.value1[this.keyArr][0].clearancePriceUnit : '', "clearancePriceUnit": this.value1[this.keyArr].length && this.value1[this.keyArr][0].clearancePriceUnit ? this.value1[this.keyArr][0].clearancePriceUnit : '',
"clearanceVolumeUnit":this.value1[this.keyArr].length ? this.value1[this.keyArr][0].clearanceVolumeUnit : 6, "clearanceVolumeUnit":this.value1[this.keyArr].length ? this.value1[this.keyArr][0].clearanceVolumeUnit : 6,
"endNum":'', "endNum":'',
"packagingId":'',
"startNum":'', "startNum":'',
"weightUnit": this.value1[this.keyArr].length ? this.value1[this.keyArr][0].weightUnit : 6
} }
this.value1[this.keyArr].push(p) this.value1[this.keyArr].push(p)
this.$forceUpdate(); this.$forceUpdate();
......
...@@ -95,8 +95,11 @@ export default { ...@@ -95,8 +95,11 @@ export default {
arr[index].packagingCreateReqVOList.splice(indexx, 1); arr[index].packagingCreateReqVOList.splice(indexx, 1);
this.form.channelList = arr; this.form.channelList = arr;
}, },
getRouteDetails(id, callback = () => {}){ getRouteDetails(id, callback = () => {
getAirLineChannelPackagingList(id).then((r) => {callback(r.data)}) }) {
getAirLineChannelPackagingList(id).then((r) => {
callback(r.data)
})
}, },
setChannelData(list = []) { setChannelData(list = []) {
let arr = [] let arr = []
...@@ -117,6 +120,10 @@ export default { ...@@ -117,6 +120,10 @@ export default {
item.packagingTypes = item.packagingTypes ? item.packagingTypes.split(',') : []; item.packagingTypes = item.packagingTypes ? item.packagingTypes.split(',') : [];
item.priceStepClearanceCreateReqVOList = item.lineChannelPriceStepClearanceBackVOList || []; item.priceStepClearanceCreateReqVOList = item.lineChannelPriceStepClearanceBackVOList || [];
item.lineChannelPriceStepClearanceBackVOList = null; item.lineChannelPriceStepClearanceBackVOList = null;
item.priceStepClearanceCreateReqVOList.forEach(itemm => {
itemm.clearancePriceUnit = item.clearancePriceUnit
itemm.clearanceVolumeUnit = item.clearanceVolumeUnit
})
}) })
}) })
if (arr.length === 0) { if (arr.length === 0) {
...@@ -183,7 +190,7 @@ export default { ...@@ -183,7 +190,7 @@ export default {
}, },
validation() { validation() {
let flag = true let flag = true
try { try {
this.form.channelList.forEach((item, index) => { this.form.channelList.forEach((item, index) => {
if (!item.channelIds.length) { if (!item.channelIds.length) {
throw `渠道${index + 1}没有选择航道`; throw `渠道${index + 1}没有选择航道`;
...@@ -192,7 +199,7 @@ export default { ...@@ -192,7 +199,7 @@ export default {
if (!itemm.packagingTypes.length) { if (!itemm.packagingTypes.length) {
throw `渠道${index + 1}-包装类型${indexx + 1},没有选择包装类型。`; throw `渠道${index + 1}-包装类型${indexx + 1},没有选择包装类型。`;
} }
if (!(itemm.airWeightLimit >= 0)) { if (!(itemm.airWeightLimit > 0)) {
throw `渠道${index + 1}-包装类型${indexx + 1},没有输入空运订单重量上限。`; throw `渠道${index + 1}-包装类型${indexx + 1},没有输入空运订单重量上限。`;
} }
...@@ -217,16 +224,16 @@ export default { ...@@ -217,16 +224,16 @@ export default {
if (isNaN(itemmm.startNum) || itemmm.startNum === '') { if (isNaN(itemmm.startNum) || itemmm.startNum === '') {
throw check(indexxx); throw check(indexxx);
} }
if (!itemmm.weightUnit || itemmm.weightUnit === '') { // if (!itemmm.weightUnit || itemmm.weightUnit === '') {
throw check(indexxx); // throw check(indexxx);
} // }
}) })
}) })
}) })
}catch (e) { } catch (e) {
flag = false flag = false
console.log(e.Error,'eee') console.log(e.Error, 'eee')
this.$message.warning(e); this.$message.warning(e);
} }
return flag return flag
} }
...@@ -237,7 +244,7 @@ export default { ...@@ -237,7 +244,7 @@ export default {
<template> <template>
<div style="padding: 20px"> <div style="padding: 20px">
<div style="margin-bottom: 15px"> <div style="margin-bottom: 15px">
<span>路线:{{$route.query.startWarehouseTitle}}{{$route.query.destWarehouseTitle}}</span> <span>路线:{{ $route.query.startWarehouseTitle }}{{ $route.query.destWarehouseTitle }}</span>
<span style="margin-left: 30px;">运输方式:空运专线</span> <span style="margin-left: 30px;">运输方式:空运专线</span>
</div> </div>
<el-card style="margin-bottom: 10px" v-for="(itemOuter,index) in form.channelList" :key="index"> <el-card style="margin-bottom: 10px" v-for="(itemOuter,index) in form.channelList" :key="index">
...@@ -248,9 +255,9 @@ export default { ...@@ -248,9 +255,9 @@ export default {
<el-col :span="3"> <el-col :span="3">
<el-select multiple v-model="itemOuter.channelIds"> <el-select multiple v-model="itemOuter.channelIds">
<el-option <el-option
:disabled="channelIdBlackList.includes(item.channelId.toString()) && (!itemOuter.channelIds.includes(item.channelId.toString()))" :disabled="channelIdBlackList.includes(item.channelId.toString()) && (!itemOuter.channelIds.includes(item.channelId.toString()))"
v-for="item in channelList" :value="item.channelId.toString()" :key="item.channelId" v-for="item in channelList" :value="item.channelId.toString()" :key="item.channelId"
:label="$l(item, 'name')"></el-option> :label="$l(item, 'name')"></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
...@@ -283,9 +290,9 @@ export default { ...@@ -283,9 +290,9 @@ export default {
<el-col :span="5"> <el-col :span="5">
<el-select multiple v-model="itemm.packagingTypes"> <el-select multiple v-model="itemm.packagingTypes">
<el-option <el-option
:disabled="deletePackagingTypes.includes(item.value) && (!itemm.packagingTypes.includes(item.value))" :disabled="deletePackagingTypes.includes(item.value) && (!itemm.packagingTypes.includes(item.value))"
v-for="item in getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE)" :value="item.value" :key="item.value" v-for="item in getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE)" :value="item.value" :key="item.value"
:label="$l(item, 'label')"></el-option> :label="$l(item, 'label')"></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
......
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