caipin пре 8 година
родитељ
комит
d9260cf3f9

+ 8 - 1
global/js/receipt.js

@@ -48,7 +48,7 @@ function setExeReceipt(tr,rid){
 	 var form = $('#implement'+tr);
 	 var amount=$('#amount'+tr).val();
 	 console.log(amount);
-	 if(amount=='0.00')
+	 if(amount=='')
 		 return alert('请填写汇款金额');
 	 $("#amountInp"+tr).val(amount);
 	 
@@ -88,6 +88,13 @@ function showOpinion(receiptOrder){
 
 $(function() {
 
+	$('button[node-qmk="tm"]').click(function(){
+		var id=$(this).attr('data');
+		$('#'+id).attr('value',$('#'+id).attr('data-tm'));
+
+	});
+	
+	
 	$('a[node-ReceiptBack="true"]').click(function(){
 		var rid=$(this).attr("p-d");
 		var opinion=$('#opinion_'+rid).val();

+ 12 - 4
protected/controller/ReceiptController.php

@@ -4336,9 +4336,9 @@ class ReceiptController extends DooController {
 	function implementDo() {
 		$rid = $this->get_args ( 'rid' ) && is_numeric ( $this->get_args ( 'rid' ) ) ? $this->get_args ( 'rid' ) : 0;
 		$implementOpinions = $this->get_args ( 'opinion' ) ? $this->get_args ( 'opinion' ) : "";
-		$amount = $this->get_args ( 'amount' ) && is_numeric ( $this->get_args ( 'amount' ) ) ? $this->get_args ( 'amount' ) : 0;
+		$amount = $this->get_args ( 'amount' ) && is_numeric ( $this->get_args ( 'amount' ) ) ? $this->get_args ( 'amount' ) : '';
 		
-		if (! empty ( $rid ) && ! empty ( $amount )) {
+		if (! empty ( $rid ) && $amount!='') {
 			Doo::loadModel ( 'receipt' );
 			$receipt = new receipt ();
 			Doo::loadClass ( 'XDeode' );
@@ -7093,7 +7093,7 @@ class ReceiptController extends DooController {
 	}
 	function remittanceHky() {
 		$year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
-		$moth = $this->get_args ( 'moth' ) ? $this->get_args ( 'moth' ) : 'MONTH';
+		$moth = $this->get_args ( 'moth' ) ? $this->get_args ( 'moth' ) : date ( "m" );
 		$day = $this->get_args ( 'day' ) ? $this->get_args ( 'day' ) : 'DAY';
 		
 		$page = isset ( $this->params ['page'] ) && is_numeric ( $this->params ['page'] ) ? $this->params ['page'] : 1;
@@ -10586,7 +10586,8 @@ class ReceiptController extends DooController {
 				'groupby' => 'item,Month(pastDate),itemCategory',
 				'asArray' => true 
 		) );
-		
+		//echo 'staff=' . $staffId . " and cid=" . $pcid . " and status=1 and Year(pastDate)=" . $year;
+		//print_r($receiptCollectList);
 		$accountList = $accountItem->find ( array (
 				'asArray' => true 
 		) );
@@ -10599,6 +10600,10 @@ class ReceiptController extends DooController {
 				$falg = true;
 				foreach ( $receiptCollectList as $v ) {
 					if ($value ['category'] == $v ['itemCategory'] && $v ['item'] == $value ['name'] && $i == $v ['month']) {
+						
+  						if($v ['item']=='可自加费用'){
+  							//echo $v ['item'].'/'.$v ['price'].'/'.$v ['month'].$v ['itemCategory'].'<br/>';
+  						}
 						$asum += $v ['price'];
 						$html .= '<td class="taR">¥' . $v ['price'] . '</td>';
 						$falg = false;
@@ -10613,6 +10618,8 @@ class ReceiptController extends DooController {
 		}
 		$data ['collectHtml'] = $collectHtml;
 		
+		//print_r($collectHtml);
+		
 		// create Adjustment price html
 		$receiptCollectList = $receiptDetail->find ( array (
 				'select' => 'staff,sum(price) as price,itemCategory,Month(pastDate) as month',
@@ -10640,6 +10647,7 @@ class ReceiptController extends DooController {
 		
 		$collectHtml = $this->collectHtml ( $receiptCollectList, '其他', 'b' );
 		array_push ( $collectArray ['其他'], $collectHtml );
+		
 		$data ['collectArray'] = $collectArray;
 		
 		$collectHtml = $this->collectHtml ( $receiptCollectList, '报销金额调整' );

+ 12 - 3
protected/view/admin/implement.html

@@ -140,7 +140,11 @@
 	  					<table class="table table-bordered table-condensed table-hover">
 							<tbody>
 								<tr><th colspan="2" class="taC">确认汇款金额</th></tr>
-								<tr><th>汇款金额(用于生成汇款单)</th><td class="taR" width="200">¥<input placeholder="输入汇款金额" pattern="[0-9]" id="amountLoan" step="1" min="0" value="{{receiptList' value.amount}}" class="span2" type="number"></td></tr>
+								<tr><th>汇款金额(用于生成汇款单)</th>
+								<td class="taR" width="200">¥<input placeholder="输入汇款金额" pattern="[0-9]" data-tm="{{receiptDetail' value.sum}}" id="amountLoan" step="1" min="0" value="{{receiptList' value.amount}}" class="span2" type="number">
+								<button class="btn btn-small" node-qmk="tm" data='amountLoan'  type="button">取值</button>
+								
+								</td></tr>
 							</tbody>
 						</table>
 	  				
@@ -259,7 +263,10 @@
 	  					<table class="table table-bordered table-condensed table-hover">
 							<tbody>
 								<tr><th colspan="2" class="taC">确认汇款金额</th></tr>
-								<tr><th>汇款金额(用于生成汇款单)</th><td class="taR" width="200">¥<input placeholder="输入汇款金额" pattern="[0-9]" id="amountPublic" step="1" min="0" value="{{receiptList' value.amount}}" class="span2" type="number"></td></tr>
+								<tr><th>汇款金额(用于生成汇款单)</th>
+								<td class="taR" width="200">¥<input placeholder="输入汇款金额" pattern="[0-9]" data-tm="{{receiptDetail' value.sum}}" id="amountPublic" step="1" min="0" value="{{receiptList' value.amount}}" class="span2" type="number">
+								<button class="btn btn-small" node-qmk="tm" data='amountPublic'  type="button">取值</button>
+								</td></tr>
 							</tbody>
 						</table>
 	  					
@@ -408,7 +415,9 @@
 	  					<table class="table table-bordered table-condensed table-hover">
 							<tbody>
 								<tr><th colspan="2" class="taC">确认汇款金额</th></tr>
-								<tr><th>汇款金额(用于生成汇款单)</th><td class="taR" width="200">¥<input placeholder="输入汇款金额" pattern="[0-9]" id="amountReceipt" step="1" min="0" value="{{receiptList' value.amount}}" class="span2" type="number"></td></tr>
+								<tr><th>汇款金额(用于生成汇款单)</th><td class="taR" width="200">¥<input placeholder="输入汇款金额" data-tm="{{receiptDetail' value.sum}}" pattern="[0-9]" id="amountReceipt" step="1" min="0" value="{{receiptList' value.amount}}" class="span2" type="number">
+								<button class="btn btn-small" node-qmk="tm" data='amountReceipt'  type="button">取值</button>
+								</td></tr>
 							</tbody>
 						</table>
 	  					

+ 0 - 5
protected/view/admin/invoicePostAchieve.html

@@ -183,11 +183,6 @@
 							</tbody>
 						</table>
 					
-					
-					
-					
-					
-					
 				</div>
 				<div class="modal-footer">
 					<input type="submit" class="button" value="确定">