Commit 673af735 authored by yujinyao's avatar yujinyao

订单下拉多选搜索

parent f79cee34
......@@ -179,8 +179,8 @@
:is="row.orderType == 2 ? 'el-tooltip' : 'div'"
class="item"
:style="{
color: row.orderType == 2 ? 'red' : null
}"
color: row.orderType == 2 ? 'red' : null
}"
effect="dark"
:content="(row.wvolume||0)+'m³'"
placement="bottom">
......@@ -253,7 +253,7 @@
<el-select
v-model="objectiveId"
multiple
:placeholder="$t('请根据目的国选择目的城市')"
:placeholder="$t('请选择目的城市')"
style="width: 200px"
clearable
@change="handleQuery"
......@@ -270,7 +270,7 @@
<el-select
v-model="destWarehouseId"
multiple
:placeholder="$t('请根据目的城市选择目的仓')"
:placeholder="$t('请选择目的仓')"
style="width: 200px"
clearable
@change="handleQuery"
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item :label="$t('日期筛选')">
<dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable @change="handleQuery">
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发地')" clearable @change="handleQuery">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable @change="handleQuery">
<!--
<el-form-item :label="$t('目的仓')" prop="destWarehouseIds">
<el-select v-model="queryParams.destWarehouseIds" multiple :placeholder="$t('请选择目的地')" clearable @change="handleQuery">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
-->
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select
v-model="destCountryId"
multiple
:label="destCountryId"
:placeholder="$t('请选择目的国')"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressProvince"
:key="item.guojia"
:label="item.guojiaName"
:value="item.guojia"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select
v-model="objectiveId"
multiple
:placeholder="$t('请选择目的城市')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressCity"
:key="item.shi"
:label="item.shiName"
:value="item.shi"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select
v-model="destWarehouseId"
multiple
:placeholder="$t('请选择目的仓')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressTown"
:key="item.id"
:label="item.titleZh"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('订单编号')" prop="orderNo">
<el-input v-model="queryParams.orderNo" :placeholder="$t('订单编号')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.orderNo" :placeholder="$t('订单编号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('品名')" prop="prodId">
<product-selector v-model="queryParams.prodId" @keyup.enter.native="handleQuery" clearable @change="handleQuery"/>
......@@ -29,27 +83,27 @@
<el-form-item :label="$t('控货状态')" prop="isCargoControl">
<dict-selector v-model="queryParams.cargoControlStatus" :type="DICT_TYPE.CONTROL_GOODS_STATUS" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"
<el-form-item :label="$t('订单状态')" prop="statusList">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList"
@keyup.enter.native="handleQuery" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('提单号')" prop="tidanNo">
<el-input v-model="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input v-model="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable @change="handleQuery" />
<el-form-item :label="$t('报关方式')" prop="customsTypes">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" multiple v-model="queryParams.customsTypes" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('唛头')" prop="marks">
<el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('外部仓')" prop="number">
<el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
......@@ -178,6 +232,8 @@ import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import Fallback from './components/Fallback'
import {getWarehouseList} from '@/api/ecw/warehouse'
import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue";
import {getRegionList} from "@/api/ecw/order"
export default {
name: "EcwOrderCargocontrol",
components: {
......@@ -222,6 +278,12 @@ export default {
showFallbackOrder: null, // 调货订单
pickInfo: null, // 当前操作的提货信息
showLogOrderId: null, // 显示控货日志的订单ID
AddressProvince: [],
AddressCity: [],
AddressTown: [],
destCountryId: null,
objectiveId: null,
destWarehouseId: null,
};
},
computed: {
......@@ -238,14 +300,100 @@ export default {
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
return Object.assign({}, this.queryParams, timeParams)
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
let queryParams = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId;
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveIds = this.objectiveId;
}
//目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId;
}
return Object.assign({}, this.queryParams, timeParams, queryParams)
}
},
watch: {
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.objectiveId = "";
this.destWarehouseId = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
}
},
},
objectiveId: {
deep: true, //深度监听
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
} else if (
this.destCountryId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.findByprovinceCode();
this.getAddressTown()
}
},
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
this.findBycityCode();
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
}
},
},
},
activated(){
// 要求保留页码 https://zentao.test.jdshangmen.com/bug-view-3079.html
this.getList()
......@@ -255,6 +403,9 @@ export default {
getProductAttrList().then(res => this.productAttrList = res.data)
// getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
this.getAddressProvince()
this.getAddressCity()
this.getAddressTown()
},
methods: {
/** 查询列表 */
......@@ -349,6 +500,40 @@ export default {
onTransferCargoSuccess(){
this.showTransferCargoOrderId = null
this.getList()
},
getAddressProvince() {
/*getListTree({ treeType: 1 }).then((response) => {
this.countryList = response.data;
})*/
getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data;
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data;
})
},
getAddressTown() {
getRegionList(5, 5).then(({ data }) => {
this.AddressTown = data;
})
},
findByprovinceCode() {
if (this.destCountryId != null && this.destCountryId != '') {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({ data }) => {
this.AddressCity = data;
})
}
},
findBycityCode() {
if (this.objectiveId != null && this.objectiveId != '') {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({ data }) => {
this.AddressTown = data;
})
}
}
}
};
......
......@@ -68,9 +68,9 @@
</el-form-item>
<div>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select
v-model="queryParams.startWarehouseId"
v-model="queryParams.startWarehouseIds"
multiple
:placeholder="$t('请选择始发仓')"
clearable
......@@ -196,7 +196,7 @@
<el-form-item :label="$t('入仓类型')" prop="warehouseType">
<dict-selector
:type="DICT_TYPE.ECW_WAREHOUSING_TYPE"
v-model="queryParams.warehouseType"
v-model="queryParams.warehouseTypes"
multiple
clearable
@change="handleQuery"
......@@ -211,7 +211,7 @@
:prepend="{ id: 0, nickname: $t('未分配客户经理') }"
/>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<el-form-item :label="$t('订单状态')" prop="statusList">
<dict-selector
:type="DICT_TYPE.ORDER_STATUS"
multiple
......@@ -222,11 +222,11 @@
@change="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsType">
<el-form-item :label="$t('报关方式')" prop="customsTypes">
<dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
multiple
v-model="queryParams.customsType"
v-model="queryParams.customsTypes"
clearable
@change="handleQuery"
/>
......@@ -279,7 +279,7 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('异常状态')" prop="status">
<el-form-item :label="$t('异常状态')" prop="abnormalStateList">
<dict-selector
:type="DICT_TYPE.ORDER_ABNORMAL_STATE"
multiple
......@@ -289,7 +289,7 @@
@change="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('审核状态')" prop="status">
<el-form-item :label="$t('审核状态')" prop="auditTypeList">
<dict-selector
:type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE"
multiple
......@@ -1345,11 +1345,9 @@ export default {
AddressCity: [],
AddressProvince: [],
AddressTown: [],
destCountryId: [],
countryId: "",
//destCountryId:'',
objectiveId: [],
destWarehouseId: "",
destCountryId: null,
objectiveId: null,
destWarehouseId: null,
// 选中数组
ids: [],
//目的国
......
......@@ -4,14 +4,14 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item :label="$t('编号')" prop="orderNo">
<el-input v-model="queryParams.numberKey" :placeholder="$t('请输入订单号、唛头、提单号')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.numberKey" :placeholder="$t('请输入订单号、唛头、提单号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input v-model="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item label="">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" :filter="(item) => item.value != 'PickTime'" v-model="dateFilterType" defaultable style="width: 150px; margin-right: 5px" />
......@@ -39,7 +39,7 @@
</el-form-item>-->
<el-form-item :label="$t('商品')" prop="tidanNo">
<el-input v-model="queryParams.prodKey" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" />
<el-input v-model="queryParams.prodKey" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<!--根据需求文档 lanbm 2024-06-23 隐藏
<el-form-item :label="$t('控货')" prop="isCargoControl">
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item :label="$t('日期筛选')">
<dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable @change="handleQuery">
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发地')" clearable @change="handleQuery">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select
v-model="destCountryId"
multiple
:label="destCountryId"
:placeholder="$t('请选择目的国')"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressProvince"
:key="item.guojia"
:label="item.guojiaName"
:value="item.guojia"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select
v-model="objectiveId"
multiple
:placeholder="$t('请选择目的城市')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressCity"
:key="item.shi"
:label="item.shiName"
:value="item.shi"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable @change="handleQuery">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
<el-select
v-model="destWarehouseId"
multiple
:placeholder="$t('请选择目的仓')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressTown"
:key="item.id"
:label="item.titleZh"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId">
......@@ -29,8 +74,8 @@
<el-form-item :label="$t('控货状态')" prop="isCargoControl">
<dict-selector v-model="queryParams.cargoControlStatus" :type="DICT_TYPE.CONTROL_GOODS_STATUS" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"
<el-form-item :label="$t('订单状态')" prop="statusList">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList"
@keyup.enter.native="handleQuery" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('提单号')" prop="tidanNo">
......@@ -44,8 +89,8 @@
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable @change="handleQuery" />
<el-form-item :label="$t('报关方式')" prop="customsTypes">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" multiple v-model="queryParams.customsTypes" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('唛头')" prop="marks">
......@@ -146,6 +191,7 @@ import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import Fallback from './components/Fallback'
import {getWarehouseList} from '@/api/ecw/warehouse'
import CargoLogList from "@/views/ecw/order/components/CargoLogList.vue";
import {getRegionList} from "@/api/ecw/order"
export default {
name: "EcwOrderCargocontrol",
components: {
......@@ -190,6 +236,12 @@ export default {
showFallbackOrder: null, // 调货订单
pickInfo: null, // 当前操作的提货信息
showLogOrderId: null, // 显示控货日志的订单ID
AddressProvince: [],
AddressCity: [],
AddressTown: [],
destCountryId: null,
objectiveId: null,
destWarehouseId: null,
};
},
computed: {
......@@ -206,14 +258,100 @@ export default {
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
return Object.assign({}, this.queryParams, timeParams)
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
let queryParams = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId;
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveIds = this.objectiveId;
}
//目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId;
}
return Object.assign({}, this.queryParams, timeParams, queryParams)
}
},
watch: {
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.objectiveId = "";
this.destWarehouseId = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
}
},
},
objectiveId: {
deep: true, //深度监听
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
} else if (
this.destCountryId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.findByprovinceCode();
this.getAddressTown()
}
},
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
this.findBycityCode();
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
}
},
},
},
activated(){
// 要求保留页码 https://zentao.test.jdshangmen.com/bug-view-3079.html
this.getList()
......@@ -223,6 +361,9 @@ export default {
getProductAttrList().then(res => this.productAttrList = res.data)
// getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
this.getAddressProvince()
this.getAddressCity()
this.getAddressTown()
},
methods: {
/** 查询列表 */
......@@ -317,6 +458,37 @@ export default {
onTransferCargoSuccess(){
this.showTransferCargoOrderId = null
this.getList()
},
getAddressProvince() {
getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data;
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data;
})
},
getAddressTown() {
getRegionList(5, 5).then(({ data }) => {
this.AddressTown = data;
})
},
findByprovinceCode() {
if (this.destCountryId != null && this.destCountryId != '') {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({ data }) => {
this.AddressCity = data;
})
}
},
findBycityCode() {
if (this.objectiveId != null && this.objectiveId != '') {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId).then(({ data }) => {
this.AddressTown = data;
})
}
}
}
};
......
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