| | |
| | | <!-- 销售台账瀑布流 --> |
| | | <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"> |
| | |
| | | </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"; |
| | | |
| | | // 搜索关键词 |
| | |
| | | }; |
| | | |
| | | // 添加新记录 |
| | | 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> |
| | | |