const schema = { title: "期间设置", type: "object", properties: { year: { title: "年度", type: "string", hidden: true, showForList: true, rules: [ { required: true, }, ], }, period: { title: "期间", type: "string", hidden: true, showForList: true, rules: [ { required: true, }, ], }, version: { title: "版本", type: "string", input: "month", format: "YYYYMM", showForList: true, watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}", rules: [ { required: true, trigger: "blur", }, ], }, state: { title: "状态", type: "boolean", showForList: true, default: true, rules: [ { required: true, }, ], }, }, }; const baseUrl = "settleaccount/centralized-control"; const queryUrl = `${baseUrl}/get-list`; const detailsUrl = `${baseUrl}/get/%s`; const createUrl = `${baseUrl}/create`; const updateUrl = `${baseUrl}/update/%s`; const deleteUrl = `${baseUrl}/delete-list`; const queryMethod = "POST"; const detailsMethod = "POST"; const createMethod = "POST"; const updateMethod = "POST"; const deleteMethod = "POST"; export default function () { return { baseUrl, query: { url: queryUrl, method: queryMethod, hasFilter: true, schema: { title: "通用代码", type: "object", properties: { filters: { type: "array", hidden: true, items: { type: "object", properties: { logic: { type: "int", }, column: { type: "string", }, action: { type: "int", }, value: { type: "string", }, }, }, default: [ { logic: "and", column: "year", action: "like", value: null, readOnly: true, }, ], }, skipCount: { hidden: true, default: 0, }, maxResultCount: { hidden: true, default: 10, }, sorting: { hidden: true, }, }, }, }, table: { schema: schema, }, edit: { detailsUrl, createUrl, updateUrl, deleteUrl, detailsMethod, createMethod, updateMethod, deleteMethod, schema: schema, }, }; }