|
|
@ -1,5 +1,27 @@ |
|
|
|
import businessType, { version, state } from "../_options.js"; |
|
|
|
|
|
|
|
export default function (businessType, meta) { |
|
|
|
let service = null; |
|
|
|
let detailService = null; |
|
|
|
if (businessType === "JisBBAC" || businessType === "MaiDanJianBBAC") { |
|
|
|
service = "bbac_sa_service"; |
|
|
|
detailService = "bbac_sa_detail_service"; |
|
|
|
} else if (businessType === "JisHBPO" || businessType === "MaiDanJianHBPO") { |
|
|
|
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 schema = { |
|
|
|
title: "结算数据", |
|
|
|
type: "object", |
|
|
@ -65,39 +87,21 @@ const querySchema = { |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
export default function (businessType, meta) { |
|
|
|
let service = null; |
|
|
|
let detailService = null; |
|
|
|
if (businessType === "JisBBAC" || businessType === "MaiDanJianBBAC") { |
|
|
|
service = "bbac_sa_service"; |
|
|
|
detailService = "bbac_sa_detail_service"; |
|
|
|
} else if (businessType === "JisHBPO" || businessType === "MaiDanJianHBPO") { |
|
|
|
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") { |
|
|
|
if (meta.client === "bbac-1040" || meta.client === "bbac-1046") { |
|
|
|
schema.properties.site = importSchema.properties.site = { |
|
|
|
type: "number", |
|
|
|
options: [], |
|
|
|
options: [ |
|
|
|
{ label: 1040, value: 1040 }, |
|
|
|
{ label: 1046, value: 1046 }, |
|
|
|
], |
|
|
|
input: "select", |
|
|
|
hidden: true, |
|
|
|
default: meta.client === "bbac-104" ? 104 : 1046, |
|
|
|
default: meta.client === "bbac-1040" ? 1040 : 1046, |
|
|
|
}; |
|
|
|
querySchema.properties.filters.default.push({ |
|
|
|
logic: "and", |
|
|
|