| | |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_startCheckBill" id="set_startCheckBill"><i class="layui-icon layui-icon-form"></i>å起审æ¹</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_CheckFlowInfo" id="get_CheckFlowInfo"><i class="layui-icon layui-icon-form"></i>æ¥ç审æ¹è¿åº¦</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><i class="layui-icon layui-icon-form"></i>å¤çº§å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck_Flow" id="AbandonCheck_Flow"><i class="layui-icon layui-icon-form"></i>å¤çº§åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_RejectCheck_Flow" id="RejectCheck_Flow"><i class="layui-icon layui-icon-form"></i>驳å</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>å
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>åå
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-ProcPriceRequestBills" id="btn-ProcPriceRequestBills"><i class="layui-icon layui-icon-delete"></i>å¤è¡ä¸æ¨(å®é¢ç³è¯·å)</button> |
| | |
| | | var size = 50; |
| | | var ins; //ç¨äºå¯¼åºexcel |
| | | var HModName = "Gy_RoutingBillList"; |
| | | var HBillType = 3301; |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | //è·ååæ° |
| | | function getUrlVars() { |
| | |
| | | break; |
| | | //ç¼è¾ |
| | | case 'set_ShowBill': set_ShowBill(); |
| | | break; |
| | | //åèµ·å®¡æ¹ |
| | | case 'set_startCheckBill': set_startCheckBill(); |
| | | break; |
| | | //æ¥ç审æ¹è¿åº¦ |
| | | case 'get_CheckFlowInfo': get_CheckFlowInfo(); |
| | | break; |
| | | //å¤çº§å®¡æ ¸ |
| | | case 'set_CheckBill_Flow': set_CheckBill_Flow(0); |
| | | break; |
| | | //å¤çº§åå®¡æ ¸ |
| | | case 'set_AbandonCheck_Flow': set_CheckBill_Flow(1); |
| | | break; |
| | | //驳å |
| | | case 'set_RejectCheck_Flow': set_RejectCheck_Flow(); |
| | | break; |
| | | //å¤è¡ä¸æ¨ |
| | | case 'btn-ProcPriceRequestBills': set_ProcPriceRequestBills(); |
| | |
| | | //sWhere += " and HPRDORGID=" + sessionStorage["OrganizationID"] + " "; |
| | | if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) { |
| | | sWhere += " and HMaterID = " + HMaterID; |
| | | sWhere += " and å®¡æ ¸äºº != ''"; |
| | | } |
| | | if (HProID != 0 && HProID != "undefined" && HProID != null) { |
| | | sWhere += " and HMainProcID = " + HProID; |
| | |
| | | } |
| | | |
| | | |
| | | //#region åèµ·å®¡æ¹ |
| | | function set_startCheckBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_Routing/StartCheckFlow", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | $("#btnSearch").trigger('click'); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ¥ç审æ¹è¿åº¦ |
| | | function get_CheckFlowInfo() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['70%', '70%'] |
| | | , title: '忮审æ¹è¿åº¦' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../../ç³»ç»ç®¡ç/å¤çº§å®¡æ¹/审æ¹è¿åº¦/Xt_CheckFlowProgressList.html?linterid=' + hID + '&HSouceBillType=' + HBillType |
| | | , resize: false, |
| | | end: function () { |
| | | ////ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | //if (get_needClose_Bar == 0) { |
| | | // $("#btnSearch").trigger('click'); |
| | | //} else if (get_needClose_Bar == 1) { |
| | | // $("#get_needClose").trigger('click'); |
| | | //} |
| | | } |
| | | , cancel: function () { |
| | | |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æ¥çï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å¤çº§ åå®¡æ ¸/å®¡æ ¸æ°æ® |
| | | function set_CheckBill_Flow(num) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_Routing/AuditFlow", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 驳å |
| | | function set_RejectCheck_Flow(num) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_Routing/RejectCheckFlow", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "CurUserID": sessionStorage["Czybm"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | }); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //å
³é [1 å
³éã2 åå
³é] |
| | | function set_CloseBill(num) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | |
| | | var colName = ""; |
| | | var contentUrl = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | colName += option.cols[0][i]["field"] + ","; |
| | | } |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | var urlLen = urlStr.split('/'); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | async:"false", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //ç»è®¡å |
| | | if (dataCols[6] == 1) { |
| | | option.cols[0][i + 1]["totalRow"] = true; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | //è®¾ç½®è¡¨æ ¼title屿§æ¾ç¤ºå«å |
| | | if (dataCols[4] != null && dataCols[4] != "") { |
| | | option.cols[0][i + 1]["title"] = dataCols[4]; |
| | | } |
| | | } |
| | | |
| | |
| | | var Organization = '<option value="0" selected="selected" ></option>'; |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | if (option.cols[0][i].hide != true) { |
| | | Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; |
| | | Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>'; |
| | | } |
| | | } |
| | | $("#ColName").empty(); |
| | |
| | | getHModel($('#HProcExchHinteID').val(), $('#HProcPlanEntryID').val(), $('#HProcExchBillNo').val()); |
| | | |
| | | break; |
| | | case "P20": |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HICMOInterID": data.hicmointerid, |
| | | "HICMOBillNo": data.ä»»å¡åå·, |
| | | "HMaterID": data.HMaterID, |
| | | "HMaterName": data.产å, |
| | | "HMaterNumber": data.产å代ç , |
| | | "HMaterModel": data.è§æ ¼åå·, |
| | | "HPieceQty": data.æµè½¬å¡æ°é, |
| | | "HPlanQty": data.æµè½¬å¡æ°é, |
| | | "lngBillKey": data.hmainid, |
| | | "HProcExchBillNo": data.åæ®å·, |
| | | "HProcExchHinteID": data.hmainid, |
| | | "HProcPlanEntryID": data.hsubid, |
| | | "HICMOQty": data.ä»»å¡åæ°é, |
| | | "HOrderProcNO": data.订åè·è¸ªå·, |
| | | "HPRDOrgID": data.ç»ç» |
| | | }); |
| | | //$("#HBarCode").attr("readonly", "readonly");//æ¡å½¢ç åªè¯» |
| | | //$("#HBarCode").css("background-color", "#efefef4d"); |
| | | HProcExchBillNoFlag = true; |
| | | |
| | | var HProcExchHinteID = $('#HProcExchHinteID').val(); |
| | | var HInterID = data.hmainid; |
| | | //èªå¨å¹é
æµæ°´å· |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Sc_StationInBill/autoGetProcNo", |
| | | type: "GET", |
| | | data: { "HUserID": sessionStorage["Czybm"], "HInterID": HInterID, "BillType": "Out" }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = data1.data[0]; |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "lngBillSubKey": data.hsubid, |
| | | "HProcName": data.å·¥åº, |
| | | "HProcID": data.å·¥åºID, |
| | | "HProcNo": data.æµæ°´å·, |
| | | "HCenterName": data.å·¥ä½ä¸å¿, |
| | | "HCenterID": data.HCenterID, |
| | | "NoOutboundHqty": (data.æµè½¬å¡æ°é - data.åºç«æ¥åºå
³èæ°é - data.åºç«å
³èæ°é) |
| | | }); |
| | | |
| | | if (data.é¦éå·¥åº == "æ¯") { |
| | | FirstEndHProcNo = 1; |
| | | } else if (data.æ«éå·¥åº == "æ¯") { |
| | | FirstEndHProcNo = 2; |
| | | } |
| | | $("#HProcNo").attr("readonly", "readonly"); |
| | | $("#HProcNo").css("background-color", "#efefef4d"); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | option = { |
| | | elem: '#mainTable', |
| | | url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList", |
| | | //, cellMinWidth: 80 |
| | | toolbar: '#toolbarDemo' |
| | | , where: { HProcExchHinteID: HProcExchHinteID } |
| | | , cols: [[ |
| | | { type: 'numbers', title: 'åºå·', totalRow: true } |
| | | , { field: 'HOrderProcNO', title: '订åè·è¸ªå·', edit: 'text' } |
| | | , { field: 'hbillno', title: 'æµè½¬å¡å·', hide: true } |
| | | , { field: 'HICMOBillNo', title: 'ç产订åå·', edit: 'text' } |
| | | , { field: '产å代ç ', title: '产å代ç ' } |
| | | , { field: '产ååç§°', title: '产ååç§°', edit: 'text' } |
| | | , { field: 'æµè½¬å¡æ°é', title: 'æµè½¬å¡æ°é' } |
| | | , { field: 'æµæ°´å·', title: 'æµæ°´å·', edit: 'text' } |
| | | , { field: 'å·¥åºåç§°', title: 'å·¥åºåç§°' } |
| | | , { field: 'å·¥ä½ä¸å¿', title: 'å·¥ä½ä¸å¿' } |
| | | , { field: 'æ¯å¦å§å¤', title: 'æ¯å¦å§å¤', edit: 'text' } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå' } |
| | | , { field: 'è®¡åæ°é', title: 'è®¡åæ°é' } |
| | | , { field: 'è¿ç«æ°é', title: 'è¿ç«æ°é', edit: 'text' } |
| | | , { field: 'åºç«æ°é', title: 'åºç«æ°é' } |
| | | ]] |
| | | , height: 500 |
| | | } |
| | | table.render(option) |
| | | |
| | | getHModel($('#HProcExchHinteID').val(), $('#HProcPlanEntryID').val(), $('#HProcExchBillNo').val()); |
| | | |
| | | break; |
| | | } |
| | | //layer.close(index); |
| | | //set_InitGrid(); |
| | |
| | | var HModName3 = "Sc_StationOutBillSub_SN"; |
| | | var HModName4 = "Sc_StationOutBillSub_Emp"; |
| | | var titleData = ["HMaterID", "HUnitID", "HSourceID", "hmainid", "HProcExchInterID", "HProcID", "HunitID", "HEmpID", "HGroupID", "HProcExchEntryID", "HSubID", "HICMOInterID", "éæ©", "æ¥è¯¢æ¥æ", "ææ¬å¯¹è±¡", "ææ¬å¯¹è±¡åç§°", "HBillStatus", "HBillType", "HPRDORGID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var params = get_UrlVars(); |
| | | var sProcExchBillNo = params[params[0]] == null ? "undefined" : params[params[0]]; //æµè½¬å¡å·ï¼å·¥åºæµè½¬å¡ä¸æ¥ç¨å°ï¼ |
| | | var OperationType = params[params[1]] == null ? 1 : params[params[1]]; //1ä¸ºç´æ¥å表模åæå¼ 2为ä»å
¶ä»æ¨¡å跳转æå¼å表 |
| | | var ViewName = params[params[2]] == null ? "h_v_MES_StationOutBillList" : params[params[2]]; //æè°ç¨çè§å¾ |
| | | |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | |
| | | |
| | | //å·¥åºæµè½¬å¡ä¸æ¥æ è®° |
| | | var lookDownBar = 0; //(0:䏿¥æä½ï¼1ï¼ç´æ¥æ¥ç) |
| | | var params = get_UrlVars(); //è·ååæ° |
| | | |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | //夿æ¯å¦ä¸ºä¸æ¥æä½ï¼è¥æ¯ååæ´æ¥è¯¢åå·åæ¶é´è¿æ»¤æ¡ä»¶ |
| | | if (typeof (params[params[0]]) != "undefined" && lookDownBar == 0) { |
| | | $("#HProcExchBillNo").val(params[params[0]]); |
| | | if (sProcExchBillNo != "undefined" && lookDownBar == 0) { |
| | | $("#HProcExchBillNo").val(sProcExchBillNo); |
| | | $("#HBeginDate").val("1990-01-01"); |
| | | $("#HEndDate").val("2200-12-30"); |
| | | lookDownBar = 1; |
| | |
| | | var ajaxLoad = layer.load(); |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cj_StationOutBill/get_Display', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": "3791" }, |
| | | //success: function (data1) { |
| | | // if (data1.count == 0) { |
| | | // option.data = []; |
| | | // layer.alert(data1.Message, { icon: 5 }); |
| | | // } else { |
| | | // option.data = data1.data; |
| | | // } |
| | | // table.render(option); |
| | | // btnIs(); |
| | | // if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | // ColFilter(); |
| | | // } |
| | | // layer.close(wait); |
| | | //}, error: function () { |
| | | // layer.close(wait); |
| | | // layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | //} |
| | | url: GetWEBURL() + '/Cj_StationOutBillController/GetSc_StationOutBillList_Json', |
| | | async: false, //asyncç¨äºæ§å¶ï¼falseï¼åæ¥åï¼trueï¼å¼æ¥ï¼é»è®¤çæ¯trueï¼å³è¯·æ±é»è®¤çæ¯å¼æ¥è¯·æ± |
| | | data: { "sWhere": sWhere, "HMaker": sessionStorage["HUserName"], "HBillSubType": "3791", "OperationType": OperationType, "ViewName": ViewName }, |
| | | |
| | | //url: GetWEBURL() + '/Cj_StationOutBill/get_Display', |
| | | //type: "GET", |
| | | //data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": "3791" }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | //è·åä¸éè¦æ¾ç¤ºçåï¼Hå¼å¤´çå䏿¾ç¤ºï¼ |
| | | var patrn = new RegExp(/^h/i); |
| | | if (patrn.test(data1.list[key].ColmCols)) { |
| | | titleData[key] = data1.list[key].ColmCols; |
| | | } |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left', totalRowText: 'å计' }); |
| | |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/PageTitle.js"></script> |
| | | <script src="../../../layuiadmin/grwebapp.js"></script> |
| | | <style type="text/css"> |
| | | .layui-form-item .layui-inline { |
| | | margin-right: 0; |
| | |
| | | <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="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>æå°</button> |
| | | <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_Print" disabled>æå°</button> |
| | | <button type="button" id="batchPrint-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>æ¹éæå°</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit" style="margin-left:50px !important;">éåº</button> |
| | | </div> |
| | | </div> |
| | |
| | | }); |
| | | |
| | | //æå° |
| | | form.on('submit(get_Print)', function () { |
| | | get_Print(); |
| | | }) |
| | | |
| | | //æ¹éæå° |
| | | form.on('submit(get_BatchPrint)', function () { |
| | | get_BatchPrint(); |
| | | }) |
| | | |
| | | |
| | | //éåºæé® |
| | | form.on('submit(Exit)', function () { |
| | | if (params[1] != null) { |
| | |
| | | , { type: 'numbers', title: 'åºå·', width: 100, totalRow: true } |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', width: 100, hide: true }//ç产订åå
ç |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', width: 100, hide: true }//ç产订ååå
ç |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', width: 120 }//ç产订åå· |
| | | , { field: 'HICMOBillNo', title: 'ç产订åå
ç ', width: 120 }//ç产订åå· |
| | | , { field: 'HWorkShopID', title: 'ç产车é´', width: 100, hide: true }//ç产车é´å
ç |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150 } |
| | |
| | | , { field: 'HQty', title: 'è®¢åæ»æ°', width: 110 } |
| | | , { field: 'HFinishQty', title: 'å·²çææµè½¬å¡æ°', width: 130 } |
| | | , { field: 'HUsableQty', title: 'å©ä½å¯ç¨æ°é', width: 130 } |
| | | , { field: 'HLotcardQty', title: 'åå¼ æµè½¬å¡æ°', width: 130 } |
| | | , { field: 'HProQty', title: 'æµè½¬å¡æ°é', width: 110, edit: 'text' } |
| | | , { field: 'HBatchNo', title: 'æ¹å·', width: 110, edit: 'text' } |
| | | , { field: 'HGroupNumber', title: 'çç»', width: 110, edit: 'text' } |
| | |
| | | |
| | | //åå§è¡¨æ ¼æ°æ® |
| | | var rowdata = [{ |
| | | "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HMaterID": 0, "ç©æä»£ç ": "" |
| | | , "ç©æåç§°": "", "è§æ ¼åå·": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0 |
| | | "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HWorkShopID": 0, "HMaterID": 0, "ç©æä»£ç ": "" |
| | | , "ç©æåç§°": "", "è§æ ¼åå·": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0, "HLotcardQty": 0 |
| | | , "HProQty": 0, "HRoutingInterID": 0, "HRoutingName": "", "HSheetQty": 0 |
| | | , "HInterID": 0, "HBillNo": "", "HBatchNo": "", "HBatchManager": "", "HGroupNumber": "" |
| | | }]; |
| | |
| | | rowdata.push( |
| | | { |
| | | "HICMOInterID": subdata[i].HICMOInterID, "HICMOEntryID": subdata[i].HICMOEntryID, "HICMOBillNo": subdata[i].HICMOBillNo |
| | | , "HMaterID": subdata[i].HMaterID, "ç©æä»£ç ": subdata[i].ç©æä»£ç , "ç©æåç§°": subdata[i].ç©æåç§° |
| | | , "HWorkShopID": subdata[i].HWorkShopID, "HMaterID": subdata[i].HMaterID, "ç©æä»£ç ": subdata[i].ç©æä»£ç |
| | | , "ç©æåç§°": subdata[i].ç©æåç§° |
| | | , "è§æ ¼åå·": subdata[i].è§æ ¼åå·, "HQty": subdata[i].HQty, "HFinishQty": subdata[i].HFinishQty |
| | | , "HUsableQty": subdata[i].HUsableQty, "HProQty": subdata[i].HProQty, "HRoutingInterID": subdata[i].HRoutingInterID |
| | | , "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty, "HDate": formatDate(subdata[i].HDate) |
| | | , "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": "", "HBatchManager": subdata[i].æ¯å¦å¯ç¨æ¹æ¬¡, "HGroupNumber": "" |
| | | , "HUsableQty": subdata[i].HUsableQty, "HLotcardQty": subdata[i].HLotcardQty, "HProQty": subdata[i].HProQty |
| | | , "HRoutingInterID": subdata[i].HRoutingInterID, "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty |
| | | , "HDate": formatDate(subdata[i].HDate), "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": subdata[i].HBatchNo |
| | | , "HBatchManager": subdata[i].æ¯å¦å¯ç¨æ¹æ¬¡, "HGroupNumber": "" |
| | | } |
| | | ) |
| | | } |
| | |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', width: 100, hide: true }//ç产订åå
ç |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', width: 100, hide: true }//ç产订ååå
ç |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', width: 120 }//ç产订åå· |
| | | , { field: 'HWorkShopID', title: 'ç产车é´å
ç ', width: 100, hide: true }//ç产车é´å
ç |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150 } |
| | |
| | | , { field: 'HQty', title: 'è®¢åæ»æ°', width: 110 } |
| | | , { field: 'HFinishQty', title: 'å·²çææµè½¬å¡æ°', width: 130 } |
| | | , { field: 'HUsableQty', title: 'å©ä½å¯ç¨æ°é', width: 130 } |
| | | , { field: 'HLotcardQty', title: 'åå¼ æµè½¬å¡æ°', width: 130 } |
| | | , { field: 'HProQty', title: 'æµè½¬å¡æ°é', width: 110, edit: 'text' } |
| | | , { field: 'HBatchNo', title: 'æ¹å·', width: 110, edit: 'text' } |
| | | , { field: 'HGroupNumber', title: 'çç»', width: 110, edit: 'text' } |
| | |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { icon: 1 }); |
| | | $('#print-btn').removeClass("layui-btn-disabled").attr("disabled", false);//æå°æé®å¯ç¨ |
| | | $('#batchPrint-btn').removeClass("layui-btn-disabled").attr("disabled", false);//æ¹éæå°æé®å¯ç¨ |
| | | layer.close(index); |
| | | } |
| | | else { |
| | |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ["../../计å管ç/å·¥èºè·¯çº¿/Gy_RoutingBillList.html", "yes"] |
| | | , content: ['../../计å管ç/å·¥èºè·¯çº¿/Gy_RoutingBillList.html?HMaterID=' + obj.data.HMaterID + '&HProID=' + 0, 'yes'] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //æé®ä¸ çåè° |
| | |
| | | } |
| | | |
| | | //æå° |
| | | function get_BatchPrint() { |
| | | function get_Print() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length >= 1) { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ¹éæå° |
| | | var time; |
| | | var num = 0; |
| | | function get_BatchPrint() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | |
| | | if (checkStatus.data.length > 0) { |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("ç¡®è®¤è¦æ¹éæå°å?", { title: "确认" }, function (index) { |
| | | time = setInterval(function () { |
| | | dy_PL(data); |
| | | }, 1000); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | function dy_PL(rest) { |
| | | var HInterID = rest[num].HInterID.toString(); |
| | | var sWhere = "select cast( b.æµæ°´å· as float) æµæ°´å·,ç产订åå·,a.ç产æ°é,a.æµè½¬å¡æ°é,a.产å代ç ,a.åæ®å·,case when ISNULL(a.çäº§è§æ ¼,'')='' then a.产åè§æ ¼ else a.çäº§è§æ ¼ end 产åè§æ ¼,a.产ååç§°,a.æ¥æ,a.åæ®å·,b.å·¥åºä»£ç ,b.å·¥åºåç§°,a.æ¹å·,b.å·¥èºå·¥ä½ä¸å¿,b.å·¥èºå·¥èºåæ°,a.ç产车é´,b.工段åç§°,b.çäº§è®¢åæ°é from h_v_Sc_ProcessExchangeBillQuery a left join h_v_Sc_ProcessExchangeBillQuerySub b on a.hmainid=b.hmainid where b.hmainid in(" + HInterID + ") and b.å·¥åºä»£ç != '9999' order by cast(b.æµæ°´å· as int)" |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | |
| | | if (data.data.length != 0) { |
| | | var dataPrint = []; |
| | | for (var i = 0; i < data.data.length; i++) { |
| | | data.data[i]["æµæ°´å·"] = data.data[i]["æµæ°´å·"].toFixed(1); |
| | | dataPrint.push(data.data[i]) |
| | | } |
| | | |
| | | var Customer = { |
| | | "Table": dataPrint |
| | | } |
| | | |
| | | var args = { |
| | | type: "print",//æå°æ¨¡å¼ |
| | | //type: "preview",//é¢è§æ¨¡å¼ |
| | | showOptionDlg: false, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: urlAddRandomNo("../../grf/æµè½¬å¡JSON.grf"), |
| | | data: Customer |
| | | }; |
| | | |
| | | console.log(data.data[0].åæ®å·); |
| | | //var args = { |
| | | // report: urlAddRandomNo("../../grf/cs10.grf"), |
| | | // data: Customer |
| | | //}; |
| | | webapp_ws_ajax_run(args); |
| | | |
| | | if (rest.length <= num + 1) { |
| | | num = 0; |
| | | clearInterval(time); |
| | | } else { |
| | | num++; |
| | | } |
| | | |
| | | } else { |
| | | layer.msg("æ¥æ æ°æ®!"); |
| | | } |
| | | |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5 }); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | //è¡¨æ ¼è¡å
äºä»¶å é¤ |
| | | function set_GridDelete(obj) { |
| | | var data = obj.data; |