|
|
@@ -60,10 +60,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="客服姓名" align="center" prop="companyUserName" />
|
|
|
<el-table-column label="负责医生" align="center" prop="doctorName" />
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-view" @click="handlePrescribe(scope.row)">查看处方</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-document" @click="handleCollection(scope.row)">查看信息采集</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -76,7 +78,7 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
|
|
|
- <!-- 新增/编辑弹窗(优化布局) -->
|
|
|
+ <!-- 新增/编辑弹窗(保持不变) -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body :close-on-click-modal="false">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px" size="small">
|
|
|
<!-- 第一行:客户姓名、性别、年龄、电话 -->
|
|
|
@@ -124,7 +126,6 @@
|
|
|
<div style="display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px;">
|
|
|
<el-form-item label="客服姓名" prop="companyUserName" style="flex: 1; min-width: 130px; margin-bottom: 0;">
|
|
|
<el-input v-model="form.companyUserName" placeholder="客服姓名" :disabled="!form.id" />
|
|
|
- <!-- 隐藏的客服ID -->
|
|
|
<input type="hidden" v-model="form.companyUserId" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="约诊时间" prop="appointmentTime" style="flex: 1.2; min-width: 180px; margin-bottom: 0;">
|
|
|
@@ -138,7 +139,6 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="负责医生" prop="doctorName" style="flex: 1; min-width: 130px; margin-bottom: 0;">
|
|
|
<el-input v-model="form.doctorName" placeholder="负责医生" :disabled="!form.id" />
|
|
|
- <!-- 隐藏的医生ID -->
|
|
|
<input type="hidden" v-model="form.doctorId" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
@@ -165,18 +165,67 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 处方列表弹窗 -->
|
|
|
+ <el-dialog title="处方信息" :visible.sync="prescribeOpen" width="1100px" append-to-body :close-on-click-modal="false">
|
|
|
+ <el-table v-loading="prescribeLoading" :data="prescribeList">
|
|
|
+ <el-table-column label="处方ID" align="center" prop="prescribeId" />
|
|
|
+ <el-table-column label="处方单号" align="center" prop="prescribeCode" />
|
|
|
+ <el-table-column label="处方类型" align="center" prop="prescribeType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="prescribeTypeOptions" :value="scope.row.prescribeType" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="患者姓名" align="center" prop="patientName" />
|
|
|
+ <el-table-column label="医生姓名" align="center" prop="doctorName" />
|
|
|
+ <el-table-column label="是否确认" align="center" prop="doctorConfirm">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="doctorConfirmOptions" :value="scope.row.doctorConfirm" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="审核时间" align="center" prop="auditTime" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.auditTime, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="处方图片" align="center" prop="prescribeImgUrl">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-image
|
|
|
+ v-if="scope.row.doctorConfirm == 1 && scope.row.prescribeImgUrl"
|
|
|
+ style="width: 60px; height: 60px"
|
|
|
+ :src="scope.row.prescribeImgUrl"
|
|
|
+ :preview-src-list="[scope.row.prescribeImgUrl]"
|
|
|
+ />
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="prescribeTotal > 0"
|
|
|
+ :total="prescribeTotal"
|
|
|
+ :page.sync="prescribeQueryParams.pageNum"
|
|
|
+ :limit.sync="prescribeQueryParams.pageSize"
|
|
|
+ @pagination="getPrescribeList"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 信息采集弹窗 -->
|
|
|
+ <collection-info-dialog :visible.sync="collectionVisible" :phone="currentPhone" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
listCustomer, getCustomer, addCustomer, updateCustomer, delCustomer, exportCustomer,
|
|
|
- getCompanyUserAndDoctor
|
|
|
+ getCompanyUserAndDoctor, getPrescribeListByPhone
|
|
|
} from '@/api/qw/companyCustomer'
|
|
|
import { parseTime } from '@/utils/common'
|
|
|
|
|
|
+import CollectionInfoDialog from './CollectionInfoDialog.vue' // 引入信息采集表组件
|
|
|
+
|
|
|
export default {
|
|
|
name: "Customer",
|
|
|
+ components: { CollectionInfoDialog }, // 注册信息采集表组件
|
|
|
data() {
|
|
|
const validatePhone = (rule, value, callback) => {
|
|
|
if (!value) {
|
|
|
@@ -245,7 +294,28 @@ export default {
|
|
|
{ label: '女', value: '0' },
|
|
|
{ label: '男', value: '1' },
|
|
|
{ label: '未知', value: '2' }
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ // 处方相关
|
|
|
+ prescribeOpen: false,
|
|
|
+ prescribeLoading: false,
|
|
|
+ prescribeList: [],
|
|
|
+ prescribeTotal: 0,
|
|
|
+ currentPhone: '',
|
|
|
+ prescribeQueryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
+ doctorConfirmOptions: [
|
|
|
+ { dictValue: '0', dictLabel: "未确认" },
|
|
|
+ { dictValue: '1', dictLabel: "已确认" }
|
|
|
+ ],
|
|
|
+ prescribeTypeOptions: [
|
|
|
+ { dictValue: '1', dictLabel: "西药" },
|
|
|
+ { dictValue: '2', dictLabel: "中药" },
|
|
|
+ { dictValue: '3', dictLabel: "OTC" }
|
|
|
+ ],
|
|
|
+ //控制信息采集弹窗的变量
|
|
|
+ collectionVisible: false,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -253,7 +323,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
parseTime,
|
|
|
- // 原生方法生成当前时间字符串 yyyy-MM-dd HH:mm:ss
|
|
|
getCurrentDateTime() {
|
|
|
const now = new Date();
|
|
|
const year = now.getFullYear();
|
|
|
@@ -318,7 +387,6 @@ export default {
|
|
|
},
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
- // 设置默认建档时间为当前系统时间(字符串格式)
|
|
|
this.form.filingTime = this.getCurrentDateTime();
|
|
|
getCompanyUserAndDoctor().then(response => {
|
|
|
const data = response.data;
|
|
|
@@ -378,14 +446,16 @@ export default {
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
|
this.$message.success("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
},
|
|
|
handleExport() {
|
|
|
this.$modal.confirm('是否确认导出所有客户信息?').then(() => {
|
|
|
return exportCustomer(this.addDateRange(this.queryParams, this.dateRange));
|
|
|
}).then(response => {
|
|
|
this.download(response.msg, "客户信息数据.xlsx");
|
|
|
- }).catch(() => {});
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
},
|
|
|
download(content, fileName) {
|
|
|
const blob = new Blob([content]);
|
|
|
@@ -402,8 +472,45 @@ export default {
|
|
|
params.endTime = dateRange[1];
|
|
|
}
|
|
|
return params;
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ /** 打开处方弹窗 */
|
|
|
+ handlePrescribe(row) {
|
|
|
+ if (!row.phone) {
|
|
|
+ this.$message.warning('该客户未登记手机号,无法查询处方');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.currentPhone = row.phone;
|
|
|
+ this.prescribeQueryParams.pageNum = 1;
|
|
|
+ this.prescribeOpen = true;
|
|
|
+ this.getPrescribeList();
|
|
|
+ },
|
|
|
+ /** 查询处方列表 */
|
|
|
+ getPrescribeList() {
|
|
|
+ this.prescribeLoading = true;
|
|
|
+ const params = {
|
|
|
+ phone: this.currentPhone,
|
|
|
+ pageNum: this.prescribeQueryParams.pageNum,
|
|
|
+ pageSize: this.prescribeQueryParams.pageSize
|
|
|
+ };
|
|
|
+ getPrescribeListByPhone(params).then(response => {
|
|
|
+ // 后端返回 TableDataInfo,直接取 rows 和 total
|
|
|
+ this.prescribeList = response.rows || [];
|
|
|
+ this.prescribeTotal = response.total || 0;
|
|
|
+ this.prescribeLoading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ this.prescribeLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 打开信息采集弹窗 */
|
|
|
+ handleCollection(row) {
|
|
|
+ if (!row.phone) {
|
|
|
+ this.$message.warning('该客户未登记手机号,无法查看信息采集表')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.currentPhone = row.phone
|
|
|
+ this.collectionVisible = true
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|