1
duhe
2024-08-15 40cd70d9a9d13001c1b6c2269334e8a363c562c3
WebTM/views/É豸¹ÜÀí/É豸¹¤ÒÕ²ÎÊý¶©µ¥µã¼ì±í/SB_EquipICMOTechParamBillEdit.html
@@ -328,7 +328,33 @@
    </script>
    <script>
        //获取参数
        var OptionData = [];
        var HBillType = "";  //单据类型
        var HSourceInterID = ""; //源单主内码
        var HSourceEntryID = "";  //源单子内码
        var HSourceBillNo = "";   //源单单号
        var HSourceBillType = "";  //源单类型
        var refSav = "";   //提交类型
        //获取页面跳转参数  //单据编辑状态: 1.无源单新增  Â 2.有源单新增  Â 3.编辑  4.浏览  5.变更
        var params = get_UrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var HInterID = params[params[1]];//单据内码
            var HEntry = params[params[2]];//单据子内码
        }
        var edit = function (data) {
            HSourceInterID = data[0].HSourceInterID;
            HSourceEntryID = data[0].HSourceEntryID;
            HSourceBillNo = data[0].HSourceBillNo;
            HSourceBillType = data[0].HSourceBillType;
        }
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
@@ -346,10 +372,7 @@
            var HMaker = sessionStorage["HUserName"]
            var HStockOrgID = sessionStorage["OrganizationID"]  //组织ID
            var option = {};
            var params = get_UrlVars();
            var OperationType = params[params[0]] == null ? 1 : params[params[0]];  //操作类型(1新增、2编辑)
            var HInterID = params[params[0]] == null ? 0 : params[params[1]];       //单据内码
            var HEntry = params[params[0]] == null ? 0 : params[params[2]];       //单据子内码
            //#endregion
            //判断是否登录 æœªç™»å½•则跳到登录页
@@ -418,7 +441,13 @@
                $("#HMaker").val(HMaker);
                $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                //工序流转卡页面下推
                set_ProcessBill(HInterID, HEntry);
                if (HInterID == "") {    //报工台下推
                    set_ProcessBill(HSourceInterID, HSourceEntryID);
                } else {
                    set_ProcessBill(HInterID, HEntry);
                }
                OperationType = 1;
            } 
            else {
                layer.alert("未知操作类型!", { icon: 5 });
@@ -555,29 +584,42 @@
                    , 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: '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: 'HSNO', title: '工艺次序', width: 110, 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: '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 = [{
                    "HTechParamID": "0"
                    "HTechParamClassID": "0"
                    , "HTechParamClassName": ""
                    , "HTechParamID": "0"
                    , "HTechParamNumber": ""
                    , "HTechParamName": ""
                    ,"HSNO":"0"
                    , "HTechParamUnitID": "0"
                    , "HTechParamUnitNumber": ""
                    , "HTechParamUnitName": ""
                    , "HTechParamIDStd": "0"
                    , "HTechParamIDStdName": ""
                    ,"HResultStd":""
                    , "HVaule": ""
                    , "HStd": ""
                    , "HMax": ""
@@ -891,12 +933,18 @@
                    , data = checkStatus.data;
                //新增行表格数据
                var NewRow = {
                    "HTechParamID": "0"
                    "HTechParamClassID": "0"
                    , "HTechParamClassName": ""
                    , "HTechParamID": "0"
                    , "HTechParamNumber": ""
                    , "HTechParamName": ""
                    , "HSNO": "0"
                    , "HTechParamUnitID": "0"
                    , "HTechParamUnitNumber": ""
                    , "HTechParamUnitName": ""
                    , "HTechParamIDStd": "0"
                    , "HTechParamIDStdName": ""
                    , "HResultStd": ""
                    , "HVaule": ""
                    , "HStd": ""
                    , "HMax": ""
@@ -1315,14 +1363,14 @@
            //#endregion
            //#region (工序流转卡)下推页面初始化
            function set_ProcessBill(HInterID, HEntry) {
            function set_ProcessBill(HSourceInterID, HSourceEntryID) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + "/LEMS/MES_IF_EquipICMOTechParamList_Json",
                    type: "GET",
                    async: false,
                    data: { "hinterid": HInterID, "HEntryID": HEntry, "user": sessionStorage["HUserName"] },
                    data: { "hinterid": HSourceInterID, "HEntryID": HSourceEntryID, "user": sessionStorage["HUserName"] },
                    success: function (d) {
                        var result = d;
@@ -1362,12 +1410,18 @@
                            for (var i = 0; i < result.data.length; i++) {
                                rowdata.push(
                                    {
                                        "HTechParamClassID": result.data[i]["HTechParamClassID"],
                                        "HTechParamClassName": result.data[i]["工艺参数大类名称"],
                                        "HTechParamID": result.data[i]["HTechParamID"],
                                        "HTechParamNumber": result.data[i]["工艺参数代码"],
                                        "HTechParamName": result.data[i]["工艺参数名称"],
                                        "HTechParamUnitID": result.data[i]["HTechParamUnitID"],
                                        "HTechParamUnitNumber": result.data[i]["工艺参数单位代码"],
                                        "HTechParamUnitName": result.data[i]["工艺参数单位名称"],
                                        "HSNO": result.data[i]["工艺次序"],
                                        "HTechParamIDStd": result.data[i]["HTechParamIDStd"],
                                        "HTechParamIDStdName": result.data[i]["对应设定值工艺参数"],
                                        "HResultStd": "",
                                        "HVaule": "",
                                        "HStd": result.data[i]["标准值"],
                                        "HMax": result.data[i]["上限值"],
@@ -1457,7 +1511,7 @@
                layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                    //操作类型(OperationType=1新增、OperationType=2编辑)
                    if (OperationType == 2) {
                        Pub_Close(1);
                        Pub_Close(2);
                    }
                    else {
                        Pub_Close(2);