From ee6bc0af77ef179dda201c96c4cbc05817643d77 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期二, 19 八月 2025 09:13:12 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/product-inventory-APP-before into dev

---
 src/pages/sales/salesAccount/detail.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/pages/sales/salesAccount/detail.vue b/src/pages/sales/salesAccount/detail.vue
index 56c92a9..d5b2522 100644
--- a/src/pages/sales/salesAccount/detail.vue
+++ b/src/pages/sales/salesAccount/detail.vue
@@ -58,9 +58,9 @@
 			</van-popup>
 			<van-field label="浠樻鏂瑰紡" name="paymentMethod" borderBottom="true" v-model="form.paymentMethod" placeholder="璇疯緭鍏ヤ粯娆炬柟寮�">
 			</van-field>
-			<van-field label="褰曞叆浜�" name="entryPersonName" borderBottom="true" v-model="form.entryPersonName" placeholder="璇疯緭鍏�" readonly>
+			<van-field label="褰曞叆浜�" name="entryPersonName" borderBottom="true" v-model="form.entryPersonName" placeholder="璇疯緭鍏�" disabled>
 			</van-field>
-			<van-field label="褰曞叆鏃ユ湡" name="entryDate" borderBottom="true" v-model="form.entryDate" placeholder="璇疯緭鍏�" readonly>
+			<van-field label="褰曞叆鏃ユ湡" name="entryDate" borderBottom="true" v-model="form.entryDate" placeholder="璇疯緭鍏�" disabled>
 			</van-field>
 			<van-popup v-model:show="showPicker" destroy-on-close position="bottom">
 				<van-picker
@@ -129,7 +129,7 @@
 			<view class="product-section">
 				<view class="section-header">
 					<text class="section-title">浜у搧淇℃伅</text>
-					<van-button type="primary" size="small" @click="addProduct" class="add-btn" icon="plus">鏂板</van-button>
+					<van-button type="primary" size="small" @click="addProduct" class="add-btn" icon="plus"  v-if="operationType !== 'view'">鏂板</van-button>
 				</view>
 				<view class="product-card" v-for="(product, idx) in productData" :key="idx">
 					<!-- 浜у搧绫� -->
@@ -139,7 +139,7 @@
 							<text class="product-productCategory">浜у搧 {{ idx + 1 }}</text>
 						</view>
 						<!-- 鎿嶄綔鎸夐挳 -->
-						<view class="product-actions">
+						<view class="product-actions"  v-if="operationType !== 'view'">
 							<van-button type="danger" size="mini" @click="removeProduct(idx)" class="del-btn" icon="delete">鍒犻櫎</van-button>
 						</view>
 					</view>
@@ -258,7 +258,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="footer-btns">
+			<view class="footer-btns" v-if="operationType !== 'view'">
 				<van-button class="cancel-btn" @click="goBack">鍙栨秷</van-button>
 				<van-button class="save-btn" native-type="submit" form-type="submit">淇濆瓨</van-button>
 			</view>
@@ -343,6 +343,9 @@
 ]);
 
 const addProduct = () => {
+	if (productData.value === null) {
+		productData.value = []
+	}
 	productData.value.push({
     productCategory: '',
     specificationModel: '',
@@ -596,6 +599,7 @@
 			title: '璇锋坊鍔犱骇鍝佷俊鎭�',
 			icon: 'none'
 		});
+		return
 	}
 	form.value.type = 1;
 	addOrUpdateSalesLedger(form.value).then((res) => {
@@ -724,7 +728,7 @@
 		try {
 			editData.value = JSON.parse(editDataStr);
 			// 濡傛灉鏄紪杈戞ā寮忥紝绛夊緟鏁版嵁鍔犺浇瀹屾垚鍚庡~鍏呰〃鍗曟暟鎹�
-			if (operationType.value === 'edit' && editData.value) {
+			if (operationType.value !== 'add' && editData.value) {
 				// 浣跨敤 nextTick 纭繚鏁版嵁鍔犺浇瀹屾垚鍚庡啀濉厖
 				setTimeout(() => {
 					fillFormData();

--
Gitblit v1.9.3