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

线路价格修改

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