| | |
| | | <script src="../../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../../layuiadmin/PageTitle.js"></script> |
| | | <style type="text/css"> |
| | | .layui-form-label { |
| | | width: 85px; |
| | |
| | | <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="NewAdd" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="NewAdd">æ°å¢</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> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="a_href" id="a_href">导åº</button> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> |
| | | <h1 style="text-align:center;"><b>ç产å¼å·¥å</b></h1> |
| | | <h1 style="text-align:center;"><b>å¼å·¥å</b></h1> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab layui-tab-card"> |
| | | <ul class="layui-tab-title"> |
| | |
| | | <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" /> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-inline"> |
| | | <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" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <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" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">éå®è®¢åå·:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="F_YQN_XSDD" lay-verify="F_YQN_XSDD" id="F_YQN_XSDD" disabled autocomplete="off"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">éå®ç©æåç§°:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="F_zzzz_Text4" lay-verify="F_zzzz_Text4" id="F_zzzz_Text4" disabled autocomplete="off"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é宿°é:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="FQTY" lay-verify="FQTY" id="FQTY" disabled autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HSBillType = params[params[2]];//æºåç±»å |
| | | var HBillType = params[params[3]]; |
| | | var HSourceInterID = params[params[4]]; |
| | | var HSourceEntryID = params[params[5]]; |
| | | var HSourceBillNo = params[params[6]]; |
| | | var HSourceBillType = params[params[7]]; |
| | | } |
| | | |
| | | var edit = function (data) { |
| | | HBillType = data[0].HBillType; |
| | | HSourceInterID = data[0].HSourceInterID; |
| | | HSourceEntryID = data[0].HSourceEntryID; |
| | | HSourceBillNo = data[0].HSourceBillNo; |
| | | HSourceBillType = data[0].HSourceBillType; |
| | | //var edit = function (data) { |
| | | // HBillType = data[0].HBillType; |
| | | // HSourceInterID = data[0].HSourceInterID; |
| | | // HSourceEntryID = data[0].HSourceEntryID; |
| | | // HSourceBillNo = data[0].HSourceBillNo; |
| | | // HSourceBillType = data[0].HSourceBillType; |
| | | |
| | | } |
| | | //} |
| | | |
| | | |
| | | layui.config({ |
| | |
| | | |
| | | //åå§å表åæä»¶ |
| | | set_InitFrom(); |
| | | |
| | | //#region ã卿è·å模ååç§°ã |
| | | var HModuleType = "3787"; |
| | | //éè¿åæ®ç±»åï¼ä»æ°æ®åºå¨æè·ååæ®æ¨¡åå½å,å¼ç¨jsæä»¶ PageTitle.js |
| | | var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType); |
| | | $("h1").html('<b>' + HPageTitle + '</b>'); |
| | | //#endregion |
| | | |
| | | //夿æä½ç±»å |
| | | if (OperationType == 1) {//æ æºå |
| | |
| | | //æ æºåæ°å¢ |
| | | function set_AddFNew() |
| | | { |
| | | refSav = "Add"; |
| | | //å æºåç±»ååºå(å¯ä»¥åä¸åçæ¹æ³) |
| | | $("#HMainSourceEntryID").focus(); |
| | | //åå§åºæ¬ä¿¡æ¯èµå¼ |
| | | $("#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"]); //å¶å人 |
| | | |
| | | $('#HMaterCode').attr("disabled", false); |
| | | $('#HMaterCode').attr("readonly", true); |
| | | $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", false); |
| | | $('#HMaterName').attr("readonly", true); |
| | | $('#HMaterSpec').attr("readonly", true); |
| | | $('#HSourceName').attr("disabled", false); |
| | | $('#HSourceName').attr("readonly", true); |
| | | $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#HEmpName').attr("disabled", false); |
| | | $('#HEmpName').attr("readonly", true); |
| | | $('#HEmpList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $("#HMainSourceInterID").val(""); |
| | | $("#HMainSourceEntryID").val(""); |
| | | $("#HMainSourceBillNo").val(""); |
| | | $('#HMainSourceBillNo').attr("readonly", true); |
| | | $("#HMainSourceBillType").val(""); |
| | | $('#HMainSourceBillNo').attr("disabled", false); |
| | | $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true); |
| | | |
| | | //æ«äºç»´ç æ¹æ³ |
| | | $('#HMainSourceEntryID').on('keydown', function (event) { //æ«æºç |
| | | var HBarCode = $('#HMainSourceEntryID').val(); |
| | | if (event.keyCode == 13) { |
| | | //å¤æææ¬æ¡æ¯å¦ææ°æ® new |
| | | if (HBarCode == "") { |
| | | layer.alert("æºåè¡å·ä¸ºç©ºï¼", { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | return; |
| | | } |
| | | // |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Sc_MESBeginStepWorkBill/GetMESBeginStepWorkBillByEWM", |
| | | type: "GET", |
| | | data: { |
| | | "sBillBarCode": HBarCode |
| | | }, |
| | | success: function (result) { |
| | | var data = result.data.h_v_IF_ICMOBillList[0]; |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | form.val("component-form-group", { |
| | | "HMaterID": data.HMaterID |
| | | , "HMaterCode": data.产å代ç |
| | | , "HMaterName": data.产ååç§° |
| | | , "HMaterSpec": data.è§æ ¼åå· |
| | | , "HSourceID": data.HSourceID |
| | | , "HSourceName": data.çäº§èµæº |
| | | , "HEmpID": data.HEmpID |
| | | , "HEmpName": data.ä¸å¡å |
| | | , "HDeptID": data.HDeptID |
| | | , "HDeptName": data.çäº§è½¦é´ |
| | | , "HMainSourceInterID": data.hmainid |
| | | , "HMainSourceBillNo": data.åæ®å· |
| | | , "HMainSourceBillType": "3710" |
| | | , "HICMOInterID": "0" |
| | | , "HICMOEntryID": "0" |
| | | , "HICMOBillNo": "0" |
| | | , "F_YQN_XSDD": data.éå®è®¢åç¼å· |
| | | , "F_zzzz_Text4": data.éå®ç©æåç§° |
| | | , "FQTY": data.é宿°é |
| | | }); |
| | | $("#HMainSourceBillNo").css("box-shadow", "none"); |
| | | $("#HProcID").val(0); |
| | | $("#HProcName").val(0); |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ«æºç æ¹æ³åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ææºåæ°å¢ |
| | |
| | | } |
| | | }); |
| | | |
| | | form.on('submit(NewAdd)', function (data) { |
| | | $("#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); |
| | | //$("#HGroupID").val(sessionStorage["HGroupID"]); //é»è®¤çç»ID |
| | | //$("#HGroupName").val(sessionStorage["HGroup"]); //é»è®¤çç» |
| | | //$("#HEmpID").val(sessionStorage["HKeeperID"]); //é»è®¤æä½åID |
| | | //$("#HEmpName").val(sessionStorage["HKeeper"]); //é»è®¤æä½å |
| | | } |
| | | }); |
| | | set_AddFNew(); |
| | | }); |
| | | |
| | | //ä¿åæäº¤ |
| | | form.on('submit(Saver)', function (data) { |
| | |
| | | { |
| | | return false; |
| | | } |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MESBeginStepWorkBill/SaveGetMESBeginStepWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | $("#HInterID").val(data.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | layer.confirm(data.Message, { |
| | | btn: ['确认'] |
| | | }, function (index) { |
| | | if (OperationType == 1) { |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MESBeginStepWorkBill/SaveGetMESBeginStepWorkBillByEWM", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | $("#HInterID").val(data.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | layer.confirm(data.Message, { |
| | | btn: ['确认'] |
| | | }, function (index) { |
| | | if (data.Verify == "Y") //èªå¨å®¡æ ¸ |
| | | { |
| | | layer.close(index); |
| | |
| | | else { |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }) |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }) |
| | | }) |
| | | } |
| | | else { |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MESBeginStepWorkBill/SaveGetMESBeginStepWorkFrom", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | $("#HInterID").val(data.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | 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 }) |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert(err, { icon: 5 }) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }); |
| | | |
| | | //å®¡æ ¸æé®æäº¤ |
| | |
| | | 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].ç©æåç§°); |
| | | $("#HMaterCode").val(checkStatus.data[0].ç©æä»£ç ); |
| | | $("#HMaterID").val(checkStatus.data[0].HItemID); |
| | | $("#HMaterSpec").val(checkStatus.data[0].HModel); |
| | | $("#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', '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', '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/DeptInformation.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å
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | |
| | | return Result = false; |
| | | } |
| | | if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null) { |
| | | $("#HGroupID").val(0); |
| | | layer.msg("çç»ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |