Commit 13c9a02d authored by lanbaoming's avatar lanbaoming

2024-06-25-01

parent aba4e54b
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 -->
<el-form <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
...@@ -1349,7 +1348,6 @@ export default { ...@@ -1349,7 +1348,6 @@ export default {
//destCountryId:'', //destCountryId:'',
objectiveId: [], objectiveId: [],
destWarehouseId: "", destWarehouseId: "",
// 选中数组 // 选中数组
ids: [], ids: [],
//目的国 //目的国
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
: routeName : routeName
}} }}
</div> </div>
<!-- 搜索工作栏 -->
<el-form <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
...@@ -80,13 +79,22 @@ ...@@ -80,13 +79,22 @@
prop="transportType" prop="transportType"
v-if="!transportType" v-if="!transportType"
> >
<!--控件对类型值有影响,不能在此处使用
<dict-selector <dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE" :type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportType" v-model="queryParams.transportType"
formatter="number" formatter="number"
clearable clearable
@change="handleQuery" @change="handleQuery"
/> />-->
<el-select
v-model="queryParams.transportType"
clearable
@change="handleQuery"
>
<el-option value="1" label="海运拼柜"></el-option>
<el-option value="3" label="专线空运"></el-option>
</el-select>
</el-form-item> </el-form-item>
<!--海运不显示渠道--> <!--海运不显示渠道-->
<el-form-item <el-form-item
...@@ -121,10 +129,10 @@ ...@@ -121,10 +129,10 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--lanbm 2024-06-15 add --> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-form-item :label="$t('目的国')" prop="countryId">
<el-select <el-select
v-model="queryParams.countryId" v-model="destCountryId"
:label="destCountryId"
clearable clearable
@change="handleQuery" @change="handleQuery"
> >
...@@ -137,34 +145,24 @@ ...@@ -137,34 +145,24 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destCityId"> <el-form-item :label="$t('目的地')" prop="destCityId">
<el-select <el-select v-model="destCityId" clearable @change="handleQuery">
v-model="queryParams.destCityId"
clearable
@change="handleQuery"
>
<el-option <el-option
v-for="city in destCityList" v-for="item in AddressCity"
:key="city.id" :key="item.shi"
:label="$l(city, 'title')" :label="item.shiName"
:value="city.id" :value="item.shi"
/> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--lanbm 2024-06-15 add--> <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-form-item :label="$t('目的仓')" prop="destCityId"> <el-select v-model="destWarehouseId" clearable @change="handleQuery">
<el-select
v-model="queryParams.destCityId"
clearable
@change="handleQuery"
>
<el-option <el-option
v-for="city in destCityList" v-for="item in AddressTown"
:key="city.id" :key="item.id"
:label="$l(city, 'title')" :label="item.titleZh"
:value="city.id" :value="item.id"
/> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否预付')" prop="needPay"> <el-form-item :label="$t('是否预付')" prop="needPay">
...@@ -829,6 +827,7 @@ ...@@ -829,6 +827,7 @@
</template> </template>
<script> <script>
import { getRegionList } from "@/api/ecw/order";
import { import {
createProductPrice, createProductPrice,
updateProductPrice, updateProductPrice,
...@@ -866,6 +865,13 @@ export default { ...@@ -866,6 +865,13 @@ export default {
}, },
data() { data() {
return { return {
AddressCity: [], //目的城市
AddressProvince: [], //省份
AddressTown: [], //目的仓
destCountryId: [],
objectiveId: [],
destCityId: null,
destWarehouseId: "",
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
...@@ -918,7 +924,11 @@ export default { ...@@ -918,7 +924,11 @@ export default {
clearanceVolumeUnit: null, clearanceVolumeUnit: null,
shippingChannelId: null, shippingChannelId: null,
status: null, status: null,
countryId:null,//国家 countryId: null, //国家
objectiveId: null,
destCityId: null, //目的城市
destCountryId: null, //目的国
destWarehouseId: null, //目的仓
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -1156,6 +1166,164 @@ export default { ...@@ -1156,6 +1166,164 @@ export default {
} }
}, },
watch: { watch: {
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.destWarehouseId = "";
this.destCityId = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
//1 是所有区域,2 国家,3是市,
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);
});
}
},
},
destCityId: {
deep: true, //深度监听 目的仓
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
if (
this.destCityId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
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.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.destCountryId != "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
},
"$route.query.product_id"() { "$route.query.product_id"() {
// if(!this.$route.query.product_id){ // if(!this.$route.query.product_id){
// return this.product = null // return this.product = null
...@@ -1209,7 +1377,7 @@ export default { ...@@ -1209,7 +1377,7 @@ export default {
} }
this.getAttrList(); this.getAttrList();
} }
this.getData();
//获取城市列表 //获取城市列表
this.getCountryList(); this.getCountryList();
this.getAllCityList(); this.getAllCityList();
...@@ -1228,6 +1396,52 @@ export default { ...@@ -1228,6 +1396,52 @@ export default {
}); });
}, },
methods: { methods: {
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;
})
.catch((error) => {
console.log(error);
});
},
getData() {
//加载时发起请求获取所有省份值
getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = 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);
});
},
/* 国家 */ /* 国家 */
getCountryList() { getCountryList() {
getListTree({ treeType: 1 }).then((response) => { getListTree({ treeType: 1 }).then((response) => {
...@@ -1363,6 +1577,12 @@ export default { ...@@ -1363,6 +1577,12 @@ export default {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
this.queryParams.setPrice = undefined; this.queryParams.setPrice = undefined;
this.queryParams.blacklist = undefined; this.queryParams.blacklist = undefined;
//目的城市
this.queryParams.destCityId = this.destCityId;
//目的国
this.queryParams.destCountryId = this.destCountryId;
//目的仓
this.queryParams.destWarehouseId = this.destWarehouseId;
if (this.queryParams.combStatus) { if (this.queryParams.combStatus) {
let tmp = this.queryParams.combStatus.split("_"); let tmp = this.queryParams.combStatus.split("_");
this.queryParams[tmp[0]] = tmp[1]; this.queryParams[tmp[0]] = tmp[1];
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
v-model="queryParams.deptid" v-model="queryParams.deptid"
:options="deptOptions" :options="deptOptions"
:show-count="true" :show-count="true"
:multiple="true"
:placeholder="$t('请选择部门')" :placeholder="$t('请选择部门')"
:normalizer="normalizer" :normalizer="normalizer"
/> />
...@@ -280,7 +281,7 @@ ...@@ -280,7 +281,7 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list" @sort-change="handleSort">
<el-table-column label="排名" align="center" prop="px" /> <el-table-column label="排名" align="center" prop="px" />
<el-table-column label="客户编号" align="center" prop="number"> <el-table-column label="客户编号" align="center" prop="number">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
...@@ -294,14 +295,24 @@ ...@@ -294,14 +295,24 @@
<el-table-column label="客户姓名" align="center" prop="name" /> <el-table-column label="客户姓名" align="center" prop="name" />
<el-table-column label="客户经理" align="center" prop="salesman" /> <el-table-column label="客户经理" align="center" prop="salesman" />
<el-table-column label="部门" align="center" prop="deptname" /> <el-table-column label="部门" align="center" prop="deptname" />
<el-table-column label="总V值" align="center" prop="allsumvolume" /> <el-table-column
label="总V值"
align="center"
prop="allsumvolume"
sortable="allsumvolume"
/>
<el-table-column <el-table-column
label="总V值同比" label="总V值同比"
align="center" align="center"
prop="allsumvolumeTbShow" prop="allsumvolumeTbShow"
/> />
<el-table-column label="海运拼柜" align="center" prop="sumvolumeV1" /> <el-table-column
label="海运拼柜"
align="center"
prop="sumvolumeV1"
sortable="sumvolumeV1"
/>
<el-table-column label="海运占比" align="center" prop="seaZb" /> <el-table-column label="海运占比" align="center" prop="seaZb" />
<el-table-column <el-table-column
label="海运拼柜同比" label="海运拼柜同比"
...@@ -309,7 +320,12 @@ ...@@ -309,7 +320,12 @@
prop="sumvolumeTbShow1" prop="sumvolumeTbShow1"
/> />
<el-table-column label="专线空运" align="center" prop="sumweightV3" /> <el-table-column
label="专线空运"
align="center"
prop="sumweightV3"
sortable="sumweightV3"
/>
<el-table-column label="空运占比" align="center" prop="airZb" /> <el-table-column label="空运占比" align="center" prop="airZb" />
<el-table-column <el-table-column
label="专线空运同比" label="专线空运同比"
...@@ -530,6 +546,8 @@ export default { ...@@ -530,6 +546,8 @@ export default {
edate4: undefined, //客户创建时间 edate4: undefined, //客户创建时间
sdate5: undefined, //首次成交时间 sdate5: undefined, //首次成交时间
edate5: undefined, //首次成交时间 edate5: undefined, //首次成交时间
orderfield:undefined,//排序字段
ordertype:undefined,//排序方式
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -567,6 +585,13 @@ export default { ...@@ -567,6 +585,13 @@ export default {
//created ------> computed ------> mounted ------> watch //created ------> computed ------> mounted ------> watch
}, },
methods: { methods: {
handleSort(obj) {
if (obj.order != null && obj.prop != null) {
this.queryParams.orderfield=obj.prop; //排序字段
this.queryParams.ordertype=obj.order; //排序方式
this.getList();
}
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
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