Special allowances and deductions for old-age pensions

Requirements ==>>

You can refer to the supplement and deduction of employee pension

This week, dxx is arranged to pay the pension on a monthly basis for the employee pension. The page, logic, and writing table can all be consistent. There is no interface in the agency. the difference. Then, if the deduction is made, the interface can refer to the reissue drawing, and the specific processing logic and writing table refer to the deduction function in Guangzhou (but it must be noted that the deduction in Shenzhen is a deduction of all benefits for the whole month (can be entered into a time period), while the deduction in Guangzhou is for a specific treatment item)

 

The agency's tables ic13 and ic14 are equivalent to the employees' ic09 and ic10. Other tables are shared with the employee pension, and are distinguished by insurance types.

Requirements Analysis==>>

Add interface control, enter the time period for withholding, and calculate withholding for all treatment items of the insured.

 



 

The development page encountered several problems, record it.

1) When the deduction method is selected, the number of months to calculate the deduction will be dynamically displayed and hidden. When the input box of the number of months to be deducted is displayed again after being hidden, it becomes a newline?

page display code

							<td id="jhkfys_val" style="display:none;"><cw:number property="jhkfys" id="jhkfys" allowNegative="false"
							allowDecimals="false" listeners="{'change':jhkfys_change}"></cw:number></td>
						

 

Wrote a JS method

//Display the number of months planned to be withheld
	function hiddenJhkfys(flag){
		if (flag){
			//hide
			document.getElementById('jhkfys_zh').style.display="none";
			document.getElementById('jhkfys_val').style.display="none";
		} else {
//document.getElementById('jhkfys_zh').style.display="block";
			//document.getElementById('jhkfys_val').style.display="block";//Display by block, causing the style to wrap. Should be displayed by table element. document.getElementById('jhkfys_zh').style.display="table-cell";
			document.getElementById('jhkfys_val').style.display="table-cell";
		}
	}

 

2) Event listener method. select \change

listeners="{'change':jhkfys_change}"

listeners="{'select':kfqsny_select}"

 

3) Traverse the json object.

Request background service, the returned ac61List object. traverse.

for(var i=0; i<ac61List.length; i++){
						    var newData = {
								"aaa036":ac61List[i] ["aaa036"] , //item code
								"monthkf":ac61List[i]["aae019"],//The amount of treatment
								"aae041Date":"", //The starting year and month should be withheld
								"aae042Date":nowDate, //The deadline should be deducted
								"aae041":"", //The starting year and month should be deducted str
						    	"aae042":nowDate.format('yyyyMM'), //The cut-off date should be deducted str
						    	"bae069":"", //Number of months to be deducted
								"aae129":"", //The total amount should be deducted
								"aae041Date2":nextMonth, //The planned deduction start year and month default to the next month
								"zhMonth":"", //The number of months planned to be withheld	
								"aaa078":"2", //Sign up for withholding
								"aaa077":"24", //Business type of supplementary withholding
								"baz057":100000
						    };
							data.push(newData);
						}
					    //addNewToLastRow('inputGrid', newData, false);
					    loadGridData("inputGrid", data);//Display all treatment items and deduct the input time period. add by zyh
					    cleanGridData('deductDetailGrid');

 Framework method, get grid list data object, how to traverse row by row.

//The number of months planned to be withheld zyh20170831
	function jhkfys_change(){
		var kfys = Ext.getCmp("jhkfys").getValue();
		var records = getGridRecords('inputGrid');
		if(records.length<=0){//There is no treatment item details yet.
			return false;
		}
		var data2 = [];
		for(var i=0; i<records.length; i++){
			var jhAae041 = records[i].get('aae041Date2');
		    var newData = {
				"aaa036":records[i].get('aaa036'), //Project code
				"monthkf":records[i].get('monthkf'),//The amount of treatment
				"aae041Date":records[i].get('aae041Date'), //The starting year and month should be withheld
				"aae042Date":records[i].get('aae042Date'), //The deadline should be deducted
				"aae041":records[i].get('aae041'), //The starting year and month str should be deducted
		    	"aae042":records[i].get('aae042'), //The deadline should be deducted str
		    	"bae069":records[i].get('bae069'), //Number of months to be deducted
				"aae129":records[i].get('aae129'), //The total amount should be withheld
				"aae041Date2":jhAae041, //The planned deduction start year and month default to the next month
				"zhMonth":kfys, //The number of months planned to be withheld	
				"bac026":(Number(records[i].get('aae129')) / Number(kfys)).toFixed(2), // = total withholding amount/months planned withholding
				"jhAae041":jhAae041.format('yyyyMM'),
				"aaa078":"2", //Sign up for withholding
				"aaa077":"24", //Business type of supplementary withholding
				"baz057":100000
		    };
			data2.push(newData);
		}
		//rewrite
		//Display all treatment items and enter the withholding time period. The default start year and month is the month to start withholding. zyh20170831
	    loadGridData("inputGrid", data2);//Display all treatment items and deduct the input time period. add by zyh
	}

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326226477&siteId=291194637