Browse Source

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

master
zhouhongjun 8 months ago
parent
commit
1f3b1cd456
  1. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js
  2. 311
      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 = {
title: "生产码类型",
type: "string",
@ -208,4 +221,4 @@ const taskState = {
};
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 };

311
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) {
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,
},
};
}
}

Loading…
Cancel
Save