From 7e557b1ea284b6ab9809668c103457d0d5a646a4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 30 Apr 2026 17:36:47 +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 --- .claude/settings.local.json | 3 +- admin/src/api/order.ts | 7 +- admin/src/api/tcm.ts | 7 +- .../src/components/daterange-picker/index.vue | 18 +- .../src/views/consumer/prescription/index.vue | 1 + .../consumer/prescription/order_list.vue | 436 +- .../consumer/prescription/order_list_h5.vue | 7023 +++++++++++++++++ admin/src/views/order/index.vue | 145 +- .../diagnosis/components/BloodRecordList.vue | 8 +- .../diagnosis/components/CaseRecordList.vue | 7 +- .../diagnosis/components/DietRecordList.vue | 8 +- .../components/ExerciseRecordList.vue | 8 +- admin/src/views/tcm/diagnosis/edit.vue | 409 +- admin/src/views/tcm/diagnosis/index.vue | 1 + admin/src/views/tcm/diagnosis/index_h5.vue | 1 + admin/src/views/tcm/follow/index.vue | 1 + admin/src/views/workbench/index.vue | 2 + admin/tsconfig.tsbuildinfo | 2 +- .../controller/order/OrderController.php | 39 + .../tcm/PrescriptionOrderController.php | 4 +- .../lists/tcm/PrescriptionOrderLists.php | 149 + .../logic/order/OrderActionLogLogic.php | 2 + .../app/adminapi/logic/order/OrderLogic.php | 182 +- .../logic/tcm/PrescriptionOrderLogic.php | 5 +- .../adminapi/validate/order/OrderValidate.php | 5 +- .../tcm/PrescriptionOrderValidate.php | 8 +- .../controller/GancaoCallbackController.php | 10 + server/app/command/ExpressAutoUpdate.php | 13 +- .../app/command/GancaoSyncLogisticsRoute.php | 11 + .../common/service/ExpressTrackService.php | 46 +- .../common/service/ExpressTrackingService.php | 196 +- .../gancao/GancaoLogisticsRouteService.php | 48 +- .../sql/1.9.20260430/add_order_split_menu.sql | 7 + 33 files changed, 8718 insertions(+), 94 deletions(-) create mode 100644 admin/src/views/consumer/prescription/order_list_h5.vue create mode 100644 server/sql/1.9.20260430/add_order_split_menu.sql diff --git a/.claude/settings.local.json b/.claude/settings.local.json index a366c14b..e2325159 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -10,7 +10,8 @@ "Bash(python *)", "Bash(php think *)", "Bash(python3 -c ' *)", - "Bash(python3 *)" + "Bash(python3 *)", + "Bash(awk '/ - {{ detailData.diagnosis_id }} + + {{ detailData.diagnosis_id }} + + 查看患者信息 + + {{ formatTime(detailData.create_time) }} {{ detailData.recipient_name }} @@ -968,9 +1076,17 @@ 物流轨迹

- 优先读库,无记录时走快递100;顺丰建议手机后四位正确(已自动带入收货手机)。 + 优先读库,无记录时走快递100。顺丰会校验单号+电话(快递100要求完整手机号更易通过);默认预填订单收货手机,若仍提示验证码错误请改成与顺丰面单一致的号码。

+ @@ -1380,6 +1496,7 @@ + @@ -1654,6 +1771,7 @@ + @@ -2132,11 +2250,14 @@
+ + + + + diff --git a/admin/src/views/order/index.vue b/admin/src/views/order/index.vue index ca055cbe..1ff526c5 100644 --- a/admin/src/views/order/index.vue +++ b/admin/src/views/order/index.vue @@ -49,6 +49,7 @@ + @@ -199,7 +200,7 @@ - + + + + + { 3: '药品费用', 4: '首付费用', 5: '尾款费用', - 6:'其他费用', - 7:'全部费用', + 6: '其他费用', + 7: '全部费用', + 8: '驼奶费用', } return typeMap[type] || '未知' } @@ -1210,6 +1285,68 @@ const submitEditOrder = async () => { } } +/** 拆分订单(待支付 / 已支付 / 付呗待审核) */ +const splitDialogVisible = ref(false) +const splitSource = ref(null) +const splitPartCount = ref(2) +const splitAmounts = ref([]) +const splitOrderTypes = ref([]) +const splitLoading = ref(false) + +const redistributeSplitAmounts = () => { + if (!splitSource.value) return + const total = Number(splitSource.value.amount) + const n = Math.max(2, Math.min(20, Math.floor(Number(splitPartCount.value) || 2))) + splitPartCount.value = n + const cents = Math.round(total * 100) + const base = Math.floor(cents / n) + const rem = cents % n + const next: number[] = [] + for (let i = 0; i < n; i++) { + const c = base + (i < rem ? 1 : 0) + next.push(c / 100) + } + const prevTypes = [...splitOrderTypes.value] + const defaultType = Number(splitSource.value.order_type ?? 6) + splitOrderTypes.value = next.map((_, i) => (i < prevTypes.length ? prevTypes[i]! : defaultType)) + splitAmounts.value = next +} + +const openSplitOrder = (row: any) => { + splitSource.value = row + splitPartCount.value = 2 + redistributeSplitAmounts() + splitDialogVisible.value = true +} + +const splitSum = computed(() => splitAmounts.value.reduce((s, x) => s + Number(x || 0), 0)) + +const splitSumMatches = computed(() => { + if (!splitSource.value) return false + const orig = Number(splitSource.value.amount) + return Math.abs(splitSum.value - orig) < 0.0001 +}) + +const submitSplitOrder = async () => { + if (!splitSource.value || !splitSumMatches.value) return + splitLoading.value = true + try { + await orderSplit({ + id: splitSource.value.id, + amounts: splitAmounts.value.map((x) => Number(x)), + order_types: splitOrderTypes.value.map((x) => Number(x)) + }) + feedback.msgSuccess('拆分成功') + splitDialogVisible.value = false + getLists() + fetchTodayRevenue() + } catch (e: any) { + if (e?.msg) feedback.msgError(e.msg) + } finally { + splitLoading.value = false + } +} + // 查看详情 const handleDetail = async (row: any) => { try { diff --git a/admin/src/views/tcm/diagnosis/components/BloodRecordList.vue b/admin/src/views/tcm/diagnosis/components/BloodRecordList.vue index 46dcde3a..251eb046 100644 --- a/admin/src/views/tcm/diagnosis/components/BloodRecordList.vue +++ b/admin/src/views/tcm/diagnosis/components/BloodRecordList.vue @@ -1,7 +1,7 @@