Răsfoiți Sursa

提现操作按钮权限增加

zuypeng 1 an în urmă
părinte
comite
2dd0a688de
1 a modificat fișierele cu 11 adăugiri și 3 ștergeri
  1. 11 3
      admin-web/src/views/admin/finance/withdraw.vue

+ 11 - 3
admin-web/src/views/admin/finance/withdraw.vue

@@ -105,8 +105,8 @@
               {{ u.fmt.fmtDateTime(row[field.prop]) }}
             </template>
             <template v-else-if="field.prop==='action'">
-              <el-button v-auth="'withdrawnRecord.modify'" type="warning" size="small" text @click="handleWithdrawAudit(row)"> 提现审核</el-button>
-              <el-button v-auth="'withdrawnRecord.modify'" type="danger" size="small" text @click="handleWithdrawConfirm(row)"> 打款确认</el-button>
+              <el-button v-auth="'withdrawnRecord.modify'" v-if="row.status==0" type="warning" size="small" text @click="handleWithdrawAudit(row)"> 提现审核</el-button>
+              <el-button v-auth="'withdrawnRecord.modify'" v-if="row.paymentStatus==0" type="danger" size="small" text @click="handleWithdrawConfirm(row)"> 打款确认</el-button>
             </template>
             <template v-else>
               <div>{{ row[field.prop] }}</div>
@@ -240,16 +240,24 @@ const handleRowDelete = (row: any) => {
 
 
 const handleWithdrawAudit = (withdraw:any) => {
+  Msg.showLoading('操作中')
   $body(`finance/reviewWithdrawn`,{id:withdraw.id,status:1}).then(res=>{
     Msg.message(`提现审核通过`)
+    Msg.hideLoading();
     loadData(true)
+  }).catch(()=>{
+    Msg.hideLoading();
   })
 }
 
 const handleWithdrawConfirm = (withdraw:any) => {
+  Msg.showLoading('操作中')
   $body(`finance/confirmWithdrawnPayment`,{id:withdraw.id,paymentStatus:1}).then(res=>{
-    Msg.message(`提现审核通过`)
+    Msg.message(`提现打款已确认`)
+    Msg.hideLoading();
     loadData(true)
+  }).catch(()=>{
+    Msg.hideLoading();
   })
 }