记得上下班打卡 | git大法好,push需谨慎

Commit 1a8dc0d6 authored by liuran's avatar liuran

添加代理管理模块

parent 1f490023
...@@ -2,6 +2,42 @@ ...@@ -2,6 +2,42 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('待审核列表')"/> <th:block th:include="include :: header('待审核列表')"/>
<style>
#addClassify, #detailPro {
display: none;
width: 800px;
padding-top: 20px;
}
#addClassify .selectClassify {
display: flex;
align-items: center;
padding: 0 20px;
}
#addClassify .selectClassify label {
display: flex;
margin-right: 20px;
align-items: center;
}
#addClassify .selectClassify label input {
margin: 0;
margin-right: 2px;
}
#detailPro .detail_inner {
margin-bottom: 20px;
}
#detailPro .detail_title {
margin-top: 50px;
font-weight: bold;
font-size: 16px;
}
.form-group span {
padding-right: 20px;
}
.bottomBtn {
text-align: left;
padding: 10px 15px 12px;
}
</style>
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
...@@ -27,42 +63,56 @@ ...@@ -27,42 +63,56 @@
<div class="col-sm-12 select-table table-bordered"> <div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
</div> </div>
<div id="addClassify">
<div class="selectClassify">
<div class="ibox-content">
<div class="form-group"></div>
</div>
</div>
<input type="hidden" class="editCon">
<div class="bottomBtn">
<a href="javascript:;" class="layui-layer-btn0" onclick="yes(1)">保存</a>
</div>
</div>
</div> </div>
</div> </div>
<th:block th:include="include :: footer"/> <th:block th:include="include :: footer"/>
<script th:inline="javascript"> <script th:inline="javascript">
var detailFlag = [[${@permission.hasPermi('smile:userPendingList:detail')}]]; var detailFlag = [[${@permission.hasPermi('smile:userPendingList:detail')}]];
var smilePrefix = ctx + "smile/user"; var smilePrefix = ctx + "smile/show";
// // createUrl: prefix + "/add", // // createUrl: prefix + "/add",
// // updateUrl: prefix + "/edit/{id}", // // updateUrl: prefix + "/edit/{id}",
// // removeUrl: prefix + "/remove", // // removeUrl: prefix + "/remove",
// // exportUrl: prefix + "/export", // // exportUrl: prefix + "/export",
// // modalName: "订单", // // modalName: "订单",
var subOArr = [];
$(function() { $(function() {
var options = { var options = {
url: smilePrefix + "/check/list", url: smilePrefix + "/list",
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{ {
field: 'id', field: 'performancesId',
title: '用户id' title: '演出id'
}, },
{ {
field: 'img', field: 'title',
title: '生活照', title: '演出名称',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.imageView(value,"300", "300"); return $.table.imageView(value,"300", "300");
} }
}, },
{ {
field: 'name', field: 'cityName',
title: '姓名' title: '城市'
}, },
{ {
field: 'sex', field: 'open',
title: '性别', title: '总销售数量',
formatter: function(value, row, index) { formatter: function(value, row, index) {
if (value == 1) { if (value == 1) {
return '男'; return '男';
...@@ -72,55 +122,40 @@ ...@@ -72,55 +122,40 @@
} }
}, },
{ {
field: 'birthday', field: 'totalSalePrice',
title: '年龄' title: '总销售金额'
}, },
{ {
field: 'phone', field: 'totalOutAgent',
title: '手机号' title: '总售出代理'
}, },
{ {
field: 'identity', field: 'appStatus',
title: '身份', title: '演出状态',
formatter: function(value, row, index) { formatter: function(value, row, index) {
if (value == 1) { // if (value == 1) {
return '在校学生'; // return '在校学生';
} else { // } else {
return '已毕业'; // return '已毕业';
} // }
} }
}, },
{ {
field: 'schoolName', field: 'status',
title: '学校/公司名称' title: '打款状态'
}, },
{ {
field: 'area', field: 'area',
title: '地区' title: '序列'
},
{
field: 'type',
title: '状态',
formatter: function(value, row, index) {
if (value == 0) {
return '未审核';
} else if (value == 1) {
return '总代';
} else if (value == 2) {
return '普代';
} else if (value == 3) {
return '未认证';
} else {
return '';
}
}
}, },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="toDetail(\'' + row.uid + '\')"><i class="fa fa-edit"></i>查看</a> '); actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="toPop(\'' + row.performancesId + '\')"><i class="fa fa-edit"></i>设置票提</a> ');
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="editPop(\'' + row.performancesId + '\')"><i class="fa fa-edit"></i>编辑票提</a> ');
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="toDetail(\'' + row.performancesId + '\')"><i class="fa fa-edit"></i>查看</a> ');
return actions.join(''); return actions.join('');
} }
}] }]
...@@ -134,6 +169,102 @@ ...@@ -134,6 +169,102 @@
var url = '/local/smilePendingDetail'; var url = '/local/smilePendingDetail';
$.modal.openTab("待审核详情", url); $.modal.openTab("待审核详情", url);
} }
function yes() {
let postData = [];
for (var i in subOArr) {
postData.push({
delTag: subOArr[i].delTag,
id: subOArr[i].id,
ordCarry: Number($('.ticketsti' + i).find('.normal').val()) / 100,
performanceId: subOArr[i].performanceId,
ticketId: subOArr[i].ticketId,
totalCarry: Number($('.ticketsti' + i).find('.total').val()) / 100,
});
}
$.ajax({
type: 'post',
url: ctx + 'smile/agent/create',
headers:{"Content-Type":"application/json;charset=UTF-8"},
data: JSON.stringify(postData),
success:function(e) {
$(".layui-layer-close1").click();
}
});
}
function editPop(id) {
$('#addClassify .form-group').html('');
layer.open({
type: 1,
shade: true,
title: '设置票提', //不显示标题
content: $('#addClassify'), //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
success: function () {
let postData = {
performancesId: id
}
$.ajax({
type: 'post',
url: ctx + 'smile/agent/list?performancesId=' + id,
headers:{"Content-Type":"application/json;charset=UTF-8"},
success:function(e) {
subOArr = e.data;
for (var i in e.data) {
$('#addClassify .form-group').append(
'<div class="ticketsti' + i + '">' +
'<p>' + e.data[i].title + '</p>' +
'<p>票提设置</p>' +
'<span>总代<input type="text" class="total" value="' + Number(e.data[i].totalCarry) * 100 + '">%</span>' +
'<span>普代<input type="text" class="normal" value="' + Number(e.data[i].ordCarry) * 100 + '">%</span>' +
'</div>'
)
}
}
});
},
cancel: function(res){
// layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', {time: 5000, icon:6});
}
});
}
function toPop(id) {
$('#addClassify .form-group').html('');
layer.open({
type: 1,
shade: true,
title: '设置票提', //不显示标题
content: $('#addClassify'), //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
success: function () {
let postData = {
performancesId: id
}
$.ajax({
type: 'post',
url: ctx + 'smile/agent/list?performancesId=' + id,
headers:{"Content-Type":"application/json;charset=UTF-8"},
success:function(e) {
subOArr = e.data;
for (var i in e.data) {
$('#addClassify .form-group').append(
'<div class="ticketsti' + i + '">' +
'<p>' + e.data.title + '</p>' +
'<p>票提设置</p>' +
'<span>总代<input type="text" class="total">%</span>' +
'<span>普代<input type="text" class="normal">%</span>' +
'</div>'
)
}
// console.log(e);
}
});
},
cancel: function(res){
// layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', {time: 5000, icon:6});
}
});
}
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment