mahao 1 year ago
parent
commit
8767727931
  1. 20
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js
  2. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  3. 132
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  4. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html
  5. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/layouts/logo.js
  6. 25
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js
  7. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/role.js
  8. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/user.js
  9. 0
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/version.js
  10. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
  11. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
  12. 145
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js
  13. 139
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/backup.js
  14. 123
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js
  15. 145
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js
  16. 128
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/vmi.js
  17. 47
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
  18. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js
  19. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  20. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js
  21. 40
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/centralized-control.js
  22. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/job-log.js
  23. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
  24. 31
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js
  25. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
  26. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
  27. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/login.js
  28. 33
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
  29. 44
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
  30. 37
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
  31. 17
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
  32. 23
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/vmi.js
  33. 17
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/adjust.js
  34. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/backup.js
  35. 17
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance.js
  36. 33
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js
  37. 64
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  38. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  39. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  40. 31
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  41. 21
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  42. 186
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  43. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  44. 145
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
  45. 36
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
  46. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
  47. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
  48. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

20
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js

@ -2,13 +2,16 @@ import html from "html";
import { ElConfigProvider } from "element-plus";
import zh from "./lib/element-plus/locale/zh-cn.min.mjs";
import en from "./lib/element-plus/locale/en.min.mjs";
import { reactive, onMounted } from "vue";
import { reactive, onMounted, onUnmounted } from "vue";
import { ElNotification } from "element-plus";
import { dayjs } from "element-plus";
export default {
components: { ElConfigProvider },
template: html`
<el-config-provider :locale="localeMap.get($i18n.locale)">
<router-view></router-view>
<el-popconfirm title="服务端已更新,是否刷新?"> </el-popconfirm>
</el-config-provider>
`,
setup() {
@ -18,7 +21,20 @@ export default {
["en", en],
])
);
onMounted(() => document.querySelector("#loading.loading").classList.remove("loading"));
const event = "Refresh";
onMounted(() => {
document.querySelector("#loading.loading").classList.remove("loading");
PubSub.subscribe(event, async () => {
await ElNotification.closeAll();
ElNotification({
type: "warning",
title: `${dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")}`,
dangerouslyUseHTMLString: true,
message: `<a href="javascript:location.reload(true)">站点已更新,点击刷新!</a>`,
});
});
});
onUnmounted(() => PubSub.unsubscribe(event));
return {
localeMap,
};

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

