Prechádzať zdrojové kódy

我的面板-我的信息

user4 5 rokov pred
rodič
commit
4a2828b602

+ 34 - 6
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectRecordsController.java

@@ -4,6 +4,7 @@
 package com.jeeplus.modules.projectrecord.web;
 
 import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.persistence.Page;
@@ -27,6 +28,7 @@ import com.jeeplus.modules.workactivity.entity.Activity;
 import com.jeeplus.modules.workactivity.service.ActivityService;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
@@ -59,6 +61,9 @@ import java.util.*;
 @RequestMapping(value = "${adminPath}/project/projectRecords")
 public class ProjectRecordsController extends BaseController {
 
+    @Autowired
+    private WorkClientInfoService workClientInfoService;
+
 	@Autowired
 	private ProjectRecordsService projectRecordsService;
 
@@ -569,14 +574,37 @@ public class ProjectRecordsController extends BaseController {
         }
     }
 
+//    /**
+//     * 无合同状态下,输入联系人,查询系统中是否有此联系人
+//     * @param workClientLinkman
+//     * @return
+//     */
+//    @ResponseBody
+//    @RequestMapping("queryLinkMan")
+//    public WorkClientLinkman queryLinkMan(WorkClientLinkman workClientLinkman){
+//        return  projectRecordsService.getLinkMan(workClientLinkman);
+//    }
+
     /**
-     * 无合同状态下,输入联系人,查询系统中是否有此联系人
-     * @param workClientLinkman
-     * @return
+     * 项目登记新增客户管理
      */
+    @RequestMapping(value = "linkManSave")
     @ResponseBody
-    @RequestMapping("queryLinkMan")
-    public WorkClientLinkman queryLinkMan(WorkClientLinkman workClientLinkman){
-        return  projectRecordsService.getLinkMan(workClientLinkman);
+    public WorkClientLinkman linkManSave(WorkClientInfo workClientInfo,
+                                               Model model, RedirectAttributes redirectAttributes,
+                                               HttpServletRequest request
+    ) throws Exception{
+        WorkClientLinkman linkman = new WorkClientLinkman();
+        try {
+            //保存当前人的公司
+            workClientInfo.setCompanyId(UserUtils.getSelectCompany().getId());
+            workClientInfo.setOfficeId(UserUtils.getSelectOffice().getId());
+            workClientInfoService.save(workClientInfo);//保存
+
+            linkman = workClientInfo.getWorkClientLinkmanList().get(0);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return  linkman;
     }
 }

+ 2 - 0
src/main/java/com/jeeplus/modules/sys/dao/RoleDao.java

@@ -87,4 +87,6 @@ public interface RoleDao extends CrudDao<Role> {
 	public List<Role> getManagerRoleList(@Param("userId") String userId,@Param("companyId") String companyId);
 
 	public String getRoleIdByUserId(String userId);
+
+	public Role getRoleByUserId(String userId);
 }

+ 3 - 0
src/main/java/com/jeeplus/modules/sys/service/RoleService.java

@@ -34,4 +34,7 @@ public class RoleService extends CrudService<RoleDao,Role> {
         return  roleDao.getRoleIdByUserId(userId);
     }
 
+    public Role getRoleByUserId(String userId){
+        return roleDao.getRoleByUserId(userId);
+    }
 }

+ 17 - 1
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java

@@ -190,6 +190,22 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
 
 	}
 
