Commit d41f6c6c authored by xiamw's avatar xiamw

修复bug 价格列表:目的国、目的地、目的仓搜索,点击重置按钮无效

parent 215b3751
......@@ -11,7 +11,10 @@
</el-select>
{{$t('目的国')}}:
<el-select :placeholder="$t('请选择目的国')" v-model="destCountryId" clearable>
<el-select :placeholder="$t('请选择目的国')"
v-model="destCountryIds"
multiple
clearable>
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id" />
</el-select>
......@@ -21,11 +24,17 @@
<el-option v-for="item in importCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
-->
<el-select :placeholder="$t('请选择目的城市')" v-model="destCityId" clearable>
<el-select :placeholder="$t('请选择目的城市')"
v-model="destCityIds"
multiple
clearable>
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi" />
</el-select>
{{$t('目的仓')}}:
<el-select :placeholder="$t('请选择目的仓')" v-model="destWarehouseId" clearable>
<el-select :placeholder="$t('请选择目的仓')"
v-model="destWarehouseIds"
multiple
clearable>
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
......@@ -134,10 +143,10 @@ export default {
countryList: [], //目的国
AddressCity: [], //目的地
AddressTown: [], //目的仓
destCountryId: null,
destCityId: null,
destWarehouseId: null,
destCountryIds: null,
destCityIds: null,
destWarehouseIds: null,
}
},
computed:{
......@@ -283,17 +292,17 @@ export default {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.destWarehouseId = "";
this.destCityId = "";
this.destWarehouseIds = "";
this.destCityIds = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
if (this.destCountryIds == "") {
//1 是所有区域,2 国家,3是市,
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
) {
this.getAddressTown()
}
......@@ -304,35 +313,35 @@ export default {
deep: true, //深度监听 目的仓
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.destWarehouseIds = "";
this.findBycityCode();
if (
this.destCityId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
this.destCityIds != "" &&
this.destCountryIds != "" &&
this.destWarehouseIds == ""
) {
//获取当前城市值id,获取该城市下区域
} else if (
this.destCountryId == "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
this.destCountryIds == "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
) {
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
) {
this.findByprovinceCode()
this.getAddressTown()
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
this.destCountryIds == "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
) {
//获取当前城市值id,获取该城市下区域
}
this.getOpenedRouterList()
this.getChannelList()
......@@ -342,22 +351,22 @@ export default {
deep: true, //深度监听
handler() {
if (
this.destCountryId != "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
this.destCountryIds != "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
) {
//获取当前城市值id,获取该城市下区域
this.findBycityCode()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
) {
this.getAddressTown()
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
this.destCountryIds == "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
) {
this.findBycityCode()
}
......@@ -394,7 +403,7 @@ export default {
if (this.type == 'sea') return
let query = {
// cityId: this.importCity
cityId: this.destCityId
cityId: this.destCityIds
}
getChannelList(query).then(res => {
this.channelList = res.data
......@@ -407,9 +416,9 @@ export default {
},
changeOption(){
if(!this.option) return
this.destCountryId = +this.option.destCountryId || null
this.destCityId = +this.option.destCityId || null
this.destWarehouseId = +this.option.destWarehouseId || null
this.destCountryIds = +this.option.destCountryId || null
this.destCityIds = +this.option.destCityId || null
this.destWarehouseIds = +this.option.destWarehouseId || null
// this.importCity = +this.option.importCity || null
this.exportCity = +this.option.exportCity || null
this.transportType = this.option.transportId || null
......@@ -428,14 +437,14 @@ export default {
if(this.exportCity){
params.startCityId = this.exportCity
}
if(this.destCountryId){
params.destCountryId = this.destCountryId
if(this.destCountryIds){
params.destCountryIds = this.destCountryId
}
if(this.destCityId){
params.destCityId = this.destCityId
if(this.destCityIds){
params.destCityIds = this.destCityIds
}
if(this.destWarehouseId){
params.destWarehouseId = this.destWarehouseId
if(this.destWarehouseIds){
params.destWarehouseIds = this.destWarehouseIds
}
const res = await openedRouterList(params)
this.openedRouterList = res.data.filter(item => {
......@@ -511,18 +520,18 @@ export default {
})
},
findByprovinceCode() {
if (this.destCountryId != null && this.destCountryId != '') {
if (this.destCountryIds != null && this.destCountryIds != '') {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({ data }) => {
getRegionList(2, this.destCountryIds).then(({ data }) => {
this.AddressCity = data;
})
}
},
findBycityCode() {
if (this.destCityId != null && this.destCityId != '') {
if (this.destCityIds != null && this.destCityIds != '') {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId).then(({ data }) => {
getRegionList(3, this.destCityIds).then(({ data }) => {
this.AddressTown = data;
})
}
......
......@@ -34,14 +34,15 @@
</el-form-item>
<el-form-item :label="$t('有效期')" prop="validDays">
<el-input
v-model.trim="queryParams.validDays"
:placeholder="$t('请输入有效期')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-form-item :label="$t('结束时间')">
<el-date-picker
v-model="dateRangeEndTime"
type="daterange"
:start-placeholder="$t('开始日期')"
value-format="yyyy-MM-dd"
:end-placeholder="$t('结束日期')"
>
</el-date-picker>
</el-form-item>
<el-form-item :label="$t('创建时间')">
......@@ -103,7 +104,6 @@
<div>{{ parseTime(scope.row.createTime) }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('有效期(天)')" align="center" prop="validDays" width="90"/>
<el-table-column :label="$t('开始时间')" align="center" prop="startTime" width="100">
<template slot-scope="scope">
......
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