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
CI / CI OK (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
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
CI / CI OK (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
This commit is contained in:
@@ -15,6 +15,11 @@ export async function getDoctorList(data: any) {
|
||||
export async function getDepartOptionApi() {
|
||||
return requestClient.get<any>(`${prefix}depart-option`);
|
||||
}
|
||||
|
||||
/** 诊疗科目下拉(互联网医院组包 subjects_id) */
|
||||
export async function getSubjectsOptionApi() {
|
||||
return requestClient.get<any>(`${prefix}subjects-option`);
|
||||
}
|
||||
/**
|
||||
* 分页查询用户列表
|
||||
* @param data
|
||||
@@ -56,6 +61,11 @@ export async function updateDoctorStoreBindApi(data: Record<string, any>) {
|
||||
return requestClient.post<any>(`${prefix}update-store-bind`, data);
|
||||
}
|
||||
|
||||
/** doctor_id 为 su_id,与 update-store-bind 一致 */
|
||||
export async function updateDoctorSubjectsBindApi(data: Record<string, any>) {
|
||||
return requestClient.post<any>(`${prefix}update-subjects-bind`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增医生
|
||||
* @param data
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { message, Select } from 'ant-design-vue';
|
||||
|
||||
import {
|
||||
getSubjectsOptionApi,
|
||||
updateDoctorSubjectsBindApi,
|
||||
} from '#/views/doctor/doctor/api';
|
||||
|
||||
const gridApi = ref();
|
||||
const data = ref<Record<string, any>>();
|
||||
const optionData = ref<
|
||||
{ label: string; value: number; name: string; code: string }[]
|
||||
>([]);
|
||||
|
||||
/** 下拉按诊疗科目 name 搜索(不区分大小写) */
|
||||
function filterSubjectByName(input: string, option: any) {
|
||||
const q = input.trim().toLowerCase();
|
||||
if (!q) return true;
|
||||
const name = String(option?.name ?? '').toLowerCase();
|
||||
const code = String(option?.code ?? '').toLowerCase();
|
||||
return name.includes(q) || code.includes(q);
|
||||
}
|
||||
|
||||
const [Modal, modalApi] = useVbenModal({
|
||||
fullscreenButton: false,
|
||||
draggable: true,
|
||||
onCancel() {
|
||||
modalApi.close();
|
||||
},
|
||||
onConfirm: async () => {
|
||||
const suId = data.value?.su_id;
|
||||
if (suId == null) {
|
||||
message.error('缺少医生信息');
|
||||
return;
|
||||
}
|
||||
const sid =
|
||||
data.value?.subjects_id === undefined || data.value?.subjects_id === null
|
||||
? 0
|
||||
: Number(data.value.subjects_id);
|
||||
await updateDoctorSubjectsBindApi({
|
||||
doctor_id: suId,
|
||||
subjects_id: Number.isNaN(sid) ? 0 : sid,
|
||||
});
|
||||
modalApi.close();
|
||||
message.success('保存成功');
|
||||
gridApi.value?.reload();
|
||||
},
|
||||
onOpenChange(isOpen: boolean) {
|
||||
if (isOpen) {
|
||||
gridApi.value = modalApi.getData()?.gridApi ?? null;
|
||||
const payload = modalApi.getData<Record<string, any>>();
|
||||
const { values } = payload ?? {};
|
||||
if (values) {
|
||||
data.value = JSON.parse(JSON.stringify(values));
|
||||
if (
|
||||
data.value.subjects_id === undefined ||
|
||||
data.value.subjects_id === null
|
||||
) {
|
||||
data.value.subjects_id = undefined;
|
||||
} else {
|
||||
data.value.subjects_id = Number(data.value.subjects_id) || undefined;
|
||||
}
|
||||
loadSubjectsOptions();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
const loadSubjectsOptions = () => {
|
||||
getSubjectsOptionApi().then((res: any) => {
|
||||
const list = Array.isArray(res) ? res : [];
|
||||
optionData.value = list.map((item: any) => ({
|
||||
label: item.code ? `${item.name}(${item.code})` : item.name,
|
||||
value: item.id,
|
||||
name: item.name ?? '',
|
||||
code: item.code ?? '',
|
||||
}));
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Modal class="w-[60%]" title="绑定诊疗科目">
|
||||
<div v-if="data" style="width: 60%; margin: 30px auto">
|
||||
<Select
|
||||
v-model:value="data.subjects_id"
|
||||
:options="optionData"
|
||||
:filter-option="filterSubjectByName"
|
||||
allow-clear
|
||||
placeholder="请选择诊疗科目(清空表示未绑定,可输入名称搜索)"
|
||||
show-search
|
||||
style="width: 100%"
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
</template>
|
||||
@@ -41,9 +41,15 @@ export const gridOptions: VxeGridProps<RowType> = {
|
||||
},
|
||||
{ field: 'su_id', title: 'wxID' },
|
||||
{ field: 'stores', title: '所属诊所', slots: { default: 'stores' } },
|
||||
{
|
||||
field: 'subjects',
|
||||
title: '诊疗科目',
|
||||
slots: { default: 'subjects' },
|
||||
minWidth: 120,
|
||||
},
|
||||
{ field: 'service_user', title: '审核状态', slots: { default: 'service-user' } },
|
||||
{ field: 'created_at', title: '注册时间' },
|
||||
{ type: 'html', title: '操作', width: 250, slots: { default: 'action' } },
|
||||
{ type: 'html', title: '操作', width: 340, slots: { default: 'action' } },
|
||||
],
|
||||
keepSource: true,
|
||||
pagerConfig: {},
|
||||
|
||||
@@ -12,6 +12,7 @@ import { TableAction } from '#/components/table-action';
|
||||
|
||||
import { auditApi, openPcWindowsApi, refuseApi } from './api';
|
||||
import BindStore from './components/BindStoreModal.vue';
|
||||
import BindSubjects from './components/BindSubjectsModal.vue';
|
||||
import FormModalDemo from './components/modal.vue';
|
||||
import { formOptions } from './config/search';
|
||||
import { gridOptions } from './config/table';
|
||||
@@ -45,6 +46,10 @@ const [BindStoreModal, BindStoreModalApi] = useVbenModal({
|
||||
connectedComponent: BindStore,
|
||||
});
|
||||
|
||||
const [BindSubjectsModal, BindSubjectsModalApi] = useVbenModal({
|
||||
connectedComponent: BindSubjects,
|
||||
});
|
||||
|
||||
const showModal = (data = {}, isUpdate = false) => {
|
||||
formModalApi.setData({
|
||||
// 表单值
|
||||
@@ -64,6 +69,14 @@ const showBindStoreModal = (data: number) => {
|
||||
BindStoreModalApi.open();
|
||||
};
|
||||
|
||||
const showBindSubjectsModal = (row: Record<string, any>) => {
|
||||
BindSubjectsModalApi.setData({
|
||||
values: row,
|
||||
gridApi,
|
||||
});
|
||||
BindSubjectsModalApi.open();
|
||||
};
|
||||
|
||||
const openPcWindows = (id: number) => {
|
||||
openPcWindowsApi(id).then(() => {
|
||||
message.success('开通成功!');
|
||||
@@ -90,6 +103,7 @@ const refuse = (id: number) => {
|
||||
<Page auto-content-height title="医生管理">
|
||||
<FormModal />
|
||||
<BindStoreModal />
|
||||
<BindSubjectsModal />
|
||||
<Grid>
|
||||
<template #toolbar-buttons>
|
||||
<TableAction
|
||||
@@ -131,6 +145,9 @@ const refuse = (id: number) => {
|
||||
{{ item?.store?.name }}
|
||||
</p>
|
||||
</template>
|
||||
<template #subjects="{ row }">
|
||||
{{ row.subjects?.name ?? '-' }}
|
||||
</template>
|
||||
<template #service-user="{ row }">
|
||||
<Tag v-if="row.service_user?.status === 2" color="success">已通过</Tag>
|
||||
<Tag v-else-if="row.service_user?.status === 0" color="blue">
|
||||
@@ -166,6 +183,13 @@ const refuse = (id: number) => {
|
||||
// auth: ['doctor', 'sys:role:detail'],
|
||||
onClick: showBindStoreModal.bind(null, row),
|
||||
},
|
||||
{
|
||||
label: '绑定诊疗科目',
|
||||
type: 'link',
|
||||
icon: 'uil:edit',
|
||||
size: 'small',
|
||||
onClick: showBindSubjectsModal.bind(null, row),
|
||||
},
|
||||
{
|
||||
label: '开通PC端',
|
||||
type: 'link',
|
||||
|
||||
@@ -36,7 +36,7 @@ const initTableAjax = () => {
|
||||
statistics.value = null;
|
||||
statistics.value = [
|
||||
{
|
||||
title: '总销售金额',
|
||||
title: '总销代付额',
|
||||
value: res.count,
|
||||
icon: 'mdi:cash-multiple',
|
||||
color: 'text-blue-600',
|
||||
|
||||
Reference in New Issue
Block a user