From cdba9375cbe9b7e9512163c31d1bbf8b03c819e6 Mon Sep 17 00:00:00 2001
From: yuyou_x <2336760928@qq.com>
Date: 星期五, 15 三月 2024 13:23:25 +0800
Subject: [PATCH] 重新编写添加质检信息逻辑代码,修改添加质检信息页面。

---
 Pda/View/AsnSetting/productEnterQuantity.html |  445 +++++++++++++++++++++++++------------------------------
 1 files changed, 200 insertions(+), 245 deletions(-)

diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html
index 3f7a994..cb06baa 100644
--- a/Pda/View/AsnSetting/productEnterQuantity.html
+++ b/Pda/View/AsnSetting/productEnterQuantity.html
@@ -101,13 +101,15 @@
                 </ul>
             </div>
 
-            <ul>
+            <!-- <ul>
                 <li id="option1">鏍囩</li>
                 <li id="option2">鏁伴噺</li>
+            </ul> -->
+            
+            <button id="option1" class="layout-btn" type="button">鏍囩</button>
+            <button id="option2" class="layout-btn" type="button">鏁伴噺</button>
+            <br /><br />
 
-            </ul>
-
-            <br />
             <!-- 鏈夌爜 -->
             <div id="content1">
                 <div id="zongDiv" class="layout-bill-info" style="height: 285px;">
@@ -219,7 +221,7 @@
                     </form>
                 </div>
 
-                <br>
+                <!-- <br> -->
 
                 <div id="" class="cut-line">
                     <img src="/assets/fengexian.png">
@@ -248,7 +250,7 @@
                     </table>
                     <!-- 鍒嗛〉 -->
                     <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
-                        <tr style="display: ;">
+                        <tr >
                             <td class="page-prev">涓婁竴椤�</td>
                             <td class="page-num page-num-select">1</td>
                             <td class="page-num">2</td>
@@ -339,6 +341,22 @@
 
                         </table>
 
+                        <!-- <div id="demodiv" class="layui-form-item layout-input">
+                            <label class="layui-form-label" lang>瀵勫瓨澶囨敞锛�</label>
+                            <div class="layui-input-block">
+                                <textarea placeholder="璇疯緭鍏ュ唴瀹�" id="Demo" name="Demo" class="layui-textarea" ></textarea>
+                                
+                            </div>
+                        </div> -->
+                        <!-- 缁存姢澶囨敞寮规 -->
+                        <div id="demodiv" class="layui-form-item layout-input" style="height: auto;">
+                            <label class="layui-form-label">瀵勫瓨澶囨敞锛�</label>
+                            <div class="layui-input-inline" style="width: 365px;height: auto;">
+                                <textarea placeholder="璇疯緭鍏ュ唴瀹�" id="NoticeDemo" name="NoticeDemo" class="layui-textarea" ></textarea>
+                            </div>
+                            <br>
+                        </div>
+                        
                         <table class="layout-tbl-submit" border="" cellspacing="" cellpadding="">
                             <tr>
                                 <td style="width: 23%;"></td>
@@ -355,6 +373,11 @@
                 </div>
 
                 <br>
+                <br>
+                <div id="demodiv1">
+                    <br><br><br><br><br><br><br>
+                </div>
+                
 
                 <div id="" class="cut-line">
                     <img src="/assets/fengexian.png">
@@ -383,7 +406,7 @@
                     </table>
                     <!-- 鍒嗛〉 -->
                     <table id="tableBoxPages1" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
-                        <tr style="display: ;">
+                        <tr>
                             <td class="page-prev">涓婁竴椤�</td>
                             <td class="page-num page-num-select">1</td>
                             <td class="page-num">2</td>
@@ -409,31 +432,33 @@
             var form = layui.form
 
             /* 鏍囩鍒囨崲浠g爜 */
-
+            $('#demodiv').hide();
+            $('#demodiv1').hide();
             var xianshiyemian = 0;
 
