diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js
index 3d3f27ea..e4a83427 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js
@@ -175,5 +175,17 @@ const invState = {
],
};
+const taskState = {
+ title: "状态",
+ type: "string",
+ input: "select",
+ options: [
+ { value: 0, label: "未读" },
+ { value: 1, label: "正在读取" },
+ { value: 2, label: "成功" },
+ { value: 3, label: "失败" },
+ ],
+};
+
export default businessType;
-export { version, state, state2, state3, transType, deliverBillType, deliverSubBillType, proType, billState, codeType, invState };
+export { version, state, state2, state3, transType, deliverBillType, deliverSubBillType, proType, billState, codeType, invState, taskState };
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js
deleted file mode 100644
index fd8ec2b8..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js
+++ /dev/null
@@ -1,145 +0,0 @@
-//财务审核
-import version from "../version.js";
-import { state2 } from "../state.js";
-import { businessType, invoiceState } from "../_options.js";
-
-const state = Object.assign({}, state2);
-state.input = "tabs";
-const schema = {
- title: "商务审批",
- type: "object",
- properties: {
- version,
- realnvBillNum: {
- title: "金税发票号",
- type: "string",
- },
- invbillNum: {
- title: "系统发票号",
- type: "string",
- link: true,
- },
- amt: {
- title: "未税金额",
- type: "number",
- },
- taxAmt: {
- title: "税后金额",
- type: "number",
- },
- invGroupNum: {
- title: "发票分组号",
- type: "number",
- link: true,
- },
- businessType,
- state,
- invoiceState,
- taxDiff: {
- title: "发票税后尾差",
- type: "number",
- },
- clientCode: {
- title: "客户代码",
- type: "string",
- },
- },
-};
-
-export default function () {
- const service = "invoice_service";
- const queryUrl = `settleaccount/${service}/main-query`;
- const exportUrl = `settleaccount/${service}/export`;
- const invoiceUrl = `settleaccount/${service}/generate-invoice`;
- const receivedUrl = `settleaccount/${service}/received`;
- const rejectUrl = `settleaccount/${service}/reject`;
- const reissueUrl = `settleaccount/${service}/reissue-invoice`;
- const queryMethod = "POST";
- const exportMethod = "POST";
- const invoiceMethod = "POST";
- const receivedMethod = "POST";
- const rejectMethod = "POST";
- const reissueMethod = "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,
- },
- {
- logic: "and",
- column: "state",
- 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,
- invoiceUrl,
- receivedUrl,
- rejectUrl,
- reissueUrl,
- exportMethod,
- invoiceMethod,
- receivedMethod,
- rejectMethod,
- reissueMethod,
- schema: schema,
- },
- };
-}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js
new file mode 100644
index 00000000..38ec9bd9
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js
@@ -0,0 +1,123 @@
+//库存扣减
+import { taskState } from "../_options.js";
+
+export default function () {
+ const schema = {
+ title: "Qad发票同步状态查询",
+ type: "object",
+ properties: {
+ taskState,
+ taskId: {
+ title: "任务Id",
+ type: "string",
+ },
+ tableName: {
+ title: "表名",
+ type: "string",
+ },
+ failedInfo: {
+ title: "失败信息",
+ type: "string",
+ },
+ site: {
+ title: "地点",
+ type: "string",
+ },
+ domain: {
+ title: "域",
+ type: "string",
+ },
+ invoiceNumber: {
+ title: "金税发票号",
+ type: "string",
+ },
+ sasInvoiceNumber: {
+ title: "结算发票号",
+ type: "string",
+ },
+ customer: {
+ title: "客户",
+ type: "string",
+ },
+ voucher: {
+ title: "凭证号",
+ type: "string",
+ },
+ },
+ };
+
+ const queryUrl = "settleaccount/bbac_pd_service/detail-query";
+
+ return {
+ query: {
+ url: queryUrl,
+ method: "POST",
+ hasFilter: true,
+ schema: {
+ title: "Qad发票同步状态查询",
+ 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: "invoiceNumber",
+ action: "equal",
+ value: null,
+ readOnly: true,
+ },
+ {
+ logic: "and",
+ column: "sasInvoiceNumber",
+ 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,
+ },
+ edit: {
+ 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 0d4b7757..47845a96 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
@@ -355,11 +355,11 @@ export default [
],
},
{
- ...createRoute("invoice", "title=财务审核"),
+ ...createRoute("finance", "title=财务审核"),
children: [
{
- ...createPage("finance", `title=财务审核`),
- component: "/settle/finance",
+ ...createPage("check", `title=财务审核`),
+ component: "/finance/check",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
@@ -387,6 +387,11 @@ export default [
),
],
},
+ {
+ ...createPage("sync", `title=Qad发票同步状态查询`),
+ component: "/finance/sync",
+ children: [createButton("query", "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/_check.js
similarity index 98%
rename from code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
rename to code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js
index 96e66f93..436a5856 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/_check.js
@@ -1,14 +1,14 @@
import html from "html";
import { schemaToModel } from "html";
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 extraProperties from "../../models/_extraProperties.js";
-import { getUrl } from "../../request/index.js";
-import businessTypes from "../../models/_options.js";
-import { required, trim } from "../../utils/validation.js";
-import { delay } from "../../utils/index.js";
+import request from "../request/index.js";
+import AppForm from "../components/form/index.js";
+import AppTable from "../components/table/index.js";
+import extraProperties from "../models/_extraProperties.js";
+import { getUrl } from "../request/index.js";
+import businessTypes from "../models/_options.js";
+import { required, trim } from "../utils/validation.js";
+import { delay } from "../utils/index.js";
import { ElMessage, ElMessageBox } from "element-plus";
export default {
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
new file mode 100644
index 00000000..21e78e6b
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js
@@ -0,0 +1,71 @@
+import AppList from "../../components/list/index.js";
+import html from "html";
+import { useRoute } from "vue-router";
+import { ref } from "vue";
+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);
+ 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 === "approval" || item.path === "reject" || item.path === "receive" || item.path === "sync") {
+ if (rows.length > 0) {
+ let message = null;
+ let url = null;
+ let data = rows.map((o) => o.invbillNum);
+ if (item.path === "approval") {
+ message = `确认审核通过选中的${rows.length}行数据吗?`;
+ url = config.edit.approvalUrl;
+ } else if (item.path === "reject") {
+ message = `确认退回选中的${rows.length}行数据吗?`;
+ data = rows[0]["invGroupNum"];
+ url = config.edit.rejectUrl;
+ } else if (item.path === "receive") {
+ message = `确认选中的${rows.length}行数据客户已收票吗?`;
+ url = config.edit.receivedUrl;
+ } else if (item.path === "sync") {
+ message = `确认选中的${rows.length}行数据同步到QAD吗?`;
+ url = "settleaccount/invoice_service/submit-to-qad";
+ }
+ await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true);
+ }
+ } else if (item.path === "export-group") {
+ const url = config.edit.exportGroupUrl;
+ const method = config.edit.exportMethod;
+ const postData = {
+ filters: [
+ {
+ logic: "and",
+ column: "invGroupNum",
+ action: "equal",
+ value: rows[0]["invGroupNum"],
+ },
+ ],
+ };
+ 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") {
+ row.value = rows[0];
+ 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/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/sync.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/sync.js
new file mode 100644
index 00000000..1596546d
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/sync.js
@@ -0,0 +1,18 @@
+import AppList from "../../components/list/index.js";
+import html from "html";
+import useConfig from "../../models/settle/sync.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/settle/commerce.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
index e9681655..4d17687e 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
@@ -4,7 +4,7 @@ import { useRoute } from "vue-router";
import { ref } from "vue";
import request, { getUrl } from "../../request/index.js";
import useConfig from "../../models/settle/commerce.js";
-import AppCheck from "./_check.js";
+import AppCheck from "../_check.js";
export default {
components: { AppList, AppCheck },
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 9c119f19..21e78e6b 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,7 +4,7 @@ import { useRoute } from "vue-router";
import { ref } from "vue";
import request, { getUrl } from "../../request/index.js";
import useConfig from "../../models/settle/commerce.js";
-import AppCheck from "./_check.js";
+import AppCheck from "../_check.js";
export default {
components: { AppList, AppCheck },
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/inventory.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/inventory.js
index df28747c..3f20b795 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/inventory.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/inventory.js
@@ -4,7 +4,7 @@ import { useRoute } from "vue-router";
import { ref } from "vue";
import request, { getUrl } from "../../request/index.js";
import useConfig from "../../models/settle/inventory.js";
-import AppCheck from "./_check.js";
+import AppCheck from "../_check.js";
export default {
components: { AppList, AppCheck },
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
index 89591b65..9ab68c6c 100644
--- 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
@@ -4,7 +4,7 @@ import { useRoute } from "vue-router";
import { ref } from "vue";
import request, { getUrl } from "../../request/index.js";
import useConfig from "../../models/settle/inventory.js/index.js";
-import AppCheck from "./_check.js";
+import AppCheck from "../_check.js";
export default {
components: { AppList, AppCheck },