From 08464b5b3bc79be5397a48927a6603f2e3287446 Mon Sep 17 00:00:00 2001 From: dubin <bindu_bean@163.com> Date: 星期三, 15 十月 2025 22:39:57 +0800 Subject: [PATCH] 联调 --- src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js | 51 +++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 39 insertions(+), 12 deletions(-) diff --git a/src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js b/src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js index e5beb3f..c05ee2a 100644 --- a/src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js +++ b/src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js @@ -144,19 +144,46 @@ } }); break; + // case 'deleteData': + // layer.open({ + // type: 2, + // title: '缁勬墭', + // maxmin: true, + // area: [top.detailWidth, top.detailHeight], + // content: 'barcodeMatnr_comb.html', + // success: function(layero, index){ + // layer.getChildFrame('#data-detail-submit-edit', index).hide(); + // clearFormVal(layer.getChildFrame('#detail', index)); + // layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + // } + // }); + // break; case 'deleteData': - layer.open({ - type: 2, - title: '缁勬墭', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - content: 'barcodeMatnr_comb.html', - success: function(layero, index){ - layer.getChildFrame('#data-detail-submit-edit', index).hide(); - clearFormVal(layer.getChildFrame('#detail', index)); - layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); - } - }); + if (checkStatus.data.length === 0){ + layer.msg('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�', {icon: 2}); + } else { + layer.confirm('纭畾缁勬墭鍚�', function(){ + $.ajax({ + url: baseUrl+"/barcodeMatnr/matnrAndBarcode", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(checkStatus.data), + contentType:'application/json;charset=UTF-8', + method: 'POST', + traditional:true, + success: function (res) { + if (res.code === 200){ + layer.closeAll(); + tableReload(false); + layer.msg(res.msg, {icon: 1}) + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}) + } + } + }) + }); + } break; case 'clampData': layer.open({ -- Gitblit v1.9.1