From 2b7d6339d1ff61ab767340fdc4ef59603dc9e6e5 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 31 三月 2022 09:07:45 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/order/order.js | 53 +++++++----------------------------------------------
1 files changed, 7 insertions(+), 46 deletions(-)
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 76ac6e7..69302a4 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -137,8 +137,6 @@
// 鏄剧ず琛ㄥ崟寮圭獥
function showEditModel(expTpe) {
- var mlist=null
- var inQtys=[]
admin.open({
type: 1,
title: (expTpe ? '淇敼' : '娣诲姞') + '鍗曟嵁',
@@ -161,27 +159,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 +204,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},
@@ -236,11 +213,6 @@
{align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'}
]],
done: function (res) {
- mlist= res.data
- for (let i = 0; i < mlist.length; i++) {
- var waitIn=mlist[i]
- inQtys.push(waitIn.qty)
- }
$(layero).find('.layui-table-view').css('margin', '0');
},
size: ''
@@ -288,35 +260,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