From fe167dd71a1300aeae07522db990d6b3fdb77a0e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 12 三月 2026 13:26:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_中兴实强

---
 src/views/customerService/afterSalesHandling/components/formDia.vue |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/src/views/customerService/afterSalesHandling/components/formDia.vue b/src/views/customerService/afterSalesHandling/components/formDia.vue
index daccaca..4b2964b 100644
--- a/src/views/customerService/afterSalesHandling/components/formDia.vue
+++ b/src/views/customerService/afterSalesHandling/components/formDia.vue
@@ -10,7 +10,7 @@
 				:model="form"
 				label-width="140px"
 				label-position="top"
-				:rules="rules"
+				:rules="operationType === 'view' ? {} : rules"
 				ref="formRef"
 			>
 				<el-row :gutter="30">
@@ -63,7 +63,7 @@
 								v-model="form.proDesc"
 								placeholder="璇疯緭鍏�"
 								clearable
-								disabled
+								:disabled="operationType === 'view'"
 								type="textarea"
 							/>
 						</el-form-item>
@@ -118,8 +118,9 @@
 			</el-row>
 			<template #footer>
 				<div class="dialog-footer">
-					<el-button type="primary" @click="submitForm">纭</el-button>
-					<el-button @click="closeDia">鍙栨秷</el-button>
+					<el-button v-if="operationType === 'approve'" type="primary" @click="submitForm">纭</el-button>
+					<el-button v-if="operationType === 'approve'" @click="closeDia">鍙栨秷</el-button>
+					<el-button v-else type="primary" @click="closeDia">鍏抽棴</el-button>
 				</div>
 			</template>
     </el-dialog>
@@ -169,8 +170,14 @@
 		userList.value = res.data;
 	});
 	form.value = {...row}
-	form.value.disposeUserId = userStore.id;
-	form.value.disDate = getCurrentDate();
+	if (type === 'approve') {
+		if (!form.value.disposeUserId) {
+			form.value.disposeUserId = userStore.id;
+		}
+		if (!form.value.disDate) {
+			form.value.disDate = getCurrentDate();
+		}
+	}
 }
 // const setName = (code) => {
 // 	const index = userList.value.findIndex(item => item.deviceModel === code);
@@ -180,13 +187,16 @@
 // 	}
 // }
 const submitForm = () => {
+	if (operationType.value === 'view') {
+		closeDia();
+		return;
+	}
 	proxy.$refs["formRef"].validate(valid => {
-		if (valid) {
-			afterSalesServiceDispose(form.value).then(response => {
-				proxy.$modal.msgSuccess("鏂板鎴愬姛")
-				closeDia()
-			})
-		}
+		if (!valid) return;
+		afterSalesServiceDispose(form.value).then(() => {
+			proxy.$modal.msgSuccess("澶勭悊鎴愬姛")
+			closeDia()
+		})
 	})
 }
 // 鍏抽棴寮规
@@ -202,4 +212,4 @@
 
 <style scoped>
 
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3