caipin пре 5 година
родитељ
комит
dd1bc9a9a8

+ 11 - 0
protected/controller/ReceiptExtendController.php

@@ -2717,6 +2717,17 @@ class ReceiptExtendController extends DooController {
     	
     	//办事处显示设置
     	$categoryList=$category->getCategory();
+    	$selectedSummary=file_get_contents("protected/config/receipt/summary.conf.ini");
+    	$selectedSummary=explode(',', $selectedSummary);
+    	foreach ($categoryList as $key=>$value){
+    		$categoryList[$key]['checked']=false;
+    		foreach ($selectedSummary as $v){
+    			if($value['cidKey']==$v){
+    				$categoryList[$key]['checked']=true;
+    				break;
+    			}
+    		}
+    	}
     	
     	$data['categoryList']=$categoryList;
     	

+ 1 - 1
protected/view/receipt/receiptSummaryStatisticsByAgency.html

@@ -101,7 +101,7 @@
 		    </div>
 		    <div class="modal-body">
 		    <!-- loop categoryList -->
-		    	<label class="checkbox inline"><input type="checkbox" name="cidKey[]" value="{{categoryList' value.cidKey}}">{{categoryList' value.title}}</label>
+		    	<label class="checkbox inline"><input type="checkbox" name="cidKey[]" checked="{{categoryList' value.checked}}" value="{{categoryList' value.cidKey}}">{{categoryList' value.title}}</label>
 		    <!-- endloop -->
 		    	
 		    </div>