新增线下打款确认

master
chenzhi 4 years ago
parent 69cf42e895
commit 4a98c587fa

@ -56,6 +56,12 @@ class CompanyStatementOfflineController extends ThinkController
$map['c.company_name'] =["LIKE","%{$_REQUEST['company_name']}%"];
}
if(isset($_REQUEST['statement_pool_num'])){
$map['p.statement_num'] =["LIKE","%{$_REQUEST['statement_pool_num']}%"];
}
//条件end
$data = M("company_statement_info","tab_")
->alias("c")
@ -78,7 +84,7 @@ class CompanyStatementOfflineController extends ThinkController
$v["pay_info"] = json_decode($v['pay_info'], true);
if(isset($v['pay_info']['payment_user'])){
$v["payment"]= "{$v['pay_status_str']}({$v['verify_log']['payment_user']})<br>{$v['verify_log']['payment_time']}";
$v["payment"]= "{$v['pay_status_str']}({$v['pay_info']['payment_user']})<br>{$v['pay_info']['payment_time']}";
}else{
$v["payment"] = $v["pay_status_str"];
}
@ -143,6 +149,56 @@ class CompanyStatementOfflineController extends ThinkController
"info"=>"打款确认成功"
));
}
public function viewStatement()
{
if(!isset($_REQUEST['id'])){
$this->error('参数错误');
}
$id = $_REQUEST['id'];
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
}
//获取基本信息
$dbres = M("company_statement_info","tab_")->where("id='{$id}'")->select();
$title = $dbres[0]['company_name'];
$this->assign("title",$title);
if($dbres[0]['company_type'] == 3){
//上游
A("CompanyStatementPool")->viewCpPool($dbres,$is_export);
}elseif($dbres[0]['company_type'] == 1){
//下游公司
A("CompanyStatementPool")->viewPcPool($dbres,$is_export);
}else{
A("CompanyStatementPool")->viewPuPool($dbres,$is_export);
}
}
public function export(){
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$dbres = M("company_statement_info","tab_")->where("id in ({$ids})")->select();
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
}
if($dbres[0]['company_type'] == 3){
//上游
$this->assign("title","上游公司线下打款");
A("CompanyStatementPool")->viewCpPool($dbres,$is_export);
}elseif($dbres[0]['company_type'] == 1){
//下游公司
$this->assign("title","下游公司线下打款");
A("CompanyStatementPool")->viewPcPool($dbres,$is_export);
}else{
$this->assign("title","下游个人线下打款");
A("CompanyStatementPool")->viewPuPool($dbres,$is_export);
}
}
protected function setOneVerifyStatus($change_status,$op_pre,$id)
{
$dbres = M("company_statement_pool","tab_")->field("id,verify_status,verify_log")->where("id = {$id}")->find();

@ -578,11 +578,16 @@ class CompanyStatementPoolController extends ThinkController
$v['company_info'] = json_decode($v['company_info'],true);
$v['company_info']['ali_user'] ?? '';
$v['company_info']['ali_account'] ?? '';
$v['verify_status_str'] = $this->InfoVerifyStatus[ $v['verify_status']];
if($v['verify_status'] == 2){
$v['is_payment'] = 2;
}else{
$v['is_payment'] = 1;
}
$v['verify_status_str'] = $this->PayStatus[$v['pay_status']];
if($v['verify_status'] == 1){
$v['verify_status_str'] = $this->PayStatus[$v['pay_status']];
if($v['pay_status'] == 1){
$v['pay_type'] = $v['pay_type'] == 1 ? "提现" :"线上打款";
$v['verify_status_str'] .= ("/". $v['pay_type']);

@ -44,9 +44,9 @@
font-weight: 600;
font-size: 18px;
}
/* .data_list table td{
.data_list table td{
line-height: 2;
} */
}
.layui-layer-title {
text-align: center;
@ -179,13 +179,13 @@
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]" data-paystatus="{$data['pay_status']}"></td>
<td ><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]" data-companytype="{$data['company_type']}" data-paystatus="{$data['pay_status']}"></td>
<td>{$data.company_name}</td>
<td>{$data.company_type_str}</td>
<td>{$data.valid}</td>
<td>{$data.statement_money}</td>
<td>{$data.platform_amount}</td>
<td>{$data.pay_status_str}</td>
<td>{$data.payment}</td>
<td>{$data.statement_num}</td>
<td>
<foreach name="data.oplist" item="vo" >
@ -327,24 +327,22 @@
})
$("#export").click(function () {
var company = [];
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get();
if(text.length > 20){
layer.msg("<font style='color:white'>" + '暂不支持超过20条的批量导出' + "</font>");
return;
}
if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要导出的结算单' + "</font>");
return;
}
for (var index = 0; index < text.length; index++) {
var id = text[index];
var url ="{:U('viewStatement')}"+"&id="+id+"&export=1";
var iframeExcel = "<iframe src='"+url+"' width='0px' height='0px' style='z-index:-1;position: absolute;top: -999999px;'></iframe>"//添加下载的地址到iframe这里是公司信息我用**表示了。
var cid = $(elem).data("companytype");
try {
company[cid].push($(elem).val());
} catch (error) {
company[cid] = [];
company[cid].push($(elem).val());
}
});
company.forEach(function(e){
var ids = e.join(",");
var url ="{:U('export')}"+"&ids="+ids+"&export=1";
var iframeExcel = "<iframe src='"+url+"' width='0px' height='0px' style='z-index:-1;position: absolute;top: -999999px;'></iframe>";
$("body").append(iframeExcel)
}
});
})

