Explorar o código

客户信息修改和报销单汇总相关

caipin %!s(int64=7) %!d(string=hai) anos
pai
achega
8e303acb9a

+ 6 - 13
protected/controller/MainController.php

@@ -3582,17 +3582,10 @@ class MainController extends DooController {
 		if (! empty ( $webservice ))
 			$company->webservice = $webservice;
 		
-		if (! empty ( $address ))
-			$company->address = $address;
-		
-		if (! empty ( $ride ))
-			$company->ride = $ride;
-		
-		if (! empty ( $stay ))
-			$company->stay = $stay;
-		
-		if (! empty ( $landmarks ))
-			$company->landmarks = $landmarks;
+		$company->address = $address;
+		$company->ride = $ride;
+		$company->stay = $stay;
+		$company->landmarks = $landmarks;
 		
 		$company->update ();
 		
@@ -6825,9 +6818,9 @@ class MainController extends DooController {
 						'content' => $postdata,
 						'timeout' => 15 * 60 
 				) 
-		) // 超时时间(单位:s)
+		); // 超时时间(单位:s)
 
-		;
+		
 		$context = stream_context_create ( $options );
 		$result = file_get_contents ( $url, false, $context );
 		

+ 16 - 4
protected/controller/ReceiptController.php

@@ -2883,8 +2883,15 @@ class ReceiptController extends DooController {
 		$this->render ( "/admin/approvalExpenses", $data );
 	}
 	function expensesDoc() {
-		$rid = isset ( $this->params ['rid'] ) ? $this->params ['rid'] : 0;
+		$rid = isset ( $this->params ['rid'] ) ? $this->params ['rid'] : '';
 		
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
+		if (!empty($rid)&&!is_numeric($rid))
+			$rid = $XDeode->decode ( $rid );
+		if(!is_numeric($rid))
+			die ( 'illegal request' );
+			
 		Doo::loadModel ( 'receipt' );
 		$receipt = new receipt ();
 		
@@ -10711,7 +10718,7 @@ class ReceiptController extends DooController {
 			$itemHtml = '';
 			$categoryHtml = '';
 			$itemKeyList = array_keys ( $itemList );
-			
+			$revisePrice=0;
 			// 报销单内容详情
 			foreach ( $list as $key => $value ) {
 				$accountItemList = json_decode ( $value ['accountItem'], true );
@@ -10743,8 +10750,9 @@ class ReceiptController extends DooController {
 					}
 				}
 				//金额调整和费用查看
-				
-				
+				$revisePrice+=$value ['revisePrice'];
+				$receiptItemHtml .= '<td class="taR">'.$value ['revisePrice'].'</td>';
+				$receiptItemHtml .= '<td class="taR"><a href="#detail" data-toggle="modal" onclick=showExplanation("'.$value ['explanation'].'")>查看</a></td>';
 				$list [$key] ['receiptItemHtml'] = $receiptItemHtml;
 			}
 			
@@ -10780,6 +10788,7 @@ class ReceiptController extends DooController {
 						$receiptTotalHtml .= '<th></th>';
 				}
 			}
+			$receiptTotalHtml .= '<th>'.$revisePrice.'</th>';
 			
 			$stList = $statistics->getStatisticsBySid($staffDetail ['sid'], $year, $month);
 			if (empty ( $stList ))
@@ -10802,6 +10811,7 @@ class ReceiptController extends DooController {
 			}
 			
 			$data ['username'] = urlencode ( $username );
+			$data ['usernameEN'] =  $username ;
 			$data ['monthHtml'] = $monthHtml;
 			$data ['receiptTotalHtml'] = $receiptTotalHtml;
 			$data ['list'] = $list;
