Commit b0b1df45 authored by 332784038@qq.com's avatar 332784038@qq.com

0

parent 00429033
...@@ -64,7 +64,10 @@ ...@@ -64,7 +64,10 @@
<el-input <el-input
:placeholder="$t('请输入联系方式')" :placeholder="$t('请输入联系方式')"
v-model.trim="queryParams.defaultContactPhone" v-model.trim="queryParams.defaultContactPhone"
@input="queryParams.defaultContactPhone=queryParams.defaultContactPhone.replace(/\s+/g, '')" @input="
queryParams.defaultContactPhone =
queryParams.defaultContactPhone.replace(/\s+/g, '')
"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户类别')" prop="level"> <el-form-item :label="$t('客户类别')" prop="level">
...@@ -76,9 +79,20 @@ ...@@ -76,9 +79,20 @@
@change="handleQuery" @change="handleQuery"
></dict-selector> ></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('部门')" v-if="path != '/customer/department-customers'"> <el-form-item
<el-select v-model="queryParams.deptIds" :placeholder="$t('请选择部门')"> :label="$t('部门')"
<el-option v-for="item in deptList" :key="item.id" :label="item.name" :value="item.id"/> v-if="path != '/customer/department-customers'"
>
<el-select
v-model="queryParams.deptIds"
:placeholder="$t('请选择部门')"
>
<el-option
v-for="item in deptList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户经理')" prop="customerService"> <el-form-item :label="$t('客户经理')" prop="customerService">
...@@ -370,7 +384,7 @@ ...@@ -370,7 +384,7 @@
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('推介人')" v-show="showSearch"> <el-form-item :label="$t('推介人')" v-show="showSearch">
<el-select <el-select
clearable clearable
remote remote
...@@ -682,22 +696,25 @@ ...@@ -682,22 +696,25 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户类别')" align="center" prop="status"> <el-table-column :label="$t('客户类别')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag :type="DICT_TYPE.CUSTOMER_TYPE" :value="scope.row.type" />
:type="DICT_TYPE.CUSTOMER_TYPE"
:value="scope.row.type"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('角色')" align="center" prop="status"> <el-table-column :label="$t('角色')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag :type="DICT_TYPE.CUSTOMER_ROLE" :value="scope.row.roles" />
:type="DICT_TYPE.CUSTOMER_ROLE"
:value="scope.row.roles"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column> <el-table-column
<el-table-column :label="$t('国籍')" align="center" prop="country" :formatter="countryFormatter"></el-table-column> :label="$t('客户经理')"
align="center"
prop="customerServiceName"
></el-table-column>
<el-table-column
:label="$t('国籍')"
align="center"
prop="country"
:formatter="countryFormatter"
></el-table-column>
<el-table-column :label="$t('出货渠道')" align="center"> <el-table-column :label="$t('出货渠道')" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ channel(row.transportType) }} {{ channel(row.transportType) }}
...@@ -745,13 +762,21 @@ ...@@ -745,13 +762,21 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('入公海时间')" align="center" width="160"> <el-table-column :label="$t('入公海时间')" align="center" width="160">
<template v-slot="{ row }"> <template v-slot="{ row }">
{{ parseTime( row.enterOpenSeaTime ? row.enterOpenSeaTime : row.estimateEnterOpenSeaTime)}} {{
parseTime(
row.enterOpenSeaTime
? row.enterOpenSeaTime
: row.estimateEnterOpenSeaTime
)
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('入仓确认')" align="center"> <el-table-column :label="$t('入仓确认')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="success" v-if="scope.row.arrivalConfirm == 1">{{ $t('') }}</el-tag> <el-tag type="success" v-if="scope.row.arrivalConfirm == 1">{{
<el-tag type="info">{{ $t('') }}</el-tag> $t("")
}}</el-tag>
<el-tag type="info">{{ $t("") }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('控货无收货人')" align="center"> <el-table-column :label="$t('控货无收货人')" align="center">
...@@ -782,7 +807,11 @@ ...@@ -782,7 +807,11 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('创建人')" prop="createUsername" align="center"> <el-table-column
:label="$t('创建人')"
prop="createUsername"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column :label="$t('创建时间')" align="center" width="160"> <el-table-column :label="$t('创建时间')" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -791,10 +820,15 @@ ...@@ -791,10 +820,15 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('最后更新时间')" align="center" width="160"> <el-table-column :label="$t('最后更新时间')" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span >{{ parseTime(scope.row.updateTime) }}</span> <span>{{ parseTime(scope.row.updateTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200px" :label="$t('操作')" align="center" fixed="right"> <el-table-column
width="200px"
:label="$t('操作')"
align="center"
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button size="mini" type="text" v-show="'development' === env && scope.row.isInOpenSea" @click="seasPond(scope.row)"--> <!-- <el-button size="mini" type="text" v-show="'development' === env && scope.row.isInOpenSea" @click="seasPond(scope.row)"-->
<!-- v-hasPermi="['ecw:customer:query']">{{$t('掉入公海池')}}</el-button>--> <!-- v-hasPermi="['ecw:customer:query']">{{$t('掉入公海池')}}</el-button>-->
...@@ -1429,7 +1463,7 @@ import { ...@@ -1429,7 +1463,7 @@ import {
deptExportExcel, deptExportExcel,
recycleUnconfirmedCustomer, recycleUnconfirmedCustomer,
updatecustomerToOld, updatecustomerToOld,
competitorListAll competitorListAll,
} from "@/api/ecw/customer"; } from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { CommonStatusEnum } from "@/utils/constants"; import { CommonStatusEnum } from "@/utils/constants";
...@@ -1438,10 +1472,19 @@ import upload from "@/components/ImageUpload"; ...@@ -1438,10 +1472,19 @@ import upload from "@/components/ImageUpload";
import { getNodeList } from "@/api/ecw/node"; import { getNodeList } from "@/api/ecw/node";
import CustomerFollowList from "./components/customerFollow"; import CustomerFollowList from "./components/customerFollow";
import customerComplaints from "@/components/customerComplaints"; import customerComplaints from "@/components/customerComplaints";
import { listServiceUser, getUserProfile, listAllSimpl } from "@/api/system/user"; import {
listServiceUser,
getUserProfile,
listAllSimpl,
} from "@/api/system/user";
import { getCountryListAll } from "@/api/ecw/country"; import { getCountryListAll } from "@/api/ecw/country";
import { getCreditPage } from "@/api/customer/credit"; import { getCreditPage } from "@/api/customer/credit";
import { customerExportExcel, changeCustomerDefaultPay, changeCustomerNoConsignee,changeCustomerDefaultBilling} from "@/api/ecw/customer"; import {
customerExportExcel,
changeCustomerDefaultPay,
changeCustomerNoConsignee,
changeCustomerDefaultBilling,
} from "@/api/ecw/customer";
import transferCustomer from "@/views/ecw/customer/transferCustomer"; import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue"; import Template from "@/views/cms/template/index.vue";
import AddPotentialCustom from "@/views/ecw/customer/addPotentialCustom.vue"; import AddPotentialCustom from "@/views/ecw/customer/addPotentialCustom.vue";
...@@ -1462,7 +1505,7 @@ export default { ...@@ -1462,7 +1505,7 @@ export default {
CustomerFollowList, CustomerFollowList,
customerComplaints, customerComplaints,
transferCustomer, transferCustomer,
AreaCodeSelector AreaCodeSelector,
}, },
data() { data() {
return { return {
...@@ -1647,38 +1690,42 @@ export default { ...@@ -1647,38 +1690,42 @@ export default {
} }
}, },
combinedQueryParams() { combinedQueryParams() {
let queryParams = {} let queryParams = {};
if (this.enterOpenSeaTime && this.enterOpenSeaTime.length == 2) { if (this.enterOpenSeaTime && this.enterOpenSeaTime.length == 2) {
queryParams.beginEnterOpenSeaTime = this.enterOpenSeaTime[0] queryParams.beginEnterOpenSeaTime = this.enterOpenSeaTime[0];
queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1] queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1];
} }
if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) { if (
queryParams.beginCustomerServiceConfirmedTime = this.enterOpenSeaTime[0] this.customerServiceConfirmedTime &&
queryParams.endCustomerServiceConfirmedTime = this.enterOpenSeaTime[1] this.customerServiceConfirmedTime.length == 2
) {
queryParams.beginCustomerServiceConfirmedTime =
this.enterOpenSeaTime[0];
queryParams.endCustomerServiceConfirmedTime = this.enterOpenSeaTime[1];
} }
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) { if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0] queryParams.beginCreateTime = this.dateRangeCreateTime[0];
queryParams.endCreateTime = this.dateRangeCreateTime[1] queryParams.endCreateTime = this.dateRangeCreateTime[1];
} }
if (this.firstDealTime && this.firstDealTime.length == 2) { if (this.firstDealTime && this.firstDealTime.length == 2) {
queryParams.beginFirstDealTime = this.firstDealTime[0] queryParams.beginFirstDealTime = this.firstDealTime[0];
queryParams.endFirstDealTime = this.firstDealTime[1] queryParams.endFirstDealTime = this.firstDealTime[1];
} }
if (this.weightYearly.value) { if (this.weightYearly.value) {
let key = 'eqWeightYearly' let key = "eqWeightYearly";
if (this.weightYearly.key == 'leNumberKey') { if (this.weightYearly.key == "leNumberKey") {
key = 'leWeightYearly' key = "leWeightYearly";
} else if (this.weightYearly.key == 'geNumberKey') { } else if (this.weightYearly.key == "geNumberKey") {
key = 'geWeightYearly' key = "geWeightYearly";
} }
queryParams[key] = this.weightYearly.value; queryParams[key] = this.weightYearly.value;
} }
if (this.numYearly.value) { if (this.numYearly.value) {
let key = 'eqNumYearly' let key = "eqNumYearly";
if (this.numYearly.key == 'leNumberKey') { if (this.numYearly.key == "leNumberKey") {
key = 'leNumYearly' key = "leNumYearly";
} else if (this.numYearly.key == 'geNumberKey') { } else if (this.numYearly.key == "geNumberKey") {
key = 'geNumYearly' key = "geNumYearly";
} }
queryParams[key] = this.numYearly.value; queryParams[key] = this.numYearly.value;
} }
...@@ -1721,10 +1768,10 @@ export default { ...@@ -1721,10 +1768,10 @@ export default {
}); });
competitorListAll().then((r) => { competitorListAll().then((r) => {
this.competitorList = r.data; this.competitorList = r.data;
}) });
listMySimpleDepts().then(response => { listMySimpleDepts().then((response) => {
this.deptList = response.data this.deptList = response.data;
}) });
}, },
activated() { activated() {
this.getList(); this.getList();
...@@ -1800,12 +1847,12 @@ export default { ...@@ -1800,12 +1847,12 @@ export default {
}, },
followUp(row) { followUp(row) {
this.customerId = row.id; this.customerId = row.id;
this.customerFollowVisible = true this.customerFollowVisible = true;
this.$nextTick(_ => { this.$nextTick((_) => {
// this.$refs.CustomerFollowList.customerFollow.dialogVisible = true; // this.$refs.CustomerFollowList.customerFollow.dialogVisible = true;
this.$refs['CustomerFollowList'].init() this.$refs["CustomerFollowList"].init();
this.$refs['CustomerFollowList'].handleAdd() this.$refs["CustomerFollowList"].handleAdd();
}) });
}, },
//报价 //报价
quote(row) { quote(row) {
...@@ -1989,9 +2036,9 @@ export default { ...@@ -1989,9 +2036,9 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = []; this.dateRangeCreateTime = [];
this.enterOpenSeaTime = [] this.enterOpenSeaTime = [];
this.customerServiceConfirmedTime = [] this.customerServiceConfirmedTime = [];
this.firstDealTime = [] this.firstDealTime = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams = { this.queryParams = {
pageNo: 1, pageNo: 1,
...@@ -2065,100 +2112,100 @@ export default { ...@@ -2065,100 +2112,100 @@ export default {
setDefaultPay() { setDefaultPay() {
changeCustomerDefaultPay({ changeCustomerDefaultPay({
customerIdList: this.selectCustomerList, customerIdList: this.selectCustomerList,
defaultPay: true defaultPay: true,
}).then(_ => { }).then((_) => {
this.$message.success(this.$t("操作成功")) this.$message.success(this.$t("操作成功"));
this.getList() this.getList();
}) });
}, },
setNoConsignee() { setNoConsignee() {
changeCustomerNoConsignee({ changeCustomerNoConsignee({
customerIdList: this.selectCustomerList, customerIdList: this.selectCustomerList,
noConsigee: true noConsigee: true,
}).then(_ => { }).then((_) => {
this.$message.success(this.$t("操作成功")) this.$message.success(this.$t("操作成功"));
this.getList() this.getList();
}) });
}, },
setDefaultBilling() { setDefaultBilling() {
changeCustomerDefaultBilling({ changeCustomerDefaultBilling({
customerIdList: this.selectCustomerList, customerIdList: this.selectCustomerList,
defaultBilling: true defaultBilling: true,
}).then(_ => { }).then((_) => {
this.$message.success(this.$t("操作成功")) this.$message.success(this.$t("操作成功"));
this.getList() this.getList();
}) });
}, },
getBusiCountryNames(ids) { getBusiCountryNames(ids) {
if (ids) { if (ids) {
const idsArr = ids.split(',') const idsArr = ids.split(",");
const strArr = [] const strArr = [];
this.countryList.forEach(item => { this.countryList.forEach((item) => {
if (idsArr.includes(item.id.toString())) { if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn) strArr.push(this.isChinese ? item.nameZh : item.nameEn);
} }
}) });
return strArr.length > 0 ? strArr.join(',') : null return strArr.length > 0 ? strArr.join(",") : null;
} else { } else {
return null return null;
} }
}, },
getBusiCountryNames(ids) { getBusiCountryNames(ids) {
if (ids) { if (ids) {
const idsArr = ids.split(',') const idsArr = ids.split(",");
const strArr = [] const strArr = [];
this.countryList.forEach(item => { this.countryList.forEach((item) => {
if (idsArr.includes(item.id.toString())) { if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn) strArr.push(this.isChinese ? item.nameZh : item.nameEn);
} }
}) });
return strArr.length > 0 ? strArr.join(',') : null return strArr.length > 0 ? strArr.join(",") : null;
} else { } else {
return null return null;
} }
}, },
getPickupPointNames(ids) { getPickupPointNames(ids) {
if (ids) { if (ids) {
const idsArr = ids.split(',') const idsArr = ids.split(",");
const strArr = [] const strArr = [];
this.getNodeLists.forEach(item => { this.getNodeLists.forEach((item) => {
if (idsArr.includes(item.id.toString())) { if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.titleZh : item.titleEn) strArr.push(this.isChinese ? item.titleZh : item.titleEn);
} }
}) });
return strArr.length > 0 ? strArr.join(',') : null return strArr.length > 0 ? strArr.join(",") : null;
} else { } else {
return null return null;
} }
}, },
getProductTypeNames(ids) { getProductTypeNames(ids) {
if (ids) { if (ids) {
const idsArr = ids.split(',') const idsArr = ids.split(",");
const strArr = [] const strArr = [];
this.productTypeList.forEach(item => { this.productTypeList.forEach((item) => {
if (idsArr.includes(item.id.toString())) { if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.titleZh : item.titleEn) strArr.push(this.isChinese ? item.titleZh : item.titleEn);
} }
}) });
return strArr.length > 0 ? strArr.join(',') : null return strArr.length > 0 ? strArr.join(",") : null;
} else { } else {
return null return null;
} }
}, },
getPromoterName(id) { getPromoterName(id) {
if (id) { if (id) {
let strName = '' let strName = "";
for(const item of this.customerSelectFn) { for (const item of this.customerSelectFn) {
if (item.id == id) { if (item.id == id) {
strName = item.name strName = item.name;
break break;
} }
} }
return strName return strName;
} else { } else {
return null return null;
} }
} },
}, },
}; };
</script> </script>
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