bug修改

master
zhengyongxing 4 years ago
parent ceef36a7d1
commit fedcbd605b

@ -242,7 +242,14 @@ class CompanyStatementController extends ThinkController
$statement_info = json_decode($dbres['statement_info'],true);
foreach ($statement_info as $key => $value) {
if ($value['game_name'] == "罚款" || $value['game_name'] == "奖励") {
if ($value['game_name'] == "罚款" ) {
$dbres['pay_amount'] = $dbres['pay_amount'] + $statement_info[$key]['pay_amount'];
$statement_info[$key]['pay_amount'] = "-";
}
if ($value['game_name'] == "奖励") {
$dbres['pay_amount'] = $dbres['pay_amount'] - $statement_info[$key]['pay_amount'];
$statement_info[$key]['pay_amount'] = "-";
}
}

@ -458,6 +458,30 @@ class CompanyStatementPoolController extends ThinkController
public function verifyRefuse(){
$this->setVerifyStatus(0,-1,"verify");
}
//审批撤回
public function verifyReturn() {
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
foreach($dbres as $k=>&$v){
if($v['verify_status'] != -1&&$v['verify_status'] != 1) continue;
$v['verify_log'] = json_decode($v['verify_log'],true);
unset($v['verify_log']['verify_user']);
unset($v['verify_log']['verify_time']);
$v['verify_log'] = json_encode($v['verify_log']);
$v['verify_status']=0;
$this->DBModel->save($v);
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>"审批撤回",'url'=>U('lists')]);
}
$this->ajaxReturn(array(
'status' => 1,
"info"=>"审批撤回成功"
));
}
//线下打款
public function setUlPayment()
{
@ -1054,6 +1078,7 @@ class CompanyStatementPoolController extends ThinkController
$mentBtn = [
"verifyAgree"=>"<a class='butn' id='verifyAgree'>审批通过</a>",
"verifyRefuse"=>"<a class='butn' id='verifyRefuse' style='background-color: red;'>审核拒绝</a>",
"verifyReturn"=>"<a class='butn' id='verifyReturn'>审批撤回</a>",
"export"=>"<a class='butn' id='export'>导出</a>"
];
$resarr = [];

@ -373,7 +373,53 @@
}
});
}
})
});
$("#verifyReturn").on("click",function(){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get();
if(text.length > 40){
layer.msg("<font style='color:white'>" + '为保证效率暂不支持超过40条的批量操作' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '无需要汇总的操作'+"</font>");
return;
}
text = text.join(",");
layer.confirm('【提示】点击确认后,审批即撤回', {
btn: ['确认','取消'],
title:false
}, function(){
_doAgreeApply();
});
function _doAgreeApply(){
//执行
$.ajax({
type: "POST",
url: "{:U('verifyReturn')}",
dataType: 'json',
async: false,
data: {ids:text},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
}
});
$("#export").click(function () {
var flag = false;

@ -184,7 +184,7 @@
<select id="develop_type" name="develop_type" class="select_gallery" style="width: 215px;">
<option value="0"></option>
<option value="1" selected>自主开发</option>
<option value="2">自主开发及维护</option>
<!-- <option value="2">自主开发及维护</option>-->
<option value="3">只维护</option>
</select>
</td>

@ -2496,3 +2496,9 @@ ADD COLUMN `performance_profit` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '维护
ALTER TABLE `sys_ucenter_member`
ADD COLUMN `work_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '离职状态' AFTER `openid_sign`;
ALTER TABLE `tab_market_altogether`
ADD COLUMN `market_check` tinyint(2) NULL DEFAULT 0 COMMENT '市场确认 0 未确认 1 确认' AFTER `performance_profit`,
ADD COLUMN `market_check_detail` varchar(100) NULL DEFAULT '' COMMENT '市场确认详情' AFTER `market_check`,
ADD COLUMN `finance_check` tinyint(2) NULL DEFAULT 0 COMMENT '财务确认 0 未确认 1 确认' AFTER `market_check_detail`,
ADD COLUMN `finance_check_detail` varchar(100) NULL DEFAULT '' COMMENT '财务确认详情' AFTER `finance_check`;
Loading…
Cancel
Save