|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: wanglj 471442253@qq.com
|
|
|
* @Date: 2022-12-26 16:34:37
|
|
|
* @LastEditors: niezch@dashoo.cn
|
|
|
- * @LastEditTime: 2023-03-27 11:36:13
|
|
|
+ * @LastEditTime: 2023-03-29 14:42:13
|
|
|
* @Description: file content
|
|
|
* @FilePath: \opms_frontend\src\views\customer\list.vue
|
|
|
-->
|
|
|
@@ -26,13 +26,27 @@
|
|
|
</el-select>
|
|
|
</el-col> -->
|
|
|
<el-col :span="3.5">
|
|
|
- <el-input v-model="queryForm.custProvince" clearable placeholder="所属省" @keyup.enter.native="handleSearch" />
|
|
|
+ <el-select v-model="queryForm.province" clearable placeholder="所在省" value-key="id">
|
|
|
+ <el-option v-for="item in provinceOptions" :key="item.id" :label="item.distName" :value="item" />
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input v-model="queryForm.custProvince" clearable placeholder="所在省" @keyup.enter.native="handleSearch" /> -->
|
|
|
</el-col>
|
|
|
<el-col :span="3.5">
|
|
|
- <el-input v-model="queryForm.custCity" clearable placeholder="所属市" @keyup.enter.native="handleSearch" />
|
|
|
+ <el-select v-model="queryForm.custCity" clearable placeholder="所在市" value-key="id">
|
|
|
+ <el-option
|
|
|
+ v-for="item in queryForm.province ? queryForm.province.children : []"
|
|
|
+ :key="item.id"
|
|
|
+ clearable
|
|
|
+ :label="item.distName"
|
|
|
+ :value="item.distName" />
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input v-model="queryForm.custCity" clearable placeholder="所在市" @keyup.enter.native="handleSearch" /> -->
|
|
|
</el-col>
|
|
|
<el-col :span="3.5">
|
|
|
- <el-input v-model="queryForm.salesName" clearable placeholder="所属销售" @keyup.enter.native="handleSearch" />
|
|
|
+ <el-select v-model="queryForm.salesName" clearable placeholder="所属销售" value-key="id">
|
|
|
+ <el-option v-for="item in sellOptions" :key="item.id" :label="item.nickName" :value="item.nickName" />
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input v-model="queryForm.salesName" clearable placeholder="所属销售" @keyup.enter.native="handleSearch" /> -->
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="4">
|
|
|
<el-select v-model="queryForm.custLevel" placeholder="客户级别" style="width: 100%">
|
|
|
@@ -173,7 +187,7 @@
|
|
|
import Merge from './components/Merge'
|
|
|
import TableTool from '@/components/table/TableTool'
|
|
|
import downloadFileByByte from '@/utils/base64ToFile'
|
|
|
-
|
|
|
+ import userApi from '@/api/system/user'
|
|
|
export default {
|
|
|
name: 'ReserveCustomer',
|
|
|
components: {
|
|
|
@@ -200,6 +214,7 @@
|
|
|
followUpDate: [new Date(this.getLastMonth(new Date())), new Date()],
|
|
|
custProvince: '',
|
|
|
custCity: '',
|
|
|
+ province: {},
|
|
|
},
|
|
|
total: 0,
|
|
|
listLoading: false,
|
|
|
@@ -207,6 +222,9 @@
|
|
|
selectRows: [],
|
|
|
industryOptions: [], //客户类型
|
|
|
levelOptions: [], //客户级别
|
|
|
+ provinceOptions: [],
|
|
|
+ provinceDetail: [],
|
|
|
+ sellOptions: [],
|
|
|
// 自定义列表
|
|
|
showColumns: [],
|
|
|
columns: [
|
|
|
@@ -334,10 +352,22 @@
|
|
|
return year + '-' + (month - 1) + '-' + lastMonthDay // 当前天日期小于当前月总天数
|
|
|
},
|
|
|
getOptions() {
|
|
|
- Promise.all([this.getDicts('cust_level'), this.getDicts('cust_idy')])
|
|
|
- .then(([level, industry]) => {
|
|
|
+ Promise.all([
|
|
|
+ api.getProvinceDetail(),
|
|
|
+ this.getDicts('cust_level'),
|
|
|
+ this.getDicts('cust_idy'),
|
|
|
+ userApi.getList({
|
|
|
+ orderBy: 'userName',
|
|
|
+ roles: ['SalesEngineer', 'ProductLineManager'],
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 50,
|
|
|
+ }),
|
|
|
+ ])
|
|
|
+ .then(([province, level, industry, sell]) => {
|
|
|
+ this.provinceOptions = province.data.list || []
|
|
|
this.levelOptions = level.data.values || []
|
|
|
this.industryOptions = industry.data.values || []
|
|
|
+ this.sellOptions = sell.data.list || []
|
|
|
})
|
|
|
.catch((err) => console.log(err))
|
|
|
},
|
|
|
@@ -364,6 +394,7 @@
|
|
|
CreateOn.push(_this.formatDateTime(_this.queryForm.followUpDate[1]))
|
|
|
}
|
|
|
params['CreateOn'] = CreateOn.join(',')
|
|
|
+ params.custProvince = params.province.distName ? params.province.distName : ''
|
|
|
const [err, res] = await to(api.getList(params))
|
|
|
if (err) return (this.listLoading = false)
|
|
|
this.list = res.data.list || []
|
|
|
@@ -402,6 +433,7 @@
|
|
|
followUpDate: [new Date(this.getLastMonth(new Date())), new Date()],
|
|
|
custProvince: '',
|
|
|
custCity: '',
|
|
|
+ province: {},
|
|
|
}
|
|
|
this.fetchData()
|
|
|
},
|