Merge branch 'feature/promote' of 47.111.118.107:/srv/git/platform into feature/promote

master
ELF 5 years ago
commit fc028dd272

@ -801,11 +801,25 @@ class QueryController extends ThinkController
$data['msg'] = '请上传汇款证明';
return $data;
}
$downloadId = M('document_download')->where(array('file_id' => $transferProof))->getField('id');
if (empty($downloadId)) {
$fileData = M('File')->field('size,ext')->find($transferProof);
$downloadSave['content'] = '推广员提现订单汇款证明';
$downloadSave['file_id'] = $transferProof;
$downloadSave['size'] = $fileData['size'];
$downloadRes = M('document_download')->add($downloadSave);
if (!$downloadRes) {
$data['status'] = 0;
$data['msg'] = '保存失败';
return $data;
}
$downloadId = $downloadRes;
}
$map['id'] = $ids;
$map['status'] = 1;
$save['audit_time'] = time();
$save['status'] = $status;
$save['transfer_proof'] = $transferProof;
$save['transfer_proof'] = $downloadId;
$res = $withdraw->where($map)->save($save);
if ($res === false) {
$data['status'] = 0;

@ -1712,6 +1712,10 @@ class DownloadController extends BaseController {
break;
case "提现明细":
$this->withdrawDtlExcelInfo($id,$map);
break;
case "汇款证明":
$this->remitCerDownLoad($id,$map);
break;
default:
break;
}
@ -2201,6 +2205,13 @@ class DownloadController extends BaseController {
}
public function remitCerDownLoad($id,$map) {
$proof_id = $map['id'];
$file = new FileController();
$file->download($proof_id);
$this->backSuccessExport($id);
}
public function withdrawDtlExcelInfo($id,$map) {
$xlsName = "提现记录";
$xlsCell = array(
@ -2625,6 +2636,39 @@ class DownloadController extends BaseController {
}
}
/*
* 汇款证明
* */
public function Remittancecer() {
$id = $_REQUEST["id"];
$model = M("withdraw","tab_");
$res = $model->where(['id'=>$id])->field('transfer_proof,status')->find();
$transfer_proof = intval($res["transfer_proof"]);
$map = ['id'=>$transfer_proof];
$addtime = time();
$conditions = json_encode($map,TRUE);
$data = [
'logid' => 'remitrecord_'.time(),
'admin_id' => PID,
'type' => '/Home/Finance/withdrawRecord',
'dataname' => '汇款证明',
'status' => 0,
'addtime' => $addtime,
'begintime' => 0,
'content' => '',
'conditions' =>$conditions,
];
$log = M('downloadlog','tab_')->add($data);
if (!$log) {
$this->error('添加下载失败');
}
$this->success('添加下载成功',U('listsIndex'));
}
public function encryptDecrypt($key, $string, $decrypt){

@ -172,7 +172,7 @@
<td>
<a href="{:U('withdrawDtl', array('id'=>$vo['id']))}">提现明细</a>
<if condition="$vo['status'] eq 2">
<a>汇款证明</a>
<a data-href="{:U('download/Remittancecer',['id'=>$vo['id']])}" class="ajax-get">汇款证明</a>
</if>
<a href="{:U('settlementOrder', array('id'=>$vo['id']))}">结算单</a>
</td>

@ -365,4 +365,7 @@ ALTER TABLE `sys_shift_task` ADD COLUMN `remark` varchar(255) NOT NULL DEFAULT '
-- 2019-11-07 cxj
ALTER TABLE `platform_query`.`tab_withdraw` ADD COLUMN `transfer_proof` int(11) NOT NULL DEFAULT 0 COMMENT '汇款证明' AFTER `settlement_end_time`;
ALTER TABLE `tab_withdraw` ADD COLUMN `transfer_proof` int(11) NOT NULL DEFAULT 0 COMMENT '汇款证明' AFTER `settlement_end_time`;
-- 2019-11-08 cxj
ALTER TABLE `sys_document_download` MODIFY COLUMN `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '文档ID' FIRST;
Loading…
Cancel
Save