Commit c0aeb658 authored by 余金瑶's avatar 余金瑶

全部客户搜索

parent 795f445f
...@@ -4704,5 +4704,5 @@ ...@@ -4704,5 +4704,5 @@
"跟进情况": "Follow-up situation", "跟进情况": "Follow-up situation",
"下次跟进时间": "Next follow-up time", "下次跟进时间": "Next follow-up time",
"提交结果": "Submit result", "提交结果": "Submit result",
"增加计划": "Add plan" "增加计划": "add plan"
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="130px"
> >
<el-form-item :label="$t('客户编号')" prop="number"> <el-form-item :label="$t('客户编号')" prop="number">
<el-input <el-input
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
formatter="number" formatter="number"
@change="handleQuery" @change="handleQuery"
></dict-selector> ></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('会员电话')" prop="department"> <el-form-item :label="$t('会员电话')" prop="department">
<el-col :span="11"> <el-col :span="11">
<area-code-selector style="width: 100%;" v-model="queryParams.memberAreaCode" /> <area-code-selector style="width: 100%;" v-model="queryParams.memberAreaCode" />
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
clearable clearable
v-model.number="queryParams.memberMobile" v-model.number="queryParams.memberMobile"
:placeholder="$t('请输入会员电话')"/> :placeholder="$t('请输入会员电话')"/>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item :label="$t('会员编号')" prop="number"> <el-form-item :label="$t('会员编号')" prop="number">
<el-input <el-input
...@@ -189,6 +189,117 @@ ...@@ -189,6 +189,117 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('入公海时间')">
<el-date-picker
type="datetimerange"
clearable
v-model="enterOpenSeaTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
/>
</el-form-item>
<el-form-item :label="$t('业绩类型')">
<el-select clearable v-model="queryParams.isNew">
<el-option :value="true">{{ $t('新客户') }}</el-option>
<el-option :value="false">{{ $t('老客户') }}</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('推介人')">
<el-select
clearable
remote
:remote-method="remoteMethod"
v-model="queryParams.promoter"
:placeholder="$t('请输入推介人')"
filterable
>
<el-option
v-for="item in customerSelectFn"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('控货无收货人')">
<el-switch v-model="queryParams.noConsignee" />
</el-form-item>
<el-form-item :label="$t('默认付款')">
<el-switch v-model="queryParams.defaultPay" />
</el-form-item>
<el-form-item :label="$t('是否显示提单价格')">
<el-switch v-model="queryParams.isShowTidanPrice" />
</el-form-item>
<el-form-item :label="$t('归属时间')">
<el-date-picker
type="datetimerange"
clearable
v-model="customerServiceConfirmedTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
/>
</el-form-item>
<el-form-item :label="$t('首次成交时间')">
<el-date-picker
type="datetimerange"
clearable
v-model="firstDealTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
/>
</el-form-item>
<el-form-item :label="$t('获取方式')" prop="getMethod">
<el-select
v-model="queryParams.getMethods"
multiple
:placeholder="$t('请选择')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_GET_METHOD)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建入口')" prop="createFrom">
<el-select
v-model="queryParams.createFroms"
multiple
:placeholder="$t('请选择')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FROM)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('结算方式')">
<el-select
v-model="queryParams.balances"
multiple
:placeholder="$t('请选择结算方式')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</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("搜索")
...@@ -1114,7 +1225,7 @@ import Contacts from "@/views/ecw/customer/components/contacts.vue"; ...@@ -1114,7 +1225,7 @@ import Contacts from "@/views/ecw/customer/components/contacts.vue";
import { getUserProfile } from "@/api/system/user"; import { getUserProfile } from "@/api/system/user";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue"; import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import { getCustomerSelect } from "@/api/ecw/customer";
export default { export default {
name: "EcwCustomerIndex", name: "EcwCustomerIndex",
components: { components: {
...@@ -1151,7 +1262,7 @@ export default { ...@@ -1151,7 +1262,7 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
number: null, /*number: null,
name: null, name: null,
level: null, level: null,
source: null, source: null,
...@@ -1164,7 +1275,7 @@ export default { ...@@ -1164,7 +1275,7 @@ export default {
memberCode: null, memberCode: null,
memberName: null, memberName: null,
memberMobile: null, memberMobile: null,
memberAreaCode: null memberAreaCode: null,*/
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -1237,7 +1348,12 @@ export default { ...@@ -1237,7 +1348,12 @@ export default {
customData: {}, customData: {},
currentisNew: false, currentisNew: false,
userId: undefined, //lanbm 2024-05-23 add userId: undefined, //lanbm 2024-05-23 add
customerFollowVisible: false customerFollowVisible: false,
enterOpenSeaTime: [],
customerServiceConfirmedTime: [],
firstDealTime: [],
customerSelect: [],
recommended: [],
}; };
}, },
computed: { computed: {
...@@ -1277,6 +1393,40 @@ export default { ...@@ -1277,6 +1393,40 @@ export default {
return t.join(":"); return t.join(":");
}; };
}, },
customerSelectFn() {
if (this.recommended.length > 0) {
let i = this.customerSelect.find(
(item) => item.id === this.recommended[0].id
);
if (!i) {
this.customerSelect.push(this.recommended[0]);
}
return this.customerSelect;
} else {
return this.customerSelect;
}
},
combinedQueryParams() {
let queryParams = {}
if (this.enterOpenSeaTime && this.enterOpenSeaTime.length == 2) {
this.queryParams.beginEnterOpenSeaTime = this.enterOpenSeaTime[0]
this.queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1]
}
if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) {
this.queryParams.beginCustomerServiceConfirmedTime = this.enterOpenSeaTime[0]
this.queryParams.endCustomerServiceConfirmedTime = this.enterOpenSeaTime[1]
}
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
this.queryParams.beginCreateTime = this.dateRangeCreateTime[0]
this.queryParams.endCreateTime = this.dateRangeCreateTime[1]
}
if (this.firstDealTime && this.firstDealTime.length == 2) {
this.queryParams.beginFirstDealTime = this.firstDealTime[0]
this.queryParams.endFirstDealTime = this.firstDealTime[1]
}
return queryParams;
},
}, },
watch: { watch: {
selectCustomerList(val) { selectCustomerList(val) {
...@@ -1301,6 +1451,7 @@ export default { ...@@ -1301,6 +1451,7 @@ export default {
getUserProfile().then((res) => { getUserProfile().then((res) => {
this.userId = res.data.id; this.userId = res.data.id;
}); });
this.getCustomerSelect();
}, },
activated() { activated() {
this.getList(); this.getList();
...@@ -1400,14 +1551,14 @@ export default { ...@@ -1400,14 +1551,14 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数}
let params = { ...this.queryParams }; let params = { ...this.queryParams, ...this.combinedQueryParams };
this.addBeginAndEndTime( /*this.addBeginAndEndTime(
params, params,
this.dateRangeCreateTime, this.dateRangeCreateTime,
"createTime", "createTime",
false false
); );*/
// 执行查询 // 执行查询
switch (this.$route.path) { switch (this.$route.path) {
case "/customer/customer": case "/customer/customer":
...@@ -1421,6 +1572,16 @@ export default { ...@@ -1421,6 +1572,16 @@ export default {
break; break;
} }
}, },
remoteMethod(val) {
this.getCustomerSelect(val);
},
getCustomerSelect(val = "") {
getCustomerSelect({ pageNo: 1, pageSize: 30, searchKey: val }).then(
(res) => {
this.customerSelect = res.data.list;
}
);
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$router.push("/customer/add-edit/0"); this.$router.push("/customer/add-edit/0");
......
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