From 04f031ac6a0b3ae0551fc0173868a7f3cc57f921 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期一, 11 四月 2022 16:28:54 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/order/order.js | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js index 69302a4..483f715 100644 --- a/src/main/webapp/static/js/order/order.js +++ b/src/main/webapp/static/js/order/order.js @@ -26,7 +26,7 @@ {field: 'createTime$', title: '鍒涘缓鏃堕棿', minWidth: 200, width: 200}, {field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160}, {field: 'memo', align: 'center',title: '澶囨敞', hide: true}, - {align: 'center', title: '鎿嶄綔', toolbar: '#operate', minWidth: 130, width: 130} + {align: 'center', title: '鎿嶄綔', toolbar: '#operate', width: 180} ]], request: { pageName: 'curr', @@ -69,6 +69,8 @@ showEditModel(data); } else if (layEvent === 'del') { doDel(data.id); + } else if (layEvent === 'complete') { + doModify(data.id, 4); } else if (layEvent === 'look') { var $a = $(obj.tr).find('a[lay-event="look"]'); var offset = $a.offset(); @@ -306,7 +308,7 @@ if (existMats.indexOf(item.value) === -1) { // 鏌ヨ鐗╂枡璇︽儏 $.ajax({ - url: baseUrl+"/matCode/covert/"+item.value+"/auth", + url: baseUrl+"/mat/covert/"+item.value+"/auth", headers: {'token': localStorage.getItem('token')}, method: 'GET', async: false, @@ -400,6 +402,43 @@ }); } + // 淇敼璁㈠崟鐘舵�� + function doModify(orderId, settle) { + layer.confirm('纭畾瑕佹墜鍔ㄥ畬缁撳悧锛�', { + shade: .1, + skin: 'layui-layer-admin' + }, function (i) { + layer.close(i); + layer.load(2); + console.log(orderId); + console.log(settle); + $.ajax({ + url: baseUrl+"/order/update/auth", + headers: {'token': localStorage.getItem('token')}, + data: { + id: orderId, + settle: settle + }, + method: 'POST', + success: function (res) { + layer.closeAll('loading'); + 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 { + layer.msg(res.msg, {icon: 2}); + } + } + }) + }); + } + layDate.render({ elem: '.layui-laydate-range' ,type: 'datetime' -- Gitblit v1.9.1