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

Commit faee4b58 authored by dongchun's avatar dongchun

提交积分明细导出及发货接口对接

parent 09792cb1
...@@ -138,16 +138,22 @@ ...@@ -138,16 +138,22 @@
// 导出数据 // 导出数据
function exportSelected() { function exportSelected() {
var userIds = $.table.selectColumns("uid"); var userIds = $.table.selectColumns("uid");
var dataParam = $("#export-form").serializeArray(); // var dataParam = $("#export-form").serializeArray();
var tipMsg = "确定导出所有数据吗?"; var tipMsg = "确定导出所有数据吗?";
console.log(userIds, 'kakn')
if($.common.isNotEmpty(userIds)){ if($.common.isNotEmpty(userIds)){
tipMsg = "确定导出勾选" + userIds.length + "条数据吗?"; tipMsg = "确定导出勾选" + userIds.length + "条数据吗?";
dataParam.push({ "name": "uid", "value": userIds }); // dataParam.push({ "name": "uid", "value": userIds });
} } else {
layer.msg('请勾选要导出的数据!')
return;
}
// console.log(userIds.toString(), 'dataParam')
$.modal.confirm(tipMsg, function() { $.modal.confirm(tipMsg, function() {
$.post('demo/table/exportData', dataParam, function(result) { $.post('list/export', {uidString: userIds.toString()}, function(result) {
if (result.code == web_status.SUCCESS) { if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
$("button[name=refresh]").click();
} else { } else {
$.modal.alertError(result.msg); $.modal.alertError(result.msg);
} }
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
align: 'center', align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-danger btn-xs ' + receivingStatusFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.drawId + '\')"></i>发货</a> '); actions.push('<a class="btn btn-danger btn-xs ' + receivingStatusFlag + '" href="javascript:void(0)" onclick="openModal(\'' + row.drawId + '\')"></i>发货</a> ');
return actions.join(''); return actions.join('');
} }
}] }]
...@@ -89,6 +89,22 @@ ...@@ -89,6 +89,22 @@
$.table.init(options); $.table.init(options);
}); });
function openModal(id) {
$.modal.confirm(`确定要发货吗?`, function() {
$.ajax({
type: 'put',
url: '/sweet/IntegralActivityDraw/receivingStatus',
data: {drawId: id},
success:function(e) {
console.log(e)
if (e.code == 0) {
layer.msg('发货成功!')
$("button[name=refresh]").click();
}
}
})
});
}
</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