From aa0161bf05195ccb00bc1d8da4b1b8218f93f4d3 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期六, 04 十一月 2023 16:14:18 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/priOnline2/priOnline.js | 68 ++++++++++++++++++---------------- 1 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/main/webapp/static/js/priOnline2/priOnline.js b/src/main/webapp/static/js/priOnline2/priOnline.js index a3840db..f710787 100644 --- a/src/main/webapp/static/js/priOnline2/priOnline.js +++ b/src/main/webapp/static/js/priOnline2/priOnline.js @@ -5,7 +5,7 @@ base: baseUrl + "/static/layui/lay/modules/" }).extend({ cascader: 'cascader/cascader', -}).use(['table','laydate', 'form', 'admin', 'xmSelect', 'element', 'cascader', 'tree', 'dropdown'], function() { +}).use(['table', 'laydate', 'form', 'admin', 'xmSelect', 'element', 'cascader', 'tree', 'dropdown'], function () { var table = layui.table; var $ = layui.jquery; var layer = layui.layer; @@ -104,7 +104,7 @@ hide: false } , {field: 'itemId', align: 'center', title: '瑙勫垝鍗曞彿', hide: true} - , {field: 'status$', align: 'center', title: '鐘舵��',hide : false} + , {field: 'status$', align: 'center', title: '鐘舵��', hide: false} // ,{field: 'memberId$', align: 'center',title: ''} , { field: 'settle$', @@ -114,12 +114,13 @@ event: 'more', hide: false } - , {field: 'user$', align: 'center', title: '涓氬姟鍛�',hide : false} - , {field: 'deptId$', align: 'center', title: '閮ㄩ棬',hide : true} - , {field: 'checkDataStatus$', align: 'center', title: '鎶ヤ环鏁版嵁',hide : false} - , {field: 'createTime$', align: 'center', title: '鍒涘缓鏃堕棿',hide : true} - , {field: 'updateUserId$', align: 'center', title: '鏇存柊浜哄憳',hide : false} - , {field: 'updateTime$', align: 'center', title: '鏇存柊鏃堕棿',hide : false} + , {field: 'settleSize', align: 'center', title: '娴佺▼闀垮害', hide: true} + , {field: 'user$', align: 'center', title: '涓氬姟鍛�', hide: false} + , {field: 'deptId$', align: 'center', title: '閮ㄩ棬', hide: true} + , {field: 'checkDataStatus$', align: 'center', title: '鎶ヤ环鏁版嵁', hide: false} + , {field: 'createTime$', align: 'center', title: '鍒涘缓鏃堕棿', hide: true} + , {field: 'updateUserId$', align: 'center', title: '鏇存柊浜哄憳', hide: false} + , {field: 'updateTime$', align: 'center', title: '鏇存柊鏃堕棿', hide: false} , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 350} ]], request: { @@ -267,6 +268,7 @@ title: data.name }, function (i) { layer.close(i); + console.log(data) approvalEnd(data.id); }); break; @@ -277,13 +279,14 @@ offset: '200px', title: data.name }, function (i) { + console.log(data) layer.close(i); - // 鎸囧畾瑙勫垝鍛� - if (data.settle === 1) { + // 鎸囧畾妯℃澘 + if ((data.settle === 1 && data.settleSize===3) || (data.settle===2 && data.settleSize===4)) { admin.open({ type: 1, area: '300px', - title: '閫夋嫨瑙勫垝鍛�', + title: '閫夋嫨鎶ヤ环妯℃澘', content: $('#plannerListDialog').html(), success: function (layero, dIndex) { let plannerSel = xmSelect.render({ @@ -582,10 +585,11 @@ } }); } - function approvalEnd(planId, plannerId, dIdx) { + + function approvalEnd(priOnlineId, plannerId, dIdx) { let loadIndex = layer.load(2); $.ajax({ - url: baseUrl+"/priOnline2/approvalEnd/auth", + url: baseUrl + "/priOnline2/approvalEnd/auth", headers: {'token': localStorage.getItem('token')}, data: { priOnlineId: priOnlineId, @@ -597,11 +601,11 @@ layer.close(dIdx); } layer.close(loadIndex); - if (res.code === 200){ + if (res.code === 200) { layer.msg(res.msg, {icon: 1}); tableReload(); - } 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}); } @@ -612,7 +616,7 @@ function approval(priOnlineId, plannerId, dIdx) { let loadIndex = layer.load(2); $.ajax({ - url: baseUrl+"/priOnline2/approval/auth", + url: baseUrl + "/priOnline2/approval/auth", headers: {'token': localStorage.getItem('token')}, data: { priOnlineId: priOnlineId, @@ -624,11 +628,11 @@ layer.close(dIdx); } layer.close(loadIndex); - if (res.code === 200){ + if (res.code === 200) { layer.msg(res.msg, {icon: 1}); tableReload(); - } 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}); } @@ -639,13 +643,13 @@ }); // 鍏抽棴鍔ㄤ綔 -$(document).on('click','#data-detail-close', function () { +$(document).on('click', '#data-detail-close', function () { parent.layer.closeAll(); }); function tableReload(child) { var searchData = {}; - $.each($('#search-box [name]').serializeArray(), function() { + $.each($('#search-box [name]').serializeArray(), function () { searchData[this.name] = this.value; }); (child ? parent.tableIns : tableIns).reload({ @@ -655,14 +659,14 @@ }, done: function (res, curr, count) { if (res.code === 403) { - top.location.href = baseUrl+"/"; + top.location.href = baseUrl + "/"; } - pageCurr=curr; + pageCurr = curr; if (res.data.length === 0 && count !== 0) { tableIns.reload({ where: searchData, page: { - curr: pageCurr-1 + curr: pageCurr - 1 } }); pageCurr -= 1; @@ -676,9 +680,9 @@ for (var val in data) { var find = el.find(":input[id='" + val + "']"); find.val(data[val]); - if (showImg){ + if (showImg) { var next = find.next(); - if (next.get(0)){ + if (next.get(0)) { if (next.get(0).localName === "img") { find.hide(); next.attr("src", data[val]); @@ -698,13 +702,13 @@ function detailScreen(index) { var detail = layer.getChildFrame('#data-detail', index); - var height = detail.height()+60; - if (height > ($(window).height()*0.9)) { - height = ($(window).height()*0.9); + var height = detail.height() + 60; + if (height > ($(window).height() * 0.9)) { + height = ($(window).height() * 0.9); } layer.style(index, { - top: (($(window).height()-height)/3)+"px", - height: height+'px' + top: (($(window).height() - height) / 3) + "px", + height: height + 'px' }); $(".layui-layer-shade").remove(); } -- Gitblit v1.9.1