Browse Source

增加工厂地点下拉框选择筛选

master
zhouhongjun 11 months ago
parent
commit
1f3b1cd456
  1. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js
  2. 307
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js

@ -154,6 +154,19 @@ const enableType = {
], ],
}; };
const site = {
title: "工厂地点",
type: "number",
input: "select",
options: [
{ value: 1040, label: 1040 },
{ value: 1046, label: 1046 },
],
hideForList: true,
default:1040,
};
const codeType = { const codeType = {
title: "生产码类型", title: "生产码类型",
type: "string", type: "string",
@ -208,4 +221,4 @@ const taskState = {
}; };
export default businessType; export default businessType;
export { version, state, state2, state3, transType, deliverBillType, deliverSubBillType, proType, billState, codeType, invState, taskState, enableType }; export { version, state, state2, state3, transType, deliverBillType, deliverSubBillType, proType, billState, codeType, invState, taskState, enableType,site };

307
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js

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

Loading…
Cancel
Save