From 796c4cb04e2ea3a19dcdca0c2a3d09d3d85d782b Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 14 Mar 2025 14:31:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/supermarketerp/stockTaking/form.vue | 31 ++++++++++--------- .../wallet/wallet-recharge-apply/index.vue | 7 ++--- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/views/supermarketerp/stockTaking/form.vue b/src/views/supermarketerp/stockTaking/form.vue index e6ad704..46d961a 100644 --- a/src/views/supermarketerp/stockTaking/form.vue +++ b/src/views/supermarketerp/stockTaking/form.vue @@ -275,21 +275,24 @@ const getInitData = async () => { // 计算账面数量 const formatterAccountNumber = (row: any) => { - let stock = row.stock - console.log("xxx", stock) + if (!row._cachedAccountNumber) { + console.log("xxxxx") - return row.erpUnitVos - .map((item: any, index: number) => { - item.oriIndex = index - return item - }) - .sort((a: any, b: any) => b.packageNum - a.packageNum) - .map((item: any, index: number) => { - item.accountNumber = Math.floor(stock / item.packageNum) - stock = stock % item.packageNum - return item - }) - .sort((a: any, b: any) => a.oriIndex - b.oriIndex) + let stock = row.stock + row._cachedAccountNumber = row.erpUnitVos + .map((item: any, index: number) => { + item.oriIndex = index + return item + }) + .sort((a: any, b: any) => b.packageNum - a.packageNum) + .map((item: any, index: number) => { + item.accountNumber = Math.floor(stock / item.packageNum) + stock = stock % item.packageNum + return item + }) + .sort((a: any, b: any) => a.oriIndex - b.oriIndex) + } + return row._cachedAccountNumber } // 顶部表格行新增 diff --git a/src/views/wallet/wallet-recharge-apply/index.vue b/src/views/wallet/wallet-recharge-apply/index.vue index 4bc0f20..812250c 100644 --- a/src/views/wallet/wallet-recharge-apply/index.vue +++ b/src/views/wallet/wallet-recharge-apply/index.vue @@ -177,14 +177,12 @@ const showSearch = ref(true) // 多选变量 const selectObjs = ref([]) as any const multiple = ref(true) -const activeName = ref("2") +const activeName = ref() const tabItems = ref([{}]) const processDrawerRef = ref() const state: BasicTableProps = reactive({ - queryForm: { - processStatus: "2", - }, + queryForm: {}, pageList: walletRechargeApplyApi.pageJoin, }) @@ -234,6 +232,7 @@ const selectionChangHandle = (objs: { id: string }[]) => { onMounted(async () => { const { data } = await getDicts("check_status") + data.unshift({ label: "全部", value: null }) tabItems.value = data })