From dc63a926bd3fff4fda282b88b203072a8874962a Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 12 八月 2025 17:45:05 +0800 Subject: [PATCH] 1.销售台账列表开发联调 2.新增、编辑销售台账页面开发联调 --- src/pages/sales/salesAccount/index.vue | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/pages/sales/salesAccount/index.vue b/src/pages/sales/salesAccount/index.vue index e2e0b65..7f93241 100644 --- a/src/pages/sales/salesAccount/index.vue +++ b/src/pages/sales/salesAccount/index.vue @@ -29,7 +29,7 @@ <!-- 閿�鍞彴璐︾�戝竷娴� --> <view class="ledger-list" v-if="total > 0"> <view v-for="(item, index) in ledgerList" :key="index"> - <view class="ledger-item" @click="handleItemClick(item)"> + <view class="ledger-item" @click="handleInfo('edit', item)"> <view class="item-header"> <view class="item-left"> <view class="document-icon"> @@ -92,14 +92,15 @@ </view> <!-- 娴姩鎿嶄綔鎸夐挳 --> - <view class="fab-button" @click="handleAdd"> + <view class="fab-button" @click="handleInfo('add')"> <up-icon name="plus" size="24" color="#ffffff"></up-icon> </view> </view> </template> <script setup> -import { ref, reactive, onMounted } from 'vue'; +import { ref } from 'vue'; +import { onShow } from '@dcloudio/uni-app'; import {ledgerListPage} from "@/api/salesManagement/salesLedger"; // 鎼滅储鍏抽敭璇� @@ -145,15 +146,19 @@ }; // 娣诲姞鏂拌褰� -const handleAdd = () => { +const handleInfo = (type, row) => { + uni.setStorageSync('operationType', type); + if (row) { + uni.setStorageSync('editData', JSON.stringify(row)); + } uni.navigateTo({ url: '/pages/sales/salesAccount/detail' }); }; -onMounted(() => { - // 椤甸潰鍔犺浇瀹屾垚鍚庣殑鍒濆鍖栭�昏緫 - getList() +onShow(() => { + // 椤甸潰鏄剧ず鏃跺埛鏂板垪琛� + getList(); }); </script> -- Gitblit v1.9.3