Commit 3faff0ea authored by dragondean@qq.com's avatar dragondean@qq.com

未报价异常添加路线的时候锁定路线不可修改

parent be7d42e1
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
</div> </div>
<!--table需要给一个key,否则全选的时候不会自动更新渲染--> <!--table需要给一个key,否则全选的时候不会自动更新渲染-->
<el-table v-if="!hideMap[item.value]" :data="item.routerList" :span-method="SpanMethod" border :key="selectedRoutes.length + item.value"> <el-table v-if="!hideMap[item.value]" :data="item.routerList" :span-method="SpanMethod" border :key="selectedRoutes.length + item.value">
<el-table-column :label="$t('始发')" prop="startTitleZh"> <el-table-column :label="$t('始发')" prop="startTitleZh">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{$l(row, 'startTitle')}} {{$l(row, 'startTitle')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('目的')" prop="destTitleZh" > <el-table-column :label="$t('目的')" prop="destTitleZh" >
<template slot-scope="{row}"> <template slot-scope="{row}">
{{$l(row, 'destTitle')}} {{$l(row, 'destTitle')}}
</template> </template>
...@@ -73,7 +73,8 @@ export default { ...@@ -73,7 +73,8 @@ export default {
props:{ props:{
value: { value: {
type: Array type: Array
} },
option: Object
}, },
data(){ data(){
return { return {
...@@ -93,7 +94,6 @@ export default { ...@@ -93,7 +94,6 @@ export default {
} }
}, },
computed:{ computed:{
importCityList(){ importCityList(){
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3) return this.tradeCityList.filter(item => item.type == 1 || item.type == 3)
}, },
...@@ -183,6 +183,12 @@ export default { ...@@ -183,6 +183,12 @@ export default {
}) })
}) })
} }
},
option(option){
if(option){
this.changeOption()
}
} }
}, },
created(){ created(){
...@@ -199,8 +205,19 @@ export default { ...@@ -199,8 +205,19 @@ export default {
this.selectedRoutes = this.value this.selectedRoutes = this.value
} }
if(this.option){
this.changeOption()
}
}, },
methods:{ methods:{
changeOption(){
if(!this.option) return
this.importCity = +this.option.importCity
this.exportCity = +this.option.exportCity
this.transportType = this.option.transportId
this.channelId = +this.option.channelId
},
// 全选、全不选 某个运输方式所有线路 // 全选、全不选 某个运输方式所有线路
toggleGroupChecker(index, selected){ toggleGroupChecker(index, selected){
let routerList = this.filteredRouterList[index].routerList let routerList = this.filteredRouterList[index].routerList
......
...@@ -194,7 +194,22 @@ export default { ...@@ -194,7 +194,22 @@ export default {
var productData = this.orderData.orderItemVOList.find(item=>item.orderItemId==row.orderItemId) var productData = this.orderData.orderItemVOList.find(item=>item.orderItemId==row.orderItemId)
if(productData){ if(productData){
getProduct(productData.prodId).then(res=>{ getProduct(productData.prodId).then(res=>{
let url = '../../lineProject/product-price/edit?product_id='+productData.prodId+'&product_type='+res.data.typeId+'&transportId='+this.orderData.transportId+'&exportCity='+this.orderData.logisticsInfoDto.startCityId+'&importCity='+this.orderData.logisticsInfoDto.destCityId let params = {
product_id: productData.prodId,
product_type: res.data.typeId,
transportId: this.orderData.transportId,
exportCity: this.orderData.logisticsInfoDto.startCityId,
importCity: this.orderData.logisticsInfoDto.destCityId,
startWarehouseId: this.orderData.logisticsInfoDto.startWarehouseId,
destWarehouseId: this.orderData.logisticsInfoDto.destWarehouseId,
lineId: this.orderData.logisticsInfoDto.lineId,
channelId: this.orderData.logisticsInfoDto.channelId
}
let url = '../../lineProject/product-price/edit?' + (new URLSearchParams(params)).toString()
/* +productData.prodId
+'&product_type='+res.data.typeId
+'&transportId='+this.orderData.transportId
+'&exportCity='+this.orderData.logisticsInfoDto.startCityId+'&importCity='+this.orderData.logisticsInfoDto.destCityId */
return this.$router.push(url) return this.$router.push(url)
}) })
} }
......
...@@ -4,7 +4,12 @@ ...@@ -4,7 +4,12 @@
<el-form-item :label="$t('商品类型')" prop="productType"> <el-form-item :label="$t('商品类型')" prop="productType">
<el-select v-model="form.productType" :disabled="!!$route.query.ids"> <el-select v-model="form.productType" :disabled="!!$route.query.ids">
<el-option v-for="type in productTypeList" :key="type.id" :label="type.titleZh" :value="type.id" /> <el-option
v-for="type in productTypeList"
:key="type.id"
:label="type.titleZh"
:value="type.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -28,8 +33,8 @@ ...@@ -28,8 +33,8 @@
<el-form-item :label="$t('路线')" prop="lineChannelList" v-if="lineList.length"> <el-form-item :label="$t('路线')" prop="lineChannelList" v-if="lineList.length">
<template v-if="lineList.length == 1"> <template v-if="lineList.length == 1">
<el-input <el-input
v-for="item in lineList" v-for="(item, index) in lineList"
:key="item.id" :key="index"
:value="!item.warehouseLineDO ? $t('数据异常,缺少warehouseLineDO字段') : $t('【{transport}】从【{from}】发往【{to}】', { :value="!item.warehouseLineDO ? $t('数据异常,缺少warehouseLineDO字段') : $t('【{transport}】从【{from}】发往【{to}】', {
transport: getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType), transport: getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType),
from: $l(item.warehouseLineDO, 'startTitle'), from: $l(item.warehouseLineDO, 'startTitle'),
...@@ -57,7 +62,7 @@ ...@@ -57,7 +62,7 @@
</el-form-item> </el-form-item>
<!--有路线则不显示路线选择器--> <!--有路线则不显示路线选择器-->
<routers-selector v-else v-model="selectedRoutes" /> <routers-selector v-else v-model="selectedRoutes" :option="routerOption" />
<el-card style="margin-bottom: 10px"> <el-card style="margin-bottom: 10px">
<div slot="header" style="font-size:20px;"> <div slot="header" style="font-size:20px;">
...@@ -230,6 +235,7 @@ import { arrryToKeyedObjectBy } from '@/utils/index' ...@@ -230,6 +235,7 @@ import { arrryToKeyedObjectBy } from '@/utils/index'
import Selector from '@/components/Selector' import Selector from '@/components/Selector'
import Inputor from '@/components/Inputor' import Inputor from '@/components/Inputor'
import {parseTime} from '@/utils/ruoyi' import {parseTime} from '@/utils/ruoyi'
import {openedRouterList} from '@/api/ecw/warehouse'
export default { export default {
components: { RoutersSelector, ProductSelector, Selector, Inputor }, components: { RoutersSelector, ProductSelector, Selector, Inputor },
data() { data() {
...@@ -262,7 +268,9 @@ export default { ...@@ -262,7 +268,9 @@ export default {
} }
}, },
computed: { computed: {
routerOption(){
return this.$route.query
}
}, },
watch: { watch: {
checkList() { //选择路线 checkList() { //选择路线
...@@ -431,6 +439,26 @@ export default { ...@@ -431,6 +439,26 @@ export default {
this.form.validateStartDate = parseTime(Date.now()) this.form.validateStartDate = parseTime(Date.now())
this.form.validateEndDate = parseTime(Date.now() + 86400*365*2*1000) this.form.validateEndDate = parseTime(Date.now() + 86400*365*2*1000)
// 如果指定了始发,目的仓和运输方式,渠道,则是从未报价异常跳转过来的,固定一个路线
if(this.$route.query.startWarehouseId){
openedRouterList({
destCityId: this.$route.query.importCity,
lineId: this.$route.query.lineId,
startCityId: this.$route.query.exportCity,
transportType: this.$route.query.transportId
}).then(res => {
console.log("open ---> ", res)
this.lineList = [
Object.assign({
// id: res.data[0].id,
lineId:this.$route.query.lineId,
shippingChannelId: this.$route.query.channelId,
warehouseLineDO: {... res.data[0]}
})]
})
}
} }
if (this.$route.query.product_type) { if (this.$route.query.product_type) {
...@@ -550,7 +578,7 @@ export default { ...@@ -550,7 +578,7 @@ export default {
} }
// 添加的提交 // 添加的提交
data.productId = this.product.id; data.productId = this.product.id;
data.lineChannelList = this.selectedRoutes data.lineChannelList = this.lineList.length ? this.lineList : this.selectedRoutes
if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){ if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){
return this.$message.error(this.$t('运费/全包价不能为0')) return this.$message.error(this.$t('运费/全包价不能为0'))
......
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