diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php
index bced1d46d..a6d58e48b 100644
--- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php
+++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php
@@ -89,8 +89,8 @@ class AggregateFinanceStatementController extends ThinkController
foreach($data as $key => $value) {
$data[$key]['verify_status_str'] = $this->verify_status[$value['verify_status']];
$data[$key]['create_time'] = date('Y-m-d H:i:s',$value['create_time']);
- $data[$key]['begintime'] = date('Y-m-d H:i:s',$value['begintime']);
- $data[$key]['endtime'] = date('Y-m-d H:i:s',$value['endtime']);
+ $data[$key]['begintime'] = date('Y-m-d',$value['begintime']);
+ $data[$key]['endtime'] = date('Y-m-d',$value['endtime']);
$data[$key]['withdraw_type_1'] = ($value['withdraw_type'] == 1 ? "月结" :"周结");
$data[$key]['withdraw_type_2'] = ($value['withdraw_type'] == 2 ? "补点" :"正常结算");
}
@@ -103,8 +103,6 @@ class AggregateFinanceStatementController extends ThinkController
if ($page) {
$this->assign('_page', $page);
}
-
-// $this->meta_title = '结算单管理';
$this->assign('data',$data);
$this->assign('total',$count['ratio_money']);
$this->assign('channel',$this->getAggChannel());
@@ -137,6 +135,10 @@ class AggregateFinanceStatementController extends ThinkController
$statement_info = $_REQUEST['statement_info'];
$admininfo = $_SESSION['onethink_admin']['user_auth'];
$data_count = $_REQUEST['statement_count'];
+ if(!isset($_REQUEST['statement_id'])){
+ $this->error("参数错误");
+ }
+
//拼凑数据
$adddata = array(
"pay_money"=>$data_count['pay_money'],
@@ -147,7 +149,8 @@ class AggregateFinanceStatementController extends ThinkController
"statement_info"=>json_encode($statement_info,JSON_UNESCAPED_UNICODE),
"admin_name"=>$admininfo['username'],
"admin_id"=>$admininfo['uid'],
- "verify_status"=>1
+ "verify_status"=>1,
+ "create_time"=>time()
);
$id = $_REQUEST['statement_id'];
$res = M("aggregate_statement","tab_")->where("id = '{$id}'")->save($adddata);
@@ -191,6 +194,44 @@ class AggregateFinanceStatementController extends ThinkController
}
}
+ public function editStatement(){
+ if(!isset($_REQUEST['id'])) $this->error("参数错误");
+ $id = $_REQUEST['id'];
+ $dbres = M("aggregate_statement","tab_")->where("id = '{$id}'")->find();
+ $first_party_info = json_decode($dbres['first_party_info'],true);
+ $second_party_info = json_decode($dbres['second_party_info'],true);
+ $statement_info = json_decode($dbres['statement_info'],true);
+
+ // if($dbres['company_name'] == $first_party_info['partner']){
+ // $first_partner_type=0;
+ // }else{
+ // $first_partner_type=1;
+ // }
+ // $fine = array_pop($statement_info);
+ $senddata = array(
+ // "first_partner_type"=>1,
+ "statement_id"=>$dbres['id'],
+ "first_part_company"=>$first_party_info['partner'],
+ "second_part_company"=>$second_party_info['partner'],
+ "statement_type"=>$dbres['pay_type'] == 0 ? 1 :0,
+ "first_party_info"=>$first_party_info,
+ "second_party_info"=>$second_party_info,
+ "statement_info"=>$statement_info,
+ "statement_count"=>array("pay_money"=>$dbres['pay_money'],"ratio_money"=>$dbres['ratio_money'])
+ );
+
+ $this->assign("data",$senddata);
+ if($dbres['pay_type'] == 0){
+ $this->assign("company",$second_party_info['partner']);
+ }else{
+ $this->assign("company",$first_party_info['partner']);
+ }
+ $this->assign("company_id",$dbres['company_id']);
+ $this->assign("company_name",$dbres['company_name']);
+ $this->assign("id",$dbres['id']);
+ $this->display();
+
+}
}
diff --git a/Application/Admin/View/AggregateFinanceStatement/createStatement.html b/Application/Admin/View/AggregateFinanceStatement/createStatement.html
index c5e5d5df4..15b16ea59 100644
--- a/Application/Admin/View/AggregateFinanceStatement/createStatement.html
+++ b/Application/Admin/View/AggregateFinanceStatement/createStatement.html
@@ -90,12 +90,12 @@
- 公司类型: |
+ 甲方类型: |
diff --git a/Application/Admin/View/AggregateFinanceStatement/editStatement.html b/Application/Admin/View/AggregateFinanceStatement/editStatement.html
index c5e5d5df4..319ccda07 100644
--- a/Application/Admin/View/AggregateFinanceStatement/editStatement.html
+++ b/Application/Admin/View/AggregateFinanceStatement/editStatement.html
@@ -89,25 +89,13 @@
-
- 公司类型: |
-
-
-
-
- |
-
甲方: |
+
+
|
@@ -143,17 +131,13 @@
-
- |
- |
-
乙方: |
+
+
|
@@ -189,13 +173,15 @@
|