wanggang
1 year ago
15 changed files with 140 additions and 203 deletions
@ -1,139 +1,21 @@ |
|||
import useVmi from "./vmi.js"; |
|||
|
|||
const schema = useVmi(); |
|||
|
|||
const baseUrl = "settleaccount/vmi"; |
|||
const queryUrl = `${baseUrl}/backup`; |
|||
const detailsUrl = `${baseUrl}/get/%s`; |
|||
const createUrl = `${baseUrl}/create`; |
|||
const updateUrl = `${baseUrl}/update/%s`; |
|||
const deleteUrl = `${baseUrl}/delete-list`; |
|||
const importUrl = `${baseUrl}/code-setting-upload-excel-import`; |
|||
const exportUrl = `${baseUrl}/backup-export`; |
|||
const invokeUrl = "settleaccount/vmi/invoke"; |
|||
const queryMethod = "POST"; |
|||
const detailsMethod = "POST"; |
|||
const createMethod = "POST"; |
|||
const updateMethod = "POST"; |
|||
const deleteMethod = "POST"; |
|||
const importMethod = "POST"; |
|||
const exportMethod = "POST"; |
|||
const invokeMethod = "POST"; |
|||
import useBalance from "./balance.js"; |
|||
|
|||
export default function () { |
|||
return { |
|||
query: { |
|||
url: queryUrl, |
|||
method: queryMethod, |
|||
hasFilter: true, |
|||
autoSubmit: true, |
|||
disableQueryOnLoad: true, |
|||
schema: { |
|||
title: "时点库存余额查询", |
|||
type: "object", |
|||
properties: { |
|||
name: { |
|||
title: "时间", |
|||
type: "string", |
|||
input: "select", |
|||
url: "settleaccount/vmi/snapshot", |
|||
value: "description", |
|||
label: "name", |
|||
defaultSelected: true, |
|||
clearable: false, |
|||
}, |
|||
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: "erpToLoc", |
|||
action: "like", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
{ |
|||
logic: "and", |
|||
column: "realPartCode", |
|||
action: "like", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
{ |
|||
logic: "and", |
|||
column: "vinCode", |
|||
action: "like", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
{ |
|||
logic: "and", |
|||
column: "codeType", |
|||
action: "equal", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
{ |
|||
logic: "and", |
|||
column: "deliverBillType", |
|||
action: "equal", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
], |
|||
}, |
|||
skipCount: { |
|||
hidden: true, |
|||
default: 0, |
|||
}, |
|||
maxResultCount: { |
|||
hidden: true, |
|||
default: 10, |
|||
}, |
|||
sorting: { |
|||
hidden: true, |
|||
}, |
|||
}, |
|||
const result = useBalance(); |
|||
result.query.schema.properties = Object.assign( |
|||
{ |
|||
name: { |
|||
title: "备份时间", |
|||
type: "string", |
|||
input: "select", |
|||
url: "settleaccount/vmi/snapshot", |
|||
value: "description", |
|||
label: "name", |
|||
defaultSelected: true, |
|||
clearable: false, |
|||
}, |
|||
}, |
|||
table: { |
|||
schema: schema, |
|||
}, |
|||
edit: { |
|||
detailsUrl, |
|||
createUrl, |
|||
updateUrl, |
|||
deleteUrl, |
|||
importUrl, |
|||
exportUrl, |
|||
invokeUrl, |
|||
detailsMethod, |
|||
createMethod, |
|||
updateMethod, |
|||
deleteMethod, |
|||
importMethod, |
|||
exportMethod, |
|||
invokeMethod, |
|||
schema: schema, |
|||
}, |
|||
}; |
|||
result.query.schema.properties |
|||
); |
|||
return result; |
|||
} |
|||
|
Loading…
Reference in new issue