From 7293185aa78829aa7a5f57e07523f949f8ee3250 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 27 二月 2026 17:45:07 +0800
Subject: [PATCH] 小程序   接口开发

---
 admin/src/components/business/OperaWithdrawRecordWindow.vue |   36 +++++++++++++++++++++++++++++-------
 1 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/admin/src/components/business/OperaWithdrawRecordWindow.vue b/admin/src/components/business/OperaWithdrawRecordWindow.vue
index 508e13e..066af90 100644
--- a/admin/src/components/business/OperaWithdrawRecordWindow.vue
+++ b/admin/src/components/business/OperaWithdrawRecordWindow.vue
@@ -55,7 +55,7 @@
                   </div>
                   <div class="list-company"><span>{{item.info }}</span><span style="margin-left: 10px">{{item.createTime }}</span></div>
                   <div class="list-company1" v-if="item.status ===1"><span>鎵撴鍑瘉锛�</span>
-                     <div v-if="item.files && item.files.length"; style="display: block;margin-left: 100px;">
+                     <div v-if="item.files && item.files.length" style="display: block;margin-left: 100px;">
                        <el-image
                           v-for="file in item.files "
                           :key="'file_'+file.fileurl"
@@ -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) {
@@ -181,21 +201,22 @@
     },
     loadInfo () {
       this.api.detail(this.form.id).then(res => {
-        this.form = res || this.form
+        this.form = res || {}
         this.logList = []
         if (this.form.status == 1) {
           this.logList.push({ title: '骞冲彴瀹℃牳閫氳繃', info: this.form.auditUserName, createTime: this.form.auditTime || '', status: 1, files: this.form.payFileList || [], bank: this.form.payBank || '', auditRemark: this.form.auditRemark || '' })
         } else if (this.form.status == 2) {
           this.logList.push({ title: '骞冲彴瀹℃牳椹冲洖', info: this.form.auditUserName, createTime: this.form.auditTime || '', status: 2, auditRemark: this.form.auditRemark || '' })
         }
-        this.logList.push({ title: '缁忛攢鍟嗗彂璧锋彁鐜扮敵璇�', info: '鎭掕揪鏈烘閿�鍞湁闄愬叕鍙� ', createTime: this.form.createDate || '', status: 0 })
+        this.logList.push({ title: '缁忛攢鍟嗗彂璧锋彁鐜扮敵璇�', info: this.form.shopName||'' , createTime: this.form.createDate || '', status: 0 })
       })
+      console.log(this.form)
+      console.log(this.logList)
     },
     open (title, info) {
       this.title = title
       this.visible = true
       this.form = info || {}
-      this.loadInfo()
       this.logList = []
       this.checkForm = {
         id: info.id,
@@ -204,6 +225,7 @@
         payBank: '',
         payFileList: []
       }
+      this.loadInfo()
     }
   }
 }

--
Gitblit v1.9.3