Commit a513489c authored by xiaoyan's avatar xiaoyan

feature: 海运/空运查询条件修改

parent 96b47f06
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="88px">
<el-form-item :label="$t('自编号')" prop="selfNo"> <el-form-item :label="$t('自编号')" prop="selfNo">
<el-input v-model="queryParams.selfNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.selfNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
...@@ -11,15 +11,25 @@ ...@@ -11,15 +11,25 @@
</el-select> </el-select>
</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('请选择始发地')"> <el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable collapse-tags>
<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="$l(item, 'title')" :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-form-item :label="$t('目的国')" prop="destCountryId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')"> <el-select v-model="destCountryId" multiple :label="destCountryId" :placeholder="$t('请选择目的国')" clearable collapse-tags>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <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 collapse-tags>
<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 collapse-tags>
<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>
...@@ -43,18 +53,59 @@ ...@@ -43,18 +53,59 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的港清关')" prop="destinationClearance"> <el-form-item :label="$t('起运港')" v-show="showSearch">
<dockSelect v-model="queryParams.departurePortId" :placeholder="$t('请选择起运港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('目的港')" v-show="showSearch">
<dockSelect v-model="queryParams.destPortId" :placeholder="$t('请选择目的港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('目的港清关')" prop="destinationClearance" v-show="showSearch">
<el-select v-model="queryParams.destinationClearance" :placeholder="$t('请选择目的港清关')" clearable size="small"> <el-select v-model="queryParams.destinationClearance" :placeholder="$t('请选择目的港清关')" clearable size="small">
<el-option v-for="item in destinationClearanceData" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in destinationClearanceData" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('发货方式')" prop="deliveryType"> <el-form-item :label="$t('发货方式')" prop="deliveryType" v-show="showSearch">
<el-select v-model="queryParams.deliveryType" :placeholder="$t('请选择发货方式')" clearable size="small"> <el-select v-model="queryParams.deliveryType" :placeholder="$t('请选择发货方式')" clearable size="small">
<el-option v-for="item in deliveryTypeData" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in deliveryTypeData" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('航程')" prop="voyage" v-show="showSearch">
<el-select v-model="queryParams.voyage">
<el-option
v-for="item in voyageData"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('订舱代理')" v-show="showSearch">
<supplierSelect v-model="queryParams.shipperId" :companyType="'5'" :placeholder="$t('请选择订舱代理')" :allSupplier="allSupplier" />
</el-form-item>
<el-form-item :label="$t('航空公司')" v-show="showSearch">
<supplierSelect v-model="queryParams.airlineCompanyId" :placeholder="$t('请选择航空公司')" company-type="7" :allSupplier="allSupplier" />
</el-form-item>
<el-form-item :label="$t('代理公司Agent')" v-show="showSearch">
<supplierSelect v-model="queryParams.airlineCompanyId1" :placeholder="$t('请选择代理公司')" company-type="7" :allSupplier="allSupplier" />
</el-form-item>
<el-form-item :label="$t('预计起飞时间')" prop="flyTime" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.flyTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="dcCustomsType" v-show="showSearch">
<el-select v-model="queryParams.dcCustomsType" :placeholder="$t('请选择报关方式')" clearable multiple collapse-tags>
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CUSTOMS_TYPE)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('报关公司')" v-show="showSearch">
<supplierSelect v-model="queryParams.dcCompanyId" :companyType="'2'" :placeholder="$t('请选择报关公司')" :allSupplier="allSupplier" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('放行时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="queryParams.dcPassTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-row> </el-row>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button>
...@@ -240,11 +291,17 @@ import { getWarehouseList } from '@/api/ecw/warehouse' ...@@ -240,11 +291,17 @@ import { getWarehouseList } from '@/api/ecw/warehouse'
import costForm from './costForm.vue' import costForm from './costForm.vue'
import regError from './regError.vue' import regError from './regError.vue'
import editAirForm from './editAirForm.vue' import editAirForm from './editAirForm.vue'
import dockSelect from "./shippingSea/nodePage/common/dockSelect.vue"
import supplierSelect from "./shippingSea/nodePage/common/supplierSelect.vue"
import { import {
downloadFile, downloadFile,
downloadFileByUrl, downloadFileByUrl,
formatDate, formatDate,
constantDict,
} from "./shippingAir/utils"; } from "./shippingAir/utils";
import { getRegionList } from "@/api/ecw/order";
import { getDockPage } from "@/api/ecw/dock";
import { getSupplierPage } from "@/api/ecw/supplier";
import {getCabinetPage} from "@/api/ecw/cabinet"; import {getCabinetPage} from "@/api/ecw/cabinet";
import LadingBill from "@/views/ecw/box/ladingBill/index.vue"; import LadingBill from "@/views/ecw/box/ladingBill/index.vue";
import {listUser} from "@/api/system/user"; import {listUser} from "@/api/system/user";
...@@ -255,10 +312,26 @@ export default { ...@@ -255,10 +312,26 @@ export default {
LadingBill, LadingBill,
costForm, costForm,
regError, regError,
editAirForm editAirForm,
dockSelect,
supplierSelect,
}, },
data() { data() {
return { return {
AddressCity: [],
AddressProvince: [],
AddressTown: [],
destCountryId: null,
objectiveId: null,
destWarehouseId: null,
// 选中数组
ids: [],
//目的国
countryList: [],
//目的城市
cityList: [],
//目的仓
destWarehouseList: [],
cabinetList:[], cabinetList:[],
dateTypes: [ dateTypes: [
{ value: '1', label: this.$t('分拣时间') }, { value: '1', label: this.$t('分拣时间') },
...@@ -274,7 +347,7 @@ export default { ...@@ -274,7 +347,7 @@ export default {
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: false,
// 总条数 // 总条数
total: 0, total: 0,
// 出货列表 // 出货列表
...@@ -308,6 +381,11 @@ export default { ...@@ -308,6 +381,11 @@ export default {
}, },
channelList: [], channelList: [],
warehouseList: [], warehouseList: [],
// 码头
allDocks: [],
// 供应商
allSupplier: [],
voyageData: constantDict.voyageData,
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
...@@ -383,6 +461,149 @@ export default { ...@@ -383,6 +461,149 @@ export default {
] ]
} }
}, },
watch: {
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = []
this.AddressTown = []
this.objectiveId = ""
this.destWarehouseId = ""
this.findByprovinceCode()
if (this.destCountryId == "") {
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
//重新加载目的城市
//目的城市
// getRegionList(4, 4).then(({data}) => {
// this.AddressCity = data;
// })
// .catch(error => {
// console.log(error);
// });
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
}
},
objectiveId: {
deep: true, //深度监听
handler() {
this.AddressTown = []
this.destWarehouseId = ""
this.findBycityCode()
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId == "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
// else if(this.objectiveId!="" && this.objectiveId=="" ){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// }).catch(error => {
// console.log(error);
// });
// }
}
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
// else if(this.objectiveId=="" && this.destWarehouseId==""){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
// }
}
}
},
computed: { computed: {
getCabinetName() { getCabinetName() {
return (cabinetId) => { return (cabinetId) => {
...@@ -414,6 +635,7 @@ export default { ...@@ -414,6 +635,7 @@ export default {
} }
}, },
created() { created() {
this.init()
getCabinetPage({status:0}).then((response) => { getCabinetPage({status:0}).then((response) => {
this.cabinetList = response.data.list; this.cabinetList = response.data.list;
}); });
...@@ -434,6 +656,75 @@ export default { ...@@ -434,6 +656,75 @@ export default {
}, },
methods: { methods: {
init() {
//加载时发起请求获取所有省份值
getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = data
console.log(this.AddressProvince)
})
.catch((error) => {
console.log(error)
})
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
// 码头
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allDocks = data.list;
});
// 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});
},
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
},
findBycityCode() {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
// 去重
// let uniqueDataList = data.filter((item, index, self) => {
// // 返回第一个匹配项的索引,用于判断当前项是否为第一个匹配项
// const firstIndex = self.findIndex((obj) => obj.guojia === item.guojia);
// // 如果当前项是第一个匹配项,则保留,否则过滤掉
// return index === firstIndex;
// });
// this.AddressProvince = uniqueDataList
})
.catch((error) => {
console.log(error)
})
},
formatDate, formatDate,
getChannelList() { getChannelList() {
getChannelList().then((res) => (this.channelList = res.data)) getChannelList().then((res) => (this.channelList = res.data))
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
ref="queryForm" ref="queryForm"
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch"
label-width="68px" label-width="68px"
> >
<el-form-item :label="$t('运输方式')" prop="transportType"> <el-form-item :label="$t('运输方式')" prop="transportType">
...@@ -56,33 +55,25 @@ ...@@ -56,33 +55,25 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId"> <el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select <el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable collapse-tags>
v-model="queryParams.startWarehouseId" <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
:placeholder="$t('请选择始发地')"
clearable
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
: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-form-item :label="$t('目的国')" prop="destCountryId">
<el-select <el-select v-model="destCountryId" multiple :label="destCountryId" :placeholder="$t('请选择目的国')" clearable collapse-tags>
v-model="queryParams.destWarehouseId" <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
:placeholder="$t('请选择目的地')" </el-select>
clearable </el-form-item>
> <el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-option <el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable collapse-tags>
v-for="item in importWarehouseList" <el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
:label="$l(item, 'title')" </el-select>
:value="item.id" </el-form-item>
:key="item.id" <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
></el-option> <el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable collapse-tags>
<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>
...@@ -133,7 +124,7 @@ ...@@ -133,7 +124,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="countryId"> <!-- <el-form-item :label="$t('国家')" prop="countryId">
<el-select <el-select
v-model="queryParams.countryId" v-model="queryParams.countryId"
:placeholder="$t('请选择国家')" :placeholder="$t('请选择国家')"
...@@ -148,7 +139,7 @@ ...@@ -148,7 +139,7 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item :label="$t('提单制作')" prop="ladingBillStatus"> <el-form-item :label="$t('提单制作')" prop="ladingBillStatus">
<el-select <el-select
...@@ -167,6 +158,79 @@ ...@@ -167,6 +158,79 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('起运港')" v-show="showSearch">
<dockSelect v-model="queryParams.bigPortId" :placeholder="$t('请选择起运港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('目的港')" v-show="showSearch">
<dockSelect v-model="queryParams.destPortId" :placeholder="$t('请选择目的港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('驳船港')" v-show="showSearch">
<dockSelect v-model="queryParams.bargePortId" :placeholder="$t('请选择驳船港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('订舱公司')" v-show="showSearch">
<supplierSelect v-model="queryParams.spaceCompanyId" :companyType="'1'" :placeholder="$t('请选择订舱公司')" :allSupplier="allSupplier" />
</el-form-item>
<el-form-item :label="$t('预计驳船时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.bargeTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计开船时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.sailTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('截补料时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.ladingBillTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('VGM提交时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.customsTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('截关时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.cutOffTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="dcCustomsType" v-show="showSearch">
<el-select v-model="queryParams.dcCustomsType" :placeholder="$t('请选择报关方式')" clearable multiple collapse-tags>
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CUSTOMS_TYPE)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('报关公司')" v-show="showSearch">
<supplierSelect v-model="queryParams.dcCompanyId" :companyType="'2'" :placeholder="$t('请选择报关公司')" :allSupplier="allSupplier" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('放行时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="queryParams.dcPassTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('实际开船时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="queryParams.bgRealShipTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计到港时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="queryParams.estTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('出单方式')" v-show="showSearch">
<el-select v-model="queryParams.cdOutBillType" :placeholder="$t('请选择出单方式')" clearable multiple collapse-tags>
<el-option v-for="item in method" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="Agent list状态" v-show="showSearch">
<el-select v-model="queryParams.cdAgentlistType">
<el-option
v-for="item in status"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="Soncap状态" v-show="showSearch">
<el-select v-model="queryParams.cdSoncapType">
<el-option
v-for="item in status"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('预计清关时间')" v-show="showSearch">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="queryParams.clEstTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{
$t("搜索") $t("搜索")
...@@ -516,11 +580,17 @@ import { ...@@ -516,11 +580,17 @@ import {
downloadFile, downloadFile,
downloadFileByUrl, downloadFileByUrl,
formatDate, formatDate,
constantDict,
} from "./shippingSea/utils"; } from "./shippingSea/utils";
import { getRegionList } from "@/api/ecw/order";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse"; import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListTree } from "@/api/ecw/region"; import { getListTree } from "@/api/ecw/region";
import { getDockPage } from "@/api/ecw/dock";
import { getSupplierPage } from "@/api/ecw/supplier";
import costForm from "./costForm.vue"; import costForm from "./costForm.vue";
import dockSelect from "./shippingSea/nodePage/common/dockSelect.vue";
import supplierSelect from "./shippingSea/nodePage/common/supplierSelect.vue";
//异常登记对话框 //异常登记对话框
import regError from "./regError.vue"; import regError from "./regError.vue";
import editForm from "./editForm.vue"; import editForm from "./editForm.vue";
...@@ -534,9 +604,25 @@ export default { ...@@ -534,9 +604,25 @@ export default {
regError, regError,
editForm, editForm,
ladingBill, ladingBill,
dockSelect,
supplierSelect,
}, },
data() { data() {
return { return {
AddressCity: [],
AddressProvince: [],
AddressTown: [],
destCountryId: null,
objectiveId: null,
destWarehouseId: null,
// 选中数组
ids: [],
//目的国
countryList: [],
//目的城市
cityList: [],
//目的仓
destWarehouseList: [],
dateTypes: [ dateTypes: [
{ value: "1", label: this.$t("预装时间") }, { value: "1", label: this.$t("预装时间") },
{ value: "2", label: this.$t("装柜时间") }, { value: "2", label: this.$t("装柜时间") },
...@@ -555,7 +641,7 @@ export default { ...@@ -555,7 +641,7 @@ export default {
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: false,
// 总条数 // 总条数
total: 0, total: 0,
// 出货列表 // 出货列表
...@@ -586,8 +672,159 @@ export default { ...@@ -586,8 +672,159 @@ export default {
// 通知列表 // 通知列表
noticeList: [], noticeList: [],
allUsers: [], allUsers: [],
// 码头
allDocks: [],
// 供应商
allSupplier: [],
// 出单方式
method: constantDict.billingMethod,
// 选项
status: constantDict.isFile,
}; };
}, },
watch: {
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = []
this.AddressTown = []
this.objectiveId = ""
this.destWarehouseId = ""
this.findByprovinceCode()
if (this.destCountryId == "") {
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
//重新加载目的城市
//目的城市
// getRegionList(4, 4).then(({data}) => {
// this.AddressCity = data;
// })
// .catch(error => {
// console.log(error);
// });
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
}
},
objectiveId: {
deep: true, //深度监听
handler() {
this.AddressTown = []
this.destWarehouseId = ""
this.findBycityCode()
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId == "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
// else if(this.objectiveId!="" && this.objectiveId=="" ){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// }).catch(error => {
// console.log(error);
// });
// }
}
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
// else if(this.objectiveId=="" && this.destWarehouseId==""){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
// }
}
}
},
computed: { computed: {
exportWarehouseList() { exportWarehouseList() {
return this.warehouseList.filter( return this.warehouseList.filter(
...@@ -611,6 +848,7 @@ export default { ...@@ -611,6 +848,7 @@ export default {
}, },
}, },
created() { created() {
this.init()
this.transportTypes = this.getDictDatas( this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "1" || item.value == "2"); ).filter((item) => item.value == "1" || item.value == "2");
...@@ -628,6 +866,75 @@ export default { ...@@ -628,6 +866,75 @@ export default {
}); });
}, },
methods: { methods: {
init() {
//加载时发起请求获取所有省份值
getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = data
console.log(this.AddressProvince)
})
.catch((error) => {
console.log(error)
})
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
// 码头
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allDocks = data.list;
});
// 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});
},
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
},
findBycityCode() {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
// 去重
// let uniqueDataList = data.filter((item, index, self) => {
// // 返回第一个匹配项的索引,用于判断当前项是否为第一个匹配项
// const firstIndex = self.findIndex((obj) => obj.guojia === item.guojia);
// // 如果当前项是第一个匹配项,则保留,否则过滤掉
// return index === firstIndex;
// });
// this.AddressProvince = uniqueDataList
})
.catch((error) => {
console.log(error)
})
},
formatDate, formatDate,
queryNotice() { queryNotice() {
getNoticeList({ getNoticeList({
......
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