-            $('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //閫変腑鍚庨鑹�
-            $('#option2').attr("style", "background-color: #999;width: 45.77%;float: right;text-align: center;"); //榛樿棰滆壊
+            $('#option1').attr("style", "background-color: red;width: 50%;float: left;text-align: center;"); //閫変腑鍚庨鑹�
+            $('#option2').attr("style", "background-color: #999;width: 50%;float: right;text-align: center;"); //榛樿棰滆壊
             $('#content2').hide();
             $(document).ready(function () {
                 $('#option1').click(function () {
                     // qingkong();
                     xianshiyemian = 0;
                     $('#content1').show();
-                    $('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //閫変腑鍚庨鑹�
+                    $('#option1').attr("style", "background-color: red;width: 50%;float: left;text-align: center;"); //閫変腑鍚庨鑹�
 
                     $('#content2').hide();
-                    $('#option2').attr("style", "background-color: #999;width: 45.77%;float: right;text-align: center;"); //榛樿棰滆壊
+                    $('#option2').attr("style", "background-color: #999;width: 50%;float: right;text-align: center;"); //榛樿棰滆壊
                 });
 
                 $('#option2').click(function () {
                     // qingkong();
                     xianshiyemian = 1;
                     $('#content1').hide();
-                    $('#option1').attr("style", "background-color: #999;width: 45.77%;float: left;text-align: center;"); //榛樿棰滆壊
-
+                    $('#option1').attr("style", "background-color: #999;width: 50%;float: left;text-align: center;"); //榛樿棰滆壊
+                    
+                   
                     $('#content2').show();
-                    $('#option2').attr("style", "background-color: aqua;width: 45.77%;float: right;text-align: center;"); //閫変腑鍚庨鑹�
+                    $('#option2').attr("style", "background-color: red;width: 50%;float: right;text-align: center;"); //閫変腑鍚庨鑹�
 
                 });
             });
@@ -652,6 +677,7 @@
             });
             //閫変腑鍏ュ簱鍗曚簨浠�-鏁伴噺
             form.on('select(getbar1)', function (data) {
+                updateDemoDiv();
                 updateGoodList()
                 setOrderGoods();
             });
@@ -758,6 +784,7 @@
                         AsnDetailId: parseInt($("#goodSelect1").val()), //鍏ュ簱鍗曟槑缁咺D
                         LotNo: $("#goodSelect1").find("option:selected").text(),  //鐗╂枡鎵规
                         SkuQty: parseInt($("#SkuQty").val()), //鐗╂枡鏁伴噺
+                        Demo: $("#NoticeDemo").val(), //鐗╂枡鏁伴噺
                         Origin: "PDA"
                     }
 
@@ -788,6 +815,35 @@
                 return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
             });
 
+
+            // 鏍规嵁鍏ュ簱鍗曞彿 鑾峰彇澶囨敞鏄惁鏄剧ず鍙婂娉ㄤ俊鎭�
+            function updateDemoDiv() {
+                var param = {
+                    AsnNo: $("#bar1").val(),
+                };
+                synData(IP + "/PdaAsn/GetArrivalNotice", param, 'post', function (res) {
+                    console.log(res)
+                    if (res.code == 0 && res.data != null) { //鎴愬姛
+                        
+                        //鍒ゆ柇榛樿閫変腑鏄惁涓哄瘎瀛樼墿鏂�
+                        if(res.data[0].Type == "7")
+                        {
+                            $("textarea[name='NoticeDemo']").val(res.data[0].Demo); //澶囨敞
+                            $('#demodiv').show();
+                            $('#demodiv1').show();
+                        }
+                        else
+                        {
+                            $('#demodiv').hide();
+                            $('#demodiv1').hide();
+                        }
+                    }
+                    else{
+                        $('#demodiv').hide();
+                        $('#demodiv1').hide();
+                    }
+                });
+            }
 
             // 鏍规嵁鍏ュ簱鏄庣粏ID 鑾峰彇璇︾粏淇℃伅
             function setOrderGoods() {
@@ -825,6 +881,7 @@
                             $("#Standard1").val(res.data.Standard);
                             $("#ImportFactQuantity1").val(res.data.FactQty + "");
                         }
+                        else{}
                     });
                 }
 
@@ -852,33 +909,33 @@
                             for (var i = 0; i < res.data.length; i++) {
                                 if (skuNo != '' && skuNo == res.data[i].SkuNo) {
                                     if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
-                                        $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+                                        $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
                                             .SkuName +
                                             '</option>');
                                     } else {
-                                        $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+                                        $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
                                             .SkuName + "-" + res.data[i].LotNo +
                                             '</option>');
                                     }
                                 } else {
                                     if (i == 0) {
                                         if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
-                                            $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
                                                 .SkuName +
                                                 '</option>');
                                         } else {
-                                            $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
                                                 .SkuName + "-" + res.data[i].LotNo +
                                                 '</option>');
                                         }
 
                                     } else {
                                         if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
-                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
+                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i]
                                                 .SkuName +
                                                 '</option>');
                                         } else {
-                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
+                                            $("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i]
                                                 .SkuName + "-" + res.data[i].LotNo +
                                                 '</option>');
                                         }
