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/invoiceLedger/detail.vue |  100 +++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 86 insertions(+), 14 deletions(-)

diff --git a/src/pages/sales/invoiceLedger/detail.vue b/src/pages/sales/invoiceLedger/detail.vue
index 84a888a..8848730 100644
--- a/src/pages/sales/invoiceLedger/detail.vue
+++ b/src/pages/sales/invoiceLedger/detail.vue
@@ -1,5 +1,5 @@
 <template>
-	<view class="invoice-detail">
+	<view class="account-view">
 		<!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
 		<PageHeader title="鍙戠エ璇︽儏" @back="goBack" />
 		
@@ -34,7 +34,6 @@
 					:beforeRead="beforeReadPdf"
 				>
 					<u-button class="upload-btn" type="primary">
-						<u-icon name="plus" size="14" />
 						涓婁紶鏂囦欢
 					</u-button>
 				</u-upload>
@@ -87,6 +86,7 @@
 
 import { ref, onMounted } from 'vue'
 import dayjs from 'dayjs'
+import { formatDateToYMD } from '@/utils/ruoyi'
 import useUserStore from '@/store/modules/user'
 import { getToken } from '@/utils/auth'
 import { invoiceLedgerProductInfo, invoiceLedgerSaveOrUpdate } from '@/api/salesManagement/invoiceLedger.js'
@@ -127,10 +127,11 @@
 	return num.toFixed(2)
 }
 
-const onInvoiceDateConfirm = ({ selectedValues }) => {
-	form.value.invoiceDate = selectedValues.join('-')
-	currentInvoiceDate.value = selectedValues
-	showInvoiceDatePicker.value = false
+// 鏃ユ湡纭浜嬩欢
+const onInvoiceDateConfirm = (e) => {
+	form.value.invoiceDate = formatDateToYMD(e.value)
+	currentInvoiceDate.value = formatDateToYMD(e.value)
+	showInvoiceDatePicker.value = false;
 }
 
 // 涓婁紶鍓嶆牎楠岋紙鍏煎 Vant Uploader 鐨� file/fileList 缁撴瀯锛�
@@ -155,7 +156,7 @@
 
 const uploadSingleFile = async (fileObj) => {
 	return new Promise((resolve, reject) => {
-		showLoadingToast({ message: '姝e湪涓婁紶...' })
+		showLoadingToast('姝e湪涓婁紶...')
 		const baseUrl = config.baseUrl + '/invoiceLedger/uploadFile'
 
 		const filePath = fileObj?.url || fileObj?.tempFilePath || fileObj?.file?.path
@@ -240,7 +241,7 @@
 
 const loadDetail = async (id) => {
 	try {
-		showLoadingToast({ message: '鍔犺浇涓�...' })
+		showLoadingToast('鍔犺浇涓�...')
 		const res = await invoiceLedgerProductInfo({ id })
 		const data = res?.data || res
 		form.value = { ...data }
@@ -263,7 +264,7 @@
 		if (!form.value.invoiceNo) { showToast('璇疯緭鍏ュ彂绁ㄥ彿'); return }
 		if (!form.value.invoiceTotal) { showToast('璇疯緭鍏ュ彂绁ㄩ噾棰�'); return }
 		if (!form.value.invoiceDate) { showToast('璇烽�夋嫨寮�绁ㄦ棩鏈�'); return }
-		showLoadingToast({ message: '鎻愪氦涓�...' })
+		showLoadingToast('鎻愪氦涓�...')
 		form.value.fileList = fileList.value
 		await invoiceLedgerSaveOrUpdate(form.value)
 		closeToast()
@@ -290,17 +291,88 @@
 </script>
 
 <style scoped lang="scss">
-.account-detail {
+@import '@/static/scss/form-common.scss';
+.account-view {
 	min-height: 100vh;
 	background: #f8f9fa;
-	padding-bottom: 5rem;
 }
+
+.info-section {
+	background: #fff;
+	margin-bottom: 16px;
+}
+
+.info-grid {
+	display: flex;
+	flex-wrap: wrap;
+	padding: 16px;
+}
+
+.info-item {
+	display: flex;
+	width: 100%;
+	margin-bottom: 12px;
+
+	&:last-child {
+		margin-bottom: 0;
+	}
+
+	.info-label {
+		font-size: 14px;
+		color: #999;
+		min-width: 100px;
+	}
+
+	.info-value {
+		font-size: 14px;
+		color: #333;
+		flex: 1;
+	}
+
+	.info-value.highlight {
+		color: #2979ff;
+		font-weight: 500;
+	}
+
+	.info-value.medium {
+		font-size: 16px;
+	}
+}
+
 .uploaded-list { padding: 8px 16px 0 16px; }
 .uploaded-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
 .file-name { font-size: 12px; color: #333; margin-right: 8px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .tip-text { padding: 4px 16px 0 16px; font-size: 12px; color: #888; }
-.footer-btns { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; display: flex; justify-content: space-around; align-items: center; padding: 0.75rem 0; box-shadow: 0 -0.125rem 0.5rem rgba(0,0,0,0.05); z-index: 1000; }
-.cancel-btn { font-weight: 400; font-size: 1rem; color: #FFFFFF; width: 6.375rem; background: #C7C9CC; box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; }
-.save-btn { font-weight: 400; font-size: 1rem; color: #FFFFFF; width: 14rem; background: linear-gradient( 140deg, #00BAFF 0%, #006CFB 100%); box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; }
+.footer-btns {
+	position: fixed;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	background: #fff;
+	display: flex;
+	justify-content: space-around;
+	align-items: center;
+	padding: 0.75rem 0;
+	box-shadow: 0 -0.125rem 0.5rem rgba(0,0,0,0.05);
+	z-index: 1000;
+}
+.cancel-btn {
+	font-weight: 400;
+	font-size: 1rem;
+	color: #FFFFFF;
+	width: 6.375rem;
+	background: #C7C9CC;
+	box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2);
+	border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
+}
+.save-btn {
+	font-weight: 400;
+	font-size: 1rem;
+	color: #FFFFFF;
+	width: 14rem;
+	background: linear-gradient( 140deg, #00BAFF 0%, #006CFB 100%);
+	box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2);
+	border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
+}
 </style>
 

--
Gitblit v1.9.3