@ -29,7 +29,6 @@ export default {
<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'||getInput(schema)==='datetimerange'">
<el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format??'YYYY-MM-DD HH:mm:ss'" />

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

@ -60,7 +60,7 @@ export default {
fit
style="width:calc(100% - 26px);"
>
<el-table-column fixed="left" type="selection" :selectable="config.table.selectable" />
<el-table-column v-if="!config.table.schema.disableSelection" fixed="left" type="selection" :selectable="config.table.selectable" />
<el-table-column type="index" :label="$t('rowIndex')">
<template #default="scope"> {{ (pageModel.pageIndex - 1) * pageModel.pageSize + scope.$index + 1 }} </template>
</el-table-column>
@ -186,7 +186,7 @@ export default {
</span>
</template>
</el-drawer>
<el-dialog v-model="dialogVisible" align-center destroy-on-close :close-on-click-modal="false" style="width:auto;min-width:500px;max-width:1000px;">
<el-dialog v-model="dialogVisible" align-center destroy-on-close :close-on-click-modal="false" style="width:auto;width:700px;">
<template #header> <span class="el-dialog__title"> {{editFormTitle}} </span> </template>
<el-row v-loading="editFormloading">
<el-col style="max-height:calc(100% - 180px );min-height:100%;">
@ -399,6 +399,39 @@ export default {
const defaultImportModel = schemaToModel(config.import.schema);
const importModel = ref(null);
const versions = ref([]);
const onClick = async (method, confirMmessage = "确认操作吗?", reload = true) => {
try {
if (confirMmessage) {
await ElMessageBox.confirm(confirMmessage, "提示", {
type: "warning",
});
}
tableLoading.value = true;
let result = null;
if (method.constructor.name == "AsyncFunction") {
result = await method();
} else {
result = method();
}
if (!result.errors) {
if (!result.data?.code || result.data.code === 200) {
if (reload) {
pageModel.pageIndex = 1;
await load();
}
}
}
} catch (error) {
if (error === "cancel") {
ElMessage({
type: "info",
message: "操作取消",
});
}
} finally {
tableLoading.value = false;
}
};
const getSortModel = (model) => {
(model.sorting ?? "")
.split(",")
@ -469,11 +502,14 @@ export default {
tableLoading.value = false;
}
};
const onPageIndexChange = async () => await load();
const onPageSizeChange = async () => {
const reload = async () => {
pageModel.pageIndex = 1;
await load();
};
const onPageIndexChange = async () => await load();
const onPageSizeChange = async () => {
await reload();
};
const click = async (item, rows) => {
editFormloading.value = true;
editFormMode.value = item.path ?? item;
@ -504,11 +540,16 @@ export default {
type: "warning",
});
tableLoading.value = true;
const response = await request(
const result = await request(
url,
rows.map((o) => o.id),
{ method: config.edit.deleteMethod }
{ method: config.edit.deleteMethod },
true
);
if (!result.data?.code || result.data.code === 200) {
pageModel.pageIndex = 1;
await reload();
}
} catch (error) {
if (error === "cancel") {
ElMessage({
@ -525,7 +566,8 @@ export default {
await ElMessageBox.confirm(format("确认删除当前行数据吗?", rows[0]), "提示", {
type: "warning",
});
await request(url, null, { method: config.edit.deleteMethod });
await request(url, null, { method: config.edit.deleteMethod }, true);
await reload();
} catch (error) {
if (error === "cancel") {
ElMessage({
@ -541,10 +583,12 @@ export default {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod;
const postData = buildQuery();
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
await onClick(async () => {
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
}, "确认导出?");
} else if (item.meta.pattern === "file") {
window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`));
} else if ((item.meta.pattern = "row")) {
@ -585,21 +629,23 @@ export default {
try {
const valid = await editFormRef.value.validate();
if (valid) {
editFormloading.value = true;
let url = (editFormMode.value === "create" ? config.edit.createUrl : config.edit.updateUrl) ?? config.query.url;
if (editFormMode.value === "update") {
url = format(url, editFormModel.value.id);
}
const method = editFormMode.value === "create" ? config.edit.createMethod : config.edit.updateMethod;
const response = await request(url, editFormModel.value, { method });
if (response.errors) {
ElMessageBox.alert(`错误:${response.errors?.error?.message}`, `代码:${response.errors?.error?.code}`);
//model.errors = response.errors; //??
} else {
await load();
editFormMode.value = null;
dialogVisible.value = false;
}
await onClick(
async () => {
let url = (editFormMode.value === "create" ? config.edit.createUrl : config.edit.updateUrl) ?? config.query.url;
if (editFormMode.value === "update") {
url = format(url, editFormModel.value.id);
}
const method = editFormMode.value === "create" ? config.edit.createMethod : config.edit.updateMethod;
const result = await request(url, editFormModel.value, { method }, true);
if (!result.errors) {
dialogVisible.value = false;
editFormMode.value = null;
await reload();
}
},
null,
true
);
}
} catch (error) {
console.log(error);
@ -783,37 +829,6 @@ export default {
}
return postData;
}
const action = async (method, confirMmessage = "确认操作吗?", successMessage = "操作成功", reload = true) => {
try {
await ElMessageBox.confirm(confirMmessage, "提示", {
type: "warning",
});
tableLoading.value = true;
let result = null;
if (method.constructor.name == "AsyncFunction") {
result = await method();
} else {
result = method();
}
if (!result.errors) {
if (!result.data?.code || result.data.code === 200) {
if (reload) {
pageModel.pageIndex = 1;
await load();
}
}
}
} catch (error) {
if (error === "cancel") {
ElMessage({
type: "info",
message: "操作取消",
});
}
} finally {
tableLoading.value = false;
}
};
onMounted(async () => {
if (route.meta.children?.length) {
for (const item of route.meta.children) {
@ -836,7 +851,8 @@ export default {
return {
listScrollbarRef,
load,
action,
reload,
onClick,
config,
queryModel,
buildQuery,

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html

@ -4,6 +4,9 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<base href="/" />
<style>
@keyframes loading-rotate {

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/layouts/logo.js

@ -2,12 +2,12 @@ import html from "html";
import { useAppStore } from "../store/index.js";
export default {
template: html`<router-link to="/" class="logo">
template: html`<a href="javascript:location.reload(true)" class="logo">
<div class="flex h-full items-center">
<img src="/assets/logo.svg" />
<h1 v-if="!appStore.isMenuCollapse">{{$t('application')}}</h1>
</div>
</router-link>`,
</a>`,
setup() {
const appStore = useAppStore();
return {

25
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js

@ -129,5 +129,28 @@ const billState = {
],
};
const codeType = {
title: "生产码类型",
type: "string",
input: "select",
options: [
{ value: "01", label: "前保" },
{ value: "02", label: "后保" },
{ value: "03", label: " 左门槛" },
{ value: "04", label: "右门槛" },
{ value: "05", label: "扰流板" },
{ value: "06", label: "前左轮眉" },
{ value: "07", label: "前右轮眉 " },
{ value: "08", label: "后左轮眉" },
{ value: "09", label: "后右轮眉" },
],
clearable: true,
rules: [
{
required: true,
},
],
};
export default businessType;
export { version, state, state2, state3, transType, deliverBillType, deliverSubBillType, proType, billState };
export { version, state, state2, state3, transType, deliverBillType, deliverSubBillType, proType, billState, codeType };

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/role.js

@ -1,6 +1,7 @@
const schema = {
title: "角色",
type: "object",
disableSelection: true,
properties: {
name: {
title: "角色名",

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/user.js

@ -1,6 +1,7 @@
const schema = {
title: "用户",
type: "object",
disableSelection: true,
properties: {
userName: {
title: "用户名",
@ -59,10 +60,7 @@ const schema = {
title: "邮箱",
type: "string",
showForList: true,
rules: [
{ required: true },
{ pattern: "^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z]{2,4})+$", message: "%s必须是正确的格式" },
],
rules: [{ required: true }, { pattern: "^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z]{2,4})+$", message: "%s必须是正确的格式" }],
},
roleNames: {
title: "角色",

0
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/centralized-control.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/version.js

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

@ -313,10 +313,10 @@ export default function (businessType) {
let schema = null;
let service = null;
const syncService = "hand-se-sync/sync";
if (businessType === "JisBBAC") {
if (businessType === "JisBBAC" || businessType === "MaiDanJianBBAC") {
schema = schema1;
service = "bbac_se_detail_service";
} else if (businessType === "JisHBPO") {
} else if (businessType === "JisHBPO" || businessType === "MaiDanJianHBPO") {
schema = schema1;
service = "hbpo_se_detail_service";
} else {

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

@ -1,6 +1,7 @@
const schema = {
title: "通用代码",
type: "object",
disableSelection: true,
properties: {
settleBillNum: {
title: "关联结算单号",

145
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js

@ -0,0 +1,145 @@
import { useLogSchema } from "./vmi.js";
const schema = useLogSchema();
const baseUrl = "settleaccount/vmi";
const queryUrl = `${baseUrl}/log`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = "settleaccount/vmi/edit-balance";
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/import`;
const exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "通用代码",
type: "object",
properties: {
logTypes: { type: "array", hidden: true, default: ["Type500", "Type600"] },
filters: {
title: "项目",
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "erpToLoc",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "vinCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "codeType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "partCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "orderNum",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "smallThanOrEqual",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

139
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/backup.js

@ -0,0 +1,139 @@
import useSchema from "./vmi.js";
const schema = useSchema();
const baseUrl = "settleaccount/vmi";
const queryUrl = `${baseUrl}/backup`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
const exportUrl = `${baseUrl}/backup-export`;
const invokeUrl = "settleaccount/vmi/invoke";
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
const invokeMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
autoSubmit: true,
disableQueryOnLoad: true,
schema: {
title: "时点库存余额查询",
type: "object",
properties: {
name: {
title: "时间",
type: "string",
input: "select",
url: "settleaccount/vmi/snapshot",
value: "name",
label: "name",
defaultSelected: true,
clearable: false,
},
filters: {
title: "项目",
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "erpToLoc",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "partCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "vinCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "codeType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billType",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
invokeUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
invokeMethod,
schema: schema,
},
};
}

123
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js

@ -0,0 +1,123 @@
import useSchema from "./vmi.js";
const schema = useSchema();
const baseUrl = "settleaccount/vmi";
const queryUrl = `${baseUrl}/balance`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
const exportUrl = `${baseUrl}/balance-export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "寄售库存",
type: "object",
properties: {
filters: {
title: "项目",
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "erpToLoc",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "partCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "vinCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "codeType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billType",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

145
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js

@ -0,0 +1,145 @@
import { useLogSchema } from "./vmi.js";
const schema = useLogSchema();
const baseUrl = "settleaccount/vmi";
const queryUrl = `${baseUrl}/log`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/log-import`;
const exportUrl = `${baseUrl}/log-export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "通用代码",
type: "object",
properties: {
// logTypes: { type: "array", hidden: true, default: ["Type200", "Type400"] },
filters: {
title: "项目",
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "erpToLoc",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "vinCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "codeType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "partCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "orderNum",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "smallThanOrEqual",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

128
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/vmi.js

@ -0,0 +1,128 @@
import { deliverBillType, deliverSubBillType, codeType } from "../_options.js";
function useSchema() {
return {
title: "寄售库存",
type: "object",
properties: {
partCode: {
title: "LU零件号",
type: "string",
},
customerPartCode: {
title: "客户零件号",
type: "string",
},
codeType,
billType: deliverBillType,
qty: {
title: "数量",
type: "string",
},
billTime: {
title: "发运日期",
type: "string",
input: "datetime",
},
deliverTime: {
title: "订单日期",
type: "string",
input: "datetime",
},
erpToLoc: {
title: "ERP库位",
type: "string",
},
seq: {
title: "EDI顺序号",
type: "string",
},
orderNum: {
title: "客户订单号",
type: "string",
},
uniqueCode: {
title: "塑件唯一码",
type: "string",
},
matchNumber: {
title: "EDI总成号",
type: "string",
},
pjsNum: {
title: "PJIS生产顺序号",
type: "string",
},
reMark: {
title: "备注",
type: "string",
},
configcode: {
title: "配置码",
type: "string",
},
factory: {
title: "工厂",
type: "string",
},
subBillType: deliverSubBillType,
realCode: {
title: "WMS实发生产码",
type: "string",
},
vinCode: {
title: "EDI订单生产码",
type: "string",
},
settlementVinCode: {
title: "结算生产码",
type: "string",
},
},
};
}
function useLogSchema() {
return Object.assign(
{
changedNumber: {
title: "变动单号",
type: "string",
},
changedTime: {
title: "变动时间",
type: "string",
input: "datetime",
},
changedType: {
title: "变动类型",
type: "string",
input: "select",
options: [
{
value: 0,
label: "入库",
value: 1,
label: "出库",
},
],
},
changedBy: {
title: "变动人",
type: "string",
},
partCode2: {
title: "结算厂内零件号",
type: "string",
},
settlementVinCode: {
title: "结算生产码",
type: "string",
},
},
useSchema()
);
}
export default useSchema;
export { useLogSchema };

47
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js

@ -9,23 +9,23 @@ import { ElMessage, ElMessageBox } from "element-plus";
// baseURL: "/api",
// };
const addToken = async (options) => {
async function addToken(options) {
if (await isLogin()) {
const appStore = useAppStore();
options.headers ??= {};
options.headers.Authorization = `Bearer ${appStore.token}`;
}
};
}
const getUrl = (url) => {
function getUrl(url) {
if (url.startsWith("http")) {
return url;
}
let result = settings.baseURL;
return (result += `/${url}`);
};
}
const getResult = async (response) => {
async function getResult(response) {
const messages = new Map([
[200, "操作成功"],
[201, "已创建"],
@ -54,14 +54,15 @@ const getResult = async (response) => {
try {
result.errors = await response.json();
} catch (error) {
result.errors = error;
console.log(error);
}
ElMessageBox.alert(`${result.errors?.error?.message ?? messages.get(response.status) ?? result.status}`, `${result.errors?.error?.code ?? "错误"}`);
}
return result;
};
}
async function request(url, data, options, withoutToken = false) {
async function request(url, data, options, notify = false) {
url = getUrl(url);
let defaultOptions = {
method: "POST",
@ -87,18 +88,28 @@ async function request(url, data, options, withoutToken = false) {
defaultOptions.body = JSON.stringify(data);
}
}
if (!withoutToken) {
await addToken(defaultOptions);
}
await addToken(defaultOptions);
const response = await fetch(url, defaultOptions);
// if (!result.data?.code || result.data.code === 200) {
// ElMessage({
// type: "success",
// message: "操作成功",
// });
// }
return getResult(response);
const result = await getResult(response);
if (result.data?.code && result.data.code !== 200) {
result.errors = result.data.message ?? result.data.code;
}
if (!result.errors && notify && (!result.data?.code || result.data.code === 200)) {
ElMessage({
type: "success",
message: "操作成功",
});
}
return result;
}
async function get(url, data, notify = false) {
return await request(url, data, { method: "GET" }, notify);
}
async function post(url, data, notify = false) {
return await request(url, data, { method: "POST" }, notify);
}
export default request;
export { getUrl };
export { getUrl, get, post };

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js

@ -23,7 +23,7 @@ export default [
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
},
{
...createPage("centralized-control", "title=期间设置"),
...createPage("version", "title=期间设置"),
children: [
createButton("query", "title=查询&isTop=true"),
createButton("create", "title=新建&isTop=true"),

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

@ -95,7 +95,7 @@ function createCommerceCheckList(path, business, client, title = "商务审批")
function createVmiOutCheckList(path, business, client, title = "寄售库库存扣减审批") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/settle/finance",
component: "/settle/vmi",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("compare", "title=扣减审核通过&isTop=true"),
@ -333,7 +333,7 @@ export default [
children: [
{
...createPage("finance", `title=财务审核`),
component: "/settle/finance",
component: "/settle/vmi",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("import", "title=导入开票文件&isTop=true"),

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

@ -119,7 +119,9 @@ const refreshRouter = async () => {
});
};
setPermission(serverRoutes);
router.removeRoute("layout");
if (router.hasRoute("layout")) {
router.removeRoute("layout");
}
const layout = {
name: "layout",
path: "/",

40
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/centralized-control.js

@ -1,40 +0,0 @@
import html from "html";
import { ref } from "vue";
import request from "../../request/index.js";
import AppList from "../../components/list/index.js";
import useConfig from "../../models/base-data/centralized-control.js";
import { ElMessage, ElMessageBox } from "element-plus";
import { format } from "../../utils/index.js";
export default {
components: { AppList },
template: html`<app-list ref="listRef" :config="config" @command="onCommand" />`,
setup(props, context) {
const listRef = ref(null);
const config = useConfig();
const onCommand = async (item, rows, load) => {
if (item.path === "open-version" || item.path === "closed-version") {
try {
await ElMessageBox.confirm(`确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, "提示", {
type: "warning",
});
const url = `${config.baseUrl}/${item.path}`;
await request(
url,
rows.map((o) => o.id),
{ method: "POST" }
);
await load();
} catch (error) {
if (error === "cancel") {
ElMessage({
type: "info",
message: "操作取消",
});
}
}
}
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/job-log.js

@ -1,15 +0,0 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/base-data/job-log.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 };
},
};

10
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js

@ -12,12 +12,10 @@ export default {
const config = useConfig();
const onCommand = async (item, rows) => {
if (item.path === "reset-password") {
const url = `base/user/${rows[0].id}/${item.path}`;
await appListRef.value.action(
async () => await request(url, null, { method: item.meta.method }),
`是否重置用户${rows[0].userName}密码?`,
`${rows[0].userName}密码已经重置为123456`
);
if (rows.length) {
const url = `base/user/${rows[0].id}/${item.path}`;
await appListRef.value.onClick(async () => await request(url, null, { method: item.meta.method }, true), `是否重置用户${rows[0].userName}密码?`, false);
}
}
};
return { appListRef, config, onCommand };

31
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js

@ -0,0 +1,31 @@
import html from "html";
import { ref } from "vue";
import request from "../../request/index.js";
import AppList from "../../components/list/index.js";
import useConfig from "../../models/base-data/version.js";
export default {
components: { AppList },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`,
setup() {
const appListRef = ref(null);
const config = useConfig();
const onCommand = async (item, rows) => {
const url = `${config.baseUrl}/${item.path}`;
if (item.path === "open-version" || item.path === "closed-version") {
await appListRef.value.onClick(
async () =>
await request(
url,
rows.map((o) => o.id),
{ method: "POST" },
true
),
`确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`,
true
);
}
};
return { appListRef, config, onCommand };
},
};

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

@ -64,7 +64,10 @@ export default function (type) {
delete data["downLineDateTime"];
const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) {
dialogVisable.value = false;
if (!result.data?.code || result.data.code === 200) {
dialogVisable.value = false;
await load();
}
}
} catch (error) {
console.log(error);

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

@ -13,8 +13,7 @@ export default {
const route = useRoute();
const businessType = route.meta.businessType;
const config = useConfig(businessType);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
const onCommand = async (item) => {
if (item.path === "sync") {
const url = config.edit.syncUrl;
const method = config.edit.syncMethod;

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

@ -20,7 +20,7 @@ export default {
<layout-locale />
</div>
<el-card class="box-card" style="width:400px;">
<app-form :schema="schema" v-model="model" :action="action" @submit="submit">
<app-form :schema="schema" v-model="model" @submit="submit">
<template #submitText>{{$t('login')}}</template>
</app-form>
</el-card>

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

@ -2,8 +2,7 @@ import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import { ref } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import request from "../../request/index.js";
import request, { getUrl } from "../../request/index.js";
import useConfig from "../../models/settle/commerce.js";
import AppCheck from "./_check.js";
@ -20,12 +19,7 @@ export default {
const config = useConfig(businessType, "shang-wu");
const onCommand = async (item, rows) => {
if (item.path === "approval" || item.path === "reject" || item.path === "receive") {
if (rows.length === 0) {
ElMessage({
type: "warning",
message: "没有选中的数据",
});
} else {
if (rows.length > 0) {
const message =
item.path === "approval"
? `确认审核通过选中的${rows.length}行数据吗?`
@ -34,18 +28,7 @@ export default {
: `确认选中的${rows.length}行数据客户已收票吗?`;
const data = item.path === "approval" ? rows.map((o) => o.invbillNum) : item.path === "reject" ? rows[0]["invGroupNum"] : rows.map((o) => o.invbillNum);
const url = item.path === "approval" ? config.edit.invoiceUrl : item.path === "reject" ? config.edit.rejectUrl : config.edit.receivedUrl;
try {
await ElMessageBox.confirm(message, "提示", {
type: "warning",
});
appListRef.value.tableLoading = true;
const result = request(url, data, { method: "POST" });
console.log(result);
} catch (e) {
console.log(e);
} finally {
appListRef.value.tableLoading = false;
}
await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true);
}
} else if (item.path === "export-group") {
const url = config.edit.exportUrl;
@ -60,10 +43,12 @@ export default {
},
],
};
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
await appListRef.value.onClick(async () => {
const response = await request(url, postData, { method }, true);
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
});
} else if (item.path === "invbillNum" || item.path === "invGroupNum") {
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;

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

@ -1,44 +0,0 @@
import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import { ref } from "vue";
import useConfig from "../../models/settle/commerce.js";
import AppCheck from "./_check.js";
import request, { getUrl } from "../../request/index.js";
export default {
components: { AppList, AppCheck },
template: html`<app-list :config="config" @command="onCommand" /> <app-check v-if="visable" v-model="visable" :data="data" />`,
setup() {
const visable = ref(false);
const data = ref(null);
const route = useRoute();
const businessType = route.meta.businessType;
const config = useConfig(businessType, "cai-wu");
const onCommand = async (item, rows) => {
if (item.path === "export-group") {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod;
const postData = {
filters: [
{
logic: "and",
column: "invGroupNum",
action: "equal",
value: rows[0]["invGroupNum"],
},
],
};
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
} else if (item.path === "invbillNum" || item.path === "invGroupNum") {
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
}
console.log(item.path, item, rows);
};
return { config, onCommand, visable, data };
},
};

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

@ -2,9 +2,9 @@ import AppList from "../../components/list/index.js";
import html from "html";
import { ref } from "vue";
import { useRoute } from "vue-router";
import { ElMessageBox } from "element-plus";
import useConfig from "../../models/settle/detail.js";
import request from "../../request/index.js";
import request, { getUrl } from "../../request/index.js";
import { ElMessage } from "element-plus";
export default {
components: { AppList },
@ -14,22 +14,27 @@ export default {
const route = useRoute();
const businessType = route.meta.businessType;
const config = useConfig(businessType, "unable");
const onCommand = async (item, rows) => {
const onCommand = async (item) => {
const url = config.edit.addUrl;
if (item.path === "add") {
try {
await ElMessageBox.confirm(`确认是否对所有符合查询条件的数据生成可结算单?`, "提示", {
type: "warning",
});
appListRef.value.tableLoading = true;
const data = appListRef.value.buildQuery();
const result = request(url, data, { method: "POST" });
console.log(result);
} catch (e) {
console.log(e);
} finally {
appListRef.value.tableLoading = false;
}
const data = appListRef.value.buildQuery();
await appListRef.value.onClick(
async () => {
const result = await request(url, data, { method: "POST" }, true);
if (result.errors) {
if (result.data.code === 400 && result.data.fileName) {
ElMessage({
type: "warnning",
message: "操作失败",
});
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
}
console.log(result);
}
},
`确认是否对所有符合查询条件的数据生成可结算单?`,
true
);
}
};
return { appListRef, config, onCommand };

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

@ -2,7 +2,6 @@ import AppList from "../../components/list/index.js";
import html from "html";
import { ref } from "vue";
import { useRoute } from "vue-router";
import { ElMessageBox } from "element-plus";
import useConfig from "../../models/settle/usable.js";
import request from "../../request/index.js";
@ -18,21 +17,7 @@ export default {
const url = config.edit.addUrl;
if (item.path === "add") {
const invbillNum = rows[0].billNum;
try {
await ElMessageBox.confirm(`确认为${invbillNum}创建发票?`, "提示", {
type: "warning",
});
appListRef.value.tableLoading = true;
const result = request(url, { invbillNum }, { method: "POST" });
if (!result.errors) {
await appListRef.value.load();
}
console.log(result);
} catch (e) {
console.log(e);
} finally {
appListRef.value.tableLoading = false;
}
await appListRef.value.onClick(async () => await request(url, { invbillNum }, { method: "POST" }, true), `确认为${invbillNum}创建发票?`, true);
}
};
return { appListRef, config, onCommand };

23
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/vmi.js

@ -0,0 +1,23 @@
import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import { ref } from "vue";
import useConfig from "../../models/settle/commerce.js";
import AppCheck from "./_check.js";
export default {
components: { AppList, AppCheck },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" /> <app-check v-if="visable" v-model="visable" :data="data" />`,
setup() {
const appListRef = ref(null);
const visable = ref(false);
const data = ref(null);
const route = useRoute();
const businessType = route.meta.businessType;
const config = useConfig(businessType, "cai-wu");
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { appListRef, config, onCommand, visable, data };
},
};

17
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/adjust.js

@ -1,15 +1,2 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/inventory/adjust.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 };
},
};
import useList from "../_list.js";
export default useList("vmi/adjust");

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/backup.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/inventory/backup.js";
import useConfig from "../../../models/vmi/backup.js";
export default {
components: { AppList },

17
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance.js

@ -1,15 +1,2 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/inventory/balance.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 };
},
};
import useList from "../_list.js";
export default useList("vmi/balance");

33
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/inventory/log.js";
import useConfig from "../../../models/vmi/log.js";
import { ref } from "vue";
import { schemaToModel } from "../../utils/index.js";
import AppForm from "../../../components/form/index.js";
@ -10,16 +10,18 @@ import request, { getUrl } from "../../request/index.js";
export default {
components: { AppList, AppTable, AppForm },
template: html`
<app-list :config="config" @command="onCommand" />
<el-dialog v-model="addDialogVisible" align-center :close-on-click-modal="false" destroy-on-close style="width:380px;height:480px;">
<app-list ref="appListRef" :config="config" @command="onCommand" />
<el-dialog v-model="addDialogVisible" align-center :close-on-click-modal="false" destroy-on-close style="width:380px;">
<template #header>补货数据导出</template>
<el-scrollbar>
<el-row>
<el-col>
<app-form ref="addAdjFormRef" v-if="addDialogVisible && adjModel" :schema="adjSchema" v-model="adjModel" :hideButton="true" inline @submit="submitAdj" />
</el-col>
</el-row>
</el-scrollbar>
<div v-loading="loading" style="height:100%;">
<el-scrollbar style="height:calc(100% - -120px);">
<el-row>
<el-col>
<app-form ref="addAdjFormRef" v-if="addDialogVisible && adjModel" :schema="adjSchema" v-model="adjModel" :hideButton="true" inline @submit="submitAdj" />
</el-col>
</el-row>
</el-scrollbar>
</div>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submitAdj">确定</el-button>
@ -28,18 +30,25 @@ export default {
</el-dialog>
`,
setup() {
const appListRef = ref(false);
const loading = ref(false);
const addDialogVisible = ref(false);
const addAdjFormRef = ref(null);
const submitAdj = async () => {
try {
const valid = await addAdjFormRef.value.validate();
loading.value = true;
const url = "settleaccount/vmi/replenished-export";
const method = "POST";
const response = await request(url, null, { method });
const response = await request(url, adjModel.value, { method }, true);
if (!response.errors) {
addDialogVisible.value = false;
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
const adjSchema = {
@ -71,6 +80,8 @@ export default {
console.log(item.path, item, rows);
};
return {
appListRef,
loading,
config,
onCommand,
submitAdj,

64
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -62,8 +62,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "客户代码")]
public string ClientCode { get; set; }
}
[Display(Name = "发票")]
public class INVOICE_REPEAT_DTO : EntityDto<Guid>
{
@ -104,19 +102,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "业务类别")]
public EnumBusinessType BusinessType { get; set; }
public List<INVOICE_WAIT_DETAIL_DTO> DETIAL { set; get; }
}
public class INVOICE_GRP_EXP_DTO
{
/// <summary>
@ -197,12 +185,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ImporterHeader(Name = "金税发票金额", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal RealAmt { get; set; }
}
public class INVOICE_GRP_REQ_DTO : RequestInputBase
@ -248,7 +233,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
public class INVOICE_WAIT_DETAIL_DTO : EntityDto<Guid>
public class INVOICE_WAIT_DETAIL_DTO
{
@ -304,7 +289,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
///扩展字段1
/// </summary>
[Display(Name = "扩展字段1")]
[Display(Name = "合同号")]
public string Extend1 { get; set; }
/// <summary>
@ -317,8 +302,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "价格结束日期")]
public DateTime EndDate { get; set; }
[Display(Name = "扩展字段", AutoGenerateField = false)]
public Dictionary<string, object> ExtraProperties { get; set; }
@ -338,7 +323,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
public class INVOICE_MAP_GROUP_DTO : EntityDto<Guid>
public class INVOICE_MAP_GROUP_DTO
{
@ -365,19 +350,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
///金额
/// </summary>
[Display(Name = "金额")]
public decimal Amt { get; set; }
/// <summary>
///扩展字段1
/// </summary>
[Display(Name = "扩展字段1")]
public string Extend1 { get; set; }
//[Display(Name = "金额")]
//public decimal Amt { get; set; }
/// <summary>
///扩展字段2
/// </summary>
[Display(Name = "扩展字段2")]
public string Extend2 { get; set; }
public bool IsDeleted { get; set; }
/////扩展字段1
///// </summary>
//[Display(Name = "扩展字段1")]
//public string Extend1 { get; set; }
///// <summary>
/////扩展字段2
///// </summary>
//[Display(Name = "扩展字段2")]
//public string Extend2 { get; set; }
//public bool IsDeleted { get; set; }
}
@ -433,14 +418,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string InvGroupNum { get; set; }
}
public class INVOICE_NOT_SETTLE_DTO : EntityDto<Guid>
public class INVOICE_NOT_SETTLE_DTO
{
///// <summary>
/////期间
///// </summary>
//[Display(Name = "期间")]
//public int Version { get; set; }
[Display(Name = "发票号")]
public string InvBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
@ -463,8 +445,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string LU1 { get; set; }
[Display(Name = "不可结算零件号")]
public string InvBillNum { get; set; }
//[Display(Name = "不可结算零件号")]
@ -482,7 +462,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///// </summary>
//[Display(Name = "扩展字段2")]
//public string Extend2 { get; set; }
[Display(Name = "不可结算零件号",AutoGenerateField =false)]
public Dictionary<string, object> ExtraProperties { get; set; }
}

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs

@ -85,8 +85,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async override Task<IActionResult> GenerateInvoice(string invbillNum)
{
var main =await _bbacMng.GetMainAsync(invbillNum);
if (main != null)
{
if (main.State != SettleBillState.)
{
return new JsonResult(new { Code = 400, Message = "已创建发票不能重复创建" });
}
if (await _bbacMng.SetForwardState(main, SettleBillState.))
{
var entitys = await _bbacMng.GetDetalListAsync(invbillNum);//可结算
@ -105,6 +110,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
select new TEMP_CAN_SA_DETAIL
{
SettleBillNum = d.SettleBillNum,
Site = d.Site,
Version = d.Version,
@ -159,7 +165,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
else
{
throw new UserFriendlyException(string.Format("{0}不存在该可结算单号", invbillNum));
return new JsonResult(new { Code = 400, Message = "不存在发票记录" });
}
return new JsonResult(new { Code = 200, Message = "生成成功" });
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs

@ -95,7 +95,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
// });
// }
//}
return ApplicationConsts.SuccessStr;
// return ApplicationConsts.SuccessStr;
}

31
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs

@ -11,6 +11,7 @@ using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.ObjectMapping;
@ -78,19 +79,27 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
var main =await _hbpoMng.GetMainAsync(invbillnum);
if (main != null)
{
if (main.State != SettleBillState.)
{
return new JsonResult(new { Code = 400, Message = "已创建发票不能重复创建" });
}
if (await _hbpoMng.SetForwardState(main, SettleBillState.))
{
var entitys = await _hbpoMng.GetDetalListAsync(invbillnum);
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();
var priceList = _priceRepository.ToList();//价格单
var errorList=await CheckInvoiceGenerationRules(entitys, priceList,main.BusinessType);//校验生成规则
var errorList = await CheckInvoiceGenerationRules(entitys, priceList, main.BusinessType);//校验生成规则
if (errorList.Count() > 0)
{
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = await ExportErrorReportAsync(errorList) });
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = await ExportErrorReportAsync(errorList) });
}
var dto1s = ObjectMapper.Map<List<HBPO_CAN_SA_DETAIL>, List<HBPO_CAN_SA_DETAIL_DTO>>(entitys);
var q = from d in dto1s
@ -111,11 +120,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
Qty = d.Qty,
GroupNum = d.GroupNum,
Amt = Math.Round(d.Qty * p.Price, 2),
ContractDocID="no",
ContractDocID = "no",
BeginDate = p.BeginTime,
EndDate = p.EndTime,
PartCode=d.PartCode
PartCode = d.PartCode
};
var dtos = q.ToList();
if (dtos != null && dtos.Count > 0)
@ -138,19 +147,23 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
SettleDate = p.SettleDate,
GroupNum = p.GroupNum,
ContractDocID = string.Empty,
PartCode=p.PartCode
PartCode = p.PartCode
}).ToList();//不能结算
var falg= await FirstInvoice(entitys,new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty,main.BusinessType);
var falg = await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
else//二次开票
{
var flag=await SecInvoice(entitys,new List<PUB_ADJ_DETAIL>(),dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
var flag = await SecInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
}
}
}
else
{
return new JsonResult(new { Code = 400, Message = "不存在发票记录" });
}
return new JsonResult(new { Code = 200, Message = "生成成功" });
}

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

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Migrations;
using SettleAccount.Domain.BQ;
using Volo.Abp;
using Volo.Abp.Data;
using Volo.Abp.Domain.Entities;
using Win.Abp.Snowflakes;
@ -68,8 +69,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async override Task<IActionResult> GenerateInvoice(string billnum)
{
var main = await _pubMng.GetMainAsync(billnum);
if (main != null)
{
if (main.State != SettleBillState.)
{
return new JsonResult(new { Code = 400, Message = "已创建发票不能重复创建" });
}
if (await _pubMng.SetForwardState(main, SettleBillState.))
{
var entitys = await _pubMng.GetDetalListAsync(billnum);
@ -99,6 +107,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
where d.SettleDate >= p.BeginTime && d.SettleDate <= p.EndTime
select new TEMP_CAN_SA_DETAIL
{
Id = d.Id,
SettleBillNum = d.SettleBillNum,
Site = d.Site,
Version = d.Version,
@ -115,7 +124,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
ContractDocID = "no",
BeginDate = p.BeginTime,
EndDate = p.EndTime,
PartCode=d.PartCode,//客户零件号
PartCode = d.PartCode,//客户零件号
};
var dtos = q.ToList();
if (dtos != null && dtos.Count > 0)
@ -123,16 +132,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
if (billnum.Substring(0, 1) == "C")//一次开票
{
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//二次开票
{
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);
}
}
}
}
else
{
return new JsonResult(new { Code = 400, Message = "不存在发票记录" });
}
return new JsonResult(new { Code = 200, Message = "生成成功" });
}

186
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -32,8 +32,6 @@ public class PendingDeductionService : ITransientDependency, IExportJob
INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> hbpoRepository,
INormalEfCoreRepository<PUB_PD_DETAIL, Guid> pubRepository,
VmiAppService vimservice
)
{
_hbpoRepository = hbpoRepository;
@ -105,8 +103,8 @@ public class PendingDeductionService : ITransientDependency, IExportJob
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
SubBillType = EnumDeliverSubBillType.BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件,
//SubBillType = EnumDeliverSubBillType.小件BBAC,
//BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.PartCode,
SettlementVinCode = itm.VinCode,
PartCode2 = itm.PartCode2,
@ -117,6 +115,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
}).ConfigureAwait(false);
}
}
//var query1=
}
else if (type == "JisHBPO")
{
@ -130,45 +132,118 @@ public class PendingDeductionService : ITransientDependency, IExportJob
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
DeliverTime = itm.CreationTime,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
SubBillType = EnumDeliverSubBillType.BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
}
else
{
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList();
switch (type)
{
case "ZhiGongJianBBAC":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.PN,
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break;
case "ZhiGongJianHBPO":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.PN,// 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break;
case "MaiDanJianBBAC":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
@ -176,18 +251,99 @@ public class PendingDeductionService : ITransientDependency, IExportJob
case "MaiDanJianHBPO":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break;
case "BeiJian":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break;
case "YinDuJian":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -174,11 +174,6 @@ public class PriceListAppService : SettleAccountApplicationBase<PriceList>
return await _priceListManager.DeleteListAsync(ids);
}
#endregion
#region 原方法(废弃)
// /// <summary>
// /// 获取总数

145
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs

@ -78,151 +78,6 @@ namespace Win.Sfs.SettleAccount
//if (key.Equals(typeof(InvoiceSettledDiffExportService).FullName))
//{
// return implementationFactory.GetService<InvoiceSettledDiffExportService>();
//}
//if (key.Equals(typeof(UnSettledExportService).FullName))
//{
// return implementationFactory.GetService<UnSettledExportService>();
//}
//if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
//{//ERP总成开票报表
// return implementationFactory.GetService<fisUnsettledDiffReport>();
//}
//if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
//{//量差和价差分析报表
// return implementationFactory.GetService<PriceQtyDifferenceExportService>();
//}
//if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
//{
// return implementationFactory.GetService<SettledPartAndErpPartPriceDiffExportService>();
//}
//if (key.Equals(typeof(SecMatchBaseExportService).FullName))
//{
// return implementationFactory.GetService<SecMatchBaseExportService>();
//}
//if (key.Equals(typeof(SettleFisDiffExportService).FullName))
//{
// return implementationFactory.GetService<SettleFisDiffExportService>();
//}
////大众看板结算与交货核对明细表(有条码)
//if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
//{
// return implementationFactory.GetService<SettleKBWithCodeExportService>();
//}
////大众备件结算核对明细表
//if (key.Equals(typeof(SettleSparePartExportService).FullName))
//{
// return implementationFactory.GetService<SettleSparePartExportService>();
//}
////大众备件未结明细
//if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
//{
// return implementationFactory.GetService<SettleUnSparePartExportService>();
//}
////大众备件90天核对明细
//if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
//{
// return implementationFactory.GetService<SettleSparePart90ExportService>();
//}
//if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<UnInvoiceSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(UnSettleDiffExportService).FullName))
//{
// return implementationFactory.GetService<UnSettleDiffExportService>();
//}
//if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
//{
// return implementationFactory.GetService<SettleDoorPanelExportService>();
//}
//if (key.Equals(typeof(UnsettledDetailReportService).FullName))
//{
// return implementationFactory.GetService<UnsettledDetailReportService>();
//}
//if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
//{
// return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
//}
//if (key.Equals(typeof(SharePartUnSettledExport).FullName))
//{
// return implementationFactory.GetService<SharePartUnSettledExport>();
//}
////红旗、一汽轿车结算报表
//if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFSharePartSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQMSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQMSharePartSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
//}
////红旗结算未结明细
//if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
//}
////红旗未结核对
//if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();
//}
////红旗、轿车发运报表
//if (key.Equals(typeof(HQMShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQMShippingExportService>();
//}
//if (key.Equals(typeof(HQHShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQHShippingExportService>();
//}
//if (key.Equals(typeof(HQFShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQFShippingExportService>();
//}
//if (key.Equals(typeof(WmsOutputSumExportService).FullName))
//{
// return implementationFactory.GetService<WmsOutputSumExportService>();
//}
////大众看板未结输出
//if (key.Equals(typeof(KanBanUnSettledExport).FullName))
//{
// return implementationFactory.GetService<KanBanUnSettledExport>();
//}
//if (key.Equals(typeof(FisUpdateExportService).FullName))
//{
// return implementationFactory.GetService<FisUpdateExportService>();
//}
//if (key.Equals(typeof(FisOutputService).FullName))
//{
// return implementationFactory.GetService<FisOutputService>();
//}

36
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs

@ -62,18 +62,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
var ls = _repository.Where(p => p.InvGroupNum == p_billNum).ToList();
if (ls == null && ls.Count ==0)
if (ls.Count > 1)
{
throw new UserFriendlyException(string.Format("不存在编号为{0}",p_billNum));
throw new UserFriendlyException("可结算单有重复");
}
foreach (BBAC_CAN_SA p_entiy in ls)
{
var first = ls.FirstOrDefault();
switch (state)
{
case SettleBillState.:
if (p_entiy.State == SettleBillState.)
if (first.State == SettleBillState.)
{
p_entiy.State = state;
first.State = state;
}
else
{
@ -81,9 +81,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
break;
case SettleBillState.:
if (p_entiy.State == SettleBillState.)
if (first.State == SettleBillState.)
{
p_entiy.State = state;
first.State = state;
}
else
{
@ -91,9 +91,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
break;
case SettleBillState.:
if (p_entiy.State == SettleBillState.)
if (first.State == SettleBillState.)
{
p_entiy.State = state;
first.State = state;
}
else
{
@ -101,9 +101,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
break;
case SettleBillState.:
if (p_entiy.State == SettleBillState.)
if (first.State == SettleBillState.)
{
p_entiy.State = state;
first.State = state;
}
else
{
@ -111,20 +111,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
break;
case SettleBillState.:
if (p_entiy.State == SettleBillState.)
if (first.State == SettleBillState.)
{
p_entiy.State = state;
first.State = state;
}
else
{
throw new UserFriendlyException("当前状态不是[财务已审核],无法设置成【客户已收票】状态");
}
break;
}
await _repository.UpdateAsync(p_entiy);
return true;
}
return false;
await _repository.UpdateAsync(first);
return true;
}
/// <summary>
/// 向后流程

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

@ -62,7 +62,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return errors;
}
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new BBAC_CAN_SA();
_entity.BillNum = billNumber;
@ -93,9 +92,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
contactid: itm.ContractDocID,
invbillnum: string.Empty,
partcode:itm.PartCode
);
_entityList.Add(_detailEntity);
}
await _repository.DbContext.BulkDeleteAsync(p_list);

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs

@ -1078,7 +1078,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var query = from inv1 in invdetails
join dto1 in dtos on
new { inv1.LU, inv1.PN } equals new { dto1.LU, dto1.PN }
new { inv1.LU, inv1.PN,inv1.Id } equals new { dto1.LU, dto1.PN, dto1.Id }
select new
{
PartCode = inv1.PartCode,

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

@ -51,15 +51,17 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
public virtual async Task<List<string>> GenerateSettlementOrder(List<PUB_NOT_SA_DETAIL> p_list)
{
List<string> errors = new List<string>();
var query = p_list.Select(p => p.BusinessType).Distinct();
foreach (var itm in query.ToList())
var query = p_list.Select(p => p.BusinessType).Distinct().ToList();
if (query.Count > 1)
{
errors.Add("选择项有不在同一业务的数据!");
}
if (errors.Count > 0)
{
return errors;
foreach (var itm in query.ToList())
{
errors.Add("选择项有不在同一业务的数据!");
}
if (errors.Count > 0)
{
return errors;
}
}
var first= p_list.FirstOrDefault();

Loading…
Cancel
Save