|
@@ -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,16 +20,23 @@
|
|
|
@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="请选择客户类型"
|
|
|
|
|
|
|
+ <el-form-item label="套餐包" prop="packageName">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="queryParams.packageName"
|
|
|
|
|
+ placeholder="请输入套餐包名称"
|
|
|
clearable
|
|
clearable
|
|
|
size="small"
|
|
size="small"
|
|
|
- >
|
|
|
|
|
- <el-option label="企微" :value="0" />
|
|
|
|
|
- <el-option label="个微" :value="1" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="订单号" prop="packageOrderCode">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="queryParams.packageOrderCode"
|
|
|
|
|
+ placeholder="请输入订单号"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</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>
|
|
@@ -40,6 +47,8 @@
|
|
|
<!-- 数据表格 -->
|
|
<!-- 数据表格 -->
|
|
|
<el-table border v-loading="loading" :data="collectionList">
|
|
<el-table border v-loading="loading" :data="collectionList">
|
|
|
<el-table-column label="用户姓名" align="center" prop="userName" />
|
|
<el-table-column label="用户姓名" align="center" prop="userName" />
|
|
|
|
|
+ <el-table-column label="套餐包" align="center" prop="packageName" />
|
|
|
|
|
+ <el-table-column label="订单号" align="center" prop="packageOrderCode" />
|
|
|
<el-table-column label="用户性别" align="center" prop="sex">
|
|
<el-table-column label="用户性别" align="center" prop="sex">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span>{{ sexFormat(scope.row.sex) }}</span>
|
|
<span>{{ sexFormat(scope.row.sex) }}</span>
|
|
@@ -91,7 +100,16 @@
|
|
|
绑定套餐
|
|
绑定套餐
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
- v-if="scope.row.qwTag === 1 && scope.row.personalCollectStatus === 5"
|
|
|
|
|
|
|
+ v-if="scope.row.qwTag === 1 && scope.row.packageId != null"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-edit-outline"
|
|
|
|
|
+ @click="handleEditPackage(scope.row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 编辑套餐
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.row.qwTag === 1"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
icon="el-icon-share"
|
|
icon="el-icon-share"
|
|
@@ -122,13 +140,39 @@
|
|
|
@success="getList"
|
|
@success="getList"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <!-- 绑定套餐弹窗 -->
|
|
|
|
|
|
|
+ <!-- 绑定/编辑套餐弹窗 -->
|
|
|
<bind-package-dialog
|
|
<bind-package-dialog
|
|
|
:visible.sync="bindPackageDialogVisible"
|
|
:visible.sync="bindPackageDialogVisible"
|
|
|
:collection-id="currentCollectionId"
|
|
:collection-id="currentCollectionId"
|
|
|
|
|
+ :edit-data="editPackageData"
|
|
|
@success="handleBindPackageSuccess"
|
|
@success="handleBindPackageSuccess"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
|
|
+ <!-- 选择小程序弹窗 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="选择小程序"
|
|
|
|
|
+ :visible.sync="selectAppDialogVisible"
|
|
|
|
|
+ width="400px"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form label-width="80px">
|
|
|
|
|
+ <el-form-item label="小程序">
|
|
|
|
|
+ <el-select v-model="selectedAppId" placeholder="请选择分享的小程序" clearable>
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in sourceList"
|
|
|
|
|
+ :key="item.dictValue1"
|
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
|
+ :value="item.dictValue1"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="selectAppDialogVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="confirmShare">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<!-- 二维码弹窗 -->
|
|
<!-- 二维码弹窗 -->
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
title="信息采集分享"
|
|
title="信息采集分享"
|
|
@@ -145,20 +189,21 @@
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<el-drawer
|
|
<el-drawer
|
|
|
- :with-header="false"
|
|
|
|
|
- size="75%"
|
|
|
|
|
- :title="show.title" :visible.sync="show.open">
|
|
|
|
|
|
|
+ :with-header="false"
|
|
|
|
|
+ size="75%"
|
|
|
|
|
+ :title="show.title" :visible.sync="show.open">
|
|
|
<userDetails ref="userDetails" />
|
|
<userDetails ref="userDetails" />
|
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { fullyCollectionInfoList } from "@/api/qw/collectionPendingSales";
|
|
|
|
|
-import { getWxaCodeCollectionUnLimit } from "@/api/hisStore/collection"; // 二维码API
|
|
|
|
|
|
|
+import {fullyCollectionInfoList, getCollectionPackageInfo} from "@/api/qw/collectionPendingSales";
|
|
|
|
|
+import {getWxaCodeCollectionUnLimitNew} from "@/api/hisStore/collection";
|
|
|
import FullyCollectionInfoDialog from "./fullyCollectionInfoDialog.vue";
|
|
import FullyCollectionInfoDialog from "./fullyCollectionInfoDialog.vue";
|
|
|
import BindPackageDialog from "./BindPackageDialog.vue";
|
|
import BindPackageDialog from "./BindPackageDialog.vue";
|
|
|
import userDetails from '@/views/store/components/userDetails1.vue';
|
|
import userDetails from '@/views/store/components/userDetails1.vue';
|
|
|
|
|
+import {options} from "@/api/course/coursePlaySourceConfig"; // 获取小程序列表
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "FullySalesInfo",
|
|
name: "FullySalesInfo",
|
|
@@ -169,9 +214,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- show:{
|
|
|
|
|
- title:"客户详情",
|
|
|
|
|
- open:false,
|
|
|
|
|
|
|
+ show: {
|
|
|
|
|
+ title: "客户详情",
|
|
|
|
|
+ open: false,
|
|
|
},
|
|
},
|
|
|
loading: true,
|
|
loading: true,
|
|
|
showSearch: true,
|
|
showSearch: true,
|
|
@@ -182,6 +227,8 @@ export default {
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
userName: null,
|
|
userName: null,
|
|
|
doctorName: null,
|
|
doctorName: null,
|
|
|
|
|
+ packageName: null,
|
|
|
|
|
+ packageOrderCode: null,
|
|
|
qwTag: undefined,
|
|
qwTag: undefined,
|
|
|
},
|
|
},
|
|
|
completeDialogVisible: false,
|
|
completeDialogVisible: false,
|
|
@@ -192,6 +239,13 @@ export default {
|
|
|
// 绑定套餐相关
|
|
// 绑定套餐相关
|
|
|
bindPackageDialogVisible: false,
|
|
bindPackageDialogVisible: false,
|
|
|
currentCollectionId: null,
|
|
currentCollectionId: null,
|
|
|
|
|
+ editPackageData: null,
|
|
|
|
|
+
|
|
|
|
|
+ // 分享相关
|
|
|
|
|
+ sourceList: [], // 小程序列表
|
|
|
|
|
+ selectAppDialogVisible: false,
|
|
|
|
|
+ selectedAppId: null,
|
|
|
|
|
+ currentShareRow: null, // 当前要分享的记录
|
|
|
|
|
|
|
|
// 二维码相关
|
|
// 二维码相关
|
|
|
qrCodeVisible: false,
|
|
qrCodeVisible: false,
|
|
@@ -201,13 +255,19 @@ export default {
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
|
|
+ this.fetchSourceList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- handleMemberdetails(row){
|
|
|
|
|
- this.show.open=true;
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$refs.userDetails.getDetails(row.userId);
|
|
|
|
|
- }, 1);
|
|
|
|
|
|
|
+ fetchSourceList() {
|
|
|
|
|
+ options().then((res) => {
|
|
|
|
|
+ this.sourceList = res.data || [];
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ handleMemberdetails(row) {
|
|
|
|
|
+ this.show.open = true;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$refs.userDetails.getDetails(row.userId);
|
|
|
|
|
+ }, 1);
|
|
|
},
|
|
},
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
@@ -236,26 +296,50 @@ export default {
|
|
|
this.completeDialogVisible = true;
|
|
this.completeDialogVisible = true;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 打开绑定套餐弹窗
|
|
|
|
|
handleBindPackage(row) {
|
|
handleBindPackage(row) {
|
|
|
this.currentCollectionId = row.id;
|
|
this.currentCollectionId = row.id;
|
|
|
|
|
+ this.editPackageData = null;
|
|
|
this.bindPackageDialogVisible = true;
|
|
this.bindPackageDialogVisible = true;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 绑定套餐成功回调
|
|
|
|
|
|
|
+ handleEditPackage(row) {
|
|
|
|
|
+ this.currentCollectionId = row.id;
|
|
|
|
|
+ getCollectionPackageInfo(row.id).then(res => {
|
|
|
|
|
+ const data = res.data;
|
|
|
|
|
+ this.editPackageData = {
|
|
|
|
|
+ packageId: data.packageId,
|
|
|
|
|
+ payType: data.payType,
|
|
|
|
|
+ amount: data.amount
|
|
|
|
|
+ };
|
|
|
|
|
+ this.bindPackageDialogVisible = true;
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.$message.error("获取套餐信息失败");
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
handleBindPackageSuccess() {
|
|
handleBindPackageSuccess() {
|
|
|
- this.getList(); // 刷新列表
|
|
|
|
|
|
|
+ this.getList();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 分享(生成二维码)
|
|
|
|
|
|
|
+ // 分享:打开选择小程序弹窗
|
|
|
handleShare(row) {
|
|
handleShare(row) {
|
|
|
- // 需要小程序 appId,假设采集记录中存储了 appId 字段,若无则需从其他地方获取
|
|
|
|
|
- const appId = row.appId;
|
|
|
|
|
- if (!appId) {
|
|
|
|
|
- this.$message.warning("该记录缺少小程序信息,无法生成分享码");
|
|
|
|
|
|
|
+ this.currentShareRow = row;
|
|
|
|
|
+ this.selectedAppId = null;
|
|
|
|
|
+ this.selectAppDialogVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 确认分享,生成二维码
|
|
|
|
|
+ confirmShare() {
|
|
|
|
|
+ if (!this.selectedAppId) {
|
|
|
|
|
+ this.$message.warning("请选择小程序");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const row = this.currentShareRow;
|
|
|
|
|
+ if (!row) return;
|
|
|
|
|
+
|
|
|
|
|
+ this.selectAppDialogVisible = false;
|
|
|
|
|
+
|
|
|
const loading = this.$loading({
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
lock: true,
|
|
|
text: "正在生成二维码...",
|
|
text: "正在生成二维码...",
|
|
@@ -263,7 +347,7 @@ export default {
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- getWxaCodeCollectionUnLimit(row.id, appId)
|
|
|
|
|
|
|
+ getWxaCodeCollectionUnLimitNew(row.id, this.selectedAppId)
|
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
this.codeImage = response.url;
|
|
this.codeImage = response.url;
|
|
|
this.qrCodeVisible = true;
|
|
this.qrCodeVisible = true;
|
|
@@ -277,7 +361,6 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 下载二维码
|
|
|
|
|
downloadImage(imageSrc, fileName) {
|
|
downloadImage(imageSrc, fileName) {
|
|
|
const link = document.createElement("a");
|
|
const link = document.createElement("a");
|
|
|
link.href = imageSrc;
|
|
link.href = imageSrc;
|
|
@@ -289,7 +372,3 @@ export default {
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
-
|
|
|
|
|
-<style scoped>
|
|
|
|
|
-/* 可根据需要添加样式 */
|
|
|
|
|
-</style>
|
|
|