From d4d784886bc6886cf5e7bc69dd14706922d6fd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=B8=85?= <3115919733@qq.com> Date: Tue, 13 May 2025 14:37:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E5=AE=A1=E6=A0=B8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=88=90=E6=9C=AC=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/check/index.ts | 12 ++++++++++++ src/views/check/auditSheet/index.vue | 25 +++++++++++++++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/api/check/index.ts b/src/api/check/index.ts index a2036aa..7f142ea 100644 --- a/src/api/check/index.ts +++ b/src/api/check/index.ts @@ -43,4 +43,16 @@ export function createCheckPlan(data: any) { method: 'post', data: data }) +} + +/** + * 获取成本中心 + * @param data + * @returns + */ +export function getCostCenter() { + return request({ + url: '/api/CostCenter/getCostCenter', + method: 'get', + }) } \ No newline at end of file diff --git a/src/views/check/auditSheet/index.vue b/src/views/check/auditSheet/index.vue index 4efda70..112cdef 100644 --- a/src/views/check/auditSheet/index.vue +++ b/src/views/check/auditSheet/index.vue @@ -77,7 +77,15 @@
- + + + + + + + + @@ -101,7 +109,7 @@ import { reactive, ref, onMounted, toRefs, getCurrentInstance } from "vue"; import { ElForm, ElMessageBox, ElTable } from "element-plus"; import { getQueryList, getQueryPageList, BpelEvent } from '@/api/common'; import { localStorage } from '@/utils/storage' -import { Auditcheckmark, checkmarkAudit, overruleAudit } from '@/api/check' +import { Auditcheckmark, getCostCenter, checkmarkAudit, overruleAudit } from '@/api/check' import { bTableHeight } from "../../../composables/calcTableHeight"; import { getORG } from '@/api/auth' @@ -115,6 +123,8 @@ const { proxy }: any = getCurrentInstance(); const state = reactive({ ERPFactoryList: [] as any, // 组织 + costCenterList: [] as any, // 成本中心 + costName: '', queryParams: { SHIPREQUESTNAME: '', CHECKPLANNAME: '', @@ -138,7 +148,7 @@ const state = reactive({ handleSelectionlist : [] as any }); -const { ERPFactoryList,loading, list, list2, column, queryParams, rules, pageNum, pageSize, column1, total2 } = toRefs(state) +const { costCenterList,ERPFactoryList,loading, list, list2, column, queryParams, rules, pageNum, pageSize, column1, total2 } = toRefs(state) onMounted(() => { state.column = [ @@ -169,6 +179,7 @@ onMounted(() => { handleQuery2(); updateTableHeight(); ERPFactoryQuery(); + getCost(); window.addEventListener('resize', handleResize); }); function handleSelectionChange(val : any) { @@ -180,6 +191,7 @@ function audit() { CHECKPLANNAME : state.queryParams.CHECKPLANNAME, PLANDATE : state.queryParams.PLANDATE, commitDate : state.commitDate, + costName: state.costName, user : localStorage.get('userName') } Auditcheckmark(query).then((res : any) => { @@ -192,7 +204,7 @@ function audit() { state.queryParams.CHECKPLANNAME = ''; handleQuery2() } else { - ElMessageBox.alert('审核过账失败:' + res.data.message, '提醒框', { + ElMessageBox.alert('审核过账失败:' + res.message, '提醒框', { confirmButtonText: 'OK', }) @@ -204,6 +216,11 @@ function audit() { }); } +function getCost(){ + getCostCenter().then((res: any) => { + state.costCenterList = res.data; + }) +} //ERP工厂查询 function ERPFactoryQuery() { getORG({ orgNo: null })