Merge pull request 'feature/more_payment' (#435) from feature/more_payment into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/435
master
廖金灵 3 years ago
commit 6802311b63

@ -599,7 +599,9 @@ class MarketPerformanceSetController extends Controller {
$dThisDay = date("w", $iThisMonthFirst); $dThisDay = date("w", $iThisMonthFirst);
if ($dThisDay == '1') { if ($dThisDay == '1') {
$dFirstMonday = $iThisMonthFirst; $dFirstMonday = $iThisMonthFirst;
} else { }else if($dThisDay < 1){
$dFirstMonday = $iThisMonthFirst + 86400;
}else {
//不是星期一先回到星期日 //不是星期一先回到星期日
$iDays = 86400 * ($dThisDay * 1); $iDays = 86400 * ($dThisDay * 1);
//找出星期日的日期 //找出星期日的日期

@ -1504,8 +1504,16 @@ class ToolController extends ThinkController {
$this->assign('_page', $page); $this->assign('_page', $page);
} }
$this->display(); $this->display();
}
public function cmdTasksDel()
{
$id = $_REQUEST['id'];
$res = M("cmd_tasks","tab_")->where("id = {$id}")->delete();
if($res !== false){
$this->ajaxReturn(array("success"=>"ok","code"=>0));
}else{
$this->ajaxReturn(array("error"=>"database error","code"=>2000));
}
} }

@ -128,6 +128,7 @@
<th>预定时间</th> <th>预定时间</th>
<th>开始时间</th> <th>开始时间</th>
<th>结束时间</th> <th>结束时间</th>
<th>操作</th>
</tr> </tr>
</thead> </thead>
@ -140,7 +141,7 @@
<tr data-id="<?=$data['id']?>"> <tr data-id="<?=$data['id']?>">
<td>{$data.id}</td> <td>{$data.id}</td>
<td>{$data.type}</td> <td>{$data.type}</td>
<td >{$data.params}</td> <td>{$data.params}</td>
<td>{$data.admin_username}</td> <td>{$data.admin_username}</td>
<td>{$data.status_str}</td> <td>{$data.status_str}</td>
<td style="width: 100px;height: 30px;">{$data.result}</td> <td style="width: 100px;height: 30px;">{$data.result}</td>
@ -148,6 +149,7 @@
<td>{$data.schedule_time}</td> <td>{$data.schedule_time}</td>
<td>{$data.start_time}</td> <td>{$data.start_time}</td>
<td>{$data.end_time}</td> <td>{$data.end_time}</td>
<td><a class="confirm cmd_del" data-id="{$data.id}" style="color: red;">删除</a></td>
</tr> </tr>
</volist> </volist>
</empty> </empty>
@ -203,7 +205,42 @@
if(event.keyCode===13){ if(event.keyCode===13){
$("#search").click(); $("#search").click();
} }
}) });
$(".cmd_del").click(function () {
var id = $(this).data("id");
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
btn: ['确认','取消'],
title:false
}, function(){
var url = "{:U('cmdTasksDel')}"
layer.load(2);
$.ajax({
url: url,
type: "get",
dataType: "json",
data:{
id:id
},
success: function (data) {
if(data.code == 0){
layer.closeAll('loading');
layer.msg("<font style='color:#fff'>删除成功</font>");
setTimeout(function(){
window.location.reload();
},350);
}else{
alert("删除失败,请联系管理员")
}
}
})
}, function(){
});
});
}); });

Loading…
Cancel
Save