|
|
@@ -10,7 +10,7 @@
|
|
|
<div class="follow-container">
|
|
|
<el-row :gutter="10" style="margin-bottom: 10px">
|
|
|
<el-col :span="4">
|
|
|
- <el-input v-model="queryForm.custId" placeholder="客户" />
|
|
|
+ <el-input v-model="queryForm.custName" placeholder="客户" />
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="4">
|
|
|
<el-date-picker
|
|
|
@@ -27,13 +27,15 @@
|
|
|
</el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-input v-model="queryForm.targetType" placeholder="跟进类型" />
|
|
|
+ <el-select v-model="queryForm.targetType" clearable placeholder="跟进类型" style="width: 100%">
|
|
|
+ <el-option v-for="item in targetTypeOptions" :key="item.key" :label="item.value" :value="item.key" />
|
|
|
+ </el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-input v-model="queryForm.indusTry" placeholder="跟进人员" />
|
|
|
+ <el-input v-model.number="queryForm.targetName" placeholder="跟进对象" />
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <el-input v-model="queryForm.managerId" placeholder="创建者" />
|
|
|
+ <el-input v-model="queryForm.managerId" placeholder="跟进人" />
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-button icon="el-icon-plus" type="primary" @click="search">查询</el-button>
|
|
|
@@ -59,17 +61,19 @@
|
|
|
<vab-icon class="user-avatar" icon="account-circle-fill" />
|
|
|
<div class="text">
|
|
|
<p class="action">
|
|
|
- <span>{{ item.contactsName }} 跟进({{ formatType(item.followType) }})</span>
|
|
|
+ <span>{{ item.createdName }} 跟进({{ formatType(item.followType) }})</span>
|
|
|
<span>
|
|
|
<vab-icon icon="time-line" />
|
|
|
{{ item.followDate }}
|
|
|
</span>
|
|
|
</p>
|
|
|
- <p>{{ item.followContent }}</p>
|
|
|
+ <p class="content">
|
|
|
+ <span>{{ item.followContent }}</span>
|
|
|
+ </p>
|
|
|
<div class="footer">
|
|
|
<p>
|
|
|
- 来自客户:
|
|
|
- <span>{{ item.custName }}</span>
|
|
|
+ 来自{{ selectDictLabel(targetTypeOptions, item.targetType) }}:
|
|
|
+ <span @click="jumpTo(item)">{{ item.targetName }}</span>
|
|
|
</p>
|
|
|
<div>
|
|
|
<el-button size="mini" @click="showDetail(item)">
|
|
|
@@ -124,7 +128,9 @@
|
|
|
listLoading: false,
|
|
|
queryForm: {
|
|
|
custId: '',
|
|
|
+ custName: '',
|
|
|
targetType: '',
|
|
|
+ targetName: '',
|
|
|
targetId: '',
|
|
|
managerId: '',
|
|
|
daysBeforeToday: 20,
|
|
|
@@ -159,6 +165,7 @@
|
|
|
updatedTime: '',
|
|
|
deletedTime: '',
|
|
|
},
|
|
|
+ targetTypeOptions: [],
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -166,7 +173,13 @@
|
|
|
this.getOptions()
|
|
|
},
|
|
|
methods: {
|
|
|
- getOptions() {},
|
|
|
+ getOptions() {
|
|
|
+ Promise.all([this.getDicts('follow_target_type')])
|
|
|
+ .then(([targetType]) => {
|
|
|
+ this.targetTypeOptions = targetType.data.values || []
|
|
|
+ })
|
|
|
+ .catch((err) => console.log(err))
|
|
|
+ },
|
|
|
search() {
|
|
|
// this.queryForm.daysBeforeToday = 20
|
|
|
this.fetchData()
|
|
|
@@ -192,14 +205,44 @@
|
|
|
reset() {
|
|
|
this.queryForm = {
|
|
|
custId: '',
|
|
|
+ custName: '',
|
|
|
targetType: '',
|
|
|
+ targetName: '',
|
|
|
targetId: '',
|
|
|
managerId: '',
|
|
|
- daysBeforeToday: '',
|
|
|
+ daysBeforeToday: 20,
|
|
|
date: [],
|
|
|
}
|
|
|
this.fetchData()
|
|
|
},
|
|
|
+ jumpTo(row) {
|
|
|
+ let pageName = ''
|
|
|
+ switch (row.targetType) {
|
|
|
+ case '10':
|
|
|
+ pageName = 'CustomerDetail'
|
|
|
+ break
|
|
|
+ case '20':
|
|
|
+ pageName = 'BusinessDetail'
|
|
|
+ break
|
|
|
+ case '30':
|
|
|
+ pageName = 'ContractDetail'
|
|
|
+ break
|
|
|
+ case '40':
|
|
|
+ pageName = ''
|
|
|
+ break
|
|
|
+ case '50':
|
|
|
+ pageName = 'DistributorDetail'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ if (pageName) {
|
|
|
+ this.$router.push({
|
|
|
+ name: pageName,
|
|
|
+ query: {
|
|
|
+ id: row.targetId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 详情
|
|
|
showDetail(row) {
|
|
|
this.$refs.followDetail.init({ ...row })
|
|
|
@@ -396,6 +439,16 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .content {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ span {
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.footer {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|