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 740fb5a0..4d54071d 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 @@ -421,7 +421,7 @@ export default { downLineEndDateTime: "", ln: "", pn: "", - enumBusinessType: route.meta.enumBusinessType, + businessType: route.meta.businessType, }; const exportModel = ref(defaultExportModel); const defaultImportModel = config.import?.schema ? schemaToModel(config.import.schema) : {}; @@ -689,7 +689,7 @@ export default { formData.append(q, importModel.value[q]); } }); - if (config.query.schema.properties.businessType.default) { + if (config.query.schema.properties.businessType?.default) { formData.append("businessType", config.query.schema.properties.businessType.default); } for (let i = 0; i < fileList.value.length; i++) { @@ -836,9 +836,10 @@ export default { } function isNotJit() { return ( - route.meta.enumBusinessType !== "ZhiGongJian" || - route.meta.enumBusinessType !== "BeiJian" || - route.meta.enumBusinessType !== "YingDuJian" + route.meta.businessType !== 3 || + route.meta.businessType !== 4 || + route.meta.businessType !== 7 || + route.meta.businessType !== 8 ); } onMounted(async () => { diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js index d9bc4b3c..fb73d173 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js @@ -40,11 +40,13 @@ const exportUrl = "settleaccount/invoice_service/export"; const rejectUrl = "settleaccount/invoice_service/reject"; const passedUrl = "settleaccount/invoice_service/approval-passed"; const sync_qadUrl = "settleaccount/invoice_service/sync_qad"; +const importJsonUrl = "settleaccount/vmi/excel-to-json"; const queryMethod = "POST"; const exportMethod = "POST"; const rejectMethod = "POST"; const passedMethod = "POST"; const sync_qadMethod = "POST"; +const importJsonMethod = "POST"; export default function () { return { @@ -109,10 +111,12 @@ export default function () { rejectUrl, passedUrl, sync_qadUrl, + importJsonUrl, exportMethod, rejectMethod, passedMethod, sync_qadMethod, + importJsonMethod, schema: schema, }, }; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js index 5ff40bfd..26c0708f 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js @@ -29,7 +29,8 @@ const schema = { }, createdAt: { title: "创建时间", - type: "DateTime", + type: "string", + input: "datetime", }, remark: { title: "说明", 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 708be2ff..122a5406 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 @@ -1211,7 +1211,7 @@ export default [ path: "hbpo_jit_pub_sa_detail_service", meta: { type: "page", - title: "HBPO结算数据明细", + title: "4", icon: "file", isHidden: true, }, @@ -1291,7 +1291,7 @@ export default [ type: "page", title: "BBAC发运与结算比对", icon: "file", - enumBusinessType: "ZhiGongJian", + businessType: 3, }, children: [ { @@ -1346,7 +1346,7 @@ export default [ type: "page", title: "HBPO发运与结算比对", icon: "file", - enumBusinessType: "ZhiGongJian", + businessType: 4, }, children: [ { @@ -1778,7 +1778,7 @@ export default [ type: "page", title: "发运与结算比对", icon: "file", - enumBusinessType: "BeiJian", + businessType: 7, }, children: [ { @@ -2210,7 +2210,7 @@ export default [ type: "page", title: "发运与结算比对", icon: "file", - enumBusinessType: "YingDuJian", + businessType: 8, }, children: [ { @@ -2551,14 +2551,6 @@ export default [ pattern: "paged", }, }, - { - path: "reopen", - meta: { - type: "button", - title: "重开", - icon: "file", - }, - }, ], }, { diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js index 3dbbc6bd..71b57c21 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js @@ -1,43 +1,123 @@ import AppList from "../../../components/list/index.js"; import html from "html"; -import { ref } from "vue"; +import { reactive, ref } from "vue"; import useConfig from "../../../models/invoice/invoice_map_group.js"; import request from "../../../request/index.js"; import AppTable from "../../components/table/index.js"; +import { ElMessageBox } from "element-plus"; export default { components: { AppList, AppTable }, template: html` - + - + - - - - + + + + - - - + + + `, @@ -53,6 +133,51 @@ export default { } `, setup() { + const openImportHandler = async () => { + const data = {}; + const response = await request("settleaccount/vmi/excel-to-json", data, { method: "POST" }); + console.log(response.data); + }; + const formInline = reactive({ + oldInvBillNum: "", + invBillNum: "", + settleDate: "", + invGroupNum: "", + lu: "", + pn: "", + qty: null, + groupNum: "", + }); + //create + const submitForm = () => { + const newFormInline = { ...formInline }; + invoiceValue.value.push(newFormInline); + Object.keys(formInline).forEach((key) => { + delete formInline[key]; + }); + innerVisible.value = false; + }; + //delete + const selectedRows = ref([]); + const invoiceValue = ref([]); + const deleteRow = () => { + const indexes = selectedRows.value.map((row) => invoiceValue.value.indexOf(row)); + indexes.sort((a, b) => b - a); + indexes.forEach((index) => { + invoiceValue.value.splice(index, 1); + }); + selectedRows.value = []; + }; + const innerVisible = ref(false); + const openImport = ref(false); + const dialogVisible = ref(false); + const handleClose = (done) => { + ElMessageBox.confirm("确认关闭") + .then(() => { + done(); + }) + .catch(() => {}); + }; const config = useConfig(); const drawer = ref(false); const loading = ref(false); @@ -60,8 +185,11 @@ export default { invoicE_WAIT_DETAIL: [], invoicE_MAP_GROUP: [], invoicE_NOT_SETTLE: [], + adJ_DETAIL: [], }); + const prop = ref(""); const onCommand = async (item, rows) => { + prop.value = item.path; drawer.value = true; loading.value = true; const data = { [item.path]: rows[0][item.path] }; @@ -114,7 +242,7 @@ export default { title: "发票号", }, { - dataKey: "inGroupNum", + dataKey: "invGroupNum", title: "发票分组号", }, { @@ -157,6 +285,17 @@ export default { columns1, columns2, columns3, + innerVisible, + dialogVisible, + handleClose, + prop, + formInline, + submitForm, + invoiceValue, + deleteRow, + selectedRows, + openImport, + openImportHandler, }; }, };