diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/xiaos-hou.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/xiao-shou.js
similarity index 100%
rename from code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/xiaos-hou.js
rename to code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/xiao-shou.js
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 4cef2986..ff9eadd2 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
@@ -71,11 +71,11 @@ const schema = {
export default function (businessType) {
let service;
if (businessType === "JisBBAC") {
- service = "bbac_can_sa_service";
+ service = "bbac_not_sa_service";
} else if (businessType === "JisHBPO") {
- service = "hbpo_can_sa_service";
+ service = "hbpo_not_sa_service";
} else {
- service = "pub_can_sa_service";
+ service = "pub_not_sa_service";
}
if (businessType === "JisBBAC" || businessType === "JisHBPO" || businessType === "MaiDanJianBBAC" || businessType === "MaiDanJianHBPO") {
schema.properties.pn.title = "生产码";
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
new file mode 100644
index 00000000..ddb0d8f6
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js
@@ -0,0 +1,145 @@
+import version from "../version.js";
+import { state2 } from "../state.js";
+import businessType from "../businessType.js";
+import invoiceState from "../invoiceState.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/router/business.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
index 02ef6535..a7e2ba79 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
@@ -76,11 +76,7 @@ function createUnableSettleList(path, business, client, title = "不可结算明
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/settle/unable",
- children: [
- createButton("query", "title=查询&isTop=true"),
- createButton("compare", "title=生成可结算单&isTop=true"),
- createButton("export", "title=导出&isTop=true&pattern=paged"),
- ],
+ children: [createButton("query", "title=查询&isTop=true"), createButton("add", "title=生成可结算单&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
};
}
function createCommerceCheckList(path, business, client, title = "商务审批") {
@@ -99,7 +95,7 @@ function createCommerceCheckList(path, business, client, title = "商务审批")
function createVmiOutCheckList(path, business, client, title = "寄售库库存扣减审批") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
- component: "/settle/vmi",
+ component: "/settle/finance",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("compare", "title=扣减审核通过&isTop=true"),
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_list.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_list.js
new file mode 100644
index 00000000..9d47015c
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_list.js
@@ -0,0 +1,23 @@
+import AppList from "../../components/list/index.js";
+import html from "html";
+import { ref, onMounted } from "vue";
+import { useRoute } from "vue-router";
+
+export default function (model) {
+ return {
+ components: { AppList },
+ template: html``,
+ setup() {
+ const config = ref(null);
+ const route = useRoute();
+ const onCommand = async (item, rows) => {
+ console.log(item.path, item, rows);
+ };
+ onMounted(async () => {
+ const useConfig = (await import(`../models/${model}.js`)).default;
+ config.value = useConfig(route.meta?.businessType);
+ });
+ return { config, onCommand };
+ },
+ };
+}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js
index 1948aa7a..6c6985ca 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/bei-jian.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/bei-jian");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js
index 06acdd0d..6ec517bb 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/bom.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/bom");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/cai-gou.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/cai-gou.js
index 59e91206..8dc1ceb6 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/cai-gou.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/cai-gou.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/cai-gou.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/cai-gou");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/code-setting.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/code-setting.js
index 6130585f..3fe80ce7 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/code-setting.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/code-setting.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/code-setting.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/code-setting");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/ke-hu.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/ke-hu.js
index 69f6bdec..4cf6c8c7 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/ke-hu.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/ke-hu.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/ke-hu.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/ke-hu");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js
index 3cbcb471..e079749b 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/material-relationship.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/material-relationship");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material.js
index 20b392a0..87a4f60d 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/material.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/material");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/parts-relationship.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/parts-relationship.js
index 3f49b7c6..8d29ef0f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/parts-relationship.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/parts-relationship.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/parts-relationship.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/parts-relationship");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
index b9ccf33a..38c44650 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
@@ -9,9 +9,7 @@ export default {
components: { AppList },
template: html``,
setup() {
- // 变量定义
const config = useConfig();
- // 函数定义
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "%s/reset-password") {
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou.js
index 5f16f792..bb80ff15 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/xiaos-hou.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 };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/xiao-shou");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
index 201b0423..df1d027e 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
@@ -1,3 +1,2 @@
-import useCompare from "./_compare.js"
-
+import useCompare from "./_compare.js";
export default useCompare("fa-yun");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
index 85a3670b..2f487293 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
@@ -1,3 +1,2 @@
import useCompare from "./_compare.js";
-
export default useCompare("jie-suan");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
index 03d7615c..be2a470d 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
@@ -1,18 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import { useRoute } from "vue-router";
-import useConfig from "../../models/input/edi.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const route = useRoute();
- const businessType = route.meta.businessType;
- const config = useConfig(businessType);
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("input/edi");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
index af2b7692..d159513a 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
@@ -1,18 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import { useRoute } from "vue-router";
-import useConfig from "../../models/input/jie-suan.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const route = useRoute();
- const businessType = route.meta.businessType;
- const config = useConfig(businessType);
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("input/jie-suan");
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 e3b3f985..47b708b6 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
@@ -11,7 +11,8 @@ export default {
const businessType = route.meta.businessType;
const config = useConfig(businessType);
const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
+ if (item.path === "add") {
+ }
};
return { 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 e129a9a8..b14d10a7 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
@@ -1,18 +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/usable.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 onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
+ const url = config.edit.addUrl;
+ if (item.path === "add") {
+ const invbillNum = rows[0].billNum;
+ try {
+ await ElMessageBox.confirm(`"确认为${invbillNum}创建发票?`, "提示", {
+ type: "warning",
+ });
+ appListRef.value.tableLoading = true;
+ const result = request(url, { invbillNum }, { method: "POST" });
+ console.log(result);
+ } catch (e) {
+ console.log(e);
+ } finally {
+ appListRef.value.tableLoading = false;
+ }
+ }
};
- return { config, onCommand };
+ return { appListRef, config, onCommand };
},
};