活动管理-抽奖次数消费信息列表修改
This commit is contained in:
parent
4784b6e74a
commit
84699a9412
|
|
@ -510,6 +510,21 @@ var table = {
|
||||||
});
|
});
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
},
|
},
|
||||||
|
// 回显活动名称
|
||||||
|
selectDrawname: function(datas, value) {
|
||||||
|
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
var actions = [];
|
||||||
|
$.each(datas, function(index, draw) {
|
||||||
|
if (draw.drawcode == ('' + value)) {
|
||||||
|
var listClass = $.common.equals("default", draw.listClass) || $.common.isEmpty(draw.listClass) ? "" : "badge badge-" + draw.listClass;
|
||||||
|
actions.push($.common.sprintf("<span class='%s'>%s</span>", listClass, draw.drawname));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return actions.join('');
|
||||||
|
},
|
||||||
// 回显数据字典(字符串数组)
|
// 回显数据字典(字符串数组)
|
||||||
selectDictLabels: function(datas, value, separator) {
|
selectDictLabels: function(datas, value, separator) {
|
||||||
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {
|
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ public interface DrawInfoMapper
|
||||||
*/
|
*/
|
||||||
public List<DrawInfo> selectDrawInfoList(DrawInfo drawInfo);
|
public List<DrawInfo> selectDrawInfoList(DrawInfo drawInfo);
|
||||||
|
|
||||||
|
List<DrawInfo> findDrawInfoList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增抽奖活动管理对象
|
* 新增抽奖活动管理对象
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,12 @@ public interface IDrawInfoService
|
||||||
*/
|
*/
|
||||||
public List<DrawInfo> selectDrawInfoList(DrawInfo drawInfo);
|
public List<DrawInfo> selectDrawInfoList(DrawInfo drawInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询活动列表-下拉用
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<DrawInfo> findDrawInfoList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增抽奖活动管理对象
|
* 新增抽奖活动管理对象
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import com.ruoyi.common.core.text.Convert;
|
||||||
* @author xlh
|
* @author xlh
|
||||||
* @date 2021-03-25
|
* @date 2021-03-25
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service("drawInfo")
|
||||||
public class DrawInfoServiceImpl implements IDrawInfoService
|
public class DrawInfoServiceImpl implements IDrawInfoService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -46,6 +46,11 @@ public class DrawInfoServiceImpl implements IDrawInfoService
|
||||||
return drawInfoMapper.selectDrawInfoList(drawInfo);
|
return drawInfoMapper.selectDrawInfoList(drawInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DrawInfo> findDrawInfoList() {
|
||||||
|
return drawInfoMapper.findDrawInfoList();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增抽奖活动管理对象
|
* 新增抽奖活动管理对象
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findDrawInfoList" resultMap="DrawInfoResult">
|
||||||
|
select DRAWID, DRAWCODE, DRAWTYPE, DRAWNAME from draw_info
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectDrawInfoById" parameterType="String" resultMap="DrawInfoResult">
|
<select id="selectDrawInfoById" parameterType="String" resultMap="DrawInfoResult">
|
||||||
SELECT
|
SELECT
|
||||||
i.DRAWID,
|
i.DRAWID,
|
||||||
|
|
|
||||||
|
|
@ -1,100 +1,111 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<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('抽奖次数消费信息列表')"/>
|
||||||
</head>
|
</head>
|
||||||
<body class="gray-bg">
|
<body class="gray-bg">
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 search-collapse">
|
<div class="col-sm-12 search-collapse">
|
||||||
<form id="formId">
|
<form id="formId">
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>活动代码:</label>
|
<label>活动代码:</label>
|
||||||
<input type="text" name="DRAWCODE"/>
|
<!-- <input type="text" name="DRAWCODE"/>-->
|
||||||
</li>
|
<select name="DRAWCODE" th:with="drawinfo=${@drawInfo.findDrawInfoList()}">
|
||||||
<li>
|
<option value="">所有</option>
|
||||||
<label>任务流水:</label>
|
<option th:each="drawInfo : ${drawinfo}" th:text="${drawInfo.DRAWNAME}"
|
||||||
<input type="text" name="TASKID"/>
|
th:value="${drawInfo.DRAWCODE}"></option>
|
||||||
</li>
|
</select>
|
||||||
<li>
|
</li>
|
||||||
<label>用户标识:</label>
|
<li>
|
||||||
<input type="text" name="USERID"/>
|
<label>任务流水:</label>
|
||||||
</li>
|
<input type="text" name="TASKID"/>
|
||||||
<li>
|
</li>
|
||||||
<label>次数类型:</label>
|
<li>
|
||||||
<select name="TYPE" th:with="type=${@dict.getType('drawType')}" style="width: 80px">
|
<label>用户标识:</label>
|
||||||
<option value="">所有</option>
|
<input type="text" name="USERID"/>
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
</li>
|
||||||
</select>
|
<li>
|
||||||
</li>
|
<label>次数类型:</label>
|
||||||
<!-- <li>-->
|
<select name="TYPE" th:with="type=${@dict.getType('drawType')}" style="width: 80px">
|
||||||
<!-- <label>使用次数:</label>-->
|
<option value="">所有</option>
|
||||||
<!-- <input type="text" name="CONSUMENUMBER"/>-->
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
<!-- </li>-->
|
th:value="${dict.dictValue}"></option>
|
||||||
<!-- <li>-->
|
</select>
|
||||||
<!-- <label>使用流水:</label>-->
|
</li>
|
||||||
<!-- <input type="text" name="TRANSEQNO"/>-->
|
<!-- <li>-->
|
||||||
<!-- </li>-->
|
<!-- <label>使用次数:</label>-->
|
||||||
<!-- <li>-->
|
<!-- <input type="text" name="CONSUMENUMBER"/>-->
|
||||||
<!-- <label>使用主键:</label>-->
|
<!-- </li>-->
|
||||||
<!-- <input type="text" name="TRADEORDERID"/>-->
|
<!-- <li>-->
|
||||||
<!-- </li>-->
|
<!-- <label>使用流水:</label>-->
|
||||||
<li>
|
<!-- <input type="text" name="TRANSEQNO"/>-->
|
||||||
<label>状态:</label>
|
<!-- </li>-->
|
||||||
<select name="STATE" th:with="type=${@dict.getType('status')}" style="width: 80px">
|
<!-- <li>-->
|
||||||
<option value="">所有</option>
|
<!-- <label>使用主键:</label>-->
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
<!-- <input type="text" name="TRADEORDERID"/>-->
|
||||||
</select>
|
<!-- </li>-->
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<label>状态:</label>
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
<select name="STATE" th:with="type=${@dict.getType('status')}" style="width: 80px">
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
<option value="">所有</option>
|
||||||
</li>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
</ul>
|
th:value="${dict.dictValue}"></option>
|
||||||
</div>
|
</select>
|
||||||
</form>
|
</li>
|
||||||
</div>
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||||
|
class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
||||||
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="btn-group-sm" id="toolbar" role="group">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="activity:consume:add">-->
|
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="activity:consume:add">-->
|
||||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||||
<!-- </a>-->
|
<!-- </a>-->
|
||||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="activity:consume:edit">-->
|
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="activity:consume:edit">-->
|
||||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||||
<!-- </a>-->
|
<!-- </a>-->
|
||||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="activity:consume:remove">-->
|
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="activity:consume:remove">-->
|
||||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||||
<!-- </a>-->
|
<!-- </a>-->
|
||||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="activity:consume:export">
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="activity:consume:export">
|
||||||
<i class="fa fa-download"></i> 导出
|
<i class="fa fa-download"></i> 导出
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table"></table>
|
<table id="bootstrap-table"></table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
</div>
|
||||||
<script th:inline="javascript">
|
<th:block th:include="include :: footer"/>
|
||||||
var editFlag = [[${@permission.hasPermi('activity:consume:edit')}]];
|
<script th:inline="javascript">
|
||||||
var removeFlag = [[${@permission.hasPermi('activity:consume:remove')}]];
|
var editFlag = [[${@permission.hasPermi('activity:consume:edit')}]];
|
||||||
var prefix = ctx + "activity/consume";
|
var removeFlag = [[${@permission.hasPermi('activity:consume:remove')}]];
|
||||||
var drawTypes = [[${@dict.getType('drawType')}]];
|
var prefix = ctx + "activity/consume";
|
||||||
var STATEDatas = [[${@dict.getType('status')}]];
|
var drawTypes = [[${@dict.getType('drawType')}]];
|
||||||
|
var STATEDatas = [[${@dict.getType('status')}]];
|
||||||
|
var drawInfoList = [[${@drawInfo.findDrawInfoList()}]];
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "抽奖次数消费信息",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
|
||||||
$(function() {
|
|
||||||
var options = {
|
|
||||||
url: prefix + "/list",
|
|
||||||
createUrl: prefix + "/add",
|
|
||||||
updateUrl: prefix + "/edit/{id}",
|
|
||||||
removeUrl: prefix + "/remove",
|
|
||||||
exportUrl: prefix + "/export",
|
|
||||||
modalName: "抽奖次数消费信息",
|
|
||||||
columns: [{
|
|
||||||
checkbox: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'taskconsumeid',
|
field: 'taskconsumeid',
|
||||||
title: '业务主键',
|
title: '业务主键',
|
||||||
|
|
@ -105,49 +116,53 @@
|
||||||
title: '活动次数记录主键',
|
title: '活动次数记录主键',
|
||||||
visible: false
|
visible: false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'drawcode',
|
|
||||||
title: '活动代码'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'taskid',
|
|
||||||
title: '任务流水'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'userid',
|
field: 'userid',
|
||||||
title: '用户标识'
|
title: '用户标识'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'drawcode',
|
||||||
|
title: '活动代码',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDrawname(drawInfoList, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'type',
|
field: 'type',
|
||||||
title: '赠送次数类型',
|
title: '赠送次数类型',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
return $.table.selectDictLabel(drawTypes, value);
|
return $.table.selectDictLabel(drawTypes, value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'createtimestamp',
|
||||||
|
title: '创建时间'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'consumenumber',
|
field: 'consumenumber',
|
||||||
title: '使用次数'
|
title: '使用次数'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'taskid',
|
||||||
|
title: '任务流水'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'transeqno',
|
field: 'transeqno',
|
||||||
title: '使用流水'
|
title: '使用流水'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'tradeorderid',
|
field: 'tradeorderid',
|
||||||
title: '使用主键'
|
title: '使用主键',
|
||||||
|
visible: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'state',
|
field: 'state',
|
||||||
title: '状态',
|
title: '状态',
|
||||||
formatter: function(value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
return $.table.selectDictLabel(STATEDatas, value);
|
return $.table.selectDictLabel(STATEDatas, value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// field: 'createtimestamp',
|
|
||||||
// title: '创建时间'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// field: 'lastupdatetimestamp',
|
// field: 'lastupdatetimestamp',
|
||||||
// title: '最后修改时间'
|
// title: '最后修改时间'
|
||||||
// },
|
// },
|
||||||
|
|
@ -161,10 +176,10 @@
|
||||||
// return actions.join('');
|
// return actions.join('');
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue