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

Commit 502ce7e8 authored by dongchun's avatar dongchun

修改前端bug

parent d9233d7f
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
</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";
...@@ -76,63 +77,61 @@ ...@@ -76,63 +77,61 @@
var couType = [[${couType}]]; var couType = [[${couType}]];
$(function () { $(function () {
getAllData();
});
function getAllData() {
let uid = getUrlParms('id');
let data = {
uid
}
$.ajax({
type: 'get',
url: prefix + '/details',
data,
success:function(e) {
console.log(e)
if (e.code == 0) {
const { dto } = e.data;
datas= e.data.scoreLogs;
var options = { var options = {
url: prefix + "/list", data: datas,
createUrl: prefix + "/add/{id}", pagination: false,
removeUrl: prefix + "/cancel/{id}", showSearch: false,
// updateUrl: prefix + "/edit/{id}", showRefresh: false,
// exportUrl: prefix + "/export", showToggle: false,
sortName: "createdAt", showColumns: false,
sortOrder: "desc", sidePagination: "client",
modalName: "积分",
columns: [ columns: [
{ {
field: 'valFace', field: 'createdAt',
title: '时间', title: '时间',
formatter: function (value, row, index) { formatter: function (value, row, index) {
return '¥' + value; 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: 'eventAmt', field: 'score',
title: '类型'
},
{
field: 'bindType',
title: '任务名称',
formatter: function(value, row, index) {
return $.table.selectDictLabel(dicCouponBindType, value);
}
},
{
field: 'busiType',
title: '获得积分', title: '获得积分',
formatter: function(value, row, index) {
return $.table.selectDictLabel(dicCouponBusiType, value);
}
}, },
{ {
field: 'title', field: 'reason',
title: '变更原因' title: '变更原因'
} }
] ]
}; };
$.table.init(options); $.table.init(options);
});
getAllData();
function getAllData() {
let uid = getUrlParms('id');
let data = {
uid
}
$.ajax({
type: 'get',
url: prefix + '/details',
data,
success:function(e) {
console.log(e)
if (e.code == 0) {
const { dto } = e.data;
$('#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