|
|
@ -16,7 +16,56 @@ const schema = { |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
export default function (businessType) { |
|
|
|
const querySchema = { |
|
|
|
title: "结算数据", |
|
|
|
type: "object", |
|
|
|
properties: { |
|
|
|
filters: { |
|
|
|
title: "项目", |
|
|
|
type: "array", |
|
|
|
hidden: true, |
|
|
|
items: { |
|
|
|
type: "object", |
|
|
|
properties: { |
|
|
|
logic: { |
|
|
|
type: "int", |
|
|
|
}, |
|
|
|
column: { |
|
|
|
type: "string", |
|
|
|
}, |
|
|
|
action: { |
|
|
|
type: "int", |
|
|
|
}, |
|
|
|
value: { |
|
|
|
type: "string", |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
default: [ |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
column: "version", |
|
|
|
action: "equal", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
skipCount: { |
|
|
|
hidden: true, |
|
|
|
default: 0, |
|
|
|
}, |
|
|
|
maxResultCount: { |
|
|
|
hidden: true, |
|
|
|
default: 10, |
|
|
|
}, |
|
|
|
sorting: { |
|
|
|
hidden: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
export default function (businessType, meta) { |
|
|
|
let service = null; |
|
|
|
let detailService = null; |
|
|
|
if (businessType === "JisBBAC") { |
|
|
@ -38,69 +87,40 @@ export default function (businessType) { |
|
|
|
const importMethod = "POST"; |
|
|
|
const exportMethod = "POST"; |
|
|
|
|
|
|
|
const importSchema = { |
|
|
|
properties: { |
|
|
|
version: Object.assign(version, { rules: [{ required: true }] }), |
|
|
|
}, |
|
|
|
}; |
|
|
|
if (meta.client === "bbac-104" || meta.client === "bbac-1046") { |
|
|
|
schema.properties.site = importSchema.properties.site = { |
|
|
|
type: "number", |
|
|
|
options: [], |
|
|
|
hidden: true, |
|
|
|
default: meta.client === "bbac-104" ? 104 : 1046, |
|
|
|
}; |
|
|
|
querySchema.properties.filters.default.push({ |
|
|
|
logic: "and", |
|
|
|
column: "site", |
|
|
|
action: "equal", |
|
|
|
hidden: true, |
|
|
|
value: schema.properties.site.default, |
|
|
|
readOnly: true, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
return { |
|
|
|
query: { |
|
|
|
url: queryUrl, |
|
|
|
method: queryMethod, |
|
|
|
hasFilter: true, |
|
|
|
schema: { |
|
|
|
title: "结算数据", |
|
|
|
type: "object", |
|
|
|
properties: { |
|
|
|
filters: { |
|
|
|
title: "项目", |
|
|
|
type: "array", |
|
|
|
hidden: true, |
|
|
|
items: { |
|
|
|
type: "object", |
|
|
|
properties: { |
|
|
|
logic: { |
|
|
|
type: "int", |
|
|
|
}, |
|
|
|
column: { |
|
|
|
type: "string", |
|
|
|
}, |
|
|
|
action: { |
|
|
|
type: "int", |
|
|
|
}, |
|
|
|
value: { |
|
|
|
type: "string", |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
default: [ |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
column: "version", |
|
|
|
action: "equal", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
skipCount: { |
|
|
|
hidden: true, |
|
|
|
default: 0, |
|
|
|
}, |
|
|
|
maxResultCount: { |
|
|
|
hidden: true, |
|
|
|
default: 10, |
|
|
|
}, |
|
|
|
sorting: { |
|
|
|
hidden: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
schema: querySchema, |
|
|
|
}, |
|
|
|
table: { |
|
|
|
schema: schema, |
|
|
|
}, |
|
|
|
import: { |
|
|
|
schema: { |
|
|
|
properties: { |
|
|
|
version: Object.assign(version, { rules: [{ required: true }] }), |
|
|
|
}, |
|
|
|
}, |
|
|
|
schema: importSchema, |
|
|
|
}, |
|
|
|
edit: { |
|
|
|
deleteUrl, |
|
|
|