|
@ -16,34 +16,7 @@ const schema = { |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
export default function (businessType) { |
|
|
const querySchema = { |
|
|
let service = null; |
|
|
|
|
|
let detailService = null; |
|
|
|
|
|
if (businessType === "JisBBAC") { |
|
|
|
|
|
service = "bbac_sa_service"; |
|
|
|
|
|
detailService = "bbac_sa_detail_service"; |
|
|
|
|
|
} else if (businessType === "JisHBPO") { |
|
|
|
|
|
service = "hbpo_sa_service"; |
|
|
|
|
|
detailService = "hbpo_sa_detail_service"; |
|
|
|
|
|
} else { |
|
|
|
|
|
service = "pub_sa_service"; |
|
|
|
|
|
detailService = "pub_sa_detail_service"; |
|
|
|
|
|
} |
|
|
|
|
|
const queryUrl = `settleaccount/${service}/get-list`; |
|
|
|
|
|
const deleteUrl = `settleaccount/${service}/delete-list`; |
|
|
|
|
|
const importUrl = `settleaccount/${service}/import`; |
|
|
|
|
|
const exportUrl = `settleaccount/${detailService}/export`; |
|
|
|
|
|
const queryMethod = "POST"; |
|
|
|
|
|
const deleteMethod = "POST"; |
|
|
|
|
|
const importMethod = "POST"; |
|
|
|
|
|
const exportMethod = "POST"; |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
|
query: { |
|
|
|
|
|
url: queryUrl, |
|
|
|
|
|
method: queryMethod, |
|
|
|
|
|
hasFilter: true, |
|
|
|
|
|
schema: { |
|
|
|
|
|
title: "结算数据", |
|
|
title: "结算数据", |
|
|
type: "object", |
|
|
type: "object", |
|
|
properties: { |
|
|
properties: { |
|
@ -90,17 +63,64 @@ export default function (businessType) { |
|
|
hidden: true, |
|
|
hidden: true, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export default function (businessType, meta) { |
|
|
|
|
|
let service = null; |
|
|
|
|
|
let detailService = null; |
|
|
|
|
|
if (businessType === "JisBBAC") { |
|
|
|
|
|
service = "bbac_sa_service"; |
|
|
|
|
|
detailService = "bbac_sa_detail_service"; |
|
|
|
|
|
} else if (businessType === "JisHBPO") { |
|
|
|
|
|
service = "hbpo_sa_service"; |
|
|
|
|
|
detailService = "hbpo_sa_detail_service"; |
|
|
|
|
|
} else { |
|
|
|
|
|
service = "pub_sa_service"; |
|
|
|
|
|
detailService = "pub_sa_detail_service"; |
|
|
|
|
|
} |
|
|
|
|
|
const queryUrl = `settleaccount/${service}/get-list`; |
|
|
|
|
|
const deleteUrl = `settleaccount/${service}/delete-list`; |
|
|
|
|
|
const importUrl = `settleaccount/${service}/import`; |
|
|
|
|
|
const exportUrl = `settleaccount/${detailService}/export`; |
|
|
|
|
|
const queryMethod = "POST"; |
|
|
|
|
|
const deleteMethod = "POST"; |
|
|
|
|
|
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: querySchema, |
|
|
}, |
|
|
}, |
|
|
table: { |
|
|
table: { |
|
|
schema: schema, |
|
|
schema: schema, |
|
|
}, |
|
|
}, |
|
|
import: { |
|
|
import: { |
|
|
schema: { |
|
|
schema: importSchema, |
|
|
properties: { |
|
|
|
|
|
version: Object.assign(version, { rules: [{ required: true }] }), |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
}, |
|
|
edit: { |
|
|
edit: { |
|
|
deleteUrl, |
|
|
deleteUrl, |
|
|