From af1f18d1fa6b252353f66de195a9a1cfc6ea832e Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 27 五月 2025 13:01:46 +0800
Subject: [PATCH] 器具分类:编辑页面 增加 父级分类、组织

---
 WebTM/Properties/PublishProfiles/LAYUI.pubxml.user |    2 
 WebTM/views/基础资料/公用基础资料/Add_Edit_Gy_MouldType.html |   66 ++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 2 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user b/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
index 028ee66..9cccc9a 100644
--- a/WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
+++ b/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>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_MouldType.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_MouldType.html"
index 0dc8179..ff70cce 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_MouldType.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/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),

--
Gitblit v1.9.1