更新
This commit is contained in:
@@ -550,6 +550,7 @@
|
||||
|
||||
<div class="prescription-preview-content">
|
||||
<div v-if="savedPrescription" ref="prescriptionPrintRef" class="rx-paper">
|
||||
<div class="rx-title">{{ prescriptionTabType === 'internal' ? '药房联' : SLIP_TITLE }}</div>
|
||||
<div class="rx-notice">
|
||||
<span class="rx-notice-text">
|
||||
服药前请核对姓名、电话、医生等信息以及服法、医嘱等要点
|
||||
@@ -1622,6 +1623,8 @@ async function handlePasteRecipeImport() {
|
||||
}
|
||||
}
|
||||
|
||||
const SLIP_TITLE = '成都双流甄养堂互联网医院 处方笺'
|
||||
|
||||
const templateConfig = reactive({
|
||||
stationName: '成都双流甄养堂互联网医院',
|
||||
showDisclaimer: true,
|
||||
@@ -2693,6 +2696,15 @@ defineExpose({
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.rx-title {
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
margin: 10px 0 35px;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.rx-notice {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -2363,7 +2363,7 @@
|
||||
|
||||
<!-- A4 处方纸(药房联) -->
|
||||
<div v-if="prescriptionViewData" ref="prescriptionSlipPrintRef" class="rx-paper">
|
||||
<div class="rx-title">{{ prescriptionTabType === 'internal' ? '药房联' : '处方单' }}</div>
|
||||
<div class="rx-title">{{ prescriptionTabType === 'internal' ? '药房联' : SLIP_TITLE }}</div>
|
||||
<div class="rx-notice">
|
||||
<span class="rx-notice-text">
|
||||
服药前请核对姓名、电话、医生等信息以及服法、医嘱等要点
|
||||
@@ -5495,6 +5495,7 @@ async function confirmRevokePayAudit(row: { id: number }) {
|
||||
// ─── 查看处方详情(处方单样式)────────────────────────────────────────────
|
||||
/** 处方笺抬头/页脚(与诊间打印一致) */
|
||||
const SLIP_HOSPITAL_NAME = '成都双流甄养堂互联网医院'
|
||||
const SLIP_TITLE = `${SLIP_HOSPITAL_NAME} 处方笺`
|
||||
const SLIP_COMPANY_LINE = '成都双流甄养堂互联网医院有限公司 联系方式:4001667339'
|
||||
const SLIP_ADDRESS_LINE = '地址:四川省成都市双流区黄甲街道黄龙大道二段280号'
|
||||
|
||||
|
||||
@@ -2091,7 +2091,7 @@
|
||||
|
||||
<!-- A4 处方纸(药房联) -->
|
||||
<div v-if="prescriptionViewData" ref="prescriptionSlipPrintRef" class="rx-paper">
|
||||
<div class="rx-title">处方单</div>
|
||||
<div class="rx-title">{{ SLIP_TITLE }}</div>
|
||||
<div class="rx-notice">
|
||||
<span class="rx-notice-text">
|
||||
服药前请核对姓名、电话、医生等信息以及服法、医嘱等要点
|
||||
@@ -4784,6 +4784,7 @@ async function confirmRevokePayAudit(row: { id: number }) {
|
||||
// ─── 查看处方详情(处方单样式)────────────────────────────────────────────
|
||||
/** 处方笺抬头/页脚(与诊间打印一致) */
|
||||
const SLIP_HOSPITAL_NAME = '成都双流甄养堂互联网医院'
|
||||
const SLIP_TITLE = `${SLIP_HOSPITAL_NAME} 处方笺`
|
||||
const SLIP_COMPANY_LINE = '成都双流甄养堂互联网医院有限公司 联系方式:4001667339'
|
||||
const SLIP_ADDRESS_LINE = '地址:四川省成都市双流区黄甲街道黄龙大道二段280号'
|
||||
|
||||
|
||||
@@ -405,6 +405,18 @@
|
||||
</div>
|
||||
<el-table v-loading="linesLoading" :data="linesRows" border stripe size="small" max-height="440">
|
||||
<el-table-column prop="order_no" label="业务订单号" min-width="128" show-overflow-tooltip />
|
||||
<el-table-column label="患者" min-width="112" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div class="cs-patient-cell">
|
||||
<span class="cs-patient-cell__name">{{ row.patient_name || '—' }}</span>
|
||||
<span v-if="row.patient_phone || row.patient_gender_text" class="cs-patient-cell__meta cs-muted">
|
||||
<template v-if="row.patient_gender_text">{{ row.patient_gender_text }}</template>
|
||||
<template v-if="row.patient_gender_text && row.patient_phone"> · </template>
|
||||
<template v-if="row.patient_phone">{{ row.patient_phone }}</template>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="快递单号" min-width="132" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.tracking_number || '—' }}</template>
|
||||
</el-table-column>
|
||||
@@ -492,6 +504,18 @@
|
||||
</div>
|
||||
<el-table v-loading="leafOrdersLoading" :data="leafOrdersRows" border stripe size="small" max-height="440">
|
||||
<el-table-column prop="order_no" label="业务订单号" min-width="128" show-overflow-tooltip />
|
||||
<el-table-column label="患者" min-width="112" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div class="cs-patient-cell">
|
||||
<span class="cs-patient-cell__name">{{ row.patient_name || '—' }}</span>
|
||||
<span v-if="row.patient_phone || row.patient_gender_text" class="cs-patient-cell__meta cs-muted">
|
||||
<template v-if="row.patient_gender_text">{{ row.patient_gender_text }}</template>
|
||||
<template v-if="row.patient_gender_text && row.patient_phone"> · </template>
|
||||
<template v-if="row.patient_phone">{{ row.patient_phone }}</template>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="快递单号" min-width="132" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.tracking_number || '—' }}</template>
|
||||
</el-table-column>
|
||||
@@ -948,10 +972,8 @@ async function loadLeafOrders(page: number) {
|
||||
page_size: leafOrdersPageSize.value,
|
||||
}
|
||||
if (d.mode === 'dept') {
|
||||
p.dept_ids = String(d.dept_id)
|
||||
if (selectedChannel.value) {
|
||||
p.channel_code = selectedChannel.value
|
||||
}
|
||||
Object.assign(p, buildQueryParams())
|
||||
p.table_row_dept_id = d.dept_id
|
||||
} else {
|
||||
Object.assign(p, buildQueryParams())
|
||||
p.appt_channel_value = d.appt_channel_value
|
||||
@@ -1981,6 +2003,21 @@ onMounted(async () => {
|
||||
|
||||
.cs-muted { color: var(--cs-muted); }
|
||||
|
||||
.cs-patient-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.cs-patient-cell__name {
|
||||
color: var(--cs-ink, #0f172a);
|
||||
}
|
||||
|
||||
.cs-patient-cell__meta {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ============ Element Plus overrides (scoped via deep) ============ */
|
||||
.cs-page {
|
||||
:deep(.el-input__wrapper),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1291,4 +1291,121 @@ class ExpressTrackingService
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提成结算 overview 等大批量场景:按订单批量从库表推导签收时间(不调用快递100)。
|
||||
* 语义与 YejiStatsLogic 物流子查询 / effectiveSignUnixFromTrackingDetail 对齐。
|
||||
*
|
||||
* @param list<array{order_id: int, tracking_number?: string}> $items
|
||||
*
|
||||
* @return array<int, int> order_id => sign unix
|
||||
*/
|
||||
public static function batchResolveSignUnixFromDbForOrders(array $items): array
|
||||
{
|
||||
if ($items === []) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$orderIds = [];
|
||||
$tnByOrder = [];
|
||||
$trackingNums = [];
|
||||
foreach ($items as $it) {
|
||||
if (!is_array($it)) {
|
||||
continue;
|
||||
}
|
||||
$oid = (int) ($it['order_id'] ?? 0);
|
||||
if ($oid <= 0) {
|
||||
continue;
|
||||
}
|
||||
$orderIds[$oid] = true;
|
||||
$tn = trim((string) ($it['tracking_number'] ?? ''));
|
||||
$tnByOrder[$oid] = $tn;
|
||||
if ($tn !== '') {
|
||||
$trackingNums[$tn] = true;
|
||||
}
|
||||
}
|
||||
$orderIds = array_keys($orderIds);
|
||||
if ($orderIds === []) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$trackingById = [];
|
||||
$orderToTrackingIds = [];
|
||||
$tnToTrackingIds = [];
|
||||
|
||||
$attachTrackingRow = static function (array $etRow) use (&$trackingById, &$orderToTrackingIds, &$tnToTrackingIds): void {
|
||||
$tid = (int) ($etRow['id'] ?? 0);
|
||||
if ($tid <= 0) {
|
||||
return;
|
||||
}
|
||||
$trackingById[$tid] = $etRow;
|
||||
$oid = (int) ($etRow['order_id'] ?? 0);
|
||||
if ($oid > 0) {
|
||||
$orderToTrackingIds[$oid][$tid] = true;
|
||||
}
|
||||
$tn = trim((string) ($etRow['tracking_number'] ?? ''));
|
||||
if ($tn !== '') {
|
||||
$tnToTrackingIds[$tn][$tid] = true;
|
||||
}
|
||||
};
|
||||
|
||||
foreach (array_chunk($orderIds, 800) as $chunk) {
|
||||
$byOrderId = ExpressTracking::with(['traces' => static function ($query): void {
|
||||
$query->order('trace_time_stamp', 'desc');
|
||||
}])
|
||||
->whereIn('order_id', $chunk)
|
||||
->whereNull('delete_time')
|
||||
->select();
|
||||
foreach ($byOrderId as $tracking) {
|
||||
$row = $tracking->toArray();
|
||||
$row['traces'] = $tracking->traces ? $tracking->traces->toArray() : [];
|
||||
$attachTrackingRow($row);
|
||||
}
|
||||
}
|
||||
|
||||
$trackingNumList = array_keys($trackingNums);
|
||||
if ($trackingNumList !== []) {
|
||||
foreach (array_chunk($trackingNumList, 400) as $chunk) {
|
||||
$byTn = ExpressTracking::with(['traces' => static function ($query): void {
|
||||
$query->order('trace_time_stamp', 'desc');
|
||||
}])
|
||||
->whereRaw('TRIM(`tracking_number`) IN (' . implode(',', array_fill(0, count($chunk), '?')) . ')', $chunk)
|
||||
->whereNull('delete_time')
|
||||
->select();
|
||||
foreach ($byTn as $tracking) {
|
||||
$row = $tracking->toArray();
|
||||
$row['traces'] = $tracking->traces ? $tracking->traces->toArray() : [];
|
||||
$attachTrackingRow($row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$out = [];
|
||||
foreach ($orderIds as $oid) {
|
||||
$oid = (int) $oid;
|
||||
$candidateIds = [];
|
||||
foreach (array_keys($orderToTrackingIds[$oid] ?? []) as $tid) {
|
||||
$candidateIds[(int) $tid] = true;
|
||||
}
|
||||
$tn = $tnByOrder[$oid] ?? '';
|
||||
if ($tn !== '') {
|
||||
foreach (array_keys($tnToTrackingIds[$tn] ?? []) as $tid) {
|
||||
$candidateIds[(int) $tid] = true;
|
||||
}
|
||||
}
|
||||
$best = 0;
|
||||
foreach (array_keys($candidateIds) as $tid) {
|
||||
$detail = $trackingById[(int) $tid] ?? null;
|
||||
if (!is_array($detail)) {
|
||||
continue;
|
||||
}
|
||||
$best = max($best, self::effectiveSignUnixFromTrackingDetail($detail));
|
||||
}
|
||||
if ($best > 0) {
|
||||
$out[$oid] = $best;
|
||||
}
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user