nursing_unit_vue/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts

220 lines
5.5 KiB
TypeScript
Raw Normal View History

2025-03-21 10:15:35 +08:00
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: '供应商名称',
align:"center",
dataIndex: 'suppliersName'
},
{
title: '供应商性质',
align:"center",
dataIndex: 'suppliersNature_dictText'
},
{
title: '供应商地址',
align:"center",
dataIndex: 'suppliersAddress'
},
{
title: '负责人',
align:"center",
dataIndex: 'personInCharge'
},
{
title: '联系电话',
align:"center",
dataIndex: 'contactNumber'
},
{
title: '供应状态',
align:"center",
dataIndex: 'supplyState_dictText'
},
{
title: '开户行',
align:"center",
dataIndex: 'openingBank'
},
{
2025-08-01 09:51:30 +08:00
title: '是否启用',
align: "center",
dataIndex: 'izEnabled_dictText',
width:'100px'
2025-03-21 10:15:35 +08:00
},
2025-05-13 15:34:20 +08:00
// {
2025-08-01 09:51:30 +08:00
// title: '开户行账号',
// align:"center",
// dataIndex: 'openingBankNo'
// },
// {
// title: '微信账号',
// align:"center",
// dataIndex: 'wechartId'
// },
// {
2025-05-13 15:34:20 +08:00
// title: '资质照片',
// align:"center",
// dataIndex: 'imgPath',
// customRender:render.renderImage,
// },
2025-03-21 10:15:35 +08:00
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "供应商名称",
field: 'suppliersName',
component: 'Input',
//colProps: {span: 6},
},
{
label: "负责人",
field: 'personInCharge',
component: 'Input',
//colProps: {span: 6},
},
{
label: "供应状态",
field: 'supplyState',
component: 'JSelectMultiple',
componentProps:{
dictCode:"supply_state"
},
//colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '供应商名称',
field: 'suppliersName',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入供应商名称!'},
2025-08-05 15:20:09 +08:00
{ max: 20, message: '不能超过20个字符!' }
2025-03-21 10:15:35 +08:00
];
},
},
{
label: '供应商性质',
field: 'suppliersNature',
component: 'JDictSelectTag',
componentProps:{
dictCode:"suppliers_nature",
type: "radio"
},
},
{
label: '供应商地址',
field: 'suppliersAddress',
component: 'Input',
2025-08-05 15:20:09 +08:00
dynamicRules: ({model,schema}) => {
return [
{ max: 30, message: '不能超过30个字符!' }
];
},
2025-03-21 10:15:35 +08:00
},
{
label: '负责人',
field: 'personInCharge',
component: 'Input',
2025-08-05 15:20:09 +08:00
dynamicRules: ({model,schema}) => {
return [
{ max: 10, message: '不能超过10个字符!' }
];
},
2025-03-21 10:15:35 +08:00
},
{
label: '联系电话',
field: 'contactNumber',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入联系电话!'},
2025-08-05 15:20:09 +08:00
{ max: 11, message: '不能超过11个字符!' }
2025-03-21 10:15:35 +08:00
];
},
},
{
label: '供应状态',
field: 'supplyState',
component: 'JDictSelectTag',
componentProps:{
dictCode:"supply_state",
type: "radio"
},
dynamicRules: ({model,schema}) => {
return [
2025-08-05 15:20:09 +08:00
{ required: true, message: '请选择供应状态!'},
2025-03-21 10:15:35 +08:00
];
},
},
{
label: '开户行',
field: 'openingBank',
component: 'Input',
2025-08-05 15:20:09 +08:00
dynamicRules: ({model,schema}) => {
return [
{ max: 20, message: '不能超过20个字符!' }
];
},
2025-03-21 10:15:35 +08:00
},
{
label: '开户行账号',
field: 'openingBankNo',
component: 'Input',
2025-08-05 15:20:09 +08:00
dynamicRules: ({model,schema}) => {
return [
{ max: 32, message: '不能超过32个字符!' }
];
},
2025-03-21 10:15:35 +08:00
},
2025-08-05 15:20:09 +08:00
// {
// label: '微信账号',
// field: 'wechartId',
// component: 'Input',
// },
2025-03-21 10:15:35 +08:00
{
label: '资质照片',
field: 'imgPath',
component: 'JImageUpload',
componentProps:{
fileMax: 0
},
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
},
];
// 高级查询数据
export const superQuerySchema = {
suppliersName: {title: '供应商名称',order: 0,view: 'text', type: 'string',},
suppliersNature: {title: '供应商性质',order: 1,view: 'radio', type: 'string',dictCode: 'suppliers_nature',},
suppliersAddress: {title: '供应商地址',order: 2,view: 'text', type: 'string',},
personInCharge: {title: '负责人',order: 3,view: 'text', type: 'string',},
contactNumber: {title: '联系电话',order: 4,view: 'text', type: 'string',},
supplyState: {title: '供应状态',order: 5,view: 'radio', type: 'string',dictCode: 'supply_state',},
openingBank: {title: '开户行',order: 6,view: 'text', type: 'string',},
openingBankNo: {title: '开户行账号',order: 7,view: 'text', type: 'string',},
wechartId: {title: '微信账号',order: 8,view: 'text', type: 'string',},
imgPath: {title: '资质照片',order: 9,view: 'image', type: 'string',},
};
/**
* formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
// 默认和原始表单保持一致 如果流程中配置了权限数据这里需要单独处理formSchema
return formSchema;
}