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

Commit ed187d45 authored by dongchun's avatar dongchun

新增积分管理页面

parent 1faac76d
...@@ -26,16 +26,16 @@ import java.util.List; ...@@ -26,16 +26,16 @@ import java.util.List;
@RequestMapping("local") @RequestMapping("local")
public class LocalAdminController extends BaseController public class LocalAdminController extends BaseController
{ {
private String prefix = "zhengzai/integral"; private String prefix = "zhengzai/stone";
@Autowired @Autowired
private IAdamUserAdminService adamUserService; private IAdamUserAdminService adamUserService;
@GetMapping("/integralDetail") @GetMapping("/integralList")
public String integralDetail() public String integralList()
{ {
return prefix + "/integralDetail"; return prefix + "/integralList";
} }
@GetMapping("/integralStore") @GetMapping("/integralStore")
public String integralStore() public String integralStore()
...@@ -52,5 +52,10 @@ public class LocalAdminController extends BaseController ...@@ -52,5 +52,10 @@ public class LocalAdminController extends BaseController
{ {
return prefix + "/integralOrder"; return prefix + "/integralOrder";
} }
@GetMapping("/integralDetail")
public String integralDetail()
{
return prefix + "/integralDetail";
}
} }
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</div> </div>
<div class="bottom_btn"> <div class="bottom_btn">
<!-- <button type="button" class="layui-btn btn btn-primary" lay-filter="formDemo" onclick="create()">创建代金券</button> --> <!-- <button type="button" class="layui-btn btn btn-primary" lay-filter="formDemo" onclick="create()">创建代金券</button> -->
<button type="button" class="btn btn-primary" onclick="create()">创建代金券111</button> <button type="button" class="btn btn-primary" onclick="create()">创建代金券</button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -12,7 +12,15 @@ ...@@ -12,7 +12,15 @@
<ul> <ul>
<input type="hidden" name="couType" th:value="${couType}"/> <input type="hidden" name="couType" th:value="${couType}"/>
<li> <li>
<input type="text" name="keyword" placeholder="搜索"/> <input type="text" name="mobile" placeholder="请输入手机号码"/>
</li>
<li>
状态:
<select name="status" id="">
<option value="0">全部</option>
<option value="1">正常</option>
<option value="2">冻结</option>
</select>
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
...@@ -24,7 +32,7 @@ ...@@ -24,7 +32,7 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export"> <a class="btn btn-warning" onclick="exportSelected()" shiro:hasPermission="monitor:job:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
</div> </div>
...@@ -38,7 +46,8 @@ ...@@ -38,7 +46,8 @@
<script th:inline="javascript"> <script th:inline="javascript">
var dicCouponBusiType = [[${@dict.getType('zhengzai_coupon_busi_type')}]]; var dicCouponBusiType = [[${@dict.getType('zhengzai_coupon_busi_type')}]];
var dicCouponBindType = [[${@dict.getType('zhengzai_coupon_bind_type')}]]; var dicCouponBindType = [[${@dict.getType('zhengzai_coupon_bind_type')}]];
var prefix = ctx + "candy/coupon/mgt"; var prefix = ctx + "stone/logs";
var prefix2 = ctx + "local";
var viewMgtCouponFlag = [[${@permission.hasPermi('candy:coupon:mgt:detail')}]]; var viewMgtCouponFlag = [[${@permission.hasPermi('candy:coupon:mgt:detail')}]];
var cancelMgtCouponFlag = [[${@permission.hasPermi('candy:coupon:mgt:cancel')}]]; var cancelMgtCouponFlag = [[${@permission.hasPermi('candy:coupon:mgt:cancel')}]];
...@@ -48,74 +57,101 @@ ...@@ -48,74 +57,101 @@
$(function () { $(function () {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add/{id}", detailUrl: prefix + "/integralStoreEdit?id={id}",
detailUrl: prefix + "/detail/" + couType + "/{id}",
removeUrl: prefix + "/cancel/{id}", removeUrl: prefix + "/cancel/{id}",
// updateUrl: prefix + "/edit/{id}", // updateUrl: prefix + "/edit/{id}",
// exportUrl: prefix + "/export", // exportUrl: prefix + "/export",
sortName: "createdAt", sortName: "createdAt",
sortOrder: "desc", sortOrder: "desc",
modalName: "代金券", modalName: "积分",
columns: [ columns: [
{ {
checkbox: true checkbox: true
}, },
{ {
field: 'valFace', field: 'nickName',
title: '呢称', title: '呢称'
formatter: function (value, row, index) {
return '¥' + value;
}
}, },
{ {
field: 'eventAmt', field: 'mobile',
title: '手机号' title: '手机号'
}, },
{ {
field: 'bindType', field: 'scoreAll',
title: '总积分', title: '总积分'
formatter: function(value, row, index) {
return $.table.selectDictLabel(dicCouponBindType, value);
}
}, },
{ {
field: 'busiType', field: 'scoreUse',
title: '已使用积分', title: '已使用积分'
formatter: function(value, row, index) {
return $.table.selectDictLabel(dicCouponBusiType, value);
}
}, },
{ {
field: 'title', field: 'scoreRest',
title: '剩余积分' title: '剩余积分'
}, },
{ {
field: 'notice', field: 'status',
title: '积分状态' title: '积分状态',
formatter: function (value, row, index) {
if (value == 0) {
return "全部"
} else if (value == 1) {
return "正常"
} else {
return "冻结"
}
}
}, },
{ {
title: '操作', title: '操作',
// align: 'center', // align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
let dataArr = []; let dataArr = [];
return `<span class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="openModal('${index}')"><i class="fa fa-search"></i>查看</span> dataArr.push(`<span class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="$.operate.detailTab('${row.uid}')"><i class="fa fa-search"></i>查看</span>`)
<span class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="openModal('${index}')"><i class="fa fa-search"></i>加入黑名单</span>` if (row.status == 1) {
dataArr.push(`<span class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="openModal('${row.uid}', 2, '冻结后,用户将不可使用积分功能')">冻结</span>`)
} else if (row.status == 2) {
dataArr.push(`<span class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="openModal('${row.uid}', 1, '移除冻结后,用户积分账户立即恢复正常使用')">移除冻结</span>`)
}
return dataArr.join(' ')
} }
}] }]
}; };
$.table.init(options); $.table.init(options);
}); });
/* 查看码列表 */ function openModal(uid, status, title) {
function couponCodeList(couponId) { $.modal.confirm(title, function() {
var url = 'candy/coupon/code?couponId=' + couponId; let data = {
$.modal.openTab("积分明细列表", url); status,
uid
}
$.ajax({
type: 'put',
url: prefix + '/change/status',
data,
success:function(e) {
console.log(e)
}
})
});
}
// 导出数据
function exportSelected() {
var userIds = $.table.selectColumns("uid");
var dataParam = $("#export-form").serializeArray();
var tipMsg = "确定导出所有数据吗?";
if($.common.isNotEmpty(userIds)){
tipMsg = "确定导出勾选" + userIds.length + "条数据吗?";
dataParam.push({ "name": "uid", "value": userIds });
} }
function openModal(id) { $.modal.confirm(tipMsg, function() {
// console.log('111111') $.post('demo/table/exportData', dataParam, function(result) {
$.modal.confirm("加入黑名单后,用户将不可使用积分功能", function() { if (result.code == web_status.SUCCESS) {
console.log(12121212) window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
// $.operate.post(prefix + "/edit_onsale", { "memberId": memberId, "onsale": 2 }); } else {
$.modal.alertError(result.msg);
}
});
}); });
} }
</script> </script>
......
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