Explorar el Código

fix(bugs): 子账号

tangning hace 3 años
padre
commit
7d35e49143
Se han modificado 1 ficheros con 12 adiciones y 1 borrados
  1. 12 1
      src/views/corporation/SubaccountModal.vue

+ 12 - 1
src/views/corporation/SubaccountModal.vue

@@ -350,7 +350,6 @@
         validateFields(['lookNum', 'shotNum']);
       }
       async function handleDelete(item, type) {
-        console.log('handleDelete', item, type);
         if (type == 'edit') {
           //编辑
           const { memoName, phone } = item;
@@ -359,7 +358,17 @@
             phone,
           });
         } else {
+          let { lookNum, shotNum } = minNumber;
+          // minNumber.shotNum = shotNum;
           //解除
+          if (item.roleId == 8) {
+            lookNum--;
+            shotNum--;
+          } else if (item.roleId == 81) {
+            lookNum--;
+          } else if (item.roleId == 82) {
+            shotNum--;
+          }
           createConfirm({
             iconType: 'warning',
             title: '提示',
@@ -367,6 +376,8 @@
             onOk: async () => {
               // tableRef.value.deleteTableDataRecord(item.id);
               deleteTableDataRecord(item.userName);
+              minNumber.lookNum = lookNum;
+              minNumber.shotNum = shotNum;
             },
           });
         }