wtt
2025-10-31 2c4e339508f78a215518a8a12af34ca0b1564d44
WebTM/views/»ù´¡×ÊÁÏ/Éú²ú»ù´¡×ÊÁÏ/Gy_Process.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>工序设置</title>
    <title>工序列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -15,6 +15,7 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
</head>
<body>
    <div class="layui-fluid">
@@ -86,7 +87,7 @@
                                            <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
                                        </div>
                                    </div>
                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
                                    <div class="layui-row" style=" margin-top: 10px;">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">过滤</label>
                                            <div class="layui-input-block">
@@ -114,7 +115,7 @@
                                        </div>
                                    </div>
                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
                                    <div class="layui-row" style=" margin-top: 10px;">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">过滤</label>
                                            <div class="layui-input-block">
@@ -362,32 +363,6 @@
                    , page: true
                    , limits: [50, 500, 5000, 50000]
                    , limit: 50
                    //, cellMinWidth: 90
                    //, cols: [[
                    //    { type: 'checkbox', fixed: 'left' }
                    //    , { field: 'HItemID', title: 'HItemID', sort: false, hide: true }
                    //    , { field: '工序代码', title: '工序代码' }
                    //    , { field: '工序名称', title: '工序名称' }
                    //    , { field: '组织', title: '组织' }
                    //    , { field: '等级', title: '等级' }
                    //    , { field: '流转标记', title: '流转标记' }
                    //    , { field: '核算标记', title: '核算标记' }
                    //    , { field: '汇报类型', title: '汇报类型' }
                    //    , { field: '明细标记', title: '明细标记' }
                    //    , { field: '禁用标记', title: '禁用标记' }
                    //    , { field: '部门', title: '部门' }
                    //    , { field: '序号', title: '序号' }
                    //    , { field: '对应K3代码', title: '对应K3代码', width: 115 }
                    //    , { field: '条形码', title: '条形码' }
                    //    , { field: '班产定额', title: '班产定额' }
                    //    , { field: '加班补贴定额', title: '加班补贴定额', width: 120 }
                    //    , { field: '自动移转', title: '自动移转' }
                    //    , { field: '备注', title: '备注' }
                    //    , { field: 'HProcessID_K3', title: 'HProcessID_K3', width: 130 }
                    //    , { field: 'ERP工序代码', title: 'ERP工序代码', width: 125 }
                    //    , { field: 'ERP工序名称', title: 'ERP工序名称', width: 125 }
                    //]]
                };
            }
@@ -399,6 +374,7 @@
                //获取登录页组织列
                $.ajax({
                    type: "get",
                    async:false,
                    url: GetWEBURL() + "/Web/GetOrganizations",
                    success: function (result) {
                        var Organization = "";
@@ -478,9 +454,12 @@
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                } else if ($.inArray(data[i].name, totalArray) > -1) { //计算列  
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, totalRow: true, width: 120 });
                                } else if (data[i].name == '工序代码') {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 200, event: '工序代码' });
                                } else if (data[i].name == '工序代码') {//添加超链接
                                    col.push({
                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '工序代码', templet: function (d) {
                                            return '<span style="color: blue;">' + d.工序代码 + '</span>'
                                        }, style: 'cursor: pointer;'
                                    });
                                } else {
                                    switch (data[i].Type) {
                                        //int
@@ -621,20 +600,21 @@
                    }
                    sWhere += " and " + ColName2 + " " + com2;
                }
                if (HOrgID) {
                    sWhere += " and HUSEORGID = '" + HOrgID + "'";
                }
                //if (HOrgID) {
                //    sWhere += " and HUSEORGID = '" + HOrgID + "'";
                //}
                if (HNumber) {
                    sWhere += " and å·¥åºä»£ç  like '%" + HNumber + "%'";
                }
                if (HName) {
                    sWhere += " and å·¥åºåç§° like '%" + HName + "%'";
                }
                if (HOrgID) {
                    sWhere += " and HUSEORGID = '" + HOrgID + "'";
                }
                sWhere +=addSWhereByOpenType();
                }
                sWhere += addSWhereByOpenType();
                sWhere += getOrgIDByUser();//用户关联组织查询过滤
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
@@ -1107,11 +1087,40 @@
                var openType = params[params[0]]; //从参数中获取 æ‰“开方式  1直接打开 2其它页面通过选择按钮打开
                var HOrgID = params[params[1]];
                if (typeof (openType) != "undefined") {
                    return  " and æ˜Žç»†æ ‡è®° = 'Y' and ç¦ç”¨æ ‡è®° != 'Y' and ISNULL(审核人,'')  != '' ";
                    return "  and ç¦ç”¨æ ‡è®° != 'Y' and ISNULL(审核人,'')  != '' ";
                    //and æ˜Žç»†æ ‡è®° = 'Y'
                }
                return "";
            }
            //#endregion
            //#region æ ¹æ®ç”¨æˆ·èŽ·å–ç”¨æˆ·å…³è”ç»„ç»‡çš„è¿‡æ»¤æ¡ä»¶
            function getOrgIDByUser() {
                var res = "";
                $.ajax({
                    type: "GET",
                    async: false,
                    url: GetWEBURL() + "/Xt_User/getOrgIDListByUser", //方法所在页面和方法名       ä¼ å‚ ç»„织必须是列表头部查询的组织  ä¸èƒ½ä½¿ç”¨ç”¨æˆ·é»˜è®¤
                    data: { "UserID": sessionStorage["Czybm"], "UserName": sessionStorage["HUserName"], HOrgID: $("#HOrgID").val() },
                    success: function (result) {
                        if (result.count == 1) {
                            if (result.data[0].sWhere == "1") {
                                res = " and HUSEORGID = '" + $("#HOrgID").val() + "'";
                            } else {
                                res = result.data[0].sWhere;
                            }
                        }
                    }, error: function (err) {
                        res = " and 1 = 0";
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                return res;
            }
            //#endregion
        });
        //#region èŽ·å–å‚æ•°
        function getUrlVars() {