e87b7c45 by yangjianbin

init

1 parent c7afd550
......@@ -160,13 +160,61 @@
layer_show('重置密码', '<?=site_url('perm/reset');?>');
}
function on_off(id) {
layer.confirm('您确定要冻结/解冻这个员工账号吗?', {
function freeze(id) {
layer.confirm('您确定要冻结这个员工账号吗?', {
btn: ['确认','取消'],
title: '冻结/解冻',
title: '冻结',
icon: 3
}, function(){
layer.msg('冻结/解冻成功');
$.ajax({
type: 'put',
url: apiBaseUrl + 'system/user/freeze/' + id,
cache: false,
dataType: 'json',
data: JSON.stringify(data),
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('操作失败');
} else {
layer.msg('冻结成功');
}
},
error: function () {
layer.alert("请求失败")
}
})
});
}
function unfreeze(id) {
layer.confirm('您确定要解冻这个员工账号吗?', {
btn: ['确认','取消'],
title: '解冻',
icon: 3
}, function(){
$.ajax({
type: 'put',
url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(),
cache: false,
dataType: 'json',
data: JSON.stringify(data),
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('操作失败');
} else {
layer.msg('解冻成功');
}
},
error: function () {
layer.alert("请求失败")
}
})
});
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!