新增项目,班组,评价人

This commit is contained in:
马三炮 2025-03-31 18:48:43 +08:00
parent fdb03066f9
commit 3824763a71
2 changed files with 45 additions and 24 deletions

View File

@ -2,10 +2,35 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.bonus.gs.sub.evaluate.evaluate.dao.OrganizationalDao"> <mapper namespace="com.bonus.gs.sub.evaluate.evaluate.dao.OrganizationalDao">
<insert id="addData"> <insert id="addData">
insert into pm_org_info(name, level, parent_id, user_name, user_id, id_card, insert into pm_org_info
sex, user_phone, status, org_type, lk_id, table_source) <trim prefix="(" suffix=")" suffixOverrides=",">
values (#{name}, #{level}, #{parentId}, #{userName}, #{userId}, #{idCard}, <if test="name != null and name != ''">name,</if>
#{sex}, #{userPhone}, 1, #{orgType}, #{lkId}, #{tableSource}) <if test="level != null">level,</if>
<if test="parentId != null and parentId != ''">parent_id,</if>
<if test="userName != null">user_name,</if>
<if test="userId != null and userId != ''">user_id,</if>
<if test="idCard != null">id_card,</if>
<if test="sex != null">sex,</if>
<if test="userPhone != null">user_phone,</if>
<if test="orgType != null">org_type,</if>
<if test="lkId != null">lk_id,</if>
<if test="tableSource != null">table_source,</if>
status
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="level != null">#{level},</if>
<if test="parentId != null and parentId != ''">#{parentId},</if>
<if test="userName != null">#{userName},</if>
<if test="userId != null and userId != ''">#{userId},</if>
<if test="idCard != null and idCard != ''">#{idCard},</if>
<if test="sex != null">#{sex},</if>
<if test="userPhone != null and userPhone != ''">#{userPhone},</if>
<if test="orgType != null">#{orgType},</if>
<if test="lkId != null">#{lkId},</if>
<if test="tableSource != null">#{tableSource},</if>
1
</trim>
</insert> </insert>
<!--查询机构数据 --> <!--查询机构数据 -->
<insert id="addDepartData" useGeneratedKeys="true" keyProperty="addId"> <insert id="addDepartData" useGeneratedKeys="true" keyProperty="addId">

View File

@ -40,13 +40,13 @@
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline"> <!-- <div class="layui-inline">
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>企业名称:</label> <label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>企业名称:</label>
<div class="layui-input-inline" style="width: 60%"> <div class="layui-input-inline" style="width: 60%">
<input type="text" lay-affix="clear" id="enterpriseName" name="enterpriseName" <input type="text" lay-affix="clear" id="enterpriseName" name="enterpriseName"
autocomplete="off" class="layui-input" lay-verify="required" maxlength="20"> autocomplete="off" class="layui-input" lay-verify="required" maxlength="20">
</div> </div>
</div> </div>-->
<div class="layui-form-item" style="width: 90%"> <div class="layui-form-item" style="width: 90%">
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>身份证号码:</label> <label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>身份证号码:</label>
<div class="layui-input-inline" style="width: 60%"> <div class="layui-input-inline" style="width: 60%">
@ -82,8 +82,9 @@
<div class="layui-form-item" style="width: 90%"> <div class="layui-form-item" style="width: 90%">
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>系统角色:</label> <label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>系统角色:</label>
<div class="layui-input-inline" style="width: 60%"> <div class="layui-input-inline" style="width: 60%">
<select id="roleId" name="roleId" class="layui-select" lay-search lay-verify="required" <select id="roleId" name="roleId" class="layui-select" lay-filter="changeOrg" lay-search lay-verify="required"
style="height: 360px;"></select> style="height: 360px;"></select>
</div> </div>
</div> </div>
@ -91,7 +92,7 @@
<label class="layui-form-label" style="width: 150px"><span <label class="layui-form-label" style="width: 150px"><span
style="color: red">*</span>所属项目/部门:</label> style="color: red">*</span>所属项目/部门:</label>
<div class="layui-input-inline" style="width: 60%"> <div class="layui-input-inline" style="width: 60%">
<select id="deptId" name="deptId" class="layui-select" lay-search lay-verify="required" <select id="deptId" name="deptId" class="layui-select" lay-filter="changeOrg" lay-search lay-verify="required"
style="height: 360px;"></select> style="height: 360px;"></select>
</div> </div>
</div> </div>
@ -119,25 +120,20 @@
let alreadyChooseTrees = []; let alreadyChooseTrees = [];
let selectData = []; let selectData = [];
layui.use(['table', 'form', 'tree'], function () { layui.use(['table', 'form', 'tree'], function () {
getRoleSelect();
getDeptSelect();
function setSelectValue(list, selectName, code, nameCode) { function setSelectValue(list, selectName) {
let html = '<option value="">请选择</option>'; let html = '<option value="">请选择</option>';
if (list && list.length > 0) { if (list && list.length > 0) {
$.each(list, function (index, item) { $.each(list, function (index, item) {
html += //html += "<option value='" + item[code] + "' item='" + JSON.stringify(item) + "'>" + item[nameCode] + "</option>";
"<option value='" + html += "<option value='" + item.id + "'>" + item.name + "</option>";
item[code] +
"' item='" +
JSON.stringify(item) +
"'>" +
item[nameCode] +
"</option>";
}); });
} }
$("#" + selectName)
.empty() $('#' + selectName).empty().append(html);
.append(html); layui.form.render('select');
layui.form.render();
} }
@ -147,7 +143,7 @@
url: ctxPath + '/evaluatePerson/getRoleSelect', url: ctxPath + '/evaluatePerson/getRoleSelect',
async: false, async: false,
success: function (data) { success: function (data) {
setSelectValue(data.obj, "personInChargeId", "id", "roleId"); setSelectValue(data, 'roleId');
} }
}); });
} }
@ -157,7 +153,7 @@
url: ctxPath + '/evaluatePerson/getDeptSelect', url: ctxPath + '/evaluatePerson/getDeptSelect',
async: false, async: false,
success: function (data) { success: function (data) {
setSelectValue(data.obj, "personInChargeId", "id", "deptId"); setSelectValue(data, 'deptId');
} }
}); });
} }
@ -396,4 +392,4 @@
} }
</script> </script>