From a1a73e25593d2914ea58cd84ec2540bc56bd6934 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 26 一月 2026 17:43:25 +0800
Subject: [PATCH] 来票台账接口更改

---
 src/pages/sales/receiptPaymentLedger/detail.vue |  538 ++++++++++++++++++++++++++++++-----------------------------
 1 files changed, 273 insertions(+), 265 deletions(-)

diff --git a/src/pages/sales/receiptPaymentLedger/detail.vue b/src/pages/sales/receiptPaymentLedger/detail.vue
index 041be44..5786eea 100644
--- a/src/pages/sales/receiptPaymentLedger/detail.vue
+++ b/src/pages/sales/receiptPaymentLedger/detail.vue
@@ -1,307 +1,315 @@
 <template>
-	<view class="receipt-payment-detail">
-		<!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
-		<PageHeader title="瀹㈡埛寰�鏉ヨ鎯�" @back="goBack" />
-		
-		<!-- 缁熻淇℃伅 -->
-		<view class="summary-info" v-if="tableData.length > 0">
-			<view class="summary-item">
-				<text class="summary-label">鎬昏褰曟暟</text>
-				<text class="summary-value">{{ tableData.length }}</text>
-			</view>
-			<view class="summary-item">
-				<text class="summary-label">寮�绁ㄦ�婚噾棰�</text>
-				<text class="summary-value">{{ formatAmount(invoiceTotal) }}</text>
-			</view>
-			<view class="summary-item">
-				<text class="summary-label">鍥炴鎬婚噾棰�</text>
-				<text class="summary-value highlight">{{ formatAmount(receiptTotal) }}</text>
-			</view>
-			<view class="summary-item">
-				<text class="summary-label">搴旀敹鎬婚噾棰�</text>
-				<text class="summary-value danger">{{ formatAmount(unReceiptTotal) }}</text>
-			</view>
-		</view>
-		
-		<!-- 鍥炴璁板綍鏄庣粏鍒楄〃 -->
-		<view class="detail-list" v-if="tableData.length > 0">
-			<view v-for="(item, index) in tableData" :key="index" class="detail-item">
-				<view class="item-header">
-					<view class="item-left">
-						<view class="record-icon">
-							<up-icon name="file-text" size="16" color="#ffffff"></up-icon>
-						</view>
-						<text class="item-index">{{ index + 1 }}</text>
-					</view>
-					<view class="item-date">{{ item.happenTime }}</view>
-				</view>
-				<up-divider></up-divider>
-				<view class="item-details">
-					<view class="detail-row">
-						<text class="detail-label">寮�绁ㄩ噾棰�(鍏�)</text>
-						<text class="detail-value">{{ formatAmount(item.invoiceAmount) }}</text>
-					</view>
-					<view class="detail-row">
-						<text class="detail-label">鍥炴閲戦(鍏�)</text>
-						<text class="detail-value highlight">{{ formatAmount(item.receiptAmount) }}</text>
-					</view>
-					<view class="detail-row">
-						<text class="detail-label">搴旀敹閲戦(鍏�)</text>
-						<text class="detail-value danger">{{ formatAmount(item.unReceiptAmount) }}</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view v-else class="no-data">
-			<text>鏆傛棤鍥炴璁板綍</text>
-		</view>
-	</view>
+  <view class="receipt-payment-detail">
+    <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+    <PageHeader title="瀹㈡埛寰�鏉ヨ鎯�"
+                @back="goBack" />
+    <!-- 缁熻淇℃伅 -->
+    <view class="summary-info"
+          v-if="tableData.length > 0">
+      <view class="summary-item">
+        <text class="summary-label">鎬昏褰曟暟</text>
+        <text class="summary-value">{{ tableData.length }}</text>
+      </view>
+      <view class="summary-item">
+        <text class="summary-label">寮�绁ㄦ�婚噾棰�</text>
+        <text class="summary-value">{{ formatAmount(invoiceTotal) }}</text>
+      </view>
+      <view class="summary-item">
+        <text class="summary-label">鍥炴鎬婚噾棰�</text>
+        <text class="summary-value highlight">{{ formatAmount(receiptTotal) }}</text>
+      </view>
+      <view class="summary-item">
+        <text class="summary-label">搴旀敹鎬婚噾棰�</text>
+        <text class="summary-value danger">{{ formatAmount(unReceiptTotal) }}</text>
+      </view>
+    </view>
+    <!-- 鍥炴璁板綍鏄庣粏鍒楄〃 -->
+    <view class="detail-list"
+          v-if="tableData.length > 0">
+      <view v-for="(item, index) in tableData"
+            :key="index"
+            class="detail-item">
+        <view class="item-header">
+          <view class="item-left">
+            <view class="record-icon">
+              <up-icon name="file-text"
+                       size="16"
+                       color="#ffffff"></up-icon>
+            </view>
+            <text class="item-index">{{ index + 1 }}</text>
+          </view>
+          <view class="item-date">{{ item.happenTime }}</view>
+        </view>
+        <up-divider></up-divider>
+        <view class="item-details">
+          <view class="detail-row">
+            <text class="detail-label">寮�绁ㄩ噾棰�(鍏�)</text>
+            <text class="detail-value">{{ formatAmount(item.invoiceTotal) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">鍥炴閲戦(鍏�)</text>
+            <text class="detail-value highlight">{{ formatAmount(item.receiptPaymentAmount) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">搴旀敹閲戦(鍏�)</text>
+            <text class="detail-value danger">{{ formatAmount(item.unReceiptPaymentAmount) }}</text>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view v-else
+          class="no-data">
+      <text>鏆傛棤鍥炴璁板綍</text>
+    </view>
+  </view>
 </template>
 
 <script setup>
-import { ref, computed, onMounted } from 'vue';
-import { onShow } from '@dcloudio/uni-app';
-import { customerInteractions } from "@/api/salesManagement/receiptPayment.js";
+  import { ref, computed, onMounted } from "vue";
+  import { onShow } from "@dcloudio/uni-app";
+  import { customerInteractions } from "@/api/salesManagement/receiptPayment.js";
 
-// 瀹㈡埛淇℃伅
-const customerId = ref('');
+  // 瀹㈡埛淇℃伅
+  const customerId = ref("");
 
-// 琛ㄦ牸鏁版嵁
-const tableData = ref([]);
+  // 琛ㄦ牸鏁版嵁
+  const tableData = ref([]);
 
-const invoiceTotal = computed(() => {
-	return tableData.value.reduce((sum, item) => {
-		return sum + (parseFloat(item.invoiceAmount) || 0);
-	}, 0);
-});
+  const invoiceTotal = computed(() => {
+    return tableData.value.reduce((sum, item) => {
+      return sum + (parseFloat(item.invoiceTotal) || 0);
+    }, 0);
+  });
 
-const receiptTotal = computed(() => {
-	return tableData.value.reduce((sum, item) => {
-		return sum + (parseFloat(item.receiptAmount) || 0);
-	}, 0);
-});
+  const receiptTotal = computed(() => {
+    return tableData.value.reduce((sum, item) => {
+      return sum + (parseFloat(item.receiptPaymentAmount) || 0);
+    }, 0);
+  });
 
-const unReceiptTotal = computed(() => {
-	return tableData.value.reduce((sum, item) => {
-		return sum + (parseFloat(item.unReceiptAmount) || 0);
-	}, 0);
-});
+  const unReceiptTotal = computed(() => {
+    return tableData.value.reduce((sum, item) => {
+      return sum + (parseFloat(item.unReceiptPaymentAmount) || 0);
+    }, 0);
+  });
 
-// 杩斿洖涓婁竴椤�
-const goBack = () => {
-	uni.removeStorageSync('customerId')
-	uni.navigateBack();
-};
+  // 杩斿洖涓婁竴椤�
+  const goBack = () => {
+    uni.removeStorageSync("customerId");
+    uni.navigateBack();
+  };
 
-// 鑾峰彇椤甸潰鍙傛暟
-const getPageParams = () => {
-	// 浠庢湰鍦板瓨鍌ㄨ幏鍙栧鎴稩D
-	const storedCustomerId = uni.getStorageSync('customerId');
-	if (storedCustomerId) {
-		customerId.value = storedCustomerId;
-	}
-};
+  // 鑾峰彇椤甸潰鍙傛暟
+  const getPageParams = () => {
+    // 浠庢湰鍦板瓨鍌ㄨ幏鍙栧鎴稩D
+    const storedCustomerId = uni.getStorageSync("customerId");
+    if (storedCustomerId) {
+      customerId.value = storedCustomerId;
+    }
+  };
 
-// 鏌ヨ鍒楄〃
-const getList = () => {
-	if (!customerId.value) {
-		uni.showToast({
-			title: '瀹㈡埛淇℃伅缂哄け',
-			icon: 'error'
-		});
-		return;
-	}
-	
-	showLoadingToast('鍔犺浇涓�...')
-	const param = {
-		customerId: customerId.value,
-		current: -1,
-		size: -1
-	};
-	
-	customerInteractions(param).then((res) => {
-		tableData.value = res.data;
-		closeToast()
-	}).catch(() => {
-		closeToast()
-		uni.showToast({
-			title: '鏌ヨ澶辫触',
-			icon: 'error'
-		});
-	});
-};
+  // 鏌ヨ鍒楄〃
+  const getList = () => {
+    if (!customerId.value) {
+      uni.showToast({
+        title: "瀹㈡埛淇℃伅缂哄け",
+        icon: "error",
+      });
+      return;
+    }
 
-// 鏍煎紡鍖栭噾棰�
-const formatAmount = (amount) => {
-	return amount ? parseFloat(amount).toFixed(2) : '0.00';
-};
+    showLoadingToast("鍔犺浇涓�...");
+    const param = {
+      customerId: customerId.value,
+      current: -1,
+      size: -1,
+    };
 
-// 鏄剧ず鍔犺浇鎻愮ず
-const showLoadingToast = (message) => {
-	uni.showLoading({
-		title: message,
-		mask: true
-	});
-};
+    customerInteractions(param)
+      .then(res => {
+        tableData.value = res.data;
+        closeToast();
+      })
+      .catch(() => {
+        closeToast();
+        uni.showToast({
+          title: "鏌ヨ澶辫触",
+          icon: "error",
+        });
+      });
+  };
 
-// 鍏抽棴鎻愮ず
-const closeToast = () => {
-	uni.hideLoading();
-};
+  // 鏍煎紡鍖栭噾棰�
+  const formatAmount = amount => {
+    return amount ? parseFloat(amount).toFixed(2) : "0.00";
+  };
 
-onShow(() => {
-	// 椤甸潰鏄剧ず鏃惰幏鍙栧弬鏁板苟鍒锋柊鍒楄〃
-	getPageParams();
-	getList();
-});
+  // 鏄剧ず鍔犺浇鎻愮ず
+  const showLoadingToast = message => {
+    uni.showLoading({
+      title: message,
+      mask: true,
+    });
+  };
 
-onMounted(() => {
-	// 椤甸潰鍔犺浇鏃惰幏鍙栧弬鏁板苟鍒锋柊鍒楄〃
-	getPageParams();
-	getList();
-});
+  // 鍏抽棴鎻愮ず
+  const closeToast = () => {
+    uni.hideLoading();
+  };
+
+  onShow(() => {
+    // 椤甸潰鏄剧ず鏃惰幏鍙栧弬鏁板苟鍒锋柊鍒楄〃
+    getPageParams();
+    getList();
+  });
+
+  onMounted(() => {
+    // 椤甸潰鍔犺浇鏃惰幏鍙栧弬鏁板苟鍒锋柊鍒楄〃
+    getPageParams();
+    getList();
+  });
 </script>
 
 <style scoped lang="scss">
-.receipt-payment-detail {
-	min-height: 100vh;
-	background: #f8f9fa;
-	position: relative;
-}
+  .receipt-payment-detail {
+    min-height: 100vh;
+    background: #f8f9fa;
+    position: relative;
+  }
 
-.u-divider {
-	margin: 0 !important;
-}
+  .u-divider {
+    margin: 0 !important;
+  }
 
-.summary-info {
-	background: #ffffff;
-	margin: 20px 20px 0 20px;
-	border-radius: 12px;
-	padding: 16px;
-	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-}
+  .summary-info {
+    background: #ffffff;
+    margin: 20px 20px 0 20px;
+    border-radius: 12px;
+    padding: 16px;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+  }
 
-.summary-item {
-	display: flex;
-	justify-content: space-between;
-	align-items: center;
-	margin-bottom: 8px;
-	
-	&:last-child {
-		margin-bottom: 0;
-	}
-}
+  .summary-item {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 8px;
 
-.summary-label {
-	font-size: 14px;
-	color: #666;
-}
+    &:last-child {
+      margin-bottom: 0;
+    }
+  }
 
-.summary-value {
-	font-size: 14px;
-	color: #333;
-	font-weight: 500;
-}
+  .summary-label {
+    font-size: 14px;
+    color: #666;
+  }
 
-.summary-value.highlight {
-	color: #2979ff;
-	font-weight: 600;
-}
+  .summary-value {
+    font-size: 14px;
+    color: #333;
+    font-weight: 500;
+  }
 
-.summary-value.danger {
-	color: #ff4757;
-	font-weight: 600;
-}
+  .summary-value.highlight {
+    color: #2979ff;
+    font-weight: 600;
+  }
 
-.detail-list {
-	padding: 20px;
-}
+  .summary-value.danger {
+    color: #ff4757;
+    font-weight: 600;
+  }
 
-.detail-item {
-	background: #ffffff;
-	border-radius: 12px;
-	margin-bottom: 16px;
-	overflow: hidden;
-	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-	padding: 0 16px;
-}
+  .detail-list {
+    padding: 20px;
+  }
 
-.item-header {
-	padding: 10px 0;
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-}
+  .detail-item {
+    background: #ffffff;
+    border-radius: 12px;
+    margin-bottom: 16px;
+    overflow: hidden;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+    padding: 0 16px;
+  }
 
-.item-left {
-	display: flex;
-	align-items: center;
-	gap: 8px;
-}
+  .item-header {
+    padding: 10px 0;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
 
-.record-icon {
-	width: 24px;
-	height: 24px;
-	background: #2979ff;
-	border-radius: 4px;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
+  .item-left {
+    display: flex;
+    align-items: center;
+    gap: 8px;
+  }
 
-.item-index {
-	font-size: 14px;
-	color: #333;
-	font-weight: 500;
-}
+  .record-icon {
+    width: 24px;
+    height: 24px;
+    background: #2979ff;
+    border-radius: 4px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
 
-.item-date {
-	font-size: 12px;
-	color: #666;
-}
+  .item-index {
+    font-size: 14px;
+    color: #333;
+    font-weight: 500;
+  }
 
-.item-details {
-	padding: 16px 0;
-}
+  .item-date {
+    font-size: 12px;
+    color: #666;
+  }
 
-.detail-row {
-	display: flex;
-	align-items: flex-end;
-	justify-content: space-between;
-	margin-bottom: 8px;
-	
-	&:last-child {
-		margin-bottom: 0;
-	}
-}
+  .item-details {
+    padding: 16px 0;
+  }
 
-.detail-label {
-	font-size: 12px;
-	color: #777777;
-	min-width: 60px;
-}
+  .detail-row {
+    display: flex;
+    align-items: flex-end;
+    justify-content: space-between;
+    margin-bottom: 8px;
 
-.detail-value {
-	font-size: 12px;
-	color: #000000;
-	text-align: right;
-	flex: 1;
-	margin-left: 16px;
-}
+    &:last-child {
+      margin-bottom: 0;
+    }
+  }
 
-.detail-value.highlight {
-	color: #2979ff;
-	font-weight: 500;
-}
+  .detail-label {
+    font-size: 12px;
+    color: #777777;
+    min-width: 60px;
+  }
 
-.detail-value.danger {
-	color: #ff4757;
-	font-weight: 500;
-}
+  .detail-value {
+    font-size: 12px;
+    color: #000000;
+    text-align: right;
+    flex: 1;
+    margin-left: 16px;
+  }
 
-.no-data {
-	padding: 40px 0;
-	text-align: center;
-	color: #999;
-}
+  .detail-value.highlight {
+    color: #2979ff;
+    font-weight: 500;
+  }
+
+  .detail-value.danger {
+    color: #ff4757;
+    font-weight: 500;
+  }
+
+  .no-data {
+    padding: 40px 0;
+    text-align: center;
+    color: #999;
+  }
 </style>

--
Gitblit v1.9.3