diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Controllers/HomeController.cs b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Controllers/HomeController.cs index b234e987..0f6d0f2f 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Controllers/HomeController.cs +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Controllers/HomeController.cs @@ -1,3 +1,5 @@ +using System; +using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SignalR; using SettleAccount.Job.SignalR; @@ -20,10 +22,10 @@ namespace Win.Sfs.SettleAccount.Controllers return File("~/index.html", "text/html"); } - public IActionResult Test() + public async Task Test(int seconds) { - this._hubContext.Clients.All.ServerToClient("test", "hello", ""); - return Json("ok"); + await Task.Delay(seconds*1000).ConfigureAwait(false); + return "ok"; } } } 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 c961f506..56fa4244 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 @@ -159,7 +159,7 @@ export default { - + @@ -184,7 +184,7 @@ 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` - + 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` - + - +