1
duhe
2024-08-15 40cd70d9a9d13001c1b6c2269334e8a363c562c3
WebTM/views/¼Æ»®¹ÜÀí/¹¤ÒÕ·Ïß/Gy_MaterialTechParamBillMain.html
@@ -570,6 +570,10 @@
                    "HDataForm": "设备采集",
                    "HDataUnit": "秒",
                    "HDataTimes": "0",
                    "HTechParamClassID": "0",
                    "HSNO": "0",
                    "HStdNextTimes": "0",
                    "HTechParamIDStd":"0",
                    "HSourceBillNo": "0",
                    "HSourceBillType": "0",
                    "HSourceEntryID": "0",
@@ -661,10 +665,39 @@
                        , { field: 'HDataForm', title: '采集来源', templet: '#HDataForm-select' }
                        , { field: 'HDataUnit', title: '采集时间单位', templet: '#HDataUnit-select' }
                        , { field: 'HDataTimes', title: '采集周期频率', edit: 'text', totalRow: true }
                        , { field: 'HTechParamClassID', title: '工艺参数大类', hide: true }
                        , { field: 'HTechParamClassName', title: '工艺参数大类名称', edit: 'text', event: "HTechParamClassName" }     //f7
                        , { field: 'HSNO', title: '工艺次序', edit: 'text', totalRow: true }
                        , { field: 'HStdNextTimes', title: '理论次序间隔', edit: 'text', totalRow: true }
                        , { field: 'HTechParamIDStd', title: '对应设定值工艺参数', hide: true }
                        , { field: 'HTechParamIDStdName', title: '对应设定值工艺参数值', edit: 'text', event: "HTechParamIDStdName  " }     //f7
                        , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                    ]]
                }
                option.data = [];
                var rowdata = [
                    {
                        "HTechParamID": 0,
                        "HTechParamNumber": "",
                        "HTechParamName": "",
                        "HTechParamUnitID": 0,
                        "HTechParamUnitName": "",
                        "HStd": "0",
                        "HMax": "0",
                        "HMin": "0",
                        "HDataForm": "设备采集",
                        "HDataUnit": "秒",
                        "HDataTimes": "0",
                        "HTechParamClassID": "0",
                        "HSNO": "0",
                        "HStdNextTimes": "0",
                        "HTechParamIDStd": "0",
                        "HSourceBillNo": "0",
                        "HSourceBillType": "0",
                        "HSourceEntryID": "0",
                        "HSourceInterID": "0"
                    }
                ];
                option.data = rowdata;
                table.render(option);
            }
@@ -929,7 +962,8 @@
                                        return layer.msg('请选择数据');
                                    }
                                    table.cache["mainTable"].splice(0, 1);
                                   // table.cache["mainTable"].splice(0, 1);
                                    table.cache["mainTable"] = table.cache["mainTable"].filter(row => row.HTechParamID !== 0 && row.HTechParamID !== undefined);
                                    for (var rowData of checkStatus.data) {
                                        var NewRow = {
                                            "HTechParamID": rowData.HItemID,
@@ -943,6 +977,10 @@
                                            "HDataForm": "手工录入",
                                            "HDataUnit": "秒",
                                            "HDataTimes": "0",
                                            "HTechParamClassID": "0",
                                            "HSNO": "0",
                                            "HStdNextTimes": "0",
                                            "HTechParamIDStd": "0",
                                            "HSourceBillNo": "0",
                                            "HSourceBillType": "0",
                                            "HSourceEntryID": "0",
@@ -1025,6 +1063,85 @@
                                }
                            });
                        }
                        //工艺参数大类
                        if (obj.event == "HTechParamClassName") {
                            //打开工艺参数大类小窗体
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '工艺参数大类',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../../views/基础资料/公用基础资料/Gy_TechnologyParameterClass.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    obj.update({
                                        "HTechParamClassID": checkStatus.data[0].HItemID,
                                        "HTechParamClassName": checkStatus.data[0].工艺参数大类名称,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , end: function () {
                                    //if (OptionData.length > 0) {
                                    //    //更新表格缓存的数据
                                    //    obj.update({
                                    //        "HTechParamClassID": OptionData[0].HItemID,
                                    //        "HTechParamClassName": OptionData[0].工艺参数大类名称,
                                    //    });
                                    //    OptionData = [];
                                    //}
                                }
                            });
                        }
                        //对应设定值工艺参数
                        if (obj.event == "HTechParamIDStdName") {
                            //打开对应设定值工艺参数(小窗体
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '对应设定值工艺参数列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../../views/基础资料/公用基础资料/Gy_TechnologyParameter.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    obj.update({
                                        "HTechParamIDStd": checkStatus.data[0].HItemID,
                                        "HTechParamIDStdName": checkStatus.data[0].对应设定值工艺参数名称,
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , end: function () {
                                    //if (OptionData.length > 0) {
                                    //    //更新表格缓存的数据
                                    //    obj.update({
                                    //        "HTechParamIDStd": OptionData[0].HItemID,
                                    //        "HTechParamIDStdName": OptionData[0].对应设定值工艺参数名称,
                                    //    });
                                    //    OptionData = [];
                                    //}
                                }
                            });
                        }
                        obj.event = "";
                        return false;
                    }