diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx index 7d599a96..6faf2ccc 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx @@ -1,5 +1,6 @@ import { ref } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' +import { Tag } from 'ant-design-vue' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' // 下拉框数据接口 @@ -19,13 +20,54 @@ export const columns: BasicColumn[] = [ { title: '业务类型', dataIndex: 'businessTypeText', - width: 200, + width: 120, }, { title: '结算对象', dataIndex: 'customerName', width: 200, }, + { + title: '费用类别', + dataIndex: 'feeCategory', + width: 120, + customRender: ({ text }) => { + if (text == 1) { + return '应收' + } else if (text == 2) { + return '应付' + } + return text + }, + }, + { + title: '是否停用', + dataIndex: 'isDisabled', + width: 120, + customRender: ({ text }) => { + if (text === true) { + return 启用 + } else if (text == false) { + return 禁用 + } + return text + }, + }, + { + title: '开始时间', + dataIndex: 'startTime', + width: 200, + }, + { + title: '结束时间', + dataIndex: 'endTime', + width: 200, + }, + { + title: '优先等级', + dataIndex: 'priority', + width: 120, + }, { title: '说明', dataIndex: 'description', @@ -48,7 +90,59 @@ export const searchFormSchema: FormSchema[] = [ field: 'name', label: '模板名称', component: 'Input', - colProps: { span: 6 }, + colProps: { span: 4 }, + }, + { + field: 'feeCategory', + label: '费用类别', + component: 'Select', + colProps: { span: 4 }, + componentProps: { + options: [ + { label: '应收', value: 1 }, + { label: '应付', value: 2 }, + ], + }, + }, + + { + field: 'startTime', + label: '开始时间', + component: 'DatePicker', + colProps: { span: 4 }, + defaultValue: '', + componentProps: { + showTime: false, + }, + }, + { + field: 'endTime', + label: '结束时间', + component: 'DatePicker', + colProps: { span: 4 }, + defaultValue: '', + componentProps: { + showTime: false, + }, + }, + { + field: 'isDisabled', + label: '是否停用', + component: 'Switch', + colProps: { span: 4 }, + componentProps: { + checkedChildren: '启用', + checkedValue: 1, + unCheckedChildren: '禁用', + unCheckedValue: 0, + }, + defaultValue: 1, + }, + { + field: 'priority', + label: '优先等级', + component: 'InputNumber', + colProps: { span: 4 }, }, ] export const formSchema: FormSchema[] = [ @@ -64,14 +158,14 @@ export const formSchema: FormSchema[] = [ label: '模板名称', component: 'Input', required: true, - colProps: { span: 8 }, + colProps: { span: 6 }, }, { field: 'businessType', label: '业务类型', component: 'Select', required: true, - colProps: { span: 8 }, + colProps: { span: 6 }, componentProps: () => { return { options: businessType, @@ -120,7 +214,7 @@ export const formSchema: FormSchema[] = [ defaultValue: '', component: 'Input', show: false, - colProps: { span: 8 }, + colProps: { span: 6 }, }, { field: 'customerName', @@ -128,7 +222,7 @@ export const formSchema: FormSchema[] = [ component: 'Input', defaultValue: '', dynamicDisabled: true, - colProps: { span: 8 }, + colProps: { span: 6 }, }, // { // label: '', @@ -144,16 +238,71 @@ export const formSchema: FormSchema[] = [ // defaultValue: '', // show: false, // }, + { + field: 'feeCategory', + label: '费用类别', + component: 'Select', + colProps: { span: 6 }, + componentProps: { + options: [ + { label: '应收', value: 1 }, + { label: '应付', value: 2 }, + ], + }, + }, + { + field: 'isDisabled', + label: '是否停用', + component: 'Switch', + componentProps: { + checkedChildren: '启用', + checkedValue: true, + unCheckedChildren: '禁用', + unCheckedValue: false, + }, + defaultValue: true, + colProps: { + span: 6, + }, + }, + { + field: 'startTime', + label: '开始时间', + component: 'DatePicker', + colProps: { span: 6 }, + defaultValue: '', + componentProps: { + showTime: false, + style: 'width:100%', + }, + }, + { + field: 'endTime', + label: '结束时间', + component: 'DatePicker', + colProps: { span: 6 }, + defaultValue: '', + componentProps: { + showTime: false, + style: 'width:100%', + }, + }, + { + field: 'priority', + label: '优先等级', + component: 'InputNumber', + colProps: { span: 6 }, + }, { field: 'description', label: '模板说明', component: 'Input', - colProps: { span: 8 }, + colProps: { span: 6 }, }, { field: 'note', label: '备注', component: 'Input', - colProps: { span: 16 }, + colProps: { span: 12 }, }, ] diff --git a/src/views/fee/FeeCustTemplate/columns.tsx b/src/views/fee/FeeCustTemplate/columns.tsx index 7d599a96..6faf2ccc 100644 --- a/src/views/fee/FeeCustTemplate/columns.tsx +++ b/src/views/fee/FeeCustTemplate/columns.tsx @@ -1,5 +1,6 @@ import { ref } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' +import { Tag } from 'ant-design-vue' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' // 下拉框数据接口 @@ -19,13 +20,54 @@ export const columns: BasicColumn[] = [ { title: '业务类型', dataIndex: 'businessTypeText', - width: 200, + width: 120, }, { title: '结算对象', dataIndex: 'customerName', width: 200, }, + { + title: '费用类别', + dataIndex: 'feeCategory', + width: 120, + customRender: ({ text }) => { + if (text == 1) { + return '应收' + } else if (text == 2) { + return '应付' + } + return text + }, + }, + { + title: '是否停用', + dataIndex: 'isDisabled', + width: 120, + customRender: ({ text }) => { + if (text === true) { + return 启用 + } else if (text == false) { + return 禁用 + } + return text + }, + }, + { + title: '开始时间', + dataIndex: 'startTime', + width: 200, + }, + { + title: '结束时间', + dataIndex: 'endTime', + width: 200, + }, + { + title: '优先等级', + dataIndex: 'priority', + width: 120, + }, { title: '说明', dataIndex: 'description', @@ -48,7 +90,59 @@ export const searchFormSchema: FormSchema[] = [ field: 'name', label: '模板名称', component: 'Input', - colProps: { span: 6 }, + colProps: { span: 4 }, + }, + { + field: 'feeCategory', + label: '费用类别', + component: 'Select', + colProps: { span: 4 }, + componentProps: { + options: [ + { label: '应收', value: 1 }, + { label: '应付', value: 2 }, + ], + }, + }, + + { + field: 'startTime', + label: '开始时间', + component: 'DatePicker', + colProps: { span: 4 }, + defaultValue: '', + componentProps: { + showTime: false, + }, + }, + { + field: 'endTime', + label: '结束时间', + component: 'DatePicker', + colProps: { span: 4 }, + defaultValue: '', + componentProps: { + showTime: false, + }, + }, + { + field: 'isDisabled', + label: '是否停用', + component: 'Switch', + colProps: { span: 4 }, + componentProps: { + checkedChildren: '启用', + checkedValue: 1, + unCheckedChildren: '禁用', + unCheckedValue: 0, + }, + defaultValue: 1, + }, + { + field: 'priority', + label: '优先等级', + component: 'InputNumber', + colProps: { span: 4 }, }, ] export const formSchema: FormSchema[] = [ @@ -64,14 +158,14 @@ export const formSchema: FormSchema[] = [ label: '模板名称', component: 'Input', required: true, - colProps: { span: 8 }, + colProps: { span: 6 }, }, { field: 'businessType', label: '业务类型', component: 'Select', required: true, - colProps: { span: 8 }, + colProps: { span: 6 }, componentProps: () => { return { options: businessType, @@ -120,7 +214,7 @@ export const formSchema: FormSchema[] = [ defaultValue: '', component: 'Input', show: false, - colProps: { span: 8 }, + colProps: { span: 6 }, }, { field: 'customerName', @@ -128,7 +222,7 @@ export const formSchema: FormSchema[] = [ component: 'Input', defaultValue: '', dynamicDisabled: true, - colProps: { span: 8 }, + colProps: { span: 6 }, }, // { // label: '', @@ -144,16 +238,71 @@ export const formSchema: FormSchema[] = [ // defaultValue: '', // show: false, // }, + { + field: 'feeCategory', + label: '费用类别', + component: 'Select', + colProps: { span: 6 }, + componentProps: { + options: [ + { label: '应收', value: 1 }, + { label: '应付', value: 2 }, + ], + }, + }, + { + field: 'isDisabled', + label: '是否停用', + component: 'Switch', + componentProps: { + checkedChildren: '启用', + checkedValue: true, + unCheckedChildren: '禁用', + unCheckedValue: false, + }, + defaultValue: true, + colProps: { + span: 6, + }, + }, + { + field: 'startTime', + label: '开始时间', + component: 'DatePicker', + colProps: { span: 6 }, + defaultValue: '', + componentProps: { + showTime: false, + style: 'width:100%', + }, + }, + { + field: 'endTime', + label: '结束时间', + component: 'DatePicker', + colProps: { span: 6 }, + defaultValue: '', + componentProps: { + showTime: false, + style: 'width:100%', + }, + }, + { + field: 'priority', + label: '优先等级', + component: 'InputNumber', + colProps: { span: 6 }, + }, { field: 'description', label: '模板说明', component: 'Input', - colProps: { span: 8 }, + colProps: { span: 6 }, }, { field: 'note', label: '备注', component: 'Input', - colProps: { span: 16 }, + colProps: { span: 12 }, }, ] diff --git a/src/views/fee/FeeCustTemplate/index.vue b/src/views/fee/FeeCustTemplate/index.vue index 42e6715c..12090860 100644 --- a/src/views/fee/FeeCustTemplate/index.vue +++ b/src/views/fee/FeeCustTemplate/index.vue @@ -67,7 +67,7 @@ beforeFetch: (p) => { p['isShared'] = 1 p['customerId'] = props.clientId - return formatParams(p, ['isShared']) + return formatParams(p, ['isShared', 'isDisabled']) }, columns, formConfig: {