Explorar o código

密码是否相同判断

laiguoran %!s(int64=4) %!d(string=hai) anos
pai
achega
414613740e
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      app/public/js/shenpi.js

+ 12 - 0
app/public/js/shenpi.js

@@ -737,6 +737,13 @@ $(document).ready(function () {
                     ledgerSpreadObj.setFontColor(info.row);
                     return;
                 }
+                const num = _.filter(ledger_cooperation_list, { pwd: validText, status: 1, user_id });
+                if(num.length > 0) {
+                    toastr.error('同一个审批人密码不能相同');
+                    SpreadJsObj.reLoadRowData(info.sheet, info.row);
+                    ledgerSpreadObj.setFontColor(info.row);
+                    return;
+                }
                 select.pwd = validText;
                 const data = {
                     type: 'pwd',
@@ -888,6 +895,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 data = {
             type: 'pwd',
             ledger_id,