1. 推广员功能增强
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled

This commit is contained in:
李琦
2026-06-15 14:01:30 +08:00
parent 4090c2ca3a
commit 9a1435996e
4 changed files with 23 additions and 27 deletions

View File

@@ -14,6 +14,8 @@ export interface RegisterOrderItem {
doctor_info?: { name: string; depart?: { name: string } };
user_patient?: { name: string };
store?: { name: string };
salesperson_id?: number;
salesperson?: { id: number; nick_name: string; avatar?: string };
prescription?: { id: number; prescription_no: string }[];
}

View File

@@ -16,8 +16,9 @@ export const gridOptions: VxeGridProps<RegisterOrderItem> = {
{ field: 'doctor_info.depart.name', title: '科室' },
{ field: 'user_patient.name', title: '就诊人名称' },
{ field: 'store.name', title: '开方诊所' },
{ field: 'salesperson', title: '推广员', slots: { default: 'salesperson' } },
{ field: 'type', title: '挂号类型', slots: { default: 'type' } },
{ field: 'prescription', title: '处方', slots: { default: 'prescription'} },
{ field: 'prescription', title: '处方', width: 240, slots: { default: 'prescription'} },
{ field: 'price', title: '挂号价格', width: 110, slots: { default: 'price' } },
{ field: 'is_pay', title: '是否支付', width: 100, slots: { default: 'is_pay' } },
{ field: 'status', title: '状态', slots: { default: 'status' } },

View File

@@ -4,14 +4,13 @@ import type { VxeGridListeners } from '#/adapter/vxe-table';
import { nextTick, onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import { Page, useVbenDrawer, useVbenModal } from '@vben/common-ui';
import { Page, useVbenModal } from '@vben/common-ui';
import { Button, message, Modal as AntdModal, Tag } from 'ant-design-vue';
import { Button, Image, message, Modal as AntdModal, Tag } from 'ant-design-vue';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { TableAction } from '#/components/table-action';
import { simulatePayApi } from '#/views/business/order/api/order-ops';
import OrderTraceDrawer from '#/views/business/order/components/order-trace-drawer.vue';
import PrescriptionDetail from '#/views/doctor/doctor-reception/components/PrescriptionDetail.vue';
import { formOptions } from './config/search';
@@ -56,26 +55,13 @@ const [PrescriptionDetailModal, PrescriptionDetailModalApi] = useVbenModal({
connectedComponent: PrescriptionDetail,
});
const [TraceDrawer, traceDrawerApi] = useVbenDrawer({
connectedComponent: OrderTraceDrawer,
});
function openPrescriptionDetail(id: number) {
PrescriptionDetailModalApi.setData({
values: { id },
values: id,
});
PrescriptionDetailModalApi.open();
}
function openOrderTrace(row: Record<string, any>) {
traceDrawerApi.setData({
scene: 'register',
order_id: row.id,
order_no: row.order_no,
});
traceDrawerApi.open();
}
function handleSimulatePay(row: Record<string, any>) {
AntdModal.confirm({
title: '模拟支付',
@@ -102,7 +88,6 @@ function formatRegisterPrice(price: unknown) {
<template>
<Page auto-content-height title="订单管理">
<PrescriptionDetailModal />
<TraceDrawer />
<Grid>
<template #toolbar-buttons>
<TableAction :actions="[]" :drop-down-actions="[]">
@@ -121,6 +106,18 @@ function formatRegisterPrice(price: unknown) {
</Button>
</div>
</template>
<template #salesperson="{ row }">
<div v-if="row.salesperson?.id" class="flex items-center gap-2 text-sm">
<Image
:src="row.salesperson.avatar || '/img/user-default-avatar.png'"
:width="28"
:height="28"
class="rounded-full object-cover"
/>
<span>{{ row.salesperson.nick_name || '—' }}</span>
</div>
<span v-else class="text-sm text-gray-500">无推广员</span>
</template>
<template #price="{ row }">
<span>{{ formatRegisterPrice(row.price) }}</span>
</template>
@@ -152,14 +149,7 @@ function formatRegisterPrice(price: unknown) {
<template #toolbar-tools></template>
<template #action="{ row }">
<TableAction
:actions="[
{
label: '溯源',
type: 'link',
icon: 'mdi:timeline-text',
onClick: openOrderTrace.bind(null, row),
},
]"
:actions="[]"
:drop-down-actions="[
{
label: '模拟支付',

View File

@@ -2055,6 +2055,9 @@ watch(
<div class="patient-info">
<h3>{{ patient.user_patient.name }}</h3>
<p class="phone">{{ patient.user_patient.mobile }}</p>
<p class="text-sm text-gray-500">
推广员{{ patient.salesperson?.nick_name || '无' }}
</p>
<span :class="getRegisterStatus(patient.status)" class="status">{{
getRegisterStatus(patient.status)
}}</span>