Browse Source

update

master
wanggang 1 year ago
parent
commit
0fbf414e14
  1. 139
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
  2. 113
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable-bk.js
  3. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js

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

@ -1,73 +1,73 @@
const schema = {
title: "通用代码",
type: "object",
disableSelection: true,
properties: {
settleBillNum: {
title: "关联结算单号",
type: "string",
},
billNum: {
title: "发票分组号",
type: "string",
},
settleDate: {
title: "下线日期",
type: "string",
input: "datetime",
},
invBillNum: {
title: "发票号",
type: "string",
},
lu: {
title: "客户零件号",
type: "string",
},
partCode: {
title: "厂内零件号",
type: "string",
},
materialDesc: {
title: "零件描述",
type: "decimal",
},
pn: {
title: "标识号",
type: "string",
},
qty: {
title: "结算数量",
type: "number",
},
price: {
title: "单价",
type: "number",
},
groupNum: {
title: "结算分组号",
type: "decimal",
},
site: {
title: "工厂地点",
type: "string",
},
isReturn: {
title: "是否退货",
type: "boolean",
},
isMaidan: {
title: "是否买单",
type: "boolean",
},
contractDocID: {
title: "合同号",
type: "string",
export default function (businessType, type) {
const schema = {
title: "通用代码",
type: "object",
disableSelection: true,
properties: {
settleBillNum: {
title: "关联结算单号",
type: "string",
},
billNum: {
title: "发票分组号",
type: "string",
},
settleDate: {
title: "下线日期",
type: "string",
input: "datetime",
},
invBillNum: {
title: "发票号",
type: "string",
},
lu: {
title: "客户零件号",
type: "string",
},
partCode: {
title: "厂内零件号",
type: "string",
},
materialDesc: {
title: "零件描述",
type: "decimal",
},
pn: {
title: "标识号",
type: "string",
},
qty: {
title: "结算数量",
type: "number",
},
price: {
title: "单价",
type: "number",
},
groupNum: {
title: "结算分组号",
type: "decimal",
},
site: {
title: "工厂地点",
type: "string",
},
isReturn: {
title: "是否退货",
type: "boolean",
},
isMaidan: {
title: "是否买单",
type: "boolean",
},
contractDocID: {
title: "合同号",
type: "string",
},
},
},
};
};
export default function (businessType, type) {
let service;
if (type === "unable") {
if (businessType === "JisBBAC") {
@ -86,6 +86,7 @@ export default function (businessType, type) {
service = "pub_can_sa_service";
}
}
if (businessType === "JisBBAC" || businessType === "JisHBPO" || businessType === "MaiDanJianBBAC" || businessType === "MaiDanJianHBPO") {
schema.properties.pn.title = "生产码";
} else if (businessType === "ZhiGongJianBBAC" || businessType === "ZhiGongJianHBPO" || businessType === "YinDuJian") {
@ -207,5 +208,3 @@ export default function (businessType, type) {
},
};
}
export { schema };

113
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable-bk.js

@ -1,113 +0,0 @@
//不可结算明细
import { version, state } from "../_options.js";
const schema = {
title: "可结算单",
type: "object",
properties: {
version,
state,
billNum: {
title: "结算单据",
type: "string",
oneToMany: "/settle/detail",
config: "/models/settle/detail.js",
},
settleBillNum: {
title: "关联结算单号",
type: "string",
},
invGroupNum: {
title: "发票分组号",
type: "string",
},
},
};
export default function (businessType) {
let service;
if (businessType === "JisBBAC") {
service = "bbac_can_sa_service";
} else if (businessType === "JisHBPO" || businessType === "MaiDanJianHBPO") {
service = "hbpo_can_sa_service";
} else {
service = "pub_can_sa_service";
}
const queryUrl = `settleaccount/${service}/main-query`;
const exportUrl = `settleaccount/${service}/export`;
const addUrl = `settleaccount/${service}/generate-invoice`;
const queryMethod = "POST";
const exportMethod = "POST";
const addMethod = "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",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
table: {
schema: schema,
},
edit: {
exportUrl,
addUrl,
exportMethod,
addMethod,
schema: schema,
},
};
}

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js

@ -14,6 +14,8 @@ export default {
const route = useRoute();
const businessType = route.meta.businessType;
const config = useConfig(businessType, "unable");
delete config.table.schema.properties["invBillNum"];
delete config.table.schema.properties["billNum"];
const onCommand = async (item) => {
const url = config.edit.addUrl;
if (item.path === "add") {

Loading…
Cancel
Save