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==='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'">{{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 v-else>{{model[prop]}}</template>
</template> </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-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </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'"> <template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'">
<el-date-picker <el-date-picker
v-model="model[prop]" v-model="model[prop]"
@ -90,6 +97,12 @@ export default {
</template> </template>
</template> </template>
`, `,
styles: html`<style>
.form .el-tabs__header,
.form .el-tabs__item {
height: 32px;
}
</style>`,
props: ["modelValue", "schema", "prop", "isReadOnly", "mode"], props: ["modelValue", "schema", "prop", "isReadOnly", "mode"],
emit: ["update:modelValue"], emit: ["update:modelValue"],
setup(props, context) { 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"> template: html`<div v-loading="loading">
<el-form ref="formRef" :model="model" label-width="auto" :inline="inline"> <el-form ref="formRef" :model="model" label-width="auto" :inline="inline">
<template v-if="schema && schema.properties"> <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 <app-form-item
:parentSchema="schema" :parentSchema="schema"
:schema="value" :schema="value"
@ -70,12 +70,15 @@ export default {
console.log(error); console.log(error);
} }
}; };
// expose const getProperties = (properties) => {
return Object.fromEntries(Object.entries(properties).sort(([, a], [, b]) => a.order - b.order));
};
context.expose({ validate, reset }); context.expose({ validate, reset });
return { return {
model, model,
formRef, formRef,
loading, loading,
getProperties,
errors, errors,
reset, reset,
submit, 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'" :class="item.meta.htmlClass??'el-button--primary'"
v-if="item.meta.isTop" v-if="item.meta.isTop"
@click="click(item,selectedRows)" @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> <el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon>
<span>{{item.meta.title}}</span> <span>{{item.meta.title}}</span>
@ -94,7 +94,7 @@ export default {
<template v-else-if="item.oneToMany"> <template v-else-if="item.oneToMany">
<el-table-column :prop="key" :label="item.title"> <el-table-column :prop="key" :label="item.title">
<template #default="scope"> <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" /> <app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" />
</el-link> </el-link>
</template> </template>
@ -121,6 +121,12 @@ export default {
</template> </template>
</el-table-column> </el-table-column>
</template> </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>
</template> </template>
<slot name="columns"></slot> <slot name="columns"></slot>
@ -627,6 +633,16 @@ export default {
} }
} else if (item.meta.pattern === "file") { } else if (item.meta.pattern === "file") {
window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`)); 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 { } else {
console.log(item); console.log(item);
} }
@ -744,9 +760,13 @@ export default {
dialogVisible.value = false; dialogVisible.value = false;
} }
}; };
const showList = (value, nav, config) => { const showList = async (value, nav, config) => {
if (!subDrawer.value) { 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 = { subListQuery.value = {
query: value, query: value,
buttons: targetRoute.meta.children, 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 version from "../version.js";
import businessType from "../../businessType.js"; import state from "../state.js";
const schema = { const schema = {
title: "JIS结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
version, version,
billNum: { state,
title: "结算单据", settleDate: {
title: "结算日期",
type: "string", type: "string",
input: "dateTime",
}, },
dnBillNum: { groupNum: {
title: "出库单号", title: "结算分组号",
type: "string", type: "string",
}, },
state: { deliveryDate: {
title: "状态", title: "到货日期",
type: "string", type: "string",
input: "dateTime",
}, },
recordCount: { lu: {
title: "明细记录行数", title: "客户零件号",
type: "string", type: "string",
}, },
site: { qty: {
title: "工厂地点", title: "结算数量",
type: "number",
},
pn: {
title: "生产号",
type: "string", type: "string",
}, },
businessType,
}, },
}; };
const queryUrl = "settleaccount/bbac_sa_service/get-list"; const queryUrl = "settleaccount/pub_sa_detail_service/get-list";
const deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const importUrl = "settleaccount/bbac_sa_service/import";
const queryMethod = "POST"; const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
export default function () { export default function () {
return { return {
@ -44,7 +46,7 @@ export default function () {
method: queryMethod, method: queryMethod,
hasFilter: true, hasFilter: true,
schema: { schema: {
title: "JIS结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
filters: { filters: {
@ -68,15 +70,7 @@ export default function () {
}, },
}, },
}, },
default: [ default: [],
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
],
}, },
skipCount: { skipCount: {
hidden: true, hidden: true,
@ -89,6 +83,10 @@ export default function () {
sorting: { sorting: {
hidden: true, hidden: true,
}, },
businessType: {
hidden: true,
default: 0,
},
}, },
}, },
}, },
@ -96,10 +94,6 @@ export default function () {
schema: schema, schema: schema,
}, },
edit: { edit: {
deleteUrl,
importUrl,
deleteMethod,
importMethod,
schema: schema, 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 version from "../version.js";
import businessType from "../../businessType.js"; import state from "../state.js";
import state from "../../state.js";
const schema = { const schema = {
title: "JIS结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
version, version,
billNum: {
title: "结算单据",
type: "string",
},
dnBillNum: {
title: "出库单号",
type: "string",
},
state, state,
recordCount: { billNum: {
title: "明细记录行数", title: "结算单号",
type: "string", type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
}, },
site: { businessType: {
title: "工厂地点", title: "业务类型",
type: "string", type: "string",
hidden: true,
default: 0,
}, },
businessType,
}, },
}; };
const queryUrl = "settleaccount/hbpo_sa_service/get-list"; export default function (service = "pub_sa_service", detailService = "pub_sa_detail_service") {
const deleteUrl = "settleaccount/hbpo_sa_service/delete-list"; const queryUrl = `settleaccount/${service}/get-list`;
const importUrl = "settleaccount/hbpo_sa_service/import"; const deleteUrl = `settleaccount/${service}/delete-list`;
const queryMethod = "POST"; const importUrl = `settleaccount/${service}/import`;
const deleteMethod = "POST"; const exportUrl = `settleaccount/${detailService}/export`;
const importMethod = "POST"; const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return { return {
query: { query: {
url: queryUrl, url: queryUrl,
method: queryMethod, method: queryMethod,
hasFilter: true, hasFilter: true,
schema: { schema: {
title: "JIS结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
filters: { filters: {
@ -87,6 +83,10 @@ export default function () {
sorting: { sorting: {
hidden: true, hidden: true,
}, },
businessType: {
hidden: true,
default: 0,
},
}, },
}, },
}, },
@ -96,8 +96,10 @@ export default function () {
edit: { edit: {
deleteUrl, deleteUrl,
importUrl, importUrl,
exportUrl,
deleteMethod, deleteMethod,
importMethod, importMethod,
exportMethod,
schema: schema, 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 version from "./version.js";
import { state2 as state, state3 } from "./state.js"; import { state2, state3 } from "./state.js";
import businessType from "./businessType.js"; import businessType from "./businessType.js";
import invoiceState from "./invoiceState.js"; import invoiceState from "./invoiceState.js";
const state = Object.assign({}, state2);
state.input = "tabs";
const schema = { const schema = {
title: "商务审批", title: "商务审批",
type: "object", type: "object",
@ -96,6 +98,13 @@ export default function () {
value: null, value: null,
readOnly: true, readOnly: true,
}, },
{
logic: "and",
column: "state",
action: "equal",
value: null,
readOnly: true,
},
], ],
}, },
skipCount: { skipCount: {

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

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

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

@ -5,11 +5,11 @@ const schema = {
title: "结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
version,
state,
billNum: { billNum: {
title: "结算单号", title: "结算单号",
type: "string", type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
}, },
businessType: { businessType: {
title: "业务类型", title: "业务类型",
@ -17,6 +17,20 @@ const schema = {
hidden: true, hidden: true,
default: 0, 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 [ export default [
{ {
path: "jis-bbac", ...createPage("input/jie-suan/detail", "title=结算数据明细&isHidden=true"),
meta: { children: [createButton("query", "title=查询&isTop=true")],
type: "group", },
title: "JIS-BBAC", {
icon: "folder", ...createRoute("jis-bbac", "title=JIS-BBAC"),
},
children: [ children: [
{ {
path: "input", ...createRoute("input", "title=数据输入"),
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [ children: [
{ createJieSuanShuJu("bbac_sa_service", "JisBBAC", "bbac"),
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",
},
},
],
},
{ {
path: "bbac_se_detail_service", path: "bbac_se_detail_service",
meta: { meta: {
@ -402,6 +345,7 @@ export default [
title: "退回", title: "退回",
icon: "file", icon: "file",
isTop: true, isTop: true,
disabled: "(rows,query)=>true",
}, },
}, },
{ {
@ -549,73 +493,7 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ createJieSuanShuJu("hbpo_sa_service", "JisHBPO", "hbpo"),
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",
},
},
],
},
{ {
path: "hbpo_se_detail_service", path: "hbpo_se_detail_service",
meta: { meta: {
@ -1091,73 +969,7 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ createJieSuanShuJu("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac"),
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",
},
},
],
},
{ {
path: "bbac_jit_pub_se_detail_service", path: "bbac_jit_pub_se_detail_service",
meta: { meta: {
@ -1551,11 +1363,12 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
createJieSuanShuJu("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo"),
{ {
path: "hbpo_jit_pub_sa_service", path: "hbpo_jit_pub_se_detail_service",
meta: { meta: {
type: "page", type: "page",
title: "HBPO结算数据", title: "HBPO发运数据",
icon: "file", icon: "file",
}, },
children: [ children: [
@ -1569,32 +1382,42 @@ export default [
}, },
}, },
{ {
path: "import", path: "sync",
meta: { meta: {
type: "button", type: "button",
title: "导入", title: "手动同步",
icon: "file", icon: "file",
isTop: true, isTop: true,
}, },
}, },
{ {
path: "delete", path: "export",
meta: { meta: {
type: "button", type: "button",
title: "删除", title: "导出",
icon: "file", icon: "file",
isTop: true, 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: { meta: {
type: "page", type: "page",
title: "HBPO结算数据明细", title: "HBPO发运与结算比对",
icon: "file", icon: "file",
isHidden: true,
}, },
children: [ children: [
{ {
@ -1607,39 +1430,28 @@ export default [
}, },
}, },
{ {
path: "export", path: "compare",
meta: { meta: {
type: "button", type: "button",
title: "导出", title: "生成对比",
icon: "file", icon: "file",
isTop: true, isTop: true,
pattern: "paged",
}, },
}, },
],
},
{
path: "hbpo_jit_pub_se_detail_service",
meta: {
type: "page",
title: "HBPO发运数据",
icon: "file",
},
children: [
{ {
path: "query", path: "delete",
meta: { meta: {
type: "button", type: "button",
title: "查询", title: "删除",
icon: "file", icon: "file",
isTop: true, isTop: true,
}, },
}, },
{ {
path: "sync", path: "update-data",
meta: { meta: {
type: "button", type: "button",
title: "手动同步", title: "更新结算数据状态",
icon: "file", icon: "file",
isTop: true, isTop: true,
}, },
@ -1648,10 +1460,9 @@ export default [
path: "export", path: "export",
meta: { meta: {
type: "button", type: "button",
title: "导出", title: "下载",
icon: "file", icon: "file",
isTop: true, pattern: "file",
pattern: "paged",
}, },
}, },
], ],
@ -1659,83 +1470,18 @@ export default [
], ],
}, },
{ {
path: "contrast", path: "settlement",
meta: { meta: {
type: "group", type: "group",
title: "数据对比", title: "结算开票",
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ {
path: "hbpo_jit_pub_sa_detail_jobservice", path: "hbpo_jit_pub_can_sa_service",
meta: { meta: {
type: "page", type: "page",
title: "HBPO发运与结算比对", title: "可结算单",
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: "可结算单",
icon: "file", icon: "file",
}, },
children: [ children: [
@ -2021,83 +1767,7 @@ export default [
icon: "file", icon: "file",
}, },
children: [ children: [
{ createJieSuanShuJu("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac"),
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",
},
},
],
},
{ {
path: "bbac_md_pub_se_detail_service", path: "bbac_md_pub_se_detail_service",
meta: { meta: {
@ -2221,83 +1891,7 @@ export default [
icon: "file", icon: "file",
}, },
children: [ children: [
{ createJieSuanShuJu("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo"),
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",
},
},
],
},
{ {
path: "hbpo_md_pub_se_detail_service", path: "hbpo_md_pub_se_detail_service",
meta: { meta: {
@ -2693,73 +2287,7 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ createJieSuanShuJu("bj_pub_sa_service", "BeiJian", "bbac"),
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",
},
},
],
},
{ {
path: "bj_pub_se_detail_service", path: "bj_pub_se_detail_service",
meta: { meta: {
@ -3124,73 +2652,7 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ createJieSuanShuJu("in_pub_sa_service", "YinDuJian", "bbac"),
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",
},
},
],
},
{ {
path: "in_pub_se_detail_service", path: "in_pub_se_detail_service",
meta: { meta: {
@ -3665,7 +3127,6 @@ export default [
}, },
], ],
}, },
//实际采购成本,不知道起什么名
{ {
path: "cost", path: "cost",
meta: { meta: {

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

@ -101,10 +101,11 @@ const refreshRouter = async () => {
// component // component
if (o.meta?.type === "page") { if (o.meta?.type === "page") {
if (!o.component) { if (!o.component) {
o.component = o.path; o.component = o.meta.path ?? o.path;
} }
if (o.component.constructor === String) { if (o.component.constructor === String) {
o.component = () => import(`../views${o.meta.path}.js`); const name = o.component;
o.component = () => import(`../views${name}.js`);
} }
} }
// children // 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 { .el-form--inline .el-form-item__content {
width: 192px; width: 192px;
height: 32px;
} }
.el-table .cell { .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 EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NetTaste;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -17,6 +18,7 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers; using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ 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); 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; 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.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using NetTaste;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -17,6 +18,7 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers; using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ 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) 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); 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; 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 (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); await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, new List<TEMP_NOT_SA_DETAIL>(), main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
} }
else//二次开票 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); 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.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers; using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ 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) 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); 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; 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 Win.Sfs.SettleAccount.Bases;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Bases.DomainServices;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers 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, Guid> _repository;
private readonly INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> _detailRepository; private readonly INormalEfCoreRepository<BBAC_CAN_SA_DETAIL, Guid> _detailRepository;
private readonly INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> _notRepository; private readonly INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> _notRepository;
private readonly BaseDomainService _service;
public BBAC_NOT_SA_MNG() public BBAC_NOT_SA_MNG()
{ {
} }
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_CAN_SA_DETAIL, Guid> detailRepository,
INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository INormalEfCoreRepository<BBAC_NOT_SA_DETAIL, Guid> notRepository
) )
@ -39,9 +41,30 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_repository = repository; _repository = repository;
_detailRepository = detailRepository; _detailRepository = detailRepository;
_notRepository = notRepository; _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 billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new BBAC_CAN_SA(); var _entity = new BBAC_CAN_SA();
_entity.BillNum = billNumber; _entity.BillNum = billNumber;
@ -80,7 +103,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
await _repository.DbContext.BulkDeleteAsync(p_list); await _repository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<BBAC_CAN_SA>() { _entity }); await _repository.DbContext.BulkInsertAsync(new List<BBAC_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList); 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 Win.Sfs.SettleAccount.Bases;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Bases.DomainServices;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers 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, Guid> _repository;
private readonly INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> _detailRepository; private readonly INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> _detailRepository;
private readonly INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> _notRepository; private readonly INormalEfCoreRepository<HBPO_NOT_SA_DETAIL, Guid> _notRepository;
private readonly BaseDomainService _service;
public HBPO_NOT_SA_MNG() 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, Guid> repository,
INormalEfCoreRepository<HBPO_CAN_SA_DETAIL, Guid> detailRepository, 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; _repository = repository;
_detailRepository = detailRepository; _detailRepository = detailRepository;
_notRepository = notRepository; _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 billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new HBPO_CAN_SA(); var _entity = new HBPO_CAN_SA();
@ -81,7 +97,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
await _notRepository.DbContext.BulkDeleteAsync(p_list); await _notRepository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<HBPO_CAN_SA>() { _entity }); await _repository.DbContext.BulkInsertAsync(new List<HBPO_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList); 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; return _invls;
} }
/// <summary> /// <summary>
/// 重开一次开票 /// 重开一次开票
/// </summary> /// </summary>
@ -2205,9 +2209,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return _invls; return _invls;
} }
/// <summary> /// <summary>
/// 重开二次开票 /// 重开二次开票
/// </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 Win.Sfs.SettleAccount.Bases;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using System.Security.Cryptography;
using Win.Sfs.SettleAccount.Bases.DomainServices;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers 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, Guid> _repository;
private readonly INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> _detailRepository; private readonly INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> _detailRepository;
private readonly INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> _notRepository; private readonly INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> _notRepository;
private readonly BaseDomainService _service;
public PUB_NOT_SA_MNG() 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, Guid> repository,
INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> detailRepository, 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; _repository = repository;
_detailRepository = detailRepository; _detailRepository = detailRepository;
_notRepository = notRepository; _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"); List<string> errors = new List<string>();
var _entity = new PUB_CAN_SA(); var query = p_list.Select(p => p.BusinessType).Distinct();
_entity.BillNum = billNumber; foreach (var itm in query.ToList())
_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( errors.Add("选择项有不在同一业务的数据!");
guid: GuidGenerator.Create(),
keyCode: itm.KeyCode, }
version: itm.Version, if (errors.Count > 0)
billNum: billNumber, {
settleBillNum: itm.SettleBillNum, return errors;
lU: itm.LU, }
pN: itm.PN,
site: itm.Site, var first= p_list.FirstOrDefault();
qty: itm.Qty, if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC || first.BusinessType == EnumBusinessType.ZhiGongJianHBPO
price: itm.Price, || first.BusinessType == EnumBusinessType.BeiJian
businessType: itm.BusinessType, )
settleDate: itm.SettleDate, {
groupNum: itm.GroupNum, var ls = p_list.Select(p => p.GroupNum).Distinct().ToList();
invGroupNum: billNumber, var notlist = _notRepository.Where(p => ls.Contains(p.GroupNum)).ToList();//JIT_ASN整发
invbillnum: string.Empty, var priceErrors = await _service.CheckPriceList(notlist);
partcode:itm.PartCode 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); else
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity }); {
await _repository.DbContext.BulkInsertAsync(_entityList); var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
return true; 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