From 09801d0911b15a9efd2a0044caffedfad1af6e48 Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期五, 04 六月 2021 16:45:15 +0800
Subject: [PATCH] pda新增小车关联组托功能
---
src/main/webapp/views/pda/combProAgv.html | 92 ++++++++++++++++++++++++++--------------------
1 files changed, 52 insertions(+), 40 deletions(-)
diff --git a/src/main/webapp/views/pda/combProAgv.html b/src/main/webapp/views/pda/combProAgv.html
index e324cc2..61cce3c 100644
--- a/src/main/webapp/views/pda/combProAgv.html
+++ b/src/main/webapp/views/pda/combProAgv.html
@@ -241,56 +241,68 @@
}
});
+ // 鑾峰彇宸ヤ綔鍖�
+ function getDevp(){
+ $.ajax({
+ url: baseUrl+"/available/put/site",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ async: false,
+ success: function (res) {
+ if (res.code === 200){
+ var tpl = $("#devpSelectTemplate").html();
+ var template = Handlebars.compile(tpl);
+ var html = template(res);
+ $('#devpSelect').append(html);
+ layui.form.render('select');
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/pda";
+ }else {
+ tips("鑾峰彇宸ヤ綔鍖哄け璐�", true)
+ }
+ }
+ })
+ }
+ getDevp();
});
- // 鑾峰彇宸ヤ綔鍖�
- function getDevp(){
- $.ajax({
- url: baseUrl+"/available/put/site",
- headers: {'token': localStorage.getItem('token')},
- method: 'POST',
- async: false,
- success: function (res) {
- if (res.code === 200){
- var tpl = $("#devpSelectTemplate").html();
- var template = Handlebars.compile(tpl);
- var html = template(res);
- $('#devpSelect').append(html);
- layui.form.render('select');
- } else if (res.code === 403){
- top.location.href = baseUrl+"/pda";
- }else {
- tips("鑾峰彇宸ヤ綔鍖哄け璐�", true)
- }
+ var matCodeLayerIdx;
+ function getMat() {
+ matCodeLayerIdx = layer.open({
+ type: 2,
+ title: '鎻愬彇鐗╂枡',
+ shade: [0.3,'#000'],
+ area: ['90%', '90%'],
+ content: 'matQuery.html',
+ success: function(layero, index){
+ $('.layui-layer-title').css('font-size', '16px');
+ },
+ end: function () {
+ $('#mat-btn').focus();
}
- })
+ });
}
- getDevp();
+
+
// 娣诲姞琛ㄦ牸鏁版嵁
- // var matData = [];
-
function addTableData(data) {
- for (var i = 0; i < data.length; i++) {
- var toPush = true;
- for (var j = 0; j < matData.length; j++) {
- if (data[i].matNo === matData[j].matNo && data[i].mnemonic === matData[j].mnemonic) {
- matData[j].count = Number(matData[j].count) + Number(data[i].count);
- toPush = false;
- }
- }
- if (toPush) {
- matData.push(data[i]);
- sourceData.push({
- matNo: data[i].matNo,
- count: data[i].count,
- supplier: data[i].supplier,
- mnemonic: data[i].mnemonic,
- });
+ if (isEmpty(data.matName)){
+ tips("鎻愬彇澶辫触", true);
+ return;
+ }
+ let toPush = true;
+ for (var j=0;j<matData.length;j++){
+ if (data.matNo === matData[j].matNo) {
+ matData[j].count = Number(matData[j].count) + Number(data.count);
+ toPush = false;
}
}
+ if (toPush) {
+ matData.push(data);
+ }
+ tips("鎻愬彇鎴愬姛");
tableIns.reload({data: matData});
-// $("#comb-btn").focus();
}
--
Gitblit v1.9.1