| | |
| | | .layui-form-label { |
| | | width: 25%; |
| | | } |
| | | /*æç»è¡å¤éæ¡å±
ä¸*/ |
| | | .layui-table-cell .layui-form-checkbox[lay-skin="primary"] { |
| | | margin-left: 35%; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <!--è¡ä¸æéæ©(ä¿å
ȍȾ)--> |
| | | <script type="text/html" id="HDotCheckResult"> |
| | | <!--<script type="text/html" id="HDotCheckResult"> |
| | | <select name="HDotCheckResult" lay-filter="HDotCheckResult" id="HDotCheckResult{{d.LAY_TABLE_INDEX+1}}" style="height:30px;"> |
| | | <option value="OK">OK</option> |
| | | <option value="NG">NG</option> |
| | | </select> |
| | | </script>--> |
| | | <!--å¤éæ¡ï¼ä¿å
»ç»æï¼--> |
| | | <script type="text/html" id="HMaintainResult"> |
| | | <input type="checkbox" value="{{d.HMaintainResult}}" lay-skin="primary" id="HMaintainResult{{d.LAY_TABLE_INDEX+1}}" lay-filter="HMaintainResult" {{ d.HMaintainResult == 1 ? 'checked' : '' }}> |
| | | </script> |
| | | <script> |
| | | layui.config({ |
| | |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | var NewRow = { "HMaintainResult": "OK", "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "" }; |
| | | var NewRow = { "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "" }; |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | |
| | | }); |
| | | |
| | | //è¡éæ©å¤çï¼æ£éªç»æï¼ |
| | | form.on('select(HDotCheckResult)', function (data) { |
| | | //form.on('select(HDotCheckResult)', 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.HDotCheckResult = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | // } |
| | | // }); |
| | | //}); |
| | | |
| | | //æ¯å¦åæ ¼ |
| | | form.on('checkbox(HMaintainResult)', 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.HDotCheckResult = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | value.HMaintainResult = data.elem.checked;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | |
| | | // æ¸
空表å ï¼âformDataâæ¯è¡¨åçidï¼ |
| | | $("#formData")[0].reset(); |
| | | layui.form.render(); |
| | | option.data = [{ "HMaintainResult": "OK", "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "" }]; |
| | | option.data = [{ "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "" }]; |
| | | table.render(option); |
| | | |
| | | $("#HBarCode").focus(); |
| | |
| | | columns = [ |
| | | { type: 'checkbox' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, event: "qwe", width: 80 } |
| | | , { field: 'HMaintainResult', title: 'ä¿å
ȍȾ', templet: '#HDotCheckResult' } |
| | | , { field: 'HMaintainResult', title: 'ä¿å
ȍȾ', templet: '#HMaintainResult' } |
| | | , { field: 'HMaintainItemID', title: 'ä¿å
»é¡¹ç®ID', edit: 'text', hide: true } |
| | | , { field: 'HMaintainNumber', title: 'ä¿å
»é¡¹ç®ä»£ç ', edit: 'text', event: "HDotCheckCode", width: 115, hide: true} |
| | | , { field: 'HMaintainNumber', title: 'ä¿å
»é¡¹ç®ä»£ç ', edit: 'text', event: "HDotCheckCode", width: 115, hide: true } |
| | | , { field: 'HMaintainItem', title: 'ä¿å
»é¡¹ç®', edit: 'text', event: "" } |
| | | , { field: 'HMaintainPart', title: 'ä¿å
»é¨ä½', edit: 'text', event: "" } |
| | | , { field: 'HClaim', title: 'å
·ä½è¦æ±', edit: 'text' } |
| | | , { field: 'HManagerID', title: 'è´è´£äººä»£ç ', edit: 'text', hide: true } |
| | | , { field: 'HManagerNumber', title: 'è´è´£äººä»£ç ', edit: 'text', event: 'HManagerCode', width: 150, hide: true} |
| | | , { field: 'HManagerNumber', title: 'è´è´£äººä»£ç ', edit: 'text', event: 'HManagerCode', width: 150, hide: true } |
| | | , { field: 'HManagerName', title: 'è´è´£äººåç§°', edit: 'text' } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text' } |
| | | , { title: 'æä½', toolbar: '#barDemo', width: 80 } |
| | |
| | | } |
| | | }; |
| | | |
| | | option.data = [{ "HMaintainResult": "OK", "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "" ,"HRemark":""}]; |
| | | option.data = [{ "HMaintainResult": false, "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": 0, "HManagerNumber": "", "HManagerName": "", "HRemark": "" }]; |
| | | table.render(option); |
| | | } |
| | | //å¢å ä¸è¡ |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetItemByEquipFile", |
| | | type: "GET", |
| | | data: { "EquipProjectID": $("#HEquipID").val(),"Type":"BY" }, |
| | | data: { "EquipProjectID": $("#HEquipID").val(), "Type": "BY" }, |
| | | success: function (result) { |
| | | var data = result.data; |
| | | $("#HEquipMaintainRuleInterID").val(data[0].ä¿å
»è§ç¨ID); |
| | |
| | | for (let i = 0; i < data.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | "HMaintainResult": "OK", "HMaintainItemID": data[i].ä¿å
»é¡¹ç®ID, "HMaintainNumber": data[i].ä¿å
»é¡¹ç®ä»£ç , "HMaintainItem": data[i].ä¿å
»é¡¹ç®åç§°, |
| | | "HMaintainResult": data[i].é»è®¤ç»è®º, "HMaintainItemID": data[i].ä¿å
»é¡¹ç®ID, "HMaintainNumber": data[i].ä¿å
»é¡¹ç®ä»£ç , "HMaintainItem": data[i].ä¿å
»é¡¹ç®åç§°, |
| | | "HMaintainPart": data[i].ä¿å
»é¨ä½, "HClaim": data[i].å
·ä½è¦æ±, "HManagerID": data[i].è´è´£äººID, "HManagerNumber": data[i].è´è´£äººä»£ç , |
| | | "HManagerName": data[i].è´è´£äººåç§°,"HRemark":"" |
| | | "HManagerName": data[i].è´è´£äººåç§°, "HRemark": "" |
| | | } |
| | | ); |
| | | } |
| | | |
| | | |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } |