| | |
| | | <option value="æ¶æ¯">æ¶æ¯</option> |
| | | <option value="åæ¶æ¥æ¶">åæ¶æ¥æ¶</option> |
| | | </select> |
| | | </script> |
| | | </script> |
| | | |
| | | <!--å¤éæ¡ å®ææ è®°--> |
| | | <script type="text/html" id="HIsRece"> |
| | | <div class="layui-input-block" style="margin-left: 20px;"> |
| | | <input type="checkbox" name="HIsRece" lay-filter="HIsRece" id="HIsRece{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> |
| | | </div> |
| | | </script> |
| | | |
| | | <script> |
| | | |
| | |
| | | , "HDutyNumber": "" |
| | | , "HDutyName": "" |
| | | , "HTimes": "" |
| | | ,"HReceiveType":"" |
| | | , "HIsRece": false |
| | | , "HRemark": "" |
| | | , "HReceiveType": "" |
| | | , "HSourceInterID": "0" |
| | |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | CheckedSet_tableSub(); |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HReceiveType' + i + '').find("option[value='" + option.data[i - 1].HReceiveType + "']").attr("selected", true); |
| | | |
| | | $('#HReceiveType' + i + '').find("option[value='" + option.data[i - 1].HReceiveType + "']").attr("selected", true); |
| | | } |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | //宿æ è®° |
| | | if (option.data[i - 1].HIsRece) { |
| | | $('#HIsRece' + i + '').attr("checked", true); |
| | | } |
| | | } |
| | | |
| | | form.render('select'); |
| | | form.render('checkbox'); |
| | | break; |
| | | case 'btn-CopyLine': |
| | | var copydata = JSON.stringify(data); |
| | |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | CheckedSet_tableSub(); |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HReceiveType' + i + '').find("option[value='" + option.data[i - 1].HReceiveType + "']").attr("selected", true); |
| | | |
| | | } |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | //宿æ è®° |
| | | if (option.data[i - 1].HIsRece) { |
| | | $('#HIsRece' + i + '').attr("checked", true); |
| | | } |
| | | } |
| | | |
| | | form.render('select'); |
| | | form.render('checkbox'); |
| | | } |
| | | break; |
| | | //ä¸ä¸è¡ |
| | |
| | | , { field: 'HDutyName', title: 'èå¡åç§°', edit: 'text', event: "HDutyName", style: 'background-color: #f9f9f9;' } //f7 |
| | | , { field: 'HTimes', title: 'è§¦åæ¶é´', edit: 'text', style: 'background-color: #f9f9f9;', } |
| | | , { field: 'HReceiveType', title: 'æ¥æ¶æ¨¡å¼', style: 'background-color: #f9f9f9;', templet: '#HReceiveType' } |
| | | |
| | | , { field: 'HIsRece', title: '宿æ è®°', templet: "#HIsRece" }//checkbox |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text' } |
| | | , { field: 'HSourceInterID', title: 'æºåå
ç ', hide: true, style: 'background-color: #f9f9f9;' } //f7 |
| | | , { field: 'HSourceEntryID', title: 'æºååå
ç ', hide: true, style: 'background-color: #f9f9f9;' } //f7 |
| | |
| | | , "HDutyName": "" |
| | | , "HTimes": "" |
| | | , "HRemark": "" |
| | | , "HReceiveType": "çä¿¡" |
| | | , "HReceiveType": "çä¿¡" |
| | | , "HIsRece": false |
| | | , "HSourceInterID": "0" |
| | | , "HSourceEntryID": "0" |
| | | , "HSourceBillNo": "" |
| | |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HReceiveType = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region 宿æ è®° |
| | | form.on('checkbox(HIsRece)', 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.HIsRece = data.elem.checked;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | |
| | | { |
| | | "HSNO": tableSub[i].æµç¨å·, "HDutyID": tableSub[i].HDutyID, "HDutyNumber": tableSub[i].èå¡ç¼ç , |
| | | "HDutyName": tableSub[i].èå¡, "HTimes": tableSub[i].è§¦åæ¶é´, "HRemark": tableSub[i].夿³¨, |
| | | "HReceiveType": tableSub[i].æ¥æ¶æ¨¡å¼ |
| | | "HReceiveType": tableSub[i].æ¥æ¶æ¨¡å¼, "HIsRece": tableSub[i].æ¯å¦åé |
| | | } |
| | | ) |
| | | } |
| | |
| | | table.render(option); |
| | | for (var i = 0; i < rowdata.length; i++) { |
| | | $('#HReceiveType' + (i + 1)).find("option[value='" + tableSub[i].æ¥æ¶æ¨¡å¼ + "']").attr("selected", true); |
| | | $('#HIsRece' + (i + 1)).attr("checked", true); |
| | | } |
| | | form.render('select'); |
| | | form.render('checkbox'); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region å®¡æ ¸ |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å·æ°è®¾ç½®å¤éæ¡ç¶æ |
| | | function CheckedSet_tableSub() { |
| | | var tableSub = option.data; |
| | | //对å表ä¸çå¤éæ¡è¿è¡éä¸ |
| | | for (var i = 0; i < tableSub.length; i++) { |
| | | if (tableSub[i].HIsRece) { |
| | | $('#HIsRece' + (i + 1)).attr("checked", true); |
| | | } |
| | | } |
| | | form.render('checkbox'); |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region éèå设置 |
| | | function get_HideColumn() { |
| | |
| | | $("#HReceiveDeptName").val(obj[0].é¨é¨åç§°); |
| | | $("#HReceiveDeptID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | |
| | | } |
| | | //å¼å¸¸å¼å«ç±»å |
| | | function GetErrMsgBackTypeValue(obj) { |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æç»æ°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HRejectQty" id="HRejectQty" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HRejectQty" id="HRejectQty" value="0" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline"> |
| | |
| | | "HQCCheckItemID": "", "æ£éªé¡¹ç®": "", "HInspectInstruMentID": "0", "æ£éªä»ªå¨": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "", |
| | | "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false, "HStatus": 0, "HSampleSchemeID": 0, "HUnitID": 0, |
| | | "HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '0', |
| | | "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "0", "HInspectionLevel": "", "HRejectQty": "", |
| | | "HStrictness": "", "HSampleUnRightQty": "", "HAQL": "", "HSamplingType": "" |
| | | "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "0", "HInspectionLevel": "", "HRejectQty": "0", |
| | | "HStrictness": "", "HSampleUnRightQty": "0", "HAQL": "", "HSamplingType": "" |
| | | }; |
| | | |
| | | switch (obj.event) { |
| | |
| | | "HQCCheckItemID": "", "æ£éªé¡¹ç®": "", "HInspectInstruMentID": "0", "æ£éªä»ªå¨": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "", |
| | | "HMax": "", "HMin": "", "HAvg": "", "HRemark": "", "HKeyInspect": false, "HStatus": 0, "HSampleSchemeID": 0, "HUnitID": 0, |
| | | "HInspectVal": '', "HTargetVal": '', "HUpLimit": '', "HDownLimit": '', "HUpOffSet": '', "HDownOffSet": '', "HSampleDamageQty": '0', |
| | | "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "0", "HInspectionLevel": "", "HRejectQty": "", |
| | | "HSampleSchemeName": "", "HSampleQty": "0", "HSampleDamageQty": "0", "HAcceptQty": "0", "HInspectionLevel": "", "HRejectQty": "0", |
| | | "HStrictness": "", "HSampleUnRightQty": "0", "HAQL": "", "HSamplingType": "" |
| | | }]; |
| | | option = { |
| | |
| | | $("#HSampleQty2").val("") |
| | | $("#HAcceptQty").val("0") |
| | | $("#HInspectionLevel").val("") |
| | | $("#HRejectQty").val("") |
| | | $("#HRejectQty").val("0") |
| | | $("#HStrictness").val("") |
| | | $("#HSampleUnRightQty").val("") |
| | | $("#HSampleUnRightQty2").val("") |
| | | $("#HSampleUnRightQty").val("0") |
| | | $("#HSampleUnRightQty2").val("0") |
| | | $("#HAQL").val("") |
| | | $("#HSamplingType").val("") |
| | | $("#HSampleQty").val("0") |
| | | $("#HInspectResultToSee").val("") |
| | | $("#HInspectResultToSee2").val("") |
| | | $("#HSampleUnRightQty").val("") |
| | | $("#HSampleUnRightQty").val("0") |
| | | $("#HUnitID").val("0") |
| | | $("#HUnitName").val("") |
| | | $("#HInspectValB").val("0") |