Browse Source

更新202108251735

fanghuisheng 3 năm trước cách đây
mục cha
commit
64bbb820d1

+ 3 - 5
WebRoot/opt/inspectors/scripts/inspectors.js

@@ -94,11 +94,9 @@ Ext.onReady(function () {
 			anchor: '75%',
 			listeners: {
 				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('fa_name').setValue('');
-						});
-						return false;
+					if (e.length > 20) {
+						Ext.getCmp('fa_Inspectors_name').setValue(e.substring(0, 20));
+						return;
 					}
 				}
 			}

+ 3 - 5
WebRoot/view/companyxx/scripts/companyxx.js

@@ -219,11 +219,9 @@ Ext.onReady(function(){
 			anchor:'75%',
 			listeners: {
 				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '责任人姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('fa_name').setValue('');
-						});
-						return false;
+					if (e.length > 20) {
+						Ext.getCmp('fa_Inspectors_name').setValue(e.substring(0, 20));
+						return;
 					}
 				}
 			}

+ 3 - 5
WebRoot/view/inspectors/scripts/inspectors.js

@@ -334,11 +334,9 @@ Ext.onReady(function () {
 			anchor: '75%',
 			listeners: {
 				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '人员姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('fa_Inspectors_name').setValue('');
-						});
-						return false;
+					if (e.length > 20) {
+						Ext.getCmp('fa_Inspectors_name').setValue(e.substring(0, 20));
+						return;
 					}
 				}
 			}

+ 3 - 5
WebRoot/view/maintenanceperson/scripts/maintenanceperson.js

