caipin 7 роки тому
батько
коміт
0ffb58035e

+ 6 - 4
global/js/invoice.js

@@ -686,6 +686,12 @@ $(function() {
 		});
 	});
 	
+	
+	
+	$("a[node-irDelete]").click(function() {
+		var postData = $(this).attr("data-isKey");
+		$('#claimdKey').val(postData);
+	});
 	$("a[node-invoice='INFO']").click(function() {
 		var postData = $(this).attr("data-isKey");
 		var type =$(this).attr("data-type");
@@ -759,14 +765,10 @@ $(function() {
 	});
 	
 	
-	
-	
-	
 	$("a[node-alter]").click(function() {
 		
 		var postData = $(this).attr("data-isKey");
 		
-		//$("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
 		var url = "/ajaxGetInvoiceReceivablesByStaff";
 		$.ajax({
 			url : url,

+ 14 - 0
global/js/invoice.validator.js

@@ -28,6 +28,20 @@ function mailShow(){
 
 $(function () {
 	
+	
+	
+	$('#invoiceReceivablesRefund').validator({
+	    timely: 3,
+	    focusCleanup: true,
+	    
+	    fields: {///ajaxCheckInvoicePrice, iidKey:#inKey
+		    refundCompany: 'required;'
+		    ,refundNumber: 'required;'
+			,refundPrice: 'required;digits;remote[/ajaxCheckInvoiceReceivablesRefund, iridKey:#iridKey]'
+			
+	    }
+	});
+	
 	$('#invoice').validator({
 	    timely: 3,
 	    focusCleanup: true,

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

@@ -98,6 +98,7 @@ $acl ['收款管理'] ['allow'] = array (
 				'ajaxGetInvoiceReceivablesBySerial',
 				'relationNewInvoiceReceivables',
 				'delInvoiceReceivables',
+				'ajaxCheckInvoiceReceivablesRefund',
 				'setInvoiceReceivablesRefund'
 				
 		) 

+ 11 - 0
protected/config/routes.conf.php

@@ -567,6 +567,9 @@ $route['post']['/ajaxGetInvoiceReceivablesBySerial'] = array('InvoiceController'
 $route['post']['/relationNewInvoiceReceivables'] = array('InvoiceController', 'relationNewInvoiceReceivables');
 $route['get']['/delInvoiceReceivables/:iridKey'] = array('InvoiceController', 'delInvoiceReceivables');
 
+$route['post']['/ajaxCheckInvoiceReceivablesRefund'] = array('InvoiceController', 'ajaxCheckInvoiceReceivablesRefund');
+
+
 
 // $route['get']['/invoiceReceivablesAS/:page/:status/:year'] = array('InvoiceController', 'invoiceReceivablesAS');
 // $route['get']['/invoiceReceivablesAS/:page/:status/:year/:month'] = array('InvoiceController', 'invoiceReceivablesAS');
@@ -618,6 +621,14 @@ $route['*']['/importInvoiceReceivablesDo'] = array('InvoiceController', 'importI
 $route['*']['/notificationConf'] = array('MainController', 'notificationConf');
 $route['*']['/ajaxSetNotificationConf'] = array('MainController', 'ajaxSetNotificationConf');
 
+//人资系统
+$route['*']['/settingEmployeeInfo'] = array('SettingController', 'settingEmployeeInfo');
+$route['*']['/hrEmployee'] = array('HumanResourceController', 'hrEmployee');
+
+$route['post']['/staffAdd'] = array('HumanResourceController', 'staffAdd');
+
+
+
 
 //假期管理
 $route['*']['/myList'] = array('HolidayController', 'myList');

+ 60 - 22
protected/controller/InvoiceController.php

@@ -3437,7 +3437,7 @@ class InvoiceController extends DooController {
 		Doo::loadModel ( 'invoiceReceivables' );
 		$invoiceReceivables = new invoiceReceivables ();
 		
-		$con = ' and iid=0 and bindStatus=0 and receivablesStaff="PUBLIC"';
+		$con = '  and bindStatus=0 ';
 		$detail = $invoiceReceivables->getInvoiceReceivablesByIrid ( $claimKey, $con );
 		if (empty ( $detail ))
 			die ( 'illegal request' );
@@ -4960,7 +4960,7 @@ class InvoiceController extends DooController {
 		$get = "/" . $status . "?date=" . urlencode ( $date ) . "&MebSea=" . urlencode ( $MebSea );
 		
 		if (! empty ( $MebSea )) {
-			$con .= ' and ( a.receivablesMessage like "%' . $MebSea . '%"  or a.receivablesPrice like "%' . $MebSea . '%" )';
+			$con .= ' and ( a.receivablesMessage like "%' . $MebSea . '%"  or a.receivablesPrice like "%' . $MebSea . '%" or a.receivablesSerial like "%' . $MebSea . '%" )';
 		}
 		$pageinfo ['page'] = array (
 				'previous' => '' 
@@ -5057,6 +5057,8 @@ class InvoiceController extends DooController {
 		$refundCompany = $this->get_args ( 'refundCompany' ) ? $this->get_args ( 'refundCompany' ) : "";
 		$refundNumber = $this->get_args ( 'refundNumber' ) ? $this->get_args ( 'refundNumber' ) : "";
 		$refundPrice = $this->get_args ( 'refundPrice' ) ? $this->get_args ( 'refundPrice' ) : "";
+		$refundRemarks = $this->get_args ( 'refundRemarks' ) ? $this->get_args ( 'refundRemarks' ) : "";
+		
 		
 		if($refundPrice<0)
 			die ( 'illegal request' );
@@ -5070,6 +5072,9 @@ class InvoiceController extends DooController {
 			$irid = $invoiceReceivables->authcode ( $iridKey );
 			$irDetail = $invoiceReceivables->getInvoiceReceivablesByIrid ( $irid );
 			
+			if($irDetail ['receivablesPrice'] < $refundPrice)
+				die ( 'illegal request' );
+			
 			$invoiceReceivables = new invoiceReceivables ();
 			$refundLog = $this->staff [0] ['username'] . ' 退款  <b class="colRed">¥' . $refundPrice . '</b>
 					<br/><a href="#refunded" onclick="getRefundByDetail(\'' . $iridKey . '\')" data-toggle="modal">退款信息</a> <br/>' . date ( "Y-m-d H:i:s" ) . '
@@ -5079,12 +5084,13 @@ class InvoiceController extends DooController {
 					'refundCompany' => $refundCompany,
 					'refundNumber' => $refundNumber,
 					'refundPrice' => $refundPrice,
+					'refundRemarks' =>$refundRemarks,
 					'refundLog' => $refundLog 
 			);
 			if ($refundType == 1) {
 				$item += array (
 						'refundType' => $refundType,
-						'receivablesPrice' => $refundPrice,
+						'receivablesPrice' => $irDetail ['receivablesPrice'] -$refundPrice,
 						'bindStatus' => 2 
 				);
 			} elseif ($refundType == 0 && $irDetail ['receivablesPrice'] <= $refundPrice) {
@@ -5109,6 +5115,7 @@ class InvoiceController extends DooController {
 					'refundNumber' => $refundNumber,
 					'refundPrice' => $refundPrice,
 					'refundLog' => $refundLog,
+					'refundRemarks'=>$refundRemarks,
 					'date' => date ( "Y-m-d H:i:s" ) 
 			);
 			$invoiceRefund->addInvoiceRefund ( $item );
@@ -5144,6 +5151,37 @@ class InvoiceController extends DooController {
 		die ( 'illegal request' );
 	}
 	
+	function ajaxCheckInvoiceReceivablesRefund(){
+		$iridKey = $this->get_args ( 'iridKey' ) ? $this->get_args ( 'iridKey' ) : '';
+		$refundPrice = $this->get_args ( 'refundPrice' ) ? $this->get_args ( 'refundPrice' ) : "";
+		
+		if($refundPrice<0){
+			echo json_encode ( array (
+					'error' => '金额不能为负'
+			) );
+			die ();
+		}
+		
+		if (! empty ( $refundPrice ) && ! empty ( $iridKey )) {
+			Doo::loadModel ( 'invoiceReceivables' );
+			$invoiceReceivables = new invoiceReceivables ();
+			
+			$irid = $invoiceReceivables->authcode ( $iridKey );
+			$irDetail = $invoiceReceivables->getInvoiceReceivablesByIrid ( $irid );
+				
+			if($irDetail ['receivablesPrice'] < $refundPrice){
+				echo json_encode ( array (
+						'error' => '退款金额不能超过收款金额'
+				) );
+				die ();
+			}
+			echo json_encode ( array (
+					'ok' => '可以使用!'
+			) );
+			die ();
+		}
+	}
+	
 	/**
 	 * 获得收款退款信息
 	 */
@@ -5176,8 +5214,8 @@ class InvoiceController extends DooController {
 		if (! empty ( $receivablesSerial )) {
 			Doo::loadModel ( 'invoiceReceivables' );
 			$invoiceReceivables = new invoiceReceivables ();
-			
-			$irDetail = $invoiceReceivables->getInvoiceReceivablesBySerial ( $receivablesSerial, ' and refundLog=""' );
+			//, ' and refundLog=""'
+			$irDetail = $invoiceReceivables->getInvoiceReceivablesBySerial ( $receivablesSerial );
 			$html = '';
 			if (! empty ( $irDetail ))
 				$html = '<td><b>¥' . $irDetail ['receivablesPrice'] . '</b></td>
@@ -6296,7 +6334,15 @@ class InvoiceController extends DooController {
 						</tbody></table>';
 				if (! empty ( $ireList )) {
 					$html .= '					
-						<table class="table table-bordered table-condensed"><tbody><tr><th class="taC" colspan="2">退款记录</th></tr>';
+						<table class="table table-bordered table-condensed"><tbody><tr><th class="taC" colspan="5">退款记录</th></tr>
+							<tr>
+								<th class="taC">退款单位名称</th>
+								<th class="taC">退款的账号</th>
+								<th class="taC">退款金额</th>
+								<th class="taC">退款</th>
+								<th class="taC">备注</th>
+							</tr>
+							';
 					
 					foreach ( $ireList as $key => $value ) {
 						
@@ -6304,22 +6350,14 @@ class InvoiceController extends DooController {
 						
 						$refundLogList=explode("<br/>",$value['refundLog']);
 						
-						
-						
-						$html .= '					
-								<tr>
-									<th class="taC">退款单位名称</th><td>' . $value ['refundCompany'] . '</td>
-								</tr> 
-								<tr>
-									<th class="taC">退款的账号</th><td>' . $value ['refundNumber'] . '</td>
-								</tr>
-								<tr>
-									<th class="taC">退款金额</th><td class="colRed">¥' . $value ['refundPrice'] . '</td>
-								</tr>
-								<tr>
-									<th class="taC">退款</th><td>' . $refundLogList [0].$refundLogList [2] . '</td>
-								</tr>	
-							';
+						$html .= '<tr>
+								<td>' . $value ['refundCompany'] . '</td>
+								<td>' . $value ['refundNumber'] . '</td>
+								<td><b class="colRed">¥' . $value ['refundPrice'] . '</b></td>
+								<td>' . $refundLogList [0].$refundLogList [2] . '</td>
+								<td>' . $value ['refundRemarks'] . '</td>
+							</tr>
+								';
 					}
 				}
 				$html .= '</tbody></table></div><div class="modal-footer"><a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a></div></div></div>';

+ 98 - 0
protected/controller/MobileController.php

@@ -713,6 +713,104 @@ class MobileController extends DooController {
 			$action_log->class=$action_log->iconContacts;
 			$action_log->insert();
 			
+			
+			// 更新信息中心服务日志统计数量
+			$redis = new Redis ();
+			$redis->connect ( '127.0.0.1', '6379' );
+				
+			$categoryCondition = " and cid=" . $staffDetail ['cid'];
+			$sidCondition = " and sid=" . $staffDetail ['sid'];
+			// actionlog免查询值 $alCondition='';
+			$alCondition = ' aid>' . REMIT . ' and ';
+				
+			// 个人服务日志数量redis值
+			$redisKeyCS = date ( 'Y-m-d' ) . 'SL_' . $staffDetail ['cid'] . '_' . $staffDetail ['sid'];
+			$action_log = new action_log ();
+				
+			$actionLogLongle = $action_log->find ( array (
+					'select' => 'date_format(updatetime,"%m-%d") as updatetime,COUNT(*) as count',
+					'where' => $alCondition . " status=3 " . $categoryCondition . $sidCondition . " and date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime)  ",
+					'groupby' => 'date_format(updatetime,"%m-%d")',
+					'asArray' => true
+			) );
+				
+			$statisticsLongle = array ();
+			for($d = 0; $d <= 29; $d ++) {
+				$MD = date ( "m-d", strtotime ( "-" . $d . " day" ) );
+				$falgLongle = true;
+			
+				foreach ( $actionLogLongle as $value ) {
+					if ($value ['updatetime'] == $MD) {
+						array_push ( $statisticsLongle, $value ['count'] );
+						$falgLongle = false;
+						break;
+					}
+				}
+				if ($falgLongle)
+					array_push ( $statisticsLongle, 0 );
+			}
+			$statisticsLongle = array_reverse ( $statisticsLongle );
+			$jsl = json_encode ( $statisticsLongle );
+			$redis->set ( $redisKeyCS, $jsl );
+				
+			// 办事处服务日志数量reids值
+			$redisKeyC = date ( 'Y-m-d' ) . 'SL_' . $staffDetail ['cid'] . '_';
+			$action_log = new action_log ();
+			$actionLogLongle = $action_log->find ( array (
+					'select' => 'date_format(updatetime,"%m-%d") as updatetime,COUNT(*) as count',
+					'where' => $alCondition . " status=3 " . $categoryCondition . " and date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime)  ",
+					'groupby' => 'date_format(updatetime,"%m-%d")',
+					'asArray' => true
+			) );
+			$statisticsLongle = array ();
+			for($d = 0; $d <= 29; $d ++) {
+				$MD = date ( "m-d", strtotime ( "-" . $d . " day" ) );
+				$falgLongle = true;
+			
+				foreach ( $actionLogLongle as $value ) {
+					if ($value ['updatetime'] == $MD) {
+						array_push ( $statisticsLongle, $value ['count'] );
+						$falgLongle = false;
+						break;
+					}
+				}
+				if ($falgLongle)
+					array_push ( $statisticsLongle, 0 );
+			}
+			$statisticsLongle = array_reverse ( $statisticsLongle );
+			$jsl = json_encode ( $statisticsLongle );
+			$redis->set ( $redisKeyC, $jsl );
+				
+			// 全员处服务日志数量的redis值
+			$redisKey = date ( 'Y-m-d' ) . 'SL__';
+			$action_log = new action_log ();
+			$actionLogLongle = $action_log->find ( array (
+					'select' => 'date_format(updatetime,"%m-%d") as updatetime,COUNT(*) as count',
+					'where' => $alCondition . " status=3  and date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime)  ",
+					'groupby' => 'date_format(updatetime,"%m-%d")',
+					'asArray' => true
+			) );
+			$statisticsLongle = array ();
+			for($d = 0; $d <= 29; $d ++) {
+				$MD = date ( "m-d", strtotime ( "-" . $d . " day" ) );
+				$falgLongle = true;
+			
+				foreach ( $actionLogLongle as $value ) {
+					if ($value ['updatetime'] == $MD) {
+						array_push ( $statisticsLongle, $value ['count'] );
+						$falgLongle = false;
+						break;
+					}
+				}
+				if ($falgLongle)
+					array_push ( $statisticsLongle, 0 );
+			}
+			$statisticsLongle = array_reverse ( $statisticsLongle );
+			$jsl = json_encode ( $statisticsLongle );
+			$redis->set ( $redisKey, $jsl );
+			
+			
+			
 			if (!empty($Remind)){
 				Doo::loadModel('remind');
 				$remindObj=new remind();

+ 13 - 13
protected/controller/ReceiptController.php

@@ -10981,7 +10981,7 @@ class ReceiptController extends DooController {
 				}
 				
 				if (! empty ( $psum ))
-					$psum = '<td class="colGreen taR">' . $psum . '</td>';
+					$psum = '<td class="colGreen taR">' . $psum . '</td>';
 				else
 					$psum = '<td class="colGreen taR">-</td>';
 				$receiptL ['日常相关费用'] = $psum . $html;
@@ -11014,7 +11014,7 @@ class ReceiptController extends DooController {
 						$html .= '<td class="taR">-</td>';
 				}
 				if (! empty ( $psum ))
-					$psum = '<td class="colGreen taR">' . $psum . '</td>';
+					$psum = '<td class="colGreen taR">' . $psum . '</td>';
 				else
 					$psum = '<td class="colGreen taR">-</td>';
 				$receiptL ['差旅相关费用'] = $psum . $html;
@@ -11048,7 +11048,7 @@ class ReceiptController extends DooController {
 						$html .= '<td class="taR">-</td>';
 				}
 				if (! empty ( $psum ))
-					$psum = '<td class="colGreen taR">' . $psum . '</td>';
+					$psum = '<td class="colGreen taR">' . $psum . '</td>';
 				else
 					$psum = '<td class="colGreen taR">-</td>';
 				$receiptL ['培训班费用'] = $psum . $html;
@@ -11079,7 +11079,7 @@ class ReceiptController extends DooController {
 						$html .= '<td class="taR">-</td>';
 				}
 				if (! empty ( $psum ))
-					$psum = '<td class="colGreen taR">' . $psum . '</td>';
+					$psum = '<td class="colGreen taR">' . $psum . '</td>';
 				else
 					$psum = '<td class="colGreen taR">-</td>';
 				$receiptL ['其他'] = $psum . $html;
@@ -11096,7 +11096,7 @@ class ReceiptController extends DooController {
 				}
 				
 				if (! empty ( $psum ))
-					$psum = '<td class="taR colOrange">' . $psum . '</td>';
+					$psum = '<td class="taR colOrange">' . $psum . '</td>';
 				else
 					$psum = '<td class="taR colOrange">-</td>';
 				$receiptL ['报销金额调整'] = $psum . $html;
@@ -11118,7 +11118,7 @@ class ReceiptController extends DooController {
 			) );
 			
 			if (! empty ( $monthStaffPrice [0] ['price'] ))
-				$receiptL ['monthStaffPrice'] = '<td><b>' . $monthStaffPrice [0] ['price'] . '</b></td>';
+				$receiptL ['monthStaffPrice'] = '<td><b>' . $monthStaffPrice [0] ['price'] . '</b></td>';
 			else
 				$receiptL ['monthStaffPrice'] = '<td><b>-</b></td>';
 			$list [$value ['title']] = $receiptL;
@@ -11270,7 +11270,7 @@ class ReceiptController extends DooController {
 							// echo $v ['item'].'/'.$v ['price'].'/'.$v ['month'].$v ['itemCategory'].'<br/>';
 						}
 						$asum += $v ['price'];
-						$html .= '<td class="taR">' . $v ['price'] . '</td>';
+						$html .= '<td class="taR">' . $v ['price'] . '</td>';
 						$falg = false;
 						break;
 					}
@@ -11278,7 +11278,7 @@ class ReceiptController extends DooController {
 				if ($falg)
 					$html .= '<td class="taR">-</td>';
 			}
-			$html .= '<td class="taR colGreen"><b>' . $asum . '</b></td>';
+			$html .= '<td class="taR colGreen"><b>' . $asum . '</b></td>';
 			$collectHtml [$value ['category']] [$value ['name']] = $html;
 		}
 		$data ['collectHtml'] = $collectHtml;
@@ -11651,7 +11651,7 @@ class ReceiptController extends DooController {
 			}
 			
 			if (! empty ( $psum ))
-				$psum = '<td class="colGreen taR">' . $psum . '</td>';
+				$psum = '<td class="colGreen taR">' . $psum . '</td>';
 			else
 				$psum = '<td class="colGreen taR">-</td>';
 			$receiptL ['日常相关费用'] = $psum . $html;
@@ -11684,7 +11684,7 @@ class ReceiptController extends DooController {
 			}
 			
 			if (! empty ( $psum ))
-				$psum = '<td class="colGreen taR">' . $psum . '</td>';
+				$psum = '<td class="colGreen taR">' . $psum . '</td>';
 			else
 				$psum = '<td class="colGreen taR">-</td>';
 			$receiptL ['差旅相关费用'] = $psum . $html;
@@ -11718,7 +11718,7 @@ class ReceiptController extends DooController {
 			}
 			
 			if (! empty ( $psum ))
-				$psum = '<td class="colGreen taR">' . $psum . '</td>';
+				$psum = '<td class="colGreen taR">' . $psum . '</td>';
 			else
 				$psum = '<td class="colGreen taR">-</td>';
 			$receiptL ['培训班费用'] = $psum . $html;
@@ -11749,7 +11749,7 @@ class ReceiptController extends DooController {
 			}
 			
 			if (! empty ( $psum ))
-				$psum = '<td class="colGreen taR">' . $psum . '</td>';
+				$psum = '<td class="colGreen taR">' . $psum . '</td>';
 			else
 				$psum = '<td class="colGreen taR">-</td>';
 			$receiptL ['其他'] = $psum . $html;
@@ -11766,7 +11766,7 @@ class ReceiptController extends DooController {
 			}
 			
 			if (! empty ( $psum ))
-				$psum = '<td class="taR colOrange">' . $psum . '</td>';
+				$psum = '<td class="taR colOrange">' . $psum . '</td>';
 			else
 				$psum = '<td class="taR colOrange">-</td>';
 			$receiptL ['报销金额调整'] = $psum . $html;

+ 6 - 0
protected/model/department.php

@@ -17,5 +17,11 @@ class department extends DooModel {
 				'asArray' => TRUE 
 		) );
 	}
+	public function getDepartmentByDid($did = 0) {
+		return $this->getOne ( array (
+				'where' => "did= '" . $did . "' ",
+				'asArray' => TRUE 
+		) );
+	}
 }
 ?>

+ 2 - 2
protected/model/invoiceReceivables.php

@@ -39,6 +39,7 @@ class invoiceReceivables extends DooModel {
 	public $refundCompany;
 	public $refundNumber;
 	public $refundPrice;
+	public $refundRemarks;
 	public $refundLog;
 	public $relationIrid;
 	public $relationLog;
@@ -75,6 +76,7 @@ class invoiceReceivables extends DooModel {
 			'refundCompany',
 			'refundNumber',
 			'refundPrice',
+			'refundRemarks',
 			'refundLog',
 			'relationIrid',
 			'relationLog'
@@ -89,8 +91,6 @@ class invoiceReceivables extends DooModel {
 				'groupby' => 'iid',
 				'asArray' => TRUE 
 		) );
-		// echo " irid in ( " . $iridString . " )";
-		// echo $list ['receivablesPrice'].'sdsdf';
 		if (empty ( $list ))
 			return 0;
 		return $list ['receivablesPrice'];

+ 3 - 0
protected/model/invoiceRefund.php

@@ -16,6 +16,7 @@ class invoiceRefund extends DooModel {
 	public $refundNumber;
 	public $refundPrice;
 	public $refundLog;
+	public $refundRemarks;
 	public $date;
 	public $_table = 'CLD_invoiceRefund';
 	public $_primarykey = 'ireid';
@@ -27,6 +28,7 @@ class invoiceRefund extends DooModel {
 			'refundNumber',
 			'refundPrice',
 			'refundLog',
+			'refundRemarks',
 			'date' 
 	);
 	
@@ -38,6 +40,7 @@ class invoiceRefund extends DooModel {
 			return array();
 		return $list = $this->find ( array ( 
 				'where' => 'irid='.$irid,
+				'asc'=>'ireid',
 				'asArray' => TRUE
 		));
 	}

+ 41 - 4
protected/model/staff.php

@@ -28,6 +28,7 @@ class staff extends DooModel {
 	public $remittanceBankType;
 	public $did;
 	public $didName;
+	public $jobNumber;
 	
 	public $_table = 'CLD_staff';
 	public $_primarykey = 'sid';
@@ -58,6 +59,7 @@ class staff extends DooModel {
 			'remittanceBankType',
 			'coupletNumber',
 			'did',
+			'jobNumber',
 			'didName'
 	);
 	public function checkUser($uid, $passwork) {
@@ -75,15 +77,35 @@ class staff extends DooModel {
 				'asArray' => TRUE 
 		) );
 	}
-	public function getStaff() {
+	
+	
+	/**
+	 * 
+	 * @return string
+	 */
+	public function getStaff($admin=false) {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
+		Doo::loadModel ( 'department' );
+		$department = new department ();
 		
-		$list = $this->find ( array (
-				'desc' => 'sid',
+		$condition = array (
+				'asc' => 'jobNumber',
 				'asArray' => TRUE 
-		) );
+		);
+		
+		if ($admin)
+			$condition += array (
+					'where' => "isadmin = 0",
+			);
+		
+		$list = $this->find ( $condition);
 		foreach ( $list as $key => $value ) {
+			$list [$key] ['departmentName'] ='';
+			if($value['departmentID']!=0){
+				 $list [$key] ['departmentName'] =$department->getDepartmentByDid($value['departmentID']);
+			}
+			
 			$list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
 		}
 		
@@ -151,6 +173,21 @@ class staff extends DooModel {
 		
 		return $list;
 	}
+	
+	/**
+	 * 
+	 * @param number $nature
+	 */
+	public function getStaffJobNumberByNature($nature=1){
+		$detail=$this->getOne ( array (
+				'where' => "nature= '" . $nature . "'",
+				'desc' => 'jobNumber',
+				'asArray' => TRUE
+		) );
+		
+		return $detail;
+	}
+	
 	/**
 	 * 根据用户ID获取相关信息
 	 * @param number $sid 用户ID

+ 1 - 1
protected/plugin/TemplateTag.php

@@ -197,7 +197,7 @@ function isInvoiceAggregateCompanyShow($sid){
 function isReceiptAuthorityShow($sid){
 	Doo::loadModel ( "receiptAuthorityManage" );
 	$receiptAuthorityManage = new receiptAuthorityManage ();
-
+	
 	
 	$icm=$receiptAuthorityManage->getInvoiceCMByStaff($sid);
 	

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

@@ -29,7 +29,7 @@
 				<div class="demandCate">
 				<form action="/approvalExpenses/{{status}}" id="up" method="get">
 				
-	  				<ul class=" cateList " >
+	  				<ul class="cateList " >
 	  					<li>
 	  					
 	  					<a <!-- if {{status}}=='pendApproval' --> class="now" <!-- endif --> href="/approvalExpenses/pendApproval">待审批</a>

+ 11 - 10
protected/view/admin/invoiceReceivablesAS.html

@@ -38,7 +38,6 @@
 	  					<a <!-- if {{status}}=='Unclaimed' --> class="now" <!-- endif --> title="未入账" href="/invoiceReceivablesAS/1/Unclaimed" >未入账</a>
 	  					<a <!-- if {{status}}=='Credited' --> class="now" <!-- endif --> title="已入账" href="/invoiceReceivablesAS/1/Credited" >已入账</a>
 	  					<a <!-- if {{status}}=='BBN' --> class="now" <!-- endif --> title="已入账" href="/invoiceReceivablesAS/1/BBN" >批量导入</a>
-	  					
 	  					<a <!-- if {{status}}=='REFUND' --> class="now" <!-- endif --> title="已入账" href="/invoiceReceivablesAS/1/REFUND" >退款</a>
 	  				</li>
 					
@@ -56,7 +55,7 @@
 	  					</li>
 	  					
 						<li><div class="search"><div class="input-append">
-									<input class="span3" data-irmMebSea placeholder="收款金额,收款信息" name="MebSea" value="{{MebSeaEn}}" type="text">
+									<input class="span3" data-irmMebSea placeholder="收款金额,收款信息,序列号" name="MebSea" value="{{MebSeaEn}}" type="text">
 									<button class="btn btn-small" node-irmMebSea type="submit">搜索</button>
 								</div>
 							</div></li>
@@ -71,7 +70,6 @@
 						<th>收款金额</th>
 						<th>实际收款金额</th>
 						
-						
 						<th>银行到账时间</th>
 						<th>收款信息</th>
 						<th>办事处</th>
@@ -150,11 +148,11 @@
 						<br/>
 						<!-- endif -->
 						
-						<!-- if {{list' value.receivablesStaff}}=='PUBLIC'&&{{list' value.iid}}==0 -->
+						<!-- if {{list' value.receivablesStaff}}=='PUBLIC'&&{{list' value.iid}}==0&&{{list' value.receivablesPrice}}!=0 -->
 							<a href="#receive" data-isKey="{{list' value.iridKey}}" node-alter data-toggle="modal">变更</a>
 						<!-- elseif {{list' value.bindStatus}}==0&&{{list' value.receivablesStaff}}!='PUBLIC' -->	
 						<a  href="#search-invoice" bind-invoice='receivables' node-key="{{list' value.iridKey}}" data-toggle="modal">查询发票</a>
-							<!-- if {{list' value.untreadStatus}}==0 -->
+							<!-- if {{list' value.untreadStatus}}==0&&{{list' value.receivablesPrice}}!=0 -->
 							</br><a href="#receive" data-isKey="{{list' value.iridKey}}" node-alter data-toggle="modal">变更</a>
 							<!-- endif -->
 							<!-- if !empty({{list' value.iid}})||!empty({{list' value.iidExtend}}) -->
@@ -176,7 +174,6 @@
 						</tr>
 					<!-- endloop -->
 					
-					
 		  		</table>
 					</div>
 		  						<!--翻页-->
@@ -457,7 +454,7 @@
 	
 	 <!--弹出退款-->
 <div class="modal hide fade" id="refund">
-<form action="/setInvoiceReceivablesRefund" id="SIRC" method="post">	
+<form action="/setInvoiceReceivablesRefund" id="invoiceReceivablesRefund" method="post">	
 	<input type="hidden" name="iridKey" id="iridKey" value="">
 	<div class="modal-dialog">
 		<div class="modal-content">
@@ -478,15 +475,19 @@
 				</tr>
 				<tr>
 					<th class="taC">退款单位名称</th>
-					<td><input type="text" name="refundCompany" id="" placeholder="请输入单位名称" aria-required="true" aria-invalid="true"></td>
+					<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="" placeholder="请输入账号" aria-required="true" aria-invalid="true"></td>
+					<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="" placeholder="请输入退款金额" aria-required="true" aria-invalid="true"></td>
+					<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>

+ 1 - 20
protected/view/admin/menuReceipt.html

@@ -1,21 +1,2 @@
-<li data-placement="right" data-toggle="ctooltip" data-original-title="信息中心" class="topLine"><a href="/" class="icon- <!-- if {{memu}}=="index" --> selected <!-- endif --> ">B</a></li>
-<li data-placement="right" data-toggle="ctooltip" data-original-title="通讯录"><a href="/contacts" class="icon- <!-- if {{memu}}=="contacts" --> selected <!-- endif -->">A</a></li>
-<li data-placement="right" data-toggle="ctooltip" data-original-title="在线锁库">
-<a href="/keyonline" class="icon- <!-- if {{memu}}=="keyonline" --> selected <!-- endif -->">C</a></li>
-
-<li class="hide"><a href="#">E</a></li>
-<li class="hide"><a href="#">D</a></li> 
-
-<li data-placement="right" class="topLine <!-- if  getGlobals('NEW2') !=0 ||  getGlobals('NEW') !=0 --> news <!-- endif --> " data-toggle="ctooltip" data-original-title="费用管理" ><a href="/saeaBorad" class="icon- <!-- if {{memu}}=="receipt" --> selected <!-- endif -->" >U</a></li>  
- 
-<li data-placement="right" data-toggle="ctooltip" <!-- if isInvoiceNew() --> class="news" <!-- endif --> data-original-title="发票申请"><a href="/invoice" class="icon- <!-- if {{memu}}=="invoice" --> selected <!-- endif -->">D</a></li>
- 
- <li data-placement="right" data-toggle="ctooltip" data-original-title="邮件推广">  
-<a href="/eMailTask" class="icon- <!-- if {{memu}}=="eMailTask" --> selected <!-- endif -->">Z</a></li>
-<li data-placement="right" data-toggle="ctooltip" data-original-title="假期管理">
- <a href="/myList" class="icon- <!-- if {{memu}}=="holiday" --> selected <!-- endif -->">X</a></li>
-<li data-placement="right" data-toggle="ctooltip" data-original-title="APP" class="topLine">
-<a href="/app" class="icon- <!-- if {{memu}}=="app" --> selected <!-- endif -->">Y</a></li>
-<li data-placement="right" data-toggle="ctooltip" data-original-title="个人设置" ><a href="/adminmyinfo" class="icon- <!-- if {{memu}}=="adminlock"||{{memu}}=="adminmyinfo"||{{memu}}=="adminoffice" --> selected <!-- endif -->" >F</a></li> 
-<li data-placement="right" data-toggle="ctooltip" data-original-title="退出系统"><a href="/out" class="icon-">G</a></li>
+<!-- include '../menu' -->
 					

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

@@ -18,8 +18,8 @@
 				upload_url: "/swfupload",	// Relative to the SWF file
 				
 				file_size_limit : "8 MB",
-				file_types : "*.jpg;*.png;*.doc;*.docx;*.els;*.elsx;",
-				file_types_description : "*.jpg;*.png;*.doc;*.docx;*.els;*.elsx",
+				file_types : "*.jpg;*.png;*.doc;*.docx;*.xls;*.xlsx;",
+				file_types_description : "*.jpg;*.png;*.doc;*.docx;*.xls;*.xlsx",
 				file_upload_limit : 8,
 				file_queue_limit : 2,
 				custom_settings : {
@@ -178,7 +178,7 @@
 	  								<tr>
 	  								<th>
 	  									<span id="spanButtonPlaceHolder"></span>
-										<span>支持jpg、png、doc、docx、els、elsx;最大8M文件。</span>
+										<span>支持jpg、png、doc、docx、xls、xlsx;最大8M文件。</span>
 										<input id="btnCancel" type="button" value="取消所有上传" style="display:none"  onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
 									
 										<input type="hidden" id="enclosurName" name="enclosurName" value="">

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

@@ -17,8 +17,8 @@
 				upload_url: "/swfupload",	// Relative to the SWF file
 				
 				file_size_limit : "8 MB",
-				file_types : "*.jpg;*.png;*.doc;*.docx;*.els;*.elsx;",
-				file_types_description : "*.jpg;*.png;*.doc;*.docx;*.els;*.elsx",
+				file_types : "*.jpg;*.png;*.doc;*.docx;*.xls;*.xlsx;",
+				file_types_description : "*.jpg;*.png;*.doc;*.docx;*.xls;*.xlsx",
 				file_upload_limit : 8,
 				file_queue_limit : 2,
 				custom_settings : {
@@ -200,7 +200,7 @@
 	  								<tr>
 	  								<th>
 	  									<span id="spanButtonPlaceHolder"></span>
-										<span>支持jpg、png、doc、docx、els、elsx;最大8M文件。</span>
+										<span>支持jpg、png、doc、docx、xls、xlsx;最大8M文件。</span>
 										<input id="btnCancel" type="button" value="取消所有上传" style="display:none"  onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
 									
 										<input type="hidden" id="enclosurName" name="enclosurName" value="">

+ 2 - 0
protected/view/menu.html

@@ -13,6 +13,8 @@
 
 <li data-placement="right" data-toggle="ctooltip" <!-- if isInvoiceNew() --> class="news" <!-- endif --> data-original-title="发票申请"><a href="/invoice" class="icon- <!-- if {{memu}}=="invoice" --> selected <!-- endif -->">D</a></li>
 
+<li data-placement="right" data-toggle="ctooltip" data-original-title="人资管理"><a href="/hrEmployee" class="icon- <!-- if {{memu}}=="HumanResource" --> selected <!-- endif -->">m</a></li>
+
 <li data-placement="right" data-toggle="ctooltip" data-original-title="邮件推广">  
 <a href="/eMailTask" class="icon- <!-- if {{memu}}=="eMailTask" --> selected <!-- endif -->">Z</a></li>