From b51eadaa66a5c0ee6da0e418a3ba193dfc878fca Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期四, 03 七月 2025 13:21:56 +0800 Subject: [PATCH] 1 --- src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js | 70 +++++++++++++++------------------- 1 files changed, 31 insertions(+), 39 deletions(-) diff --git a/src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js b/src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js index 417749e..3e3faaf 100644 --- a/src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js +++ b/src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js @@ -30,8 +30,7 @@ where: {order_id: 9999999999}, cols: [[ {type: 'checkbox'} - ,{type: 'numbers', title: '#'} - ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160} + ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl'} ,{field: 'locNo', align: 'center',title: '搴撲綅'} ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 160} ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200} @@ -49,6 +48,7 @@ // ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�'} // ,{field: 'count', align: 'center',title: '鏁伴噺'} // ,{field: 'weight', align: 'center',title: '閲嶉噺'} + ,{field: 'profit$', align: 'center',title: '鐩堜簭',templet: '#profitTpl'} ,{field: 'status$', align: 'center',title: '鐘舵��'} // ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳'} // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'} @@ -91,13 +91,7 @@ $('#showFormBtn').on('click', function () { // 寮规鍐呭 var content = ` - <form class="layui-form" id="billForm" style="padding: 20px;"> - <div class="layui-form-item" style="margin-bottom: 20px;"> - <label class="layui-form-label" style="width: 80px; font-size: 14px; text-align: left">鍗曟嵁缂栧彿锛�</label> - <div class="layui-input-block" style="margin-left: 110px;"> - <input type="text" id="billNumber" class="layui-input" placeholder="璇疯緭鍏ュ崟鎹紪鍙�" style="height: 38px; font-size: 14px; padding: 0 15px; width: 100%;" required> - </div> - </div> + <form class="layui-form" id="billForm" style="padding: 20px;"> <div class="layui-form-item" style="margin-bottom: 20px;"> <label class="layui-form-label" style="width: 80px; font-size: 14px;">搴撳尯锛�</label> <div class="layui-input-block" style="margin-left: 110px;"> @@ -129,34 +123,8 @@ var billNumber = $('#billNumber').val(); var warehouseArea = $('#warehouseArea').val(); - // 琛ㄥ崟楠岃瘉 - if (!billNumber) { - layer.msg('璇疯緭鍏ュ崟鎹紪鍙�'); - return; - } - console.log(111) - console.log(billNumber) - // 鍙戦�� Ajax 璇锋眰鍒板悗绔� - $.ajax({ - url: baseUrl+"/inventoryCheckOrder/add/auth", // 鏇挎崲涓轰綘鐨勫悗绔帴鍙e湴鍧� - headers: {'token': localStorage.getItem('token')}, - contentType: 'application/json;charset=UTF-8', - method: 'POST', - data: JSON.stringify({ orderNo: billNumber,area: warehouseArea }), - success: function (res) { - if (res.code === 200){ - layer.msg(res.msg, {icon: 1}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { - layer.msg(res.msg, {icon: 2}); - } - }, - error: function () { - layer.msg('璇锋眰澶辫触'); - } - }); + }); } }); @@ -164,7 +132,7 @@ /* 琛ㄦ牸2澶村伐鍏锋爮鐐瑰嚮浜嬩欢 */ table.on('toolbar(orderDetlTable)', function (obj) { - + // console.log(obj.config.where.order_id); var checkStatus = table.checkStatus(obj.config.id).data; if (obj.event === 'pakoutPreview') { // 娣诲姞 if (checkStatus.length === 0) { @@ -184,7 +152,31 @@ return d.id; }); doDelSensor({ids: ids}); + } else if (obj.event === 'submitERP') { // 鎻愪氦erp + $.ajax({ + url: baseUrl + "/mobile/checkOut/submit/auth", + headers: {'token': localStorage.getItem('token')}, + // contentType: 'application/json;charset=UTF-8', + data: { + orderId: obj.config.where.order_id + }, + method: 'GET', + success: function (res) { + notice.destroy(); + if (res.code === 200) { + layer.msg(res.msg, {icon: 1}); + insTb.reload({where: null}); + insTb2.reload({where: null, page: {curr: 1}}); + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { + layer.msg(res.msg, {icon: 2}) + } + } + }); + } + }); /* 琛ㄦ牸2宸ュ叿鏉$偣鍑讳簨浠� */ @@ -202,7 +194,7 @@ function pakoutPreview(ids) { let loadIndex = layer.load(2); $.ajax({ - url: baseUrl + "/out/pakout/preview/auth", + url: baseUrl + "/out/pakout/preview/auth/sxk", headers: {'token': localStorage.getItem('token')}, contentType: 'application/json;charset=UTF-8', data: JSON.stringify(ids), @@ -357,7 +349,7 @@ // let loadIndex = layer.load(2); notice.msg('姝e湪鐢熸垚鍑哄簱浠诲姟......', {icon: 4}); $.ajax({ - url: baseUrl + "/out/pakout/auth", + url: baseUrl + "/out/pakout/auth/sxk", headers: {'token': localStorage.getItem('token')}, contentType: 'application/json;charset=UTF-8', data: JSON.stringify(tableCache), -- Gitblit v1.9.1