'use strict'; /** * * * @author Mai * @date 2019/2/27 * @version */ // 检查上报情况 function checkAuditorFrom () { if ($('#auditors li').length === 0) { if(shenpi_status === shenpiConst.sp_status.gdspl) { toastr.error('请联系管理员添加审批人'); } else { toastr.error('请先选择审批人,再上报数据'); } return false; } $('#hide-all').show(); return true; } // 点击验证码 function codeSuccess(btn) { let counter = 60; btn.addClass('disabled').text('重新获取 ' + counter + 'S'); btn.parent().siblings('input').removeAttr('readonly').attr('placeholder', '输入短信中的6位验证码'); const bindBtn = $("#bind-btn"); bindBtn.removeClass('btn-secondary disabled').addClass('btn-primary'); const countDown = setInterval(function() { const countString = counter - 1 <= 0 ? '' : ' ' + (counter - 1) + 'S'; // 倒数结束后 if (countString === '') { clearInterval(countDown); btn.removeClass('disabled'); } const text = '重新获取' + countString; btn.text(text); counter -= 1; }, 1000); } $(document).ready(function () { let timer = null; let oldSearchVal = null; // 搜索审批人 $('#gr-search').bind('input propertychange', function(e) { oldSearchVal = e.target.value; timer && clearTimeout(timer); timer = setTimeout(() => { const newVal = $('#gr-search').val(); let html = ''; if (newVal && newVal === oldSearchVal) { accountList.filter(item => item && settle !== item.id && (item.name.indexOf(newVal) !== -1 || (item.mobile && item.mobile.indexOf(newVal) !== -1))).forEach(item => { html += `
${item.name}
${item.name}${item.mobile || ''}
${item.role || ''}${item.name}${item.mobile || ''}
${item.role || ''}${item.name}${item.mobile || ''}
${item.role || ''}' + item.name + '' + item.mobile + '
\n' + ' ' + item.role + '\n' + '