|
|
@ -1,3 +1,4 @@ |
|
|
|
import { site } from "../_options.js"; |
|
|
|
export default function (businessType, type) { |
|
|
|
const schema = { |
|
|
|
title: "通用代码", |
|
|
@ -44,11 +45,8 @@ export default function (businessType, type) { |
|
|
|
groupNum: { |
|
|
|
title: "结算分组号", |
|
|
|
type: "decimal", |
|
|
|
}, |
|
|
|
site: { |
|
|
|
title: "工厂地点", |
|
|
|
type: "string", |
|
|
|
}, |
|
|
|
}, |
|
|
|
site, |
|
|
|
isReturn: { |
|
|
|
title: "是否退货", |
|
|
|
type: "boolean", |
|
|
@ -97,7 +95,7 @@ export default function (businessType, type) { |
|
|
|
} |
|
|
|
if (businessType !== "JisBBAC") { |
|
|
|
delete schema.properties["site"]; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
const queryUrl = `settleaccount/${service}/detail-query`; |
|
|
|
const addUrl = `settleaccount/${service}/generate-settlement-order`; |
|
|
@ -106,109 +104,224 @@ export default function (businessType, type) { |
|
|
|
const addMethod = "POST"; |
|
|
|
const exportMethod = "POST"; |
|
|
|
|
|
|
|
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", |
|
|
|
if (businessType !== "JisBBAC") |
|
|
|
{ |
|
|
|
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: "settleDate", |
|
|
|
action: "biggerThanOrEqual", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
clearable: true, |
|
|
|
title: "下线开始", |
|
|
|
}, |
|
|
|
column: { |
|
|
|
type: "string", |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
column: "settleDate", |
|
|
|
action: "smallThan", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
clearable: true, |
|
|
|
title: "下线结束", |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "partCode", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
}, |
|
|
|
action: { |
|
|
|
type: "int", |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "pn", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
}, |
|
|
|
value: { |
|
|
|
type: "string", |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "groupNum", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
default: [ |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
column: "settleDate", |
|
|
|
action: "biggerThanOrEqual", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
clearable: true, |
|
|
|
title: "下线开始", |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
column: "settleDate", |
|
|
|
action: "smallThan", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
clearable: true, |
|
|
|
title: "下线结束", |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "site", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
skipCount: { |
|
|
|
hidden: true, |
|
|
|
default: 0, |
|
|
|
}, |
|
|
|
maxResultCount: { |
|
|
|
hidden: true, |
|
|
|
default: 10, |
|
|
|
}, |
|
|
|
sorting: { |
|
|
|
hidden: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
table: { |
|
|
|
schema: schema, |
|
|
|
}, |
|
|
|
edit: { |
|
|
|
addUrl, |
|
|
|
exportUrl, |
|
|
|
addMethod, |
|
|
|
exportUrl, |
|
|
|
exportMethod, |
|
|
|
schema: schema, |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
const querySchema = { |
|
|
|
title: "通用代码", |
|
|
|
type: "object", |
|
|
|
properties: { |
|
|
|
filters: { |
|
|
|
title: "筛选", |
|
|
|
type: "array", |
|
|
|
hidden: true, |
|
|
|
items: { |
|
|
|
type: "object", |
|
|
|
properties: { |
|
|
|
logic: { |
|
|
|
type: "int", |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "partCode", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
column: { |
|
|
|
type: "string", |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "pn", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
action: { |
|
|
|
type: "int", |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "groupNum", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
value: { |
|
|
|
type: "string", |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
skipCount: { |
|
|
|
hidden: true, |
|
|
|
default: 0, |
|
|
|
}, |
|
|
|
maxResultCount: { |
|
|
|
hidden: true, |
|
|
|
default: 10, |
|
|
|
}, |
|
|
|
sorting: { |
|
|
|
hidden: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
default: [ |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
column: "settleDate", |
|
|
|
action: "biggerThanOrEqual", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
clearable: true, |
|
|
|
title: "下线开始", |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
column: "settleDate", |
|
|
|
action: "smallThan", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
clearable: true, |
|
|
|
title: "下线结束", |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "partCode", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "pn", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
logic: "and", |
|
|
|
action: "like", |
|
|
|
column: "groupNum", |
|
|
|
value: null, |
|
|
|
readOnly: true, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
skipCount: { |
|
|
|
hidden: true, |
|
|
|
default: 0, |
|
|
|
}, |
|
|
|
maxResultCount: { |
|
|
|
hidden: true, |
|
|
|
default: 10, |
|
|
|
}, |
|
|
|
sorting: { |
|
|
|
hidden: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
table: { |
|
|
|
schema: schema, |
|
|
|
}, |
|
|
|
edit: { |
|
|
|
addUrl, |
|
|
|
exportUrl, |
|
|
|
addMethod, |
|
|
|
exportUrl, |
|
|
|
exportMethod, |
|
|
|
schema: schema, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
querySchema.properties.filters.default.push({ |
|
|
|
logic: "and", |
|
|
|
column: "site", |
|
|
|
action: "equal", |
|
|
|
value: schema.properties.site.default, |
|
|
|
readOnly: true, |
|
|
|
}); |
|
|
|
|
|
|
|
return { |
|
|
|
query: { |
|
|
|
url: queryUrl, |
|
|
|
method: queryMethod, |
|
|
|
hasFilter: true, |
|
|
|
schema: querySchema, |
|
|
|
}, |
|
|
|
table: { |
|
|
|
schema: schema, |
|
|
|
}, |
|
|
|
edit: { |
|
|
|
addUrl, |
|
|
|
exportUrl, |
|
|
|
addMethod, |
|
|
|
exportUrl, |
|
|
|
exportMethod, |
|
|
|
schema: schema, |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|