|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
- <!-- 查询表单 -->
|
|
|
|
|
|
|
+ <!-- 查询表单(保持不变) -->
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
<el-form-item label="用户姓名" prop="userName">
|
|
<el-form-item label="用户姓名" prop="userName">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -20,6 +20,17 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="客户类型" prop="qwTag">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="queryParams.qwTag"
|
|
|
|
|
+ placeholder="请选择客户类型"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option label="企微" :value="0" />
|
|
|
|
|
+ <el-option label="个微" :value="1" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<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>
|
|
@@ -40,6 +51,13 @@
|
|
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
|
|
<el-table-column label="医生姓名" align="center" prop="doctorName" />
|
|
<el-table-column label="医生姓名" align="center" prop="doctorName" />
|
|
|
<el-table-column label="销售人员" align="center" prop="companyUserName" />
|
|
<el-table-column label="销售人员" align="center" prop="companyUserName" />
|
|
|
|
|
+ <el-table-column label="客户类型" align="center" prop="qwTag">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag :type="scope.row.qwTag === 1 ? 'success' : ''">
|
|
|
|
|
+ {{ scope.row.qwTag === 1 ? '个微' : '企微' }}
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="创建时间" align="center" width="180">
|
|
<el-table-column label="创建时间" align="center" width="180">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
@@ -50,10 +68,28 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
|
|
|
|
+ icon="el-icon-view"
|
|
|
@click="handleComplete(scope.row)"
|
|
@click="handleComplete(scope.row)"
|
|
|
>
|
|
>
|
|
|
- 查看采集信息
|
|
|
|
|
|
|
+ 查看
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.row.qwTag === 1 && scope.row.personalCollectStatus === 4"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ @click="handleBindPackage(scope.row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 绑定套餐
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.row.qwTag === 1 && scope.row.personalCollectStatus === 5"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-share"
|
|
|
|
|
+ @click="handleShare(scope.row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 分享
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -70,57 +106,82 @@
|
|
|
|
|
|
|
|
<!-- 完善采集信息弹窗 -->
|
|
<!-- 完善采集信息弹窗 -->
|
|
|
<fully-collection-info-dialog
|
|
<fully-collection-info-dialog
|
|
|
- v-if="selectedUserId != null && selectedQuestionId != null && selectedId !=null"
|
|
|
|
|
|
|
+ v-if="selectedUserId != null && selectedQuestionId != null && selectedId != null"
|
|
|
:visible.sync="completeDialogVisible"
|
|
:visible.sync="completeDialogVisible"
|
|
|
:id="selectedId"
|
|
:id="selectedId"
|
|
|
:user-id="selectedUserId"
|
|
:user-id="selectedUserId"
|
|
|
:question-id="selectedQuestionId"
|
|
:question-id="selectedQuestionId"
|
|
|
@success="getList"
|
|
@success="getList"
|
|
|
/>
|
|
/>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 绑定套餐弹窗 -->
|
|
|
|
|
+ <bind-package-dialog
|
|
|
|
|
+ :visible.sync="bindPackageDialogVisible"
|
|
|
|
|
+ :collection-id="currentCollectionId"
|
|
|
|
|
+ @success="handleBindPackageSuccess"
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 二维码弹窗 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="信息采集分享"
|
|
|
|
|
+ :visible.sync="qrCodeVisible"
|
|
|
|
|
+ width="450px"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ >
|
|
|
|
|
+ <div style="padding-bottom:15px;">
|
|
|
|
|
+ <img :src="codeImage" style="width: 100%;" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="downloadImage(codeImage, qrCodeName + '.png')">下载二维码</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { fullyCollectionInfoList } from "@/api/qw/collectionPendingSales";
|
|
import { fullyCollectionInfoList } from "@/api/qw/collectionPendingSales";
|
|
|
|
|
+import { getWxaCodeCollectionUnLimit } from "@/api/hisStore/collection"; // 二维码API
|
|
|
import FullyCollectionInfoDialog from "./fullyCollectionInfoDialog.vue";
|
|
import FullyCollectionInfoDialog from "./fullyCollectionInfoDialog.vue";
|
|
|
|
|
+import BindPackageDialog from "./BindPackageDialog.vue";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "FullySalesInfo",
|
|
name: "FullySalesInfo",
|
|
|
components: {
|
|
components: {
|
|
|
- FullyCollectionInfoDialog
|
|
|
|
|
|
|
+ FullyCollectionInfoDialog,
|
|
|
|
|
+ BindPackageDialog,
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- // 遮罩层
|
|
|
|
|
loading: true,
|
|
loading: true,
|
|
|
- // 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
showSearch: true,
|
|
|
- // 总条数
|
|
|
|
|
total: 0,
|
|
total: 0,
|
|
|
- // 表格数据
|
|
|
|
|
collectionList: [],
|
|
collectionList: [],
|
|
|
- // 查询参数
|
|
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
userName: null,
|
|
userName: null,
|
|
|
doctorName: null,
|
|
doctorName: null,
|
|
|
|
|
+ qwTag: undefined,
|
|
|
},
|
|
},
|
|
|
- // 完善信息弹窗可见性
|
|
|
|
|
completeDialogVisible: false,
|
|
completeDialogVisible: false,
|
|
|
- //数据行主键
|
|
|
|
|
selectedId: null,
|
|
selectedId: null,
|
|
|
- // 选中的用户ID
|
|
|
|
|
selectedUserId: null,
|
|
selectedUserId: null,
|
|
|
- // 选中的questionId
|
|
|
|
|
- selectedQuestionId: null
|
|
|
|
|
|
|
+ selectedQuestionId: null,
|
|
|
|
|
+
|
|
|
|
|
+ // 绑定套餐相关
|
|
|
|
|
+ bindPackageDialogVisible: false,
|
|
|
|
|
+ currentCollectionId: null,
|
|
|
|
|
+
|
|
|
|
|
+ // 二维码相关
|
|
|
|
|
+ qrCodeVisible: false,
|
|
|
|
|
+ codeImage: null,
|
|
|
|
|
+ qrCodeName: null,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- /** 查询待销售完善信息采集列表 */
|
|
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
fullyCollectionInfoList(this.queryParams).then(response => {
|
|
fullyCollectionInfoList(this.queryParams).then(response => {
|
|
@@ -129,30 +190,79 @@ export default {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- /** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
- /** 重置按钮操作 */
|
|
|
|
|
resetQuery() {
|
|
resetQuery() {
|
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
|
|
|
+ this.queryParams.qwTag = undefined;
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
|
},
|
|
},
|
|
|
- /** 性别格式化 */
|
|
|
|
|
sexFormat(sex) {
|
|
sexFormat(sex) {
|
|
|
return sex === 1 ? "男" : sex === 0 ? "女" : "";
|
|
return sex === 1 ? "男" : sex === 0 ? "女" : "";
|
|
|
},
|
|
},
|
|
|
- /** 完善采集信息按钮操作 */
|
|
|
|
|
handleComplete(row) {
|
|
handleComplete(row) {
|
|
|
this.selectedId = row.id;
|
|
this.selectedId = row.id;
|
|
|
this.selectedUserId = row.userId;
|
|
this.selectedUserId = row.userId;
|
|
|
this.selectedQuestionId = row.questionId;
|
|
this.selectedQuestionId = row.questionId;
|
|
|
this.completeDialogVisible = true;
|
|
this.completeDialogVisible = true;
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 打开绑定套餐弹窗
|
|
|
|
|
+ handleBindPackage(row) {
|
|
|
|
|
+ this.currentCollectionId = row.id;
|
|
|
|
|
+ this.bindPackageDialogVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 绑定套餐成功回调
|
|
|
|
|
+ handleBindPackageSuccess() {
|
|
|
|
|
+ this.getList(); // 刷新列表
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 分享(生成二维码)
|
|
|
|
|
+ handleShare(row) {
|
|
|
|
|
+ // 需要小程序 appId,假设采集记录中存储了 appId 字段,若无则需从其他地方获取
|
|
|
|
|
+ const appId = row.appId;
|
|
|
|
|
+ if (!appId) {
|
|
|
|
|
+ this.$message.warning("该记录缺少小程序信息,无法生成分享码");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
|
+ lock: true,
|
|
|
|
|
+ text: "正在生成二维码...",
|
|
|
|
|
+ spinner: "el-icon-loading",
|
|
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ getWxaCodeCollectionUnLimit(row.id, appId)
|
|
|
|
|
+ .then((response) => {
|
|
|
|
|
+ this.codeImage = response.url;
|
|
|
|
|
+ this.qrCodeVisible = true;
|
|
|
|
|
+ this.qrCodeName = row.id;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error) => {
|
|
|
|
|
+ this.$message.error(error.msg || "生成二维码失败");
|
|
|
|
|
+ })
|
|
|
|
|
+ .finally(() => {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 下载二维码
|
|
|
|
|
+ downloadImage(imageSrc, fileName) {
|
|
|
|
|
+ const link = document.createElement("a");
|
|
|
|
|
+ link.href = imageSrc;
|
|
|
|
|
+ link.download = fileName || "二维码.png";
|
|
|
|
|
+ document.body.appendChild(link);
|
|
|
|
|
+ link.click();
|
|
|
|
|
+ document.body.removeChild(link);
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
|
+/* 可根据需要添加样式 */
|
|
|
</style>
|
|
</style>
|