From 7ebe16b9abbee8e884db27d2ec360f17455b14f2 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 24 八月 2021 09:03:07 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/pakStore/stockAdjust.js | 63 ++++++++++++++++++-------------
1 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/src/main/webapp/static/js/pakStore/stockAdjust.js b/src/main/webapp/static/js/pakStore/stockAdjust.js
index d227469..8a429d3 100644
--- a/src/main/webapp/static/js/pakStore/stockAdjust.js
+++ b/src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -2,6 +2,17 @@
var initAnfmeVal = "-";
var matCodeData = [];
var currLocNo;
+function getCol() {
+ var cols = [
+ {fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}
+ ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ ];
+ arrRemove(detlCols, "field", "anfme")
+ cols.push.apply(cols, detlCols);
+ cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80})
+ return cols;
+}
+
layui.use(['table','laydate', 'form'], function() {
var table = layui.table;
var $ = layui.jquery;
@@ -16,21 +27,7 @@
limit: 500,
cellMinWidth: 50,
toolbar: '#toolbar',
- cols: [[
- {fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}
- ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
- ,{field: 'matnr', align: 'center',title: '鐗╂枡'}
- ,{field: 'lgnum', align: 'center',title: '浠撳簱鍙�'}
- ,{field: 'tbnum', align: 'center',title: '杞偍璇锋眰缂栧彿'}
- // ,{field: 'tbpos', align: 'center',title: '琛岄」鐩�'}
- ,{field: 'zmatid', align: 'center',title: '鐗╂枡鏍囩ID'}
- ,{field: 'maktx', align: 'center',title: '鐗╂枡鎻忚堪'}
- ,{field: 'werks', align: 'center',title: '宸ュ巶'}
- ,{field: 'altme', align: 'center',title: '鍗曚綅'}
- ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
- ,{field: 'bname', align: 'center',title: '鐢ㄦ埛ID'}
- ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80}
- ]],
+ cols: [getCol()],
done: function (res, curr, count) {
limit();
}
@@ -51,7 +48,7 @@
return;
}
if (matCodeData.length === 0) {
- layer.msg("璇峰厛娣诲姞鐗╂枡");
+ layer.msg("璇峰厛娣诲姞浜у搧");
return;
}
for (var i=0;i<matCodeData.length;i++){
@@ -157,7 +154,7 @@
let data = res.data;
if (data != null) {
$(".retrieve").show();
- $("#locMsg").html(locNo + " ,搴撲綅鐘舵�侊細" + data.locType$);
+ $("#locMsg").html(locNo + " ,搴撲綅鐘舵�侊細" + data.locSts$);
$('.not-retrieve').hide();
currLocNo = locNo;
} else {
@@ -197,7 +194,7 @@
}
})
-// 鎻愬彇鐗╂枡
+// 鎻愬彇浜у搧
var matCodeLayerIdx;
function getMat() {
if (isEmpty(currLocNo)) {
@@ -207,7 +204,7 @@
}
matCodeLayerIdx = layer.open({
type: 2,
- title: '鎻愬彇鐗╂枡',
+ title: '鎻愬彇浜у搧',
maxmin: true,
area: [top.detailWidth, top.detailHeight],
shadeClose: true,
@@ -229,14 +226,26 @@
function addTableData(data) {
let applyData = [];
for (var i=0;i<data.length;i++){
- applyData.push({
- count: initCountVal,
- anfme: initAnfmeVal,
- removeBtn: true,
- matnr: data[i].matNo,
- maktx: data[i].matName,
- altme: data[i].str1,
- })
+ let pass = false;
+ for (var j=0;j<matCodeData.length;j++){
+ if (data[i].matNo === matCodeData[j].matnr) {
+ pass = true;
+ break;
+ }
+ }
+ if (!pass) {
+ applyData.push({
+ count: initCountVal,
+ anfme: initAnfmeVal,
+ removeBtn: true,
+ matnr: data[i].matNo,
+ maktx: data[i].matName,
+ lgnum: data[i].str2,
+ color: data[i].str3,
+ bname: data[i].str4,
+ altme: data[i].str1,
+ })
+ }
}
matCodeData.push.apply(matCodeData,applyData);
tableIns.reload({data: matCodeData});
--
Gitblit v1.9.1