+    /**
+     * 我的信息-用户维护教育信息,
+     * @param workStaffBasicInfo
+     * @param request
+     * @throws IOException
+     */
+    @Transactional(readOnly = false)
+    public void saveAchieveDirectly(WorkStaffBasicInfo workStaffBasicInfo,HttpServletRequest request) throws IOException {
+        String baseId = workStaffBasicInfo.getId();
+        workStaffBasicInfo.setId(workStaffBasicInfo.getAchiveId());
+        this.saveAchive(workStaffBasicInfo,request);
+        workStaffBasicInfo.setAchiveId(workStaffBasicInfo.getId());
+        workStaffBasicInfo.setId(baseId);
+        super.save(workStaffBasicInfo);
+        this.saveDetails(workStaffBasicInfo,false);
+    }
     public void preSave(WorkStaffBasicInfo workStaffBasicInfo, HttpServletRequest request) throws IOException {
         if(workStaffBasicInfo.getCompany()==null){
             workStaffBasicInfo.setCompany(UserUtils.getSelectCompany());
@@ -659,7 +675,7 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         String contentStr = "待处理,请及时审核修改档案信息申请。";
         String titleStr = "修改档案信息申请,待处理";
         String remark = "待处理";
-            WorkStaffBasicInfo workStaffBasicInfo = workStaffAchivesDao.get(achiveIds);
+        WorkStaffBasicInfo workStaffBasicInfo = workStaffAchivesDao.get(achiveIds);
         WorkProjectNotify workProjectNotify = UtilNotify.saveNotify(workStaffBasicInfo.getId(),null, workStaffBasicInfo.getCompany().getId(),
                 titleStr, contentStr,"86","0",remark,"");
         List<String> userIds = new ArrayList<>();

+ 33 - 1
src/main/java/com/jeeplus/modules/workstaff/web/WorkStaffBasicInfoController.java

@@ -473,6 +473,24 @@ public class WorkStaffBasicInfoController extends BaseController {
 		model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
 		return "modules/workstaff/workStaffBasicDetailModify";
 	}
+
+	@RequestMapping(value = "applyEditDirectly")
+	public String applyEditDirectly(Model model) {
+		WorkStaffBasicInfo workStaffBasicInfo=new WorkStaffBasicInfo();
+		workStaffBasicInfo.setAchiveId(UserUtils.getBasicInfo().getId());
+		workStaffBasicInfo = workStaffBasicInfoService.getAchive(workStaffBasicInfo);
+		workStaffBasicInfo.setAchiveId(workStaffBasicInfo.getId());
+		Role role = roleService.getRoleByUserId(workStaffBasicInfo.getUserId());
+		workStaffBasicInfo.setRoleId(role.getId());
+		workStaffBasicInfo.setRoleName(role.getName());
+		if(StringUtils.isNotBlank(workStaffBasicInfo.getId())){
+			workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
+		}
+		workStaffBasicInfo.setHome("home");
+		model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
+		return "modules/workstaff/workStaffBasicDetailModifyDirectly";
+	}
+
 	/**
 	 * 保存员工信息
 	 */
@@ -511,9 +529,23 @@ public class WorkStaffBasicInfoController extends BaseController {
 		return "redirect:"+Global.getAdminPath()+"/sys/user/info?repage";
 	}
 
+	/**
+	 * 我的信息-直接保存员工信息
+	 */
+	@RequestMapping(value = "saveAchiveModifyDirectly")
+	public String saveAchiveModifyDirectly(WorkStaffBasicInfo workStaffBasicInfo, Model model, RedirectAttributes redirectAttributes,HttpServletRequest request) throws Exception{
+		if (!beanValidator(model, workStaffBasicInfo)){
+			return form(workStaffBasicInfo, model,false);
+		}
+		workStaffBasicInfoService.saveAchieveDirectly(workStaffBasicInfo,request);
+		addMessage(redirectAttributes, "保存员工档案信息成功");
+		return "redirect:"+Global.getAdminPath()+"/sys/user/info?repage";
+	}
+
 	@RequestMapping("getChange")
 	@ResponseBody
-	public WorkStaffAchivesLog getChange(String name,String achiveId) throws ParseException {
+	public WorkStaffAchivesLog
+	getChange(String name,String achiveId) throws ParseException {
 		Map<String,String> map=new HashMap<>();
 		WorkStaffAchivesLog workStaffAchivesLog=new WorkStaffAchivesLog();
 		workStaffAchivesLog.setStaffId(achiveId);

+ 7 - 0
src/main/resources/mappings/modules/sys/RoleDao.xml

@@ -589,4 +589,11 @@
 		from sys_user_role
 		where user_id = #{userId,jdbcType=VARCHAR}
 	</select>
+
+	<select id="getRoleByUserId" parameterType="String" resultType="Role">
+		select r.*
+		from sys_role r left join sys_user_role ur
+		on r.id = ur.role_id
+		where ur.user_id = #{userId}
+	</select>
 </mapper>

+ 1 - 0
src/main/resources/mappings/modules/workstaff/WorkStaffAchivesDao.xml

@@ -787,6 +787,7 @@
 		where user_id = #{id}
 	</update>
 
+<!--	我的信息-修改用户的四个属性,同步到user,achieves,basicInfo-->
 	<update id="updateWorkStaffAchieves" parameterType="WorkStaffBasicInfo">
 		update work_staff_achives
 		<set>

+ 3 - 0
src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml

@@ -22,6 +22,7 @@
 		a.calendar AS "calendar",
 		a.email AS "email",
 		a.mobile AS "mobile",
+		a.phone AS "phone",
 		a.marriage AS "marriage",
 		a.politics AS "politics",
 		a.ex_soldier AS "exSoldier",
@@ -48,8 +49,8 @@
 		a.achive_id AS "achiveId",
 		nativePlace.name AS "nativePlace.name",
 		a.try_end_time AS "tryEndTime"
+<!--		ur.role_id AS "roleId",-->
+<!--		r.name AS "roleName"-->
 	</sql>
 	
 	<sql id="workStaffBasicInfoJoins">

+ 103 - 3
src/main/webapp/webpage/modules/projectrecord/projectRecordsForm.jsp

@@ -231,6 +231,83 @@
             }
             $(obj).val(t.split("").reverse().join("") + "." + r);
         }
+        function openBill2(title,url,width,height,target,formId){
+            var frameIndex = parent.layer.getFrameIndex(window.name);
+            var urls = url+"&index="+frameIndex;
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin:"two-btns",
+                maxmin: false, //开启最大化最小化按钮
+                content: urls ,
+                btn: ['确定','关闭'],
+                yes: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    inputForm.attr("action","${ctx}/project/projectRecords/linkManSave");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+
+                    formSubmit2($document,formId,index);
+                },
+                cancel: function(index){
+                }
+            });
+
+            function formSubmit2($document, inputForm, index) {
+                var validateForm = $($document.getElementById(inputForm)).validate({
+                    submitHandler: function (form) {
+                        loading('正在提交,请稍等...');
+                        form.submit();
+                    },
+                    errorContainer: "#messageBox",
+                    errorPlacement: function (error, element) {
+                        $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                        if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                            error.appendTo(element.parent().parent());
+                        } else {
+                            error.insertAfter(element);
+                        }
+                    }
+                });
+                if (validateForm.form()) {
+                    $($document.getElementById(inputForm)).ajaxSubmit({
+                        success: function (data) {
+                            var d = data;
+                            if (d.msg == "false") {
+                                parent.layer.msg("保存客户信息异常!", {icon: 2});
+                                return false;
+                            }
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanRowIdx);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                            var row = workClientLinkmanRowIdx - 1;
+                            $("#" + "workClientLinkmanList" + row + "_id").val(d.id);
+                            $("#" + "workClientLinkmanList" + row + "_office").val(d.office);
+                            $("#" + "workClientLinkmanList" + row + "_name").val(d.name);
+                            $("#" + "workClientLinkmanList" + row + "_linkPhone").val(d.linkPhone);
+                            $("#" + "workClientLinkmanList" + row + "_linkMobile").val(d.linkMobile);
+                            parent.layer.msg(d.str, {icon: 1});
+                            top.layer.close(index)
+                        }
+                    });
+                }
+            }
+        }
+
     </script>
 </head>
 <body>
