From b5d0bbde2cd8d77e781690a7b3e762a5ce7645ca Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期三, 02 六月 2021 14:43:23 +0800
Subject: [PATCH] pda新增小车组托入库功能
---
src/main/webapp/views/pda/combPro.html | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/src/main/webapp/views/pda/combPro.html b/src/main/webapp/views/pda/combPro.html
index 95cc57c..a8485e0 100644
--- a/src/main/webapp/views/pda/combPro.html
+++ b/src/main/webapp/views/pda/combPro.html
@@ -166,6 +166,8 @@
}
var tableIns;
var countLayer;
+ var matData = [];
+ var sourceData = [];
layui.use(['table', 'laydate', 'form'], function () {
var table = layui.table;
var $ = layui.jquery;
@@ -179,8 +181,8 @@
limit: 500,
cellMinWidth: 50,
cols: [[
- {field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜',event: 'modify',},
- {field: 'mnemonic', align: 'center', title: '鐢熶骇鍗曞彿',event: 'modify',},
+ {field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜', event: 'modify',},
+ {field: 'mnemonic', align: 'center', title: '鐢熶骇鍗曞彿', event: 'modify',},
{
align: 'center',
field: 'count',
@@ -189,7 +191,7 @@
style: 'cursor: pointer;color: blue',
width: 50
},
- {field: 'matName', align: 'center', title: '鐗╂枡鍚嶇О',event: 'modify',}
+ {field: 'matName', align: 'center', title: '鐗╂枡鍚嶇О', event: 'modify',}
]],
done: function (res, curr, count) {
}
@@ -228,7 +230,7 @@
}
// 娣诲姞琛ㄦ牸鏁版嵁
- var matData = [];
+ // var matData = [];
function addTableData(data) {
for (var i = 0; i < data.length; i++) {
@@ -241,6 +243,12 @@
}
if (toPush) {
matData.push(data[i]);
+ sourceData.push({
+ matNo: data[i].matNo,
+ count: data[i].count,
+ supplier: data[i].supplier,
+ mnemonic: data[i].mnemonic,
+ });
}
}
tableIns.reload({data: matData});
@@ -263,7 +271,7 @@
return;
}
// 璧嬪�煎墠娓呯┖琛ㄦ牸
- matData = [];
+// matData = [];
tableIns.reload({data: matData});
$.ajax({
@@ -277,6 +285,10 @@
if (res.code === 200) {
if (res.data != null) {
addTableData(res.data);
+ // 寤惰繜1绉掑悗娓呯┖閫氱煡鍗曞彿
+ setTimeout(function () {
+ $('#billNo').val("");
+ }, 500);
}
} else if (res.code === 403) {
top.location.href = baseUrl + "/pda";
@@ -345,6 +357,7 @@
$('#code').val("");
$('#billNo').val("");
matData = [];
+ sourceData = [];
tableIns.reload({data: matData});
}
@@ -364,16 +377,12 @@
tips("璇锋彁鍙栫墿鏂�", true);
return;
}
- var billNo = $('#billNo').val();
- var mnemonic = $('#mnemonic').val();
$.ajax({
- url: baseUrl + "/mobile/comb/auth",
+ url: baseUrl + "/mobile/comb/auth/batch",
headers: {'token': localStorage.getItem('token')},
data: JSON.stringify({
barcode: barcode,
combMats: matData,
- billNo: billNo,
- mnemonic: mnemonic,
}),
contentType: 'application/json;charset=UTF-8',
method: 'POST',
--
Gitblit v1.9.1