소스 검색

重构锁详情交互

caipin 6 년 전
부모
커밋
9037eb8a73

+ 42 - 14
global/js/index.js

@@ -114,16 +114,17 @@ function RLongMsg(){
 	
 	var browseClient=$("input[name='browseClient']").val();
 	var sellClient=$("input[name='sellClient']").val();
-	
-	
-	
+
 	var giftClient=$("input[name='giftClient']").val();
 	var newProduct=$("#newProduct").val();
 	var key_num=$("input[name='key_num']").val();
 	var mark=$("#marks").val();
+	var alloted_time=$("#alloted_time").val();
 //	console.log($("#marks").text());
 	var url="/addDoLockLog";
-	
+
+
+
 	$.ajax({
 		url:url,
 		type: "post",
@@ -135,30 +136,45 @@ function RLongMsg(){
 			
 			name:name,
 			company:company,
-			
-			
+
 			browseClient:browseClient,
 			sellClient:sellClient,
 			
 			giftClient:giftClient,
 			newProduct:newProduct,
 			key_num:key_num,
+			alloted_time:alloted_time,
 			mark:mark
 		},
 		global: true,
 		success: function(data){
 			
 			if(data.msg=='1'){
-				$('#LKMSG').show();
-				$('#LKMSG').html('操作成功');
-				$('#QTP').hide();
+				var year=$("[name='year']").val();
+				var cid=$("[name='cid']").val();
+				var staff=$("[name='staff']").val();
+				var status=$("[name='status']").val();
+				var product=$("[name='product']").val();
+				var search=$("[name='search']").val();
+
+				if (search!=''){
+
+				} else{
+					window.location.href = "/keyonline?year="+year+"&cid="+cid+"&staff="+staff+"&status="+status+"&product="+product+"&lid="+klid;
+				}
+
+
+
+
+				// $('#LKMSG').show();
+				// $('#LKMSG').html('操作成功');
+				// $('#QTP').hide();
 			}else{
 				$('#LKMSG').show();
 				$('#LKMSG').html('操作不成功');
 			}
 		},
 		error:function(err){
-			
 		}
 		});
 }
@@ -1607,6 +1623,7 @@ $(function() {
 		
 		$("#longleStatusShow_8").hide();
 		$("#longleStatusShow_9").hide();
+		$("#longleStatusShow_10").hide();
 		$("#longleStatusShow_"+lid).show();
 		
 	});
