From 29cfba4aa2e41fb15cacb500c3e2d9ae7c652d08 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期二, 21 十一月 2023 08:57:20 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/priSales/priSales.js | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 52 insertions(+), 1 deletions(-) diff --git a/src/main/webapp/static/js/priSales/priSales.js b/src/main/webapp/static/js/priSales/priSales.js index 35ec07c..322ba95 100644 --- a/src/main/webapp/static/js/priSales/priSales.js +++ b/src/main/webapp/static/js/priSales/priSales.js @@ -92,7 +92,8 @@ ,{field: 'createTime$', align: 'center',title: '鍒涘缓鏃堕棿'} ,{field: 'updateTime$', align: 'center',title: '鏇存柊鏃堕棿'} ,{field: 'memberId$', align: 'center',title: '涓氬姟鍛�'} - ,{field: 'userId$', align: 'center',title: '鍒涘缓浜哄憳'} + ,{field: 'settle$', align: 'center',title: '杩涘害', style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} + // ,{field: 'userId$', align: 'center',title: '鍒涘缓浜哄憳'} ,{field: 'updateUserId$', align: 'center',title: '鏇存柊浜哄憳'} ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:250} ]], @@ -233,6 +234,29 @@ table.on('tool(priSales)', function(obj){ var data = obj.data; switch (obj.event) { + case 'approval': + layer.confirm('瀹℃壒閫氳繃锛�', { + skin: 'layui-layer-admin', + shade: .1, + offset: '200px', + title: data.name + }, function (i) { + layer.close(i); + approval(data.id); + }); + break; + case 'more': + top.priSalesByMore = data.id; + admin.popupRight({ + type: 1, + window: "top", + area: "1250px", + url: "priSales_more.html", + end: function () { + // $(".layui-laypage-btn")[0].click(); + } + }) + break; case 'moreCstmr': top.cstmrByMore = data.cstmrId$; admin.popupRight({ @@ -383,6 +407,33 @@ }); } + function approval(priSalesId, plannerId, dIdx) { + let loadIndex = layer.load(2); + $.ajax({ + url: baseUrl+"/priSales/approval/auth", + headers: {'token': localStorage.getItem('token')}, + data: { + priSalesId: priSalesId, + plannerId: plannerId + }, + method: 'POST', + success: function (res) { + if (dIdx) { + layer.close(dIdx); + } + layer.close(loadIndex); + if (res.code === 200){ + layer.msg(res.msg, {icon: 1}); + tableReload(); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + } + }); // 鍏抽棴鍔ㄤ綔 -- Gitblit v1.9.1