Merge branches 'fix/admin_second_optimization' and 'master' of 47.111.118.107:wmtx/platform into fix/admin_second_optimization

master
zhengyongxing 5 years ago
commit fba271cd64

@ -8,10 +8,10 @@ namespace Admin\Controller;
class AggregateFinanceStatementController extends ThinkController
{
public $verify_status = [
"-1"=>"审拒绝",
"-1"=>"审拒绝",
"0"=>"未申请开票",
"1"=>"申请开票",
"2"=>"审同意",
"2"=>"审同意",
"3"=>"已开票",
"4"=>"已上传凭证",
"5"=>"已到账"
@ -110,7 +110,8 @@ class AggregateFinanceStatementController extends ThinkController
$data[$key]['oplist'] = $this->OpAuth($value);
}
$count = M("aggregate_statement","tab_")->field("count(id) count,SUM(ratio_money) ratio_money,SUM(pay_money) pay_money")->where($map)->find();
$count = M("aggregate_statement","tab_")->field("count(id) count,SUM(ratio_money) ratio_money")->where($map)->find();
$pay_money_count = M("aggregate_statement","tab_")->field("SUM(pay_money) pay_money")->where($map)->where("withdraw_type <> 2")->find()['pay_money'];
//分页
$parameter['p'] = $page;
@ -123,7 +124,7 @@ class AggregateFinanceStatementController extends ThinkController
$this->assign('menubtn',$this->menuAuth());
$this->assign('data',$data);
$this->assign('total',$count['ratio_money']);
$this->assign('pay_money',$count['pay_money']);
$this->assign('pay_money',$pay_money_count);
$this->assign('channel',$this->getAggChannel());
$this->assign('verify_status',$this->verify_status);
$this->display();

@ -224,10 +224,10 @@
<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 >结算金额</th>
<th >结算金额(元)</th>
</tr>
</thead>
@ -408,20 +408,20 @@
<tr>
<td>${it.begintime}~${it.endtime}</td>
<td>${it.game_name}</td>
<td>${it.money}</td>
<td>${it.money}</td>
<td><input type="text" class="txt statementchange" name="ratio" data-index ="${index}" data-change="statement_info[${index}]['ratio']" value="${it.ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange" name="fax_ratio" data-index ="${index}" data-change="statement_info[${index}]['fax_ratio']" value="${it.fax_ratio}" style="width: 40px;">%</td>
<td>${it.ratio_money}</td>
<td>${it.ratio_money}</td>
</tr>
{@/each}
<tr>
<td>合计</td>
<td></td>
<td>${count.pay_money}</td>
<td>${count.pay_money}</td>
<td></td>
<td></td>
<td>${count.ratio_money}</td>
<td>${count.ratio_money}</td>
</tr>
<tr>
<td colspan=5>本月分成总金额(人民币大写):</td>

@ -210,10 +210,10 @@
<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 >结算金额</th>
<th >结算金额(元)</th>
</tr>
</thead>
@ -394,20 +394,20 @@
<tr>
<td>${it.begintime}~${it.endtime}</td>
<td>${it.game_name}</td>
<td>${it.money}</td>
<td>${it.money}</td>
<td><input type="text" class="txt statementchange" name="ratio" data-index ="${index}" data-change="statement_info[${index}]['ratio']" value="${it.ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange" name="fax_ratio" data-index ="${index}" data-change="statement_info[${index}]['fax_ratio']" value="${it.fax_ratio}" style="width: 40px;">%</td>
<td>${it.ratio_money}</td>
<td>${it.ratio_money}</td>
</tr>
{@/each}
<tr>
<td>合计</td>
<td></td>
<td>${count.pay_money}</td>
<td>${count.pay_money}</td>
<td></td>
<td></td>
<td>${count.ratio_money}</td>
<td>${count.ratio_money}</td>
</tr>
<tr>
<td colspan=5>本月分成总金额(人民币大写):</td>

@ -49,7 +49,7 @@
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">聚合渠道结算单管理</h3>
<p class="description_text">流程说明:结算自动生成对账单--->发起人申请开票--->财务审开票--->寄发票--->发起人上传收款凭证--->财务确认到账</p>
<p class="description_text">流程说明:结算自动生成对账单--->发起人申请开票--->财务审开票--->寄发票--->发起人上传收款凭证--->财务确认到账</p>
</div>
<div class="cf top_nav_list" style="height: 38px;">
<!-- 高级搜索 -->
@ -89,7 +89,7 @@
<div class="input-list input-list-promote search_label_rehab">
<select id="verify_status" name="verify_status" class="select_gallery" >
<option value="">请选择审状态</option>
<option value="">请选择审状态</option>
<foreach name="verify_status" item="vo" >
<option value="{$key}" <?php echo (isset($_REQUEST['verify_status']) && $key == I('verify_status')) ? 'selected':''; ?> >{$vo}</option>
</foreach>
@ -132,6 +132,7 @@
<th>结算日期</th>
<th>结算周期</th>
<th>结算类型</th>
<th>结算流水</th>
<th>结算金额</th>
<th>审批状态</th>
<th>操作人</th>
@ -156,6 +157,7 @@
<td>{$data.begintime}-{$data.endtime}</td>
<td>{$data.withdraw_type_1}</td>
<td>{$data.withdraw_type_2}</td>
<td>{$data.pay_money}</td>
<td>{$data.ratio_money}</td>
<td>{$data.verify_status_str}</td>
<td>{$data.admin_name}</td>
@ -168,7 +170,7 @@
</tr>
</volist>
<tr><td>合计</td><td colspan="10">结算总流水:{$pay_money}元&#12288;&#12288;&#12288;&#12288;结算金额:{$total}元 </td></tr>
<tr><td>合计</td><td colspan="10">结算总流水:{$pay_money}元(补点单据不重复计算在内)&#12288;&#12288;&#12288;&#12288;结算金额:{$total}元 </td></tr>
</notemtpy>
</tbody>
</table>
@ -239,7 +241,7 @@
}
}).get().join(",");
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要审核通过的结算单,仅[已申请发票]状态可以进行审核通过' + "</font>");
layer.msg("<font style='color:white'>" + '无需要审批通过的结算单,仅[已申请发票]状态可以进行审批通过' + "</font>");
return;
}
if(flag){
@ -280,7 +282,7 @@
}
}).get().join(",");
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要审核拒绝的结算单,仅[已申请发票]状态可以进行审核拒绝' + "</font>");
layer.msg("<font style='color:white'>" + '无需要批拒绝的结算单,仅[已申请发票]状态可以进行审批拒绝' + "</font>");
return;
}
if(flag){
@ -321,11 +323,11 @@
}
}).get().join(",");
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要进行已开票的结算单,仅[审同意]状态可以进行已开票' + "</font>");
layer.msg("<font style='color:white'>" + '无需要进行已开票的结算单,仅[审同意]状态可以进行已开票' + "</font>");
return;
}
if(flag){
layer.confirm("已开票仅会对 [审同意] 结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
layer.confirm("已开票仅会对 [审同意] 结算单处理,选择中包含其他的状态的结算单将被忽略,点击取消停止操作",{title:false}, function(index){
_doInvoiced();
layer.close(index);
});
@ -403,7 +405,7 @@
// return $(elem).val();
}).get().join(",");
if(text == ''){
layer.msg("<font style='color:white'>" + '无需要进行重新结算的结算单,仅[未申请发票][申请开票][审拒绝]状态可以进行重新结算' + "</font>");
layer.msg("<font style='color:white'>" + '无需要进行重新结算的结算单,仅[未申请发票][申请开票][审拒绝]状态可以进行重新结算' + "</font>");
return;
}
layer.confirm("重算结算金额会对结算单回退到未申请发票状态,请慎重处理,点击取消停止操作",{title:false}, function(index){
@ -575,10 +577,10 @@
content:"<div style='width: 300;height:auto;margin: auto;padding:20px;'>"+remark+"</div>"
});
});
//撤销审
//撤销审
$(".cancelVerify").click(function(){
var id = $(this).data("id");
layer.confirm("撤销审将回退到[已申请开票]状态,点击取消停止操作",{title:false}, function(index){
layer.confirm("撤销审将回退到[已申请开票]状态,点击取消停止操作",{title:false}, function(index){
$.ajax({
type: "POST",
url: "{:U('cancelVerify')}",

@ -192,10 +192,10 @@
<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 >结算金额</th>
<th >结算金额(元)</th>
</tr>
</thead>
<tbody id="statementShow">
@ -203,10 +203,10 @@
<tr>
<td>{$it.begintime}~{$it.endtime}</td>
<td>{$it.game_name}</td>
<td>{$it.money}</td>
<td>{$it.money}</td>
<td><input type="text" class="txt statementchange" name="ratio" disabled="disabled" value="{$it.ratio}" style="width: 40px;">%</td>
<td><input type="text" class="txt statementchange" name="fax_ratio" disabled="disabled" value="{$it.fax_ratio}" style="width: 40px;">%</td>
<td>{$it.ratio_money}</td>
<td>{$it.ratio_money}</td>
</tr>
<!-- {$key}|{$vo} -->
</foreach>
@ -214,10 +214,10 @@
<tr>
<td>合计</td>
<td></td>
<td>{$data.statement_count.pay_money}</td>
<td>{$data.statement_count.pay_money}</td>
<td></td>
<td></td>
<td>{$data.statement_count.ratio_money}</td>
<td>{$data.statement_count.ratio_money}</td>
</tr>
<tr>
<td colspan=5>本月分成总金额(人民币大写):</td>

@ -229,6 +229,10 @@ class GameSourceService {
$gameSourceUrl = $this->getGameSourceUrl($gameSource);
if ($gameSource == null || !file_exists($gameSourceUrl)) {
M('apply', 'tab_')->where(['id' => $apply['id']])->setField('enable_status', -1);
return [
'status' => false,
'message' => '打包失败,原包或原包路径不存在!',
];
}
/* 检测是否存在投放申请,存在则更改投放申请信息,否则进行渠道打包 */
@ -351,20 +355,27 @@ class GameSourceService {
'base_uri' => C('PACKAGE_CHUNK_URL'),
'timeout' => 30.0,
]);
$response = $client->post('/upload', [
'verify' => false,
'form_params' => [
'file' => $localFilePath,
'dest' => $distFilePath,
'is_delete_local' => ($isDeleteLocal ? 1 : 0),
]
]);
$result = (string)$response->getBody();
$result = json_decode($result, true);
if (!$result) {
try {
$response = $client->post('/upload', [
'verify' => false,
'form_params' => [
'file' => $localFilePath,
'dest' => $distFilePath,
'is_delete_local' => ($isDeleteLocal ? 1 : 0),
]
]);
$result = (string)$response->getBody();
$result = json_decode($result, true);
if (!$result) {
return [
'status' => false,
'message' => '请求异常',
];
}
} catch (\Exception $e) {
return [
'status' => false,
'message' => '请求打包失败',
'message' => '请求异常: ' . $e->getMessage(),
];
}
return $result;

Loading…
Cancel
Save