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 97d80a3a..6f41f19f 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
@@ -553,14 +553,17 @@ export default {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod;
const postData = buildQuery();
-
- postData.filters.push({
- logic: "and",
- column: "billNum",
- action: "equal",
- value: rows[0].billNum,
+
+ Object.keys(rows).forEach((o) => {
+ postData.filters.push({
+ logic: "or",
+ column: "billNum",
+ action: "equal",
+ value: rows[o].billNum,
+ });
});
+
await onClick(async () => {
const response = await request(url, postData, { method });
if (!response.errors) {
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance-part-count.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance-part-count.js
new file mode 100644
index 00000000..9a5849a4
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance-part-count.js
@@ -0,0 +1,309 @@
+import balanSchema from "./vmi.js";
+import { dayjs } from "element-plus";
+
+function balanceSchema() {
+ return {
+ title: "寄售库存",
+ type: "object",
+ properties: {
+ lu: {
+ title: "客户零件号",
+ type: "string",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ partCode: {
+ title: "厂内零件号",
+ type: "string",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ businessType: {
+ title: "业务类型",
+ type: "string",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+
+ BSEQty: {
+ title: "期初发货数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ BRETQty: {
+ title: "期初退货数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ SEQTY : {
+ title: "实际发货数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ RETQty: {
+ title: "实际退货数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ CANQty: {
+ title: "可结数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+
+ NOTQty: {
+ title: "不可结数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+
+ SE_SA_CAN_QTY: {
+ title: "有发有结有价格数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+
+ SE_SA_NOT_QTY: {
+ title: "有发有结无价格数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+
+ ONLY_SE_QTY: {
+ title: "有发运无结算数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+
+ ONLY_SA_QTY: {
+ title: "有结算无发运数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ INVQty: {
+ title: "已开票数量",
+ type: "string",
+ input: "number",
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ sebegin: {
+ title: "发运开始",
+ type: "datetime",
+
+ },
+ seend: {
+ title: "发运结束",
+ type: "datetime",
+
+ },
+ sabegin: {
+ title: "结算开始",
+ type: "datetime",
+
+ },
+ saend: {
+ title: "结算结束",
+ type: "datetime",
+
+ },
+
+
+ },
+ };
+}
+
+
+const schema = balanceSchema();
+
+const baseUrl = "settleaccount/vmi";
+const queryUrl = `${baseUrl}/get-receive-ship-sum`;
+const detailsUrl = `${baseUrl}/get/%s`;
+const createUrl = `${baseUrl}/create`;
+const updateUrl = `${baseUrl}/update/%s`;
+const deleteUrl = `${baseUrl}/delete-list`;
+const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
+const exportUrl = `${baseUrl}/get-receive-ship-sum-export`;
+const queryMethod = "POST";
+const detailsMethod = "POST";
+const createMethod = "POST";
+const updateMethod = "POST";
+const deleteMethod = "POST";
+const importMethod = "POST";
+const exportMethod = "POST";
+
+export default function () {
+ return {
+ query: {
+ url: queryUrl,
+ method: queryMethod,
+ hasFilter: true,
+ schema: {
+ title: "寄售库存",
+ type: "object",
+ properties: {
+ filters: {
+ title: "项目",
+ type: "array",
+ hidden: true,
+ items: {
+ type: "object",
+ properties: {
+ logic: {
+ type: "int",
+ },
+ column: {
+ type: "string",
+ },
+ action: {
+ type: "int",
+ },
+ value: {
+ type: "string",
+ },
+ },
+ },
+ default: [
+ {
+ logic: "and",
+ column: "partCode",
+ action: "like",
+ value: null,
+ readOnly: true,
+ },
+ {
+ logic: "and",
+ column: "sebegin",
+ action: "biggerThanOrEqual",
+ value: null,
+ readOnly: true,
+ title: "发运开始",
+ clearable: false,
+ },
+ {
+ logic: "and",
+ column: "seend",
+ action: "smallThan",
+ value: null,
+ readOnly: true,
+ title: "发运结束",
+ clearable: false,
+ },
+ {
+ logic: "and",
+ column: "sabegin",
+ action: "biggerThanOrEqual",
+ value: null,
+ readOnly: true,
+ title: "结算开始",
+ clearable: false,
+ },
+ {
+ logic: "and",
+ column: "saend",
+ action: "smallThan",
+ value: null,
+ readOnly: true,
+ title: "结算结束",
+ clearable: false,
+ },
+
+
+ ],
+ },
+ skipCount: {
+ hidden: true,
+ default: 0,
+ },
+ maxResultCount: {
+ hidden: true,
+ default: 10,
+ },
+ sorting: {
+ hidden: true,
+ },
+ },
+ },
+ },
+ table: {
+ schema: schema,
+ },
+ edit: {
+ detailsUrl,
+ createUrl,
+ updateUrl,
+ deleteUrl,
+ importUrl,
+ exportUrl,
+ detailsMethod,
+ createMethod,
+ updateMethod,
+ deleteMethod,
+ importMethod,
+ exportMethod,
+ schema: schema,
+ },
+ };
+}
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 86e0dcf7..4c8ebafa 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
@@ -473,6 +473,10 @@ export default [
...createPage("balance-month", "title=库存按月汇总查询"),
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
},
+ {
+ ...createPage("balance-part-count", "title=发货零件汇总信息"),
+ children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
+ },
// {
// ...createPage("balance-sum", "title=库存余额报表查询"),
// children:
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance-part-count.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance-part-count.js
new file mode 100644
index 00000000..e2b8aaf0
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance-part-count.js
@@ -0,0 +1,44 @@
+import AppList from "../../components/list/index.js";
+import html from "html";
+import { ref, onMounted, onUnmounted } from "vue";
+import { useRoute } from "vue-router";
+import { ElNotification } from "element-plus";
+import request from "../../request/index.js";
+
+export default {
+ components: { AppList },
+ template: html``,
+ setup() {
+ const config = ref(null);
+ const route = useRoute();
+ const onCommand = async (item, rows) => {
+ console.log(item.path, item, rows);
+ };
+ const showMessage = async (data) => {
+ await ElNotification.closeAll();
+ ElNotification({
+ position: "bottom-right",
+ title: "提示",
+ message: `待同步库存数量: ${data}`,
+ duration: 0,
+ });
+ };
+ const event = "VmiBalance";
+ onMounted(async () => {
+ const model = "vmi/balance-part-count";
+ const useConfig = (await import(`../../models/${model}.js`)).default;
+ config.value = useConfig(route.meta?.businessType, route.meta);
+ const result = await request("settleaccount/vmi-async-message/get-message-count", null, { method: "POST" });
+ if (!result.errors) {
+ //showMessage(result.data);
+ }
+ PubSub.subscribe(event, async (_, data) => {
+ if (route.path === "/vmi/balance") {
+ //showMessage(data);
+ }
+ });
+ });
+ onUnmounted(() => PubSub.unsubscribe(event));
+ return { config, onCommand };
+ },
+};
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
index 16344228..f1bdf216 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
@@ -1728,20 +1728,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
///
[HttpPost]
- public async Task GetReceiveShipSum(string sebegin, string seend, string sabegin, string saend,string partcode)
+ public async Task GetReceiveShipSum(RequestDto input)
{
ConcurrentBag bagList = new ConcurrentBag();
- List list = new List();
- list.Add(EnumBusinessType.JisBBAC);
- list.Add(EnumBusinessType.JisHBPO);
- list.Add(EnumBusinessType.MaiDanJianHBPO);
- list.Add(EnumBusinessType.MaiDanJianBBAC);
- list.Add(EnumBusinessType.BeiJian);
- list.Add(EnumBusinessType.ZhiGongJianHBPO);
- list.Add(EnumBusinessType.ZhiGongJianBBAC);
- list.Add(EnumBusinessType.YinDuJian);
+ // ConcurrentBag bagList = new ConcurrentBag();
Parallel.ForEach(list, async chunk =>
{
@@ -1753,21 +1745,21 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
});
var entities=bagList.ToList();
- IExporter _csv = new CsvExporter();
- IExporter _excel = new ExcelExporter();
- byte[] result = null;
- result = await _excel.ExportAsByteArray(entities).ConfigureAwait(false);
- result.ShouldNotBeNull();
- string _fileName = $"收发存汇总{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx";
- //保存导出文件到服务器存成二进制
- await _excelImportService.SaveBlobAsync(
- new SaveExcelImportInputDto
- {
- Name = _fileName,
- Content = result
- }
- ).ConfigureAwait(false);
- return _fileName;
+ // IExporter _csv = new CsvExporter();
+ // IExporter _excel = new ExcelExporter();
+ // byte[] result = null;
+ // result = await _excel.ExportAsByteArray(entities).ConfigureAwait(false);
+ // result.ShouldNotBeNull();
+ // string _fileName = $"收发存汇总{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx";
+ // //保存导出文件到服务器存成二进制
+ // await _excelImportService.SaveBlobAsync(
+ // new SaveExcelImportInputDto
+ // {
+ // Name = _fileName,
+ // Content = result
+ // }
+ // ).ConfigureAwait(false);
+ // return _fileName;
}