@@ -392,9 +469,7 @@
                     </div>
                     <div id="div2">
                         <div class="layui-item nav-btns">
-                            <a class="nav-btn nav-btn-add"
-                               onclick="addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;"
-                               title="新增"><i class="fa fa-plus"></i> 新增</a>
+                            <a href="javascript:void(0)" onclick="openBill2('新增客户管理', '${ctx}/workclientinfo/workClientInfo/form?param=2','95%','95%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增客户</a>
                         </div>
                     </div>
                 </div>
@@ -412,6 +487,31 @@
                         </tr>
                         </thead>
                         <tbody id="workClientLinkmanList">
+                        <c:if test="${not empty projectRecords.workClientLinkmanList}">
+                            <c:forEach items="${projectRecords.workClientLinkmanList}" var="casePeopleNorm" varStatus="index">
+                                <tr id="workClientInfoList${index.index}">
+                                    <td class="hide">
+                                        <input id="workClientLinkmanList${index.index}_id" name="workClientLinkmanList[${index.index}].id" type="hidden" value="${casePeopleNorm.id}" class="clientInfoId"/>
+                                        <input id="workClientLinkmanList${index.index}_delFlag" name="workClientLinkmanList[${index.index}].delFlag" type="hidden" value="0"/>
+                                    </td>
+                                    <td>
+                                        <input id="workClientLinkmanList${index.index}_office" name="workClientLinkmanList[${index.index}].office" type="text" value="${casePeopleNorm.office}" readonly="true"   class="form-control "/>
+                                    </td>
+                                    <td>
+                                        <input id="workClientLinkmanList${index.index}_name" name="workClientLinkmanList[${index.index}].name" type="text" value="${casePeopleNorm.name}" readonly="true"   class="form-control "/>
+                                    </td>
+                                    <td>
+                                        <input id="workClientLinkmanList${index.index}_linkPhone" name="workClientLinkmanList[${index.index}].linkPhone" type="text" value="${casePeopleNorm.linkPhone}" readonly="true"   class="form-control "/>
+                                    </td>
+                                    <td>
+                                        <input id="workClientLinkmanList${index.index}_linkMobile" name="workClientLinkmanList[${index.index}].linkMobile" type="text" value="${casePeopleNorm.linkMobile}" readonly="true"   class="form-control "/>
+                                    </td>
+                                    <td class="text-center op-td">
+                                        <span class="op-btn op-btn-delete" onclick="delRow(this, '#workClientLinkmanList${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                        </c:if>
                         </tbody>
                     </table>
                     <script type="text/template" id="workClientLinkmanTpl">//<!--

+ 47 - 51
src/main/webapp/webpage/modules/sys/userInfo.jsp

@@ -198,6 +198,49 @@
                 }
             });
         }
+        function openDialog2(title,url,width,height,target) {
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workstaff/workStaffBasicInfo/getApply',
+                success:function(data) {
+                    if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                        width = 'auto';
+                        height = 'auto';
+                    } else {//如果是PC端,根据用户设置的width和height显示。
+
+                    }
+                    top.layer.open({
+                        type: 2,
+                        area: [width, height],
+                        title: title,
+                        maxmin: true, //开启最大化最小化按钮
+                        content: url,
+                        btn: ["提交","关闭"],
+                        btn1: function(index, layero){
+                            var body = top.layer.getChildFrame('body', index);
+                            var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                            var inputForm = body.find('#inputForm');
+                            var top_iframe;
+                            if(target){
+                                top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                            }else{
+                                top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                            }
+                            inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                            if(iframeWin.contentWindow.doSubmit(index) ){
+                                // top.layer.close(index);//关闭对话框。
+                                setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                            }
+                            return false;
+                        },
+                        btn2: function (index) {
+
+                        }
+                    });
+                }
+            });
+        }
     </script>
     <style>
         ul.dropdown-menu.dropdown-user li a {
@@ -333,42 +376,6 @@
                                                     </div>
                                                 </div>
 
-                                                <%--                                                <div class="layui-item layui-col-sm6 lw7">--%>
-                                                <%--                                                    <div style="margin-right: 120px;">--%>
-                                                <%--                                                        <div class="layui-item layui-col-sm12">--%>
-                                                <%--                                                            <label class="layui-form-label">邮 箱:</label>--%>
-                                                <%--                                                            <div class="layui-input-block">--%>
-                                                <%--                                                                <input htmlEscape="false" style="background: #fff;" readonly="true"--%>
-                                                <%--                                                                       class="form-control layui-input"--%>
-                                                <%--                                                                       value="${user.email}"/>--%>
-                                                <%--                                                            </div>--%>
-                                                <%--                                                        </div>--%>
-                                                <%--                                                        <div class="layui-item layui-col-sm12">--%>
-                                                <%--                                                            <label class="layui-form-label">电 话:</label>--%>
-                                                <%--                                                            <div class="layui-input-block">--%>
-                                                <%--                                                                <input htmlEscape="false" style="background: #fff;" readonly="true"--%>
-                                                <%--                                                                       class="form-control layui-input"--%>
-                                                <%--                                                                       value="${user.phone}"/>--%>
-                                                <%--                                                            </div>--%>
-                                                <%--                                                        </div>--%>
-                                                <%--                                                    </div>--%>
-                                                <%--                                                    <div class="profile_box_wrapper">--%>
-                                                <%--                                                        <div class="profile_box">--%>
-                                                <%--                                                            <div class="mypic" style="margin-bottom: 10px;">--%>
-                                                <%--                                                                &lt;%&ndash;<img alt="image" class="img-responsive" src="${user.photo }" />&ndash;%&gt;--%>
-                                                <%--                                                            </div>--%>
-                                                <%--                                                        </div>--%>
-                                                <%--                                                    </div>--%>
-                                                <%--                                                </div>--%>
-
-                                                <%--                                                <div class="layui-item layui-col-sm11 lw7 ">--%>
-                                                <%--                                                    <label class="layui-form-label">备注:</label>--%>
-                                                <%--                                                    <div class="layui-input-block">--%>
-                                                <%--                                                        <textarea htmlEscape="false" style="background: #fff;" rows="2" readonly="true"--%>
-                                                <%--                                                                  class="form-control  remark">${user.remarks}</textarea>--%>
-                                                <%--                                                    </div>--%>
-                                                <%--                                                </div>--%>
-
                                                 <div class="layui-item layui-col-sm6 lw7">
                                                     <label class="layui-form-label">公 司:</label>
                                                     <div class="layui-input-block">
@@ -385,21 +392,7 @@
                                                                value="${user.office.topCompany}"/>
                                                     </div>
                                                 </div>
-                                                <%--                                                <div class="layui-item layui-col-sm6 lw7">--%>
-                                                <%--                                                    <label class="layui-form-label">用 户 名:</label>--%>
-                                                <%--                                                    <div class="layui-input-block">--%>
-                                                <%--                                                        <input htmlEscape="false" style="background: #fff;" readonly="true"--%>
-                                                <%--                                                               class="form-control layui-input"--%>
-                                                <%--                                                               value="${user.loginName}"/>--%>
-                                                <%--                                                    </div>--%>
-                                                <%--                                                </div>--%>
-                                                <%--                                                <div class="layui-item layui-col-sm6 lw7">--%>
-                                                <%--                                                    <label class="layui-form-label">手机号:</label>--%>
-                                                <%--                                                    <div class="layui-input-block">--%>
-                                                <%--                                                        <input htmlEscape="false" style="background: #fff;" readonly="true"--%>
-                                                <%--                                                               class="form-control layui-input" value="${user.mobile}"/>--%>
-                                                <%--                                                    </div>--%>
-                                                <%--                                                </div>--%>
+
                                                 <div class="layui-item layui-col-sm6 lw7">
                                                     <label class="layui-form-label">岗位:</label>
                                                     <div class="layui-input-block">
@@ -440,9 +433,12 @@
                                     <ul class="dropdown-menu dropdown-user">
                                         <li><a id="userEdit" data-toggle="modal" onclick="openDialog('修改档案信息', '${ctx}/workstaff/workStaffBasicInfo/applyEdit','95%','95%')" data-target="#register">申请修改</a>
                                         </li>
+                                        <li><a id="userEditDirectly" data-toggle="modal" onclick="openDialog2('修改档案信息', '${ctx}/workstaff/workStaffBasicInfo/applyEditDirectly','95%','95%')" data-target="#register">直接修改</a>
+                                        </li>
                                     </ul>
                                 </div>
                             </div>
+
                             <div class="ibox-content">
                                 <div class="form-group layui-row first">
                                     <div class="form-group-label"><h2>基本信息</h2></div>

+ 36 - 39
src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp

@@ -154,7 +154,9 @@
             //模糊查询
             $("#name").on("keyup",function () {
                 var keyword = $(this).val();
-                fuzzyQuery(keyword);
+                if (keyword != null && "" !== keyword) {
+                    fuzzyQuery(keyword);
+                }
             });
         });
 		function testOurBank(value){
@@ -271,46 +273,41 @@
 
         // 模糊查询下拉框
         function fuzzyQuery(keyword){
-            if (keyword == null && "" === keyword) {
-                $("#fuzzyQuerySelect").hide();
-            } else {
-                $.post(
-                    "${ctx}/workclientinfo/workClientInfo/enterpriseSearchByName",
-                    {"keyword": keyword},
-                    function (result) {
-                        var json = eval(result.data.items);
-                        var html = "<ul>";
-                        for (var i = 0; i < json.length; i++) {
-                            html += "<li value=" + json[i].id + ">" + json[i].entname + "</li>";
-                        }
-                        html += "</ul>";
-                        $("#fuzzyQuerySelect").show().html(html);
-
-                        //鼠标移动到某行上改变颜色
-                        $("li").bind("mouseover", function () {
-                            $(this).css("background-color", "grey");
-                        });
-                        $("li").bind("mouseout", function () {
-                            $(this).css("background-color", "white");
-                        });
-                        //单击某行
-                        $("li").bind("click", function () {
-                            $("#fuzzyQuerySelect").hide();
-                            var id = $(this).val();
-                            $.getJSON(
-                                "${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
-                                {"id": id},
-                                function (data) {
-                                   $("#name").val(data.ENTNAME);
-                                   $("#uscCode").val(data.TAXNUMBER);
-                                   $("#registerAddress").val(data.OPLOC);
-                                }
-                            );
+            $.post(
+                "${ctx}/workclientinfo/workClientInfo/enterpriseSearchByName",
+                {"keyword": keyword},
+                function (result) {
+                    var json = eval(result.data.items);
+                    var html = "<ul>";
+                    for (var i = 0; i < json.length; i++) {
+                        html += "<li value=" + json[i].id + ">" + json[i].entname + "</li>";
+                    }
+                    html += "</ul>";
+                    $("#fuzzyQuerySelect").show().html(html);
 
-                        });
-                    }, "json");
-            }
+                    //鼠标移动到某行上改变颜色
+                    $("li").bind("mouseover", function () {
+                        $(this).css("background-color", "grey");
+                    });
+                    $("li").bind("mouseout", function () {
+                        $(this).css("background-color", "white");
+                    });
+                    //单击某行
+                    $("li").bind("click", function () {
+                        $("#fuzzyQuerySelect").hide();
+                        var id = $(this).val();
+                        $.getJSON(
+                            "${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
+                            {"id": id},
+                            function (data) {
+                                $("#name").val(data.ENTNAME);
+                                $("#uscCode").val(data.TAXNUMBER);
+                                $("#registerAddress").val(data.OPLOC);
+                            }
+                        );
 
+                    });
+                }, "json");
         }
 
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1818 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicDetailModifyDirectly.jsp