|
@@ -1,7 +1,16 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="医生姓名" prop="doctorName">
|
|
|
|
|
|
|
+ <el-form-item label="订单号" prop="orderCode">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="queryParams.orderCode"
|
|
|
|
|
+ placeholder="请输入订单号"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="医生" prop="doctorName">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="queryParams.doctorName"
|
|
v-model="queryParams.doctorName"
|
|
|
placeholder="请输入医生姓名"
|
|
placeholder="请输入医生姓名"
|
|
@@ -10,7 +19,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="客户姓名" prop="name">
|
|
|
|
|
|
|
+ <el-form-item label="客户" prop="name">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="queryParams.name"
|
|
v-model="queryParams.name"
|
|
|
placeholder="请输入客户姓名"
|
|
placeholder="请输入客户姓名"
|
|
@@ -44,8 +53,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
<el-table border v-loading="loading" :data="companyUserTaskList" @selection-change="handleSelectionChange">
|
|
<el-table border v-loading="loading" :data="companyUserTaskList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
- <el-table-column label="医生姓名" align="center" prop="doctorName"/>
|
|
|
|
|
- <el-table-column label="客户姓名" align="center" prop="name"/>
|
|
|
|
|
|
|
+ <el-table-column label="订单号" align="center" prop="orderCode"/>
|
|
|
|
|
+ <el-table-column label="医生" align="center" prop="doctorName"/>
|
|
|
|
|
+ <el-table-column label="客户" align="center" prop="name"/>
|
|
|
<el-table-column label="客户头像" align="center" prop="avatar" width="100px">
|
|
<el-table-column label="客户头像" align="center" prop="avatar" width="100px">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-popover
|
|
<el-popover
|
|
@@ -75,10 +85,11 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
|
|
- v-hasPermi="['companyUserTask:companyUserTask:remove']"
|
|
|
|
|
- >删除
|
|
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
|
|
+ v-if="scope.row.status===0"
|
|
|
|
|
+ v-hasPermi="['qw:companyUserTask:edit']"
|
|
|
|
|
+ >处理
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -97,18 +108,18 @@
|
|
|
<el-form :model="form" label-width="100px" size="small">
|
|
<el-form :model="form" label-width="100px" size="small">
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="医生姓名">
|
|
|
|
|
|
|
+ <el-form-item label="医生:">
|
|
|
<span class="detail-value">{{ form.doctorName || '—' }}</span>
|
|
<span class="detail-value">{{ form.doctorName || '—' }}</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="客户姓名">
|
|
|
|
|
|
|
+ <el-form-item label="客户:">
|
|
|
<span class="detail-value">{{ form.name || '—' }}</span>
|
|
<span class="detail-value">{{ form.name || '—' }}</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="客户电话">
|
|
|
|
|
|
|
+ <el-form-item label="客户电话:">
|
|
|
<div style="display: flex; align-items: center; gap: 8px;">
|
|
<div style="display: flex; align-items: center; gap: 8px;">
|
|
|
<span class="detail-value">
|
|
<span class="detail-value">
|
|
|
{{ decryptedPhone || (form.phone ? '******' : '—') }}
|
|
{{ decryptedPhone || (form.phone ? '******' : '—') }}
|
|
@@ -128,13 +139,13 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="处理状态">
|
|
|
|
|
|
|
+ <el-form-item label="处理状态:">
|
|
|
<dict-tag :options="statusOptions" :value="form.status"/>
|
|
<dict-tag :options="statusOptions" :value="form.status"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="备注">
|
|
|
|
|
|
|
+ <el-form-item label="备注:">
|
|
|
<span class="detail-value">{{ form.remark || '—' }}</span>
|
|
<span class="detail-value">{{ form.remark || '—' }}</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -191,7 +202,7 @@ export default {
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
- externalId: null,
|
|
|
|
|
|
|
+ orderCode: null,
|
|
|
doctorId: null,
|
|
doctorId: null,
|
|
|
doctorName: null,
|
|
doctorName: null,
|
|
|
userId: null,
|
|
userId: null,
|
|
@@ -230,7 +241,7 @@ export default {
|
|
|
reset() {
|
|
reset() {
|
|
|
this.form = {
|
|
this.form = {
|
|
|
id: null,
|
|
id: null,
|
|
|
- externalId: null,
|
|
|
|
|
|
|
+ orderCode: null,
|
|
|
doctorId: null,
|
|
doctorId: null,
|
|
|
userId: null,
|
|
userId: null,
|
|
|
status: null,
|
|
status: null,
|
|
@@ -262,7 +273,7 @@ export default {
|
|
|
this.form = response.data || {}; // 安全兜底
|
|
this.form = response.data || {}; // 安全兜底
|
|
|
this.decryptedPhone = ''; // 清空上次解密的电话
|
|
this.decryptedPhone = ''; // 清空上次解密的电话
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
- this.title = "销售处理SOP任务详情";
|
|
|
|
|
|
|
+ this.title = "任务详情";
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
@@ -275,29 +286,42 @@ export default {
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.getList();
|
|
this.getList();
|
|
|
});
|
|
});
|
|
|
- } else {
|
|
|
|
|
- addCompanyUserTask(this.form).then(response => {
|
|
|
|
|
- this.msgSuccess("新增成功");
|
|
|
|
|
- this.open = false;
|
|
|
|
|
- this.getList();
|
|
|
|
|
- });
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- /** 删除按钮操作 */
|
|
|
|
|
- handleDelete(row) {
|
|
|
|
|
- const ids = row.id || this.ids;
|
|
|
|
|
- this.$confirm('是否确认删除销售处理sop任务编号为"' + ids + '"的数据项?', "警告", {
|
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning"
|
|
|
|
|
- }).then(function () {
|
|
|
|
|
- return delCompanyUserTask(ids);
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- this.getList();
|
|
|
|
|
- this.msgSuccess("删除成功");
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
|
|
+ /** 处理按钮操作 */
|
|
|
|
|
+ /** 处理按钮操作 */
|
|
|
|
|
+ handleUpdate(row) {
|
|
|
|
|
+ const id = row.id;
|
|
|
|
|
+ if (!id) {
|
|
|
|
|
+ this.$message.warning("无效的任务ID");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 1. 先获取任务详情
|
|
|
|
|
+ getCompanyUserTask(id).then(response => {
|
|
|
|
|
+ const taskData = response.data;
|
|
|
|
|
+ this.form = taskData; // 保存表单数据(虽然更新时可能不需要全部字段)
|
|
|
|
|
+
|
|
|
|
|
+ // 2. 弹出确认框
|
|
|
|
|
+ const customerName = taskData.name || '未知客户';
|
|
|
|
|
+ this.$confirm(`确认将客户 “${customerName}” 的任务标记为已处理?`, "确认处理", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ }).then(() => { //箭头函数,this 正确
|
|
|
|
|
+ // 3. 提交更新(只需传 id 和 status)
|
|
|
|
|
+ const submitData = { id: taskData.id,status: 1};
|
|
|
|
|
+ return updateCompanyUserTask(submitData);
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.msgSuccess("处理成功");
|
|
|
|
|
+ this.getList(); // 刷新列表
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ });
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error("获取任务失败", error);
|
|
|
|
|
+ this.$message.error("获取任务信息失败");
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/** 切换状态Tab */
|
|
/** 切换状态Tab */
|