diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php new file mode 100644 index 000000000..90386f757 --- /dev/null +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -0,0 +1,111 @@ +"审核拒绝", + "0"=>"未申请开票", + "1"=>"申请开票", + "2"=>"审核同意", + "3"=>"已开票", + "4"=>"上传收款凭证", + "5"=>"已到账" + ]; + public function lists() { + +// $map = []; + +// if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { +// $map['create_time'] = ['between', [strtotime(I('time_start')), strtotime(I('time_end')) + 86399]]; +// } elseif (isset($_REQUEST['time_start'])) { +// $map['create_time'] = ['GT', strtotime(I('time_start'))]; +// } elseif (isset($_REQUEST['time_end'])) { +// $map['create_time'] = ['LT', strtotime(I('time_end')) + 86399]; +// } + +// if ($_REQUEST['verify_status']||$_REQUEST['verify_status']=='0') { +// $map['verify_status'] = $_REQUEST['verify_status']; +// } + +// if ($_REQUEST['statement_type']||$_REQUEST['statement_type']=='0') { +// if($_REQUEST['statement_type']=='2') { +// $map['second_party_info'] = ['like','%"order_type":1%']; +// } else { +// $map['statement_type'] = $_REQUEST['statement_type']; +// if ($_REQUEST['statement_type']=='1') { + +// $map['second_party_info'] = ['like','%"order_type":0%']; + +// } +// } +// // dump($map['second_party_info']);die(); +// } +// // var_dump($map);die(); + +// if ($_REQUEST['company_id']) { +// $map['company_name'] = $_REQUEST['company_id']; +// // if ($_REQUEST['company_id']=='万盟天下科技') { +// // $map['company_name'] = '海南万盟天下科技有限公司'; +// // } +// } + +// $data = M("statement","tab_") +// ->where($map) +// ->order("create_time Desc") +// ->select(); +// // var_dump($data);die(); +// foreach ($data as $key => $value) { +// $data[$key]['order'] = json_decode($value['second_party_info'],true)['order_type']; +// } + +// $sumData = M("statement","tab_") +// ->field('sum(`statement_money`) as sum_money,statement_type') +// ->where($map) +// ->group('statement_type') +// ->select(); + +// $handleSumData = []; +// foreach ($sumData as $key => $value) { + +// $handleSumData[$value['statement_type']] = $value['sum_money']; +// } +// if (!$handleSumData[1]) { +// $handleSumData[1] = 0; +// } + +// if (!$handleSumData[0]) { +// $handleSumData[0] = 0; +// } + + +// $this->assign('sum',$handleSumData); +// // dump($sumData);die(); + + +// foreach($data as $key => $value) { + +// $data[$key]['create_time'] = date('Y-m-d H:i:s',$value['create_time']); +// $data[$key]['statement_begin_time'] = date('Y-m-d H:i:s',$value['statement_begin_time']); +// $data[$key]['statement_end_time'] = date('Y-m-d H:i:s',$value['statement_end_time']+86399); +// } +// $this->meta_title = '结算单管理'; +// $this->assign('data',$data); + $this->assign('channel',$this->getAggChannel()); + $this->assign('verify_status',$this->verify_status); + $this->display(); + + } + //获取所有下游渠道 + public function getAggChannel() + { + return M("aggregate_statement","tab_")->field("channel_id,channel_name")->group("channel_id")->select(); + # code... + } + + +} diff --git a/Application/Admin/View/AggregateFinanceStatement/lists.html b/Application/Admin/View/AggregateFinanceStatement/lists.html new file mode 100644 index 000000000..f71993f7f --- /dev/null +++ b/Application/Admin/View/AggregateFinanceStatement/lists.html @@ -0,0 +1,673 @@ + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +
+ +
+ +
+ +  -  +
+ + +
+
+ +
+ +
+ + + +
+ 搜索 +
+ +
+
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
对账单类型生成时间对账公司对账日期对账金额状态操作人操作
aOh! 暂时还没有内容!
+ 上游对账单下游对账单下游补点对账单下游个人结算单{$data.create_time}{$data.company_name}{$data.statement_begin_time}-{$data.statement_end_time}{$data.statement_money}未审核审核通过审核拒绝未确认确认 + 查看 + + 编辑 + + 撤销 +
合计公司对账金额合计:{$sum[1]}     cp对账金额合计:{$sum[0]+$sum[2]}
+
+ +
+
+ + 导出 + + {$_page|default=''} +
+ + +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + + + + diff --git a/Data/update.sql b/Data/update.sql index 4b7f8a2d7..62e61bb62 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1606,7 +1606,7 @@ CREATE TABLE `tab_finance_compare_info` ( ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='财务导入对账详情表'; ---新增参数kv表 +--新增参数kv表 chenzhi 20200422 CREATE TABLE `sys_kv` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `key` varchar(50) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT 'key', @@ -1619,7 +1619,7 @@ CREATE TABLE `sys_kv` ( INSERT INTO `platform`.`sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('aggregate_finance_api', 'http://admin.cz.com/index.php?g=api&m=FinanceWeekCount&a=returnFinanceAccountsDataList', 'string', '聚合下游结算Api地址'); - +--聚合渠道结算单 chenzhi 20200422 CREATE TABLE `tab_aggregate_statement` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键', `withdraw_type` tinyint(2) DEFAULT '0' COMMENT '对账类型(0-周结,1月结,2补点)',