@@ -914,6 +971,7 @@
                             asnDetails = res.data;
                             for (var i = 0; i < res.data.length; i++) {
                                 if (skuNo != '' && skuNo == res.data[i].SkuNo) {
+                                   
                                     if (i == 0) {
                                         $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
                                             .SkuName);
@@ -947,6 +1005,7 @@
                                 $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
                             }
                         } else {
+                           
                         }
                     });
                 }
@@ -1024,7 +1083,8 @@
                                 tr.show();
                                 arrTrs[i] = tr
                             }
-
+                            //璁剧疆鍒嗛〉
+                            setPages(1, res.data.length)
 
                         } else { //涓嶆垚鍔�
                             layer.msg("鏃犳暟鎹�", {
@@ -1032,6 +1092,7 @@
                                 time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
                             }, function () { });
                             $("#boxNum").val(0)
+                            setPages(1, 0)
                         }
                     });
                 }
@@ -1085,22 +1146,22 @@
                                             };
                                             console.log(Id)
                                             console.log(param)
-                                            // sendData(IP + "/PdaAsn/DelBoxInfo", 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 () { });
-                                            //     }
-                                            // });
+                                            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 () { });
+                                                }
+                                            });
                                         }
                                     })
                                 })
@@ -1109,7 +1170,7 @@
                             }
 
                             //璁剧疆鍒嗛〉
-                            setPages(1, list.length)
+                            setPages(1, res.data.length)
 
                         } else { //涓嶆垚鍔�
                             layer.msg("鏃犳暟鎹�", {
@@ -1232,218 +1293,99 @@
             /* 鍒嗛〉 */
             //璁剧疆鍒嗛〉
             function setPages(pageIndex, boxNum) {
+				if (boxNum <= 0) {
+					//鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮�
+					$("#tableBoxPages").hide()
+					return
+				}
 
-                if (xianshiyemian == 0) {
-                    if (boxNum <= 0) {
-                        //鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮�
-                        $("#tableBoxPages").hide()
-                        return
-                    }
+				let pageNum = Math.floor(boxNum / 10);
+				if (boxNum % 10 > 0) {
+					pageNum += 1;
+				}
+				//console.log("pageNum is " + pageNum)
 
-                    let pageNum = Math.floor(boxNum / 10);
-                    if (boxNum % 10 > 0) {
-                        pageNum += 1;
-                    }
-                    //console.log("pageNum is " + pageNum)
+				$("#tableBoxPages").find("tr").remove()
+				let table = $("#tableBoxPages")
+				$("<tr></tr>").appendTo("#tableBoxPages")
 
-                    $("#tableBoxPages").find("tr").remove()
-                    let table = $("#tableBoxPages")
-                    $("<tr></tr>").appendTo("#tableBoxPages")
+				// let newTr = table.append("<tr></tr>")
+				// newTr.append("<td class='page-prev'>涓婁竴椤�</td>")
+				$("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages tr")
+				$("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function () {
+					onClickPrevPage()
+				})
+				for (i = 1; i < pageNum + 1; i++) {
+					// newTr.append("<td class='page-num'>"+ i +"</td>")
+					$("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages tr")
+				}
+				// newTr.append("<td class='page-next'>涓嬩竴椤�</td>")
+				$("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr")
+				$("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function () {
+					onClickNextPage()
+				})
+				// pages.show()
+				$("#tableBoxPages").show()
 
-                    // let newTr = table.append("<tr></tr>")
-                    // newTr.append("<td class='page-prev'>涓婁竴椤�</td>")
-                    $("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages tr")
-                    $("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function () {
-                        onClickPrevPage()
-                    })
-                    for (i = 1; i < pageNum + 1; i++) {
-                        // newTr.append("<td class='page-num'>"+ i +"</td>")
-                        $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages tr")
-                    }
-                    // newTr.append("<td class='page-next'>涓嬩竴椤�</td>")
-                    $("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr")
-                    $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function () {
-                        onClickNextPage()
-                    })
-                    // pages.show()
-                    $("#tableBoxPages").show()
+				setCurPage(1)
+			}
 
