状态审核 + 后台单身页面优化
This commit is contained in:
parent
7fec6bd9b4
commit
e0b7fb7086
|
|
@ -67,6 +67,14 @@
|
|||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('system:single:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('system:single:remove')}]];
|
||||
// -- 字典部分
|
||||
var sexDict = [[${@dict.getType('single_sex')}]];
|
||||
var statusDict = [[${@dict.getType('single_status')}]];
|
||||
var educationDict = [[${@dict.getType('education_type')}]];
|
||||
var houseDict = [[${@dict.getType('house_type')}]];
|
||||
var carDict = [[${@dict.getType('car_type')}]];
|
||||
var marryDict = [[${@dict.getType('marry_type')}]];
|
||||
// --
|
||||
var prefix = ctx + "system/single";
|
||||
|
||||
$(function() {
|
||||
|
|
@ -100,7 +108,19 @@
|
|||
},
|
||||
{
|
||||
field: 'sex',
|
||||
title: '性别:'
|
||||
title: '性别:',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(sexDict, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '审核状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDict, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'birthday',
|
||||
|
|
@ -108,15 +128,19 @@
|
|||
},
|
||||
{
|
||||
field: 'height',
|
||||
title: '身高(单位cm)'
|
||||
title: '身高(cm)'
|
||||
},
|
||||
{
|
||||
field: 'weight',
|
||||
title: '体重(单位KG)'
|
||||
title: '体重(KG)'
|
||||
},
|
||||
{
|
||||
field: 'education',
|
||||
title: '学历'
|
||||
title: '学历',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(educationDict, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'school',
|
||||
|
|
@ -124,7 +148,11 @@
|
|||
},
|
||||
{
|
||||
field: 'marriage',
|
||||
title: '婚姻状况'
|
||||
title: '婚姻状况',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(marryDict, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'job',
|
||||
|
|
@ -140,45 +168,64 @@
|
|||
},
|
||||
{
|
||||
field: 'provinceId',
|
||||
title: '省份'
|
||||
title: '省份',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'cityId',
|
||||
title: '城市'
|
||||
title: '城市',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'houseProperty',
|
||||
title: '房产'
|
||||
title: '房产',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(houseDict, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'carProperty',
|
||||
title: '轿车'
|
||||
title: '轿车',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(carDict, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'selfIntroduce',
|
||||
title: '自我介绍'
|
||||
title: '自我介绍',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'familyBackground',
|
||||
title: '家庭背景'
|
||||
title: '家庭背景',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'hobby',
|
||||
title: '业务爱好'
|
||||
title: '业务爱好',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'choosingStandard',
|
||||
title: '择偶标准'
|
||||
title: '择偶标准',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '内心独白'
|
||||
title: '内心独白',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
if(row.status === 0 || row.status === 2){
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="checkPass(\'' + row.id + '\')"><i class="fa fa-edit"></i>通过</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="checkReject(\'' + row.id + '\')"><i class="fa fa-edit"></i>拒绝</a> ');
|
||||
}
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
|
|
@ -187,6 +234,18 @@
|
|||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function checkPass(id) {
|
||||
$.modal.confirm("确认通过吗?", function() {
|
||||
$.operate.post(prefix + "/edit", { "id": id, "status": 1 });
|
||||
})
|
||||
}
|
||||
|
||||
function checkReject(id) {
|
||||
$.modal.confirm("确认拒绝吗?", function() {
|
||||
$.operate.post(prefix + "/edit", { "id": id, "status": 2 });
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -141,6 +141,10 @@ public class TbUserSingle extends BaseEntity
|
|||
@ApiModelProperty(value = "择偶标准")
|
||||
private String choosingStandard;
|
||||
|
||||
@Excel(name = "状态")
|
||||
@ApiModelProperty(value = "审核状态 0.待审核 1.审核通过 2.审核拒绝")
|
||||
private Integer status;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "用户各图片附件信息")
|
||||
private List<TbUserImg> tbUserImgList;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<result property="nickName" column="nick_name" />
|
||||
<result property="realName" column="real_name" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="status" column="status" />
|
||||
<result property="birthday" column="birthday" />
|
||||
<result property="height" column="height" />
|
||||
<result property="weight" column="weight" />
|
||||
|
|
@ -33,7 +34,7 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectTbUserSingleVo">
|
||||
select id, user_id, nick_name, real_name, sex, birthday, height, weight, education, school, marriage, job, income, native_place, province_id, city_id, house_property, car_property, self_introduce, family_background, hobby, choosing_standard, create_time, update_time, remark from tb_user_single
|
||||
select id, user_id, nick_name, real_name, sex, status, birthday, height, weight, education, school, marriage, job, income, native_place, province_id, city_id, house_property, car_property, self_introduce, family_background, hobby, choosing_standard, create_time, update_time, remark from tb_user_single
|
||||
</sql>
|
||||
|
||||
<select id="selectTbUserSingleList" parameterType="TbUserSingle" resultMap="TbUserSingleResult">
|
||||
|
|
@ -131,6 +132,7 @@
|
|||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="realName != null">real_name = #{realName},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="weight != null">weight = #{weight},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue