From e8044d1d3eead533abd97a78002af9e7d27479dd Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Mon, 17 Mar 2025 13:55:31 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4=202=E3=80=81=E5=A2=9E=E5=8A=A0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=B1=BB=E5=88=AB=E3=80=81=E6=9C=8D=E5=8A=A1=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E3=80=81=E6=8C=87=E4=BB=A4=E6=A0=87=E7=AD=BE=E5=88=97=E5=90=88?= =?UTF-8?q?=E5=B9=B6=EF=BC=88=E5=90=88=E5=B9=B6=E6=9C=89=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=EF=BC=9A=E6=9C=8D=E5=8A=A1=E7=B1=BB=E5=88=AB=20->=20=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=B1=BB=E5=9E=8B=20->=20=E6=8C=87=E4=BB=A4=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ConfigServiceCategoryForm.vue | 2 +- .../ConfigServiceDirective.data.ts | 223 ++++++++++-------- .../ConfigServiceDirectiveList.vue | 47 ++-- .../components/ConfigServiceDirectiveForm.vue | 82 ++++--- .../ConfigServiceDirectiveModal.vue | 2 +- .../components/ConfigServiceTypeForm.vue | 4 +- 6 files changed, 194 insertions(+), 166 deletions(-) diff --git a/src/views/config/serviceCategory/components/ConfigServiceCategoryForm.vue b/src/views/config/serviceCategory/components/ConfigServiceCategoryForm.vue index 871f3c3..3274ac2 100644 --- a/src/views/config/serviceCategory/components/ConfigServiceCategoryForm.vue +++ b/src/views/config/serviceCategory/components/ConfigServiceCategoryForm.vue @@ -61,7 +61,7 @@ const confirmLoading = ref(false); const validatorRules = reactive({ categoryName: [{ required: true, message: '请输入服务类别名称!' },], sort: [{ required: true, message: '请输入排序!' }, { pattern: /^-?\d+$/, message: '请输入整数!' },], - izEnabled: [{ required: true, message: '是否启用!' },], + izEnabled: [{ required: true, message: '请选择是否启用!' },], }); const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false }); diff --git a/src/views/config/serviceDirective/ConfigServiceDirective.data.ts b/src/views/config/serviceDirective/ConfigServiceDirective.data.ts index 480d7b9..612d117 100644 --- a/src/views/config/serviceDirective/ConfigServiceDirective.data.ts +++ b/src/views/config/serviceDirective/ConfigServiceDirective.data.ts @@ -1,137 +1,156 @@ -import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; -import { rules} from '/@/utils/helper/validator'; +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { rules } from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ { - title: '服务类别id', - align: "center", - sorter: true, - dataIndex: 'categoryId_dictText' + title: '服务类别', + align: 'center', + dataIndex: 'categoryId_dictText', + customCell: (record, index, column) => { + if (record.categoryRowSpan != null) { + return { rowSpan: record.categoryRowSpan }; + } + }, }, { - title: '服务类型id', - align: "center", - sorter: true, - dataIndex: 'typeId_dictText' + title: '服务类型', + align: 'center', + dataIndex: 'typeId_dictText', + customCell: (record, index, column) => { + if (record.typeRowSpan != null) { + return { rowSpan: record.typeRowSpan }; + } + }, }, { - title: '指令标签id', - align: "center", - dataIndex: 'instructionTagId_dictText' + title: '指令标签', + align: 'center', + dataIndex: 'instructionTagId_dictText', + width: 100, + customCell: (record, index, column) => { + if (record.instructionRowSpan != null) { + return { rowSpan: record.instructionRowSpan }; + } + }, }, { title: '服务指令名称', - align: "center", - dataIndex: 'directiveName' + align: 'center', + dataIndex: 'directiveName', }, { title: '收费价格', - align: "center", - dataIndex: 'tollPrice' + align: 'center', + dataIndex: 'tollPrice', + width: 100, + }, + // { + // title: '提成价格', + // align: "center", + // dataIndex: 'comPrice' + // }, + { + title: '医保报销', + align: 'center', + dataIndex: 'izReimbursement_dictText', + width: 100, }, { - title: '提成价格', - align: "center", - dataIndex: 'comPrice' - }, - { - title: '是否参与医保报销 0不报销 1报销', - align: "center", - dataIndex: 'izReimbursement_dictText' - }, - { - title: '是否参与机构优惠 0不参与 1参与', - align: "center", - dataIndex: 'izPreferential_dictText' + title: '机构优惠', + align: 'center', + dataIndex: 'izPreferential_dictText', + width: 100, }, { title: '收费频次', - align: "center", - dataIndex: 'chargingFrequency_dictText' + align: 'center', + dataIndex: 'chargingFrequency_dictText', }, { title: '周期类型', - align: "center", - dataIndex: 'cycleType_dictText' - }, - { - title: '排序', - align: "center", - sorter: true, - dataIndex: 'sort' - }, - { - title: '服务说明', - align: "center", - dataIndex: 'serviceContent' + align: 'center', + dataIndex: 'cycleType_dictText', }, + // { + // title: '排序', + // align: "center", + // sorter: true, + // dataIndex: 'sort' + // }, + // { + // title: '服务说明', + // align: "center", + // dataIndex: 'serviceContent' + // }, { title: '服务时长(分钟)', - align: "center", - dataIndex: 'serviceDuration' + align: 'center', + dataIndex: 'serviceDuration', + width: 135, }, { title: '是否启用', - align: "center", - dataIndex: 'izEnabled_dictText' - }, - { - title: '创建人', - align: "center", - dataIndex: 'createBy' - }, - { - title: '创建日期', - align: "center", - sorter: true, - dataIndex: 'createTime' - }, - { - title: '更新人', - align: "center", - dataIndex: 'updateBy' - }, - { - title: '更新日期', - align: "center", - sorter: true, - dataIndex: 'updateTime' - }, - { - title: '语音文件', - align: "center", - dataIndex: 'mp3File', - }, - { - title: '视频文件', - align: "center", - dataIndex: 'mp4File', + align: 'center', + dataIndex: 'izEnabled_dictText', + width: 100, }, + // { + // title: '语音文件', + // align: "center", + // dataIndex: 'mp3File', + // }, + // { + // title: '视频文件', + // align: "center", + // dataIndex: 'mp4File', + // }, + // { + // title: '创建人', + // align: "center", + // dataIndex: 'createBy' + // }, + // { + // title: '创建日期', + // align: "center", + // sorter: true, + // dataIndex: 'createTime' + // }, + // { + // title: '更新人', + // align: "center", + // dataIndex: 'updateBy' + // }, + // { + // title: '更新日期', + // align: "center", + // sorter: true, + // dataIndex: 'updateTime' + // }, ]; // 高级查询数据 export const superQuerySchema = { - categoryId: {title: '服务类别id',order: 0,view: 'list', type: 'string',dictCode: '',}, - typeId: {title: '服务类型id',order: 1,view: 'list', type: 'string',dictCode: '',}, - instructionTagId: {title: '指令标签id',order: 2,view: 'list', type: 'string',dictCode: 'instruction_tag',}, - directiveName: {title: '服务指令名称',order: 3,view: 'text', type: 'string',}, - tollPrice: {title: '收费价格',order: 4,view: 'number', type: 'number',}, - comPrice: {title: '提成价格',order: 5,view: 'number', type: 'number',}, - izReimbursement: {title: '是否参与医保报销 0不报销 1报销',order: 6,view: 'radio', type: 'string',dictCode: '',}, - izPreferential: {title: '是否参与机构优惠 0不参与 1参与',order: 7,view: 'radio', type: 'string',dictCode: '',}, - chargingFrequency: {title: '收费频次',order: 8,view: 'list', type: 'string',dictCode: '',}, - cycleType: {title: '周期类型',order: 9,view: 'list', type: 'string',dictCode: '',}, - sort: {title: '排序',order: 10,view: 'number', type: 'number',}, - serviceContent: {title: '服务说明',order: 11,view: 'textarea', type: 'string',}, - serviceDuration: {title: '服务时长(分钟)',order: 12,view: 'text', type: 'string',}, - izEnabled: {title: '是否启用',order: 13,view: 'radio', type: 'string',dictCode: '',}, - createBy: {title: '创建人',order: 14,view: 'text', type: 'string',}, - createTime: {title: '创建日期',order: 15,view: 'datetime', type: 'string',}, - updateBy: {title: '更新人',order: 16,view: 'text', type: 'string',}, - updateTime: {title: '更新日期',order: 17,view: 'datetime', type: 'string',}, - mp3File: {title: '语音文件',order: 18,view: 'file', type: 'string',}, - mp4File: {title: '视频文件',order: 19,view: 'file', type: 'string',}, + categoryId: { title: '服务类别id', order: 0, view: 'list', type: 'string', dictCode: '' }, + typeId: { title: '服务类型id', order: 1, view: 'list', type: 'string', dictCode: '' }, + instructionTagId: { title: '指令标签id', order: 2, view: 'list', type: 'string', dictCode: 'instruction_tag' }, + directiveName: { title: '服务指令名称', order: 3, view: 'text', type: 'string' }, + tollPrice: { title: '收费价格', order: 4, view: 'number', type: 'number' }, + comPrice: { title: '提成价格', order: 5, view: 'number', type: 'number' }, + izReimbursement: { title: '医保报销', order: 6, view: 'radio', type: 'string', dictCode: '' }, + izPreferential: { title: '机构优惠', order: 7, view: 'radio', type: 'string', dictCode: '' }, + chargingFrequency: { title: '收费频次', order: 8, view: 'list', type: 'string', dictCode: '' }, + cycleType: { title: '周期类型', order: 9, view: 'list', type: 'string', dictCode: '' }, + sort: { title: '排序', order: 10, view: 'number', type: 'number' }, + serviceContent: { title: '服务说明', order: 11, view: 'textarea', type: 'string' }, + serviceDuration: { title: '服务时长(分钟)', order: 12, view: 'text', type: 'string' }, + izEnabled: { title: '是否启用', order: 13, view: 'radio', type: 'string', dictCode: '' }, + createBy: { title: '创建人', order: 14, view: 'text', type: 'string' }, + createTime: { title: '创建日期', order: 15, view: 'datetime', type: 'string' }, + updateBy: { title: '更新人', order: 16, view: 'text', type: 'string' }, + updateTime: { title: '更新日期', order: 17, view: 'datetime', type: 'string' }, + mp3File: { title: '语音文件', order: 18, view: 'file', type: 'string' }, + mp4File: { title: '视频文件', order: 19, view: 'file', type: 'string' }, }; diff --git a/src/views/config/serviceDirective/ConfigServiceDirectiveList.vue b/src/views/config/serviceDirective/ConfigServiceDirectiveList.vue index 36546e6..7a316a7 100644 --- a/src/views/config/serviceDirective/ConfigServiceDirectiveList.vue +++ b/src/views/config/serviceDirective/ConfigServiceDirectiveList.vue @@ -7,30 +7,35 @@ - - + + - + @@ -106,10 +109,10 @@ preIcon="ant-design:plus-outlined"> 服务类型 新增 - 导出 导入 + preIcon="ant-design:import-outlined" @click="onImportXls">导入 --> @@ -172,7 +176,7 @@ const formData = reactive>({ sort: 99, serviceContent: '', serviceDuration: '', - izEnabled: '', + izEnabled: '0', createBy: '', createTime: '', updateBy: '', @@ -186,19 +190,19 @@ const wrapperCol = ref({ xs: { span: 24 }, sm: { span: 16 } }); const confirmLoading = ref(false); //表单验证 const validatorRules = reactive({ - categoryId: [{ required: true, message: '请输入服务类别id!' },], - typeId: [{ required: true, message: '请输入服务类型id!' },], - instructionTagId: [{ required: true, message: '请输入指令标签id!' },], + categoryId: [{ required: true, message: '请选择服务类别!' },], + typeId: [{ required: true, message: '请选择服务类型!' },], + instructionTagId: [{ required: true, message: '请选择指令标签!' },], directiveName: [{ required: true, message: '请输入服务指令名称!' },], - tollPrice: [{ required: true, message: '请输入收费价格!' }, { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!' },], - comPrice: [{ required: false }, { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!' },], - izReimbursement: [{ required: true, message: '请输入是否参与医保报销 0不报销 1报销!' },], - izPreferential: [{ required: true, message: '请输入是否参与机构优惠 0不参与 1参与!' },], - chargingFrequency: [{ required: true, message: '请输入收费频次!' },], - cycleType: [{ required: true, message: '请输入周期类型!' },], + tollPrice: [{ required: true, message: '请输入收费价格!' }, { pattern: /^(([0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!' },], + comPrice: [{ required: false }, { pattern: /^(([0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!' },], + izReimbursement: [{ required: true, message: '请选择是否参与医保报销!' },], + izPreferential: [{ required: true, message: '请选择是否参与机构优惠!' },], + chargingFrequency: [{ required: true, message: '请选择收费频次!' },], + cycleType: [{ required: true, message: '请选择周期类型!' },], sort: [{ required: true, message: '请输入排序!' },], serviceDuration: [{ required: true, message: '请输入服务时长(分钟)!' }, { pattern: /^-?\d+$/, message: '请输入整数!' },], - izEnabled: [{ required: true, message: '是否启用!' },], + izEnabled: [{ required: true, message: '请选择是否启用!' },], }); const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false }); diff --git a/src/views/config/serviceDirective/components/ConfigServiceDirectiveModal.vue b/src/views/config/serviceDirective/components/ConfigServiceDirectiveModal.vue index 9762086..10fab7a 100644 --- a/src/views/config/serviceDirective/components/ConfigServiceDirectiveModal.vue +++ b/src/views/config/serviceDirective/components/ConfigServiceDirectiveModal.vue @@ -1,5 +1,5 @@ diff --git a/src/views/config/serviceType/components/ConfigServiceTypeForm.vue b/src/views/config/serviceType/components/ConfigServiceTypeForm.vue index 998b498..c79f5e6 100644 --- a/src/views/config/serviceType/components/ConfigServiceTypeForm.vue +++ b/src/views/config/serviceType/components/ConfigServiceTypeForm.vue @@ -69,10 +69,10 @@ const wrapperCol = ref({ xs: { span: 24 }, sm: { span: 16 } }); const confirmLoading = ref(false); //表单验证 const validatorRules = reactive({ - categoryId: [{ required: true, message: '请输入服务类别id!' },], + categoryId: [{ required: true, message: '请选择服务类别!' },], typeName: [{ required: true, message: '请输入服务类型名称!' },], sort: [{ required: true, message: '请输入排序!' },], - izEnabled: [{ required: true, message: '是否启用!' },], + izEnabled: [{ required: true, message: '请选择是否启用!' },], }); const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });