新增项目,班组,评价人
This commit is contained in:
parent
fdb03066f9
commit
3824763a71
|
|
@ -2,10 +2,35 @@
|
|||
<!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">
|
||||
<insert id="addData">
|
||||
insert into pm_org_info(name, level, parent_id, user_name, user_id, id_card,
|
||||
sex, user_phone, status, org_type, lk_id, table_source)
|
||||
values (#{name}, #{level}, #{parentId}, #{userName}, #{userId}, #{idCard},
|
||||
#{sex}, #{userPhone}, 1, #{orgType}, #{lkId}, #{tableSource})
|
||||
insert into pm_org_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<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 id="addDepartData" useGeneratedKeys="true" keyProperty="addId">
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@
|
|||
|
||||
<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>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
<input type="text" lay-affix="clear" id="enterpriseName" name="enterpriseName"
|
||||
autocomplete="off" class="layui-input" lay-verify="required" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-form-item" style="width: 90%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>身份证号码:</label>
|
||||
<div class="layui-input-inline" style="width: 60%">
|
||||
|
|
@ -82,8 +82,9 @@
|
|||
<div class="layui-form-item" style="width: 90%">
|
||||
<label class="layui-form-label" style="width: 150px"><span style="color: red">*</span>系统角色:</label>
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -91,7 +92,7 @@
|
|||
<label class="layui-form-label" style="width: 150px"><span
|
||||
style="color: red">*</span>所属项目/部门:</label>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -119,25 +120,20 @@
|
|||
let alreadyChooseTrees = [];
|
||||
let selectData = [];
|
||||
layui.use(['table', 'form', 'tree'], function () {
|
||||
getRoleSelect();
|
||||
getDeptSelect();
|
||||
|
||||
function setSelectValue(list, selectName, code, nameCode) {
|
||||
function setSelectValue(list, selectName) {
|
||||
let html = '<option value="">请选择</option>';
|
||||
if (list && list.length > 0) {
|
||||
$.each(list, function (index, item) {
|
||||
html +=
|
||||
"<option value='" +
|
||||
item[code] +
|
||||
"' item='" +
|
||||
JSON.stringify(item) +
|
||||
"'>" +
|
||||
item[nameCode] +
|
||||
"</option>";
|
||||
//html += "<option value='" + item[code] + "' item='" + JSON.stringify(item) + "'>" + item[nameCode] + "</option>";
|
||||
html += "<option value='" + item.id + "'>" + item.name + "</option>";
|
||||
});
|
||||
}
|
||||
$("#" + selectName)
|
||||
.empty()
|
||||
.append(html);
|
||||
layui.form.render();
|
||||
|
||||
$('#' + selectName).empty().append(html);
|
||||
layui.form.render('select');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -147,7 +143,7 @@
|
|||
url: ctxPath + '/evaluatePerson/getRoleSelect',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
setSelectValue(data.obj, "personInChargeId", "id", "roleId");
|
||||
setSelectValue(data, 'roleId');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -157,7 +153,7 @@
|
|||
url: ctxPath + '/evaluatePerson/getDeptSelect',
|
||||
async: false,
|
||||
success: function (data) {
|
||||
setSelectValue(data.obj, "personInChargeId", "id", "deptId");
|
||||
setSelectValue(data, 'deptId');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -396,4 +392,4 @@
|
|||
}
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue