Commit 673af735 authored by yujinyao's avatar yujinyao

订单下拉多选搜索

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