import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types' import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ { title: '状态(1-启用,0-停用)', align:"center", dataIndex: 'status' }, { title: '单据日期', align:"center", dataIndex: 'billDate' }, { title: '考评单号', align:"center", dataIndex: 'billCode' }, { title: '供应商', align:"center", dataIndex: 'supplierId_dictText' }, { title: '考评期间', align:"center", dataIndex: 'evaluationPeriod' }, { title: '考评等级', align:"center", dataIndex: 'evaluationLevel_dictText' }, { title: '备注', align:"center", dataIndex: 'notes' }, { title: '提交(1-是 ,0-否)', align:"center", dataIndex: 'submit_dictText' }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: "单据日期", field: "billDate", component: 'RangePicker', componentProps: { valueType: 'Date', showTime:true }, //colProps: {span: 6}, }, { label: "考评单号", field: "billCode", component: 'Input', //colProps: {span: 6}, }, { label: "供应商", field: "supplierId", component: 'JSelectMultiple', componentProps:{ }, //colProps: {span: 6}, }, { label: "考评期间", field: "evaluationPeriod", component: 'Input', //colProps: {span: 6}, }, { label: "考评等级", field: "evaluationLevel", component: 'JSelectMultiple', componentProps:{ }, //colProps: {span: 6}, }, { label: "提交(1-是 ,0-否)", field: "submit", component: 'JSelectMultiple', componentProps:{ }, //colProps: {span: 6}, }, ]; //表单数据 export const formSchema: FormSchema[] = [ { label: '状态(1-启用,0-停用)', field: 'status', component: 'InputNumber', }, { label: '单据日期', field: 'billDate', component: 'DatePicker', componentProps: { showTime:true, valueFormat: 'YYYY-MM-DD HH:mm:ss' }, }, { label: '考评单号', field: 'billCode', component: 'Input', }, { label: '供应商', field: 'supplierId', component: 'JDictSelectTag', componentProps:{ dictCode:"" }, }, { label: '考评期间', field: 'evaluationPeriod', component: 'Input', }, { label: '考评等级', field: 'evaluationLevel', component: 'JDictSelectTag', componentProps:{ dictCode:"" }, }, { label: '备注', field: 'notes', component: 'Input', }, { label: '提交(1-是 ,0-否)', field: 'submit', component: 'JDictSelectTag', componentProps:{ dictCode:"" }, }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false }, ]; //子表单数据 //子表表格配置 export const cuspSupplierEvaluationScoreColumns: JVxeColumn[] = [ { title: '状态(1-启用,0-停用)', key: 'status', type: JVxeTypes.inputNumber, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '主表主键(供应商档案)', key: 'headId', type: JVxeTypes.inputNumber, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '价格得分', key: 'priceScore', type: JVxeTypes.inputNumber, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '质量得分', key: 'qualityScore', type: JVxeTypes.inputNumber, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '交期得分', key: 'deliveryTimeScore', type: JVxeTypes.inputNumber, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '服务得分', key: 'serviceScore', type: JVxeTypes.inputNumber, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '总计得分', key: 'totalScore', type: JVxeTypes.inputNumber, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '价格自动取数', key: 'priceAuto', type: JVxeTypes.input, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '质量自动取数', key: 'qualityAuto', type: JVxeTypes.input, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '交期自动取数', key: 'deliveryTimeAuto', type: JVxeTypes.input, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '服务自动取数', key: 'serviceAuto', type: JVxeTypes.input, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, ] // 高级查询数据 export const superQuerySchema = { status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',}, billDate: {title: '单据日期',order: 2,view: 'datetime', type: 'string',}, billCode: {title: '考评单号',order: 3,view: 'text', type: 'string',}, supplierId: {title: '供应商',order: 4,view: 'number', type: 'number',dictCode: '',}, evaluationPeriod: {title: '考评期间',order: 5,view: 'text', type: 'string',}, evaluationLevel: {title: '考评等级',order: 6,view: 'list', type: 'string',dictCode: '',}, notes: {title: '备注',order: 7,view: 'text', type: 'string',}, submit: {title: '提交(1-是 ,0-否)',order: 8,view: 'number', type: 'number',dictCode: '',}, //子表高级查询 cuspSupplierEvaluationScore: { title: '供应商考评-得分', view: 'table', fields: { status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',}, headId: {title: '主表主键(供应商档案)',order: 2,view: 'number', type: 'number',}, priceScore: {title: '价格得分',order: 3,view: 'number', type: 'number',}, qualityScore: {title: '质量得分',order: 4,view: 'number', type: 'number',}, deliveryTimeScore: {title: '交期得分',order: 5,view: 'number', type: 'number',}, serviceScore: {title: '服务得分',order: 6,view: 'number', type: 'number',}, totalScore: {title: '总计得分',order: 7,view: 'number', type: 'number',}, priceAuto: {title: '价格自动取数',order: 8,view: 'text', type: 'string',}, qualityAuto: {title: '质量自动取数',order: 9,view: 'text', type: 'string',}, deliveryTimeAuto: {title: '交期自动取数',order: 10,view: 'text', type: 'string',}, serviceAuto: {title: '服务自动取数',order: 11,view: 'text', type: 'string',}, } }, }; /** * 流程表单调用这个方法获取formSchema * @param param */ export function getBpmFormSchema(_formData): FormSchema[]{ // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; }