123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935 |
- <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
- <jsp:include page="../../common/include.jsp" />
- <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
- <script type="text/javascript"><!--
- //婚姻状况
- var maritalStatusObj = null;
- var maritalStatus_array = null;
-
- //性别
- var sexObj = null;
- var sex_array = null;
-
- //申请保障类型
- var applyTypeObj = null;
- var applyType_array = null;
-
- //家庭住房困难类型
- var diffcultTypeObj = null;
- var diffcultType_array = null;
-
- //私有或公有
- var privateOrPublicObj = null;
- var privateOrPublic_array = null;
-
- //产权性质
- var propertyTypeObj = null;
- var propertyType_array = null;
-
-
- //是否
- var yesOrNoObj = null;
- var yesOrNo_array = null;
-
- //审核状态
- var stateObj = null;
- var state_array = null;
-
- //家庭关系
- var relativeObj = null;
- var relative_array = null;
-
- //人员类别
- var personTypeObj = null;
- var personType_array = null;
-
- //审核意见
- var opinionObj = null;
-
- var opinion_array = null;
-
- //区
- var areaObj = null;
-
- var area_array = null;
-
- //街道
- var streetObj = null;
-
- var street_array = null;
-
- //居委会
- var neighborhoodObj = null;
-
- var neighborhood_array = null;
-
-
-
- //审核状态
- var subsidiesStateObj = null;
-
- var subsidiesState_array = null;
-
- /**用户显示区*/
- $(function() {
- $.ajax({
- type: "post",
- dataType: "json",
- url: "columnSetAction_listColumn?tname=subsidiesPayableVerify4",
- complete :function(){$("#load").hide();},
- success: function(msg){
- if(msg.success){
- setId();
- var data = msg.obj;
- for(var i = 0;i<data.length;i++){
- if("1"==data[i].type){
- if(typeof(data[i].formatter)!="undefined"){
- data[i].formatter=eval(data[i].formatter);
- }
- user_columns.push(data[i]);
- }else{
- user_frozenColumns.push(data[i]);
- }
- }
- columns.push(user_columns);
- frozenColumns.push(user_frozenColumns);
-
- $('#subsidiesPayableDataGrid').datagrid({
- rownumbers:true,
- fit:true,
- pageSize:20,
- pageList : [ 10, 20, 30, 40, 50 ],
- fitColumns:false,
- border:false,
- sortOrder:'desc',
- pagination:true,
- idField:'id',
- url:whzl.basePath + '/subsidiesPayableAction_listSubsidiesPayable?state=4,5,14',
- toolbar:'#searchtool',
- checkOnSelect:true,
- selectOnCheck:true,
- /*onCheckAll:onCheckRows,
- onUncheckAll:onCheckRows,
- onCheck:onCheckRows,
- onUncheck:onCheckRows,
- onSelectAll:onCheckRows,
- onUnselectAll:onCheckRows,
- onSelect:onCheckRows,
- onUnselect:onCheckRows,*/
- nowrap:true,
- columns:columns,
- frozenColumns:frozenColumns,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- toolBar("subsidiesPayableDataGrid","setSubsidiesPayableVerify4Dialog","subsidiesPayableVerify4");
- }
- }
- });
-
- //婚姻情况
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"maritalStatus" ,"aa10.name":"婚姻情况" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- maritalStatusObj = msg.obj.rows;
- var select_arr = [];
- var data = maritalStatusObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- maritalStatus_array = select_arr.join("");
- }
- }
- });
-
- //性别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"sex" ,"aa10.name":"性别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- sexObj = msg.obj.rows;
- var select_arr = [];
- var data = sexObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- sex_array = select_arr.join("");
- }
- }
- });
-
- //申请业务类别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"applyType" ,"aa10.name":"保障业务类别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- applyTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = applyTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- applyType_array = select_arr.join("");
- }
- }
- });
-
- //家庭住房困难类型
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"diffcultType" ,"aa10.name":"家庭住房困难类型" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- diffcultTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = diffcultTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- diffcultType_array = select_arr.join("");
- }
- }
- });
-
- //私有或公有
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"privateOrPublic" ,"aa10.name":"私有或公有" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- privateOrPublicObj = msg.obj.rows;
- var select_arr = [];
- var data = privateOrPublicObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- privateOrPublic_array = select_arr.join("");
- }
- }
- });
-
- //房屋产权性质
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"propertyType" ,"aa10.name":"产权性质" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- propertyTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = propertyTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- propertyType_array = select_arr.join("");
- }
- }
- });
-
- //是否
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"yesOrNo" ,"aa10.name":"是否" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- yesOrNoObj = msg.obj.rows;
- var select_arr = [];
- var data = yesOrNoObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- yesOrNo_array = select_arr.join("");
- }
- }
- });
-
- //人员类别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- personTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = personTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- if(data[nItem].value!='新就业' && data[nItem].value!='外来务工' ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- }
- personType_array = select_arr.join("");
- }
- }
- });
-
-
- //审批状态
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"reviewState" ,"aa10.name":"审核状态" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- stateObj = msg.obj.rows;
- var select_arr = [];
- var data = stateObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- state_array = select_arr.join("");
- }
- }
- });
-
- //家庭关系
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"homeRelative" ,"aa10.name":"家庭关系" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- relativeObj = msg.obj.rows;
- var select_arr = [];
- var data = relativeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- relative_array = select_arr.join("");
- }
- }
- });
-
- //审批意见
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"opinion" ,"aa10.name":"审核意见" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- opinionObj = msg.obj.rows;
- var select_arr = [];
- var data = opinionObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- opinion_array = select_arr.join("");
- }
- }
- });
-
-
-
- //补贴审核状态
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"subsidiesState" ,"aa10.name":"补贴审核状态" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- subsidiesStateObj = msg.obj.rows;
- var select_arr = [];
- var data = subsidiesStateObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- subsidiesState_array = select_arr.join("");
- }
- }
- });
-
-
- //获取区
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "houseRegisterAction_listChildren",//要访问的后台地址
- //data:{"id":id},
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- areaObj = msg.obj.rows;
- var select_arr = [];
- var data = areaObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
- }
- area_array = select_arr.join("");
- }
- }
- });
- });
-
- /**获取街道列表*/
- function getStreetList(id,streetId,objId){
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "houseRegisterAction_listChildren",//要访问的后台地址
- data:{"id":id},
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- streetObj = msg.obj.rows;
- var select_arr = [];
- var data = streetObj;
- select_arr.push("<option value=''>请选择</option>");
- if(id != null && id != ""){
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
- }
- }
- street_array = select_arr.join("");
- $("#" + objId).append(street_array);
- $("#" + objId).val(streetId);
- }
- }
- });
- }
- /**获取居委会列表*/
- function getNeighborhoodList(id,neighborhoodId,objId){
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "houseRegisterAction_listChildren",//要访问的后台地址
- data:{"id":id},
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- neighborhoodObj = msg.obj.rows;
- var select_arr = [];
- var data = neighborhoodObj;
- select_arr.push("<option value=''>请选择</option>");
- if(id != null && id != ""){
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
- }
- }
- neighborhood_array = select_arr.join("");
- $("#" + objId).append(neighborhood_array);
- $("#" + objId).val(neighborhoodId);
- }
- }
- });
- }
-
-
-
-
- /**查询*/
- function searchFun(){
- $("#subsidiesPayableDataGrid").datagrid("load", {
- "subsidiesPayable.yearAndMonth":$("#tblQuery").find("input[id='yearAndMonth']").val(),
- "subsidiesPayable.securityPerson.name":$("#tblQuery").find("input[id='name']").val(),
- "subsidiesPayable.securityPerson.idCard":$("#tblQuery").find("input[id='idCard']").val()
- });
- $("#subsidiesPayableDataGrid").datagrid({
- columns:columns,
- frozenColumns:frozenColumns
- })
- toolBar("subsidiesPayableDataGrid","setSubsidiesPayableVerify4Dialog","subsidiesPayableVerify4");
- }
-
- /*清除查询条件**/
- function ClearQuery() {
- $("#tblQuery").find("input").val("");
- $("#tblQuery").find("select").val("-1");
- }
- /**性别*/
- var sexFormatter = function(value , row , index){
- var sex = "";
- for(var nItem = 0; nItem < sexObj.length; nItem++ ){
- if(sexObj[nItem].code == row.sex){
- sex = sexObj[nItem].value;
- break;
- }
- }
- return sex;
- };
-
- /**户口所在地*/
- var residenceFormatter = function(value , row , index){
- return row.houseRegister.parent.parent.name + "-" + row.houseRegister.parent.name + "-" + row.houseRegister.name;
- };
-
- /**名称格式化*/
- var nameFormatter = function(value , row , index){
- return "<a href='javascript:' onclick=subsidiesPayableDetails('" + row.id + "','" + row.securityPerson.id + "')>"+ row.securityPerson.name +"</a>";
- };
-
- /**补贴详情格式化*/
- var detailsFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=subsidiesPayableDetails('" + row.id + "','" + row.securityPerson.id + "') style='cursor:pointer' />";
-
- };
-
- /**更新*/
- var updateFormatter = function(value , row , index){
- if(row.state == 5){
- return "审核通过";
- }else if(row.state == 14){
- return "审核未通过";
- }else{
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=updateRow('" + row.id + "','" + row.securityPerson.id + "') style='cursor:pointer' />";
- }
- };
-
-
- /**更新事件*/
- function updateRow(id,securityPersonId){
- var updateIndex = $('#subsidiesPayableDataGrid').datagrid('getRowIndex', id);
- $('#taskDialog').dialog(
- {
- buttons : [
- {
- text : '提交',
- iconCls : 'icon-ok',
- handler : function(){
- task_submit(id);
- $("#taskDialog").dialog("close");
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#taskDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- task_load(id,securityPersonId);
- }
- }
- );
- }
-
-
- //添加补贴应发数
- function subsidiesPayableDetails(id,securityPersonId) {
- $('#detailSubsidiesPayableDialog').dialog({
- buttons : [
- {
- text : '确定',
- iconCls : 'icon-ok',
- handler : function() {
- $("#detailSubsidiesPayableDialog").dialog("close");
- }
- } ],
- onLoad : function(){
- detail_load(id,securityPersonId);
- }
- });
- }
-
- /**身份证号格式化*/
- var idCardFormatter = function(value , row , index){
- return row.securityPerson.idCard;
- };
-
- var getObjectURL = function (file) {
- var url = null;
- if (window.createObjectURL != undefined) {
- url = window.createObjectURL(file);
- } else if (window.URL != undefined) {
- url = window.URL.createObjectURL(file);
- } else if (window.webkitURL != undefined) {
- url = window.webkitURL.createObjectURL(file);
- }
- return url;
- }
-
- //显示对象属性
- function ShowObjProperty(Obj) {
- var PropertyList='';
- var PropertyCount=0;
- for(i in Obj){
- if(Obj.i !=null)
- PropertyList=PropertyList+i+'属性:'+Obj.i+'\r\n';
- else
- PropertyList=PropertyList+i+'方法\r\n';
- }
- alert(PropertyList);
- }
-
- /**人员类别格式化*/
- var personTypeFormatter = function(value , row , index){
- var personType = "";
- for(var nItem = 0; nItem < personTypeObj.length; nItem++ ){
- if(personTypeObj[nItem].code == row.securityPerson.personType){
- personType = personTypeObj[nItem].value;
- break;
- }
- }
- return personType;
- };
- /**申请类别格式化*/
- var applyTypeFormatter = function(value , row , index){
- var applyType = "";
- for(var nItem = 0; nItem < applyTypeObj.length; nItem++ ){
- if(applyTypeObj[nItem].code == row.applyType){
- applyType = applyTypeObj[nItem].value;
- break;
- }
- }
- return applyType;
- };
-
-
- /**合同年租金*/
- var houseMoneyFormatter = function(value , row , index){
- if(row.subsidiesContract!=null)
- return row.subsidiesContract.houseMoney.toFixed(2);
- };
-
- /**联系电话*/
- var phoneFormatter = function(value , row , index){
- return row.securityPerson.phone;
- };
-
- var numFormatter = function(val,rowData,rowIndex){
- if(val!=null)
- return val.toFixed(2);
- }
-
-
- /**家庭关系格式*/
- var relativeFormatter = function(value , row , index){
- var relative = "";
- for(var nItem = 0; nItem < relativeObj.length; nItem++ ){
- if(relativeObj[nItem].code == row.relative){
- relative = relativeObj[nItem].value;
- break;
- }
- }
- return relative;
- };
-
- /**家庭关系编辑*/
- var relativeEditor = {
- type:'combobox',
- options:{
- valueField:'code',
- textField:'value',
- method:'get',
- url:'aa10Action_listAa10All?aa10.letter=homeRelative',
- required:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj.rows;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- }
- };
-
- /**小数类型*/
- var decimalEditor = {
- type:'numberbox',
- options:{
- precision:2
- }
- }
-
- /**婚姻状况格式*/
- var maritalStatusFormatter = function(value , row , index){
- var maritalStatus = "";
- for(var nItem = 0; nItem < maritalStatusObj.length; nItem++ ){
- if(maritalStatusObj[nItem].code == row.maritalStatus){
- maritalStatus = maritalStatusObj[nItem].value;
- break;
- }
- }
- return maritalStatus;
- };
- /**当前状态格式化*/
- var stateFormatter = function(value , row , index){
- var subsidiesState = "";
- if(row.securityPerson.subsidiesState != "2"){
- for(var nItem = 0; nItem < subsidiesStateObj.length; nItem++ ){
- if(subsidiesStateObj[nItem].code == row.state){
- subsidiesState = subsidiesStateObj[nItem].value;
- break;
- }
- }
- return subsidiesState;
- }else{
- return "已退保";
- }
- };
-
- /**账号锁定*/
- var lockFormatter = function(value , row , index){
- if(row.securityPerson.subsidiesState != "2"){
- if(row.securityPerson.personType <= 3){
- return "<img src='<%=basePath%>/images/edit_remove.png' title='退出保障' onclick=securityPersonLock(" + row.securityPerson.id + ") style='cursor:pointer' />";
- }else if(row.securityPerson.personType > 3){
- return "<img src='<%=basePath%>/images/edit_remove.png' title='退出保障' onclick=newEmployLock(" + row.securityPerson.id + ") style='cursor:pointer' />";
- }
- }else{
- return "已退保";
- }
- };
-
- function lockRow(){
- var selectedItems = $('#subsidiesPayableDataGrid').datagrid('getSelections');
- if(selectedItems.length!=1){
- $.messager.alert("警告","请选择一条人员信息!");
- return ;
- }
- var row = selectedItems[0];
- if(row.securityPerson.subsidiesState != "2"){
- if(row.securityPerson.personType <= 3){
- securityPersonLock(row.securityPerson.id);
- }else if(row.securityPerson.personType > 3){
- newEmployLock(row.securityPerson.id);
- }
- }else{
- $.messager.alert("警告","该人员已退保!");
- }
- }
-
- /**退出保障对话框*/
- var securityPersonLock = function(id){
- $("#lockSecurityPersonDialog").dialog(
- {
- buttons : [
- {
- text : '退出保障',
- iconCls : 'icon-ok',
- handler : function(){
- securityPerson_lock_submit("?lock=subsidiesState");
- $('#subsidiesPayableDataGrid').datagrid('reload');
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#lockSecurityPersonDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- securityPerson_lock_load(id);
- }
- }
- );
- };
-
- /**退出保障对话框*/
- var newEmployLock = function(id){
- $("#lockNewEmployDialog").dialog(
- {
- buttons : [
- {
- text : '退出保障',
- iconCls : 'icon-ok',
- handler : function(){
- newEmploy_lock_submit("?lock=subsidiesState");
- $('#subsidiesPayableDataGrid').datagrid('reload');
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#lockNewEmployDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- newEmploy_lock_load(id);
- }
- }
- );
- };
-
- /**批量审核*/
- function verify4SubsidiesPayables(){
- var selectedItems = $('#subsidiesPayableDataGrid').datagrid('getSelections');
- var ids = [];
- $.each(selectedItems,function(index,item){
- ids.push(item.id);
- })
- if(ids.length==0){
- $.messager.alert("警告","请选择至少一条记录!");
- return;
- }
- var idsStr = ids.join(",");
- for(var i =0; i < selectedItems.length; i++){
- if(selectedItems[i].state != 4||selectedItems[i].securityPerson.subsidiesState == "2"){
- $.messager.alert("警告","部分数据已经审核过,请重新选择!");
- return;
- }
- }
-
- $('#verify4sDialog').dialog(
- {
- buttons : [
- {
- text : '提交',
- iconCls : 'icon-ok',
- handler : function(){
- verify4s_submit();
- $("#verify4sDialog").dialog("close");
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#verify4sDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- verify4s_load(idsStr);
- }
- }
- );
-
- }
- function onCheckRows(){
- var rows = $('#subsidiesPayableDataGrid').datagrid('getSelections');
- var ptotal = 0//计算rentYear的总和
- for (var i = 0; i < rows.length; i++) {
- ptotal += rows[i]['subsidyMoney'];
- }
- $('#subsidiesPayableDataGrid').datagrid('getPager').pagination({
- buttons:[{
- text:'总应发金额为:'+ptotal.toFixed(2)
- }]
- });
- }
- --></script>
- <div class="easyui-layout" data-options="fit:true,border:false">
- <div data-options="region:'center',border:false">
- <div id="searchtool" data-options="region:'north' , border:false">
- <div class="clear"></div>
- <table id="tblQuery" style="width:100%;">
- <tr>
- <td align="right" style="width: 10%;"><span>姓名</span></td><td style="width: 10%;"><input id="name" name="securityPerson.name" type="text" style="width: 100px;"/></td>
- <td align="right" style="width: 6%;"><span>身份证号</span></td><td style="width: 10%;"><input id="idCard" name="securityPerson.idCard" type="text" style="width: 140px;"/></td>
- <td align="right" style="width: 7%;"><span>供应年月</span></td><td style="width: 18%;">
- <input type="text" id="yearAndMonth" onchange="javascript:searchFun();" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM'})" class="Wdate"/>
- </td>
- <td align="left" style="width: 39%;">
- <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
- <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
- <a href="javascript:verify4SubsidiesPayables();" class="easyui-linkbutton" data-options="iconCls:'icon-batch',plain:true">批量审核</a>
- <a href="javascript:lockRow();" class="easyui-linkbutton" data-options="iconCls:'icon-quit',plain:true">退保</a>
- </td>
- </tr>
-
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="subsidiesPayableDataGrid">
- <!--<thead frozen="true">
- <tr>
- <th data-options="field:'id',checkbox:true,width:30">ID</th>
- <th data-options="field:'name',sortable:true,width:55,formatter:nameFormatter">姓名</th>
- <th data-options="field:'idCard',sortable:true,width:140,formatter:idCardFormatter">身份证号</th>
- <th data-options="field:'bankAccount',sortable:true,width:140">银行账号</th>
- </tr>
- </thead>
- <thead>
- <tr>
- <th data-options="field:'yearAndMonth',align:'center',width:60">供应年月</th>
- <th data-options="field:'subsidyMoney',align:'center',width:80,formatter:numFormatter">应发金额</th>
- <th data-options="field:'securityNum',align:'center',width:80">保障人口数量</th>
- <th data-options="field:'personType',align:'center',sortable:true,width:90,formatter:personTypeFormatter">人员类别</th>
- <th data-options="field:'accountMoney',align:'center',sortable:true,width:80,formatter:numFormatter">账户余额</th>
- <th data-options="field:'phone',align:'center',sortable:true,width:120,width:80,formatter:phoneFormatter">联系电话</th>
- <th data-options="field:'detail',align:'center',sortable:true,width:45,formatter:detailsFormatter">详情</th>
- <th data-options="field:'update',align:'center',width:60,formatter:updateFormatter">审核</th>
- <th data-options="field:'lock',align:'center',width:60,formatter:lockFormatter">退保</th>
- </tr>
- </thead>-->
- </table>
-
- </div>
- </div>
- <div id="detailSubsidiesPayableDialog" data-options="title:' 补贴应发详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/subsidiesPayableAction_toDetail'">
- </div>
- <div id="taskDialog" data-options="title:' 保障处审批',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/subsidiesPayableAction_toVerify4'">
- </div>
- <div id="lockSecurityPersonDialog" data-options="title:' 退出保障',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/securityPersonAction_toLock'">
- </div>
- <div id="lockNewEmployDialog" data-options="title:' 退出保障',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/securityPersonAction_toNewEmployLock'">
- </div>
- <div id="setSubsidiesPayableVerify4Dialog" data-options="title:' 个性化设置',iconCls:'icon-cog',width:500,height:370,modal:true,href:'<%=basePath %>/columnSetAction_toSet?tname=subsidiesPayableVerify4'">
- </div>
- <div id="verify4sDialog" data-options="title:' 批量审批',iconCls:'icon-details',width:600,height:320,modal:true,href:'<%=basePath %>/subsidiesPayableAction_toVerify4s'">
- </div>
-
- <script type="text/javascript">
- <!--
- parent.$.messager.progress('close');
- //-->
- </script>
|