Quellcode durchsuchen

fix:交行测试遗留问题修改

lazy vor 2 Monaten
Ursprung
Commit
21490d6783

+ 2 - 6
src/views/accountCenter/components/Empty.vue

@@ -48,7 +48,7 @@ export default {
   },
   data() {
     return {
-      authActiveInfo: {}
+      authActiveInfo: []
     }
   },
   methods: {
@@ -81,11 +81,7 @@ export default {
       console.log('addMemberRegister----', res)
 
       if (res.success && res.data && res.data.authorizationStatus !== 4) {
-        this.authActiveInfo = {
-          name: res.data.authenticator,
-          qrcodeUrl: res.data.qrCode,
-          effectTime: res.data.qrCodeEffectTime
-        }
+        this.authActiveInfo = res.data.noticeInfoList
         // 回调触发微信授权
         this.$refs.authorizationRef.openDialog(true)
       }

+ 2 - 6
src/views/accountCenter/cyAccountManage/accountAdd.vue

@@ -32,7 +32,7 @@ export default {
 
   data() {
     return {
-      authActiveInfo: {}
+      authActiveInfo: []
     }
   },
   methods: {
@@ -61,11 +61,7 @@ export default {
       console.log('addMemberRegister----', res)
 
       if (res.success && res.data && res.data.authorizationStatus !== 4) {
-        this.authActiveInfo = {
-          name: res.data.authenticator,
-          qrcodeUrl: res.data.qrCode,
-          effectTime: res.data.qrCodeEffectTime
-        }
+        this.authActiveInfo = res.data.noticeInfoList
         // 回调触发微信授权
         this.$refs.authorizationRef.openDialog(true)
       }

+ 77 - 69
src/views/accountCenter/cyAccountManage/components/Authorization.vue

@@ -1,31 +1,33 @@
 <template>
   <div class="authorization">
-    <cy-dialog ref="dialog" title="微信扫码认证" width="600px" top="8vh" @close="openDialog(false)">
-      <div class="wetcat-content">
-        <img :src="qrcodeUrl" class="img-box" />
-        <div class="tips">需要:<span style="color: #FE7D0B">{{ activeName }}</span>,使用<span style="color: #FE7D0B">微信</span>扫描二维码进行认证</div>
-        <div class="tips">注意:请在<span style="color: #FE7D0B">{{ defaultAcitveTime }}小时</span>内完成授权操作</div>
-        <div class="btn" @click="openDialog(false)">
-          <div>我知道了</div>
-          <div v-if="hideCuntdown" class="count-down">
-            (<div><span>倒计时:</span></div>
-            <div>
-              <count-down
-                :current-time="countDownStart"
-                :start-time="countDownStart"
-                :end-time="countDownEnd"
-                :tip-text="'距离开始文字1'"
-                :tip-text-end="'距离结束文字1'"
-                :end-text="'结束自定义文字2'"
-                :day-txt="'天'"
-                :hour-txt="'小时'"
-                :minutes-txt="'分钟'"
-                :seconds-txt="'秒'"
-                @start_callback="startCall"
-                @end_callback="endCall"
-              />
-            </div>)
-          </div>
+    <cy-dialog ref="dialog" title="微信扫码认证" :width="activeInfo.length > 1 ? '70%' : '600px'" top="8vh" @close="openDialog(false)">
+      <div class="wechat-content">
+        <div v-for="item in activeInfo" :key="item.id">
+          <img :src="item.fullQrcodeUrl" class="img-box" />
+          <div class="tips" :style="activeInfo.length > 1 ? 'text-align: center' : ''">需要:<span style="color: #FE7D0B">{{ item.authenticator }}</span>,使用<span style="color: #FE7D0B">微信</span>扫描二维码进行认证</div>
+          <div class="tips" :style="activeInfo.length > 1 ? 'text-align: center' : ''">注意:请在<span style="color: #FE7D0B">{{ defaultAcitveTime }}小时</span>内完成授权操作</div>
+        </div>
+      </div>
+      <div class="btn" @click="openDialog(false)">
+        <div>我知道了</div>
+        <div v-if="hideCuntdown" class="count-down">
+          (<div><span>倒计时:</span></div>
+          <div>
+            <count-down
+              :current-time="countDownStart"
+              :start-time="countDownStart"
+              :end-time="countDownEnd"
+              :tip-text="'距离开始文字1'"
+              :tip-text-end="'距离结束文字1'"
+              :end-text="'结束自定义文字2'"
+              :day-txt="'天'"
+              :hour-txt="'小时'"
+              :minutes-txt="'分钟'"
+              :seconds-txt="'秒'"
+              @start_callback="startCall"
+              @end_callback="endCall"
+            />
+          </div>)
         </div>
       </div>
     </cy-dialog>
@@ -45,8 +47,8 @@ export default {
       default: ''
     },
     activeInfo: {
-      type: Object,
-      default: () => {}
+      type: Array,
+      default: () => []
     },
     goList: {
       type: Boolean,
@@ -63,9 +65,7 @@ export default {
       countDownNow: new Date().getTime(),
       countDownStart: 0,
       countDownEnd: 0,
-      activeName: '',
       defaultAcitveTime: 48,
-      qrcodeUrl: '',
       hideCuntdown: true
     }
   },
@@ -73,27 +73,32 @@ export default {
     activeInfo: {
       handler(val) {
         console.log('activeInfo-----', val)
-        if (val && Object.keys(val).length) {
+        if (val && val.length) {
           this.hideCuntdown = true
 
-          this.payTime = this.calcTimes(val.effectTime)
+          this.payTime = this.calcTimes(val[0].qrCodeEffectTime)
           this.countDownEnd = new Date(this.payTime).getTime() || 0
-          this.countDownStart = new Date().getTime()
+          if (this.countDownEnd - new Date().getTime() > this.timeReduce) {
+            this.countDownStart = this.countDownEnd - this.timeReduce
+          } else {
+            this.countDownStart = new Date().getTime()
+          }
 
-          this.activeName = val.name
+          val.forEach((el) => {
+            if (el.qrCode !== null && el.qrCode !== '') {
+              const base64Prifix = 'data:image/png;base64,'
+              let tempQrcodeUrl = ''
 
-          if (val.qrcodeUrl !== null && val.qrcodeUrl !== '') {
-            const base64Prifix = 'data:image/png;base64,'
-            let tempQrcodeUrl = ''
-            if (val.qrcodeUrl.indexOf(base64Prifix) > -1) {
-              tempQrcodeUrl = val.qrcodeUrl
-            } else {
-              tempQrcodeUrl = base64Prifix + val.qrcodeUrl
-            }
-            const url = URL.createObjectURL(this.base64ToBlob(tempQrcodeUrl))
+              if (el.qrCode.indexOf(base64Prifix) > -1) {
+                tempQrcodeUrl = val.qrCode
+              } else {
+                tempQrcodeUrl = base64Prifix + el.qrCode
+              }
+              const url = URL.createObjectURL(this.base64ToBlob(tempQrcodeUrl))
 
-            this.qrcodeUrl = url
-          }
+              el.fullQrcodeUrl = url
+            }
+          })
         }
       }
     }
@@ -112,8 +117,8 @@ export default {
         this.$router.go(0)
       }
 
-      if (status && this.activeInfo && this.activeInfo.effectTime) {
-        this.payTime = this.calcTimes(this.activeInfo.effectTime)
+      if (status && this.activeInfo && this.activeInfo.length) {
+        this.payTime = this.calcTimes(this.activeInfo[0].qrCodeEffectTime)
         this.countDownEnd = new Date(this.payTime).getTime() || 0
         this.countDownStart = new Date().getTime()
       }
@@ -152,8 +157,10 @@ export default {
 
 <style lang="scss" scoped>
 .authorization {
-  .wetcat-content {
-    padding: 40px 100px;
+  .wechat-content {
+    display: flex;
+    justify-content: space-around;
+    padding: 40px 60px;
     .img-box {
       width: 360px;
       height: 360px;
@@ -166,28 +173,29 @@ export default {
       font-size: 16px;
       line-height: 30px;
     }
-    .btn {
+
+  }
+  .btn {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    background: #FE7D0B;
+    border-radius: 30px;
+    padding: 6px;
+    color: #fff;
+    text-align: center;
+    font-size: 12px;
+    max-width: 360px;
+    height: 46px;
+    margin: 0 auto;
+    margin-top: 30px !important;
+    cursor: pointer;
+    .count-down {
+      // margin-top: 5px;
+      // height: 20px;
       display: flex;
-      justify-content: center;
       align-items: center;
-      background: #FE7D0B;
-      border-radius: 30px;
-      padding: 6px;
-      color: #fff;
-      text-align: center;
-      font-size: 12px;
-      max-width: 360px;
-      height: 46px;
-      margin: 0 auto;
-      margin-top: 30px;
-      cursor: pointer;
-      .count-down {
-        // margin-top: 5px;
-        // height: 20px;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-      }
+      justify-content: center;
     }
   }
 }

+ 22 - 0
src/views/accountCenter/cyAccountManage/components/BindCard.vue

@@ -188,6 +188,10 @@ export default {
     disabled: {
       type: Boolean,
       default: false
+    },
+    responsible: {
+      type: String,
+      default: ''
     }
   },
   data() {
@@ -406,6 +410,24 @@ export default {
         }
       })
     },
+    // 是否位交行change
+    isBankChange(val) {
+      if (val === 0) {
+        this.cardForm.bindAcctTp = 0
+      }
+      // 不是交行且账户类型是个体工商户的且账户类型是个人的时候账户名称禁用且默认填充负责人字段
+      if (val === 1 && this.customerType === 1 && this.cardForm.bindAcctTp === 1) {
+        this.cardForm.bindAcctNoAcctNme = this.responsible
+      }
+    },
+    // 不是交行的账户类型change
+    bindAcctTpChange(val) {
+      if (val === 1 && this.customerType === 1) {
+        this.cardForm.bindAcctNoAcctNme = this.responsible
+      } else {
+        this.cardForm.bindAcctNoAcctNme = ''
+      }
+    },
     optionsClick(type, row) {
       if (type === 'activation') {
         this.curActiveRow = row

+ 53 - 26
src/views/accountCenter/cyAccountManage/mainContent.vue

@@ -2,6 +2,32 @@
   <div class="main-content">
     <div v-for="(item, index) in companyList" :key="index">
       <div v-if="item.vipAccountBasicInfoList && item.vipAccountBasicInfoList.length === 0 && item.customerStatus === '生效'" class="company-box-cont">
+        <div class="company-box">
+          <div class="company-title">
+            <div>
+              <div class="supplier">供应商企业名称</div>
+              <div class="supplier-name">{{ item.customerName }}</div>
+            </div>
+            <div class="supplier-operation">
+              <div>客户状态: {{ item.customerStatus }}</div>
+            </div>
+          </div>
+          <div
+            class="normal"
+            style="display: flex; justify-content: space-between"
+          >
+            <div>客户号{{ item.customerNumber }}</div>
+            <!-- v-tooltip="addAccountTip" -->
+            <!-- <div>
+              <el-button
+                v-if="item.addVipAccount === 1"
+                :id="`new-account-${index}`"
+                type="primary"
+                @click="openActivation(item.bocomBasicInfoId)"
+              >新建账户</el-button>
+            </div> -->
+          </div>
+        </div>
         <empty
           v-if="item.customerStatus === '生效'"
           type="cyAccountManage"
@@ -271,13 +297,13 @@ export default {
                 msg: '修改绑卡信息',
                 icon: 'iconfont icon-orange icon-a-Group8151',
                 power: '',
-                category: 'number'
+                category: 'seeBindCard'
               },
               {
-                msg: '查看绑卡信息',
-                icon: 'iconfont icon-orange icon-a-Group8141',
+                msg: '修改付款方信息',
+                icon: 'iconfont icon-orange icon-a-Group8151',
                 power: '',
-                category: 'seeBindCard'
+                category: 'number'
               }
               // {
               //   msg: '账单流水',
@@ -311,7 +337,7 @@ export default {
           width: 240
         }
       ],
-      authActiveInfo: {}, // 待授权弹窗组件入参
+      authActiveInfo: [], // 待授权弹窗组件入参
       curActiveRow: {}, // 入金激活组件入参
       activeAccountName: '',
       activeAccountNumber: '',
@@ -425,7 +451,7 @@ export default {
       } else if (type === 'physicalAccount') {
         // 查看实体账户
         this.$router.push({
-          name: 'CyAccountaccountBind',
+          name: 'CyAccountaccountSee',
           query: { type: 'bindCard', id: row.id }
         })
       } else if (type === 'flowingWater') {
@@ -449,29 +475,28 @@ export default {
           }
         })
       } else if (type === 'authorization') {
+        if (row.noticeInfoList.length === 0) {
+          this.$message.warning('授权信息有误,请重试')
+          return
+        }
         // 去授权 -- 这里做一个判断,如果二维码认证时间过期 需要重新调用生成二维码接口
         const nowTimeTemp = new Date().getTime()
-        const qrCodeValidTime = new Date(row.qrCodeEffectTime).getTime() + this.timeReduce
+        const qrCodeValidTime = new Date(row.noticeInfoList[0].qrCodeEffectTime).getTime() + this.timeReduce
 
         if (qrCodeValidTime - nowTimeTemp <= 0) {
           this.resetQrCodeUri(row)
         } else {
           this.$refs.authorizationRef.openDialog(true)
-          // authenticator
-          console.log(row)
-          this.authActiveInfo = {
-            name: this.companyList[row.parentIdx].authenticator,
-            qrcodeUrl: row.qrCode,
-            effectTime: row.qrCodeEffectTime
-          }
+
+          this.authActiveInfo = row.noticeInfoList
         }
       } else if (type === 'refreshRegister') {
         this.refreshRegister(row)
       } else if (type === 'seeBindCard') {
         this.$router.push({
-          name: 'CyAccountaccountSee',
+          name: 'CyAccountaccountBind',
           query: {
-            type: 'see',
+            type: 'edit',
             id: row.id
           }
         })
@@ -488,26 +513,28 @@ export default {
       console.log('addMemberRegister----', res)
 
       if (res.success && res.data && res.data.authorizationStatus !== 4) {
-        this.authActiveInfo = {
-          name: res.data.authenticator,
-          qrcodeUrl: res.data.qrCode,
-          effectTime: res.data.qrCodeEffectTime
-        }
+        this.authActiveInfo = res.data.noticeInfoList
         // 回调触发微信授权
         this.$refs.authorizationRef.openDialog(true)
       }
     },
     // 重置授权二维码
     async resetQrCodeUri(curRow) {
+      this.authActiveInfo = []
       const res = await resetAuthCode({ id: curRow.id })
 
       if (res.success) {
-        this.authActiveInfo = {
-          name: this.companyList[curRow.parentIdx].authenticator,
-          qrcodeUrl: res.data.qrCode,
-          effectTime: res.data.qrCodeEffectTime
+        if ('noticeInfoList' in res.data) {
+          this.authActiveInfo = res.data.noticeInfoList
+        } else if (Array.isArray(res.data)) {
+          this.authActiveInfo = res.data
+        } else {
+          this.authActiveInfo.push({
+            qrCodeEffectTime: res.data.qrCodeEffectTime,
+            qrCode: res.data.qrCode,
+            authenticator: res.data.authenticator
+          })
         }
-
         this.$refs.authorizationRef.openDialog(true)
       }
     },

+ 6 - 2
src/views/accountCenter/cyAccountManage/updateBind.vue

@@ -36,6 +36,7 @@
       :account-number="accountNumber"
       :operate-id="operateId"
       :basic-info-id="basicInfoId"
+      :responsible="responsible"
     />
     <div class="submit-btn">
       <el-button
@@ -66,7 +67,8 @@ export default {
       accountName: '', // 登记薄上的账户名称
       accountNumber: '', // 登记薄上的账号
       operateId: '', // 主列表id
-      basicInfoId: '' // 客户id
+      basicInfoId: '', // 客户id
+      responsible: '' // 负责人姓名
     }
   },
   mounted() {
@@ -82,7 +84,8 @@ export default {
         accountName,
         accountNumber,
         bindAccountInfoList,
-        customerType
+        customerType,
+        responsible
       } = res.data
       if (bindAccountInfoList && bindAccountInfoList.length) {
         this.detailsInfo = bindAccountInfoList
@@ -92,6 +95,7 @@ export default {
       this.ruleForm.accountName = accountName || ''
       this.ruleForm.accountNumber = accountNumber || ''
       this.customerType = customerType
+      this.responsible = responsible
       this.accountName = accountName
       this.accountNumber = accountNumber
       this.operateId = res.data.id

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

@@ -50,7 +50,7 @@ export default {
     return {
       tableData: [],
       loading: false,
-      authActiveInfo: {}
+      authActiveInfo: []
     }
   },
   created() {

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

@@ -165,6 +165,7 @@ export default {
           }
         })
       } else if (type === 'auth') {
+        this.authActiveInfo = []
         // 去授权 -- 这里做一个判断,如果二维码认证时间过期 需要重新调用生成二维码接口
         const nowTimeTemp = new Date().getTime()
         const qrCodeValidTime = new Date(row.qrCodeEffectTime).getTime() + this.timeReduce
@@ -172,11 +173,12 @@ export default {
         if (qrCodeValidTime - nowTimeTemp <= 0) {
           this.resetQrCodeUri(row)
         } else {
-          this.authActiveInfo = {
-            name: row.authenticator,
-            qrcodeUrl: row.qrCode,
-            effectTime: row.qrCodeEffectTime
-          }
+          this.authActiveInfo.push({
+            qrCodeEffectTime: row.qrCodeEffectTime,
+            qrCode: row.qrCode,
+            authenticator: row.authenticator
+          })
+          console.log(this.authActiveInfo, 7777)
           this.$refs.authorizationRef.openDialog(true)
         }
       } else if (type === 'reason') {
@@ -192,13 +194,20 @@ export default {
       }
     },
     async resetQrCodeUri(curRow) {
+      this.authActiveInfo = []
       const res = await reGetAuthQrcode({ id: curRow.id })
 
       if (res.success) {
-        this.authActiveInfo = {
-          name: res.data.authenticator,
-          qrcodeUrl: res.data.qrCode,
-          effectTime: res.data.qrCodeEffectTime
+        if ('noticeInfoList' in res.data) {
+          this.authActiveInfo = res.data.noticeInfoList
+        } else if (Array.isArray(res.data)) {
+          this.authActiveInfo = res.data
+        } else {
+          this.authActiveInfo.push({
+            qrCodeEffectTime: res.data.qrCodeEffectTime,
+            qrCode: res.data.qrCode,
+            authenticator: res.data.authenticator
+          })
         }
         this.$refs.authorizationRef.openDialog(true)
       }