From d7ef4994715fbf6c820a73c4355347d929e41451 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Thu, 17 Aug 2023 16:53:17 +0800
Subject: [PATCH 1/4] update
---
.../wwwroot/components/list/index.js | 1 +
.../wwwroot/models/settle/commerce.js | 12 +-
.../wwwroot/models/settle/detail.js | 33 ++++--
.../wwwroot/models/settle/unable.js | 112 ++++++++++++++++++
.../wwwroot/request/index.js | 5 +-
.../wwwroot/router/business.js | 6 +-
.../wwwroot/views/settle/_check.js | 30 ++++-
.../wwwroot/views/settle/commerce.js | 43 ++++++-
.../wwwroot/views/settle/unable.js | 24 +++-
.../wwwroot/views/settle/usable.js | 2 +-
10 files changed, 231 insertions(+), 37 deletions(-)
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js
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 7c829a00..c961f506 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
@@ -885,6 +885,7 @@ export default {
load,
config,
queryModel,
+ buildQuery,
pageModel,
treeProps,
tableKey,
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 77c76808..535e3b8c 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
@@ -6,7 +6,6 @@ const schema = {
title: "商务审批",
type: "object",
properties: {
- version,
realnvBillNum: {
title: "金税发票号",
type: "string",
@@ -54,10 +53,10 @@ const schema = {
export default function (businessType, type) {
let service = null;
- if (type === "shangwu") {
+ if (type === "shang-wu") {
if (businessType === "JisBBAC") {
service = "bbac_ba_service";
- } else if (businessType === "JisBBAC") {
+ } else if (businessType === "JisHBPO") {
service = "hbpo_ba_service";
} else {
service = "pub_ba_service";
@@ -108,13 +107,6 @@ export default function (businessType, type) {
},
},
default: [
- {
- logic: "and",
- column: "version",
- action: "equal",
- value: null,
- readOnly: true,
- },
{
logic: "and",
column: "state",
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 ff9eadd2..1a69b1ca 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,5 +1,3 @@
-import { version } from "../_options.js";
-
const schema = {
title: "通用代码",
type: "object",
@@ -68,14 +66,24 @@ const schema = {
},
};
-export default function (businessType) {
+export default function (businessType, type) {
let service;
- if (businessType === "JisBBAC") {
- service = "bbac_not_sa_service";
- } else if (businessType === "JisHBPO") {
- service = "hbpo_not_sa_service";
+ if (type === "unable") {
+ if (businessType === "JisBBAC") {
+ service = "bbac_not_sa_service";
+ } else if (businessType === "JisHBPO") {
+ service = "hbpo_not_sa_service";
+ } else {
+ service = "pub_not_sa_service";
+ }
} else {
- service = "pub_not_sa_service";
+ if (businessType === "JisBBAC") {
+ service = "bbac_can_sa_service";
+ } else if (businessType === "JisHBPO") {
+ service = "hbpo_can_sa_service";
+ } else {
+ service = "pub_can_sa_service";
+ }
}
if (businessType === "JisBBAC" || businessType === "JisHBPO" || businessType === "MaiDanJianBBAC" || businessType === "MaiDanJianHBPO") {
schema.properties.pn.title = "生产码";
@@ -93,7 +101,11 @@ export default function (businessType) {
delete schema.properties["site"];
}
const queryUrl = `settleaccount/${service}/detail-query`;
+ const addUrl = `settleaccount/${service}/generate-settlement-order`;
+ const exportUrl = `settleaccount/${service}/export`;
const queryMethod = "POST";
+ const addMethod = "POST";
+ const exportMethod = "POST";
return {
query: {
@@ -167,6 +179,11 @@ export default function (businessType) {
schema: schema,
},
edit: {
+ addUrl,
+ exportUrl,
+ addMethod,
+ exportUrl,
+ exportMethod,
schema: schema,
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js
new file mode 100644
index 00000000..ea1a6079
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js
@@ -0,0 +1,112 @@
+import { version, state } from "../_options.js";
+
+const schema = {
+ title: "可结算单",
+ type: "object",
+ properties: {
+ version,
+ state,
+ billNum: {
+ title: "结算单据",
+ type: "string",
+ oneToMany: "/settle/detail",
+ config: "/models/settle/detail.js",
+ },
+ settleBillNum: {
+ title: "关联结算单号",
+ type: "string",
+ },
+ invGroupNum: {
+ title: "发票分组号",
+ type: "string",
+ },
+ },
+};
+
+export default function (businessType) {
+ let service;
+ if (businessType === "JisBBAC") {
+ service = "bbac_can_sa_service";
+ } else if (businessType === "JisHBPO") {
+ service = "hbpo_can_sa_service";
+ } else {
+ service = "pub_can_sa_service";
+ }
+ const queryUrl = `settleaccount/${service}/main-query`;
+ const exportUrl = `settleaccount/${service}/export`;
+ const addUrl = `settleaccount/${service}/generate-invoice`;
+
+ const queryMethod = "POST";
+ const exportMethod = "POST";
+ const addMethod = "POST";
+
+ 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: "version",
+ action: "equal",
+ value: null,
+ readOnly: true,
+ },
+ ],
+ },
+ skipCount: {
+ hidden: true,
+ default: 0,
+ },
+ maxResultCount: {
+ hidden: true,
+ default: 10,
+ },
+ sorting: {
+ hidden: true,
+ },
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
+ },
+ },
+ },
+ table: {
+ schema: schema,
+ },
+ edit: {
+ exportUrl,
+ addUrl,
+ exportMethod,
+ addMethod,
+ schema: schema,
+ },
+ };
+}
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 da1865b6..534232f2 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
@@ -65,10 +65,7 @@ const getResult = async (response) => {
} catch (error) {
console.log(error);
}
- ElMessageBox.alert(
- `${result.errors?.error?.message ?? messages.get(response.status) ?? result.status}`,
- `${result.errors?.error?.code ?? result.status}`
- );
+ ElMessageBox.alert(`${result.errors?.error?.message ?? messages.get(response.status) ?? result.status}`, `${result.errors?.error?.code ?? "错误"}`);
}
return result;
};
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 a7e2ba79..c60ac00d 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
@@ -85,10 +85,10 @@ function createCommerceCheckList(path, business, client, title = "商务审批")
component: "/settle/commerce",
children: [
createButton("query", "title=查询&isTop=true"),
- createButton("compare", "title=商务审核通过&isTop=true"),
- createButton("reject", "title=退回&isTop=true"),
+ createButton("approval", "title=商务审核通过&isTop=true"),
+ createButton("reject", "title=退回"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
- createButton("????", "title=客户已收票&isTop=true"),
+ createButton("receive", "title=客户已收票&isTop=true"),
],
};
}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
index 73068307..6f8d38d5 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
@@ -38,7 +38,7 @@ export default {
@@ -70,7 +70,7 @@ export default {
上一步
@@ -253,6 +253,8 @@ export default {
const addDialogVisible = ref(false);
const importDialogVisible = ref(false);
const showSetupDialog = () => {
+ //重开发票号
+ //invBillNum=
adjList.value = [];
setupRef.value = 1;
setupDialogVisable.value = true;
@@ -276,6 +278,7 @@ export default {
type: "string",
title: "发票号",
rules: [{ required: true }],
+ default: props.data.invbillNum,
},
settleDate: {
type: "string",
@@ -307,7 +310,7 @@ export default {
},
};
const defaultAdjModel = schemaToModel(adjSchema);
- const adjModel = ref(Object.assign({}, defaultAdjModel));
+ const adjModel = ref(Object.assign({ invBillNum: "" }, defaultAdjModel));
const addAdjFormRef = ref(null);
const showAddAdjDialog = () => {
adjModel.value = Object.assign({}, defaultAdjModel);
@@ -372,6 +375,26 @@ export default {
loading.value = false;
}
};
+ const next = async () => {
+ if (setupRef.value === 1) {
+ try {
+ const url = "settleaccount/adj_service/check-import";
+ const result = await request(url, adjList.value, { method: "POST" });
+ if (!result.errors) {
+ if (result.data?.code === 200) {
+ //明细对比逻辑处理
+ setupRef += 1;
+ } else if (result.data?.code === 400 && result.data.fileName) {
+ window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
+ }
+ }
+ } catch (e) {
+ console.log(e);
+ }
+ } else {
+ setupRef += 1;
+ }
+ };
const submitReOpen = async () => {};
//
onMounted(async () => {
@@ -409,6 +432,7 @@ export default {
importAdjSchema,
importAdj,
scrollRef,
+ next,
};
},
};
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 07f17581..51e8894f 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,23 +2,56 @@ 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 useConfig from "../../models/settle/commerce.js";
import AppCheck from "./_check.js";
export default {
components: { AppList, AppCheck },
- template: html` `,
+ 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, "shang-wu");
const onCommand = async (item, rows) => {
- data.value = { [item.path]: rows[0][item.path] };
- visable.value = true;
- console.log(item.path, item, rows);
+ if (item.path === "approval" || item.path === "reject" || item.path === "receive") {
+ if (rows.length === 0) {
+ ElMessage({
+ type: "warning",
+ message: "没有选中的数据",
+ });
+ } else {
+ const message =
+ item.path === "approval"
+ ? `确认审核通过选中的${rows.length}行数据吗?`
+ : item.path === "reject"
+ ? `确认退回选中的${rows.length}行数据吗?`
+ : `确认选中的${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;
+ }
+ }
+ } else if (item.path === "invbillNum" || item.path === "invGroupNum") {
+ data.value = { invbillNum: rows[0]["invbillNum"], invGroupNum: rows[0]["invGroupNum"] };
+ visable.value = true;
+ console.log(item.path, item, rows);
+ }
};
- return { config, onCommand, visable, data };
+ return { appListRef, 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 47b708b6..ed6df1fc 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
@@ -1,19 +1,37 @@
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";
export default {
components: { AppList },
- template: html``,
+ template: html``,
setup() {
+ const appListRef = ref(null);
const route = useRoute();
const businessType = route.meta.businessType;
- const config = useConfig(businessType);
+ const config = useConfig(businessType, "unable");
const onCommand = async (item, rows) => {
+ 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;
+ }
}
};
- return { config, onCommand };
+ 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 b14d10a7..f7d0bc3f 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
@@ -19,7 +19,7 @@ export default {
if (item.path === "add") {
const invbillNum = rows[0].billNum;
try {
- await ElMessageBox.confirm(`"确认为${invbillNum}创建发票?`, "提示", {
+ await ElMessageBox.confirm(`确认为${invbillNum}创建发票?`, "提示", {
type: "warning",
});
appListRef.value.tableLoading = true;
From 7da3ed276032d29307abb8fbabbe58b0ec819439 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com>
Date: Thu, 17 Aug 2023 17:10:28 +0800
Subject: [PATCH 2/4] =?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/BBAC_PD_SERVICE.cs | 81 ++++++++++++-------
.../BQ/Syncs/PendingDeductionService.cs | 16 ++--
.../SettleAccountApplicationModule.cs | 29 ++++++-
.../BaseDomainServices/BaseDomainService.cs | 2 +-
4 files changed, 90 insertions(+), 38 deletions(-)
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 9bdca903..a70d8c25 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
@@ -1,11 +1,14 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ;
+using SettleAccount.Job.Services.Report;
+using SettleAccount.Job.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using TaskJob.EventArgs;
using Volo.Abp.Application.Services;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
@@ -16,6 +19,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared.RepositoryBase;
+using Win.Sfs.SettleAccount.Entities.TaskJobs;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
@@ -28,8 +32,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BBAC_PD_DETAIL, BBAC_PD_DETAIL_DTO, BBAC_PD_REQ_DTO,
BBAC_PD_DETAIL_REQ_DTO, BBAC_PD_DETAIL_EXP_DTO>
{
- public BBAC_PD_SERVICE(INormalEfCoreRepository bbacSecRepository, INormalEfCoreRepository hbpoSecRepository, INormalEfCoreRepository pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, VmiAppService vimservice, INormalEfCoreRepository detailRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
+
+ private readonly TaskJobService _service;
+ public BBAC_PD_SERVICE(INormalEfCoreRepository bbacSecRepository, INormalEfCoreRepository hbpoSecRepository, INormalEfCoreRepository pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository repository, VmiAppService vimservice,
+ INormalEfCoreRepository detailRepository,
+ TaskJobService service
+
+ ) :
+ base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
+ _service = service;
}
public override async Task ApprovalPassed(List p_list)
@@ -37,33 +49,48 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
- // _bbacSecRepository.Where(p=>)
+ //List customConditionList = new List();
+ ////customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
+ ////customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
+ ////customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
+ ////customConditionList.Add(new CustomCondition() { Name = "State", Value = string.IsNullOrEmpty(input.State) ? string.Empty : input.State });
+ //var _taskid = await _service.ExportEnqueueAsync("出库单合计汇总输出", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(WmsOutputSumExportService), customConditionList, (rs) =>
+ //{
+ //});
+ //return _taskid;
+
+
+
+
+
+
+ // _bbacSecRepository.Where(p=>)
- if (detailist != null && detailist.Count > 0)
- {
- foreach (var itm in detailist)
- {
- await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
- {
- BillTime = itm.CreationTime,
- ChangedTime = DateTime.Now,
- Qty = itm.Qty,
- DeliverTime = itm.CreationTime,
- LogType = Entities.BQ.Vmi.VmiLogType.Type200,
- ChangedQty = itm.Qty,
- ChangedType = VmiType.Out,
- SubBillType = EnumDeliverSubBillType.小件BBAC,
- BillType = EnumDeliverBjBmpBillType.JIS件,
- PartCode = itm.LU,
- SettlementVinCode = itm.PN,
- PartCode2 = itm.LU,
- CustomerPartCode = itm.LU,
- VinCode = itm.PN,
- OrderNum = itm.GroupNum,
- ErpToLoc = "C0001"
- });
- }
- }
+ //if (detailist != null && detailist.Count > 0)
+ //{
+ // foreach (var itm in detailist)
+ // {
+ // await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
+ // {
+ // BillTime = itm.CreationTime,
+ // ChangedTime = DateTime.Now,
+ // Qty = itm.Qty,
+ // DeliverTime = itm.CreationTime,
+ // LogType = Entities.BQ.Vmi.VmiLogType.Type200,
+ // ChangedQty = itm.Qty,
+ // ChangedType = VmiType.Out,
+ // SubBillType = EnumDeliverSubBillType.小件BBAC,
+ // BillType = EnumDeliverBjBmpBillType.JIS件,
+ // PartCode = itm.LU,
+ // SettlementVinCode = itm.PN,
+ // PartCode2 = itm.LU,
+ // CustomerPartCode = itm.LU,
+ // VinCode = itm.PN,
+ // OrderNum = itm.GroupNum,
+ // ErpToLoc = "C0001"
+ // });
+ // }
+ //}
return ApplicationConsts.SuccessStr;
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 0da57b1f..bd12b190 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
@@ -47,15 +47,18 @@ public class PendingDeductionService : ITransientDependency, IExportJob
public string ExportFile(Guid id, List exportName, List property)
{
- var list = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
+ var billList = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value;
+
+ var list=billList.Split(",");
+
if (type == "BBACJIS")
{
var jisdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan==false);
var mdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan ==true);
var query = from itm in jisdetail
join itm1 in _bbacSecRepository
- on new { itm.PN, itm.LU } equals new { itm1.PN,LU= itm1.PrimitiveLU } into temp1
+ on new { itm.PN, itm.LU } equals new { itm1.PN, LU = itm1.PrimitiveLU } into temp1
from tm in temp1
where tm == null
select
@@ -70,10 +73,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out,
SubBillType = EnumDeliverSubBillType.小件BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件,
- PartCode = tm!=null?tm.ReplaceLU:itm.LU,
+ PartCode = tm != null ? tm.ReplaceLU : itm.LU,
SettlementVinCode = itm.PN,
PartCode2 = tm != null ? tm.ReplaceLU : itm.LU,
- CustomerPartCode =string.IsNullOrEmpty(itm.Extend4)?string.Empty:itm.Extend4,
+ CustomerPartCode = string.IsNullOrEmpty(itm.Extend4) ? string.Empty : itm.Extend4,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = "C0001"
@@ -171,11 +174,6 @@ public class PendingDeductionService : ITransientDependency, IExportJob
}
-
- return ApplicationConsts.SuccessStr;
-
-
-
return id.ToString();
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
index 257098e2..fb8b1d93 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
@@ -1,4 +1,4 @@
-using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.Application;
@@ -10,6 +10,9 @@ using Volo.Abp.Dapper;
using Win.Abp.Snowflakes;
using Volo.Abp.EventBus.RabbitMq;
using Volo.Abp.RabbitMQ;
+using System;
+using TaskJob.Interfaces;
+using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace Win.Sfs.SettleAccount
{
@@ -46,6 +49,30 @@ namespace Win.Sfs.SettleAccount
//context.Services.AddTransient(typeof(INormalEfCoreRepository<,>),
// typeof(SettleAccountNormalEfCoreRepository<,>));
+
+
+ context.Services.AddTransient(implementationFactory =>
+ {
+ Func accesor = key =>
+ {
+ if (key.Equals(typeof(PendingDeductionService).FullName))
+ {
+ return implementationFactory.GetService();
+ }
+ else
+ {
+ throw new ArgumentException($"Not Support key:{key}");
+ }
+
+ };
+ return accesor;
+ });
+
+
+
+
+
+
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs
index cf4ad459..9d8902b3 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs
@@ -44,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Bases.DomainServices
//ICommonManager commonManager
)
{
- _pricebjRepository = pricebjRepository;
+ _priceRepository = priceRepository;
_pricebjRepository= pricebjRepository;
_materialRepository = materialRepository;
_relationshipRepository = relationshipRepository;
From a9a2e8fb0245fe1b4069e2e4919c326a74c293fb Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Fri, 18 Aug 2023 08:55:35 +0800
Subject: [PATCH 3/4] update
---
.../wwwroot/models/compare/compare.js | 1 +
.../wwwroot/views/settle/_check.js | 39 +++++++++++++------
2 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
index 264312e6..73edfb30 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
@@ -131,6 +131,7 @@ export default function (businessType, type) {
name: {
type: "string",
hidden: true,
+ default: name,
},
stateName,
businessType: {
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
index 6f8d38d5..c24971d4 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
@@ -4,6 +4,7 @@ import { ref, nextTick, onMounted, watch } from "vue";
import request from "../../request/index.js";
import AppForm from "../../components/form/index.js";
import AppTable from "../../components/table/index.js";
+import { getUrl } from "../../request/index.js";
export default {
components: { AppForm, AppTable },
@@ -42,7 +43,7 @@ export default {
-
+
发票重开
@@ -65,6 +66,22 @@ export default {
+
+
+
+ 新建
+ 导入
+ 删除
+
+
+
+
+
+
+
+
+
+
-
+
@@ -556,40 +556,7 @@ export default {
}
}
await load();
- } else if (item.path === "check") {
- const urls = new Map();
- urls.set("JisBBAC", "settleaccount/bbac_ba_service/generate-invoice");
- urls.set("JisHBPO", "settleaccount/hbpo_ba_service/generate-invoice");
- urls.set("ZhiGongJianBBAC", "settleaccount/pub_ba_service/generate-invoice");
- urls.set("ZhiGongJianHBPO", "settleaccount/pub_ba_service/generate-invoice");
- urls.set("MaiDanJianHBPO", "settleaccount/pub_ba_service/generate-invoice");
- urls.set("BeiJian", "settleaccount/pub_ba_service/generate-invoice");
- urls.set("YinDuJian", "settleaccount/pub_ba_service/generate-invoice");
- try {
- await ElMessageBox.confirm(format("确认审核通过选中的%s行数据吗?", rows.length), "提示", {
- type: "warning",
- });
- const response = await request(
- urls.get(config.query.schema.properties.businessType?.default),
- rows.map((o) => o.id),
- { method: "POST" }
- );
- if (!response.errors) {
- ElMessage({
- type: "info",
- message: "操作完毕",
- });
- }
- } catch (error) {
- if (error === "cancel") {
- ElMessage({
- type: "info",
- message: "操作取消",
- });
- }
- }
} else if (item.path === "export") {
- //export
if (item.meta.pattern === "paged") {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod;
@@ -845,23 +812,6 @@ export default {
}
return postData;
}
- function buildImport() {
- importModel.value.maxResultCount = pageModel.pageSize;
- importModel.value.skipCount = (pageModel.pageIndex - 1) * pageModel.pageSize;
- //
- const postData = JSON.parse(JSON.stringify(importModel.value));
- postData.filters = filterList.value.filter((o) => o.column && o.action && (o.value || o.value === false));
- if (postData.items) {
- delete postData["items"];
- }
- if (postData.import?.id) {
- delete postData.import["id"];
- }
- return postData;
- }
- function isNotJit() {
- return route.meta.businessType !== 3 || route.meta.businessType !== 4 || route.meta.businessType !== 7 || route.meta.businessType !== 8;
- }
onMounted(async () => {
if (route.meta.children?.length) {
for (const item of route.meta.children) {
@@ -928,7 +878,6 @@ export default {
versions,
pushfilterList,
getOperators,
- isNotJit,
getFilters,
};
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
index 73edfb30..b1f5b46c 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
@@ -2,7 +2,7 @@ import { version } from "../_options.js";
const version2 = Object.assign({}, version);
-const compareSchema = {
+const defaultCompareSchema = {
title: "数据比对",
properties: {
version: Object.assign(version2, { rules: [{ required: true }] }),
@@ -88,7 +88,9 @@ export default function (businessType, type) {
let compareService = null;
let title = null;
let name = null;
+ const compareSchema = Object.assign({}, defaultCompareSchema);
if (type === "fa-yun") {
+ delete compareSchema.properties["downLineDateTime"];
if (businessType === "JisBBAC") {
compareService = "edi-se-compare/bbacedi-se-compare";
name = "JisBBACEDI与发运数据对比";
@@ -106,13 +108,12 @@ export default function (businessType, type) {
}
name = nameList[businessType];
}
+
const queryUrl = "settleaccount/Job/list";
const deleteUrl = "settleaccount/Job/delete";
- const exportUrl = "settleaccount/pub_sa_detail_service/export";
const compareUrl = `settleaccount/${compareService}`;
const queryMethod = "POST";
const deleteMethod = "POST";
- const exportMethod = "POST";
const compareMethod = "POST";
return {
@@ -179,10 +180,8 @@ export default function (businessType, type) {
},
edit: {
deleteUrl,
- exportUrl,
compareUrl,
deleteMethod,
- exportMethod,
compareMethod,
schema: schema,
},
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 c60ac00d..9f6ce240 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
@@ -338,7 +338,7 @@ export default [
createButton("query", "title=查询&isTop=true"),
createButton("import", "title=导入开票文件&isTop=true"),
createButton("compare", "title=财务审核通过&isTop=true"),
- createButton("export", "title=导出&pattern=paged"),
+ createButton("export-group", "title=导出发票分组&pattern=paged"),
createButton("reject", "title=退回&isTop=true"),
createButton("sync", "title=同步到QAD&isTop=true"),
],
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 b4755aa9..05700b1d 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
@@ -11,7 +11,7 @@ export default function (type) {
return {
components: { AppList, AppForm },
template: html`
-
+
EDI与发运对比
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
index c24971d4..379b5586 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
@@ -39,7 +39,7 @@ export default {
@@ -416,7 +416,16 @@ export default {
//
onMounted(async () => {
loading.value = true;
- const response = await request("settleaccount/invoice_service/detail-query", props.data, { method: "POST" });
+ const data = { filters: [] };
+ Object.keys(props.data).forEach((o) => {
+ data.filters.push({
+ logic: "and",
+ column: o,
+ action: "equal",
+ value: props.data[o],
+ });
+ });
+ const response = await request("settleaccount/invoice_service/detail-query", data, { method: "POST" });
model.value = response.data;
loading.value = false;
});
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 51e8894f..941ae5f7 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
@@ -47,10 +47,10 @@ export default {
}
}
} else if (item.path === "invbillNum" || item.path === "invGroupNum") {
- data.value = { invbillNum: rows[0]["invbillNum"], invGroupNum: rows[0]["invGroupNum"] };
+ data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
- console.log(item.path, item, rows);
}
+ console.log(item.path, item, rows);
};
return { appListRef, config, onCommand, visable, data };
},
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 fd552aae..5a685fc7 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
@@ -4,6 +4,7 @@ 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 },
@@ -15,8 +16,27 @@ export default {
const businessType = route.meta.businessType;
const config = useConfig(businessType, "cai-wu");
const onCommand = async (item, rows) => {
- data.value = { [item.path]: rows[0][item.path] };
- visable.value = true;
+ 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/usable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
index f7d0bc3f..c0e04733 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
@@ -24,6 +24,9 @@ export default {
});
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);
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js
index ceece8e2..2103c48f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js
@@ -1,30 +1,22 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/inventory/log.js";
-import { reactive, ref } from "vue";
+import { ref } from "vue";
import { schemaToModel } from "../../utils/index.js";
import AppForm from "../../../components/form/index.js";
import AppTable from "../../components/table/index.js";
-import request, { get, getUrl, post } from "../../request/index.js";
+import request, { getUrl } from "../../request/index.js";
export default {
components: { AppList, AppTable, AppForm },
template: html`
-
+
补货数据导出
-
+