| | |
| | | .layui-form-label { |
| | | width: 85px; |
| | | } |
| | | |
| | | .layui-input-block { |
| | | margin-left: 123px; |
| | | min-height: 36px; |
| | | } |
| | | |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | .layui-table-cell { |
| | | overflow: visible !important; |
| | | } |
| | | |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <script type="text/html" id="HStdMaintainResult"> |
| | | <select name="HStdMaintainResult" value="OK" lay-filter="HStdMaintainResult" id="HStdMaintainResult{{d.LAY_TABLE_INDEX+1}}" data-index="{{d.LAY_TABLE_INDEX+1}}"> |
| | | <!--<option value="">è¯·éæ©</option>--> |
| | | <option value="OK" selected>OK</option> |
| | | <option value="NG">NG</option> |
| | | </select> |
| | | </script> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | |
| | | var option1 = [];//é
ä»¶ |
| | | var HModName = "Sb_EquipMaintainRuleListSub1"; |
| | | var HModName1 = "Sb_EquipMaintainRuleListSub2"; |
| | | var unEditable = ["HMaintainItem", "HManagerName"] |
| | | var unEditable = ["HMaintainItem", "HManagerName", 'HStdMaintainResult'] |
| | | var unEditable1 = ["HMaterName", "HUnitNumber", "HUnitName"] |
| | | var sBillType = "3912"; |
| | | //#endregion |
| | |
| | | }); |
| | | }); |
| | | |
| | | //è¡éæ©å¤çï¼é»è®¤ä¿å
»ç»æï¼ |
| | | form.on('select(HStdMaintainResult)', 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.HStdMaintainResult = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | table.render(option) |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HStdMaintainResult' + i + '').val(option.data[i-1]['HStdMaintainResult']); |
| | | } |
| | | form.render('select'); |
| | | }); |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | |
| | |
| | | , { field: 'HMaintainItemNumber', title: 'ä¿å
»é¡¹ç®ä»£ç ', edit: 'text', event: 'HMaintainItemNumber' } |
| | | , { field: 'HMaintainItem', title: 'ä¿å
»é¡¹ç®', edit: 'text' } |
| | | , { field: 'HMaintainPart', title: 'ä¿å
»é¨ä½', edit: 'text' } |
| | | , { field: 'HStdMaintainResult', title: "ä¿å
ȍȾ", templet: '#HStdMaintainResult', event: 'HStdMaintainResult' } |
| | | , { field: 'HClaim', title: 'å
·ä½è¦æ±', edit: 'text' } |
| | | , { field: 'HManagerID', title: 'è´è´£äººID', edit: 'text', hide: true } |
| | | , { field: 'HManagerNumber', title: 'è´è´£äººä»£ç ', edit: 'text', event: 'HManagerNumber' } |
| | |
| | | function set_AddFNew() { |
| | | //è·åæå¤§åæ®å· |
| | | get_MAXNum(); |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": sessionStorage["HEmpID"], "HManagerNumber": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": " " }]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": sessionStorage["HEmpID"], "HManagerNumber": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": " ","HStdMaintainResult": "OK" }]; |
| | | option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "" }]; |
| | | table.render(option); |
| | | table.render(option1); |
| | |
| | | function set_EditFromGrid(linterid) { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | set_EditGrid(linterid); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }]; |
| | | option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " ","HStdMaintainResult": "OK" }]; |
| | | table.render(option); |
| | | option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HRemark": "" }]; |
| | | table.render(option1); |
| | |
| | | option.data = result.list[0]; |
| | | DisPlay_HideColumnEdit(HModName, sessionStorage["HUserName"], option, table); |
| | | setUneditableCol_WithUneditable(option, unEditable, []) |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (!option.data[i]['HStdMaintainResult']) { |
| | | option.data[i]['HStdMaintainResult'] = 'OK' |
| | | } |
| | | |
| | | } |
| | | table.render(option); |
| | | option1.data = result.list[1]; |
| | | DisPlay_HideColumnEdit(HModName1, sessionStorage["HUserName"], option1, table); |
| | | setUneditableCol_WithUneditable(option1, unEditable1, []) |
| | | table.render(option1); |
| | | |
| | | for (i = 1; i <= option.data.length; i++) { |
| | | console.log($('#HStdMaintainResult' + i+1 + '')) |
| | | $('#HStdMaintainResult' + i + '').val(option.data[i-1]['HStdMaintainResult']) |
| | | } |
| | | form.render('select'); |
| | | |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | for (i = 1; i <= buttonArr.length; i++) { |
| | | console.log($('#HStdMaintainResult' + i + 1 + '')) |
| | | $('#HStdMaintainResult' + i + '').val(buttonArr[i - 1]['HStdMaintainResult']) |
| | | } |
| | | form.render('select'); |
| | | } |
| | | //å¢å ä¸è¡ |
| | | function btnAddLine1(NewRow) { |
| | |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | for (i = 1; i <= option.data.length; i++) { |
| | | console.log($('#HStdMaintainResult' + i + 1 + '')) |
| | | $('#HStdMaintainResult' + i + '').val(option.data[i - 1]['HStdMaintainResult']) |
| | | } |
| | | form.render('select'); |
| | | } |
| | | } |
| | | //å¤å¶ä¸è¡ |