“7d9ff4081e3a0816cab4119dc146c73c576b71cd”上不存在“doc/design/mkl/mkldnn.md”
提交 88714d5c 编写于 作者: Skyeye云's avatar Skyeye云

feat: 员工状态获取修改为枚举类

上级 11bd2b46
...@@ -80,18 +80,10 @@ layui.config({ ...@@ -80,18 +80,10 @@ layui.config({
}}, }},
{ field: 'userIdCard', title: '身份证', rowspan: '3', align: 'center', width: 160 }, { field: 'userIdCard', title: '身份证', rowspan: '3', align: 'center', width: 160 },
{ field: 'userSex', title: '性别', width: 60, rowspan: '3', align: 'center', templet: function (d) { { field: 'userSex', title: '性别', width: 60, rowspan: '3', align: 'center', templet: function (d) {
if(d.userSex == '0'){ return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sexEnum", 'id', d.userSex, 'name');
return "保密";
} else if (d.userSex == '1'){
return "";
} else if (d.userSex == '2'){
return "";
} else {
return "参数错误";
}
}}, }},
{ field: 'state', title: '状态', rowspan: '3', width: 60, align: 'center', templet: function (d) { { field: 'state', title: '状态', rowspan: '3', width: 60, align: 'center', templet: function (d) {
return getStaffStateName(d); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("userStaffState", 'id', d.state, 'name');
}}, }},
{ title: '公司信息', align: 'center', colspan: '3'}, { title: '公司信息', align: 'center', colspan: '3'},
{ field: 'phone', title: '手机号', rowspan: '3', align: 'center', width: 100}, { field: 'phone', title: '手机号', rowspan: '3', align: 'center', width: 100},
......
...@@ -87,18 +87,10 @@ layui.config({ ...@@ -87,18 +87,10 @@ layui.config({
}}, }},
{ field: 'userIdCard', title: '身份证', rowspan: '3', align: 'center', width: 160 }, { field: 'userIdCard', title: '身份证', rowspan: '3', align: 'center', width: 160 },
{ field: 'userSex', title: '性别', width: 80, rowspan: '3', align: 'center', templet: function (d) { { field: 'userSex', title: '性别', width: 80, rowspan: '3', align: 'center', templet: function (d) {
if(d.userSex == '0'){ return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sexEnum", 'id', d.userSex, 'name');
return "保密"; }},
} else if (d.userSex == '1'){
return "";
} else if (d.userSex == '2'){
return "";
} else {
return "参数错误";
}
}},
{ field: 'state', title: '状态', rowspan: '3', width: 60, align: 'center', templet: function (d) { { field: 'state', title: '状态', rowspan: '3', width: 60, align: 'center', templet: function (d) {
return getStaffStateName(d); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("userStaffState", 'id', d.state, 'name');
}}, }},
{ title: '公司信息', align: 'center', colspan: '3'}, { title: '公司信息', align: 'center', colspan: '3'},
{ field: 'phone', title: '手机号', rowspan: '3', align: 'center', width: 100}, { field: 'phone', title: '手机号', rowspan: '3', align: 'center', width: 100},
......
...@@ -53,18 +53,10 @@ layui.config({ ...@@ -53,18 +53,10 @@ layui.config({
} }
}}, }},
{ field: 'userSex', title: '性别', width: 60, rowspan: '3', align: 'center', templet: function (d) { { field: 'userSex', title: '性别', width: 60, rowspan: '3', align: 'center', templet: function (d) {
if(d.userSex == '0'){ return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sexEnum", 'id', d.userSex, 'name');
return "保密"; }},
} else if (d.userSex == '1'){
return "";
} else if (d.userSex == '2'){
return "";
} else {
return "参数错误";
}
}},
{ field: 'state', title: '状态', rowspan: '3', width: 60, align: 'center', templet: function (d) { { field: 'state', title: '状态', rowspan: '3', width: 60, align: 'center', templet: function (d) {
return getStaffStateName(d); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("userStaffState", 'id', d.state, 'name');
}}, }},
{ field: 'actWages', title: '月标准薪资(元)', rowspan: '3', align: 'left', width: 120}, { field: 'actWages', title: '月标准薪资(元)', rowspan: '3', align: 'left', width: 120},
{ title: '公司信息', align: 'center', colspan: '3'}, { title: '公司信息', align: 'center', colspan: '3'},
......
...@@ -53,18 +53,10 @@ layui.config({ ...@@ -53,18 +53,10 @@ layui.config({
} }
}}, }},
{ field: 'userSex', title: '性别', width: 60, rowspan: '3', align: 'center', templet: function (d) { { field: 'userSex', title: '性别', width: 60, rowspan: '3', align: 'center', templet: function (d) {
if(d.userSex == '0'){ return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sexEnum", 'id', d.userSex, 'name');
return "保密"; }},
} else if (d.userSex == '1'){
return "";
} else if (d.userSex == '2'){
return "";
} else {
return "参数错误";
}
}},
{ field: 'state', title: '状态', rowspan: '3', width: 60, align: 'center', templet: function (d) { { field: 'state', title: '状态', rowspan: '3', width: 60, align: 'center', templet: function (d) {
return getStaffStateName(d); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("userStaffState", 'id', d.state, 'name');
}}, }},
{ title: '公司信息', align: 'center', colspan: '3'}, { title: '公司信息', align: 'center', colspan: '3'},
{ field: 'phone', title: '手机号', rowspan: '3', align: 'center', width: 100}, { field: 'phone', title: '手机号', rowspan: '3', align: 'center', width: 100},
......
...@@ -740,25 +740,6 @@ function uploadImg(file, Editor) { ...@@ -740,25 +740,6 @@ function uploadImg(file, Editor) {
}); });
} }
/**
* 获取员工状态
* @param d 员工参数
* @returns {string}
*/
function getStaffStateName(d) {
if(d.state == '1'){
return "<span class='state-up'>在职</span>";
} else if (d.state == '2'){
return "<span class='state-down'>离职</span>";
} else if (d.state == '3'){
return "见习";
} else if (d.state == '4'){
return "试用";
} else if (d.state == '5'){
return "退休";
}
}
/** /**
* 判断一个值是否在指定的集合中存在 * 判断一个值是否在指定的集合中存在
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册