duhe
2025-05-27 af1f18d1fa6b252353f66de195a9a1cfc6ea832e
器具分类:编辑页面 增加 父级分类、组织
2个文件已修改
68 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/LAYUI.pubxml.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/Add_Edit_Gy_MouldType.html 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
@@ -3268,7 +3268,7 @@
      <publishTime>04/17/2025 08:09:27</publishTime>
    </File>
    <File Include="views/基础资料/公用基础资料/Add_Edit_Gy_MouldType.html">
      <publishTime>05/27/2025 09:48:49</publishTime>
      <publishTime>05/27/2025 11:05:06</publishTime>
    </File>
    <File Include="views/基础资料/公用基础资料/Add_Edit_Gy_OrderBackInfo.html">
      <publishTime>04/11/2023 16:34:43</publishTime>
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Add_Edit_Gy_MouldType.html
@@ -75,6 +75,23 @@
                                                    <input type="checkbox" name="HStopflag" id="HStopflag" lay-skin="primary" title="" disabled>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">父级分类</label>
                                                <div class="layui-input-inline">
                                                    <input class="layui-input" name="HParentID" lay-verify="HParentID" id="HParentID" style="display:none;">
                                                    <input class="layui-input" name="HParentName" lay-verify="HParentName" id="HParentName" readonly>
                                                </div>
                                            </div>
                                            <div class="layui-row" style="margin-top:10px;">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label" style="width: 85px;">组织<label style="color:red"> * </label></label>
                                                    <div class="layui-input-block" style="margin-left: 120px; width: 501px;">
                                                        <select name="HUSEORGID" id="HUSEORGID" lay-verify="HUSEORGID">
                                                            <!--动态渲染组织-->
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--制单信息-->
@@ -185,6 +202,9 @@
                , form = layui.form
                , laydate = layui.laydate
                , element = layui.element;
            //组织
            var HOrgIDBar = 0;
            //#endregion
            //常规用法
@@ -335,6 +355,7 @@
            if (HType == "Modify") {
                $.ajax({
                    url: GetWEBURL() + "/Gy_ModelType/xg",
                    async:false,
                    type: "GET",
                    data: {
                        "HInterID": hID
@@ -344,6 +365,8 @@
                        ajaxReturnData = JSON.parse(JSON.stringify(d)).data;
                        $("#HNumber").val(d.data[0].HNumber);
                        $("#HName").val(d.data[0].HName);
                        $("#HParentID").val(d.data[0].HParentID);
                        $("#HParentName").val(d.data[0].HParentName);
                        $("#HHelpCode").val(d.data[0].HHelpCode);
                        $("#HRemark").val(d.data[0].HRemark);
                        $("#HMakeEmp").val(d.data[0].HMakeEmp);
@@ -356,6 +379,9 @@
                        $("#HStopTime").val(d.data[0].HStopEmp == "" ? "" :formatDate(d.data[0].HStopTime));
                        $("input[name='HStopflag']").prop("checked", d.data[0].HStopflag);//true:选中 false:不选中
                        layui.form.render();//实时渲染选中和不选中的样式,最好添加这句话
                        HOrgIDBar = d.data[0].HUSEORGID;
                        //$("#HUpDater").val(sessionStorage["HUserName"]);//修改人
                        //table.reload(layTableId, {
                        //    data: ajaxReturnData
@@ -366,6 +392,7 @@
            } else if (HType == "Copy") {
                $.ajax({
                    url: GetWEBURL() + "/Gy_ModelType/xg",
                    async:false,
                    type: "GET",
                    data: {
                        "HInterID": hID
@@ -380,7 +407,10 @@
                        $("#HLevel").val(d.data[0].HLevel);
                        $("input[name='HStopflag']").prop("checked", d.data[0].HStopflag);//true:选中 false:不选中
                        layui.form.render();//实时渲染选中和不选中的样式,最好添加这句话
                        $("#HUpDater").val(sessionStorage["HUserName"]);//修改人
                        //$("#HUpDater").val(sessionStorage["HUserName"]);//修改人
                        HOrgIDBar = d.data[0].HUSEORGID;
                        //table.reload(layTableId, {
                        //    data: ajaxReturnData
                        //});
@@ -388,6 +418,10 @@
                });
            }
            //#region åˆå§‹åŒ–组织
            Organ();
            //#endregion
            //数据验证
            function AllowLoadData() {
@@ -407,6 +441,36 @@
                return true;
            }
            //#region èŽ·å–ç»„ç»‡
            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>';
                            }
                            $("#HUSEORGID").append(Organization);
                            if (HType == "Modify" || HType == "Copy") {
                            } else {
                                HOrgIDBar = sessionStorage["OrganizationID"];
                            }
                            $("#HUSEORGID").val(HOrgIDBar);
                            form.render('select');
                        }
                        layer.closeAll("loading");
                    }
                })
            }
            //#endregion
            //#region  æ—¶é—´è½¬æ¢
            function formatDate(date) {
                var d = new Date(date),