From 1b201ef1ff8a098b6c2fa31d89e7c53650012af9 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期一, 04 八月 2025 17:31:45 +0800 Subject: [PATCH] 1 --- src/main/webapp/static/js/review/review.js | 304 +++++++++++++++++++++++++++++-------------------- 1 files changed, 179 insertions(+), 125 deletions(-) diff --git a/src/main/webapp/static/js/review/review.js b/src/main/webapp/static/js/review/review.js index 34e90b9..cd2d075 100644 --- a/src/main/webapp/static/js/review/review.js +++ b/src/main/webapp/static/js/review/review.js @@ -4,7 +4,7 @@ base: baseUrl + "/static/layui/lay/modules/" }).extend({ notice: 'notice/notice', -}).use(['layer', 'form', 'table','upload','element', 'util', 'admin', 'xmSelect', 'laydate', 'tableMerge', 'notice'], function () { +}).use(['layer', 'form', 'table', 'upload', 'element', 'util', 'admin', 'xmSelect', 'laydate', 'tableMerge', 'notice'], function () { var $ = layui.jquery; var layer = layui.layer; var form = layui.form; @@ -20,21 +20,21 @@ var element = layui.element; - // 娓叉煋琛ㄦ牸 var insTb = table.render({ elem: '#order', - url: baseUrl+'/review/head/page/auth', + url: baseUrl + '/review/head/page/auth', headers: {token: localStorage.getItem('token')}, page: true, cellMinWidth: 100, + toolbar: '#toolbar', cols: [[ - {type: 'numbers'}, + {type: 'checkbox', fixed: 'left'}, {field: 'orderNo', title: '鍗曟嵁缂栧彿'}, - {field: 'cstmrName', align: 'center',title: '瀹㈡埛鍚嶇О'}, + {field: 'cstmrName', align: 'center', title: '瀹㈡埛鍚嶇О'}, {align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 250, width: 250}, {field: 'createTime$', title: '鍒涘缓鏃堕棿', minWidth: 200, width: 200}, - {field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160}, + {field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160}, //{field: 'memo', align: 'center',title: '澶囨敞'}, {align: 'center', title: '鎿嶄綔', toolbar: '#operate', width: 240} ]], @@ -56,11 +56,31 @@ done: function (res, curr, count) { limit(); if (res.code === 403) { - top.location.href = baseUrl+"/"; + top.location.href = baseUrl + "/"; } insTbCount = count; } }); + + + // + table.on('toolbar(order)', function (obj) { + console.info("121211") + var checkStatus = table.checkStatus(obj.config.id); + console.info(obj) + console.info(checkStatus) + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function () { + var ids = ''; + for (const o in checkStatus.data) { + console.info(o) + //ids.push(checkStatus.data[o].id) + ids =ids + checkStatus.data[o].id + "," + } + location.href = baseUrl + "/exportReview?ids=" + ids; + layer.closeAll(); + }); + }); + // 鎼滅储 form.on('submit(tbSearch)', function (data) { @@ -70,37 +90,37 @@ //澶氭枃浠跺垪琛� var uploadListIns = upload.render({ elem: '#data-btn-file2' - ,elemList: $('#data-btn-file3') //鍒楄〃鍏冪礌瀵硅薄 - ,url: baseUrl+'/review/insert/labelUp/file/auth' - ,accept: 'file' - ,multiple: true - ,number: 10 - ,auto: false - ,bindAction: '#testListAction' - ,choose: function(obj){ + , elemList: $('#data-btn-file3') //鍒楄〃鍏冪礌瀵硅薄 + , url: baseUrl + '/review/insert/labelUp/file/auth' + , accept: 'file' + , multiple: true + , number: 10 + , auto: false + , bindAction: '#testListAction' + , choose: function (obj) { // 璧嬪�� - this.data.orderId=$('.layui-layer-title').text() + this.data.orderId = $('.layui-layer-title').text() var that = this; var files = this.files = obj.pushFile(); //灏嗘瘡娆¢�夋嫨鐨勬枃浠惰拷鍔犲埌鏂囦欢闃熷垪 //璇诲彇鏈湴鏂囦欢 - obj.preview(function(index, file, result){ - var tr = $(['<tr id="upload-'+ index +'">' - ,'<td>'+ file.name +'</td>' - ,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>' - ,'<td><div class="layui-progress" lay-filter="progress-demo-'+ index +'"><div class="layui-progress-bar" lay-percent=""></div></div></td>' - ,'<td>' - ,'<button class="layui-btn layui-btn-xs demo-reload layui-hide">閲嶄紶</button>' + obj.preview(function (index, file, result) { + var tr = $(['<tr id="upload-' + index + '">' + , '<td>' + file.name + '</td>' + , '<td>' + (file.size / 1014).toFixed(1) + 'kb</td>' + , '<td><div class="layui-progress" lay-filter="progress-demo-' + index + '"><div class="layui-progress-bar" lay-percent=""></div></div></td>' + , '<td>' + , '<button class="layui-btn layui-btn-xs demo-reload layui-hide">閲嶄紶</button>' // ,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">鍒犻櫎</button>' - ,'</td>' - ,'</tr>'].join('')); + , '</td>' + , '</tr>'].join('')); //鍗曚釜閲嶄紶 - tr.find('.demo-reload').on('click', function(){ + tr.find('.demo-reload').on('click', function () { obj.upload(index, file); }); //鍒犻櫎 - tr.find('.demo-delete').on('click', function(){ + tr.find('.demo-delete').on('click', function () { delete files[index]; //鍒犻櫎瀵瑰簲鐨勬枃浠� tr.remove(); uploadListIns.config.elem.next()[0].value = ''; //娓呯┖ input file 鍊硷紝浠ュ厤鍒犻櫎鍚庡嚭鐜板悓鍚嶆枃浠朵笉鍙�� @@ -110,28 +130,28 @@ element.render('progress'); //娓叉煋鏂板姞鐨勮繘搴︽潯缁勪欢 }); } - ,done: function(res, index, upload){ //鎴愬姛鐨勫洖璋� + , done: function (res, index, upload) { //鎴愬姛鐨勫洖璋� var that = this; //if(res.code == 0){ //涓婁紶鎴愬姛 - var tr = that.elemList.find('tr#upload-'+ index) - ,tds = tr.children(); + var tr = that.elemList.find('tr#upload-' + index) + , tds = tr.children(); tds.eq(3).html(''); //娓呯┖鎿嶄綔 delete this.files[index]; //鍒犻櫎鏂囦欢闃熷垪宸茬粡涓婁紶鎴愬姛鐨勬枃浠� return; //} this.error(index, upload); } - ,allDone: function(obj){ //澶氭枃浠朵笂浼犲畬姣曞悗鐨勭姸鎬佸洖璋� + , allDone: function (obj) { //澶氭枃浠朵笂浼犲畬姣曞悗鐨勭姸鎬佸洖璋� console.log(obj) } - ,error: function(index, upload){ //閿欒鍥炶皟 + , error: function (index, upload) { //閿欒鍥炶皟 var that = this; - var tr = that.elemList.find('tr#upload-'+ index) - ,tds = tr.children(); + var tr = that.elemList.find('tr#upload-' + index) + , tds = tr.children(); tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //鏄剧ず閲嶄紶 } - ,progress: function(n, elem, e, index){ //娉ㄦ剰锛歩ndex 鍙傛暟涓� layui 2.6.6 鏂板 - element.progress('progress-demo-'+ index, n + '%'); //鎵ц杩涘害鏉°�俷 鍗充负杩斿洖鐨勮繘搴︾櫨鍒嗘瘮 + , progress: function (n, elem, e, index) { //娉ㄦ剰锛歩ndex 鍙傛暟涓� layui 2.6.6 鏂板 + element.progress('progress-demo-' + index, n + '%'); //鎵ц杩涘害鏉°�俷 鍗充负杩斿洖鐨勮繘搴︾櫨鍒嗘瘮 } }); @@ -157,24 +177,24 @@ layer.open({ area: '1020px', type: 1, - title: '涓婁紶鏂囦欢-'+data.id, + title: '涓婁紶鏂囦欢-' + data.id, content: $('#myModal') }); // 鑾峰彇璺緞涓嬬殑鏂囦欢鍒楄〃锛屼娇鐢� jQuery 鐨� ajax 鏂规硶 $.ajax({ - url: baseUrl+'/review/view/labelUp/file/auth', - data:{ - orderId:data.id + url: baseUrl + '/review/view/labelUp/file/auth', + data: { + orderId: data.id }, - success: function(response) { - if (response.code==200){ + success: function (response) { + if (response.code == 200) { var targetTable = document.getElementById("data-btn-file3"); targetTable.innerHTML = ''; // 灏嗚幏鍙栧埌鐨勬枃浠跺垪琛ㄦ坊鍔犲埌鏂囦欢闃熷垪涓繘琛屾樉绀� - response.data.forEach(function(file,index) { + response.data.forEach(function (file, index) { // 鍒涘缓tr鍏冪礌 var tr = document.createElement("tr"); - tr.id = "upload-"+index; + tr.id = "upload-" + index; tr.innerHTML = '<td>' + file.name + '</td>' + '<td>' + (file.size / 1024).toFixed(1) + 'kb</td>' + '<td><div class="layui-progress" lay-filter="progress-demo-' + index + '"><div class="layui-progress-bar" lay-percent=""></div></div></td>' @@ -186,11 +206,11 @@ // 灏唗r鍏冪礌娣诲姞鍒扮洰鏍噒able涓� targetTable.appendChild(tr); }); - }else { + } else { console.log('Failed to get file list error.'); } }, - error: function() { + error: function () { console.log('Failed to get file list.'); } }); @@ -217,14 +237,13 @@ table.render({ elem: '#lookSSXMTable', headers: {token: localStorage.getItem('token')}, - url: baseUrl+'/reviewDetl/list/auth', + url: baseUrl + '/reviewDetl/list/auth', where: { order_id: data.id }, page: true, cellMinWidth: 100, cols: [[ - {type: 'numbers'}, {field: 'matnr', title: '鐗╄川缂栫爜'}, {field: 'maktx', title: '浜у搧鍚嶇О'}, {field: 'specs', title: '瑙勬牸鍨嬪彿'}, @@ -285,18 +304,18 @@ } let nList = admin.util.deepClone(xxDataList); for (let xi = 0; xi < nList.length; xi++) { - if (nList[xi].anfme <= 0){ + if (nList[xi].anfme <= 0) { layer.msg('鏄庣粏淇敼鏁伴噺涓嶅悎娉�', {icon: 2}); return false; } - if (nList[xi].anfme < nList[xi].workQty){ + if (nList[xi].anfme < nList[xi].workQty) { layer.msg('鏁伴噺涓嶈兘灏忎簬宸蹭綔涓氭暟閲�', {icon: 2}); return false; } } layer.load(2); $.ajax({ - url: baseUrl+"/review/form/" + (isExpAdd?"add":"modify") + "/auth", + url: baseUrl + "/review/form/" + (isExpAdd ? "add" : "modify") + "/auth", headers: {'token': localStorage.getItem('token')}, data: JSON.stringify({ orderId: Number(data.field.id), @@ -304,17 +323,17 @@ orderNo: data.field.orderNo, orderDetlList: nList }), - contentType:'application/json;charset=UTF-8', + contentType: 'application/json;charset=UTF-8', method: 'POST', success: function (res) { layer.closeAll('loading'); - if (res.code === 200){ + if (res.code === 200) { layer.close(dIndex); $(".layui-laypage-btn")[0].click(); layer.msg(res.msg, {icon: 1}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}); } } @@ -336,11 +355,25 @@ {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200}, {field: 'batch', title: '绠卞彿', edit: true}, {field: 'specs', title: '鎺ュご'}, - {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, - {field: 'workQty', title: '浣滀笟鏁伴噺', minWidth: 100, width: 100}, + { + field: 'anfme', + title: '鏁伴噺(淇敼)', + style: 'color: blue;font-weight: bold', + edit: true, + minWidth: 110, + width: 110 + }, + {field: 'workQty', title: '浣滀笟鏁伴噺', minWidth: 100, width: 100}, // {field: 'unit', title: '鍗曚綅', width: 80}, - {field: 'memo', title: '澶囨敞' , edit: true}, - {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} + {field: 'memo', title: '澶囨敞', edit: true}, + { + align: 'center', + title: '鎿嶄綔', + toolbar: '#formSSXMTableBar', + minWidth: 80, + width: 80, + fixed: 'right' + } ]], done: function (res) { $(layero).find('.layui-table-view').css('margin', '0'); @@ -349,17 +382,17 @@ }; if (!isExpAdd) { $.ajax({ - url: baseUrl+"/review/detl/all/auth?orderId=" + expTpe.id, + url: baseUrl + "/review/detl/all/auth?orderId=" + expTpe.id, headers: {'token': localStorage.getItem('token')}, method: 'GET', async: false, success: function (res) { - if (res.code === 200){ + if (res.code === 200) { xxDataList = res.data; tbOptions.data = xxDataList; - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}) } } @@ -373,7 +406,7 @@ if (layEvent === 'edit') { showEditModel2(data); } else if (layEvent === 'del') { - if(data.workQty > 0){ + if (data.workQty > 0) { layer.msg("宸插瓨鍦ㄤ綔涓氭暟閲忥紝涓嶈兘鍒犻櫎", {icon: 2}); return; } @@ -396,7 +429,7 @@ table.on('edit(formSSXMTable)', function (obj) { let index = obj.tr.attr("data-index"); let data = xxDataList[index]; - if (obj.field === 'anfme'){ + if (obj.field === 'anfme') { let vle = Number(obj.value); if (isNaN(vle)) { layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); @@ -408,7 +441,7 @@ // insTbSSXM.reload({data: xxDataList}); return false; } - if(obj.value < data.workQty){ + if (obj.value < data.workQty) { layer.msg("杈撳叆鏁伴噺涓嶈兘灏忎簬浣滀笟涓暟閲�", {icon: 2}); // data[obj.field] = 0; // insTbSSXM.reload({data: xxDataList}); @@ -438,21 +471,21 @@ // 琛ㄥ崟鎻愪氦浜嬩欢 form.on('submit(matEditSubmit)', function (data) { let selectList = matXmSelect.getValue(); - for (let i = 0; i<selectList.length; i++) { + for (let i = 0; i < selectList.length; i++) { let item = selectList[i]; // 鏌ヨ鐗╂枡璇︽儏 $.ajax({ - url: baseUrl+"/mat/covert/"+item.value+"/auth", + url: baseUrl + "/mat/covert/" + item.value + "/auth", headers: {'token': localStorage.getItem('token')}, method: 'GET', async: false, success: function (res) { - if (res.code === 200){ + if (res.code === 200) { xxDataList.push(res.data); insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}) } } @@ -468,19 +501,19 @@ width: '340px', }, autoRow: true, - toolbar: { show: true }, + toolbar: {show: true}, filterable: true, remoteSearch: true, - remoteMethod: function(val, cb, show){ + remoteMethod: function (val, cb, show) { $.ajax({ - url: baseUrl+"/mat/all/get/kv", + url: baseUrl + "/mat/all/get/kv", headers: {'token': localStorage.getItem('token')}, data: { condition: val }, method: 'POST', success: function (res) { - if (res.code === 200){ + if (res.code === 200) { cb(res.data) } else { cb([]); @@ -510,7 +543,7 @@ layer.close(i); layer.load(2); $.ajax({ - url: baseUrl+"/review/delete/auth", + url: baseUrl + "/review/delete/auth", headers: {'token': localStorage.getItem('token')}, data: { orderId: orderId @@ -518,16 +551,16 @@ method: 'POST', success: function (res) { layer.closeAll('loading'); - if (res.code === 200){ + if (res.code === 200) { if (insTbCount === 0) { insTb.reload({page: {curr: 1}}); } else { $(".layui-laypage-btn")[0].click(); } layer.msg(res.msg, {icon: 1}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}); } } @@ -546,7 +579,7 @@ console.log(orderId); console.log(settle); $.ajax({ - url: baseUrl+"/review/update/auth", + url: baseUrl + "/review/update/auth", headers: {'token': localStorage.getItem('token')}, data: { id: orderId, @@ -556,16 +589,16 @@ method: 'POST', success: function (res) { layer.closeAll('loading'); - if (res.code === 200){ + if (res.code === 200) { if (insTbCount === 0) { insTb.reload({page: {curr: 1}}); } else { $(".layui-laypage-btn")[0].click(); } layer.msg(res.msg, {icon: 1}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}); } } @@ -577,7 +610,7 @@ function showWrkTrace(orderId) { let loadIndex = layer.msg('璇锋眰涓�...', {icon: 16, shade: 0.01, time: false}); $.ajax({ - url: baseUrl+"/review/wrk/trace/auth", + url: baseUrl + "/review/wrk/trace/auth", headers: {'token': localStorage.getItem('token')}, data: { orderId: orderId @@ -585,7 +618,7 @@ method: 'POST', success: function (res) { layer.close(loadIndex); - if (res.code === 200){ + if (res.code === 200) { laytpl(wrkTraceDialog.innerHTML).render(res.data, function (html) { admin.open({ type: 1, @@ -606,19 +639,27 @@ }, color: ['#10B4E8', '#E0E0E0', '#FF0000'], tooltip: {trigger: 'item'}, - series: [{name: '绠卞瓙鏁伴噺', type: 'pie', radius: ['75%', '80%'], label: {normal: {show: false}}}] + series: [{ + name: '绠卞瓙鏁伴噺', + type: 'pie', + radius: ['75%', '80%'], + label: {normal: {show: false}} + }] }; traceCharts.setOption(traceOptions); // 璧嬪�� traceCharts.setOption({ title: { - subtext: res.data.totalQty+"/"+res.data.wrkQty+"/"+res.data.endQty + subtext: res.data.totalQty + "/" + res.data.wrkQty + "/" + res.data.endQty }, series: [ { data: [ {name: '宸蹭綔涓�', value: res.data.wrkQty}, - {name: '鏈綔涓�', value: res.data.totalQty-res.data.wrkQty-res.data.lackQty}, + { + name: '鏈綔涓�', + value: res.data.totalQty - res.data.wrkQty - res.data.lackQty + }, {name: '搴撳瓨涓嶈冻', value: res.data.lackQty}, ] } @@ -627,9 +668,9 @@ } }); }); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}); } } @@ -638,8 +679,8 @@ layDate.render({ elem: '.layui-laydate-range' - ,type: 'datetime' - ,range: true + , type: 'datetime' + , range: true }); function pakoutPreview(ids) { @@ -653,20 +694,20 @@ success: function (res) { layer.close(loadIndex); var tableCache; - if (res.code === 200){ + if (res.code === 200) { layer.open({ type: 1 - ,title: false - ,closeBtn: false - ,offset: '50px' - ,area: ['1500px', '700px'] - ,shade: 0.5 - ,shadeClose: false - ,btn: ['鐢熸垚閫�搴撳崟', '绋嶅悗澶勭悊'] - ,btnAlign: 'c' - ,moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1 - ,content: $('#pakoutPreviewBox').html() - ,success: function(layero, index){ + , title: false + , closeBtn: false + , offset: '50px' + , area: ['1500px', '700px'] + , shade: 0.5 + , shadeClose: false + , btn: ['鐢熸垚閫�搴撳崟', '绋嶅悗澶勭悊'] + , btnAlign: 'c' + , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1 + , content: $('#pakoutPreviewBox').html() + , success: function (layero, index) { stoPreTabIdx = table.render({ elem: '#stoPreTab', data: res.data, @@ -687,8 +728,20 @@ // {field: 'brand', title: '鏈ㄧ绫诲瀷', align: 'center'}, {field: 'brand$', title: '鏈ㄧ绫诲瀷', align: 'center'}, {field: 'zpallet', title: '鎵樼洏鐮�', align: 'center'}, - {field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'}, - {field: 'count', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'}, + { + field: 'anfme', + title: '鏁伴噺', + align: 'center', + width: 90, + style: 'font-weight: bold' + }, + { + field: 'count', + title: '鏁伴噺', + align: 'center', + width: 90, + style: 'font-weight: bold' + }, {field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'}, {field: 'tkType$', title: 'TK鏍囪', align: 'center', width: 100}, // {field: 'staNos', align: 'center', title: '鍑哄簱绔�', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, @@ -702,9 +755,9 @@ }); // 淇敼鍑哄簱绔� form.on('select(tbBasicTbStaNos)', function (obj) { - let index = obj.othis.parents('tr').attr("data-index"); + let index = obj.othis.parents('tr').attr("data-index"); let data = tableCache[index]; - for (let i = 0; i<tableCache.length; i++) { + for (let i = 0; i < tableCache.length; i++) { if (tableCache[i].locNo === data.locNo) { tableCache[i]['staNo'] = Number(obj.elem.value); } @@ -721,18 +774,18 @@ } modifySta(stoPreTabData); }); + // 鎵归噺淇敼鍑哄簱绔� - 绔欑偣閫夋嫨 function modifySta(stoPreTabData) { // 鍑哄簱绔欏彇浜ら泦 let staBatchSelectVal = []; - for(let i = 0; i<stoPreTabData.length; i++) { + for (let i = 0; i < stoPreTabData.length; i++) { let staNos = stoPreTabData[i].staNos; if (staNos !== null) { if (staBatchSelectVal.length === 0) { staBatchSelectVal = staNos; } else { - staBatchSelectVal = staBatchSelectVal.filter(val => - { + staBatchSelectVal = staBatchSelectVal.filter(val => { return new Set(staNos).has(val) } ) @@ -758,8 +811,8 @@ let loadIdx = layer.load(2); let batchSta = Number(obj.field.batchSta); let arr = []; - for (let j = 0; j<stoPreTabData.length; j++) { - for (let i = 0; i<tableCache.length; i++) { + for (let j = 0; j < stoPreTabData.length; j++) { + for (let i = 0; i < tableCache.length; i++) { if (tableCache[i].orderNo === stoPreTabData[j].orderNo && tableCache[i].matnr === stoPreTabData[j].matnr && tableCache[i].locNo === stoPreTabData[j].locNo) { @@ -776,7 +829,8 @@ arr.forEach(item => { $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue"); }); - layer.close(loadIdx); layer.close(ddIndex); + layer.close(loadIdx); + layer.close(ddIndex); return false; }); // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯 @@ -787,20 +841,20 @@ } } - ,yes: function(index, layero){ + , yes: function (index, layero) { //鎸夐挳銆愰��搴撱�戠殑鍥炶皟 pakout(tableCache2, index); tableCache2 = [] } - ,btn2: function(index, layero){ + , btn2: function (index, layero) { //鎸夐挳銆愮◢鍚庡鐞嗐�戠殑鍥炶皟 layer.close(index) tableCache2 = [] //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 } }); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; } else { layer.msg(res.msg, {icon: 2}) } @@ -808,7 +862,7 @@ }) // 澶嶉�夋浜嬩欢 - table.on('checkbox(stoPreTab)', function(obj){ + table.on('checkbox(stoPreTab)', function (obj) { tableCache2.push(obj.data) }); } -- Gitblit v1.9.1