yusijie
2022-09-27 d0fec1b2fb615781a8148566db01dee9caf4f7c8
添加组织字段
2个文件已修改
98 ■■■■■ 已修改文件
WebTM/views/生产管理/报工台工序/产量汇报/Sc_Add_ProductReportStepBillList.html 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/报工台工序/产量汇报/Sc_ProductReportStepBillList_Web.html 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²úÁ¿»ã±¨/Sc_Add_ProductReportStepBillList.html
@@ -119,6 +119,24 @@
                                                            <input class="layui-input" name="HDate" id="HDate" disabled autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                                        </div>
                                                    </div>
                                                    <!--<div class="layui-inline">
        <label class="layui-form-label">组织:</label>
        <div class="layui-input-inline">
            <input class="layui-input" name="HOrgID" lay-verify="HOrgID" id="HOrgID" autocomplete="off">
        </div>
    </div>-->
                                                    <div class="layui-col-xs4 layui-inline">
                                                        <label class="layui-form-label">组织:</label>
                                                        <div class="layui-input-inline" style="margin-bottom: -15px;">
                                                            <div class="layui-form">
                                                                <div class="layui-form-item">
                                                                    <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
                                                                        <!--动态渲染组织-->
                                                                    </select>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-form-item">
                                                    <div class="layui-inline">
@@ -378,6 +396,8 @@
            var HSourceBillNo = params[params[6]];
            var HSourceBillType = params[params[7]];
        }
        //获取登录组织
        //$('#HOrgID').val(sessionStorage["Organization"])
        //var edit = function (data) {
        //    HBillType = data[0].HBillType;
@@ -407,7 +427,7 @@
            //初始化表单插件
            set_InitFrom();
            Organ();//显示组织
            //判断操作类型
            if (OperationType == 1) {//无源单
                set_AddFNew();
@@ -419,6 +439,8 @@
                var HICMOInID = params[params[3]];//生产订单主主ID
                var HICMOEnID = params[params[4]];//生产订单子ID
                set_EditFromGrid(linterid, HICMOInID, HICMOEnID);
                //禁用组织选项
                $("#HOrgID").attr("disabled", true);
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
@@ -622,7 +644,7 @@
                                $("#HCloseDate").val(formatDate(LoadData[0].关闭日期)); //关闭日期
                                $("#HDeleteMan").val(LoadData[0].作废人); //作废人
                                $("#HDeleteDate").val(formatDate(LoadData[0].作废日期)); //作废日期
                                $("#HOrgID").val(LoadData[0].组织); //组织
                            }
                            else {
                                layer.alert(data.Message, { icon: 5 });
@@ -862,7 +884,27 @@
                });
            });
            //获取组织
            function Organ() {
                //获取登录页组织列
                var Organization = '';
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Web/GetOrganizations",
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
                            for (var i = 0; i < data.length; i++) {
                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
                            }
                            $("#HOrgID").append(Organization);
                            $("#HOrgID").val(sessionStorage["OrganizationID"])
                            form.render('select');
                        }
                        layer.closeAll("loading");
                    }
                })
            }
            //验证汇报数量是否超过计划数量
            function OverStepQty(objdata) {
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²úÁ¿»ã±¨/Sc_ProductReportStepBillList_Web.html
@@ -67,6 +67,14 @@
                                        <input type="text" class="layui-input" name="Part" id="Part" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">组织</label>
                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                        <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
                                            <!--动态渲染组织-->
                                        </select>
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
@@ -203,6 +211,9 @@
                $("#HBillNo").val("");
                $("#Part").val("");
                $("#Source").val("");
                $("#HOrgID").val(sessionStorage["OrganizationID"]);
                form.render('select');
                sWhere = "";
            });
        //#endregion
@@ -214,6 +225,7 @@
                set_InitGrid();
                //查询
                get_Display(sWhere);
                Organ();
            }
@@ -244,6 +256,7 @@
                                }
                            }
                        }
                        , { field: '组织', title: '组织', width: 200 }
                        , {
                            field: 'HBillStatus', title: '单据状态', width: 200, templet: function (d) {
                                switch (d.HBillStatus) {
@@ -341,6 +354,28 @@
                };
            }
            //获取组织
            function Organ() {
                //获取登录页组织列
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Web/GetOrganizations",
                    success: function (result) {
                        var Organization = "";
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
                            for (var i = 0; i < data.length; i++) {
                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
                            }
                            $("#HOrgID").append(Organization);
                            $("#HOrgID").val(sessionStorage["OrganizationID"])
                            form.render('select');
                        }
                        layer.closeAll("loading");
                    }
                })
            }
            //查询数据
            function get_Display(sWhere)
            {
@@ -368,13 +403,20 @@
            }
            // å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery() {
            function get_FastQuery(number) {
                var HDate = $("#HDate").val();//开始日期
                var HDate1 = $("#HDate1").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号
                var Part = $("#Part").val();       //物料信息
                var Source = $("#Source").val();  //资源
                var HOrgID = ""; //组织
                sWhere += SchWhere;
                if (number == 1) {
                    HOrgID = sessionStorage["OrganizationID"];
                }
                else {
                    HOrgID = $("#HOrgID").val();//组织
                }
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HDate + "'";
                }
@@ -390,7 +432,9 @@
                if (Source) {
                    sWhere += " and ç”Ÿäº§èµ„源 like '%" + Dept + "%'";
                }
                if (HOrgID) {
                    sWhere += " and HOrgID = '" + HOrgID + "'";
                }
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
@@ -423,7 +467,7 @@
                    var HInterID = data[0].HInterID;
                    var HICMOInID = data[0].HSourceInterID;
                    var HICMOEnID = data[0].HSourceEntryID;
                    var HRelationInterID = data[0].HRelationInterID;
                    var HRelationInterID = data[0].HRelationInterID;
                    if (HRelationInterID == 1) {
                        layer.msg('单据已报检审核无法修改!');
                        return false;