Pārlūkot izejas kodu

开放最底层和密码可重复

laiguoran 4 gadi atpakaļ
vecāks
revīzija
869c5216ef
1 mainītis faili ar 24 papildinājumiem un 23 dzēšanām
  1. 24 23
      app/public/js/shenpi.js

+ 24 - 23
app/public/js/shenpi.js

@@ -754,14 +754,14 @@ $(document).ready(function () {
                     ledgerSpreadObj.setFontColor(info.row);
                     return;
                 }
-                const num = _.filter(ledger_cooperation_list, { pwd: validText, status: 1, user_id });
-                console.log(num, ledger_cooperation_list);
-                if(num.length > 0) {
-                    toastr.error('同一个审批人密码不能相同');
-                    SpreadJsObj.reLoadRowData(info.sheet, info.row);
-                    ledgerSpreadObj.setFontColor(info.row);
-                    return;
-                }
+                // const num = _.filter(ledger_cooperation_list, { pwd: validText, status: 1, user_id });
+                // console.log(num, ledger_cooperation_list);
+                // if(num.length > 0) {
+                //     toastr.error('同一个审批人密码不能相同');
+                //     SpreadJsObj.reLoadRowData(info.sheet, info.row);
+                //     ledgerSpreadObj.setFontColor(info.row);
+                //     return;
+                // }
                 select.pwd = validText;
                 const data = {
                     type: 'pwd',
@@ -931,11 +931,11 @@ $(document).ready(function () {
             $(this).parents('td').html(html);
             return;
         }
-        const num = _.filter(ledger_cooperation_list, { pwd: validText, status: 1, user_id });
-        if(num.length > 0) {
-            toastr.error('同一个审批人密码不能相同');
-            return;
-        }
+        // const num = _.filter(ledger_cooperation_list, { pwd: validText, status: 1, user_id });
+        // if(num.length > 0) {
+        //     toastr.error('同一个审批人密码不能相同');
+        //     return;
+        // }
         const data = {
             type: 'pwd',
             ledger_id,
@@ -1007,10 +1007,11 @@ function setRightData(datas, coolist) {
     const newdatas = [];
     const reg = /(^GD([0-9\-]+))|(^([0-9\-]+)$)/;
     for (const l of datas) {
-        if (reg.test(l.code) && l.level <= 4) {
-            if(l.level === 4 && l.is_leaf === false) {
-                l.is_leaf = true;
-            }
+        // if (reg.test(l.code) && l.level <= 4) {
+        if (reg.test(l.code)) {
+            // if(l.level === 4 && l.is_leaf === false) {
+            //     l.is_leaf = true;
+            // }
             const coo = _.find(coolist, { 'ledger_id': l.ledger_id, 'user_id': cur_uid });
             if(coo) {
                 l.pwd = coo.pwd;
@@ -1019,12 +1020,12 @@ function setRightData(datas, coolist) {
             newdatas.push(l);
         }
     }
-    for (const nd of newdatas) {
-        const child = _.find(newdatas, { 'ledger_pid': nd.ledger_id });
-        if (!child && !nd.is_leaf) {
-            nd.is_leaf = true;
-        }
-    }
+    // for (const nd of newdatas) {
+    //     const child = _.find(newdatas, { 'ledger_pid': nd.ledger_id });
+    //     if (!child && !nd.is_leaf) {
+    //         nd.is_leaf = true;
+    //     }
+    // }
     return newdatas;
 }
 function updateByCanEdit(datas, coolist, flag) {