@ -430,7 +430,7 @@
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['80%', '80%'],
area: ['100%', '100%'],
content: url
});
})
@ -442,7 +442,7 @@
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
area: ['100%', '100%'],
content: url
});
})

@ -105,8 +105,12 @@
<tr>
<th style="border-right: solid 1px #b6cad2;">序号</th>
<th style="border-right: solid 1px #b6cad2;">合作公司</th>
<th style="border-right: solid 1px #b6cad2;">支付宝真实名称</th>
<th style="border-right: solid 1px #b6cad2;">支付宝账号</th>
<th style="border-right: solid 1px #b6cad2;">是否支付宝打款</th>
<th style="border-right: solid 1px #b6cad2;">户名</th>
<th style="border-right: solid 1px #b6cad2;">帐号</th>
<th style="border-right: solid 1px #b6cad2;">开户行</th>
<th style="border-right: solid 1px #b6cad2;">关联结算汇总单订单号</th>
<th style="border-right: solid 1px #b6cad2;">金额(元)</th>
<th style="border-right: solid 1px #b6cad2;">备注</th>
@ -119,8 +123,19 @@
<tr>
<td>{$key-0+1}</td>
<td>{$vo.company_name}</td>
<td>{$vo.company_info.ali_user}</td>
<td>{$vo.company_info.ali_account}</td>
<if condition="$vo['is_payment'] eq 1">
<td></td>
<td>{$vo.company_info.ali_user}</td>
<td>{$vo.company_info.ali_account}</td>
<td></td>
<else />
<td></td>
<td>{$vo.company_info.payee_name}</td>
<td>{$vo.company_info.bank_account}</td>
<td>{$vo.company_info.opening_bank}</td>
</if>
<td>{$vo.statement_num}</td>
<td>{$vo.statement_money}</td>
<td>{$vo.remark}</td>
@ -130,7 +145,7 @@
</foreach>
<tr>
<td colspan="2">合计:</td>
<td colspan="6">打款总金额:{$CompanyInfo[0]['all_money']}</td>
<td colspan="8">打款总金额:{$CompanyInfo[0]['all_money']}</td>
</tr>
</tbody>

Loading…
Cancel
Save