| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å®é¢ç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HProcPriceType" id="HProcPriceType" lay-filter="HProcPriceType" style="width:200px;"> |
| | | <option value="临æ¶å®é¢" selected="selected">临æ¶å®é¢</option> |
| | | <option value="æ°¸ä¹
å®é¢">æ°¸ä¹
å®é¢</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-block" style="margin-left: 96px;"> |
| | | <input type="checkbox" name="checkboxHStandard" id="checkboxHStandard" lay-skin="primary" lay-filter="checkboxHStandard" checked title="æ¯å¦é»è®¤å·¥èº"> |
| | | <input type="hidden" value="true" name="HStandard" id="HStandard" lay-verify="HStandard"> |
| | |
| | | <input type="checkbox" name="HSNCtrl" lay-filter="HSNCtrl" id="HSNCtrl{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> |
| | | </div> |
| | | </script> |
| | | |
| | | <!--å¤éæ¡ æ¯å¦é¦ä»¶--> |
| | | <script type="text/html" id="HQCFst"> |
| | | <div class="layui-input-block" style="margin-left: 20px;"> |
| | | <input type="checkbox" name="HQCFst" lay-filter="HQCFst" id="HQCFst{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> |
| | | </div> |
| | | </script> |
| | | <!--å¤éæ¡ æ¯å¦æ«æ£--> |
| | | <script type="text/html" id="HQCProc"> |
| | | <div class="layui-input-block" style="margin-left: 20px;"> |
| | | <input type="checkbox" name="HQCProc" lay-filter="HQCProc" id="HQCProc{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> |
| | | </div> |
| | | </script> |
| | | <!--å¤éæ¡ æ¯å¦å·¡æ£--> |
| | | <script type="text/html" id="HQCPatrol"> |
| | | <div class="layui-input-block" style="margin-left: 20px;"> |
| | | <input type="checkbox" name="HQCPatrol" lay-filter="HQCPatrol" id="HQCPatrol{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> |
| | | </div> |
| | | </script> |
| | | <!--å¤éæ¡ ä¸æé²éæ§å¶--> |
| | | <script type="text/html" id="HMaterToSourceCtrl"> |
| | | <div class="layui-input-block" style="margin-left: 20px;"> |
| | | <input type="checkbox" name="HMaterToSourceCtrl" lay-filter="HMaterToSourceCtrl" id="HMaterToSourceCtrl{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> |
| | | </div> |
| | | </script> |
| | | <!--å¤éæ¡ æäº§å·¥åºæ è®°--> |
| | | <script type="text/html" id="HSortProcFlag"> |
| | | <div class="layui-input-block" style="margin-left: 20px;"> |
| | |
| | | , "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 |
| | | }]; |
| | | var HModName = "Gy_RoutingBill"; |
| | | //#endregion |
| | |
| | | , { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ', edit: 'text', width: 110, event: "CheckHSupID" } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå' }//f7 |
| | | , { field: 'HSupFlag', title: 'å¤åæ è®°', templet: "#HSupFlag" }//checkbox |
| | | , { field: 'HSortProcFlag', title: 'æäº§å·¥åºæ è®°', templet: "#HSortProcFlag" }//checkbox |
| | | , { field: 'HSortProcFlag', title: 'æäº§å·¥åºæ è®°', templet: "#HSortProcFlag", width: 120 }//checkbox |
| | | |
| | | //, { field: 'HProcType', title: 'å·¥åºç±»å', templet: '#HProcType' }//éæ© |
| | | ////, { field: 'HBadWHID', title: 'HBadWHID', hide: true }//, hide: true |
| | |
| | | //, { field: 'HPicNum', title: 'å¾çº¸ç¼å·', edit: 'text' } |
| | | //, { field: 'HTimeUnit', title: 'æ¶é´åä½', edit: 'text' } |
| | | //, { field: 'HUnitTime', title: 'è¿è¡æ¶é´', edit: 'text' } |
| | | , { field: 'HWorkQty', title: 'å å·¥æ°é', edit: 'text', totalRow: true }//é»è®¤ |
| | | , { field: 'HSNCtrl', title: 'SNè¿ç«æ§å¶', templet: "#HSNCtrl" } |
| | | , { field: 'HWorkQty', title: 'å å·¥æ°é', edit: 'text', totalRow: true, width: 120 }//é»è®¤ |
| | | , { field: 'HSNCtrl', title: 'SNè¿ç«æ§å¶', templet: "#HSNCtrl", width: 120 } |
| | | , { field: 'HMaterToSourceCtrl', title: '䏿é²éæ§å¶', templet: "#HMaterToSourceCtrl", width:120 } |
| | | , { field: 'HQCFst', title: 'æ¯å¦é¦ä»¶', templet: "#HQCFst", width: 120 } |
| | | , { field: 'HQCProc', title: 'æ¯å¦æ«æ£', templet: "#HQCProc", width: 120 } |
| | | , { field: 'HQCPatrol', title: 'æ¯å¦å·¡æ£', templet: "#HQCPatrol", width: 120 } |
| | | |
| | | //, { field: 'HQCSchemeID_Fst', title: 'é¦ä»¶æ£éªæ¹æ¡ID', hide: true }//f7 |
| | | //, { field: 'HQCSchemeNumber_Fst', title: 'é¦ä»¶æ£éªæ¹æ¡ä»£ç ', edit: 'text', event: "HQCSchemeNumber_Fst",width:125 } |
| | | //, { field: 'HQCSchemeName_Fst', title: 'é¦ä»¶æ£éªæ¹æ¡åç§°', width: 125 }//f7 |
| | | //, { field: 'HQCSchemeID_Proc', title: 'è½¬åºæ£éªæ¹æ¡ID', hide: true }//f7 |
| | | //, { field: 'HQCSchemeNumber_Proc', title: 'è½¬åºæ£éªæ¹æ¡ä»£ç ', edit: 'text', event: "HQCSchemeNumber_Proc", width: 125} |
| | | //, { field: 'HQCSchemeName_Proc', title: 'è½¬åºæ£éªæ¹æ¡åç§°', width: 125}//f7 |
| | | //, { 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: 'HQCSchemeID_Fst', title: 'é¦ä»¶æ£éªæ¹æ¡ID', hide: true }//f7 |
| | | , { field: 'HQCSchemeNumber_Fst', title: 'é¦ä»¶æ£éªæ¹æ¡ä»£ç ', edit: 'text', event: "HQCSchemeNumber_Fst", width: 125 } |
| | | , { field: 'HQCSchemeName_Fst', title: 'é¦ä»¶æ£éªæ¹æ¡åç§°', width: 125 }//f7 |
| | | , { field: 'HQCSchemeID_Proc', title: 'è½¬åºæ£éªæ¹æ¡ID', hide: true }//f7 |
| | | , { field: 'HQCSchemeNumber_Proc', title: 'è½¬åºæ£éªæ¹æ¡ä»£ç ', edit: 'text', event: "HQCSchemeNumber_Proc", width: 125 } |
| | | , { field: 'HQCSchemeName_Proc', title: 'è½¬åºæ£éªæ¹æ¡åç§°', width: 125 }//f7 |
| | | , { 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: 'HPassRate', title: 'è¯ç', edit: 'text' }//é»è®¤ |
| | | //, { field: 'HProcID_S', title: '工段', edit: 'text' } |
| | |
| | | //, { field: 'HSubStdEmpQty', title: 'æ å人æ°', edit: 'text' } |
| | | //, { field: 'HSubCanUseSourceQty', title: '坿ä½è®¾å¤æ°', edit: 'text' } |
| | | //, { field: 'HFixPrice', title: 'ç产å®é¢', edit: 'text' }//é»è®¤ |
| | | //, { field: 'HProcPrice', title: 'å·¥åºå·¥ä»·', edit: 'text' }//é»è®¤ |
| | | , { field: 'HProcPrice', title: 'å·¥åºå·¥ä»·', edit: 'text' }//é»è®¤ |
| | | //, { field: 'HBadPrice', title: 'ä¸åæ ¼åä»·', edit: 'text' }//é»è®¤ |
| | | //, { field: 'HWasterPrice', title: 'æ¥åºåä»·', edit: 'text' }//é»è®¤ |
| | | //, { field: 'HStdFlag', title: 'æ åå®é¢', templet: "#HStdFlag" }//chenbox |
| | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //䏿é²éæ§å¶ |
| | | form.on('checkbox(HMaterToSourceCtrl)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HMaterToSourceCtrl = data.elem.checked;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //æ¯å¦é¦ä»¶ |
| | | form.on('checkbox(HQCFst)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HQCFst = data.elem.checked;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //æ¯å¦æ«æ£ |
| | | form.on('checkbox(HQCProc)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HQCProc = data.elem.checked;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | ///æ¯å¦å·¡æ£ |
| | | form.on('checkbox(HQCPatrol)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HQCPatrol = data.elem.checked;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //æäº§å·¥åºæ è®° |
| | | form.on('checkbox(HSortProcFlag)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | |
| | | , "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 |
| | | }; |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | |
| | | //SNè¿ç«æ§å¶ |
| | | if (option.data[i - 1].HSNCtrl) { |
| | | $('#HSNCtrl' + i + '').attr("checked", true); |
| | | } |
| | | //䏿é²éæ§å¶ |
| | | if (option.data[i - 1].HMaterToSourceCtrl) { |
| | | $('#HMaterToSourceCtrl' + i + '').attr("checked", true); |
| | | } |
| | | //æ¯å¦é¦ä»¶ |
| | | if (option.data[i - 1].HQCFst) { |
| | | $('#HQCFst' + i + '').attr("checked", true); |
| | | } |
| | | //æ¯å¦æ«æ£ |
| | | if (option.data[i - 1].HQCProc) { |
| | | $('#HQCProc' + i + '').attr("checked", true); |
| | | } |
| | | //æ¯å¦å·¡æ£ |
| | | if (option.data[i - 1].HQCPatrol) { |
| | | $('#HQCPatrol' + i + '').attr("checked", true); |
| | | } |
| | | //æäº§å·¥åºæ è®° |
| | | if (option.data[i - 1].HSortProcFlag) { |
| | |
| | | //SNè¿ç«æ§å¶ |
| | | if (option.data[i - 1].HSNCtrl) { |
| | | $('#HSNCtrl' + i + '').attr("checked", true); |
| | | } |
| | | //䏿é²éæ§å¶ |
| | | if (option.data[i - 1].HMaterToSourceCtrl) { |
| | | $('#HMaterToSourceCtrl' + i + '').attr("checked", true); |
| | | } |
| | | //æ¯å¦é¦ä»¶ |
| | | if (option.data[i - 1].HQCFst) { |
| | | $('#HQCFst' + i + '').attr("checked", true); |
| | | } |
| | | //æ¯å¦æ«æ£ |
| | | if (option.data[i - 1].HQCProc) { |
| | | $('#HQCProc' + i + '').attr("checked", true); |
| | | } |
| | | //æ¯å¦å·¡æ£ |
| | | if (option.data[i - 1].HQCPatrol) { |
| | | $('#HQCPatrol' + i + '').attr("checked", true); |
| | | } |
| | | //æäº§å·¥åºæ è®° |
| | | if (option.data[i - 1].HSortProcFlag) { |
| | |
| | | , "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 |
| | | }) |
| | | j++; |
| | | } |
| | |
| | | //ç¼è¾ 页é¢èµå¼ |
| | | function RoadBillMain(linterid)//å 载表头 |
| | | { |
| | | var sWhere = " and hmainid='" + linterid + "'"; |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/LEMS/MES_Gy_RoutingBillList_Json", |
| | | url: GetWEBURL() + "/Gy_RoutingBill/cx", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": HBillSubType }, |
| | | data: { "HInterID": linterid }, |
| | | success: function (d) { |
| | | |
| | | //alert(JSON.stringify(d.data[0])) |
| | | //return false; |
| | | |
| | | var IsHStopflag = d.data[0].é»è®¤å·¥èº; |
| | | if (IsHStopflag == 1) { |
| | | $("input[name='checkboxHStandard']").prop("checked", true); |
| | |
| | | else { |
| | | $("input[name='checkboxHStandard']").prop("checked", false); |
| | | } |
| | | |
| | | |
| | | //主表 |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HBillNo": OperationType == 2 ? "" : d.data[0].åæ®å· |
| | |
| | | , "HProductNum": d.data[0].æåç¼å· |
| | | , "HVerNum": d.data[0].çæ¬ |
| | | , "HOrgID": d.data[0].HOrgID |
| | | , "HProcPriceType": d.data[0].HProcPriceType == null ? "临æ¶å®é¢" : d.data[0].HProcPriceType |
| | | //å
¶ä»ä¿¡æ¯ |
| | | , "hmakers": d.data[0].å¶å人 |
| | | , "hmakedate": d.data[0].å¶åæ¥æ == null ? "" : Format(new Date(d.data[0].å¶åæ¥æ), "yyyy-MM-dd") |
| | |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | console.log(d.data) |
| | | for (var i = 0; i < d.data.length; i++) { |
| | | rowdata.push( |
| | | { |
| | |
| | | , "HQCSchemeID_Fst": d.data[i].HQCSchemeID_Fst, "HQCSchemeNumber_Fst": d.data[i].é¦ä»¶æ£éªæ¹æ¡ä»£ç , "HQCSchemeName_Fst": d.data[i].é¦ä»¶æ£éªæ¹æ¡ |
| | | , "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 |
| | | } |
| | | ) |
| | | } |
| | |
| | | if (d.data[i].SNè¿ç«æ§å¶) { |
| | | $('#HSNCtrl' + (i + 1)).attr("checked", true); |
| | | } |
| | | if (d.data[i].HQCFst) { |
| | | $('#HQCFst' + (i + 1)).attr("checked", true); |
| | | } |
| | | if (d.data[i].HQCProc) { |
| | | $('#HQCProc' + (i + 1)).attr("checked", true); |
| | | } |
| | | if (d.data[i].HQCPatrol) { |
| | | $('#HQCPatrol' + (i + 1)).attr("checked", true); |
| | | } |
| | | if (d.data[i].HMaterToSourceCtrl) { |
| | | $('#HMaterToSourceCtrl' + (i + 1)).attr("checked", true); |
| | | } |
| | | if (d.data[i].æäº§å·¥åºæ è®°) { |
| | | $('#HSortProcFlag' + (i + 1)).attr("checked", true); |
| | | } |