Commit d41f6c6c authored by xiamw's avatar xiamw

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

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