From b4ae9c8745d61cc3266bfa1c645c298cee79e211 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Sat, 19 Aug 2023 17:32:41 +0800
Subject: [PATCH 1/5] update
---
.../wwwroot/components/form/form-input.js | 1 -
.../wwwroot/components/list/index.js | 132 ++++++++++--------
.../wwwroot/models/base-data/role.js | 1 +
.../wwwroot/models/base-data/user.js | 6 +-
.../{centralized-control.js => version.js} | 0
.../wwwroot/models/input/fa-yun.js | 4 +-
.../wwwroot/request/index.js | 46 +++---
.../wwwroot/router/base-data.js | 2 +-
.../wwwroot/views/base-data/user.js | 6 +-
.../{centralized-control.js => version.js} | 3 +-
10 files changed, 110 insertions(+), 91 deletions(-)
rename code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/{centralized-control.js => version.js} (100%)
rename code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/{centralized-control.js => version.js} (91%)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
index 31f75c58..a3d0a522 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
@@ -29,7 +29,6 @@ export default {
-
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
index 364c1572..b6b852fa 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
+++ b/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);"
>
-
+
{{ (pageModel.pageIndex - 1) * pageModel.pageSize + scope.$index + 1 }}
@@ -186,7 +186,7 @@ export default {
-
+
{{editFormTitle}}
@@ -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,
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/role.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/role.js
index c9e249f0..f87db634 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/role.js
+++ b/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: "角色名",
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/user.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/user.js
index 812c413d..1dcc9e16 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/user.js
+++ b/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: "角色",
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/centralized-control.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/version.js
similarity index 100%
rename from code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/centralized-control.js
rename to code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/version.js
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
index a7cea341..be0f29f1 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
+++ b/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 {
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
index 2e134bc4..5d577589 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
+++ b/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, "已创建"],
@@ -59,9 +59,9 @@ const getResult = async (response) => {
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 +87,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.errors && notify && (!result.data?.code || result.data.code === 200)) {
+ ElMessage({
+ type: "success",
+ message: "操作成功",
+ });
+ }
+ if (result.data?.code && result.data.code !== 200) {
+ result.errors = result.data.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 };
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js
index bf68968d..66603861 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js
+++ b/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"),
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
index 58525a07..48b9a3c9 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
@@ -13,11 +13,7 @@ export default {
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`
- );
+ await appListRef.value.onClick(async () => await request(url, null, { method: item.meta.method }, true), `是否重置用户${rows[0].userName}密码?`, false);
}
};
return { appListRef, config, onCommand };
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/centralized-control.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js
similarity index 91%
rename from code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/centralized-control.js
rename to code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js
index 9b3b4f4d..01217efd 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/centralized-control.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js
@@ -2,9 +2,8 @@ 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 useConfig from "../../models/base-data/version.js";
import { ElMessage, ElMessageBox } from "element-plus";
-import { format } from "../../utils/index.js";
export default {
components: { AppList },
From 12c3045bd8c0fb0f1cdaf90f059dd00098af197d Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Mon, 21 Aug 2023 10:28:45 +0800
Subject: [PATCH 2/5] update
---
.../wwwroot/models/settle/detail.js | 1 +
.../wwwroot/request/index.js | 1 +
.../wwwroot/router/business.js | 2 +-
.../wwwroot/views/base-data/job-log.js | 15 ------
.../wwwroot/views/base-data/user.js | 6 ++-
.../wwwroot/views/base-data/version.js | 42 +++++++---------
.../wwwroot/views/compare/_compare.js | 5 +-
.../wwwroot/views/input/fa-yun.js | 3 +-
.../wwwroot/views/settle/commerce.js | 33 ++++---------
.../wwwroot/views/settle/finance.js | 44 -----------------
.../wwwroot/views/settle/unable.js | 17 ++-----
.../wwwroot/views/settle/usable.js | 16 +------
.../wwwroot/views/settle/vmi.js | 48 +++++++++++++++++++
13 files changed, 90 insertions(+), 143 deletions(-)
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/job-log.js
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/vmi.js
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
index 1a69b1ca..5f926fe2 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
+++ b/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: "关联结算单号",
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
index 5d577589..d9136992 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
@@ -54,6 +54,7 @@ async function getResult(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 ?? "错误"}`);
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
index 8765e124..65554b69 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
+++ b/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"),
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/job-log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/job-log.js
deleted file mode 100644
index daa1ebb4..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/job-log.js
+++ /dev/null
@@ -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``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
index 48b9a3c9..b9e28fa5 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
@@ -12,8 +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.onClick(async () => await request(url, null, { method: item.meta.method }, true), `是否重置用户${rows[0].userName}密码?`, false);
+ 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 };
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js
index 01217efd..a9f14ebe 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/version.js
@@ -3,37 +3,29 @@ 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";
-import { ElMessage, ElMessageBox } from "element-plus";
export default {
components: { AppList },
- template: html``,
- setup(props, context) {
- const listRef = ref(null);
+ template: html``,
+ setup() {
+ const appListRef = ref(null);
const config = useConfig();
- const onCommand = async (item, rows, load) => {
+ const onCommand = async (item, rows) => {
+ const url = `${config.baseUrl}/${item.path}`;
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: "操作取消",
- });
- }
- }
+ await appListRef.value.onClick(
+ async () =>
+ await request(
+ url,
+ rows.map((o) => o.id),
+ { method: "POST" },
+ true
+ ),
+ `确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`,
+ true
+ );
}
};
- return { config, onCommand };
+ return { appListRef, config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
index 05700b1d..d1038544 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
+++ b/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);
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
index 6eb00d2e..215c2b16 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
+++ b/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;
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
index 4b2e75bf..554545cd 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
+++ b/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;
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
deleted file mode 100644
index 5a685fc7..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
+++ /dev/null
@@ -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` `,
- 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 };
- },
-};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
index ed6df1fc..c7c1464e 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
@@ -14,22 +14,11 @@ 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(() => request(url, data, { method: "POST" }, true), `确认是否对所有符合查询条件的数据生成可结算单?`, true);
}
};
return { appListRef, config, onCommand };
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
index c0e04733..3898ca17 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
@@ -18,21 +18,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 };
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/vmi.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/vmi.js
new file mode 100644
index 00000000..e4a3e130
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/vmi.js
@@ -0,0 +1,48 @@
+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` `,
+ 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) => {
+ // 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 getUrl = getUrl;
+ // await appListRef.value.onClick(async () => {
+ // 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 { appListRef, config, onCommand, visable, data };
+ },
+};
From 7acf2af23cb376c9ab07ac4c6c73d0c874ea1873 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com>
Date: Mon, 21 Aug 2023 11:32:47 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?=
=?UTF-8?q?=EF=BC=8C=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/BQ/BBAC_CAN_SA_SERVICE.cs | 8 +-
.../Entities/BQ/BBAC_PD_SERVICE.cs | 2 +-
.../Entities/BQ/HBPO_CAN_SA_SERVICE.cs | 31 ++-
.../Entities/BQ/PUB_CAN_SA_SERVICE.cs | 21 +-
.../BQ/Syncs/PendingDeductionService.cs | 182 ++++++++++++++++--
.../Entities/Prices/PriceListAppService.cs | 5 -
.../SettleAccountApplicationModule.cs | 145 --------------
.../Entities/BQ/Managers/INV_MNG_EXT.cs | 2 +-
8 files changed, 215 insertions(+), 181 deletions(-)
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
index ea44fe78..e9eff054 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
+++ b/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 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 = "生成成功" });
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
index dc2197d6..940af115 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
+++ b/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;
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
index 9a3ff640..ff25379e 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
+++ b/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>(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(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty,main.BusinessType);
+ var falg = await FirstInvoice(entitys, new List(), dtos, notlist, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
else//二次开票
{
- var flag=await SecInvoice(entitys,new List(),dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
+ var flag = await SecInvoice(entitys, new List(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
}
}
}
+ else
+ {
+ return new JsonResult(new { Code = 400, Message = "不存在发票记录" });
+ }
return new JsonResult(new { Code = 200, Message = "生成成功" });
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
index 0e584220..af2170b6 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
+++ b/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 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(), dtos, new List(), main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
-
+ await FirstInvoice(entitys, new List(), dtos, new List(), main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
+
}
else//二次开票
{
- await SecInvoice(entitys,new List(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
+ await SecInvoice(entitys, new List(), dtos, main.Version, main.InvGroupNum, string.Empty, main.BusinessType);
}
}
}
}
+ else
+ {
+ return new JsonResult(new { Code = 400, Message = "不存在发票记录" });
+ }
return new JsonResult(new { Code = 200, Message = "生成成功" });
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
index b5df5fe5..8d19fbdf 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
@@ -32,8 +32,6 @@ public class PendingDeductionService : ITransientDependency, IExportJob
INormalEfCoreRepository hbpoRepository,
INormalEfCoreRepository 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,
@@ -130,45 +128,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 +247,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);
+ }
+ }
+
+
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
index 421b32ec..4fd7dca0 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
@@ -174,11 +174,6 @@ public class PriceListAppService : SettleAccountApplicationBase
return await _priceListManager.DeleteListAsync(ids);
}
#endregion
-
-
-
-
-
#region 原方法(废弃)
// ///
// /// 获取总数
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
index 6085eb0f..9a330ce1 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
+++ b/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();
- //}
- //if (key.Equals(typeof(UnSettledExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
- //{//ERP总成开票报表
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
- //{//量差和价差分析报表
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(SecMatchBaseExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
-
- //if (key.Equals(typeof(SettleFisDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
-
- ////大众看板结算与交货核对明细表(有条码)
- //if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- ////大众备件结算核对明细表
- //if (key.Equals(typeof(SettleSparePartExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- ////大众备件未结明细
- //if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- ////大众备件90天核对明细
- //if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(UnSettleDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
-
- //if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(UnsettledDetailReportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(SharePartUnSettledExport).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- ////红旗、一汽轿车结算报表
- //if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- ////红旗结算未结明细
- //if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- ////红旗未结核对
- //if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- ////红旗、轿车发运报表
- //if (key.Equals(typeof(HQMShippingExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(HQHShippingExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(HQFShippingExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(WmsOutputSumExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- ////大众看板未结输出
- //if (key.Equals(typeof(KanBanUnSettledExport).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(FisUpdateExportService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
- //if (key.Equals(typeof(FisOutputService).FullName))
- //{
- // return implementationFactory.GetService();
- //}
-
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
index 831b622e..4d595af3 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
+++ b/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,
From 17410e62b19aa75d27b5e82cd9d779f89f7acacc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com>
Date: Mon, 21 Aug 2023 14:04:12 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/BQ/Dtos/INVOICE_GRP_DTO.cs | 64 +++++++------------
.../BQ/Syncs/PendingDeductionService.cs | 4 ++
.../Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs | 36 +++++------
.../Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs | 3 -
.../Entities/BQ/Managers/PUB_NOT_SA_MNG.cs | 18 +++---
5 files changed, 54 insertions(+), 71 deletions(-)
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
index 6e49217f..c8fd591e 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
+++ b/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
{
@@ -104,19 +102,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "业务类别")]
public EnumBusinessType BusinessType { get; set; }
-
public List DETIAL { set; get; }
}
-
-
-
-
-
-
-
-
-
public class INVOICE_GRP_EXP_DTO
{
///
@@ -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
+ public class INVOICE_WAIT_DETAIL_DTO
{
@@ -304,7 +289,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
///扩展字段1
///
- [Display(Name = "扩展字段1")]
+ [Display(Name = "合同号")]
public string Extend1 { get; set; }
///
@@ -317,8 +302,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
[Display(Name = "价格结束日期")]
public DateTime EndDate { get; set; }
-
-
+ [Display(Name = "扩展字段", AutoGenerateField = false)]
+
public Dictionary ExtraProperties { get; set; }
@@ -338,7 +323,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
- public class INVOICE_MAP_GROUP_DTO : EntityDto
+ public class INVOICE_MAP_GROUP_DTO
{
@@ -365,19 +350,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
///金额
///
- [Display(Name = "金额")]
- public decimal Amt { get; set; }
- ///
- ///扩展字段1
- ///
- [Display(Name = "扩展字段1")]
- public string Extend1 { get; set; }
+ //[Display(Name = "金额")]
+ //public decimal Amt { get; set; }
///
- ///扩展字段2
- ///
- [Display(Name = "扩展字段2")]
- public string Extend2 { get; set; }
- public bool IsDeleted { get; set; }
+ /////扩展字段1
+ /////
+ //[Display(Name = "扩展字段1")]
+ //public string Extend1 { get; set; }
+ /////
+ /////扩展字段2
+ /////
+ //[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
+ public class INVOICE_NOT_SETTLE_DTO
{
- /////
- /////期间
- /////
- //[Display(Name = "期间")]
- //public int Version { get; set; }
+ [Display(Name = "发票号")]
+ public string InvBillNum { get; set; }
///
///发票分组号
///
@@ -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
/////
//[Display(Name = "扩展字段2")]
//public string Extend2 { get; set; }
-
+ [Display(Name = "不可结算零件号",AutoGenerateField =false)]
public Dictionary ExtraProperties { get; set; }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
index 8d19fbdf..2d6e2a82 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
@@ -115,6 +115,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
}).ConfigureAwait(false);
}
}
+ //var query1=
+
+
+
}
else if (type == "JisHBPO")
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
index ad6e5805..f7c2f3a0 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
+++ b/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;
+
+
}
///
/// 向后流程
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
index e09a7335..fd139484 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
+++ b/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);
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs
index 3feae13f..100260da 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs
+++ b/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> GenerateSettlementOrder(List p_list)
{
List errors = new List();
- 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();
From 7ca70388e3bb7ce36bbaf276bf636db499efb95c Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Mon, 21 Aug 2023 15:17:20 +0800
Subject: [PATCH 5/5] update
---
.../SettleAccount.HttpApi.Host/wwwroot/app.js | 20 ++-
.../wwwroot/index.html | 3 +
.../wwwroot/layouts/logo.js | 4 +-
.../wwwroot/models/_options.js | 25 ++-
.../wwwroot/models/vmi/adjust.js | 145 ++++++++++++++++++
.../wwwroot/models/vmi/backup.js | 139 +++++++++++++++++
.../wwwroot/models/vmi/balance.js | 123 +++++++++++++++
.../wwwroot/models/vmi/log.js | 145 ++++++++++++++++++
.../wwwroot/models/vmi/vmi.js | 128 ++++++++++++++++
.../wwwroot/request/index.js | 6 +-
.../wwwroot/router/business.js | 2 +-
.../wwwroot/router/index.js | 4 +-
.../wwwroot/views/login.js | 2 +-
.../wwwroot/views/settle/unable.js | 22 ++-
.../wwwroot/views/settle/usable.js | 1 -
.../wwwroot/views/settle/vmi.js | 27 +---
.../wwwroot/views/vmi/adjust.js | 17 +-
.../wwwroot/views/vmi/backup.js | 2 +-
.../wwwroot/views/vmi/balance.js | 17 +-
.../wwwroot/views/vmi/log.js | 33 ++--
20 files changed, 782 insertions(+), 83 deletions(-)
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/backup.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/vmi.js
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js
index e5f1a923..ad3edcf0 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js
+++ b/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`
+
`,
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: `站点已更新,点击刷新!`,
+ });
+ });
+ });
+ onUnmounted(() => PubSub.unsubscribe(event));
return {
localeMap,
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html
index 89c3c2b0..39a1096f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html
@@ -4,6 +4,9 @@
+
+
+