lazy 2 місяців тому
батько
коміт
231cbf0e63

+ 9 - 0
src/api/accountCenter/openInfoManage.js

@@ -35,3 +35,12 @@ export function getFailList(params) {
     params
   })
 }
+
+// 重获取授权二维码
+export function reGetAuthQrcode(params) {
+  return request({
+    url: '/bocom/register/resetUrlAuthorized',
+    method: 'get',
+    params
+  })
+}

+ 2 - 2
src/views/accountCenter/cyAccountManage/components/AccountOtherStatus.vue

@@ -45,13 +45,13 @@
         />
       </el-form-item>
 
-      <el-form-item label="激活状态">
+      <!-- <el-form-item label="激活状态">
         <el-input
           v-model="ruleForm.atvSts"
           placeholder="请输入激活状态"
           disabled
         />
-      </el-form-item>
+      </el-form-item> -->
     </el-form>
   </div>
 </template>

+ 3 - 3
src/views/accountCenter/cyAccountManage/components/BindCard.vue

@@ -205,7 +205,7 @@ export default {
           showTooltip: true,
           render: (h, row) => {
             return (
-              <div>{ row.bindAcctTp && row.bindAcctTp === 0 ? '对公' : '个人' }</div>
+              <div>{ row.bindAcctTp !== null && row.bindAcctTp === 0 ? '对公' : '个人' }</div>
             )
           }
         },
@@ -417,8 +417,8 @@ export default {
       }
     },
     deleteCard(row) {
-      if (!this.isDelInToday(row.moneyConfirmStartTime)) {
-        this.$message.warning('实体卡激活当日不允许删除')
+      if (row.moneyConfirmTime && !this.isDelInToday(row.moneyConfirmTime)) {
+        this.$message.warning('入金激活后24小时内不能删除绑定的实体卡')
         return
       }
       this.$confirm('您将删除该绑定实体卡,删除后无法恢复。请确认是否继续?', '删除绑定实体卡', {

+ 5 - 5
src/views/accountCenter/cyAccountManage/mainContent.vue

@@ -214,7 +214,7 @@ export default {
         {
           label: '提示',
           render: (h, row) => {
-            if (row.accountStatusReal === '生效') {
+            if (row.accountStatus === 1) {
               if (row.authorizationStatus === 1 && row.legalAuthorizationStatus === 1) {
                 return <div>请联系客服</div>
               }
@@ -336,7 +336,7 @@ export default {
           return false
         }
         if (category === 'authorization') {
-          if (row.accountStatusReal === '生效') {
+          if (row.accountStatus === 1) {
             if (row.authorizationStatus === 0 && row.legalAuthorizationStatus === 0) {
               return true
             }
@@ -435,8 +435,8 @@ export default {
           params: { id: '3123123' }
         })
       } else if (type === 'number') {
-        if (row.chdbokSts !== '1') {
-          this.$message.warning('该登记薄不是可收可付状态,暂时无法绑卡')
+        if (row.accountStatusReal !== '生效') {
+          this.$message.warning('该登记薄不是可收可付状态,暂时无法查看')
           return
         }
         // 付款方数量
@@ -522,7 +522,7 @@ export default {
     },
     // 去绑卡页面
     goBindCardPage(row) {
-      if (row.chdbokSts !== '1') {
+      if (row.accountStatusReal !== '生效') {
         this.$message.warning('该登记薄不是可收可付状态,暂时无法绑卡')
         return
       }

+ 1 - 1
src/views/accountCenter/openInfoManage/mainContent.vue

@@ -31,8 +31,8 @@
       <div class="submit-btn">
         <el-button @click="() => { this.$refs.failreasonDialog.show = false }">取消</el-button>
       </div>
-      <authorization ref="authorizationRef" :active-info="authActiveInfo" :fresh-page="true" />
     </cy-dialog>
+    <authorization ref="authorizationRef" :active-info="authActiveInfo" :fresh-page="true" />
   </div>
 </template>
 

+ 29 - 9
src/views/accountCenter/openInfoManage/mainContentTable.js

@@ -1,5 +1,5 @@
 // import { formatMoney } from '@/utils/index'
-import { getFailList } from '@/api/accountCenter/openInfoManage'
+import { getFailList, reGetAuthQrcode } from '@/api/accountCenter/openInfoManage'
 export default {
   data() {
     return {
@@ -130,7 +130,8 @@ export default {
         prop: 'reason',
         showTooltip: true
       }],
-      reasonList: []
+      reasonList: [],
+      timeReduce: 48 * 60 * 60 * 1000
     }
   },
   computed: {
@@ -139,7 +140,7 @@ export default {
         const { rowPower } = item
         if (rowPower) {
           if (item.category === 'auth') {
-            return row.customerStatus === '生效' && rowPower.includes(row.userAtuhSts)
+            return row.qrCode && row.customerStatus === '生效' && rowPower.includes(row.userAtuhSts)
           } else if (item.category === 'reason') {
             return rowPower.includes(row.customerStatus)
           } else {
@@ -164,12 +165,19 @@ export default {
           }
         })
       } else if (type === 'auth') {
-        // 授权逻辑
-        this.$refs.authorizationRef.openDialog(true)
-        this.authActiveInfo = {
-          name: this.companyList[row.parentIdx].authenticator,
-          qrcodeUrl: row.qrCode,
-          effectTime: row.qrCodeEffectTime
+        // 去授权 -- 这里做一个判断,如果二维码认证时间过期 需要重新调用生成二维码接口
+        const nowTimeTemp = new Date().getTime()
+        const qrCodeValidTime = new Date(row.qrCodeEffectTime).getTime() + this.timeReduce
+
+        if (qrCodeValidTime - nowTimeTemp <= 0) {
+          this.resetQrCodeUri(row)
+        } else {
+          this.authActiveInfo = {
+            name: row.authenticator,
+            qrcodeUrl: row.qrCode,
+            effectTime: row.qrCodeEffectTime
+          }
+          this.$refs.authorizationRef.openDialog(true)
         }
       } else if (type === 'reason') {
         // 核验失败原因
@@ -182,6 +190,18 @@ export default {
           })
         })
       }
+    },
+    async resetQrCodeUri(curRow) {
+      const res = await reGetAuthQrcode({ id: curRow.id })
+
+      if (res.success) {
+        this.authActiveInfo = {
+          name: res.data.authenticator,
+          qrcodeUrl: res.data.qrCode,
+          effectTime: res.data.qrCodeEffectTime
+        }
+        this.$refs.authorizationRef.openDialog(true)
+      }
     }
   }
 }