From a42389b4b76f181164241fac6981f629ec600055 Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Thu, 14 Sep 2023 12:04:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=8A=B6=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/confirmModal.vue | 28 +++++++++----- src/components/isOkModal.vue | 32 ++++++++++------ src/utils/format.js | 10 ++++- src/views/order/medince-list/index.vue | 53 ++++++++++++++++++++------ 4 files changed, 88 insertions(+), 35 deletions(-) diff --git a/src/components/confirmModal.vue b/src/components/confirmModal.vue index 66f50e9..2c68974 100644 --- a/src/components/confirmModal.vue +++ b/src/components/confirmModal.vue @@ -59,18 +59,26 @@ const rules = reactive({ }); // Akiraka 20230210 确认按钮 => 开始数据检查 const handleConfirm = () => { - proxy.$refs.modalFormRef.validate((valid) => { + proxy.$refs.modalFormRef.validate(async(valid) => { if (!valid) { - api.value(id.value,form).then(response => { - // Akiraka 20230210 关闭弹窗 - if(response.code==200){ - Message.success("取消成功"); + const {code}= await api.value(id.value,form); + if(code==200){ + Message.success("取消成功"); proxy.$refs.modalFormRef.resetFields(); - }else{ - proxy.$notification.error(response.message); - } - emits('closeChange',true); - }) + }else{ + proxy.$notification.error(response.message); + } + emits('closeChange',true); + // api.value(id.value,form).then(response => { + // // Akiraka 20230210 关闭弹窗 + // if(response.code==200){ + // Message.success("取消成功"); + // proxy.$refs.modalFormRef.resetFields(); + // }else{ + // proxy.$notification.error(response.message); + // } + // emits('closeChange',true); + // }) } }) } diff --git a/src/components/isOkModal.vue b/src/components/isOkModal.vue index c648c9e..4b70c02 100644 --- a/src/components/isOkModal.vue +++ b/src/components/isOkModal.vue @@ -13,7 +13,7 @@ \ No newline at end of file diff --git a/src/utils/format.js b/src/utils/format.js index 2f2f5bf..fc87bca 100644 --- a/src/utils/format.js +++ b/src/utils/format.js @@ -52,4 +52,12 @@ export const formatDoctorTitle=(val)=>{ return '' } } - + export const fromatReportStatus=(val)=>{ + //上报处方平台状态(0:未上报 1:已上报 2:上报失败)) + let data={0:'未上报', 1:'已上报', 2:'上报失败'} + if(val || val==0){ + return data[val] + }else{ + return '' + } +} diff --git a/src/views/order/medince-list/index.vue b/src/views/order/medince-list/index.vue index 06fff35..a15ea08 100644 --- a/src/views/order/medince-list/index.vue +++ b/src/views/order/medince-list/index.vue @@ -422,6 +422,26 @@ +
+
+
处方上报状态
+ +
+ + + +
+
+
+
上报状态:
+
{{fromatReportStatus(modalForm.report_pre_status)}}
+
+
+
+
+
+
+
操作
@@ -429,17 +449,17 @@ - + 上报处方平台 - + 取消药品订单 @@ -452,7 +472,7 @@ - +
@@ -467,7 +487,7 @@ import { } from 'vue'; import { productList, getProductDetail,cancelProduct,reportPrePscription} from '@/api/order/list'; import { parseTime } from '@/utils/parseTime'; -import {formatDoctorTitle,formatPrescriptionStatus,formatPharmacistStatus,formatProductCancelReason} from "@/utils/format" +import {formatDoctorTitle,fromatReportStatus,formatPrescriptionStatus,formatPharmacistStatus,formatProductCancelReason} from "@/utils/format" const IMG_URL=import.meta.env.VITE_IMG_URL; // Akiraka 20230210 删除数据 const deleteData = ref([]); @@ -653,13 +673,8 @@ const handleQuery = async () => { getProductInfo(params); }; -//获取订单详情 -const handleDetail = async (record) => { - modalVisible.value = true; - modalTitle.value = '药品订单详情'; - const { code, data, message } = await getProductDetail( - record.order_product_id - ); + const getDetail=async(order_product_id)=>{ + const { code, data, message } = await getProductDetail(order_product_id); if (code == 200) { Object.assign(modalForm, data); let result=data.order_prescription; @@ -685,6 +700,12 @@ const handleDetail = async (record) => { } } + } +//获取订单详情 +const handleDetail = (record) => { + modalVisible.value = true; + modalTitle.value = '药品订单详情'; + getDetail(record.order_product_id) }; const formatProductStatus = (val) => { @@ -745,6 +766,14 @@ const closeChange=(data)=>{ } } +//关闭上传处方平台弹框 +const closeChangeOk=(data)=>{ + order_product_id.value=""; + isVisible.value=false; + if(data){ + getDetail(modalForm.order_product_id) + } +} // 重置搜索 const handleResetQuery = () => { proxy.$refs.queryFormRef.resetFields();