1
yusijie
2024-09-04 39b32178b123b032c6a4b466181461954cd9d9ee
WebTM/views/É豸¹ÜÀí/É豸¹¤ÒÕ²ÎÊý¶©µ¥µã¼ì±í/SB_EquipICMOTechParamBillEdit.html
@@ -592,11 +592,11 @@
                    , 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;' }
@@ -604,14 +604,14 @@
                        , { 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 = [{
@@ -1230,21 +1230,28 @@
                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 è¡Œå†…删除
@@ -1423,20 +1430,21 @@
                                    {
                                        "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]["采集来源"]
                                    }
                                );
                            }
@@ -1455,7 +1463,7 @@
                })
            }
            //#endregion
            //#region åŠŸèƒ½æŽ§ä»¶
            //#region æäº¤