Explorar o código

客户信息同步功能

caipin %!s(int64=7) %!d(string=hai) anos
pai
achega
38740ba189

+ 9 - 5
global/css/global.css

@@ -1964,6 +1964,9 @@ table .taC{
 .saeaList table input,.saeaList table select{
   margin:0;
 }
+.saeaList table input[type="radio"],.saeaList table input[type="checkbox"]{
+  margin-top:4px;
+}
 .saeaList .entry table .avtra {
   width:50px;
   text-align:center;
@@ -3692,20 +3695,21 @@ td div.dlLev3{
   display:inline-block;
   margin-left:15px;
 }
-.invoButton a{
+.invoButton a,.invoButton input{
   width:50%;
   float:left;
   text-align:center;
   padding:10px 0;
   color:#fff;
+  border:none
 }
-.invoButton a.buttonDone{
+.invoButton a.buttonDone,.invoButton input.buttonDone{
   background:#7ea85c;
 }
-.invoButton a.buttonDone:hover{
+.invoButton a.buttonDone:hover,.invoButton input.buttonDone:hover{
   background:#4f8e08
 }
-.invoButton a.buttonDone:active{
+.invoButton a.buttonDone:active,.invoButton input.buttonDone:active{
   background:#2a4f00
 }
 .invoButton a.buttonInvalid{
@@ -3726,7 +3730,7 @@ td div.dlLev3{
 .invoButton a.buttonBack:active{
   background:#e57c01;
 }
-.invoButton a.buttonBlock{
+.invoButton a.buttonBlock,.invoButton input.buttonBlock{
   width: 100%
 }
 .invoButton a.buttonUndone{

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 45 - 27
protected/controller/InvoiceController.php


+ 25 - 8
protected/controller/MainController.php

@@ -3427,6 +3427,9 @@ class MainController extends DooController {
 				$client_staff = new client_staff ();
 				$staff = new staff ();
 				$client = new client ();
+				Doo::loadModel ( 'district' );
+				$district = new district ();
+				
 				
 				$clientlist = $client->getClientByCompanyId ( $companyInfo ['cid'] );
 				$department = $client->getDepartment ( $companyInfo ['cid'] );
@@ -3502,12 +3505,11 @@ class MainController extends DooController {
 							<tr><th>部门</th><td>' . $value ['department'] . '</td><th>办公室</th><td>' . $value ['office'] . '</td></tr>
 							<tr><th>手机</th><td>' . $value ['telephone'] . '</td><th>电话</th><td>' . $value ['phone'] . '</td></tr>
 							<tr><th>QQ</th><td>' . $value ['qq'] . '</td><th>邮箱</th><td>' . $value ['email'] . '</td></tr>
-							<tr><th>备注</th><td >' . $value ['mark'] . '</td> <th>地址</th><td node-address="company_'. $value ['cid'] .'" >' . $value ['address'] . '</td>
-									</tr>';
+							
+							<tr node-ck=fz ><th>备注</th><td >' . $value ['mark'] . '</td>
+							</tr>';
 					
-					// $longleinfo=$longle->getLongleBykeynum($value['keynum']);
 					$longleinfo = $longle->getLongleByClientid ( $value ['cid'] );
-					
 					if (empty ( $longleinfo )) {
 						$longleinfo = array (
 								0 => array (
@@ -3518,7 +3520,21 @@ class MainController extends DooController {
 								) 
 						);
 					}
-					$html .= '<tr><th>软件锁</th><td colspan="3"><a href="javascript:void(0)" onclick="getLongleLog(' . $longleinfo [0] ['lid'] . ')">' . $longleinfo [0] ['key_num'] . '</a>/' . $longleinfo [0] ['product'] . '/' . $longleinfo [0] ['statusT'] . '</td></tr>';
+					$html .= '<tr node-ck=fz ><th>软件锁</th><td colspan="3"><a href="javascript:void(0)" onclick="getLongleLog(' . $longleinfo [0] ['lid'] . ')">' . $longleinfo [0] ['key_num'] . '</a>/' . $longleinfo [0] ['product'] . '/' . $longleinfo [0] ['statusT'] . '</td></tr>';
+					
+					$districtList = $district->getbyidlist ( $value ['district'] );
+					
+					$localdis='';
+					foreach ($districtList as $lov){
+						$localdis.=' '.$lov['name'];
+					}
+
+					$html .= '
+					<tr node-synCom=pany style="display:none" ><th>客户地区</th><td colspan="4">'.$localdis.'</td></tr>
+					<tr node-synCom=pany style="display:none" ><th>客户地址</th><td colspan="4">'.$value['address'].'</td></tr>
+					<tr node-synCom=pany style="display:none" ><th>客户乘车</th><td colspan="4">'.$value['ride'].'</td></tr>
+					<tr node-synCom=pany style="display:none" ><th>客户地标</th><td colspan="4">'.$value['landmarks'].'</td></tr>
+					<tr node-synCom=pany style="display:none" ><th>客户住宿</th><td colspan="4">'.$value['stay'].'</td></tr>';
 					
 					$html .= '</tbody></table></div>';
 				}
@@ -3530,7 +3546,8 @@ class MainController extends DooController {
 			$(\"a[node-synadd='true']\").show();
 			$('input[CAS-NUM=TR]').show();
 			$('#skop').show();
-						
+			$('tr[node-ck=fz]').hide();
+			$('tr[node-synCom=pany]').show();
 		});
 				
 				
@@ -4547,9 +4564,7 @@ class MainController extends DooController {
 		if (! empty ( $cid )) {
 			Doo::loadModel ( 'client' );
 			Doo::loadModel ( 'company' );
-			Doo::loadModel ( 'district' );
 			
-			$district = new district ();
 			$company = new company ();
 			$client = new client ();
 			
@@ -4563,6 +4578,8 @@ class MainController extends DooController {
 					'asArray' => true 
 			) );
 			
+			Doo::loadModel ( 'district' );
+			$district = new district ();
 			$districtLv1 = $district->get_lv ( 1 );
 			
 			$info ['districtList'] = $district->getbyidlist ( $info ['district'] );

+ 1 - 1
protected/model/invoice.php

@@ -509,7 +509,7 @@ class invoice extends DooModel {
 		Doo::loadClass ( 'XDeode' );
 		$XDeode = new XDeode ( 5 );
 		$list = $this->find ( array (
-				'where' => "postStatus=" . $postStatus . " and doPost=1 and status=2 and isDelete=0",
+				'where' => "postStatus=" . $postStatus . " and printStatus=1 and doPost=1 and status=2 and isDelete=0",
 				'asArray' => TRUE 
 		) );
 		foreach ( $list as $key => $value ) {

+ 14 - 7
protected/model/invoiceReceivables.php

@@ -60,15 +60,15 @@ class invoiceReceivables extends DooModel {
 			return 0;
 		
 		$list = $this->getOne ( array (
-				'select'=>' sum(receivablesPrice) as receivablesPrice ',
+				'select' => ' sum(receivablesPrice) as receivablesPrice ',
 				'where' => " irid in ( " . $iridString . " )",
 				'groupby' => 'iid',
 				'asArray' => TRUE 
 		) );
 		
-		if (empty($list))
+		if (empty ( $list ))
 			return 0;
-		return $list['receivablesPrice'];
+		return $list ['receivablesPrice'];
 	}
 	
 	/**
@@ -283,11 +283,18 @@ class invoiceReceivables extends DooModel {
 		$irid = $XDeode->decode ( $irid );
 		$detail = array ();
 		if (! empty ( $irid ) && is_numeric ( $irid )) {
-			$detail = $this->getOne ( array (
-					'where' => " irid=" . $irid . " and receivablesStaff like '" . $sid . "_%'",
-					'asArray' => TRUE 
-			) );
 			
+			if (! empty ( $sid ))
+				$detail = $this->getOne ( array (
+						'where' => " irid=" . $irid . " and receivablesStaff like '" . $sid . "_%'",
+						'asArray' => TRUE 
+				) );
+			else 
+				$detail = $this->getOne ( array (
+						'where' => " irid=" . $irid ,
+						'asArray' => TRUE
+				) );
+				
 			$detail ['sid'] = '';
 			$detail ['username'] = '';
 			if (! empty ( $detail ['receivablesStaff'] )) {

+ 1 - 6
protected/view/admin/expenses.html

@@ -32,8 +32,6 @@
 						<a href="/expenses/remits" <!-- if {{item}}=="remits" --> class="now" <!-- endif --> >对公汇款</a>
 						</li>
 					
-	  					
-	  					
 	  					<li>
 	  					<select name="year" id="Y" onchange="receiptYear();">
 	  					<!-- include 'year' -->
@@ -50,13 +48,10 @@
 	  			</form>
 	  		</div>
 	  		
-	  		
-	  		
-	  		
 	  		<div class="saeaList">
 				<div class="entry">
 					<table class="table table-bordered table-condensed">
-						<thead><tr><th width="100" class="taC">费用类型</th><th width="100" class="taC">费用金额金额</th><th width="120" class="taC">费用所在办事处</th><th width="120" class="taC">费用单号</th><th class="taC">费用说明</th><th width="100" class="taC">状态</th><th width="80" class="taC">操作</th></tr></thead>
+						<thead><tr><th width="100" class="taC">费用类型</th><th width="100" class="taC">费用金额</th><th width="120" class="taC">费用所在办事处</th><th width="120" class="taC">费用单号</th><th class="taC">费用说明</th><th width="100" class="taC">状态</th><th width="80" class="taC">操作</th></tr></thead>
 						<tbody>
 						<!-- loop receiptList -->
 						<tr>

+ 0 - 31
protected/view/contacts_client.html

@@ -496,40 +496,9 @@
 	  				</div>
 	  				</form>	
 						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
 						</div>
 						
 						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
-						
 	  				
 	  				<!--记录列表-->
 	  				<div id="LongleLogHtml"></div>