| | |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">åå®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CloseBill" id="set_CloseBill">å
³é</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CancelCloseBill" id="set_CancelCloseBill">åå
³é</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_Copy" id="set_Copy">å¤å¶</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckFlowInfo" id="set_CheckFlowInfo">æ¥ç审æ¹è¿åº¦</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill_Flow" id="set_CheckBill_Flow">å¤çº§å®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck_Flow" id="set_AbandonCheck_Flow">å¤çº§åå®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_RejectCheck_Flow" id="set_RejectCheck_Flow">驳å</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_WithdrawCheck_Flow" id="set_WithdrawCheck_Flow">æ¤å</button> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | |
| | | , "HQCSchemeID_Proc": 0, "HQCSchemeNumber_Proc": "", "HQCSchemeName_Proc": "" |
| | | , "HQCSchemeID_Patrol": 0, "HQCSchemeNumber_Patrol": "", "HQCSchemeName_Patrol": "" |
| | | , "HQCFst": false, "HQCProc": false, "HQCPatrol": false, "HMaterToSourceCtrl": false |
| | | ,"HSubStdEmpAvg_S": 0 |
| | | }]; |
| | | var HModName = "Gy_RoutingBill"; |
| | | //#endregion |
| | |
| | | , { field: 'HQCSchemeID_Patrol', title: 'å·¡æ£æ£éªæ¹æ¡ID', hide: true }//f7 |
| | | , { field: 'HQCSchemeNumber_Patrol', title: 'å·¡æ£æ£éªæ¹æ¡ä»£ç ', edit: 'text', event: "HQCSchemeNumber_Patrol", width: 125 } |
| | | , { field: 'HQCSchemeName_Patrol', title: 'å·¡æ£æ£éªæ¹æ¡åç§°', width: 125 }//f7 |
| | | |
| | | , { field: 'HWorkQty', title: 'å å·¥æ°é', edit: 'text', width: 125 } |
| | | , { field: 'HSubStdEmpQty_S', title: '产线人æ°', edit: 'text', width: 125 } |
| | | , { field: 'HSubStdEmpAvg_S', title: '人å产è½', edit: 'text', width: 125} |
| | | //, { field: 'HPassRate', title: 'è¯ç', edit: 'text' }//é»è®¤ |
| | | //, { field: 'HProcID_S', title: '工段', edit: 'text' } |
| | | ////, { field: 'HCenterID_S', title: '产线ä¸å¿id', hide: true }//hide: true |
| | |
| | | //, { field: 'HAutoTrunFlag', title: 'èªå¨ç§»è½¬', templet: "#HAutoTrunFlag" }//chenbox |
| | | //, { field: 'HProcCheckNote', title: 'æ¬å·¥åºç¡®è®¤è®°å½', edit: 'text' } |
| | | //, { field: 'HProcWorkNum', title: 'ç¨åºå·', edit: 'text' } |
| | | //, { field: 'HWorkTimes_S', title: '产ååä»¶å·¥æ¶', edit: 'text' } |
| | | /* , { field: 'HWorkTimes_S', title: '产ååä»¶å·¥æ¶', edit: 'text' }*/ |
| | | , { field: 'HWorkTimes_S', title: 'åä»¶ç产èæ', edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]] |
| | | //, done: function (res, curr, count) { |
| | |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(2100, 12, 31), "yyyy-MM-dd")); |
| | | } |
| | | }); |
| | | } |
| | |
| | | set_CancelCloseBill(data); |
| | | }); |
| | | |
| | | //æ¥ç审æ¹è¿åº¦ |
| | | form.on('submit(set_CheckFlowInfo)', function (data) { |
| | | set_CheckFlowInfo(); |
| | | }); |
| | | |
| | | //å¤çº§å®¡æ ¸ |
| | | form.on('submit(set_CheckBill_Flow)', function (data) { |
| | | set_CheckBill_Flow(0); |
| | | }); |
| | | |
| | | //å¤çº§åå®¡æ ¸ |
| | | form.on('submit(set_AbandonCheck_Flow)', function (data) { |
| | | set_CheckBill_Flow(1); |
| | | }); |
| | | //驳å |
| | | form.on('submit(set_RejectCheck_Flow)', function (data) { |
| | | set_RejectCheck_Flow(); |
| | | }); |
| | | //æ¤å |
| | | form.on('submit(set_WithdrawCheck_Flow)', function (data) { |
| | | set_WithdrawCheck_Flow(); |
| | | }); |
| | | //å¤å¶ |
| | | form.on('submit(set_Copy)', function (data) { |
| | | set_Copy(); |
| | | }); |
| | | |
| | | //æ¯å¦é»è®¤å·¥èº |
| | | form.on('checkbox(checkboxHStandard)', function (data) { |
| | |
| | | |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = { |
| | | "HProcNo": (table.cache["mainTable"].length + 1) * 10, "HProcID_S": 0, "HProcType": "主工åº", "HCenterID_S": 0, "HCenterID_SName": "" |
| | | "HProcNo": (table.cache["mainTable"].length + 1) * 10, "HProcID_S": 0, "HProcType": "主工åº", "HCenterID_S": 0, "HCenterID_SName": "","å·¥åºä»£ç ":"" |
| | | , "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": "" |
| | | , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "å·¥åº": "","工段":"" |
| | | , "HProcID": 0, "å·¥ä½ä¸å¿ä»£ç ": "", "HCenterID": 0, "å·¥ä½ä¸å¿": "", "HSupID": 0 |
| | |
| | | , "HQCSchemeID_Proc": 0, "HQCSchemeNumber_Proc": "", "HQCSchemeName_Proc": "" |
| | | , "HQCSchemeID_Patrol": 0, "HQCSchemeNumber_Patrol": "", "HQCSchemeName_Patrol": "" |
| | | , "HQCFst": false, "HQCProc": false, "HQCPatrol": false, "HMaterToSourceCtrl": false |
| | | , "HSubStdEmpAvg_S": 0 |
| | | }; |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | |
| | | } |
| | | }) |
| | | |
| | | //æç»ç½æ ¼åå
æ ¼ç¼è¾äºä»¶ |
| | | table.on('edit(mainTable)', function (obj) { |
| | | var value = obj.value //å¾å°ä¿®æ¹åçå¼ |
| | | , data = obj.data //å¾å°æå¨è¡ææé®å¼ |
| | | , field = obj.field; //å¾å°å段 |
| | | switch (field) { |
| | | case 'HSubStdEmpQty_S': //äº§çº¿äººæ° |
| | | if (value != 0 && value != "" && data.HSubStdEmpAvg_S != 0 && data.HSubStdEmpAvg_S != "") { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HWorkQty: Number((value * data.HSubStdEmpAvg_S).toFixed(2)) |
| | | }); |
| | | //table.render(option) |
| | | } |
| | | break; |
| | | case 'HSubStdEmpAvg_S': //产线人åäº§è½ |
| | | if (value != 0 && value != "" && data.HSubStdEmpQty_S != 0 && data.HSubStdEmpQty_S != "") { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HWorkQty: Number((value * data.HSubStdEmpQty_S).toFixed(2)) |
| | | }); |
| | | //table.render(option) |
| | | } |
| | | break; |
| | | } |
| | | }) |
| | | |
| | | $('#HName').on('keydown', function (event) {//å·¥èºè·¯çº¿åç§° |
| | | if (event.keyCode == 118) { |
| | | layer.msg("å·¥èºè·¯çº¿åç§°F7æé®") |
| | |
| | | |
| | | //ä¿åæäº¤ |
| | | form.on('submit(btnSave)', function (data) {//æäº¤ |
| | | if (AllowLoadData(data)) { |
| | | set_AddNew(data); |
| | | const procNos = table.cache["mainTable"].map(item => Number(item.HProcNo)); |
| | | if (isSortedAscending(procNos) && haveHProcNO9999()) { |
| | | if (AllowLoadData(data)) { |
| | | set_AddNew(data); |
| | | } |
| | | } else { |
| | | layer.msg('è¯·æ³¨ææµæ°´å·æ¬¡åºæè
æ¯å¦æè½¬å·¥åº'); |
| | | } |
| | | }); |
| | | |
| | | // 彿°ï¼å¤ææ°ç»æ¯å¦ä»å°å°å¤§æåº |
| | | function isSortedAscending(arr) { |
| | | for (let i = 0; i < arr.length - 1; i++) { |
| | | if (arr[i] > arr[i + 1]) { |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | //å¤å¶æ¶ä¿è¯è½¬å·¥åºåå¨ |
| | | function haveHProcNO9999() { |
| | | if (OperationType == 2 || OperationType == 3) { |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (option.data[i]["HProcNo"] == 9999 && option.data[i]["å·¥åºä»£ç "] == 9999) { |
| | | return true |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | //éåº |
| | | form.on('submit(btnEdit)', function (data) { |
| | | if (params[1] != null) { |
| | |
| | | }) |
| | | } |
| | | |
| | | //#region å¤çº§ åå®¡æ ¸/å®¡æ ¸æ°æ® |
| | | function set_CheckBill_Flow(num) { |
| | | var InterID = $("#HInterID").val(); |
| | | if (InterID != 0) { |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.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() { |
| | | var InterID = $("#HInterID").val(); |
| | | if (InterID != 0) { |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.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 |
| | | |
| | | //#region æ¤å |
| | | function set_WithdrawCheck_Flow() { |
| | | var InterID = $("#HInterID").val(); |
| | | if (InterID != 0) { |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_Routing/WithdrawCheckFlow", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "user": 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 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©å¨å®¡æ¹æµç忮驳åï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å¤å¶ |
| | | function set_Copy() { |
| | | //å¶å人 |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#hmakers").val(sessionStorage["HUserName"]); |
| | | $("#hmakedate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(2100, 12, 31), "yyyy-MM-dd")); |
| | | //设置hinterid |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HBillType": '3301' }, |
| | | success: function (d) { |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | } |
| | | }); |
| | | OperationType = 2; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ¥ç审æ¹è¿åº¦ |
| | | function set_CheckFlowInfo() { |
| | | var InterID = $("#HInterID").val(); |
| | | if (InterID != 0) { |
| | | 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=' + InterID + '&HSouceBillType=3301' |
| | | , 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 |
| | | |
| | | //è¡å
å é¤å¿«æ·é® |
| | | function set_GridCellCheck(obj) { |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | |
| | | , "HQCSchemeID_Fst": 0, "HQCSchemeNumber_Fst": "", "HQCSchemeName_Fst": "" |
| | | , "HQCSchemeID_Proc": 0, "HQCSchemeNumber_Proc": "", "HQCSchemeName_Proc": "" |
| | | , "HQCSchemeID_Patrol": 0, "HQCSchemeNumber_Patrol": "", "HQCSchemeName_Patrol": "" |
| | | , "HQCFst": false, "HQCProc": false, "HQCPatrol": false,"HMaterToSourceCtrl":false |
| | | , "HQCFst": false, "HQCProc": false, "HQCPatrol": false, "HMaterToSourceCtrl": false |
| | | , "HSubStdEmpAvg_S": 0 |
| | | }) |
| | | j++; |
| | | } |
| | |
| | | , "HQCSchemeID_Proc": d.data[i].HQCSchemeID_Proc, "HQCSchemeNumber_Proc": d.data[i].è½¬åºæ£éªæ¹æ¡ä»£ç , "HQCSchemeName_Proc": d.data[i].è½¬åºæ£éªæ¹æ¡ |
| | | , "HQCSchemeID_Patrol": d.data[i].HQCSchemeID_Patrol, "HQCSchemeNumber_Patrol": d.data[i].å·¡æ£æ£éªæ¹æ¡ä»£ç , "HQCSchemeName_Patrol": d.data[i].å·¡æ£æ£éªæ¹æ¡ |
| | | , "HQCFst": d.data[i].HQCFst == 1 ? true : false, "HQCProc": d.data[i].HQCProc == 1 ? true : false, "HQCPatrol": d.data[i].HQCPatrol == 1 ? true : false, "HMaterToSourceCtrl": d.data[i].HMaterToSourceCtrl == 1 ? true : false |
| | | , "HSubStdEmpAvg_S": d.data[i].人åäº§è½ |
| | | } |
| | | ) |
| | | } |
| | |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i] != "") { |
| | | table.cache["mainTable"][i].LAY_TABLE_INDEX = i; |
| | | |
| | | //å å·¥æ°é=äº§çº¿äººæ° * 产线人åäº§è½ |
| | | if (table.cache["mainTable"][i].HSubStdEmpQty_S != 0 && table.cache["mainTable"][i].HSubStdEmpQty_S != "" && table.cache["mainTable"][i].HSubStdEmpAvg_S != 0 && table.cache["mainTable"][i].HSubStdEmpAvg_S != "") { |
| | | |
| | | table.cache["mainTable"][i].HWorkQty = Number((table.cache["mainTable"][i].HSubStdEmpQty_S * table.cache["mainTable"][i].HSubStdEmpAvg_S).toFixed(2)) |
| | | |
| | | } |
| | | |
| | | num.push(table.cache["mainTable"][i]) |
| | | } |
| | | } |
| | |
| | | //å·æ°æµæ°´å· |
| | | function btn_Refresh(data) { |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | option.data[i]["HProcNo"] = (i + 1) * 10; |
| | | if (option.data[i]["HProcNo"] != 9999) { |
| | | option.data[i]["HProcNo"] = (i + 1) * 10; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } |
| | |
| | | if (i >= dataCol.length) { |
| | | continue; |
| | | } |
| | | |
| | | var dataCols = dataCol[i].split('|'); |
| | | if (dataCol[i]) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | } |
| | | |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |