From 68ef2632aa52dca92a81250a8d95790d63441303 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期五, 26 二月 2021 14:45:52 +0800
Subject: [PATCH] 解决销售出库新增问题

---
 WebTM/views/仓存管理/仓库调拨/Cc_LookingForBill.html |   85 +++++++++++++++++++++++++++++++++++-------
 1 files changed, 70 insertions(+), 15 deletions(-)

diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
index 5c90e38..6cf5efd 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
@@ -45,6 +45,7 @@
                         <ul class="layui-tab-title" lay-filter="tab-all">
                             <li lay-id="1" style="padding:1px;display:none">琛ㄥご淇℃伅</li>
                             <li lay-id="2" style="padding:1px;" class="layui-this">鏄庣粏淇℃伅</li>
+                            <li lay-id="3" style="padding:1px;">宸叉壂淇℃伅</li>
                         </ul>
                         <div class="layui-tab-content">
                             <!--琛ㄥご淇℃伅-->
@@ -120,6 +121,10 @@
                             <!--鏄庣粏淇℃伅-->
                             <div class="layui-tab-item layui-show">
                                 <table class="layui-hide" id="bzd-table" lay-filter="bzd-table"></table>
+                            </div>
+                            <!--宸叉壂淇℃伅-->
+                            <div class="layui-tab-item">
+                                <table class="layui-hide" id="bzd-table2" lay-filter="bzd-table2"></table>
                             </div>
                         </div>
                     </div>
@@ -237,9 +242,53 @@
                 }
             };
 
+            //涓昏〃鍒楄〃-宸叉壂淇℃伅
+            var option2 = {
+                elem: '#bzd-table2'
+                //, toolbar: '#toolbarDemo'
+                , page: true
+                //, height: 256
+                , cellMinWidth: 90
+                , limit: 500
+                , cols: [[
+                    { type: 'numbers', title: '搴忓彿' }
+                    , { field: 'HIsStatus', title: '鏄惁鎵爜' }
+                    , { field: 'HMTONo', title: '鎵瑰彿', width: 180 }
+                    , { field: 'HSPID', title: '浠撲綅ID', hide: true }
+                    , { field: 'HSPName', title: '浠撲綅' }
+                    , { field: 'HStatus', title: '鍦ㄥ簱鐘舵��', width: 165 }
+                    , { field: 'HWhID', title: '浠撳簱ID', hide: true }
+                    , { field: 'HWhName', title: '浠撳簱', width: 130 }
+                    , { field: 'HSourceInterID', title: '婧愬崟ID', hide: true }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 110 }
+                    , { field: 'HGroupID', title: '鐝粍ID', hide: true }
+                    , { field: 'HGroup', title: '鐝粍' }
+                    , { field: 'HSourceID', title: '鐢熶骇璧勬簮ID', hide: true }
+                    , { field: 'HSource', title: '鐢熶骇璧勬簮', width: 115, templet: '#sexTpl' }
+                    , { field: 'HQty', title: '鏁伴噺' }
+                    , { field: 'HMaterID', title: '鐗╂枡ID', hide: true }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜' }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿' }
+                    , { field: '鍗虫椂搴撳瓨', title: '鍗虫椂搴撳瓨' }
+                    , { field: 'HBarCode', title: '鏉$爜缂栧彿', hide: true }
+                    , { field: 'HInterID', title: '鍗曟嵁ID', hide: true }
+                    , { field: 'HBillNo', title: '鍗曟嵁鍙�' }
+                    , { field: 'HMakerID', title: '鍒跺崟浜篒D', hide: true }
+                    , { field: 'HMaker', title: '鍒跺崟浜�' }
+                    , { field: 'HBillType', title: 'HBillType', hide: true }
+                ]]
+                , text: {
+                    none: '鏆傛棤鐩稿叧鏁版嵁锛岃鍏堟壂鎻忓疄鐗╂潯鐮侊紒' //榛樿锛氭棤鏁版嵁銆傛敞锛氳灞炴�т负 layui 2.2.5 寮�濮嬫柊澧�
+                }
+            };
+
             //鍒濆鍔犺浇琛ㄦ牸
             option.data = [];
             table.render(option);
+
+            option2.data = [];
+            table.render(option2);
 
             //杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ簮鍗曞彿涓�
             $("#HSourceBillNo").focus();
@@ -294,9 +343,9 @@
                                         rowFlage += i + 1 + ",";
                                     }
                                 }
-                                if (rowFlage) {
-                                    layer.msg("绗�" + rowFlage + "琛屾暟鎹棤鏉$爜锛岃鍏堢敓鎴愭潯鐮侊紒", { icon: 5, btn: ['鎴戝凡鐭ユ檽'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                                }
+                                //if (rowFlage) {
+                                //    layer.msg("绗�" + rowFlage + "琛屾暟鎹棤鏉$爜锛岃鍏堢敓鎴愭潯鐮侊紒", { icon: 5, btn: ['鎴戝凡鐭ユ檽'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                //}
                                 $("#HSourceBillNo").attr("readonly", "readonly");//婧愬崟鍙峰彧璇�
                                 $("#HSourceBillNo").css("background-color", "#efefef4d");
                                 element.tabChange('tab-LookingForBill', '2');  //璺宠浆椤电
@@ -314,6 +363,7 @@
                 }
             });
 
+            var data = new Object();
             //鎵疄鐗╂潯鐮�
             $('#HBarCode').on('keydown', function (event) {
                 var HBarCode = $('#HBarCode').val()
@@ -347,8 +397,13 @@
                                 sSubStr[i].HMaker = $("#HMaker").val();
                                 option.data = table.cache["bzd-table"];
                                 table.render(option);
-                                layer.close(index);
                                 $('#HBarCode').val("");
+                                //鍔ㄦ�佽幏鍙栧凡鎵爜璁板綍骞舵坊鍔犲埌宸叉壂淇℃伅涓�
+                                table.cache["bzd-table2"].push(sSubStr[i]);
+                                option2.data = table.cache["bzd-table2"];
+                                table.render(option2);
+                                element.tabChange('tab-LookingForBill', '3');//璺宠浆椤电
+                                layer.close(index);
                                 layer.msg("鎵爜鎴愬姛锛�", { icon: 1, time: 1000 });
                             }
                         }
@@ -438,18 +493,18 @@
             form.on('submit(Saver)', function (data) {//鎻愪氦
                 //debugger;
                 //var sMainStr = JSON.stringify(data.field);
-                var tableData = table.cache['bzd-table'];
-                for (var i = 0; i < tableData.length; i++) {
-                    if (tableData[i].HIsStatus == "鏄�" ) {
+                var tableData = table.cache['bzd-table2'];
+                //for (var i = 0; i < tableData.length; i++) {
+                //    if (tableData[i].HIsStatus == "鏄�" ) {
 
-                    } else {
-                        //绉婚櫎褰撳墠琛�
-                        tableData.splice(i, 1);
-                        i--;
-                        option.data = tableData;
-                        table.render(option);
-                    }
-                }
+                //    } else {
+                //        //绉婚櫎褰撳墠琛�
+                //        tableData.splice(i, 1);
+                //        i--;
+                //        option.data = tableData;
+                //        table.render(option);
+                //    }
+                //}
                 var sSubStr = JSON.stringify(tableData);
                 sSubStr = "{\"oSub\": " + sSubStr + "}";
                 //sSubStr = JSON.stringify(sSubStr);

--
Gitblit v1.9.1