-
- 需代收
-
+
+
+
总金额
+
- ¥{{ formatMoney(detailAgencyToCollect) }}
-
-
-
-
-
- 已付笔数
- {{ detailLinkedPayOrders.length }} 笔
-
-
-
+ 修改
+
+
+ ¥{{ detailData.amount }}
+
+
+ 已付总额
+ ¥{{ detailData.linked_pay_paid_total || 0 }}
+
+
+ 退款金额
+
+ ¥{{ formatMoney(detailData.refund_amount || 0) }}
+
+
+
+ 需代收
+
+ ¥{{ formatMoney(detailAgencyToCollect) }}
+
+
+
+ 已付笔数
+ {{ detailLinkedPayOrders.length }} 笔
+
+
@@ -2507,7 +2507,8 @@ import {
Wallet,
User
} from '@element-plus/icons-vue'
-import DaterangePicker from '@/components/daterange-picker/index.vue'
+import ListTimeFilter from '@/components/list-time-filter/index.vue'
+import { useListTimeFilter } from '@/hooks/useListTimeFilter'
import {
prescriptionOrderAuditPayment,
prescriptionOrderAuditPrescription,
@@ -2805,9 +2806,6 @@ function handleExpressCompanyTabClick(value: '' | 'sf' | 'jd') {
}
const queryParams = reactive({
- /** 创建时间区间(与列表筛选一致;不影响「今日」统计) */
- start_time: '' as string,
- end_time: '' as string,
order_no: '',
prescription_id: '' as string | number,
/** 诊单患者姓名/手机号(后台关联 diagnosis) */
@@ -2886,8 +2884,26 @@ function handleFocusBoardSearch(key: 'pendingRx' | 'pendingPay' | 'pendingShip'
resetPage()
}
+const {
+ time_type,
+ dateRange,
+ resolve: resolveCreateTimeRange,
+ handleTimeTypeChange,
+ handleCustomDateChange,
+ resetTimeFilter,
+} = useListTimeFilter('all')
+
+const handleQuery = () => {
+ pager.page = 1
+ getLists()
+}
+
+const onTimeTypeChange = () => handleTimeTypeChange(handleQuery)
+const onCustomDateChange = () => handleCustomDateChange(handleQuery)
+
async function fetchLists(params: Record) {
- const p: Record = { ...params }
+ const [start_time, end_time] = resolveCreateTimeRange()
+ const p: Record = { ...params, start_time, end_time }
if (p.prescription_id === '' || p.prescription_id === undefined) {
delete p.prescription_id
} else {
@@ -3041,9 +3057,7 @@ const listStats = computed(() => {
scopeHint =
'统计口径:本人创建的订单 + 关联处方开方人为本人的订单(含医助代建);与下方筛选项(不含「创建时间」)一致'
}
- const hasCustomTime =
- String(queryParams.start_time || '').trim() !== '' && String(queryParams.end_time || '').trim() !== ''
- const headPrefix = hasCustomTime ? '区间' : '今日'
+ const headPrefix = time_type.value === 'all' ? '全部' : time_type.value === 'today' ? '今日' : '区间'
return {
order: n(o),
pay: n(pay),
@@ -3114,8 +3128,7 @@ watch(
function handleReset() {
activeFocusKey.value = ''
- queryParams.start_time = ''
- queryParams.end_time = ''
+ resetTimeFilter()
queryParams.order_no = ''
queryParams.prescription_id = ''
queryParams.patient_keyword = ''
@@ -3381,11 +3394,11 @@ const h5FilterCollapsed = ref(true)
const h5ActiveFilterCount = computed(() => {
const q = queryParams as any
const keys = [
- 'start_time', 'end_time', 'order_no', 'prescription_id',
+ 'order_no', 'prescription_id',
'patient_keyword', 'express_keyword', 'doctor_id',
'assistant_dept_id', 'assistant_id'
]
- let n = 0
+ let n = time_type.value !== 'all' ? 1 : 0
for (const k of keys) {
const v = q[k]
if (v === null || v === undefined) continue
@@ -5520,6 +5533,12 @@ async function downloadPrescriptionSlipPdf() {