Browse Source

update

master
wanggang 1 year ago
parent
commit
1551896392
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  2. 13
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  3. 162
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
  4. 127
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js
  5. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js
  6. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
  7. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
  8. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
  9. 105
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js
  10. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js
  11. 28
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  12. 83
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
  13. 99
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
  14. 107
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
  15. 7
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
  16. 9
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
  17. 9
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
  18. 0
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
  19. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js
  20. 0
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
  21. 12
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
  22. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js

@ -14,7 +14,7 @@ export default {
<template v-else-if="schema.input==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template> <template v-else-if="schema.input==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template>
<template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template> <template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else-if="schema.input==='password'">******</template> <template v-else-if="schema.input==='password'">******</template>
<template v-else-if="schema.input==='select'||schema.input==='tabs'">{{options.find(o=>o.value===model[prop])?.label}}</template> <template v-else-if="schema.input==='select'||schema.input==='tabs'">{{options.find(o=>o.value==model[prop])?.label??model[prop]}}</template>
<template v-else>{{model[prop]}}</template> <template v-else>{{model[prop]}}</template>
</template> </template>
</template> </template>

13
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

@ -813,8 +813,19 @@ export default {
queryModel.value.skipCount = (pageModel.pageIndex - 1) * pageModel.pageSize; queryModel.value.skipCount = (pageModel.pageIndex - 1) * pageModel.pageSize;
// //
const postData = JSON.parse(JSON.stringify(queryModel.value)); const postData = JSON.parse(JSON.stringify(queryModel.value));
Object.assign(postData, subListQuery.value.query); //Object.assign(postData, subListQuery.value.query);//注释掉子表DTO查询
postData.filters = filterList.value.filter((o) => o.column && o.action && (o.value || o.value === false)); postData.filters = filterList.value.filter((o) => o.column && o.action && (o.value || o.value === false));
if (subListQuery.value.query) {
Object.keys(subListQuery.value.query).forEach((o) => {
postData.filters.push({
logic: "and",
column: o,
action: "equal",
value: subListQuery.value.query[o],
});
});
}
//添加子表filter查询
if (route.meta.businessType) { if (route.meta.businessType) {
postData.filters.push({ postData.filters.push({
logic: "and", logic: "and",

162
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js

@ -2,7 +2,8 @@ import defaultVersion from "../version.js";
const version = Object.assign({}, defaultVersion); const version = Object.assign({}, defaultVersion);
export default { const compareSchema = {
title: "数据比对",
properties: { properties: {
version: Object.assign(version, { rules: [{ required: true }] }), version: Object.assign(version, { rules: [{ required: true }] }),
seDateTime: { seDateTime: {
@ -30,3 +31,162 @@ export default {
}, },
}, },
}; };
const stateName = {
title: "状态",
type: "string",
input: "select",
clearable: true,
options: [
{ label: "执行完成(任务成功)", value: "Succeeded" },
{ label: "执行完成(任务失败)", value: "Failed" },
{ label: "执行中", value: "Processing" },
{ label: "等待执行", value: "Enqueued" },
],
};
const schema = {
title: "数据对比",
type: "object",
properties: {
type: {
title: "版本号",
type: "string",
},
taskId: {
title: "单据流水号",
type: "string",
},
email: {
title: "创建人",
type: "string",
},
createdAt: {
title: "创建时间",
type: "DateTime",
},
remark: {
title: "说明",
type: "string",
},
stateName,
},
};
const nameList = {
JisBBAC: "JisBBAC结算与发运数据对比",
JisHBPO: "JisHBPO结算与发运数据对比",
ZhiGongJianBBAC: "直供件BBAC结算与发运数据对比",
ZhiGongJianHBPO: "直供件HBPO结算与发运数据对比",
MaiDanJianBBAC: "买单件BBAC结算与发运数据对比",
MaiDanJianHBPO: "买单件HBPO结算与发运数据对比",
BeiJian: "备件结算与发运数据对比",
YinDuJian: "印度件结算与发运数据对比",
};
export default function (businessType, type) {
let compareService = null;
let title = null;
let name = null;
if (type === "fa-yun") {
if (businessType === "JisBBAC") {
compareService = "edi-se-compare/bbacedi-se-compare";
name = "JisBBACEDI与发运数据对比";
} else if (businessType === "JisHBPO") {
compareService = "edi-se-compare/hbpoedi-se-compare";
name = "JisHBPOEDI与发运数据对比";
}
} else {
if (businessType === "JisBBAC") {
compareService = "edi-se-compare/bbacedi-se-compare";
} else if (businessType === "JisHBPO") {
compareService = "edi-se-compare/hbpoedi-se-compare";
} else {
compareService = "pub_sa_detail_service/pub-sa-se-compare";
}
name = nameList[businessType];
}
const queryUrl = "settleaccount/Job/list";
const deleteUrl = "settleaccount/Job/delete";
const exportUrl = "settleaccount/pub_sa_detail_service/export";
const compareUrl = `settleaccount/${compareService}`;
const queryMethod = "POST";
const deleteMethod = "POST";
const exportMethod = "POST";
const compareMethod = "POST";
return {
title,
name,
query: {
url: queryUrl,
method: queryMethod,
autoSubmit: true,
disableQueryOnLoad: false,
schema: {
title: "数据对比",
type: "object",
properties: {
type: Object.assign({ defaultSelected: false }, version),
name: {
type: "string",
hidden: true,
},
stateName,
businessType: {
type: "string",
hidden: true,
},
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
deleteUrl,
exportUrl,
compareUrl,
deleteMethod,
exportMethod,
compareMethod,
schema: schema,
},
compare: {
schema: compareSchema,
},
};
}

127
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js

@ -1,127 +0,0 @@
import version from "../version.js";
import compareSchema from "./compare.js";
const stateName = {
title: "状态",
type: "string",
input: "select",
clearable: true,
options: [
{ label: "执行完成(任务成功)", value: "Succeeded" },
{ label: "执行完成(任务失败)", value: "Failed" },
{ label: "执行中", value: "Processing" },
{ label: "等待执行", value: "Enqueued" },
],
};
const schema = {
title: "数据对比",
type: "object",
properties: {
type: {
title: "版本号",
type: "string",
},
taskId: {
title: "单据流水号",
type: "string",
},
email: {
title: "创建人",
type: "string",
},
createdAt: {
title: "创建时间",
type: "DateTime",
},
remark: {
title: "说明",
type: "string",
},
stateName,
},
};
export default function (compareService) {
const queryUrl = "settleaccount/Job/list";
const deleteUrl = "settleaccount/Job/delete";
const exportUrl = "settleaccount/pub_sa_detail_service/export";
const compareUrl = `settleaccount/${compareService}`;
const queryMethod = "POST";
const deleteMethod = "POST";
const exportMethod = "POST";
const compareMethod = "POST";
return {
query: {
url: queryUrl,
method: queryMethod,
autoSubmit: true,
disableQueryOnLoad: false,
schema: {
title: "数据对比",
type: "object",
properties: {
type: Object.assign({ defaultSelected: false }, version),
name: {
type: "string",
hidden: true,
},
stateName,
businessType: {
type: "string",
hidden: true,
},
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
deleteUrl,
exportUrl,
compareUrl,
deleteMethod,
exportMethod,
compareMethod,
schema: schema,
},
compare: {
schema: compareSchema,
},
};
}

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js

@ -46,7 +46,13 @@ const schema = {
}, },
}; };
export default function (service) { export default function (businessType) {
let service = null;
if (businessType === "JisBBAC") {
service = "bbac_se_edi_service";
} else if (businessType === "JisHBPO") {
service = "hbpo_se_edi_service";
}
const queryUrl = `settleaccount/${service}/get-list`; const queryUrl = `settleaccount/${service}/get-list`;
const exportUrl = `settleaccount/${service}/export`; const exportUrl = `settleaccount/${service}/export`;
const queryMethod = "POST"; const queryMethod = "POST";

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js

@ -110,7 +110,19 @@ const schema = {
}, },
}; };
export default function (service, syncService) { export default function (businessType) {
let service = null;
let syncService = null;
if (businessType === "JisBBAC") {
service = "bbac_se_detail_service";
syncService = "bbacse-sync/invoke";
} else if (businessType === "JisHBPO") {
service = "hbpo_se_detail_service";
syncService = "hbpose-sync/invoke";
} else {
service = "pub_se_detail_service";
syncService = "hand-se-sync/sync";
}
const queryUrl = `settleaccount/${service}/get-list`; const queryUrl = `settleaccount/${service}/get-list`;
const exportUrl = `settleaccount/${service}/export`; const exportUrl = `settleaccount/${service}/export`;
const syncUrl = `settleaccount/${syncService}`; const syncUrl = `settleaccount/${syncService}`;

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js

@ -18,7 +18,19 @@ const schema = {
}, },
}; };
export default function (service, detailService) { export default function (businessType) {
let service = null;
let detailService = null;
if (businessType === "JisBBAC") {
service = "bbac_sa_service";
detailService = "bbac_sa_detail_service";
} else if (businessType === "JisHBPO") {
service = "hbpo_sa_service";
detailService = "hbpo_sa_detail_service";
} else {
service = "pub_sa_service";
detailService = "pub_sa_detail_service";
}
const queryUrl = `settleaccount/${service}/get-list`; const queryUrl = `settleaccount/${service}/get-list`;
const deleteUrl = `settleaccount/${service}/delete-list`; const deleteUrl = `settleaccount/${service}/delete-list`;
const importUrl = `settleaccount/${service}/import`; const importUrl = `settleaccount/${service}/import`;

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

@ -77,8 +77,12 @@ export default function (businessType) {
} else { } else {
service = "pub_can_sa_service"; service = "pub_can_sa_service";
} }
if (businessType === "JisBBAC" || businessType === "JisHBPO") { if (businessType === "JisBBAC" || businessType === "JisHBPO" || businessType === "MaiDanJianBBAC" || businessType === "MaiDanJianHBPO") {
schema.properties.pn.title = "生产码"; schema.properties.pn.title = "生产码";
} else if (businessType === "ZhiGongJianBBAC" || businessType === "ZhiGongJianHBPO" || businessType === "YinDuJian") {
schema.properties.pn.title = "发货单号";
} else if (businessType === "BeiJian") {
schema.properties.pn.title = "交付识别号";
} }
if (businessType !== "JisBBAC") { if (businessType !== "JisBBAC") {
delete schema.properties["isReturn"]; delete schema.properties["isReturn"];
@ -167,3 +171,5 @@ export default function (businessType) {
}, },
}; };
} }
export { schema };

105
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js

@ -1,105 +0,0 @@
import version from "../version.js";
import state from "../state.js";
const schema = {
title: "不可结算明细",
type: "object",
properties: {
version,
state,
billNum: {
title: "结算单据",
type: "string",
},
settleBillNum: {
title: "关联结算单号",
type: "string",
},
invGroupNum: {
title: "发票分组号",
type: "string",
oneToMany: "/settle/detail",
config: "/models/settle/detail.js",
},
},
};
export default function (service) {
const queryUrl = `settleaccount/${service}/detail-query`;
const exportUrl = `settleaccount/${service}/export`;
const addUrl = `settleaccount/${service}/generate-settlement-order`;
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,
},
};
}

10
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js

@ -24,7 +24,15 @@ const schema = {
}, },
}; };
export default function (service) { export default function (businessType) {
let service;
if (businessType === "JisBBAC") {
service = "bbac_can_sa_service";
} else if (businessType === "JisHBPO") {
service = "hbpo_can_sa_service";
} else {
service = "pub_can_sa_service";
}
const queryUrl = `settleaccount/${service}/main-query`; const queryUrl = `settleaccount/${service}/main-query`;
const exportUrl = `settleaccount/${service}/export`; const exportUrl = `settleaccount/${service}/export`;
const addUrl = `settleaccount/${service}/generate-invoice`; const addUrl = `settleaccount/${service}/generate-invoice`;

28
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

@ -151,8 +151,8 @@ export default [
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
children: [ children: [
createUsableSettleList("bbac_can_sa_service", "JisBBAC", "bbac"), createUsableSettleList("bbac_can_sa_service", "JisBBAC", "bbac", "JIS-BBAC 可结算单"),
createUnableSettleList("bbac_not_sa_service", "JisBBAC", "bbac"), createUnableSettleList("bbac_not_sa_service", "JisBBAC", "bbac", "JIS-BBAC 不可结算明细"),
{ {
path: "bbac_ba_service", path: "bbac_ba_service",
meta: { meta: {
@ -340,8 +340,8 @@ export default [
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
children: [ children: [
createUsableSettleList("hbpo_can_sa_service", "JisHBPO", "hbpo"), createUsableSettleList("hbpo_can_sa_service", "JisHBPO", "hbpo", "JIS-HBPO 可结算单"),
createUnableSettleList("hbpo_not_sa_service", "JisHBPO", "hbpo"), createUnableSettleList("hbpo_not_sa_service", "JisHBPO", "hbpo", "JIS-HBPO 不可结算明细"),
{ {
path: "hbpo_ba_service", path: "hbpo_ba_service",
meta: { meta: {
@ -533,8 +533,8 @@ export default [
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
children: [ children: [
createUsableSettleList("bbac_jit_pub_can_sa_service", "ZhiGongJianBBAC", "bbac"), createUsableSettleList("bbac_jit_pub_can_sa_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 可结算单"),
createUnableSettleList("bbac_jit_pub_not_sa_service", "ZhiGongJianBBAC", "bbac"), createUnableSettleList("bbac_jit_pub_not_sa_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 不可结算明细"),
{ {
path: "bbac_jit_pub_ba_service", path: "bbac_jit_pub_ba_service",
meta: { meta: {
@ -718,8 +718,8 @@ export default [
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
children: [ children: [
createUsableSettleList("hbpo_jit_pub_can_sa_service", "ZhiGongJianBBAC", "hbpo"), createUsableSettleList("hbpo_jit_pub_can_sa_service", "ZhiGongJianBBAC", "hbpo", "直供件-HBPO 可结算单"),
createUnableSettleList("hbpo_jit_pub_not_sa_service", "ZhiGongJianBBAC", "hbpo"), createUnableSettleList("hbpo_jit_pub_not_sa_service", "ZhiGongJianBBAC", "hbpo", "直供件-HBPO 不可结算明细"),
{ {
path: "hbpo_jit_pub_ba_service", path: "hbpo_jit_pub_ba_service",
meta: { meta: {
@ -939,8 +939,8 @@ export default [
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
children: [ children: [
createUsableSettleList("hbpo_md_pub_can_sa_service", "MaiDanJianHBPO", "hbpo"), createUsableSettleList("hbpo_md_pub_can_sa_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 可结算单"),
createUnableSettleList("hbpo_md_pub_not_sa_service", "MaiDanJianHBPO", "hbpo"), createUnableSettleList("hbpo_md_pub_not_sa_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 不可结算明细"),
{ {
path: "hbpo_md_pub_ba_service", path: "hbpo_md_pub_ba_service",
meta: { meta: {
@ -1126,8 +1126,8 @@ export default [
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
children: [ children: [
createUsableSettleList("bj_pub_can_sa_service", "BeiJian", "bbac"), createUsableSettleList("bj_pub_can_sa_service", "BeiJian", "bbac", "备件-BBAC 可结算单"),
createUnableSettleList("bj_pub_not_sa_service", "BeiJian", "bbac"), createUnableSettleList("bj_pub_not_sa_service", "BeiJian", "bbac", "备件-BBAC 不可结算明细"),
{ {
path: "bj_pub_ba_service", path: "bj_pub_ba_service",
meta: { meta: {
@ -1311,8 +1311,8 @@ export default [
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
children: [ children: [
createUsableSettleList("in_pub_can_sa_service", "YinDuJian", "bbac"), createUsableSettleList("in_pub_can_sa_service", "YinDuJian", "bbac", "印度件-BBAC 可结算单"),
createUnableSettleList("in_pub_not_sa_service", "YinDuJian", "bbac"), createUnableSettleList("in_pub_not_sa_service", "YinDuJian", "bbac", "印度件-BBAC 不可结算明细"),
{ {
path: "in_pub_ba_service", path: "in_pub_ba_service",
meta: { meta: {

83
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js

@ -0,0 +1,83 @@
import AppList from "../../components/list/index.js";
import AppForm from "../../components/form/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/compare/compare.js";
import { ref, onMounted, onUnmounted } from "vue";
import { schemaToModel } from "../../utils/index.js";
import request from "../../request/index.js";
export default function (type) {
return {
components: { AppList, AppForm },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
<el-dialog v-model="dialogVisable" align-center destroy-on-close style="width:40%;height:50%;">
<template #header> <span class="el-dialog__title"> EDI与发运对比 </span> </template>
<el-scrollbar>
<app-form ref="formRef" :mode="create" label-position="left" :schema="schema" v-model="model" :hideButton="true" @submit="submit" />
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submit"> {{$t('confirm')}} </el-button>
</span>
</template>
</el-dialog>`,
styles: html`<style>
.el-dialog__body {
height: calc(100% - 120px);
}
</style>`,
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
const dialogVisable = ref(false);
const loading = ref(false);
const config = useConfig(businessType, type);
const schema = config.compare.schema;
const defaultModel = schemaToModel(schema);
const model = ref(null);
const formRef = ref(null);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "compare") {
model.value = Object.assign({}, defaultModel);
dialogVisable.value = true;
}
};
const submit = async () => {
try {
const valid = await formRef.value.validate();
if (valid) {
loading.value = true;
}
const url = config.edit.compareUrl;
const data = Object.assign({ businessType, name: config.name }, model.value);
if (data.seDateTime?.length === 2) {
data.seStartDateTime = data.seDateTime[0];
data.seEndDateTime = data.seDateTime[1];
}
if (data.downLineDateTime?.length === 2) {
data.downLineStartDateTime = data.downLineDateTime[0];
data.downLineEndDateTime = data.downLineDateTime[1];
}
if (businessType) delete data["seDateTime"];
delete data["downLineDateTime"];
const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) {
dialogVisable.value = false;
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
//
const appListRef = ref(null);
const event = "SaSeCompare";
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
onUnmounted(() => PubSub.unsubscribe(event));
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
},
};
}

99
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js

@ -1,98 +1,3 @@
import AppList from "../../components/list/index.js"; import useCompare from "./_compare.js"
import AppForm from "../../components/form/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/compare/fa-yun.js";
import { ref, onMounted, onUnmounted } from "vue";
import { schemaToModel } from "../../utils/index.js";
import request from "../../request/index.js";
export default { export default useCompare("fa-yun");
components: { AppList, AppForm },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
<el-dialog v-model="dialogVisable" align-center destroy-on-close style="width:40%;height:50%;">
<template #header> <span class="el-dialog__title"> EDI与发运对比 </span> </template>
<el-scrollbar>
<app-form
ref="formRef"
:mode="create"
label-position="left"
:schema="schema"
v-model="model"
:hideButton="true"
@submit="submit"
/>
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submit"> {{$t('confirm')}} </el-button>
</span>
</template>
</el-dialog>`,
styles: html`<style>
.el-dialog__body {
height: calc(100% - 120px);
}
</style>`,
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
const dialogVisable = ref(false);
const loading = ref(false);
let config = null;
let name = null;
if (businessType === "JisBBAC") {
config = useConfig("edi-se-compare/bbacedi-se-compare");
name = "JisBBACEDI与发运数据对比";
} else if (businessType === "JisHBPO") {
config = useConfig("edi-se-compare/hbpoedi-se-compare");
name = "JisHBPOEDI与发运数据对比";
}
config.query.schema.properties.name.default = name;
const schema = config.compare.schema;
const defaultModel = schemaToModel(schema);
const model = ref(null);
const formRef = ref(null);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "compare") {
model.value = Object.assign({}, defaultModel);
dialogVisable.value = true;
}
};
const submit = async () => {
try {
const valid = await formRef.value.validate();
if (valid) {
loading.value = true;
}
const url = config.edit.compareUrl;
const data = Object.assign({ businessType, name }, model.value);
if (data.seDateTime?.length === 2) {
data.seStartDateTime = data.seDateTime[0];
data.seEndDateTime = data.seDateTime[1];
}
if (data.downLineDateTime?.length === 2) {
data.downLineStartDateTime = data.downLineDateTime[0];
data.downLineEndDateTime = data.downLineDateTime[1];
}
if (businessType) delete data["seDateTime"];
delete data["downLineDateTime"];
const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) {
dialogVisable.value = false;
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
//
const appListRef = ref(null);
const event = "SaSeCompare";
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
onUnmounted(() => PubSub.unsubscribe(event));
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
},
};

107
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js

@ -1,106 +1,3 @@
import AppList from "../../components/list/index.js"; import useCompare from "./_compare.js";
import AppForm from "../../components/form/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/compare/fa-yun.js";
import { ref, onMounted, onUnmounted } from "vue";
import { schemaToModel } from "../../utils/index.js";
import request from "../../request/index.js";
export default { export default useCompare("jie-suan");
components: { AppList, AppForm },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
<el-dialog v-model="dialogVisable" align-center destroy-on-close style="width:40%;height:50%;">
<template #header> <span class="el-dialog__title"> EDI发运与发运对比 </span> </template>
<el-scrollbar>
<app-form
ref="formRef"
:mode="create"
label-position="left"
:schema="schema"
v-model="model"
:hideButton="true"
@submit="submit"
/>
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submit"> {{$t('confirm')}} </el-button>
</span>
</template>
</el-dialog>`,
styles: html`<style>
.el-dialog__body {
height: calc(100% - 120px);
}
</style>`,
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
const dialogVisable = ref(false);
const loading = ref(false);
const nameList = {
JisBBAC: "JisBBAC结算与发运数据对比",
JisHBPO: "JisHBPO结算与发运数据对比",
ZhiGongJianBBAC: "直供件BBAC结算与发运数据对比",
ZhiGongJianHBPO: "直供件HBPO结算与发运数据对比",
MaiDanJianBBAC: "买单件BBAC结算与发运数据对比",
MaiDanJianHBPO: "买单件HBPO结算与发运数据对比",
BeiJian: "备件结算与发运数据对比",
YinDuJian: "印度件结算与发运数据对比",
};
let config = null;
let name = null;
if (businessType === "JisBBAC") {
config = useConfig("edi-se-compare/bbacedi-se-compare");
} else if (businessType === "JisHBPO") {
config = useConfig("edi-se-compare/hbpoedi-se-compare");
} else {
config = useConfig("pub_sa_detail_service/pub-sa-se-compare");
name = nameList[businessType];
}
config.query.schema.properties.businessType.default = businessType;
config.query.schema.properties.name.default = name;
const schema = config.compare.schema;
const defaultModel = schemaToModel(schema);
const model = ref(null);
const formRef = ref(null);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "compare") {
model.value = Object.assign({}, defaultModel);
dialogVisable.value = true;
}
};
const submit = async () => {
try {
const valid = await formRef.value.validate();
if (valid) {
loading.value = true;
}
const url = config.edit.compareUrl;
const data = Object.assign({}, model.value);
data.seStartDateTime = data.seDateTime[0];
data.seEndDateTime = data.seDateTime[1];
data.downLineStartDateTime = data.downLineDateTime[0];
data.downLineEndDateTime = data.downLineDateTime[1];
delete data["seDateTime"];
delete data["downLineDateTime"];
const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) {
dialogVisable.value = false;
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
//
const appListRef = ref(null);
const event = "SaSeCompare";
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
onUnmounted(() => PubSub.unsubscribe(event));
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
},
};

7
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js

@ -7,14 +7,9 @@ export default {
components: { AppList }, components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`, template: html`<app-list :config="config" @command="onCommand" />`,
setup() { setup() {
let config = null;
const route = useRoute(); const route = useRoute();
const businessType = route.meta.businessType; const businessType = route.meta.businessType;
if (businessType === "JisBBAC") { const config = useConfig(businessType);
config = useConfig("bbac_se_edi_service");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_se_edi_service");
}
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
console.log(item.path, item, rows); console.log(item.path, item, rows);
}; };

9
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js

@ -8,16 +8,9 @@ export default {
components: { AppList }, components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`, template: html`<app-list :config="config" @command="onCommand" />`,
setup() { setup() {
let config = null;
const route = useRoute(); const route = useRoute();
const businessType = route.meta.businessType; const businessType = route.meta.businessType;
if (businessType === "JisBBAC") { const config = useConfig(businessType);
config = useConfig("bbac_se_detail_service", "bbacse-sync/invoke");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_se_detail_service", "hbpose-sync/invoke");
} else {
config = useConfig("pub_se_detail_service", "hand-se-sync/sync");
}
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
console.log(item.path, item, rows); console.log(item.path, item, rows);
if (item.path === "sync") { if (item.path === "sync") {

9
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js

@ -7,16 +7,9 @@ export default {
components: { AppList }, components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`, template: html`<app-list :config="config" @command="onCommand" />`,
setup() { setup() {
let config = null;
const route = useRoute(); const route = useRoute();
const businessType = route.meta.businessType; const businessType = route.meta.businessType;
if (businessType === "JisBBAC") { const config = useConfig(businessType);
config = useConfig("bbac_sa_service", "bbac_sa_detail_service");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_sa_service", "hbpo_sa_detail_service");
} else {
config = useConfig("pub_sa_service", "pub_sa_detail_service");
}
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
console.log(item.path, item, rows); console.log(item.path, item, rows);
}; };

0
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js

@ -1,15 +0,0 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/settle/detail.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
config = useConfig("pub_can_sa_service");
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

0
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js

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

@ -1,8 +1,7 @@
import AppList from "../../components/list/index.js"; import AppList from "../../components/list/index.js";
import html from "html"; import html from "html";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import useConfig from "../../models/settle/unable.js"; import useConfig from "../../models/settle/detail.js";
import request from "../../request/index.js";
export default { export default {
components: { AppList }, components: { AppList },
@ -10,14 +9,7 @@ export default {
setup() { setup() {
const route = useRoute(); const route = useRoute();
const businessType = route.meta.businessType; const businessType = route.meta.businessType;
let config = null; const config = useConfig(businessType);
if (businessType === "JisBBAC") {
config = useConfig("bbac_not_sa_service");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_not_sa_service");
} else {
config = useConfig("pub_not_sa_service");
}
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
console.log(item.path, item, rows); console.log(item.path, item, rows);
}; };

10
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js

@ -2,7 +2,6 @@ import AppList from "../../components/list/index.js";
import html from "html"; import html from "html";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import useConfig from "../../models/settle/usable.js"; import useConfig from "../../models/settle/usable.js";
import request from "../../request/index.js";
export default { export default {
components: { AppList }, components: { AppList },
@ -10,14 +9,7 @@ export default {
setup() { setup() {
const route = useRoute(); const route = useRoute();
const businessType = route.meta.businessType; const businessType = route.meta.businessType;
let config = null; const config = useConfig(businessType);
if (businessType === "JisBBAC") {
config = useConfig("bbac_can_sa_service");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_can_sa_service");
} else {
config = useConfig("pub_can_sa_service");
}
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
console.log(item.path, item, rows); console.log(item.path, item, rows);
}; };

Loading…
Cancel
Save