| | |
| | | html1 += '<h1><span>物料名称:</span><span>' + LoadData2[i].HMaterName + '</span></h1>'; |
| | | html1 += '<h1><span>计划数量:</span><span>' + LoadData2[i].HPlanQty + '</span></h1>'; |
| | | html1 += '<h1><span>已汇报数量:</span><span>' + LoadData2[i].HRelationQty + '</span></h1>'; |
| | | if (LoadData2[i].HRelationQty == 0 || LoadData2[i].HRelationQty == null) |
| | | { |
| | | if (LoadData2[i].HRelationQty == 0 || LoadData2[i].HRelationQty == null) { |
| | | html1 += '<h1><span>进度:</span><span>0%</span></h1>'; |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | html1 += '<h1><span>进度:</span><span>' + (LoadData2[i].HRelationQty / LoadData2[i].HPlanQty) * 100 + '%</span></h1>'; |
| | | } |
| | | html1 += '<h1><span>本单运行时间:</span><span>' + getSeconds(LoadData2[i].HSumTimes)+'</span></h1>'; |
| | |
| | | var eqpid = "eqpid" + i; //获取指定资源样式ID |
| | | HSourceID = $("#" + eqpid + "").html(); //通过样式ID获取html内容(资源ID) |
| | | //逻辑删除方法 |
| | | layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) |
| | | { |
| | | layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/ReportPlatForm/DeleteGetLineBindBillList", |
| | | type: "GET", |
| | | data: { "HSourceID": HSourceID }, |
| | | dataType: "json",//数据类型可以为 text xml json script jsonp |
| | | success: function (data) { |
| | | if (data.count > 0) |
| | | { |
| | | if (data.count > 0) { |
| | | TSLoad(); //执行查询过程 |
| | | layer.close(index); |
| | | layer.msg(data.Message, { time: 1 * 2000, icon: 1 }); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | layer.alert(data.Message, { time: 1 * 2000, icon: 5 }); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | |
| | | //工单列表选中 |
| | | function CheckBtom(obj, i) |
| | | { |
| | | function CheckBtom(obj, i) { |
| | | var partid = $(obj).parent().attr("id"); //获取父级id |
| | | workcode = $("#wk" + i + "").html(); //通过样式ID获取html内容(工单号) |
| | | HBillType = $("#ty" + i + "").html(); //通过样式ID获取html内容(单据类型) |
| | |
| | | |
| | | |
| | | //开工按钮点击事件 |
| | | function OpenWork(event, obj) |
| | | { |
| | | if (wktag == 0) |
| | | { |
| | | function OpenWork(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("请选择工单列表", {icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "开工")) |
| | | { |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "开工")) { |
| | | layer.alert("单据状态不满足开工条件!", { icon: 5 }); |
| | | return false; |
| | | } |
| | |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "完工")) |
| | | { |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "完工")) { |
| | | layer.alert("单据状态不满足完工条件!", { icon: 5 }); |
| | | return false; |
| | | } |
| | |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "停工")) |
| | | { |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "停工")) { |
| | | layer.alert("单据状态不满足停工条件!", { icon: 5 }); |
| | | return false; |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | //上料防错单 |
| | | function OpenMaterToSource() { |
| | | if (wktag == 0) { |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //加上边框 |
| | | title: '新增上料防错单', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '生产管理/上料防错单/Sc_Add_MaterToSourceBillList.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | }); |
| | | |
| | | //通过索引获取到当前iframe弹出层 |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //调用iframe弹出层内的方法 |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //首检检验 |
| | | function OpenFistCheck(event, obj) |
| | | { |
| | | function OpenFistCheck(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['质量管理/首件检验单/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType, 'yes'] |
| | | , content: ['质量管理/首件检验单/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | } |
| | |
| | | } |
| | | |
| | | //过程检验 |
| | | function OpenProcess(event, obj) |
| | | { |
| | | function OpenProcess(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['质量管理/工序检验单/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HSourceInterID +'&HSouceBillType=' + HBillType, 'yes'] |
| | | , content: ['质量管理/工序检验单/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //不良采集 |
| | | function BadGather() { |
| | | if (wktag == 0) { |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: '质量汇报单-编辑' |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['生产管理/质量汇报单/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | |
| | |
| | | } |
| | | |
| | | //退出 |
| | | function Esc(event, obj) |
| | | { |
| | | function Esc(event, obj) { |
| | | parent.location.href = "index.html" |
| | | |
| | | } |
| | | |
| | | //单据状态验证 |
| | | function WorkStaus(HSourceID1, workcode,HSourceInterID,btn) |
| | | { |
| | | function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) { |
| | | var flag = false; |
| | | var sWhere = ""; |
| | | switch (btn) { |
| | |
| | | async: false, |
| | | success: function (data) { |
| | | |
| | | if (data.count > 0) |
| | | { |
| | | if (data.count > 0) { |
| | | flag = true; |
| | | |
| | | } |
| | |
| | | flag =false; |
| | | } |
| | | }, |
| | | error: function (err) |
| | | { |
| | | error: function (err) { |
| | | flag = false; |
| | | } |
| | | }); |
| | |
| | | <span class="imgtitle">报检申请</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenMaterToSource(event,this)"> |
| | | <div class="cnt bottomright" style="pointer-events:none; background-color:rgb(0 0 0 / 10%)"> |
| | | <span class="layui-icon layui-icon-engine imgicon"></span> |
| | | <span class="imgtitle">上料防呆</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="BadGather(event,this)"> |
| | | <div class="cnt bottomright" style="pointer-events:none; background-color:rgb(0 0 0 / 10%)"> |
| | | <span class="layui-icon layui-icon-chart imgicon"></span> |
| | | <span class="imgtitle">不良采集</span> |