caipin 4 anos atrás
pai
commit
0d5c6a7b1b
38 arquivos alterados com 758 adições e 414 exclusões
  1. 1 1
      global/vue/fee/fee_receipt_data.js
  2. 1 1
      global/vue/fee/receipt_office_component.js
  3. 154 34
      global/vue/fee/receipt_trave_component.js
  4. 1 1
      index.php
  5. 3 0
      protected/class/receipt.finances.func.php
  6. 2 1
      protected/class/receipt.func.php
  7. 3 3
      protected/config/routes.conf.php
  8. 8 8
      protected/config/wasteBook.conf.php
  9. 4 5
      protected/controller/AdminController.php
  10. 22 6
      protected/controller/HumanResourceController.php
  11. 26 4
      protected/controller/InvoiceController.php
  12. 13 2
      protected/controller/MainController.php
  13. 4 4
      protected/controller/ReceiptAjaxController.php
  14. 263 111
      protected/controller/ReceiptController.php
  15. 39 1
      protected/controller/ReceiptExtendController.php
  16. 9 1
      protected/controller/fee/fee_controller.php
  17. 1 0
      protected/controller/ghController.php
  18. 4 0
      protected/model/cld/account_item_cld.php
  19. 17 2
      protected/model/cld/staff_cld.php
  20. 2 0
      protected/model/receipt.php
  21. 11 0
      protected/model/wasteBook.php
  22. 0 63
      protected/services/CopyOfinvoice_service.php
  23. 16 1
      protected/services/staff_service.php
  24. 2 16
      protected/view/admin/admin_EdiUser.html
  25. 11 9
      protected/view/admin/expensesDoc.html
  26. 37 2
      protected/view/admin/invoiceAggregateCompanyDetail.html
  27. 1 1
      protected/view/admin/invoiceMenu.html
  28. 1 0
      protected/view/admin/invoicePrintStayAchieve.html
  29. 21 13
      protected/view/admin/invoiceUntreadAchieve.html
  30. 3 3
      protected/view/admin/remitAdd.html
  31. 16 110
      protected/view/expenses/wasteBook.html
  32. 3 3
      protected/view/fee/create/receipt.html
  33. 12 1
      protected/view/fee/detail/receiptPrint_compatible.html
  34. 2 2
      protected/view/humanResource/hr.html
  35. 3 3
      protected/view/humanResource/hrEmployee.html
  36. 3 0
      protected/view/login.html
  37. 37 0
      protected/view/receipt/receiptTrain.html
  38. 2 2
      protected/view/receipt/receiptTrainApproval.html

+ 1 - 1
global/vue/fee/fee_receipt_data.js

