fix: 常用方、患者管理
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import type { VbenFormProps } from '#/adapter/form';
|
||||
|
||||
import { getStoreOption } from '#/views/system/store/api';
|
||||
|
||||
export const modalFormProps: VbenFormProps = {
|
||||
wrapperClass: 'grid-cols-12', // 24栅格,
|
||||
commonConfig: {
|
||||
@@ -23,6 +25,33 @@ export const modalFormProps: VbenFormProps = {
|
||||
triggerFields: ['id'],
|
||||
},
|
||||
},
|
||||
{
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选择绑定店铺(留空为平台通用)',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label?.toLowerCase().includes(input.toLowerCase());
|
||||
},
|
||||
api: async () => {
|
||||
const res = await getStoreOption({});
|
||||
// 添加"平台通用"选项
|
||||
const options = [
|
||||
{ label: '平台通用', value: 0 },
|
||||
...(res || []).map((item: any) => ({
|
||||
label: item.name || item.label,
|
||||
value: item.id || item.value,
|
||||
})),
|
||||
];
|
||||
return options;
|
||||
},
|
||||
},
|
||||
fieldName: 'store_id',
|
||||
label: '绑定店铺',
|
||||
formItemClass: 'col-span-12',
|
||||
defaultValue: 0,
|
||||
},
|
||||
{
|
||||
component: 'Avatar',
|
||||
fieldName: 'drug_license_image',
|
||||
@@ -92,21 +121,6 @@ export const modalFormProps: VbenFormProps = {
|
||||
formItemClass: 'col-span-6',
|
||||
defaultValue: 1,
|
||||
},
|
||||
{
|
||||
component: 'VbenInputNumber',
|
||||
componentProps: {
|
||||
placeholder: '门店ID(留空表示平台通用)',
|
||||
min: 0,
|
||||
},
|
||||
dependencies: {
|
||||
show: false,
|
||||
triggerFields: ['id'],
|
||||
},
|
||||
fieldName: 'store_id',
|
||||
label: '门店ID',
|
||||
formItemClass: 'col-span-6',
|
||||
defaultValue: 0,
|
||||
},
|
||||
],
|
||||
showDefaultActions: false,
|
||||
};
|
||||
|
||||
@@ -74,7 +74,13 @@ export const gridOptions: VxeGridProps<RowType> = {
|
||||
slots: { default: 'internet_drug_license_image' },
|
||||
width: 180,
|
||||
},
|
||||
{ field: 'store_id', align: 'left', title: '门店ID', width: 120 },
|
||||
{
|
||||
field: 'store_name',
|
||||
align: 'left',
|
||||
title: '绑定店铺',
|
||||
width: 150,
|
||||
slots: { default: 'store_name' },
|
||||
},
|
||||
{ field: 'sort_order', align: 'left', title: '排序', width: 100 },
|
||||
{
|
||||
field: 'status_txt',
|
||||
|
||||
@@ -207,6 +207,10 @@ const deleteQualificationsApi = (row: any) => {
|
||||
/>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
<template #store_name="{ row }">
|
||||
<span v-if="row.store_id === 0 || row.store_id === null">平台通用</span>
|
||||
<span v-else>{{ row.store_name || `店铺ID: ${row.store_id}` }}</span>
|
||||
</template>
|
||||
<template #toolbar-tools></template>
|
||||
<template #action="{ row }">
|
||||
<TableAction
|
||||
|
||||
Reference in New Issue
Block a user