From 025e46e11cb2962fd7692adfa401333758cc779b Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 02 九月 2025 14:00:34 +0800 Subject: [PATCH] 修改组件 --- src/pages/sales/receiptPayment/index.vue | 49 ++++++++++++++++++++++++++++++++++++------------- 1 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/pages/sales/receiptPayment/index.vue b/src/pages/sales/receiptPayment/index.vue index a30d42e..ee5a4e7 100644 --- a/src/pages/sales/receiptPayment/index.vue +++ b/src/pages/sales/receiptPayment/index.vue @@ -1,5 +1,5 @@ <template> - <view class="receipt-payment"> + <view class="sales-account"> <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 --> <PageHeader title="鍥炴鐧昏" @back="goBack" /> @@ -15,14 +15,14 @@ /> </view> <view class="filter-button" @click="getList"> - <u-icon name="search" size="24" color="#999"></u-icon> + <up-icon name="search" size="24" color="#999"></up-icon> </view> </view> <!-- 绛涢�夊紑鍏� --> <view class="switch-row"> <text class="switch-label">涓嶆樉绀哄緟鍥炴涓�0</text> - <u-switch v-model="searchForm.status" @change="getList" size="18"/> + <up-switch v-model="searchForm.status" @change="getList" size="18"/> </view> </view> @@ -35,12 +35,12 @@ <view class="item-header"> <view class="item-left"> <view class="document-icon"> - <u-icon name="file-text" size="16" color="#ffffff"></u-icon> + <up-icon name="file-text" size="16" color="#ffffff"></up-icon> </view> <text class="item-id">{{ item.salesContractNo }}</text> </view> </view> - <u-divider></u-divider> + <up-divider></up-divider> <view class="item-details"> <view class="detail-row"> <text class="detail-label">瀹㈡埛鍚嶇О</text> @@ -82,7 +82,7 @@ <!-- 鎿嶄綔鎸夐挳 --> <view class="action-buttons"> - <u-button + <up-button type="primary" size="small" class="action-btn" @@ -90,7 +90,7 @@ @click="openForm(item)" > 鏂板鍥炴 - </u-button> + </up-button> </view> </view> </view> @@ -98,7 +98,7 @@ <!-- 鏃犳暟鎹彁绀� --> <view class="no-data" v-else> - <text>鏆傛棤鏁版嵁</text> + <text>鏆傛棤鍥炴鏁版嵁</text> </view> </view> </template> @@ -109,7 +109,28 @@ bindInvoiceNoRegPage, } from '@/api/salesManagement/receiptPayment' import useUserStore from '@/store/modules/user' -import { showToast } from 'vant' + +// 鏄剧ず鎻愮ず淇℃伅 +const showToast = (message) => { + uni.showToast({ + title: message, + icon: 'none' + }) +} + +// 鏄剧ず鍔犺浇鎻愮ず +const showLoadingToast = (message) => { + uni.showLoading({ + title: message, + mask: true + }); +}; + +// 鍏抽棴鍔犺浇鎻愮ず +const closeToast = () => { + uni.hideLoading(); +}; + import {onShow} from "@dcloudio/uni-app"; // 鍝嶅簲寮忔暟鎹� @@ -143,14 +164,16 @@ // 鑾峰彇鍒楄〃鏁版嵁 const getList = () => { - tableLoading.value = true + showLoadingToast('鍔犺浇涓�...') bindInvoiceNoRegPage({ ...searchForm.value, ...page.value }) .then((res) => { - tableLoading.value = false tableData.value = res.data.records || [] }) .catch(() => { - tableLoading.value = false + showToast('鑾峰彇鏁版嵁澶辫触') + }) + .finally(() => { + closeToast() }) } @@ -174,7 +197,7 @@ margin: 0 !important; } -.receipt-payment { +.sales-account { min-height: 100vh; background: #f8f9fa; position: relative; -- Gitblit v1.9.3