@@ -8,7 +8,7 @@ let data = {
     receiptTypeMenu: [
         {
             id: 0,
-            name: "办事处相关费用",
+            name: "日常相关费用",
             show: true,
             anchor: "officeAnchor",
             active: true,

+ 1 - 1
global/vue/fee/receipt_office_component.js

@@ -33,7 +33,7 @@ Vue.component("office", {
         <table class="table table-bordered table-condensed table-hover mb-0">
             <tbody>
                 <tr>
-                    <th colspan="2" class="taC">办事处相关费用</th>
+                    <th colspan="2" class="taC">日常相关费用</th>
                 </tr>
                 <tr v-for="item in daily" >
                     <th>{{ item.name }}</th>

+ 154 - 34
global/vue/fee/receipt_trave_component.js

@@ -233,43 +233,163 @@ Vue.component("trave", {
                 this.alertDia("请选择行程时间");
                 return
             }
-            // 构建行程信息
-            tripList = [];
-            // 出发地
-            var newTripItem = NewTraveItem();
-            tripList.push({
-                province: this.departureProvinceEdi,
-                city: this.departureCityEdi,
-                tripItem: newTripItem,
-                subtotal: 0,
-            });
-            // 目的地
-            this.arrivalList.forEach(element => {
-                var newTripItem = NewTraveItem();
-                tripList.push({
-                    province: element.arrivalProvince,
-                    city: element.arrivalCity,
-                    tripItem: newTripItem,
-                    subtotal: 0,
+            // // 构建行程信息
+            // tripList = [];
+            // // 出发地
+            // var newTripItem = NewTraveItem();
+            // tripList.push({
+            //     province: this.departureProvinceEdi,
+            //     city: this.departureCityEdi,
+            //     tripItem: newTripItem,
+            //     subtotal: 0,
+            // });
+            // // 目的地
+            // this.arrivalList.forEach(element => {
+            //     var newTripItem = NewTraveItem();
+            //     tripList.push({
+            //         province: element.arrivalProvince,
+            //         city: element.arrivalCity,
+            //         tripItem: newTripItem,
+            //         subtotal: 0,
+            //     });
+            // });
+            // // 结束地
+            // var newTripItem = NewTraveItem();
+            // tripList.push({
+            //     province: this.arrivalProvinceEdi,
+            //     city: this.arrivalCityEdi,
+            //     tripItem: newTripItem,
+            //     subtotal: 0.00,
+            // });
+            // // 构建差旅信息
+            // trave = {
+            //     tripTime: this.tripTime,
+            //     tripList: tripList,
+            //     total: 0.00,
+            // };
+
+            // this.traveList[this.ediIndex] = trave;
+
+            // // 更新差旅信息
+            this.traveList[this.ediIndex].tripList[0].province=this.departureProvinceEdi;
+            this.traveList[this.ediIndex].tripList[0].city=this.departureCityEdi;
+            // this.traveList[this.ediIndex].tripList[0].subtotal=0;
+            // // 更新出发地
+            // this.traveList[this.ediIndex].tripList[0].tripItem.forEach(element => {
+            //     element.price=0.00;
+            //     element.remark="";
+            // });
+            // 更新目的地
+            let countOriginal=this.traveList[this.ediIndex].tripList.length-2;
+            let countNow=this.arrivalList.length;
+            
+            if(countOriginal>countNow){
+                let poor=countOriginal-countNow;
+                this.traveList[this.ediIndex].tripList.splice(countNow,poor);
+            }
+
+            // 相等-更新省市,是否更新过
+            if(countOriginal==countNow){
+                let count=this.traveList[this.ediIndex].tripList.length-1;
+                
+                this.traveList[this.ediIndex].tripList.forEach((element,index) => {
+                    if(index>0&&index<count){
+                        element.province=this.arrivalList[index-1].arrivalProvince;
+                        element.city=this.arrivalList[index-1].arrivalCity;
+                    }
                 });
-            });
+            }
+
+            if(countOriginal<countNow){
+                // 更新原地区
+                let count=this.traveList[this.ediIndex].tripList.length
+                if(count>2){
+                    this.traveList[this.ediIndex].tripList.forEach((element,index) => {
+                        if(index>0&&index<count){
+                            element.province=this.arrivalList[index-1].arrivalProvince;
+                            element.city=this.arrivalList[index-1].arrivalCity;;
+                        }
+                    });
+                }
+                
+                if(countOriginal==0){
+                    this.arrivalList.forEach(element => {
+                        var newTripItem = NewTraveItem();
+                        this.traveList[this.ediIndex].tripList.splice(1,0,{
+                            province: element.arrivalProvince,
+                            city: element.arrivalCity,
+                            tripItem: newTripItem,
+                            subtotal: 0,
+                        });
+                    });
+                }else{
+                    let poor=countNow-countOriginal;
+                    for (let i = 0; i < poor; i++) {
+                        var newTripItem = NewTraveItem();
+                        this.traveList[this.ediIndex].tripList.splice(countOriginal+1,0,{
+                            province: this.arrivalList[poor+i].arrivalProvince,
+                            city: this.arrivalList[poor+i].arrivalCity,
+                            tripItem: newTripItem,
+                            subtotal: 0,
+                        });
+                    }
+                }
+                
+
+            }
+
+            // this.traveList[this.ediIndex].tripList.splice(1,countOriginal-2);
+            
+            // this.traveList[this.ediIndex].tripList.forEach((element,index) => {
+            //     if(index>0&&index<count){
+            //         delete this.traveList[this.ediIndex].tripList[index];
+            //     }
+            // });
+            // 目的地
+            // this.arrivalList.forEach(element => {
+            //     var newTripItem = NewTraveItem();
+            //     this.traveList[this.ediIndex].tripList.splice(1,0,{
+            //         province: element.arrivalProvince,
+            //         city: element.arrivalCity,
+            //         tripItem: newTripItem,
+            //         subtotal: 0,
+            //     });
+            //     // this.traveList[this.ediIndex].tripList.push({
+            //     //     province: element.arrivalProvince,
+            //     //     city: element.arrivalCity,
+            //     //     tripItem: newTripItem,
+            //     //     subtotal: 0,
+            //     // });
+            // });
             // 结束地
-            var newTripItem = NewTraveItem();
-            tripList.push({
-                province: this.arrivalProvinceEdi,
-                city: this.arrivalCityEdi,
-                tripItem: newTripItem,
-                subtotal: 0.00,
-            });
-            // 构建差旅信息
-            trave = {
-                tripTime: this.tripTime,
-                tripList: tripList,
-                total: 0.00,
-            };
+            let count=this.traveList[this.ediIndex].tripList.length;
+            this.traveList[this.ediIndex].tripList[count-1].province=this.arrivalProvinceEdi;
+            this.traveList[this.ediIndex].tripList[count-1].city=this.arrivalCityEdi;
+            // this.traveList[this.ediIndex].tripList[count-1].subtotal=0.00;
+            // var newTripItem = NewTraveItem();
+            // this.traveList[this.ediIndex].tripList.push({
+            //     province: this.arrivalProvinceEdi,
+            //     city: this.arrivalCityEdi,
+            //     tripItem: newTripItem,
+            //     subtotal: 0.00,
+            // });
+
+
+            this.traveList[this.ediIndex].tripTime=this.tripTime;
+            this.traveList[this.ediIndex].total=0.00;
+        //    重新计算费用合计
+            this.computeTraveItem();
+            
+
+            // this.travePrice();
+
+
+
+
+
 
-            this.traveList[this.ediIndex] = trave;
 
+            // this.traveItem=[];
             // 更新完成
             this.ediIndex = '';
             this.tripTimeEdi = '';
@@ -382,7 +502,7 @@ Vue.component("trave", {
                         </th>
                     </tr>
 
-                    <tbody v-for="(trip,i) in trave.tripList">
+                    <tbody v-for="(trip,i) in trave.tripList"  >
                     <tr>
                         <th colspan="3" class="ta"><i class="contactsMark icon-">P</i> {{trip.province}}-{{trip.city}}</th>
                     </tr>

+ 1 - 1
index.php

@@ -16,7 +16,7 @@ include $config['BASE_PATH'].'app/DooConfig.php';
 Doo::conf()->set($config);
 
 # remove this if you wish to see the normal PHP error view.
-//  include $config['BASE_PATH'].'diagnostic/debug.php';
+//    include $config['BASE_PATH'].'diagnostic/debug.php';
 
 Doo::acl()->rules=$acl;
 

+ 3 - 0
protected/class/receipt.finances.func.php

@@ -228,6 +228,9 @@ function _structureReportItem($inputDate,$receivablesMessage,$revenueType,$categ
 	$item['revenueTotalDay']=$revenueTotalDay;
 	
 	$item['outlayType']=$outlayType;
+	
+	
+	
 	$item['outlayMsg']=$outlayMsg;
 	$item['outlayBankMsg']=$outlayBankMsg;
 	$item['outlayPriceShow']=$outlayPriceShow;

+ 2 - 1
protected/class/receipt.func.php

@@ -2348,7 +2348,7 @@ $styleThinBlackBorderOutline = array(
 	if(0==$receiptDetail['remittanceBankType']){
 		$obj->getactivesheet()->setCellValue ( 'D7','广发银行' );
 	}else{
-		$obj->getactivesheet()->setCellValue ( 'D7',其他 );
+		$obj->getactivesheet()->setCellValue ( 'D7','其他' );
 	}
 	
 	$obj->getactivesheet()->setCellValue ( 'A8','汇款开户银行名称' );
@@ -2369,6 +2369,7 @@ $styleThinBlackBorderOutline = array(
 	$obj->getActiveSheet ()->setTitle ( '信息' );
 	
 	//------------------------------------------------------------------------------------------
+	// 绘制汇总表
 	$obj->createSheet();
 	$obj->setActiveSheetIndex(1);
 	makeSummaryData($obj,$summary,$aiList);

+ 3 - 3
protected/config/routes.conf.php

@@ -819,9 +819,9 @@ $route['*']['/ajaxGetStaffByPid'] = array('HumanResourceController', 'ajaxGetSta
 $route['*']['/ajaxGetPositionByPid'] = array('HumanResourceController', 'ajaxGetPositionByPid');
 
 
-
-
-
+//项目管理 
+$route['post']['/cm/auth'] = array('ConstructionManagementController', 'auth');
+$route['get']['/cm/category'] = array('ConstructionManagementController', 'category');
 
 //假期管理
 $route['*']['/myList'] = array('HolidayController', 'myList');

+ 8 - 8
protected/config/wasteBook.conf.php

@@ -3,24 +3,24 @@
 $waste['total']=0;
 //存款部分
 $waste ['bank'] = array (
-		'CGBDeposit' => 0,   //广发存款
-		'ICBCDeposit' => 0,  //工行存款
-		'HUADeposit' => 0,	//纵横广发(其中纵横知道充值金额)
-		'PersonalDeposit' => 0, //个人存款
+		'CGBDeposit' => 282243,   //广发存款
+		'ICBCDeposit' => 127.12,  //工行存款
+		'HUADeposit' => 167757.40,	//纵横广发(其中纵横知道充值金额)
+		'PersonalDeposit' => 106220.23, //个人存款
 );
 //理财部分
 $waste ['financial'] = array (
 		'current' => array(
 				'CGBDeposit' => 0,		//广发活期
-				'ICBCDeposit' => 0,		//工行活期
+				'ICBCDeposit' => 7477031.73,		//工行活期
 		),
 		'fixed' => array(
-				'CGBDeposit' => 0,			//广发固定
-				'ICBCDeposit' => 0,			//(原本是工会活期)个人固定
+				'CGBDeposit' => 3000000,			//广发固定
+				'ICBCDeposit' => 300000,			//(原本是工会活期)个人固定
 		),
 		
 );
 
-$wbBalance=0;
+$wbBalance=8372332.5;
 
 ?>

+ 4 - 5
protected/controller/AdminController.php

@@ -392,8 +392,8 @@ class AdminController extends DooController {
 		$telephone = $this->get_args ( 'telephone' ) ? $this->get_args ( 'telephone' ) : "";
 		$email = $this->get_args ( 'email' ) ? $this->get_args ( 'email' ) : "";
 		$username = $this->get_args ( 'username' ) ? $this->get_args ( 'username' ) : "";
-		$nature = $this->get_args ( 'nature' ) ? $this->get_args ( 'nature' ) : "";
-		$hiredate = $this->get_args ( 'hiredate' ) ? $this->get_args ( 'hiredate' ) : "";
+		
+		
 		
 		if (! empty ( $sid )) {
 			$msg = "";
@@ -438,10 +438,9 @@ class AdminController extends DooController {
 			else
 				$msg = "邮箱不正确";
 			
-			if (! empty ( $hiredate ))
-				$staff->hiredate = $hiredate;
 			
-			$staff->nature = $nature;
+			
+			
 			
 			$staff->update ();
 			

+ 22 - 6
protected/controller/HumanResourceController.php

@@ -1287,8 +1287,9 @@ class HumanResourceController extends DooController {
 			$sid = $XDeode->decode ( $sidKey );
 			
 			$detail = $staff->getStaffBySid ( $sid );
-			if (empty ( $detail ))
+			if (empty ( $detail )){
 				die ( 'illegal request' );
+			}
 				
 				// 工龄记录
 			$seniorityFormula = json_decode ( $detail ['seniorityFormula'], true );
@@ -2888,6 +2889,7 @@ class HumanResourceController extends DooController {
 			if (empty ( $detail ))
 				$html = '';
 			else {
+				
 				$html = '
 				<div class="modal-body saeaList">
 					<div class="fL staff-detail-con">
@@ -2944,7 +2946,7 @@ class HumanResourceController extends DooController {
 							</tr>
 						</tbody>
 					</table>
-					<table class="table table-bordered table-condensed">
+					<table class="table table-bordered table-condensed hide">
 							<tbody><tr>
 								<th class="taC" width="150">基本工资</th><td width="210">' . $detail ['baseWage'] . '</td>
 								<th class="taC" width="150">岗位工资</th><td>' . $detail ['postWage'] . '</td>
@@ -2957,8 +2959,22 @@ class HumanResourceController extends DooController {
 					</table>';
 					
 				}
-										
-					
+						
+				$html.='<table class="table table-bordered table-condensed ">
+				<tbody><tr>
+				<th class="taC" width="150">户口所在地</th><td width="210" colspan="3">' . $detail ['registeredResidence'] . '</td>
+				</tr>
+				<tr>
+				<th class="taC" width="150">毕业学校</th><td>' . $detail ['graduateInstitutions'] . '</td>
+				<th class="taC" width="150">所学专业</th><td>' . $detail ['major'] . '</td>
+				</tr>
+						
+						<tr>
+				<th class="taC" width="150">毕业时间</th><td>' . $detail ['graduationTime'] . '</td>
+				<th class="taC" width="150">毕业学历</th><td>' . $detail ['education'] . '</td>
+				</tr>
+				</tbody>
+				</table>';
 						
 										
 						if($detail ['pendStatus']==3){
@@ -3615,11 +3631,11 @@ target="_blank">反面(照片)</a>
 							<th class="taC" width="150">入职日期</th><td>' . $detail ['hiredate'] . ' <span class="colGray">已入职' . $detail ['workforce'] . '天</span></td>
 							<th class="taC" width="150">试用日期</th><td>2013-07-01</td>
 						</tr>
-						<tr>
+						<tr class="hide">
 								<th class="taC" width="150">基本工资</th><td>' . $detail ['baseWage'] . '</td>
 								<th class="taC" width="150">岗位工资</th><td>' . $detail ['postWage'] . '</td>
 							</tr>
-							<tr>
+							<tr class="hide">
 								<th class="taC" width="150">绩效奖金</th><td>' . $detail ['achievementBonus'] . '</td>
 								<th class="taC" width="150"></th><td></td>
 							</tr>

+ 26 - 4
protected/controller/InvoiceController.php

@@ -459,6 +459,7 @@ class InvoiceController extends DooController {
 	 * @return string 返回跳转开票主页路径
 	 */
 	function invoiceAddDo() {
+// 		include Doo::conf ()->BASE_PATH . 'diagnostic/debug.php';
 		$cid = $this->get_args ( 'cid' ) && is_numeric ( $this->get_args ( 'cid' ) ) ? $this->get_args ( 'cid' ) : 0;
 		$invoiceType = $this->get_args ( 'invoiceType' ) && is_numeric ( $this->get_args ( 'invoiceType' ) ) ? $this->get_args ( 'invoiceType' ) : 0;
 		$doPost = $this->get_args ( 'doPost' ) && is_numeric ( $this->get_args ( 'doPost' ) ) ? $this->get_args ( 'doPost' ) : 0;
@@ -3025,9 +3026,12 @@ class InvoiceController extends DooController {
 			$con = ' and status=2 and printStatus=1';
 		
 		if ($invoiceType == 'ORDINARY')
-			$con .= ' and invoiceType=0 ';
-		elseif ($invoiceType == 'SPECIAL')
+			$con .= ' and invoiceType=0 and invoiceForm=0 ';
+		elseif ($invoiceType == 'SPECIAL'){
 			$con .= ' and invoiceType=1 ';
+		}elseif($invoiceType == 'ELECTRON'){
+			$con .= ' and invoiceType=0 and invoiceForm=1 ';
+		}
 		
 		if ($invoiceTrain == 'ORDINARY')
 			$con .= ' and trainId=0 ';
@@ -3049,8 +3053,12 @@ class InvoiceController extends DooController {
 			$D2 = $dateArr [1];
 		}
 		
-		if (! empty ( $D1 ) && ! empty ( $D2 ) && ! empty ( $date ))
+		if (! empty ( $D1 ) && ! empty ( $D2 ) && ! empty ( $date )){
+			$D1= $D1.":00.00.00";
+			$D2= $D2.":23.59.59";
 			$con .= ' and printTime BETWEEN "' . $D1 . '" AND "' . $D2 . '" ';
+		}
+			
 		
 		if (! empty ( $MebSea )) {
 			$con .= ' and ( invoiceNo like "%' . $MebSea . '%" or invoiceTitle like "%' . $MebSea . '%" or invoiceCompany like "%' . $MebSea . '%" or invoicePrice like "%' . $MebSea . '%" or invoiceNo like "%' . $MebSea . '%" )';
@@ -7130,6 +7138,20 @@ class InvoiceController extends DooController {
 		
 		//,'desc','desc','printTime'
 		$list = $invoice->getInvoiceByUntreadStatusPage ( $limit, $con );
+		
+		$totalPrice=array('invoicePrice'=>0.00,'receivePrice'=>0.00,'receivablesPrice'=>0.00);
+		foreach ($list as $key=>$value){
+			
+			$totalPrice['invoicePrice']=bcadd($totalPrice['invoicePrice'], $value['invoicePrice'],2);
+			if($value['sumPrice']!=0){
+				$totalPrice['receivePrice']=bcadd($totalPrice['receivePrice'], $value['sumPrice'],2);
+			}
+			if($value['diffPrice']!=0){
+				$totalPrice['receivablesPrice']=bcadd($totalPrice['receivablesPrice'], $value['diffPrice'],2);
+			}
+		}
+		$this->data ['totalPrice'] = $totalPrice;
+		
 		$monthHtml = "";
 		if ($year != "ALL") {
 			for($i = 1; $i <= 12; $i ++) {
@@ -7463,7 +7485,7 @@ class InvoiceController extends DooController {
 		$type = $this->get_args ( 'type' ) ? $this->get_args ( 'type' ) : "";
 		$serial = $this->get_args ( 'serial' ) ? $this->get_args ( 'serial' ) : "";
 		$loss = $this->get_args ( 'loss' ) ? $this->get_args ( 'loss' ) : false;
-		include Doo::conf()->BASE_PATH.'diagnostic/debug.php';
+// 		include Doo::conf()->BASE_PATH.'diagnostic/debug.php';
 		if (empty ( $serial )) {
 			echo json_encode ( array (
 					'status' => 2,

+ 13 - 2
protected/controller/MainController.php

@@ -53,7 +53,11 @@ class MainController extends DooController {
 			'7' => array (
 					'R',
 					'点击筛选标签' 
-			) 
+			) ,
+			'8' => array (
+					'n',
+					'点击筛选标签'
+			)
 	);
 	public $webPath = "http://cld.smartcost.com.cn/upload/emailAnnex/";
 	public function beforeRun($resource, $action) {
@@ -221,6 +225,8 @@ class MainController extends DooController {
 			}
 		}
 		
+		
+		
 		$data ['staff'] = $detail; // $staff->getUser ();
 		$data ['login'] = "";
 		if (! empty ( $passwork ))
@@ -3000,6 +3006,7 @@ class MainController extends DooController {
 		header ( "Location: /mycompany" );
 	}
 	function DoAddTag() {
+// 		include Doo::conf()->BASE_PATH.'diagnostic/debug.php';
 		$cid = $this->get_args ( 'id' );
 		$tooltipAct = $this->get_args ( 'tooltipAct' ) ? $this->get_args ( 'tooltipAct' ) : "";
 		Doo::loadModel ( 'client' );
@@ -6169,6 +6176,7 @@ class MainController extends DooController {
 	// die ();
 	// }
 	function eMailTask() {
+		
 		Doo::loadModel ( 'tag' );
 		$tag = new tag ();
 		Doo::loadModel ( 'district' );
@@ -7315,17 +7323,20 @@ class MainController extends DooController {
 		return "/eMailTask";
 	}
 	function eMailList() {
+// 		include Doo::conf ()->BASE_PATH . 'diagnostic/debug.php';
 		Doo::loadModel ( 'eMailList' );
 		$eMailList = new eMailList ();
 		Doo::loadModel ( 'tag' );
 		$tag = new tag ();
 		
 		$mailList = $eMailList->find ( array (
-				'where' => 'staffId=' . $this->staff [0] ['sid'],
+				'where' => ' status=0 and staffId=' . $this->staff [0] ['sid'],
 				'desc' => 'elid',
 				'asArray' => true 
 		) );
 		
+// 		print_r($mailList);
+// 		die;
 		foreach ( $mailList as $key => $value ) {
 			$mailList [$key] ['clientName2'] = $mailList [$key] ['clientName3'] = array ();
 			$mailList [$key] ['clientName'] = json_decode ( gzuncompress ( base64_decode ( $value ['clientName'] ) ), true );

+ 4 - 4
protected/controller/ReceiptAjaxController.php

@@ -416,7 +416,7 @@ class ReceiptAjaxController extends DooController {
 				$item['outlayType']=_getOutlayTypeCN($value);
 
 				//支出内容
-				$item['outlayMsg']='';
+				$item['outlayMsg']=' /'.$value['category'];
 				if($value['accountType']==5||$value['accountType']==9||$value['accountType']==10){
 					$item['outlayMsg']=$value['data']['remarks'];
 				}
@@ -439,7 +439,7 @@ class ReceiptAjaxController extends DooController {
 				//费用类别
 				$item['outlayType']=_getOutlayTypeCN($value);
 				//支出内容
-				$item['outlayMsg']='';
+				$item['outlayMsg']='/'.$value['category'];
 				$item['outlayBankMsg']=$value['accountBankMsg'];
 				$item['outlayPriceShow']=$value['accountPriceShow'];
 				$item['outlayTotalDay']='';
@@ -465,7 +465,7 @@ class ReceiptAjaxController extends DooController {
 				}
 				$item=_structureReportItem('','','','','','','今日总收入',number_format($revenueTotalDayPrice,2)
 						,'','','','今日总支出',number_format($outlayTotalDayPrice,2));
-				$item['balance']=$balance+$revenueTotalDayPrice-$outlayTotalDayPrice;
+				$item['balance']=bcadd($balance,$revenueTotalDayPrice-$outlayTotalDayPrice,2);
 				array_push($data[$key], $item);
 			}
 		}
@@ -502,7 +502,7 @@ class ReceiptAjaxController extends DooController {
 		
 		$item=_structureReportItem('','','','','','','总收入',number_format($revenueTotalMonthPrice,2)
 				,'','','','总支出',number_format($outlayTotalMonthPrice,2));
-		$item['balance']=$balance+$revenueTotalMonthPrice-$outlayTotalMonthPrice;
+		$item['balance']=bcadd($balance,$revenueTotalMonthPrice-$outlayTotalMonthPrice,2);
 		$item['key']='summary';
 		$jsonList[1]= $item;
 		

+ 263 - 111
protected/controller/ReceiptController.php

@@ -3293,6 +3293,8 @@ class ReceiptController extends DooController {
 			$receipt->verify = $verify;
 			$receipt->date = date ( "Y-m-d" );
 			
+			$receipt->new_summary = 1;
+
 			$receipt->executeCopy = $executeDetail ['staff'];
 			$receipt->receiptOrder = "#P" . date ( "Ymd" ) . mt_rand ( 1000, 9999 );
 			
@@ -5888,6 +5890,8 @@ class ReceiptController extends DooController {
 			$receiptList [$key] ['executeCopy'] = $executeCopy;
 			// print_r($verifyList);
 			$receiptList [$key] ['verifyList'] = $verifyList;
+// 			print_r($verifyList);
+			
 			$receiptList [$key] ['staffDetail'] = $staff->getOne ( array (
 					'where' => 'sid=' . $value ['staff'],
 					'asArray' => true 
@@ -5965,6 +5969,9 @@ class ReceiptController extends DooController {
 		
 		$data ['enclosurHtml'] = $enclosurHtml;
 		$receiptList [0] ['rlList'] = $rlList;
+		
+// 		print_r($rlList);
+		
 		$data ['receiptList'] = $receiptList;
 		$data ['receiptList'][0]['itinerary']=str_replace('\n','<br/>',$receiptList[0]['itinerary']);
 		// print_r($receiptList);
@@ -8039,6 +8046,7 @@ class ReceiptController extends DooController {
 	}
 
 	function hisImplement() {
+// 		include Doo::conf ()->BASE_PATH . 'diagnostic/debug.php';
 		$item = isset ( $this->params ['item'] ) ? $this->params ['item'] : "";
 		if (empty ( $item ))
 			$item = $this->get_args ( 'item' ) ? $this->get_args ( 'item' ) : "expenses";
@@ -8344,7 +8352,7 @@ class ReceiptController extends DooController {
 			) );
 			$receiptList [$key] ['staffDetail'] = $staffDetail;
 			$receiptList [$key] ['button'] = $button;
-			
+			$receiptList [$key] ['paymentABS']="";
 			if ($value['Rtype']==1){
 			$receiptList [$key] ['relust'] = $value['sum']-$value['loanSum'];
 			$receiptList [$key] ['relustABS'] = sprintf("%.2f",abs($receiptList [$key] ['relust']));
@@ -8413,7 +8421,8 @@ class ReceiptController extends DooController {
 						$value ['bankName'],
 						$value ['remittanceBankType'],
 						$value ['coupletNumber'],
-						$value ['sum'] 
+						$value ['sum'] ,
+						$receiptList [$key] ['paymentABS']
 				);
 				array_push ( $remittanceList, $remittanceDetail );
 				$staffBatchNumber ++;
@@ -8489,7 +8498,8 @@ class ReceiptController extends DooController {
 				'员工账户开户行',
 				'转账类型',
 				'联行号',
-				'金额' 
+				'金额', 
+				'结算(培训班)'
 		);
 		$data = json_decode ( $remittanceInfo, true );
 		if (empty ( $data ))
@@ -13806,135 +13816,273 @@ class ReceiptController extends DooController {
 			die ( 'illegal request' );
 		}
 		
-		include './protected/config/wasteBook.conf.php';
 		Doo::loadModel ( 'wasteBook' );
 		$wasteBook = new wasteBook ();
-		$data ['store']=$waste;
 		$inComeStatistics = $wasteBook->getWasteBookStatisticsByIncome ();
-		//print_r($waste);
-		//1-收入支出流水金额合计
-		$waste = $this->getWasteBookStatistics ( $waste, $inComeStatistics );
-		//echo $waste['bank']['CGBDeposit'].'</br>';
-		//2020-07-20 -理财相关-面板数据
-		Doo::loadClass ( 'wasteBook.finances.func' );
-		$financesStatistics=$wasteBook->getFinancesStatistics();
-		//print_r($waste);
-		// 展示使用
-		// 收入
-		//print_r($inComeStatistics);
-		$wasteStatistics['CGBDeposit']=0;
-		$wasteStatistics['ICBCDeposit']=0;
-		$wasteStatistics['HUADeposit']=0;
-		$wasteStatistics['PersonalDeposit']=0;
-		foreach ($inComeStatistics['incomeStatistics'] as $value ){
-			if($value['accountBank']=='CGBDeposit'){
-				$wasteStatistics['CGBDeposit']+=$value['accountPrice'];
-			}
-			if($value['accountBank']=='ICBCDeposit'){
-				$wasteStatistics['ICBCDeposit']+=$value['accountPrice'];
-			}
-			if($value['accountBank']=='HUADeposit'){
-				$wasteStatistics['HUADeposit']+=$value['accountPrice'];
-			}
-			if($value['accountBank']=='PersonalDeposit'){
-				$wasteStatistics['PersonalDeposit']+=$value['accountPrice'];
-			}
-		}
-		$data ['wasteStatistics']=$wasteStatistics;
-		//支出
-		$wasteStatistics['CGBDeposit']=0;
-		$wasteStatistics['ICBCDeposit']=0;
-		$wasteStatistics['HUADeposit']=0;
-		$wasteStatistics['PersonalDeposit']=0;
-		foreach ($inComeStatistics['expenditureStatistics'] as $value ){
-			if($value['accountBank']=='CGBDeposit'){
-				$wasteStatistics['CGBDeposit']+=$value['accountPrice'];
-			}
-			if($value['accountBank']=='ICBCDeposit'){
-				$wasteStatistics['ICBCDeposit']+=$value['accountPrice'];
-			}
-			if($value['accountBank']=='HUADeposit'){
-				$wasteStatistics['HUADeposit']+=$value['accountPrice'];
-			}
-			if($value['accountBank']=='PersonalDeposit'){
-				$wasteStatistics['PersonalDeposit']+=$value['accountPrice'];
+		
+		include './protected/config/wasteBook.conf.php';
+		
+		$wasteBook = new wasteBook ();
+		$list=$wasteBook->GetAll();
+		$total=0;
+		$noInPrice=array(
+				"LC_HQ"=>0,
+				"LC_GD"=>0,
+				//工行理财固定
+				"GH_LC_GD"=>0,
+				"CK"=>0,
+				"HQ1"=>0,
+		);
+		//理财活期
+		$GD_LC_HQ=0;$GH_LC_HQ=0;
+		//理财固定
+		$GD_LC_GD=0;$GR_LC_GD=0;
+		//存款
+		$GF_CK=0;$GH_CK=0;$GR_CK=0;$ZH_CK=0;
+		
+		foreach ($list as $key=>$value){
+// 			存款 旧理财部分 dailyType=0 accountType=9,10
+			if($value['dailyType']==0){
+				//旧理财部分 -活期
+				if($value['accountType']==10){
+					//广发理财
+					if($value['accountBank']=="CGBDeposit"){
+						$GD_LC_HQ+=$value["accountPrice"];
+					//工行理财	
+					}elseif($value['accountBank']=="ICBCDeposit"){
+						$GH_LC_HQ+=$value["accountPrice"];
+					}else{
+						//未统计到金额
+						$noInPrice['LC_HQ']+=$value["accountPrice"];
+					}
+				//旧理财部分 -固定
+				}elseif($value['accountType']==9){
+					//广发理财
+					if($value['accountBank']=="CGBDeposit"){
+						$GD_LC_HQ+=$value["accountPrice"];
+					//个人理财--- 原是工行理财固定-不统计入内
+					}elseif($value['accountBank']=="ICBCDeposit"){
+// 						$GR_LC_GD+=$value["accountPrice"];
+						$noInPrice['GH_LC_GD']+=$value["accountPrice"];
+					}else{
+						//未统计到金额
+						$noInPrice['LC_GD']+=$value["accountPrice"];
+					}
+				//存款
+				}else{
+					//广发存款
+					if($value['accountBank']=="CGBDeposit"){
+						$GF_CK+=$value["accountPrice"];
+					//工行存款
+					}elseif($value['accountBank']=="ICBCDeposit"){
+						$GH_CK+=$value["accountPrice"];
+					//个人存款	
+					}elseif($value['accountBank']=="PersonalDeposit"){
+						$GR_CK+=$value["accountPrice"];
+					//(广发)纵横知道--原华润银行
+					}elseif($value['accountBank']=="HUADeposit"){
+						$ZH_CK+=$value["accountPrice"];
+					}else{
+						$noInPrice['CK']+=$value["accountPrice"];
+					}
+				}
+			}else{
+// 			理财部分 其中 公司账户为存款部分
+				//理财账号
+				if($value['operatingBankType']==1){
+					//广发理财活期
+					if ($value['depositMethod'] == '活期' && $value['accountBank'] == 'CGBDeposit') {
+						$GD_LC_HQ += $value['accountPrice'];
+					//工行理财活期
+					}elseif ($value['depositMethod'] == '活期' && $value['accountBank'] == 'ICBCDeposit') {
+						$GH_LC_HQ += $value['accountPrice'];
+					//个人理财固定(广发)
+					}elseif ($value['depositMethod'] == '固定' && $value['accountBank'] == 'CGBPersonalDeposit') {
+						$GR_LC_GD += $value['accountPrice'];
+					//广发理财-固定
+					}elseif ($value['depositMethod'] == '固定' && $value['accountBank'] == 'CGBDeposit') {
+						$GD_LC_GD += $value['accountPrice'];
+					}else{
+						$noInPrice['HQ1']+=$value["accountPrice"];
+					}
+				//公司账号	
+				}elseif($value['operatingBankType']==2){
+					//(纵横广发)广发存款
+					if ( $value['accountBank'] == 'CGBDeposit') {
+						$GF_CK += $value['accountPrice'];
+					}elseif ( $value['accountBank'] == 'ICBCDeposit') {
+						//工行存款
+						$GH_CK += $value['accountPrice'];
+					}elseif ( $value['accountBank'] == 'PersonalDeposit') {
+						//个人存款
+						$GR_CK += $value['accountPrice'];
+					}else{
+						$noInPrice['HQ2']+=$value["accountPrice"];
+					}
+				}else{
+					$noInPrice['HQ3']+=$value["accountPrice"];
+				}
 			}
-		}
-		$data ['wastePay']=$wasteStatistics;
-		//理财公司账号部分
-		$wasteStatistics['CGBDeposit']=0;
-		$wasteStatistics['ICBCDeposit']=0;
-		$wasteStatistics['HUADeposit']=0;
-		$wasteStatistics['PersonalDeposit']=0;
-		foreach ($financesStatistics['companyAccount'] as $value ){
 			
-			//(纵横广发)广发存款
-			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'CGBDeposit') {
-				$wasteStatistics['CGBDeposit']+=$value['accountPrice'];
-			}
-			//工行存款
-			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'ICBCDeposit') {
-				$wasteStatistics['ICBCDeposit']+=$value['accountPrice'];
-			}
-			//个人存款
-			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'PersonalDeposit') {
-				$wasteStatistics['PersonalDeposit']+=$value['accountPrice'];
-			}
 		}
-		$data ['wasteCompanyAccount']=$wasteStatistics;
 		
+		$data['GF_CK']=bcadd($GF_CK,$waste['bank']['CGBDeposit'],2);
+		$data['ZH_CK']=bcadd($ZH_CK,$waste['bank']['HUADeposit'],2);
+		$data['CK_TO']=bcadd($data['GF_CK'],$data['ZH_CK'],2);
 		
+		$data['GD_LC_HQ']=bcadd($GD_LC_HQ,$waste['financial']['current']['CGBDeposit'],2);
+		$data['GH_LC_HQ']=bcadd($GH_LC_HQ,$waste['financial']['current']['ICBCDeposit'],2);
 		
+		$data['GH_CK']=bcadd($GH_CK,$waste['bank']['ICBCDeposit'],2);
+		$data['GR_CK']=bcadd($GR_CK,$waste['bank']['PersonalDeposit'],2);
 		
-
-		//理财部分的金额计算
-		$waste =_getFinancesWBS ( $waste, $financesStatistics );
-		//echo $waste['bank']['CGBDeposit'].'</br>';;
-		//存款面板数据--日常收支改变后的金额汇总
-		$bankSavingsStatistics=$wasteBook->getBankSavingsStatistics();
-		$waste =_getBankSavingsWBS ( $waste, $bankSavingsStatistics );
+		$data['HQ_TO']=bcadd($data['GD_LC_HQ']+$data['GH_LC_HQ'],$data['GH_CK']+$data['GR_CK'],2);
 		
-		//展示调试BUG-使用
-		//print_r($bankSavingsStatistics);
-		$wasteStatistics['CGBDeposit']=0;
-		$wasteStatistics['ICBCDeposit']=0;
-		$wasteStatistics['PersonalDeposit']=0;
-		foreach ($bankSavingsStatistics as $value ){
-			//(纵横广发)广发存款
-			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'CGBDeposit') {
-				$wasteStatistics['CGBDeposit']+=$value['accountPrice'];
-			}
-			//工行存款
-			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'ICBCDeposit') {
-				$wasteStatistics['ICBCDeposit']+=$value['accountPrice'];
-			}
-			//个人存款
-			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'PersonalDeposit') {
-				$wasteStatistics['PersonalDeposit']+=$value['accountPrice'];
-			}
-		}
-		$data ['wasteNewPay']=$wasteStatistics;
+		$data['GD_LC_GD']=bcadd($GD_LC_GD,$waste['financial']['fixed']['CGBDeposit'],2);
+		$data['GR_LC_GD']=bcadd($GR_LC_GD,$waste['financial']['fixed']['ICBCDeposit'],2);
+		
+		
+		
+		
+		$data['total']=bcadd($data['CK_TO']+$data['HQ_TO'],$data['GD_LC_GD']+$data['GR_LC_GD'],2);
+		
+		
+		
+		
+		
+		
+// 		echo $waste;
+// 		$data['total']=bcadd($total,$waste,2);
+		
+// 		include './protected/config/wasteBook.conf.php';
+// 		Doo::loadModel ( 'wasteBook' );
+// 		$wasteBook = new wasteBook ();
+// 		$data ['store']=$waste;
+// 		$inComeStatistics = $wasteBook->getWasteBookStatisticsByIncome ();
+// 		//print_r($waste);
+// 		//1-收入支出流水金额合计
+// 		$waste = $this->getWasteBookStatistics ( $waste, $inComeStatistics );
+// 		//echo $waste['bank']['CGBDeposit'].'</br>';
+// 		//2020-07-20 -理财相关-面板数据
+// 		Doo::loadClass ( 'wasteBook.finances.func' );
+// 		$financesStatistics=$wasteBook->getFinancesStatistics();
+// 		//print_r($waste);
+// 		// 展示使用
+// 		// 收入
+// 		//print_r($inComeStatistics);
+// 		$wasteStatistics['CGBDeposit']=0;
+// 		$wasteStatistics['ICBCDeposit']=0;
+// 		$wasteStatistics['HUADeposit']=0;
+// 		$wasteStatistics['PersonalDeposit']=0;
+// 		foreach ($inComeStatistics['incomeStatistics'] as $value ){
+// 			if($value['accountBank']=='CGBDeposit'){
+// 				$wasteStatistics['CGBDeposit']+=$value['accountPrice'];
+// 			}
+// 			if($value['accountBank']=='ICBCDeposit'){
+// 				$wasteStatistics['ICBCDeposit']+=$value['accountPrice'];
+// 			}
+// 			if($value['accountBank']=='HUADeposit'){
+// 				$wasteStatistics['HUADeposit']+=$value['accountPrice'];
+// 			}
+// 			if($value['accountBank']=='PersonalDeposit'){
+// 				$wasteStatistics['PersonalDeposit']+=$value['accountPrice'];
+// 			}
+// 		}
+// 		$data ['wasteStatistics']=$wasteStatistics;
+// 		//支出
+// 		$wasteStatistics['CGBDeposit']=0;
+// 		$wasteStatistics['ICBCDeposit']=0;
+// 		$wasteStatistics['HUADeposit']=0;
+// 		$wasteStatistics['PersonalDeposit']=0;
+// 		foreach ($inComeStatistics['expenditureStatistics'] as $value ){
+// 			if($value['accountBank']=='CGBDeposit'){
+// 				$wasteStatistics['CGBDeposit']+=$value['accountPrice'];
+// 			}
+// 			if($value['accountBank']=='ICBCDeposit'){
+// 				$wasteStatistics['ICBCDeposit']+=$value['accountPrice'];
+// 			}
+// 			if($value['accountBank']=='HUADeposit'){
+// 				$wasteStatistics['HUADeposit']+=$value['accountPrice'];
+// 			}
+// 			if($value['accountBank']=='PersonalDeposit'){
+// 				$wasteStatistics['PersonalDeposit']+=$value['accountPrice'];
+// 			}
+// 		}
+// 		$data ['wastePay']=$wasteStatistics;
+// 		//理财公司账号部分
+// 		$wasteStatistics['CGBDeposit']=0;
+// 		$wasteStatistics['ICBCDeposit']=0;
+// 		$wasteStatistics['HUADeposit']=0;
+// 		$wasteStatistics['PersonalDeposit']=0;
+// 		foreach ($financesStatistics['companyAccount'] as $value ){
+			
+// 			//(纵横广发)广发存款
+// 			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'CGBDeposit') {
+// 				$wasteStatistics['CGBDeposit']+=$value['accountPrice'];
+// 			}
+// 			//工行存款
+// 			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'ICBCDeposit') {
+// 				$wasteStatistics['ICBCDeposit']+=$value['accountPrice'];
+// 			}
+// 			//个人存款
+// 			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'PersonalDeposit') {
+// 				$wasteStatistics['PersonalDeposit']+=$value['accountPrice'];
+// 			}
+// 		}
+// 		$data ['wasteCompanyAccount']=$wasteStatistics;
+		
+		
+		
+		
+
+// 		//理财部分的金额计算
+// 		$waste =_getFinancesWBS ( $waste, $financesStatistics );
+// 		//echo $waste['bank']['CGBDeposit'].'</br>';;
+// 		//存款面板数据--日常收支改变后的金额汇总
+// 		$bankSavingsStatistics=$wasteBook->getBankSavingsStatistics();
+//  		$waste =_getBankSavingsWBS ( $waste, $bankSavingsStatistics );
+		
+// 		//展示调试BUG-使用
+// 		//print_r($bankSavingsStatistics);
+// 		$wasteStatistics['CGBDeposit']=0;
+// 		$wasteStatistics['ICBCDeposit']=0;
+// 		$wasteStatistics['PersonalDeposit']=0;
+// 		foreach ($bankSavingsStatistics as $value ){
+// 			//(纵横广发)广发存款
+// 			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'CGBDeposit') {
+// 				$wasteStatistics['CGBDeposit']+=$value['accountPrice'];
+// 			}
+// 			//工行存款
+// 			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'ICBCDeposit') {
+// 				$wasteStatistics['ICBCDeposit']+=$value['accountPrice'];
+// 			}
+// 			//个人存款
+// 			if ($value['operatingBankType'] == 2 && $value['accountBank'] == 'PersonalDeposit') {
+// 				$wasteStatistics['PersonalDeposit']+=$value['accountPrice'];
+// 			}
+// 		}
+// 		$data ['wasteNewPay']=$wasteStatistics;
 		
 		
 		//echo $waste['bank']['CGBDeposit'].'</br>';;
 		
 		//
-		$total = $waste ['bank'] ['CGBDeposit'] + $waste ['bank'] ['ICBCDeposit']+ $waste ['bank'] ['HUADeposit']  + $waste ['bank'] ['PersonalDeposit'] + $waste ['financial'] ['current'] ['CGBDeposit'] + $waste ['financial'] ['current'] ['ICBCDeposit'] + $waste ['financial'] ['fixed'] ['CGBDeposit'] + $waste ['financial'] ['fixed'] ['ICBCDeposit'];
-		$CGBDeposit_total =$waste ['bank'] ['CGBDeposit']+$waste ['bank'] ['HUADeposit'];
+// 		$total = $waste ['bank'] ['CGBDeposit'] + $waste ['bank'] ['ICBCDeposit']+ $waste ['bank'] ['HUADeposit']  + $waste ['bank'] ['PersonalDeposit'] + $waste ['financial'] ['current'] ['CGBDeposit'] + $waste ['financial'] ['current'] ['ICBCDeposit'] + $waste ['financial'] ['fixed'] ['CGBDeposit'] + $waste ['financial'] ['fixed'] ['ICBCDeposit'];
+// 		$CGBDeposit_total =$waste ['bank'] ['CGBDeposit']+$waste ['bank'] ['HUADeposit'];
 		
 		//$waste ['bank'] ['ICBCDeposit']=sprintf("%.2f", round($waste ['bank'] ['ICBCDeposit'], 2));
 		
 		// print_r($waste);
 		
 		
-		$data ['total'] = number_format($total,2);
-		$data ['CGBDeposit_total'] =  number_format($CGBDeposit_total,2);
-		$cashBalance=$CGBDeposit_total+$waste ['bank'] ['ICBCDeposit']+$waste ['bank'] ['PersonalDeposit']+$waste ['financial'] ['current'] ['CGBDeposit']+$waste ['financial'] ['current'] ['ICBCDeposit'];
-		$data['cashBalance']= number_format($cashBalance,2);
+// 		$data ['total'] = number_format($total,2);
+// 		$data ['CGBDeposit_total'] =  number_format($CGBDeposit_total,2);
+// 		$cashBalance=$CGBDeposit_total+$waste ['bank'] ['ICBCDeposit']+$waste ['bank'] ['PersonalDeposit']+$waste ['financial'] ['current'] ['CGBDeposit']+$waste ['financial'] ['current'] ['ICBCDeposit'];
+// 		$data['cashBalance']= number_format($cashBalance,2);
 		
-		$waste ['bank'] ['CGBDeposit']=sprintf("%.2f", round($waste ['bank'] ['CGBDeposit'], 2));
+// 		$waste ['bank'] ['CGBDeposit']=sprintf("%.2f", round($waste ['bank'] ['CGBDeposit'], 2));
 		
-		$data ['waste'] = $waste;
+// 		$data ['waste'] = $waste;
 		
 		
 		
@@ -14121,9 +14269,13 @@ class ReceiptController extends DooController {
 		}
 		if (! empty ( $D1 ) && ! empty ( $D2 ))
 			$con = ' and inputDate BETWEEN "' . $D1 . '" AND "' . $D2 . '" ';
-		elseif (! empty ( $D1 ) && empty ( $D2 ))
-			$con = ' and inputDate = "' . $D1 . '"';
-		else{
+		elseif (! empty ( $D1 ) && empty ( $D2 )){
+			
+			$startYear=$D1.":00.00.00";
+			$endYear=$D1.":23.59.59";
+			
+			$con = ' and inputDate >= "'.$startYear.'" and inputDate <= "'.$endYear.'"';
+		}else{
 			$con = '  and DATE_FORMAT(inputDate,"%Y")= "'.$year.'" ';
 		}
 			

+ 39 - 1
protected/controller/ReceiptExtendController.php

@@ -502,9 +502,13 @@ class ReceiptExtendController extends DooController {
 		$companyProfit = $profit * 0.6;
 		$categoryProfit = $profit * 0.4;
 		
+		
 		$data ['profit'] = sprintf ( "%.2f", $profit );
 		$data ['companyProfit'] = sprintf ( "%.2f", $companyProfit );
 		$data ['categoryProfit'] = sprintf ( "%.2f", $categoryProfit );
+
+		$data ['companyProfit70'] = sprintf ( "%.2f", $profit * 0.7 );
+		$data ['categoryProfit30'] = sprintf ( "%.2f", $profit * 0.3 );
 		
 		$billProfit=$billPrice - $aiData ['total'];
 		$companyBillProfit = $billProfit * 0.6;
@@ -516,12 +520,19 @@ class ReceiptExtendController extends DooController {
 		// 发票利润
 		$data ['invoiceProfit'] = $invoiceTrainingDetail ['invoiceTotalAmount'] - $aiData ['total'];
 		
-		// 发票公司利润
+
+
+		
+		// 公司利润
 		$invoiceCompanyProfit = $data ['invoiceProfit'] * 0.6;
 		$data ['invoiceCompanyProfit'] = sprintf ( "%.2f", $invoiceCompanyProfit );
+		$data ['invoiceCompanyProfit70'] = sprintf ( "%.2f", $data ['invoiceProfit'] * 0.7 );
+
+
 		// 办事处利润
 		$invoiceCategoryProfit = $data ['invoiceProfit'] * 0.4;
 		$data ['invoiceCategoryProfit'] = sprintf ( "%.2f", $invoiceCategoryProfit );
+		$data ['invoiceCategoryProfit30'] = sprintf ( "%.2f", $data ['invoiceProfit'] * 0.3 );
 		
 		// print_r($aiData['dataList']);
 		$categoryActualExpenditure = $aiData ['total'] - $aiData ['categoryActualExpenditure'];
@@ -566,6 +577,8 @@ class ReceiptExtendController extends DooController {
 		}else{
 			$data ['totalBillProportion'] =$data ['profitBillProportion'] =$data ['companyBillProfitProportion'] =$data ['categoryBillProportion'] =$data ['invoiceBillTotalAmountProportion'] =0;
 		}
+
+		$data ['companyProfitProportion70']=$data ['categoryProportion30'] =0;
 		if ($invoiceArriveAmount != 0) {
 			
 			$data ['totalProportion'] = sprintf ( "%.2f", $aiData ['total'] / $invoiceArriveAmount * 100 );  //入账金额占比
@@ -575,13 +588,19 @@ class ReceiptExtendController extends DooController {
 			$data ['invoiceTotalAmountProportion'] = sprintf ( "%.2f", $data ['invoiceTrainingDetail'] ['invoiceCompanyAmount'] / $invoiceArriveAmount * 100 );
 			$data ['RIAmountProportion'] = sprintf ( "%.2f", $data ['invoiceTrainingDetail'] ['RIAmount'] / $invoiceArriveAmount * 100 );
 			$data ['companyProfitProportion'] = sprintf ( "%.2f", $companyProfit / $invoiceArriveAmount * 100 );
+			
+			$data ['companyProfitProportion70'] = sprintf ( "%.2f", $data ['companyProfit70'] / $invoiceArriveAmount * 100 );
+			
 			$data ['categoryProportion'] = sprintf ( "%.2f", $categoryProfit / $invoiceArriveAmount * 100 );
+			$data ['categoryProportion30'] = sprintf ( "%.2f", $data ['categoryProfit30'] / $invoiceArriveAmount * 100 );
+			
 			$data ['categoryActualExpenditureProportion'] = sprintf ( "%.2f", $categoryActualExpenditure / $invoiceArriveAmount * 100 );
 			$data ['paymentProportion'] = sprintf ( "%.2f", $payment / $invoiceArriveAmount * 100 );
 		} else {
 			$data ['totalProportion'] = $data ['profitProportion'] = $data ['sumProportion'] = $data ['invoiceTotalAmountProportion'] = $data ['RIAmountProportion'] = $data ['companyProfitProportion'] = $data ['categoryActualExpenditureProportion'] = $data ['paymentProportion'] = $data ['categoryProportion'] = 0;
 		}
 		// 发票金额占比计算
+		$data ['invoicecompanyProfitProportion70'] =$data ['invoicecategoryProportion30']=0;
 		if ($invoiceTrainingDetail ['invoiceTotalAmount'] != 0) {
 			// 支出
 			$data ['invoicetotalProportion'] = sprintf ( "%.2f", $aiData ['total'] / $invoiceTrainingDetail ['invoiceTotalAmount'] * 100 );
@@ -589,8 +608,10 @@ class ReceiptExtendController extends DooController {
 			$data ['invoiceprofitProportion'] = sprintf ( "%.2f", $data ['invoiceProfit'] / $invoiceTrainingDetail ['invoiceTotalAmount'] * 100 );
 			// 公司利润
 			$data ['invoicecompanyProfitProportion'] = sprintf ( "%.2f", $invoiceCompanyProfit / $invoiceTrainingDetail ['invoiceTotalAmount'] * 100 );
+			$data ['invoicecompanyProfitProportion70'] = sprintf ( "%.2f", $data ['invoiceCompanyProfit70'] / $invoiceTrainingDetail ['invoiceTotalAmount'] * 100 );
 			// 办事处利润
 			$data ['invoicecategoryProportion'] = sprintf ( "%.2f", $invoiceCategoryProfit / $invoiceTrainingDetail ['invoiceTotalAmount'] * 100 );
+			$data ['invoicecategoryProportion30'] = sprintf ( "%.2f", $data ['invoiceCategoryProfit30'] / $invoiceTrainingDetail ['invoiceTotalAmount'] * 100 );
 			// 公司收款
 			$data ['invoiceTotalAmountProportionB'] = sprintf ( "%.2f", $data ['invoiceTrainingDetail'] ['invoiceCompanyAmount'] / $invoiceTrainingDetail ['invoiceTotalAmount'] * 100 );
 			// 备用金
@@ -647,6 +668,8 @@ class ReceiptExtendController extends DooController {
 		$data ['trainEdiType'] = $trainEdiType;
 		$data ['ridKey'] = $ridKey;
 		
+		
+
 		$summaryJson = array (
 				0 => array (
 						'invoiceTotalAmount' => $data ['invoiceTrainingDetail'] ['invoiceTotalAmount'],
@@ -717,6 +740,21 @@ class ReceiptExtendController extends DooController {
 						'totalProportion'=>$data ['totalProportion']
 				),
 		);
+		if($receiptDetail['new_summary']==1){
+			$summaryJson[3]=array (
+				'1' => $data ['invoiceCompanyProfit70'],
+				'2' => $data ['invoicecompanyProfitProportion70'] . '%',
+				'3' => $data ['companyProfit70'],
+				'4' => $data ['companyProfitProportion70'] . '%'
+		);
+			$summaryJson[4]=array (
+				'1' => $data ['invoiceCategoryProfit30'],
+				'2' => $data ['invoicecategoryProportion30'] . '%',
+				'3' => $data ['categoryProfit30'],
+				'4' => $data ['categoryProportion30'] . '%'
+		);
+	}
+
 		$data ['summaryJson'] =URLEncode(json_encode($summaryJson));
 		$data ['aiListJson'] =URLEncode(json_encode($data ['aiList']));
 		 

+ 9 - 1
protected/controller/fee/fee_controller.php

@@ -76,6 +76,7 @@ class fee_controller extends DooController {
 		$accountItem = $this->feeService->GetAccountItem ();
 		$data ['accountItem'] = json_encode ( $accountItem );
 		// 报销单数据
+		
 		$data ['data'] = json_encode ( $this->makeReceiptEdiData ( $detail, $accountItem, $this->feeService->GetVerifyType ('RECEIPT') ) );
 		// 请求
 		$data ['action'] = "/receipt/edit";
@@ -98,6 +99,13 @@ class fee_controller extends DooController {
 		$data['defaultTraveProvince']=$traveDefault['defaultTraveProvince'];
 		$data['defaultTraveProvinceIndex']=$traveDefault['defaultTraveProvinceIndex'];
 		
+		$this->staff['remittanceName']=$detail['remittanceName'];
+		$this->staff['remittanceBankType']=$detail['remittanceBankType'];
+		
+		$this->staff['bankName']=$detail['bankName'];
+		$this->staff['bankNumber']=$detail['bankNumber'];
+		$this->staff['coupletNumber']=$detail['coupletNumber'];
+		
 		$data ['staff'] = $this->staff;
 		$data ['verifyId'] = $this->verifyId;
 		$data ['executeId'] = $this->executeId;
@@ -686,7 +694,7 @@ class fee_controller extends DooController {
 				),
 				"verify" => $verify,
 				"verifyId" => $data ['verify'],
-				"remittanceBankType" => 0,
+				"remittanceBankType" => $data['remittanceBankType'],
 				"enclosurFiles" => array (),
 				"aletMsg" => '',
 				"displayStsates" => 'none' 

+ 1 - 0
protected/controller/ghController.php

@@ -34,6 +34,7 @@ class ghController extends DooController {
 	function authToken(){
 		
 		$BuildUrl = 'http://gh.cld.smartcost.com.cn';
+// 		$BuildUrl = 'http://cldgh.com';
 		//$url = $BuildUrl. '/auth/token?staffGH='. urlencode($_COOKIE ['staffGH']);
 		$url = $BuildUrl. '/auth/token';
 		$data=array("staffGH"=>$_COOKIE ['staffGH']);

+ 4 - 0
protected/model/cld/account_item_cld.php

@@ -14,7 +14,11 @@ class account_item_cld extends DooModel {
 	
 	//
 	function GetAll(){
+		$sql = "  enable= 0 ";
+		
 		$detail =$this->find ( array (
+				'where' => $sql,
+				'asc'=>'aid',
 				'asArray' => TRUE
 		) );
 		return $detail;

+ 17 - 2
protected/model/cld/staff_cld.php

@@ -23,9 +23,9 @@ class staff_cld extends DooModel {
 // 		if (! empty ( $detail ['cldAccess'] )) {
 // 			$detail ['cldAccessArray'] = json_decode ( $detail ['cldAccess'] );
 // 		}
-		
+		if(!empty($detail)){
 		$detail=$this->makeStaffView($detail);
-		
+		}
 		return $detail;
 	}
 	
@@ -53,6 +53,21 @@ class staff_cld extends DooModel {
 		return $list;
 	}
 	
+	public function GetName($name=""){
+		$detail = $this->getOne ( array (
+				'where' => "username!='admin' and nature !=4 and (pendStatus!=3 or pendStatus!=4) and username= ? ",
+				'param' => array (
+						$name
+				),
+				'asArray' => TRUE
+		) );
+		if(!empty($detail)){
+			$detail=$this->makeStaffView($detail);
+		}
+		
+		return $detail;
+	}
+	
 	private function makeStaffView($data=array()){
 		
 		Doo::loadClass ( 'XDeode' );

+ 2 - 0
protected/model/receipt.php

@@ -40,6 +40,7 @@ class receipt extends DooModel {
 	public $paidStatus;
 	public $statusTrain;
 	public $receiptClass;
+	public $new_summary;
 	public $itinerary;
 	public $itinerary2;
 	public $iti2New;
@@ -88,6 +89,7 @@ class receipt extends DooModel {
 			'receiptClass',
 			'itinerary',
 			'itinerary2',
+			'new_summary',
 	);
 
 	

+ 11 - 0
protected/model/wasteBook.php

@@ -58,6 +58,17 @@ class wasteBook extends DooModel {
 			'synPaymentDate',
 	);
 	
+// 	获得所有流水
+	function GetAll(){
+		$list  = $this->find ( array (
+				
+				'asArray' => TRUE
+		) );
+		
+		return $list;
+	}
+	
+	
 	//
 	function getWasteBookByStatisticsYear($year=''){
 		if (empty($year))

+ 0 - 63
protected/services/CopyOfinvoice_service.php

@@ -1,63 +0,0 @@
-<?php
-class invoice_service {
-	private $invoiceTraining;
-	private $invoice;
-	private $XDeode;
-	function __construct() {
-		Doo::loadClass ( 'XDeode' );
-		$this->XDeode = new XDeode ( 9 );
-		$this->XDeode5 = new XDeode ( 5 );
-		Doo::loadModel ( 'cld/invoice_training_cld' );
-		$this->invoiceTraining = new invoice_training_cld ();
-		Doo::loadModel ( 'cld/invoice_cld' );
-		$this->invoice = new invoice_cld ();
-	}
-	
-	/* 获得办事处和创建的 培训班发票 */
-	public function getTrainByCategoryStaff($status, $categoryIdString, $staffId) {
-		
-		Doo::loadModel ( 'staff' );
-		$staff = new staff ();
-		Doo::loadModel ( 'L_category' );
-		$lCategory = new L_category ();
-		
-		// 1.获得培训班
-		$list = $this->invoiceTraining->getStatusByCategoryStaff ( $status, $categoryIdString, $staffId );
-		
-		// 2.获得培训班发票总数-
-		foreach ( $list as $key => $value ) {
-			$list [$key] ['trainingKey'] = $this->XDeode5->encode ( $value ['itid'] );
-			$detail = $staff->getStaffBySid ( $value ['creator'] );
-			$list [$key] ['staff'] = $detail;
-			$detail = $lCategory->getCategoryById ( $value ['cid'] );
-			$list [$key] ['category'] = $detail;
-			
-// 			每个培训班发票总数和金额,入账总数
-			$invoiceList = $this->invoice->GetTrainByUnFinish ( $value ['itid'] );
-			
-			$list[$key]['invoiceTotal']=count($invoiceList);
-			$priceTotle=0;
-			$BalancePriceTotle=0;
-			foreach ($invoiceList as $k=>$v){
-				$priceTotle+=$v['invoicePrice'];
-				if($v['status']==2&&$v['untreadStatus']==3){
-					$BalancePriceTotle+=$v['invoiceBalance'];
-				}else{
-					$BalancePriceTotle+=$v['invoicePrice'];
-				}
-				
-			}
-			$list[$key]['invoiceTotalAmount']=$priceTotle;
-			$list[$key]['invoiceArriveAmount']=$priceTotle-$BalancePriceTotle;
-			$list[$key]['arriveSchedule']=0;
-			if($list[$key]['invoiceTotal']!=0){
-				$list[$key]['arriveSchedule']=round ( $list [$key] ['invoiceArriveAmount'] / $list [$key] ['invoiceTotalAmount'] * 100, 2 );
-			}
-			
-		}
-		return $list;
-// 		print_r ( $list );
-// 		die ();
-	}
-}
-?>

+ 16 - 1
protected/services/staff_service.php

@@ -20,7 +20,22 @@ class staff_service {
 		return $list;
 	}
 	
-	
+	//验证项目管理登陆
+	public function authLoginCM($data=array()){
+		//1.获得账号
+		if(empty($data)){
+			throw new Exception("参数错误");
+		}
+		$staffInfo=$this->staff->GetName($data['staffName']);
+		if(empty($staffInfo)){
+			throw new Exception("员工不存在");
+		}
+		$password=md5($data['password']);
+		if ($password!=$staffInfo['passwork']){
+			throw new Exception("密码不正确");
+		}
+		return $staffInfo;
+	}
 	
 	
 	

+ 2 - 16
protected/view/admin/admin_EdiUser.html

@@ -38,22 +38,8 @@
 		                </select>
 		              </div>
 		            </div>
-					<div class="control-group">
-						<label for="inputEmail" class="control-label">入职时间</label>
-						<div class="controls">
-							<input type="date" name="hiredate" value="{{staffInfo.0.hiredate}}">
-						</div>
-					</div>
-					<div class="control-group">
-						<label for="inputEmail" class="control-label">员工性质</label>
-						<div class="controls">
-							<select name="nature">
-								<option value="2" <!-- if {{staffInfo.0.nature}} == 2 --> selected <!-- endif -->>实习生</option>
-								<option value="1" <!-- if {{staffInfo.0.nature}} == 1 --> selected <!-- endif -->>正式员工</option>
-							</select>
-							<p>调整员工性质,会清空假期数据,请谨慎操作</p>
-						</div>
-					</div>
+					
+					
 		            <div class="control-group">
 		              <label for="inputEmail" class="control-label">性别</label>
 		              <div class="controls">

+ 11 - 9
protected/view/admin/expensesDoc.html

@@ -245,16 +245,18 @@
 	  					<ul>
 		  						<!-- if !empty({{receiptDetail' value.rlList}}) -->
 		  						
-		  						<!-- loop receiptDetail' value.rlList -->
-		  						<li  <!-- if {{receiptDetail' value' value.status}}==1 --> class="done" <!-- elseif {{receiptDetail' value' value.status}}==3 --> class="undone" <!-- elseif {{receiptDetail' value' value.status}}==4 --> class="back" <!-- elseif {{receiptDetail' value' value.status}}==2 --> class="post" <!-- endif --> >
-		  							<div class="avtra"><img src="{{receiptDetail' value' value.img}}_2.jpg" width="32"></div>
-		  							<div class="comment">
-		  								<p <!-- if {{receiptDetail' value' value.status}}!=2 --> class="colGray" <!-- endif --> ><span class="fR">{{receiptDetail' value' value.date}}</span>{{receiptDetail' value' value.username}} <!-- if {{receiptDetail' value' value.rolename}}!='' --> ({{receiptDetail' value' value.rolename}}) <!-- endif --></p>
-		  								<p>{{receiptDetail' value' value.opinion}}</p>
-		  							</div>
-		  						</li>
-		  						<!-- endloop -->
+			  						<!-- loop receiptDetail' value.rlList -->
+			  						<li  <!-- if {{receiptDetail' value' value.status}}==1 --> class="done" <!-- elseif {{receiptDetail' value' value.status}}==3 --> class="undone" <!-- elseif {{receiptDetail' value' value.status}}==4 --> class="back" <!-- elseif {{receiptDetail' value' value.status}}==2 --> class="post" <!-- endif --> >
+			  							<div class="avtra"><img src="{{receiptDetail' value' value.img}}_2.jpg" width="32"></div>
+			  							<div class="comment">
+			  								<p <!-- if {{receiptDetail' value' value.status}}!=2 --> class="colGray" <!-- endif --> ><span class="fR">{{receiptDetail' value' value.date}}</span>{{receiptDetail' value' value.username}} <!-- if {{receiptDetail' value' value.rolename}}!='' --> ({{receiptDetail' value' value.rolename}}) <!-- endif --></p>
+			  								<p>{{receiptDetail' value' value.opinion}}</p>
+			  							</div>
+			  						</li>
+			  						<!-- endloop -->
+		  						
 		  						<!-- else -->
+		  						
 		  						<li class="post">
 		  							<div class="avtra"><img src="{{receiptList' value.staffDetail.avatar}}_2.jpg" width="32"></div>
 		  							<div class="comment">

+ 37 - 2
protected/view/admin/invoiceAggregateCompanyDetail.html

@@ -81,9 +81,9 @@
 						</li>
 						
 						<li>开票数量:<b>{{page.total_data}}</b> 张</li>
-						<li>开票总计:¥{{ics.invoicePrice}}</li>
+						<!-- <li>开票总计:¥{{ics.invoicePrice}}</li>
 						<li>应收款总计:<span class="colGreen">¥{{ics.diffPrice}}</span></li>
-						<li>已入账总计:¥{{ics.receivablesPrice}}</li>
+						<li>已入账总计:¥{{ics.receivablesPrice}}</li>  -->
 					</ul>
 				</form>
 				</div>
@@ -98,6 +98,25 @@
 						</thead>
 						<tbody>
 						
+						
+						<tr>
+							<td>汇总</td>
+							<td>
+								<b>{{totalPrice.invoicePrice}}</b>
+							</td>
+							<td></td>
+							<td></td>
+							<td></td>
+							<td></td>
+							
+							<td>{{totalPrice.receivePrice}}</td>
+							
+							<td>{{totalPrice.receivablesPrice}}</td>
+							<td></td>
+							<td></td>
+						</tr>
+						
+						
 							<!-- loop list -->
 						<tr>
 						
@@ -148,6 +167,22 @@
 							
 						</tr>
 						<!-- endloop -->
+						<tr>
+							<td>汇总</td>
+							<td>
+								<b>{{totalPrice.invoicePrice}}</b>
+							</td>
+							<td></td>
+							<td></td>
+							<td></td>
+							<td></td>
+							
+							<td>{{totalPrice.receivePrice}}</td>
+							
+							<td>{{totalPrice.receivablesPrice}}</td>
+							<td></td>
+							<td></td>
+						</tr>
 						</tbody>
 					</table>
 				</div>

+ 1 - 1
protected/view/admin/invoiceMenu.html

@@ -45,7 +45,7 @@
 <!-- endif -->
 
 <!-- if isInvoiceMoldShow({{staff.0.sid}},'公司汇总查阅') -->
-	<li><a <!-- if {{receiptMemu}}=="invoiceAggregate" --> class="selected" <!-- endif --> href="/invoiceAggregate">公司汇总</a></li>
+	<li class="hide"><a <!-- if {{receiptMemu}}=="invoiceAggregate" --> class="selected" <!-- endif --> href="/invoiceAggregate">公司汇总</a></li>
 	<!-- endif -->
 	
 	<!-- if isInvoiceAggregateCompanyShow({{staff.0.sid}}) -->

+ 1 - 0
protected/view/admin/invoicePrintStayAchieve.html

@@ -41,6 +41,7 @@
 								<option <!-- if {{invoiceType}}=='ALL' --> selected <!-- endif --> value="ALL">类型</option>
 								<option <!-- if {{invoiceType}}=='ORDINARY' --> selected <!-- endif --> value="ORDINARY">普通发票</option>
 								<option <!-- if {{invoiceType}}=='SPECIAL' --> selected <!-- endif --> value="SPECIAL">专用发票</option>
+								<option <!-- if {{invoiceType}}=='ELECTRON' --> selected <!-- endif --> value="ELECTRON">电子普票</option>
 							</select>
 						</li>
 						<li>

+ 21 - 13
protected/view/admin/invoiceUntreadAchieve.html

@@ -97,25 +97,33 @@
 								<td>{{establishedInvoice' value.OperationLog.username}}
 									{{establishedInvoice' value.OperationLog.date}}</td>
 								<td>
-									<!-- if {{establishedInvoice' value.lossShow}} -->
+									<!-- if {{establishedInvoice' value.invoiceForm}}==1 -->
 										<!-- if {{establishedInvoice' value.lossIid}}==0 -->
 										<a href="#request" node-invoiceLoss='INFO' data-isKey="{{establishedInvoice' value.iidKeyK}}" data-toggle="modal">申请打印</a>
 										<!-- else -->
 										<a href="#invdetail" node-invoice='INFO' data-isKey="{{invoiceList' value.lossDetail.iidKeyK}}" data-toggle="modal">{{invoiceList' value.lossDetail.invoiceSerial}}</a>
 										<!-- endif -->
 									<!-- else -->
-									
-									<!-- if {{establishedInvoice' value.invalid}}==0 -->
-									<a href="#invalid" data-toggle="modal" invoiceInvalid
-										dataId="{{invoiceList' value.iidKeyK}}">作废</a>
-									<!-- else -->
-									<a href="#reinvalid" data-toggle="modal" invoiceUndoInvalid
-										dataId="{{invoiceList' value.iidKeyK}}">取消作废</a>
-									<!-- endif -->
-									
-									
-									当月退票
-									<!-- endif -->
+										<!-- if {{establishedInvoice' value.lossShow}} -->
+											<!-- if {{establishedInvoice' value.lossIid}}==0 -->
+											<a href="#request" node-invoiceLoss='INFO' data-isKey="{{establishedInvoice' value.iidKeyK}}" data-toggle="modal">申请打印</a>
+											<!-- else -->
+											<a href="#invdetail" node-invoice='INFO' data-isKey="{{invoiceList' value.lossDetail.iidKeyK}}" data-toggle="modal">{{invoiceList' value.lossDetail.invoiceSerial}}</a>
+											<!-- endif -->
+										<!-- else -->
+										
+											<!-- if {{establishedInvoice' value.invalid}}==0 -->
+											<a href="#invalid" data-toggle="modal" invoiceInvalid
+												dataId="{{invoiceList' value.iidKeyK}}">作废</a>
+											<!-- else -->
+											<a href="#reinvalid" data-toggle="modal" invoiceUndoInvalid
+												dataId="{{invoiceList' value.iidKeyK}}">取消作废</a>
+											<!-- endif -->
+											
+											
+											当月退票
+										<!-- endif -->
+									<!-- endif -->	
 								</td>
 							</tr>
 							<!-- endloop -->

+ 3 - 3
protected/view/admin/remitAdd.html

@@ -115,9 +115,9 @@
 							<input type="text" placeholder="请输入联行号" id="coupletNumber" name="coupletNumber" value="">
 							</td></tr>
 	  						
-	  						<tr><th colspan="2" class="taC">对公款说明</th></tr>
+	  						<tr><th colspan="2" class="taC">对公款说明</th></tr>
 	  						<tr><th colspan="2">
-	  									<textarea name="explanation" id="explanation" required="" rows="8" style="width:99%;resize: vertical" placeholder="正确填写收款单位的名称、开户行、账号;详细填写费用用途"></textarea>
+	  									<textarea name="explanation" id="explanation" required="" rows="8" style="width:99%;resize: vertical" placeholder="详细填写费用用途"></textarea>
 	  						</th></tr>
 	  						
 	  						
@@ -161,7 +161,7 @@
 	  					对公汇款填写说明
 	  					</div>
 		  				<div class="detail">
-		  					<p>1. 把收款单位的名称、开户行、账号,在“对公汇款说明”中描述清楚</p>
+		  					<p>1. 请在“对公汇款说明”中详细填写费用用途,未详尽之处可通过附件补充说明。</p>
 		  					
 	  					</div>
 	  				</div>

+ 16 - 110
protected/view/expenses/wasteBook.html

@@ -27,143 +27,49 @@
 						
 							<div class="clearfix">
 							
-							
-								<table class="table table-bordered table-condensed" style="display:none">
-								<thead>
-								<tr><th colspan="8">存款-录入系统前金额</th></tr>
-								</thead>
-								<tbody>
-									<tr>
-									<th class="taC">广发存款</th>
-									<td>{{store.bank.CGBDeposit}}</td>
-									<th class="taC">工行存款</th>
-									<td>{{store.bank.ICBCDeposit}}</td>
-									<th class="taC">纵横广发(纵横知道)</th>
-									<td>{{store.bank.HUADeposit}}</td>
-									<th class="taC">个人存款</th>
-									<td>{{store.bank.PersonalDeposit}}</td>
-									
-									</tr>
-								</tbody>
-								</table>
-							
-							
-								<table class="table table-bordered table-condensed" style="display:none">
-								<thead>
-								<tr><th colspan="8">存款-收入的流水金额(日常收入,发票,借款,借款报销,报销单,对公汇款,培训班结算)</th></tr>
-								</thead>
-								<tbody>
-									<tr>
-									<th class="taC">广发存款</th>
-									<td>{{wasteStatistics.CGBDeposit}}</td>
-									<th class="taC">工行存款</th>
-									<td>{{wasteStatistics.ICBCDeposit}}</td>
-									<th class="taC">纵横广发(纵横知道)</th>
-									<td>{{wasteStatistics.HUADeposit}}</td>
-									<th class="taC">个人存款</th>
-									<td>{{wasteStatistics.PersonalDeposit}}</td>
-									
-									</tr>
-								</tbody>
-								</table>
-							
-							<table class="table table-bordered table-condensed" style="display:none">
-								<thead>
-								<tr><th colspan="8">存款-支出的流水金额(日常支出,收款退款,借款,借款报销,报销单,对公汇款,培训班结算)</th></tr>
-								</thead>
-								<tbody>
-									<tr>
-									<th class="taC">广发存款</th>
-									<td>{{wastePay.CGBDeposit}}</td>
-									<th class="taC">工行存款</th>
-									<td>{{wastePay.ICBCDeposit}}</td>
-									<th class="taC">纵横广发(纵横知道)</th>
-									<td>{{wastePay.HUADeposit}}</td>
-									<th class="taC">个人存款</th>
-									<td>{{wastePay.PersonalDeposit}}</td>
-									
-									</tr>
-								</tbody>
-								</table>
-							
-							<table class="table table-bordered table-condensed" style="display:none">
-								<thead>
-								<tr><th colspan="6">存款-日常收支改版的流水金额(日常支出,日常收入)</th></tr>
-								</thead>
-								<tbody>
-									<tr>
-									<th class="taC">广发存款</th>
-									<td>{{wasteNewPay.CGBDeposit}}</td>
-									<th class="taC">工行存款</th>
-									<td>{{wasteNewPay.ICBCDeposit}}</td>
-									
-									<th class="taC">个人存款</th>
-									<td>{{wasteNewPay.PersonalDeposit}}</td>
-									
-									</tr>
-								</tbody>
-								</table>
-							
-							<table class="table table-bordered table-condensed" style="display:none">
-								<thead>
-								<tr><th colspan="6">理财-公司账号的流水金额</th></tr>
-								</thead>
-								<tbody>
-									<tr>
-									<th class="taC">广发存款</th>
-									<td>{{wasteCompanyAccount.CGBDeposit}}</td>
-									<th class="taC">工行存款</th>
-									<td>{{wasteCompanyAccount.ICBCDeposit}}</td>
-									
-									<th class="taC">个人存款</th>
-									<td>{{wasteCompanyAccount.PersonalDeposit}}</td>
-									
-									</tr>
-								</tbody>
-								</table>
-							
-							
-								<table class="table table-bordered table-condensed" style="display:none">
+								  <table class="table table-bordered table-condensed" >
 									<tbody>
 									
 									<tr>
                                             <th class="taC">(纵横广发)广发存款</th>
-                                            <td>¥{{numberFormat(waste.bank.CGBDeposit,2)}}</td>
+                                            <td>¥{{GF_CK}}</td>
                                             <th class="taC">(纵横广发)纵横知道款</th>
-                                            <td>¥{{numberFormat(waste.bank.HUADeposit,2)}}</td>
+                                            <td>¥{{ZH_CK}}</td>
                                         </tr>
 									
 									<tr>
-                                            <th colspan="4" class="taC">公司广发合计存款:¥{{CGBDeposit_total}}</th>
+                                            <th colspan="4" class="taC">公司广发合计存款:¥{{CK_TO}}</th>
                                         </tr>
 									
 										<tr>
 											<th class="taC">工行存款</th>
-											<td>¥{{numberFormat(waste.bank.ICBCDeposit,2)}}</td>
+											<td>¥{{GH_CK}}</td>
 											<th class="taC">个人存款</th>
-											<td>¥{{numberFormat(waste.bank.PersonalDeposit,2)}}</td>
+											<td>¥{{GR_CK}}</td>
 										</tr>
 										
 										<tr>
 											<th class="taC">广发理财活期</th>
-											<td>¥{{numberFormat(waste.financial.current.CGBDeposit,2)}}</td>
+											<td>¥{{GD_LC_HQ}}</td>
 											<th class="taC">工行理财活期</th>
-											<td>¥{{numberFormat(waste.financial.current.ICBCDeposit,2)}}</td>
+											<td>¥{{GH_LC_HQ}}</td>
 										</tr>
 										<tr>
-                                            <th class="taC" colspan="4">活期结余金额:¥{{cashBalance}}</th>
+                                            <th class="taC" colspan="4">活期结余金额:¥{{HQ_TO}}</th>
                                         </tr>
 										<tr>
-											<th class="taC">个人理财固定</th>
-											<td>¥{{numberFormat(waste.financial.fixed.ICBCDeposit,2)}}</td>
 											<th class="taC">广发理财固定</th>
-											<td>¥{{numberFormat(waste.financial.fixed.CGBDeposit,2)}}</td>
+											<td>¥{{GD_LC_GD}}</td>
+											<th class="taC">个人理财固定</th>
+											<td>¥{{GR_LC_GD}}</td>
 										</tr>
 										<tr>
 											<th colspan="4" class="taC">合计存款:¥{{total}}</th>
 										</tr>
-									</tbody>
-								</table>
+									</tbody> 
+								</table> 
+								
+								
 							</div>
 							
 							

+ 3 - 3
protected/view/fee/create/receipt.html

@@ -363,12 +363,12 @@
 		</script>
 		<!-- else -->
 		
-		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/fee_receipt_data.js"></script>
+		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/fee_receipt_data.js?=0.01"></script>
 		<!-- endif -->
 		
 		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/receipt_create_fn.js"></script>
-		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/receipt_office_component.js"></script>
-		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/receipt_trave_component.js"></script>
+		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/receipt_office_component.js?=0.01"></script>
+		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/receipt_trave_component.js?=0.03"></script>
 		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/receipt_train_component.js"></script>
 		<script src="<?= WEB_SITE_GLOBAL ?>vue/fee/receipt_create.js"></script>
 </body>

+ 12 - 1
protected/view/fee/detail/receiptPrint_compatible.html

@@ -56,7 +56,18 @@
 		  						<tr><th colspan="2" class="taC">其他</th></tr>
 		  						<!-- loop receiptDetail' value.officeJson.other -->
 		  							<!-- if {{item' value' value.price}}!=0 -->
-		  							<tr><th>{{item' value' value.name}}<div class="repMark fR"><i class="rmDone">●</i><i class="rmUdone">●</i><i class="rmClear">●</i></div></th><td  width="140" class="taR">¥{{item' value' value.price}}</td></tr>
+		  							
+		  							
+		  							
+		  							<tr><th>
+		  							<!-- if {{item' value' value.name}}=='公关费' -->
+	  						市场经费
+	  						<!-- else -->
+	  						{{item' value' value.name}}
+	  						<!-- endif -->
+		  							
+		  							
+		  							<div class="repMark fR"><i class="rmDone">●</i><i class="rmUdone">●</i><i class="rmClear">●</i></div></th><td  width="140" class="taR">¥{{item' value' value.price}}</td></tr>
 		  							<!-- endif -->
 		  						<!-- endloop -->
 		  						<tr><th class="taR">小计</th><td class="colGreen taR">¥{{receiptDetail' value.otherTotal}}</td></tr>

+ 2 - 2
protected/view/humanResource/hr.html

@@ -32,12 +32,12 @@
 								<legend><div class="fR"></div>需要您处理</legend>
 								<table class="table table-bordered table-condensed">
 									<tbody>
-									<tr><th class="taC" width="140">员工名称</th><th class="taC">办事处/部门</th><th class="taC">岗位</th><th class="taC">状态</th><th class="taC" width="120">操作</th></tr>
+									<tr><th class="taC" width="140">员工名称</th><th class="taC">办事处/部门</th><th class="taC">状态</th><th class="taC" width="120">操作</th></tr>
 									<!-- loop staffList -->
 									<tr>
 									<td><a href="#employeeInfo" node-employeeInfo node-sidKey="{{staffList' value.sidKey}}" data-toggle="modal">{{staffList' value.username}}</a></td>
 									<td>{{staffList' value.category}}</td>
-									<td>{{staffList' value.position}}</td>
+									
 									<td>
 									<!-- if {{staffList' value.pendStatus}}==2 -->
 									待入职

+ 3 - 3
protected/view/humanResource/hrEmployee.html

@@ -236,7 +236,7 @@
 							</tr>
 							</tbody>
 						</table>
-						<table class="table table-bordered table-condensed">
+						<table class="table table-bordered table-condensed hide">
 							<tr>
 								<th class="taC" width="150">基本工资</th>
 								<td width="210"><input name='baseWage' id='promotionAddBaseWage' value="{{listPosition.0.baseWage}}" type="number"></td>
@@ -497,11 +497,11 @@
 								</select>
 							</td>
 						</tr>
-						<tr>
+						<tr class="hide">
 							<th class="taC" width="150">基本工资</th><td><input value="" id="promotionBaseWage" name='baseWage' type="number" style="width:150px"></td>
 							<th class="taC" width="150">岗位工资</th><td><input value="" id="promotionpostWage" name='postWage' type="number" style="width:150px"></td>
 						</tr>
-						<tr>
+						<tr class="hide">
 							<th class="taC" width="150">绩效奖金</th><td><input value="" id="promotionAchievementBonus" name='achievementBonus' type="number" style="width:150px"></td>
 							<th class="taC" width="150"></th><td></td>
 						</tr>

+ 3 - 0
protected/view/login.html

@@ -45,6 +45,8 @@
 	</div>
 	
 	<div class="modal hide fade " aria-hidden="false"  id="welcome">
+	<!-- if !empty({{staff}}) -->
+	
 	<form method="post" action="/appliedEntry" id='appliedEntry' >
 		<input type="hidden" name="sidKey"  value="{{staff.sidKey}}">
 	
@@ -199,6 +201,7 @@
 				</div>
 			</div></div>
 			</form>
+			<!-- endif -->
 	</div>
 	<div class="modal hide fade" id="appliedMsg">
 		<div class="modal-dialog">

+ 37 - 0
protected/view/receipt/receiptTrain.html

@@ -211,6 +211,35 @@ $(function() {
 								<tr>
 									<td colspan="7" class="taC colGray">收入-支出=利润</td>
 								</tr>
+
+
+								<!-- if {{receiptDetail.new_summary}}==1 -->
+								<tr>
+									<th>公司利润</th>
+									<td class="taR">{{invoiceCompanyProfit70}}</td>
+									<td class="taR">{{invoicecompanyProfitProportion70}}%</td>
+									<td class="taR">{{companyProfit70}}</td>
+									<td class="taR">{{companyProfitProportion70}}%</td>
+								</tr>
+								<tr>
+									<th>办事处利润</th>
+									<td class="taR">{{invoiceCategoryProfit30}}</td>
+									<td class="taR">{{invoicecategoryProportion30}}%</td>
+									<td class="taR">{{categoryProfit30}}</td>
+									<td class="taR">{{categoryProportion30}}%</td>
+								</tr>
+								<tr>
+									<th>公司收款</th>
+									<td class="taR">{{invoiceTrainingDetail.invoiceCompanyAmountM}}</td>
+									<td class="taR">{{invoiceTotalAmountProportionB}}%</td>
+									<td class="taR">{{invoiceTrainingDetail.invoiceCompanyAmountM}}</td>
+									<td class="taR">{{invoiceTotalAmountProportion}}%</td>
+								</tr>
+								<tr>
+									<td colspan="7" class="taC colGray">收入×30%=办事处利润&nbsp;&nbsp;&nbsp;收入×70%=公司利润</td>
+								</tr>
+								<!-- else -->
+								<tbody >
 								<tr>
 									<th>公司利润</th>
 									<td class="taR">{{invoiceCompanyProfit}}</td>
@@ -244,6 +273,14 @@ $(function() {
 								<tr>
 									<td colspan="7" class="taC colGray">收入×40%=办事处利润&nbsp;&nbsp;&nbsp;收入×60%=公司利润</td>
 								</tr>
+							</tbody>
+							<!-- endif -->
+
+
+								
+
+
+
 								<tr>
 									<th>备用金(借款)</th>
 									<td class="taR">{{receiptLoanDetail.sum}}</td>

+ 2 - 2
protected/view/receipt/receiptTrainApproval.html

@@ -95,7 +95,7 @@ function receiptTrainApprovalBackDo(ridKey){
 										<span class="fR" <!-- if {{rlList' value.status}}==2 --> title="提交时间" <!-- endif --> >
 										{{rlList' value.date}}</span>{{rlList' value.username}} 
 										</p>
-										<p>{{rlList' value.opinion}}</p>
+										<p><pre>{{rlList' value.opinion}}</pre></p>
 									</div>
 							</li>
 		  					<!-- endloop -->
@@ -123,7 +123,7 @@ function receiptTrainApprovalBackDo(ridKey){
 											<span class="fR" <!-- if {{rlList' value.status}}==2 --> title="提交时间" <!-- endif --> >
 											{{rlList' value.date}}</span>{{verifyList' value.1}}
 											</p>
-											<p>{{rlList' value.opinion}}</p>
+											<p><pre>{{rlList' value.opinion}}</pre></p>
 										</div>
 										<!-- endif -->
 								</li>