From c384e04f81caf681647c602d5896cc10b289582e Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 27 二月 2026 14:59:16 +0800
Subject: [PATCH] 经销商管理

---
 admin/src/components/business/OperaWithdrawRecordWindow.vue |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/admin/src/components/business/OperaWithdrawRecordWindow.vue b/admin/src/components/business/OperaWithdrawRecordWindow.vue
index 40c6fba..066af90 100644
--- a/admin/src/components/business/OperaWithdrawRecordWindow.vue
+++ b/admin/src/components/business/OperaWithdrawRecordWindow.vue
@@ -78,7 +78,7 @@
       <p class="tip-header" >鐢宠瀹℃壒</p>
       <el-form :model="checkForm" ref="checkForm" :rules="rules" label-width="110px" label-suffix="锛�"  style="margin-left: 20px;width: 500px;" inline >
         <el-form-item label="瀹℃牳缁撴灉" prop="status">
-          <el-radio-group v-model="checkForm.status">
+          <el-radio-group v-model="checkForm.status" @change="changeStatuus">
             <el-radio :label="1">閫氳繃</el-radio>
             <el-radio  :label="2">椹冲洖</el-radio>
           </el-radio-group>
@@ -99,7 +99,7 @@
         <el-form-item label="鎵撴閾惰" prop="payBank" v-if="checkForm.status ==1">
           <el-input v-model="checkForm.payBank" placeholder="璇疯緭鍏ユ墦娆鹃摱琛�"  style="width: 350px"  v-trim/>
         </el-form-item>
-        <el-form-item label="瀹℃牳澶囨敞" prop="auditRemark">
+        <el-form-item label="瀹℃牳澶囨敞" prop="auditRemark" >
           <el-input v-model="checkForm.auditRemark" placeholder="璇疯緭鍏ュ鏍稿娉�" type="textarea"  style="width: 350px; " rows="6" v-trim/>
         </el-form-item>
       </el-form>
@@ -134,10 +134,12 @@
         payBank: '',
         payFileList: null
       },
+      isRemarkRequired: false,
       rules: {
         status: [
           { required: true, message: '璇烽�夋嫨瀹℃牳缁撴灉' }
-        ]
+        ],
+        auditRemark: []
       }
     }
   },
@@ -149,7 +151,25 @@
       'field.main': 'id'
     })
   },
+  watch: {
+    isRemarkRequired(newVal) {
+      this.updateRules();
+    }
+  },
   methods: {
+    changeStatuus(){
+      this.isRemarkRequired = this.checkForm.status ==2
+    },
+    updateRules() {
+      if (this.isRemarkRequired) {
+        this.rules.auditRemark = [
+          { required: true, message: '璇峰~鍐欏鏍稿娉�', trigger: 'blur' }
+        ]
+      } else {
+        this.rules.auditRemark = []; // 涓嶅繀濉椂锛屾竻绌鸿鍒欐暟缁�
+      }
+      this.$refs.checkForm.clearValidate(); // 娓呴櫎涔嬪墠鐨勯獙璇佺姸鎬侊紝閬垮厤鍑虹幇涓嶅繀瑕佺殑鎻愮ず
+    },
     confirmDo () {
       this.$refs.checkForm.validate((valid) => {
         if (!valid) {

--
Gitblit v1.9.3