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

切换路线自动重置,加已选择的路线数提示

parent 071386a7
......@@ -2,8 +2,8 @@
<div>
<div class="filters mb-10">
{{$t('运输方式')}}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" style="width:150px" />
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" clearable style="width:150px" />
{{$t('始发地')}}
<el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable>
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
......@@ -19,11 +19,12 @@
<el-option v-for="item in channelList" :key="item.channelId" :label="item.nameZh" :value="item.channelId" />
</el-select>
</div>
<div class="mb-10">
<div class="mb-10 flex-row">
<el-radio-group v-model="checkAll">
<el-radio :label="true">{{$t('全选')}}</el-radio>
<el-radio :label="false">{{$t('全不选')}}</el-radio>
</el-radio-group>
<el-link class="ml-20" type="danger">{{$t('已选择{n}条路线', {n: selectedRoutes.length})}}</el-link>
</div>
<el-row class="" :gutter="10">
<template v-for="(item, index) in filteredRouterList">
......@@ -90,7 +91,7 @@ export default {
hideMap: {}, // 折叠状态
checkAll: null,
groupChecker: {}, // 分组全选状态
}
},
computed:{
......@@ -188,8 +189,12 @@ export default {
if(option){
this.changeOption()
}
}
},
// 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList(){
this.selectedRoutes = []
}
},
created(){
getChannelList().then(res => {
......@@ -200,7 +205,7 @@ export default {
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
this.getOpenedRouterList()
})
if(this.value && this.value.length){
this.selectedRoutes = this.value
}
......@@ -208,7 +213,7 @@ export default {
if(this.option){
this.changeOption()
}
},
methods:{
changeOption(){
......@@ -258,7 +263,7 @@ export default {
if(index > -1){
this.selectedRoutes.splice(index, 1)
}
}
},
getSelectedIndex(router){
......@@ -266,7 +271,7 @@ export default {
return item.lineId == router.id && item.channelId == router.channel.channelId
})
/* let index = null
this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
index = i
......@@ -298,4 +303,4 @@ export default {
.mb-10{
margin-bottom: 10px
}
</style>
\ No newline at end of file
</style>
......@@ -22,7 +22,7 @@
<el-form-item :label="$t('单价模式')" prop="priceType">
<dict-selector :type="DICT_TYPE.ECW_PRICE_TYPE" v-model="form.priceType" form-type="radio" />
</el-form-item>
<!--阶梯订单-->
<template v-if="form.stepPrice==1" >
<div v-for="(item, index) in form.priceStepList" :key="index">
......@@ -346,7 +346,7 @@ export default {
this.$set(this.form, 'allVolumeUnit', unit)
},
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate(async (valid) => {
if (!valid) {
return;
}
......@@ -377,6 +377,7 @@ export default {
if(data.lineChannelList.length < 1){
return this.$message.error(this.$t('请选择需要修改的路线'))
}
await this.$confirm(this.$t('已选择{n}条路线,确认提交修改?', {n: data.lineChannelList.length}))
this.loading = true
batchUpdateProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("修改成功"));
......
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