@@ -1704,7 +1721,8 @@ $(function() {
 					alert('请重新登录');
 				}
 				//console.log(data);
-				$("#klid").val(data.klid);
+				//$("#klid").val(data.klid);
+				$("#klid").val(data.lidKey);
 				
 				$("#longleTitle").html(data.longle.key_num);
 				
@@ -1713,13 +1731,23 @@ $(function() {
 				$("#longleResponsible").html(lka);
 				
 				var kk="";
-				if(data.longle.alloted_time!="")
+				if(data.longle.alloted_time!=""){
 					kk="期限:"+data.longle.alloted_time;
+					$("#alloted").show();
+				}else{
+					$("#alloted").hide();
+					$("#longleStatusShow_10").hide();
+				}
+
+				var licencesHtml='';
+				if(!(data.longle.licences==""||data.longle.licences==0)){
+					licencesHtml=" 节点"+data.longle.licences;
+				}
 				
 				if(data.longle.version!="")
-				$("#longleStatus").html(data.longle.statusT+"/"+data.longle.product+"/("+data.longle.version+")"+kk);
+				$("#longleStatus").html(data.longle.statusT+"/"+data.longle.product+"/("+data.longle.version+")"+kk+licencesHtml);
 				else
-				$("#longleStatus").html(data.longle.statusT+"/"+data.longle.product+""+kk);
+				$("#longleStatus").html(data.longle.statusT+"/"+data.longle.product+""+kk+licencesHtml);
 				
 				$("#LongleLogHtml").html(data.longleLogHtml);
 				

+ 1 - 0
protected/config/acl.conf.php

@@ -488,6 +488,7 @@ $acl ['RECEIPTSEXTEND'] ['allow'] = array (
 				'exportReceiptTrainExcel',
 				'receiptTrainItemEdiDo',
                 'receiptTrainRevenue',
+                'receiptTrainRevenueAchieve',
 		)
 );
 $acl ['RECEIPTSAJAX'] ['allow'] = array (

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

@@ -292,9 +292,9 @@ $route['*']['/receiptWasteBookAddDo'] = array('ReceiptExtendController', 'receip
 $route['*']['/exportReceiptTrainExcel'] = array('ReceiptExtendController', 'exportReceiptTrainExcel');
 
 $route['*']['/receiptTrainRevenue'] = array('ReceiptExtendController', 'receiptTrainRevenue');
-
-
-
+$route['*']['/receiptTrainRevenueAchieve'] = array('ReceiptExtendController', 'receiptTrainRevenueAchieve');
+$route['*']['/receiptTrainRevenueAchieve/:page'] = array('ReceiptExtendController', 'receiptTrainRevenueAchieve');
+$route['*']['/receiptTrainRevenueAchieve/:page/:paid'] = array('ReceiptExtendController', 'receiptTrainRevenueAchieve');
 
 
 

+ 1 - 3
protected/controller/InvoiceController.php

@@ -5156,9 +5156,7 @@ class InvoiceController extends DooController {
 		$invoice = new invoice ();
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
-		Doo::loadModel ( 'staff' );
-		$staff = new staff ();
-		
+
 		$sid = $XDeode->decode ( $_COOKIE ["staff"] );
 		$MebSea = $this->get_args ( 'MebSea' ) ? $this->get_args ( 'MebSea' ) : "";
 		

+ 72 - 16
protected/controller/MainController.php

@@ -3228,12 +3228,29 @@ class MainController extends DooController {
 		$search = $this->get_args ( 'search' ) ? $this->get_args ( 'search' ) : "";
 		
 		$productW = $this->get_args ( 'product' ) ? $this->get_args ( 'product' ) : "";
-		
+
+        $lidKey = $this->get_args ( 'lid' ) ? $this->get_args ( 'lid' ) : "";
+
 		Doo::loadModel ( 'longle' );
 		$longle = new longle ();
+        Doo::loadClass ( 'XDeode' );
+        $XDeode = new XDeode ( 5 );
+        Doo::loadModel ( 'longle_log' );
+        $longle_log = new longle_log ();
+
+        $lid =0;
+        if(!empty($lidKey)){
+            $lid = $XDeode->decode ( $lidKey );
+        }
+
+
 		
 		$data ['longleArray'] = $longle->getLongleByStatus ( $year, $cid, $staff, $status, $search, $productW );
-		
+
+
+        $longleDetail=$longle->getLongleByLid($lid);
+        $longleLogDetail=$longle_log->getLongleByLid ( $lid );
+
 		// 获取接收锁信息
 		// $longle->getLongleByRe($this->staff[0]['cid'],1);
 		$othstr = "";
@@ -3245,6 +3262,10 @@ class MainController extends DooController {
 		$data ['reLongle'] = $longle->count ( array (
 				'where' => $othstr . '  and status=1' 
 		) );
+
+        $data['lidKey']=$lidKey;
+		$data['longleDetail']=$longleDetail;
+        $data ['longleLogHtml'] = $this->_getLongleLogHtml ( $longleLogDetail );
 		$data ['cid'] = $cid;
 		$data ['year'] = $year;
 		$data ['staff'] = $staff;
@@ -3334,13 +3355,19 @@ class MainController extends DooController {
 		$district = new district ();
 		
 		$status = $this->get_args ( 'longleStatus' ) ? $this->get_args ( 'longleStatus' ) : 0;
-		$lid = $this->get_args ( 'klid' ) ? $this->get_args ( 'klid' ) : 0;
+		$lidKey = $this->get_args ( 'klid' ) ? $this->get_args ( 'klid' ) : 0;
 		$name = $this->get_args ( 'name' ) ? $this->get_args ( 'name' ) : "";
 		$company = $this->get_args ( 'company' ) ? $this->get_args ( 'company' ) : '';
+
+        $alloted_time = $this->get_args ( 'alloted_time' ) ? $this->get_args ( 'alloted_time' ) : '';
 		
-		if (empty ( $lid ))
+		if (empty ( $lidKey ))
 			return "/keyonline/";
-		
+
+        Doo::loadClass ( 'XDeode' );
+        $XDeode = new XDeode ( 5 );
+        $lid = $XDeode->decode ( $lidKey );
+
 		$linfo = $longle->getLongleByLid ( $lid );
 		
 		if ($status == 0)
@@ -3656,7 +3683,28 @@ class MainController extends DooController {
 			$action_log->nature = $nature [0];
 			
 			$action_log->insert ();
-		}
+		}elseif($status == 10){
+            $longle->alloted_time = $alloted_time;
+
+            $longle_log->mark ='由'.$linfo[0]['alloted_time'].'延期至'.$alloted_time;
+
+            // 日常行为
+            $action_log = new action_log ();
+
+            $action_log->action = $this->staff [0] ['category'] . '<b href="javascript:void(0)" onclick="showStaff(\'' . $this->staff [0] ['sid'] . '\')">' . $this->staff [0] ['username'] . '</b>为<a href="javascript:void(0)" onclick="showLook(\'' . $linfo [0] ['key_num'] . '\')">' . $linfo [0] ['key_num'] . '</a>延期至 '.$alloted_time;
+            $action_log->sid = $this->staff [0] ['sid'];
+            $action_log->cid = $this->staff [0] ['cid'];
+            $action_log->updatetime = date ( "Y-m-d" );
+            $action_log->time = date ( "H:i" );
+            $action_log->sid = $this->staff [0] ['sid'];
+            $action_log->cid = $this->staff [0] ['cid'];
+            $action_log->status = 12;
+
+            $action_log->class = $action_log->iconLock;
+            $action_log->insert ();
+
+
+        }
 		
 		// 记录使用过的状态
 		$statuslog = $status . "," . $linfo [0] ['statuslog'];
@@ -3673,7 +3721,7 @@ class MainController extends DooController {
 		if ($lid != 0) {
 			
 			$longle->lid = $lid;
-			if ($status != 8)
+			if (!($status == 8||$status == 10))
 				$longle->status = $status;
 				
 				// if($status!=8)
@@ -3773,10 +3821,12 @@ class MainController extends DooController {
 	function ajaxGetLongle() {
 		Doo::loadModel ( 'longle_log' );
 		Doo::loadModel ( 'longle' );
-		
+
 		$longle = new longle ();
 		$longle_log = new longle_log ();
-		
+        Doo::loadClass ( 'XDeode' );
+        $XDeode = new XDeode ( 5 );
+
 		$lid = $this->get_args ( 'lid' ) ? $this->get_args ( 'lid' ) : 0;
 		
 		if ($lid == 0) {
@@ -3787,20 +3837,17 @@ class MainController extends DooController {
 		}
 		
 		$t = $longle_log->getLongleByLid ( $lid );
-		
+
 		if (isset ( $t [0] ))
 			$tk = $t [0];
 		else
 			$tk = array ();
 		
 		$longleLog = $tk;
-		
 		$longleLog ['klid'] = $lid;
-		
+        $longleLog ['lidKey'] =$XDeode->encode ( $lid );
 		$ky = $longle->getLongleByLid ( $lid );
-		
 		$longleLog ['longle'] = $ky [0];
-		
 		$longleLog ['longleLogHtml'] = $this->_getLongleLogHtml ( $t );
 		
 		echo json_encode ( $longleLog );
@@ -5545,8 +5592,17 @@ class MainController extends DooController {
 
 							<li class="item">' . $value ['mark'] . '</li>
 						</ul>';
-				// 生成
-			} elseif ($value ['status'] == 1) {
+
+			} elseif ($value ['status'] == 10) {
+                $html .= '
+						<ul class="flowList">
+							<li class="item iconLock">延期<' . $value ['category'] . '<a href="javascript:void(0);"  onclick="getStaffInfo(\'' . $value ['operator'] . '\')" >' . $value ['operator'] . '</a></li>
+
+							<li class="item">' . $value ['mark'] . '</li>
+						</ul>';
+
+                // 生成
+            }elseif ($value ['status'] == 1) {
 				
 				$html .= '<ul class="flowList">
 							<li class="item iconGenerate">生成<' . $value ['category'] . '<a href="javascript:void(0);" onclick="getStaffInfo(\'' . $value ['operator'] . '\')" >' . $value ['operator'] . '</a></li>

+ 1 - 0
protected/controller/ReceiptController.php

@@ -14002,6 +14002,7 @@ class ReceiptController extends DooController {
 		}
 	}
 	function staffCollectMonthDetail() {
+        //include Doo::conf ()->BASE_PATH . 'diagnostic/debug.php';
 		$year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : "";
 		$month = $this->get_args ( 'month' ) ? $this->get_args ( 'month' ) : "";
 		if (! $year)

+ 8 - 31
protected/controller/SoftController.php

@@ -35,52 +35,29 @@ class SoftController extends DooController {
 	function addLockApi(){
 
 		$longleList=isset($_POST['longle'])?$_POST['longle']:"";
-		
-		header ( 'Content-Type:text/html;charset=utf-8' );
+
+        header ( 'Content-Type:text/html;charset=utf-8' );
 		if($longleList!=""){
 			Doo::loadModel ( 'longle' );
 			Doo::loadModel ( 'longle_log' );
 
 			//$exlArray=$this->_format_excel_to_array(DOO::conf()->SITE_PATH."upload/".iconv("UTF-8", "GB2312", $path));
-			
+            //file_put_contents ( "protected/config/longle.bak", $longleList );
+
 			$longleList=json_decode($longleList,TRUE);
-			//print_r($longleList);die;
+
 			if (!is_array($longleList)){
 				echo json_encode(array('status'=>2,'msg'=>'锁数据不正确'),JSON_UNESCAPED_UNICODE);die;
 			}
-			 
-// 			$findStr='';$longle = new longle ();
-// 			foreach ($longleList as $key=>$value){
-// 				$li=$longle->getOne(array('where'=>'key_num like "'.$value['key_num'].'"','asArray' => TRUE));
-				
-// 				if (!empty($li))
-// 					$findStr.=$li['key_num']." ; ";
-// 			}
-// 			if (!empty($findStr))
-// 				$this->postEmail($findStr);
-			
-			
-// $longleList=array(1=>array('key_num'=>'SC-Z26150','product'=>'1','make_day'=>'2','alloted_time'=>'2','status'=>'1','statusT'=>'生成','cid'=>'2'
-// 		,'category'=>'广东','SerialNumber'=>'SZ26150','version'=>'1.1')
-// 		,2=>array('key_num'=>'SC-Z26150','product'=>'1','make_day'=>'2','alloted_time'=>'2','status'=>'1','statusT'=>'生成','cid'=>'2'
-// 		,'category'=>'广东','SerialNumber'=>'SZ26150','version'=>'1.1')
-// 		,3=>array('key_num'=>'SC-Z2615022','product'=>'1','make_day'=>'2','alloted_time'=>'2','status'=>'1','statusT'=>'生成','cid'=>'2'
-// 				,'category'=>'广东','SerialNumber'=>'SZ26150','version'=>'1.1')
-// 		,4=>array('key_num'=>'SC-Z261504','product'=>'1','make_day'=>'2','alloted_time'=>'2','status'=>'1','statusT'=>'生成','cid'=>'2'
-// 				,'category'=>'广东','SerialNumber'=>'SZ26150','version'=>'1.1')
-// 		,5=>array('key_num'=>'SC-Z261503','product'=>'1','make_day'=>'2','alloted_time'=>'2','status'=>'1','statusT'=>'生成','cid'=>'2'
-// 				,'category'=>'广东','SerialNumber'=>'SZ26150','version'=>'1.1')
-// 		,6=>array('key_num'=>'SC-Z2615022','product'=>'1','make_day'=>'2','alloted_time'=>'2','status'=>'1','statusT'=>'生成','cid'=>'2'
-// 				,'category'=>'广东','SerialNumber'=>'SZ26150','version'=>'1.1')
-		
-// );
 
+			//数组格式化,新增字段需要在这新增
 			$longleList=$this->array_unique_fb($longleList);
 
 			//$category=$L_category->getCategoryById($cid);
 			try {
 			Doo::db()->beginTransaction();
 			foreach ($longleList as $key=>$value){
+
 				//锁记录
 				$longle = new longle ();
 				$longle->key_num=$value['key_num'];
@@ -184,7 +161,7 @@ class SoftController extends DooController {
   $temp2[$k]['version'] =$array[5];
   $temp2[$k]['cid'] =$array[6];
   $temp2[$k]['title'] =$array[7];
-  
+     $temp2[$k]['licences'] =$array[8];
  }
  
 

+ 53 - 3
protected/model/receipt.php

@@ -85,7 +85,7 @@ class receipt extends DooModel {
      * 获得培训班结算未收款
      */
 	function getReceiptTrainByPaid($un=0,$limit=5){
-        $sql = "select b.* ,a.invoiceTrainId,a.rid
+        $sql = "select b.* ,a.invoiceTrainId,a.rid,a.executeDate
                 from " . $this->_table . " as a left JOIN CLD_receiptTraining as b on (a.trainId=b.rtid) 
                 where a.status not in (3,4,5) and a.Rtype=3 and a.trainId!=0 and invoiceTrainId!=0 and paidStatus=".$un."  limit ".$limit;
 
@@ -120,6 +120,56 @@ class receipt extends DooModel {
     }
 
     /**
+     * 获得所有培训班结算
+     */
+    function getReceiptTrainByPaidAll($un='',$cid='',$dateSql='',$limit='0,18'){
+        $psSql='';
+        if(!empty($un)){
+            $psSql=" and paidStatus=".$un." ";
+        }
+        $cidSql="";
+        if(!empty($cid)){
+            $cidSql=" and a.cid=".$cid." ";
+        }
+
+        $sql = "select b.* ,a.invoiceTrainId,a.rid
+                from " . $this->_table . " as a left JOIN CLD_receiptTraining as b on (a.trainId=b.rtid) 
+                where a.status not in (3,4,5) and a.Rtype=3 and a.trainId!=0 and invoiceTrainId!=0 ".$psSql.$cidSql.$dateSql." limit ".$limit;
+
+        $query = Doo::db ()->query ( $sql );
+        $result = $query->fetchAll ();
+
+        Doo::loadModel ( 'invoiceTraining' );
+        $invoiceTraining = new invoiceTraining ();
+        Doo::loadClass ( 'XDeode' );
+        $XDeode = new XDeode ( 7 );
+
+        Doo::loadModel ( 'RItem' );
+        $RItem = new RItem ();
+        Doo::loadModel ( 'RILecturer' );
+        $RILecturer = new RILecturer ();
+        Doo::loadModel ( 'accountItem' );
+        $accountItem = new accountItem ();
+
+        foreach ($result as $key=>$value){
+            $result[$key]['ridKey']= $XDeode->encode ( $value ['rid'] );
+            $result[$key]['iTrain']=$invoiceTraining->getInvoiceTrainingByItid ( $value ['invoiceTrainId'] );
+            $result[$key]['iTrain']['receivablesAmount']=sprintf ( "%.2f",$result[$key]['iTrain']['invoiceTotalAmount']-$result[$key]['iTrain']['invoiceArriveAmount']);
+            $RItemList = $RItem->getRItemByRid ( $value ['rid'] );
+            $RILecturerList = $RILecturer->getRILecturerByRid ( $value ['rid'] );
+            // 支出项金额详情
+            $expendList= $accountItem->getTrainingDetail ( $RItemList, $RILecturerList );
+            $result[$key]['iTrain']['expendAmount']=sprintf ( "%.2f",$expendList['total']);
+            $result[$key]['iTrain']['profit']= sprintf ( "%.2f",$result[$key]['iTrain']['invoiceTotalAmount']-$expendList['total']);
+            //利润
+            $result[$key]['iTrain']['companyProfit']=sprintf ( "%.2f",$result[$key]['iTrain']['invoiceTotalAmount']*0.4);
+            $result[$key]['iTrain']['categoryProfit']=sprintf ( "%.2f",$result[$key]['iTrain']['invoiceTotalAmount']*0.6);
+        }
+
+        return $result;
+    }
+
+    /**
      * 获得培训班 年营收图表
      */
     function getReceiptTrainByYearChart($year=''){
@@ -129,9 +179,9 @@ class receipt extends DooModel {
 
         $sql = "select GROUP_CONCAT(rid) as rid,GROUP_CONCAT(invoiceTrainId) as invoiceTrainId,date_format(date,\"%m\") as month
                 from " . $this->_table . " 
-                where status not in (3,4,5) and Rtype=3 and trainId!=0 and invoiceTrainId!=0  and Year(date) =".$year."
+                where status not in (3,4,5) and Rtype=3 and trainId!=0 and invoiceTrainId!=0 and paidStatus=1 and Year(date) =".$year."
                 GROUP BY Month(date)";
-//and paidStatus=1
+//
         $query = Doo::db ()->query ( $sql );
         $result = $query->fetchAll ();
 

+ 2 - 5
protected/view/admin/receipt_menu.html

@@ -22,10 +22,7 @@
 	<!-- endif -->
 				
 	<li><a <!-- if {{receiptMemu}}=="remittanceHky" --> class="selected" <!-- endif --> href="/remittanceHky">费用汇款</a></li>			
-						
-	
-			
-						
+
 	<!-- endif -->
 	<!-- if isReceiptAuthorityShow({{staff.0.sid}}) -->
 	<li><a href="/receiptTrainRevenue" <!-- if {{receiptMemu}}=="receiptTrainRevenue" --> class="selected" <!-- endif --> >培训班结算</a></li>
@@ -35,7 +32,7 @@
 	<!-- if isPaymentsShow({{staff.0.sid}}) -->	
 	<li><a href="/paymentsCollect" <!-- if {{receiptMemu}}=="paymentsCollect" --> class="selected" <!-- endif --> >日常收支汇总</a></li>
 	<li><a href="/wasteBook" <!-- if {{receiptMemu}}=="wasteBook" --> class="selected" <!-- endif --> >公司流水</a></li>
-	<!-- endif -->	
+	<!-- endif -->
 	
 	<li class="topLine"><a href="#welcome" data-toggle="modal">使用帮助</a></li>
 

+ 30 - 4
protected/view/lock_look.html

@@ -13,6 +13,16 @@
 <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
 <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>/js/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
 
+<link href="<?= WEB_SITE_GLOBAL ?>/css/datepicker.min.css" rel="stylesheet" type="text/css">
+<script src="<?= WEB_SITE_GLOBAL ?>/js/datepicker.min.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>/js/datepicker.zh.js"></script>
+
+<script>
+	$(function() {
+
+	})
+</script>
+
 <body>
 
 	<div class="mainLayout">
@@ -88,13 +98,13 @@
 	  			</div>
 	  		</div>
 	  		<div  class="lockDetil fL">
-	  			<div  style="display:none;" id="clientInfo"></div>
+	  			<div  style="display:none;"  id="clientInfo"></div>
 					<div class="contactInfo" style="display:none;" id="staffInfo"></div>
-	  			<div id="longleLog" style="display:none;">
+	  			<div id="longleLog" <!-- if empty({{lidKey}}) --> style="display:none;" <!-- endif --> >
 					<div  class="header" style="">
 	  				<h1 id="longleTitle"></h1>
 	  				<h2><span id="longleResponsible"></span> <span id="longleStatus">收回 / 专业版+河南养护</span></h2>
-	  			</div>
+	  				</div>
 	  			<div  class="lockRecord autoHeightR2" >
 	  				<!--添加记录按钮-->
 	  				<!--<div class="toolItem clearfix">
@@ -130,6 +140,11 @@
 							    <label class="radio inline"> <!-- disabled="disabled" -->
 							    	<input type="radio" name="longleStatus" id="longleStatus_7"   value="7">收回
 							    </label>
+
+								<label class="radio inline" style="display:none" id="alloted" >
+									<input type="radio" name="longleStatus" id="longleStatus_10"  value="10">延期
+								</label>
+
 							    <label class="radio inline">
 							    	<input type="radio" name="longleStatus" id="longleStatus_8"  value="8">备注
 							    </label>
@@ -206,6 +221,14 @@
 						    </div>
 						  </div>
 					</div>
+
+						<!--添加记录-延期-->
+						<div class="control-group" id="longleStatusShow_10" style="display:none;">
+							<label class="control-label" for="inputPassword">延期时间</label>
+							<div class="controls">
+								<input class="datepicker-here span3" name="alloted_time" id="alloted_time" placeholder="按时间筛选" type="text" data-language="zh">
+							</div>
+						</div>
 	  				<!--添加记录-备注-->
 	  				<div id="longleStatusShow_8" style="display:none;">
 						  <div class="control-group">
@@ -227,7 +250,10 @@
 	  				</form>		  				
 	  				</div>
 	  				<!--记录列表-->
-	  				<div id="LongleLogHtml"></div>
+	  				<div id="LongleLogHtml">
+						{{longleLogHtml}}
+
+					</div>
 					
 					
 				</div>

+ 1 - 1
protected/view/receipt/receiptTrainRevenue.html

@@ -63,7 +63,7 @@
 									</table>
 								</div>
 								<div class="clearfix">
-									<legend><div class="fR"><a href="saea-train-all.html">所有培训班</a></div>最近收款完成</legend>
+									<legend><div class="fR"><a href="/receiptTrainRevenueAchieve">所有培训班</a></div>最近收款完成</legend>
 									<table class="table table-bordered table-condensed">
 										<tbody>
 										<tr>

+ 268 - 0
protected/view/receipt/receiptTrainRevenueAchieve.html

@@ -0,0 +1,268 @@
+<!-- include '../header' -->
+
+<link href="<?= WEB_SITE_GLOBAL ?>css/datepicker.min.css" rel="stylesheet" type="text/css">
+<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.min.js"></script>
+<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.zh.js"></script>
+
+<script >
+	$(function() {
+		$('select[cidKey]').change(function(){
+
+			var form = $('#RTR');
+			// $('#year').val($('#Y').val());
+			// $('#month').val($('#M').val());
+			// $('#day').val($('#D').val());
+			// $('#sop').val($('#S').val());
+			form.submit();
+		});
+
+
+
+	})
+</script>
+<body>
+	<div class="mainLayout">
+		<div class="mainMenu">
+			<div class="menuItem">
+				<a href="#" class="mLogo">CLD</a>
+				<ul>
+					<!-- include '../admin/menuReceipt' -->
+				</ul>
+			</div>
+		</div>
+		<div class="warpContent">
+			<div class="subMenu fL">
+				<div class="menuItem">
+					<!-- include '../admin/receipt_menu' -->
+				</div>
+			</div>
+			<div class="adminContent autoHeight">
+				<legend>
+					所有培训班
+				</legend>
+				<div class="demandCate">
+					<form action="/receiptTrainRevenueAchieve/{{onpage}}/{{paid}}" id="RTR" method="get">
+
+					<ul class="cateList">
+						<li>
+							<a <!-- if {{paid}}=='ALL' --> class="now" <!-- endif --> href="/receiptTrainRevenueAchieve/{{onpage}}/ALL">所有</a>
+							<a <!-- if {{paid}}=='UNPAID' --> class="now" <!-- endif --> href="/receiptTrainRevenueAchieve/{{onpage}}/UNPAID" title="未完成收款">未完成收款</a>
+							<a <!-- if {{paid}}=='PAID' --> class="now" <!-- endif --> href="/receiptTrainRevenueAchieve/{{onpage}}/PAID" title="收款完成">收款完成</a>
+						</li>
+						<!--收入-->
+						<li>
+							<select name="cidKey" cidKey >
+								<option value="">所有办事处</option>
+								<!-- loop categoryList -->
+								<option  <!-- if {{{categoryList' value.cidKey}}=={{cidKey}} --> selected <!-- endif --> value="{{categoryList' value.cidKey}}">{{categoryList' value.title}}</option>
+								<!-- endloop -->
+							</select>
+						</li>
+						<li>
+							<div class="search">
+								<div class="input-append">
+									<input class="datepicker-here span3" name="trainEndDate" value="{{dateString}}" placeholder="按结算时间筛选" type="text" data-range="true"
+							    data-multiple-dates-separator=":"
+							    data-language="zh" >
+									<button class="btn btn-small" type="submit">查询</button>
+								</div>
+							</div></li>
+							<li>收入合计:¥123387.00&nbsp;<span class="colBlue">支出合计:¥123387.00</span>&nbsp;利润合计:¥123387.00</li>
+							<li class="colRed">未收款:¥12387.00</li>
+					</ul>
+
+					</form>
+				</div>
+				<div class="saeaList">
+					<table class="table table-hover">
+						<tbody>
+							<tr class="thead">
+								<th width="140">培训班名称</th>
+								<th>开班时间</th>
+								<th>完成结算时间</th>
+								<th >收入(开票金额)</th>
+								<th >支出</th>
+								<th>办事处利润</th>
+								<th>公司利润</th>
+								<th>应收款总额</th>
+							</tr>
+
+							<!-- loop rtpa -->
+							<tr>
+								<th><a href="/receiptTrain/approval/{{unpaid' value.ridKey}}.html">{{unpaid' value.trainName}}</a></th>
+								<td >{{unpaid' value.trainStartDate}}</td>
+								<td >{{unpaid' value.trainEndDate}}</td>
+								<td >¥{{unpaid' value.iTrain.invoiceTotalAmount}}</td>
+								<td >¥{{unpaid' value.iTrain.expendAmount}}</td>
+								<td >¥{{unpaid' value.iTrain.companyProfit}}</td>
+								<td >¥{{unpaid' value.iTrain.categoryProfit}}</td>
+								<td class="colRed">¥{{unpaid' value.iTrain.receivablesAmount}}</td>
+							</tr>
+							<!-- endloop -->
+
+						</tbody>
+					</table>
+				</div>
+				<!--翻页-->
+				<div class="demandPage">
+					<ul class="pagination fL">
+						<!-- if {{page.previous}}==0 -->
+						<li><a href="javascript:void(0)" title="上一页">&lt;</a></li>
+						<!-- else -->
+						<li><a href="/receiptTrainRevenueAchieve/{{page.previous}}{{get}}" title="上一页">&lt;</a></li>
+						<!-- endif -->
+
+						<!-- if {{page.on_page}}>=3 -->
+						<li><a href="/receiptTrainRevenueAchieve/1{{get}}" title="上一页">1</a></li>
+						<li class="point"><span>...</span></li>
+						<!-- endif -->
+						{{page.page}}
+						<!-- if {{page.on_page}}<3 && {{page.total_page}}>5 -->
+						<li><a href="/receiptTrainRevenueAchieve/4{{get}}" >4</a></li>
+						<li><a href="/receiptTrainRevenueAchieve/5{{get}}" >5</a></li>
+						<!-- endif -->
+
+						<!-- if {{page.total_page}}>3 -->
+						<li class="point"><span>...</span></li>
+						<!-- endif -->
+
+						<!-- if {{page.next}}=={{page.on_page}} -->
+						<li><a href="javascript:void(0)" title="下一页">&gt;</a></li>
+						<!-- else -->
+						<li><a href="/receiptTrainRevenueAchieve/{{page.next}}{{get}}" title="下一页">&gt;</a></li>
+						<!-- endif -->
+					</ul>
+				</div>
+
+
+			</div>
+			</div>
+<!--弹出(日收支)-->
+<div class="modal hide fade" id="editincome">
+		<div class="modal-dialog ">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h3>录入日常收支</h3>
+				</div>
+				<div class="modal-body saeaList">
+					<table class="table table-bordered table-condensed">
+							<tbody>
+							<!--收入-->
+							<tr>
+								<th class="taC" colspan="2">收入信息填写</th>
+							</tr>
+													<tr>
+								<th class="taC">费用类型</th>
+								<td >
+								<select>
+									<option>请选择</option>
+									<option>利息收入</option>
+									<option>补贴收入</option>
+									<option>纵横知道</option>
+									<option>借款收回</option>
+									<option>退汇</option>
+									<option>其他</option>
+									<option>理财本金</option>
+								</select>
+								<p>
+								<!--利息收入 二级-->
+								<label class="radio inline"><input type="radio">银行存款</label>
+								<label class="radio inline"><input type="radio">理财收益</label>
+								<label class="radio inline"><input type="radio">个人借款</label>
+								<!--补贴收入 二级-->
+								<!-- <label class="radio inline"><input type="radio">社保</label>
+								<label class="radio inline"><input type="radio">财政</label> -->
+								<!--借款收回 二级-->
+								<!-- <label class="radio inline"><input type="radio">备用金</label>
+								<label class="radio inline"><input type="radio">私人借款</label> -->
+								<!--理财G 二级-->
+								<!-- 可提取余额:¥30,000,000.00 -->
+								</p>
+								</td>
+							</tr>
+							<tr>
+								<th class="taC">到款金额</th><td><input value="0" placeholder="输入开票金额" pattern="[0-9]" min="0" step="0.01" type="number"></td>
+							</tr>
+							<tr>
+								<th class="taC">到款信息</th><td><input type="text"></td>
+							</tr>
+							<tr>
+								<th class="taC">到款银行</th>
+								<td>
+									<select>
+										<option>纵横广发</option>
+										<option>个人广发</option>
+										<option>华润银行</option>
+									</select>
+								</td>
+							</tr>
+							<tr>
+								<th class="taC">银行到款时间</th><td><input type="date"></td>
+							</tr>
+							<!--收入-->
+						</tbody>
+					</table>
+				</div>
+				<div class="modal-footer">
+					<a href="#" class="button" data-dismiss="modal" aria-hidden="true">确认修改</a>
+					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+				</div>
+			</div></div>
+	</div>
+<!--弹出(日收支)-->
+<div class="modal hide fade" id="delincome">
+		<div class="modal-dialog ">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h3>删除收支</h3>
+				</div>
+				<div class="modal-body">
+					<p>确认删除该收支?</p>
+				</div>
+				<div class="modal-footer">
+					<a href="#" class="button" data-dismiss="modal" aria-hidden="true">确认删除</a>
+					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+				</div>
+			</div></div>
+	</div>	
+<!--弹出(退款)-->
+<div class="modal hide fade" id="refundincome">
+		<div class="modal-dialog ">
+			<div class="modal-content">
+				<div class="modal-header">
+					<h3>填写退款信息</h3>
+				</div>
+				<div class="modal-body saeaList">
+					<table class="table table-bordered table-condensed">
+						<tbody>
+						<tr>
+							<th colspan="2" class="taC">退款信息</th>
+						</tr>
+						<tr>
+							<th class="taC">退款单位名称</th>
+							<td><input type="text" name="refundCompany" id="refundCompany" placeholder="请输入单位名称" aria-required="true" aria-invalid="true"></td>
+						</tr>
+						<tr>
+							<th class="taC">退款的账号</th>
+							<td><input type="text" name="refundNumber" id="refundNumber" placeholder="请输入账号" aria-required="true" aria-invalid="true"></td>
+						</tr>
+						<tr>
+							<th class="taC">退款金额</th>
+							<td><input type="text" name="refundPrice" id="refundPrice" placeholder="请输入退款金额" aria-required="true" aria-invalid="true"></td>
+						</tr>
+						<tr>
+							<th class="taC">备注</th>
+							<td><textarea name="refundRemarks" style="width:390px"></textarea></td>
+						</tr>
+						</tbody>
+					</table>
+				</div>
+				<div class="modal-footer">
+					<a href="#" class="button" data-dismiss="modal" aria-hidden="true">确认</a>
+					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
+				</div>
+			</div></div>
+	</div>	
+<script type="text/javascript">autoFlashHeight();</script>
+
+</body>