-                    setCurPage(1)
-                }
-                else if (xianshiyemian == 1) {
-                    if (boxNum <= 0) {
-                        //鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮�
-                        $("#tableBoxPages1").hide()
-                        return
-                    }
+			//璁剧疆褰撳墠鍒嗛〉
+			function setCurPage(pageIndex) {
+				let totalTrNum = $("#tableBoxList tr").length
+				if (totalTrNum <= 2) {
+					//console.log("tableBoxList 涓虹┖ totalTrNum: " + totalTrNum)
+					//curPageIndex = 1
+					return
+				}
 
-                    let pageNum = Math.floor(boxNum / 10);
-                    if (boxNum % 10 > 0) {
-                        pageNum += 1;
-                    }
-                    //console.log("pageNum is " + pageNum)
+				let pageNum = getBoxPageNum()
+				if (pageIndex > pageNum) {
+					//console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex)
+					//curPageIndex = 1
+					return
+				}
 
-                    $("#tableBoxPages1").find("tr").remove()
-                    let table = $("#tableBoxPages1")
-                    $("<tr></tr>").appendTo("#tableBoxPages1")
+				let startIndex = (pageIndex - 1) * 10 + 1
+				let n = totalTrNum - startIndex
+				let endIndex = 0
+				if (n > 9) {
+					endIndex = startIndex + 9
+				} else {
+					endIndex = startIndex + n
+				}
+				//console.log("startIndex is "+startIndex)
+				//console.log("endIndex is "+endIndex)
+				//startIndex =2
+				//endIndex = 2
+				let trs = $("#tableBoxList tr")
+				//console.log("琛屾暟 "+trs.length)
+				let d = 0
+				for (let i = 2; i < trs.length; i++) {
+					//console.log("琛岀储寮� " + trs.eq(i).attr('index'))
+					let t = trs.eq(i)
+					d = t.attr('index')
+					if (d >= startIndex && d <= endIndex) {
+						//console.log("闇�瑕佹樉绀�")
+						//鏄剧ず琛�
+						t.show()
+					} else {
+						//闅愯棌琛�
+						t.hide()
+					}
+				}
 
-                    // let newTr = table.append("<tr></tr>")
-                    // newTr.append("<td class='page-prev'>涓婁竴椤�</td>")
-                    $("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages1 tr")
-                    $("#tableBoxPages1 tr").eq(0).find("td[id^='prevPage']").click(function () {
-                        onClickPrevPage()
-                    })
-                    for (i = 1; i < pageNum + 1; i++) {
-                        // newTr.append("<td class='page-num'>"+ i +"</td>")
-                        $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages1 tr")
-                    }
-                    // newTr.append("<td class='page-next'>涓嬩竴椤�</td>")
-                    $("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages1 tr")
-                    $("#tableBoxPages1 tr").eq(0).find("td[id^='nextPage']").click(function () {
-                        onClickNextPage()
-                    })
-                    // pages.show()
-                    $("#tableBoxPages1").show()
+				curPageIndex = pageIndex
 
-                    setCurPage(1)
-                }
-
-            }
-
-            //璁剧疆褰撳墠鍒嗛〉
-            function setCurPage(pageIndex) {
-                if (xianshiyemian == 0) {
-                    let totalTrNum = $("#tableBoxList tr").length
-                    if (totalTrNum <= 2) {
-                        //console.log("tableBoxList 涓虹┖ totalTrNum: " + totalTrNum)
-                        //curPageIndex = 1
-                        return
-                    }
-
-                    let pageNum = getBoxPageNum()
-                    if (pageIndex > pageNum) {
-                        //console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex)
-                        //curPageIndex = 1
-                        return
-                    }
-
-                    let startIndex = (pageIndex - 1) * 10 + 1
-                    let n = totalTrNum - startIndex
-                    let endIndex = 0
-                    if (n > 9) {
-                        endIndex = startIndex + 9
-                    } else {
-                        endIndex = startIndex + n
-                    }
-
-                    let trs = $("#tableBoxList tr")
-                    //console.log("琛屾暟 "+trs.length)
-                    let d = 0
-                    for (let i = 2; i < trs.length; i++) {
-                        //console.log("琛岀储寮� " + trs.eq(i).attr('index'))
-                        let t = trs.eq(i)
-                        d = t.attr('index')
-                        if (d >= startIndex && d <= endIndex) {
-                            //console.log("闇�瑕佹樉绀�")
-                            //鏄剧ず琛�
-                            t.show()
-                        } else {
-                            //闅愯棌琛�
-                            t.hide()
-                        }
-                    }
-
-                    curPageIndex = pageIndex
-
-                    let ptr = $("#tableBoxPages tr")
-                    for (let i = 1; i < pageNum + 1; i++) {
-                        ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
-                        if (i == curPageIndex) {
-                            ptr.eq(0).find("td").eq(i).addClass("page-num-select")
-                        }
-                    }
-                }
-                else if (xianshiyemian == 1) {
-                    let totalTrNum = $("#tableBoxList1 tr").length
-                    if (totalTrNum <= 2) {
-                        return
-                    }
-
-                    let pageNum = getBoxPageNum()
-                    if (pageIndex > pageNum) {
-                        //console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex)
-                        //curPageIndex = 1
-                        return
-                    }
-
-                    let startIndex = (pageIndex - 1) * 10 + 1
-                    let n = totalTrNum - startIndex
-                    let endIndex = 0
-                    if (n > 9) {
-                        endIndex = startIndex + 9
-                    } else {
-                        endIndex = startIndex + n
-                    }
-
-                    let trs = $("#tableBoxList1 tr")
-                    //console.log("琛屾暟 "+trs.length)
-                    let d = 0
-                    for (let i = 2; i < trs.length; i++) {
-                        //console.log("琛岀储寮� " + trs.eq(i).attr('index'))
-                        let t = trs.eq(i)
-                        d = t.attr('index')
-                        if (d >= startIndex && d <= endIndex) {
-                            //console.log("闇�瑕佹樉绀�")
-                            //鏄剧ず琛�
-                            t.show()
-                        } else {
-                            //闅愯棌琛�
-                            t.hide()
-                        }
-                    }
-
-                    curPageIndex = pageIndex
-
-                    let ptr = $("#tableBoxPages1 tr")
-                    for (let i = 1; i < pageNum + 1; i++) {
-                        ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
-                        if (i == curPageIndex) {
-                            ptr.eq(0).find("td").eq(i).addClass("page-num-select")
-                        }
-                    }
-                }
-
-            }
-
-            function getBoxPageNum() {
-                if (xianshiyemian == 0) {
-                    let num = $("#tableBoxList tr").length
-                    if (num <= 2) {
-                        return 0
-                    }
-
-                    let pageNum = Math.floor(num / 10);
-                    if (num % 10 > 0) {
-                        pageNum += 1;
-                    }
-
-                    return pageNum
-                }
-                else if (xianshiyemian == 1) {
-                    let num = $("#tableBoxList1 tr").length
-                    if (num <= 2) {
-                        return 0
-                    }
-
-                    let pageNum = Math.floor(num / 10);
-                    if (num % 10 > 0) {
-                        pageNum += 1;
-                    }
-
-                    return pageNum
-                }
-
-            }
+				let ptr = $("#tableBoxPages tr")
+				for (let i = 1; i < pageNum + 1; i++) {
+					ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
+					if (i == curPageIndex) {
+						ptr.eq(0).find("td").eq(i).addClass("page-num-select")
+					}
+				}
+				//console.log("totalTrNum is " + totalTrNum)
+			}
 
             function onClickPrevPage() {
                 //console.log("涓婁竴椤垫寜閽鐐瑰嚮")
@@ -1456,22 +1398,35 @@
             function onClickNextPage() {
                 //console.log("涓嬩竴椤垫寜閽鐐瑰嚮")
                 let n = getBoxPageNum()
-                if (curPageIndex == n) {
+                if (curPageIndex == n-1) {
                     return
                 }
                 setCurPage(curPageIndex + 1)
             }
+            function getBoxPageNum() {
+				let num = $("#tableBoxList tr").length
+				if (num <= 2) {
+					return 0
+				}
+
+				let pageNum = Math.floor(num / 10);
+				if (num % 10 > 0) {
+					pageNum += 1;
+				}
+
+				return pageNum
+			}
 
             /*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
 
             form.on('switch(IsLianXu)', function (obj) {
                 if (obj.elem.checked) {
                     $('#BOX2').attr("style", "display:block")
-                    $('#zongDiv').attr("style", "height: 285px;")
+                    $('#zongDiv').attr("style", "height: 315px;")
                     isContinue = "1";
                 } else {
                     $('#BOX2').attr("style", "display:none")
-                    $('#zongDiv').attr("style", "height: 255px;")
+                    $('#zongDiv').attr("style", "height: 285px;")
                     isContinue = "0";
                 }
                 $('#BOXCODE2').val("");

--
Gitblit v1.8.0