From 796c4cb04e2ea3a19dcdca0c2a3d09d3d85d782b Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 14 Mar 2025 14:31:53 +0800 Subject: [PATCH 1/4] =?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 }) From e999023c83237e0bf18cf9596fa25488d0d94b28 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 14 Mar 2025 16:50:50 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=A5=AD=E5=8D=A1=E5=85=85=E5=80=BC?= =?UTF-8?q?=E9=92=B1=E5=8C=85=E7=B1=BB=E5=9E=8B=E9=80=89=E6=8B=A9=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Select/SelectWalletType.vue | 14 +- .../wallet/wallet-recharge-apply/form.vue | 183 +++++++++--------- .../wallet/wallet-recharge-apply/index.vue | 6 +- 3 files changed, 107 insertions(+), 96 deletions(-) diff --git a/src/components/Select/SelectWalletType.vue b/src/components/Select/SelectWalletType.vue index 3fa1119..d4cf70f 100644 --- a/src/components/Select/SelectWalletType.vue +++ b/src/components/Select/SelectWalletType.vue @@ -31,12 +31,14 @@ import { getWalletTypeSimple } from "/@/api/wallet/wallet-type" const selectId = defineModel() -export type Props = { - placeholder?: string -} -const props = withDefaults(defineProps(), { - placeholder: "请选择", -}) +const props = withDefaults( + defineProps<{ + placeholder?: string + }>(), + { + placeholder: "请选择", + }, +) const queryForm = reactive({ name: "", diff --git a/src/views/wallet/wallet-recharge-apply/form.vue b/src/views/wallet/wallet-recharge-apply/form.vue index 33d4ba6..1e1d256 100644 --- a/src/views/wallet/wallet-recharge-apply/form.vue +++ b/src/views/wallet/wallet-recharge-apply/form.vue @@ -1,122 +1,127 @@ \ No newline at end of file + openDialog, +}) + diff --git a/src/views/wallet/wallet-recharge-apply/index.vue b/src/views/wallet/wallet-recharge-apply/index.vue index 812250c..9e3f9b4 100644 --- a/src/views/wallet/wallet-recharge-apply/index.vue +++ b/src/views/wallet/wallet-recharge-apply/index.vue @@ -74,7 +74,11 @@ - + + + -