MyAppeal.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. MWF.xDesktop.requireApp("Attendance", "Explorer", null, false);
  2. MWF.xDesktop.requireApp("Selector", "package", null, false);
  3. MWF.xDesktop.requireApp("Template", "MForm", null, false);
  4. MWF.xApplication.Attendance.MyAppeal = new Class({
  5. Extends: MWF.xApplication.Attendance.Explorer,
  6. Implements: [Options, Events],
  7. initialize: function(node, app, actions, options){
  8. this.setOptions(options);
  9. this.app = app;
  10. this.path = "../x_component_Attendance/$MyAppeal/";
  11. this.cssPath = "../x_component_Attendance/$MyAppeal/"+this.options.style+"/css.wcss";
  12. this._loadCss();
  13. this.actions = actions;
  14. this.node = $(node);
  15. this.initData();
  16. if (!this.personActions) this.personActions = new MWF.xAction.org.express.RestActions();
  17. },
  18. load: function(){
  19. this.loadToolbar();
  20. this.loadFilter();
  21. this.loadContentNode();
  22. var month = (new Date().getMonth()+1).toString();
  23. if( month.length == 1 )month = "0"+month;
  24. var filterData = {
  25. "status" : "999",
  26. "yearString" : new Date().getFullYear().toString(),
  27. "monthString" : month
  28. };
  29. this.loadView( filterData );
  30. this.setNodeScroll();
  31. },
  32. loadFilter: function(){
  33. this.fileterNode = new Element("div.fileterNode", {
  34. "styles" : this.css.fileterNode
  35. }).inject(this.node);
  36. var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' style='width: 560px;font-size: 14px;color:#666'>"+
  37. "<tr>" +
  38. " <td styles='filterTableTitle' item='date'></td>"+
  39. " <td styles='filterTableTitle' lable='status'></td>"+
  40. " <td styles='filterTableValue' item='status'></td>" +
  41. " <td styles='filterTableTitle' lable='appealReason'></td>"+
  42. " <td styles='filterTableValue' item='appealReason'></td>" +
  43. " <td styles='filterTableValue' item='action'></td>" +
  44. "</tr>" +
  45. "</table>";
  46. this.fileterNode.set("html",html);
  47. MWF.xDesktop.requireApp("Template", "MForm", function(){
  48. this.form = new MForm( this.fileterNode, {}, {
  49. isEdited : true,
  50. itemTemplate : {
  51. date : { "type" : "innerText", value : (new Date).format(this.app.lp.dateFormatMonth) },
  52. status : {
  53. "text" : "申述状态",
  54. "type" : "select",
  55. "value" : "999",
  56. "selectText" :["所有状态","待处理","审批通过","审批未通过"],
  57. "selectValue" :["999","0","1","-1"]
  58. },
  59. appealReason : {
  60. "text" : "申述原因",
  61. "type" : "select",
  62. "selectText" :["","临时请假","出差","因公外出","其他"]
  63. },
  64. action : { "value" : "查询", type : "button", className : "filterButton", event : {
  65. click : function(){
  66. var result = this.form.getResult(true,",",true,true,false);
  67. if( !result )return;
  68. this.loadView( result );
  69. }.bind(this)
  70. }}
  71. }
  72. }, this.app, this.css);
  73. this.form.load();
  74. }.bind(this), true);
  75. },
  76. //loadFilter : function(){
  77. // this.fileterNode = new Element("div.fileterNode", {
  78. // "styles" : this.css.fileterNode
  79. // }).inject(this.node)
  80. //
  81. // var table = new Element("table", {
  82. // "width" : "100%", "border" : "0", "cellpadding" : "5", "cellspacing" : "0", "styles" : this.css.filterTable, "class" : "filterTable"
  83. // }).inject( this.fileterNode );
  84. //
  85. // var tr = new Element("tr").inject(table);
  86. //
  87. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : (new Date).format(this.app.lp.dateFormatMonth) }).inject(tr);
  88. //
  89. // this.createStatusSelectTd(tr);
  90. // this.createAppealReasonTd(tr);
  91. // //this.createUnitTd(tr);
  92. // //this.createPersonTd( tr );
  93. // //this.createYearSelectTd( tr );
  94. // //this.createMonthSelectTd( tr );
  95. // this.createActionTd( tr );
  96. //},
  97. //createStatusSelectTd : function( tr ){
  98. // var _self = this;
  99. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "审批状态" }).inject(tr);
  100. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  101. // this.status = new MDomItem( td, {
  102. // "name" : "status",
  103. // "type" : "select",
  104. // "value" : "999",
  105. // "selectText" :["所有状态","待处理","审批通过","审批未通过"],
  106. // "selectValue" :["999","0","1","-1"]
  107. // }, true, this.app );
  108. // this.status.load();
  109. //},
  110. //createAppealReasonTd : function( tr ){
  111. // var _self = this;
  112. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "申诉原因" }).inject(tr);
  113. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  114. // this.appealReason = new MDomItem( td, {
  115. // "name" : "appealReason",
  116. // "type" : "select",
  117. // "selectText" :["","临时请假","出差","因公外出","其他"]
  118. // }, true, this.app );
  119. // this.appealReason.load();
  120. //},
  121. //createUnitTd : function(tr){
  122. // var _self = this;
  123. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "部门" }).inject(tr);
  124. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  125. // this.unitName = new MDomItem( td, {
  126. // "name" : "unitName",
  127. // "style" : {"width":"60px"},
  128. // "defaultValue" : this.app.manageUnits.length > 0 ? this.app.manageUnits[0] : "",
  129. // "event" : {
  130. // "click" : function(mdi){ _self.selecePerson( mdi, "unit" ); }
  131. // }
  132. // }, true, this.app );
  133. // this.unitName.load();
  134. //},
  135. //createPersonTd : function(tr){
  136. // var _self = this;
  137. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "人员" }).inject(tr);
  138. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  139. // this.empName = new MDomItem( td, {
  140. // "name" : "empName",
  141. // "style" : {"width":"60px"},
  142. // "event" : {
  143. // "click" : function(mdi){ _self.selecePerson( mdi, "person" ); }
  144. // }
  145. // }, true, this.app );
  146. // this.empName.load();
  147. //},
  148. //createYearSelectTd : function( tr ){
  149. // var _self = this;
  150. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "年度" }).inject(tr);
  151. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  152. // this.yearString = new MDomItem( td, {
  153. // "name" : "yearString",
  154. // "type" : "select",
  155. // "selectValue" : function(){
  156. // var years = [];
  157. // var year = new Date().getFullYear();
  158. // for(var i=0; i<6; i++ ){
  159. // years.push( year-- );
  160. // }
  161. // return years;
  162. // }
  163. // }, true, this.app );
  164. // this.yearString.load();
  165. //},
  166. //createMonthSelectTd : function( tr ){
  167. // var _self = this;
  168. // var td = new Element("td", { "styles" : this.css.filterTableTitle, "text" : "月份" }).inject(tr);
  169. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  170. // this.monthString = new MDomItem( td, {
  171. // "name" : "monthString",
  172. // "type" : "select",
  173. // "selectValue" :["","01","02","03","04","05","06","07","08","09","10","11","12"]
  174. // }, true, this.app );
  175. // this.monthString.load();
  176. //},
  177. //createActionTd : function( tr ){
  178. // var td = new Element("td", { "styles" : this.css.filterTableValue }).inject(tr);
  179. // var input = new Element("button",{
  180. // "text" : "查询",
  181. // "styles" : this.css.filterButton
  182. // }).inject(td);
  183. // input.addEvent("click", function(){
  184. // var filterData = {
  185. // status : this.status.getValue(),
  186. // appealReason : this.appealReason.getValue(),
  187. // //unitName : this.unitName.getValue(),
  188. // //empName : this.empName.getValue(),
  189. // //yearString : this.yearString.getValue(),
  190. // //monthString : this.monthString.getValue()
  191. // }
  192. // this.loadView( filterData );
  193. // }.bind(this))
  194. //},
  195. //selecePerson: function( el, type ){
  196. // var text = "选择人员"
  197. // if( type=="topUnit") {
  198. // text = "选择公司"
  199. // }else if( type=="unit"){
  200. // text = "选择部门"
  201. // }
  202. // var options = {
  203. // "type": type, //topUnit unit person,
  204. // "title": text,
  205. // "count" : "1",
  206. // "values": [ el.get("value") ] || [],
  207. // "onComplete": function(items){
  208. // var arr = [];
  209. // items.each(function(item){
  210. // arr.push(item.data.name);
  211. // }.bind(this));
  212. // el.set("value",arr.join(","));
  213. // }.bind(this)
  214. // };
  215. // var selector = new MWF.O2Selector(this.app.content, options);
  216. //},
  217. setContentSize: function(){
  218. var toolbarSize = this.toolbarNode ? this.toolbarNode.getSize() : {"x":0,"y":0};
  219. var titlebarSize = this.app.titleBar ? this.app.titleBar.getSize() : {"x":0,"y":0};
  220. var filterSize = this.fileterNode ? this.fileterNode.getSize() : {"x":0,"y":0};
  221. var nodeSize = this.node.getSize();
  222. var pt = this.elementContentNode.getStyle("padding-top").toFloat();
  223. var pb = this.elementContentNode.getStyle("padding-bottom").toFloat();
  224. //var filterSize = this.filterNode.getSize();
  225. var filterConditionSize = this.filterConditionNode ? this.filterConditionNode.getSize() : {"x":0,"y":0};
  226. var height = nodeSize.y-toolbarSize.y-pt-pb-filterConditionSize.y-titlebarSize.y-filterSize.y;
  227. this.elementContentNode.setStyle("height", ""+height+"px");
  228. this.pageCount = (height/30).toInt()+5;
  229. if (this.view && this.view.items.length<this.pageCount){
  230. this.view.loadElementList(this.pageCount-this.view.items.length);
  231. }
  232. },
  233. loadView : function( filterData ){
  234. this.elementContentNode.empty();
  235. this.view = new MWF.xApplication.Attendance.MyAppeal.View(this.elementContentNode, this.app,this, this.viewData, this.options.searchKey );
  236. this.view.filterData = filterData;
  237. this.view.load();
  238. this.setContentSize();
  239. },
  240. createDocument: function(){
  241. if(this.view)this.view._createDocument();
  242. }
  243. });
  244. MWF.xApplication.Attendance.MyAppeal.View = new Class({
  245. Extends: MWF.xApplication.Attendance.Explorer.View,
  246. _createItem: function(data){
  247. return new MWF.xApplication.Attendance.MyAppeal.Document(this.table, data, this.explorer, this);
  248. },
  249. _getCurrentPageData: function(callback, count){
  250. if(!count )count=20;
  251. var id = (this.items.length) ? this.items[this.items.length-1].data.id : "(0)";
  252. var filter = this.filterData || {};
  253. var month = (new Date().getMonth()+1).toString();
  254. if( month.length == 1 )month = "0"+month;
  255. filter.yearString = new Date().getFullYear().toString();
  256. filter.monthString = month;
  257. filter.empName = layout.desktop.session.user.distinguishedName;
  258. this.actions.listAppealFilterNext(id, count, filter, function(json){
  259. var data = json.data;
  260. data.sort( function( a, b ){
  261. return parseInt( b.appealDateString.replace(/-/g,"") ) - parseInt( a.appealDateString.replace(/-/g,"") );
  262. });
  263. json.data = data;
  264. if (callback) callback(json);
  265. });
  266. },
  267. _removeDocument: function(documentData, all){
  268. },
  269. _createDocument: function(){
  270. },
  271. _openDocument: function( documentData ){
  272. if(!!documentData.appealAuditInfo){
  273. var workid = documentData.appealAuditInfo.workId;
  274. var options = {"workId":workid, "appId": "process.Work"+workid};
  275. this.app.desktop.openApplication(null, "process.Work", options);
  276. }else{
  277. var appeal = new MWF.xApplication.Attendance.MyAppeal.Appeal(this.explorer, documentData );
  278. appeal.open();
  279. }
  280. }
  281. });
  282. MWF.xApplication.Attendance.MyAppeal.Document = new Class({
  283. Extends: MWF.xApplication.Attendance.Explorer.Document,
  284. agree : function(){
  285. },
  286. deny : function(){
  287. }
  288. });
  289. MWF.xApplication.Attendance.MyAppeal.Appeal = new Class({
  290. Extends: MWF.widget.Common,
  291. initialize: function( explorer, data ){
  292. this.explorer = explorer;
  293. this.app = explorer.app;
  294. this.data = data || {};
  295. //this.app.restActions.getAppeal(this.data.detailId, function(json){
  296. // this.data = json.data
  297. //}.bind(this),null,false)
  298. //alert(JSON.stringify(this.data))
  299. this.css = this.explorer.css;
  300. this.load();
  301. },
  302. load: function(){
  303. this.app.restActions.getDetail(this.data.detailId, function(json){
  304. this.data.onDutyTime = json.data.onDutyTime;
  305. this.data.offDutyTime = json.data.offDutyTime;
  306. }.bind(this),null,false)
  307. },
  308. open: function(e){
  309. this.isNew = false;
  310. this.isEdited = false;
  311. this._open();
  312. },
  313. create: function(){
  314. this.isNew = true;
  315. this._open();
  316. },
  317. edit: function(){
  318. this.isEdited = true;
  319. this._open();
  320. },
  321. _open : function(){
  322. this.createMarkNode = new Element("div", {
  323. "styles": this.css.createMarkNode,
  324. "events": {
  325. "mouseover": function(e){e.stopPropagation();},
  326. "mouseout": function(e){e.stopPropagation();}
  327. }
  328. }).inject(this.app.content, "after");
  329. this.createAreaNode = new Element("div", {
  330. "styles": this.css.createAreaNode
  331. });
  332. this.createNode();
  333. this.createAreaNode.inject(this.createMarkNode, "after");
  334. this.createAreaNode.fade("in");
  335. this.setCreateNodeSize();
  336. this.setCreateNodeSizeFun = this.setCreateNodeSize.bind(this);
  337. this.addEvent("resize", this.setCreateNodeSizeFun);
  338. },
  339. createNode: function(){
  340. var _self = this;
  341. this.createNode = new Element("div", {
  342. "styles": this.css.createNode
  343. }).inject(this.createAreaNode);
  344. //
  345. //this.createIconNode = new Element("div", {
  346. // "styles": this.isNew ? this.css.createNewNode : this.css.createIconNode
  347. //}).inject(this.createNode);
  348. this.createContainerNode = new Element("div", {
  349. "styles": this.css.createContainerNode
  350. }).inject(this.createNode);
  351. this.setScrollBar( this.createContainerNode );
  352. this.createFormNode = new Element("div", {
  353. "styles": this.css.createFormNode
  354. }).inject(this.createContainerNode);
  355. this.createTableContainer = new Element("div", {
  356. "styles": this.css.createTableContainer
  357. }).inject(this.createFormNode);
  358. this.createTableArea = new Element("div", {
  359. "styles": this.css.createTableArea
  360. }).inject(this.createTableContainer);
  361. var d = this.data;
  362. var appealStatus = "发起";
  363. if (d.status == 0 ) {
  364. appealStatus = "待处理"
  365. } else if (d.status == 1) {
  366. appealStatus = "审批通过"
  367. } else if (d.status == -1) {
  368. appealStatus = "申诉不通过"
  369. }
  370. this.data.appealStatusShow = appealStatus;
  371. var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>"+
  372. "<tr><td colspan='4' styles='formTableHead'>申诉申请单</td></tr>" +
  373. "<tr><td styles='formTableTitle'>员工姓名</td>"+
  374. " <td styles='formTableValue'>"+this.data.empName.split("@")[0]+"</td>" +
  375. " <td styles='formTableTitle' lable='recordDateString'></td>"+
  376. " <td styles='formTableValue' item='recordDateString'></td></tr>" +
  377. "<tr><td styles='formTableTitle' lable='onDutyTime'></td>"+
  378. " <td styles='formTableValue' item='onDutyTime'></td>" +
  379. " <td styles='formTableTitle' lable='offDutyTime'></td>"+
  380. " <td styles='formTableValue' item='offDutyTime'></td></tr>" +
  381. "<tr><td styles='formTableTitle' lable='appealStatusShow'></td>"+
  382. " <td styles='formTableValue' item='appealStatusShow' colspan='3'></td></tr>" +
  383. "<tr><td styles='formTableTitle' lable='appealReason'></td>"+
  384. " <td styles='formTableValue' item='appealReason'></td>" +
  385. " <td styles='formTableTitle' lable='processPerson1Show'></td>"+
  386. " <td styles='formTableValue' item='processPerson1Show'></td></tr>" +
  387. "<tr contain='selfHolidayType'><td styles='formTableTitle' lable='selfHolidayType'></td>"+
  388. " <td styles='formTableValue' item='selfHolidayType' colspan='3'></td></tr>" +
  389. "<tr contain='address'><td styles='formTableTitle' lable='address'></td>"+
  390. " <td styles='formTableValue' item='address' colspan='3'></td></tr>" +
  391. "<tr contain='startTime'><td styles='formTableTitle' lable='startTime'></td>"+
  392. " <td styles='formTableValue' item='startTime' colspan='3'></td></tr>" +
  393. "<tr contain='endTime'><td styles='formTableTitle' lable='endTime'></td>"+
  394. " <td styles='formTableValue' item='endTime' colspan='3'></td></tr>" +
  395. "<tr contain='appealDescription'><td styles='formTableTitle' lable='appealDescription'></td>"+
  396. " <td styles='formTableValue' item='appealDescription' colspan='3'></td></tr>" +
  397. "<tr contain='opinion1'><td styles='formTableTitle' lable='opinion1'></td>"+
  398. " <td styles='formTableValue' item='opinion1' colspan='3'></td></tr>" +
  399. "</table>";
  400. this.createTableArea.set("html",html);
  401. this.document = new MForm( this.createTableArea, this.data, {
  402. style : "popup",
  403. isEdited : this.isEdited || this.isNew,
  404. itemTemplate : {
  405. recordDateString : { text:"考勤日期", type : "innertext"},
  406. onDutyTime : { text:"上班打卡时间", type : "innertext"},
  407. offDutyTime : { text:"下班打卡时间", type : "innertext"},
  408. statusShow : { text:"考勤状态", type : "innertext" },
  409. appealStatusShow : { text:"审批状态",type : "innertext"},
  410. processPerson1Show : {text:"审核人",type:"innertext", value : this.data.processPerson1.split("@")[0] },
  411. appealReason : {
  412. notEmpty : true,
  413. text:"申述原因",
  414. type : "select",
  415. selectValue : ["","临时请假","出差","因公外出","其他"],
  416. event : { change : function(mdi){
  417. _self.switchFieldByAppealReason(mdi.getValue());
  418. }}
  419. },
  420. address : { text:"地点" },
  421. selfHolidayType : {
  422. text:"请假类型",
  423. type : "select",
  424. selectValue : ["","带薪年休假","带薪病假","带薪福利假","扣薪事假","其他"]
  425. },
  426. startTime : { text:"开始日期", tType : "datetime" },
  427. endTime : { text:"结束日期", tType : "datetime" },
  428. appealDescription : { text:"事由" },
  429. opinion1 : { text :"审批意见" }
  430. }
  431. }, this.app,this.css);
  432. this.document.load();
  433. _self.switchFieldByAppealReason(this.data.appealReason);
  434. //createFormNode.set("html", html);
  435. //this.setScrollBar(this.createTableContainer)
  436. this.cancelActionNode = new Element("div", {
  437. "styles": this.css.createCancelActionNode,
  438. "text": "关闭"
  439. }).inject(this.createFormNode);
  440. this.cancelActionNode.addEvent("click", function(e){
  441. this.cancelCreate(e);
  442. }.bind(this));
  443. if( this.isNew || this.isEdited){
  444. this.denyActionNode = new Element("div", {
  445. "styles": this.css.createDenyActionNode,
  446. "text": "不同意"
  447. }).inject(this.createFormNode);
  448. this.createOkActionNode = new Element("div", {
  449. "styles": this.css.createOkActionNode,
  450. "text": "同意"
  451. }).inject(this.createFormNode);
  452. this.denyActionNode.addEvent("click", function(e){
  453. this.deny(e);
  454. }.bind(this));
  455. this.createOkActionNode.addEvent("click", function(e){
  456. this.okCreate(e);
  457. }.bind(this));
  458. }
  459. },
  460. switchFieldByAppealReason : function( ar ){
  461. var tempField = ["selfHolidayType","startTime","endTime","address","appealDescription"];
  462. var showField = [];
  463. if( ar == "临时请假" ){
  464. showField = ["selfHolidayType","startTime","endTime"];
  465. }else if( ar == "出差" ){
  466. showField = ["address","startTime","endTime"];
  467. }else if( ar == "因公外出" ){
  468. showField = ["address","startTime","endTime","appealDescription"];
  469. }else if( ar == "其他" ){
  470. showField = ["appealDescription"];
  471. }
  472. tempField.each( function( f ){
  473. this.createTableArea.getElement("[contain='"+f+"']").setStyle("display", showField.contains(f) ? "" : "none" );
  474. if( this.isNew || this.isEdited )this.document.items[f].options.notEmpty = (showField.contains(f) ? true : false )
  475. }.bind(this))
  476. },
  477. setCreateNodeSize: function(){
  478. var size = this.app.node.getSize();
  479. var allSize = this.app.content.getSize();
  480. var height = "560";
  481. var width = "800";
  482. this.createAreaNode.setStyles({
  483. "width": ""+size.x+"px",
  484. "height": ""+size.y+"px"
  485. });
  486. var hY = height;
  487. var mY = (size.y-height)/2;
  488. this.createNode.setStyles({
  489. "height": ""+hY+"px",
  490. "margin-top": ""+mY+"px",
  491. "width" : ""+width+"px"
  492. });
  493. this.createContainerNode.setStyles({
  494. "height": ""+hY+"px"
  495. });
  496. var iconSize = this.createIconNode ? this.createIconNode.getSize() : {x:0,y:0};
  497. var formMargin = hY-iconSize.y-60;
  498. this.createFormNode.setStyles({
  499. "height": ""+formMargin+"px",
  500. "margin-top": ""+60+"px"
  501. });
  502. },
  503. cancelCreate: function(e){
  504. this.createMarkNode.destroy();
  505. this.createAreaNode.destroy();
  506. delete this;
  507. },
  508. deny : function(e){
  509. var data = { 'ids' : [this.data.id], 'status':'-1', 'opinion1': this.opinion1.getValue() };
  510. if (data.opinion1 ){
  511. this.process( data );
  512. }else{
  513. this.app.notice( "请填写意见", "error");
  514. }
  515. },
  516. okCreate: function(e){
  517. var data = { 'ids' : [this.data.id], 'status':'1', 'opinion1': this.opinion1.getValue() };
  518. this.process( data );
  519. },
  520. process: function( data ){
  521. this.app.restActions.processAppeal( data, function(json){
  522. if( json.type == "ERROR" ){
  523. this.app.notice( json.message , "error");
  524. }else{
  525. this.createMarkNode.destroy();
  526. this.createAreaNode.destroy();
  527. if(this.explorer.view)this.explorer.view.reload();
  528. this.app.notice( "处理成功" , "success");
  529. }
  530. // this.app.processConfig();
  531. }.bind(this));
  532. }
  533. });