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 |   80 +++++++++++++++++-----------------------
 1 files changed, 34 insertions(+), 46 deletions(-)

diff --git a/src/pages/sales/receiptPayment/index.vue b/src/pages/sales/receiptPayment/index.vue
index 08b2f51..ee5a4e7 100644
--- a/src/pages/sales/receiptPayment/index.vue
+++ b/src/pages/sales/receiptPayment/index.vue
@@ -1,14 +1,7 @@
 <template>
-	<view class="receipt-payment">
-		<!-- 椤甸潰澶撮儴 -->
-		<van-nav-bar
-			title="鍥炴鐧昏"
-			left-text="杩斿洖"
-			left-arrow
-			@click-left="goBack"
-			fixed
-			placeholder
-		/>
+	<view class="sales-account">
+		<!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+		<PageHeader title="鍥炴鐧昏" @back="goBack" />
 
 		<!-- 鎼滅储鍜岀瓫閫夊尯鍩� -->
 		<view class="search-filter-section">
@@ -29,7 +22,7 @@
 			<!-- 绛涢�夊紑鍏� -->
 			<view class="switch-row">
 				<text class="switch-label">涓嶆樉绀哄緟鍥炴涓�0</text>
-				<van-switch v-model="searchForm.status" @change="getList" size="18"/>
+				<up-switch v-model="searchForm.status" @change="getList" size="18"/>
 			</view>
 		</view>
 
@@ -89,7 +82,7 @@
 					
 					<!-- 鎿嶄綔鎸夐挳 -->
 					<view class="action-buttons">
-						<van-button
+						<up-button
 							type="primary"
 							size="small"
 							class="action-btn"
@@ -97,7 +90,7 @@
 							@click="openForm(item)"
 						>
 							鏂板鍥炴
-						</van-button>
+						</up-button>
 					</view>
 				</view>
 			</view>
@@ -107,15 +100,6 @@
 		<view class="no-data" v-else>
 			<text>鏆傛棤鍥炴鏁版嵁</text>
 		</view>
-
-		<!-- 鍥炴鏂瑰紡閫夋嫨鍣� -->
-		<van-popup v-model:show="showPaymentType" position="bottom">
-			<van-picker
-				:columns="receipt_payment_type"
-				@confirm="onPaymentTypeConfirm"
-				@cancel="showPaymentType = false"
-			/>
-		</van-popup>
 	</view>
 </template>
 
@@ -125,16 +109,33 @@
 	bindInvoiceNoRegPage,
 } from '@/api/salesManagement/receiptPayment'
 import useUserStore from '@/store/modules/user'
-import { showToast } from 'vant'
-import {onShow} from "@dcloudio/uni-app";
 
-const userStore = useUserStore()
+// 鏄剧ず鎻愮ず淇℃伅
+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";
 
 // 鍝嶅簲寮忔暟鎹�
 const tableData = ref([])
 const tableLoading = ref(false)
-const showPaymentType = ref(false)
-const currentEditRow = ref(null)
 
 // 鏌ヨ鍙傛暟璁剧疆涓�-1鑾峰彇鍏ㄩ儴鏁版嵁
 const page = ref({
@@ -151,14 +152,6 @@
 	projectName: ''
 })
 
-// 鍥炴鏂瑰紡閫夐」
-const receipt_payment_type = ref([
-	{ text: '鐜伴噾', value: '1' },
-	{ text: '閾惰杞处', value: '2' },
-	{ text: '鏀エ', value: '3' },
-	{ text: '鍏朵粬', value: '4' }
-])
-
 // 鏍煎紡鍖栨暟瀛�
 const formatNumber = (value) => {
 	return parseFloat(value || 0).toFixed(2)
@@ -171,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()
 		})
 }
 
@@ -192,13 +187,6 @@
 	uni.navigateTo({ url: '/pages/sales/receiptPayment/add' })
 }
 
-// 纭鍥炴鏂瑰紡閫夋嫨
-const onPaymentTypeConfirm = (value) => {
-	if (currentEditRow.value) {
-		currentEditRow.value.receiptPaymentType = value.value
-	}
-	showPaymentType.value = false
-}
 onShow(() => {
 	getList()
 })
@@ -209,7 +197,7 @@
 	margin: 0 !important;
 }
 
-.receipt-payment {
+.sales-account {
 	min-height: 100vh;
 	background: #f8f9fa;
 	position: relative;

--
Gitblit v1.9.3