zhuyiyi 6 сар өмнө
parent
commit
6a449f630c

+ 10 - 0
SiteCore/Handler/sync.user.cs

@@ -478,6 +478,16 @@ namespace SiteCore.Handler
                 returnSuccessMsg("保存成功!");
             }
         }
+        public void copy_account_design()
+        {
+            string name = GetPostString("name");
+            int currentId = GetPostInt("currentId");
+            CeErpUser user = CeErpUser.GetByUserName(name);
+            CeErpUser current_user = CeErpUser.Get(currentId);
+            current_user.pemDesign = user.pemDesign;
+            current_user.Update();
+            returnSuccessMsg("保存成功!");
+        }
 
         public void resetpwd_account()
         {

+ 6 - 0
Web/Ehr/EmployeeManage.aspx

@@ -1,5 +1,6 @@
 <%@ Page Title="员工信息管理" Language="C#" MasterPageFile="~/MasterPage/Tree.master" AutoEventWireup="true" CodeFile="EmployeeManage.aspx.cs" Inherits="Ehr_EmployeeManage" %>
 
+
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
     <script src="js/employee.js?v=<%=SiteVer%>"></script>
 </asp:Content>
@@ -9,6 +10,11 @@
     <%--    &nbsp;<span style="color:#e8750e;">默认账户的登陆密码是 <b>6个0</b></span>--%>
 </asp:Content>
 <asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
+    <style type="text/css">
+        .mini-grid-cell-nowrap {
+            white-space: normal;
+        }
+    </style>
     <div style="display: none">
         <input type="hidden" id="hId" />
         <input type="hidden" id="hName" />

+ 21 - 1
Web/Ehr/js/employee.js

@@ -7,10 +7,30 @@ function actionRenderer(e) {
     html += getGridBtn("edit", "修改", "commandFn('edit','" + id + "')");
     html += getGridBtn("remove", "删除", "commandFn('del','" + id + "','" + record.Code + "')");
     html += getGridBtn("lock", "密码", "edit_pwd(" + id + ")");
+    html += getGridBtn("cut", "复制技能", "copyDesignFn(" + id + ")");
     //html += getGridBtn("info", "APP", "addWx('" + id + "','" + record.Code + "','" + record.PassWord + "','" + record.OrgName+"')");
     return html;
 }
 
+function copyDesignFn(id) {
+    mini.prompt("填写复制人姓名", '提示', function (option, value) {
+        if (option == "ok") {
+            if (value == "") {
+                mini.showTips({
+                    content: "请填写名字",
+                    state: "danger",
+                    x: "Center",
+                    y: "Center",
+                    timeout: 1000
+                });
+            }
+        }
+        postAjax("copy_account_design", { name: value, currentId: id }, function (data) {
+            resultShow(data, "grid.reload()");
+        });
+
+    })
+}
 function addWx(code, pwd, oname) {
     if (!confirm("确认开通/关闭APP账号?")) return;
     postAjax("ins_erpuser", "code=" + code + "&pwd=" + pwd + "&oname=" + oname, function (data) {
@@ -55,7 +75,7 @@ function commandFn(cmd, id, code) {
             {
                 mini.get("distribute_win").show();
                 $("#distribute_id").val(id)
-                
+
                 break;
             }
     }