From b17ebf64215a449aa5bac5b473aefa2493f62000 Mon Sep 17 00:00:00 2001
From: zhouhongjun <565221961@qq.com>
Date: Thu, 21 Dec 2023 16:25:37 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A03=E4=B8=AA=E6=AF=94=E5=AF=B9?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wwwroot/models/compare/vmi-job.js | 14 +--
.../wwwroot/models/settle/commerce.js | 17 ++++
.../wwwroot/models/vmi/balance.js | 60 +++++++++++-
.../wwwroot/router/business.js | 19 ++++
.../wwwroot/views/compare/vmi-job.js | 98 +++++++++----------
.../wwwroot/views/finance/check.js | 30 +++++-
.../wwwroot/views/settle/finance.js | 1 +
.../ReportServices/ReportMakeService.cs | 4 +-
8 files changed, 183 insertions(+), 60 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/vmi-job.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/vmi-job.js
index 5ca87a4a..ecd986a1 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/vmi-job.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/vmi-job.js
@@ -75,18 +75,20 @@ const nameList = {
};
export default function (businessType, type) {
+ alert(businessType);
+ alert(type);
let compareService = "report/get-balance-sum";
let title = null;
let name = "生成库存余额";
const compareSchema = Object.assign({}, defaultCompareSchema);
if (type === "fa-yun") {
delete compareSchema.properties["downLineDateTime"];
- if (businessType === "JisBBAC") {
- compareService = "compare/edi-se-compare";
- name = "JisBBACEDI与发运数据对比";
- } else if (businessType === "JisHBPO") {
- compareService = "compare/edi-se-compare";
- name = "JisHBPOEDI与发运数据对比";
+ if (businessType === "BBACDiff") {
+ compareService = "report/get-bbacwms-edi-diff";
+ name = "BBAC全表核对差异";
+ } else if (businessType === "HBPODiff") {
+ compareService = "report/get-hbpowms-edi-diff";
+ name = "HBPO全表核对差异";
}
} else {
// if (businessType === "JisBBAC") {
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
index e945f20b..f0bddfd1 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
@@ -64,6 +64,10 @@ const schema = {
title: "客户代码",
type: "string",
},
+ fileName: {
+ title: "备注",
+ type: "string",
+ },
},
};
@@ -84,6 +88,7 @@ export default function (businessType, type) {
const queryUrl = `settleaccount/${service}/main-query`;
const exportUrl = `settleaccount/invoice_service/export`;
const exportGroupUrl = `settleaccount/invoice_service/export-detail`;
+ const updateUrl = "settleaccount/invoice_service/update-invoice";
const invoiceUrl = `settleaccount/${service}/generate-invoice`;
const receivedUrl = `settleaccount/${service}/received`;
const rejectUrl = `settleaccount/${service}/reject`;
@@ -92,6 +97,7 @@ export default function (businessType, type) {
const importUrl = `settleaccount/${service}/excel-import`;
const queryMethod = "POST";
const exportMethod = "POST";
+ const updateMethod = "POST";
const exportGroupMethod = "POST";
const invoiceMethod = "POST";
const receivedMethod = "POST";
@@ -165,6 +171,15 @@ export default function (businessType, type) {
//default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
+ {
+ logic: "and",
+ column: "fileName",
+ action: "equal",
+ value: null,
+ readOnly: true,
+ title: "备注",
+ clearable: false,
+ },
],
},
skipCount: {
@@ -191,6 +206,7 @@ export default function (businessType, type) {
edit: {
exportUrl,
exportGroupUrl,
+ updateUrl,
invoiceUrl,
receivedUrl,
rejectUrl,
@@ -198,6 +214,7 @@ export default function (businessType, type) {
approvalUrl,
importUrl,
exportMethod,
+ updateMethod,
exportGroupMethod,
invoiceMethod,
receivedMethod,
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js
index 9b550781..d14a71bf 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js
@@ -26,7 +26,7 @@ function balanceSchema() {
// codeType,
// deliverBillType: Object.assign({ rules: [{ required: true }] }, deliverBillType),
qty: {
- title: "数量",
+ title: "合计数量",
type: "string",
input: "number",
rules: [
@@ -36,7 +36,13 @@ function balanceSchema() {
],
},
billTime: {
- title: "发运日期",
+ title: "最后发运日期",
+ type: "string",
+ input: "datetime",
+ clearable: true,
+ },
+ shippingTime: {
+ title: "最后结算时间",
type: "string",
input: "datetime",
clearable: true,
@@ -102,6 +108,56 @@ function balanceSchema() {
},
],
},
+ shippingQty: {
+ title: "发运入库数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ settleQty: {
+ title: "结算出库数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ returnQty: {
+ title: "退货出库数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ inputQty: {
+ title: "调整入库数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ outputQty: {
+ title: "调整出库数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
// reMark: {
// title: "备注",
// type: "string",
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 be9e0b7f..1ddb06ff 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
@@ -63,6 +63,19 @@ function createCompareVmi(path, business, client, title = "库存余额任务")
};
}
+function createCompareDiff(path, business, client, title = "BBAC 全表核对差异") {
+ return {
+ ...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
+ component: "/compare/vmi",
+ children: [
+ createButton("query", "title=查询&isTop=true"),
+ createButton("compare", "title=生成数据&isTop=true"),
+ createButton("delete", "title=删除&isTop=true"),
+ createButton("export", "title=下载&pattern=file&disabled=o=>o.stateName!='Succeeded'"),
+ ],
+ };
+}
+
function createCompareJieSuan(path, business, client, title = "EDI、发运与结算比对") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
@@ -173,6 +186,7 @@ export default [
children: [
createCompareFaYun("bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI与发运对比"),
createCompareJieSuan("first_bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI、发运与结算对比"),
+ createCompareDiff("bbacwms_edi_diff", "BBACDiff", "bbac", "BBAC 全表核对差异")
],
},
{
@@ -202,6 +216,7 @@ export default [
children: [
createCompareFaYun("hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI与发运对比"),
createCompareJieSuan("first_hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI、发运与结算对比"),
+ createCompareDiff("hbpowms_edi_diff", "HBPODiff", "hbpo", "HBPO 全表核对差异")
],
},
{
@@ -376,6 +391,7 @@ export default [
children: [
createButton("query", "title=查询&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
+ createButton("remark", "title=备注&isTop=true&pattern=paged"),
createButton(
"import",
"title=导入开票文件&isTop=true",
@@ -386,7 +402,9 @@ export default [
"title=财务审核通过&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 2) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
+ createButton("remark", "title=编辑&pattern=paged", (r, _) => r.invoiceState !== 2),
createButton("export-group", "title=导出发票分组&pattern=paged", (r, _) => r.invoiceState !== 2),
+
//createButton("approval", "title=发票重开"),
createButton(
"reject",
@@ -398,6 +416,7 @@ export default [
"title=同步到QAD&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 5) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
+
],
},
{
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/vmi-job.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/vmi-job.js
index d0f95b2f..09feeda5 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/vmi-job.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/vmi-job.js
@@ -8,11 +8,11 @@ import { schemaToModel } from "../../utils/index.js";
import request from "../../request/index.js";
export default function (type) {
- return {
- components: { AppList, AppForm },
- template: html`
+ return {
+ components: { AppList, AppForm },
+ template: html`
- 库存余额任务
+ 数据生成任务
@@ -22,54 +22,54 @@ export default function (type) {
`,
- styles: html``,
- setup() {
- const route = useRoute();
- const businessType = route.meta.businessType;
- const dialogVisable = ref(false);
- const loading = ref(false);
- const config = useConfig(businessType, type);
- const schema = config.compare.schema;
- const defaultModel = schemaToModel(schema);
- const model = ref(null);
- const formRef = ref(null);
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- if (item.path === "compare") {
- model.value = Object.assign({}, defaultModel);
- dialogVisable.value = true;
- }
- };
- const submit = async () => {
- try {
- const valid = await formRef.value.validate();
- if (valid) {
- loading.value = true;
- }
- const url = config.edit.compareUrl;
- const data = Object.assign(model.value);
+ setup() {
+ const route = useRoute();
+ const businessType = route.meta.businessType;
+ const dialogVisable = ref(false);
+ const loading = ref(false);
+ const config = useConfig(businessType, type);
+ const schema = config.compare.schema;
+ const defaultModel = schemaToModel(schema);
+ const model = ref(null);
+ const formRef = ref(null);
+ const onCommand = async (item, rows) => {
+ console.log(item.path, item, rows);
+ if (item.path === "compare") {
+ model.value = Object.assign({}, defaultModel);
+ dialogVisable.value = true;
+ }
+ };
+ const submit = async () => {
+ try {
+ const valid = await formRef.value.validate();
+ if (valid) {
+ loading.value = true;
+ }
+ const url = config.edit.compareUrl;
+ const data = Object.assign(model.value);
- const result = await request(url, data, { method: "POST" }, true);
- if (!result.errors) {
- dialogVisable.value = false;
- await load();
- }
- } catch (error) {
- console.log(error);
- } finally {
- loading.value = false;
- }
- };
- //
- const appListRef = ref(null);
- const event = "SaSeCompare";
- onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
- onUnmounted(() => PubSub.unsubscribe(event));
- return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
- },
- };
+ const result = await request(url, data, { method: "POST" }, true);
+ if (!result.errors) {
+ dialogVisable.value = false;
+ await load();
+ }
+ } catch (error) {
+ console.log(error);
+ } finally {
+ loading.value = false;
+ }
+ };
+ //
+ const appListRef = ref(null);
+ const event = "SaSeCompare";
+ onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
+ onUnmounted(() => PubSub.unsubscribe(event));
+ return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
+ },
+ };
}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js
index 21e78e6b..fe94efa9 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js
@@ -6,11 +6,16 @@ import request, { getUrl } from "../../request/index.js";
import useConfig from "../../models/settle/commerce.js";
import AppCheck from "../_check.js";
+
export default {
components: { AppList, AppCheck },
template: html`
- `,
+
+
+ `,
setup() {
+
+
const appListRef = ref(null);
const visable = ref(false);
const row = ref(null);
@@ -64,6 +69,29 @@ export default {
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
}
+ else if (item.path === "remark") {
+ const url = config.edit.updateUrl;
+ const method = config.edit.updateMethod;
+
+ alert("123");
+ if (rows.length > 0) {
+
+ let data = rows.map((o) => o.invbillNum);
+ alert(data);
+ const postData = {
+
+ InvbillNum: rows[0]["invbillNum"],
+ FileName: "remark123"
+ };
+ await appListRef.value.onClick(async () => {
+ const response = await request(url, postData, { method }, true);
+ if (!response.errors) {
+
+ }
+ });
+ }
+ }
+
console.log(item.path, item, rows);
};
return { appListRef, config, onCommand, visable, row, data, businessType };
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
index 21e78e6b..2afda942 100644
--- 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
@@ -64,6 +64,7 @@ export default {
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
}
+
console.log(item.path, item, rows);
};
return { appListRef, config, onCommand, visable, row, data, businessType };
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
index d8e26d9a..3117a360 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
@@ -87,7 +87,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
List customConditionList = new List();
customConditionList.Add(new CustomCondition() { Name = "Year", Value = DateTime.Now.Year.ToString() });
- var _taskid = await _service.ExportEnqueueAsync("EDI发运对比", ExportExtentsion.Excel, DateTime.Now.Year.ToString(), string.Empty, CurrentUser, typeof(EdiWmsDiffService), customConditionList, (rs) =>
+ var _taskid = await _service.ExportEnqueueAsync("BBAC全表核对差异", ExportExtentsion.Excel, DateTime.Now.Year.ToString(), string.Empty, CurrentUser, typeof(EdiWmsDiffService), customConditionList, (rs) =>
{
}).ConfigureAwait(false);
@@ -109,7 +109,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
List customConditionList = new List();
customConditionList.Add(new CustomCondition() { Name = "Year", Value = DateTime.Now.Year.ToString() });
- var _taskid = await _service.ExportEnqueueAsync("EDI发运对比", ExportExtentsion.Excel, DateTime.Now.Year.ToString(), string.Empty, CurrentUser, typeof(HBPOEdiWmsDiffService), customConditionList, (rs) =>
+ var _taskid = await _service.ExportEnqueueAsync("HBPO全表核对差异", ExportExtentsion.Excel, DateTime.Now.Year.ToString(), string.Empty, CurrentUser, typeof(HBPOEdiWmsDiffService), customConditionList, (rs) =>
{
}).ConfigureAwait(false);