From 6592a2a095bab7177289adaed866e979a107b22e Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期二, 29 三月 2022 14:11:41 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/order/order.js | 46 +++++++--------------------------------------- 1 files changed, 7 insertions(+), 39 deletions(-) diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js index 76ac6e7..bbac8d8 100644 --- a/src/main/webapp/static/js/order/order.js +++ b/src/main/webapp/static/js/order/order.js @@ -161,27 +161,6 @@ } let nList = admin.util.deepClone(xxDataList); for (let xi = 0; xi < nList.length; xi++) { - // if (nList[xi].inQty > 0 && inQtys[xi] !== nList[xi].anfme) { - // layer.msg("宸插叆搴撴棤娉曚慨鏀�", {icon: 2}) - // return false; - // } else if (nList[xi].anfme > 0) { - // param.push({ - // billNo: data.field.billNo, - // billType: data.field.billType, - // matNo: nList[xi].matNo, - // matName: nList[xi].matName, - // color: nList[xi].color, - // size: nList[xi].size, - // specs: nList[xi].specs, - // memo: nList[xi].memo, - // unit: nList[xi].unit, - // qty: nList[xi].qty, - // inQty: nList[xi].inQty, - // }) - // } else if (nList[xi].anfme <= 0){ - // layer.msg('鏄庣粏淇敼鏁伴噺涓嶅悎娉�', {icon: 2}); - // return false; - // } if (nList[xi].anfme <= 0){ layer.msg('鏄庣粏淇敼鏁伴噺涓嶅悎娉�', {icon: 2}); return false; @@ -227,7 +206,7 @@ {type: 'numbers', title: '#'}, {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160}, {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200}, - {field: 'batch', title: '鎵瑰彿'}, + {field: 'batch', title: '鎵瑰彿', edit: true}, {field: 'specs', title: '瑙勬牸'}, {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, // {field: 'inQty', title: '宸插叆搴撻噺', minWidth: 100, width: 100}, @@ -288,35 +267,24 @@ }); // 鏄庣粏鏁版嵁淇敼 table.on('edit(formSSXMTable)', function (obj) { - if (obj.field === 'memo'){ - for (let i=0;i<xxDataList.length;i++) { - if (xxDataList[i]["matnr"] === obj.data.matnr && xxDataList[i]["batch"] === obj.data.batch) { - xxDataList[i]["memo"] = obj.value; - break; - } - } - } else if (obj.field==='anfme'){ + let index = obj.tr.attr("data-index"); + let data = xxDataList[index]; + if (obj.field === 'anfme'){ let vle = Number(obj.value); if (isNaN(vle)) { layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); return false; } else { - if (vle > 0) { - for (let i=0;i<xxDataList.length;i++) { - if (xxDataList[i]["matnr"] === obj.data.matnr && xxDataList[i]["batch"] === obj.data.batch) { - xxDataList[i]["anfme"] = vle; - break; - } - } - } else { + if (vle <= 0) { layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); return false; } } } + data[obj.field] = obj.value; insTbSSXM.reload({data: xxDataList}); }); - // + $('#matAddBtnComment').click(function () { showEditModel2(); }); -- Gitblit v1.9.1