From c6bc9682699d3e10dc06a3d6641a70179e64f9a1 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 14 九月 2021 08:32:11 +0800
Subject: [PATCH] Merge branch 'xgmasrs' of https://gitee.com/luxiaotao1123/zy-asrs into xgmasrs
---
src/main/webapp/static/js/waitMatin/waitMatin.js | 76 ++++++++++++++++++++++++++++++-------
1 files changed, 61 insertions(+), 15 deletions(-)
diff --git a/src/main/webapp/static/js/waitMatin/waitMatin.js b/src/main/webapp/static/js/waitMatin/waitMatin.js
index 0c9fd90..2bfd66a 100644
--- a/src/main/webapp/static/js/waitMatin/waitMatin.js
+++ b/src/main/webapp/static/js/waitMatin/waitMatin.js
@@ -73,7 +73,7 @@
layer.open({
type: 1,
title: false,
- area: '630px',
+ area: '800px',
offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'],
shade: .01,
shadeClose: true,
@@ -98,7 +98,10 @@
field: 'createTime$', title: '鍒涘缓鏃堕棿', sort: true, templet: function (d) {
return util.toDateString(d.createTime);
}, width: 180
- }
+ },
+ {field: 'inQty', title: '宸插叆搴撻噺'},
+ {field: 'color', title: '棰滆壊'},
+ {field: 'specs', title: '瑙勬牸'}
]],
request: {
pageName: 'curr',
@@ -127,11 +130,13 @@
// 鏄剧ず琛ㄥ崟寮圭獥
function showEditModel(expTpe) {
+ var mlist=null
+ var inQtys=[]
admin.open({
type: 1,
title: (expTpe ? '淇敼' : '娣诲姞') + '鍗曟嵁',
content: $('#editDialog').html(),
- area: '700px',
+ area: '1300px',
success: function (layero, dIndex) {
$(layero).children('.layui-layer-content').css('overflow', 'visible');
var isExpAdd = !expTpe;
@@ -150,14 +155,29 @@
var param = [];
var nList = admin.util.deepClone(xxDataList);
for (var xi = 0; xi < nList.length; xi++) {
- if (nList[xi].qty > 0) {
+ // console.log('宸插叆搴擄細'+nList[xi].inQty)
+ // console.log('鏃ф暟閲忥細'+inQtys[xi])
+ // console.log('鏁伴噺锛�'+nList[xi].qty)
+ if (nList[xi].inQty > 0 && inQtys[xi]!=nList[xi].qty) {
+ layer.msg("宸插叆搴撴棤娉曚慨鏀�", {icon: 2})
+ return false;
+ } else if (nList[xi].qty > 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].qty == 0){
+ layer.msg('鏄庣粏淇敼鏁伴噺涓嶅悎娉�', {icon: 2});
+ return false;
}
}
if (param.length === 0) {
@@ -199,10 +219,21 @@
{type: 'numbers'},
{field: 'matNo', title: '鐗╂枡缂栫爜'},
{field: 'matName', title: '鐗╂枡鍚嶇О', width: 160},
+ {field: 'specs', title: '瑙勬牸', width: 160},
+ {field: 'color', title: '棰滆壊', width: 160},
+ {field: 'size', title: '灏哄', width: 160},
{field: 'qty', title: '淇敼鏁伴噺', style: 'color: blue;font-weight: bold', edit: true, minWidth: 100, width: 100},
+ {field: 'inQty', title: '宸插叆搴撻噺', minWidth: 100, width: 100},
+ {field: 'unit', title: '鍗曚綅', width: 160},
+ {field: 'memo', title: '澶囨敞' , edit: true, width: 160},
{align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80}
]],
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: ''
@@ -250,19 +281,29 @@
});
// 鏁伴噺淇敼
table.on('edit(formSSXMTable)', function (obj) {
- let count = Number(obj.value);
- if (isNaN(count)) {
- layer.msg("璇疯緭鍏ユ暟瀛�");
- } else {
- if (count > 0) {
- for (var i=0;i<xxDataList.length;i++){
- if (xxDataList[i]["matNo"] === obj.data.matNo){
- xxDataList[i]["qty"] = count;
- break;
- }
+ if (obj.field=='memo'){
+ let vle = obj.value;
+ for (var i=0;i<xxDataList.length;i++) {
+ if (xxDataList[i]["matNo"] === obj.data.matNo) {
+ xxDataList[i]["memo"] = vle;
+ break;
}
+ }
+ }else if (obj.field=='qty'){
+ let vle = Number(obj.value);
+ if (isNaN(vle)) {
+ layer.msg("璇疯緭鍏ユ暟瀛�");
} else {
- layer.msg("鏁伴噺蹇呴』澶т簬闆�");
+ if (vle > 0) {
+ for (var i=0;i<xxDataList.length;i++) {
+ if (xxDataList[i]["matNo"] === obj.data.matNo) {
+ xxDataList[i]["qty"] = vle;
+ break;
+ }
+ }
+ } else {
+ layer.msg("鏁伴噺蹇呴』澶т簬闆�");
+ }
}
}
insTbSSXM.reload({data: xxDataList});
@@ -306,6 +347,11 @@
xxDataList.push({
matNo: mat.matNo,
matName: mat.matName,
+ color:mat.color,
+ size:mat.size,
+ specs:mat.specs,
+ memo: mat.memo,
+ unit: mat.unit,
qty: 0.0
});
insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
--
Gitblit v1.9.1