| | |
| | | </ul> |
| | | </div> |
| | | |
| | | <ul> |
| | | <!-- <ul> |
| | | <li id="option1">标签</li> |
| | | <li id="option2">数量</li> |
| | | </ul> --> |
| | | |
| | | </ul> |
| | | <button id="option1" class="layout-btn" type="button">标签</button> |
| | | <button id="option2" class="layout-btn" type="button">数量</button> |
| | | <br /><br /> |
| | | |
| | | <br /> |
| | | <!-- 有码 --> |
| | | <div id="content1"> |
| | | <div id="zongDiv" class="layout-bill-info" style="height: 285px;"> |
| | |
| | | </form> |
| | | </div> |
| | | |
| | | <br> |
| | | <!-- <br> --> |
| | | |
| | | <div id="" class="cut-line"> |
| | | <img src="/assets/fengexian.png"> |
| | |
| | | </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> |
| | |
| | | |
| | | </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> |
| | |
| | | </div> |
| | | |
| | | <br> |
| | | <br> |
| | | <div id="demodiv1"> |
| | | <br><br><br><br><br><br><br> |
| | | </div> |
| | | |
| | | |
| | | <div id="" class="cut-line"> |
| | | <img src="/assets/fengexian.png"> |
| | |
| | | </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> |
| | |
| | | var form = layui.form |
| | | |
| | | /* 标签切换代码 */ |
| | | |
| | | $('#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;"); //选中后颜色 |
| | | |
| | | }); |
| | | }); |
| | |
| | | form.render('select'); |
| | | |
| | | var param = { |
| | | Type: "0,1,3" |
| | | Type: "0" |
| | | }; |
| | | sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#bar").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i] |
| | | .ASNNo + |
| | | '</option>'); |
| | | $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | |
| | |
| | | form.render('select'); |
| | | |
| | | var param = { |
| | | Type: "2,5,6,7" |
| | | Type: "1" |
| | | }; |
| | | sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | console.log(res.data); |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#bar1").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i] |
| | | .ASNNo + |
| | | '</option>'); |
| | | $("#bar1").append('<option value =' + res.data[i] + '>' + res.data[i] +'</option>'); |
| | | } |
| | | form.render('select'); |
| | | |
| | |
| | | }); |
| | | //选中入库单事件-数量 |
| | | form.on('select(getbar1)', function (data) { |
| | | updateDemoDiv(); |
| | | updateGoodList() |
| | | setOrderGoods(); |
| | | }); |
| | |
| | | BoxNo: $("#BOXCODE").val(), |
| | | IsContinue: isContinue, |
| | | TailBoxNo: $("#BOXCODE2").val(), |
| | | Origin: "PDA" |
| | | Origin: "PDA", |
| | | TableType: xianshiyemian, |
| | | } |
| | | console.log(param) |
| | | //组盘 |
| | | sendData(IP + "/PdaAsn/BindPallet", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | |
| | | AsnDetailId: parseInt($("#goodSelect1").val()), //入库单明细ID |
| | | LotNo: $("#goodSelect1").find("option:selected").text(), //物料批次 |
| | | SkuQty: parseInt($("#SkuQty").val()), //物料数量 |
| | | Origin: "PDA" |
| | | Demo: $("#NoticeDemo").val(), //物料数量 |
| | | Origin: "PDA", |
| | | TableType: xianshiyemian, |
| | | } |
| | | |
| | | console.log(param) |
| | |
| | | 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() { |
| | |
| | | $("#Standard1").val(res.data.Standard); |
| | | $("#ImportFactQuantity1").val(res.data.FactQty + ""); |
| | | } |
| | | else { } |
| | | }); |
| | | } |
| | | |
| | |
| | | console.log("出库口:" + JSON.stringify(res)) |
| | | if (res.code == 0) { //成功 |
| | | asnDetails = res.data; |
| | | if (asnDetails.length <= 0) { |
| | | layer.msg('当前单据下不存在贴标物料', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return; |
| | | } |
| | | 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>'); |
| | | } |
| | |
| | | console.log("出库口:" + JSON.stringify(res)) |
| | | if (res.code == 0) { //成功 |
| | | asnDetails = res.data; |
| | | // console.log(asnDetails.length) |
| | | if (asnDetails.length <= 0) { |
| | | layer.msg('当前单据下不存在不贴标物料', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return; |
| | | } |
| | | 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); |
| | |
| | | $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') |
| | | } |
| | | } else { |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | tr.show(); |
| | | arrTrs[i] = tr |
| | | } |
| | | |
| | | //设置分页 |
| | | setPages(1, res.data.length) |
| | | |
| | | } else { //不成功 |
| | | layer.msg("无数据", { |
| | |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | $("#boxNum").val(0) |
| | | setPages(1, 0) |
| | | } |
| | | }); |
| | | } |
| | |
| | | yes: function () { |
| | | |
| | | var param = { |
| | | Id: parseInt(Id), |
| | | PalletNo: res.data[0].PalletNo, |
| | | }; |
| | | console.log(Id) |
| | |
| | | } |
| | | |
| | | //设置分页 |
| | | setPages(1, list.length) |
| | | setPages(1, res.data.length) |
| | | |
| | | } else { //不成功 |
| | | layer.msg("无数据", { |
| | |
| | | function checkBoxInfo() { |
| | | var param = { |
| | | "BoxNo": $("#BOXCODE").val(), |
| | | "AsnNo":$("#bar").val(), |
| | | } |
| | | sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | |
| | | /* 分页 */ |
| | | //设置分页 |
| | | function setPages(pageIndex, boxNum) { |
| | | |
| | | 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) |
| | | |
| | | $("#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() |
| | | |
| | | setCurPage(1) |
| | | } |
| | | else if (xianshiyemian == 1) { |
| | | if (boxNum <= 0) { |
| | | //列表为空,隐藏分页页码 |
| | | $("#tableBoxPages1").hide() |
| | | return |
| | | } |
| | | |
| | | let pageNum = Math.floor(boxNum / 10); |
| | | if (boxNum % 10 > 0) { |
| | | pageNum += 1; |
| | | } |
| | | //console.log("pageNum is " + pageNum) |
| | | |
| | | $("#tableBoxPages1").find("tr").remove() |
| | | let table = $("#tableBoxPages1") |
| | | $("<tr></tr>").appendTo("#tableBoxPages1") |
| | | |
| | | // 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() |
| | | |
| | | setCurPage(1) |
| | | if (boxNum <= 0) { |
| | | //列表为空,隐藏分页页码 |
| | | $("#tableBoxPages").hide() |
| | | return |
| | | } |
| | | |
| | | 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") |
| | | |
| | | // 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) |
| | | } |
| | | |
| | | //设置当前分页 |
| | | function setCurPage(pageIndex) { |
| | | if (xianshiyemian == 0) { |
| | | let totalTrNum = $("#tableBoxList tr").length |
| | | if (totalTrNum <= 2) { |
| | | //console.log("tableBoxList 为空 totalTrNum: " + totalTrNum) |
| | | //curPageIndex = 1 |
| | | return |
| | | } |
| | | 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 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 |
| | | 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 { |
| | | 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") |
| | | } |
| | | //隐藏行 |
| | | t.hide() |
| | | } |
| | | } |
| | | |
| | | } |
| | | curPageIndex = pageIndex |
| | | |
| | | function getBoxPageNum() { |
| | | if (xianshiyemian == 0) { |
| | | let num = $("#tableBoxList tr").length |
| | | if (num <= 2) { |
| | | return 0 |
| | | 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") |
| | | } |
| | | |
| | | 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 |
| | | } |
| | | |
| | | //console.log("totalTrNum is " + totalTrNum) |
| | | } |
| | | |
| | | function onClickPrevPage() { |
| | |
| | | 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(""); |