提交 9633dd14 authored 作者: zhengfg's avatar zhengfg

完善用户模块

上级 cbdea021
...@@ -487,17 +487,27 @@ linkFormat = function (cellvalue, options, rowObject) { ...@@ -487,17 +487,27 @@ linkFormat = function (cellvalue, options, rowObject) {
* @returns {string} * @returns {string}
*/ */
sexFormat = function (cellvalue) { sexFormat = function (cellvalue) {
var returnStr = "未知"; /* var returnStr = "未知";
if (!!cellvalue||cellvalue == '0') { if (!!cellvalue) {
if (cellvalue == '1') { if (cellvalue == '0') {
returnStr = "男"; returnStr = "男";
} else if (cellvalue == '2') { } else if (cellvalue == '1') {
returnStr = "女"; returnStr = "女";
} else if (cellvalue == '0') {
returnStr = "未知";
} }
} }*/
return returnStr; return cellvalue==0?'男':'女';
};
moneyFormat = function (cellvalue) {
/* var returnStr = "未知";
if (!!cellvalue) {
if (cellvalue == '0') {
returnStr = "男";
} else if (cellvalue == '1') {
returnStr = "女";
}
}*/
return '$'+cellvalue;
}; };
/** /**
* 有效无效过期翻译 * 有效无效过期翻译
...@@ -581,14 +591,14 @@ userTypeFormat = function (cellvalue) { ...@@ -581,14 +591,14 @@ userTypeFormat = function (cellvalue) {
* @param cellvalue * @param cellvalue
*/ */
yesOrNoFormat = function (cellvalue) { yesOrNoFormat = function (cellvalue) {
var returnStr = "空"; var returnStr;
if (!!cellvalue||cellvalue == '0') {
if (cellvalue == '1') { if (cellvalue == '1') {
returnStr = "是"; returnStr = "是";
} else if (cellvalue == '0') { } else {
returnStr = "否"; returnStr = "否";
} }
}
return returnStr; return returnStr;
}; };
/** /**
......
...@@ -5,7 +5,7 @@ $(function () { ...@@ -5,7 +5,7 @@ $(function () {
{label: 'contactId', name: 'contactId', index: 'contact_id', key: true, hidden: true}, {label: 'contactId', name: 'contactId', index: 'contact_id', key: true, hidden: true},
{label: '联系方式', name: 'contactWay', index: 'contact_way', width: 80}, {label: '联系方式', name: 'contactWay', index: 'contact_way', width: 80},
{label: '联系详情', name: 'contactDetail', index: 'contact_detail', width: 80}, {label: '联系详情', name: 'contactDetail', index: 'contact_detail', width: 80},
{label: '是否有效', name: 'enableFlag', index: 'enable_flag', width: 80}] {label: '是否有效', name: 'enableFlag', index: 'enable_flag', width: 80,formatter:yesOrNoFormat}]
}); });
}); });
......
...@@ -3,27 +3,27 @@ $(function () { ...@@ -3,27 +3,27 @@ $(function () {
url: '../tbcfuserinfo/list', url: '../tbcfuserinfo/list',
colModel: [ colModel: [
{label: 'userId', name: 'userId', index: 'user_id', key: true, hidden: true}, {label: 'userId', name: 'userId', index: 'user_id', key: true, hidden: true},
{label: '用户编号', name: 'userNo', index: 'user_no', width: 120}, {label: '用户编号', name: 'userNo', index: 'user_no', width: 160},
{label: '用户类型', name: 'userType', index: 'user_type', width: 80,formatter:userTypeFormat}, {label: '用户类型', name: 'userType', index: 'user_type', width: 80,formatter:userTypeFormat},
{label: '账号', name: 'account', index: 'account', width: 120}, {label: '账号', name: 'account', index: 'account', width: 120},
{label: '用户头像地址', name: 'avatar', index: 'avatar', width: 100,formatter:imageFormat}, {label: '用户头像地址', name: 'avatar', index: 'avatar', width: 100,formatter:imageFormat},
{label: '用户名', name: 'nick', index: 'nick', width: 80}, {label: '用户名', name: 'nick', index: 'nick', width: 80},
{label: '下单次数', name: 'count', index: 'count', width: 80}, {label: '下单次数', name: 'count', index: 'count', width: 80},
{label: '总金额', name: 'total', index: 'total', width: 80}, {label: '总金额', name: 'total', index: 'total', width: 80,formatter:moneyFormat},
{label: '使用优惠券次数', name: 'num', index: 'num', width: 100}, {label: '使用优惠券次数', name: 'num', index: 'num', width: 80},
{label: '电话号码', name: 'phone', index: 'phone', width: 100}, {label: '电话号码', name: 'phone', index: 'phone', width: 100},
{label: '是否绑定手机', name: 'phoneFlag', index: 'phone_flag', width: 80,formatter:yesOrNoFormat}, {label: '是否绑定手机', name: 'phoneFlag', index: 'phone_flag', width: 80,formatter:yesOrNoFormat},
{label: '密码', name: 'password', index: 'password', width: 80, hidden: true}, {label: '密码', name: 'password', index: 'password', width: 80, hidden: true},
{label: '上一次登录时间', name: 'lastLoginTime', index: 'last_login_time', width: 120}, {label: '上一次登录时间', name: 'lastLoginTime', index: 'last_login_time', width: 120},
{label: '上一次登录IP', name: 'lastLoginIp', index: 'last_login_ip', width: 80}, {label: '上一次登录IP', name: 'lastLoginIp', index: 'last_login_ip', width: 80},
{label: '登录次数', name: 'loginCount', index: 'login_count', width: 60}, {label: '登录次数', name: 'loginCount', index: 'login_count', width: 60},
{label: '邮箱', name: 'email', index: 'email', width: 80}, {label: '邮箱', name: 'email', index: 'email', width: 120},
{label: 'facebook账号', name: 'facebook', index: 'facebook', width: 120}, {label: 'facebook账号', name: 'facebook', index: 'facebook', width: 120},
{label: '创建时间', name: 'createTime', index: 'create_time', width: 120}, {label: '创建时间', name: 'createTime', index: 'create_time', width: 120},
{label: '性别', name: 'sex', index: 'sex', width: 120,formatter:sexFormat}, {label: '性别', name: 'sex', index: 'sex', width: 80,formatter:sexFormat},
{label: '默认地址id', name: 'defaultAddressId', index: 'default_address_id', width: 120}, {label: '默认地址id', name: 'defaultAddressId', index: 'default_address_id', width: 200},
{label: '发出邀请的用户', name: 'invitedUserId', index: 'invited_user_id', width: 120}, {label: '邀请用户', name: 'invitedUserId', index: 'invited_user_id', width: 120},
{label: '总共邀请数量', name: 'invitedCount', index: 'invited_count', width: 80}, {label: '邀请人数', name: 'invitedCount', index: 'invited_count', width: 80},
{label: '是否有效', name: 'enableFlag', index: 'enable_flag', width: 60,formatter:yesOrNoFormat}, {label: '是否有效', name: 'enableFlag', index: 'enable_flag', width: 60,formatter:yesOrNoFormat},
{label: '邮箱是否已经验证', name: 'emailFlag', index: 'email_flag', width: 80,formatter:yesOrNoFormat}] {label: '邮箱是否已经验证', name: 'emailFlag', index: 'email_flag', width: 80,formatter:yesOrNoFormat}]
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论