Commit ec5c3f89 authored by yujinyao's avatar yujinyao

修改客户bug

parent 5744f2e7
......@@ -4709,5 +4709,6 @@
"提货状态": "pickup status",
"未提货": "not pickup",
"部分提货": "portion pickup",
"是否确认导出客户跟进记录数据项?": "Are you sure to export all customer follow-up record data items?"
"是否确认导出客户跟进记录数据项?": "Are you sure to export all customer follow-up record data items?",
"请选择需要核销的收款明细": "Please select the collection details that need to be written off"
}
......@@ -421,7 +421,6 @@
<el-form-item :label="$t('业务国家')" prop="busiCountryIds">
<el-select
multiple
filterable
clearable
v-model="form.busiCountryIds"
:placeholder="$t('请选择')"
......@@ -1310,7 +1309,7 @@ export default {
{
required: true,
message: this.$t("请选择业务国家"),
trigger: "change",
trigger: "blur",
},
],
competitorIds: [
......@@ -1320,6 +1319,20 @@ export default {
trigger: "change",
},
],
pickupPoints: [
{
required: true,
message: this.$t("请选择常用提货网点"),
trigger: "change",
},
],
productType: [
{
required: true,
message: this.$t("请选择产品类别"),
trigger: "change",
},
],
},
contactRules: {
name: [
......@@ -1692,7 +1705,7 @@ export default {
};
this.form.createTime = new Date().getTime();
this.form.updateTime = new Date().getTime();
// this.resetForm("form");
this.resetForm("form");
},
getCustomer(id) {
return getCustomer(id).then((response) => {
......
......@@ -1442,7 +1442,7 @@ import customerComplaints from "@/components/customerComplaints";
import { listServiceUser, getUserProfile, listAllSimpl } from "@/api/system/user";
import { getCountryListAll } from "@/api/ecw/country";
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 Template from "@/views/cms/template/index.vue";
import AddPotentialCustom from "@/views/ecw/customer/addPotentialCustom.vue";
......@@ -1654,8 +1654,8 @@ export default {
queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1]
}
if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) {
queryParams.beginCustomerServiceConfirmedTime = this.enterOpenSeaTime[0]
queryParams.endCustomerServiceConfirmedTime = this.enterOpenSeaTime[1]
queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0]
queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1]
}
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0]
......@@ -1862,10 +1862,15 @@ export default {
);
},
handleSelectProductType(val) {
this.queryParams.productIds = [];
if (val && val.length >= 1) {
this.queryParams.productIds = []
getProductList({ typeIds: val }).then((r) => {
this.productList = r.data;
this.productList = r.data
});
} else {
this.queryParams.productIds = []
this.productList = []
}
},
/** 新增按钮操作 */
handleAdd() {
......
......@@ -385,11 +385,48 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:treat-export']">{{$t('导出')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultPay"
v-hasPermi="['ecw:customer:change-customer-default-pay']"
>{{ $t("设置默认付款") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setNoConsignee"
v-hasPermi="['ecw:customer:change-customer-no-consignee']"
>{{ $t("设置默认控货无收货人") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultBilling"
v-hasPermi="['ecw:customer:change-customer-default-billing']"
>{{ $t("设置默认开票") }}</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table ref="multipleTable" v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" fixed></el-table-column>
<el-table-column :label="$t('客户编号')" align="center" fixed>
<template v-slot="{row}">
<router-link :to="`/customer/query/${row.id}`" class="link-type">
......@@ -798,7 +835,7 @@ import transferCustomer from "@/views/ecw/customer/transferCustomer.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import { getNodeList } from "@/api/ecw/node";
import { getCustomerSelect } from "@/api/ecw/customer";
import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee,changeCustomerDefaultBilling } from "@/api/ecw/customer";
import { getProductTypeList } from "@/api/ecw/productType";
import { getProductList } from "@/api/ecw/product";
import { listMySimpleDepts } from "@/api/system/dept";
......@@ -844,8 +881,8 @@ export default {
queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1]
}
if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) {
queryParams.beginCustomerServiceConfirmedTime = this.enterOpenSeaTime[0]
queryParams.endCustomerServiceConfirmedTime = this.enterOpenSeaTime[1]
queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0]
queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1]
}
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0]
......@@ -932,6 +969,7 @@ export default {
customerServiceList:[],
countryList:[],
creditList:[],
selectCustomerList: [],
enterOpenSeaTime: [],
customerServiceConfirmedTime: [],
firstDealTime: [],
......@@ -1005,6 +1043,9 @@ export default {
const country = this.countryList.find((e) => e.id === cellValue)
return this.isChinese ? country?.nameZh : country?.nameEn
},
handleSelectionChange(val){
this.selectCustomerList = val.map(i => i.id);
},
/** 查询列表 */
getList() {
this.loading = true;
......@@ -1029,10 +1070,15 @@ export default {
);
},
handleSelectProductType(val) {
this.queryParams.productIds = [];
if (val && val.length >= 1) {
this.queryParams.productIds = []
getProductList({ typeIds: val }).then((r) => {
this.productList = r.data;
this.productList = r.data
});
} else {
this.queryParams.productIds = []
this.productList = []
}
},
/** 取消按钮 */
cancel() {
......@@ -1273,7 +1319,34 @@ export default {
} else {
return null
}
}
},
setDefaultPay() {
changeCustomerDefaultPay({
customerIdList: this.selectCustomerList,
defaultPay: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
setNoConsignee() {
changeCustomerNoConsignee({
customerIdList: this.selectCustomerList,
noConsigee: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
setDefaultBilling() {
changeCustomerDefaultBilling({
customerIdList: this.selectCustomerList,
defaultBilling: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
}
};
</script>
......@@ -392,6 +392,42 @@
v-hasPermi="['ecw:customer:distribution-transfer']">{{$t('批量移交')}}</el-button>
</el-col>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultPay"
v-hasPermi="['ecw:customer:change-customer-default-pay']"
>{{ $t("设置默认付款") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setNoConsignee"
v-hasPermi="['ecw:customer:change-customer-no-consignee']"
>{{ $t("设置默认控货无收货人") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultBilling"
v-hasPermi="['ecw:customer:change-customer-default-billing']"
>{{ $t("设置默认开票") }}</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -592,7 +628,7 @@ import Template from "@/views/cms/template/index.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import { getNodeList } from "@/api/ecw/node";
import { getCustomerSelect } from "@/api/ecw/customer";
import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee,changeCustomerDefaultBilling } from "@/api/ecw/customer";
import { getProductTypeList } from "@/api/ecw/productType";
import { getProductList } from "@/api/ecw/product";
import { listMySimpleDepts } from "@/api/system/dept";
......@@ -763,10 +799,15 @@ export default {
);
},
handleSelectProductType(val) {
this.queryParams.productIds = [];
if (val && val.length >= 1) {
this.queryParams.productIds = []
getProductList({ typeIds: val }).then((r) => {
this.productList = r.data;
this.productList = r.data
});
} else {
this.queryParams.productIds = []
this.productList = []
}
},
/** 取消按钮 */
cancel() {
......@@ -989,7 +1030,34 @@ export default {
} else {
return null
}
}
},
setDefaultPay() {
changeCustomerDefaultPay({
customerIdList: this.selectCustomerList,
defaultPay: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
setNoConsignee() {
changeCustomerNoConsignee({
customerIdList: this.selectCustomerList,
noConsigee: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
setDefaultBilling() {
changeCustomerDefaultBilling({
customerIdList: this.selectCustomerList,
defaultBilling: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
},
watch:{
selectCustomerList(val){
......@@ -1033,8 +1101,8 @@ export default {
queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1]
}
if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) {
queryParams.beginCustomerServiceConfirmedTime = this.enterOpenSeaTime[0]
queryParams.endCustomerServiceConfirmedTime = this.enterOpenSeaTime[1]
queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0]
queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1]
}
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0]
......
......@@ -775,8 +775,8 @@ export default {
queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1]
}
if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) {
queryParams.beginCustomerServiceConfirmedTime = this.enterOpenSeaTime[0]
queryParams.endCustomerServiceConfirmedTime = this.enterOpenSeaTime[1]
queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0]
queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1]
}
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0]
......@@ -1011,10 +1011,15 @@ export default {
);
},
handleSelectProductType(val) {
this.queryParams.productIds = [];
if (val && val.length >= 1) {
this.queryParams.productIds = []
getProductList({ typeIds: val }).then((r) => {
this.productList = r.data;
this.productList = r.data
});
} else {
this.queryParams.productIds = []
this.productList = []
}
},
/** 取消按钮 */
cancel() {
......
......@@ -510,6 +510,42 @@
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultPay"
v-hasPermi="['ecw:customer:change-customer-default-pay']"
>{{ $t("设置默认付款") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setNoConsignee"
v-hasPermi="['ecw:customer:change-customer-no-consignee']"
>{{ $t("设置默认控货无收货人") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-plus"
size="mini"
:disabled="!selectCustomerList.length"
@click="setDefaultBilling"
v-hasPermi="['ecw:customer:change-customer-default-billing']"
>{{ $t("设置默认开票") }}</el-button
>
</el-col>
</el-row>
<!-- 列表 -->
......@@ -772,7 +808,7 @@ import Template from "@/views/cms/template/index.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import { getNodeList } from "@/api/ecw/node";
import { getCustomerSelect } from "@/api/ecw/customer";
import { getCustomerSelect, changeCustomerDefaultPay, changeCustomerNoConsignee,changeCustomerDefaultBilling } from "@/api/ecw/customer";
import { getProductTypeList } from "@/api/ecw/productType";
import { getProductList } from "@/api/ecw/product";
import { listMySimpleDepts } from "@/api/system/dept";
......@@ -888,6 +924,7 @@ export default {
service: undefined, //客服
transferData: undefined, //移交数据
transferShow: false,
selectCustomerList: [],
multipleSelection: [],
isBatch: false,
countryList: [],
......@@ -985,8 +1022,8 @@ export default {
queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1]
}
if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) {
queryParams.beginCustomerServiceConfirmedTime = this.enterOpenSeaTime[0]
queryParams.endCustomerServiceConfirmedTime = this.enterOpenSeaTime[1]
queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0]
queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1]
}
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0]
......@@ -997,6 +1034,7 @@ export default {
queryParams.endFirstDealTime = this.firstDealTime[1]
}
if (this.weightYearly.value) {
console.log(this.weightYearly.key)
let key = 'eqWeightYearly'
if (this.weightYearly.key == 'leNumberKey') {
key = 'leWeightYearly'
......@@ -1047,10 +1085,15 @@ export default {
);
},
handleSelectProductType(val) {
this.queryParams.productIds = [];
if (val && val.length >= 1) {
this.queryParams.productIds = []
getProductList({ typeIds: val }).then((r) => {
this.productList = r.data;
this.productList = r.data
});
} else {
this.queryParams.productIds = []
this.productList = []
}
},
/** 取消按钮 */
cancel() {
......@@ -1250,6 +1293,7 @@ export default {
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.selectCustomerList = val.map((i) => i.id);
},
getBusiCountryNames(ids) {
if (ids) {
......@@ -1320,7 +1364,34 @@ export default {
} else {
return null
}
}
},
setDefaultPay() {
changeCustomerDefaultPay({
customerIdList: this.selectCustomerList,
defaultPay: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
setNoConsignee() {
changeCustomerNoConsignee({
customerIdList: this.selectCustomerList,
noConsigee: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
setDefaultBilling() {
changeCustomerDefaultBilling({
customerIdList: this.selectCustomerList,
defaultBilling: true
}).then(_ => {
this.$message.success(this.$t("操作成功"))
this.getList()
})
},
},
};
</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