@@ -11263,6 +11273,8 @@ class ReceiptController extends DooController {
 		$data ['year'] = $year;
 		$data ['stTitle'] = $stTitle;
 		
+		$data['staffname']=urlencode($staffname);
+		
 		$data ['memu'] = "receipt";
 		$data ['staff'] = $this->staff;
 		$data ['receiptMemu'] = 'companyCategoryCollect';

+ 0 - 1
protected/model/receipt.php

@@ -69,7 +69,6 @@ class receipt extends DooModel {
     }
     
     function getReceiptBySid($sid='',$year='',$month=''){
-    	
     	Doo::loadClass ( 'XDeode' );
     	$XDeode = new XDeode ( 5 );
     	

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

@@ -24,7 +24,7 @@
 				
 				
 					<ul class="cateList">
-						<li><a href="/approvalExpenses/{{receiptList.0.status}}">返回</a></li>
+						<li><a href="/approvalExpenses/finish">返回</a></li>
 						
 	  			</ul>
 	  			

+ 10 - 4
protected/view/admin/receiptStatisticsStaffDetail.html

@@ -25,7 +25,7 @@
 			
 			<form action="/receiptStatisticsStaffDetail" id="up" method="post">
 			<input type="hidden" name='username' value='{{username}}'>
-				<legend><div class="fL"><a class="icon- crumb" href="/staffCollectMonthDetail/{{year}}/{{month}}" title="返回上级">b</a></div>陈特 1月费用列表</legend>
+				<legend><div class="fL"><a class="icon- crumb" href="/staffCollectMonthDetail/{{year}}/{{month}}" title="返回上级">b</a></div>{{usernameEN}} {{month}}月费用列表</legend>
 				<div class="demandCate">
 					<ul class="cateList">
 	  					<li><a href="saea-dlist-category-month-detail.html">办事处</a><a href="#" class="now">员工</a></li>
@@ -74,7 +74,7 @@
 	  					<tbody>
 	  						<!-- loop list -->
 	  						<tr>
-	  						<th><a href="/receiptDetail" target="_blank">{{list' value.receiptOrder}}</th>
+	  						<th><a href="/expensesDoc/{{list' value.ridKey}}" target="_blank">{{list' value.receiptOrder}}</th>
 	  						<td><b>{{list' value.sum}}</b></td>
 	  						{{list' value.receiptItemHtml}}
 	  						
@@ -96,7 +96,7 @@
     	<h3>费用说明</h3>
     </div>
     <div class="modal-body">
-    	<p>这是报销说明的内容</p>
+    	<p id="explanationHtml">这是报销说明的内容</p>
     </div>
 		<div class="modal-footer">
 		    <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
@@ -105,5 +105,11 @@
 </div>
 </div>
     <!--弹出内容-->
-<script type="text/javascript">autoFlashHeight();</script>
+<script type="text/javascript">autoFlashHeight();
+
+function showExplanation(html){
+	$('#explanationHtml').html(html);
+}
+
+</script>
 </body>

+ 12 - 12
protected/view/admin/saeaCompanyCollect.html

@@ -61,18 +61,18 @@
 	<tbody>
 		<tr>
 			<th width="110" class="taC"></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/1">1月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/2">2月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/3">3月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/4">4月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/5">5月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/6">6月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/7">7月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/8">8月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/9">9月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/10">10月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/11">11月</a></th>
-			<th class="taC" width="80"><a href="/companyMonthCollectDetail/{{year}}/12">12月</a></th>
+			<th class="taC" width="80">1月</th>
+			<th class="taC" width="80">2月</th>
+			<th class="taC" width="80">3月</th>
+			<th class="taC" width="80">4月</th>
+			<th class="taC" width="80">5月</th>
+			<th class="taC" width="80">6月</th>
+			<th class="taC" width="80">7月</th>
+			<th class="taC" width="80">8月</th>
+			<th class="taC" width="80">9月</th>
+			<th class="taC" width="80">10月</th>
+			<th class="taC" width="80">11月</th>
+			<th class="taC" width="80">12月</th>
 			<th class="taC" width="110">总计</th>
 		</tr>
 		<!-- loop companyHtml -->

+ 12 - 12
protected/view/admin/saeaStaffCollectB.html

@@ -62,18 +62,18 @@
 	  						<tr>
 	  						<th  class="taC"></th>
 	  						<th width="110" class="taC">员工/月</th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/1">1月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/2">2月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/3">3月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/4">4月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/5">5月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/6">6月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/7">7月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/8">8月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/9">9月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/10">10月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/11">11月</a></th>
-	  						<th class="taC" width="80"><a href="/staffCollectMonthDetail/{{year}}/12">12月</a></th>
+	  						<th class="taC" width="80">1月</th>
+	  						<th class="taC" width="80">2月</th>
+	  						<th class="taC" width="80">3月</th>
+	  						<th class="taC" width="80">4月</th>
+	  						<th class="taC" width="80">5月</th>
+	  						<th class="taC" width="80">6月</th>
+	  						<th class="taC" width="80">7月</th>
+	  						<th class="taC" width="80">8月</th>
+	  						<th class="taC" width="80">9月</th>
+	  						<th class="taC" width="80">10月</th>
+	  						<th class="taC" width="80">11月</th>
+	  						<th class="taC" width="80">12月</th>
 	  						<th class="taC" width="110">总计</th>
 	  						</tr>
 	  						<!-- loop companyHtml -->

+ 23 - 1
protected/view/admin/saeaStaffCollectDetail.html

@@ -38,7 +38,29 @@
 	</li>
 	<li><select name="year" id="Y" onchange="receiptYear();">
 	  					<!-- include 'year' -->
-	  					</select> </li>
+	  					</select> 
+	  					
+	  					
+	  					
+	  					
+	  					<select onchange="javascript:location.href=this.value;">
+	<option value="/staffCollectDetail/{{staffname}}">全年</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=1">1月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=2">2月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=3">3月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=4">4月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=5">5月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=6">6月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=7">7月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=8">8月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=9">9月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=10">10月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=11">11月</option>
+	<option value="/receiptStatisticsStaffDetail?&username={{staffname}}&year={{year}}&month=12">12月</option>
+	</select>
+	  					
+	  					
+	  					</li>
 	<li>报销总计:¥{{stList.rePrice}}</li>
 	<li>同意支付:<span class="colGreen">¥{{stList.agPrice}}</span></li>
 	<li>审批中:¥{{stList.skPrice}}</li>