0325-海宁pad走访修改

This commit is contained in:
2026-03-25 18:24:40 +08:00
parent 15891708de
commit 7bbe527477
11 changed files with 211 additions and 165 deletions

View File

@@ -93,7 +93,7 @@ export function deleteCustGroup(idList) {
// 手动移除客群客户
export function removeMembers(groupId, memberIds) {
return request({
url: '/group/cust/removeMembers',
url: '/group/member/remove',
method: 'post',
params: { groupId: groupId },
data: memberIds

View File

@@ -48,6 +48,11 @@
<el-table-column label="身份证号" prop="custIdc" show-overflow-tooltip />
<el-table-column label="统信码" prop="socialCreditCode" show-overflow-tooltip />
<el-table-column label="添加时间" prop="createTime" width="180" />
<el-table-column v-if="isMineView" label="操作" align="center" width="100" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="handleRemove(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
@@ -63,7 +68,7 @@
</template>
<script>
import { listCustGroupMembers } from '@/api/group/custGroup'
import { listCustGroupMembers, removeMembers } from '@/api/group/custGroup'
export default {
name: 'CustGroupDetail',
@@ -71,6 +76,7 @@ export default {
return {
loading: false,
groupId: null,
viewType: 'mine',
memberList: [],
total: 0,
queryParams: {
@@ -83,6 +89,7 @@ export default {
},
created() {
this.groupId = this.$route.query.groupId
this.viewType = this.$route.query.viewType || 'mine'
if (this.groupId) {
this.getList()
} else {
@@ -94,11 +101,17 @@ export default {
'$route.query.groupId'(newGroupId) {
if (newGroupId && newGroupId !== this.groupId) {
this.groupId = newGroupId
this.viewType = this.$route.query.viewType || 'mine'
this.queryParams.pageNum = 1
this.getList()
}
}
},
computed: {
isMineView() {
return this.viewType === 'mine'
}
},
methods: {
/** 查询客户列表 */
getList(param) {
@@ -128,9 +141,27 @@ export default {
this.handleQuery()
},
handleRemove(row) {
this.$modal.confirm(`确认移除客户“${row.custName || row.custId}”吗?移除后后续动态更新不会再加入客群。`).then(() => {
return removeMembers(this.groupId, [row.id])
}).then(() => {
this.$modal.msgSuccess('移除成功')
if (this.memberList.length === 1 && this.queryParams.pageNum > 1) {
this.queryParams.pageNum -= 1
}
this.getList()
}).catch(() => {})
},
/** 返回 */
goBack() {
this.$router.push({ path: '/group/custGroup' })
this.$router.push({
path: '/group/custGroup',
query: {
tab: this.viewType,
refresh: Date.now()
}
})
},
/** 序号计算方法 */

View File

@@ -1,9 +1,11 @@
<template>
<div class="customer-wrap">
<el-radio-group v-model="activeTab" class="group-tab-radio" @input="handleTabChange">
<el-radio-button label="mine">我创建的</el-radio-button>
<el-radio-button label="sharedToMe">下发给我的</el-radio-button>
</el-radio-group>
<div class="nav_box">
<el-radio-group v-model="activeTab" class="header-radio" @input="handleTabChange">
<el-radio-button label="mine">创建</el-radio-button>
<el-radio-button label="sharedToMe">下发给我的</el-radio-button>
</el-radio-group>
</div>
<div v-show="showSearch" class="search-area">
<el-form
@@ -214,8 +216,16 @@ export default {
}
},
created() {
this.activeTab = this.$route.query.tab || 'mine'
this.getList()
},
watch: {
'$route.query.refresh'() {
this.activeTab = this.$route.query.tab || 'mine'
this.queryParams.pageNum = 1
this.getList()
}
},
beforeDestroy() {
this.clearRefreshTimer()
},
@@ -304,7 +314,7 @@ export default {
handleView(row) {
this.$router.push({
path: '/group/custGroup/detail',
query: { groupId: row.id }
query: { groupId: row.id, viewType: this.activeTab }
})
},
@@ -347,61 +357,66 @@ export default {
overflow: hidden;
box-shadow: 0 3px 8px 0 #00000017;
border-radius: 16px 16px 0 0;
padding: 24px 30px;
padding: 0 30px 24px;
.group-tab-radio {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #ebebeb;
margin-bottom: 8px;
.nav_box {
overflow: hidden;
margin: 0 -30px 8px;
border-radius: 16px 16px 0 0;
.el-radio-button {
flex: 1;
.header-radio {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #ebebeb;
::v-deep .el-radio-button__inner {
width: 100%;
border: none;
font-weight: 400;
letter-spacing: 0.44px;
line-height: 25px;
font-size: 16px;
color: #666666;
padding: 11px 0 12px 0;
border-radius: 0;
box-shadow: none;
}
.el-radio-button {
flex: 1;
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #4886f8;
font-weight: 400;
color: #ffffff;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
&:nth-child(2) {
&::before,
&::after {
content: '';
position: absolute;
top: 50%;
transform: translateY(-50%);
height: 21px;
width: 1px;
background: #ebebeb;
z-index: 1;
::v-deep .el-radio-button__inner {
width: 100%;
border: none;
font-weight: 400;
letter-spacing: 0.44px;
line-height: 25px;
font-size: 16px;
color: #666666;
padding: 11px 0 12px 0;
border-radius: 0;
box-shadow: none;
}
&::after {
right: 1px;
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #4886f8;
font-weight: 400;
color: #ffffff;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
&.is-active {
&::before,
&::after {
content: none;
&:nth-child(2) {
&::before,
&::after {
content: '';
position: absolute;
top: 50%;
transform: translateY(-50%);
height: 21px;
width: 1px;
background: #ebebeb;
z-index: 1;
}
&::after {
right: 1px;
}
}
&.is-active {
&::before,
&::after {
content: none;
}
}
}
}

View File

@@ -371,21 +371,30 @@
width="150px"
v-if="columns[16].visible"
></el-table-column>
<el-table-column align="left" prop="interAddr" label="实地拜访地址" show-overflow-tooltip width="180px" v-if="columns[17].visible"></el-table-column>
<el-table-column align="left" prop="colStafName" label="协同走访客户经理" show-overflow-tooltip width="160px" v-if="columns[18].visible"></el-table-column>
<el-table-column align="left" prop="laterNote" label="事后备注" show-overflow-tooltip width="180px" v-if="columns[19].visible"></el-table-column>
<el-table-column align="left" prop="intentionProductValue" label="走访反馈" show-overflow-tooltip width="160px" v-if="columns[20].visible"></el-table-column>
<el-table-column align="left" prop="feedbackStatus" label="反馈状态" show-overflow-tooltip width="120px" v-if="columns[21].visible"></el-table-column>
<el-table-column align="left" prop="sourceOfInterview" label="走访来源" show-overflow-tooltip width="140px" v-if="columns[22].visible"></el-table-column>
<el-table-column align="left" prop="filename" label="批量导入文件名" show-overflow-tooltip width="180px" v-if="columns[23].visible"></el-table-column>
<el-table-column align="left" prop="outCallStatus" label="外呼状态" show-overflow-tooltip width="120px" v-if="columns[24].visible"></el-table-column>
<el-table-column align="left" prop="outCallIntention" label="客户意愿" show-overflow-tooltip width="140px" v-if="columns[25].visible"></el-table-column>
<el-table-column align="left" prop="source" label="走访渠道" show-overflow-tooltip width="120px" v-if="columns[26].visible"></el-table-column>
<el-table-column align="left" prop="analysisValue" label="nlp模型提取" show-overflow-tooltip width="140px" v-if="columns[27].visible"></el-table-column>
<el-table-column align="left" prop="facility" label="预授信额度" show-overflow-tooltip width="140px" v-if="columns[28].visible"></el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="100">
<el-table-column align="left" prop="interAddr" label="实地拜访地址" show-overflow-tooltip width="180px" v-if="isPersonalFeedbackTab && columns[17].visible"></el-table-column>
<el-table-column align="left" prop="colStafName" label="协同走访客户经理" show-overflow-tooltip width="160px" v-if="isPersonalFeedbackTab && columns[18].visible"></el-table-column>
<el-table-column align="left" prop="laterNote" label="事后备注" show-overflow-tooltip width="180px" v-if="isPersonalFeedbackTab && columns[19].visible"></el-table-column>
<el-table-column align="left" prop="intentionProductValue" label="走访反馈" show-overflow-tooltip width="160px" v-if="isPersonalFeedbackTab && columns[20].visible"></el-table-column>
<el-table-column align="left" prop="feedbackStatus" label="反馈状态" show-overflow-tooltip width="120px" v-if="isPersonalFeedbackTab && columns[21].visible"></el-table-column>
<el-table-column align="left" prop="sourceOfInterview" label="走访来源" show-overflow-tooltip width="140px" v-if="isPersonalFeedbackTab && columns[22].visible"></el-table-column>
<el-table-column align="left" prop="filename" label="批量导入文件名" show-overflow-tooltip width="180px" v-if="isPersonalFeedbackTab && columns[23].visible"></el-table-column>
<el-table-column align="left" prop="outCallStatus" label="外呼状态" show-overflow-tooltip width="120px" v-if="isPersonalFeedbackTab && columns[24].visible"></el-table-column>
<el-table-column align="left" prop="outCallIntention" label="客户意愿" show-overflow-tooltip width="140px" v-if="isPersonalFeedbackTab && columns[25].visible"></el-table-column>
<el-table-column align="left" prop="source" label="走访渠道" show-overflow-tooltip width="120px" v-if="isPersonalFeedbackTab && columns[26].visible">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="handleEditFeedback(scope.row)">编辑</el-button>
<span>{{ formatSourceLabel(scope.row.source) }}</span>
</template>
</el-table-column>
<el-table-column align="left" prop="analysisValue" label="nlp模型提取" show-overflow-tooltip width="140px" v-if="isPersonalFeedbackTab && columns[27].visible"></el-table-column>
<el-table-column align="left" prop="facility" label="预授信额度" show-overflow-tooltip width="140px" v-if="isPersonalFeedbackTab && columns[28].visible"></el-table-column>
<el-table-column v-if="isPersonalFeedbackTab" align="center" label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button
type="text"
size="mini"
:disabled="isFeedbackCompleted(scope.row)"
@click="handleEditFeedback(scope.row)"
>反馈</el-button>
</template>
</el-table-column>
</el-table>
@@ -410,7 +419,7 @@
<el-form ref="feedbackFormRef" :model="feedbackForm" label-width="100px" class="feedback-form">
<el-form-item label="走访渠道" required>
<el-radio-group v-model="feedbackForm.source">
<el-radio v-for="item in sourceOptions" :key="item" :label="item">{{ item }}</el-radio>
<el-radio v-for="item in sourceOptions" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="客户意愿" required>
@@ -429,7 +438,7 @@
</section>
</div>
</el-form-item>
<el-form-item label="预览结果">
<el-form-item label="走访反馈">
<div class="feedback-preview">{{ feedbackPreview || "-" }}</div>
</el-form-item>
</el-form>
@@ -445,7 +454,11 @@
import { mapGetters } from "vuex";
import { getPADVisitRecord, updatePADVisitFeedback } from "@/api/task/PADvisitRecord.js";
const SOURCE_OPTIONS = ["企业微信", "PAD"];
const SOURCE_OPTIONS = [
{ label: "PAD", value: "1" },
{ label: "企业微信", value: "2" },
{ label: "电话", value: "4" }
];
const FEEDBACK_TYPE_OPTIONS = ["拒绝", "考虑", "意愿", "其他", "愿意", "现场办理"];
const FEEDBACK_PRODUCT_OPTIONS = [
"丰收互联",
@@ -567,7 +580,11 @@ export default {
},
// 海宁
is875() {
return this.userName.slice(0, 3) === '875'
const deptId = this.deptId === null || this.deptId === undefined ? '' : String(this.deptId)
return deptId.slice(0, 3) === '965'
},
isPersonalFeedbackTab() {
return this.is875 && this.selectedTab === '0'
},
feedbackPreview() {
return this.buildFeedbackValue(this.feedbackForm.feedbackSelections)
@@ -632,10 +649,23 @@ export default {
.map(item => `${item.feedbackType}:${item.products.join(",")}`)
.join(";");
},
isFeedbackCompleted(row) {
const source = row && row.source !== null && row.source !== undefined ? String(row.source).trim() : "";
const intentionProductValue = row && row.intentionProductValue ? String(row.intentionProductValue).trim() : "";
return !!source && !!intentionProductValue;
},
formatSourceLabel(source) {
const sourceValue = source === null || source === undefined ? "" : String(source);
const matched = this.sourceOptions.find(item => item.value === sourceValue);
return matched ? matched.label : (sourceValue || "-");
},
handleEditFeedback(row) {
if (this.isFeedbackCompleted(row)) {
return;
}
this.feedbackForm = {
id: row.id,
source: row.source || "",
source: row.source === null || row.source === undefined ? "" : String(row.source),
feedbackSelections: this.parseFeedbackValue(row.intentionProductValue)
};
this.feedbackDialogVisible = true;