From 6167bf4c8fe617d9f9861585042149d48ad15dbb Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期二, 13 五月 2025 17:54:50 +0800
Subject: [PATCH] 修改问题,添加PDA下发出库页面

---
 Pda/View/AsnSetting/productEnterQuantity.html |  273 +++++++++--------------------------------------------
 1 files changed, 49 insertions(+), 224 deletions(-)

diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html
index ba59cc2..4eb6ee8 100644
--- a/Pda/View/AsnSetting/productEnterQuantity.html
+++ b/Pda/View/AsnSetting/productEnterQuantity.html
@@ -771,7 +771,7 @@
                                 $('#goodSelect').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
                             } else {
                                 var sel = 'dd[lay-value=' + val + ']';
-                                $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
+                                //$('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
                             }
                         } else {
                         }
@@ -1047,245 +1047,69 @@
                 });
             }
 
-            
-            
-
-            
-            // 娓叉煋绠辩爜淇℃伅
-            // function refreshTable() {
-            //     if (xianshiyemian == 0) {
-            //         //鍏堟竻绌轰竴涓嬬瀛愬垪琛�
-            //         let trs = $("#tableBoxList tr")
-            //         let len = trs.length
-
-            //         for (i = len - 1; i >= 2; i--) {
-            //             trs[i].remove();
-            //         }
-
-            //         //璁剧疆鎵樼洏鍙�
-            //         $("#palletCode").val($.cookie('stockCode'))
-
-            //         var param = {
-            //             PalletNo: $.cookie('stockCode')
-            //         };
-            //         //  鏍规嵁鎵樼洏鍙疯幏鍙栫鐮佷俊鎭�
-            //         sendData(IP + "/PdaAsn/GetBoxInfos", param, 'post', function (res) {
-            //             if (res.code == 0) { //鎴愬姛
-            //                 var list = res
-            //                 var arrTrs = new Array()
-            //                 let idx = 0
-            //                 for (var i in res.data) {
-            //                     var tr = $("#boxCell").eq(0).clone();
-            //                     tr.appendTo("#tableBoxList");
-            //                     tr.attr('id', res.data[i].Id)
-            //                     tr.attr('boxno', res.data[i].BoxNo)
-            //                     tr.attr('BindNo', res.data[i].BindNo)
-            //                     idx++;
-            //                     tr.attr('index', idx)
-            //                     tr.find("td[name='code']").html(res.data[i].BoxNo);
-            //                     tr.find("td[name='name']").html(res.data[i].SkuName);
-            //                     tr.find("td[name='lotNo']").html(res.data[i].LotNo);
-            //                     tr.find("td[name='num']").html(res.data[i].Qty);
-            //                     tr.find("td[name='del']").click(function () {
-            //                         var elem = $(this).parent()
-            //                         var boxno = elem.attr('boxno')
-            //                         var BindNo = elem.attr('BindNo')
-            //                         var Id = elem.attr('id')
-            //                         layer.alert("纭畾瑕佷粠鎵樼洏涓婂垹闄よ繖涓鐗╂枡鍚楋紵<br>" + boxno, {
-            //                             icon: 2,
-            //                             time: 0, //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-            //                             btn: ['鍒犻櫎', '鍙栨秷'],
-            //                             yes: function () {
-
-            //                                 var param = {
-            //                                     boxNo: boxno,
-            //                                 };
-            //                                 sendData(IP + "/BllAsn/DelBindBoxInfo", param, 'get', function (res) {
-            //                                     if (res.code == 0) { //鎴愬姛
-            //                                         layer.msg(res.msg, {
-            //                                             icon: 1,
-            //                                             time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-            //                                         });
-            //                                         elem.remove()
-            //                                         setOrderGoods();
-            //                                         refreshTable();
-            //                                     } else { //涓嶆垚鍔�
-            //                                         layer.msg(res.msg, {
-            //                                             icon: 2,
-            //                                             time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-            //                                         }, function () { });
-            //                                     }
-            //                                 });
-            //                             }
-            //                         })
-            //                     })
-            //                     tr.show();
-            //                     arrTrs[i] = tr
-            //                 }
-            //                 //璁剧疆鍒嗛〉
-            //                 setPages(1, res.data.length)
-
-            //             } else { //涓嶆垚鍔�
-            //                 layer.msg("鏃犳暟鎹�", {
-            //                     icon: 2,
-            //                     time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-            //                 }, function () { });
-            //                 $("#boxNum").val(0)
-            //                 setPages(1, 0)
-            //             }
-            //         });
-            //     }
-            //     else if (xianshiyemian == 1) {
-            //         //鍏堟竻绌轰竴涓嬬瀛愬垪琛�
-            //         let trs = $("#tableBoxList1 tr")
-            //         let len = trs.length
-
-            //         for (i = len - 1; i >= 2; i--) {
-            //             trs[i].remove();
-            //         }
-
-            //         //璁剧疆鎵樼洏鍙�
-            //         $("#palletCode").val($.cookie('stockCode1'))
-
-            //         var param = {
-            //             PalletNo: $.cookie('stockCode1')
-            //         };
-            //         //  鏍规嵁鎵樼洏鍙疯幏鍙栫鐮佷俊鎭�
-            //         sendData(IP + "/PdaAsn/GetPalletBindInfo", param, 'post', function (res) {
-            //             if (res.code == 0) { //鎴愬姛
-            //                 var list = res
-            //                 var arrTrs = new Array()
-            //                 let idx = 0
-            //                 for (var i in res.data) {
-            //                     var tr = $("#boxCell").eq(0).clone();
-            //                     tr.appendTo("#tableBoxList1");
-            //                     tr.attr('id', res.data[i].Id)
-            //                     tr.attr('boxno', res.data[i].BoxNo)
-            //                     tr.attr('BindNo', res.data[i].BindNo)
-            //                     idx++;
-            //                     tr.attr('index', idx)
-            //                     tr.find("td[name='code']").html(res.data[i].SkuNo);
-            //                     tr.find("td[name='name']").html(res.data[i].SkuName);
-            //                     tr.find("td[name='lotNo']").html(res.data[i].LotNo);
-            //                     tr.find("td[name='num']").html(res.data[i].Qty);
-            //                     tr.find("td[name='del']").click(function () {
-            //                         var elem = $(this).parent()
-            //                         // var boxno = elem.attr('boxno')
-            //                         var BindNo = elem.attr('BindNo')
-            //                         console.log(res)
-            //                         var Id = elem.attr('id')
-            //                         layer.alert("纭畾瑕佷粠鎵樼洏涓婂垹闄よ繖鎵樼墿鏂欏悧锛�<br>" + res.data[0].PalletNo, {
-            //                             icon: 2,
-            //                             time: 0, //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-            //                             btn: ['鍒犻櫎', '鍙栨秷'],
-            //                             yes: function () {
-
-            //                                 var param = {
-            //                                     Id: parseInt(Id),
-            //                                     PalletNo: res.data[0].PalletNo,
-            //                                 };
-            //                                 console.log(Id)
-            //                                 console.log(param)
-            //                                 sendData(IP + "/PdaAsn/DelPalletBind", param, 'post', function (res) {
-            //                                     if (res.code == 0) { //鎴愬姛
-            //                                         layer.msg(res.msg, {
-            //                                             icon: 1,
-            //                                             time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-            //                                         });
-            //                                         elem.remove()
-            //                                         setOrderGoods();
-            //                                         refreshTable();
-            //                                     } else { //涓嶆垚鍔�
-            //                                         layer.msg(res.msg, {
-            //                                             icon: 2,
-            //                                             time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-            //                                         }, function () { });
-            //                                     }
-            //                                 });
-            //                             }
-            //                         })
-            //                     })
-            //                     tr.show();
-            //                     arrTrs[i] = tr
-            //                 }
-
-            //                 //璁剧疆鍒嗛〉
-            //                 setPages(1, res.data.length)
-
-            //             } else { //涓嶆垚鍔�
-            //                 layer.msg("鏃犳暟鎹�", {
-            //                     icon: 2,
-            //                     time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-            //                 }, function () { });
-            //                 $("#boxNum").val(0)
-            //                 setPages(1, 0)
-            //             }
-            //         });
-            //     }
-
-            // }
-
-            
             //绠卞洖杞︿簨浠�
             function checkBoxInfo() {
                 var param = {
                     "BoxNo": $("#BOXCODE").val(),
+                    "ASNNo":$("#bar").val()
                 }
                 sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) {
-                    BoxLevelVal = "0";
+                     
+                     
                     if (res.code == 0) { //鎴愬姛
-                        //鍒ゆ柇鏄惁涓洪浂绠盉itBoxMark
-                        if (res.data[0].BitBoxMark == '1') {
-                            getFMBoxinfo();
+                         
+                        var bl = false;
+                        if (res.data.length == 0) {
+                            layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            });
+                            return;
+                        }
+
+                        if (res.data[0].ASNNo != '' && res.data[0].ASNNo != null) {
+                            $("#bar").empty()
+                            $("#bar").append('<option value =>' + '</option>');
+                            form.render('select');
+
+                            $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo + '</option>');
+
+                            updateGoodList(res.data[0].SkuNo)
+                            setOrderGoods();
                         } else {
-                            var bl = false;
-                            if (res.data.length == 0) {
-                                layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", {
+                            if (asnDetails == '') {
+                                layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗曟嵁!", {
                                     icon: 2,
                                     time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
                                 });
                                 return;
                             }
