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

Commit 502ce7e8 authored by dongchun's avatar dongchun

修改前端bug

parent d9233d7f
...@@ -67,59 +67,19 @@ ...@@ -67,59 +67,19 @@
</div> </div>
<th:block th:include="include :: footer"/> <th:block th:include="include :: footer"/>
<script th:inline="javascript"> <script th:inline="javascript">
let datas = [];
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 + "stone/logs"; var prefix = ctx + "stone/logs";
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')}]];
var couType = [[${couType}]]; var couType = [[${couType}]];
$(function () { $(function () {
var options = { getAllData();
url: prefix + "/list",
createUrl: prefix + "/add/{id}",
removeUrl: prefix + "/cancel/{id}",
// updateUrl: prefix + "/edit/{id}",
// exportUrl: prefix + "/export",
sortName: "createdAt",
sortOrder: "desc",
modalName: "积分",
columns: [
{
field: 'valFace',
title: '时间',
formatter: function (value, row, index) {
return '¥' + value;
}
},
{
field: 'eventAmt',
title: '类型'
},
{
field: 'bindType',
title: '任务名称',
formatter: function(value, row, index) {
return $.table.selectDictLabel(dicCouponBindType, value);
}
},
{
field: 'busiType',
title: '获得积分',
formatter: function(value, row, index) {
return $.table.selectDictLabel(dicCouponBusiType, value);
}
},
{
field: 'title',
title: '变更原因'
}
]
};
$.table.init(options);
}); });
getAllData();
function getAllData() { function getAllData() {
let uid = getUrlParms('id'); let uid = getUrlParms('id');
let data = { let data = {
...@@ -133,6 +93,45 @@ ...@@ -133,6 +93,45 @@
console.log(e) console.log(e)
if (e.code == 0) { if (e.code == 0) {
const { dto } = e.data; const { dto } = e.data;
datas= e.data.scoreLogs;
var options = {
data: datas,
pagination: false,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
sidePagination: "client",
columns: [
{
field: 'createdAt',
title: '时间',
formatter: function (value, row, index) {
return $.common.dateFormat(startTime, 'yyyy-MM-dd HH:mm:ss');
}
},
// {
// field: 'eventAmt',
// title: '类型'
// },
// {
// field: 'content',
// title: '任务名称',
// formatter: function(value, row, index) {
// return $.table.selectDictLabel(dicCouponBindType, value);
// }
// },
{
field: 'score',
title: '获得积分',
},
{
field: 'reason',
title: '变更原因'
}
]
};
$.table.init(options);
$('#name').text(dto.nickName); $('#name').text(dto.nickName);
let statusName = ''; let statusName = '';
$('#scoreAll').text(dto.scoreAll); $('#scoreAll').text(dto.scoreAll);
......
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
data, data,
success:function(e) { success:function(e) {
console.log(e) console.log(e)
$("button[name=refresh]").click();
} }
}) })
}); });
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
</div> </div>
</div> </div>
<div class="scope_application" id="scope_application"> <div class="scope_application" id="scope_application">
<span class="labelName"><i class="required">*</i>商品名称:</span> <span class="labelName"><i class="required">*</i>名称:</span>
<div class="search_ipt" style="position: relative;display: inline;"> <div class="search_ipt" style="position: relative;display: inline;">
<input type="text" id="searchIpt" autocomplete="off" class="layui-input" placeholder="全部"> <input type="text" id="searchIpt" autocomplete="off" class="layui-input" placeholder="全部">
<ul id="dataList" style="position: absolute;"></ul> <ul id="dataList" style="position: absolute;"></ul>
...@@ -505,14 +505,17 @@ ...@@ -505,14 +505,17 @@
targetId: showId, // 目标物品id targetId: showId, // 目标物品id
targetTitle: $('#searchIpt').val() // 目标物品标题 targetTitle: $('#searchIpt').val() // 目标物品标题
} }
let type = 'post';
if (!itemId) { if (!itemId) {
delete data.itemId delete data.itemId
} else {
type = 'put';
} }
if (shelves == 1) { if (shelves == 1) {
delete data.startTime delete data.startTime
delete data.endTime delete data.endTime
} }
promiseMethods(ctx+'stone/item','put',data).then(res=>{ promiseMethods(ctx+'stone/item',type,data).then(res=>{
layer.msg('' + res); layer.msg('' + res);
if (res.code != undefined && res.code != web_status.SUCCESS) { if (res.code != undefined && res.code != web_status.SUCCESS) {
$.modal.alertWarning(res.msg); $.modal.alertWarning(res.msg);
......
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