| | |
| | | <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="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <style type="text/css"> |
| | | .layui-form-label { |
| | |
| | | <form id="form0" class="layui-form" lay-filter="component-form-group" action=""> |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" id="Saver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" id="VerIfySaver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="VerIfySaver">å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">éåº</button> |
| | | </div> |
| | | |
| | |
| | | <li class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li>å¶åä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content" style="height: 700px;"> |
| | | <div class="layui-tab-content" style="height: 400px;"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" disabled autocomplete="off"> |
| | | <input id="HInterID" name="HInterID" type="hidden" /> |
| | | <input id="HMaker" name="HMaker" type="hidden" /><!--å¶å人--> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <label class="layui-form-label">å½åå·¥åº:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HProcName" lay-verify="HProcName" id="HProcName" disabled autocomplete="off"> |
| | | <input id="HProcID" name="HProcID" type="hidden" /> |
| | | <input id="HProcID" name="HProcID" value="0" type="hidden" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label">产å代ç </label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HMaterCode" id="HMaterCode" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HMaterList" id="HMaterList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å·¥æ¶é´:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | <input class="layui-input" name="HBeginWorkTime" id="HBeginWorkTime" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">çäº§èµæº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSourceName" id="HSourceName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSourceID" id="HSourceID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSourceID" id="HSourceID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSourceList" id="HSourceList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | <label class="layui-form-label">æä½å:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" id="HEmpList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="SourceType" lay-filter="SourceType" id="SourceType"> |
| | | <option value="0" selected="selected">ç产任å¡å</option> |
| | | <option value="1">æå·¥å½å
¥</option> |
| | | <option value="2">ç产任å¡å</option> |
| | | <option value="1" selected="selected">æå·¥å½å
¥</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label">æºååå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value=""> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value="0"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline" style="display:none"> |
| | | <label class="layui-form-label">æºåè¡å·:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HMainSourceEntryID" lay-verify="HMainSourceEntryID" id="HMainSourceEntryID" autocomplete="off" disabled> |
| | | <input class="layui-input" name="HMainSourceEntryID" lay-verify="HMainSourceEntryID" id="HMainSourceEntryID" value="0" autocomplete="off" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç产订å:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HICMOBillNo" lay-verify="HICMOBillNo" id="HICMOBillNo" autocomplete="off"> |
| | | <input id="HICMOInterID" name="HICMOInterID" type="hidden" value="0" /> |
| | | <input id="HICMOEntryID" name="HICMOEntryID" type="hidden" value="0" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label">ç产çç»:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HGroupName" id="HGroupName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HGroupID" id="HGroupID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HGroupID" id="HGroupID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HGroupList" id="HGroupList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | |
| | | <label class="layui-form-label">车é´:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" id="HDeptList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç产订å:</label> |
| | | <label class="layui-form-label">çäº§çæ¬¡:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HICMOBillNo " lay-verify="HICMOBillNo " id="HICMOBillNo " autocomplete="off"> |
| | | <input id="HICMOInterID" name="HICMOInterID" type="hidden" /> |
| | | <input id="HICMOEntryID" name="HICMOEntryID" type="hidden" /> |
| | | <input type="text" name="HWorkShiftName" id="HWorkShiftName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWorkShiftID" id="HWorkShiftID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HWorkShiftList" id="HWorkShiftLists" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¶åæ¥æ:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="datetime" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" disabled> |
| | | <input type="datetime" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä¿®æ¹æ¥æ:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="datetime" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" disabled> |
| | | <input type="datetime" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å®¡æ ¸æ¥æ:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="datetime" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" disabled> |
| | | <input type="datetime" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd"disabled> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å
³éæ¥æ:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="datetime" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" disabled> |
| | | <input type="datetime" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä½åºæ¥æ:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="datetime" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" disabled> |
| | | <input type="datetime" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" dateFormat="yyyy-MM-dd"disabled> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">计åå</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--å表--> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>å¢å ä¸è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | </div> |
| | | </script> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <script> |
| | | //è·ååæ° |
| | | var OptionData = []; |
| | | var HBillType = ""; //åæ®ç±»å |
| | | var HSourceInterID = ""; //æºå主å
ç |
| | | var HSourceEntryID = ""; //æºååå
ç |
| | | var HSourceBillNo = ""; //æºååå· |
| | | var HSourceBillType = ""; //æºåç±»å |
| | | function getUrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | | for (var i = 0; i < hashes.length; i++) { |
| | | hash = hashes[i].split('='); |
| | | vars.push(hash[0]); |
| | | vars[hash[0]] = hash[1]; |
| | | } |
| | | return vars; |
| | | var refSav = ""; //æäº¤ç±»å |
| | | //è·å页é¢è·³è½¬åæ° //åæ®ç¼è¾ç¶æï¼ 1.æ æºåæ°å¢Â  2.ææºåæ°å¢Â  3.ç¼è¾Â 4.æµè§Â 5.åæ´ |
| | | var params = get_UrlVars(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | var OperationType = 1;//æä½ç±»å |
| | | } else { |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HSBillType = params[params[2]];//æºåç±»å |
| | | } |
| | | |
| | | var params = getUrlVars(); |
| | | var hID = params[params[0]];//ç¼è¾æ¥ç |
| | | var Type = params[params[1]];//åæ®ç¼è¾ç¶æï¼ 1.æ æºåæ°å¢Â  2.ææºåæ°å¢Â  3.ç¼è¾Â 4.æµè§Â 5.åæ´ |
| | | |
| | | var edit = function (data) { |
| | | HBillType = data[0].HBillType; |
| | |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | //#region å
¬ç¨åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | //#endregion |
| | | |
| | | //æ¥ææ¶é´éæ©å¨ |
| | | laydate.render({ |
| | | elem: '#HBeginDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HEndDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HMakeDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HUpDateDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HCheckDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HCloseDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HDeleteDate' |
| | | , type: 'datetime' |
| | | }); |
| | | //å®ä¹åé ç¨äºè·åå½åçæ¬¡ |
| | | var HCenterID = ""; |
| | | |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")) //å¼å·¥æ¥æ |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //å¶åæ¥æ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å¶å人 |
| | | //åå§å表åæä»¶ |
| | | set_InitFrom(); |
| | | |
| | | //夿æ¯å¦æ°å¢ |
| | | if (hID == null || hID == 0) { |
| | | //è·åæå¤§åæ®å· new |
| | | $("#HInterID").val("0"); |
| | | $("#HBillNo").val(""); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3787' }, |
| | | success: function (d) { |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HInterID").val(0); |
| | | } |
| | | //夿æä½ç±»å |
| | | if (OperationType == 1) {//æ æºå |
| | | $("#HEmpID").val(sessionStorage["HEmpID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½åID |
| | | $("#HEmpName").val(sessionStorage["HEmpName"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½å |
| | | $("#HGroupID").val(sessionStorage["HGroupID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç»ID |
| | | $("#HGroupName").val(sessionStorage["HGroup"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç» |
| | | HCenterID = sessionStorage["HWorkCenterID"]; //æ ¹æ®ç»å½ç¨æ·å¸¦åºå·¥ä½ä¸å¿ID |
| | | //åå§å计å表 |
| | | get_InitGrid(); |
| | | set_AddFNew(); |
| | | //è·åå½åçæ¬¡ |
| | | get_HWorkShift(); |
| | | } |
| | | else if (OperationType == 2) {//ææºå |
| | | $("#HEmpID").val(sessionStorage["HEmpID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½åID |
| | | $("#HEmpName").val(sessionStorage["HEmpName"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºæä½å |
| | | $("#HGroupID").val(sessionStorage["HGroupID"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç»ID |
| | | $("#HGroupName").val(sessionStorage["HGroup"]); //æ ¹æ®ç»å½ç¨æ·å¸¦åºçç» |
| | | HCenterID = sessionStorage["HWorkCenterID"]; //æ ¹æ®ç»å½ç¨æ·å¸¦åºå·¥ä½ä¸å¿ID |
| | | //åå§å计å表 |
| | | get_InitGrid(); |
| | | set_AddNew(); |
| | | //è·åå½åçæ¬¡ |
| | | get_HWorkShift(); |
| | | } |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | //åå§å计å表 |
| | | get_InitGrid(); |
| | | set_EditFromGrid(); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | | } |
| | | |
| | | //åå§åæä»¶ |
| | | function set_InitFrom() { |
| | | //æ¥ææ¶é´éæ©å¨ |
| | | laydate.render({ |
| | | elem: '#HBeginWorkTime' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HEndDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HMakeDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HUpDateDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HCheckDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HCloseDate' |
| | | , type: 'datetime' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#HDeleteDate' |
| | | , type: 'datetime' |
| | | }); |
| | | } |
| | | else {//å¦æä¿®æ¹åèµ°ä¸é¢ new |
| | | $("#HInterID").val(hID);//ä¿®æ¹æ¶ä¸»è¡¨ID |
| | | RoadBillMain(hID); |
| | | /* RoadBillSub(linterid);*/ |
| | | |
| | | //æ æºåæ°å¢ |
| | | function set_AddFNew() { |
| | | //å æºåç±»ååºå(å¯ä»¥åä¸åçæ¹æ³) |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //ææºåæ°å¢ |
| | | if (Type == 2) { |
| | | function set_AddNew() { |
| | | refSav = "Add"; |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //åæ®æ¥æ |
| | | $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")) //å¼å·¥æ¥æ |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss")); //å¶åæ¥æ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); //å¶å人 |
| | | |
| | | //å æºåç±»ååºå(å¯ä»¥åä¸åçæ¹æ³) |
| | | |
| | |
| | | $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HMaterName').attr("disabled", true); |
| | | $('#HMaterSpec').attr("disabled", true); |
| | | $('#HBeginDate').attr("disabled", true); |
| | | $('#HBeginWorkTime').attr("disabled", true); |
| | | $('#HSourceName').attr("disabled", true); |
| | | $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HMainSourceBillNo').attr("disabled", true); |
| | |
| | | { |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | async: false, |
| | | data: { |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | "HSourceBillType": HBillType |
| | | }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data.h_p_JIT_GetSourceInfoByUser; |
| | | var LoadData = data.data.h_p_JIT_GetInfoByICMOStatusInterID; |
| | | $("#HProcID").val(LoadData[0].HProcID); //å½åå·¥åºID |
| | | $("#HProcName").val(LoadData[0].HProcName); //å½åå·¥åº |
| | | $("#HMaterID").val(LoadData[0].HMaterID); //产åID |
| | |
| | | $("#HSourceID").val(LoadData[0].HSourceID); //çäº§èµæºID |
| | | $("#HSourceName").val(LoadData[0].HSourceName); //çäº§èµæº |
| | | $("#HMainSourceBillNo").val(LoadData[0].HSourceBillNo); //æºååå· |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç |
| | | $("#HMainSourceInterID").val(LoadData[0].HSourceInterID); //æºå主å
ç (åå¼HInterID) |
| | | $("#HMainSourceEntryID").val(LoadData[0].HSourceEntryID); //æºååå
ç (æºåè¡å·) |
| | | $("#HMainSourceBillType").val(HSourceBillType); //æºåç±»å |
| | | $("#HDeptID").val(LoadData[0].HDeptID); //车é´ID |
| | |
| | | $("#HICMOInterID").val(LoadData[0].HICMOInterID); //ç产订åID |
| | | $("#HICMOEntryID").val(LoadData[0].HICMOEntryID); //ç产订ååID |
| | | $("#HICMOBillNo").val(LoadData[0].HICMOBillNo); //ç产订å |
| | | HCenterID = LoadData[0].HCenterID == null ? sessionStorage["HWorkCenterID"] : LoadData[0].HCenterID;//å·¥ä½ä¸å¿id |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | |
| | | }); |
| | | } |
| | | |
| | | //ç¼è¾ |
| | | function set_EditFromGrid() { |
| | | refSav = "Update"; |
| | | $('#HMaterCode').attr("disabled", true); |
| | | $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HMaterName').attr("disabled", true); |
| | | $('#HMaterSpec').attr("disabled", true); |
| | | $('#HBeginWorkTime').attr("disabled", true); |
| | | $('#HSourceName').attr("disabled", true); |
| | | $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HMainSourceBillNo').attr("disabled", true); |
| | | $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HDeptName').attr("disabled", true); |
| | | $('#HDeptList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#SourceType').attr("disabled", true); |
| | | form.render('select'); |
| | | $('#HICMOBillNo').attr("disabled", true); |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Sc_MESBeginWorkBill/Sc_MESBeginWorkBillListCheckDetai", |
| | | type: "GET", |
| | | data: { |
| | | "HID": linterid |
| | | }, |
| | | success: function (result) { |
| | | |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data.h_v_Sc_MESBeginWorkBillList_Edit[0]; |
| | | var tableSub = result.data.h_v_Sc_MESBeginWorkBillList_Edit; |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HInterID": data.hmainid |
| | | , "HBillNo": data.åæ®å· |
| | | , "HDate": Format(data.æ¥æ) |
| | | , "HProcID": data.HProcID |
| | | , "HProcName": data.å·¥åºåç§° |
| | | , "HMaterID": data.HMaterID |
| | | , "HMaterCode": data.产å代ç |
| | | , "HMaterName": data.产ååç§° |
| | | , "HMaterSpec": data.è§æ ¼åå· |
| | | , "HBeginWorkTime": Format(data.å¼å·¥æ¶é´) |
| | | , "HSourceID": data.HSourceID //èµæºID |
| | | , "HSourceName": data.èµæºåç§° //èµæºåç§° |
| | | , "HEmpID": data.HEmpID //æä½åID |
| | | , "HEmpName": data.ç³è¯·å¼å·¥äººå //æä½å |
| | | , "HMainSourceInterID": data.HMainSourceInterID //æºåID |
| | | , "HMainSourceEntryID": data.HMainSourceEntryID //æºååID |
| | | , "HMainSourceBillNo": data.HMainSourceBillNo //æºååå· |
| | | , "HMainSourceBillType": data.HMainSourceBillType //æºåç±»å |
| | | , "HGroupID": data.HGroupID //çç»ID |
| | | , "HGroupName": data.çç»åç§° //çç»åç§° |
| | | , "HDeptID": data.HDeptID //é¨é¨ID |
| | | , "HDeptName": data.é¨é¨åç§° //é¨é¨åç§° |
| | | , "HICMOInterID": data.HICMOInterID //ç产订å主ID |
| | | , "HICMOEntryID": data.HICMOEntryID //ç产订ååID |
| | | , "HICMOBillNo": data.HICMOBillNo //ç产订å |
| | | , "HRemark": data.夿³¨ //夿³¨ |
| | | , "HMaker": data.å¶å人 //å¶å人 |
| | | , "HMakeDate": data.å¶åæ¥æ //å¶åæ¥æ |
| | | , "HUpDater": sessionStorage["HUserName"] //ä¿®æ¹äºº |
| | | , "HUpDateDate": Format(new Date(), "yyyy-MM-dd hh:mm:ss")//ä¿®æ¹æ¥æ |
| | | , "HChecker": data.å®¡æ ¸äºº //å®¡æ ¸äºº |
| | | , "HCheckDate": data.å®¡æ ¸æ¥æ //å®¡æ ¸æ¥æ |
| | | , "HCloseMan": data.å
³é人 //å
³é人 |
| | | , "HCloseDate": data.å
³éæ¥æ //å
³éæ¥æ |
| | | , "HDeleteMan": data.ä½åºäºº //ä½åºäºº |
| | | , "HDeleteDate": data.ä½åºæ¥æ //ä½åºæ¥æ |
| | | |
| | | }); |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < tableSub.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | "HRelationBillInterID": tableSub[i].HRelationBillInterID, "HRelationBillEntryID": tableSub[i].HRelationBillEntryID, "HRelationBillNo": tableSub[i].HRelationBillNo, "HRelationBillType": tableSub[i].HRelationBillType, |
| | | "HICMOInterID": tableSub[i].ç产订åå
ç , "HICMOEntryID": tableSub[i].ç产订ååå
ç , "HICMOBillNo": tableSub[i].ç产订å, "HRemark": tableSub[i].夿³¨, |
| | | "HProcExchInterID": tableSub[i].HProcExchInterID, "HProcExchEntryID": tableSub[i].HProcExchEntryID, "HProcExchBillNo": tableSub[i].HProcExchBillNo, |
| | | "HMaterID": tableSub[i].HMaterID, "HMaterName": tableSub[i].产ååç§°, "HProcID": tableSub[i].HProcID, "HProcName": tableSub[i].å·¥åºåç§°, |
| | | } |
| | | ) |
| | | } |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //夿æ¯å¦æ°å¢ |
| | | if (linterid == null || linterid == 0) { |
| | | //è·åæå¤§åæ®å· new |
| | | $("#HInterID").val("0"); |
| | | $("#HBillNo").val(""); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3787' }, |
| | | success: function (d) { |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HInterID").val(0); |
| | | } |
| | | }); |
| | | } |
| | | else {//å¦æä¿®æ¹åèµ°ä¸é¢ new |
| | | $("#HInterID").val(linterid);//ä¿®æ¹æ¶ä¸»è¡¨ID |
| | | } |
| | | |
| | | //è·å䏿éä¸å¼ |
| | | form.on('select(SourceType)', function (data) { |
| | | Sctag = data.value; |
| | | form.render('select'); |
| | | if (Sctag != "2") //æ æºå |
| | | { |
| | | $("#HMainSourceInterID").val(""); |
| | | $("#HMainSourceEntryID").val(""); |
| | | $("#HMainSourceBillNo").val(""); |
| | | $("#HMainSourceBillType").val(""); |
| | | $('#HMainSourceBillNo').attr("disabled", false); |
| | | $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | OperationType = 1; |
| | | } |
| | | else { |
| | | $('#HMainSourceBillNo').attr("disabled", true); |
| | | $('#XDHList').removeClass("layui-btn-disabled").attr("disabled", false); |
| | | OperationType = 2; |
| | | } |
| | | }); |
| | | |
| | | //ä¿åæäº¤ |
| | | form.on('submit(Saver)', function (data) { |
| | | var sMainStr = JSON.stringify(data.field); |
| | | //ç¦ç¨ä¿åæé® |
| | | $('#Saver').addClass("layui-btn-disabled").attr("disabled", true); |
| | | //å¤æç³»ç»åæ°æ¯å¦å¾é |
| | | Xt_AllowLoadData(data); |
| | | |
| | | }); |
| | | |
| | | //å®¡æ ¸æé®æäº¤ |
| | | form.on('submit(VerIfySaver)', function (data) { |
| | | SaveVerify(); |
| | | }); |
| | | |
| | | //å®¡æ ¸æäº¤ |
| | | function SaveVerify(HName) { |
| | | var InterID = $("#HInterID").val(); |
| | | if (!AllowLoadData())//æ°æ®éªè¯ |
| | | { |
| | | return false; |
| | | } |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_ICMOReportBill/SaveGetICMOReportBillList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/AuditProcessReportList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "msg": sMainStr }, |
| | | data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": HName }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | layer.close(layer.index); |
| | | window.parent.location.reload(); |
| | | //layer.close(layer.index); |
| | | //window.parent.location.reload(); |
| | | $('#VerIfySaver').addClass("layui-btn-disabled").attr("disabled", true);//å®¡æ ¸æé®ç¦ç¨ |
| | | }); |
| | | } |
| | | else { |
| | |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | |
| | | //éåº |
| | | form.on('submit(Exit)', function (data) { |
| | | var index = parent.layer.getFrameIndex(window.name); //å
å¾å°å½åiframeå±çç´¢å¼ |
| | | parent.layer.close(index); //åæ§è¡å
³é |
| | | Pub_Close(1); |
| | | parent.location.reload(); |
| | | }); |
| | | |
| | | |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/PartInformation.html', 'yes'], |
| | | content: ['../../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_Material.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HMaterName").val(checkStatus.data[0].HName); |
| | | $("#HMaterCode").val(checkStatus.data[0].HNumber); |
| | | $("#HMaterName").val(checkStatus.data[0].ç©æåç§°); |
| | | $("#HMaterNumber").val(checkStatus.data[0].ç©æä»£ç ); |
| | | $("#HMaterID").val(checkStatus.data[0].HItemID); |
| | | $("#HMaterSpec").val(checkStatus.data[0].è§æ ¼åå·); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/SourceInformation.html', 'yes'], |
| | | content: ['../../../åºç¡èµæ/ç产åºç¡èµæ/Gy_Source.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HSourceName").val(checkStatus.data[0].HName); |
| | | $("#HSourceName").val(checkStatus.data[0].çäº§èµæºåç§°); |
| | | $("#HSourceID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/UserInformation.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.html?type=HEmp', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HEmpName").val(checkStatus.data[0].HName); |
| | | $("#HEmpName").val(checkStatus.data[0].èååç§°); |
| | | $("#HEmpID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/GroupInformation.html', 'yes'], |
| | | content: ['../../åºç¡èµæ/å·¥èµåºç¡èµæ/Gy_Group.html?type=HGroup', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HGroupName").val(checkStatus.data[0].HName); |
| | | $("#HGroupName").val(checkStatus.data[0].çç»åç§°); |
| | | $("#HGroupID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/GroupInformation.html', 'yes'], |
| | | content: ['../../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_DepartmentList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | $("#HDeptName").val(checkStatus.data[0].é¨é¨åç§°); |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | }); |
| | | }); |
| | | |
| | | //表头信æ¯çæ¬¡å¼¹çª |
| | | form.on('submit(HWorkShiftList)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'çæ¬¡å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../åºç¡èµæ/ç产åºç¡èµæ/Gy_WorkShiftList.html?type=HWorkShifts&OperationType=2', '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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HWorkShiftName").val(checkStatus.data[0].çæ¬¡åç§°); |
| | | $("#HWorkShiftID").val(checkStatus.data[0].HInterID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | //#region å表ï¼å¤´å·¥å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = |
| | | { |
| | | "HMaterID": "0" |
| | | , "HMaterName": "" |
| | | , "HProcID": "0" |
| | | , "HProcName": "" |
| | | , "HRelationBillInterID": "0" |
| | | , "HRelationBillEntryID": "0" |
| | | , "HRelationBillType": "" |
| | | , "HRelationBillNo": "" |
| | | , "HICMOInterID": "0" |
| | | , "HICMOEntryID": "0" |
| | | , "HICMOBillNo": "" |
| | | , "HProcExchInterID": "0" |
| | | , "HProcExchEntryID": "0" |
| | | , "HProcExchBillNo": "" |
| | | , "HRemark": "" |
| | | , "HSourceInterID": "0" |
| | | , "HSourceEntryID": "0" |
| | | , "HSourceBillNo": "" |
| | | , "HSourceBillType": "" |
| | | }; |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | |
| | | break; |
| | | case 'btn-CopyLine': |
| | | var copydata = JSON.stringify(data); |
| | | if (data.length <= 0) { |
| | | layer.msg("è¯·éæ©éè¦å¤å¶çä¸è¡ï¼"); |
| | | } |
| | | else if (data.length > 1) { |
| | | layer.msg("åªè½éæ©å¤å¶ä¸è¡ï¼"); |
| | | } |
| | | else { |
| | | var copydata2 = copydata.substring(1, copydata.length);//å»é¤é¦è¡å符'[' |
| | | var copyrow = copydata2.substring(0, copydata2.length - 1);//å»é¤æ«å°¾å符']' |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | } |
| | | break; |
| | | //ä¸ä¸è¡ |
| | | case 'btn_up': |
| | | btn_up(data); |
| | | break; |
| | | //ä¸ä¸è¡ |
| | | case 'btn_under': |
| | | btn_under(data); |
| | | break; |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region å表ï¼è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region 计å表åå§å |
| | | function get_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , limit: 100 |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , height: 400 |
| | | , cols: [[ |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', style: 'background-color: #f9f9f9;' } |
| | | , { field: 'HRelationBillInterID', title: 'å
³èå¯äº§è®¡ååå
ç ', hide: true } |
| | | , { field: 'HRelationBillEntryID', title: 'å
³èå¯äº§è®¡åååå
ç ', hide: true } |
| | | , { field: 'HRelationBillType', title: 'å
³èå¯äº§è®¡ååç±»å', hide: true } |
| | | , { field: 'HRelationBillNo', title: 'å
³èå¯äº§è®¡åå', edit: 'text', event: "HRelationBillNo" } |
| | | , { field: 'HMaterID', title: 'HMaterID', event: "HMaterID", hide: true } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', style: 'background-color: #f9f9f9;' } |
| | | , { field: 'HProcID', title: 'HProcID', edit: 'text', hide: true } |
| | | , { field: 'HProcName', title: 'å·¥åºåç§°', edit: 'text', event: "HProcID" } |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', hide: true } |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', hide: true } |
| | | , { field: 'HICMOBillNo', title: 'ç产订åå·', style: 'background-color: #f9f9f9;' } |
| | | , { field: 'HProcExchInterID', title: 'å·¥åºæµè½¬å¡å
ç ', hide: true } |
| | | , { field: 'HProcExchEntryID', title: 'å·¥åºæµè½¬å¡åå
ç ', hide: true } |
| | | , { field: 'HProcExchBillNo', title: 'å·¥åºæµè½¬å¡å·', templet: "#HProcExchInterID", style: 'background-color: #f9f9f9;' } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text' } |
| | | , { field: 'HSourceInterID', title: 'æºåå
ç ', hide: true } |
| | | , { field: 'HSourceEntryID', title: 'æºååå
ç ', hide: true } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', hide: true } |
| | | , { field: 'HSourceBillType', title: 'æºåç±»å', hide: true } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]] |
| | | } |
| | | |
| | | var rowdata = [ |
| | | { |
| | | "HMaterID": "0" |
| | | , "HMaterName": "" |
| | | , "HProcID": "0" |
| | | , "HProcName": "" |
| | | , "HRelationBillInterID": "0" |
| | | , "HRelationBillEntryID": "0" |
| | | , "HRelationBillType": "" |
| | | , "HRelationBillNo": "" |
| | | , "HICMOInterID": "0" |
| | | , "HICMOEntryID": "0" |
| | | , "HICMOBillNo": "" |
| | | , "HProcExchInterID": "0" |
| | | , "HProcExchEntryID": "0" |
| | | , "HProcExchBillNo": "" |
| | | , "HRemark": "" |
| | | , "HSourceInterID": "0" |
| | | , "HSourceEntryID": "0" |
| | | , "HSourceBillNo": "" |
| | | , "HSourceBillType": "" |
| | | } |
| | | ]; |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | form.render('select'); |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region å表ï¼å 餿å®è¡ |
| | | function set_GridDelete(obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡åï¼', function (index) { |
| | | console.log("ç´¢å¼ä¸º:" + rowIndex); |
| | | if (rowIndex === '0') { |
| | | layer.msg('é¦è¡æ æ³å é¤ï¼ï¼ï¼'); |
| | | } else { |
| | | var oldData = table.cache["mainTable"]; |
| | | oldData.splice(obj.tr.data('index'), 1) |
| | | option.data = oldData;//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option); |
| | | for (var i = 0; i < oldData.length; i++) { |
| | | $('#HICMOBillNo' + (i + 1)).find("option[value='" + oldData[i].HICMOBillNo + "']").attr("selected", true); |
| | | } |
| | | form.render('select'); |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å表ï¼å¿«æ·é®(F7)æå¼å¼¹çª |
| | | function set_GridCellCheck(obj) { |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | if (obj.event == "HRelationBillNo") { |
| | | var HProcID = $("#HProcID").val(); |
| | | var HSourceID = $("#HSourceID").val(); |
| | | var HMaterID = $("#HMaterID").val(); |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "å¯äº§è®¡åå" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../../views/Baseset/åºç¡èµæ/Sc_ProcessExchangeBillListView.html?HProcID=' + HProcID + '&HSourceID=' + HSourceID + '&HMaterID=' + HMaterID, 'yes'] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //æé®ä¸ çåè° |
| | | var iframeWindow = window["layui-layer-iframe" + index];//è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//è·åéä¸çæ°æ® |
| | | |
| | | if (checkStatus.data.length != 1) { |
| | | return layer.msg("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } |
| | | if ($("#HSourceName").val() == checkStatus.data[0].çäº§èµæº && $("#HProcName").val() == checkStatus.data[0].å·¥åº) { |
| | | obj.update({ |
| | | "HProcExchInterID": checkStatus.data[0].hmainid |
| | | , "HProcExchEntryID": checkStatus.data[0].hsubid |
| | | , "HProcExchBillNo": checkStatus.data[0].åæ®å· |
| | | , "HRelationBillInterID": checkStatus.data[0].hmainid |
| | | , "HRelationBillEntryID": checkStatus.data[0].hsubid |
| | | , "HRelationBillNo": checkStatus.data[0].åæ®å· |
| | | , "HICMOInterID": checkStatus.data[0].hicmointerid |
| | | , "HICMOEntryID": checkStatus.data[0].HICMOEntryID |
| | | , "HICMOBillNo": checkStatus.data[0].ç产订åå· |
| | | , "HMaterID": checkStatus.data[0].HMaterID |
| | | , "HMaterName": checkStatus.data[0].产å |
| | | , "HProcID": checkStatus.data[0].HProcID |
| | | , "HProcName": checkStatus.data[0].å·¥åº |
| | | , "HSourceInterID": checkStatus.data[0].hmainid |
| | | , "HSourceEntryID": checkStatus.data[0].hsubid |
| | | , "HSourceBillNo": checkStatus.data[0].åæ®å· |
| | | , "HSourceBillType": 3772 |
| | | |
| | | }) |
| | | } |
| | | else { |
| | | return layer.msg("éæ©å¯äº§è®¡ååççäº§èµæºä¸å·¥åº,è·å½åçäº§èµæºä¸å·¥åºä¸å¹é
"); |
| | | } |
| | | |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | , end: function () { |
| | | if ($("#HSourceName").val() == OptionData[0].çäº§èµæº && $("#HProcName").val() == OptionData[0].å·¥åº) { |
| | | obj.update({ |
| | | "HProcExchInterID": OptionData[0].hmainid |
| | | , "HProcExchEntryID": OptionData[0].hsubid |
| | | , "HProcExchBillNo": OptionData[0].åæ®å· |
| | | , "HRelationBillInterID": OptionData[0].hmainid |
| | | , "HRelationBillEntryID": OptionData[0].hsubid |
| | | , "HRelationBillNo": OptionData[0].åæ®å· |
| | | , "HICMOInterID": OptionData[0].hicmointerid |
| | | , "HICMOEntryID": OptionData[0].HICMOEntryID |
| | | , "HICMOBillNo": OptionData[0].ç产订åå· |
| | | , "HMaterID": OptionData[0].HMaterID |
| | | , "HMaterName": OptionData[0].产å |
| | | , "HProcID": OptionData[0].HProcID |
| | | , "HProcName": OptionData[0].å·¥åº |
| | | , "HSourceInterID": OptionData[0].hmainid |
| | | , "HSourceEntryID": OptionData[0].hsubid |
| | | , "HSourceBillNo": OptionData[0].åæ®å· |
| | | , "HSourceBillType": 3772 |
| | | |
| | | }) |
| | | } else { |
| | | return layer.msg("éæ©å¯äº§è®¡ååççäº§èµæºä¸å·¥åº,è·å½åçäº§èµæºä¸å·¥åºä¸å¹é
"); |
| | | } |
| | | |
| | | OptionData = []; |
| | | } |
| | | }) |
| | | } |
| | | if (obj.event == "HProcID") { |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "å¯äº§è®¡åå" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../../views/åºç¡èµæ/ç产åºç¡èµæ/Gy_Process.html', 'yes'] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //æé®ä¸ çåè° |
| | | var iframeWindow = window["layui-layer-iframe" + index];//è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//è·åéä¸çæ°æ® |
| | | |
| | | if (checkStatus.data.length != 1) { |
| | | return layer.msg("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } |
| | | if ($("#HProcName").val() == checkStatus.data[0].å·¥åºåç§°) { |
| | | obj.update({ |
| | | "HProcID": checkStatus.data[0].HItemID |
| | | , "HProcName": checkStatus.data[0].å·¥åºåç§° |
| | | |
| | | }) |
| | | } else { |
| | | return layer.msg("éæ©çå·¥åº,è·å½åå·¥åçå·¥åºä¸å¹é
"); |
| | | } |
| | | |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | , end: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | obj.event = ""; |
| | | return false; |
| | | } |
| | | if (event.key == "F6") { |
| | | if (obj.event == "HRelationBillNo") { |
| | | var HProcID = $("#HProcID").val(); |
| | | var HSourceID = $("#HSourceID").val(); |
| | | var HMaterID = $("#HMaterID").val(); |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "å¯äº§è®¡åå" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ['../../../views/Baseset/åºç¡èµæ/Sc_ProcessExchangeBillListView.html?HProcID=' + HProcID, 'yes'] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //æé®ä¸ çåè° |
| | | var iframeWindow = window["layui-layer-iframe" + index];//è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//è·åéä¸çæ°æ® |
| | | |
| | | if (checkStatus.data.length != 1) { |
| | | return layer.msg("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } |
| | | if ($("#HSourceName").val() == checkStatus.data[0].çäº§èµæº && $("#HProcName").val() == checkStatus.data[0].å·¥åº) { |
| | | obj.update({ |
| | | "HProcExchInterID": checkStatus.data[0].hmainid |
| | | , "HProcExchEntryID": checkStatus.data[0].hsubid |
| | | , "HProcExchBillNo": checkStatus.data[0].åæ®å· |
| | | , "HRelationBillInterID": checkStatus.data[0].hmainid |
| | | , "HRelationBillEntryID": checkStatus.data[0].hsubid |
| | | , "HRelationBillNo": checkStatus.data[0].åæ®å· |
| | | , "HICMOInterID": checkStatus.data[0].hicmointerid |
| | | , "HICMOEntryID": checkStatus.data[0].HICMOEntryID |
| | | , "HICMOBillNo": checkStatus.data[0].ç产订åå· |
| | | , "HMaterID": checkStatus.data[0].HMaterID |
| | | , "HMaterName": checkStatus.data[0].产å |
| | | , "HProcID": checkStatus.data[0].HProcID |
| | | , "HProcName": checkStatus.data[0].å·¥åº |
| | | , "HSourceInterID": checkStatus.data[0].hmainid |
| | | , "HSourceEntryID": checkStatus.data[0].hsubid |
| | | , "HSourceBillNo": checkStatus.data[0].åæ®å· |
| | | , "HSourceBillType": 3772 |
| | | |
| | | }) |
| | | } |
| | | else { |
| | | return layer.msg("éæ©å¯äº§è®¡ååççäº§èµæºä¸å·¥åº,è·å½åçäº§èµæºä¸å·¥åºä¸å¹é
"); |
| | | } |
| | | |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | , end: function () { |
| | | if ($("#HSourceName").val() == OptionData[0].çäº§èµæº && $("#HProcName").val() == OptionData[0].å·¥åº) { |
| | | obj.update({ |
| | | "HProcExchInterID": OptionData[0].hmainid |
| | | , "HProcExchEntryID": OptionData[0].hsubid |
| | | , "HProcExchBillNo": OptionData[0].åæ®å· |
| | | , "HRelationBillInterID": OptionData[0].hmainid |
| | | , "HRelationBillEntryID": OptionData[0].hsubid |
| | | , "HRelationBillNo": OptionData[0].åæ®å· |
| | | , "HICMOInterID": OptionData[0].hicmointerid |
| | | , "HICMOEntryID": OptionData[0].HICMOEntryID |
| | | , "HICMOBillNo": OptionData[0].ç产订åå· |
| | | , "HMaterID": OptionData[0].HMaterID |
| | | , "HMaterName": OptionData[0].产å |
| | | , "HProcID": OptionData[0].HProcID |
| | | , "HProcName": OptionData[0].å·¥åº |
| | | , "HSourceInterID": OptionData[0].hmainid |
| | | , "HSourceEntryID": OptionData[0].hsubid |
| | | , "HSourceBillNo": OptionData[0].åæ®å· |
| | | , "HSourceBillType": 3772 |
| | | |
| | | }) |
| | | } else { |
| | | return layer.msg("éæ©å¯äº§è®¡ååççäº§èµæºä¸å·¥åº,è·å½åçäº§èµæºä¸å·¥åºä¸å¹é
"); |
| | | } |
| | | |
| | | OptionData = []; |
| | | } |
| | | }) |
| | | } |
| | | obj.event = ""; |
| | | return false; |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | function AllowLoadData() { //é空éªè¯ |
| | | var Result = true; |
| | | if ($("#HBillNo").val() == '' || $("#HBillNo").val() == null) { |
| | | layer.msg("åæ®å·ä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDate").val() == '' || $("#HDate").val() == null) { |
| | | layer.msg("åæ®æ¥æä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HMaterID").val() == '' || $("#HMaterID").val() == null) { |
| | | layer.msg("产åç¼ç ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HBeginWorkTime").val() == '' || $("#HBeginWorkTime").val() == null) { |
| | | layer.msg("å¼å·¥æ¶é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HSourceID").val() == '' || $("#HSourceID").val() == null) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null) { |
| | | layer.msg("æä½åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null) { |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null) { |
| | | layer.msg("车é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (OperationType == "2") { |
| | | if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null) { |
| | | layer.msg("ç产订åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | | return Result; |
| | | } |
| | | |
| | | //å¤æç³»ç»åæ°æ¯å¦éä¸ |
| | | function Xt_AllowLoadData(data2) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/Xt_AllowLoadData", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "HKey": "Sc_MESBeginWorkBill_SwipeCardStart" }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | if (data.Verify == "Y") //å·å¡éªè¯ |
| | | { |
| | | layer.msg("éè¦è¿è¡å·å¡éªè¯!", { time: 1 * 1000, icon: 1 }, function (index) { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ICå·å¡', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['50%', '80%'], |
| | | maxmin: true, |
| | | content: '../../ç产管ç/æ¥å·¥å°å·¥åº/å¼å·¥/Sc_SwipeCardStart.html?HSourceInterID=' + HSourceInterID + '&HBillType=KG&HBillNo=' + $("#HBillNo").val(), |
| | | end: function () { |
| | | if (OptionData.length > 0) { |
| | | if (OptionData[0]["data"] == "1") { |
| | | data2.field["HMaker"] = OptionData[0]["HName"]; |
| | | save(data2); |
| | | } else if (OptionData[0]["data"] == "0") { |
| | | layer.msg("å 为æè½ä¸å¹é
,æ æ³ä¿å!") |
| | | } |
| | | OptionData = []; |
| | | } else { |
| | | $('#Saver').removeClass("layui-btn-disabled").attr("disabled", false); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | else { |
| | | save(data2); |
| | | } |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }) |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ä¿å |
| | | function save(data) { |
| | | var index = layer.load(); |
| | | //è·ååè¡¨æ°æ® |
| | | var num = []; |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i] != "") { |
| | | table.cache["mainTable"][i].LAY_TABLE_INDEX = i; |
| | | num.push(table.cache["mainTable"][i]) |
| | | } |
| | | } |
| | | //æ´æ°å®¡æ ¸äººä¸ºå·å¡äºº |
| | | var HName = data.field["HMaker"]; |
| | | //åè¡¨æ°æ®åºåå |
| | | var sSubStr = JSON.stringify(num); |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + refSav; |
| | | if (!AllowLoadData())//æ°æ®éªè¯ |
| | | { |
| | | return false; |
| | | } |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/SaveGetMESBeginWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | $("#HInterID").val(data.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) { |
| | | //layer.close(layer.index); |
| | | //window.parent.location.reload(); |
| | | if (data.Verify == "Y") //èªå¨å®¡æ ¸ |
| | | { |
| | | layer.close(index); |
| | | SaveVerify(HName); //å®¡æ ¸ |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | layer.close(index); |
| | | |
| | | //layer.confirm(data.Message, { |
| | | // btn: ['确认'] |
| | | //}, function (index) { |
| | | // if (data.Verify == "Y") //èªå¨å®¡æ ¸ |
| | | // { |
| | | // layer.close(index); |
| | | // SaveVerify(); //å®¡æ ¸ |
| | | // } |
| | | // else { |
| | | // layer.close(index); |
| | | // } |
| | | //}); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }) |
| | | layer.close(index); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //è·åçæ¬¡ |
| | | function get_HWorkShift() { |
| | | var HDeptID = $("#HDeptID").val(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_ShiftsController/Get_HWorkShift", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { |
| | | "HDeptID": HDeptID, |
| | | "HCenterID": HCenterID |
| | | }, |
| | | success: function (data) { |
| | | if (data.count == 1)// 说æéªè¯æåäºï¼ |
| | | { |
| | | var LoadData = data.data; |
| | | $("#HWorkShiftID").val(LoadData[0].HInterID); //å½åå·¥åºID |
| | | $("#HWorkShiftName").val(LoadData[0].çæ¬¡); //å½åå·¥åº |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //以ä¸ä¸ºlayui模å |
| | | }); |
| | | function formatDate(date) { |
| | | var d = new Date(date), |
| | | month = '' + (d.getMonth() + 1), |
| | | day = '' + d.getDate(), |
| | | year = d.getFullYear(); |
| | | |
| | | function AllowLoadData() { //é空éªè¯ |
| | | var Result = true; |
| | | if ($("#HBillNo").val() == '' || $("#HBillNo").val() == null) { |
| | | layer.msg("åæ®å·ä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDate").val() == '' || $("#HDate").val() == null) { |
| | | layer.msg("åæ®æ¥æä¸è½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HMaterID").val() == '' || $("#HMaterID").val() == null) { |
| | | layer.msg("产åç¼ç ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HBeginDate").val() == '' || $("#HBeginDate").val() == null) { |
| | | layer.msg("å¼å·¥æ¶é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HSourceID").val() == '' || $("#HSourceID").val() == null) { |
| | | layer.msg("çäº§èµæºä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null) { |
| | | layer.msg("æä½åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HMainSourceInterID").val() == '' || $("#HMainSourceInterID").val() == null) { |
| | | layer.msg("æºååå·ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null) { |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null) { |
| | | layer.msg("车é´ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null) { |
| | | layer.msg("ç产订åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | return Result; |
| | | if (month.length < 2) month = '0' + month; |
| | | if (day.length < 2) day = '0' + day; |
| | | |
| | | return [year, month, day].join('-'); |
| | | } |
| | | |
| | | //æä½å |
| | | function GetHEmpValue(obj) { |
| | | $("#HEmpName").val(obj[0].èååç§°); |
| | | $("#HEmpID").val(obj[0].HItemID); |
| | | } |
| | | //ç产çç» |
| | | function GetHGroupValue(obj) { |
| | | $("#HGroupName").val(obj[0].çç»åç§°); |
| | | $("#HGroupID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | //çäº§çæ¬¡ |
| | | function GetHWorkShiftsValue(obj) { |
| | | $("#HWorkShiftID").val(obj[0].HInterID); //å½åçæ¬¡ |
| | | $("#HWorkShiftName").val(obj[0].çæ¬¡åç§°); //å½åçæ¬¡åç§° |
| | | } |
| | | |
| | | function GetSwipeCardStart(obj) { |
| | | OptionData[0] = obj; |
| | | } |
| | | //æµè½¬å¡ |
| | | function GetProcExValue(obj) { |
| | | OptionData = obj; |
| | | } |
| | | </script> |
| | | </body> |