-
-                            if (res.data[0].ASNNo != '' && res.data[0].ASNNo != null) {
-                                $("#bar").empty()
-                                $("#bar").append('<option value =>' + '</option>');
-                                form.render('select');
-
-                                $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo + '</option>');
-
-                                updateGoodList(res.data[0].SkuNo)
-                                setOrderGoods();
-                            } else {
-                                if (asnDetails == '') {
-                                    layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗曟嵁!", {
-                                        icon: 2,
-                                        time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-                                    });
-                                    return;
-                                }
-                            }
-                            asnDetails.forEach(element => {
-                                console.log(element);
-
-                                if (element.SkuNo == res.data[0].SkuNo && element.LotNo == res.data[0].LotNo) {
-                                    var sel = 'dd[lay-value=' + element.id + ']';
-                                    $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this');
-                                    bl = true;
-                                }
-                            });
-                            if (!bl) {
-                                layer.msg("姝ょ鐗╂枡涓嶇鍚堣鍏ュ簱鍗曪紝璇锋牳瀹�!", {
-                                    icon: 2,
-                                    time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-                                });
-                            } else {
-                                $("#BoxQty").val(res.data[0].Qty);
-                            }
                         }
+                        asnDetails.forEach(element => {
+                            console.log(element);
+
+                            if (element.SkuNo == res.data[0].SkuNo && element.LotNo == res.data[0].LotNo) {
+                                var sel = 'dd[lay-value=' + element.id + ']';
+                                $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this');
+                                bl = true;
+                            }
+                        });
+                        if (!bl) {
+                            layer.msg("姝ょ鐗╂枡涓嶇鍚堣鍏ュ簱鍗曪紝璇锋牳瀹�!", {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            });
+                        } else {
+                            $("#BoxQty").val(res.data[0].Qty);
+                        }
+                        
                     } else { //涓嶆垚鍔�
+                        layer.msg(res.msg, {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            });
                         //绠辩爜涓嶅瓨鍦紝璋冪敤璧嬬爜鎺ュ彛鑾峰彇绠变俊鎭�
-                        getFMBoxinfo();
+                        //getFMBoxinfo();
                     }
                 });
 
@@ -1295,6 +1119,7 @@
                     "BoxNo": $("#BOXCODE").val(),
                 }
                 sendData(IP + "/UpApi/GetFMBindBoxInfos", param, 'post', function (res) {
+                    console.log(res);
                     if (res.code == 0) { //鎴愬姛//鏍规嵁瀵规帴鎺ュ彛瀹氫箟鍚勫瓧娈靛垽鏂潯浠�
                         var bl = false;
                         if (res.data.length == 0) {

--
Gitblit v1.8.0