From 975823f4d07c91a67162f553be9ff4ac25f3d47d Mon Sep 17 00:00:00 2001
From: czkh <czkh@163.com>
Date: 星期四, 06 十一月 2025 13:41:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/czkhasrs' into czkhasrs
---
src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js | 90 ++++++++++++++++++++++++++++++++++++++++----
1 files changed, 81 insertions(+), 9 deletions(-)
diff --git a/src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js b/src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js
index 10a4ea0..c17bedc 100644
--- a/src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js
+++ b/src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js
@@ -37,7 +37,7 @@
headers: {token: localStorage.getItem('token')},
url: baseUrl+'/barcodeMatnr/list/auth',
page: true,
- limit: 16,
+ limit: 30,
limits: [16, 30, 50, 100, 200, 500],
even: true,
toolbar: '#toolbar',
@@ -144,26 +144,82 @@
}
});
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':
- var data = checkStatus.data;
- if (data.length === 0){
- layer.msg('璇烽�夋嫨鏁版嵁');
+ if (checkStatus.data.length === 0){
+ layer.msg('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�', {icon: 2});
} else {
- layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
+ layer.confirm('纭畾缁勬墭鍚�', function(){
$.ajax({
- url: baseUrl+"/waitPakin/delete/auth",
+ url: baseUrl+"/barcodeMatnr/matnrAndBarcode",
headers: {'token': localStorage.getItem('token')},
- data: {param: JSON.stringify(data)},
+ 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)
+ layer.msg(res.msg, {icon: 2})
+ }
+ }
+ })
+ });
+ }
+ break;
+ // case 'clampData':
+ // layer.open({
+ // type: 2,
+ // title: '骞舵澘',
+ // maxmin: true,
+ // area: [top.detailWidth, top.detailHeight],
+ // content: 'barcodeMatnr_clamp.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 'clampData':
+ if (checkStatus.data.length === 0){
+ layer.msg('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�', {icon: 2});
+ } else {
+ layer.confirm('纭畾骞舵澘鍚�', function(){
+ $.ajax({
+ url: baseUrl+"/barcodeMatnr/clamp/auth",
+ 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})
}
}
})
@@ -338,6 +394,22 @@
method("add");
});
+ form.on('submit(comb)', function () {
+ if (banMsg != null){
+ layer.msg(banMsg);
+ return;
+ }
+ method("comb");
+ });
+
+ form.on('submit(clamp)', function () {
+ if (banMsg != null){
+ layer.msg(banMsg);
+ return;
+ }
+ method("clamp");
+ });
+
// 鏁版嵁淇敼鍔ㄤ綔
form.on('submit(edit)', function () {
method("update")
@@ -364,7 +436,7 @@
};
$.ajax({
- url: baseUrl+"/waitPakin/"+name+"/auth",
+ url: baseUrl+"/barcodeMatnr/"+name+"/auth",
headers: {'token': localStorage.getItem('token')},
data: top.reObject(data),
method: 'POST',
--
Gitblit v1.9.1