Browse Source

密码是否相同判断

laiguoran 4 năm trước cách đây
mục cha
commit
414613740e
1 tập tin đã thay đổi với 12 bổ sung0 xóa
  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,