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

+ 2 - 2
global/js/index.js

@@ -332,7 +332,7 @@ function checkadcl(){
 		success: function(data){
 			if(!data.success){
 				$('#admsg').html('已经存在客户');
-				$('#admsg').attr('class','bsAlert bsDanger fL');
+				//$('#admsg').attr('class','bsAlert bsDanger fL');
 				return false;
 			}else
 				$('#adcl').submit()
@@ -340,7 +340,7 @@ function checkadcl(){
 		error:function(err){
 			if(!data.success){
 				$('#admsg').html('已经存在客户');
-				$('#admsg').attr('class','bsAlert bsDanger fL');
+				//$('#admsg').attr('class','bsAlert bsDanger fL');
 				return false;
 			}
 		}

+ 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;
 

+ 7 - 7
protected/class/client.php

@@ -669,13 +669,13 @@ EOF;
      * @return int {-1:联系人(微信id)为空 ;-2:内容为空;-3:不选定text时标题为空;-4:不选定text时链接为空;-5:发送失败;1:发送成功}
      */
     public function SendMsg($user,$msg,$type='',$title='',$url=''){
-        if (empty($user) || empty($msg))
-            return false;
-        if($type != 'text'){
-            if (empty($title) || empty($url))
-                return false;
-        }
-        return $this->_ps_send('sendmsg', array('user' => $user, 'msg' => $msg, 'type' => $type, 'title' => $title, 'url' => $url));
+//         if (empty($user) || empty($msg))
+//             return false;
+//         if($type != 'text'){
+//             if (empty($title) || empty($url))
+//                 return false;
+//         }
+//         return $this->_ps_send('sendmsg', array('user' => $user, 'msg' => $msg, 'type' => $type, 'title' => $title, 'url' => $url));
     }
 
 }

+ 13 - 11
protected/controller/AdminController.php

@@ -76,11 +76,16 @@ class AdminController extends DooController {
 		}
 	}
 	function adlogin() {
-		$passwork = isset ( $_POST ['passwork'] ) ? $_POST ['passwork'] : "";
-		$uid = isset ( $_POST ['user'] ) ? $_POST ['user'] : "";
+		
+		$this->get_args('passwork') ? $this->get_args('passwork') : "";
+		
+		$passwork = $this->get_args('passwork') ? $this->get_args('passwork') : "";
+		$uid = $this->get_args('user') ? $this->get_args('user') : ""; 
 		
 		Doo::loadModel ( 'staff' );
 		$staff = new staff ();
+		Doo::loadClass ( 'XDeode' );
+		$XDeode = new XDeode ( 5 );
 		
 		if (! empty ( $passwork )) {
 			$userinfo = $staff->getOne ( array (
@@ -90,7 +95,7 @@ class AdminController extends DooController {
 			
 			if (! empty ( $userinfo )) {
 				if ($userinfo ['username'] == $uid && $userinfo ['passwork'] == md5 ( $passwork )) {
-					setcookie ( "adStaff", $userinfo ['sid'], time () + 36000, "/" );
+					setcookie ( "adStaff", $XDeode->encode ($userinfo ['sid']), time () + 36000, "/" );
 					return "/adminoffice";
 				}
 			}
@@ -176,9 +181,8 @@ class AdminController extends DooController {
 	function addCategory() {
 		$msg = "添加成功";
 		
-		$title = isset ( $_POST ['title'] ) ? $_POST ['title'] : "";
-		
-		$district = isset ( $_POST ['district'] ) ? $_POST ['district'] : "";
+		$title = $this->get_args ( 'title' ) ? $this->get_args ( 'title' ) : "";
+		$district = $this->get_args ( 'district' ) ? $this->get_args ( 'district' ) : "";
 		
 		if (! empty ( $title ) && ! empty ( $district )) {
 			Doo::loadModel ( 'L_category' );
@@ -1199,19 +1203,14 @@ class AdminController extends DooController {
 				return $_GET [$name];
 			else {
 				return addslashes ( $_GET [$name] );
-				
-				// return $_GET [$name] ;
 			}
 		} elseif (isset ( $_POST [$name] )) {
 			if (is_array ( $_POST [$name] ))
 				return $_POST [$name];
 			else {
 				return addslashes ( $_POST [$name] );
-				
-				// return $_POST [$name];
 			}
 		} else {
-			
 			return false;
 		}
 	}
@@ -1395,6 +1394,9 @@ class AdminController extends DooController {
 		if (! isset ( $_POST ['staff'] ) || empty ( $_POST ['staff'] )) {
 			exit ( '请选择成员' );
 		}
+		
+		
+		
 		$idname = $name = $pinyinname = array ();
 		$stafflist = explode(',',$_POST['staff']);
 		foreach ( $stafflist as $k => $v ) {

+ 4 - 0
protected/controller/ReceiptController.php

@@ -4440,6 +4440,10 @@ class ReceiptController extends DooController {
 				if ($rinfo ['Rtype'] == 1 && $rinfo ['isBK'] == 1 && $rinfo ['status'] == 1)
 					$receipt->status = 9;
 				
+				if($rinfo ['status']==6){
+					$receipt->loanDate=date ( "Y-m-d" );
+				}	
+					
 				$receipt->executeDate = date ( "Y-m-d" );
 			} else {
 				$receipt->executeStaff = json_encode ( $executeStaff );

+ 3 - 1
protected/model/receipt.php

@@ -15,6 +15,8 @@ class receipt extends DooModel {
     public $date;
     public $pastDate;
     public $executeDate;
+    public $loanDate;
+    
     
     public $cid;
     public $status;
@@ -47,7 +49,7 @@ class receipt extends DooModel {
     
     public $_fields = array('aid', 'accountItem', 'staff', 'sum', 'date','pastDate' ,'cid', 'status', 'reviseDetail', 'revisePrice', 'verify','verifyStaff',
     'nowStaff','receiptOrder','explanation','notice','Rtype','loanItem','loanRid','loanSum','implementOpinions','isBK','executeCopy','executeStaff','verifyBreakup','executeDate'
-    		,'amount');
+    		,'amount','loanDate');
 
 	function receiptByYear($dateCondition,$sid){
     	//

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

@@ -126,15 +126,15 @@
 	  							<!-- if {{receiptDetail' value.status}}==2&&in_array({{staff.0.sid}}, {{receiptDetail' value.nowStaffArray}}) --> 
 	  								<!-- if {{receiptDetail' value.Rtype}}==1 -->
 	  									<!-- if {{receiptDetail' value.isBK}}==1 -->
-	  									<a class="button" href="/receiptburEdi/{{receiptDetail' value.rid}}">去审批</a>
+	  									<a class="button" target="_blank" href="/receiptburEdi/{{receiptDetail' value.rid}}">去审批</a>
 	  									<!-- else -->
-	  									<a class="button" href="/expensesEdi/{{receiptDetail' value.rid}}">去审批</a>
+	  									<a class="button" target="_blank" href="/expensesEdi/{{receiptDetail' value.rid}}">去审批</a>
 	  									<!-- endif --> 
 	  									
 	  								<!-- elseif {{receiptDetail' value.Rtype}}==2 --> 
-	  									<a class="button" href="/remitApproval/{{receiptDetail' value.rid}}">去审批</a>
+	  									<a class="button" target="_blank" href="/remitApproval/{{receiptDetail' value.rid}}">去审批</a>
 	  								<!-- else -->
-	  									<a class="button" href="/receiptburEdi/{{receiptDetail' value.rid}}">去审批</a>
+	  									<a class="button" target="_blank" href="/receiptburEdi/{{receiptDetail' value.rid}}">去审批</a>
 	  								<!-- endif -->
 	  							<!-- else --> 
 	  							<a  href="/expensesDoc/{{receiptDetail' value.rid}}">详情</a>