| | |
| | | , cols: [[ |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', width: 100 } |
| | | , { field: 'HTechParamClassID', title: 'å·¥èºåæ°å¤§ç±»', width: 100 ,hide: true,} |
| | | , { field: 'HTechParamClassName', title: 'å·¥èºåæ°åç§°', width: 120, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTechParamClassID', title: 'å·¥èºåæ°å¤§ç±»', width: 100, hide: true, } |
| | | , { field: 'HTechParamClassName', title: 'å·¥èºåæ°å¤§ç±»åç§°', width: 120, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTechParamID', title: 'HTechParamID', width: 100, hide: true, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTechParamNumber', title: 'å·¥èºåæ°ä»£ç ', width: 110, edit: 'text', event: "HTechParamNumber" } //F7 |
| | | , { field: 'HTechParamName', title: 'å·¥èºåæ°åç§°', width: 110, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTechParamName', title: 'å·¥èºåæ°åç§°', width: 110, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTechParamUnitID', title: 'HTechParamUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTechParamUnitNumber', title: 'å·¥èºåæ°åä½ä»£ç ', width: 130, edit: 'text', event: "HTechParamUnitNumber" } //F7 |
| | | , { field: 'HTechParamUnitName', title: 'å·¥èºåæ°åä½åç§°', width: 130, style: 'background-color:#efefef4d;' } |
| | |
| | | , { field: 'HTechParamIDStd', title: 'HTechParamIDStd', width: 100, hide: true, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HTechParamIDStdName', title: '设å¤è®¾å®å¼å·¥èºåæ°', width: 130, edit: 'text', event: "HTechParamIDStdName" } |
| | | , { field: 'HResultStd', title: '设å¤è®¾å®å¼', width: 130, edit: 'text' } |
| | | , { field: 'HVaule', title: 'å·¥èºåæ°å¼', width: 100, edit: 'text' } |
| | | , { field: 'HVaule', title: 'å·¥èºåæ°å¼', width: 100, edit: 'text', event: "HVaule" } |
| | | , { field: 'HStd', title: 'æ åå¼', width: 100, edit: 'text' } |
| | | , { field: 'HMax', title: 'ä¸é', width: 100, edit: 'text' } |
| | | , { field: 'HMin', title: 'ä¸é', width: 100, edit: 'text' } |
| | | , { field: 'HResult', title: 'æ£æµç»æ', width: 100, templet: "#HResult" } |
| | | , { field: 'HResult', title: 'æ£æµç»æ', width: 100, templet: "#HResult" } |
| | | , { field: 'HRemark', title: '夿³¨', width: 100, edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 70 } |
| | | ]] |
| | | ]] |
| | | } |
| | | |
| | | var rowdata = [{ |
| | |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | |
| | | var data = obj.data; |
| | | if (obj.event == 'HDate') { |
| | | var data = obj.data; |
| | | if (obj.event == 'HVaule') { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , closeStop: this |
| | | , done: function (nowDate) { |
| | | //æ¶é´éæ©å®æï¼è¡æ°æ®æ´æ° |
| | | data[field] = nowDate; |
| | | obj.update(data); |
| | | } |
| | | }); |
| | | var row = obj.data; // è·åå½åè¡æ°æ® |
| | | if (row['HRemark'] === '设å¤éé') { |
| | | layer.msg('æ¤åå
æ ¼çå¼ä¸ºâ设å¤ééâ,æ æ³ç¼è¾'); // æç¤ºä¿¡æ¯ |
| | | } else { |
| | | // å
许ç¼è¾åå
æ ¼ |
| | | $(this).attr('contenteditable', 'true'); // 使åå
æ ¼å¯ç¼è¾ |
| | | $(this).focus(); // èç¦å°ç¼è¾çåå
æ ¼ |
| | | } |
| | | } |
| | | }); |
| | | // çå¬åå
æ ¼ç¼è¾ç»æäºä»¶ |
| | | $(document).on('blur', '[contenteditable]', function () { |
| | | var newValue = $(this).text(); // è·åæ°å¼ |
| | | var field = $(this).data('field'); |
| | | var row = obj.data; // è·åå½åè¡æ°æ® |
| | | row[field] = newValue; // æ´æ°æ°æ® |
| | | obj.update(row); // æ´æ°è¡æ°æ® |
| | | $(this).removeAttr('contenteditable'); // åæ¶ç¼è¾ç¶æ |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region è¡å
å é¤ |
| | |
| | | { |
| | | "HTechParamClassID": result.data[i]["HTechParamClassID"] == null ? 0 : result.data[i]["HTechParamClassID"], |
| | | "HTechParamClassName": result.data[i]["å·¥èºåæ°å¤§ç±»åç§°"], |
| | | "HTechParamID": result.data[i]["HTechParamID"] == null ? 0 : result.data[i]["HTechParamClassID"], |
| | | "HTechParamID": result.data[i]["HTechParamID"] == null ? 0 : result.data[i]["HTechParamID"], |
| | | "HTechParamNumber": result.data[i]["å·¥èºåæ°ä»£ç "], |
| | | "HTechParamName": result.data[i]["å·¥èºåæ°åç§°"], |
| | | "HTechParamUnitID": result.data[i]["HTechParamUnitID"] == null ? 0 : result.data[i]["HTechParamClassID"], |
| | | "HTechParamUnitID": result.data[i]["HTechParamUnitID"] == null ? 0 : result.data[i]["HTechParamUnitID"], |
| | | "HTechParamUnitNumber": result.data[i]["å·¥èºåæ°åä½ä»£ç "], |
| | | "HTechParamUnitName": result.data[i]["å·¥èºåæ°åä½åç§°"] , |
| | | "HSNO": result.data[i]["å·¥èºæ¬¡åº"] == null ? 0 : result.data[i]["HTechParamClassID"], |
| | | "HTechParamIDStd": result.data[i]["HTechParamIDStd"] == null ? 0 : result.data[i]["HTechParamClassID"], |
| | | "HSNO": result.data[i]["å·¥èºæ¬¡åº"] == null ? 0 : result.data[i]["å·¥èºæ¬¡åº"], |
| | | "HTechParamIDStd": result.data[i]["HTechParamIDStd"] == null ? 0 : result.data[i]["HTechParamIDStd"], |
| | | "HTechParamIDStdName": result.data[i]["对åºè®¾å®å¼å·¥èºåæ°"], |
| | | "HResultStd": "", |
| | | "HVaule": result.data[i]["æ°éå¼"], |
| | | "HStd": result.data[i]["æ åå¼"], |
| | | "HMax": result.data[i]["ä¸éå¼"], |
| | | "HMin": result.data[i]["ä¸éå¼"], |
| | | "HRemark": result.data[i]["é鿥æº"] |
| | | } |
| | | ); |
| | | } |
| | |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region åè½æ§ä»¶ |
| | | |
| | | //#region æäº¤ |