From 4ba4d2022932b439fdbc99f67a61325dd3ce8d5d Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Thu, 14 Sep 2023 15:50:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order/list.js | 6 + src/utils/format.js | 2 +- src/views/order/medince-list/index.vue | 816 +++++++++++++++---------- src/views/order/order-list/index.vue | 30 +- 4 files changed, 540 insertions(+), 314 deletions(-) diff --git a/src/api/order/list.js b/src/api/order/list.js index 544fa5d..2b45891 100644 --- a/src/api/order/list.js +++ b/src/api/order/list.js @@ -53,3 +53,9 @@ export function reportPrePscription(id){//上报处方 method: 'post' }) } +export function lookAddress(id){//解密收货人地址 + return request({ + url:`/decrypt/order/product/consignee/${id}`, + method: 'get' + }) +} diff --git a/src/utils/format.js b/src/utils/format.js index fc87bca..b3c29a4 100644 --- a/src/utils/format.js +++ b/src/utils/format.js @@ -18,7 +18,7 @@ export const formatDoctorTitle=(val)=>{ } export const formatPharmacistStatus=(val)=>{ //pharmacist_audit_status药师审核状态(0:审核中 1:审核成功 2:审核驳回) - let data={1:'审核中', 2:'审核成功', 3:'审核驳回'} + let data={0:'审核中', 1:'审核成功', 2:'审核驳回'} if(val || val==0){ return data[val] }else{ diff --git a/src/views/order/medince-list/index.vue b/src/views/order/medince-list/index.vue index 44b03f2..f672d59 100644 --- a/src/views/order/medince-list/index.vue +++ b/src/views/order/medince-list/index.vue @@ -28,14 +28,14 @@ - + - + - + - + - + - + - + {{ formatProductStatus(record.order_product_status) }} @@ -482,58 +626,70 @@ import { ref, getCurrentInstance, onMounted, - nextTick, watch, } from 'vue'; -import { productList, getProductDetail,cancelProduct,reportPrePscription} from '@/api/order/list'; +import { + productList, + getProductDetail, + cancelProduct, + reportPrePscription, + lookAddress +} from '@/api/order/list'; import { parseTime } from '@/utils/parseTime'; -import {formatDoctorTitle,fromatReportStatus,formatPrescriptionStatus,formatPharmacistStatus,formatProductCancelReason} from "@/utils/format" -const IMG_URL=import.meta.env.VITE_IMG_URL; +import { + formatDoctorTitle, + fromatReportStatus, + formatPrescriptionStatus, + formatPharmacistStatus, + formatProductCancelReason, +} from '@/utils/format'; +const IMG_URL = import.meta.env.VITE_IMG_URL; // Akiraka 20230210 删除数据 const deleteData = ref([]); // Akiraka 20230210 删除对话框 const deleteVisible = ref(false); // Akiraka 20230210 监听删除事件 -const okVisible=ref(false); -const cur_product_id=ref(''); +const okVisible = ref(false); +const cur_product_id = ref(''); const doctorVisible = ref(false); const doctor_id = ref(''); -const isVisible=ref(false); -const order_product_id=ref(""); -let express=[];//物流信息; -const cur_express=ref([]); -const isExpand=ref(false); -const patientVisible=ref(false); -const patientData=reactive({ -}); -const chufang_columns=reactive([ - { - title: '处方编号', - dataIndex: 'prescription_code', - }, - { - title: '处方状态', - dataIndex: 'prescription_status', - }, - { - title: '药师审核状态', - dataIndex: 'pharmacist_audit_status', - }, - { - title: '医嘱', - dataIndex: 'doctor_advice', - }, - { - title: '药师驳回原因', - dataIndex: 'pharmacist_fail_reason', - }, - { - title: '处方链接', - dataIndex: 'url', - slotName:"url" - } - ]); - let chufang_data=reactive([]) +const isVisible = ref(false); +const order_product_id = ref(''); +let express = []; //物流信息; +const cur_express = ref([]); +const isExpand = ref(false); +const patientVisible = ref(false); +const patientData = reactive({}); +const lookAllAddress=ref(false); +const AddressData=reactive({}); +const chufang_columns = reactive([ + { + title: '处方编号', + dataIndex: 'prescription_code', + }, + { + title: '处方状态', + dataIndex: 'prescription_status', + }, + { + title: '药师审核状态', + dataIndex: 'pharmacist_audit_status', + }, + { + title: '医嘱', + dataIndex: 'doctor_advice', + }, + { + title: '药师驳回原因', + dataIndex: 'pharmacist_fail_reason', + }, + { + title: '处方链接', + dataIndex: 'url', + slotName: 'url', + }, +]); +let chufang_data = reactive([]); watch( () => deleteVisible.value, (value) => { @@ -562,39 +718,51 @@ const modalForm = reactive({ order_prescription: null, }); -watch(()=>queryForm.delivery_range_time,(value)=>{ - if(value){ - let[startTime,endTime]=value - queryForm.delivery_time=startTime+"&"+endTime; - }else{ - queryForm.delivery_time='' - }; - console.log(queryForm.finish_time) -}) -watch(()=>queryForm.pay_range_time,(value)=>{ - if(value){ - let[startTime,endTime]=value - queryForm.pay_time=startTime+"&"+endTime; - }else{ - queryForm.pay_time='' - }; -}) -watch(()=>queryForm.cancel_range_time,(value)=>{ - if(value){ - let[startTime,endTime]=value - queryForm.cancel_time=startTime+"&"+endTime; - }else{ - queryForm.cancel_time='' - }; -}) -watch(()=>queryForm.report_range_time,(value)=>{ - if(value){ - let[startTime,endTime]=value - queryForm.report_pre_time=startTime+"&"+endTime; - }else{ - queryForm.report_pre_time='' - }; -}) +watch( + () => queryForm.delivery_range_time, + (value) => { + if (value) { + let [startTime, endTime] = value; + queryForm.delivery_time = startTime + '&' + endTime; + } else { + queryForm.delivery_time = ''; + } + console.log(queryForm.finish_time); + } +); +watch( + () => queryForm.pay_range_time, + (value) => { + if (value) { + let [startTime, endTime] = value; + queryForm.pay_time = startTime + '&' + endTime; + } else { + queryForm.pay_time = ''; + } + } +); +watch( + () => queryForm.cancel_range_time, + (value) => { + if (value) { + let [startTime, endTime] = value; + queryForm.cancel_time = startTime + '&' + endTime; + } else { + queryForm.cancel_time = ''; + } + } +); +watch( + () => queryForm.report_range_time, + (value) => { + if (value) { + let [startTime, endTime] = value; + queryForm.report_pre_time = startTime + '&' + endTime; + } else { + queryForm.report_pre_time = ''; + } + } +); // Modal const modalVisible = ref(false); @@ -605,30 +773,41 @@ let batchList = []; // Table Columns const columns = [ - { title: '排序', dataIndex: 'post_id', slotName: 'post_id',width:90 }, - { title: '订单编号', dataIndex: 'order_product_no',width:200 }, - { title: '处方编号', dataIndex: 'order_prescription_id',width:200 }, - { title: '医生姓名', dataIndex: 'doctor_name',width:100 }, - { title: '就诊人', dataIndex: 'patient_name_mask',slotName:'patient_name_mask',width:200 }, - { title: '就诊人联系电话', dataIndex: 'patient_mobile',width:130 }, - { title: '订单金额', dataIndex: 'amount_total',slotName:'amount_total' }, - { title: '实付金额', dataIndex: 'payment_amount_total',slotName:'payment_amount_total' }, + { title: '排序', dataIndex: 'post_id', slotName: 'post_id', width: 90 }, + { title: '订单编号', dataIndex: 'order_product_no', width: 200 }, + { title: '处方编号', dataIndex: 'prescription_code', slotName: 'prescription_code', width: 200 }, + { title: '医生姓名', dataIndex: 'doctor_name', width: 100 }, + { + title: '就诊人', + dataIndex: 'patient_name_mask', + slotName: 'patient_name_mask', + width: 200, + }, + { title: '就诊人联系电话', dataIndex: 'patient_mobile', width: 130 }, + { title: '订单金额', dataIndex: 'amount_total', slotName: 'amount_total' }, + { + title: '实付金额', + dataIndex: 'payment_amount_total', + slotName: 'payment_amount_total', + }, { title: '支付方式', dataIndex: 'pay_channel', slotName: 'pay_channel' }, { title: '订单状态', dataIndex: 'order_product_status', slotName: 'order_product_status', }, - { title: '支付时间', dataIndex: 'pay_time', slotName: 'pay_time',width:200 }, - { title: '操作', slotName: 'action',fixed: "right", width: 100 }, + { + title: '支付时间', + dataIndex: 'pay_time', + slotName: 'pay_time', + width: 200, + }, + { title: '操作', slotName: 'action', fixed: 'right', width: 100 }, ]; // Table Data const tableData = ref([]); - - - /** * 分页改变 * @param {Number} [page] @@ -673,39 +852,55 @@ const handleQuery = async () => { getProductInfo(params); }; - const getDetail=async(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; - express=data.order_product_logistics?JSON.parse(data.order_product_logistics.logistics_content):[]; - cur_express.value=express.length>1 && express.slice(0,1); - let data_arr=[{}]; - if(result){ - chufang_columns.forEach((item)=>{ - if(item.dataIndex=="prescription_status"){ - data_arr[0][item.dataIndex]=formatPrescriptionStatus(result[item.dataIndex]) - }else if(item.dataIndex=="pharmacist_audit_status"){ - data_arr[0][item.dataIndex]=formatPharmacistStatus(result[item.dataIndex]) - }else if(item.dataIndex=="url"){ - data_arr[0][item.dataIndex]=IMG_URL+'/applet/prescription/'+result.order_prescription_id+'.pdf' - }else if(item.dataIndex=="pharmacist_fail_reason"){ - data_arr[0][item.dataIndex]=result[item.dataIndex]?result[item.dataIndex]:'暂无' - }else{ - data_arr[0][item.dataIndex]=result[item.dataIndex] - } + let result = data.order_prescription; + express = data.order_product_logistics + ? JSON.parse(data.order_product_logistics.logistics_content) + : []; + cur_express.value = express.length > 1 && express.slice(0, 1); + let data_arr = [{}]; + if (result) { + chufang_columns.forEach((item) => { + if (item.dataIndex == 'prescription_status') { + data_arr[0][item.dataIndex] = formatPrescriptionStatus( + result[item.dataIndex] + ); + } else if (item.dataIndex == 'pharmacist_audit_status') { + data_arr[0][item.dataIndex] = formatPharmacistStatus( + result[item.dataIndex] + ); + } else if (item.dataIndex == 'url') { + data_arr[0][item.dataIndex] = + IMG_URL + + '/applet/prescription/' + + result.order_prescription_id + + '.pdf'; + } else if (item.dataIndex == 'pharmacist_fail_reason') { + data_arr[0][item.dataIndex] = result[item.dataIndex] + ? result[item.dataIndex] + : '暂无'; + } else { + data_arr[0][item.dataIndex] = result[item.dataIndex]; + } }); - chufang_data=data_arr; + chufang_data = data_arr; + } } - - } - } +}; //获取订单详情 -const handleDetail = (record) => { +const handleDetail = async(record) => { modalVisible.value = true; modalTitle.value = '药品订单详情'; - getDetail(record.order_product_id) + getDetail(record.order_product_id); + const{data,code}= await lookAddress(record.order_product_id); + + if(code==200){ + Object.assign(AddressData,data) + } }; const formatProductStatus = (val) => { @@ -740,56 +935,59 @@ const formatRefundStatus = (val) => { return ''; } }; -const formatColor=(value)=>{ - if(value=="签收"){ - return "#00B42A" - }else{ - return "var(--color-fill-4)" +const formatColor = (value) => { + if (value == '签收') { + return '#00B42A'; + } else { + return 'var(--color-fill-4)'; } - }; -const toggleExpand=()=>{ - isExpand.value=!isExpand.value; - if(isExpand.value){ - cur_express.value=express.slice(0,-1) - }else{ - cur_express.value=express.slice(0,1) - } +const toggleExpand = () => { + isExpand.value = !isExpand.value; + if (isExpand.value) { + cur_express.value = express.slice(0, -1); + } else { + cur_express.value = express.slice(0, 1); + } }; +const toggleAddress=()=>{ + lookAllAddress.value=!lookAllAddress.value; +} //关闭确认框 -const closeChange=(data)=>{ - cur_product_id.value=""; - okVisible.value=false; - if(data){ - modalVisible.value=false; +const closeChange = (data) => { + cur_product_id.value = ''; + okVisible.value = false; + if (data) { + modalVisible.value = false; getProductInfo({ ...pager, ...queryForm }); } - -} +}; //关闭上传处方平台弹框 -const closeChangeOk=(data)=>{ - order_product_id.value=""; - isVisible.value=false; - if(data){ - getDetail(modalForm.order_product_id) - } -} +const closeChangeOk = (data) => { + order_product_id.value = ''; + isVisible.value = false; + if (data) { + getDetail(modalForm.order_product_id); + } +}; + // 重置搜索 const handleResetQuery = () => { proxy.$refs.queryFormRef.resetFields(); getProductInfo(queryForm); }; -const openDcotor=()=>{ -doctor_id.value=modalForm.doctor_id; -doctorVisible.value=true; -} -const openPatient=()=>{ - Object.assign(patientData,modalForm.order_inquiry_case); - patientVisible.value=true; -} +const openDcotor = () => { + doctor_id.value = modalForm.doctor_id; + doctorVisible.value = true; +}; +const openPatient = () => { + Object.assign(patientData, modalForm.order_inquiry_case); + patientVisible.value = true; +}; onMounted(() => { getProductInfo(pager); + }); @@ -824,13 +1022,13 @@ onMounted(() => { width: 80px; height: 80px; } -.arco-timeline-item-content-wrapper{ - width:80%; +.arco-timeline-item-content-wrapper { + width: 80%; } -.arco-timeline-item-label{ +.arco-timeline-item-label { margin-left: 10px; } -.expand{ +.expand { margin-top: 15px; } diff --git a/src/views/order/order-list/index.vue b/src/views/order/order-list/index.vue index 4d786ab..7322a9e 100644 --- a/src/views/order/order-list/index.vue +++ b/src/views/order/order-list/index.vue @@ -208,7 +208,8 @@ - {{modalForm.order_inquiry_refund.success_time}} + {{modalForm.order_inquiry_refund.success_time}} + - @@ -254,14 +255,35 @@ 查看就诊人完整信息 - + + + + {{modalForm.patient_name}}  ({{modalForm.patient_sex==1?'男':'女'}}  {{modalForm.patient_age}}岁) + + + + + + + {{modalForm.order_inquiry_case.disease_class_name}}  {{modalForm.user_doctor.department_custom_name}} + + + + + + + {{modalForm.order_inquiry_case.disease_desc}} + + + +