From 243d5ced2c9cd4bd9768b7c2d60a5419b7e26970 Mon Sep 17 00:00:00 2001 From: ChenQiuYu Date: Mon, 12 May 2025 16:59:35 +0800 Subject: [PATCH 1/3] dev --- src/views/charge/index.vue | 178 ++++++++++++------------------------- 1 file changed, 59 insertions(+), 119 deletions(-) diff --git a/src/views/charge/index.vue b/src/views/charge/index.vue index f38401e..e185953 100644 --- a/src/views/charge/index.vue +++ b/src/views/charge/index.vue @@ -18,7 +18,7 @@ @selectedCallBack="diagnosisSelect" ref="diagnosisSearchRef" :show-header="false" - :disabled="statusDisabled==1||formData.status==1" + :disabled="statusDisabled==1" > @@ -30,7 +30,7 @@ @change="handleChange" clearable style="width: 100%" - :disabled="statusDisabled==1||formData.status==1" + :disabled="formData.status == 1" >
+ @totalPriceChange="getOrderTotalPrice">
+ @totalPriceChange="getOrderTotalPrice">
@@ -139,89 +139,21 @@ const checkTraceCode = (goodsList: any[]) => { } return true; } - const checkoutDetailRef = ref() - const openCheckoutDetail = (goodsList: any[]) => { - if (!goodsList || goodsList.length == 0) { - ElMessage({ - message: '没有商品信息,请先选择需要售卖的商品', - type: 'info', - plain: true, - }); - return - } - nextTick(() => { - checkoutDetailRef.value.init(goodsList); - }) +const checkoutDetailRef = ref() +const openCheckoutDetail = (goodsList: any[]) => { + if (!goodsList || goodsList.length == 0) { + ElMessage({ + message: '没有商品信息,请先选择需要售卖的商品', + type: 'info', + plain: true, + }); + return } + nextTick(() => { + checkoutDetailRef.value.init(goodsList); + }) +} - const saveAndCharge = () => { - post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => { - formData.value.code = res - nextTick(() => { - settlementRef.value?.init(res) - }) - }) - } - const diagnosisSearchRef = ref() - const diagnosisSearchApi = "social/diagnose/search" - const diagnosisShowConfig = [ - { - label: "诊断名称", - prop: "name", - }, - { - label: "诊断编码", - prop: "code", - } - ] - const diagnosisSelect = (list: any) => { - const diagnosisNames = list.map((item: any) => item.name).join(',') - formData.value.diagnosisMedicalRecord.diagnosisDetail = JSON.stringify(list) - formData.value.diagnosisMedicalRecord.diagnosisSummary = diagnosisNames - } - const recordsConsumptionRef = ref("") - const patientCardRef = ref() - const clickItem = async (item: any, status: any) => { - statusDisabled.value = status - formData.value = await post('medical/record/getByDiagnosisCode', {diagnosisCode: item.code}) - //添加追溯码应采字段 - for (let i =0;i { - let list = JSON.parse(formData.value.diagnosisMedicalRecord.diagnosisDetail) - let nList = formData.value.diagnosisMedicalRecord.diagnosisSummary.split(',') - diagnosisSearchRef.value?.init(list, nList); - recordsConsumptionRef.value?.init(formData.value.patientInfo.id); - patientCardRef.value?.init(formData.value.registrationId); - }) - } - const dockerList = ref([]) - const getDockerList = () => { - let query = { - role: 1 - } - post('organization/member/search', {query: query}).then((res: any) => { - dockerList.value = res - }) - } - const orderCompleted = () => { - nextTick(() => { - chargeQueueRef.value?.getOrderList() - }) - } - const orderCanceled = () => { - nextTick(() => { - chargeQueueRef.value?.getOrderList() - }) const saveAndCharge = () => { post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => { formData.value.code = res @@ -252,7 +184,17 @@ const patientCardRef = ref() const clickItem = async (item: any, status: any) => { statusDisabled.value = status formData.value = await post('medical/record/getByDiagnosisCode', {diagnosisCode: item.code}) - formData.value.doctorId = formData.value.patientRegistration.organizationDoctorId + //添加追溯码应采字段 + for (let i =0;i { let list = JSON.parse(formData.value.diagnosisMedicalRecord.diagnosisDetail) @@ -272,8 +214,6 @@ const getDockerList = () => { }) } const orderCompleted = () => { - getDockerList() - list() nextTick(() => { chargeQueueRef.value?.getOrderList() }) @@ -283,46 +223,46 @@ const orderCanceled = () => { chargeQueueRef.value?.getOrderList() }) - } +} - onMounted(() => { - getDockerList() - list() +onMounted(() => { + getDockerList() + list() +}) +const getOrderTotalPrice = () => { + let totalPrice = 0 + formData.value.itemDetail?.forEach((item: any) => { + totalPrice += item.selectedPrice * item.selectedNum }) - const getOrderTotalPrice = () => { - let totalPrice = 0 - formData.value.itemDetail?.forEach((item: any) => { - totalPrice += item.selectedPrice * item.selectedNum - }) - formData.value.goodsDetail.forEach((item: any) => { - totalPrice += item.selectedPrice * item.selectedNum - }) - formData.value.preTotalPrice = totalPrice - formData.value.totalPrice = totalPrice - } + formData.value.goodsDetail.forEach((item: any) => { + totalPrice += item.selectedPrice * item.selectedNum + }) + formData.value.preTotalPrice = totalPrice + formData.value.totalPrice = totalPrice +} - const props = { - expandTrigger: 'hover' as const, - } +const props = { + expandTrigger: 'hover' as const, +} - const doctorId = ref('') - const handleChange = (value: any) => { - doctorId.value = value[value.length - 1] - } +const doctorId = ref('') +const handleChange = (value: any) => { + doctorId.value = value[value.length - 1] +} - const cardTypeList = ref(Object.entries(psnCertTypes).map(([id, name]) => ({id, name}))) - const doctorList = ref([]) - const sectionDoctorOption = ref('') - const list = () => { - post(apiConfig.OrganizationMemberSearch, {query: {role: 1}}).then((res: any) => { - doctorList.value = res - }) - } +const cardTypeList = ref(Object.entries(psnCertTypes).map(([id, name]) => ({id, name}))) +const doctorList = ref([]) +const sectionDoctorOption = ref('') +const list = () => { + post(apiConfig.OrganizationMemberSearch, {query: {role: 1}}).then((res: any) => { + doctorList.value = res + }) +} const getStatus=(status:any)=>{ - statusDisabled.value = status + console.log(111) formData.value = { patientInfo: {}, diagnosisMedicalRecord: {}, From 2562377b7fc398995e7e8f4bd10b603f4385dd40 Mon Sep 17 00:00:00 2001 From: NiuZiYuan Date: Mon, 12 May 2025 17:01:30 +0800 Subject: [PATCH 2/3] dev --- src/components/inventory/GoodsSearch.vue | 3 +- .../inventory/purchase/AddOrder.vue | 38 ++++++++++++++++++- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/components/inventory/GoodsSearch.vue b/src/components/inventory/GoodsSearch.vue index 5488449..63a54a5 100644 --- a/src/components/inventory/GoodsSearch.vue +++ b/src/components/inventory/GoodsSearch.vue @@ -25,9 +25,10 @@ const handleSelect = (item: any) => { unitPrice: goods.unitPrice, packagingUnit: goods.packagingUnit, minPackagingUnit: goods.minPackagingUnit, - + idCode: (goods.idCode&&goods.idCode != "")?goods.idCode.split(","):[], goodId: goods.id, name: goods.name, + traceabilityCodeList:[], wholeNumber: 0, purchaseUnitPrice: goods.purchaseUnitPrice, disassemblyPrice : goods.disassemblyPrice diff --git a/src/components/inventory/purchase/AddOrder.vue b/src/components/inventory/purchase/AddOrder.vue index 32dfaa4..b4283ae 100644 --- a/src/components/inventory/purchase/AddOrder.vue +++ b/src/components/inventory/purchase/AddOrder.vue @@ -133,8 +133,19 @@ size="small" style="width: 100px;"/> - + + + + + @@ -157,7 +168,7 @@ - +