| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <!--<script src="../../../layuiadmin/PubCustom.js"></script>--> |
| | | <script src="../../CreateControl.js"></script> |
| | | <script src="../../../layuiadmin/MESLanguage.js"></script> |
| | | <script src="../../../layuiadmin/SetColumn.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card" style="padding: 2px;background-color: #efefef;"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> |
| | | <div style="padding: 10px;"> |
| | | <h1 style="text-align: center; padding: 10px 0;"><b>å
è£
æ ¡éªè¿ç«å¹³å°</b></h1> |
| | | </div> |
| | | <div class="layui-tab" style="width: 100%; float: left; background-color:white;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-input-block" style="display: inline-block; margin-left: 0px; float: left"> |
| | | <label class="layui-form-label" style="padding-left:0px" id="">ééç :</label> |
| | | <input type="text" class="layui-input" name="HBarCode_SN" lay-verify="HBarCode_SN" autocomplete="off" placeholder="请é®å
¥åå车" id="HBarCode_SN" style="width: 500px;"> |
| | | </div> |
| | | <button class="layui-btn layui-btn-normal" style="float:left;" type="button" lay-submit="" lay-filter="btnNextProc" id="btnNextProc">æ¢äº§å</button> |
| | | |
| | | <button class="layui-btn layui-btn-normal" style="float:right" type="button" lay-submit="" lay-filter="btnExit" id="btnExit">éåº</button> |
| | | |
| | | |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-tab layui-tab-card" style="width: 49%; float: left; background-color: white;height:400px"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">产åä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">å
¶ä»ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content" style=""> |
| | | <!--åºæ¬ä¿¡æ¯--> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | |
| | | <div class="layui-row"> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="">æ¹æ¬¡ç ä¿¡æ¯:</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HBarCode_BatchSec" lay-verify="HBarCode_BatchSec" id="HBarCode_BatchSec" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="">å½åæ¹æ¬¡:</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HBatchNo" lay-verify="HBatchNo" id="HBatchNo" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div>--> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="">ä¾åºå:</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HSupName" lay-verify="HSupName" id="HSupName" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" class="layui-input" lay-verify="HSupID" name="HSupID" id="HSupID"> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="">å½åééç :</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HSNNo" lay-verify="HSNNo" id="HSNNo" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">追溯åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#EDEDED;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="BT_HProcExchBillNo">å·¥åºæµè½¬å¡</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HProcExchBillNo" lay-verify="HProcExchBillNo" id="HProcExchBillNo" value="" style="background-color:#efefef4d;"> |
| | | <input type="hidden" class="layui-input" name="HProcExchInterID" lay-verify="HProcExchInterID" id="HProcExchInterID" value="0"> |
| | | <input type="hidden" class="layui-input" name="HProcExchEntryID" lay-verify="HProcExchEntryID" id="HProcExchEntryID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="BT_HICMOBillNo">ç产订å</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HICMOBillNo" lay-verify="HICMOBillNo" id="HICMOBillNo" value="" style="background-color:#efefef4d;"> |
| | | <input type="hidden" class="layui-input" name="HICMOInterID" lay-verify="HICMOInterID" id="HICMOInterID" value="0"> |
| | | <input type="hidden" class="layui-input" name="HICMOEntryID" lay-verify="HICMOEntryID" id="HICMOEntryID" value="0"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;" id="BT_HProcName">å·¥åº</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" name="HProcName" lay-verify="HProcName" id="HProcName" style="background-color: #efefef4d; width: 60%; display: inline-block;" readonly> |
| | | <input type="hidden" name="HProcID" id="HProcID" lay-verify="HProcID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHProc" id="btnHProc" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="BT_HMaterNumber">产åç¼ç </label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="BT_HMaterName">产ååç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" lay-verify="HMaterName" name="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;" id="BT_HMaterModel">è§æ ¼åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" lay-verify="HMaterModel" name="HMaterModel" id="HMaterModel" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px; padding: 9px 18px;" id="BT_HDeptName">å½å车é´</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color: #efefef4d; width: 60%; display: inline-block;" readonly> |
| | | <input type="hidden" class="layui-input" lay-verify="HDeptID" name="HDeptID" id="HDeptID"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDept" id="btnHDept" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;" id="BT_HEmpName">æä½å</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HEmpName" name="HEmpName" id="HEmpName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" class="layui-input" lay-verify="HEmpID" name="HEmpID" id="HEmpID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmp" id="btnHEmp" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px; padding: 9px 18px;" id="BT_HGroupName">ç产çç»</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" name="HGroupName" id="HGroupName" lay-verify="HGroupName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" class="layui-input" name="HGroupID" lay-verify="HGroupID" id="HGroupID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHGroup" id="btnHGroup" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px; padding: 9px 18px;" id="BT_HSourceName">çäº§èµæº</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" name="HSourceName" id="HSourceName" lay-verify="HSourceName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" class="layui-input" name="HSourceID" lay-verify="HSourceID" id="HSourceID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHSource" id="btnHSource" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--å
¶ä»ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å¶å人</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å¶åæ¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-tab layui-tab-card" style="width: 50.5%; float: right;"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">å
è£
é
ä»¶æ¸
å</li> |
| | | </ul> |
| | | <div class="layui-tab-content" style="background-color: white;"> |
| | | <div class="layui-input-block" style="display: inline-block; margin-left:0px;"> |
| | | <label class="layui-form-label" style="padding-left:0px" id="">é
ä»¶ç :</label> |
| | | <input type="text" class="layui-input" name="HBarCode_Key" lay-verify="HBarCode_Key" autocomplete="off" placeholder="请é®å
¥åå车" id="HBarCode_Key" style="width: 500px;float:left"> |
| | | |
| | | </div> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab layui-tab-card" style="float:left;width:100%"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">åå²è¿ç«æ¸
å</li> |
| | | </ul> |
| | | <label class="layui-form-label" style="color: red; font-size: 24px; width:auto;position:absolute;left:300px;margin-top:-40px" id="HReturnMessage">æåæ«ç :</label> |
| | | <div class="layui-tab-content" style="background-color: white;"> |
| | | |
| | | <div class="layui-tab-item layui-show"> |
| | | <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--<script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-form"></i>è§£ç»</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | </div> |
| | | </script>--> |
| | | <script type="text/html" id="toolbarDemo2"> |
| | | <div class="layui-btn-container"> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete2"><i class="layui-icon layui-icon-form"></i>å é¤</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="refresh" id="refresh"><i class="layui-icon layui-icon-form"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn2" id="HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <script> |
| | | |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | |
| | | //å®ä¹å
¨å±åé |
| | | |
| | | var HModName = "Cj_ProcessItemStationPlatform_checkPackage"; |
| | | var HModName2 = "Cj_ProcessItemStationPlatform_checkPackage2"; |
| | | var option = []; |
| | | var option2 = []; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | var params = get_UrlVars(); |
| | | set_ClearBill(); |
| | | |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | table.on('tool(mainTable)', function (obj) { |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | }); |
| | | |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //å é¤æé® |
| | | case 'btn-Delete': set_DeleteBill(); |
| | | break; |
| | | //å设置 |
| | | case 'set_HideColumn': get_HideColumnNoPage(HModName, sessionStorage["HUserName"], option, get_Display); |
| | | break; |
| | | }; |
| | | }); |
| | | table.on('toolbar(mainTable2)', function (obj) { |
| | | switch (obj.event) { |
| | | //å é¤æé® |
| | | case 'btn-Delete2': btn_Delete(); |
| | | break; |
| | | //å设置 |
| | | case 'set_HideColumn2': get_HideColumnNoPage(HModName2, sessionStorage["HUserName"], option2, get_Display); |
| | | break; |
| | | //å·æ° |
| | | case 'refresh': get_Display(); |
| | | break; |
| | | }; |
| | | }); |
| | | //ééç åè½¦æ¹æ³ |
| | | $('#HBarCode_SN').on('keydown', function (event) { |
| | | var HBarCode_SN = $('#HBarCode_SN').val(); |
| | | if (event.keyCode == 13) { |
| | | |
| | | if (HBarCode_SN) { |
| | | createBillNo(); |
| | | txtHBarCodeSN_KeyDown(HBarCode_SN); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | //å
³é®ä»¶åè½¦æ¹æ³ |
| | | $('#HBarCode_Key').on('keydown', function (event) { |
| | | var HBarCode_Key = $('#HBarCode_Key').val(); |
| | | if (event.keyCode == 13) { |
| | | |
| | | if (HBarCode_Key) { |
| | | txtHBarCodeKey_KeyDown(HBarCode_Key); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | //éæ©æä½å |
| | | form.on('submit(btnHEmp)', function () { |
| | | btnHEmp(); |
| | | }); |
| | | |
| | | |
| | | //éæ©çäº§èµæº |
| | | form.on('submit(btnHSource)', function () { |
| | | btnHSource(); |
| | | }); |
| | | |
| | | //éæ©ç产çç»æé® |
| | | form.on('submit(btnHGroup)', function () { |
| | | btnHGroup(); |
| | | }); |
| | | |
| | | //éæ©çäº§è½¦é´æé® |
| | | form.on('submit(btnHDept)', function () { |
| | | btnHDept(); |
| | | }); |
| | | |
| | | //éæ©å·¥åºæé® |
| | | form.on('submit(btnHProc)', function () { |
| | | btnHProc(); |
| | | }); |
| | | //æ¢äº§å |
| | | form.on('submit(btnNextProc)', function (data) { |
| | | //for (var i = 0; i < option.data.length; i++) { |
| | | // if (option.data[i].HBindingQty < 1 || option.data[i].HBarCode == "") { |
| | | // layer.alert("第<span style='color: red;'>" + (i + 1) + "</span>è¡ï¼é
ä»¶ <span style='color: blue;'>" + option.data[i].HMaterName + "</span> æªç»å®é½æ´ï¼") |
| | | // return; |
| | | // } |
| | | //} |
| | | |
| | | //ä¿åå
³é®ä»¶ |
| | | if (AllowLoadData(data)) { |
| | | set_SaveBill(data); |
| | | } |
| | | |
| | | //åå²ç»å®è®°å½æ¥è¯¢ |
| | | //get_Display(); |
| | | }); |
| | | |
| | | //éåº |
| | | form.on('submit(btnExit)', function (data) { |
| | | if (params[1] != null) { |
| | | Pub_Close(1); |
| | | } else if (params[1] == null) { |
| | | Pub_Close(2); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //è¿å
¥é¡µé¢é»è®¤å
æ 卿µè½¬å¡ä¸ |
| | | $("#HBarCode_SN").focus(); |
| | | //å¶å人 |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //éè¿ç»å½ç¨æ·è·åé»è®¤å¼ |
| | | GetDefValByUser(); |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | // |
| | | get_Display(); |
| | | } |
| | | |
| | | //#region éè¿ç»å½ç¨æ·è·åé»è®¤å¼ |
| | | function GetDefValByUser() { |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Cj_StationInBill/GetDefValByUser", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "Czybm": sessionStorage["Czybm"], "Czymc": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | var data = result.data[0]; |
| | | |
| | | form.val("formData", { |
| | | "HSourceID": data.HSourceID, |
| | | "HSourceName": data.çäº§èµæºåç§°, |
| | | "HGroupID": data.HGroupID, |
| | | "HGroupName": data.ç产çç»åç§°, |
| | | "HEmpID": data.HEmpID, |
| | | "HEmpName": data.æä½ååç§°, |
| | | "HDeptID": data.HDeptID, |
| | | "HDeptName": data.é¨é¨åç§°, |
| | | "HProcNumber": data.å·¥åºä»£ç , |
| | | "HProcName": data.å·¥åºåç§°, |
| | | "HProcID": data.HProcID |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | , error: function () { |
| | | layer.close(index); |
| | | layer.alert(get_MessageError("[0000-1-002]æ¥å£è¯·æ±å¤±è´¥!", sessionStorage["HTranSlate"]), { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //å
³é®ä»¶æ¸
å |
| | | function set_InitGrid() { |
| | | option= { |
| | | elem: '#mainTable' |
| | | //, toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , data: [] |
| | | , height: 285 |
| | | , limit: 10 |
| | | , cols: [[ //ç»å®ä¿¡æ¯è¡¨ |
| | | { type: 'numbers', title: 'åºå·', width: 50 } |
| | | , { field: 'HBarCode_P', title: '产åç ', width: 265 } |
| | | , { field: 'HBarCode', title: 'é
ä»¶ç ', width: 265 } |
| | | , { field: 'HPartsQty', title: 'é
ä»¶æ°', width: 72 } |
| | | , { field: 'HBindingQty', title: 'å·²ç»æ°', width: 72 } |
| | | , { field: 'HMaterID', title: 'HMaterID', hide: true } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', width: 160 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 160 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 160, hide: true } |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡', width: 160, hide: true } |
| | | , { field: 'HSourceID', title: 'HSourceID', width: 160, hide: true } |
| | | , { field: 'HEquipID', title: 'HEquipID', width: 160, hide: true } |
| | | , { field: 'HGroupID', title: 'HGroupID', width: 160, hide: true } |
| | | , { field: 'HWorkerID', title: 'HWorkerID', width: 160, hide: true } |
| | | , { field: 'HScanDate', title: 'HScanDate', width: 160, hide: true } |
| | | , { field: 'HSourceInterID', title: 'HSourceInterID', width: 160, hide: true } |
| | | , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 160, hide: true } |
| | | , { field: 'HSourceBillNo', title: 'HSourceBillNo', width: 160, hide: true } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 66 } |
| | | ]] |
| | | } |
| | | option2 = { |
| | | elem: '#mainTable2' |
| | | , toolbar: '#toolbarDemo2' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , data: [] |
| | | , height: 385 |
| | | , limit: 10 |
| | | , cols: [[ |
| | | { type: 'numbers', title: 'åºå·' } |
| | | , { field: 'æ¥æ', title: 'æ¥æ' } |
| | | , { field: 'é
件代ç ', title: 'é
件代ç ' } |
| | | , { field: 'é
ä»¶åç§°', title: 'é
ä»¶åç§°' } |
| | | , { field: 'é
ä»¶è§æ ¼', title: 'é
ä»¶è§æ ¼' } |
| | | , { field: 'é
ä»¶æ°é', title: 'é
ä»¶æ°é', totalRow: true } |
| | | , { field: 'HBatchNo', title: 'å½åæ¹æ¬¡' } |
| | | , { field: 'HICMOInterID', title: 'HICMOInterID', hide: true } |
| | | , { field: 'HICMOEntryID', title: 'HICMOEntryID', hide: true } |
| | | , { field: 'HICMOBillNo', title: 'HICMOBillNo', hide: true } |
| | | , { field: 'HProcExchInterID', title: 'HProcExchInterID', hide: true } |
| | | , { field: 'HProcExchEntryID', title: 'HProcExchEntryID', hide: true } |
| | | , { field: 'HProcExchBillNo', title: 'HProcExchBillNo', hide: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', hide: true } |
| | | , { field: 'HBarCode', title: 'HBarCode', hide: true } |
| | | ]] |
| | | } |
| | | table.render(option); |
| | | table.render(option2); |
| | | } |
| | | |
| | | //产åSNééç ç å车æ¥è¯¢ |
| | | function txtHBarCodeSN_KeyDown(HBarCode) { |
| | | //ä¸»è¡¨ä¿¡æ¯æ¥è¯¢ |
| | | var indexs = layer.load(); |
| | | //é
ä»¶ä¿¡æ¯æ¥è¯¢ |
| | | var HBillNo = $("#HBillNo").val(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Cj_SingleStation/HBardCodeBomList_XW", |
| | | async: false, |
| | | data: { "HBillNo": HBillNo, "HBarCode": HBarCode, "HProcID": $("#HProcID").val(), "HOrgID": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"] }, |
| | | dataType: "json", |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = data1.data |
| | | var rowarr = []; |
| | | |
| | | for (var i = 0; i < data.length; i++) { |
| | | rowarr.push({ |
| | | "HBarCode_P": data[i].产åç , "HPartsBarCode": "", "HPartsQty": data[i].ååå项ç¨é, "HBindingQty": 0 |
| | | , "HMaterID": data[i].åé¡¹ç©æID, "HMaterNumber": data[i].åé¡¹ç©æä»£ç , "HMaterName": data[i].åé¡¹ç©æåç§°, "HMaterModel": data[i].åé¡¹è§æ ¼åå·, "HBatchNo": "" |
| | | , "HSourceID": $("#HSourceID").val(), "HEquipID": 0, "HGroupID": $("#HGroupID").val(), "HWorkerID": $("#HEmpID").val() |
| | | , "HScanDate": new Date(), "HSourceInterID": $("#HICMOInterID").val() |
| | | , "HSourceEntryID": $("#HICMOEntryID").val(), "HSourceBillNo": $("#HICMOBillNo").val() |
| | | }); |
| | | } |
| | | |
| | | option.data = rowarr; |
| | | |
| | | table.render(option); |
| | | |
| | | |
| | | |
| | | //ç¦ç¨è¾å
¥æ¡,èæ¯è²åç° |
| | | $("#HBarCode_SN").prop("readonly", true); |
| | | $("#HBarCode_SN").css('background', '#EDEDED')//èæ¯è²åç° |
| | | //å
æ 跳转å°é
ä»¶ç ææ¬æ¡ä¸ |
| | | $("#HBarCode_Key").focus(); |
| | | //è·å对åºä¸»è¡¨ä¿¡æ¯ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Cj_SingleStation/checkHBarCode_Batch", |
| | | async: false, |
| | | data: { "HBarCode": HBarCode, "user": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"] }, |
| | | dataType: "json", |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.close(indexs); |
| | | $("#HSNNo").val(HBarCode); |
| | | $("#HMaterNumber").val(data1.data[0]["HMaterNumber"]) |
| | | $("#HMaterName").val(data1.data[0]["HMaterName"]) |
| | | $("#HMaterModel").val(data1.data[0]["HMaterModel"]) |
| | | $("#HICMOBillNo").val(data1.data[0]["HSourceBillNo"]) |
| | | } |
| | | else { |
| | | layer.close(indexs); |
| | | layer.confirm(data1.Message); |
| | | } |
| | | |
| | | }, |
| | | error: function (err) { |
| | | layer.close(indexs); |
| | | layer.msg(get_MessageError("é误:" + err, sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]确认', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨æç¤º", sessionStorage["HTranSlate"]) }); |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.close(indexs); |
| | | $("#HBarCode_SN").val(""); |
| | | $("#HBarCode_SN").focus(); |
| | | layer.confirm(data1.Message); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(indexs); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | $("#HBarCode_SN").val(""); |
| | | $("#HBarCode_SN").focus(); |
| | | layer.confirm(data1.Message); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | //é
ä»¶ç å车æ¥è¯¢ |
| | | function txtHBarCodeKey_KeyDown(HBarCode) { |
| | | var indexs = layer.load(); |
| | | var HBillNo = $("#HBillNo").val(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Cj_SingleStation/BarCodeBillBomMatch_XW", |
| | | async: false, |
| | | data: { "HBillNo": HBillNo, "HBarCode": HBarCode, "HBarCode_P": $('#HBarCode_SN').val(), "HProcID": $('#HProcID').val(), "user": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"] }, |
| | | dataType: "json", |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = data1.data |
| | | |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (data[0].HMaterID == option.data[i].HMaterID && option.data[i].HBindingQty < option.data[i].HPartsQty) { |
| | | option.data[i].HMaterID = data[0].HMaterID |
| | | option.data[i].HMaterNumber = data[0].ç©æä»£ç |
| | | option.data[i].HMaterName = data[0].ç©æåç§° |
| | | option.data[i].HMaterModel = data[0].è§æ ¼åå· |
| | | option.data[i].HBarCode = data[0].é
ä»¶ç |
| | | option.data[i].HBindingQty = option.data[i].HBindingQty + 1 |
| | | $("#HReturnMessage").text("æåæ«ç ä¸ä¸ªé
ä»¶:" + data[0].ç©æåç§°); |
| | | break; |
| | | } else if (data[0].HMaterID == option.data[i].HMaterID && i == option.data.length - 1) { |
| | | layer.msg("第" + (i + 1) + "è¡å·²å
¨é¨ç»å®ï¼è¯·å¿è¶
éç»å®"); |
| | | } else if (data[0].HMaterID != option.data[i].HMaterID && i == option.data.length - 1) { |
| | | layer.msg("ææ«é
ä»¶ç ï¼" + HBarCode + " ,对åºç©æä¸å¨çäº§ç¨ææ¸
åä¸ï¼"); |
| | | } |
| | | } |
| | | |
| | | //option.data = rowarr; |
| | | |
| | | table.render(option); |
| | | //å
æ 跳转å°é
ä»¶ç ææ¬æ¡ä¸ |
| | | $("#HBarCode_Key").focus(); |
| | | $("#HBarCode_Key").val(""); |
| | | //妿é
ä»¶é
å®èªå¸¦æäº¤ |
| | | if (areQuantitiesEqual(option.data)) { |
| | | //ä¿åå
³é®ä»¶ |
| | | if (AllowLoadData(data)) { |
| | | set_SaveBill(data); |
| | | } |
| | | } |
| | | layer.close(indexs); |
| | | } |
| | | else { |
| | | layer.close(indexs); |
| | | layer.confirm(data1.Message); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(indexs); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | //å è½½åå²è¿ç«æ¸
åä¿¡æ¯ |
| | | function get_Display(sWhere = '') { |
| | | var ajaxLoad = layer.load(); |
| | | var HProcID = $("#HProcID").val(); |
| | | var HSourceID = $("#HSourceID").val(); |
| | | sWhere += ` and HProcID = ${HProcID} and HSourceID = ${HSourceID}` |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cj_SingleStation/SingleStationOutBillList', |
| | | async: false, |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = [];//ååæ®µæ°æ® |
| | | var col = []; |
| | | var titleData = [] |
| | | var totalArray = ["æ°é", "å
³èæ°é", "æªå
³èæ°é", "æå°æ¡ç æ°é", "æªæå°æ¡ç æ°é", "宿¶æ°é", "éé¢"]; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left', totalRowText: 'å计' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { //计ç®å |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 }); |
| | | } else if (data[i].name == 'åæ®å·') {//æ·»å è¶
龿¥ |
| | | col.push({ |
| | | field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'åæ®å·', templet: function (d) { |
| | | return '<span style="color: blue;">' + d.åæ®å· + '</span>' |
| | | }, style: 'cursor: pointer;' |
| | | }); |
| | | } else if (data[i].name == 'å½åå®¡æ ¸é¡¹ç®') {//æ·»å è¶
龿¥ |
| | | col.push({ |
| | | field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'å½åå®¡æ ¸é¡¹ç®', templet: function (d) { |
| | | return '<span style="color: blue;">' + d.å½åå®¡æ ¸é¡¹ç® + '</span>' |
| | | }, style: 'cursor: pointer;' |
| | | }); |
| | | } else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + (data[i].name == "è¡å
³éæ¥æ" ? "è¡å
³é人" : data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | } |
| | | option2.cols = [col] |
| | | option2.data = data1.data; |
| | | |
| | | |
| | | |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(HModName2, sessionStorage["HUserName"], option2, []); |
| | | |
| | | table.render(option2); |
| | | layer.close(ajaxLoad); |
| | | //layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //#region ä¿åæ¹æ³ |
| | | function set_SaveBill() { |
| | | var data = { |
| | | "field": { |
| | | "HProcID": $("#HProcID").val(), "HBatchNo": "", |
| | | "HGroupID": $("#HGroupID").val(), "HSourceID": $("#HSourceID").val(), |
| | | "HPRDOrgID": sessionStorage["OrganizationID"], |
| | | "HEmpID": $("#HEmpID").val(), "HDeptID": $("#HDeptID").val() |
| | | } |
| | | }; |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var HBarCode = $("#HBarCode_SN").val(); |
| | | var sSubStr = JSON.stringify(option.data); |
| | | var sMainSub = sMainStr + ';' + HBarCode + ';' + sSubStr + ';' + sessionStorage["HUserName"]; |
| | | var indexs = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Cj_SingleStation/AddStationOutBillAndAssemblyBill", |
| | | async: false, |
| | | data: { "sMainSub": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.close(indexs); |
| | | |
| | | |
| | | $("#HReturnMessage").text("æåè¿ç«æ«ç ä¸ä¸ªäº§å:" + HBarCode); |
| | | //åæ¢äº§å |
| | | set_changeHBarCodeSN(); |
| | | get_Display(); |
| | | } |
| | | else { |
| | | |
| | | layer.close(indexs); |
| | | layer.msg(data1.Message, { icon: 5, btn: ["确认"], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "åºç°é误" }); |
| | | } |
| | | |
| | | }, |
| | | error: function (err) { |
| | | |
| | | layer.close(indexs); |
| | | layer.msg(get_MessageError("é误:" + err, sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]确认', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨æç¤º", sessionStorage["HTranSlate"]) }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //å é¤åæ® |
| | | function btn_Delete() { |
| | | var checkStatus = table.checkStatus('mainTable2') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | layer.confirm(get_MessageError('[0000-1-003]ç¡®å®å é¤' + data[0].åæ®å· + 'åï¼', sessionStorage["HTranSlate"]), function (index) { |
| | | var ajaxLoad = layer.load(); |
| | | //é»è¾å 餿¹æ³ |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cj_StationOutBill/del_StationOutBillandAssemblyBill', |
| | | type: "GET", |
| | | data: { "HInterID": data[0].hmainid, "HBarCode_P": data[0].ééSNç , "HDeleteMan": sessionStorage["HUserName"], "HBillSubType": "3791" }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | get_Display(); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(get_MessageError(result.Message, sessionStorage["HTranSlate"]) + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(get_MessageError("[0000-1-002]æ¥å£è¯·æ±å¤±è´¥!", sessionStorage["HTranSlate"]), { icon: 5 }); |
| | | } |
| | | }); |
| | | layer.close(index); |
| | | }); |
| | | } else { |
| | | layer.msg(get_MessageError('[0000-1-001]è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼', sessionStorage["HTranSlate"])); |
| | | } |
| | | } |
| | | |
| | | //åæ¢äº§åæ¹æ³ |
| | | function set_changeHBarCodeSN() { |
| | | $("#HSNNo").val(""); |
| | | $("#HMaterNumber").val("") |
| | | $("#HMaterName").val("") |
| | | $("#HMaterModel").val("") |
| | | $("#HICMOBillNo").val("") |
| | | |
| | | |
| | | //å¯ç¨è¾å
¥æ¡,èæ¯è²æ¢å¤ |
| | | $("#HBarCode_SN").prop("readonly", false); |
| | | $("#HBarCode_SN").css('background', '#FFFFFF')//产åç ææ¬æ¡èæ¯è²æ¢å¤ |
| | | //æ¸
ç©ºææ¬æ¡å
容 |
| | | $("#HBarCode_SN").val("");//产åç ææ¬æ¡å
容æ¸
空 |
| | | //å
æ 跳转å°äº§åç ææ¬æ¡ä¸ |
| | | $("#HBarCode_SN").focus(); |
| | | |
| | | //æ¸
é¤ç»å®ä¿¡æ¯ç½æ ¼æ«ç è®°å½ |
| | | option.data = []; |
| | | table.render(option); |
| | | } |
| | | |
| | | // çæåæ®å· |
| | | function createBillNo() { |
| | | //éæ°è·ååæ®å· |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNumPDA", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HBillType": '3727' }, |
| | | success: function (d) { |
| | | //$("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | //$("#HDate").val(Format(new Date(), "yyyy-MM-dd")); //é»è®¤ä¸ºå½åæ¥æ |
| | | //éæ°å¯ç¨ä¿åæé® |
| | | //$("#btnSave").removeClass("layui-btn-disabled").attr("disabled", false); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //è¡¨æ ¼è¡å
äºä»¶å é¤ |
| | | function set_GridDelete(obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡åï¼', function (index) { |
| | | |
| | | var wait = layer.load(); |
| | | //å é¤ä¸´æ¶è¡¨æ°æ® |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Deltet_Sc_AssemblyBill_BindBarCodeTemp', |
| | | type: "GET", |
| | | data: { "HBillNo": $("#HBillNo").val(), "HBarCode": option.data[rowIndex].HBarCode, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1, time: 500 }, function () { |
| | | //å
³éå½åframe |
| | | layer.close(wait); |
| | | }); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | option.data[rowIndex].HBarCode = ""; |
| | | option.data[rowIndex].HBindingQty = 0; |
| | | //option.data[rowIndex].HMaterID = 0; |
| | | option.data[rowIndex].HMaterNumber = ""; |
| | | option.data[rowIndex].HMaterName = ""; |
| | | option.data[rowIndex].HMaterModel = ""; |
| | | option.data[rowIndex].HBarCode = ""; |
| | | |
| | | table.render(option); |
| | | layer.close(index); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //åå·¥éæ©é¡µé¢ |
| | | function btnHEmp() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'è´¨æ£åå表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.html?Type=HEmp', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg(get_MessageError('[0000-1-020]è¯·éæ©æ°æ®', sessionStorage["HTranSlate"])); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HEmpID").val(checkStatus.data[0].HItemID); |
| | | $("#HEmpName").val(checkStatus.data[0].èååç§°); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //çäº§èµæºéæ©é¡µé¢ |
| | | function btnHSource() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'çäº§èµæºå表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/ç产åºç¡èµæ/Gy_Source.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg(get_MessageError('[0000-1-020]è¯·éæ©æ°æ®', sessionStorage["HTranSlate"])); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HSourceID").val(checkStatus.data[0].HItemID); |
| | | $("#HSourceName").val(checkStatus.data[0].çäº§èµæºåç§°); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //ç产çç»éæ©é¡µé¢ |
| | | function btnHGroup() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'çç»è¡¨'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å·¥èµåºç¡èµæ/Gy_Group.html?Type=HGroup', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length != 1) { |
| | | return layer.msg(get_MessageError('[0000-1-020]è¯·éæ©æ°æ®', sessionStorage["HTranSlate"])); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HGroupID").val(checkStatus.data[0].HItemID);//çç»id |
| | | $("#HGroupName").val(checkStatus.data[0].çç»åç§°);//计éåä½åç§° |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //ç产车é´éæ©é¡µé¢ |
| | | function btnHDept() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'ç产车é´å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_DepartmentList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length != 1) { |
| | | return layer.msg(get_MessageError('[0000-1-020]è¯·éæ©æ°æ®', sessionStorage["HTranSlate"])); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID);// |
| | | $("#HDeptName").val(checkStatus.data[0].é¨é¨åç§°);// |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //å·¥åºéæ©é¡µé¢ |
| | | function btnHProc() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'å·¥åºå表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/ç产åºç¡èµæ/Gy_Process.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length != 1) { |
| | | return layer.msg(get_MessageError('[0000-1-020]è¯·éæ©æ°æ®', sessionStorage["HTranSlate"])); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HProcID").val(checkStatus.data[0].HItemID);// |
| | | $("#HProcNumber").val(checkStatus.data[0].å·¥åºä»£ç ); |
| | | $("#HProcName").val(checkStatus.data[0].å·¥åºåç§°);// |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData() { |
| | | |
| | | var HBarCode = $("#HBarCode_SN").val(); |
| | | if (HBarCode == "") { |
| | | layer.msg(get_MessageError("[0000-2-019]产åSNä¸è½ä¸ºç©º!", sessionStorage["HTranSlate"])) |
| | | return false; |
| | | } |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | | |
| | | if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") { |
| | | sSubStr = JSON.parse(sSubStr); |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (sSubStr[i].HBarCode == "" || sSubStr[i].HBarCode == undefined || sSubStr[i].HBarCode == null) { |
| | | layer.msg("ç»å®ä¿¡æ¯ç¬¬" + (i + 1) + "è¡,é
ä»¶ç æªç»å®!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | | } else { |
| | | layer.msg("é
ä»¶ç»å®ä¿¡æ¯ä¸å
许为空!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | |
| | | |
| | | //var HBadReasonID = $("#HBadReasonID").val(); |
| | | //if (HBadReasonID == 0) { |
| | | // layer.msg("ä¸è¯åå ä¸è½ä¸ºç©º!") |
| | | // return false; |
| | | //} |
| | | return true; |
| | | } |
| | | //夿æ¯å¦ç»å®å® |
| | | function areQuantitiesEqual(arr) { |
| | | if (arr.length === 0) { |
| | | return false; // 空æ°ç»é»è®¤è§ä¸ºæ»¡è¶³æ¡ä»¶ |
| | | } |
| | | |
| | | const firstHPartsQty = arr[0].HPartsQty; |
| | | const firstHBindingQty = arr[0].HBindingQty; |
| | | |
| | | for (let i = 1; i < arr.length; i++) { |
| | | if (arr[i].HPartsQty !== firstHPartsQty || arr[i].HBindingQty !== firstHBindingQty) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | //#endregion |
| | | |
| | | }); |
| | | function GetHEmpValue(obj) //è¿åèå |
| | | { |
| | | $("#HEmpName").val(obj[0].èååç§°); |
| | | $("#HEmpID").val(obj[0].HItemID); |
| | | |
| | | } |
| | | function GetHDeptNameValue(obj) //è¿åé¨é¨ |
| | | { |
| | | $("#HDeptName").val(obj[0].é¨é¨åç§°); |
| | | $("#HDeptID").val(obj[0].HItemID); |
| | | } |
| | | function GetHGroupValue(obj) //è¿åçç» |
| | | { |
| | | $("#HGroupName").val(obj[0].çç»åç§°); |
| | | $("#GroupID").val(obj[0].HItemID); |
| | | } |
| | | function GetProcessValue(obj) //è¿åå·¥åº |
| | | { |
| | | $("#HProcNumber").val(obj[0].å·¥åºä»£ç ); |
| | | $("#HProcName").val(obj[0].å·¥åºåç§°);// |
| | | $("#HProcID").val(obj[0].HItemID); |
| | | } |
| | | function GetGySource(obj) //è¿åçäº§èµæº |
| | | { |
| | | $("#HSourceName").val(obj[0].çäº§èµæºåç§°); |
| | | $("#HSourceID").val(obj[0].HItemID); |
| | | } |
| | | </script> |