Explorar o código

1.批复编号判断再次提交
2.手机号验证判断取消

laiguoran %!s(int64=5) %!d(string=hai) anos
pai
achega
1a9c28a3b4
Modificáronse 2 ficheiros con 4 adicións e 10 borrados
  1. 0 6
      app/public/js/setting.js
  2. 4 4
      app/service/change.js

+ 0 - 6
app/public/js/setting.js

@@ -171,9 +171,6 @@ function checkUserForm(status) {
             if ($('#add-user input[name="role"]').val() == '') {
                 throw '职位名称不能为空';
             }
-            if ($('#add-user input[name="mobile"]').val() == '') {
-                throw '手机号不能为空';
-            }
         } else {
             if ($('#edit-user select[name="account_group"]').val() == 0) {
                 throw '请选择账号组';
@@ -190,9 +187,6 @@ function checkUserForm(status) {
             if ($('#edit-user input[name="role"]').val() == '') {
                 throw '职位名称不能为空';
             }
-            if ($('#edit-user input[name="mobile"]').val() == '') {
-                throw '手机号不能为空';
-            }
         }
     } catch (err) {
         toastr.error(err);

+ 4 - 4
app/service/change.js

@@ -77,8 +77,8 @@ module.exports = app => {
         }
 
         async add(tenderId, userId, code, name) {
-            const sql = 'SELECT COUNT(*) as count FROM ?? WHERE `tid` = ? AND (`code` = ? OR `p_code` = ?)';
-            const sqlParam = [this.tableName, tenderId, code, code];
+            const sql = 'SELECT COUNT(*) as count FROM ?? WHERE `tid` = ? AND ((`code` = ? AND `status` != ?) OR (`p_code` = ? AND `status` = ?))';
+            const sqlParam = [this.tableName, tenderId, code, audit.flow.status.checked, code, audit.flow.status.checked];
             const codeCount = await this.db.queryOne(sql, sqlParam);
             const count = codeCount.count;
             if (count > 0) {
@@ -1015,8 +1015,8 @@ module.exports = app => {
          * @returns {Promise<void>}
          */
         async isRepeat(cid, code, tid) {
-            const sql = 'SELECT COUNT(*) as count FROM ?? WHERE (`code` = ? OR `p_code` = ?) AND `cid` != ? AND `tid` = ?';
-            const sqlParam = [this.tableName, code, code, cid, tid];
+            const sql = 'SELECT COUNT(*) as count FROM ?? WHERE ((`code` = ? AND `status` != ?)) OR (`p_code` = ? AND `status` = ?)) AND `cid` != ? AND `tid` = ?';
+            const sqlParam = [this.tableName, code, audit.flow.status.checked, code, audit.flow.status.checked, cid, tid];
             const result = await this.db.queryOne(sql, sqlParam);
             return result.count !== 0;
         }