From 1e26a7575d9969e728b0aa01466f490409cb173c Mon Sep 17 00:00:00 2001 From: chengsc <Demo@DESKTOP-CPA90BF> Date: 星期五, 18 十月 2024 18:41:30 +0800 Subject: [PATCH] Merge branch 'master' into csc --- Pda/View/HouseDataSetting/stockCheck.html | 137 Pda/View/HouseDataSetting/stockQuery.html | 890 +++--- Pda/View/HouseDataSetting/pingkuQuery.html | 776 +++--- Wms/WMS.BLL/DataServer/DataBoxInfoServer.cs | 9 Pda/View/HouseDataSetting/changebox.html | 1144 ++++---- Pda/View/HouseDataSetting/agvTransport.html | 50 Wms/Wms/Controllers/PdaCrController.cs | 26 HTML/views/StatisticalReport/BoxInfor.html | 1382 +++++------ Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | 1 Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs | 10 Pda/View/index.html | 416 +- Pda/View/HouseDataSetting/boxQuery.html | 462 +++ Wms/Model/ModelDto/PdaDto/PdaBoxInfoDto.cs | 69 Pda/View/HouseDataSetting/returnGoodOut.html | 1688 +++++++------ Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs | 106 Wms/WMS.Entity/DataEntity/DataBoxInfo.cs | 5 Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs | 2 17 files changed, 3,915 insertions(+), 3,258 deletions(-) diff --git a/HTML/views/StatisticalReport/BoxInfor.html b/HTML/views/StatisticalReport/BoxInfor.html index 79a54ca..c1ec8c7 100644 --- a/HTML/views/StatisticalReport/BoxInfor.html +++ b/HTML/views/StatisticalReport/BoxInfor.html @@ -1,85 +1,92 @@ <!DOCTYPE html> <html> - <head> - <meta charset="utf-8"> - <title>鎵樼洏鏄庣粏鍒楄〃</title> - <meta name="renderer" content="webkit"> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> - <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> - <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> - <link rel="stylesheet" href="../../css/public.css" media="all"> - <style type="text/css"> - .layui-form-item .layui-inline { - margin-bottom: 1px; - margin-right: 1px; - } - - </style> - <script> - // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮� - document.addEventListener("DOMContentLoaded", function() { - //鑾峰彇table榛樿鏄剧ず鏁� - pageCntFirst(); - //鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆� - GetIsSetColW(); - }); - </script> - - </head> - <body id="body"> - <div class="layui-fluid" style="padding-bottom: 0;"> - <div class="layui-card"> - <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="top"> - <div class="layui-form-item" style="margin-bottom: 0px;"> - <div class="layui-inline zongdan" > - <label class="layui-form-label" style="width: 60px;">鐗╂枡缂栫爜</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <input type="text" id="SkuNo" name="SkuNo" placeholder="鐗╂枡缂栫爜" autocomplete="off" class="layui-input"> - </div> - </div> - <div class="layui-inline zongdan" > - <label class="layui-form-label" style="width: 60px;">鐗╂枡鍚嶇О</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <input type="text" id="SkuName" name="SkuName" placeholder="鐗╂枡鍚嶇О" autocomplete="off" class="layui-input"> - </div> - </div> - <div class="layui-inline zongdan" > - <label class="layui-form-label" style="width: 60px;">鎵樼洏鍙�</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <input type="text" id="PalletNo" name="PalletNo" placeholder="鎵樼洏鍙�" autocomplete="off" class="layui-input"> - </div> - </div> - <div class="layui-inline mingxi"> - <label class="layui-form-label" style="width: 60px;">璐т富缂栫爜</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <input type="text" id="OwnerNo" name="OwnerNo" placeholder="璐т富缂栫爜" autocomplete="off" - class="layui-input"> - </div> - </div> - <div class="layui-inline mingxi"> - <label class="layui-form-label" style="width: 60px;">璐т富鍚嶇О</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <input type="text" id="OwnerName" name="OwnerName" placeholder="璐т富鍚嶇О" autocomplete="off" - class="layui-input"> - </div> - </div> - <div class="layui-inline mingxi"> - <label class="layui-form-label" style="width: 60px;">杩涘巶缂栧彿</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <input type="text" id="LotNo" name="LotNo" placeholder="杩涘巶缂栧彿" autocomplete="off" class="layui-input"> - </div> - </div> - <!-- 绠辩爜 绠辨敮鐘舵�� 妫�楠屾爣璁� 闆剁鏍囪 璐ㄩ噺鐘舵�� --> +<head> + <meta charset="utf-8"> + <title>鎵樼洏鏄庣粏鍒楄〃</title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" + content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> + <link rel="stylesheet" href="../../css/public.css" media="all"> + <style type="text/css"> + .layui-form-item .layui-inline { + margin-bottom: 1px; + margin-right: 1px; + } + </style> + <script> + // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮� + document.addEventListener("DOMContentLoaded", function () { + //鑾峰彇table榛樿鏄剧ず鏁� + pageCntFirst(); + //鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆� + GetIsSetColW(); + }); + </script> - <div class="layui-inline zongdan" > - <label class="layui-form-label" style="width: 60px;">绠辩爜</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <input type="text" id="BoxNo" name="BoxNo" placeholder="绠辩爜" autocomplete="off" class="layui-input"> - </div> +</head> + +<body id="body"> + <div class="layui-fluid" style="padding-bottom: 0;"> + <div class="layui-card"> + <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="top"> + <div class="layui-form-item" style="margin-bottom: 0px;"> + <div class="layui-inline zongdan"> + <label class="layui-form-label" style="width: 60px;">鐗╂枡缂栫爜</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="SkuNo" name="SkuNo" placeholder="鐗╂枡缂栫爜" autocomplete="off" + class="layui-input"> </div> - <!-- <div class="layui-inline zhijian"> + </div> + <div class="layui-inline zongdan"> + <label class="layui-form-label" style="width: 60px;">鐗╂枡鍚嶇О</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="SkuName" name="SkuName" placeholder="鐗╂枡鍚嶇О" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline zongdan"> + <label class="layui-form-label" style="width: 60px;">鎵樼洏鍙�</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="PalletNo" name="PalletNo" placeholder="鎵樼洏鍙�" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline mingxi"> + <label class="layui-form-label" style="width: 60px;">璐т富缂栫爜</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="OwnerNo" name="OwnerNo" placeholder="璐т富缂栫爜" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline mingxi"> + <label class="layui-form-label" style="width: 60px;">璐т富鍚嶇О</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="OwnerName" name="OwnerName" placeholder="璐т富鍚嶇О" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline mingxi"> + <label class="layui-form-label" style="width: 60px;">杩涘巶缂栧彿</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="LotNo" name="LotNo" placeholder="杩涘巶缂栧彿" autocomplete="off" + class="layui-input"> + </div> + </div> + + <!-- 绠辩爜 绠辨敮鐘舵�� 妫�楠屾爣璁� 闆剁鏍囪 璐ㄩ噺鐘舵�� --> + + <div class="layui-inline zongdan"> + <label class="layui-form-label" style="width: 60px;">绠辩爜</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="BoxNo" name="BoxNo" placeholder="绠辩爜" autocomplete="off" + class="layui-input"> + </div> + </div> + <!-- <div class="layui-inline zhijian"> <label class="layui-form-label" style="width: 60px;">绠辨敮鐘舵��</label> <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> <select name="Status" id="Status" lay-search> @@ -91,102 +98,99 @@ </select> </div> </div> --> - <div class="layui-inline zhijian"> - <label class="layui-form-label" style="width: 60px;">鎶芥鏍囪</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <select name="InspectMark" id="InspectMark" lay-filter="InspectMark" - lay-search> - <option value=""></option> - <option value="0">鍚�</option> - <option value="1">鏄�</option> - </select> - </div> - </div> - <div class="layui-inline zhijian"> - <label class="layui-form-label" style="width: 60px;">闆舵墭鏍囪</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <select name="BitPalletMark" id="BitPalletMark" lay-filter="BitPalletMark" - lay-search> - <option value=""></option> - <option value="0">鍚�</option> - <option value="1">鏄�</option> - </select> - </div> - </div> - <div class="layui-inline zhijian"> - <label class="layui-form-label" style="width: 60px;">闆剁鏍囪</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <select name="BitBoxMark" id="BitBoxMark" lay-filter="BitBoxMark" - lay-search> - <option value=""></option> - <option value="0">鍚�</option> - <option value="1">鏄�</option> - </select> - </div> - </div> - <div class="layui-inline zhijian"> - <label class="layui-form-label" style="width: 60px;">璐ㄦ鐘舵��</label> - <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> - <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" - lay-search> - <option value=""></option> - <option value="0">寰呰川妫�</option><!-- 寰呮楠� --> - <option value="1">妫�楠屽悎鏍�</option><!-- 鍚堟牸鍝� --> - <option value="2">涓嶅悎鏍�</option><!-- 涓嶅悎鏍� --> - <option value="3">鏀剧疆鏈�</option><!-- 涓嶅悎鏍� --> - </select> - </div> - </div> - - <div class="layui-inline sousuo"> - <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储 - </button> - <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit - lay-filter="daochu"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>瀵煎嚭 - </button> + <div class="layui-inline zhijian"> + <label class="layui-form-label" style="width: 60px;">鎶芥鏍囪</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <select name="InspectMark" id="InspectMark" lay-filter="InspectMark" lay-search> + <option value=""></option> + <option value="0">鍚�</option> + <option value="1">鏄�</option> + </select> </div> </div> + <div class="layui-inline zhijian"> + <label class="layui-form-label" style="width: 60px;">闆舵墭鏍囪</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <select name="BitPalletMark" id="BitPalletMark" lay-filter="BitPalletMark" lay-search> + <option value=""></option> + <option value="0">鍚�</option> + <option value="1">鏄�</option> + </select> + </div> + </div> + <div class="layui-inline zhijian"> + <label class="layui-form-label" style="width: 60px;">闆剁鏍囪</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <select name="BitBoxMark" id="BitBoxMark" lay-filter="BitBoxMark" lay-search> + <option value=""></option> + <option value="0">鍚�</option> + <option value="1">鏄�</option> + </select> + </div> + </div> + <div class="layui-inline zhijian"> + <label class="layui-form-label" style="width: 60px;">璐ㄦ鐘舵��</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" lay-search> + <option value=""></option> + <option value="0">寰呰川妫�</option><!-- 寰呮楠� --> + <option value="1">妫�楠屽悎鏍�</option><!-- 鍚堟牸鍝� --> + <option value="2">涓嶅悎鏍�</option><!-- 涓嶅悎鏍� --> + <option value="3">鏀剧疆鏈�</option><!-- 涓嶅悎鏍� --> + </select> + </div> + </div> + + <div class="layui-inline sousuo"> + <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit + lay-filter="LAY-app-contlist-search"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储 + </button> + <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="daochu"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>瀵煎嚭 + </button> + </div> </div> + </div> - <div class="layui-card-body"> - <div style="position: relative;"> - <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> - <ul class="layui-tab-title" id="tab"> - <li class="layui-this">鎵樼洏鏄庣粏</li> - <li >绠辩爜鏄庣粏</li> - </ul> + <div class="layui-card-body"> + <div style="position: relative;"> + <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> + <ul class="layui-tab-title" id="tab"> + <li class="layui-this">鎵樼洏鏄庣粏</li> + <li>绠辩爜鏄庣粏</li> + </ul> - <div id="center"> - </div> + <div id="center"> + </div> - <div class="layui-tab-content"> - <div class="layui-tab-item layui-show"> - <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� --> - <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> - <!-- #region 鑷畾涔夎〃澶� --> - <div class="headerSetIcon"> - <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols"> - <i class="layui-icon"></i> - </button> - </div> - <!-- #endregion --> + <div class="layui-tab-content"> + <div class="layui-tab-item layui-show"> + <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� --> + <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> + <!-- #region 鑷畾涔夎〃澶� --> + <div class="headerSetIcon"> + <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols"> + <i class="layui-icon"></i> + </button> </div> + <!-- #endregion --> </div> - <div class="layui-tab-item"> - <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� --> - <table id="LAY-app-content-list2" lay-filter="LAY-app-content-list2"></table> - <!-- #region 鑷畾涔夎〃澶� --> - <div class="headerSetIcon"> - <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols2"> - <i class="layui-icon"></i> - </button> - </div> - <!-- #endregion --> + </div> + <div class="layui-tab-item"> + <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� --> + <table id="LAY-app-content-list2" lay-filter="LAY-app-content-list2"></table> + <!-- #region 鑷畾涔夎〃澶� --> + <div class="headerSetIcon"> + <button class="layui-btn layui-btn-primary layui-btn-sm" + data-type="customCols2"> + <i class="layui-icon"></i> + </button> + </div> + <!-- #endregion --> - <!-- #region 鑷畾涔夎〃澶� --> - <script type="text/html" id="templetProductionTime"> + <!-- #region 鑷畾涔夎〃澶� --> + <script type="text/html" id="templetProductionTime"> {{# function GetBtn(d){ return formatDate(d.ProductionTime); } @@ -194,22 +198,30 @@ {{ GetBtn(d) }} </script> - <script type="text/html" id="templetInspectTime"> + <script type="text/html" id="templetInspectTime"> {{# function GetBtn1(d){ return formatDate(d.InspectTime); } }} {{ GetBtn1(d) }} </script> - <!-- #endregion --> - </div> + + <script type="text/html" id="templetExpirationTime"> + {{# function GetBtn1(d){ + return formatDate(d.ExpirationTime); + } + }} + {{ GetBtn1(d) }} + </script> + <!-- #endregion --> </div> </div> </div> - </div> - - <script type="text/html" id="BoxStatus"> + + </div> + + <script type="text/html" id="BoxStatus"> {{# if(d.Status=='0'){ }} <p>鏈粍鎵�</p> {{# } else if(d.Status == '1') { }} @@ -225,14 +237,14 @@ {{# } }} </script> - <script type="text/html" id="InspectMarkStatus"> + <script type="text/html" id="InspectMarkStatus"> {{# if(d.InspectMark=='0'){ }} <p>鍚�</p> {{# } else if(d.InspectMark == '1') { }} <p>鏄�</p> {{# } }} </script> - <script type="text/html" id="BitPalletMarkStatus"> + <script type="text/html" id="BitPalletMarkStatus"> {{# if(d.BitPalletMark=='0'){ }} <p>鍚�</p> {{# } else if(d.BitPalletMark == '1') { }} @@ -240,7 +252,7 @@ {{# } }} </script> - <script type="text/html" id="InspectStatus1"> + <script type="text/html" id="InspectStatus1"> {{# if(d.InspectStatus == '0') { }} <p>寰呮楠�</p> {{# } else if(d.InspectStatus == '1'){ }} @@ -251,618 +263,490 @@ <p>鏀剧疆鏈�</p> {{# } }} </script> - <script type="text/html" id="BitPalletMarkStatus1"> + <script type="text/html" id="BitPalletMarkStatus1"> {{# if(d.BitBoxMark=='0'){ }} <p>鍚�</p> {{# } else if(d.BitBoxMark == '1') { }} <p>鏄�</p> {{# } }} </script> - <script type="text/html" id="table-content-list"> + <script type="text/html" id="table-content-list"> <button class="layui-btn layui-btn-normal layui-btn-xs approvalBtnupt" id="approvalBtnupt" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>璇︽儏 </button> </script> - </div> </div> </div> + </div> - <script src="../../layuiadmin/layui/layui.js"></script> - <script src="../../js/public.js"></script> - <script src="../../js/jquery-3.5.1.min.js"></script> - <script src="../../js/jquery.cookie.js"></script> - <script> - var uid = $.cookie('userId'); - layui.config({ - base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� - }).extend({ - index: 'lib/index' //涓诲叆鍙fā鍧� - }).use(['index', 'table', 'laypage', 'layer','element','laydate'], function() { - var table = layui.table, - form = layui.form, - laypage = layui.laypage, - layer = layui.layer; - element = layui.element; - laydate = layui.laydate; + <script src="../../layuiadmin/layui/layui.js"></script> + <script src="../../js/public.js"></script> + <script src="../../js/jquery-3.5.1.min.js"></script> + <script src="../../js/jquery.cookie.js"></script> + <script> + var uid = $.cookie('userId'); + layui.config({ + base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['index', 'table', 'laypage', 'layer', 'element', 'laydate'], function () { + var table = layui.table, + form = layui.form, + laypage = layui.laypage, + layer = layui.layer; + element = layui.element; + laydate = layui.laydate; - var h1 = GetTableTabHeight(); - // var h1 = GetTkableTopHeight(); - // console.log(h1) + var h1 = GetTableTabHeight(); + // var h1 = GetTkableTopHeight(); + // console.log(h1) - laydate.render({ - elem: '#StartTime', - format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� - }); - laydate.render({ - elem: '#EndTime', - format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� - }); - //鑾峰彇褰撳墠鏃堕棿 - function getNowTime() { - var date = new Date(); - //骞� getFullYear()锛氬洓浣嶆暟瀛楄繑鍥炲勾浠� - var year = date.getFullYear(); //getFullYear()浠f浛getYear() - //鏈� getMonth()锛�0 ~ 11 - var month = date.getMonth() + 1; - //鏃� getDate()锛�(1 ~ 31) - var day = date.getDate(); - //鏃� getHours()锛�(0 ~ 23) - var hour = date.getHours(); - //鍒� getMinutes()锛� (0 ~ 59) - var minute = date.getMinutes(); - //绉� getSeconds()锛�(0 ~ 59) - var second = date.getSeconds(); - - var time = year + addZero(month) + addZero(day) + addZero(hour) + addZero(minute) + addZero(second); - return time; - - //灏忎簬10鐨勬嫾鎺ヤ笂0瀛楃涓� - - }; - function addZero(s) { - return s < 10 ? ('0' + s) : s; - }; + laydate.render({ + elem: '#StartTime', + format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� + }); + laydate.render({ + elem: '#EndTime', + format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� + }); + //鑾峰彇褰撳墠鏃堕棿 + function getNowTime() { + var date = new Date(); + //骞� getFullYear()锛氬洓浣嶆暟瀛楄繑鍥炲勾浠� + var year = date.getFullYear(); //getFullYear()浠f浛getYear() + //鏈� getMonth()锛�0 ~ 11 + var month = date.getMonth() + 1; + //鏃� getDate()锛�(1 ~ 31) + var day = date.getDate(); + //鏃� getHours()锛�(0 ~ 23) + var hour = date.getHours(); + //鍒� getMinutes()锛� (0 ~ 59) + var minute = date.getMinutes(); + //绉� getSeconds()锛�(0 ~ 59) + var second = date.getSeconds(); - var $ = layui.$; - var yemianid =0; - refreshTable("","","","","","","","","","","",""); + var time = year + addZero(month) + addZero(day) + addZero(hour) + addZero(minute) + addZero(second); + return time; - // 琛ㄥ崟闇�瑕佺殑鍙橀噺 - var infoOptions; - //#region 鍘熷闈炶嚜瀹氫箟鍒� - // infoOptions = { - // elem: '#LAY-app-content-list', - // height: 'full-206', - // id: 'LAY-app-content-list', - // page: true, - // limit: pageCnt, - // limits: pageLimits, - // even: true, - // cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - // cols: - // [[ - // { - // title: '搴忓彿', type: 'numbers', fixed: 'left' - // }, - // { - // field: 'AreaNo', title: '鎵�灞炲尯鍩�', align: 'center', - // }, - // { - // field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center' - // }, - // { - // field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', - // }, - // { - // field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center' - // }, - // { - // field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', - // }, - // { - // field: 'LotNo', title: '鎵规鍙�', align: 'center', - // }, - // { - // field: 'LotText', title: '鎵规鎻忚堪', align: 'center' - // }, - // { - // field: 'SupplierLot', title: '渚涜揣鎵规', align: 'center', - // }, - // { - // field: 'Qty', title: '鏁伴噺', align: 'center' - // }, - // { - // field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center', - // }, - // { - // field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center' - // }, - // { - // field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus' - // }, - // { - // field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus' - // }, - // //{ - // // field: 'Status', title: '鎵樼洏鐘舵��', align: 'center', templet: '#PalletStatus', - // //}, - // ]] - // }; - //#endregion + //灏忎簬10鐨勬嫾鎺ヤ笂0瀛楃涓� + }; + function addZero(s) { + return s < 10 ? ('0' + s) : s; + }; + + var $ = layui.$; + var yemianid = 0; + refreshTable("", "", "", "", "", "", "", "", "", "", "", ""); + + // 琛ㄥ崟闇�瑕佺殑鍙橀噺 + var infoOptions; + //#region 鑷畾涔夎〃澶� + var TotalColsArr = [[ + { field: '', title: '搴忓彿', type: 'numbers', align: 'center', fixed: 'left', "disabled": true }, + { field: 'WareHouseName', title: '鎵�灞炰粨搴�', align: 'center' }, + { field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center' }, + { field: 'AreaName', title: '鎵�灞炲尯鍩�', align: 'center' }, + { field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center' }, + { field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center' }, + { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center' }, + { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center' }, + { field: 'OwnerNo', title: '璐т富缂栫爜', align: 'center' }, + { field: 'OwnerName', title: '璐т富鍚嶇О', align: 'center' }, + { field: 'SupplierNo', title: '鐢熶骇鍟嗙紪鐮�', align: 'center' }, + { field: 'SupplierName', title: '鐢熶骇鍟嗗悕绉�', align: 'center' }, + { field: 'LotNo', title: '杩涘巶缂栧彿', align: 'center' }, + { field: 'LotText', title: '鎵规鎻忚堪', align: 'center' }, + { field: 'SupplierLot', title: '鍘熷巶鎵瑰彿', align: 'center' }, + { field: 'Qty', title: '鏁伴噺', align: 'center' }, + { field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center', }, + { field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center' }, + { field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus' }, + { field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus' }, + { field: 'Demo', title: '瀵勫瓨澶囨敞', align: 'center' }, + ]]; + var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + //#endregion + //鑾峰彇鎵樼洏鏄庣粏 + function refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark, InspectStatus, OwnerNo, OwnerName) { //#region 鑷畾涔夎〃澶� - var TotalColsArr = [[ - {field: '',title: '搴忓彿',type:'numbers',align: 'center',fixed: 'left', "disabled": true}, - {field: 'WareHouseName', title: '鎵�灞炰粨搴�', align: 'center'}, - {field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center'}, - {field: 'AreaName', title: '鎵�灞炲尯鍩�', align: 'center'}, - {field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center'}, - {field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center'}, - {field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center'}, - {field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center'}, - {field: 'OwnerNo',title: '璐т富缂栫爜',align: 'center'}, - {field: 'OwnerName',title: '璐т富鍚嶇О',align: 'center'}, - {field: 'SupplierNo',title: '鐢熶骇鍟嗙紪鐮�',align: 'center'}, - {field: 'SupplierName',title: '鐢熶骇鍟嗗悕绉�',align: 'center'}, - {field: 'LotNo', title: '杩涘巶缂栧彿', align: 'center'}, - {field: 'LotText', title: '鎵规鎻忚堪', align: 'center'}, - {field: 'SupplierLot', title: '鍘熷巶鎵瑰彿', align: 'center'}, - {field: 'Qty', title: '鏁伴噺', align: 'center'}, - {field: 'LockQty', title: '閿佸畾鏁伴噺', align: 'center',}, - {field: 'FrozenQty', title: '鍐荤粨鏁伴噺', align: 'center'}, - {field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus'}, - {field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', templet: '#BitPalletMarkStatus'}, - {field: 'Demo', title: '瀵勫瓨澶囨敞', align: 'center'}, - ]]; - var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 - //#endregion - //鑾峰彇鎵樼洏鏄庣粏 - function refreshTable(SkuNo,SkuName,PalletNo,LotNo,BoxNo,Status,InspectMark,BitPalletMark,BitBoxMark,InspectStatus,OwnerNo,OwnerName) { - //#region 鑷畾涔夎〃澶� - var colsJson - var param1={ - Href:'Statistical/GetBindList' - }; - sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) { - if (res.code == 0){ - if(res.data=='' || res.data==undefined || res.data==null){ - colsJson=TotalColsArr - }else{ - colsJson= eval(res.data); - } - }else{ - colsJson=TotalColsArr + var colsJson + var param1 = { + Href: 'Statistical/GetBindList' + }; + sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { + if (res.code == 0) { + if (res.data == '' || res.data == undefined || res.data == null) { + colsJson = TotalColsArr + } else { + colsJson = eval(res.data); } - infoOptions = { - elem: '#LAY-app-content-list', - height: h1, - id: 'LAY-app-content-list', - page: true, - limit: pageCnt, - limits: pageLimits, - even: true, - cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - done: function(){ - //鑷畾涔夊垪瀹� - SetTableColW('LAY-app-content-list','Statistical/GetBindList',TotalColsSysArr); - }, - cols:colsJson + } else { + colsJson = TotalColsArr + } + infoOptions = { + elem: '#LAY-app-content-list', + height: h1, + id: 'LAY-app-content-list', + page: true, + limit: pageCnt, + limits: pageLimits, + even: true, + cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 + done: function () { + //鑷畾涔夊垪瀹� + SetTableColW('LAY-app-content-list', 'Statistical/GetBindList', TotalColsSysArr); + }, + cols: colsJson + }; + + var param = { + SkuNo: SkuNo, //鐗╂枡鍙� + SkuName: SkuName, //鐗╂枡鍚嶇О + palletNo: PalletNo, //鎵樼洏鍙� + LotNo: LotNo, //鎵规鍙� + BoxNo: BoxNo, //绠辩爜 + Status: Status, //绠辨敮鐘舵�� + InspectMark: InspectMark, //妫�楠屾爣璁� + BitPalletMark: BitPalletMark, //闆舵墭鏍囪 + BitBoxMark: BitBoxMark, //闆剁鏍囪 + InspectStatus: InspectStatus, //璐ㄩ噺鐘舵�� + OwnerNo: OwnerNo, //璐т富缂栫爜 + OwnerName: OwnerName //璐т富鍚嶇О + }; + sendData(IP + "/Statistical/GetBindList", param, 'get', function (res) { + console.log(res) + if (res.code == 0) { //鎴愬姛 + var list = res.data; + $.extend(infoOptions, { + data: list + }); + infoOptions.page = { + curr: 1 + } + tableIns = table.render(infoOptions); + } + else { //涓嶆垚鍔� + layer.msg('鑾峰彇鎬婚噺鍒楄〃淇℃伅澶辫触锛�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + }); + //#endregion + } + + // 琛ㄥ崟闇�瑕佺殑鍙橀噺 + var infoOptions2; + + + //鑾峰彇鏄庣粏淇℃伅 + //#region 鑷畾涔夎〃澶� + var DetailColsArr = [[ + { field: '', title: '搴忓彿', type: 'numbers', fixed: 'left', "disabled": true }, + { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center' }, + { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center' }, + { field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 110 }, + { field: 'BoxNo', title: '绠辩爜', align: 'center', width: 100 }, + { field: 'Status', title: '绠辨敮鐘舵��', align: 'center', templet: '#BoxStatus' }, + { field: 'LotNo', title: '杩涘巶缂栧彿', align: 'center' }, + { field: 'LotText', title: '鎵规鎻忚堪', align: 'center' }, + { field: 'Qty', title: '鏁伴噺', width: 90, align: 'center' }, + { field: 'FullQty', title: '鏁寸鏁伴噺', width: 100, align: 'center' }, + { field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', templet: '#templetProductionTime' }, + { field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus' }, + { field: 'BitBoxMark', templet: '#BitPalletMarkStatus1', title: '闆剁鏍囪', align: 'center' }, + { field: 'InspectStatus', templet: '#InspectStatus1', title: '璐ㄦ鐘舵��', align: 'center' }, + { field: 'InspectTime', title: '澶嶆鏃堕棿', align: 'center', templet: '#templetInspectTime' }, + { field: 'ExpirationTime', title: '鏈夋晥鏈熻嚦', align: 'center', templet: '#templetExpirationTime' }, + { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', align: 'center', toolbar: '#table-content-list', "disabled": true } + ]]; + var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + //#endregion + function refreshTable2(Id, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus) { + //#region 鑷畾涔夎〃澶� + var colsJson2 + var param1 = { + Href: 'Statistical/GetBoxInfo' + }; + sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { + if (res.code == 0) { + if (res.data == '' || res.data == undefined || res.data == null) { + colsJson2 = DetailColsArr + } else { + colsJson2 = eval(res.data); + } + } else { + colsJson2 = DetailColsArr + } + infoOptions2 = { + elem: '#LAY-app-content-list2', + height: h1, + id: 'LAY-app-content-list2', + page: true, + limit: pageCnt, + limits: pageLimits, + even: true, + cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 + done: function () { + //鑷畾涔夊垪瀹� + SetTableColW('LAY-app-content-list2', 'Statistical/GetBoxInfo', DetailColsSysArr); + }, + cols: colsJson2 + }; + + var param = { + Id: Id, + SkuNo: SkuNo, + SkuName: SkuName, + LotNo: LotNo, + PalletNo: PalletNo, + BoxNo: BoxNo, + Status: Status, + InspectMark: InspectMark, + BitBoxMark: BitBoxMark, + InspectStatu: InspectStatus + } + sendData(IP + "/Statistical/GetBoxInfo", param, 'get', function (res) { + if (res.code == 0) //鎴愬姛 + { + var list = res.data; + $.extend(infoOptions2, { + data: list + }); + infoOptions2.page = { + curr: 1 + } + tableIns2 = table.render(infoOptions2); + } + else //涓嶆垚鍔� + { + layer.msg('鑾峰彇鏄庣粏鍒楄〃淇℃伅澶辫触锛�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }) + }); + //#endregion + } + + //var url = IP + "/Statistical/GetInventoryList1"; + + + + //鎺ュ彈鍏ㄥ眬鍙橀噺 + let quanid = ''; + //鐩戝惉鎼滅储 + form.on('submit(LAY-app-contlist-search)', function (data) { + var SkuNo = $("#SkuNo").val(); + var SkuName = $("#SkuName").val(); + var LotNo = $("#LotNo").val(); + var PalletNo = $("#PalletNo").val(); + + var BoxNo = $("#BoxNo").val(); + var Status = $("#Status").val(); + var InspectMark = $("#InspectMark").val(); + var BitPalletMark = $("#BitPalletMark").val(); + var BitBoxMark = $("#BitBoxMark").val(); + var InspectStatus = $("#InspectStatus").val(); + + var OwnerNo = $("#OwnerNo").val(); + var OwnerName = $("#OwnerName").val(); + + if (yemianid == 0) { + console.log("鎬诲崟"); + refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark, InspectStatus, OwnerNo, OwnerName); + } else if (yemianid == 1) { + quanid = ''; + console.log("鏄庣粏"); + refreshTable2(quanid, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus); + } + + }); + //瑙﹀彂琛屽弻鍑讳簨浠� + table.on('rowDouble(LAY-app-content-list)', function (obj) { + $(".layui-tab-title>li").attr("class", ""); + $('.layui-tab-title>li').eq(1).attr('class', 'layui-this'); + $('.layui-tab-content .layui-tab-item').attr('class', 'layui-tab-item') + $('.layui-tab-content .layui-tab-item').eq(1).attr('class', 'layui-tab-item layui-show') + console.log(obj.data.Id); + quanid = obj.data.Id; + refreshTable2(obj.data.Id); + yemianid = 1; + }); + + //鐩戝惉Tab鍒囨崲锛屼互鏀瑰彉鍦板潃hash鍊� + element.on('tab(docDemoTabBrief)', function (data) { + var SkuNo = $("#SkuNo").val(); + var SkuName = $("#SkuName").val(); + var LotNo = $("#LotNo").val(); + var PalletNo = $("#PalletNo").val(); + + var BoxNo = $("#BoxNo").val(); + var Status = $("#Status").val(); + var InspectMark = $("#InspectMark").val(); + var BitPalletMark = $("#BitPalletMark").val(); + var BitBoxMark = $("#BitBoxMark").val(); + var InspectStatus = $("#InspectStatus").val(); + + var OwnerNo = $("#OwnerNo").val(); + var OwnerName = $("#OwnerName").val(); + + console.log(data.index); + yemianid = data.index + if (yemianid == 0) { + console.log("鎬诲崟"); + refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark, InspectStatus, OwnerNo, OwnerName); + } else if (yemianid == 1) { + console.log("鏄庣粏"); + refreshTable2(quanid, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus); + } + }); + var doing = true; + // ------------------------------------璇︽儏--------------------------------------------------- + table.on('tool(LAY-app-content-list2)', function (obj) { + console.log(obj) + var data = obj.data; + //璇︽儏 + if (obj.event === 'edit') { + BoxNo = data.BoxNo; + console.log(data) + layer.open({ + type: 2, + title: '绠辨敮璇︽儏淇℃伅', + content: 'BoxSupportInfor.html?BoxNo=' + BoxNo, + maxmin: true, + area: ['80%', '85%'], + btn: ['鍏抽棴'], + yes: function (index, layero) { + var iframeWindow = window['layui-layer-iframe' + index], + submitID = 'layuiadmin-app-form-edit', + submit = layero.find('iframe').contents().find('#' + submitID); + if (doing) { + doing = false; + + layer.close(index); //鍏抽棴寮瑰眰 + refreshTable(); + doing = true; + + + } + } + }); + } + }); + + form.on('submit(daochu)', function () { + layer.confirm('纭畾瀵煎嚭褰撳墠鏁版嵁鍚楋紵', function (index) { + if (yemianid == 0) { + console.log("鎵樼洏鏄庣粏"); + var param = { + SkuNo: $("#SkuNo").val(), + SkuName: $("#SkuName").val(), + LotNo: $("#LotNo").val(), + PalletNo: $("#PalletNo").val(), + + BoxNo: $("#BoxNo").val(), + Status: $("#Status").val(), + InspectMark: $("#InspectMark").val(), + BitPalletMark: $("#BitPalletMark").val(), + BitBoxMark: $("#BitBoxMark").val(), + InspectStatus: $("#InspectStatus").val() }; - var param = { - SkuNo:SkuNo, //鐗╂枡鍙� - SkuName:SkuName, //鐗╂枡鍚嶇О - palletNo:PalletNo, //鎵樼洏鍙� - LotNo:LotNo, //鎵规鍙� - BoxNo:BoxNo, //绠辩爜 - Status:Status, //绠辨敮鐘舵�� - InspectMark:InspectMark, //妫�楠屾爣璁� - BitPalletMark:BitPalletMark, //闆舵墭鏍囪 - BitBoxMark:BitBoxMark, //闆剁鏍囪 - InspectStatus:InspectStatus, //璐ㄩ噺鐘舵�� - OwnerNo:OwnerNo, //璐т富缂栫爜 - OwnerName:OwnerName //璐т富鍚嶇О - }; - sendData(IP + "/Statistical/GetBindList", param, 'get', function(res) { - console.log(res) + sendData(IP + "/Statistical/GetBindListDaoChu", param, 'get', function (res) { + console.log(res); if (res.code == 0) { //鎴愬姛 var list = res.data; - $.extend(infoOptions, { - data: list + table.exportFile(tableIns.config.id, list, 'xls', "鎵樼洏鏄庣粏淇℃伅" + getNowTime(),); //data 涓鸿瀹炰緥涓殑浠绘剰鏁伴噺鐨勬暟鎹� + layer.msg('瀵煎嚭鎴愬姛锛�', { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + }); - infoOptions.page = { - curr: 1 - } - tableIns = table.render(infoOptions); - } - else { //涓嶆垚鍔� - layer.msg('鑾峰彇鎬婚噺鍒楄〃淇℃伅澶辫触锛�', { + + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇淇℃伅澶辫触锛�', { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); + }, function () { }); } }); - }); - //#endregion - } - - // 琛ㄥ崟闇�瑕佺殑鍙橀噺 - var infoOptions2; - //#region 鍘熷闈炶嚜瀹氫箟鍒� - // infoOptions2 = { - // elem: '#LAY-app-content-list2', - // height: 'full-206', - // id: 'LAY-app-content-list2', - // page: true, - // limit: pageCnt, - // limits: pageLimits, - // even: true, - // cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - // cols: - // [[ - // { - // title: '搴忓彿', type: 'numbers', fixed: 'left' - // }, - // { - // field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', - // }, - // { - // field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', - // }, - // { - // field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 110, - // }, - // { - // field: 'BoxNo', title: '绠辩爜', align: 'center', width: 100, - // }, - // { - // field: 'Status', title: '绠辨敮鐘舵��', align: 'center', templet: '#BoxStatus', - // }, - // { - // field: 'LotNo', title: '鎵规鍙�', align: 'center', - // }, - // { - // field: 'LotText', title: '鎵规鎻忚堪', align: 'center', - // }, - // { - // field: 'Qty', title: '鏁伴噺', width: 90, align: 'center', - // }, - // { - // field: 'FullQty', title: '鏁寸鏁伴噺', width: 100, align: 'center', - // }, - // { - // field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', - // templet: function(d) { - // return formatDate(d.ProductionTime); - // }, - // }, - // { - // field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus', - // }, - // { - // field: 'BitBoxMark', templet: '#BitPalletMarkStatus1', title: '闆剁鏍囪', align: 'center', - // }, - // { - // field: 'InspectStatus', templet: '#InspectStatus1', title: '璐ㄦ鐘舵��', align: 'center', - // }, - // { - // field: 'InspectTime', title: '澶嶆鏃堕棿', align: 'center', - // templet: function(d) { - // return formatDate(d.InspectTime); - // }, - // }, - // { - // title: '鎿嶄綔', fixed: 'right', align: 'center', toolbar: '#table-content-list' - // } - // ]] - // }; - //#endregion - - //鑾峰彇鏄庣粏淇℃伅 - //#region 鑷畾涔夎〃澶� - var DetailColsArr = [[ - {field: '',title: '搴忓彿',type:'numbers',fixed: 'left', "disabled": true}, - {field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center'}, - {field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center'}, - {field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 110}, - {field: 'BoxNo', title: '绠辩爜', align: 'center', width: 100}, - {field: 'Status', title: '绠辨敮鐘舵��', align: 'center', templet: '#BoxStatus'}, - {field: 'LotNo', title: '杩涘巶缂栧彿', align: 'center'}, - {field: 'LotText', title: '鎵规鎻忚堪', align: 'center'}, - {field: 'Qty', title: '鏁伴噺', width: 90, align: 'center'}, - {field: 'FullQty', title: '鏁寸鏁伴噺', width: 100, align: 'center'}, - {field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center',templet: '#templetProductionTime'}, - {field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus'}, - {field: 'BitBoxMark', templet: '#BitPalletMarkStatus1', title: '闆剁鏍囪', align: 'center'}, - {field: 'InspectStatus', templet: '#InspectStatus1', title: '璐ㄦ鐘舵��', align: 'center'}, - {field: 'InspectTime', title: '澶嶆鏃堕棿', align: 'center',templet: '#templetInspectTime'}, - {field: 'caozuo',title: '鎿嶄綔', fixed: 'right', align: 'center', toolbar: '#table-content-list', "disabled": true} - ]]; - var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 - //#endregion - function refreshTable2(Id,SkuNo,SkuName,LotNo,PalletNo,BoxNo,Status,InspectMark,BitBoxMark,InspectStatus) { - //#region 鑷畾涔夎〃澶� - var colsJson2 - var param1={ - Href:'Statistical/GetBoxInfo' - }; - sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) { - if (res.code == 0){ - if(res.data=='' || res.data==undefined || res.data==null){ - colsJson2=DetailColsArr - }else{ - colsJson2= eval(res.data); - } - }else{ - colsJson2=DetailColsArr - } - infoOptions2 = { - elem: '#LAY-app-content-list2', - height: h1, - id: 'LAY-app-content-list2', - page: true, - limit: pageCnt, - limits: pageLimits, - even: true, - cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - done: function(){ - //鑷畾涔夊垪瀹� - SetTableColW('LAY-app-content-list2','Statistical/GetBoxInfo',DetailColsSysArr); - }, - cols:colsJson2 - }; - + } else if (yemianid == 1) { + console.log("绠辩爜鏄庣粏"); var param = { - Id:Id, - SkuNo:SkuNo, - SkuName:SkuName, - LotNo:LotNo, - PalletNo:PalletNo, - BoxNo:BoxNo, - Status:Status, - InspectMark:InspectMark, - BitBoxMark:BitBoxMark, - InspectStatu:InspectStatus - } - sendData(IP + "/Statistical/GetBoxInfo", param, 'get', function(res) { - if (res.code == 0) //鎴愬姛 - { + Id: quanid, + SkuNo: $("#SkuNo").val(), + SkuName: $("#SkuName").val(), + LotNo: $("#LotNo").val(), + LocatNo: $("#LocatNo").val(), + PalletNo: $("#PalletNo").val(), + Status: $("#Status").val(), + InspectStatus: $("#InspectStatus").val(), + IsSamolingTray: $("#IsSamolingTray").val(), + StartTime: $("#StartTime").val(), + EndTime: $("#EndTime").val(), + }; + sendData(IP + "/Statistical/GetBoxInfoDaoChu", param, 'get', function (res) { + console.log(res); + if (res.code == 0) { //鎴愬姛 var list = res.data; - $.extend(infoOptions2, { - data: list + table.exportFile(tableIns2.config.id, list, 'xls', "绠辩爜鏄庣粏淇℃伅" + getNowTime(),); //data 涓鸿瀹炰緥涓殑浠绘剰鏁伴噺鐨勬暟鎹� + layer.msg('瀵煎嚭鎴愬姛锛�', { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + }); - infoOptions2.page = { - curr: 1 - } - tableIns2 = table.render(infoOptions2); - } - else //涓嶆垚鍔� - { - layer.msg('鑾峰彇鏄庣粏鍒楄〃淇℃伅澶辫触锛�', { + + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇淇℃伅澶辫触锛�', { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - } - }) - }); - //#endregion - } - - //var url = IP + "/Statistical/GetInventoryList1"; - - - - //鎺ュ彈鍏ㄥ眬鍙橀噺 - let quanid = ''; - //鐩戝惉鎼滅储 - form.on('submit(LAY-app-contlist-search)', function(data) { - var SkuNo = $("#SkuNo").val(); - var SkuName = $("#SkuName").val(); - var LotNo = $("#LotNo").val(); - var PalletNo = $("#PalletNo").val(); - - var BoxNo = $("#BoxNo").val(); - var Status = $("#Status").val(); - var InspectMark = $("#InspectMark").val(); - var BitPalletMark = $("#BitPalletMark").val(); - var BitBoxMark = $("#BitBoxMark").val(); - var InspectStatus = $("#InspectStatus").val(); - - var OwnerNo = $("#OwnerNo").val(); - var OwnerName = $("#OwnerName").val(); - - if(yemianid == 0){ - console.log("鎬诲崟"); - refreshTable(SkuNo,SkuName,PalletNo,LotNo,BoxNo,Status,InspectMark,BitPalletMark,BitBoxMark,InspectStatus,OwnerNo,OwnerName); - }else if(yemianid == 1){ - quanid = ''; - console.log("鏄庣粏"); - refreshTable2(quanid,SkuNo,SkuName,LotNo,PalletNo,BoxNo,Status,InspectMark,BitBoxMark,InspectStatus); - } - - }); - //瑙﹀彂琛屽弻鍑讳簨浠� - table.on('rowDouble(LAY-app-content-list)', function(obj) { - $(".layui-tab-title>li").attr("class", ""); - $('.layui-tab-title>li').eq(1).attr('class', 'layui-this'); - $('.layui-tab-content .layui-tab-item').attr('class', 'layui-tab-item') - $('.layui-tab-content .layui-tab-item').eq(1).attr('class', 'layui-tab-item layui-show') - console.log(obj.data.Id); - quanid = obj.data.Id; - refreshTable2(obj.data.Id); - yemianid=1; - }); - - //鐩戝惉Tab鍒囨崲锛屼互鏀瑰彉鍦板潃hash鍊� - element.on('tab(docDemoTabBrief)', function(data){ - var SkuNo = $("#SkuNo").val(); - var SkuName = $("#SkuName").val(); - var LotNo = $("#LotNo").val(); - var PalletNo = $("#PalletNo").val(); - - var BoxNo = $("#BoxNo").val(); - var Status = $("#Status").val(); - var InspectMark = $("#InspectMark").val(); - var BitPalletMark = $("#BitPalletMark").val(); - var BitBoxMark = $("#BitBoxMark").val(); - var InspectStatus = $("#InspectStatus").val(); - - var OwnerNo = $("#OwnerNo").val(); - var OwnerName = $("#OwnerName").val(); - - console.log(data.index); - yemianid = data.index - if(yemianid == 0){ - console.log("鎬诲崟"); - refreshTable(SkuNo,SkuName,PalletNo,LotNo,BoxNo,Status,InspectMark,BitPalletMark,BitBoxMark,InspectStatus,OwnerNo,OwnerName); - }else if(yemianid == 1){ - console.log("鏄庣粏"); - refreshTable2(quanid,SkuNo,SkuName,LotNo,PalletNo,BoxNo,Status,InspectMark,BitBoxMark,InspectStatus); - } - }); - var doing = true; - // ------------------------------------璇︽儏--------------------------------------------------- - table.on('tool(LAY-app-content-list2)', function(obj) { - console.log(obj) - var data = obj.data; - //璇︽儏 - if (obj.event === 'edit') { - BoxNo = data.BoxNo; - console.log(data) - layer.open({ - type: 2, - title: '绠辨敮璇︽儏淇℃伅', - content: 'BoxSupportInfor.html?BoxNo=' + BoxNo, - maxmin: true, - area: ['80%', '85%'], - btn: ['鍏抽棴'], - yes: function(index, layero) { - var iframeWindow = window['layui-layer-iframe' + index], - submitID = 'layuiadmin-app-form-edit', - submit = layero.find('iframe').contents().find('#' + submitID); - if(doing) - { - doing = false; - - layer.close(index); //鍏抽棴寮瑰眰 - refreshTable(); - doing = true; - - - } + }, function () { }); } }); - } - }); - - form.on('submit(daochu)', function () { - layer.confirm('纭畾瀵煎嚭褰撳墠鏁版嵁鍚楋紵', function(index) { - if(yemianid == 0){ - console.log("鎵樼洏鏄庣粏"); - var param = { - SkuNo : $("#SkuNo").val(), - SkuName : $("#SkuName").val(), - LotNo : $("#LotNo").val(), - PalletNo : $("#PalletNo").val(), - - BoxNo : $("#BoxNo").val(), - Status : $("#Status").val(), - InspectMark : $("#InspectMark").val(), - BitPalletMark : $("#BitPalletMark").val(), - BitBoxMark : $("#BitBoxMark").val(), - InspectStatus : $("#InspectStatus").val() - }; - - sendData(IP + "/Statistical/GetBindListDaoChu", param, 'get', function (res) { - console.log(res); - if (res.code == 0) { //鎴愬姛 - var list = res.data; - table.exportFile(tableIns.config.id, list,'xls',"鎵樼洏鏄庣粏淇℃伅"+getNowTime(),); //data 涓鸿瀹炰緥涓殑浠绘剰鏁伴噺鐨勬暟鎹� - layer.msg('瀵煎嚭鎴愬姛锛�', { - icon: 1, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { - - }); - - } else { //涓嶆垚鍔� - layer.msg('鑾峰彇淇℃伅澶辫触锛�', { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } - }); - }else if(yemianid == 1){ - console.log("绠辩爜鏄庣粏"); - var param = { - Id:quanid, - SkuNo: $("#SkuNo").val(), - SkuName: $("#SkuName").val(), - LotNo:$("#LotNo").val(), - LocatNo:$("#LocatNo").val(), - PalletNo:$("#PalletNo").val(), - Status:$("#Status").val(), - InspectStatus:$("#InspectStatus").val(), - IsSamolingTray:$("#IsSamolingTray").val(), - StartTime: $("#StartTime").val(), - EndTime: $("#EndTime").val(), - }; - sendData(IP + "/Statistical/GetBoxInfoDaoChu", param, 'get', function (res) { - console.log(res); - if (res.code == 0) { //鎴愬姛 - var list = res.data; - table.exportFile(tableIns2.config.id, list,'xls',"绠辩爜鏄庣粏淇℃伅"+getNowTime(),); //data 涓鸿瀹炰緥涓殑浠绘剰鏁伴噺鐨勬暟鎹� - layer.msg('瀵煎嚭鎴愬姛锛�', { - icon: 1, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { - - }); - - } else { //涓嶆垚鍔� - layer.msg('鑾峰彇淇℃伅澶辫触锛�', { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } - }); - } - }); - - - }); - - //#region 鑷畾涔夎〃澶� - //鑷畾涔夎〃澶� - active = { - customCols: function(){ - layer.open({ - type: 2, - title: '鑷畾涔夊垪', - content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetBindList&ColsSysArr='+TotalColsSysArr, - maxmin: false, - resize: false, - area: ['970px', '650px'] - }); - }, - customCols2: function(){ - layer.open({ - type: 2, - title: '鑷畾涔夊垪', - content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetBoxInfo&ColsSysArr='+DetailColsSysArr, - maxmin: false, - resize: false, - area: ['970px', '650px'] - }); } - - }; - $('.layui-btn').on('click', function() { - var type = $(this).data('type'); - active[type] ? active[type].call(this) : ''; }); - //#endregion + + }); - </script> - </body> -</html> + + //#region 鑷畾涔夎〃澶� + //鑷畾涔夎〃澶� + active = { + customCols: function () { + layer.open({ + type: 2, + title: '鑷畾涔夊垪', + content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetBindList&ColsSysArr=' + TotalColsSysArr, + maxmin: false, + resize: false, + area: ['970px', '650px'] + }); + }, + customCols2: function () { + layer.open({ + type: 2, + title: '鑷畾涔夊垪', + content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetBoxInfo&ColsSysArr=' + DetailColsSysArr, + maxmin: false, + resize: false, + area: ['970px', '650px'] + }); + } + + }; + $('.layui-btn').on('click', function () { + var type = $(this).data('type'); + active[type] ? active[type].call(this) : ''; + }); + //#endregion + }); + </script> +</body> + +</html> \ No newline at end of file diff --git a/Pda/View/HouseDataSetting/agvTransport.html b/Pda/View/HouseDataSetting/agvTransport.html index e0660df..3418149 100644 --- a/Pda/View/HouseDataSetting/agvTransport.html +++ b/Pda/View/HouseDataSetting/agvTransport.html @@ -7,7 +7,7 @@ <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> --> <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> --> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> - <title>Boxline PDA</title> + <title>AGV杞繍</title> <link rel="stylesheet" href="/layui/css/layui.css" /> <link rel="stylesheet" href="/css/style.css" /> @@ -232,7 +232,7 @@ </select> <img src="/assets/down_arraw.png"> </div> - </div> + </div> <table class="layout-tbl-submit" border="" cellspacing="" cellpadding=""> <tr> @@ -334,7 +334,7 @@ //褰撳墠鍒嗛〉 var curPageIndex = 1; - + // 鎵樼洏鐮佹枃鏈敼鍙樻椂瑙﹀彂 $("#STOCKCODE").on('input', function () { if ($("#STOCKCODE").val() == "" || $("#STOCKCODE").val().length < 8) { @@ -385,7 +385,7 @@ }); } else if (xianshiyemian == 1) { - + } } @@ -429,7 +429,7 @@ if (res.code == 0) { //鎴愬姛 for (var i = 0; i < res.data.length; i++) { $("#Quyu").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i] - .AreaNo + '-'+res.data[i].AreaName+ + .AreaNo + '-' + res.data[i].AreaName + '</option>'); } form.render('select'); @@ -444,9 +444,9 @@ callback(res.data) } else { //涓嶆垚鍔� layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); } }); } @@ -476,7 +476,7 @@ sendData(IP + "/PdaCr/GetRunSoNoticeList", param, 'get', function (res) { if (res.code == 0) { //鎴愬姛 for (var i = 0; i < res.data.length; i++) { - $("#OutNo").append('<option value =' + res.data[i] + '>' + res.data[i]+ + $("#OutNo").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); } form.render('select'); @@ -497,8 +497,8 @@ } }); } - //閫変腑鍑哄簱鍗曚簨浠� - form.on('select(getOutNo)', function (data) { + //閫変腑鍑哄簱鍗曚簨浠� + form.on('select(getOutNo)', function (data) { $("#PalletNo").empty() $("#PalletNo").append('<option value =>' + '</option>'); form.render('select'); @@ -537,12 +537,12 @@ form.render('select'); var param = { - soNo:$("#OutNo").val() + soNo: $("#OutNo").val() }; sendData(IP + "/PdaCr/GetPalletNoListBySoNo", param, 'get', function (res) { if (res.code == 0) { //鎴愬姛 for (var i = 0; i < res.data.length; i++) { - $("#PalletNo").append('<option value =' + res.data[i] + '>' + res.data[i]+ + $("#PalletNo").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); } form.render('select'); @@ -606,7 +606,7 @@ if (res.code == 0) { //鎴愬姛 for (var i = 0; i < res.data.length; i++) { $("#Quyu2").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i] - .AreaNo + '-'+res.data[i].AreaName+ + .AreaNo + '-' + res.data[i].AreaName + '</option>'); } form.render('select'); @@ -621,9 +621,9 @@ callback(res.data) } else { //涓嶆垚鍔� layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); } }); } @@ -664,7 +664,7 @@ icon: 1, time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { - + }); } else { //涓嶆垚鍔� layer.msg(res.msg, { @@ -683,7 +683,7 @@ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }); return; - } + } // if ($("#PalletNo").val() == "") { // layer.msg('璇锋壂鎻忔墭鐩樻潯鐮�', { // icon: 2, @@ -710,7 +710,7 @@ icon: 1, time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { - + }); } else { //涓嶆垚鍔� layer.msg(res.msg, { @@ -737,13 +737,13 @@ for (i = len - 1; i >= 2; i--) { trs[i].remove(); } - if($("#STOCKCODE").val()==''){ + if ($("#STOCKCODE").val() == '') { return; } var param = { PalletNo: $("#STOCKCODE").val(), - IsHuiKu:1 + IsHuiKu: 1 }; // 鏍规嵁鎵樼洏鍙疯幏鍙栫鐮佷俊鎭� sendData(IP + "/PdaCr/GetSkuInfoByPalletNo", param, 'get', function (res) { @@ -762,7 +762,7 @@ 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='num']").html(res.data[i].Qty); tr.show(); arrTrs[i] = tr } @@ -785,7 +785,7 @@ for (i = len - 1; i >= 2; i--) { trs[i].remove(); } - if($("#PalletNo").val()==''){ + if ($("#PalletNo").val() == '') { return; } var param = { @@ -808,7 +808,7 @@ 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='num']").html(res.data[i].Qty); tr.show(); arrTrs[i] = tr } diff --git a/Pda/View/HouseDataSetting/boxQuery.html b/Pda/View/HouseDataSetting/boxQuery.html new file mode 100644 index 0000000..b407c97 --- /dev/null +++ b/Pda/View/HouseDataSetting/boxQuery.html @@ -0,0 +1,462 @@ +<!DOCTYPE html> +<html> + +<head> + <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + <title>绠辩爜鏌ヨ</title> + <link rel="stylesheet" href="/layui/css/layui.css" /> + <link rel="stylesheet" href="/css/style.css" /> + <script src="/js/adaptive.js"></script> + + <link rel="stylesheet" href="/css/my.css" /> + <style type="text/css"> + .layui-form-label { + width: 20%; + } + + .layui-input-block { + width: 80%; + margin-left: 20%; + } + + .div-tbl-title { + width: 98%; + margin: auto; + /* background-color: #4476A7; */ + height: 30px; + margin-top: 20px; + } + + .div-tbl-title table { + width: 100%; + height: 30px; + } + + .div-tbl-title td { + width: 50%; + height: 30px; + line-height: 30px; + } + + .div-tbl-title span { + float: left; + width: 60%; + height: 30px; + line-height: 30px; + } + + .div-tbl-title input { + float: left; + width: 40%; + height: 30px; + line-height: 30px; + border: none; + } + + .layout-tbl-paging { + margin-top: 0; + } + + .layout-bill-info { + height: auto; + } + + .btn-ok { + border: none; + color: #FFFFFF; + background-color: #0a93e3; + width: 48%; + height: 36px; + border-radius: 5px; + float: left; + margin: 0 1%; + margin-left: 25%; + } + + .btn-ok:active { + opacity: 0.8; + } + + td { + word-break: break-all; + word-wrap: break-word; + } + </style> + <link rel="stylesheet" href="/css/adapter.css" /> +</head> + +<body> + <div id="" class="main-content"> + <div id="" class="layout-title"> + <table border="" cellspacing="" cellpadding=""> + <tr> + <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td> + <td class="title-text">绠辩爜鏌ヨ</td> + <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td> + </tr> + </table> + </div> + <div id="" class="layout-sub-content"> + <div id="menuList" class="menu"> + <ul class="" style="text-align: center;"> + <li><a href="../index.html">涓婚〉</a></li> + <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> + </ul> + </div> + + <div id="" class="layout-bill-info"> + <form class="layui-form" action="" style="height: auto;"> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">澶栫鏉$爜</label> + <div class="layui-input-block"> + <input id="BoxNo" type="text" placeholder="璇锋壂鎻忕鐮�" autocomplete="off" class="layui-input"> + </div> + </div> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">鐗╂枡缂栫爜</label> + <div class="layui-input-block"> + <input id="SkuNo" type="text" autocomplete="off" class="layui-input" style="border: 0px; " + disabled> + </div> + </div> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">鐗╂枡鍚嶇О</label> + <div class="layui-input-block"> + <input id="SkuName" type="text" autocomplete="off" class="layui-input" style="border: 0px;" + disabled> + </div> + </div> + + <table class="layout-tbl-input" border="" cellspacing="" cellpadding=""> + <tr> + <td> + <div id="" class="layui-form-item layout-boxinfo"> + <label class="layui-form-label" lang>杩涘巶缂栧彿锛�</label> + <div class="layui-input-block"> + <input id="LotNo" type="text" disabled placeholder="" autocomplete="off" + class="layui-input"> + </div> + </div> + </td> + <td> + <div id="" class="layui-form-item layout-boxinfo"> + <label class="layui-form-label" lang>鍘熷巶鎵瑰彿锛�</label> + <div class="layui-input-block"> + <input id="SupplierLot" type="text" disabled placeholder="" autocomplete="off" + class="layui-input"> + </div> + </div> + </td> + + </tr> + <tr> + <td> + <div id="" class="layui-form-item layout-boxinfo"> + <label class="layui-form-label" lang>绠卞唴鏁伴噺锛�</label> + <div class="layui-input-block"> + <input id="Qty" type="text" disabled placeholder="" autocomplete="off" + class="layui-input"> + </div> + </div> + </td> + <td> + <div id="" class="layui-form-item layout-boxinfo"> + <label class="layui-form-label" lang>璐ㄩ噺鐘舵�侊細</label> + <div class="layui-input-block"> + <input id="InspectStatus" type="text" disabled placeholder="" autocomplete="off" + class="layui-input"> + </div> + </div> + </td> + </tr> + </table> + + + <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;"> + <button id="btnQuery" class="btn-ok" type="button">鏌ヨ</button> + </div> + </form> + </div> + + + <div id="" class="layout-tbl-paging" style="margin-top: 5px;"> + <!-- 绠卞唴鏀俊鎭� --> + <table id="tableBoxList" class="tbl-box-list" border="1px"> + <tr> + <th>鏀爜</th> + <th>鏁伴噺</th> + </tr> + <tr id="boxCell" style="display: none;"> + <td name="BoxNo">鏀爜</td> + <td name="Qty">鏁伴噺</td> + </tr> + </table> + + <!-- 鍒嗛〉 --> + <table id="tableBoxPages" class="tbl-box-pages" cellspacing="" cellpadding=""> + <tr> + <td class="page-prev">涓婁竴椤�</td> + <td class="page-num page-num-select">1</td> + <td class="page-num">2</td> + <td class="page-num">3</td> + <td class="page-num">4</td> + <td class="page-num">5</td> + <td class="page-next">涓嬩竴椤�</td> + </tr> + </table> + + </div> + </div> + </div> + + <script src="/js/jquery-3.5.1.min.js"></script> + <script src="/layui/layui.js"></script> + <script src="/js/public.js"></script> + <script src="/js/jquery.cookie.js"></script> + <script> + layui.use(['form', 'jquery'], function () { + var form = layui.form + + //褰撳墠鍒嗛〉 + var curPageIndex = 1 + var tableData = null + + // 鍔熻兘鍒楅殣钘� + $("#menuImg").click(function (e) { + e.stopPropagation() + + if ($("#menuList").is(":hidden")) { + $("#menuList").show() + } else { + $("#menuList").hide() + } + }) + + $('body').click(function () { + $("#menuList").hide() + }) + + // 娓呯┖鏂囨湰妗嗕俊鎭� + function clear() { + $("#BoxNo").val(''); + $("#SkuNo").val(""); + $("#SkuName").val(""); + $("#LotNo").val(""); + $("#SupplierLot").val(""); + $("#Qty").val(""); + $("#InspectStatus").val(""); + + // 娓呯┖table鍒楄〃 + let trs = $("#tableBoxList tr") + let len = trs.length + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + } + + $("#btnQuery").click(function () { + if ($('#BoxNo').val() == '') { + layer.msg("璇锋壂鎻忓绠辨潯鐮�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + clear(); + return + } + + // 鑾峰彇鏌ヨ鍙傛暟 + var param = { + BoxNo: $('#BoxNo').val(), + }; + + // 鏌ヨ-鏍规嵁绠辩爜鑾峰彇璇︾粏淇℃伅 + sendData(IP + "/PdaCr/GetBoxQueryList", param, 'get', function (res) { + console.log("绠辩爜鏌ヨ锛�", res) + if (res.code == 0) { //鎴愬姛 + clear(); + $("#BoxNo").val(res.data.BoxNo); + $("#SkuNo").val(res.data.SkuNo); + $("#SkuName").val(res.data.SkuName); + $("#LotNo").val(res.data.LotNo); + $("#SupplierLot").val(res.data.SupplierLot); + $("#Qty").val(res.data.Qty); + $("#InspectStatus").val(res.data.InspectStatus); + + tableData = deepCopy(res.data.InfoList) + refreshTable() + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + clear(); + let trs = $("#tableBoxList tr") + let len = trs.length + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + }); + } + }); + }) + + function refreshTable() { + //鍏堟竻绌轰竴涓嬬瀛愬垪琛� + let trs = $("#tableBoxList tr") + let len = trs.length + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + + if (tableData.length > 0) { //鎴愬姛 + var list = tableData + var arrTrs = new Array() + let idx = 0 + for (var i in list) { + var tr = $("#boxCell").eq(0).clone(); + tr.appendTo("#tableBoxList"); + idx++; + tr.attr('index', idx) + tr.find("td[name='BoxNo']").html(list[i].BoxNo2); + tr.find("td[name='Qty']").html(list[i].Qty2); + + tr.show(); + arrTrs[i] = tr + } + + //璁剧疆鍒嗛〉 + setPages(1, list.length) + } else { //涓嶆垚鍔� + // $("#boxNum").val(0) + layer.msg("鏃犳暟鎹�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + setPages(1, 0) + } + } + + //璁剧疆鍒嗛〉 + function setPages(pageIndex, boxNum) { + 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") + + + $("<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++) { + $("<td class='page-num'>" + i + "</td>").appendTo("#tableBoxPages tr") + } + + $("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr") + $("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function () { + onClickNextPage() + }) + + $("#tableBoxPages").show() + + setCurPage(1) + } + + //璁剧疆褰撳墠鍒嗛〉 + function setCurPage(pageIndex) { + 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) { + 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") + } + } + } + + function onClickPrevPage() { + //console.log("涓婁竴椤垫寜閽鐐瑰嚮") + if (curPageIndex == 1) { + return + } + setCurPage(curPageIndex - 1) + } + + function onClickNextPage() { + //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") + let n = getBoxPageNum() + if (curPageIndex == n) { + 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 + } + }) + </script> +</body> + +</html> \ No newline at end of file diff --git a/Pda/View/HouseDataSetting/changebox.html b/Pda/View/HouseDataSetting/changebox.html index 024f111..55ad03c 100644 --- a/Pda/View/HouseDataSetting/changebox.html +++ b/Pda/View/HouseDataSetting/changebox.html @@ -1,271 +1,285 @@ <!DOCTYPE html> <html> - <head> - <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> - <meta charset="UTF-8" /> - <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> --> - <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> --> - <meta http-equiv="X-UA-Compatible" content="ie=edge" /> - <title>Boxline PDA</title> - <link rel="stylesheet" href="/layui/css/layui.css" /> - <link rel="stylesheet" href="/css/style.css" /> - <script src="/js/adaptive.js"></script> - - <link rel="stylesheet" href="/css/my.css" /> - <style type="text/css"> - .layui-form-label { - width: 20%; - } - .layui-input-block { - width: 80%; - margin-left: 20%; - } - .div-tbl-title { - width: 98%; - margin: auto; - /* background-color: #4476A7; */ - height: 30px; - margin-top: 20px; - } - .div-tbl-title table { - width: 100%; - height: 30px; - } - .div-tbl-title td { - width: 50%; - height: 30px; - line-height: 30px; - } - .div-tbl-title span { - float: left; - width: 60%; - height: 30px; - line-height: 30px; - } - .div-tbl-title input { - float: left; - width: 40%; - height: 30px; - line-height: 30px; - border: none; - } - .layout-tbl-paging { - margin-top: 0; - } - .layout-bill-info { - height: auto; - } - .btn-ok { - border: none; - color: #FFFFFF; - background-color: #0a93e3; - width: 48%; - height: 36px; - border-radius: 5px; - float: left; - margin: 0 1%; - margin-left: 20%; - } - .btn-ok:active { - opacity: 0.8; - } - .layout-tab-page { - height: auto; - } - .layui-form-switch{ - margin-top: 0; - } - </style> - <link rel="stylesheet" href="/css/adapter.css" /> - </head> - <body> - <div id="" class="main-content"> - <div id="" class="layout-title" > - <table border="" cellspacing="" cellpadding=""> +<head> + <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> + <meta charset="UTF-8" /> + <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> --> + <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> --> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + <title>鎵樼洏鍙樻洿</title> + + <link rel="stylesheet" href="/layui/css/layui.css" /> + <link rel="stylesheet" href="/css/style.css" /> + <script src="/js/adaptive.js"></script> + + <link rel="stylesheet" href="/css/my.css" /> + <style type="text/css"> + .layui-form-label { + width: 20%; + } + + .layui-input-block { + width: 80%; + margin-left: 20%; + } + + .div-tbl-title { + width: 98%; + margin: auto; + /* background-color: #4476A7; */ + height: 30px; + margin-top: 20px; + } + + .div-tbl-title table { + width: 100%; + height: 30px; + } + + .div-tbl-title td { + width: 50%; + height: 30px; + line-height: 30px; + } + + .div-tbl-title span { + float: left; + width: 60%; + height: 30px; + line-height: 30px; + } + + .div-tbl-title input { + float: left; + width: 40%; + height: 30px; + line-height: 30px; + border: none; + } + + .layout-tbl-paging { + margin-top: 0; + } + + .layout-bill-info { + height: auto; + } + + .btn-ok { + border: none; + color: #FFFFFF; + background-color: #0a93e3; + width: 48%; + height: 36px; + border-radius: 5px; + float: left; + margin: 0 1%; + margin-left: 20%; + } + + .btn-ok:active { + opacity: 0.8; + } + + .layout-tab-page { + height: auto; + } + + .layui-form-switch { + margin-top: 0; + } + </style> + <link rel="stylesheet" href="/css/adapter.css" /> +</head> + +<body> + <div id="" class="main-content"> + <div id="" class="layout-title"> + <table border="" cellspacing="" cellpadding=""> + <tr> + <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td> + <td class="title-text">鎵樼洏鍙樻洿</td> + <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td> + </tr> + </table> + </div> + <div id="" class="layout-sub-content"> + <div id="menuList" class="menu"> + <ul class="" style="text-align: center;"> + <li><a href="../index.html">涓婚〉</a></li> + <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> + </ul> + </div> + + <div id="" class="layout-bill-info"> + <form class="layui-form" action="" style="height: auto;"> + + <div id="" class="layui-form-item layout-input" style="margin-top: 10px;"> + <label class="layui-form-label">鍘熸墭鐩樻潯鐮�:</label> + <div class="layui-input-block"> + <input id="PalletNo" type="text" lay-verify="stock" placeholder="鎵樼洏鏉$爜" autocomplete="off" + class="layui-input"> + </div> + </div> + <div id="" class="layui-form-item layout-input" style="margin-top: 10px;"> + <div id="layout-boxcode" class="layui-form-item layout-input"> + <label class="layui-form-label" lang>鏄惁鏁存墭鍙樻洿锛�</label> + <div class="layui-input-block"> + <input type="checkbox" name="IsZhengTuo" id="IsZhengTuo" lay-skin="switch" + lay-text="鏄瘄鍚�" lay-filter="IsZhengTuo"> + </div> + </div> + </div> + <div id="BoxDIv" class="layui-form-item layout-input" style="margin-top: 10px;"> + <div id="layout-boxcode" class="layui-form-item layout-input"> + <label class="layui-form-label">澶栫鏉$爜:</label> + <div class="layui-input-block"> + <input id="BoxNo" type="text" placeholder="璇锋壂鎻忓绠辨潯鐮�" autocomplete="off" + class="layui-input"> + </div> + </div> + </div> + + <div id="BoxDIv2" class="layout-tab-page"> + <table class="tbl-box-sim-info" border="" cellspacing="" cellpadding=""> + <tr> + <td> + <div class="layui-form-item"> + <label class="layui-form-label" style="width: 50%;">鐗╂枡缂栧彿锛�</label> + <div class="layui-input-block" style="width: 50%;margin-left:50%;"> + <input id="SkuNo" type="text" lay-verify="" disabled placeholder="" + class="layui-input" style="font-size: 12px;padding-left: 0;"> + </div> + </div> + </td> + <td> + <div class="layui-form-item"> + <label class="layui-form-label" style="width: 25%">鎵规锛�</label> + <div class="layui-input-block" style="width: 75%;margin-left:25%;"> + <input id="LotNo" type="text" lay-verify="" disabled placeholder="" + class="layui-input" style="font-size: 12px;padding-left: 0;"> + </div> + </div> + + </td> + <td> + <div class="layui-form-item"> + <label class="layui-form-label" style="width: 34%;">鏁伴噺锛�</label> + <div class="layui-input-block" style="width: 66%;margin-left:34%;"> + <input id="BoxQty" type="text" lay-verify="" disabled placeholder="" + class="layui-input" style="font-size: 12px;padding-left: 0;"> + </div> + </div> + </td> + </tr> + <tr> + <td colspan="3"> + <div class="layui-form-item"> + <label class="layui-form-label" style="width: 17%;">鐗╂枡鍚嶇О锛�</label> + <div class="layui-input-block" style="width: 83%;margin-left:17%;"> + <input id="SkuName" type="text" lay-verify="" disabled placeholder="" + class="layui-input" style="font-size: 12px; padding-left: 0;"> + </div> + </div> + </td> + + </tr> + </table> + </div> + <div id="" class="layui-form-item layout-input" style="margin-top: 10px;"> + <label class="layui-form-label">鏂版墭鐩樻潯鐮�:</label> + <div class="layui-input-block"> + <input id="PalletNo2" type="text" lay-verify="stock" placeholder="鎵樼洏鏉$爜" autocomplete="off" + class="layui-input"> + </div> + </div> + <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;"> + <button id="btnQuery" class="btn-ok" type="button">纭</button> + </div> + </form> + </div> + + + + <div id="" class="layout-tbl-paging" style="margin-top: 15px;"> + <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding=""> <tr> - <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg" ></a></td> - <td class="title-text">鎵樼洏鍙樻洿</td> - <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg" ></td> + <th>绠辩爜</th> + <th>搴撳瓨<br>鏁伴噺</th> + </tr> + <tr id="boxCell" style="display: none;"> + <td name="boxNo">000001</td> + <td name="qty">30</td> </tr> </table> - </div> - <div id="" class="layout-sub-content"> - <div id="menuList" class="menu"> - <ul class="" style="text-align: center;"> - <li><a href="../index.html">涓婚〉</a></li> - <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> - </ul> - </div> - - <div id="" class="layout-bill-info"> - <form class="layui-form" action="" style="height: auto;"> - - <div id="" class="layui-form-item layout-input" style="margin-top: 10px;"> - <label class="layui-form-label">鍘熸墭鐩樻潯鐮�:</label> - <div class="layui-input-block"> - <input id="PalletNo" type="text" lay-verify="stock" placeholder="鎵樼洏鏉$爜" - autocomplete="off" class="layui-input"> - </div> - </div> - <div id="" class="layui-form-item layout-input" style="margin-top: 10px;"> - <div id="layout-boxcode" class="layui-form-item layout-input"> - <label class="layui-form-label" lang>鏄惁鏁存墭鍙樻洿锛�</label> - <div class="layui-input-block"> - <input type="checkbox" name="IsZhengTuo" id="IsZhengTuo" lay-skin="switch" lay-text="鏄瘄鍚�" - lay-filter="IsZhengTuo"> - </div> - </div> - </div> - <div id="BoxDIv" class="layui-form-item layout-input" style="margin-top: 10px;"> - <div id="layout-boxcode" class="layui-form-item layout-input"> - <label class="layui-form-label">澶栫鏉$爜:</label> - <div class="layui-input-block"> - <input id="BoxNo" type="text" placeholder="璇锋壂鎻忓绠辨潯鐮�" - autocomplete="off" class="layui-input"> - </div> - </div> - </div> - - <div id="BoxDIv2" class="layout-tab-page"> - <table class="tbl-box-sim-info" border="" cellspacing="" cellpadding="" > - <tr> - <td> - <div class="layui-form-item"> - <label class="layui-form-label" style="width: 50%;">鐗╂枡缂栧彿锛�</label> - <div class="layui-input-block" style="width: 50%;margin-left:50%;"> - <input id="SkuNo" type="text" lay-verify="" disabled placeholder="" - class="layui-input" style="font-size: 12px;padding-left: 0;"> - </div> - </div> - </td> - <td> - <div class="layui-form-item"> - <label class="layui-form-label" style="width: 25%">鎵规锛�</label> - <div class="layui-input-block" style="width: 75%;margin-left:25%;"> - <input id="LotNo" type="text" lay-verify="" disabled placeholder="" - class="layui-input" style="font-size: 12px;padding-left: 0;"> - </div> - </div> - - </td> - <td> - <div class="layui-form-item"> - <label class="layui-form-label" style="width: 34%;">鏁伴噺锛�</label> - <div class="layui-input-block" style="width: 66%;margin-left:34%;"> - <input id="BoxQty" type="text" lay-verify="" disabled placeholder="" - class="layui-input" style="font-size: 12px;padding-left: 0;"> - </div> - </div> - </td> - </tr> - <tr> - <td colspan="3"> - <div class="layui-form-item"> - <label class="layui-form-label" style="width: 17%;">鐗╂枡鍚嶇О锛�</label> - <div class="layui-input-block" style="width: 83%;margin-left:17%;"> - <input id="SkuName" type="text" lay-verify="" disabled placeholder="" - class="layui-input" style="font-size: 12px; padding-left: 0;"> - </div> - </div> - </td> - - </tr> - </table> - </div> - <div id="" class="layui-form-item layout-input" style="margin-top: 10px;"> - <label class="layui-form-label">鏂版墭鐩樻潯鐮�:</label> - <div class="layui-input-block"> - <input id="PalletNo2" type="text" lay-verify="stock" placeholder="鎵樼洏鏉$爜" - autocomplete="off" class="layui-input"> - </div> - </div> - <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;"> - <button id="btnQuery" class="btn-ok" type="button">纭</button> - </div> - </form> - </div> - - - - <div id="" class="layout-tbl-paging" style="margin-top: 15px;"> - <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="" > - <tr> - <th>绠辩爜</th> - <th>搴撳瓨<br>鏁伴噺</th> - </tr> - <tr id="boxCell" style="display: none;"> - <td name="boxNo">000001</td> - <td name="qty">30</td> - </tr> - </table> - - <!-- 鍒嗛〉 --> - <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding=""> - <tr > - <td class="page-prev">涓婁竴椤�</td> - <td class="page-num page-num-select">1</td> - <td class="page-num">2</td> - <td class="page-num">3</td> - <td class="page-num">4</td> - <td class="page-num">5</td> - <td class="page-next">涓嬩竴椤�</td> - </tr> - </table> - - </div> + + <!-- 鍒嗛〉 --> + <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding=""> + <tr> + <td class="page-prev">涓婁竴椤�</td> + <td class="page-num page-num-select">1</td> + <td class="page-num">2</td> + <td class="page-num">3</td> + <td class="page-num">4</td> + <td class="page-num">5</td> + <td class="page-next">涓嬩竴椤�</td> + </tr> + </table> + </div> </div> - - - - <script src="/js/jquery-3.5.1.min.js"></script> - <script src="/layui/layui.js"></script> - <script src="/js/public.js"></script> - <script src="/js/jquery.cookie.js"></script> - <script> - layui.use(['form', 'jquery'], function() { - var form = layui.form - - //褰撳墠鍒嗛〉 - var curPageIndex = 1; - //鏄惁鏁存墭鎹㈢粦 - var isContinue = "0"; - - $("#PalletNo").keydown(function(e) { - if (e.keyCode === 13) { - var bl = checkPalletState(); - if (bl) { - ReaderTable(); - } - } - }); + </div> - $("#BoxNo").keydown(function(e) { - if (e.keyCode === 13) { - readerBoxInfo(); - } - }); - $("#PalletNo2").keydown(function(e) { - if (e.keyCode === 13) { - var bl = checkPalletState(); - if (bl) { - ReaderTable2(); - } - - } - }); - form.on('switch(IsZhengTuo)', function (obj) { + <script src="/js/jquery-3.5.1.min.js"></script> + <script src="/layui/layui.js"></script> + <script src="/js/public.js"></script> + <script src="/js/jquery.cookie.js"></script> + <script> + layui.use(['form', 'jquery'], function () { + var form = layui.form + + //褰撳墠鍒嗛〉 + var curPageIndex = 1; + //鏄惁鏁存墭鎹㈢粦 + var isContinue = "0"; + + $("#PalletNo").keydown(function (e) { + if (e.keyCode === 13) { + var bl = checkPalletState(); + if (bl) { + ReaderTable(); + } + } + }); + + $("#BoxNo").keydown(function (e) { + if (e.keyCode === 13) { + readerBoxInfo(); + } + }); + + $("#PalletNo2").keydown(function (e) { + if (e.keyCode === 13) { + var bl = checkPalletState(); + if (bl) { + ReaderTable2(); + } + + } + }); + + form.on('switch(IsZhengTuo)', function (obj) { if (obj.elem.checked) { $('#BoxDIv').attr("style", "display:none") $('#BoxDIv2').attr("style", "display:none") - isContinue="1"; - } else { + isContinue = "1"; + } else { $('#BoxDIv').attr("style", "display:block") $('#BoxDIv2').attr("style", "display:block") - isContinue="0"; + isContinue = "0"; } $('#BoxNo').val(""); $('#SkuNo').val(""); @@ -274,326 +288,326 @@ $('#SkuName').val(""); }); - $("#btnQuery").click(function(){ - if($('#PalletNo').val() == '' ){ - layer.msg("璇疯緭鍏ュ師鎵樼洏鍙�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - return; - } - if(isContinue == "0" && $('#BoxNo').val() == '' ){ - layer.msg("璇疯緭鍏ョ鐮�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - return; - } - if($('#PalletNo').val() == '' ){ - layer.msg("璇疯緭鍏ユ柊鎵樼洏鍙�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - return; - } - var param = { - PalletNo: $('#PalletNo').val(), - BoxNo: $('#BoxNo').val(), - PalletNoNew: $('#PalletNo2').val() - }; - sendData(IP + "/PdaCr/SaveUnbind", param, 'post', function(res) { - if (res.code == 0) { //鎴愬姛 - - layer.msg("鎹㈢粦鎴愬姛", { - icon: 1, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - $('#BoxNo').val(''); - $("#SkuNo").val(''); - $("#LotNo").val(''); - $("#BoxQty").val(''); - $("#SkuName").val(''); - refreshTable(); - }); - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - } - }); - }) - - function ReaderTable() { - var param = { - "PalletNo": $("#PalletNo").val() - } - synData(IP + "/PdaCr/GetDataDetailList", param, 'get', function (res) { - - if (res.code == 0) { //鎴愬姛 - refreshTable(res.data); - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } - }); + $("#btnQuery").click(function () { + if ($('#PalletNo').val() == '') { + layer.msg("璇疯緭鍏ュ師鎵樼洏鍙�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + return; } - - function ReaderTable2() { - var param = { - "PalletNo": $("#PalletNo2").val() - } - synData(IP + "/PdaCr/GetDataDetailList", param, 'get', function (res) { - - if (res.code == 0) { //鎴愬姛 - refreshTable(res.data); - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } - }); + if (isContinue == "0" && $('#BoxNo').val() == '') { + layer.msg("璇疯緭鍏ョ鐮�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + return; } - - function readerBoxInfo() { - $("#SkuNo").val(''); - $("#SkuName").val(''); - $("#LotNo").val(''); - $("#BoxQty").val(''); - var param = { - "boxNo": $("#BoxNo").val() - } - synData(IP + "/PdaCr/GetBoxInfoByBox", param, 'get', function (res) { - console.log(res); - if (res.code == 0) { //鎴愬姛 - $("#SkuNo").val(res.data.SkuNo); - $("#SkuName").val(res.data.SkuName); - $("#LotNo").val(res.data.LotNo); - $("#BoxQty").val(res.data.Qty); - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } - }); + if ($('#PalletNo').val() == '') { + layer.msg("璇疯緭鍏ユ柊鎵樼洏鍙�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + return; } + var param = { + PalletNo: $('#PalletNo').val(), + BoxNo: $('#BoxNo').val(), + PalletNoNew: $('#PalletNo2').val() + }; + sendData(IP + "/PdaCr/SaveUnbind", param, 'post', function (res) { + if (res.code == 0) { //鎴愬姛 - - function refreshTable(tableData) { - //鍏堟竻绌轰竴涓嬬瀛愬垪琛� - let trs = $("#tableBoxList tr") - let len = trs.length - //console.log("tr 鏁伴噺 + " + trs.length) - for(i=len - 1; i >=2; i--){ - trs[i].remove(); - } - - if (tableData.length > 0) { //鎴愬姛 - $("#boxNum").val(tableData.length) - var list = tableData - var arrTrs = new Array() - let idx = 0 - for(var i in list) { - // list[i].BoxCode - var tr = $("#boxCell").eq(0).clone(); - tr.appendTo("#tableBoxList"); - idx++; - tr.attr('index', idx) ; - tr.find("td[name='boxNo']").html(list[i].BoxNo); - - tr.find("td[name='qty']").html(list[i].Qty); - - tr.show(); - arrTrs[i] = tr - } - - //璁剧疆鍒嗛〉 - setPages(1, list.length) + layer.msg("鎹㈢粦鎴愬姛", { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + $('#BoxNo').val(''); + $("#SkuNo").val(''); + $("#LotNo").val(''); + $("#BoxQty").val(''); + $("#SkuName").val(''); + refreshTable(); + }); } else { //涓嶆垚鍔� - layer.msg("鏃犳暟鎹�", { + layer.msg(res.msg, { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - setPages(1, 0) + }, function () { }); } - } - - - //妫�鏌ユ墭鐩樼姸鎬� - function checkPalletState(){ - var bl = false; - var param = { - "PalletNo": $("#PalletNo").val() - } - synData(IP + "/PdaSo/IsEnableOkPalletNo", param, 'post', function (res) { - - if (res.code == 0) { //鎴愬姛 - bl = true; - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { }); - } - }); - return bl; - } - - form.verify({ - stock: [/^[\S]{8}$/, '鎵樼洏鏉$爜蹇呴』涓哄叓浣嶅瓧绗�'] }); - - //----------------------------------------------------------------------------------------- - - $("#menuImg").click(function(e){ - //console.log("menuImg") - e.stopPropagation() - - if($("#menuList").is(":hidden")){ - $("#menuList").show() - }else{ - $("#menuList").hide() - } - }) - $('body').click(function(){ - // //console.log("body") - $("#menuList").hide() - }) - - - //璁剧疆鍒嗛〉 - function setPages(pageIndex, boxNum){ - 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){ - 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 - } - //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() - } - } - - 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") - } - } - //console.log("totalTrNum is " + totalTrNum) - } - - function onClickPrevPage(){ - //console.log("涓婁竴椤垫寜閽鐐瑰嚮") - if(curPageIndex == 1){ - return - } - setCurPage(curPageIndex - 1) - } - - function onClickNextPage(){ - //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") - let n = getBoxPageNum() - if(curPageIndex == n){ - 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 - } - }) - </script> - </body> -</html> + + function ReaderTable() { + var param = { + "PalletNo": $("#PalletNo").val() + } + synData(IP + "/PdaCr/GetDataDetailList", param, 'get', function (res) { + + if (res.code == 0) { //鎴愬姛 + refreshTable(res.data); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + + function ReaderTable2() { + var param = { + "PalletNo": $("#PalletNo2").val() + } + synData(IP + "/PdaCr/GetDataDetailList", param, 'get', function (res) { + + if (res.code == 0) { //鎴愬姛 + refreshTable(res.data); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + + function readerBoxInfo() { + $("#SkuNo").val(''); + $("#SkuName").val(''); + $("#LotNo").val(''); + $("#BoxQty").val(''); + var param = { + "boxNo": $("#BoxNo").val() + } + synData(IP + "/PdaCr/GetBoxInfoByBox", param, 'get', function (res) { + console.log(res); + if (res.code == 0) { //鎴愬姛 + $("#SkuNo").val(res.data.SkuNo); + $("#SkuName").val(res.data.SkuName); + $("#LotNo").val(res.data.LotNo); + $("#BoxQty").val(res.data.Qty); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + + + function refreshTable(tableData) { + //鍏堟竻绌轰竴涓嬬瀛愬垪琛� + let trs = $("#tableBoxList tr") + let len = trs.length + //console.log("tr 鏁伴噺 + " + trs.length) + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + + if (tableData.length > 0) { //鎴愬姛 + $("#boxNum").val(tableData.length) + var list = tableData + var arrTrs = new Array() + let idx = 0 + for (var i in list) { + // list[i].BoxCode + var tr = $("#boxCell").eq(0).clone(); + tr.appendTo("#tableBoxList"); + idx++; + tr.attr('index', idx); + tr.find("td[name='boxNo']").html(list[i].BoxNo); + + tr.find("td[name='qty']").html(list[i].Qty); + + tr.show(); + arrTrs[i] = tr + } + + //璁剧疆鍒嗛〉 + setPages(1, list.length) + } else { //涓嶆垚鍔� + layer.msg("鏃犳暟鎹�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + setPages(1, 0) + } + } + + + //妫�鏌ユ墭鐩樼姸鎬� + function checkPalletState() { + var bl = false; + var param = { + "PalletNo": $("#PalletNo").val() + } + synData(IP + "/PdaSo/IsEnableOkPalletNo", param, 'post', function (res) { + + if (res.code == 0) { //鎴愬姛 + bl = true; + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + return bl; + } + + form.verify({ + stock: [/^[\S]{8}$/, '鎵樼洏鏉$爜蹇呴』涓哄叓浣嶅瓧绗�'] + }); + + //----------------------------------------------------------------------------------------- + + $("#menuImg").click(function (e) { + //console.log("menuImg") + e.stopPropagation() + + if ($("#menuList").is(":hidden")) { + $("#menuList").show() + } else { + $("#menuList").hide() + } + }) + $('body').click(function () { + // //console.log("body") + $("#menuList").hide() + }) + + + //璁剧疆鍒嗛〉 + function setPages(pageIndex, boxNum) { + 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) { + 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 + } + //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() + } + } + + 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") + } + } + //console.log("totalTrNum is " + totalTrNum) + } + + function onClickPrevPage() { + //console.log("涓婁竴椤垫寜閽鐐瑰嚮") + if (curPageIndex == 1) { + return + } + setCurPage(curPageIndex - 1) + } + + function onClickNextPage() { + //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") + let n = getBoxPageNum() + if (curPageIndex == n) { + 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 + } + + }) + </script> +</body> + +</html> \ No newline at end of file diff --git a/Pda/View/HouseDataSetting/pingkuQuery.html b/Pda/View/HouseDataSetting/pingkuQuery.html index 7556d3f..345f709 100644 --- a/Pda/View/HouseDataSetting/pingkuQuery.html +++ b/Pda/View/HouseDataSetting/pingkuQuery.html @@ -1,398 +1,412 @@ <!DOCTYPE html> <html> - <head> - <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> - <meta charset="UTF-8" /> - <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> --> - <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> --> - <meta http-equiv="X-UA-Compatible" content="ie=edge" /> - <title>Boxline PDA</title> - <link rel="stylesheet" href="/layui/css/layui.css" /> - <link rel="stylesheet" href="/css/style.css" /> - <script src="/js/adaptive.js"></script> - - <link rel="stylesheet" href="/css/my.css" /> - <style type="text/css"> - .layui-form-label { - width: 20%; - } - .layui-input-block { - width: 80%; - margin-left: 20%; - } - .div-tbl-title { - width: 98%; - margin: auto; - /* background-color: #4476A7; */ - height: 30px; - margin-top: 20px; - } - .div-tbl-title table { - width: 100%; - height: 30px; - } - .div-tbl-title td { - width: 50%; - height: 30px; - line-height: 30px; - } - .div-tbl-title span { - float: left; - width: 60%; - height: 30px; - line-height: 30px; - } - .div-tbl-title input { - float: left; - width: 40%; - height: 30px; - line-height: 30px; - border: none; - } - .layout-tbl-paging { - margin-top: 0; - } - .layout-bill-info { - height: auto; - } - .btn-ok { - border: none; - color: #FFFFFF; - background-color: #0a93e3; - width: 48%; - height: 36px; - border-radius: 5px; - float: left; - margin: 0 1%; - margin-left: 25%; - } - .btn-ok:active { - opacity: 0.8; - } - td{ - word-break: break-all; - word-wrap:break-word; - } - .LotInfo{ - text-align: left; - line-height: 1.5; - padding: 5px; - } - </style> - <link rel="stylesheet" href="/css/adapter.css" /> - </head> - <body> - <div id="" class="main-content"> - <div id="" class="layout-title" > - <table border="" cellspacing="" cellpadding=""> +<head> + <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> + <meta charset="UTF-8" /> + <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> --> + <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> --> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + <title>骞冲簱鏌ヨ</title> + + <link rel="stylesheet" href="/layui/css/layui.css" /> + <link rel="stylesheet" href="/css/style.css" /> + <script src="/js/adaptive.js"></script> + + <link rel="stylesheet" href="/css/my.css" /> + <style type="text/css"> + .layui-form-label { + width: 20%; + } + + .layui-input-block { + width: 80%; + margin-left: 20%; + } + + .div-tbl-title { + width: 98%; + margin: auto; + /* background-color: #4476A7; */ + height: 30px; + margin-top: 20px; + } + + .div-tbl-title table { + width: 100%; + height: 30px; + } + + .div-tbl-title td { + width: 50%; + height: 30px; + line-height: 30px; + } + + .div-tbl-title span { + float: left; + width: 60%; + height: 30px; + line-height: 30px; + } + + .div-tbl-title input { + float: left; + width: 40%; + height: 30px; + line-height: 30px; + border: none; + } + + .layout-tbl-paging { + margin-top: 0; + } + + .layout-bill-info { + height: auto; + } + + .btn-ok { + border: none; + color: #FFFFFF; + background-color: #0a93e3; + width: 48%; + height: 36px; + border-radius: 5px; + float: left; + margin: 0 1%; + margin-left: 25%; + } + + .btn-ok:active { + opacity: 0.8; + } + + td { + word-break: break-all; + word-wrap: break-word; + } + + .LotInfo { + text-align: left; + line-height: 1.5; + padding: 5px; + } + </style> + <link rel="stylesheet" href="/css/adapter.css" /> +</head> + +<body> + <div id="" class="main-content"> + <div id="" class="layout-title"> + <table border="" cellspacing="" cellpadding=""> + <tr> + <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td> + <td class="title-text">骞冲簱鏌ヨ</td> + <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td> + </tr> + </table> + </div> + <div id="" class="layout-sub-content"> + <div id="menuList" class="menu"> + <ul class="" style="text-align: center;"> + <li><a href="../index.html">涓婚〉</a></li> + <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> + </ul> + </div> + + <div id="" class="layout-bill-info"> + <form class="layui-form" action="" style="height: auto;"> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">鎵樼洏鏉$爜</label> + <div class="layui-input-block"> + <input id="PalletNo" type="text" lay-verify="stock" placeholder="鎵樼洏鏉$爜" autocomplete="off" + class="layui-input"> + </div> + </div> + <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;"> + <button id="btnQuery" class="btn-ok" type="button">鏌ヨ</button> + </div> + </form> + </div> + + + <div id="" class="layout-tbl-paging" style="margin-top: 5px;"> + <table id="tableBoxList" class="tbl-box-list" border="1px"> <tr> - <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg" ></a></td> - <td class="title-text">骞冲簱鏌ヨ</td> - <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg" ></td> + <th>鐗╁搧淇℃伅</th> + <th>搴撳瓨<br>鏁伴噺</th> + <th>閿佸畾<br>鏁伴噺</th> + <th>鍐荤粨<br>鏁伴噺</th> + </tr> + <tr id="boxCell" style="display: none;"> + + <td name="LotNo" class="LotInfo">鐗╂枡淇℃伅</td> + <td name="Qty">鍓╀綑鏁伴噺</td> + <td name="LockQty">閿佸畾鏁伴噺</td> + <td name="FrozenQty">鍐荤粨鏁伴噺</td> </tr> </table> - </div> - <div id="" class="layout-sub-content"> - <div id="menuList" class="menu"> - <ul class="" style="text-align: center;"> - <li><a href="../index.html">涓婚〉</a></li> - <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> - </ul> - </div> - - <div id="" class="layout-bill-info"> - <form class="layui-form" action="" style="height: auto;"> - <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> - <label class="layui-form-label">鎵樼洏鏉$爜</label> - <div class="layui-input-block"> - <input id="PalletNo" type="text" lay-verify="stock" placeholder="鎵樼洏鏉$爜" - autocomplete="off" class="layui-input"> - </div> - </div> - <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;"> - <button id="btnQuery" class="btn-ok" type="button">鏌ヨ</button> - </div> - </form> - </div> - - - <div id="" class="layout-tbl-paging" style="margin-top: 5px;"> - <table id="tableBoxList" class="tbl-box-list" border="1px" > - <tr> - <th >鐗╁搧淇℃伅</th> - <th >搴撳瓨<br>鏁伴噺</th> - <th >閿佸畾<br>鏁伴噺</th> - <th >鍐荤粨<br>鏁伴噺</th> - </tr> - <tr id="boxCell" style="display: none;"> - - <td name="LotNo" class="LotInfo">鐗╂枡淇℃伅</td> - <td name="Qty">鍓╀綑鏁伴噺</td> - <td name="LockQty">閿佸畾鏁伴噺</td> - <td name="FrozenQty">鍐荤粨鏁伴噺</td> - </tr> - </table> - - <!-- 鍒嗛〉 --> - <table id="tableBoxPages" class="tbl-box-pages" cellspacing="" cellpadding=""> - <tr> - <td class="page-prev">涓婁竴椤�</td> - <td class="page-num page-num-select">1</td> - <td class="page-num">2</td> - <td class="page-num">3</td> - <td class="page-num">4</td> - <td class="page-num">5</td> - <td class="page-next">涓嬩竴椤�</td> - </tr> - </table> - - </div> + + <!-- 鍒嗛〉 --> + <table id="tableBoxPages" class="tbl-box-pages" cellspacing="" cellpadding=""> + <tr> + <td class="page-prev">涓婁竴椤�</td> + <td class="page-num page-num-select">1</td> + <td class="page-num">2</td> + <td class="page-num">3</td> + <td class="page-num">4</td> + <td class="page-num">5</td> + <td class="page-next">涓嬩竴椤�</td> + </tr> + </table> + </div> </div> - - <script src="/js/jquery-3.5.1.min.js"></script> - <script src="/layui/layui.js"></script> - <script src="/js/public.js"></script> - <script src="/js/jquery.cookie.js"></script> - <script> - layui.use(['form', 'jquery'], function() { - var form = layui.form - - //褰撳墠鍒嗛〉 - var curPageIndex = 1 - var tableData = null - - $("#menuImg").click(function(e){ - //console.log("menuImg") - e.stopPropagation() - - if($("#menuList").is(":hidden")){ - $("#menuList").show() - }else{ - $("#menuList").hide() - } - }) - $('body').click(function(){ + </div> + + <script src="/js/jquery-3.5.1.min.js"></script> + <script src="/layui/layui.js"></script> + <script src="/js/public.js"></script> + <script src="/js/jquery.cookie.js"></script> + <script> + layui.use(['form', 'jquery'], function () { + var form = layui.form + + //褰撳墠鍒嗛〉 + var curPageIndex = 1 + var tableData = null + + $("#menuImg").click(function (e) { + //console.log("menuImg") + e.stopPropagation() + + if ($("#menuList").is(":hidden")) { + $("#menuList").show() + } else { $("#menuList").hide() - }) - - $("#btnQuery").click(function(){ - if($('#PalletNo').val() == ''){ - layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - let trs = $("#tableBoxList tr") - let len = trs.length - for(i=len - 1; i >=2; i--){ - trs[i].remove(); - } - }); - return - } - var param = { - PalletNo: $('#PalletNo').val(), - }; - sendData(IP + "/PdaCr/GetStockQueryList", param, 'get', function(res) { - console.log("搴撳瓨鏌ヨ锛�",res) - if (res.code == 0) { //鎴愬姛 - tableData = deepCopy(res.data) - refreshTable() - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - let trs = $("#tableBoxList tr") - let len = trs.length - for(i=len - 1; i >=2; i--){ - trs[i].remove(); - } - }); + } + }) + $('body').click(function () { + $("#menuList").hide() + }) + + $("#btnQuery").click(function () { + if ($('#PalletNo').val() == '') { + layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + let trs = $("#tableBoxList tr") + let len = trs.length + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); } }); - }) - - function refreshTable() { - //鍏堟竻绌轰竴涓嬬瀛愬垪琛� - let trs = $("#tableBoxList tr") - let len = trs.length - //console.log("tr 鏁伴噺 + " + trs.length) - for(i=len - 1; i >=2; i--){ - trs[i].remove(); - } - - if (tableData.length > 0) { //鎴愬姛 - // $("#boxNum").val(tableData.length) - var list = tableData - var arrTrs = new Array() - let idx = 0 - for(var i in list) { - // list[i].BoxCode - var tr = $("#boxCell").eq(0).clone(); - tr.appendTo("#tableBoxList"); - // tr.attr('id', list[i].BoxCode) - idx++; - tr.attr('index', idx) - - tr.find("td[name='LotNo']").html('鐗╂枡缂栫爜锛�'+list[i].SkuNo+'<br/>鐗╂枡鍚嶇О锛�'+list[i].SkuName+'<br/>瑙� 鏍硷細'+list[i].Standard+'<br/>鐗╂枡鎵规锛�'+list[i].LotNo); - tr.find("td[name='Qty']").html(list[i].Qty); - tr.find("td[name='LockQty']").html(list[i].LockQty); - tr.find("td[name='FrozenQty']").html(list[i].FrozenQty); - // tr.find("td[name='InspectQty']").html(list[i].InspectQty); - - - // //console.log("boxcode is "+tr.find("td[name='boxcode']").html()) - tr.show(); - arrTrs[i] = tr - } - - //璁剧疆鍒嗛〉 - setPages(1, list.length) + return + } + var param = { + PalletNo: $('#PalletNo').val(), + }; + sendData(IP + "/PdaCr/GetStockQueryList", param, 'get', function (res) { + console.log("搴撳瓨鏌ヨ锛�", res) + if (res.code == 0) { //鎴愬姛 + tableData = deepCopy(res.data) + refreshTable() } else { //涓嶆垚鍔� - // $("#boxNum").val(0) - layer.msg("鏃犳暟鎹�", { + layer.msg(res.msg, { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - setPages(1, 0) + }, function () { + let trs = $("#tableBoxList tr") + let len = trs.length + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + }); } - } - - //璁剧疆鍒嗛〉 - function setPages(pageIndex, boxNum){ - 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){ - 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 - } - //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() - } - } - - 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") - } - } - //console.log("totalTrNum is " + totalTrNum) - } - - function onClickPrevPage(){ - //console.log("涓婁竴椤垫寜閽鐐瑰嚮") - if(curPageIndex == 1){ - return - } - setCurPage(curPageIndex - 1) - } - - function onClickNextPage(){ - //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") - let n = getBoxPageNum() - if(curPageIndex == n){ - 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.verify({ - stock: [/^[\S]{6}$/, '鎵樼洏鏉$爜蹇呴』涓哄叚浣嶅瓧绗�'] }); }) - </script> - </body> -</html> + + function refreshTable() { + //鍏堟竻绌轰竴涓嬬瀛愬垪琛� + let trs = $("#tableBoxList tr") + let len = trs.length + //console.log("tr 鏁伴噺 + " + trs.length) + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + + if (tableData.length > 0) { //鎴愬姛 + // $("#boxNum").val(tableData.length) + var list = tableData + var arrTrs = new Array() + let idx = 0 + for (var i in list) { + // list[i].BoxCode + var tr = $("#boxCell").eq(0).clone(); + tr.appendTo("#tableBoxList"); + // tr.attr('id', list[i].BoxCode) + idx++; + tr.attr('index', idx) + + tr.find("td[name='LotNo']").html('鐗╂枡缂栫爜锛�' + list[i].SkuNo + '<br/>鐗╂枡鍚嶇О锛�' + list[i].SkuName + '<br/>瑙� 鏍硷細' + list[i].Standard + '<br/>鐗╂枡鎵规锛�' + list[i].LotNo); + tr.find("td[name='Qty']").html(list[i].Qty); + tr.find("td[name='LockQty']").html(list[i].LockQty); + tr.find("td[name='FrozenQty']").html(list[i].FrozenQty); + // tr.find("td[name='InspectQty']").html(list[i].InspectQty); + + + // //console.log("boxcode is "+tr.find("td[name='boxcode']").html()) + tr.show(); + arrTrs[i] = tr + } + + //璁剧疆鍒嗛〉 + setPages(1, list.length) + } else { //涓嶆垚鍔� + // $("#boxNum").val(0) + layer.msg("鏃犳暟鎹�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + setPages(1, 0) + } + } + + //璁剧疆鍒嗛〉 + function setPages(pageIndex, boxNum) { + 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) { + 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 + } + //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() + } + } + + 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") + } + } + //console.log("totalTrNum is " + totalTrNum) + } + + function onClickPrevPage() { + //console.log("涓婁竴椤垫寜閽鐐瑰嚮") + if (curPageIndex == 1) { + return + } + setCurPage(curPageIndex - 1) + } + + function onClickNextPage() { + //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") + let n = getBoxPageNum() + if (curPageIndex == n) { + 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.verify({ + stock: [/^[\S]{6}$/, '鎵樼洏鏉$爜蹇呴』涓哄叚浣嶅瓧绗�'] + }); + }) + </script> +</body> + +</html> \ No newline at end of file diff --git a/Pda/View/HouseDataSetting/returnGoodOut.html b/Pda/View/HouseDataSetting/returnGoodOut.html index f461ef0..7268e90 100644 --- a/Pda/View/HouseDataSetting/returnGoodOut.html +++ b/Pda/View/HouseDataSetting/returnGoodOut.html @@ -1,867 +1,887 @@ <!DOCTYPE html> <html> - <head> - <meta charset="UTF-8" /> - <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> - <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" /> --> - <meta http-equiv="X-UA-Compatible" content="ie=edge" /> - <title>Boxline PDA</title> - <link rel="stylesheet" href="/layui/css/layui.css" /> - <link rel="stylesheet" href="/css/style.css" /> - <script src="/js/adaptive.js"></script> - - <link rel="stylesheet" href="/css/my.css" /> - <style type="text/css"> - .layout-bill-info { - height: auto; - /* background-color: #009E94; */ - } - .layout-tbl-submit { - margin-top: 10px; - } - .out-scatter-num .local-input { - width: 40%; - height: 25px; - float: left; - } - .out-scatter-num .local-ok button { - height: 25px; - border: 0; - color: #FFFFFF; - background-color: #0a93e3; - border-radius: 3px; - padding: 2px; - margin-left: 10px; - width: 100%; - } - .out-scatter-num .layui-form-label { - width: 30%; - /* background-color: #007BFF; */ - } - .out-scatter-num .layui-input-block { - width: 100%; - /* background-color: #009E94; */ - margin-left: 0; - } - .out-scatter-num .local-ok { - width: 20%; - height: 25px; - float: left; - } - .layout-tbl-paging { - margin-top: 20px; - } - - .layout-tab-page { - height: auto; - } - .layui-form-checkbox { - margin: auto; - /* padding-left: 2px; */ - /* padding-right: 2px; */ - } - .div-tbl-title { - width: 98%; - margin: auto; - /* background-color: #4476A7; */ - height: 30px; - } - .div-tbl-title table { - width: 100%; - height: 30px; - } - .layui-form-radio{ - margin: 0; - padding-right: 0; - } - td{ - word-break: break-all; word-wrap:break-word; - } - </style> - <link rel="stylesheet" href="/css/adapter.css" /> - </head> - <body> - <div id="" class="main-content"> - <div id="" class="layout-title" > - <table border="" cellspacing="" cellpadding=""> - <tr> - <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg" ></a></td> - <td class="title-text">璐ㄦ鍙樻洿</td> - <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg" ></td> - </tr> - </table> +<head> + <meta charset="UTF-8" /> + <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> + <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" /> --> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + <title>閫�璐у叆搴撳崟</title> + + <link rel="stylesheet" href="/layui/css/layui.css" /> + <link rel="stylesheet" href="/css/style.css" /> + <script src="/js/adaptive.js"></script> + + <link rel="stylesheet" href="/css/my.css" /> + <style type="text/css"> + .layout-bill-info { + height: auto; + /* background-color: #009E94; */ + } + + .layout-tbl-submit { + margin-top: 10px; + } + + .out-scatter-num .local-input { + width: 40%; + height: 25px; + float: left; + } + + .out-scatter-num .local-ok button { + height: 25px; + border: 0; + color: #FFFFFF; + background-color: #0a93e3; + border-radius: 3px; + padding: 2px; + margin-left: 10px; + width: 100%; + } + + .out-scatter-num .layui-form-label { + width: 30%; + /* background-color: #007BFF; */ + } + + .out-scatter-num .layui-input-block { + width: 100%; + /* background-color: #009E94; */ + margin-left: 0; + } + + .out-scatter-num .local-ok { + width: 20%; + height: 25px; + float: left; + } + + .layout-tbl-paging { + margin-top: 20px; + } + + .layout-tab-page { + height: auto; + } + + .layui-form-checkbox { + margin: auto; + /* padding-left: 2px; */ + /* padding-right: 2px; */ + } + + .div-tbl-title { + width: 98%; + margin: auto; + /* background-color: #4476A7; */ + height: 30px; + } + + .div-tbl-title table { + width: 100%; + height: 30px; + } + + .layui-form-radio { + margin: 0; + padding-right: 0; + } + + td { + word-break: break-all; + word-wrap: break-word; + } + </style> + <link rel="stylesheet" href="/css/adapter.css" /> +</head> + +<body> + <div id="" class="main-content"> + <div id="" class="layout-title"> + <table border="" cellspacing="" cellpadding=""> + <tr> + <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td> + <td class="title-text">璐ㄦ鍙樻洿</td> + <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td> + </tr> + </table> + </div> + <div id="" class="layout-sub-content"> + <div id="menuList" class="menu"> + <ul class="" style="text-align: center;"> + <li><a href="../index.html">涓婚〉</a></li> + <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> + </ul> </div> - <div id="" class="layout-sub-content"> - <div id="menuList" class="menu"> - <ul class="" style="text-align: center;"> - <li><a href="../index.html">涓婚〉</a></li> - <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> - </ul> - </div> - - <div id="" class="layout-bill-info"> - <form class="layui-form" action="" style="height: auto;"> - <div id="layout-bill" class="layui-form-item layout-dropdownlist" > - <label class="layui-form-label">閫�璐у叆搴撳崟锛�</label> - <div class="layui-input-block" id="selectDiv"> - <select id="bar" lay-filter="getbar" lay-search> + + <div id="" class="layout-bill-info"> + <form class="layui-form" action="" style="height: auto;"> + <div id="layout-bill" class="layui-form-item layout-dropdownlist"> + <label class="layui-form-label">閫�璐у叆搴撳崟锛�</label> + <div class="layui-input-block" id="selectDiv"> + <select id="bar" lay-filter="getbar" lay-search> + <option value=""></option> + </select> + <img src="/assets/down_arraw.png"> + </div> + </div> + <div id="layout-pallet" class="layui-form-item layout-input"> + <label class="layui-form-label">鍑哄簱鍙o細</label> + <div class="layui-input-block"> + <input id="exitDesc" style="border: none;" type="text" lay-verify="stock" disabled + placeholder="" autocomplete="off" class="layui-input"> + </div> + </div> + <div id="layout-pallet" class="layui-form-item layout-input"> + <label class="layui-form-label">鎵樼洏鏉$爜锛�</label> + <div class="layui-input-block"> + <input id="STOCKCODE" type="text" lay-verify="stock" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" + autocomplete="off" class="layui-input" style="height:24px"> + </div> + </div> + + <div id="" class="layout-tab-page"> + + <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> + <label class="layui-form-label">鐗╂枡鍚嶇О锛�</label> + <div class="layui-input-block"> + <select id="goodSelect" lay-filter="goodSelect" lay-search> <option value=""></option> </select> - <img src="/assets/down_arraw.png" > + <img src="/assets/down_arraw.png"> </div> </div> - <div id="layout-pallet" class="layui-form-item layout-input"> - <label class="layui-form-label">鍑哄簱鍙o細</label> + <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> + <label class="layui-form-label">鐗╂枡鎵规锛�</label> <div class="layui-input-block"> - <input id="exitDesc" style="border: none;" type="text" lay-verify="stock" disabled placeholder="" - autocomplete="off" class="layui-input"> + <select id="lotNoSelect" lay-filter="lotNoSelect" lay-search> + <option value=""></option> + </select> + <img src="/assets/down_arraw.png"> </div> </div> - <div id="layout-pallet" class="layui-form-item layout-input"> - <label class="layui-form-label">鎵樼洏鏉$爜锛�</label> + <div class="layui-form-item layout-input" style="margin-top: 10px;"> + <label class="layui-form-label">鏂版墭鐩樻潯鐮侊細</label> <div class="layui-input-block"> - <input id="STOCKCODE" type="text" lay-verify="stock" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" + <input id="NEWSTOCKCODE" type="text" lay-verify="stock" placeholder="璇锋壂鎻忔柊鎵樼洏鏉$爜" autocomplete="off" class="layui-input" style="height:24px"> </div> </div> - - <div id="" class="layout-tab-page"> - - <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> - <label class="layui-form-label">鐗╂枡鍚嶇О锛�</label> - <div class="layui-input-block" > - <select id="goodSelect" lay-filter="goodSelect" lay-search> - <option value=""></option> - </select> - <img src="/assets/down_arraw.png" > - </div> - </div> - <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> - <label class="layui-form-label">鐗╂枡鎵规锛�</label> - <div class="layui-input-block" > - <select id="lotNoSelect" lay-filter="lotNoSelect" lay-search> - <option value=""></option> - </select> - <img src="/assets/down_arraw.png" > - </div> - </div> - <div class="layui-form-item layout-input" style="margin-top: 10px;"> - <label class="layui-form-label">鏂版墭鐩樻潯鐮侊細</label> - <div class="layui-input-block"> - <input id="NEWSTOCKCODE" type="text" lay-verify="stock" placeholder="璇锋壂鎻忔柊鎵樼洏鏉$爜" - autocomplete="off" class="layui-input" style="height:24px"> - </div> - </div> - <table id="outHalf" class="layout-tab-content" border="" cellspacing="" cellpadding=""> - - <tr> - <td> - <div class="layui-form-item out-scatter-num" > - <label class="layui-form-label" style="width: 21%;">璐ㄦ鐘舵�侊細</label> - <div class="local-input"> - <div class="layui-input-block local-input" style="line-height: 28px;"> - <input type="radio" name="status" value = "1" class="layui-input" checked="checked" style="padding-left:0.1rem;">鍚堟牸 - <input type="radio" name="status" value = "2" class="layui-input" style="padding-left:0.1rem;">涓嶅悎鏍� - </div> - </div> - </div> - </td> - </tr> - <tr id="outScatter"> - <td> - <div id="layout-boxcode" class="layui-form-item out-scatter-num" style="margin-top: 10px;"> - <label class="layui-form-label" style="width: 21%;">鎷h揣鏁伴噺锛�</label> - <div id="" class="local-input" > - <div class="layui-input-block" > - <input id="outScatterQty" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�" - autocomplete="off" class="layui-input" style="padding-left:0.1rem;" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"> - </div> - </div> - <div id="" class="local-ok" > - <button type="button" lay-submit lay-filter="formPickScatter">纭</button> - </div> - </div> - </td> - </tr> - </table> - <div id="" style="text-align: right;margin-top: 10px;"> - <div id="" class="cut-line" > - <img src="/assets/fengexian.png" > - </div> - </div> - </div> - - </form> - </div> - - <div class="layout-tbl-paging" id="" > - <div id="" class="div-tbl-title"> - <table border="0" cellspacing="" cellpadding="" style="height: 30px;"> + <table id="outHalf" class="layout-tab-content" border="" cellspacing="" cellpadding=""> + <tr> - <td style="height: 30px;line-height: 30px;color: red;width: 50%;"> - <span id="" style="width: 50%;height: 30px;float: left;"> - 绠卞瓙鏁伴噺 - </span> - <input id="boxNum" type="text" disabled placeholder="" - autocomplete="off" style="border: none;float: left; width: 40%;height: 30px; line-height: 30px;background-color: #FFFFFF;"> + <td> + <div class="layui-form-item out-scatter-num"> + <label class="layui-form-label" style="width: 21%;">璐ㄦ鐘舵�侊細</label> + <div class="local-input"> + <div class="layui-input-block local-input" style="line-height: 28px;"> + <input type="radio" name="status" value="1" class="layui-input" + checked="checked" style="padding-left:0.1rem;">鍚堟牸 + <input type="radio" name="status" value="2" class="layui-input" + style="padding-left:0.1rem;">涓嶅悎鏍� + </div> + </div> + </div> </td> - <td style="height: 30px;line-height: 30px;color: red;width: 50%;"> - <span id="" style="width: 50%;height: 30px;float: left;"> - 寰呮嫞绠辨暟 - </span> - <input id="pickingBoxNum" type="text" disabled placeholder="" - autocomplete="off" style="border: none; width: 50%;float: left;height: 30px; line-height: 30px; background-color: #FFFFFF;"> + </tr> + <tr id="outScatter"> + <td> + <div id="layout-boxcode" class="layui-form-item out-scatter-num" + style="margin-top: 10px;"> + <label class="layui-form-label" style="width: 21%;">鎷h揣鏁伴噺锛�</label> + <div id="" class="local-input"> + <div class="layui-input-block"> + <input id="outScatterQty" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�" + autocomplete="off" class="layui-input" style="padding-left:0.1rem;" + oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"> + </div> + </div> + <div id="" class="local-ok"> + <button type="button" lay-submit lay-filter="formPickScatter">纭</button> + </div> + </div> </td> </tr> </table> + <div id="" style="text-align: right;margin-top: 10px;"> + <div id="" class="cut-line"> + <img src="/assets/fengexian.png"> + </div> + </div> </div> - <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding=""> - <tr id="tableHead"> - <th style="width: 15%;">缂栫爜</th> - <th style="width: 31%;">鍚嶇О</th> - <th style="width: 22%;">鎵规</th> - <th name="hpicknum" style="width: 12%;">寰呮嫞<br>鏁伴噺</th> - <th name="hpickednum" style="width: 12%;">宸叉嫞<br>鏁伴噺</th> - <th style="width: 8%;">鎷h揣</th> - </tr> - <tr id="boxCell" style="display: none;"> - <td name="goodCode">AG000001</td> - <td name="goodName">鐤嫍鍚嶇О鍚嶇О鍚嶇О</td> - <td name="lotNo">30</td> - <td name="picknum">30</td> - <td name="pickednum">30</td> - <td name="check" style="text-align: center;"> - <!-- <div id="" style="width:100%;margin: auto;"> --> - <input type="checkbox" id="cbox2" value="second_checkbox" onclick="return false;" checked="checked" > - <!-- </div> --> + + </form> + </div> + + <div class="layout-tbl-paging" id=""> + <div id="" class="div-tbl-title"> + <table border="0" cellspacing="" cellpadding="" style="height: 30px;"> + <tr> + <td style="height: 30px;line-height: 30px;color: red;width: 50%;"> + <span id="" style="width: 50%;height: 30px;float: left;"> + 绠卞瓙鏁伴噺 + </span> + <input id="boxNum" type="text" disabled placeholder="" autocomplete="off" + style="border: none;float: left; width: 40%;height: 30px; line-height: 30px;background-color: #FFFFFF;"> + </td> + <td style="height: 30px;line-height: 30px;color: red;width: 50%;"> + <span id="" style="width: 50%;height: 30px;float: left;"> + 寰呮嫞绠辨暟 + </span> + <input id="pickingBoxNum" type="text" disabled placeholder="" autocomplete="off" + style="border: none; width: 50%;float: left;height: 30px; line-height: 30px; background-color: #FFFFFF;"> </td> </tr> </table> - - <!-- 鍒嗛〉 --> - <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding=""> - <tr > - <td class="page-prev">涓婁竴椤�</td> - <td class="page-num page-num-select">1</td> - <td class="page-num">2</td> - <td class="page-num">3</td> - <td class="page-num">4</td> - <td class="page-num">5</td> - <td class="page-next">涓嬩竴椤�</td> - </tr> - </table> </div> - </div> + <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding=""> + <tr id="tableHead"> + <th style="width: 15%;">缂栫爜</th> + <th style="width: 31%;">鍚嶇О</th> + <th style="width: 22%;">鎵规</th> + <th name="hpicknum" style="width: 12%;">寰呮嫞<br>鏁伴噺</th> + <th name="hpickednum" style="width: 12%;">宸叉嫞<br>鏁伴噺</th> + <th style="width: 8%;">鎷h揣</th> + </tr> + <tr id="boxCell" style="display: none;"> + <td name="goodCode">AG000001</td> + <td name="goodName">鐤嫍鍚嶇О鍚嶇О鍚嶇О</td> + <td name="lotNo">30</td> + <td name="picknum">30</td> + <td name="pickednum">30</td> + <td name="check" style="text-align: center;"> + <!-- <div id="" style="width:100%;margin: auto;"> --> + <input type="checkbox" id="cbox2" value="second_checkbox" onclick="return false;" + checked="checked"> + <!-- </div> --> + </td> + </tr> + </table> + + <!-- 鍒嗛〉 --> + <table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding=""> + <tr> + <td class="page-prev">涓婁竴椤�</td> + <td class="page-num page-num-select">1</td> + <td class="page-num">2</td> + <td class="page-num">3</td> + <td class="page-num">4</td> + <td class="page-num">5</td> + <td class="page-next">涓嬩竴椤�</td> + </tr> + </table> + </div> </div> - - - <script src="/js/jquery-3.5.1.min.js"></script> - <script src="/layui/layui.js"></script> - <script src="/js/public.js"></script> - <script src="/js/jquery.cookie.js"></script> - <script> - layui.use(['form', 'jquery'], function() { - var form = layui.form - - //褰撳墠鍒嗛〉 - var curPageIndex = 1 - var tableData = null - var canPickBox = true - $("#STOCKCODE").focus(); - - //涓嬫媺鍗曟嵁閫変腑鍚庝簨浠� - form.on('select(getbar)', function(data) { - getBar(data.value); - updateGoodList(); - updateLotNoList(); - GetOutInfo(); - }); - - $("#STOCKCODE").on('input',function(){ - - if($("#STOCKCODE").val() == "" || $("#STOCKCODE").val().length<10){ - return - } - if ($("#STOCKCODE").val().length>=10) { - $("#STOCKCODE").val($("#STOCKCODE").val().substr(-10)) - } - checkPalletStat() - }) - $("#NEWSTOCKCODE").on('input',function(){ - - if($("#NEWSTOCKCODE").val() == "" || $("#NEWSTOCKCODE").val().length<10){ - return - } - if ($("#NEWSTOCKCODE").val().length>=10) { - $("#NEWSTOCKCODE").val($("#NEWSTOCKCODE").val().substr(-10)) - } - }) - // //鐐瑰嚮鍗曟嵁涓嬫媺妗嗕簨浠� - // $("#selectDiv").click(function(){ - - // getBar(data.value,$("#wavebar").val()); - // updateGoodList(); - // updateLotNoList(); - // GetOutInfo(); - // }) - - //鍒濆鍖栨覆鏌撳嚭搴撳崟 - function updateBillList(){ - $("#bar").empty() - $("#bar").append('<option value =>' + '</option>'); - form.render('select'); - - var param = { - lpn:$("#STOCKCODE").val() - }; - - synData(IP + "/PdaInterface/GetImReturnGoodList",param, 'post', function(res) { - - if (res.code == 1) { //鎴愬姛 - - for (var i = 0; i < res.data.length; i++) { - if (i==0) { - $("#bar").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>'); - } else { - $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); - } - } - form.render('select'); - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - } - }); - } - - //鍒濆鍖栨覆鏌撶墿鏂� - function updateGoodList(){ - $("#goodSelect").empty() - $("#goodSelect").append('<option value =>' + '</option>'); - form.render('select'); - - var param = { - palNo: $("#STOCKCODE").val(), - ordNo: $("#bar").val(), - }; - synData(IP + "/PdaInterface/GetReturnGoodOutGoodInfo", param, 'post', function(res) { - console.log("鐗╂枡"+JSON.stringify(res)) - if (res.code == 1) { //鎴愬姛 - for (var i = 0; i < res.data.length; i++) { - if (i==0) { - $("#goodSelect").append('<option value =' + res.data[i].GoodCode + ' selected>' + res.data[i].GoodName + '</option>'); - } else { - $("#goodSelect").append('<option value =' + res.data[i].GoodCode + '>' + res.data[i] - .GoodName + '</option>'); - } - - } - form.render('select'); - - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - } - }); - } - - //鍒濆鍖栨覆鏌撴壒娆� - function updateLotNoList(){ - $("#lotNoSelect").empty() - $("#lotNoSelect").append('<option value =>' + '</option>'); - form.render('select'); - - var param = { - palNo: $("#STOCKCODE").val(), - ordNo: $("#bar").val(), - }; - synData(IP + "/PdaInterface/GetReturnGoodOutLotNoInfo", param, 'post', function(res) { - console.log("鎵规锛�"+JSON.stringify(res)) - if (res.code == 1) { //鎴愬姛 - for (var i = 0; i < res.data.length; i++) { - console.log("鎵规2锛�"+ res.data[i].LotNo) - - if (i == 0) { - $("#lotNoSelect").append('<option value =' + res.data[i].LotNo + ' selected>' + res.data[i].LotNo + '</option>'); - } else { - $("#lotNoSelect").append('<option value =' + res.data[i].LotNo + '>' + res.data[i].LotNo + '</option>'); - } - } - form.render('select'); - - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - } - }); - } - - //鏍规嵁鍗曟嵁鑾峰彇鍑哄簱鍙� - function getBar(selectedvalue) { - if (selectedvalue) { - var param = { - "orderNo": selectedvalue - } - synData(IP + "/PdaInterface/GetReturnGoodOutlets", param, 'post', function(res) { - console.log("鍑哄簱鍙o細"+JSON.stringify(res)) - if (res.code == 1) { //鎴愬姛 - let data = res.data - - $('#exitDesc').val(data) - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - } - }); - } else { - } - } - - function GetOutInfo(){ - - let param2 = { - "palNo": $("#STOCKCODE").val(), - "ordNo": $("#bar").val(), - } - synData(IP + "/PdaInterface/GetReturnGoodOutInfo", param2, 'post', function(res) { - console.log("鏍规嵁鎵樼洏鍙疯幏鍙栧緟妫�璐т俊鎭� res is "+JSON.stringify(res)) - if(res.code == 1){ - tableData = deepCopy(res.data) - - refreshTable(tableData) - }else{ - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - } - }); - } - - //褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬� 鍕垮垹 - // $("#STOCKCODE").blur(function(){ - // if($("#STOCKCODE").val() == ""){ - // return - // } - // if ($("#STOCKCODE").val().length>=10) { - // console.log($("#STOCKCODE").val().substr(-10)); - // $("#STOCKCODE").val($("#STOCKCODE").val().substr(-10)) - // } - // checkPalletStat() - // }) - //閿洏Enter鎸変笅浜嬩欢锛堟鏌ユ墭鐩樼姸鎬侊級 - // $("#STOCKCODE").keydown(function(e) { - // if (e.keyCode === 13) { - - // if($("#STOCKCODE").val() == ""){ - // layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", { - // icon: 2, - // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - // }); - // return - // } - // console.log("111111111111111") - - // //妫�鏌ユ墭鐩樼姸鎬� - // checkPalletStat(); - // } - // }); - //娓叉煋琛ㄦ牸鏁版嵁 - function refreshTable(list) { - //鍏堟竻绌轰竴涓嬬瀛愬垪琛� - let trs = $("#tableBoxList tr") - let len = trs.length - //console.log("tr 鏁伴噺 + " + trs.length) - for(i=len - 1; i >=2; i--){ - trs[i].remove(); - } - - //璁剧疆鎵樼洏鍙� - // $("#palletCode").val($.cookie('stockCode')) - - console.log(list != null); - console.log(list ); - if (list != null && list.length > 0) { //鎴愬姛 - $("#boxNum").val(list.length) - $("#pickingBoxNum").val(tableData.WholeBoxNum) - var arrTrs = new Array() - let idx = 0 - for(var i in list) { - // list[i].BoxCode - var tr = $("#boxCell").eq(0).clone(); - tr.appendTo("#tableBoxList"); - tr.attr('id', list[i].BoxCode) - idx++; - tr.attr('index', idx) - tr.find("td[name='goodCode']").html(list[i].ExportGoodsCode); - tr.find("td[name='goodName']").html(list[i].ExportGoodsName); - tr.find("td[name='lotNo']").html(list[i].ExportLotNo); - tr.find("td[name='picknum']").html(list[i].PickNum); - tr.find("td[name='pickednum']").html(list[i].PickedNum); - if(list[i].ExportExecuteFlag == "3"){ - //宸叉嫞 - tr.find("td[name='check']").find('input').attr('checked', 'checked') - } else{ - //鏈嫞 - //console.log("Status "+list[i].Status) - tr.find("td[name='check']").find('input').removeAttr('checked') - } - - tr.show(); - arrTrs[i] = tr - } - - //璁剧疆鍒嗛〉 - setPages(1, list.length) - - canPickBox = true - } else { //涓嶆垚鍔� - layer.msg("鏃犳暟鎹�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - $("#boxNum").val(0) - setPages(1, 0) - } - // $("#boxCnt").html("褰撳墠鎵樼洏涓婄殑绠卞瓙鏁伴噺锛�"+res.length) - } - - //妫�鏌ユ墭鐩樼姸鎬乗鏍规嵁鎵樼洏鍙疯幏鍙栧緟妫�璐т俊鎭痋娓叉煋鐗╂枡\娓叉煋鎵规 - function checkPalletStat(){ - // var list = tmpBoxs - if($("#STOCKCODE").val() == ""){ - layer.msg("鎵樼洏鍙蜂负绌�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - return - } - - var param = { - "palNo": $("#STOCKCODE").val() - } - synData(IP + "/PdaInterface/GetPalnoStatus", param, 'post', function(res) { - - if (res.msg == "鏈夋晥鎵樼洏") { //鎴愬姛 - - $.cookie('stockCode', $("#STOCKCODE").val()); - - updateBillList(); - getBar($("#bar").val()); - updateGoodList(); - updateLotNoList(); - GetOutInfo(); - - } else { //涓嶆垚鍔� - layer.msg("鏃犳晥鎵樼洏", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - } - }); - } - //鑾峰彇閫変腑鐨勭墿鏂欐壒娆″搴旂殑鎷h揣鍑哄簱ID - function getBoxInfoByBoxCode(exportGoodsCode,exportLotNo){ - let list = tableData - for(let i = 0; i < list.length; i++){ - if(list[i].ExportGoodsCode == exportGoodsCode && list[i].ExportLotNo == exportLotNo){ - return list[i] - } - } - return null - } - - //纭鎷h揣锛堜笉鏄暣鎵橈級 - function reqPickScatter(){ - if($("#BOXCODE").val() == ""){ - return - } - let boxinfo = getBoxInfoByBoxCode($("#goodSelect").val(),$("#lotNoSelect").val()) - - var param = { - "billCode": boxinfo.ExportRemark, - "orderId": boxinfo.Id, - "pickNum": $('#outScatterQty').val(), - "status":$("input[type='radio']:checked").val(), - "newStockCode":$('#NEWSTOCKCODE').val() - } - sendData(IP + "/PdaInterface/SetReturnGoodPickFlag", param, 'post', function(res) { - //console.log(res); - checkPalletStat() - if (res.code == 1) { //鎴愬姛 - layer.msg(res.msg, { - icon: 1, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - canPickBox = true//鍥炶皟 - }); - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - canPickBox = true//鍥炶皟 - }); - } - }); - } - - //鍗曟嫞璐э紙纭鎸夐挳锛� - form.on('submit(formPickScatter)', function(data) { - // if (!$.cookie('userId')) { - // layer.msg('鐧婚檰澶辨晥锛岃閲嶆柊鐧婚檰', { - // icon: 2, - // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - // }, function() { - // location.href = "login.html"; - // //鍥炶皟 - // }); - // } - - if($('#outScatterQty').val() == ""){ - layer.msg("璇疯緭鍏ユ嫞璐ф暟閲�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); - return - } - if($('#NEWSTOCKCODE').val() == ""){ - layer.msg("璇疯緭鍏ユ柊鎵樼洏鏉$爜", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); - return - } - if($('#goodSelect').val() == ""){ - layer.msg("璇烽�夋嫨鐗╂枡", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); - return - } - if($('#lotNoSelect').val() == ""){ - layer.msg("璇烽�夋嫨鎵规", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); - return - } - let boxinfo = getBoxInfoByBoxCode($("#goodSelect").val(),$("#lotNoSelect").val()) - if(!boxinfo){ - layer.msg("鏈煡璇㈠埌鐗╂枡鎵规淇℃伅", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); - return - } - let pn = boxinfo.PickNum - if($.isPlainObject(boxinfo.PickNum) || pn == 0){ - pn = boxinfo.Qty - } - if(!$("#outScatterQty").val()){ - layer.msg("璇疯緭鍏ユ嫞璐ф暟閲�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); - return - } - let qty = parseInt($('#outScatterQty').val()) - if(qty <= 0 || qty > pn){ - layer.msg("鎷h揣鏁伴噺闇�澶т簬0锛屽苟涓斾笉鑳借秴杩囧緟鎷f暟閲�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); - return - } - - if(canPickBox == false){ - //console.log("璇锋眰鏈畬鎴愶紝涓嶈閲嶅璇锋眰锛� canPickBox is "+canPickBox) - return - } - - canPickBox = false - - reqPickScatter() - - return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆� - }); - // form.verify({ - // stock: [/^[\S]{6}$/, '鎵樼洏鏉$爜蹇呴』涓哄叚浣嶅瓧绗�'] - // }); + </div> + <script src="/js/jquery-3.5.1.min.js"></script> + <script src="/layui/layui.js"></script> + <script src="/js/public.js"></script> + <script src="/js/jquery.cookie.js"></script> + <script> + layui.use(['form', 'jquery'], function () { + var form = layui.form + //褰撳墠鍒嗛〉 + var curPageIndex = 1 + var tableData = null + var canPickBox = true + $("#STOCKCODE").focus(); - //涓婚〉鍙婇噸鏂扮櫥褰� - $("#menuImg").click(function(e){ - //console.log("menuImg") - e.stopPropagation() - - if($("#menuList").is(":hidden")){ - $("#menuList").show() - }else{ - $("#menuList").hide() - } - }) - $('body').click(function(){ - // //console.log("body") - $("#menuList").hide() - }) - - - //璁剧疆鍒嗛〉 - function setPages(pageIndex, boxNum){ - 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) + //涓嬫媺鍗曟嵁閫変腑鍚庝簨浠� + form.on('select(getbar)', function (data) { + getBar(data.value); + updateGoodList(); + updateLotNoList(); + GetOutInfo(); + }); + + $("#STOCKCODE").on('input', function () { + + if ($("#STOCKCODE").val() == "" || $("#STOCKCODE").val().length < 10) { + return } - //璁剧疆褰撳墠鍒嗛〉 - function setCurPage(pageIndex){ - - - 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 - } - //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() - } - } - - 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") - } - } - //console.log("totalTrNum is " + totalTrNum) + if ($("#STOCKCODE").val().length >= 10) { + $("#STOCKCODE").val($("#STOCKCODE").val().substr(-10)) } - //涓婁竴椤垫寜閽鐐瑰嚮 - function onClickPrevPage(){ - //console.log("涓婁竴椤垫寜閽鐐瑰嚮") - if(curPageIndex == 1){ - return - } - setCurPage(curPageIndex - 1) - } - //涓嬩竴椤垫寜閽鐐瑰嚮 - function onClickNextPage(){ - //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") - let n = getBoxPageNum() - if(curPageIndex == n){ - 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 - } - + checkPalletStat() }) - </script> - </body> -</html> + $("#NEWSTOCKCODE").on('input', function () { + + if ($("#NEWSTOCKCODE").val() == "" || $("#NEWSTOCKCODE").val().length < 10) { + return + } + if ($("#NEWSTOCKCODE").val().length >= 10) { + $("#NEWSTOCKCODE").val($("#NEWSTOCKCODE").val().substr(-10)) + } + }) + // //鐐瑰嚮鍗曟嵁涓嬫媺妗嗕簨浠� + // $("#selectDiv").click(function(){ + + // getBar(data.value,$("#wavebar").val()); + // updateGoodList(); + // updateLotNoList(); + // GetOutInfo(); + // }) + + //鍒濆鍖栨覆鏌撳嚭搴撳崟 + function updateBillList() { + $("#bar").empty() + $("#bar").append('<option value =>' + '</option>'); + form.render('select'); + + var param = { + lpn: $("#STOCKCODE").val() + }; + + synData(IP + "/PdaInterface/GetImReturnGoodList", param, 'post', function (res) { + + if (res.code == 1) { //鎴愬姛 + + for (var i = 0; i < res.data.length; i++) { + if (i == 0) { + $("#bar").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>'); + } else { + $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); + } + } + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + + //鍒濆鍖栨覆鏌撶墿鏂� + function updateGoodList() { + $("#goodSelect").empty() + $("#goodSelect").append('<option value =>' + '</option>'); + form.render('select'); + + var param = { + palNo: $("#STOCKCODE").val(), + ordNo: $("#bar").val(), + }; + synData(IP + "/PdaInterface/GetReturnGoodOutGoodInfo", param, 'post', function (res) { + console.log("鐗╂枡" + JSON.stringify(res)) + if (res.code == 1) { //鎴愬姛 + for (var i = 0; i < res.data.length; i++) { + if (i == 0) { + $("#goodSelect").append('<option value =' + res.data[i].GoodCode + ' selected>' + res.data[i].GoodName + '</option>'); + } else { + $("#goodSelect").append('<option value =' + res.data[i].GoodCode + '>' + res.data[i] + .GoodName + '</option>'); + } + + } + form.render('select'); + + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + + //鍒濆鍖栨覆鏌撴壒娆� + function updateLotNoList() { + $("#lotNoSelect").empty() + $("#lotNoSelect").append('<option value =>' + '</option>'); + form.render('select'); + + var param = { + palNo: $("#STOCKCODE").val(), + ordNo: $("#bar").val(), + }; + synData(IP + "/PdaInterface/GetReturnGoodOutLotNoInfo", param, 'post', function (res) { + console.log("鎵规锛�" + JSON.stringify(res)) + if (res.code == 1) { //鎴愬姛 + for (var i = 0; i < res.data.length; i++) { + console.log("鎵规2锛�" + res.data[i].LotNo) + + if (i == 0) { + $("#lotNoSelect").append('<option value =' + res.data[i].LotNo + ' selected>' + res.data[i].LotNo + '</option>'); + } else { + $("#lotNoSelect").append('<option value =' + res.data[i].LotNo + '>' + res.data[i].LotNo + '</option>'); + } + } + form.render('select'); + + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + + //鏍规嵁鍗曟嵁鑾峰彇鍑哄簱鍙� + function getBar(selectedvalue) { + if (selectedvalue) { + var param = { + "orderNo": selectedvalue + } + synData(IP + "/PdaInterface/GetReturnGoodOutlets", param, 'post', function (res) { + console.log("鍑哄簱鍙o細" + JSON.stringify(res)) + if (res.code == 1) { //鎴愬姛 + let data = res.data + + $('#exitDesc').val(data) + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } else { + } + } + + function GetOutInfo() { + + let param2 = { + "palNo": $("#STOCKCODE").val(), + "ordNo": $("#bar").val(), + } + synData(IP + "/PdaInterface/GetReturnGoodOutInfo", param2, 'post', function (res) { + console.log("鏍规嵁鎵樼洏鍙疯幏鍙栧緟妫�璐т俊鎭� res is " + JSON.stringify(res)) + if (res.code == 1) { + tableData = deepCopy(res.data) + + refreshTable(tableData) + } else { + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + + //褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬� 鍕垮垹 + // $("#STOCKCODE").blur(function(){ + // if($("#STOCKCODE").val() == ""){ + // return + // } + // if ($("#STOCKCODE").val().length>=10) { + // console.log($("#STOCKCODE").val().substr(-10)); + // $("#STOCKCODE").val($("#STOCKCODE").val().substr(-10)) + // } + // checkPalletStat() + // }) + //閿洏Enter鎸変笅浜嬩欢锛堟鏌ユ墭鐩樼姸鎬侊級 + // $("#STOCKCODE").keydown(function(e) { + // if (e.keyCode === 13) { + + // if($("#STOCKCODE").val() == ""){ + // layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }); + // return + // } + // console.log("111111111111111") + + // //妫�鏌ユ墭鐩樼姸鎬� + // checkPalletStat(); + // } + // }); + //娓叉煋琛ㄦ牸鏁版嵁 + function refreshTable(list) { + //鍏堟竻绌轰竴涓嬬瀛愬垪琛� + let trs = $("#tableBoxList tr") + let len = trs.length + //console.log("tr 鏁伴噺 + " + trs.length) + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + + //璁剧疆鎵樼洏鍙� + // $("#palletCode").val($.cookie('stockCode')) + + console.log(list != null); + console.log(list); + if (list != null && list.length > 0) { //鎴愬姛 + $("#boxNum").val(list.length) + $("#pickingBoxNum").val(tableData.WholeBoxNum) + var arrTrs = new Array() + let idx = 0 + for (var i in list) { + // list[i].BoxCode + var tr = $("#boxCell").eq(0).clone(); + tr.appendTo("#tableBoxList"); + tr.attr('id', list[i].BoxCode) + idx++; + tr.attr('index', idx) + tr.find("td[name='goodCode']").html(list[i].ExportGoodsCode); + tr.find("td[name='goodName']").html(list[i].ExportGoodsName); + tr.find("td[name='lotNo']").html(list[i].ExportLotNo); + tr.find("td[name='picknum']").html(list[i].PickNum); + tr.find("td[name='pickednum']").html(list[i].PickedNum); + if (list[i].ExportExecuteFlag == "3") { + //宸叉嫞 + tr.find("td[name='check']").find('input').attr('checked', 'checked') + } else { + //鏈嫞 + //console.log("Status "+list[i].Status) + tr.find("td[name='check']").find('input').removeAttr('checked') + } + + tr.show(); + arrTrs[i] = tr + } + + //璁剧疆鍒嗛〉 + setPages(1, list.length) + + canPickBox = true + } else { //涓嶆垚鍔� + layer.msg("鏃犳暟鎹�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + $("#boxNum").val(0) + setPages(1, 0) + } + // $("#boxCnt").html("褰撳墠鎵樼洏涓婄殑绠卞瓙鏁伴噺锛�"+res.length) + } + + //妫�鏌ユ墭鐩樼姸鎬乗鏍规嵁鎵樼洏鍙疯幏鍙栧緟妫�璐т俊鎭痋娓叉煋鐗╂枡\娓叉煋鎵规 + function checkPalletStat() { + // var list = tmpBoxs + if ($("#STOCKCODE").val() == "") { + layer.msg("鎵樼洏鍙蜂负绌�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + return + } + + var param = { + "palNo": $("#STOCKCODE").val() + } + synData(IP + "/PdaInterface/GetPalnoStatus", param, 'post', function (res) { + + if (res.msg == "鏈夋晥鎵樼洏") { //鎴愬姛 + + $.cookie('stockCode', $("#STOCKCODE").val()); + + updateBillList(); + getBar($("#bar").val()); + updateGoodList(); + updateLotNoList(); + GetOutInfo(); + + } else { //涓嶆垚鍔� + layer.msg("鏃犳晥鎵樼洏", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + //鑾峰彇閫変腑鐨勭墿鏂欐壒娆″搴旂殑鎷h揣鍑哄簱ID + function getBoxInfoByBoxCode(exportGoodsCode, exportLotNo) { + let list = tableData + for (let i = 0; i < list.length; i++) { + if (list[i].ExportGoodsCode == exportGoodsCode && list[i].ExportLotNo == exportLotNo) { + return list[i] + } + } + return null + } + + //纭鎷h揣锛堜笉鏄暣鎵橈級 + function reqPickScatter() { + if ($("#BOXCODE").val() == "") { + return + } + let boxinfo = getBoxInfoByBoxCode($("#goodSelect").val(), $("#lotNoSelect").val()) + + var param = { + "billCode": boxinfo.ExportRemark, + "orderId": boxinfo.Id, + "pickNum": $('#outScatterQty').val(), + "status": $("input[type='radio']:checked").val(), + "newStockCode": $('#NEWSTOCKCODE').val() + } + sendData(IP + "/PdaInterface/SetReturnGoodPickFlag", param, 'post', function (res) { + //console.log(res); + checkPalletStat() + if (res.code == 1) { //鎴愬姛 + layer.msg(res.msg, { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + canPickBox = true//鍥炶皟 + }); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + canPickBox = true//鍥炶皟 + }); + } + }); + } + + //鍗曟嫞璐э紙纭鎸夐挳锛� + form.on('submit(formPickScatter)', function (data) { + // if (!$.cookie('userId')) { + // layer.msg('鐧婚檰澶辨晥锛岃閲嶆柊鐧婚檰', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function() { + // location.href = "login.html"; + // //鍥炶皟 + // }); + // } + + if ($('#outScatterQty').val() == "") { + layer.msg("璇疯緭鍏ユ嫞璐ф暟閲�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + }); + return + } + if ($('#NEWSTOCKCODE').val() == "") { + layer.msg("璇疯緭鍏ユ柊鎵樼洏鏉$爜", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + }); + return + } + if ($('#goodSelect').val() == "") { + layer.msg("璇烽�夋嫨鐗╂枡", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + }); + return + } + if ($('#lotNoSelect').val() == "") { + layer.msg("璇烽�夋嫨鎵规", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + }); + return + } + let boxinfo = getBoxInfoByBoxCode($("#goodSelect").val(), $("#lotNoSelect").val()) + if (!boxinfo) { + layer.msg("鏈煡璇㈠埌鐗╂枡鎵规淇℃伅", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + }); + return + } + let pn = boxinfo.PickNum + if ($.isPlainObject(boxinfo.PickNum) || pn == 0) { + pn = boxinfo.Qty + } + if (!$("#outScatterQty").val()) { + layer.msg("璇疯緭鍏ユ嫞璐ф暟閲�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + }); + return + } + let qty = parseInt($('#outScatterQty').val()) + if (qty <= 0 || qty > pn) { + layer.msg("鎷h揣鏁伴噺闇�澶т簬0锛屽苟涓斾笉鑳借秴杩囧緟鎷f暟閲�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + }); + return + } + + if (canPickBox == false) { + //console.log("璇锋眰鏈畬鎴愶紝涓嶈閲嶅璇锋眰锛� canPickBox is "+canPickBox) + return + } + + canPickBox = false + + reqPickScatter() + + return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆� + }); + // form.verify({ + // stock: [/^[\S]{6}$/, '鎵樼洏鏉$爜蹇呴』涓哄叚浣嶅瓧绗�'] + // }); + + + + + //涓婚〉鍙婇噸鏂扮櫥褰� + $("#menuImg").click(function (e) { + //console.log("menuImg") + e.stopPropagation() + + if ($("#menuList").is(":hidden")) { + $("#menuList").show() + } else { + $("#menuList").hide() + } + }) + $('body').click(function () { + // //console.log("body") + $("#menuList").hide() + }) + + + //璁剧疆鍒嗛〉 + function setPages(pageIndex, boxNum) { + 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) { + + + 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 + } + //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() + } + } + + 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") + } + } + //console.log("totalTrNum is " + totalTrNum) + } + //涓婁竴椤垫寜閽鐐瑰嚮 + function onClickPrevPage() { + //console.log("涓婁竴椤垫寜閽鐐瑰嚮") + if (curPageIndex == 1) { + return + } + setCurPage(curPageIndex - 1) + } + //涓嬩竴椤垫寜閽鐐瑰嚮 + function onClickNextPage() { + //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") + let n = getBoxPageNum() + if (curPageIndex == n) { + 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 + } + + }) + </script> +</body> + +</html> \ No newline at end of file diff --git a/Pda/View/HouseDataSetting/stockCheck.html b/Pda/View/HouseDataSetting/stockCheck.html index 1ce8639..e849861 100644 --- a/Pda/View/HouseDataSetting/stockCheck.html +++ b/Pda/View/HouseDataSetting/stockCheck.html @@ -7,7 +7,7 @@ <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> --> <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> --> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> - <title>Boxline PDA</title> + <title>搴撳瓨鐩樼偣</title> <link rel="stylesheet" href="/layui/css/layui.css" /> <link rel="stylesheet" href="/css/style.css" /> @@ -158,16 +158,20 @@ .cut-line { margin-top: 10px; } - .show{ + + .show { display: block; } - .noshow{ + + .noshow { display: none; } + td { word-break: break-all; word-wrap: break-word; } + .layui-form-switch { margin-top: 0; } @@ -221,27 +225,27 @@ autocomplete="off" class="layui-input"> </div> </div> - + <div class="layout-tab-page"> - <div id="" class="layui-form-item layout-input" > + <div id="" class="layui-form-item layout-input"> <label class="layui-form-label">鏄惁鏁伴噺鐩樼偣锛�</label> <div class="layui-input-block" style="position: absolute;top: 100;"> - <input type="checkbox" name="IsZhengTuo" id="IsZhengTuo" lay-skin="switch" lay-text="鏄瘄鍚�" - lay-filter="IsZhengTuo" class="layui-input" > + <input type="checkbox" name="IsZhengTuo" id="IsZhengTuo" lay-skin="switch" + lay-text="鏄瘄鍚�" lay-filter="IsZhengTuo" class="layui-input"> </div> </div> <div id="boxno1" class="layui-form-item layout-input" style="margin-top: 10px;"> <label class="layui-form-label">绠辩爜锛�</label> <div class="layui-input-block"> <input id="boxNo" type="text" lay-verify="boxNo" placeholder="璇锋壂鎻忓绠辨潯鐮�" - autocomplete="off" class="layui-input"> + autocomplete="off" class="layui-input"> </div> </div> <div id="boxno3" class="layui-form-item layout-input noshow" style="margin-top: 10px;"> <label class="layui-form-label">鏀爜锛�</label> <div class="layui-input-block"> <input id="boxNo3" type="text" lay-verify="boxNo3" placeholder="璇锋壂鎻忔敮鐮�" - autocomplete="off" class="layui-input"> + autocomplete="off" class="layui-input"> </div> </div> <div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;"> @@ -286,13 +290,21 @@ </form> </div> - <div id="tableid" class="layout-tbl-paging"> + <div id="tableid" class="layout-tbl-paging"> <table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding=""> <tr> - <th style="width: 40%;"><p id="a">绠辩爜</p></th> - <th style="width: 30%;"><p id="b">鏀爜</p></th> - <th style="width: 15%;"><p id="c">绠卞唴鏁伴噺</p></th> - <th style="width: 15%;"><p id="d">缁撴灉</p></th> + <th style="width: 40%;"> + <p id="a">绠辩爜</p> + </th> + <th style="width: 30%;"> + <p id="b">鏀爜</p> + </th> + <th style="width: 15%;"> + <p id="c">绠卞唴鏁伴噺</p> + </th> + <th style="width: 15%;"> + <p id="d">缁撴灉</p> + </th> </tr> <tr id="boxCell" style="display: none;"> <td name="boxNo"></td> @@ -301,7 +313,7 @@ <td name="result"></td> </tr> </table> - + </div> </div> </div> @@ -315,7 +327,7 @@ layui.use(['form', 'jquery'], function () { var form = layui.form - + var tableData = null; var canPickBox = true; $("#palletNo").focus(); @@ -327,20 +339,20 @@ $("#a").html(''); $("#b").html(''); $("#c").html(''); - + if (obj.elem.checked) { $('#boxno1').attr("style", "display:none") $('#boxno3').attr("style", "display:none") - isContinue="1"; + isContinue = "1"; $("#a").html('鐗╂枡缂栫爜'); $("#b").html('鎵樼洏鏉$爜'); $("#c").html('鎵樼洏鏁伴噺'); - } else { + } else { $('#boxno1').attr("style", "display:block") $('#boxno3').attr("style", "display:block") - isContinue="0"; + isContinue = "0"; $("#a").html('绠辩爜'); $("#b").html('鏀爜'); @@ -349,15 +361,15 @@ if ($("#Result").val() != "0") { $('#boxno3').addClass("show"); $('#boxno3').removeClass("noshow"); - }else{ + } else { $('#boxno3').addClass("noshow"); $('#boxno3').removeClass("show"); } - if($("#Result").val() == "2"){ + if ($("#Result").val() == "2") { $('#factNum').removeAttr("disabled"); } - else{ - $('#factNum').attr("disabled","disabled"); + else { + $('#factNum').attr("disabled", "disabled"); } } $('#boxNo').val(""); @@ -390,7 +402,7 @@ // checkPalletState() // }) //褰撴墭鐩樻潯鐮佽緭鍏ュ簱鍥炶溅鏃� - $("#palletNo").keydown(function(e) { + $("#palletNo").keydown(function (e) { if (e.keyCode === 13) { //妫�鏌ユ墭鐩樼姸鎬� checkPalletState(); @@ -419,7 +431,7 @@ if (res.code == 0) { //鎴愬姛 updateBillList(); - updateGoodList(); + updateGoodList(); GetOutInfo(); } else { //涓嶆垚鍔� layer.msg("鏃犳晥鎵樼洏", { @@ -430,9 +442,9 @@ }); } - + //鏇存柊鐩樼偣鍗� - function updateBillList() { + function updateBillList() { $("#bar").empty() $("#bar").append('<option value =>' + '</option>'); form.render('select'); @@ -441,7 +453,7 @@ PalletNo: $("#palletNo").val(), }; synData(IP + "/PdaCr/GetStockCheckNoList", param, 'post', function (res) { - + if (res.code == 0) { //鎴愬姛 for (var i = 0; i < res.data.length; i++) { if (i == 0) { @@ -452,7 +464,7 @@ + res.data[i] + '</option>'); } } - form.render('select'); + form.render('select'); } else { //涓嶆垚鍔� layer.msg(res.msg, { icon: 2, @@ -463,7 +475,7 @@ } //鍒濆鍖栨覆鏌撶墿鏂� function updateGoodList() { - + $("#skuLotNo").empty() $("#skuLotNo").append('<option value =>' + '</option>'); form.render('select'); @@ -475,16 +487,16 @@ synData(IP + "/PdaCr/GetStockCheckDetailList", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 for (var i = 0; i < res.data.length; i++) { - var vl = res.data[i].SkuNo+'-'+ res.data[i].LotNo; - var vl2 = res.data[i].SkuName+'-'+ res.data[i].LotNo; + var vl = res.data[i].SkuNo + '-' + res.data[i].LotNo; + var vl2 = res.data[i].SkuName + '-' + res.data[i].LotNo; if (i == 0) { - $("#skuLotNo").append('<option value =' + vl + ' selected>'+ vl2 + '</option>'); + $("#skuLotNo").append('<option value =' + vl + ' selected>' + vl2 + '</option>'); } else { - $("#skuLotNo").append('<option value =' + vl + '>'+ vl2 + '</option>'); + $("#skuLotNo").append('<option value =' + vl + '>' + vl2 + '</option>'); } } form.render('select'); - + } else { //涓嶆垚鍔� // layer.msg(res.msg, { // icon: 2, @@ -540,14 +552,14 @@ return } if ($("#Result").val() == "2" && isContinue == "0") { - if ($("#boxNo").val() == "" ||$("#boxNo3").val() == "") { + if ($("#boxNo").val() == "" || $("#boxNo3").val() == "") { layer.msg("璇锋壂鎻忓绠辨潯鐮佸拰鏀爜", { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }); return; - } - if($("#factNum").val()<=0){ + } + if ($("#factNum").val() <= 0) { layer.msg("鐩樼泩鏃舵暟閲忎笉鑳戒负绌轰笖闇�澶т簬0", { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 @@ -555,9 +567,9 @@ return; } } - + if (canPickBox == true) { - canPickBox = false; + canPickBox = false; var param = { "CrNo": $("#bar").val(), "CrDetail": $("#skuLotNo").val(), @@ -569,7 +581,7 @@ "isContinue": isContinue, } sendData(IP + "/PdaCr/CrSetCheck", param, 'post', function (res) { - + if (res.code == 0) { //鎴愬姛 layer.msg(res.msg, { icon: 1, @@ -600,21 +612,21 @@ } return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆� }); - + //閫変腑缁撴灉涓嬫媺浜嬩欢 form.on('select(Result)', function (data) { if (data.value != "0") { $('#boxno3').addClass("show"); $('#boxno3').removeClass("noshow"); - }else{ + } else { $('#boxno3').addClass("noshow"); $('#boxno3').removeClass("show"); } - if(data.value == "2" || isContinue == "1"){ + if (data.value == "2" || isContinue == "1") { $('#factNum').removeAttr("disabled"); } - else if(isContinue != "1"){ - $('#factNum').attr("disabled","disabled"); + else if (isContinue != "1") { + $('#factNum').attr("disabled", "disabled"); } $('#boxNo3').val(""); }); @@ -623,7 +635,7 @@ let data = tableData //鍏堟竻绌轰竴涓嬬瀛愬垪琛� let trs = $("#tableBoxList tr") - let len = trs.length ; + let len = trs.length; for (i = len - 1; i >= 2; i--) { trs[i].remove(); } @@ -646,29 +658,28 @@ idx++; tr.attr('index', idx) //鍒ゆ柇鏄惁涓烘暟閲� - if(isContinue == "1") - { + if (isContinue == "1") { tr.find("td[name='boxNo']").html(list[i].SkuNo); tr.find("td[name='boxNo3']").html(list[i].PalletNo); } - else{ + else { tr.find("td[name='boxNo']").html(list[i].BoxNo); tr.find("td[name='boxNo3']").html(list[i].BoxNo3); } tr.find("td[name='qty']").html(list[i].Qty); - - var CheckResultStr=''; - if(list[i].CheckResult=='0'){ - CheckResultStr='姝e父'; - } else if(list[i].CheckResult=='1'){ - CheckResultStr='鐩樹簭'; - }else if(list[i].CheckResult=='2'){ - CheckResultStr='鐩樼泩'; - }else if(list[i].CheckResult=='3'){ - CheckResultStr='瀹炵墿涓嶇'; - }else if(list[i].CheckResult=='4'){ - CheckResultStr='鏁伴噺鐩樼偣'; + + var CheckResultStr = ''; + if (list[i].CheckResult == '0') { + CheckResultStr = '姝e父'; + } else if (list[i].CheckResult == '1') { + CheckResultStr = '鐩樹簭'; + } else if (list[i].CheckResult == '2') { + CheckResultStr = '鐩樼泩'; + } else if (list[i].CheckResult == '3') { + CheckResultStr = '瀹炵墿涓嶇'; + } else if (list[i].CheckResult == '4') { + CheckResultStr = '鏁伴噺鐩樼偣'; } tr.find("td[name='result']").html(CheckResultStr); diff --git a/Pda/View/HouseDataSetting/stockQuery.html b/Pda/View/HouseDataSetting/stockQuery.html index 28514ac..3630232 100644 --- a/Pda/View/HouseDataSetting/stockQuery.html +++ b/Pda/View/HouseDataSetting/stockQuery.html @@ -1,144 +1,158 @@ <!DOCTYPE html> <html> - <head> - <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> - <meta charset="UTF-8" /> - <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> --> - <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> --> - <meta http-equiv="X-UA-Compatible" content="ie=edge" /> - <title>Boxline PDA</title> - <link rel="stylesheet" href="/layui/css/layui.css" /> - <link rel="stylesheet" href="/css/style.css" /> - <script src="/js/adaptive.js"></script> - - <link rel="stylesheet" href="/css/my.css" /> - <style type="text/css"> - .layui-form-label { - width: 20%; - } - .layui-input-block { - width: 80%; - margin-left: 20%; - } - .div-tbl-title { - width: 98%; - margin: auto; - /* background-color: #4476A7; */ - height: 30px; - margin-top: 20px; - } - .div-tbl-title table { - width: 100%; - height: 30px; - } - .div-tbl-title td { - width: 50%; - height: 30px; - line-height: 30px; - } - .div-tbl-title span { - float: left; - width: 60%; - height: 30px; - line-height: 30px; - } - .div-tbl-title input { - float: left; - width: 40%; - height: 30px; - line-height: 30px; - border: none; - } - .layout-tbl-paging { - margin-top: 0; - } - .layout-bill-info { - height: auto; - } - .btn-ok { - border: none; - color: #FFFFFF; - background-color: #0a93e3; - width: 48%; - height: 36px; - border-radius: 5px; - float: left; - margin: 0 1%; - margin-left: 25%; - } - .btn-ok:active { - opacity: 0.8; - } - td{ - word-break: break-all; word-wrap:break-word; - } - </style> - <link rel="stylesheet" href="/css/adapter.css" /> - </head> - <body> - <div id="" class="main-content"> - <div id="" class="layout-title" > - <table border="" cellspacing="" cellpadding=""> - <tr> - <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg" ></a></td> - <td class="title-text">搴撳瓨鏌ヨ</td> - <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg" ></td> - </tr> - </table> +<head> + <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> + <meta charset="UTF-8" /> + <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> --> + <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> --> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + <title>搴撳瓨鏌ヨ</title> + + <link rel="stylesheet" href="/layui/css/layui.css" /> + <link rel="stylesheet" href="/css/style.css" /> + <script src="/js/adaptive.js"></script> + + <link rel="stylesheet" href="/css/my.css" /> + <style type="text/css"> + .layui-form-label { + width: 20%; + } + + .layui-input-block { + width: 80%; + margin-left: 20%; + } + + .div-tbl-title { + width: 98%; + margin: auto; + /* background-color: #4476A7; */ + height: 30px; + margin-top: 20px; + } + + .div-tbl-title table { + width: 100%; + height: 30px; + } + + .div-tbl-title td { + width: 50%; + height: 30px; + line-height: 30px; + } + + .div-tbl-title span { + float: left; + width: 60%; + height: 30px; + line-height: 30px; + } + + .div-tbl-title input { + float: left; + width: 40%; + height: 30px; + line-height: 30px; + border: none; + } + + .layout-tbl-paging { + margin-top: 0; + } + + .layout-bill-info { + height: auto; + } + + .btn-ok { + border: none; + color: #FFFFFF; + background-color: #0a93e3; + width: 48%; + height: 36px; + border-radius: 5px; + float: left; + margin: 0 1%; + margin-left: 25%; + } + + .btn-ok:active { + opacity: 0.8; + } + + td { + word-break: break-all; + word-wrap: break-word; + } + </style> + <link rel="stylesheet" href="/css/adapter.css" /> +</head> + +<body> + <div id="" class="main-content"> + <div id="" class="layout-title"> + <table border="" cellspacing="" cellpadding=""> + <tr> + <td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td> + <td class="title-text">搴撳瓨鏌ヨ</td> + <td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td> + </tr> + </table> + </div> + <div id="" class="layout-sub-content"> + <div id="menuList" class="menu"> + <ul class="" style="text-align: center;"> + <li><a href="../index.html">涓婚〉</a></li> + <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> + </ul> </div> - <div id="" class="layout-sub-content"> - <div id="menuList" class="menu"> - <ul class="" style="text-align: center;"> - <li><a href="../index.html">涓婚〉</a></li> - <li><a href="../login.html">閲嶆柊鐧诲綍</a></li> - </ul> - </div> - - <div id="" class="layout-bill-info"> - <form class="layui-form" action="" style="height: auto;"> - <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> - <label class="layui-form-label">鍌ㄤ綅鍦板潃</label> - <div class="layui-input-block"> - <input id="LocatNo" type="text" lay-verify="stock" placeholder="鍌ㄤ綅鍦板潃" - autocomplete="off" class="layui-input"> - </div> + + <div id="" class="layout-bill-info"> + <form class="layui-form" action="" style="height: auto;"> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">鍌ㄤ綅鍦板潃</label> + <div class="layui-input-block"> + <input id="LocatNo" type="text" lay-verify="stock" placeholder="鍌ㄤ綅鍦板潃" autocomplete="off" + class="layui-input"> </div> - <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> - <label class="layui-form-label">鎵樼洏鏉$爜</label> - <div class="layui-input-block"> - <input id="PalletNo" type="text" lay-verify="stock" placeholder="鎵樼洏鏉$爜" - autocomplete="off" class="layui-input"> - </div> + </div> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">鎵樼洏鏉$爜</label> + <div class="layui-input-block"> + <input id="PalletNo" type="text" lay-verify="stock" placeholder="鎵樼洏鏉$爜" autocomplete="off" + class="layui-input"> </div> - <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> - <label class="layui-form-label">鐗╂枡缂栫爜</label> - <div class="layui-input-block"> - <input id="SkuNo" type="text" lay-verify="stock" - autocomplete="off" class="layui-input" style="border: 0px; " disabled> - </div> + </div> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">鐗╂枡缂栫爜</label> + <div class="layui-input-block"> + <input id="SkuNo" type="text" lay-verify="stock" autocomplete="off" class="layui-input" + style="border: 0px; " disabled> </div> - <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> - <label class="layui-form-label">鐗╂枡鍚嶇О</label> - <div class="layui-input-block"> - <input id="SkuName" type="text" lay-verify="stock" - autocomplete="off" class="layui-input" style="border: 0px;" disabled> - </div> + </div> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">鐗╂枡鍚嶇О</label> + <div class="layui-input-block"> + <input id="SkuName" type="text" lay-verify="stock" autocomplete="off" class="layui-input" + style="border: 0px;" disabled> </div> - <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> - <label class="layui-form-label">鐗╂枡瑙勬牸</label> - <div class="layui-input-block"> - <input id="Standard" type="text" lay-verify="stock" - autocomplete="off" class="layui-input" style="border: 0px;" disabled> - </div> + </div> + <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <label class="layui-form-label">鐗╂枡瑙勬牸</label> + <div class="layui-input-block"> + <input id="Standard" type="text" lay-verify="stock" autocomplete="off" class="layui-input" + style="border: 0px;" disabled> </div> - <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;"> - <button id="btnQuery" class="btn-ok" type="button">鏌ヨ</button> - </div> - </form> - </div> - - <!-- <div id="" class="div-tbl-title"> + </div> + <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;"> + <button id="btnQuery" class="btn-ok" type="button">鏌ヨ</button> + </div> + </form> + </div> + + <!-- <div id="" class="div-tbl-title"> <table border="0" cellspacing="" cellpadding="" style="width: 100%;"> <tr> <td> @@ -158,320 +172,320 @@ </tr> </table> </div> --> - - <div id="" class="layout-tbl-paging" style="margin-top: 5px;"> - <!-- <p class="box-list-title">宸茬粦瀹氱瀛愬垪琛�</p> --> - <table id="tableBoxList" class="tbl-box-list" border="1px" > - <tr> - <th >鐗╁搧鎵规</th> - <th >搴撳瓨<br>鏁伴噺</th> - <th >閿佸畾<br>鏁伴噺</th> - <th >鍐荤粨<br>鏁伴噺</th> - </tr> - <tr id="boxCell" style="display: none;"> - - <td name="LotNo">鐗╂枡鎵规</td> - <td name="Qty">鍓╀綑鏁伴噺</td> - <td name="LockQty">閿佸畾鏁伴噺</td> - <td name="FrozenQty">鍐荤粨鏁伴噺</td> - </tr> - </table> - - <!-- 鍒嗛〉 --> - <table id="tableBoxPages" class="tbl-box-pages" cellspacing="" cellpadding=""> - <tr > - <td class="page-prev">涓婁竴椤�</td> - <td class="page-num page-num-select">1</td> - <td class="page-num">2</td> - <td class="page-num">3</td> - <td class="page-num">4</td> - <td class="page-num">5</td> - <td class="page-next">涓嬩竴椤�</td> - </tr> - </table> - - </div> + + <div id="" class="layout-tbl-paging" style="margin-top: 5px;"> + <!-- <p class="box-list-title">宸茬粦瀹氱瀛愬垪琛�</p> --> + <table id="tableBoxList" class="tbl-box-list" border="1px"> + <tr> + <th>鐗╁搧鎵规</th> + <th>搴撳瓨<br>鏁伴噺</th> + <th>閿佸畾<br>鏁伴噺</th> + <th>鍐荤粨<br>鏁伴噺</th> + </tr> + <tr id="boxCell" style="display: none;"> + + <td name="LotNo">鐗╂枡鎵规</td> + <td name="Qty">鍓╀綑鏁伴噺</td> + <td name="LockQty">閿佸畾鏁伴噺</td> + <td name="FrozenQty">鍐荤粨鏁伴噺</td> + </tr> + </table> + + <!-- 鍒嗛〉 --> + <table id="tableBoxPages" class="tbl-box-pages" cellspacing="" cellpadding=""> + <tr> + <td class="page-prev">涓婁竴椤�</td> + <td class="page-num page-num-select">1</td> + <td class="page-num">2</td> + <td class="page-num">3</td> + <td class="page-num">4</td> + <td class="page-num">5</td> + <td class="page-next">涓嬩竴椤�</td> + </tr> + </table> + </div> </div> - - <script src="/js/jquery-3.5.1.min.js"></script> - <script src="/layui/layui.js"></script> - <script src="/js/public.js"></script> - <script src="/js/jquery.cookie.js"></script> - <script> - layui.use(['form', 'jquery'], function() { - var form = layui.form - - //褰撳墠鍒嗛〉 - var curPageIndex = 1 - var tableData = null - - //鎵�閫夊叆搴撳崟鐨勮缁嗕俊鎭� - //console.log($.cookie('userId')); - // if (!$.cookie('userId')) { - // layer.msg('鐧婚檰澶辨晥锛岃閲嶆柊鐧婚檰', { - // icon: 2, - // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - // }, function() { - // location.href = "login.html"; - // //鍥炶皟 - // }); - // } - - $("#menuImg").click(function(e){ - //console.log("menuImg") - e.stopPropagation() - - if($("#menuList").is(":hidden")){ - $("#menuList").show() - }else{ - $("#menuList").hide() - } - }) - $('body').click(function(){ - // //console.log("body") + </div> + + <script src="/js/jquery-3.5.1.min.js"></script> + <script src="/layui/layui.js"></script> + <script src="/js/public.js"></script> + <script src="/js/jquery.cookie.js"></script> + <script> + layui.use(['form', 'jquery'], function () { + var form = layui.form + + //褰撳墠鍒嗛〉 + var curPageIndex = 1 + var tableData = null + + //鎵�閫夊叆搴撳崟鐨勮缁嗕俊鎭� + //console.log($.cookie('userId')); + // if (!$.cookie('userId')) { + // layer.msg('鐧婚檰澶辨晥锛岃閲嶆柊鐧婚檰', { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function() { + // location.href = "login.html"; + // //鍥炶皟 + // }); + // } + + $("#menuImg").click(function (e) { + //console.log("menuImg") + e.stopPropagation() + + if ($("#menuList").is(":hidden")) { + $("#menuList").show() + } else { $("#menuList").hide() - }) - - function clear(){ - $("#LocatNo").val(''); - $("#PalletNo").val(''); - $("#SkuNo").val(""); - $("#SkuName").val(""); - $("#Standard").val(""); - - //鍏堟竻绌轰竴涓嬬瀛愬垪琛� - let trs = $("#tableBoxList tr") - let len = trs.length - //console.log("tr 鏁伴噺 + " + trs.length) - for(i=len - 1; i >=2; i--){ - trs[i].remove(); - } } - - $("#btnQuery").click(function(){ - if($('#LocatNo').val() == '' && $('#PalletNo').val() == ''){ - layer.msg("璇疯緭鍏ュ偍浣嶅湴鍧�鎴栨墭鐩樻潯鐮�", { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); + }) + $('body').click(function () { + // //console.log("body") + $("#menuList").hide() + }) + + function clear() { + $("#LocatNo").val(''); + $("#PalletNo").val(''); + $("#SkuNo").val(""); + $("#SkuName").val(""); + $("#Standard").val(""); + + //鍏堟竻绌轰竴涓嬬瀛愬垪琛� + let trs = $("#tableBoxList tr") + let len = trs.length + //console.log("tr 鏁伴噺 + " + trs.length) + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + } + + $("#btnQuery").click(function () { + if ($('#LocatNo').val() == '' && $('#PalletNo').val() == '') { + layer.msg("璇疯緭鍏ュ偍浣嶅湴鍧�鎴栨墭鐩樻潯鐮�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + clear(); + return + } + var param = { + LocatNo: $('#LocatNo').val(), + PalletNo: $('#PalletNo').val(), + }; + sendData(IP + "/PdaCr/GetStockQueryList", param, 'get', function (res) { + console.log("搴撳瓨鏌ヨ锛�", res) + if (res.code == 0) { //鎴愬姛 clear(); - return - } - var param = { - LocatNo: $('#LocatNo').val(), - PalletNo: $('#PalletNo').val(), - }; - sendData(IP + "/PdaCr/GetStockQueryList", param, 'get', function(res) { - console.log("搴撳瓨鏌ヨ锛�",res) - if (res.code == 0) { //鎴愬姛 - clear(); - $("#LocatNo").val(res.data[0].LocatNo); - $("#PalletNo").val(res.data[0].PalletNo); - $("#SkuNo").val(res.data[0].SkuNo); - $("#SkuName").val(res.data[0].SkuName); - $("#Standard").val(res.data[0].Standard); - tableData = deepCopy(res.data) - refreshTable() - } else { //涓嶆垚鍔� - layer.msg(res.msg, { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - clear(); - let trs = $("#tableBoxList tr") - let len = trs.length - //console.log("tr 鏁伴噺 + " + trs.length) - for(i=len - 1; i >=2; i--){ - trs[i].remove(); - } - }); - } - }); - }) - - function refreshTable() { - //鍏堟竻绌轰竴涓嬬瀛愬垪琛� - let trs = $("#tableBoxList tr") - let len = trs.length - //console.log("tr 鏁伴噺 + " + trs.length) - for(i=len - 1; i >=2; i--){ - trs[i].remove(); - } - - //璁剧疆鎵樼洏鍙� - // $("#palletCode").val($.cookie('stockCode')) - - if (tableData.length > 0) { //鎴愬姛 - // $("#boxNum").val(tableData.length) - var list = tableData - var arrTrs = new Array() - let idx = 0 - for(var i in list) { - // list[i].BoxCode - var tr = $("#boxCell").eq(0).clone(); - tr.appendTo("#tableBoxList"); - // tr.attr('id', list[i].BoxCode) - idx++; - tr.attr('index', idx) - - tr.find("td[name='LotNo']").html(list[i].LotNo); - tr.find("td[name='Qty']").html(list[i].Qty); - tr.find("td[name='LockQty']").html(list[i].LockQty); - tr.find("td[name='FrozenQty']").html(list[i].FrozenQty); - // tr.find("td[name='InspectQty']").html(list[i].InspectQty); - - - // //console.log("boxcode is "+tr.find("td[name='boxcode']").html()) - tr.show(); - arrTrs[i] = tr - } - - //璁剧疆鍒嗛〉 - setPages(1, list.length) + $("#LocatNo").val(res.data[0].LocatNo); + $("#PalletNo").val(res.data[0].PalletNo); + $("#SkuNo").val(res.data[0].SkuNo); + $("#SkuName").val(res.data[0].SkuName); + $("#Standard").val(res.data[0].Standard); + tableData = deepCopy(res.data) + refreshTable() } else { //涓嶆垚鍔� - // $("#boxNum").val(0) - layer.msg("鏃犳暟鎹�", { + layer.msg(res.msg, { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); - setPages(1, 0) + }, function () { + clear(); + let trs = $("#tableBoxList tr") + let len = trs.length + //console.log("tr 鏁伴噺 + " + trs.length) + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + }); } - } - - //璁剧疆鍒嗛〉 - function setPages(pageIndex, boxNum){ - 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){ - 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 - } - //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() - } - } - - 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") - } - } - //console.log("totalTrNum is " + totalTrNum) - } - - function onClickPrevPage(){ - //console.log("涓婁竴椤垫寜閽鐐瑰嚮") - if(curPageIndex == 1){ - return - } - setCurPage(curPageIndex - 1) - } - - function onClickNextPage(){ - //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") - let n = getBoxPageNum() - if(curPageIndex == n){ - 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.verify({ - stock: [/^[\S]{6}$/, '鎵樼洏鏉$爜蹇呴』涓哄叚浣嶅瓧绗�'] }); }) - </script> - </body> -</html> + + function refreshTable() { + //鍏堟竻绌轰竴涓嬬瀛愬垪琛� + let trs = $("#tableBoxList tr") + let len = trs.length + //console.log("tr 鏁伴噺 + " + trs.length) + for (i = len - 1; i >= 2; i--) { + trs[i].remove(); + } + + //璁剧疆鎵樼洏鍙� + // $("#palletCode").val($.cookie('stockCode')) + + if (tableData.length > 0) { //鎴愬姛 + // $("#boxNum").val(tableData.length) + var list = tableData + var arrTrs = new Array() + let idx = 0 + for (var i in list) { + // list[i].BoxCode + var tr = $("#boxCell").eq(0).clone(); + tr.appendTo("#tableBoxList"); + // tr.attr('id', list[i].BoxCode) + idx++; + tr.attr('index', idx) + + tr.find("td[name='LotNo']").html(list[i].LotNo); + tr.find("td[name='Qty']").html(list[i].Qty); + tr.find("td[name='LockQty']").html(list[i].LockQty); + tr.find("td[name='FrozenQty']").html(list[i].FrozenQty); + // tr.find("td[name='InspectQty']").html(list[i].InspectQty); + + + // //console.log("boxcode is "+tr.find("td[name='boxcode']").html()) + tr.show(); + arrTrs[i] = tr + } + + //璁剧疆鍒嗛〉 + setPages(1, list.length) + } else { //涓嶆垚鍔� + // $("#boxNum").val(0) + layer.msg("鏃犳暟鎹�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + setPages(1, 0) + } + } + + //璁剧疆鍒嗛〉 + function setPages(pageIndex, boxNum) { + 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) { + 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 + } + //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() + } + } + + 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") + } + } + //console.log("totalTrNum is " + totalTrNum) + } + + function onClickPrevPage() { + //console.log("涓婁竴椤垫寜閽鐐瑰嚮") + if (curPageIndex == 1) { + return + } + setCurPage(curPageIndex - 1) + } + + function onClickNextPage() { + //console.log("涓嬩竴椤垫寜閽鐐瑰嚮") + let n = getBoxPageNum() + if (curPageIndex == n) { + 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.verify({ + stock: [/^[\S]{6}$/, '鎵樼洏鏉$爜蹇呴』涓哄叚浣嶅瓧绗�'] + }); + }) + </script> +</body> + +</html> \ No newline at end of file diff --git a/Pda/View/index.html b/Pda/View/index.html index 5a1b7f7..5382238 100644 --- a/Pda/View/index.html +++ b/Pda/View/index.html @@ -1,146 +1,161 @@ <!DOCTYPE html> <html> - <head> - <meta charset="UTF-8" /> - <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> - <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" /> --> - <meta http-equiv="X-UA-Compatible" content="ie=edge" /> - <title>Boxline PDA</title> - <link rel="stylesheet" href="../layui/css/layui.css" /> - <link rel="stylesheet" href="../css/style.css" /> - <script src="../js/adaptive.js"></script> - <!--鏇存敼妗岄潰icon 浠匒ndroid鏀寔--> - <link rel="shortcut icon" href="../assets/icon.png"> - <!-- <meta name="mobile-web-app-capable" content="yes"> --> - - <link rel="stylesheet" href="../css/my.css" /> - <style type="text/css"> - .layout-bill-info { - height: 255px; - } - .layout-tbl-submit { - margin-top: 10px; - } - .menu { - height: 40px; - } - .sub-title-bg { - background-image: url(../assets/subtitle_bg.png); - /* margin:20px 10px 5px 10px; */ - /* background-color: #009688; */ - height: 26px; - line-height: 26px; - margin: auto; - margin-top: 20px; - width: 96%; - } - .sub-title-bg span { - font-size: 16px; - color: #FFFFFF; - margin-left: 4px; - /* background-color: #0000FF; */ - margin-top: 0px; - } - .layout-btn-container { - width: 96%; - /* margin:5px 10px 5px 10px; */ - margin: auto; - } - .layout-btn-container table { - width: 100%; - border-collapse: separate; - border-spacing: 0px 10px; - } - .layout-btn-container table td { - width: 50%; - } - .btn{ - width: 95%; - height: 50px; - font-size: 0.8rem; - } - .btn:active{ - opacity: 0.5; - } - .mybtn-primary { - color: #fff; - background-color: #007bff; - border-color: #007bff; - border: 1px solid transparent; - font-size: 16px; - border-radius: 5px; - line-height: 16px; - font-weight:normal; - height: 50px; - width: 98%; - } - .mybtn-primary:active { - opacity: 0.8; - } - .show{ - display: block; - } - .noshow{ - display: none; - } - </style> - <link rel="stylesheet" href="../css/adapter.css" /> - </head> - <body> - <div id="" class="main-content"> - <div id="" class="layout-title" > - <table border="" cellspacing="" cellpadding=""> - <tr> - <td class="img-back"><a href="/View/login.html"><img src="../assets/back.jpg" ></a></td> - <td class="title-text" lang>涓婚〉</td> - <td class="title-menu-icon"><img id="menuImg" src="../assets/menu.jpg" ></td> - </tr> - </table> +<head> + <meta charset="UTF-8" /> + <meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" /> + <!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" /> --> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + <title>Boxline PDA</title> + + <link rel="stylesheet" href="../layui/css/layui.css" /> + <link rel="stylesheet" href="../css/style.css" /> + <script src="../js/adaptive.js"></script> + <!--鏇存敼妗岄潰icon 浠匒ndroid鏀寔--> + <link rel="shortcut icon" href="../assets/icon.png"> + <!-- <meta name="mobile-web-app-capable" content="yes"> --> + + <link rel="stylesheet" href="../css/my.css" /> + <style type="text/css"> + .layout-bill-info { + height: 255px; + } + + .layout-tbl-submit { + margin-top: 10px; + } + + .menu { + height: 40px; + } + + .sub-title-bg { + background-image: url(../assets/subtitle_bg.png); + /* margin:20px 10px 5px 10px; */ + /* background-color: #009688; */ + height: 26px; + line-height: 26px; + margin: auto; + margin-top: 20px; + width: 96%; + } + + .sub-title-bg span { + font-size: 16px; + color: #FFFFFF; + margin-left: 4px; + /* background-color: #0000FF; */ + margin-top: 0px; + } + + .layout-btn-container { + width: 96%; + /* margin:5px 10px 5px 10px; */ + margin: auto; + } + + .layout-btn-container table { + width: 100%; + border-collapse: separate; + border-spacing: 0px 10px; + } + + .layout-btn-container table td { + width: 50%; + } + + .btn { + width: 95%; + height: 50px; + font-size: 0.8rem; + } + + .btn:active { + opacity: 0.5; + } + + .mybtn-primary { + color: #fff; + background-color: #007bff; + border-color: #007bff; + border: 1px solid transparent; + font-size: 16px; + border-radius: 5px; + line-height: 16px; + font-weight: normal; + height: 50px; + width: 98%; + } + + .mybtn-primary:active { + opacity: 0.8; + } + + .show { + display: block; + } + + .noshow { + display: none; + } + </style> + <link rel="stylesheet" href="../css/adapter.css" /> +</head> + +<body> + <div id="" class="main-content"> + <div id="" class="layout-title"> + <table border="" cellspacing="" cellpadding=""> + <tr> + <td class="img-back"><a href="/View/login.html"><img src="../assets/back.jpg"></a></td> + <td class="title-text" lang>涓婚〉</td> + <td class="title-menu-icon"><img id="menuImg" src="../assets/menu.jpg"></td> + </tr> + </table> + </div> + <div id="" class="layout-sub-content"> + <div id="menuList" class="menu"> + <ul class="" style="text-align: center;"> + <li><a lang href="/View/login.html">閲嶆柊鐧诲綍</a></li> + </ul> </div> - <div id="" class="layout-sub-content"> - <div id="menuList" class="menu"> - <ul class="" style="text-align: center;"> - <li><a lang href="/View/login.html">閲嶆柊鐧诲綍</a></li> - </ul> - </div> - <div class="" > - <section> - <div class="sub-title-bg" > - <span lang>鍏ュ簱浣滀笟鍖�</span> - </div> - <div class="layout-btn-container" > - - <div style="display: flex; flex-direction: row; flex-wrap: wrap;" id="ruKu"> - <!-- <a href="/View/AsnSetting/materialEnter.html"><button type="button" class="mybtn-primary" lang>閲囪喘鍏ュ簱</button></a> + <div class=""> + <section> + <div class="sub-title-bg"> + <span lang>鍏ュ簱浣滀笟鍖�</span> + </div> + <div class="layout-btn-container"> + + <div style="display: flex; flex-direction: row; flex-wrap: wrap;" id="ruKu"> + <!-- <a href="/View/AsnSetting/materialEnter.html"><button type="button" class="mybtn-primary" lang>閲囪喘鍏ュ簱</button></a> <a href="/View/AsnSetting/returnEnter.html"><button type="button" class="mybtn-primary" lang>閫�璐у叆搴�</button></a> --> - </div> </div> - </section> - <section> - <div class="sub-title-bg" > - <span lang>鍑哄簱浣滀笟鍖�</span> - </div> - - <div class="layout-btn-container"> - <div style="display: flex; flex-direction: row; flex-wrap: wrap;" id="chuKu"> + </div> + </section> + <section> + <div class="sub-title-bg"> + <span lang>鍑哄簱浣滀笟鍖�</span> + </div> - </div> + <div class="layout-btn-container"> + <div style="display: flex; flex-direction: row; flex-wrap: wrap;" id="chuKu"> + </div> - </section> - <section> - <div class="sub-title-bg" > - <span lang>搴撳唴浣滀笟鍖�</span> + </div> + </section> + <section> + <div class="sub-title-bg"> + <span lang>搴撳唴浣滀笟鍖�</span> + </div> + <div class="layout-btn-container"> + <div style="display: flex; flex-direction: row; flex-wrap: wrap;" id="kuNei"> + </div> - <div class="layout-btn-container" > - <div style="display: flex; flex-direction: row; flex-wrap: wrap;" id="kuNei"> - - </div> - </div> - </section> - <!-- <section> + </div> + </section> + <!-- <section> <div class="sub-title-bg" > <span lang>鍗曟嵁鎿嶄綔鍖�</span> </div> @@ -157,83 +172,84 @@ </table> </div> </section> --> - </div> </div> - </div> - - <script src="../js/jquery-3.5.1.min.js"></script> - <script src="../js/jquery.cookie.js"></script> - <script src="../layui/layui.js"></script> - <script src="../js/public.js"></script> - <script src="../js/language.js"></script> - <script> - layui.use([], function() { - // var carousel = layui.carousel; - initLanguage() - setLanguage() - - sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) { - if (res.code == 0) { //鎴愬姛 - var list = res.data.filter(item => item.level == "0"); - - if (list) { - for (var i = 0; i < list.length; i++) { - if (list[i].MenuNo != "9000") { //鍒ゆ柇鏄惁鏄痯da鐨勬潈闄� 鏄細璺宠繃 - continue; - } - list[i].MenuName - list[i].MenuNo - //鏌ヨ鏈夋棤瀛愯彍鍗� - var list2 = res.data.filter(item => item.ParentNo == list[i].MenuNo); - console.log(list2); - list2.forEach(element => { - var html = - `<a href="`+element.Url+`" style="width: 50%; margin-top: 10px;"> - <button type="button" class="mybtn-primary" lang>`+ element.MenuName+`</button> - </a>`; - if (element.Url.includes("AsnSetting")) { - $("#ruKu").append(html); - } - if (element.Url.includes("SoSetting")) { - $("#chuKu").append(html); - } - if (element.Url.includes("HouseDataSetting")) { - $("#kuNei").append(html); - } - }); + </div> + + <script src="../js/jquery-3.5.1.min.js"></script> + <script src="../js/jquery.cookie.js"></script> + <script src="../layui/layui.js"></script> + <script src="../js/public.js"></script> + <script src="../js/language.js"></script> + <script> + layui.use([], function () { + // var carousel = layui.carousel; + + initLanguage() + setLanguage() + + sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) { + if (res.code == 0) { //鎴愬姛 + var list = res.data.filter(item => item.level == "0"); + + if (list) { + for (var i = 0; i < list.length; i++) { + if (list[i].MenuNo != "9000") { //鍒ゆ柇鏄惁鏄痯da鐨勬潈闄� 鏄細璺宠繃 + continue; } - } - } else { //涓嶆垚鍔� - layer.msg('鑾峰彇褰撳墠鐧诲綍浜烘潈闄愪俊鎭け璐�', { - icon: 2, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - //鍥炶皟 - }); + list[i].MenuName + list[i].MenuNo + //鏌ヨ鏈夋棤瀛愯彍鍗� + var list2 = res.data.filter(item => item.ParentNo == list[i].MenuNo); + console.log(list2); + list2.forEach(element => { + var html = + `<a href="` + element.Url + `" style="width: 50%; margin-top: 10px;"> + <button type="button" class="mybtn-primary" lang>`+ element.MenuName + `</button> + </a>`; + if (element.Url.includes("AsnSetting")) { + $("#ruKu").append(html); + } + if (element.Url.includes("SoSetting")) { + $("#chuKu").append(html); + } + if (element.Url.includes("HouseDataSetting")) { + $("#kuNei").append(html); + } + }); + } } - }); + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇褰撳墠鐧诲綍浜烘潈闄愪俊鎭け璐�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + }); + } + }); - $("#menuImg").click(function(e){ - //console.log("menuImg") - e.stopPropagation() - - if($("#menuList").is(":hidden")){ - $("#menuList").show() - }else{ - $("#menuList").hide() - } - }) - $('body').click(function(){ - // //console.log("body") + $("#menuImg").click(function (e) { + //console.log("menuImg") + e.stopPropagation() + + if ($("#menuList").is(":hidden")) { + $("#menuList").show() + } else { $("#menuList").hide() - }) + } }) - </script> - </body> -</html> + $('body').click(function () { + // //console.log("body") + $("#menuList").hide() + }) + }) + </script> +</body> + +</html> \ No newline at end of file diff --git a/Wms/Model/ModelDto/PdaDto/PdaBoxInfoDto.cs b/Wms/Model/ModelDto/PdaDto/PdaBoxInfoDto.cs new file mode 100644 index 0000000..13079d3 --- /dev/null +++ b/Wms/Model/ModelDto/PdaDto/PdaBoxInfoDto.cs @@ -0,0 +1,69 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SqlSugar; + +namespace WMS.Entity.DataEntity +{ + + public class DataBoxDto + { + /// <summary> + /// Desc:绠卞彿 + /// Default: + /// Nullable:True + /// </summary> + public string BoxNo { get; set; } + /// <summary> + /// Desc:鎵规鍙� + /// Default: + /// Nullable:True + /// </summary> + public string LotNo { get; set; } + + /// <summary> + /// Desc:渚涜揣鎵规 + /// Default: + /// Nullable:True + /// </summary> + public string SupplierLot { get; set; } + /// <summary> + /// Desc:鐗╂枡缂栫爜 + /// Default: + /// Nullable:True + /// </summary> + public string SkuNo { get; set; } + + /// <summary> + /// Desc:鐗╂枡鍚嶇О + /// Default: + /// Nullable:True + /// </summary> + public string SkuName { get; set; } + + + /// <summary> + /// Desc:绠卞唴鏁伴噺 + /// Default: + /// Nullable:True + /// </summary> + public decimal Qty { get; set; } + + /// <summary> + /// Desc:璐ㄩ噺鐘舵�� + /// Default: + /// Nullable:True + /// </summary> + public string InspectStatus { get; set; } + + public List<DataBoxInfoDto> InfoList { get; set; } + } + + public class DataBoxInfoDto + { + public string BoxNo2 { get; set; } + public decimal Qty2 { get; set; } + } + +} diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs index 161ce8e..c8f8338 100644 --- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs +++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs @@ -2522,6 +2522,7 @@ SkuName = boxInfo.SkuName, Standard = sku.Standard, ProductionTime = boxInfo.ProductionTime, + ExpirationTime = boxInfo.ExpirationTime, SupplierLot = boxInfo.SupplierLot, InspectStatus = boxInfo.InspectStatus, InspectMark = boxInfo.InspectMark, @@ -2695,6 +2696,7 @@ SkuName = demo.SkuName, Standard = noticeDetail.Standard, ProductionTime = demo.ProductionTime, + ExpirationTime = demo.ExpirationTime, SupplierLot = demo.SupplierLot, InspectStatus = demo.InspectStatus, InspectMark = demo.InspectMark, diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs index bb09e1f..3a2dabc 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs +++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs @@ -2738,6 +2738,7 @@ SkuName = item.SkuName, Standard = sku.Standard, ProductionTime = item.ProductionTime, + ExpirationTime = item.ExpirationTime, SupplierLot = item.SupplierLot, InspectMark = item.InspectMark, BitBoxMark = item.BitBoxMark, diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs index 5fe710b..4b30086 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs +++ b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs @@ -5,6 +5,7 @@ using Model.InterFaceModel; using Model.ModelDto.BllCheckDto; using Model.ModelDto.PdaDto; +using Model.ModelVm; using Newtonsoft.Json; using SqlSugar; using Utility.Tools; @@ -1332,5 +1333,110 @@ } #endregion + #region 绠辩爜鏌ヨ + /// <summary> + /// 绠辩爜鏌ヨ + /// </summary> + /// <param name="boxNo">绠辩爜</param> + /// <returns></returns> + public DataBoxDto GetBoxQueryList(string boxNo) + { + // 瀹炰緥鍖栬繑鍥炵被 + DataBoxDto boxModel = new DataBoxDto(); + List<DataBoxInfoDto> list = new List<DataBoxInfoDto>(); + + // 鏍规嵁绠辩爜鑾峰彇绠变俊鎭� + var boxData = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == boxNo); + + if (boxData.Count() == 0) + { + // 鏍规嵁鐩掔爜鑾峰彇绠变俊鎭� + boxData = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo2 == boxNo); + if (boxData.Count() == 0) + { + boxModel = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo3 == boxNo).Select(it => new DataBoxDto() { Qty = it.Qty }, true).First(); + return boxModel; + } + + list = boxData.Select(it => new DataBoxInfoDto() + { + BoxNo2 = it.BoxNo3, + Qty2 = it.Qty + }).ToList(); + + boxData = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo2 == boxNo); + boxModel = boxData.GroupBy(m => new + { + m.BoxNo, + m.SkuName, + m.SkuNo, + m.LotNo, + m.SupplierLot, + m.InspectStatus + }).Select(it => new DataBoxDto() + { + BoxNo = it.BoxNo, + SkuName = it.SkuName, + SkuNo = it.SkuNo, + LotNo = it.LotNo, + SupplierLot = it.SupplierLot, + InspectStatus = it.InspectStatus == "0" ? "寰呮" : it.InspectStatus == "1" ? "鍚堟牸":"涓嶅悎鏍�", + Qty = SqlFunc.AggregateSum(it.Qty) + }).First(); + + boxModel.InfoList = list; + return boxModel; + } + else //绠辩爜鍐呮暟鎹� + { + // 澶勭悊澶氱骇鐮� + var num = boxData.Count(m => !string.IsNullOrWhiteSpace(m.BoxNo2)); + if (num > 0) + { + list = boxData.GroupBy(m => new + { + m.BoxNo2 + }).Select(it => new DataBoxInfoDto() + { + BoxNo2 = it.BoxNo2, + Qty2 = SqlFunc.AggregateSum(it.Qty) + }).ToList(); + } + else + { + list = boxData.Select(it => new DataBoxInfoDto() + { + BoxNo2 = SqlFunc.IsNull(it.BoxNo3,""), + Qty2 = it.Qty + }).ToList(); + } + + // 绠辩爜淇℃伅璧嬪�� + boxData = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == boxNo); + boxModel = boxData.GroupBy(m => new + { + m.BoxNo, + m.SkuName, + m.SkuNo, + m.LotNo, + m.SupplierLot, + m.InspectStatus + }).Select(it => new DataBoxDto() + { + BoxNo = it.BoxNo, + SkuName = it.SkuName, + SkuNo = it.SkuNo, + LotNo = it.LotNo, + SupplierLot = it.SupplierLot, + InspectStatus = it.InspectStatus == "0" ? "寰呮" : it.InspectStatus == "1" ? "鍚堟牸" : "涓嶅悎鏍�", + Qty = SqlFunc.AggregateSum(it.Qty) + }).First(); + boxModel.InfoList = list; + + return boxModel; + } + } + #endregion + } } diff --git a/Wms/WMS.BLL/DataServer/DataBoxInfoServer.cs b/Wms/WMS.BLL/DataServer/DataBoxInfoServer.cs index 021859a..bfe1048 100644 --- a/Wms/WMS.BLL/DataServer/DataBoxInfoServer.cs +++ b/Wms/WMS.BLL/DataServer/DataBoxInfoServer.cs @@ -34,9 +34,11 @@ /// <param name="bitBoxMark">闆剁鏍囪</param> /// <param name="inspectStatus">璐ㄩ噺鐘舵��</param> /// <returns></returns> - public List<DataBoxInfo> GetDataBoxInfo(string id, string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitBoxMark, string inspectStatus) + public List<DataBoxInfo> GetDataBoxInfo(string id, string skuNo, string skuName, string palletNo, string lotNo, + string boxNo, string status, string inspectMark, string bitBoxMark, string inspectStatus) { - string str = "select PalletNo,PalletNo2,PalletNo3,BoxNo,BoxNo2,BoxNo3,Status,LotNo,Qty,FullQty,SkuNo,SkuName,LotText,ProductionTime,InspectMark,BitBoxMark,InspectStatus,InspectTime from DataBoxInfo Where IsDel = @isdel"; + string str = "select PalletNo,PalletNo2,PalletNo3,BoxNo,BoxNo2,BoxNo3,Status,LotNo,Qty,FullQty,SkuNo,SkuName,LotText,ProductionTime," + + "ExpirationTime,InspectMark,BitBoxMark,InspectStatus,InspectTime from DataBoxInfo Where IsDel = @isdel"; //鍒ゆ柇id鏄惁涓虹┖ if (!string.IsNullOrEmpty(id)) { @@ -142,7 +144,8 @@ /// <returns></returns> public List<DataBoxInfo> GetBoxInfoByBoxNo(string boxNo, string boxNo3) { - string str = "select PalletNo,PalletNo2,PalletNo3,BoxNo,BoxNo2,BoxNo3,Status,LotNo,Qty,FullQty,SkuNo,SkuName,LotText,ProductionTime,InspectMark,BitBoxMark,InspectStatus,InspectTime from DataBoxInfo Where IsDel = @isdel"; + string str = "select PalletNo,PalletNo2,PalletNo3,BoxNo,BoxNo2,BoxNo3,Status,LotNo,Qty,FullQty,SkuNo,SkuName,LotText," + + "ProductionTime,ExpirationTime,InspectMark,BitBoxMark,InspectStatus,InspectTime from DataBoxInfo Where IsDel = @isdel"; //鍒ゆ柇绠辩爜鏄惁涓虹┖ if (!string.IsNullOrEmpty(boxNo)) { diff --git a/Wms/WMS.Entity/DataEntity/DataBoxInfo.cs b/Wms/WMS.Entity/DataEntity/DataBoxInfo.cs index 650be2b..517a22a 100644 --- a/Wms/WMS.Entity/DataEntity/DataBoxInfo.cs +++ b/Wms/WMS.Entity/DataEntity/DataBoxInfo.cs @@ -131,6 +131,11 @@ public DateTime? ProductionTime {get;set;} /// <summary> + /// 杩囨湡鏃堕棿 + /// </summary> + public DateTime? ExpirationTime { get; set; } + + /// <summary> /// Desc:渚涜揣鎵规 /// Default: /// Nullable:True diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs index b78fffb..6963b55 100644 --- a/Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs +++ b/Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs @@ -139,5 +139,15 @@ /// <param name="userId"></param> List<string> AgvTransport2(string soNo, string palletNo, string areaNo, int userId, string url); #endregion + + #region 绠辩爜鏌ヨ + /// <summary> + /// pda搴撳瓨鏌ヨ + /// </summary> + /// <param name="boxNo">鍌ㄤ綅缂栧彿</param> + /// <param name="palletNo">鎵樼洏鍙�</param> + /// <returns></returns> + DataBoxDto GetBoxQueryList(string boxNo); + #endregion } } diff --git a/Wms/Wms/Controllers/PdaCrController.cs b/Wms/Wms/Controllers/PdaCrController.cs index d135a64..ee47568 100644 --- a/Wms/Wms/Controllers/PdaCrController.cs +++ b/Wms/Wms/Controllers/PdaCrController.cs @@ -416,5 +416,31 @@ } #endregion + #region 绠辩爜鏌ヨ + /// <summary> + /// pda绠辩爜鏌ヨ + /// </summary> + /// <param name="boxNo">绠辩爜</param> + /// <returns></returns> + [HttpGet] + public IActionResult GetBoxQueryList(string boxNo) + { + try + { + DataBoxDto stockList = _pdaCrSvc.GetBoxQueryList(boxNo); + if (stockList == null) + { + return Ok(new { data = stockList, code = 1, msg = "鏃犳暟鎹�" }); + } + return Ok(new { data = stockList, code = 0, msg = "鎴愬姛" }); + } + catch (Exception e) + { + return Ok(new { data = "", code = 1, msg = $"寮傚父锛歿e.Message}" }); + } + + } + #endregion + } } -- Gitblit v1.8.0