|
@@ -25,6 +25,57 @@
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <br />
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="公司" prop="companyId">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="queryParams.companyId"
|
|
|
|
|
+ placeholder="请选择公司"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ filterable
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @change="handleCompanyChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in companyOptions"
|
|
|
|
|
+ :key="item.dictValue"
|
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="销售" prop="qwUserName">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="queryParams.qwUserName"
|
|
|
|
|
+ placeholder="请选择销售"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ filterable
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :disabled="!queryParams.companyId"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in salesOptions"
|
|
|
|
|
+ :key="item.dictValue"
|
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="添加销售数" prop="addSalesCount">
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ v-model="queryParams.addSalesCount"
|
|
|
|
|
+ placeholder="请输入添加销售数"
|
|
|
|
|
+ :min="0"
|
|
|
|
|
+ :precision="0"
|
|
|
|
|
+ :step="1"
|
|
|
|
|
+ controls-position="right"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
@@ -74,6 +125,11 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="销售企微昵称" align="center" prop="qwUserName" width="120px"/>
|
|
<el-table-column label="销售企微昵称" align="center" prop="qwUserName" width="120px"/>
|
|
|
|
|
+ <el-table-column label="添加销售数" align="center" prop="addSalesCount" width="100px">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ {{ scope.row.addSalesCount != null && scope.row.addSalesCount !== '' ? scope.row.addSalesCount : '-' }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="企微部门" align="center" prop="departmentName" width="120px"/>
|
|
<el-table-column label="企微部门" align="center" prop="departmentName" width="120px"/>
|
|
|
<el-table-column label="用户类别" align="center" prop="type">
|
|
<el-table-column label="用户类别" align="center" prop="type">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -196,7 +252,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { listExternalContact, updateExternalContact } from "@/api/qw/externalContact";
|
|
|
|
|
|
|
+import { listExternalContact, updateExternalContact, getCompanyOptions, getSalesOptions } from "@/api/qw/externalContact";
|
|
|
import PaginationMore from '@/components/PaginationMore/index.vue'
|
|
import PaginationMore from '@/components/PaginationMore/index.vue'
|
|
|
import RepeatCourseHistoryDrawer from './RepeatCourseHistoryDrawer.vue'
|
|
import RepeatCourseHistoryDrawer from './RepeatCourseHistoryDrawer.vue'
|
|
|
import ExternalContactNameCell from './ExternalContactNameCell.vue'
|
|
import ExternalContactNameCell from './ExternalContactNameCell.vue'
|
|
@@ -220,11 +276,17 @@ export default {
|
|
|
showSearch: true,
|
|
showSearch: true,
|
|
|
total: 0,
|
|
total: 0,
|
|
|
externalContactList: [],
|
|
externalContactList: [],
|
|
|
|
|
+ companyOptions: [],
|
|
|
|
|
+ salesOptions: [],
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
fsUserId: null,
|
|
fsUserId: null,
|
|
|
extId: null,
|
|
extId: null,
|
|
|
|
|
+ companyId: null,
|
|
|
|
|
+ qwUserName: null,
|
|
|
|
|
+ addSalesCount: undefined,
|
|
|
|
|
+ projectId: null,
|
|
|
},
|
|
},
|
|
|
open: false,
|
|
open: false,
|
|
|
title: "",
|
|
title: "",
|
|
@@ -267,7 +329,30 @@ export default {
|
|
|
this.transferStatusOptions = response.data;
|
|
this.transferStatusOptions = response.data;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.loadCompanyOptions();
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ loadCompanyOptions() {
|
|
|
|
|
+ getCompanyOptions().then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.companyOptions = res.data || [];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ handleCompanyChange(companyId) {
|
|
|
|
|
+ this.queryParams.qwUserName = null;
|
|
|
|
|
+ this.salesOptions = [];
|
|
|
|
|
+ if (companyId) {
|
|
|
|
|
+ getSalesOptions({ companyId }).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.salesOptions = res.data || [];
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.salesOptions = [];
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
openRepeatCourseHistory(row) {
|
|
openRepeatCourseHistory(row) {
|
|
|
const drawer = this.$refs.repeatCourseHistoryDrawer
|
|
const drawer = this.$refs.repeatCourseHistoryDrawer
|
|
|
if (drawer && typeof drawer.open === 'function') {
|
|
if (drawer && typeof drawer.open === 'function') {
|
|
@@ -285,9 +370,16 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
handleQuery() {
|
|
|
- if (!this.queryParams.fsUserId && !this.queryParams.extId) {
|
|
|
|
|
|
|
+ const { fsUserId, extId, addSalesCount, companyId, qwUserName } = this.queryParams;
|
|
|
|
|
+ const hasAddSalesCount = addSalesCount !== null && addSalesCount !== undefined && addSalesCount !== '';
|
|
|
|
|
+ const hasCompany = companyId !== null && companyId !== undefined && companyId !== '';
|
|
|
|
|
+ const hasQwUserName = qwUserName !== null && qwUserName !== undefined && qwUserName !== '';
|
|
|
|
|
+ if (hasAddSalesCount && !hasCompany && !hasQwUserName) {
|
|
|
|
|
+ return this.$modal.msgWarning('按添加销售数搜索时,请先选择公司或销售');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!fsUserId && !extId && !hasAddSalesCount && !hasCompany && !hasQwUserName) {
|
|
|
return this.$message.warning({
|
|
return this.$message.warning({
|
|
|
- message: "请至少输入客户会员id或企微客户id",
|
|
|
|
|
|
|
+ message: "请至少输入客户会员id、企微客户id、公司、销售或添加销售数",
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -299,6 +391,10 @@ export default {
|
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
|
this.queryParams.fsUserId = null;
|
|
this.queryParams.fsUserId = null;
|
|
|
this.queryParams.extId = null;
|
|
this.queryParams.extId = null;
|
|
|
|
|
+ this.queryParams.companyId = null;
|
|
|
|
|
+ this.queryParams.qwUserName = null;
|
|
|
|
|
+ this.queryParams.addSalesCount = undefined;
|
|
|
|
|
+ this.salesOptions = [];
|
|
|
this.externalContactList = [];
|
|
this.externalContactList = [];
|
|
|
this.total = 0;
|
|
this.total = 0;
|
|
|
},
|
|
},
|