f6c0e38b59472e75a2d67d61d8309a183eea756a.svn-base 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. $(function(){
  2. //加载时添加
  3. $("#PROFESSIONAL_262").initCanstSelect('BM_TEAMERTYPE');
  4. $("#PROFESSIONAL_262").render();
  5. $("#VOLTAGE_LEVEL_262").initCanstSelect('BM_DYDJ');
  6. $("#VOLTAGE_LEVEL_262").render();
  7. $("#TEAM_QUARTERS_262").initCanstSelect('BM_TEAMER_QUARTERS');
  8. $("#TEAM_QUARTERS_262").render();
  9. //修改表单信息,获取记录
  10. if((window.location.href).split('?')[1]=="xg"){
  11. $("#titleShow").text("修改队伍人员");
  12. var fd_id = (window.location.href).split('?')[2];
  13. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  14. var params = {
  15. classid : '262',
  16. objectID : fd_id
  17. };
  18. $.ajax({
  19. url : url,
  20. type : 'post',
  21. timeout : 60000,
  22. data : params,
  23. dataType : 'json',
  24. success : function(data){
  25. $("#tabletr").attr("style","");
  26. $('#fillForm').ajaxWrite({data:data});
  27. $('#fillForm input[name="classid"]').val('262');
  28. init();
  29. PROFESSIONAL = data.PROFESSIONAL_262;
  30. $("#TYPEIN_TIME").html(data.UPDATEDATE_262);
  31. typein(data.TYPEIN_PEOPLE_262);
  32. teamid = (window.location.href).split('?')[3];
  33. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  34. var params = {
  35. classid : '261',
  36. objectID : teamid
  37. };
  38. $.ajax({
  39. url : url,
  40. type : 'post',
  41. timeout : 60000,
  42. data : params,
  43. dataType : 'json',
  44. success : function(data){
  45. // alert(data.TEAM_MEMBER_NUMBER_261);
  46. SD_XIANLU = data.SD_XIANLU_261;//输电线路
  47. SD_XIANLANG = data.SD_XIANLANG_261;//输电线缆
  48. BD_YICI = data.BD_YICI_261;//变电一次
  49. BD_ERCI = data.BD_ERCI_261;//变电二次
  50. PD_XIANLU = data.PD_XIANLU_261;//信息通信
  51. PD_XIANLANG = data.PD_XIANLANG_261;//海缆
  52. PD_DIANFANG = data.PD_DIANFANG_261;//物资
  53. PD_BAODIAN = data.PD_BAODIAN_261;//消防
  54. TONGXING = data.TONGXING_261;//后勤保障
  55. /*WANGLUO = data.WANGLUO_261;//网络
  56. SHIYAN = data.SHIYAN_261;//试验
  57. */ COLUMN = data.COLUMN_1_261;
  58. // if(data.COLUMN_1_261=="0"){
  59. // teamValue=data.FD_OBJECTID261;
  60. // }else{
  61. // teamValue=data.COLUMN_1_261;
  62. // }
  63. },
  64. error : function(e){
  65. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  66. }
  67. });
  68. },
  69. error : function(e){
  70. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  71. }
  72. });
  73. }else if((window.location.href).split('?')[1]=="xz"){
  74. $("#titleShow").text("新增队伍人员");
  75. teamid = (window.location.href).split('?')[2];//队伍第一id
  76. teamid2 = (window.location.href).split('?')[3];//0或新id
  77. if(teamid2=="0"){
  78. teamid3 = teamid;
  79. }else{
  80. teamid3 = teamid2;
  81. }
  82. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  83. var params = {
  84. classid : '261',
  85. objectID : teamid3
  86. };
  87. $.ajax({
  88. url : url,
  89. type : 'post',
  90. timeout : 60000,
  91. data : params,
  92. dataType : 'json',
  93. success : function(data){
  94. TEAM_MEMBER_NUMBER = data.TEAM_MEMBER_NUMBER_261;//队伍人数
  95. SD_XIANLU = data.SD_XIANLU_261;//输电线路
  96. SD_XIANLANG = data.SD_XIANLANG_261;//输电线缆
  97. BD_YICI = data.BD_YICI_261;//变电一次
  98. BD_ERCI = data.BD_ERCI_261;//变电二次
  99. PD_XIANLU = data.PD_XIANLU_261;//信息通信
  100. PD_XIANLANG = data.PD_XIANLANG_261;//海缆
  101. PD_DIANFANG = data.PD_DIANFANG_261;//物资
  102. PD_BAODIAN = data.PD_BAODIAN_261;//消防
  103. TONGXING = data.TONGXING_261;//后勤保障
  104. /*WANGLUO = data.WANGLUO_261;//网络
  105. SHIYAN = data.SHIYAN_261;//试验
  106. */ $('#TEAM_UNIT_262').val(data.TEAM_COMP_ID_261);
  107. $('#TEAM_NAME_262').val(data.TEAM_NAME_261);
  108. // if(data.COLUMN_1_261=="0"){
  109. // $('#TEAM_ID_262').val(data.FD_OBJECTID261);
  110. // teamValue=data.FD_OBJECTID261;
  111. // }else{
  112. // $('#TEAM_ID_262').val(data.COLUMN_1_261);
  113. // teamValue=data.COLUMN_1_261;
  114. // }
  115. $('#TEAM_ID_262').val(teamid);
  116. /******************录入人信息start********************/
  117. /* 页面展示用 */
  118. //取登录用户信息
  119. //登录用户姓名 要调整,还是要用id
  120. var userName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  121. $("#TYPEIN_PEOPLE").html(userName);
  122. //用户手机号
  123. var getMobile = top.com.sinosoft.lz.system.user.LoginInfo.getMobile();
  124. if(getMobile==undefined){
  125. $("#TYPEIN_PEOPLE_PHONE_NUM").html("暂无手机号码");
  126. }else{
  127. $("#TYPEIN_PEOPLE_PHONE_NUM").html(getMobile);
  128. }
  129. //用户所属单位
  130. var getCorp_names = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  131. $("#UNITE").html(getCorp_names);
  132. //用户所属部门
  133. var getDeptnames = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
  134. $("#DEPT").html(getDeptnames);
  135. /*****************录入人信息end*********************/
  136. getSortNo(teamid);
  137. },
  138. error : function(e){
  139. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  140. }
  141. });
  142. }
  143. $("#back").hover(function(){
  144. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  145. },function(){
  146. $(this).attr("src","/nwyj/images/temp/back.png");
  147. });
  148. });
  149. function getSortNo(teamid){
  150. var url = $.pathname() + '/ws/ExcelTeamer/TeamerExcelToDBTableTool/getAddSort';
  151. var params = {
  152. id : teamid
  153. };
  154. $.ajax({
  155. url : url,
  156. type : 'post',
  157. timeout : 60000,
  158. data : params,
  159. dataType : 'json',
  160. success : function(data){
  161. $("#SORT_NO_262").val(data);
  162. },
  163. error : function(e){
  164. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  165. }
  166. });
  167. }
  168. var teamid;//队伍ID
  169. var teamid2;
  170. var teamid3;
  171. var TEAM_MEMBER_NUMBER = "";//队伍人数
  172. var teamValue;//修改队伍是的fd_id
  173. var SD_XIANLU;var SD_XIANLANG;var BD_YICI;var BD_ERCI;var PD_XIANLU;var PD_XIANLANG;var PD_DIANFANG;var PD_BAODIAN;var TONGXING;var WANGLUO;var SHIYAN; var COLUMN;
  174. var PROFESSIONAL;//修改之前的专业
  175. var zy;//修改之后的专业
  176. //加载时判断单选按钮
  177. function init(){
  178. // alert(1111);
  179. var sex = document.getElementById("SEX_262").value;
  180. if(sex=="1"){
  181. // alert(sex);
  182. $("input:radio[name=ra]").eq(0).attr("checked",true);
  183. }
  184. if(sex=="0"){
  185. $("input:radio[name=ra]").eq(1).attr("checked",true);
  186. }
  187. }
  188. //录入人信息
  189. function typein(id){
  190. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  191. var params1 = {
  192. classid : '880',
  193. objectID : id
  194. };
  195. $.ajax({
  196. url : url,
  197. type : 'post',
  198. timeout : 60000,
  199. data : params1,
  200. async:false, //异步
  201. dataType : 'json',
  202. success : function(data){
  203. $("#TYPEIN_PEOPLE").html(data.REAL_NAME_880); //录入人
  204. $("#TYPEIN_PEOPLE_PHONE_NUM").html(data.MOBILE_880); //手机
  205. // $("#UNITE").html(data.COMPANY_ID_880_SHOW);//所属单位
  206. $("#DEPT").html(data.ORG_ID_880_SHOW);//所属部门
  207. getDeptName(data.DEPT_ID_880);
  208. },
  209. error : function(e){
  210. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  211. }
  212. });
  213. }
  214. function getDeptName(id){
  215. $.ajax({
  216. url : $.pathname()+ "/ws/DrillCount/DrillCountService/getDeptNameInfo",
  217. type : 'post',
  218. timeout : 60000,
  219. data : {id:id},
  220. dataType : 'text',
  221. success : function(data){
  222. $("#UNITE").html(data);
  223. }
  224. });
  225. }
  226. //表单验证
  227. function validateForm(containerId){
  228. //判断内外队伍
  229. var seletedValue;
  230. if(document.getElementById("radio-1").checked){
  231. seletedValue = document.getElementById("radio-1").value;
  232. }else if(document.getElementById("radio-2").checked){
  233. seletedValue = document.getElementById("radio-2").value;
  234. }
  235. $('#SEX_262').val(seletedValue);
  236. var NAME_262 = $('#NAME_262').val();
  237. var SEX_262 = $('#SEX_262').val();
  238. var ID_NUMBER_262 = $('#ID_NUMBER_262').val();
  239. var BIRTH_DATE_262 = $('#BIRTH_DATE_262').val();
  240. var WORK_TYPE_AGE_262 = $('#WORK_TYPE_AGE_262').val();
  241. var PROFESSIONAL_262 = $('#PROFESSIONAL_262').val();
  242. var TELEPHONE_262 = $('#TELEPHONE_262').val();
  243. var TEAM_QUARTERS_262 = $('#TEAM_QUARTERS_262').val();
  244. var valid = $(containerId).validationEngine({returnIsValid: true});
  245. if(valid == true){
  246. var id = document.getElementById("fd_id262").value;
  247. if(id==""){
  248. add();
  249. }else{
  250. var Zhuanye1;
  251. var Zhuanye2;
  252. zy = $('#PROFESSIONAL_262').val();
  253. //修改专业
  254. if(zy!=PROFESSIONAL){
  255. if(PROFESSIONAL=="1"){
  256. Zhuanye1 = "SD_XIANLU='"+ (Number(SD_XIANLU)-1) +"',";
  257. }else if(PROFESSIONAL=="2"){
  258. Zhuanye1 = "SD_XIANLANG='"+ (Number(SD_XIANLANG)-1) +"',";
  259. }else if(PROFESSIONAL=="3"){
  260. Zhuanye1 = "BD_YICI='"+ (Number(BD_YICI)-1) +"',";
  261. }else if(PROFESSIONAL=="4"){
  262. Zhuanye1 = "BD_ERCI='"+ (Number(BD_ERCI)-1) +"',";
  263. }else if(PROFESSIONAL=="5"){
  264. Zhuanye1 = "PD_XIANLU='"+ (Number(PD_XIANLU)-1) +"',";
  265. }else if(PROFESSIONAL=="6"){
  266. Zhuanye1 = "PD_XIANLANG='"+ (Number(PD_XIANLANG)-1) +"',";
  267. }else if(PROFESSIONAL=="7"){
  268. Zhuanye1 = "PD_DIANFANG='"+ (Number(PD_DIANFANG)-1) +"',";
  269. }else if(PROFESSIONAL=="8"){
  270. Zhuanye1 = "PD_BAODIAN='"+ (Number(PD_BAODIAN)-1) +"',";
  271. }else if(PROFESSIONAL=="9"){
  272. Zhuanye1 = "TONGXING='"+ (Number(TONGXING)-1) +"',";
  273. }
  274. if(zy =="1"){
  275. Zhuanye2 = "SD_XIANLU='"+ (Number(SD_XIANLU)+1) +"'";
  276. }else if(zy=="2"){
  277. Zhuanye2 = "SD_XIANLANG='"+ (Number(SD_XIANLANG)+1) +"'";
  278. }else if(zy=="3"){
  279. Zhuanye2 = "BD_YICI='"+ (Number(BD_YICI)+1) +"'";
  280. }else if(zy=="4"){
  281. Zhuanye2 = "BD_ERCI='"+ (Number(BD_ERCI)+1) +"'";
  282. }else if(zy=="5"){
  283. Zhuanye2 = "PD_XIANLU='"+ (Number(PD_XIANLU)+1) +"'";
  284. }else if(zy=="6"){
  285. Zhuanye2 = "PD_XIANLANG='"+ (Number(PD_XIANLANG)+1) +"'";
  286. }else if(zy=="7"){
  287. Zhuanye2 = "PD_DIANFANG='"+ (Number(PD_DIANFANG)+1) +"'";
  288. }else if(zy=="8"){
  289. Zhuanye2 = "PD_BAODIAN='"+ (Number(PD_BAODIAN)+1) +"'";
  290. }else if(zy=="9"){
  291. Zhuanye2 = "TONGXING='"+ (Number(TONGXING)+1) +"'";
  292. }
  293. Zhuanye = Zhuanye1 + Zhuanye2;
  294. $.post($.pathname() +"/ws/EmcPlan/EmgencyPlanService/tremUpdate/", {
  295. //应急队伍各个类型人数:字段名 + 人数 例如:应急保电人数:PD_BAODIAN:1
  296. comp_id :Zhuanye,
  297. //将应急队伍ID作为公共变量在这里取就行。
  298. fd_id : (window.location.href).split('?')[4],//应急队伍ID
  299. }, function(result) {
  300. if (result.Msg.sucsess == true) {
  301. // edit();
  302. } else {
  303. top.Dialog.alert("保存失败");
  304. return;
  305. }
  306. }, "json");
  307. }
  308. edit();
  309. }
  310. }else{
  311. if(NAME_262==""||NAME_262==null){
  312. top.Dialog.alert('姓名不能为空!');
  313. return;
  314. }
  315. var PatternsDict = /^[\u4e00-\u9fa5]+$/;
  316. if(!PatternsDict.test(NAME_262)){
  317. top.Dialog.alert('请输入中文!');
  318. return;
  319. }
  320. if(SEX_262==""||SEX_262==null){
  321. top.Dialog.alert('请选择性别!');
  322. return;
  323. }
  324. if(ID_NUMBER_262!=""){
  325. if(!validateIdCard(ID_NUMBER_262)){
  326. top.Dialog.alert('请输入有效的身份证号码!');
  327. return;
  328. }
  329. }
  330. if(BIRTH_DATE_262==""||BIRTH_DATE_262==null){
  331. top.Dialog.alert('出生年月不能为空!');
  332. return;
  333. }
  334. if(WORK_TYPE_AGE_262==""||WORK_TYPE_AGE_262==null){
  335. top.Dialog.alert('本工种工龄不能为空!');
  336. return;
  337. }
  338. if(PROFESSIONAL_262==""||PROFESSIONAL_262==null){
  339. top.Dialog.alert('请选择专业!');
  340. return;
  341. }
  342. if(TELEPHONE_262==""||TELEPHONE_262==null){
  343. top.Dialog.alert('联系方式不能为空!');
  344. return;
  345. }
  346. if(TEAM_QUARTERS_262==""||TEAM_QUARTERS_262==null){
  347. top.Dialog.alert('请选择队伍岗位!');
  348. return;
  349. }
  350. top.Dialog.alert('表单填写不正确,请按要求填写!');
  351. }
  352. }
  353. function validateIdCard(idCard){
  354. //15位和18位身份证号码的正则表达式
  355. var regIdCard=/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
  356. //如果通过该验证,说明身份证格式正确,但准确性还需计算
  357. if(regIdCard.test(idCard)){
  358. if(idCard.length==18){
  359. var idCardWi=new Array( 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ); //将前17位加权因子保存在数组里
  360. var idCardY=new Array( 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2 ); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
  361. var idCardWiSum=0; //用来保存前17位各自乖以加权因子后的总和
  362. for(var i=0;i<17;i++){
  363. idCardWiSum+=idCard.substring(i,i+1)*idCardWi[i];
  364. }
  365. var idCardMod=idCardWiSum%11;//计算出校验码所在数组的位置
  366. var idCardLast=idCard.substring(17);//得到最后一位身份证号码
  367. //如果等于2,则说明校验码是10,身份证号码最后一位应该是X
  368. if(idCardMod==2){
  369. if(idCardLast=="X"||idCardLast=="x"){
  370. return true;
  371. }else{
  372. return false;
  373. }
  374. }else{
  375. //用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
  376. if(idCardLast==idCardY[idCardMod]){
  377. return true;
  378. }else{
  379. return false;
  380. }
  381. }
  382. }
  383. }else{
  384. return false;
  385. }
  386. }
  387. var Zhuanye = "";
  388. //判断新增的人是什么专业的人,后面好修改应急队伍各个专业的人数。其他不用变。
  389. function isZhuanye(){
  390. var isZhuanye = $("#PROFESSIONAL_262").val();
  391. if(isZhuanye =="1"){
  392. //PLAN_STAT='1' TEAM_MEMBER_NUMBER
  393. Zhuanye = "SD_XIANLU='"+ (Number(SD_XIANLU)+1) +"' , TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  394. }else if(isZhuanye=="2"){
  395. Zhuanye = "SD_XIANLANG='"+(Number(SD_XIANLANG)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  396. }else if(isZhuanye=="3"){
  397. Zhuanye = "BD_YICI='"+(Number(BD_YICI)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  398. }else if(isZhuanye=="4"){
  399. Zhuanye = "BD_ERCI='"+(Number(BD_ERCI)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  400. }else if(isZhuanye=="5"){
  401. Zhuanye = "PD_XIANLU='"+(Number(PD_XIANLU)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  402. }else if(isZhuanye=="6"){
  403. Zhuanye = "PD_XIANLANG='"+(Number(PD_XIANLANG)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  404. }else if(isZhuanye=="7"){
  405. Zhuanye = "PD_DIANFANG='"+(Number(PD_DIANFANG)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  406. }else if(isZhuanye=="8"){
  407. Zhuanye = "PD_BAODIAN='"+(Number(PD_BAODIAN)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  408. }else if(isZhuanye=="9"){
  409. Zhuanye = "TONGXING='"+(Number(TONGXING)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  410. }/*else if(isZhuanye=="10"){
  411. Zhuanye = "WANGLUO='"+(Number(WANGLUO)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  412. }else if(isZhuanye=="11"){
  413. Zhuanye = "SHIYAN='"+(Number(SHIYAN)+1)+"', TEAM_MEMBER_NUMBER='"+(Number(TEAM_MEMBER_NUMBER )+1)+"'";
  414. }*/
  415. }
  416. //传入应急队伍的ID
  417. function tremUpdate(){
  418. isZhuanye();
  419. $.post($.pathname() +"/ws/EmcPlan/EmgencyPlanService/tremUpdate/", {
  420. //应急队伍各个类型人数:字段名 + 人数 例如:应急保电人数:PD_BAODIAN:1
  421. comp_id : Zhuanye,
  422. //将应急队伍ID作为公共变量在这里取就行。
  423. fd_id : teamid3,//应急队伍ID
  424. }, function(result) {
  425. if (result.Msg.sucsess == true) {
  426. $("body").eq(0).hideLoading();
  427. $.messager.alert("保存成功",null,null,null,-1);
  428. window.history.back();
  429. } else {
  430. $("body").eq(0).hideLoading();
  431. top.Dialog.alert("保存失败");
  432. return;
  433. }
  434. }, "json");
  435. }
  436. //新增
  437. function add(){
  438. //录入人id
  439. var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  440. $('#TYPEIN_PEOPLE_262').val(userId);
  441. $("body").eq(0).showLoading();
  442. var formValue = $('#fillForm').serialize();
  443. var url = $.pathname() + '/ws/crud/CRUDService/create';
  444. $.ajax({
  445. url : url,
  446. type : 'post',
  447. data : formValue,
  448. dataType : 'text',
  449. timeout : 60000,
  450. success : function(data){
  451. // $.messager.alert('保存成功');
  452. tremUpdate();
  453. // window.location.href = "teamerupdate";
  454. },
  455. error : function(){
  456. $.messager.alert('操作失败');
  457. }
  458. });
  459. }
  460. //修改
  461. function edit(){
  462. //录入人id
  463. var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  464. $('#TYPEIN_PEOPLE_262').val(userId);
  465. $("body").eq(0).showLoading();
  466. var formValue = $('#fillForm').serialize();
  467. var url = $.pathname() + '/ws/crud/CRUDService/update';
  468. $.ajax({
  469. url : url,
  470. type : 'post',
  471. data : formValue,
  472. dataType : 'text',
  473. timeout : 60000,
  474. success : function(data){
  475. $("body").eq(0).hideLoading();
  476. $.messager.alert('保存成功');
  477. window.history.back();
  478. // if(COLUMN=="0"){
  479. // window.location.href="teamer-inside.jsp?"+teamValue+"?0";//修改前
  480. // }else{
  481. // window.location.href="teamer-inside.jsp?"+COLUMN+"?"+teamValue;//修改后
  482. // }
  483. },
  484. error : function(){
  485. $("body").eq(0).hideLoading();
  486. $.messager.alert('操作失败');
  487. }
  488. });
  489. }
  490. function goBack(){
  491. window.history.back();
  492. }
  493. //重置
  494. function resetSearch(){
  495. document.location.reload();
  496. $("#PROFESSIONAL_262").resetValue();
  497. $("#VOLTAGE_LEVEL_262").resetValue();
  498. $("#TEAM_QUARTERS_262").resetValue();
  499. }
  500. $.messager=top.Dialog;