|
|
@@ -74,7 +74,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="我的客户" prop="myCustomerFlag">
|
|
|
- <el-checkbox v-model="queryParams.myCustomerFlag">仅查看我的客户</el-checkbox>
|
|
|
+ <el-checkbox v-model="queryParams.myCustomerFlag"
|
|
|
+ >仅查看我的客户</el-checkbox
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
<el-form-item label="信息状态" prop="completeStatus">
|
|
|
<el-select
|
|
|
@@ -239,7 +241,8 @@
|
|
|
size="mini"
|
|
|
@click="handleImport"
|
|
|
:loading="importLoading"
|
|
|
- >导入</el-button>
|
|
|
+ >导入</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
@@ -248,7 +251,8 @@
|
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
|
@click="downloadTemplate"
|
|
|
- >下载导入模板</el-button>
|
|
|
+ >下载导入模板</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" plain size="mini" @click="handleSync"
|
|
|
@@ -260,6 +264,11 @@
|
|
|
>同步公海会员</el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button type="primary" plain size="mini" @click="handleShareMaterial"
|
|
|
+ >分享素材</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
<right-toolbar
|
|
|
:showSearch.sync="showSearch"
|
|
|
@queryTable="getList"
|
|
|
@@ -325,9 +334,7 @@
|
|
|
|
|
|
<el-table-column label="信息状态" align="center" prop="completeStatus">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag
|
|
|
- :type="scope.row.completeStatus === 1 ? 'success' : 'danger'"
|
|
|
- >
|
|
|
+ <el-tag :type="scope.row.completeStatus === 1 ? 'success' : 'danger'">
|
|
|
{{ scope.row.completeStatus === 1 ? "完整" : "缺失" }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
@@ -347,7 +354,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="阻碍原因" align="center" prop="auditReason">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.auditReason" class="text-danger">{{ scope.row.auditReason }}</span>
|
|
|
+ <span v-if="scope.row.auditReason" class="text-danger">{{
|
|
|
+ scope.row.auditReason
|
|
|
+ }}</span>
|
|
|
<span v-else>{{ scope.row.auditReason }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -461,7 +470,10 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-folder-add"
|
|
|
- v-if="scope.row.myCustomerFlag && [0, 5, 6].includes(scope.row.processStatus)"
|
|
|
+ v-if="
|
|
|
+ scope.row.myCustomerFlag &&
|
|
|
+ [0, 5, 6].includes(scope.row.processStatus)
|
|
|
+ "
|
|
|
@click="handleTemplate(scope.row)"
|
|
|
>完善病例</el-button
|
|
|
>
|
|
|
@@ -492,6 +504,56 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
|
|
|
+ <el-dialog
|
|
|
+ :title="shareMaterial.title"
|
|
|
+ :visible.sync="shareMaterial.open"
|
|
|
+ width="700px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ ref="shareMaterialForm"
|
|
|
+ :model="shareMaterialForm"
|
|
|
+ :rules="shareMaterialRules"
|
|
|
+ label-width="100px"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-form-item label="素材" prop="shareMaterialId">
|
|
|
+ <el-select
|
|
|
+ v-model="shareMaterialForm.shareMaterialId"
|
|
|
+ placeholder="素材"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @change="handleShareMaterialChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in shareMaterialList"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="shareMaterialForm.type === '1'" label="图片">
|
|
|
+ <el-image
|
|
|
+ :src="shareMaterialForm.url"
|
|
|
+ style="max-width: 300px; max-height: 300px;"
|
|
|
+ fit="contain"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="shareMaterialForm.type === '2'" label="视频">
|
|
|
+ <video
|
|
|
+ :src="shareMaterialForm.url"
|
|
|
+ controls
|
|
|
+ style="max-width: 500px; max-height: 300px;"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" v-if="!isDetail">
|
|
|
+ <el-button type="primary" @click="shareMaterialSubmitForm">确 定</el-button>
|
|
|
+ <el-button @click="shareMaterialCancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- ========== 新增/编辑/详情 弹窗 ========== -->
|
|
|
<el-dialog
|
|
|
:title="title"
|
|
|
@@ -872,32 +934,83 @@
|
|
|
@close="createOrderCancel"
|
|
|
>
|
|
|
<!-- 处方图片展示区域 -->
|
|
|
- <div v-if="createOrder.scrmPrescribeInfo" style="margin-bottom: 20px; border-bottom: 1px solid #EBEEF5; padding-bottom: 15px;">
|
|
|
- <div style="font-weight: bold; margin-bottom: 10px;">处方图片</div>
|
|
|
- <div :style="getImageLayoutStyle(createOrder.scrmPrescribeInfo.prescribeType)" style="display: flex; gap: 20px; justify-content: flex-start; flex-wrap: wrap;">
|
|
|
+ <div
|
|
|
+ v-if="createOrder.scrmPrescribeInfo"
|
|
|
+ style="
|
|
|
+ margin-bottom: 20px;
|
|
|
+ border-bottom: 1px solid #ebeef5;
|
|
|
+ padding-bottom: 15px;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div style="font-weight: bold; margin-bottom: 10px">处方图片</div>
|
|
|
+ <div
|
|
|
+ :style="
|
|
|
+ getImageLayoutStyle(createOrder.scrmPrescribeInfo.prescribeType)
|
|
|
+ "
|
|
|
+ style="
|
|
|
+ display: flex;
|
|
|
+ gap: 20px;
|
|
|
+ justify-content: flex-start;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ "
|
|
|
+ >
|
|
|
<!-- 西药图片(prescribeType=1 或 3) -->
|
|
|
- <div v-if="shouldShowWesternImage(createOrder.scrmPrescribeInfo.prescribeType)" style="text-align: center; flex: 1;">
|
|
|
- <div style="margin-bottom: 5px;">西药处方</div>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ shouldShowWesternImage(
|
|
|
+ createOrder.scrmPrescribeInfo.prescribeType
|
|
|
+ )
|
|
|
+ "
|
|
|
+ style="text-align: center; flex: 1"
|
|
|
+ >
|
|
|
+ <div style="margin-bottom: 5px">西药处方</div>
|
|
|
<el-image
|
|
|
v-if="createOrder.scrmPrescribeInfo.prescribeImgStoreUrl"
|
|
|
:src="createOrder.scrmPrescribeInfo.prescribeImgStoreUrl"
|
|
|
- :preview-src-list="[createOrder.scrmPrescribeInfo.prescribeImgStoreUrl]"
|
|
|
- style="width: 200px; height: auto; max-height: 200px; object-fit: contain; border: 1px solid #ddd; border-radius: 4px; cursor: pointer;"
|
|
|
+ :preview-src-list="[
|
|
|
+ createOrder.scrmPrescribeInfo.prescribeImgStoreUrl,
|
|
|
+ ]"
|
|
|
+ style="
|
|
|
+ width: 200px;
|
|
|
+ height: auto;
|
|
|
+ max-height: 200px;
|
|
|
+ object-fit: contain;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ "
|
|
|
fit="contain"
|
|
|
/>
|
|
|
- <div v-else style="color: #909399;">暂无西药处方图</div>
|
|
|
+ <div v-else style="color: #909399">暂无西药处方图</div>
|
|
|
</div>
|
|
|
<!-- 中药图片(prescribeType=2 或 3) -->
|
|
|
- <div v-if="shouldShowChineseImage(createOrder.scrmPrescribeInfo.prescribeType)" style="text-align: center; flex: 1;">
|
|
|
- <div style="margin-bottom: 5px;">中药处方</div>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ shouldShowChineseImage(
|
|
|
+ createOrder.scrmPrescribeInfo.prescribeType
|
|
|
+ )
|
|
|
+ "
|
|
|
+ style="text-align: center; flex: 1"
|
|
|
+ >
|
|
|
+ <div style="margin-bottom: 5px">中药处方</div>
|
|
|
<el-image
|
|
|
v-if="createOrder.scrmPrescribeInfo.prescribeImgUrl"
|
|
|
:src="createOrder.scrmPrescribeInfo.prescribeImgUrl"
|
|
|
- :preview-src-list="[createOrder.scrmPrescribeInfo.prescribeImgUrl]"
|
|
|
- style="width: 200px; height: auto; max-height: 200px; object-fit: contain; border: 1px solid #ddd; border-radius: 4px; cursor: pointer;"
|
|
|
+ :preview-src-list="[
|
|
|
+ createOrder.scrmPrescribeInfo.prescribeImgUrl,
|
|
|
+ ]"
|
|
|
+ style="
|
|
|
+ width: 200px;
|
|
|
+ height: auto;
|
|
|
+ max-height: 200px;
|
|
|
+ object-fit: contain;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ "
|
|
|
fit="contain"
|
|
|
/>
|
|
|
- <div v-else style="color: #909399;">暂无中药处方图</div>
|
|
|
+ <div v-else style="color: #909399">暂无中药处方图</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -1457,10 +1570,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div style="margin-left: 31px">
|
|
|
- <el-checkbox-group
|
|
|
- v-model="answer.value"
|
|
|
- size="mini"
|
|
|
- >
|
|
|
+ <el-checkbox-group v-model="answer.value" size="mini">
|
|
|
<div
|
|
|
v-for="(option, optionIndex) in answer.options"
|
|
|
:key="`${index}-${optionIndex}`"
|
|
|
@@ -1483,8 +1593,8 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitTemplateForm">确 定</el-button>
|
|
|
- </div>
|
|
|
+ <el-button type="primary" @click="submitTemplateForm">确 定</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -1509,9 +1619,9 @@ import {
|
|
|
updateScrmPrescriptionDocumentSuccess,
|
|
|
improve,
|
|
|
getScrmPrescribeInfo,
|
|
|
- importCustomer
|
|
|
+ importCustomer,
|
|
|
} from "@/api/qw/companyCustomer";
|
|
|
-import{treeselect} from "@/api/company/companyDept";
|
|
|
+import { treeselect } from "@/api/company/companyDept";
|
|
|
import { parseTime } from "@/utils/common";
|
|
|
import { getCitys } from "@/api/hisStore/city";
|
|
|
import CollectionInfoDialog from "./CollectionInfoDialog.vue";
|
|
|
@@ -1523,9 +1633,13 @@ import { addCollectionAndUpdateOrderStatus } from "@/api/member/handwriteCollect
|
|
|
// 药品标志API
|
|
|
import { getProductMedicineFlagByOrderCode } from "@/api/store/storeProduct";
|
|
|
import ImageUpload from "@/components/ImageUpload";
|
|
|
-import { syncKdzlMember, syncKdzlHighSeaMemberInfo} from "@/api/company/importMember";
|
|
|
+import {
|
|
|
+ syncKdzlMember,
|
|
|
+ syncKdzlHighSeaMemberInfo,
|
|
|
+} from "@/api/company/importMember";
|
|
|
import { questionOptions } from "@/api/hisStore/answer";
|
|
|
import { generatePrescribeData } from "@/api/his/prescribeData";
|
|
|
+import { shareMaterialOptions } from "@/api/his/shareMaterial";
|
|
|
|
|
|
export default {
|
|
|
name: "Customer",
|
|
|
@@ -1598,13 +1712,14 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
- deptOptions: [], // 树形部门数据
|
|
|
- cascaderProps: { // el-cascader 配置
|
|
|
- value: 'id',
|
|
|
- label: 'label',
|
|
|
- children: 'children',
|
|
|
- checkStrictly: true, // 允许选择任意层级
|
|
|
- emitPath: false // 只返回选中节点的 value(即 id)
|
|
|
+ deptOptions: [], // 树形部门数据
|
|
|
+ cascaderProps: {
|
|
|
+ // el-cascader 配置
|
|
|
+ value: "id",
|
|
|
+ label: "label",
|
|
|
+ children: "children",
|
|
|
+ checkStrictly: true, // 允许选择任意层级
|
|
|
+ emitPath: false, // 只返回选中节点的 value(即 id)
|
|
|
},
|
|
|
importLoading: false,
|
|
|
templateForm: {
|
|
|
@@ -1616,7 +1731,7 @@ export default {
|
|
|
open: false,
|
|
|
title: "完善病例",
|
|
|
},
|
|
|
- templateRules:{
|
|
|
+ templateRules: {
|
|
|
templateId: [
|
|
|
{ required: true, message: "请选择病例模板", trigger: "change" },
|
|
|
],
|
|
|
@@ -1634,7 +1749,7 @@ export default {
|
|
|
dateRange: [],
|
|
|
createTimeRange: [],
|
|
|
queryParams: {
|
|
|
- deptId: null, // 归属组别ID
|
|
|
+ deptId: null, // 归属组别ID
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
customerName: null,
|
|
|
@@ -1714,7 +1829,7 @@ export default {
|
|
|
claimDialogVisible: false,
|
|
|
claimSubmitLoading: false,
|
|
|
currentClaimRow: null,
|
|
|
- claimForm: { claimNumber: "" ,kdzlAddWechatStatus: null,},
|
|
|
+ claimForm: { claimNumber: "", kdzlAddWechatStatus: null },
|
|
|
claimRules: {
|
|
|
claimNumber: [
|
|
|
{ required: true, message: "请输入认领号码", trigger: "blur" },
|
|
|
@@ -1733,7 +1848,7 @@ export default {
|
|
|
pageSize: 10,
|
|
|
companyCustomerId: null,
|
|
|
},
|
|
|
- createOrder: { open: false, title: "创建订单",scrmPrescribeInfo: null },
|
|
|
+ createOrder: { open: false, title: "创建订单", scrmPrescribeInfo: null },
|
|
|
createOrderForm: {
|
|
|
realName: "",
|
|
|
phone: "",
|
|
|
@@ -1836,6 +1951,15 @@ export default {
|
|
|
},
|
|
|
|
|
|
questionOptions: [],
|
|
|
+
|
|
|
+ shareMaterial: { open: false, title: "素材分享" },
|
|
|
+ shareMaterialForm: { shareMaterialId: null,type: null, url: null },
|
|
|
+ shareMaterialList: [],
|
|
|
+ shareMaterialRules:{
|
|
|
+ shareMaterialId: [
|
|
|
+ { required: true, message: "请选择素材", trigger: "change" },
|
|
|
+ ],
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -1849,13 +1973,48 @@ export default {
|
|
|
this.questionOptions = response.rows;
|
|
|
});
|
|
|
//获取部门树
|
|
|
- treeselect().then(response => {
|
|
|
- this.deptOptions = response.data || [];
|
|
|
- }).catch(() => {
|
|
|
- this.deptOptions = [];
|
|
|
- });
|
|
|
+ treeselect()
|
|
|
+ .then((response) => {
|
|
|
+ this.deptOptions = response.data || [];
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.deptOptions = [];
|
|
|
+ });
|
|
|
+ shareMaterialOptions()
|
|
|
+ .then((response) => {
|
|
|
+ this.shareMaterialList = response.data || [];
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.shareMaterialList = [];
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ shareMaterialSubmitForm(){
|
|
|
+
|
|
|
+ },
|
|
|
+ shareMaterialCancel() {
|
|
|
+ this.shareMaterial.open = false;
|
|
|
+ this.shareMaterialForm = { shareMaterialId: null, type: null, url: null };
|
|
|
+ this.$refs.shareMaterialForm.resetFields();
|
|
|
+ },
|
|
|
+
|
|
|
+ handleShareMaterial() {
|
|
|
+ this.shareMaterialForm = { shareMaterialId: null, type: null, url: null };
|
|
|
+ this.shareMaterial.open = true;
|
|
|
+ },
|
|
|
+ handleShareMaterialChange(val) {
|
|
|
+ if (val) {
|
|
|
+ const item = this.shareMaterialList.find(dict => dict.dictValue === val);
|
|
|
+ if (item) {
|
|
|
+ this.shareMaterialForm.type = item.dictValue1 || null;
|
|
|
+ this.shareMaterialForm.url = item.dictImgUrl || null;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.shareMaterialForm.type = null;
|
|
|
+ this.shareMaterialForm.url = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 归属组别变化时自动搜索 */
|
|
|
handleDeptChange(value) {
|
|
|
this.handleQuery();
|
|
|
@@ -1863,13 +2022,13 @@ export default {
|
|
|
/** 下载导入模板 */
|
|
|
downloadTemplate() {
|
|
|
// 模板文件路径(放在 public/template/ 目录下)
|
|
|
- const templateUrl = '/template/customer_import_template.xlsx';
|
|
|
+ const templateUrl = "/template/customer_import_template.xlsx";
|
|
|
// 下载时的文件名
|
|
|
- const fileName = '客户导入模板.xlsx';
|
|
|
+ const fileName = "客户导入模板.xlsx";
|
|
|
|
|
|
// 创建隐藏的 a 标签触发下载
|
|
|
- const link = document.createElement('a');
|
|
|
- link.style.display = 'none';
|
|
|
+ const link = document.createElement("a");
|
|
|
+ link.style.display = "none";
|
|
|
link.href = templateUrl;
|
|
|
link.download = fileName;
|
|
|
document.body.appendChild(link);
|
|
|
@@ -1879,10 +2038,10 @@ export default {
|
|
|
// 导入客户数据
|
|
|
handleImport() {
|
|
|
// 创建一个隐藏的 file input
|
|
|
- const input = document.createElement('input');
|
|
|
- input.type = 'file';
|
|
|
- input.accept = '.xlsx,.xls';
|
|
|
- input.style.display = 'none';
|
|
|
+ const input = document.createElement("input");
|
|
|
+ input.type = "file";
|
|
|
+ input.accept = ".xlsx,.xls";
|
|
|
+ input.style.display = "none";
|
|
|
document.body.appendChild(input);
|
|
|
|
|
|
input.onchange = (e) => {
|
|
|
@@ -1893,30 +2052,30 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 检查文件类型
|
|
|
- const ext = file.name.split('.').pop().toLowerCase();
|
|
|
- if (!['xlsx', 'xls'].includes(ext)) {
|
|
|
- this.$message.error('请上传 Excel 文件(.xlsx 或 .xls)');
|
|
|
+ const ext = file.name.split(".").pop().toLowerCase();
|
|
|
+ if (!["xlsx", "xls"].includes(ext)) {
|
|
|
+ this.$message.error("请上传 Excel 文件(.xlsx 或 .xls)");
|
|
|
document.body.removeChild(input);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
// 构建 FormData
|
|
|
const formData = new FormData();
|
|
|
- formData.append('file', file);
|
|
|
+ formData.append("file", file);
|
|
|
|
|
|
this.importLoading = true;
|
|
|
importCustomer(formData)
|
|
|
- .then(response => {
|
|
|
+ .then((response) => {
|
|
|
if (response.code === 200) {
|
|
|
const result = response.data;
|
|
|
let msg = `成功导入 ${result.success} 条`;
|
|
|
if (result.errors && result.errors.length > 0) {
|
|
|
// 有错误信息,显示详细错误
|
|
|
- const errorMsg = result.errors.join('\n');
|
|
|
- this.$alert(errorMsg, '导入结果(部分失败)', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- type: 'warning',
|
|
|
- dangerouslyUseHTMLString: false
|
|
|
+ const errorMsg = result.errors.join("\n");
|
|
|
+ this.$alert(errorMsg, "导入结果(部分失败)", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ type: "warning",
|
|
|
+ dangerouslyUseHTMLString: false,
|
|
|
});
|
|
|
msg += `,失败 ${result.errors.length} 条`;
|
|
|
} else {
|
|
|
@@ -1925,11 +2084,11 @@ export default {
|
|
|
// 刷新列表
|
|
|
this.getList();
|
|
|
} else {
|
|
|
- this.$message.error(response.msg || '导入失败');
|
|
|
+ this.$message.error(response.msg || "导入失败");
|
|
|
}
|
|
|
})
|
|
|
- .catch(error => {
|
|
|
- this.$message.error(error.message || '导入请求失败');
|
|
|
+ .catch((error) => {
|
|
|
+ this.$message.error(error.message || "导入请求失败");
|
|
|
})
|
|
|
.finally(() => {
|
|
|
this.importLoading = false;
|
|
|
@@ -1941,25 +2100,27 @@ export default {
|
|
|
input.click();
|
|
|
},
|
|
|
|
|
|
- handlePrescribeData(row){
|
|
|
+ handlePrescribeData(row) {
|
|
|
// 2. 弹出确认框
|
|
|
- this.$confirm('是否确认开方?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- generatePrescribeData(row.id).then(response => {
|
|
|
- this.msgSuccess("开方成功");
|
|
|
- this.getList();
|
|
|
+ this.$confirm("是否确认开方?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ generatePrescribeData(row.id).then((response) => {
|
|
|
+ this.msgSuccess("开方成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // 4. 用户点击取消或关闭弹窗,不做任何操作
|
|
|
+ this.$message.info("已取消操作");
|
|
|
});
|
|
|
- }).catch(() => {
|
|
|
- // 4. 用户点击取消或关闭弹窗,不做任何操作
|
|
|
- this.$message.info('已取消操作');
|
|
|
- });
|
|
|
},
|
|
|
|
|
|
- submitTemplateForm(){
|
|
|
- this.$refs["templateForm"].validate(valid => {
|
|
|
+ submitTemplateForm() {
|
|
|
+ this.$refs["templateForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
const answers = JSON.stringify(this.templateForm.answers);
|
|
|
const params = {
|
|
|
@@ -1967,22 +2128,24 @@ export default {
|
|
|
templateId: this.templateForm.templateId,
|
|
|
jsonInfo: answers,
|
|
|
};
|
|
|
- improve(params).then(response => {
|
|
|
+ improve(params).then((response) => {
|
|
|
this.msgSuccess("完善成功");
|
|
|
this.template.open = false;
|
|
|
this.templateReset();
|
|
|
this.getList();
|
|
|
});
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
selectQuestion(val) {
|
|
|
- console.log("ssssss",val);
|
|
|
- const template = this.questionOptions.find(item => item.dictValue == val);
|
|
|
+ console.log("ssssss", val);
|
|
|
+ const template = this.questionOptions.find(
|
|
|
+ (item) => item.dictValue == val
|
|
|
+ );
|
|
|
|
|
|
const answers = JSON.parse(template.dictValue1);
|
|
|
- answers.forEach(item => {
|
|
|
+ answers.forEach((item) => {
|
|
|
item.value = [];
|
|
|
});
|
|
|
this.templateForm.answers = answers;
|
|
|
@@ -1990,7 +2153,7 @@ export default {
|
|
|
handleTemplate(row) {
|
|
|
this.templateReset();
|
|
|
if (row.completeStatus === 0) {
|
|
|
- this.$message.warning('请先将缺失的客户信息填写完整再完善病例');
|
|
|
+ this.$message.warning("请先将缺失的客户信息填写完整再完善病例");
|
|
|
return;
|
|
|
}
|
|
|
this.template.open = true;
|
|
|
@@ -2224,43 +2387,43 @@ export default {
|
|
|
//根据搜索表单刷新列表
|
|
|
this.getList();
|
|
|
// 弹出提示确认框
|
|
|
- // this.$confirm(
|
|
|
- // `<div style="text-align: center; padding: 10px 0;">
|
|
|
- // <i class="el-icon-warning-outline" style="font-size: 48px; color: #E6A23C;"></i>
|
|
|
- // <p style="font-size: 16px; margin: 15px 0 10px; font-weight: 500;">
|
|
|
- // 请上传此订单的手写信息采集,否则无法发货!
|
|
|
- // </p>
|
|
|
- // <p style="color: #F56C6C; font-size: 14px;">
|
|
|
- // 点击“确定”跳转上传页面
|
|
|
- // </p>
|
|
|
- // </div>`,
|
|
|
- // "温馨提示",
|
|
|
- // {
|
|
|
- // confirmButtonText: "确定,去上传",
|
|
|
- // cancelButtonText: "暂不处理",
|
|
|
- // type: "warning",
|
|
|
- // dangerouslyUseHTMLString: true,
|
|
|
- // center: true,
|
|
|
- // distinguishCancelAndClose: true,
|
|
|
- // }
|
|
|
- // )
|
|
|
- // .then(() => {
|
|
|
- // // 确保订单列表弹窗打开并刷新
|
|
|
- // if (this.currentCustomerId) {
|
|
|
- // this.orderQueryParams.companyCustomerId = this.currentCustomerId;
|
|
|
- // this.orderListDialogVisible = true;
|
|
|
- // this.getOrderList();
|
|
|
- // } else {
|
|
|
- // this.$message.warning("无法获取客户信息,请手动刷新订单列表");
|
|
|
- // this.orderListDialogVisible = true; // 仍打开弹窗,但可能无法正确筛选
|
|
|
- // }
|
|
|
- // // 打开手写信息采集新增弹窗
|
|
|
- // this.openHandwriteDialog(order, orderParams);
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // this.getList();
|
|
|
- // this.$message.info("已取消上传手写信息采集");
|
|
|
- // });
|
|
|
+ // this.$confirm(
|
|
|
+ // `<div style="text-align: center; padding: 10px 0;">
|
|
|
+ // <i class="el-icon-warning-outline" style="font-size: 48px; color: #E6A23C;"></i>
|
|
|
+ // <p style="font-size: 16px; margin: 15px 0 10px; font-weight: 500;">
|
|
|
+ // 请上传此订单的手写信息采集,否则无法发货!
|
|
|
+ // </p>
|
|
|
+ // <p style="color: #F56C6C; font-size: 14px;">
|
|
|
+ // 点击“确定”跳转上传页面
|
|
|
+ // </p>
|
|
|
+ // </div>`,
|
|
|
+ // "温馨提示",
|
|
|
+ // {
|
|
|
+ // confirmButtonText: "确定,去上传",
|
|
|
+ // cancelButtonText: "暂不处理",
|
|
|
+ // type: "warning",
|
|
|
+ // dangerouslyUseHTMLString: true,
|
|
|
+ // center: true,
|
|
|
+ // distinguishCancelAndClose: true,
|
|
|
+ // }
|
|
|
+ // )
|
|
|
+ // .then(() => {
|
|
|
+ // // 确保订单列表弹窗打开并刷新
|
|
|
+ // if (this.currentCustomerId) {
|
|
|
+ // this.orderQueryParams.companyCustomerId = this.currentCustomerId;
|
|
|
+ // this.orderListDialogVisible = true;
|
|
|
+ // this.getOrderList();
|
|
|
+ // } else {
|
|
|
+ // this.$message.warning("无法获取客户信息,请手动刷新订单列表");
|
|
|
+ // this.orderListDialogVisible = true; // 仍打开弹窗,但可能无法正确筛选
|
|
|
+ // }
|
|
|
+ // // 打开手写信息采集新增弹窗
|
|
|
+ // this.openHandwriteDialog(order, orderParams);
|
|
|
+ // })
|
|
|
+ // .catch(() => {
|
|
|
+ // this.getList();
|
|
|
+ // this.$message.info("已取消上传手写信息采集");
|
|
|
+ // });
|
|
|
},
|
|
|
|
|
|
// 打开手写信息采集弹窗并预填信息
|
|
|
@@ -2370,7 +2533,7 @@ export default {
|
|
|
this.templateReset();
|
|
|
},
|
|
|
templateReset() {
|
|
|
- this.resetForm("templateForm")
|
|
|
+ this.resetForm("templateForm");
|
|
|
this.templateForm = {
|
|
|
id: null,
|
|
|
answers: [],
|
|
|
@@ -2513,17 +2676,19 @@ export default {
|
|
|
this.sAddress(row);
|
|
|
this.fetchReceiptList();
|
|
|
// 调用处方信息接口
|
|
|
- getScrmPrescribeInfo(row.id).then(response => {
|
|
|
- if (response.code === 200 && response.data) {
|
|
|
- this.createOrder.scrmPrescribeInfo = response.data;
|
|
|
- } else {
|
|
|
- // 如果没有处方信息,可以显示提示,但不影响制单流程
|
|
|
- console.warn("未查询到处方信息", response.msg);
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- console.error("获取处方信息失败", err);
|
|
|
- // 不阻塞制单流程
|
|
|
- });
|
|
|
+ getScrmPrescribeInfo(row.id)
|
|
|
+ .then((response) => {
|
|
|
+ if (response.code === 200 && response.data) {
|
|
|
+ this.createOrder.scrmPrescribeInfo = response.data;
|
|
|
+ } else {
|
|
|
+ // 如果没有处方信息,可以显示提示,但不影响制单流程
|
|
|
+ console.warn("未查询到处方信息", response.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error("获取处方信息失败", err);
|
|
|
+ // 不阻塞制单流程
|
|
|
+ });
|
|
|
},
|
|
|
parseTime,
|
|
|
getCurrentDateTime() {
|
|
|
@@ -2998,9 +3163,9 @@ export default {
|
|
|
const showWestern = this.shouldShowWesternImage(prescribeType);
|
|
|
const showChinese = this.shouldShowChineseImage(prescribeType);
|
|
|
if ((showWestern && !showChinese) || (!showWestern && showChinese)) {
|
|
|
- return { justifyContent: 'flex-start' }; // 只有一张时左对齐
|
|
|
+ return { justifyContent: "flex-start" }; // 只有一张时左对齐
|
|
|
}
|
|
|
- return { justifyContent: 'space-between' }; // 两张时分散对齐
|
|
|
+ return { justifyContent: "space-between" }; // 两张时分散对齐
|
|
|
},
|
|
|
},
|
|
|
};
|