@@ -576,11 +576,9 @@ Ext.onReady(function(){
 				anchor:'75%',
 				listeners: {
 					change: function (o, e) {
-						if (e.length > 10) {
-							Ext.Msg.alert('提示', '人员姓名长度不可超过10个字!', function (btn, txt) {
-								Ext.getCmp('fa_name').setValue('');
-							});
-							return false;
+						if (e.length > 20) {
+							Ext.getCmp('fa_Inspectors_name').setValue(e.substring(0, 20));
+							return;
 						}
 					}
 				}

+ 2 - 0
WebRoot/view/springhandle/scripts/springHandle.js

@@ -1201,6 +1201,7 @@ Ext.onReady(function(){
 			xtype:'datefield',
 	        fieldLabel:"开始日期",
 	        minValue:'07/07/2017',
+			maxValue:new Date(),
 	        minText:"当前日期选择应大于2017-07-07",
 	        format:"Y-m-d",
 	        value:Ext.util.Format.date(Ext.Date.add(new Date(),Ext.Date.MONTH,-1),"Y-m-01"),
@@ -1215,6 +1216,7 @@ Ext.onReady(function(){
 	    	xtype:'datefield',
 	        fieldLabel:"结束日期",
 	        minValue:'07/07/2017',
+			maxValue:new Date(),
 	        minText:"当前日期选择应大于2017-07-07",
 	        format:"Y-m-d",
 	        value:Ext.util.Format.date(new Date(new Date(new Date().getUTCFullYear(), new Date().getMonth(), 1) - 86400000), "Y-m-d"),

+ 3 - 16
out/artifacts/YtIoT_Web_exploded/opt/inspectors/scripts/inspectors.js

@@ -94,11 +94,9 @@ Ext.onReady(function () {
 			anchor: '75%',
 			listeners: {
 				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('fa_name').setValue('');
-						});
-						return false;
+					if (e.length > 20) {
+						Ext.getCmp('fa_Inspectors_name').setValue(e.substring(0, 20));
+						return;
 					}
 				}
 			}
@@ -146,18 +144,7 @@ Ext.onReady(function () {
 				if (form.isValid()) {
 					var query = new Object();
 					query.name = Ext.getCmp('fa_name').getValue();
-					if(query.name == null || query.name == ""){
-						Ext.Msg.alert('系统提示', '人员姓名不能为空!');
-						return;
-					}
 					query.phone = Ext.getCmp('fa_phone').getValue();
-					if(query.phone == null || query.phone == ""){
-						Ext.Msg.alert('系统提示', '电话号码不能为空!');
-						return;
-					}else if (query.phone.length < 11){
-						Ext.Msg.alert('系统提示', '请输入正确的电话号码!');
-						return;
-					}
 					query.Job_duties = Ext.getCmp('fa_Job_duties').getValue();
 					query.company_code = Ext.getCmp('fa_company_code').getValue();
 					var jsonstr = Ext.JSON.encode(query);

+ 2 - 1
out/artifacts/YtIoT_Web_exploded/res/img/myImages.css

@@ -4086,10 +4086,11 @@ textarea.x-form-field{
 
 .SpringHandleTitle7 {
     width:200px;
-    height:200px;
+    height:90px;
     position:absolute;
 	top:180px;
 	left:103px;
+	overflow-x: auto;
 }
 
 .SpringHandleDiv {

+ 3 - 5
out/artifacts/YtIoT_Web_exploded/view/companyxx/scripts/companyxx.js

@@ -219,11 +219,9 @@ Ext.onReady(function(){
 			anchor:'75%',
 			listeners: {
 				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '责任人姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('fa_name').setValue('');
-						});
-						return false;
+					if (e.length > 20) {
+						Ext.getCmp('fa_Inspectors_name').setValue(e.substring(0, 20));
+						return;
 					}
 				}
 			}

+ 2 - 1
out/artifacts/YtIoT_Web_exploded/view/frontpage/css/myImages.css

@@ -4568,10 +4568,11 @@
 
 .SpringHandleTitle7 {
     width:200px;
-    height:200px;
+    height:90px;
     position:absolute;
 	top:180px;
 	left:103px;
+	overflow-x: auto;
 }
 
 .SpringHandleDiv {

+ 3 - 5
out/artifacts/YtIoT_Web_exploded/view/inspectors/scripts/inspectors.js

@@ -334,11 +334,9 @@ Ext.onReady(function () {
 			anchor: '75%',
 			listeners: {
 				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '人员姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('fa_Inspectors_name').setValue('');
-						});
-						return false;
+					if (e.length > 20) {
+						Ext.getCmp('fa_Inspectors_name').setValue(e.substring(0, 20));
+						return;
 					}
 				}
 			}

+ 1344 - 1378
out/artifacts/YtIoT_Web_exploded/view/maintenanceperson/scripts/maintenanceperson.js

@@ -6,23 +6,23 @@
  */
 
 Ext.Loader.setConfig({
-	enabled: true
+    enabled: true
 });
 
 Ext.Loader.setPath('Ext.ux', '../../res/extjs/examples/ux');
 
 Ext.require([
-	'Ext.grid.*',
-	'Ext.data.*',
-	'Ext.ux.RowExpander',
-	'Ext.selection.CheckboxModel'
+    'Ext.grid.*',
+    'Ext.data.*',
+    'Ext.ux.RowExpander',
+    'Ext.selection.CheckboxModel'
 ]);
 
 var company_code;
-var myStore = null;
-var myStore1 = null;
-var myStore2 = null;
-var V_LOGINNAME = '', V_PASSWORD = '';
+var myStore=null;
+var myStore1=null;
+var myStore2=null;
+var V_LOGINNAME='',V_PASSWORD='';
 var menuidx = '';
 var mouseon;
 var mouseoff;
@@ -34,111 +34,111 @@ var panel2;
 var changeon1;
 
 var sm = Ext.create('Ext.selection.CheckboxModel');
-var addsm = Ext.create('Ext.selection.CheckboxModel', {
-	handleMouseDown: Ext.emptyFn,
-	singleSelect: false
+var addsm = Ext.create('Ext.selection.CheckboxModel',{
+	handleMouseDown : Ext.emptyFn,  
+    singleSelect : false 
 });
-var sm1 = Ext.create('Ext.selection.CheckboxModel', {
-	injectCheckbox: 1,//checkbox位于哪一列,默认值为0
-	mode: 'single',//multi,simple,single;默认为多选multi
-	//	checkOnly:true,//如果值为true,则只用点击checkbox列才能选中此条记录
-	allowDeselect: true,//如果值true,并且mode值为单选(single)时,可以通过点击checkbox取消对其的选择
-	enableKeyNav: false,
+var sm1 = Ext.create('Ext.selection.CheckboxModel',{
+	injectCheckbox:1,//checkbox位于哪一列,默认值为0
+	mode:'single',//multi,simple,single;默认为多选multi
+//	checkOnly:true,//如果值为true,则只用点击checkbox列才能选中此条记录
+	allowDeselect:true,//如果值true,并且mode值为单选(single)时,可以通过点击checkbox取消对其的选择
+	enableKeyNav:false,
 	listeners: {
-		deselect: function (model, record, index) {//取消选中时产生的事件
-		}
+	 deselect: function(model,record,index) {//取消选中时产生的事件
+	 }
 	}
 });
 
-Ext.define('MaintenancePerson', {
+Ext.define('MaintenancePerson',{
 	extend: 'Ext.data.Model',
 	fields: [
-		{ name: 'id', type: 'string' },
-		{ name: 'name', type: 'string' },
-		{ name: 'phone', type: 'string' },
-		{ name: 'zn_name', type: 'string' },
-		{ name: 'xh', type: 'int' },
+		{name:'id',  type:'string'},
+		{name:'name',  type:'string'},
+		{name:'phone',  type:'string'},
+		{name:'zn_name',  type:'string'},
+		{name:'xh',  type:'int'},
 	]
 });
-Ext.define('MaintenancePerson1', {
+Ext.define('MaintenancePerson1',{
 	extend: 'Ext.data.Model',
 	fields: [
-		{ name: 'rid', type: 'int' },
-		{ name: 'xh', type: 'int' },
-		{ name: 'name', type: 'string' },
-		{ name: 'tdid', type: 'string' },
-		{ name: 'pd', type: 'int' },
-		//		{name:'zrr',  type:'string'},
+		{name:'rid',  type:'int'},
+		{name:'xh',  type:'int'},
+		{name:'name',  type:'string'},
+		{name:'tdid',  type:'string'},
+		{name:'pd',  type:'int'},
+//		{name:'zrr',  type:'string'},
 	]
 });
 
-Ext.define('MaintenancePerson2', {
+Ext.define('MaintenancePerson2',{
 	extend: 'Ext.data.Model',
 	fields: [
-		{ name: 'id', type: 'string' },
-		{ name: 'xh', type: 'int' },
-		{ name: 'team_name', type: 'string' },
-		{ name: 'person_liable_id', type: 'string' },
-
+		{name:'id',  type:'string'},
+		{name:'xh',  type:'int'},
+		{name:'team_name',  type:'string'},
+		{name:'person_liable_id',  type:'string'},
+		
 	]
 });
 
-function exportbtn_click() {
+function exportbtn_click(){
 	baseUrl = document.getElementById('basePath').value;
 	V_LOGINNAME = $("#V_LOGINNAME").val();
 	V_PASSWORD = $("#V_PASSWORD").val();
 	name = document.getElementById('name').value;
 	zn = document.getElementById('zn').value;
-
-	//	zn_name = document.getElementById('zn_name').value;
+	
+//	zn_name = document.getElementById('zn_name').value;
 	var fields = '';
-	var array = ['id', 'xh', 'name', 'phone', 'zn_name'];
-	var excelname = ['ID', '序号', '姓名', '手机号', '职务'];
-	for (var i = 0; i < 5; i++) {
-		if (i > 0)
+	var array = ['id','xh','name','phone','zn_name'];
+	var excelname = ['ID','序号','姓名','手机号','职务'];
+	for(var i=0;i<5;i++){
+		if(i>0)
 			fields += ',';
-		fields += '{id:"' + array[i] + '",title:"' + excelname[i] + '",shown:"' + true + '"}';
+	    fields += '{id:"'+array[i]+'",title:"'+excelname[i]+'",shown:"'+true+'"}';
 	}
-	var query = new Object();
-	// query.V_LOGINNAME = V_LOGINNAME;
-	// query.V_PASSWORD = V_PASSWORD;
-	query.name = name;
-	query.zn = zn;
-	query.EXPORT_FILE = '维保人列表';
-	query.fields = '[' + fields + ']';
-	$.ajax({
-		type: 'POST',
-		url: baseUrl + "iot/excel/view/XjInspectorsExcel",
-		data: {
-			queryJson: Ext.JSON.encode(query)
-		},
-		success: function (result) {
-
-			var json = eval('(' + result + ')');
-			if (json.action == 'dormExport') {
-				ConfirmStore = json.RESULT;
-
-				var elemIF = document.createElement("iframe");
-				elemIF.src = baseUrl + json.filename;
-				elemIF.style.display = "none";
-				document.body.appendChild(elemIF);
-			}
-
-		}
-	});
-
+			var query = new Object();
+			// query.V_LOGINNAME = V_LOGINNAME;
+			// query.V_PASSWORD = V_PASSWORD;
+			query.name = name;
+			query.zn = zn;
+			query.EXPORT_FILE = '维保人列表';
+			query.fields = '['+fields+']';
+			$.ajax({
+		        type:'POST',
+		        url: baseUrl+"iot/excel/view/XjInspectorsExcel",
+		        data: {
+		        	queryJson : Ext.JSON.encode(query)
+		    	 },
+		    	 success: function(result){
+		    		
+			            var json = eval('(' + result + ')');
+			            if(json.action=='dormExport'){
+			                ConfirmStore = json.RESULT;
+			               
+			                var elemIF = document.createElement("iframe");
+							elemIF.src = baseUrl+json.filename;
+							elemIF.style.display = "none"; 
+							document.body.appendChild(elemIF);
+			            }
+			    
+			        }
+		    });
+			
 }
 
-var body_resize = function () {
-	maxHeight = document.documentElement.clientHeight;
-	maxHeight -= 34;
+var body_resize = function(){
+	maxHeight =  document.documentElement.clientHeight;
+	maxHeight-=34;
 	maxWidth = document.documentElement.clientWidth;
 	Ext.getCmp('MaintenancePersonPiebar').setHeight(maxHeight);
 	Ext.getCmp('MaintenancePersonPiebar').setWidth(maxWidth);
 }
-var body_resize1 = function () {
-	maxHeight = document.documentElement.clientHeight;
-	maxHeight -= 34;
+var body_resize1 = function(){
+	maxHeight =  document.documentElement.clientHeight;
+	maxHeight-=34;
 	maxWidth = document.documentElement.clientWidth;
 	Ext.getCmp('MaintenancePersonPiebar2').setHeight(maxHeight);
 	Ext.getCmp('MaintenancePersonPiebar2').setWidth(maxWidth);
@@ -148,193 +148,193 @@ var body_resize1 = function () {
 //	Ext.getCmp('MaintenancePersonTab').setHeight(maxHeight1);
 //}
 
-Ext.onReady(function () {
+Ext.onReady(function(){  
 	var baseUrl = document.getElementById('basePath').value;
 	var theme = document.getElementById('theme').value;
-	var chkIcon = '<img src="' + baseUrl + 'res/img/common/check.gif"/>'
-	var unchkIcon = '<img src="' + baseUrl + 'res/img/common/uncheck.gif"/>'
+	var chkIcon = '<img src="'+baseUrl+'res/img/common/check.gif"/>'
+	var unchkIcon = '<img src="'+baseUrl+'res/img/common/uncheck.gif"/>'
 	$("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
 	$("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
 	V_LOGINNAME = $("#V_LOGINNAME").val();
-	V_PASSWORD = $("#V_PASSWORD").val();
+    V_PASSWORD = $("#V_PASSWORD").val();
 	var countPerPage = 15;
 	var maxHeight = 10000;
-	//	var maxHeight1 = 10000;
-
-	var chkBoolean = function (flag) {
-		if (flag)
+//	var maxHeight1 = 10000;
+	
+	var chkBoolean = function(flag) {
+		if(flag)
 			return chkIcon;
 		return unchkIcon;
 	}
-
+	
 	var queryJson = new Object();
 	queryJson.V_LOGINNAME = V_LOGINNAME;
-	queryJson.V_PASSWORD = V_PASSWORD;
-	//	queryJson.COMMSTATUS = 'NO';
-	if ((company_code != null) && (company_code != 'null') && (company_code.length > 0))
-		queryJson.company_code = company_code;
-
-	var clear_append_form1 = function () {
+	queryJson.V_PASSWORD =  V_PASSWORD;
+//	queryJson.COMMSTATUS = 'NO';
+	if((company_code!=null)&&(company_code!='null')&&(company_code.length>0))
+		queryJson.company_code = company_code;	
+	
+	var clear_append_form1 = function (){
 		Ext.getCmp('fa_team_name').setValue("");
 		Ext.getCmp('fa_person_liable_id').setValue("");
 		Ext.getCmp('MaintenancePersonListPageToolbar2').moveFirst();
 	}
-
+	
 	myStore = Ext.create('Ext.data.Store', {
-		model: 'MaintenancePerson',
-		pageSize: countPerPage,
-		proxy: {
-			type: 'ajax',
-			actionMethods: {
-				create: 'POST',
-				read: 'POST', // by default GET
-				update: 'POST',
-				destroy: 'POST'
-			},
-			url: baseUrl + 'iot/inspectorsx/getList',
-			reader: {
-				type: 'json',
-				root: 'RESULT',
-				totalProperty: 'totalCount'
-			},
-			extraParams: {
-				queryJson: Ext.JSON.encode(queryJson)
-			}
-		},
-		remoteSort: true
+	    model: 'MaintenancePerson',
+	    pageSize: countPerPage, 
+	    proxy: {
+	        type: 'ajax',
+	        actionMethods: {
+                create : 'POST',
+                read   : 'POST', // by default GET
+                update : 'POST',
+                destroy: 'POST'
+	        },
+	        url: baseUrl+'iot/inspectorsx/getList',
+	        reader: {
+	            type: 'json',
+	            root: 'RESULT',
+	            totalProperty: 'totalCount'
+	        },
+	        extraParams:{
+	        	queryJson:Ext.JSON.encode(queryJson)
+	        }
+	    },
+	    remoteSort: true
 	});
-
+	
 	myStore2 = Ext.create('Ext.data.Store', {
-		model: 'MaintenancePerson2',
-		pageSize: countPerPage,
-		proxy: {
-			type: 'ajax',
-			actionMethods: {
-				create: 'POST',
-				read: 'POST', // by default GET
-				update: 'POST',
-				destroy: 'POST'
-			},
-			url: baseUrl + 'iot/planteam/getList',
-			reader: {
-				type: 'json',
-				root: 'RESULT',
-				totalProperty: 'totalCount'
-			},
-			extraParams: {
-				queryJson: Ext.JSON.encode(queryJson)
-			}
-		},
-		//	    sorters:[{
-		//	    	property:'data_time',
-		//	    	direction:'DESC'
-		//	    }],
-		remoteSort: true
+	    model: 'MaintenancePerson2',
+	    pageSize: countPerPage, 
+	    proxy: {
+	        type: 'ajax',
+	        actionMethods: {
+                create : 'POST',
+                read   : 'POST', // by default GET
+                update : 'POST',
+                destroy: 'POST'
+	        },
+	        url: baseUrl+'iot/planteam/getList',
+	        reader: {
+	            type: 'json',
+	            root: 'RESULT',
+	            totalProperty: 'totalCount'
+	        },
+	        extraParams:{
+	        	queryJson:Ext.JSON.encode(queryJson)
+	        }
+	    },
+//	    sorters:[{
+//	    	property:'data_time',
+//	    	direction:'DESC'
+//	    }],
+	    remoteSort: true
 	});
-
-	var mystore2_fun = function (id) {
-		if (id == 0) {
-			myStore2.on('load', function (myStore2, record) {
-				for (var i = 0; i < record.length; i++) {
-					var records = record[i];
-					if (records.get('xh') == 1) {
-						Ext.getCmp('MaintenancePersonListPanel2').getSelectionModel().select(records, true);
-					}
-				};
-			});
-		} else {
-			myStore2.reload();
-			myStore2.on('load', function (myStore2, record) {
-				for (var i = 0; i < record.length; i++) {
-					var records = record[i];
-					if (records.get('id') == id) {
-						Ext.getCmp('MaintenancePersonListPanel2').getSelectionModel().select(records, true);
-					}
-				};
-			});
-		}
-	}
-
+	
+	var mystore2_fun = function(id){
+		  if(id== 0){
+		   myStore2.on('load',function(myStore2, record){
+		    for (var i = 0; i < record.length; i++) { 
+		     var records = record[i]; 
+		     if (records.get('xh') == 1) {
+		      Ext.getCmp('MaintenancePersonListPanel2').getSelectionModel().select(records, true);
+		     }
+		    };
+		      });
+		  }else{
+		   myStore2.reload();
+		   myStore2.on('load',function(myStore2, record){
+		    for (var i = 0; i < record.length; i++) { 
+		     var records = record[i]; 
+		     if (records.get('id') == id) {
+		      Ext.getCmp('MaintenancePersonListPanel2').getSelectionModel().select(records, true);
+		     }
+		    };
+		      });
+		  }
+		 }
+	
 	myStore1 = Ext.create('Ext.data.Store', {
-		model: 'MaintenancePerson1',
-		pageSize: countPerPage,
-		proxy: {
-			type: 'ajax',
-			actionMethods: {
-				create: 'POST',
-				read: 'POST', // by default GET
-				update: 'POST',
-				destroy: 'POST'
-			},
-			url: baseUrl + 'iot/inspectorsx/getTeamMembersList',
-			reader: {
-				type: 'json',
-				root: 'RESULT',
-				totalProperty: 'totalCount'
-			},
-			extraParams: {
-				queryJson: Ext.JSON.encode(queryJson)
-			}
-		},
-		//	    sorters:[{
-		//	    	property:'data_time',
-		//	    	direction:'DESC'
-		//	    }],
-		remoteSort: true
+	    model: 'MaintenancePerson1',
+	    pageSize: countPerPage, 
+	    proxy: {
+	        type: 'ajax',
+	        actionMethods: {
+                create : 'POST',
+                read   : 'POST', // by default GET
+                update : 'POST',
+                destroy: 'POST'
+	        },
+	        url: baseUrl+'iot/inspectorsx/getTeamMembersList',
+	        reader: {
+	            type: 'json',
+	            root: 'RESULT',
+	            totalProperty: 'totalCount'
+	        },
+	        extraParams:{
+	        	queryJson:Ext.JSON.encode(queryJson)
+	        }
+	    },
+//	    sorters:[{
+//	    	property:'data_time',
+//	    	direction:'DESC'
+//	    }],
+	    remoteSort: true
 	});
-
-	myStore1.on('load', function (myStore1, record) {
-		//		var index = myStore1.find('pd',1);
-		//		Ext.getCmp('MaintenancePersonListPanel3').getSelectionModel().select(index);
-		for (var i = 0; i < record.length; i++) {
-			var records = record[i];
-			if (records.get('pd') == 1) {
-				Ext.getCmp('MaintenancePersonListPanel3').getSelectionModel().select(records, true);
-			}
-		};
+	
+	myStore1.on('load',function(myStore1, record){
+//		var index = myStore1.find('pd',1);
+//		Ext.getCmp('MaintenancePersonListPanel3').getSelectionModel().select(index);
+		for (var i = 0; i < record.length; i++) { 
+		    var records = record[i]; 
+		    if (records.get('pd') == 1) {
+		     Ext.getCmp('MaintenancePersonListPanel3').getSelectionModel().select(records, true);
+		     }
+		   };
 	});
-
-	//	myStore1.addListener('load',function(){  
-	//		   var records=[];//存放选中记录  
-	//		   for(var i=0;i<myStore1.getCount();i++){  
-	//		    var record = myStore1.getAt(i);  
-	//		    if(record.data.id==7){//根据后台数据判断那些记录默认选中  
-	//		     records.push(record);  
-	//		    }  
-	//		   }  
-	//		   sm.selectRecords(records);//执行选中记录  
-	//    });
-
-	Ext.define('getJobDutiesStore1', {
-		extend: 'Ext.data.Model',
+	
+//	myStore1.addListener('load',function(){  
+//		   var records=[];//存放选中记录  
+//		   for(var i=0;i<myStore1.getCount();i++){  
+//		    var record = myStore1.getAt(i);  
+//		    if(record.data.id==7){//根据后台数据判断那些记录默认选中  
+//		     records.push(record);  
+//		    }  
+//		   }  
+//		   sm.selectRecords(records);//执行选中记录  
+//    });
+	
+	Ext.define('getJobDutiesStore1',{
+		extend:'Ext.data.Model',
 		fields: [
-			{ name: 'name', type: 'string' },
-			{ name: 'rid', type: 'int' }
+			{name:'name',  type:'string'},
+			{name:'rid',type:'int'}
 		]
 	});
 
-	var getJobDutiesStore1 = Ext.create('Ext.data.Store', {
+	var getJobDutiesStore1 = Ext.create('Ext.data.Store',{
 		model: 'getJobDutiesStore1',
-		proxy: {
-			type: 'ajax',
-			actionMethods: {
-				create: 'POST',
-				read: 'POST', // by default GET
-				update: 'POST',
-				destroy: 'POST'
-			},
-			url: baseUrl + 'iot/inspectorsx/getTeamMembersList1',
-			reader: {
-				type: 'json',
-				root: 'RESULT',
-				totalProperty: 'totalCount'
-			},
-			extraParams: {
-				queryJson: Ext.JSON.encode(queryJson)
-			}
-		}
+	    proxy: {
+	        type: 'ajax',
+	        actionMethods: {
+                create : 'POST',
+                read   : 'POST', // by default GET
+                update : 'POST',
+                destroy: 'POST'
+	        },
+	        url: baseUrl+'iot/inspectorsx/getTeamMembersList1',
+	        reader: {
+	            type: 'json',
+	            root: 'RESULT',
+	            totalProperty: 'totalCount'
+	        },
+	        extraParams:{
+	        	queryJson:Ext.JSON.encode(queryJson)
+	        }
+	    }
 	});
-
+	
 	function public_phone(e) {
 		if (!(/^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/.test(e))) {
 			Ext.Msg.alert('提示', '不是完整的11位手机号或者正确的手机号前七位!', function (btn, txt) {
@@ -348,16 +348,16 @@ Ext.onReady(function () {
 	var AppendForm = Ext.create('Ext.form.Panel', {
 		id: 'MaintenancePersonAppendForm',
 		labelWidth: 55,
-		url: baseUrl + 'iot/inspectorsx/append',
+		url: baseUrl+'iot/inspectorsx/append',
 		defaultType: 'textfield',
 		bodyPadding: 15,
 		items: [{
-			fieldLabel: '人员姓名',
+			fieldLabel:'人员姓名',
 			id: 'fa_name',
-			name: 'name',
-			maxLength: 20,
-			maxLengthText: '长度不得超出{0}',
-			anchor: '75%',
+			name:'name',
+			maxLength:20,
+			maxLengthText:'长度不得超出{0}',
+			anchor:'75%',
 			listeners: {
 				change: function (o, e) {
 					if (e.length > 10) {
@@ -368,13 +368,13 @@ Ext.onReady(function () {
 					}
 				}
 			}
-		}, {
-			fieldLabel: '电话号码',
+		},{
+			fieldLabel:'电话号码',
 			id: 'fa_phone',
 			name: 'phone',
 			maxLength: 250,
-			maxLengthText: '长度不得超出{0}',
-			anchor: '75%',
+			maxLengthText:'长度不得超出{0}',
+			anchor:'75%',
 			listeners: {
 				change: function (o, e) {
 					if (e.length == 11) {
@@ -385,1311 +385,1277 @@ Ext.onReady(function () {
 					}
 				}
 			}
-		}, {
-			xtype: 'checkboxgroup',
-			fieldLabel: '人员职能',
-			id: "fa_maintenancePerson_inspectiontime",
-			columns: 3,
-			items: [
-				{ boxLabel: '维保', name: 'maintenance', inputValue: "1" },
-				{ boxLabel: '巡检', name: 'inspection', inputValue: "2" },
-				{ boxLabel: '报修', name: 'event_processing', inputValue: "4" }
-
-			]
-		}, {
-			id: 'fa_queryJson',
-			name: 'queryJson',
-			hidden: true
-		}],
-		buttons: [{
-			text: '提交',
-			iconCls: 'ok_btn',
-			handler: function () {
-				var form = this.up('form').getForm();
-				if (form.isValid()) {
-					var InspectiontimeValue = Ext.getCmp('fa_maintenancePerson_inspectiontime').getChecked();
-					var Inspectiontime = 0;
-					Ext.Array.each(InspectiontimeValue, function (item) {
-						Inspectiontime += parseInt(item.inputValue);
-					});
-					var query = new Object();
-					// query.V_LOGINNAME = V_LOGINNAME;
-					query.name = Ext.getCmp('fa_name').getValue();
-					if (query.name == null || query.name == "") {
-						Ext.Msg.alert('系统提示', '人员姓名不能为空!');
-						return;
-					}
-					query.phone = Ext.getCmp('fa_phone').getValue();
-					if (query.phone == null || query.phone == "") {
-						Ext.Msg.alert('系统提示', '电话号码不能为空!');
-						return;
-					} else if (query.phone.length < 11) {
-						Ext.Msg.alert('系统提示', '请输入正确的电话号码!');
-						return;
-					}
-					query.zn = Inspectiontime;
-					if (query.zn == 0) {
-						Ext.Msg.alert('系统提示', '职能至少选择一项!');
-						return
-					}
-					var jsonstr = Ext.JSON.encode(query);
-					Ext.getCmp('fa_queryJson').setValue(jsonstr);
-					form.submit({
-						method: 'post',
-						success: function (form, action) {
-							Ext.Msg.alert('操作成功', '已保存', function (btn, txt) {
-								Ext.getCmp('MaintenancePersonAppendForm').getForm().reset();
-								Ext.getCmp('MaintenancePersonListPageToolbar').moveFirst();
-							});
-						},
-						failure: function (form, action) {
-							Ext.Msg.alert('操作失败', action.Msg, function (btn, txt) {
-							});
-						}
-					});
-				}
-			}
-		}, {
-			text: '关闭',
-			iconCls: 'cancel_btn',
-			handler: function () {
-				this.up('window').hide();
-			}
-		}]
-	});
-
-	var appendwin = function () {
+		},{
+		   xtype: 'checkboxgroup',
+           fieldLabel: '人员职能',
+           id:"fa_maintenancePerson_inspectiontime",
+           columns: 3,
+           items: [
+              {boxLabel: '维保', name: 'maintenance',inputValue:"1"},
+              {boxLabel: '巡检', name: 'inspection',inputValue:"2"},
+              {boxLabel: '报修', name: 'event_processing',inputValue:"4"}
+            
+       ]},{
+    	   id:'fa_queryJson',
+    	   name:'queryJson',
+    	   hidden:true
+       }],
+       buttons: [{
+        text: '提交',
+        iconCls:'ok_btn',
+        handler: function() {
+        	var form = this.up('form').getForm();
+        	if (form.isValid()) {
+        		var InspectiontimeValue = Ext.getCmp('fa_maintenancePerson_inspectiontime').getChecked();
+        		var Inspectiontime=0;
+        		Ext.Array.each(InspectiontimeValue, function(item){
+        			Inspectiontime +=parseInt(item.inputValue);
+                });
+        		var query = new Object();
+        		// query.V_LOGINNAME = V_LOGINNAME;
+        		query.zn=Inspectiontime;
+        		query.name = Ext.getCmp('fa_name').getValue();
+        		query.phone = Ext.getCmp('fa_phone').getValue();
+            var jsonstr = Ext.JSON.encode(query);
+            Ext.getCmp('fa_queryJson').setValue(jsonstr);
+             form.submit({
+              method:'post',
+                 success: function(form, action) {
+                    Ext.Msg.alert('操作成功', '已保存', function(btn,txt){
+                    	Ext.getCmp('MaintenancePersonAppendForm').getForm().reset();
+                    	Ext.getCmp('MaintenancePersonListPageToolbar').moveFirst();
+                    });
+                 },
+                 failure: function(form, action) {
+                    Ext.Msg.alert('操作失败', action.Msg , function(btn,txt){
+                    });
+                 }
+             });
+           }
+        }
+     },{
+      text: '关闭',
+      iconCls: 'cancel_btn',
+      handler: function() {
+       this.up('window').hide();
+      }
+     }]
+    });
+	
+	var appendwin = function(){
 		Ext.create('Ext.window.Window', {
-			title: '新增',
-			height: 350,
-			width: 400,
-			modal: true,
-			layout: 'fit',
-			items: AppendForm,
-			closeAction: 'hide'
+		    title: '新增',
+		    height: 350,
+		    width: 400,
+		    modal: true,
+		    layout: 'fit',
+		    items:  AppendForm,
+		    closeAction: 'hide'
 		}).show();
 	}
-
-	Ext.define('getJobDutiesStore', {
-		extend: 'Ext.data.Model',
+	
+	Ext.define('getJobDutiesStore',{
+		extend:'Ext.data.Model',
 		fields: [
-			{ name: 'owner_name', type: 'string' },
-			{ name: 'owner_id', type: 'string' }
+			{name:'owner_name',  type:'string'},
+			{name:'owner_id',type:'string'}
 		]
 	});
 
-	var getJobDutiesStore = Ext.create('Ext.data.Store', {
+	var getJobDutiesStore = Ext.create('Ext.data.Store',{
 		model: 'getJobDutiesStore',
-		proxy: {
-			type: 'ajax',
-			actionMethods: {
-				create: 'POST',
-				read: 'POST', // by default GET
-				update: 'POST',
-				destroy: 'POST'
-			},
-			url: baseUrl + 'iot/company/view/getNameList',
-			reader: {
-				type: 'json',
-				root: 'RESULT',
-				totalProperty: 'totalCount'
-			},
-			extraParams: {
-				queryJson: Ext.JSON.encode(queryJson)
-			}
-		}
+	    proxy: {
+	        type: 'ajax',
+	        actionMethods: {
+                create : 'POST',
+                read   : 'POST', // by default GET
+                update : 'POST',
+                destroy: 'POST'
+	        },
+	        url: baseUrl+'iot/company/view/getNameList',
+	        reader: {
+	            type: 'json',
+	            root: 'RESULT',
+	            totalProperty: 'totalCount'
+	        },
+	        extraParams:{
+	        	queryJson:Ext.JSON.encode(queryJson)
+	        }
+	    }
 	});
-
+	
 	var AppendForm1 = Ext.create('Ext.form.Panel', {
 		id: 'MaintenancePersonAppendForm1',
 		labelWidth: 55,
-		url: baseUrl + 'iot/planteam/append',
+		url: baseUrl+'iot/planteam/append',
 		defaultType: 'textfield',
 		bodyPadding: 15,
 		items: [{
-			fieldLabel: '班组名称',
+			fieldLabel:'班组名称',
 			id: 'fa_team_name',
-			name: 'team_name',
-			maxLength: 20,
-			maxLengthText: '长度不得超出{0}',
-			anchor: '75%'
-		}, {
-			fieldLabel: '负责人',
+			name:'team_name',
+			maxLength:20,
+			maxLengthText:'长度不得超出{0}',
+			anchor:'75%'
+		},{
+			fieldLabel:'负责人',
 			id: 'fa_person_liable_id',
-			name: 'person_liable_id',
-			xtype: 'combo',
-			store: getJobDutiesStore1,
-			displayField: 'name',
-			valueField: 'rid',
-			editable: false,
-			anchor: '75%'
-		}, {
-			id: 'fa_queryJson1',
-			name: 'queryJson',
-			hidden: true
+			name:'person_liable_id',
+			xtype:'combo',
+			store:getJobDutiesStore1,
+			displayField : 'name',  
+	        valueField : 'rid',
+	        editable : false,
+			anchor:'75%'
+		},{
+			id:'fa_queryJson1',
+			name:'queryJson',
+			hidden:true
 		}],
 		buttons: [{
-			text: '提交',
-			iconCls: 'ok_btn',
-			handler: function () {
-				var form = this.up('form').getForm();
-				if (form.isValid()) {
-					var query = new Object();
-					// query.V_LOGINNAME = $("#V_LOGINNAME").val();
-					query.team_name = Ext.getCmp('fa_team_name').getValue();
-					query.person_liable_id = Ext.getCmp('fa_person_liable_id').getValue();
-					var jsonstr = Ext.JSON.encode(query);
-					Ext.getCmp('fa_queryJson1').setValue(jsonstr);
-					form.submit({
-						method: 'post',
-						success: function (form, action) {
-							Ext.Msg.alert('操作成功', '已保存', function (btn, txt) {
-								clear_append_form1();
-							});
-						},
-						failure: function (form, action) {
-							Ext.Msg.alert('操作失败', action.Msg, function (btn, txt) {
-								clear_append_form1();
-							});
-						}
-					});
-				}
-			}
-		}, {
+	        text: '提交',
+	        iconCls:'ok_btn',
+		    handler: function() {
+		        var form = this.up('form').getForm();
+		        if (form.isValid()) {
+		        	var query = new Object();
+		        	// query.V_LOGINNAME = $("#V_LOGINNAME").val();
+		        	query.team_name = Ext.getCmp('fa_team_name').getValue();
+		        	query.person_liable_id = Ext.getCmp('fa_person_liable_id').getValue();
+		        	var jsonstr = Ext.JSON.encode(query);
+		        	Ext.getCmp('fa_queryJson1').setValue(jsonstr);
+		            form.submit({
+		            	method:'post',
+		                success: function(form, action) {
+		                   Ext.Msg.alert('操作成功', '已保存', function(btn,txt){
+		                	   clear_append_form1();
+		                   });
+		                },
+		                failure: function(form, action) {
+		                   Ext.Msg.alert('操作失败', action.Msg , function(btn,txt){
+		                	   clear_append_form1();
+		                   });
+		                }
+		            });
+		        }
+		    }
+		},{
 			text: '关闭',
 			iconCls: 'cancel_btn',
-			handler: function () {
+			handler: function() {
 				this.up('window').hide();
 			}
 		}]
 	});
-
-	var appendwin1 = function () {
+	
+	var appendwin1 = function(){
 		Ext.create('Ext.window.Window', {
-			title: '新增',
-			height: 350,
-			modal: true,
-			width: 400,
-			layout: 'fit',
-			items: AppendForm1,
-			closeAction: 'hide'
+		    title: '新增',
+		    height: 350,
+		    modal: true,
+		    width: 400,
+		    layout: 'fit',
+		    items:  AppendForm1,
+		    closeAction: 'hide'
 		}).show();
 	}
-
-
+	
+	
 	var ModifyForm = Ext.create('Ext.form.Panel', {
 		id: 'MaintenancePersonEditForm',
 		labelWidth: 55,
-		url: baseUrl + 'iot/inspectorsx/update',
+		url: baseUrl+'iot/inspectorsx/update',
 		defaultType: 'textfield',
 		bodyPadding: 15,
 		items: [{
-			fieldLabel: '人员姓名',
-			id: 'fm_name',
-			name: 'name',
-			maxLength: 20,
-			maxLengthText: '长度不得超出{0}',
-			anchor: '75%',
-			listeners: {
-				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '人员姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('fa_name').setValue('');
-						});
-						return false;
-					}
-				}
-			}
-		}, {
-			fieldLabel: '电话号码',
-			id: 'fm_phone',
-			name: 'phone',
-			maxLength: 250,
-			maxLengthText: '长度不得超出{0}',
-			anchor: '75%',
-			listeners: {
-				change: function (o, e) {
-					if (e.length == 11) {
-						public_phone(e);
-					} else {
-						Ext.getCmp('fm_phone').setValue(e.substring(0, 11));
-						e.length == 11 ? public_phone(e) : ''
+				fieldLabel:'人员姓名',
+				id: 'fm_name',
+				name:'name',
+				maxLength:20,
+				maxLengthText:'长度不得超出{0}',
+				anchor:'75%',
+				listeners: {
+					change: function (o, e) {
+						if (e.length > 20) {
+							Ext.getCmp('fa_Inspectors_name').setValue(e.substring(0, 20));
+							return;
+						}
 					}
 				}
-			}
-		}, {
-			xtype: 'checkboxgroup',
-			fieldLabel: '人员职能',
-			id: "fm_maintenancePerson_inspectiontime",
-			columns: 3,
-			items: [
-				{ boxLabel: '维保', name: 'maintenance', inputValue: "1", id: 'maintenance' },
-				{ boxLabel: '巡检', name: 'inspection', inputValue: "2", id: 'inspection' },
-				{ boxLabel: '报修', name: 'event_processing', inputValue: "4", id: 'event_processing' }
-
-			]
-		}, {
-			id: 'fm_id',
-			name: 'id',
-			hidden: true
-		}, {
-			id: 'fm_queryJson',
-			name: 'queryJson',
-			hidden: true
-		}],
-		buttons: [{
-			text: '修改',
-			iconCls: 'ok_btn',
-			handler: function () {
-				var form = this.up('form').getForm();
-				if (form.isValid()) {
-					var InspectiontimeValue = Ext.getCmp('fm_maintenancePerson_inspectiontime').getChecked();
-					var Inspectiontime = 0;
-					Ext.Array.each(InspectiontimeValue, function (item) {
-						Inspectiontime += parseInt(item.inputValue);
-					});
-					var query = new Object();
-					query.id = Ext.getCmp('fm_id').getValue();
-					query.name = Ext.getCmp('fm_name').getValue();
-					if (query.name == null || query.name == "") {
-						Ext.Msg.alert('系统提示', '人员姓名不能为空!');
-						return;
-					}
-					query.phone = Ext.getCmp('fm_phone').getValue();
-					if (query.phone == null || query.phone == "") {
-						Ext.Msg.alert('系统提示', '电话号码不能为空!');
-						return;
-					} else if (query.phone.length < 11) {
-						Ext.Msg.alert('系统提示', '请输入正确的电话号码!');
-						return;
-					}
-					query.zn = Inspectiontime;
-					if (query.zn == 0) {
-						Ext.Msg.alert('系统提示', '职能至少选择一项!');
-						return
-					}
-					var jsonstr = Ext.JSON.encode(query);
-					Ext.getCmp('fm_queryJson').setValue(jsonstr);
-					form.submit({
-						method: 'post',
-						success: function (form, action) {
-							Ext.Msg.alert('操作成功', '已修改', function (btn, txt) {
-								Ext.getCmp('MaintenancePersonEditForm').getForm().reset();
-								Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
-							});
-						},
-						failure: function (form, action) {
-							Ext.Msg.alert('操作失败', action.Msg, function (btn, txt) {
-								Ext.getCmp('MaintenancePersonEditForm').getForm().reset();
-								Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
-							});
+			},{
+				fieldLabel:'电话号码',
+				id: 'fm_phone',
+				name: 'phone',
+				maxLength: 250,
+				maxLengthText:'长度不得超出{0}',
+				anchor:'75%',
+				listeners: {
+					change: function (o, e) {
+						if (e.length == 11) {
+							public_phone(e);
+						} else {
+							Ext.getCmp('fm_phone').setValue(e.substring(0, 11));
+							e.length == 11 ? public_phone(e) : ''
 						}
-					});
-					this.up('window').hide();
+					}
 				}
-			}
-		}, {
+			},{
+			    xtype: 'checkboxgroup',
+			    fieldLabel: '人员职能',
+			    id:"fm_maintenancePerson_inspectiontime",
+			    columns: 3,
+			    items: [
+			            {boxLabel: '维保', name: 'maintenance',inputValue:"1",id:'maintenance'},
+			            {boxLabel: '巡检', name: 'inspection',inputValue:"2",id:'inspection'},
+			            {boxLabel: '报修', name: 'event_processing',inputValue:"4",id:'event_processing'}
+			              
+			]},{
+			   id: 'fm_id',
+			   name:'id',
+			   hidden:true
+			},{
+			   id:'fm_queryJson',
+			   name:'queryJson',
+			   hidden:true
+			  }],
+			  buttons: [{
+			         text: '修改',
+			         iconCls:'ok_btn',
+			      handler: function() {
+			       var form = this.up('form').getForm();
+			          if (form.isValid()) {
+			           var InspectiontimeValue = Ext.getCmp('fm_maintenancePerson_inspectiontime').getChecked();
+			           var Inspectiontime=0;
+			           Ext.Array.each(InspectiontimeValue, function(item){
+			            Inspectiontime +=parseInt(item.inputValue);
+			           });
+			           var query = new Object();
+			           query.zn=Inspectiontime;
+			           query.id = Ext.getCmp('fm_id').getValue();
+			           query.name = Ext.getCmp('fm_name').getValue();
+			           query.phone = Ext.getCmp('fm_phone').getValue();
+			           var jsonstr = Ext.JSON.encode(query);
+			           Ext.getCmp('fm_queryJson').setValue(jsonstr);
+		               form.submit({
+		            	method:'post',
+		                success: function(form, action) {
+		                   Ext.Msg.alert('操作成功', '已修改', function(btn,txt){
+		                	   Ext.getCmp('MaintenancePersonEditForm').getForm().reset();
+		                	   Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
+		                   });
+		                },
+		                failure: function(form, action) {
+		                   Ext.Msg.alert('操作失败', action.Msg , function(btn,txt){
+		                	   Ext.getCmp('MaintenancePersonEditForm').getForm().reset();
+		                	   Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
+		                   });
+		                }
+		               });
+		            this.up('window').hide();
+		        }
+		    }
+		},{
 			text: '关闭',
 			iconCls: 'cancel_btn',
-			handler: function () {
+			handler: function() {
 				this.up('window').hide();
 				Ext.getCmp('MaintenancePersonEditForm').getForm().reset();
 				Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
 			}
 		}]
 	});
-
-	var modifywin = function () {
+	
+	var modifywin = function(){
 		Ext.create('Ext.window.Window', {
-			title: '修改',
-			height: 350,
-			width: 400,
-			modal: true,
-			layout: 'fit',
-			items: ModifyForm,
-			closeAction: 'hide'
+		    title: '修改',
+		    height: 350,
+		    width: 400,
+		    modal: true,
+		    layout: 'fit',
+		    items:  ModifyForm,
+		    closeAction: 'hide'
 		}).show();
 	}
-
-	var chk_sm = function () {
-		if (sm.getCount() == 1) {
-			modifywin();
-			var selected = sm.getSelection();
-			var fm_inspectiontime = selected[0].raw.zn
-			if (fm_inspectiontime == '1') {
-				var domainArr = ['1'];
-			} else if (fm_inspectiontime == '2') {
-				var domainArr = ['2'];
-			} else if (fm_inspectiontime == '3') {
-				var domainArr = ['1', '2'];
-			} else if (fm_inspectiontime == '4') {
-				var domainArr = ['4'];
-			} else if (fm_inspectiontime == '5') {
-				var domainArr = ['1', '4'];
-			} else if (fm_inspectiontime == '6') {
-				var domainArr = ['2', '4'];
-			} else if (fm_inspectiontime == '7') {
-				var domainArr = ['1', '2', '4'];
-			}
-			for (var i = 0; i < domainArr.length; i++) {
-				switch (domainArr[i]) {
-					case "1":
-						Ext.getCmp('maintenance').setValue(true);
-						break;
-					case "2":
-						Ext.getCmp('inspection').setValue(true);
-						break;
-					case "4":
-						Ext.getCmp('event_processing').setValue(true);
-						break;
-				}
-			}
-			Ext.getCmp('fm_id').setValue(selected[0].raw.id);
-			Ext.getCmp('fm_name').setValue(selected[0].raw.name);
-			Ext.getCmp('fm_phone').setValue(selected[0].raw.phone);
-		} else {
-			Ext.Msg.alert('请先选择', '请先选择一条记录,再点击修改');
-		}
-	}
-
-	var del_sm = function () {
-		if (sm.getCount() == 1) {
-			var selected = sm.getSelection();
+		
+	var chk_sm = function() {
+		  if(sm.getCount()==1){
+		   modifywin();
+		   var selected = sm.getSelection();
+		   var fm_inspectiontime = selected[0].raw.zn
+		   if(fm_inspectiontime=='1'){
+		    var domainArr = ['1'];
+		   }else if(fm_inspectiontime=='2'){
+		    var domainArr = ['2'];
+		   }else if(fm_inspectiontime=='3'){
+		    var domainArr = ['1','2'];
+		   }else if(fm_inspectiontime=='4'){
+		    var domainArr = ['4'];
+		   }else if(fm_inspectiontime=='5'){
+		    var domainArr = ['1','4'];
+		   }else if(fm_inspectiontime=='6'){
+		    var domainArr = ['2','4'];
+		   }else if(fm_inspectiontime=='7'){
+		    var domainArr = ['1','2','4'];
+		   }
+		   for(var i = 0 ;i < domainArr.length;i++) {
+		    switch(domainArr[i]) {
+		    case "1":
+		     Ext.getCmp('maintenance').setValue(true);
+		     break; 
+		       case "2":
+		        Ext.getCmp('inspection').setValue(true);
+		        break; 
+		       case "4":
+		        Ext.getCmp('event_processing').setValue(true);
+		        break; 
+		    }
+		   }
+		   Ext.getCmp('fm_id').setValue(selected[0].raw.id);
+		   Ext.getCmp('fm_name').setValue(selected[0].raw.name);
+		   Ext.getCmp('fm_phone').setValue(selected[0].raw.phone);
+		  }else{
+		   Ext.Msg.alert('请先选择','请先选择一条记录,再点击修改');
+		  }
+		 }
+	
+	var del_sm = function() {
+		if(sm.getCount()==1){
+			var selected = sm.getSelection( );
 			var query = new Object();
 			var list = new Array();
 			var o = new Object();
 			o.id = selected[0].raw.id;
 			list.push(o);
 			query.ID_LIST = list;
-			var jsonstr = Ext.JSON.encode(query);
-			Ext.MessageBox.confirm('删除人员信息', '是否删除' + selected[0].raw.name + ' 维保人员?', function (btn) {
-				if (btn == 'yes') {
-
+			var jsonstr= Ext.JSON.encode(query);
+			Ext.MessageBox.confirm('删除人员信息','是否删除'+selected[0].raw.name+' 维保人员?',function(btn){
+				if(btn=='yes'){
+					
 					$.ajax({
-						type: 'POST',
-						url: baseUrl + "iot/inspectorsx/del",
-						data: {
-							queryJson: jsonstr
-
-						},
-						success: function (result) {
-
-							var json = eval('(' + result + ')');
-							if (json.action == 'deleteInspectors') {
-
-								if (json.success == true) {
-									Ext.Msg.alert('操作成功', json.MSG, function (btn, txt) {
-										Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
-									});
-								} else {
-									Ext.Msg.alert('操作失败', json.MSG, function (btn, txt) {
-										Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
-									});
-								}
-							}
-
-						}
-					});
-
+			             type:'POST',
+			             url: baseUrl+"iot/inspectorsx/del",
+			             data: {
+			              queryJson : jsonstr
+			            
+			           },
+			           success: function(result){
+			             
+			             var json = eval('(' + result + ')');
+			                 if(json.action=='deleteInspectors'){
+			         
+			                  if(json.success==true){
+			                       Ext.Msg.alert('操作成功', json.MSG , function(btn,txt){
+			                	      Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
+			                       }); 
+			                	 }else{
+			                		 Ext.Msg.alert('操作失败', json.MSG , function(btn,txt){
+				                	      Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
+				                      }); 
+			                	 }
+			                 }
+			             
+			            }
+			     });
+				
 				}
-			}, this);
-		} else {
-			if (sm.getCount() > 1) {
+			},this);
+		}else{
+			if(sm.getCount()>1){
 				var query = new Object();
 				var list = new Array();
-				for (var i = 0; i < sm.getCount(); i++) {
-					var selected = sm.getSelection();
+				for(var i=0;i<sm.getCount();i++){
+					var selected = sm.getSelection( );
 					var o = new Object();
 					o.id = selected[i].raw.id;
 					list.push(o);
 				}
 				query.ID_LIST = list;
-
-				var jsonstr = Ext.JSON.encode(query);
-				Ext.MessageBox.confirm('删除人员信息', '是否删除选中的' + sm.getCount() + ' 个维保人员?', function (btn) {
-					if (btn == 'yes') {
-
-						//					Ext.Ajax.request( { 
-						//					        timeout : 3000000, 
-						//					        url: baseUrl+'iot/inspectorsx/del',
-						//					        params : 'queryJson='+ jsonstr, 
-						//					        success: function(resp,opts){
-						//					        	myStore.reload();
-						//					        }
-						//					});
+				
+				var jsonstr= Ext.JSON.encode(query);
+				Ext.MessageBox.confirm('删除人员信息','是否删除选中的'+sm.getCount()+' 个维保人员?',function(btn){
+					if(btn=='yes'){
+						
+//					Ext.Ajax.request( { 
+//					        timeout : 3000000, 
+//					        url: baseUrl+'iot/inspectorsx/del',
+//					        params : 'queryJson='+ jsonstr, 
+//					        success: function(resp,opts){
+//					        	myStore.reload();
+//					        }
+//					});
 						$.ajax({
-							type: 'POST',
-							url: baseUrl + "iot/inspectorsx/del",
-							data: {
-								queryJson: jsonstr
-
-							},
-							success: function (result) {
-
-								var json = eval('(' + result + ')');
-								if (json.action == 'deleteInspectors') {
-									if (json.success == true) {
-										Ext.Msg.alert('操作成功', json.MSG, function (btn, txt) {
-											Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
-										});
-									} else {
-										Ext.Msg.alert('操作失败', json.MSG, function (btn, txt) {
-											Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
-										});
-									}
-								}
-
-							}
-						});
-
+				             type:'POST',
+				             url: baseUrl+"iot/inspectorsx/del",
+				             data: {
+				              queryJson : jsonstr
+				            
+				           },
+				           success: function(result){
+				             
+				             var json = eval('(' + result + ')');
+				                 if(json.action=='deleteInspectors'){
+				                	 if(json.success==true){
+					                       Ext.Msg.alert('操作成功', json.MSG , function(btn,txt){
+					                	      Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
+					                       }); 
+					                	 }else{
+					                		 Ext.Msg.alert('操作失败', json.MSG , function(btn,txt){
+						                	      Ext.getCmp('MaintenancePersonListPanel').getStore().reload();
+						                      }); 
+					                	 } 
+				                 }
+				             
+				            }
+				     });
+					
 					}
-				}, this);
-			} else {
-				Ext.Msg.alert('请先选择', '至少选择一条记录,再点击删除');
-			}
+				},this);
+			}else{
+			Ext.Msg.alert('请先选择','至少选择一条记录,再点击删除');
+		}
 		}
 	}
-
-	var del_sm1 = function () {
-		if (sm1.getCount() == 1) {
-			var selected = sm1.getSelection();
+	
+	var del_sm1 = function() {
+		if(sm1.getCount()==1){
+			var selected = sm1.getSelection( );
 			var query = new Object();
 			var list = new Array();
 			var o = new Object();
 			o.id = selected[0].raw.id;
 			list.push(o);
 			query.ID_LIST = list;
-			var jsonstr = Ext.JSON.encode(query);
-			Ext.MessageBox.confirm('删除班组', '是否删除' + selected[0].raw.name + ' 班组?', function (btn) {
-				if (btn == 'yes') {
-
-					$.ajax({
-						type: 'POST',
-						url: baseUrl + "iot/planteam/del",
-						data: {
-							queryJson: jsonstr
-
-						},
-						success: function (result) {
-
-							var json = eval('(' + result + ')');
-							if (json.action == 'deletePlanTeam') {
-
-								if (json.success == true) {
-									Ext.Msg.alert('操作成功', json.MSG, function (btn, txt) {
-										Ext.getCmp('MaintenancePersonListPanel2').getStore().reload();
-									});
-								} else {
-									Ext.Msg.alert('操作失败', json.MSG, function (btn, txt) {
-										Ext.getCmp('MaintenancePersonListPanel2').getStore().reload();
-									});
-								}
-							}
-
-						}
-					});
-
+			var jsonstr= Ext.JSON.encode(query);
+			Ext.MessageBox.confirm('删除班组','是否删除'+selected[0].raw.name+' 班组?',function(btn){
+				if(btn=='yes'){
+					
+				 $.ajax({
+			             type:'POST',
+			             url: baseUrl+"iot/planteam/del",
+			             data: {
+			              queryJson : jsonstr
+			            
+			           },
+			           success: function(result){
+			             
+			             var json = eval('(' + result + ')');
+			                 if(json.action=='deletePlanTeam'){
+			                
+			                  if(json.success==true){
+			                       Ext.Msg.alert('操作成功', json.MSG , function(btn,txt){
+			                	      Ext.getCmp('MaintenancePersonListPanel2').getStore().reload();
+			                       }); 
+			                	 }else{
+			                		 Ext.Msg.alert('操作失败', json.MSG , function(btn,txt){
+				                	      Ext.getCmp('MaintenancePersonListPanel2').getStore().reload();
+				                      }); 
+			                	 }
+			                 }
+			             
+			            }
+			     });
+				
 				}
-			}, this);
-		} else {
-			if (sm1.getCount() > 1) {
+			},this);
+		}else{
+			if(sm1.getCount()>1){
 				var query = new Object();
 				var list = new Array();
-				for (var i = 0; i < sm.getCount(); i++) {
-					var selected = sm1.getSelection();
+				for(var i=0;i<sm.getCount();i++){
+					var selected = sm1.getSelection( );
 					var o = new Object();
 					o.id = selected[i].raw.id;
 					list.push(o);
 				}
 				query.ID_LIST = list;
-
-				var jsonstr = Ext.JSON.encode(query);
-				Ext.MessageBox.confirm('删除班组', '是否删除选中的' + sm1.getCount() + ' 个班组?', function (btn) {
-					if (btn == 'yes') {
-
+				
+				var jsonstr= Ext.JSON.encode(query);
+				Ext.MessageBox.confirm('删除班组','是否删除选中的'+sm1.getCount()+' 个班组?',function(btn){
+					if(btn=='yes'){
+						
 						$.ajax({
-							type: 'POST',
-							url: baseUrl + "iot/planteam/del",
-							data: {
-								queryJson: jsonstr
-
-							},
-							success: function (result) {
-
-								var json = eval('(' + result + ')');
-								if (json.action == 'deletePlanTeam') {
-									if (json.success == true) {
-										Ext.Msg.alert('操作成功', json.MSG, function (btn, txt) {
-											Ext.getCmp('MaintenancePersonListPanel2').getStore().reload();
-										});
-									} else {
-										Ext.Msg.alert('操作失败', json.MSG, function (btn, txt) {
-											Ext.getCmp('MaintenancePersonListPanel2').getStore().reload();
-										});
-									}
-								}
-
-							}
-						});
-
+				             type:'POST',
+				             url: baseUrl+"iot/planteam/del",
+				             data: {
+				              queryJson : jsonstr
+				            
+				           },
+				           success: function(result){
+				             
+				             var json = eval('(' + result + ')');
+				                 if(json.action=='deletePlanTeam'){
+				                	 if(json.success==true){
+					                       Ext.Msg.alert('操作成功', json.MSG , function(btn,txt){
+					                	      Ext.getCmp('MaintenancePersonListPanel2').getStore().reload();
+					                       }); 
+					                	 }else{
+					                		 Ext.Msg.alert('操作失败', json.MSG , function(btn,txt){
+						                	      Ext.getCmp('MaintenancePersonListPanel2').getStore().reload();
+						                      }); 
+					                	 }
+				                 }
+				             
+				            }
+				     });
+					
 					}
-				}, this);
-			} else {
-				Ext.Msg.alert('请先选择', '至少选择一条记录,再点击删除');
-			}
+				},this);
+			}else{
+			Ext.Msg.alert('请先选择','至少选择一条记录,再点击删除');
+		}
 		}
 	}
-
-	var show_page = function () {
+	
+	var show_page = function(){
 		var arr = 0;
 		var r = document.getElementsByName("zhineng");
-		if (r.length > 1) {
-			for (var i = 0; i < r.length; i++) {
-				if (r[i].checked) {
-					arr += parseInt(r[i].value);
-				}
-			}
-		} else if (r.length == 1) {
+		if(r.length>1){
+		  for(var i = 0; i < r.length; i++) {
+			  if(r[i].checked) {
+				  arr+=parseInt(r[i].value);
+			  }
+		  }
+		}else if(r.length==1){
 			arr = parseInt(r[0].value);
-		} else {
+		}else{
 			arr = 0;
 		}
 		var maintenancePerson_title3_input = document.getElementById('maintenancePerson_title3_input1').value;
 		var query = new Object();
-		if (arr > 0) {
+		if(arr > 0){
 			query.zn = arr;
 			$("#zn").val(arr);
 		}
-		if (maintenancePerson_title3_input.length > 0) {
-			query.name = maintenancePerson_title3_input;
-			$("#name").val(maintenancePerson_title3_input);
+		if(maintenancePerson_title3_input.length>0){
+		query.name = maintenancePerson_title3_input;
+		$("#name").val(maintenancePerson_title3_input);
 		}
 		// query.V_LOGINNAME = V_LOGINNAME;
 		// query.V_PASSWORD =  V_PASSWORD;
 		var jsonstr = Ext.JSON.encode(query);
-		myStore.getProxy().extraParams = {
-			queryJson: jsonstr
-		};
-		Ext.getCmp('MaintenancePersonListPageToolbar').moveFirst();
+    	myStore.getProxy().extraParams = {
+    		queryJson : jsonstr
+    	};
+    	Ext.getCmp('MaintenancePersonListPageToolbar').moveFirst();
 	}
-
-	var show_page1 = function () {
+	
+	var show_page1 = function(){
 		var maintenancePerson_title21_input = document.getElementById('maintenancePerson_title21_input').value;
 		var maintenancePerson_title31_input = document.getElementById('maintenancePerson_title31_input1').value;
 		var query = new Object();
-		if (maintenancePerson_title21_input.length > 0) {
-			query.spot_name = maintenancePerson_title21_input;
+		if(maintenancePerson_title21_input.length>0){
+		  query.spot_name = maintenancePerson_title21_input;
 		}
-		if (maintenancePerson_title31_input.length > 0) {
-			query.name = maintenancePerson_title31_input;
+		if(maintenancePerson_title31_input.length>0){
+		query.name = maintenancePerson_title31_input;
 		}
 		// query.V_LOGINNAME = V_LOGINNAME;
 		// query.V_PASSWORD =  V_PASSWORD;
 		var jsonstr = Ext.JSON.encode(query);
-		myStore.getProxy().extraParams = {
-			queryJson: jsonstr
-		};
-		Ext.getCmp('MaintenancePersonListPageToolbar2').moveFirst();
+    	myStore.getProxy().extraParams = {
+    		queryJson : jsonstr
+    	};
+    	Ext.getCmp('MaintenancePersonListPageToolbar2').moveFirst();
 	}
-
-	var reset1 = function () {
+	
+	var reset1 = function(){
 		var zn = document.getElementsByName("zhineng");
-		for (var i = 0; i < zn.length; i++) {
-			zn[i].checked = true;
-		}
+          for (var i = 0; i < zn.length; i++) {
+        	  zn[i].checked = true;
+          }
 		document.getElementById('maintenancePerson_title3_input1').value = '';
 		$("#zn").val('');
 		$("#name").val('');
 		show_page();
 	}
-
-	var reset11 = function () {
+	
+	var reset11 = function(){
 		document.getElementById('maintenancePerson_title21_input').value = '';
 		document.getElementById('maintenancePerson_title31_input1').value = '';
 	}
-
-	mouseon = function (obj) {
+	
+	mouseon = function(obj){
 		var id = obj.id;
-		$("#" + id).removeClass(id);
-		$("#" + id).addClass(id + '_on');
+		$("#"+id).removeClass(id);
+		$("#"+id).addClass(id+'_on');
 	}
-
-	mouseon1 = function (obj) {
+	
+	mouseon1 = function(obj){
 		var id = obj.id;
-		$("#" + id).removeClass(id);
-		$("#" + id).addClass(id + '_on');
+		$("#"+id).removeClass(id);
+		$("#"+id).addClass(id+'_on');
 	}
-
-	mouseoff = function (obj) {
+	
+	 mouseoff = function(obj){
 		var mid = "maintenancePerson_";
-		for (var i = 1; i < 7; i++) {
-			var id = "maintenancePerson_title" + i + "_div";
-			$("#" + id).removeClass(id + '_on');
-			$("#" + id).addClass(id);
+		for(var i=1;i<7;i++){
+			var id = "maintenancePerson_title"+i+"_div";
+			$("#"+id).removeClass(id+'_on');
+			$("#"+id).addClass(id);
 		}
-		if (menuidx == 'm1') {
+		if(menuidx=='m1'){
 			mid += 'title1_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
+		$("#"+mid).removeClass(mid);
+		$("#"+mid).addClass(mid+'_on');
 		}
-		else if (menuidx == 'm2') {
+		else if(menuidx=='m2'){
 			mid += 'title2_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
+		$("#"+mid).removeClass(mid);
+		$("#"+mid).addClass(mid+'_on');
 		}
-		else if (menuidx == 'm3') {
+		else if(menuidx=='m3'){
 			mid += 'title3_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
+		$("#"+mid).removeClass(mid);
+		$("#"+mid).addClass(mid+'_on');
 		}
-		else if (menuidx == 'm4') {
+		else if(menuidx=='m4'){
 			mid += 'title4_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
+		$("#"+mid).removeClass(mid);
+		$("#"+mid).addClass(mid+'_on');
 		}
-		else if (menuidx == 'm5') {
+		else if(menuidx=='m5'){
 			mid += 'title5_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
+		$("#"+mid).removeClass(mid);
+		$("#"+mid).addClass(mid+'_on');
 		}
-		else if (menuidx == 'm6') {
+		else if(menuidx=='m6'){
 			mid += 'title6_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
-		}
-	}
-
-	mouseoff1 = function (obj) {
-		var mid = "maintenancePerson_";
-		for (var i = 1; i < 5; i++) {
-			var id = "maintenancePerson_title" + i + "1_div";
-			$("#" + id).removeClass(id + '_on');
-			$("#" + id).addClass(id);
-		}
-		if (menuidx == 'm11') {
-			mid += 'title11_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
-		}
-		else if (menuidx == 'm21') {
-			mid += 'title21_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
-		}
-		else if (menuidx == 'm31') {
-			mid += 'title31_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
-		}
-		else if (menuidx == 'm41') {
-			mid += 'title41_div';
-			$("#" + mid).removeClass(mid);
-			$("#" + mid).addClass(mid + '_on');
-		}
-	}
-
-	menu_click = function (obj) {
-		var id = obj.id;
-		if (id == 'maintenancePerson_title1_div') {
-			menuidx = 'm1';
-			show_page();
-		}
-		else if (id == 'maintenancePerson_title2_div') {
-			menuidx = 'm2';
-			reset1();
-		}
-		else if (id == 'maintenancePerson_title3_div') {
-			menuidx = 'm3';
-			exportbtn_click();
-		}
-		else if (id == 'maintenancePerson_title4_div') {
-			menuidx = 'm4';
-			del_sm();
-		}
-		else if (id == 'maintenancePerson_title5_div') {
-			menuidx = 'm5';
-			appendwin();
-		}
-		else if (id == 'maintenancePerson_title6_div') {
-			menuidx = 'm6';
-			chk_sm();
-		}
-		else if (id == 'maintenancePerson_title11_div') {
-			menuidx = 'm11';
-			del_sm1();
-		}
-		else if (id == 'maintenancePerson_title21_div') {
-			menuidx = 'm21';
-			appendwin1();
-		}
-		else if (id == 'maintenancePerson_title31_div') {
-			menuidx = 'm31';
-			Preservation_panel3();
-		}
-		else if (id == 'maintenancePerson_title41_div') {
-			menuidx = 'm41';
-			cancel_panel3();
+		$("#"+mid).removeClass(mid);
+		$("#"+mid).addClass(mid+'_on');
 		}
 	}
-
-	var Preservation_panel3 = function () {
+	
+	 mouseoff1 = function(obj){
+		   var mid = "maintenancePerson_";
+		   for(var i=1;i<5;i++){
+		    var id = "maintenancePerson_title"+i+"1_div";
+		    $("#"+id).removeClass(id+'_on');
+		    $("#"+id).addClass(id);
+		   }
+		      if(menuidx=='m11'){
+		    mid += 'title11_div';
+		   $("#"+mid).removeClass(mid);
+		   $("#"+mid).addClass(mid+'_on');
+		   }
+		   else if(menuidx=='m21'){
+		    mid += 'title21_div';
+		   $("#"+mid).removeClass(mid);
+		   $("#"+mid).addClass(mid+'_on');
+		   }
+		   else if(menuidx=='m31'){
+		    mid += 'title31_div';
+		   $("#"+mid).removeClass(mid);
+		   $("#"+mid).addClass(mid+'_on');
+		   }
+		   else if(menuidx=='m41'){
+		    mid += 'title41_div';
+		   $("#"+mid).removeClass(mid);
+		   $("#"+mid).addClass(mid+'_on');
+		   }
+		  }
+	 
+	 menu_click = function(obj){
+		  var id = obj.id;
+		  if(id=='maintenancePerson_title1_div'){
+		   menuidx = 'm1';
+		   show_page();
+		  }
+		  else if(id=='maintenancePerson_title2_div'){
+		   menuidx = 'm2';
+		   reset1();
+		  }
+		  else if(id=='maintenancePerson_title3_div'){
+		   menuidx = 'm3';
+		   exportbtn_click();
+		  }
+		  else if(id=='maintenancePerson_title4_div'){
+		   menuidx = 'm4';
+		   del_sm();
+		  }
+		  else if(id=='maintenancePerson_title5_div'){
+		   menuidx = 'm5';
+		   appendwin();
+		  }
+		  else if(id=='maintenancePerson_title6_div'){
+		   menuidx = 'm6';
+		   chk_sm();
+		  }
+		  else if(id=='maintenancePerson_title11_div'){
+		   menuidx = 'm11';
+		   del_sm1();
+		  }
+		  else if(id=='maintenancePerson_title21_div'){
+		   menuidx = 'm21';
+		   appendwin1();
+		  }
+		  else if(id=='maintenancePerson_title31_div'){
+		   menuidx = 'm31';
+		   Preservation_panel3();
+		  }
+		  else if(id=='maintenancePerson_title41_div'){
+		   menuidx = 'm41';
+		   cancel_panel3();
+		  }
+		 }
+	
+	var Preservation_panel3 = function(){
 		var team_name = document.getElementById('maintenancePerson_title211_input').value;
 		var person_liable_id = document.getElementById('maintenancePerson_title111_input').value;
-		var selected = sm1.getSelection();
-
-		var selected1 = addsm.getSelection();
-		var tid = selected1[0].raw.tdid;
-		for (var i = 0; i < addsm.getCount(); i++) {
-			if (i == 0)
-				people_id_list = selected1[i].raw.rid;
+		var selected = sm1.getSelection( );
+		
+		var selected1 = addsm.getSelection( );
+		var tid=selected1[0].raw.tdid;
+		for(var i=0;i<addsm.getCount();i++){
+            if(i==0)
+            	people_id_list = selected1[i].raw.rid;
 			else
-				people_id_list += "," + selected1[i].raw.rid;
-		}
-
+				people_id_list += ","+selected1[i].raw.rid;
+           }
+		
 		var query = new Object();
-		query.team_name = team_name;
-		query.person_liable_id = person_liable_id;
-		query.tid = tid;
-		query.people_id_list = people_id_list;
-
+		query.team_name=team_name;
+		query.person_liable_id =person_liable_id ;
+		query.tid = tid ;
+		query.people_id_list = people_id_list ;
+		
 		$.ajax({
-			type: 'POST',
-			url: baseUrl + "iot/planteam/update",
-			data: {
-				queryJson: Ext.JSON.encode(query)
-			},
-			success: function (result) {
-				Ext.Msg.alert('操作成功', '已修改', function (btn, txt) {
-					mystore2_fun(tid);
-					//					  cancel_panel3();
-				});
-			},
-			failure: function () {
-				Ext.Msg.alert('操作失败', function (btn, txt) {
-					cancel_panel3();
-				});
-			}
-		});
-
-
+	         type:'POST',
+	         url: baseUrl+"iot/planteam/update",
+	         data: {
+	          queryJson : Ext.JSON.encode(query)
+	       },
+	         success: function(result){
+	        	 Ext.Msg.alert('操作成功', '已修改', function(btn,txt){
+	        		  mystore2_fun(tid);
+//					  cancel_panel3();
+                 });
+	         },
+	         failure : function() {
+				  Ext.Msg.alert('操作失败', function(btn,txt){
+					  cancel_panel3();
+                 });
+			  }
+	     });
+
+    	
 	}
-
-	var cancel_panel3 = function () {
-		var selected = sm1.getSelection();
-		var stor1_id = selected[0].raw.id;
-		var label1 = selected[0].raw.team_name;
-		var label2 = selected[0].raw.person_liable_id;
-		var query = new Object();
-		query.id = stor1_id;
-
-		// query.V_LOGINNAME = V_LOGINNAME;
-		// query.V_PASSWORD =  V_PASSWORD;
-		var jsonstr = Ext.JSON.encode(query);
-		myStore1.getProxy().extraParams = {
-			queryJson: jsonstr
-		};
-		Ext.getCmp('MaintenancePersonListPageToolbar3').moveFirst();
-		document.getElementById('maintenancePerson_title211_input').value = label1;
-		document.getElementById('maintenancePerson_title111_input').value = label2;
-	}
-
-	//	var childPanel1 = Ext.create('Ext.Panel', {
-	//		height:188,
-	//		width:'100%',
-	//        html: '<div class="title2_div">角色</div><input type="text" class="input_class" id="maintenancePerson_title2_input" value=""><div class="title3_div">姓名</div><input type="text" class="input1_class" id="maintenancePerson_title3_input1" value=""><div id="maintenancePerson_title1_div" class="maintenancePerson_title1_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title2_div" class="maintenancePerson_title2_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title3_div" class="maintenancePerson_title3_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title4_div" class="maintenancePerson_title4_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title5_div" class="maintenancePerson_title5_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title6_div" class="maintenancePerson_title6_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div>'
-	//    });
-	var childPanel1 = function () {
-		var maintenancePersonHtml = document.getElementById('maintenancePersonHtml');
-		var childPanel1_title = document.createElement('div');
-		childPanel1_title.setAttribute('class', 'maintenanceperson_title2_div');
-		childPanel1_title.innerHTML = '职能';
-		maintenancePersonHtml.appendChild(childPanel1_title);
-		var childPanel1_input1 = document.createElement('input');
-		childPanel1_input1.setAttribute('class', 'input4_class');
-		//		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
-		childPanel1_input1.setAttribute('type', 'checkbox');
-		childPanel1_input1.setAttribute('name', 'zhineng');
-		childPanel1_input1.setAttribute('value', '1');
-		maintenancePersonHtml.appendChild(childPanel1_input1);
-		var childPanel1_div = document.createElement('div');
-		childPanel1_div.setAttribute('class', 'childPanel1_div');
-		childPanel1_div.innerHTML = '维保';
-		maintenancePersonHtml.appendChild(childPanel1_div);
-		var childPanel1_input2 = document.createElement('input');
-		childPanel1_input2.setAttribute('class', 'input2_class');
-		//		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
-		childPanel1_input2.setAttribute('type', 'checkbox');
-		childPanel1_input2.setAttribute('name', 'zhineng');
-		childPanel1_input2.setAttribute('value', '2');
-		maintenancePersonHtml.appendChild(childPanel1_input2);
-		var childPanel1_div1 = document.createElement('div');
-		childPanel1_div1.setAttribute('class', 'childPanel1_div1');
-		childPanel1_div1.innerHTML = '巡检';
-		maintenancePersonHtml.appendChild(childPanel1_div1);
-		var childPanel1_input3 = document.createElement('input');
-		childPanel1_input3.setAttribute('class', 'input3_class');
-		//		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
-		childPanel1_input3.setAttribute('type', 'checkbox');
-		childPanel1_input3.setAttribute('name', 'zhineng');
-		childPanel1_input3.setAttribute('value', '4');
-		maintenancePersonHtml.appendChild(childPanel1_input3);
-		var childPanel1_div2 = document.createElement('div');
-		childPanel1_div2.setAttribute('class', 'childPanel1_div2');
-		childPanel1_div2.innerHTML = '报修';
-		maintenancePersonHtml.appendChild(childPanel1_div2);
-		var childPanel1_title1 = document.createElement('div');
-		childPanel1_title1.setAttribute('class', 'title3_div');
-		childPanel1_title1.innerHTML = '姓名';
-		maintenancePersonHtml.appendChild(childPanel1_title1);
-		var childPanel1_input = document.createElement('input');
-		childPanel1_input.setAttribute('class', 'input1_class');
-		childPanel1_input.setAttribute('id', 'maintenancePerson_title3_input1');
-		childPanel1_input.setAttribute('type', 'text');
-		childPanel1_input.setAttribute('value', '');
-		maintenancePersonHtml.appendChild(childPanel1_input);
-		var childPanel1_title2 = document.createElement('div');
-		childPanel1_title2.setAttribute('class', 'maintenancePerson_title1_div');
-		childPanel1_title2.setAttribute('id', 'maintenancePerson_title1_div');
-		childPanel1_title2.setAttribute('onmouseover', "mouseon(this)");
-		childPanel1_title2.setAttribute('onmouseout', "mouseoff(this)");
-		childPanel1_title2.setAttribute('onclick', "menu_click(this)");
-		maintenancePersonHtml.appendChild(childPanel1_title2);
-		var childPanel1_title3 = document.createElement('div');
-		childPanel1_title3.setAttribute('class', 'maintenancePerson_title2_div');
-		childPanel1_title3.setAttribute('id', 'maintenancePerson_title2_div');
-		childPanel1_title3.setAttribute('onmouseover', "mouseon(this)");
-		childPanel1_title3.setAttribute('onmouseout', "mouseoff(this)");
-		childPanel1_title3.setAttribute('onclick', "menu_click(this)");
-		maintenancePersonHtml.appendChild(childPanel1_title3);
-		var childPanel1_title4 = document.createElement('div');
-		childPanel1_title4.setAttribute('class', 'maintenancePerson_title3_div');
-		childPanel1_title4.setAttribute('id', 'maintenancePerson_title3_div');
-		childPanel1_title4.setAttribute('onmouseover', "mouseon(this)");
-		childPanel1_title4.setAttribute('onmouseout', "mouseoff(this)");
-		childPanel1_title4.setAttribute('onclick', "menu_click(this)");
-		maintenancePersonHtml.appendChild(childPanel1_title4);
-		var childPanel1_title5 = document.createElement('div');
-		childPanel1_title5.setAttribute('class', 'maintenancePerson_title4_div');
-		childPanel1_title5.setAttribute('id', 'maintenancePerson_title4_div');
-		childPanel1_title5.setAttribute('onmouseover', "mouseon(this)");
-		childPanel1_title5.setAttribute('onmouseout', "mouseoff(this)");
-		childPanel1_title5.setAttribute('onclick', "menu_click(this)");
-		maintenancePersonHtml.appendChild(childPanel1_title5);
-		var childPanel1_title6 = document.createElement('div');
-		childPanel1_title6.setAttribute('class', 'maintenancePerson_title5_div');
-		childPanel1_title6.setAttribute('id', 'maintenancePerson_title5_div');
-		childPanel1_title6.setAttribute('onmouseover', "mouseon(this)");
-		childPanel1_title6.setAttribute('onmouseout', "mouseoff(this)");
-		childPanel1_title6.setAttribute('onclick', "menu_click(this)");
-		maintenancePersonHtml.appendChild(childPanel1_title6);
-		var childPanel1_title7 = document.createElement('div');
-		childPanel1_title7.setAttribute('class', 'maintenancePerson_title6_div');
-		childPanel1_title7.setAttribute('id', 'maintenancePerson_title6_div');
-		childPanel1_title7.setAttribute('onmouseover', "mouseon(this)");
-		childPanel1_title7.setAttribute('onmouseout', "mouseoff(this)");
-		childPanel1_title7.setAttribute('onclick', "menu_click(this)");
-		maintenancePersonHtml.appendChild(childPanel1_title7);
-		reset1();
-	}
-
-	changeon1 = function (obj) {
-		var selected = sm1.getSelection();
-		var id = selected[0].raw.id
-		var xid = obj.value;
-		var query = new Object();
-		if (xid.length > 0) {
-			query.xid = xid;
-		}
-		query.id = id;
-		// query.V_LOGINNAME = V_LOGINNAME;
-		// query.V_PASSWORD =  V_PASSWORD;
-		var jsonstr = Ext.JSON.encode(query);
-		myStore1.getProxy().extraParams = {
-			queryJson: jsonstr
-		};
-		Ext.getCmp('MaintenancePersonListPageToolbar3').moveFirst();
-	}
-
-	var childPanel2 = function () {
+	
+	var cancel_panel3 = function() {
+		  var selected = sm1.getSelection( );
+		  var stor1_id=selected[0].raw.id;
+		  var label1 = selected[0].raw.team_name;
+		  var label2 = selected[0].raw.person_liable_id;
+		  var query = new Object(); 
+		    query.id = stor1_id;
+		    
+		    // query.V_LOGINNAME = V_LOGINNAME;
+		    // query.V_PASSWORD =  V_PASSWORD;
+		    var jsonstr = Ext.JSON.encode(query);
+		       myStore1.getProxy().extraParams = {
+		        queryJson : jsonstr
+		       };
+		       Ext.getCmp('MaintenancePersonListPageToolbar3').moveFirst();
+		       document.getElementById('maintenancePerson_title211_input').value = label1;
+		     document.getElementById('maintenancePerson_title111_input').value = label2;
+		 }
+	
+//	var childPanel1 = Ext.create('Ext.Panel', {
+//		height:188,
+//		width:'100%',
+//        html: '<div class="title2_div">角色</div><input type="text" class="input_class" id="maintenancePerson_title2_input" value=""><div class="title3_div">姓名</div><input type="text" class="input1_class" id="maintenancePerson_title3_input1" value=""><div id="maintenancePerson_title1_div" class="maintenancePerson_title1_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title2_div" class="maintenancePerson_title2_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title3_div" class="maintenancePerson_title3_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title4_div" class="maintenancePerson_title4_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title5_div" class="maintenancePerson_title5_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div><div id="maintenancePerson_title6_div" class="maintenancePerson_title6_div" onmouseover="mouseon(this);" onmouseout="mouseoff(this);" onclick="menu_click(this);"></div>'
+//    });
+	var childPanel1 = function() {
+		  var maintenancePersonHtml = document.getElementById('maintenancePersonHtml');
+		  var childPanel1_title = document.createElement('div');
+		  childPanel1_title.setAttribute('class','maintenanceperson_title2_div');
+		  childPanel1_title.innerHTML='职能';
+		  maintenancePersonHtml.appendChild(childPanel1_title);
+		  var childPanel1_input1 = document.createElement('input');
+		   childPanel1_input1.setAttribute('class','input4_class');
+//		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
+		   childPanel1_input1.setAttribute('type','checkbox');
+		   childPanel1_input1.setAttribute('name','zhineng');
+		   childPanel1_input1.setAttribute('value','1');
+		   maintenancePersonHtml.appendChild(childPanel1_input1);
+		  var childPanel1_div = document.createElement('div');
+		   childPanel1_div.setAttribute('class','childPanel1_div');
+		   childPanel1_div.innerHTML='维保';
+		   maintenancePersonHtml.appendChild(childPanel1_div);
+		  var childPanel1_input2 = document.createElement('input');
+		   childPanel1_input2.setAttribute('class','input2_class');
+//		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
+		   childPanel1_input2.setAttribute('type','checkbox');
+		   childPanel1_input2.setAttribute('name','zhineng');
+		   childPanel1_input2.setAttribute('value','2');
+		   maintenancePersonHtml.appendChild(childPanel1_input2);
+		  var childPanel1_div1 = document.createElement('div');
+		   childPanel1_div1.setAttribute('class','childPanel1_div1');
+		   childPanel1_div1.innerHTML='巡检';
+		   maintenancePersonHtml.appendChild(childPanel1_div1);
+		  var childPanel1_input3 = document.createElement('input');
+		   childPanel1_input3.setAttribute('class','input3_class');
+//		   childPanel1_input1.setAttribute('id','maintenancePerson_title3_input1');
+		   childPanel1_input3.setAttribute('type','checkbox');
+		   childPanel1_input3.setAttribute('name','zhineng');
+		   childPanel1_input3.setAttribute('value','4');
+		   maintenancePersonHtml.appendChild(childPanel1_input3);
+		  var childPanel1_div2 = document.createElement('div');
+		   childPanel1_div2.setAttribute('class','childPanel1_div2');
+		   childPanel1_div2.innerHTML='报修';
+		   maintenancePersonHtml.appendChild(childPanel1_div2);
+		   var childPanel1_title1 = document.createElement('div');
+		   childPanel1_title1.setAttribute('class','title3_div');
+		   childPanel1_title1.innerHTML='姓名';
+		   maintenancePersonHtml.appendChild(childPanel1_title1);
+		   var childPanel1_input = document.createElement('input');
+		   childPanel1_input.setAttribute('class','input1_class');
+		   childPanel1_input.setAttribute('id','maintenancePerson_title3_input1');
+		   childPanel1_input.setAttribute('type','text');
+		   childPanel1_input.setAttribute('value','');
+		   maintenancePersonHtml.appendChild(childPanel1_input);
+		   var childPanel1_title2 = document.createElement('div');
+		   childPanel1_title2.setAttribute('class','maintenancePerson_title1_div');
+		   childPanel1_title2.setAttribute('id','maintenancePerson_title1_div');
+		   childPanel1_title2.setAttribute('onmouseover',"mouseon(this)");
+		   childPanel1_title2.setAttribute('onmouseout',"mouseoff(this)");
+		   childPanel1_title2.setAttribute('onclick',"menu_click(this)");
+		   maintenancePersonHtml.appendChild(childPanel1_title2);
+		   var childPanel1_title3 = document.createElement('div');
+		   childPanel1_title3.setAttribute('class','maintenancePerson_title2_div');
+		   childPanel1_title3.setAttribute('id','maintenancePerson_title2_div');
+		   childPanel1_title3.setAttribute('onmouseover',"mouseon(this)");
+		   childPanel1_title3.setAttribute('onmouseout',"mouseoff(this)");
+		   childPanel1_title3.setAttribute('onclick',"menu_click(this)");
+		   maintenancePersonHtml.appendChild(childPanel1_title3);
+		   var childPanel1_title4 = document.createElement('div');
+		   childPanel1_title4.setAttribute('class','maintenancePerson_title3_div');
+		   childPanel1_title4.setAttribute('id','maintenancePerson_title3_div');
+		   childPanel1_title4.setAttribute('onmouseover',"mouseon(this)");
+		   childPanel1_title4.setAttribute('onmouseout',"mouseoff(this)");
+		   childPanel1_title4.setAttribute('onclick',"menu_click(this)");
+		   maintenancePersonHtml.appendChild(childPanel1_title4);
+		   var childPanel1_title5 = document.createElement('div');
+		   childPanel1_title5.setAttribute('class','maintenancePerson_title4_div');
+		   childPanel1_title5.setAttribute('id','maintenancePerson_title4_div');
+		   childPanel1_title5.setAttribute('onmouseover',"mouseon(this)");
+		   childPanel1_title5.setAttribute('onmouseout',"mouseoff(this)");
+		   childPanel1_title5.setAttribute('onclick',"menu_click(this)");
+		   maintenancePersonHtml.appendChild(childPanel1_title5);
+		   var childPanel1_title6 = document.createElement('div');
+		   childPanel1_title6.setAttribute('class','maintenancePerson_title5_div');
+		   childPanel1_title6.setAttribute('id','maintenancePerson_title5_div');
+		   childPanel1_title6.setAttribute('onmouseover',"mouseon(this)");
+		   childPanel1_title6.setAttribute('onmouseout',"mouseoff(this)");
+		   childPanel1_title6.setAttribute('onclick',"menu_click(this)");
+		   maintenancePersonHtml.appendChild(childPanel1_title6);
+		   var childPanel1_title7 = document.createElement('div');
+		   childPanel1_title7.setAttribute('class','maintenancePerson_title6_div');
+		   childPanel1_title7.setAttribute('id','maintenancePerson_title6_div');
+		   childPanel1_title7.setAttribute('onmouseover',"mouseon(this)");
+		   childPanel1_title7.setAttribute('onmouseout',"mouseoff(this)");
+		   childPanel1_title7.setAttribute('onclick',"menu_click(this)");
+		   maintenancePersonHtml.appendChild(childPanel1_title7);
+		   reset1();
+		 }
+	
+	changeon1 = function(obj){
+	      var selected = sm1.getSelection();
+	      var id = selected[0].raw.id
+	   var xid = obj.value;
+	   var query = new Object();
+	  if(xid.length>0){
+	    query.xid = xid;
+	  }
+	  query.id = id;
+	  // query.V_LOGINNAME = V_LOGINNAME;
+	  // query.V_PASSWORD =  V_PASSWORD;
+	  var jsonstr = Ext.JSON.encode(query);
+	     myStore1.getProxy().extraParams = {
+	      queryJson : jsonstr
+	     };
+	     Ext.getCmp('MaintenancePersonListPageToolbar3').moveFirst();
+	 }
+	
+	var childPanel2 = function() {
 		var maintenancePersonHtml2 = document.getElementById('maintenancePersonHtml2');
 		var divhiddle = document.createElement('div');
-		divhiddle.id = 'div26_id_maintenancePersonPanel3';
-		divhiddle.setAttribute('class', 'SpringHandleHtml3DivHiddle');
-		maintenancePersonHtml2.appendChild(divhiddle);
-		var title = document.createElement('div');
-		title.setAttribute('class', 'MaintenancePersonTitle123');
-		title.innerHTML = '班组列表';
-		maintenancePersonHtml2.appendChild(title);
-		var childPanel2_title2 = document.createElement('div');
-		childPanel2_title2.setAttribute('class', 'maintenancePerson_title11_div');
-		childPanel2_title2.setAttribute('id', 'maintenancePerson_title11_div');
-		childPanel2_title2.setAttribute('onmouseover', "mouseon1(this)");
-		childPanel2_title2.setAttribute('onmouseout', "mouseoff1(this)");
-		childPanel2_title2.setAttribute('onclick', "menu_click(this)");
-		maintenancePersonHtml2.appendChild(childPanel2_title2);
-		var childPanel2_title3 = document.createElement('div');
-		childPanel2_title3.setAttribute('class', 'maintenancePerson_title21_div');
-		childPanel2_title3.setAttribute('id', 'maintenancePerson_title21_div');
-		childPanel2_title3.setAttribute('onmouseover', "mouseon1(this)");
-		childPanel2_title3.setAttribute('onmouseout', "mouseoff1(this)");
-		childPanel2_title3.setAttribute('onclick', "menu_click(this)");
-		maintenancePersonHtml2.appendChild(childPanel2_title3);
-	}
-
-	var childPanel3 = function () {
-		var maintenancePersonHtml3 = document.getElementById('maintenancePersonHtml3');
-		var divhiddle = document.createElement('div');
-		divhiddle.id = 'div26_id_maintenancePersonHtml3Panel3';
-		divhiddle.setAttribute('class', 'SpringHandleHtml3DivHiddle');
-		maintenancePersonHtml3.appendChild(divhiddle);
-		var title1 = document.createElement('div');
-		title1.setAttribute('class', 'MaintenancePersonTitle123');
-		title1.innerHTML = '班组详情';
-		maintenancePersonHtml3.appendChild(title1);
-		var childPanel2_title = document.createElement('div');
-		childPanel2_title.setAttribute('class', 'maintenancePerson_title211_div');
-		childPanel2_title.innerHTML = '班组名称';
-		maintenancePersonHtml3.appendChild(childPanel2_title);
+	    divhiddle.id='div26_id_maintenancePersonPanel3';
+	    divhiddle.setAttribute('class','SpringHandleHtml3DivHiddle');
+	    maintenancePersonHtml2.appendChild(divhiddle);
+	    var title = document.createElement('div');
+		   title.setAttribute('class','MaintenancePersonTitle123');
+		   title.innerHTML='班组列表';
+		   maintenancePersonHtml2.appendChild(title);			
+ 		var childPanel2_title2 = document.createElement('div');
+ 		childPanel2_title2.setAttribute('class','maintenancePerson_title11_div');
+ 		childPanel2_title2.setAttribute('id','maintenancePerson_title11_div');
+ 		childPanel2_title2.setAttribute('onmouseover',"mouseon1(this)");
+ 		childPanel2_title2.setAttribute('onmouseout',"mouseoff1(this)");
+ 		childPanel2_title2.setAttribute('onclick',"menu_click(this)");
+ 		maintenancePersonHtml2.appendChild(childPanel2_title2);
+ 		var childPanel2_title3 = document.createElement('div');
+ 		childPanel2_title3.setAttribute('class','maintenancePerson_title21_div');
+ 		childPanel2_title3.setAttribute('id','maintenancePerson_title21_div');
+ 		childPanel2_title3.setAttribute('onmouseover',"mouseon1(this)");
+ 		childPanel2_title3.setAttribute('onmouseout',"mouseoff1(this)");
+ 		childPanel2_title3.setAttribute('onclick',"menu_click(this)");
+ 		maintenancePersonHtml2.appendChild(childPanel2_title3);
+    }
+
+var childPanel3 = function(){
+	var maintenancePersonHtml3 = document.getElementById('maintenancePersonHtml3');
+	var divhiddle = document.createElement('div');
+    divhiddle.id='div26_id_maintenancePersonHtml3Panel3';
+    divhiddle.setAttribute('class','SpringHandleHtml3DivHiddle');
+    maintenancePersonHtml3.appendChild(divhiddle);
+    var title1 = document.createElement('div');
+	   title1.setAttribute('class','MaintenancePersonTitle123');
+	   title1.innerHTML='班组详情';
+	   maintenancePersonHtml3.appendChild(title1);
+	var childPanel2_title = document.createElement('div');
+	childPanel2_title.setAttribute('class','maintenancePerson_title211_div');
+	childPanel2_title.innerHTML='班组名称';
+	maintenancePersonHtml3.appendChild(childPanel2_title);
 		var childPanel2_input = document.createElement('input');
-		childPanel2_input.setAttribute('class', 'maintenancePerson_input211_class');
-		childPanel2_input.setAttribute('id', 'maintenancePerson_title211_input');
-		childPanel2_input.setAttribute('type', 'text');
-		childPanel2_input.setAttribute('value', '');
+		childPanel2_input.setAttribute('class','maintenancePerson_input211_class');
+		childPanel2_input.setAttribute('id','maintenancePerson_title211_input');
+		childPanel2_input.setAttribute('type','text');
+		childPanel2_input.setAttribute('value','');
 		maintenancePersonHtml3.appendChild(childPanel2_input);
 		var childPanel2_title1 = document.createElement('div');
-		childPanel2_title1.setAttribute('class', 'maintenancePerson_title111_div');
-		childPanel2_title1.innerHTML = '负责人';
+		childPanel2_title1.setAttribute('class','maintenancePerson_title111_div');
+		childPanel2_title1.innerHTML='负责人';
 		maintenancePersonHtml3.appendChild(childPanel2_title1);
-		var select = document.createElement('select');
-		select.setAttribute('class', 'maintenancePerson_input111_class');
-		select.setAttribute('onchange', "changeon1(this)");
-		select.setAttribute('id', 'maintenancePerson_title111_input');
-		maintenancePersonHtml3.appendChild(select);
-		for (var i = 0; i < ConfirmStore.length; i++) {
-			var option3 = document.createElement('option');
-			option3.innerHTML = ConfirmStore[i].name;
-			option3.setAttribute('value', ConfirmStore[i].rid);
-			select.appendChild(option3);
-		}
-		var childPanel2_title2 = document.createElement('div');
-		childPanel2_title2.setAttribute('class', 'maintenancePerson_title31_div');
-		childPanel2_title2.setAttribute('id', 'maintenancePerson_title31_div');
-		childPanel2_title2.setAttribute('onmouseover', "mouseon1(this)");
-		childPanel2_title2.setAttribute('onmouseout', "mouseoff1(this)");
-		childPanel2_title2.setAttribute('onclick', "menu_click(this)");
+	var select = document.createElement('select');
+	   select.setAttribute('class','maintenancePerson_input111_class');
+	   select.setAttribute('onchange',"changeon1(this)");
+	   select.setAttribute('id','maintenancePerson_title111_input');
+	   maintenancePersonHtml3.appendChild(select);
+	   for(var i=0;i<ConfirmStore.length;i++){
+	    var option3 = document.createElement('option');
+	    option3.innerHTML=ConfirmStore[i].name;
+	    option3.setAttribute('value',ConfirmStore[i].rid);
+	    select.appendChild(option3); 
+	   }
+   var childPanel2_title2 = document.createElement('div');
+		childPanel2_title2.setAttribute('class','maintenancePerson_title31_div');
+		childPanel2_title2.setAttribute('id','maintenancePerson_title31_div');
+		childPanel2_title2.setAttribute('onmouseover',"mouseon1(this)");
+		childPanel2_title2.setAttribute('onmouseout',"mouseoff1(this)");
+		childPanel2_title2.setAttribute('onclick',"menu_click(this)");
 		maintenancePersonHtml3.appendChild(childPanel2_title2);
-		var childPanel2_title3 = document.createElement('div');
-		childPanel2_title3.setAttribute('class', 'maintenancePerson_title41_div');
-		childPanel2_title3.setAttribute('id', 'maintenancePerson_title41_div');
-		childPanel2_title3.setAttribute('onmouseover', "mouseon1(this)");
-		childPanel2_title3.setAttribute('onmouseout', "mouseoff1(this)");
-		childPanel2_title3.setAttribute('onclick', "menu_click(this)");
+	   var childPanel2_title3 = document.createElement('div');
+		childPanel2_title3.setAttribute('class','maintenancePerson_title41_div');
+		childPanel2_title3.setAttribute('id','maintenancePerson_title41_div');
+		childPanel2_title3.setAttribute('onmouseover',"mouseon1(this)");
+		childPanel2_title3.setAttribute('onmouseout',"mouseoff1(this)");
+		childPanel2_title3.setAttribute('onclick',"menu_click(this)");
 		maintenancePersonHtml3.appendChild(childPanel2_title3);
-	}
+}
 
-	var childPanel3_fun = function () {
-		var query = new Object();
-		query.V_LOGINNAME = $("#V_LOGINNAME").val();
-		$.ajax({
-			type: 'POST',
-			url: baseUrl + "iot/inspectorsx/getTeamMembersList1",
-			data: {
-				queryJson: Ext.JSON.encode(query)
-			},
-			success: function (result) {
-				var json = eval('(' + result + ')');
-				if (json.action == 'getTeamMembersList') {
-					ConfirmStore = json.RESULT;
-					childPanel3();
-				}
-			}
+var childPanel3_fun =function(){
+	  var query = new Object();
+	  query.V_LOGINNAME = $("#V_LOGINNAME").val();
+	  $.ajax({
+	         type:'POST',
+	         url: baseUrl+"iot/inspectorsx/getTeamMembersList1",
+	         data: {
+	          queryJson : Ext.JSON.encode(query)
+	       },
+	         success: function(result){
+	             var json = eval('(' + result + ')');
+	             if(json.action=='getTeamMembersList'){
+	                 ConfirmStore = json.RESULT;
+	                 childPanel3();
+	             }
+	         } 
+	     });
+	 }
+	
+		var childPanel6 = Ext.create('Ext.Panel', {
+			  height:maxHeight,
+			  width:'20%',
+			        html: '<div></div>'
 		});
-	}
-
-	var childPanel6 = Ext.create('Ext.Panel', {
-		height: maxHeight,
-		width: '20%',
-		html: '<div></div>'
-	});
-
+	
 	var MaintenancePersonPanel = Ext.create('Ext.grid.Panel', {
-		header: {
-			height: 0,
-			border: '0px solid #000000'
+		header :{
+			height:0,
+			border:'0px solid #000000'
 		},
-		id: 'MaintenancePersonListPanel',
-		store: myStore,
-		selModel: sm,
-		columns: [
-			{ header: 'ID', dataIndex: 'id', hidden: true, menuDisabled: true },
-			{ header: '职能ID', dataIndex: 'zn', hidden: true, menuDisabled: true },
-			{ header: '序号', dataIndex: 'xh', width: 39, menuDisabled: true },
-			{ header: '姓名', dataIndex: 'name', width: 466, align: 'center', menuDisabled: true },
-			{ header: '手机号', dataIndex: 'phone', width: 466, align: 'center', menuDisabled: true },
-			{ header: '职务', dataIndex: 'zn_name', width: 466, align: 'center', menuDisabled: true },
-
-		],
-		columnLines: true,
-		height: maxHeight,
-		width: '100%',
-		bbar: new Ext.PagingToolbar({
-			store: myStore,
-			id: 'MaintenancePersonListPageToolbar',
-			displayInfo: true,
-			pageSize: countPerPage,
-			prependButtons: true,
-			displayMsg: '显示第 {0}条到 {1}条记录,总共 {2}条',
-			emptyMsg: "没有记录",
-			firstText: '第一页',
-			prevText: '前一页',
-			nextText: '后一页',
-			lastText: '最后一页',
-			refreshText: '刷新',
-
-		}),
-		frame: true,
-		border: false,
-		iconCls: 'icon-grid'
+	    id: 'MaintenancePersonListPanel',
+	    store: myStore,
+	    selModel: sm,
+	    columns: [
+	    	 { header: 'ID',  dataIndex: 'id',hidden:true, menuDisabled:true },
+	    	 { header: '职能ID',  dataIndex: 'zn',hidden:true, menuDisabled:true },
+	    	 { header: '序号',  dataIndex: 'xh', width:39, menuDisabled:true },
+		     { header: '姓名', dataIndex: 'name', width:466,align:'center', menuDisabled:true },
+		     { header: '手机号', dataIndex: 'phone', width:466,align:'center', menuDisabled:true },
+		     { header: '职务', dataIndex: 'zn_name', width:466,align:'center', menuDisabled:true },
+		     
+	    ],
+	    columnLines: true,
+	    height: maxHeight,
+	    width: '100%',
+	    bbar: new Ext.PagingToolbar({  
+            store: myStore,  
+            id:'MaintenancePersonListPageToolbar',
+            displayInfo: true,  
+            pageSize: countPerPage,  
+            prependButtons: true,  
+            displayMsg : '显示第 {0}条到 {1}条记录,总共 {2}条',     
+            emptyMsg : "没有记录",  
+            firstText: '第一页',
+            prevText: '前一页',
+            nextText: '后一页',
+            lastText: '最后一页',
+            refreshText: '刷新',
+
+        }),
+        frame: true,  
+        border:false,  
+        iconCls: 'icon-grid'
 	});
 	var MaintenancePersonPanel2 = Ext.create('Ext.grid.Panel', {
-		header: {
-			height: 0,
-			border: '0px solid #000000'
+		header :{
+			height:0,
+			border:'0px solid #000000'
 		},
-		bodyStyle: 'background:#121E34;',
-		id: 'MaintenancePersonListPanel2',
-		store: myStore2,
-		region: 'center',
-		selModel: sm1,
-		columns: [
-			{ header: 'ID', dataIndex: 'id', hidden: true, menuDisabled: true },
-			{ header: '责任人ID', dataIndex: 'person_liable_id', hidden: true, menuDisabled: true },
-			{ header: '序号', dataIndex: 'xh', width: 35, menuDisabled: true },
-			{ header: '班组名称', dataIndex: 'team_name', width: 340, align: 'center', menuDisabled: true },
-		],
-		columnLines: true,
-		height: maxHeight,
-		width: '30%',
-		listeners: {
-			select: function (dataview, record, index) {//record被选中时产生的事件
-				var label = record.get('team_name');
-				var label1 = record.get('id');
-				var label2 = record.get('person_liable_id');
-				var query = new Object();
-				if (label1.length > 0) {
-					query.id = label1;
-				}
-				// query.V_LOGINNAME = V_LOGINNAME;
-				// query.V_PASSWORD =  V_PASSWORD;
-				var jsonstr = Ext.JSON.encode(query);
-				myStore1.getProxy().extraParams = {
-					queryJson: jsonstr
-				};
-				Ext.getCmp('MaintenancePersonListPageToolbar3').moveFirst();
-				document.getElementById('maintenancePerson_title211_input').value = label;
-				document.getElementById('maintenancePerson_title111_input').value = label2;
-				//	         Ext.MessageBox.alert("标题触发了"+label);
-			}
-			//	              itemdblclick: function () {
-			//	               Ext.MessageBox.alert("标题离开了");
-			//	              }
-		},
-		bbar: new Ext.PagingToolbar({
-			store: myStore2,
-			id: 'MaintenancePersonListPageToolbar2',
-			//            displayInfo: true,  
-			//            pageSize: countPerPage,  
-			//            prependButtons: true,  
-			//            displayMsg : '显示第 {0}条到 {1}条记录,总共 {2}条',     
-			//            emptyMsg : "没有记录",  
-			//            firstText: '第一页',
-			//            prevText: '前一页',
-			//            nextText: '后一页',
-			//            lastText: '最后一页',
-			//            refreshText: '刷新',
-
-		}),
-		//        frame: true,  
-		border: false,
-		iconCls: 'icon-grid'
+		bodyStyle:'background:#121E34;',
+	    id: 'MaintenancePersonListPanel2',
+	    store: myStore2,
+	    region:'center',
+	    selModel: sm1,
+	    columns: [
+	    	 { header: 'ID',  dataIndex: 'id',hidden:true, menuDisabled:true },
+	    	 { header: '责任人ID',  dataIndex: 'person_liable_id',hidden:true, menuDisabled:true },
+	    	 { header: '序号',  dataIndex: 'xh', width:35, menuDisabled:true },
+		     { header: '班组名称', dataIndex: 'team_name', width:340,align:'center', menuDisabled:true },    
+	    ],
+	    columnLines: true,
+	    height: maxHeight,
+	    width: '30%',
+	    listeners: {
+	        select: function(dataview,record,index) {//record被选中时产生的事件
+	         var label = record.get('team_name');
+	         var label1 = record.get('id');
+	         var label2 = record.get('person_liable_id');
+	         var query = new Object();
+	         if(label1.length>0){
+	           query.id = label1;
+	         }
+	         // query.V_LOGINNAME = V_LOGINNAME;
+	         // query.V_PASSWORD =  V_PASSWORD;
+	         var jsonstr = Ext.JSON.encode(query);
+	            myStore1.getProxy().extraParams = {
+	             queryJson : jsonstr
+	            };
+	            Ext.getCmp('MaintenancePersonListPageToolbar3').moveFirst();
+	            document.getElementById('maintenancePerson_title211_input').value = label;
+	            document.getElementById('maintenancePerson_title111_input').value = label2;
+//	         Ext.MessageBox.alert("标题触发了"+label);
+	        }
+//	              itemdblclick: function () {
+//	               Ext.MessageBox.alert("标题离开了");
+//	              }
+	          },
+	    bbar: new Ext.PagingToolbar({  
+            store: myStore2,
+            id:'MaintenancePersonListPageToolbar2',
+//            displayInfo: true,  
+//            pageSize: countPerPage,  
+//            prependButtons: true,  
+//            displayMsg : '显示第 {0}条到 {1}条记录,总共 {2}条',     
+//            emptyMsg : "没有记录",  
+//            firstText: '第一页',
+//            prevText: '前一页',
+//            nextText: '后一页',
+//            lastText: '最后一页',
+//            refreshText: '刷新',
+
+        }),
+//        frame: true,  
+        border:false,  
+        iconCls: 'icon-grid'
 	});
-	var MaintenancePersonPanel3 =
+	var MaintenancePersonPanel3 = 
 		Ext.create('Ext.grid.Panel', {
-			header: {
-				height: 0,
-				border: '0px solid #000000'
-			},
-			id: 'MaintenancePersonListPanel3',
-			store: myStore1,
-			region: 'center',
-			selModel: addsm,
-			columns: [
-				{ header: 'ID', dataIndex: 'rid', hidden: true, menuDisabled: true },
-				{ header: '责任人ID', dataIndex: 'person_liable_id', hidden: true, menuDisabled: true },
-				{ header: '班组ID', dataIndex: 'tdid', hidden: true, menuDisabled: true },
-				{ header: '默认值', dataIndex: 'pd', hidden: true, menuDisabled: true },
-				{ header: '序号', dataIndex: 'xh', width: 35, menuDisabled: true },
-				{ header: '组员', dataIndex: 'name', width: 633, align: 'center', menuDisabled: true },
-				//		     { header: '', dataIndex: 'zrr', width:267,align:'center', menuDisabled:true },
-
-			],
-			columnLines: true,
-			height: maxHeight,
-			width: '50%',
-			listeners: {
-
-				viewready: function () {
-					var hd_checker = this.getEl().select('div.x-grid3-hd-checker');
-					//	         if (hd_checker.hasClass('x-grid3-hd-checker')) {   
-					//	                hd_checker.removeClass('x-grid3-hd-checker'); // 去掉全选框 
-					//	            } 
-				}
-			},
-			bbar: new Ext.PagingToolbar({
-				store: myStore1,
-				id: 'MaintenancePersonListPageToolbar3',
-				displayInfo: true,
-				pageSize: countPerPage,
-				prependButtons: true,
-				displayMsg: '显示第 {0}条到 {1}条记录,总共 {2}条',
-				emptyMsg: "没有记录",
-				firstText: '第一页',
-				prevText: '前一页',
-				nextText: '后一页',
-				lastText: '最后一页',
-				refreshText: '刷新',
-
-			}),
-			border: false,
-			iconCls: 'icon-grid'
-		});
+		header :{
+			height:0,
+			border:'0px solid #000000'
+		},
+	    id: 'MaintenancePersonListPanel3',
+	    store: myStore1,
+	    region:'center',
+	    selModel: addsm,
+	    columns: [
+	    	 { header: 'ID',  dataIndex: 'rid',hidden:true, menuDisabled:true },
+	    	 { header: '责任人ID', dataIndex: 'person_liable_id',hidden:true, menuDisabled:true},
+	    	 { header: '班组ID', dataIndex: 'tdid',hidden:true, menuDisabled:true},
+	    	 { header: '默认值', dataIndex: 'pd',hidden:true, menuDisabled:true},
+	    	 { header: '序号',  dataIndex: 'xh', width:35, menuDisabled:true },
+		     { header: '组员', dataIndex: 'name', width:633,align:'center', menuDisabled:true },
+//		     { header: '', dataIndex: 'zrr', width:267,align:'center', menuDisabled:true },
+		     
+	    ],
+	    columnLines: true,
+	    height: maxHeight,
+	    width: '50%',
+	    listeners:{
+	    	
+	         viewready:function(){
+	         var hd_checker = this.getEl().select('div.x-grid3-hd-checker');
+//	         if (hd_checker.hasClass('x-grid3-hd-checker')) {   
+//	                hd_checker.removeClass('x-grid3-hd-checker'); // 去掉全选框 
+//	            } 
+	        }
+	    },
+	    bbar: new Ext.PagingToolbar({  
+            store: myStore1,  
+            id:'MaintenancePersonListPageToolbar3',
+            displayInfo: true,  
+            pageSize: countPerPage,  
+            prependButtons: true,  
+            displayMsg : '显示第 {0}条到 {1}条记录,总共 {2}条',     
+            emptyMsg : "没有记录",  
+            firstText: '第一页',
+            prevText: '前一页',
+            nextText: '后一页',
+            lastText: '最后一页',
+            refreshText: '刷新',
+
+        }),
+        border:false,
+        iconCls: 'icon-grid'
+	});
 
-	var piebar = Ext.create('Ext.panel.Panel', {
-		id: 'maintenancePersonHtml',
-		width: '100%',
-		height: 188,
-		region: 'north',
-		layout: 'form',
-		defaults: {
-			border: false
-		}
-		//        items: [childPanel1]
+	var piebar = Ext.create('Ext.panel.Panel',{
+		id:'maintenancePersonHtml',
+		width:'100%',
+		height:188,
+		region:'north',
+		layout:'form',
+		defaults:{  
+            border:false
+        }
+//        items: [childPanel1]
 	});
-	var piebar2 = Ext.create('Ext.panel.Panel', {
-		id: 'maintenancePersonHtml2',
-		width: '30%',
-		height: 140,
-		region: 'north',
-		layout: 'form',
-		bodyStyle: 'background:#121E34;',
-		defaults: {
-			border: false
-		}
-		//        items: [childPanel2]
+	var piebar2 = Ext.create('Ext.panel.Panel',{
+		id:'maintenancePersonHtml2',
+		width:'30%',
+		height:140,
+		region:'north',
+		layout:'form',
+		bodyStyle:'background:#121E34;',
+		defaults:{  
+            border:false
+        }
+//        items: [childPanel2]
 	});
-	var piebar3 = Ext.create('Ext.panel.Panel', {
-		id: 'maintenancePersonHtml3',
-		width: '50%',
-		height: 140,
-		region: 'north',
-		layout: 'form',
-		defaults: {
-			border: false
-		}
+	var piebar3 = Ext.create('Ext.panel.Panel',{
+		id:'maintenancePersonHtml3',
+		width:'50%',
+		height:140,
+		region:'north',
+		layout:'form',
+		defaults:{  
+            border:false
+        }
 	});
-	panel1 = Ext.create('Ext.panel.Panel', {
-		width: '100%',
+	panel1 = Ext.create('Ext.panel.Panel',{
+		width:'100%',
 		id: 'MaintenancePersonPiebar',
-		layout: 'border',
-		items: [
-			piebar, MaintenancePersonPanel
+		layout:'border',
+		items:[
+			piebar,MaintenancePersonPanel
 		],
-
-	});
-
-	var piebar4 = Ext.create('Ext.panel.Panel', {
-		id: 'maintenancePersonHtml4',
-		width: '30%',
-		region: 'west',
-		layout: 'border',
-		bodyStyle: 'background:#121E34;border-radius:20px;padding:10px;',
-		padding: 10,
-		items: [
-			piebar2, MaintenancePersonPanel2
+	    
+    });
+	
+	var piebar4 = Ext.create('Ext.panel.Panel',{
+		id:'maintenancePersonHtml4',
+		width:'30%',
+		region:'west',
+		layout:'border',
+		bodyStyle:'background:#121E34;border-radius:20px;padding:10px;',
+		padding:10,
+		items:[
+			piebar2,MaintenancePersonPanel2
 		]
 	});
-
-	var piebar5 = Ext.create('Ext.panel.Panel', {
-		id: 'maintenancePersonHtml5',
-		width: '50%',
-		region: 'center',
-		layout: 'border',
-		bodyStyle: 'padding:10px;',
-		padding: 10,
-		items: [
-			piebar3, MaintenancePersonPanel3
+	
+	var piebar5 = Ext.create('Ext.panel.Panel',{
+		id:'maintenancePersonHtml5',
+		width:'50%',
+		region:'center',
+		layout:'border',
+		bodyStyle:'padding:10px;',
+		padding:10,
+		items:[
+			piebar3,MaintenancePersonPanel3
 		]
 	});
-
-	var piebar6 = Ext.create('Ext.panel.Panel', {
-		id: 'maintenancePersonHtml6',
-		width: '20%',
-		region: 'east',
-		layout: 'form',
-		defaults: {
-			border: false
-		},
-		items: [childPanel6]
+	
+	var piebar6 = Ext.create('Ext.panel.Panel',{
+		id:'maintenancePersonHtml6',
+		width:'20%',
+		region:'east',
+		layout:'form',
+		defaults:{  
+            border:false
+        },
+        items: [childPanel6]
 	});
-
-	panel2 = Ext.create('Ext.panel.Panel', {
-		width: '100%',
-		id: 'MaintenancePersonPiebar2',
-		layout: 'border',
-		items: [
-			piebar4, piebar5, piebar6
-		],
-
+	
+	panel2 = Ext.create('Ext.panel.Panel',{
+			width:'100%',
+			id: 'MaintenancePersonPiebar2',
+			layout:'border',
+			items:[
+				piebar4,piebar5,piebar6
+			],
+		    
 	});
-
+	
 	Ext.create('Ext.tab.Panel', {
-		width: '100%',
-		id: 'MaintenancePersonTab',
-		activeTab: 0,
-		items: [
-			{
-				itemId: 'person',
-				title: '人员列表',
-				items: [panel1]
-			},
-			{
-				itemId: 'team',
-				title: '班组详情',
-				items: [panel2]
-			}
-		],
-		listeners: {
-			'tabchange': function (t, n) {
-				var item = n.itemId;
-				if (item == 'team') {
-					if (document.getElementById('div26_id_maintenancePersonPanel3') == undefined)
-						childPanel2();
-					if (document.getElementById('div26_id_maintenancePersonHtml3Panel3') == undefined)
-						childPanel3_fun();
-					myStore2.reload();
-				}
-			}
-		},
-		renderTo: Ext.getBody()
-
-	});
+	     width: '100%',
+	     id: 'MaintenancePersonTab',
+	     activeTab: 0,
+	     items: [
+	         {
+	          itemId:'person',
+	             title: '人员列表',
+	             items : [panel1]
+	         },
+	         {
+	          itemId:'team',
+	             title: '班组详情',
+	             items : [panel2]
+	         }
+	     ],
+	     listeners:{
+	            'tabchange':function (t, n) {
+	             var item = n.itemId;
+	             if(item=='team'){
+	              if(document.getElementById('div26_id_maintenancePersonPanel3')==undefined)
+	              childPanel2();
+	              if(document.getElementById('div26_id_maintenancePersonHtml3Panel3')==undefined)
+		          childPanel3_fun();	              
+	              myStore2.reload();
+	             }
+	            }
+	        },
+	     renderTo : Ext.getBody()
+	     
+	 });
 	myStore.reload();
 	mystore2_fun(0);
 	childPanel1();
-	$(window).resize(function () {
-		body_resize();
-		body_resize1();
-	});
-	body_resize1();
+	$(window).resize(function(){
+    	body_resize();
+    	body_resize1();
+    });
+	body_resize1();	
 	body_resize();
 });

+ 2 - 0
out/artifacts/YtIoT_Web_exploded/view/springhandle/scripts/springHandle.js

@@ -1201,6 +1201,7 @@ Ext.onReady(function(){
 			xtype:'datefield',
 	        fieldLabel:"开始日期",
 	        minValue:'07/07/2017',
+			maxValue:new Date(),
 	        minText:"当前日期选择应大于2017-07-07",
 	        format:"Y-m-d",
 	        value:Ext.util.Format.date(Ext.Date.add(new Date(),Ext.Date.MONTH,-1),"Y-m-01"),
@@ -1215,6 +1216,7 @@ Ext.onReady(function(){
 	    	xtype:'datefield',
 	        fieldLabel:"结束日期",
 	        minValue:'07/07/2017',
+			maxValue:new Date(),
 	        minText:"当前日期选择应大于2017-07-07",
 	        format:"Y-m-d",
 	        value:Ext.util.Format.date(new Date(new Date(new Date().getUTCFullYear(), new Date().getMonth(), 1) - 86400000), "Y-m-d"),