mahao 1 year ago
parent
commit
a1465c99c6
  1. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  2. 7
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/index.js
  3. 28
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  4. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/lib/element-plus/index.css
  5. 60
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js
  6. 52
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
  7. 11
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
  8. 52
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_detail_service.js
  9. 18
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_service.js
  10. 661
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  11. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js
  12. 37
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/utils.js
  13. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
  14. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_detail_service.js
  15. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_service.js
  16. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_detail_service.js
  17. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_service.js
  18. 29
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
  19. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_detail_service.js
  20. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_service.js
  21. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_detail_service.js
  22. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_service.js
  23. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_detail_service.js
  24. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_service.js
  25. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_detail_service.js
  26. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_service.js
  27. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_detail_service.js
  28. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_service.js
  29. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_detail_service.js
  30. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_service.js
  31. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs
  32. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_NOT_SA_SERVICE.cs
  33. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  34. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs
  35. 31
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
  36. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs
  37. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  38. 150
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

15
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==='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==='select'">{{options[model[prop]]?.label}}</template>
<template v-else-if="schema.input==='select'||schema.input==='tabs'">{{options[model[prop]]?.label}}</template>
<template v-else>{{model[prop]}}</template>
</template>
</template>
@ -30,6 +30,13 @@ export default {
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select>
</template>
<template v-else-if="getInput(schema)==='tabs'">
<el-tabs type="card" v-model="model[prop]" style="height:32px;margin:0;" class="form">
<el-tab-pane key="all" label="全部" :value="null" />
<el-tab-pane v-for="item in options" :key="item.key" :label="item.label" :name="item.value" />
</el-tabs>
<br />
</template>
<template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'">
<el-date-picker
v-model="model[prop]"
@ -90,6 +97,12 @@ export default {
</template>
</template>
`,
styles: html`<style>
.form .el-tabs__header,
.form .el-tabs__item {
height: 32px;
}
</style>`,
props: ["modelValue", "schema", "prop", "isReadOnly", "mode"],
emit: ["update:modelValue"],
setup(props, context) {

7
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/index.js

@ -9,7 +9,7 @@ export default {
template: html`<div v-loading="loading">
<el-form ref="formRef" :model="model" label-width="auto" :inline="inline">
<template v-if="schema && schema.properties">
<template v-for="(value, prop) in schema.properties">
<template v-for="(value, prop) in getProperties(schema.properties)">
<app-form-item
:parentSchema="schema"
:schema="value"
@ -70,12 +70,15 @@ export default {
console.log(error);
}
};
// expose
const getProperties = (properties) => {
return Object.fromEntries(Object.entries(properties).sort(([, a], [, b]) => a.order - b.order));
};
context.expose({ validate, reset });
return {
model,
formRef,
loading,
getProperties,
errors,
reset,
submit,

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

@ -45,7 +45,7 @@ export default {
:class="item.meta.htmlClass??'el-button--primary'"
v-if="item.meta.isTop"
@click="click(item,selectedRows)"
:disabled="item.meta.disabled && item.meta.disabled(selectedRows)"
:disabled="item.meta.disabled && item.meta.disabled.constructor === Function && item.meta.disabled(selectedRows,queryModel)"
>
<el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon>
<span>{{item.meta.title}}</span>
@ -94,7 +94,7 @@ export default {
<template v-else-if="item.oneToMany">
<el-table-column :prop="key" :label="item.title">
<template #default="scope">
<el-link type="primary" @click="showList(scope.row[key],item.oneToMany)">
<el-link type="primary" @click="showList({[key]:scope.row[key]},item.oneToMany,item.config)">
<app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" />
</el-link>
</template>
@ -121,6 +121,12 @@ export default {
</template>
</el-table-column>
</template>
<template v-if="key==='extraProperties'">
<el-table-column v-for="item in scope.row['extraProperties']">
<template #header="scope">{{$t(item.key)??item.key}}</template>
<template #default="scope"> {{item.value}} </template>
</el-table-column>
</template>
</template>
</template>
<slot name="columns"></slot>
@ -627,6 +633,16 @@ export default {
}
} else if (item.meta.pattern === "file") {
window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`));
} else if ((item.meta.pattern = "row")) {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod ?? "POST";
const postData = {
filters: [{ logic: "and", action: "equal", column: item.meta.key, value: rows[0][item.meta.key] }],
};
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
} else {
console.log(item);
}
@ -744,9 +760,13 @@ export default {
dialogVisible.value = false;
}
};
const showList = (value, nav, config) => {
const showList = async (value, nav, config) => {
if (!subDrawer.value) {
const targetRoute = router.getRoutes().find((o) => o.meta?.path === nav);
const targetRoute = router.getRoutes().find((o) => o.path === nav);
if (config.constructor === String) {
const value = (await import(config)).default;
config = value.constructor === Function ? value() : value;
}
subListQuery.value = {
query: value,
buttons: targetRoute.meta.children,

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/lib/element-plus/index.css

File diff suppressed because one or more lines are too long

60
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/input/bbac_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js

@ -1,41 +1,43 @@
import version from "../../version.js";
import businessType from "../../businessType.js";
import version from "../version.js";
import state from "../state.js";
const schema = {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
version,
billNum: {
title: "结算单据",
state,
settleDate: {
title: "结算日期",
type: "string",
input: "dateTime",
},
dnBillNum: {
title: "出库单号",
groupNum: {
title: "结算分组号",
type: "string",
},
state: {
title: "状态",
deliveryDate: {
title: "到货日期",
type: "string",
input: "dateTime",
},
recordCount: {
title: "明细记录行数",
lu: {
title: "客户零件号",
type: "string",
},
site: {
title: "工厂地点",
qty: {
title: "结算数量",
type: "number",
},
pn: {
title: "生产号",
type: "string",
},
businessType,
},
};
const queryUrl = "settleaccount/bbac_sa_service/get-list";
const deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const importUrl = "settleaccount/bbac_sa_service/import";
const queryUrl = "settleaccount/pub_sa_detail_service/get-list";
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
export default function () {
return {
@ -44,7 +46,7 @@ export default function () {
method: queryMethod,
hasFilter: true,
schema: {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
filters: {
@ -68,15 +70,7 @@ export default function () {
},
},
},
default: [
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
],
default: [],
},
skipCount: {
hidden: true,
@ -89,6 +83,10 @@ export default function () {
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
@ -96,10 +94,6 @@ export default function () {
schema: schema,
},
edit: {
deleteUrl,
importUrl,
deleteMethod,
importMethod,
schema: schema,
},
};

52
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/input/hbpo_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js

@ -1,48 +1,44 @@
import version from "../../version.js";
import businessType from "../../businessType.js";
import state from "../../state.js";
import version from "../version.js";
import state from "../state.js";
const schema = {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
version,
billNum: {
title: "结算单据",
type: "string",
},
dnBillNum: {
title: "出库单号",
type: "string",
},
state,
recordCount: {
title: "明细记录行数",
billNum: {
title: "结算单号",
type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
},
site: {
title: "工厂地点",
businessType: {
title: "业务类型",
type: "string",
hidden: true,
default: 0,
},
businessType,
},
};
const queryUrl = "settleaccount/hbpo_sa_service/get-list";
const deleteUrl = "settleaccount/hbpo_sa_service/delete-list";
const importUrl = "settleaccount/hbpo_sa_service/import";
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
export default function (service = "pub_sa_service", detailService = "pub_sa_detail_service") {
const queryUrl = `settleaccount/${service}/get-list`;
const deleteUrl = `settleaccount/${service}/delete-list`;
const importUrl = `settleaccount/${service}/import`;
const exportUrl = `settleaccount/${detailService}/export`;
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
filters: {
@ -87,6 +83,10 @@ export default function () {
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
@ -96,8 +96,10 @@ export default function () {
edit: {
deleteUrl,
importUrl,
exportUrl,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};

11
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js

@ -1,8 +1,10 @@
import version from "./version.js";
import { state2 as state, state3 } from "./state.js";
import { state2, state3 } from "./state.js";
import businessType from "./businessType.js";
import invoiceState from "./invoiceState.js";
const state = Object.assign({}, state2);
state.input = "tabs";
const schema = {
title: "商务审批",
type: "object",
@ -96,6 +98,13 @@ export default function () {
value: null,
readOnly: true,
},
{
logic: "and",
column: "state",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {

52
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_detail_service.js

@ -7,56 +7,30 @@ const schema = {
properties: {
version,
state,
keyCode: {
title: "LU+ASN单号",
type: "string",
},
billNum: {
title: "关联结算单号",
settleDate: {
title: "结算日期",
type: "string",
input: "dateTime",
},
lu: {
title: "零件号",
groupNum: {
title: "结算分组号",
type: "string",
},
pn: {
title: "发货单号",
deliveryDate: {
title: "到货日期",
type: "string",
input: "dateTime",
},
site: {
title: "工厂地点",
lu: {
title: "客户零件号",
type: "string",
},
qty: {
title: "结算数量",
type: "decimal",
},
price: {
title: "单价",
type: "decimal",
},
invGroupNum: {
title: "发票分组号",
type: "string",
type: "number",
},
settleDate: {
title: "结算日期(收货日期",
type: "Datetime",
},
extend1: {
title: "扩展字段1",
type: "string",
},
extend2: {
title: "扩展字段2",
type: "string",
},
extend3: {
title: "扩展字段3",
type: "string",
},
groupNum: {
title: "结算分组",
pn: {
title: "生产号",
type: "string",
},
},

18
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_service.js

@ -5,11 +5,11 @@ const schema = {
title: "结算数据",
type: "object",
properties: {
version,
state,
billNum: {
title: "结算单号",
type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
},
businessType: {
title: "业务类型",
@ -17,6 +17,20 @@ const schema = {
hidden: true,
default: 0,
},
dnBillNum: {
title: "出库单号",
type: "string",
},
recordCount: {
title: "明细记录行数",
type: "string",
},
site: {
title: "工厂地点",
type: "string",
},
state,
version,
},
};

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

@ -1,87 +1,30 @@
import createRoute, { createPage, createButton } from "./utils.js";
function createJieSuanShuJu(path, business, client, title = "结算数据") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/jie-suan",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("import", "title=导入&isTop=true"),
createButton("export", "title=导出&pattern=row&key=billNum"),
createButton("delete", "title=删除&isTop=true"),
],
};
}
export default [
{
path: "jis-bbac",
meta: {
type: "group",
title: "JIS-BBAC",
icon: "folder",
},
...createPage("input/jie-suan/detail", "title=结算数据明细&isHidden=true"),
children: [createButton("query", "title=查询&isTop=true")],
},
{
...createRoute("jis-bbac", "title=JIS-BBAC"),
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
...createRoute("input", "title=数据输入"),
children: [
{
path: "bbac_sa_service",
meta: {
type: "page",
title: "JIS结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bbac_sa_detail_service",
meta: {
type: "page",
title: "JIS结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("bbac_sa_service", "JisBBAC", "bbac"),
{
path: "bbac_se_detail_service",
meta: {
@ -402,6 +345,7 @@ export default [
title: "退回",
icon: "file",
isTop: true,
disabled: "(rows,query)=>true",
},
},
{
@ -549,73 +493,7 @@ export default [
icon: "folder",
},
children: [
{
path: "hbpo_sa_service",
meta: {
type: "page",
title: "JIS结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "hbpo_sa_detail_service",
meta: {
type: "page",
title: "JIS结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("hbpo_sa_service", "JisHBPO", "hbpo"),
{
path: "hbpo_se_detail_service",
meta: {
@ -1091,73 +969,7 @@ export default [
icon: "folder",
},
children: [
{
path: "bbac_jit_pub_sa_service",
meta: {
type: "page",
title: "BBAC结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bbac_jit_pub_sa_detail_service",
meta: {
type: "page",
title: "BBAC结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac"),
{
path: "bbac_jit_pub_se_detail_service",
meta: {
@ -1551,11 +1363,12 @@ export default [
icon: "folder",
},
children: [
createJieSuanShuJu("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo"),
{
path: "hbpo_jit_pub_sa_service",
path: "hbpo_jit_pub_se_detail_service",
meta: {
type: "page",
title: "HBPO结算数据",
title: "HBPO发运数据",
icon: "file",
},
children: [
@ -1569,32 +1382,42 @@ export default [
},
},
{
path: "import",
path: "sync",
meta: {
type: "button",
title: "导入",
title: "手动同步",
icon: "file",
isTop: true,
},
},
{
path: "delete",
path: "export",
meta: {
type: "button",
title: "删除",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "hbpo_jit_pub_sa_detail_service",
path: "hbpo_jit_pub_sa_detail_jobservice",
meta: {
type: "page",
title: "HBPO结算数据明细",
title: "HBPO发运与结算比对",
icon: "file",
isHidden: true,
},
children: [
{
@ -1607,39 +1430,28 @@ export default [
},
},
{
path: "export",
path: "compare",
meta: {
type: "button",
title: "导出",
title: "生成对比",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{
path: "hbpo_jit_pub_se_detail_service",
meta: {
type: "page",
title: "HBPO发运数据",
icon: "file",
},
children: [
{
path: "query",
path: "delete",
meta: {
type: "button",
title: "查询",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "sync",
path: "update-data",
meta: {
type: "button",
title: "手动同步",
title: "更新结算数据状态",
icon: "file",
isTop: true,
},
@ -1648,10 +1460,9 @@ export default [
path: "export",
meta: {
type: "button",
title: "导出",
title: "下载",
icon: "file",
isTop: true,
pattern: "paged",
pattern: "file",
},
},
],
@ -1659,83 +1470,18 @@ export default [
],
},
{
path: "contrast",
path: "settlement",
meta: {
type: "group",
title: "数据对比",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "hbpo_jit_pub_sa_detail_jobservice",
path: "hbpo_jit_pub_can_sa_service",
meta: {
type: "page",
title: "HBPO发运与结算比对",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "compare",
meta: {
type: "button",
title: "生成对比",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "update-data",
meta: {
type: "button",
title: "更新结算数据状态",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "下载",
icon: "file",
pattern: "file",
},
},
],
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "hbpo_jit_pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
title: "可结算单",
icon: "file",
},
children: [
@ -2021,83 +1767,7 @@ export default [
icon: "file",
},
children: [
{
path: "bbac_md_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{
path: "bbac_md_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac"),
{
path: "bbac_md_pub_se_detail_service",
meta: {
@ -2221,83 +1891,7 @@ export default [
icon: "file",
},
children: [
{
path: "hbpo_md_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{
path: "hbpo_md_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo"),
{
path: "hbpo_md_pub_se_detail_service",
meta: {
@ -2693,73 +2287,7 @@ export default [
icon: "folder",
},
children: [
{
path: "bj_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bj_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("bj_pub_sa_service", "BeiJian", "bbac"),
{
path: "bj_pub_se_detail_service",
meta: {
@ -3124,73 +2652,7 @@ export default [
icon: "folder",
},
children: [
{
path: "in_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "in_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("in_pub_sa_service", "YinDuJian", "bbac"),
{
path: "in_pub_se_detail_service",
meta: {
@ -3665,7 +3127,6 @@ export default [
},
],
},
//实际采购成本,不知道起什么名
{
path: "cost",
meta: {

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js

@ -101,10 +101,11 @@ const refreshRouter = async () => {
// component
if (o.meta?.type === "page") {
if (!o.component) {
o.component = o.path;
o.component = o.meta.path ?? o.path;
}
if (o.component.constructor === String) {
o.component = () => import(`../views${o.meta.path}.js`);
const name = o.component;
o.component = () => import(`../views${name}.js`);
}
}
// children

37
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/utils.js

@ -0,0 +1,37 @@
import qs from "../lib/qs/shim.js";
function createDefaultRoute(type = "group", icon = "folder", isHidden = false, isTop = false) {
return {
type,
icon,
isTop,
isHidden,
};
}
function createRoute(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute(), qs.parse(meta)),
};
}
function createPage(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute("page", "file"), qs.parse(meta)),
};
}
function createButton(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute("button", "file"), qs.parse(meta)),
};
}
export default createRoute;
export { createPage, createButton };

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css

@ -97,6 +97,7 @@ a.logo {
.el-form--inline .el-form-item__content {
width: 192px;
height: 32px;
}
.el-table .cell {

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_detail_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_detail_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_service.js

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

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

@ -0,0 +1,29 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/input/jie-suan.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
let config = null;
const route = useRoute();
const businessType = route.meta.businessType;
if (businessType === "JisBBAC") {
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();
}
config.query.url = "settleaccount/bbac_sa_service/get-list";
config.edit.importUrl = "settleaccount/bbac_sa_service/import";
config.edit.exportUrl = "settleaccount/bbac_sa_detail_service/export";
config.edit.deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_detail_service.js

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

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_service.js

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

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_detail_service.js

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

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_detail_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_detail_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_detail_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_detail_service.js

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

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_service.js

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

16
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_NOT_SA_SERVICE.cs

@ -1,6 +1,7 @@
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NetTaste;
using SettleAccount.Domain.BQ;
using System;
using System.Collections.Generic;
@ -17,6 +18,7 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
@ -49,7 +51,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
await _bbacNotMng.GenerateSettlementOrder(entitys);
var errors=await _bbacNotMng.GenerateSettlementOrder(entitys);
if (errors.Count > 0)
{
List<ERR_EXP_DTO> errorlist = new List<ERR_EXP_DTO>();
foreach (var itm in errors)
{
errorlist.Add(new ERR_EXP_DTO() { Message = itm });
}
return await ExportErrorReportAsync(errorlist);
}
return ApplicationConsts.SuccessStr;
}

16
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_NOT_SA_SERVICE.cs

@ -2,6 +2,7 @@ using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NetTaste;
using SettleAccount.Domain.BQ;
using System;
using System.Collections.Generic;
@ -17,6 +18,7 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
@ -49,7 +51,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public override async Task<string> GenerateSettlementOrder(HBPO_NOT_SA_DETAIL_REQ_DTO input)
{
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
await _hbpoNotMng.GenerateSettlementOrder(entitys);
var errors=await _hbpoNotMng.GenerateSettlementOrder(entitys);
if (errors.Count > 0)
{
List<ERR_EXP_DTO> errorlist = new List<ERR_EXP_DTO>();
foreach (var itm in errors)
{
errorlist.Add(new ERR_EXP_DTO() { Message = itm });
}
return await ExportErrorReportAsync(errorlist);
}
return ApplicationConsts.SuccessStr;
}

25
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs

@ -126,34 +126,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
if (input.BillNum.Substring(0, 1) == "C")//一次开票
{
if (main.BusinessType == EnumBusinessType.MaiDanJianHBPO)
{
var strs=await _invmng.MakeInvoice(entitys,new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType, true);
}
if (main.BusinessType == EnumBusinessType.BeiJian)
{
var strs = await _invmng.BJInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos,new List<TEMP_NOT_SA_DETAIL>(),main.Version, main.InvGroupNum,string.Empty, main.BusinessType);
}
else
{
await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, new List<TEMP_NOT_SA_DETAIL>(), main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
}
else//二次开票
{
if (main.BusinessType == EnumBusinessType.MaiDanJianHBPO)
{
var strs=await _invmng.MakeInvoice(entitys,new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType, true);
}
if (main.BusinessType == EnumBusinessType.BeiJian)
{
var strs = await _invmng.BJInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, new List<TEMP_NOT_SA_DETAIL>(), main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
else
{
await SecInvoice(entitys,new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
}
}
}

15
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs

@ -17,6 +17,7 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
@ -44,7 +45,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public override async Task<string> GenerateSettlementOrder(PUB_NOT_SA_DETAIL_REQ_DTO input)
{
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount);
_pubNotMng.GenerateSettlementOrder(entitys);
var errors=await _pubNotMng.GenerateSettlementOrder(entitys);
if (errors.Count > 0)
{
List<ERR_EXP_DTO> errorlist= new List<ERR_EXP_DTO>();
foreach (var itm in errors)
{
errorlist.Add(new ERR_EXP_DTO() { Message = itm });
}
return await ExportErrorReportAsync(errorlist);
}
return ApplicationConsts.SuccessStr;
}

31
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs

@ -10,6 +10,7 @@ using Win.Sfs.Shared.RepositoryBase;
using Win.Sfs.SettleAccount.Bases;
using EFCore.BulkExtensions;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Bases.DomainServices;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
@ -25,13 +26,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
private readonly INormalEfCoreRepository<BBAC_CAN_SA, Guid> _repository;
private readonly INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> _detailRepository;
private readonly INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> _notRepository;
private readonly BaseDomainService _service;
public BBAC_NOT_SA_MNG()
{
}
public BBAC_NOT_SA_MNG
(
INormalEfCoreRepository<BBAC_CAN_SA, Guid> repository,
BaseDomainService service,
INormalEfCoreRepository<BBAC_CAN_SA, Guid> repository,
INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> detailRepository,
INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository
)
@ -39,9 +41,30 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_repository = repository;
_detailRepository = detailRepository;
_notRepository = notRepository;
_service = service;
}
public virtual async Task<bool> GenerateSettlementOrder(List<BBAC_NOT_SA_DETAIL> p_list)
public virtual async Task<List<string>> GenerateSettlementOrder(List<BBAC_NOT_SA_DETAIL> p_list)
{
List<string> errors = new List<string>();
var priceErrors = await _service.CheckPriceList(p_list);
if (priceErrors.Count > 0)
{
foreach (var itm in priceErrors)
{
errors.Add($"发货单号或交付识别号零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
}
}
if (errors.Count > 0)
{
return errors;
}
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new BBAC_CAN_SA();
_entity.BillNum = billNumber;
@ -80,7 +103,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
await _repository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<BBAC_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList);
return true;
return errors;
}

24
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs

@ -10,6 +10,7 @@ using Win.Sfs.Shared.RepositoryBase;
using Win.Sfs.SettleAccount.Bases;
using EFCore.BulkExtensions;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Bases.DomainServices;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
@ -27,6 +28,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
private readonly INormalEfCoreRepository<HBPO_CAN_SA, Guid> _repository;
private readonly INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> _detailRepository;
private readonly INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> _notRepository;
private readonly BaseDomainService _service;
public HBPO_NOT_SA_MNG()
{
@ -36,16 +38,30 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
(
INormalEfCoreRepository<HBPO_CAN_SA, Guid> repository,
INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> detailRepository,
INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> notRepository
INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> notRepository,
BaseDomainService service
)
{
_repository = repository;
_detailRepository = detailRepository;
_notRepository = notRepository;
_service = service;
}
public virtual async Task<bool> GenerateSettlementOrder(List<HBPO_NOT_SA_DETAIL> p_list)
public virtual async Task<List<string>> GenerateSettlementOrder(List<HBPO_NOT_SA_DETAIL> p_list)
{
List<string> errors = new List<string>();
var priceErrors = await _service.CheckPriceList(p_list);
if (priceErrors.Count > 0)
{
foreach (var itm in priceErrors)
{
errors.Add($"发货单号或交付识别号零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
}
}
if (errors.Count > 0)
{
return errors;
}
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new HBPO_CAN_SA();
@ -81,7 +97,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
await _notRepository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<HBPO_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList);
return true;
return errors;
}

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -1866,6 +1866,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return _invls;
}
/// <summary>
/// 重开一次开票
/// </summary>
@ -2205,9 +2209,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return _invls;
}
/// <summary>
/// 重开二次开票
/// </summary>

150
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

@ -10,6 +10,8 @@ using Win.Sfs.Shared.RepositoryBase;
using Win.Sfs.SettleAccount.Bases;
using EFCore.BulkExtensions;
using SettleAccount.Domain.BQ;
using System.Security.Cryptography;
using Win.Sfs.SettleAccount.Bases.DomainServices;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
@ -27,6 +29,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
private readonly INormalEfCoreRepository<PUB_CAN_SA, Guid> _repository;
private readonly INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> _detailRepository;
private readonly INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> _notRepository;
private readonly BaseDomainService _service;
public PUB_NOT_SA_MNG()
{
@ -36,50 +39,129 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
(
INormalEfCoreRepository<PUB_CAN_SA, Guid> repository,
INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> detailRepository,
INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> notRepository
INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> notRepository,
BaseDomainService service
)
{
_service = service;
_repository = repository;
_detailRepository = detailRepository;
_notRepository = notRepository;
}
public virtual async Task<bool> GenerateSettlementOrder(List<PUB_NOT_SA_DETAIL> p_list)
public virtual async Task<List<string>> GenerateSettlementOrder(List<PUB_NOT_SA_DETAIL> p_list)
{
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new PUB_CAN_SA();
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
var _entityList = new List<PUB_CAN_SA_DETAIL>();
foreach (var itm in p_list)
List<string> errors = new List<string>();
var query = p_list.Select(p => p.BusinessType).Distinct();
foreach (var itm in query.ToList())
{
var _detailEntity = new PUB_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,
version: itm.Version,
billNum: billNumber,
settleBillNum: itm.SettleBillNum,
lU: itm.LU,
pN: itm.PN,
site: itm.Site,
qty: itm.Qty,
price: itm.Price,
businessType: itm.BusinessType,
settleDate: itm.SettleDate,
groupNum: itm.GroupNum,
invGroupNum: billNumber,
invbillnum: string.Empty,
partcode:itm.PartCode
);
errors.Add("选择项有不在同一业务的数据!");
}
if (errors.Count > 0)
{
return errors;
}
var first= p_list.FirstOrDefault();
if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC || first.BusinessType == EnumBusinessType.ZhiGongJianHBPO
|| first.BusinessType == EnumBusinessType.BeiJian
)
{
var ls = p_list.Select(p => p.GroupNum).Distinct().ToList();
var notlist = _notRepository.Where(p => ls.Contains(p.GroupNum)).ToList();//JIT_ASN整发
var priceErrors = await _service.CheckPriceList(notlist);
if (priceErrors.Count > 0)
{
foreach (var itm in priceErrors)
{
errors.Add($"发货单号或交付识别号零件{itm.LU}结算日期{itm.SettleDate}无价格区间数据");
}
}
if (errors.Count > 0)
{
return errors;
}
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new PUB_CAN_SA();
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
var _entityList = new List<PUB_CAN_SA_DETAIL>();
foreach (var itm in notlist)
{
var _detailEntity = new PUB_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,
version: itm.Version,
billNum: billNumber,
settleBillNum: itm.SettleBillNum,
lU: itm.LU,
pN: itm.PN,
site: itm.Site,
qty: itm.Qty,
price: itm.Price,
businessType: itm.BusinessType,
settleDate: itm.SettleDate,
groupNum: itm.GroupNum,
invGroupNum: billNumber,
invbillnum: string.Empty,
partcode: itm.PartCode
);
_entityList.Add(_detailEntity);
}
await _notRepository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList);
_entityList.Add(_detailEntity);
}
await _notRepository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList);
return true;
else
{
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new PUB_CAN_SA();
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
var _entityList = new List<PUB_CAN_SA_DETAIL>();
foreach (var itm in p_list)
{
var _detailEntity = new PUB_CAN_SA_DETAIL(
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode,
version: itm.Version,
billNum: billNumber,
settleBillNum: itm.SettleBillNum,
lU: itm.LU,
pN: itm.PN,
site: itm.Site,
qty: itm.Qty,
price: itm.Price,
businessType: itm.BusinessType,
settleDate: itm.SettleDate,
groupNum: itm.GroupNum,
invGroupNum: billNumber,
invbillnum: string.Empty,
partcode: itm.PartCode
);
_entityList.Add(_detailEntity);
}
await _notRepository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList);
}
return errors;
}

Loading…
Cancel
Save