diff --git a/admin/src/views/consumer/prescription/index.vue b/admin/src/views/consumer/prescription/index.vue
index b2cc5cde..4fa36ded 100644
--- a/admin/src/views/consumer/prescription/index.vue
+++ b/admin/src/views/consumer/prescription/index.vue
@@ -38,6 +38,18 @@
未通过
驳回
+
+ 来源
+
+ 全部
+ 手工
+ 系统代开
+
@@ -1259,9 +1283,11 @@ import feedback from '@/utils/feedback'
import type { FormInstance, FormRules } from 'element-plus'
import DaterangePicker from '@/components/daterange-picker/index.vue'
import { Search } from '@element-plus/icons-vue'
-import { computed, onMounted, reactive, ref, watch, nextTick } from 'vue'
+import { computed, onMounted, reactive, ref, watch, nextTick, defineAsyncComponent } from 'vue'
import { useRouter } from 'vue-router'
+const TcmDiagnosisEditView = defineAsyncComponent(() => import('@/views/tcm/diagnosis/edit.vue'))
+
/** 与 server/config/project.php prescription_audit_roles 保持一致 */
const PRESCRIPTION_AUDIT_ROLE_IDS = [0, 3]
@@ -1289,6 +1315,8 @@ const formData = reactive({
creator_ids: [] as number[],
/** all | passed | not_passed | pending | rejected(all 表示不限,接口传参会转为空) */
audit_filter: 'all' as string,
+ /** all | manual | system — 与 is_system_auto:手工(0) / 系统代开(1) */
+ source_filter: 'all' as string,
start_time: '',
end_time: ''
})
@@ -1621,13 +1649,13 @@ function resetCreateOrderForm() {
createOrderFormRef.value?.clearValidate()
}
+/** 仅按定金门槛抬升「总金额」,不跟已选支付单合计联动(由用户自填) */
function syncCreateOrderAmountFromRules() {
const min = createOrderDepositMin.value
- const paid = createOrderLinkedPaidTotal.value
- const floor = min > 0 ? Math.round(min * 100) / 100 : 0
- const need = min > 0 ? Math.max(paid, floor) : paid > 0 ? paid : 0
- if (need > 0 && Number(createOrderForm.amount) < need) {
- createOrderForm.amount = Math.round(need * 100) / 100
+ if (min <= 0) return
+ const need = Math.round(min * 100) / 100
+ if (Number(createOrderForm.amount) < need) {
+ createOrderForm.amount = need
}
}
@@ -1664,15 +1692,11 @@ watch(
}
)
-watch(
- () => [...createOrderForm.pay_order_ids],
- () => {
- syncCreateOrderAmountFromRules()
- },
- { deep: true }
-)
-
async function openCreateOrderFromPrescription(row: any) {
+ if (Number(row?.void_status) === 1) {
+ feedback.msgWarning('已作废处方不可创建业务订单')
+ return
+ }
resetCreateOrderForm()
createOrderPrescription.value = row
const did = Number(row.diagnosis_id) || 0
@@ -1889,6 +1913,19 @@ const editForm = reactive({
times_per_day: 2
})
+const diagnosisViewRef = ref<{
+ openViewOnly: (id: number) => Promise
+} | null>(null)
+
+function openDiagnosisPatientDetail() {
+ const id = Number(editForm.diagnosis_id)
+ if (!id) {
+ feedback.msgWarning('本处方未关联诊单,无法查看诊单患者信息')
+ return
+ }
+ void diagnosisViewRef.value?.openViewOnly(id)
+}
+
// 标志:是否正在加载数据(防止watch函数覆盖已加载的值)
const isLoadingData = ref(false)
@@ -1940,10 +1977,12 @@ const rules: FormRules = {
}
async function fetchPrescriptionLists(params: Record) {
- const { audit_filter, creator_ids, ...rest } = params
+ const { audit_filter, source_filter, creator_ids, ...rest } = params
const payload: Record = {
...rest,
- audit_filter: audit_filter === 'all' || audit_filter === '' ? '' : audit_filter
+ audit_filter: audit_filter === 'all' || audit_filter === '' ? '' : audit_filter,
+ source_filter:
+ source_filter === 'all' || source_filter === '' || source_filter === undefined ? '' : source_filter
}
if (Array.isArray(creator_ids) && creator_ids.length > 0) {
payload.creator_ids = creator_ids
@@ -1993,6 +2032,10 @@ function onAuditFilterChange() {
resetPage()
}
+function onSourceFilterChange() {
+ resetPage()
+}
+
let syncingDateTab = false
watch(
() => [formData.start_time, formData.end_time],
@@ -2039,6 +2082,7 @@ function resetParams() {
formData.patient_name = ''
formData.creator_ids = []
formData.audit_filter = 'all'
+ formData.source_filter = 'all'
formData.start_time = ''
formData.end_time = ''
syncingDateTab = false
diff --git a/admin/src/views/consumer/prescription/order_list.vue b/admin/src/views/consumer/prescription/order_list.vue
index 158b6a27..da75620d 100644
--- a/admin/src/views/consumer/prescription/order_list.vue
+++ b/admin/src/views/consumer/prescription/order_list.vue
@@ -62,7 +62,77 @@
+
+
+
+
+
+
+
+ {{ listStats.orderHeading }}
+
+
+ ¥{{ listStats.orderStr }}
+
+
+
+
+
+
+
+ {{ listStats.periodLine }}
+
+
+ {{ listStats.scopeHint }}
+
+
+
+
+
+
+
+
+ {{ listStats.payHeading }}
+
+
+ ¥{{ listStats.payStr }}
+
+
+
+
+
+
+
+ {{ listStats.periodLine }}
+
+
+ 所选时间内创建订单所关联的支付单金额(与「实付(关联)」含义一致;不含创建时间时默认今日)
+
+
+
+
+
+
-
+
总金额
¥{{ detailData.amount }}
-
+
已付总额
¥{{ detailData.linked_pay_paid_total || 0 }}
-
+
+
+ 需代收
+
+ ¥{{ formatMoney(detailAgencyToCollect) }}
+
+
+
+
已付笔数
{{ detailLinkedPayOrders.length }} 笔
@@ -1767,7 +1848,8 @@
@@ -1252,7 +1279,15 @@ defineExpose({