xuqian_management.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. var patient,
  2. msgId,
  3. signCode,
  4. applyDate,
  5. renewFlag = 1; //1-普通续签,2-转签
  6. var docInfo;
  7. var refuseReason = '';//拒绝签约原因
  8. //下拉框选中的数据
  9. var currHealthManagement,
  10. currService,
  11. currTeam;
  12. var $juminLabels = $('#jumin_labels input[data-val=jumin_labels]');
  13. mui.init();
  14. mui.plusReady(function(){
  15. var self = plus.webview.currentWebview();
  16. patient = self.patient;
  17. msgId = self.msgId;
  18. signCode = self.signCode;
  19. applyDate = self.applyDate;
  20. renewFlag = self.renewFlag || renewFlag;
  21. docInfo = JSON.parse(plus.storage.getItem("docInfo"));
  22. getPatientInfo();
  23. bindEvents();
  24. templateHelper();
  25. });
  26. function getPatientInfo(){
  27. // var url = "/doctor/family_contract/patient_signing_renew", //"/doctor/patient_label_info/patient",
  28. // params = {
  29. // patient: patient
  30. // };
  31. var date = new Date();
  32. // if(date.getMonth() > 5){ //7月份开始,算是签约过期流程,请求不一样
  33. getInfo2();
  34. // }else{
  35. // getInfo1();
  36. // }
  37. }
  38. //获得未过期的续签信息
  39. function getInfo1(){
  40. plus.nativeUI.showWaiting();
  41. var promise = getReqPromises([{url:"/doctor/family_contract/patient_signing",data:{patient: patient}},//居民信息
  42. {url:"/doctor/admin-teams/team/"+ docInfo.code +"/teamsLimit",data:{},reqType: 'GET'},
  43. {url:"/doctor/sign/getSigndict", data:{}, reqType: "GET"},//获取服务类型信息
  44. {url:"/common/getDictByDictName?name=SIGN_EXPENSES",data:{},reqType: 'GET'}])//设置政府补贴;
  45. return promise.then(function(datas){
  46. var data0 = datas[0],
  47. data1 = datas[1];
  48. data3 = datas[3];
  49. var teamName = "";
  50. if(data0.status == 200) {
  51. if(renewFlag == "2"){
  52. var url = "/doctor/sign/getTeamNameByTeamCode",
  53. params = {teamCode: data0.data.jtAdminTeam};
  54. sendGet(url, params, null, function(res){
  55. data0.data.teamName = res.data;
  56. data0.data.renewFlag = renewFlag;
  57. data0.data.applyDate = applyDate;
  58. var html = template("info_tmp", data0.data);
  59. $("#pati_info").empty().append(html);
  60. getQytd(data1);
  61. setExpenses(data3);
  62. });
  63. }else{
  64. var isFilled = false;
  65. for(i=0; i<data1.data.length; i++){
  66. var item = data1.data[i];
  67. if(item.id == data0.data.jtSign.adminTeamId){
  68. if(item.signCount >= item.signLimitNumber){
  69. teamName = item.name+"<span class='filled'>(已达上限)</span>";
  70. isFilled = true;
  71. $('#btn_agree').addClass("disabled").attr("disabled", true);
  72. }else{
  73. teamName = item.name+"(已签约"+item.signCount+"人)";
  74. }
  75. break;
  76. }
  77. }
  78. data0.data.teamName = teamName;
  79. data0.data.renewFlag = renewFlag;
  80. data0.data.applyDate = applyDate;
  81. var html = template("info_tmp", data0.data);
  82. $("#pati_info").empty().append(html);
  83. if(isFilled && (data1.data.length > 1)){
  84. getQytd(data1);
  85. $("#qytdNum").after('<span class="mui-icon c-icon-right"></span>');
  86. $("#jgLi").append('<span class="mui-icon c-icon-right"></span>');
  87. $("#btLi").append('<span class="mui-icon c-icon-right"></span>');
  88. }
  89. setExpenses(data3);
  90. }
  91. }else{
  92. mui.toast(data0.msg)
  93. }
  94. var data2 = datas[2];
  95. fillServiceDropdown(data2);
  96. plus.nativeUI.closeWaiting();
  97. });
  98. }
  99. //处理已过期签约关系的续签信息
  100. function getInfo2(){
  101. plus.nativeUI.showWaiting();
  102. var promise2 = getReqPromises([{url:"/doctor/family_contract/patient_signing_outtime",data:{patient: patient}},//居民信息
  103. {url:"/doctor/admin-teams/team/"+ docInfo.code +"/teamsLimit",data:{},reqType: 'GET'},
  104. {url:"/doctor/sign/getSigndict", data:{}, reqType: "GET"},//获取服务类型信息
  105. {url:"/common/getDictByDictName?name=SIGN_EXPENSES",data:{},reqType: 'GET'}]);//设置政府补贴
  106. return promise2.then(function(datas){
  107. plus.nativeUI.closeWaiting();
  108. var data0 = datas[0],
  109. data1 = datas[1],
  110. data3 = datas[3];
  111. var teamName = "";
  112. if(data0.status == 200) {
  113. var expense = data0.data.jtSign.expensesType,
  114. list = data3.list,
  115. obj = _.findWhere(list, {code: expense}),
  116. expenseName = obj.value;
  117. var info = {
  118. teamName : teamName,
  119. photo: data0.data.photo,
  120. name: data0.data.name,
  121. sex: data0.data.sex,
  122. age: data0.data.age,
  123. renewTime: data0.data.applyDate,
  124. applyDate: applyDate,
  125. idcard: data0.data.idCard,
  126. medicareNumber: data0.data.medicareNumber,
  127. ssc: data0.data.ssc,
  128. mobile: data0.data.mobile,
  129. provinceName: data0.data.provinceName,
  130. cityName: data0.data.cityName,
  131. address: data0.data.address,
  132. jtDoctorName: data0.data.jtSign.doctorName,
  133. jtDoctorHealthName: data0.data.jtSign.doctorHealthName,
  134. jtAdminTeam: data0.data.jtSign.adminTeamId,
  135. jtHospitalName: data0.data.jtSign.hospitalName,
  136. renewFlag: renewFlag,
  137. countryName:data0.data.countryName,
  138. //添加政府补贴内容
  139. expensesType: expense,
  140. expenseName: expenseName
  141. };
  142. if(renewFlag == "2"){
  143. var url = "/doctor/sign/getTeamNameByTeamCode",
  144. params = {teamCode: data0.data.jtSign.adminTeamId};
  145. sendGet(url, params, null, function(res){
  146. info.teamName = res.data;
  147. var html = template("info_tmp", info);
  148. $("#pati_info").empty().append(html);
  149. getQytd(data1);
  150. setExpenses(data3);
  151. });
  152. }else{
  153. var isFilled = false;
  154. for(i=0; i<data1.data.length; i++){
  155. var item = data1.data[i];
  156. if(item.id == data0.data.jtSign.adminTeamId){
  157. if(item.signCount >= item.signLimitNumber){
  158. teamName = item.name+"<span class='filled'>(已达上限)</span>";
  159. isFilled = true;
  160. $('#btn_agree').addClass("disabled").attr("disabled", true);
  161. }else{
  162. teamName = item.name+"(已签约"+item.signCount+"人)";
  163. }
  164. break;
  165. }
  166. }
  167. // 修复bug#3551 【医生端】续签未变更续签团队,原本签约团队没有显示出来
  168. info.teamName = teamName;
  169. var html = template("info_tmp", info);
  170. $("#pati_info").empty().append(html);
  171. if(isFilled && (data1.data.length > 1)){
  172. getQytd(data1);
  173. $("#qytdNum").after('<span class="mui-icon c-icon-right"></span>');
  174. $("#jgLi").append('<span class="mui-icon c-icon-right"></span>');
  175. $("#btLi").append('<span class="mui-icon c-icon-right"></span>');
  176. }
  177. setExpenses(data3);
  178. }
  179. }else{
  180. mui.toast(data0.msg)
  181. }
  182. var data2 = datas[2];
  183. fillServiceDropdown(data2);
  184. plus.nativeUI.closeWaiting();
  185. });
  186. }
  187. //获取签约团队
  188. function getQytd(res){
  189. if(res.status == 200) {
  190. if(res.data.length == 0){
  191. alert("查无签约团队");
  192. return;
  193. }
  194. var teams = res.data,
  195. teamCodes=[],
  196. teamNames=[];
  197. // 萃取数组对象中code、name,返回一个数组
  198. teamCodes = _.pluck(teams, 'id');
  199. // teamNames = _.pluck(teams, 'name');
  200. for(var i = 0; i < teams.length; i++){
  201. var signTeam;
  202. var signCount = teams[i].signCount;
  203. var signLimitNumber = teams[i].signLimitNumber;
  204. if(signCount >= signLimitNumber){
  205. signTeam = teams[i].name + "<span class='filled'>(已达上限)</span>";
  206. }else{
  207. signTeam = teams[i].name + "(已签约"+signCount+"人)";
  208. }
  209. teamNames.push(signTeam);
  210. }
  211. qytdSelect(teamCodes, teamNames);
  212. }
  213. }
  214. // 设置团队下拉框
  215. function qytdSelect(teamCodes, teamNames) {
  216. // var $doctorQytdInput = $('input[data-val=qytd]');
  217. var $doctorQytdInput = $('#qytdNum');
  218. $doctorQytdInput.mobiscroll({
  219. theme: 'ios',
  220. lang: 'zh',
  221. customWheels: true,
  222. wheels: [
  223. [{
  224. keys: teamCodes,
  225. values: teamNames
  226. }]
  227. ],
  228. onSelect: function(valueText, inst) {
  229. var valueTextZy = valueText.replace("<span class='filled'>", "<span class=\\\'filled\\\'>");
  230. var dd = eval("[" + valueTextZy + "]"),
  231. name=dd[0].values;
  232. currTeam = dd[0].keys;
  233. // $(this).val(name);
  234. $(this).html(name);
  235. $(this).html(name);
  236. $(this).removeClass("c-9e9e9e");
  237. var isFilled = $(this).find("span").hasClass("filled");
  238. if(isFilled){
  239. $('#btn_agree').addClass("disabled").attr("disabled", true);
  240. }else{
  241. $('#btn_agree').removeClass("disabled").attr("disabled", false);
  242. }
  243. if($(this).text().length>20){
  244. $doctorQytdInput.css({textAlign:'left'});
  245. }else{
  246. $doctorQytdInput.css({textAlign:'right'});
  247. }
  248. $doctorQytdInput.attr("data-code",currTeam);
  249. $('input[data-val=healthManagement]').val("").attr("data-code","")
  250. getTeamMember(currTeam);
  251. }
  252. })
  253. }
  254. //普通 老年 高血 糖尿 孕妇 儿童 贫困 计生 重性 残疾 结核
  255. function filterSer(name){
  256. var $li = $('.dw-bf').find('div.dw-li');
  257. $li.addClass('dw-v');
  258. var nameArr = name.split(',');
  259. $.map(nameArr,function(item,index){
  260. if(item.trim() == '普通人群'){
  261. var arr = [2,3,6,7,8,9,10]
  262. $.map(arr,function(it,index){
  263. $li.eq(it).removeClass('dw-v')
  264. })
  265. }
  266. if(item.trim() == '老年人'){
  267. var arr = [4,5]
  268. $.map(arr,function(it,index){
  269. $li.eq(it).removeClass('dw-v')
  270. })
  271. }
  272. if(item.trim() == '高血压' ||item.trim() == '糖尿病'||item.trim() == '贫困人口'||item.trim() == '计生特殊人群'||item.trim() == '重性精神疾病'||item.trim() == '残疾人'||item.trim() == '结核病' ){
  273. var arr = [0]
  274. $.map(arr,function(it,index){
  275. $li.eq(it).removeClass('dw-v')
  276. })
  277. }
  278. if(item.trim() == '0-6岁儿童'){
  279. var arr = [1,4]
  280. $.map(arr,function(it,index){
  281. $li.eq(it).removeClass('dw-v')
  282. })
  283. }
  284. if(item.trim() == '孕产妇'){
  285. var arr = [1,5]
  286. $.map(arr,function(it,index){
  287. $li.eq(it).removeClass('dw-v')
  288. })
  289. }
  290. })
  291. }
  292. //设置服务类型下拉
  293. function fillServiceDropdown(data){
  294. var $serviceSel = $('#selFuwu'),
  295. data = data.data,
  296. html="";
  297. for(i=0; i<data.length; i++){
  298. html += '<option value="'+data[i].code+'">'+data[i].name+'</option>'
  299. }
  300. $serviceSel.html(html);
  301. $serviceSel.mobiscroll().select({
  302. theme: 'ios',
  303. lang: 'zh',
  304. display: 'bottom',
  305. rows:6,
  306. placeholder:'请选择服务类型',
  307. onSelect: function ( valueText, inst) {
  308. // var vArr = valueText.split(',');
  309. //判断服务类型是否变更
  310. $juminLabels.val("").attr("data-code",JSON.stringify({health: "",disease: "", custom: "" }));
  311. currService = inst._tempValue?inst._tempValue.join(','):'';
  312. },
  313. onChange: function (event, inst) {
  314. filterSer(event)
  315. },
  316. onShow: function (event, inst) {
  317. filterSer(inst)
  318. }
  319. })
  320. }
  321. //获取团队成员
  322. function getTeamMember(teamCode){
  323. plus.nativeUI.showWaiting();
  324. sendGet("/doctor/admin-teams/"+ teamCode + "/members", {}, null, function(res){
  325. if(res.status == 200){
  326. var jgs= [],
  327. jgCodes =[], jgNames = [];
  328. $.each(res.data, function(i, v) {
  329. if(v.level == 3 || v.level == 2)
  330. jgs.push(v);
  331. });
  332. // 萃取数组对象中code、name,返回一个数组
  333. jgCodes = _.pluck(jgs, 'code');
  334. jgNames = _.pluck(jgs, 'name');
  335. activHealthM(jgCodes, jgNames);
  336. } else
  337. mui.toast("获取团队成员失败!");
  338. plus.nativeUI.closeWaiting();
  339. })
  340. }
  341. //填充健管师下拉框
  342. function activHealthM(codes, names) {
  343. $('input[data-val=healthManagement]').mobiscroll({
  344. theme: 'ios',
  345. lang: 'zh',
  346. customWheels: true,
  347. wheels: [
  348. [{
  349. keys: codes,
  350. values: names
  351. }]
  352. ],
  353. onSelect: function(valueText, inst) {
  354. var dd = eval("[" + valueText + "]");
  355. var name=dd[0].values
  356. $(this).val(name);
  357. currHealthManagement = dd[0].keys;
  358. $(this).attr("data-code",currHealthManagement);
  359. }
  360. });
  361. };
  362. //获取政府补贴数据
  363. function setExpenses(res){
  364. var expensesCode=[];
  365. var expensesName=[];
  366. if(res.status == 200) {
  367. var expensesList = res.list;
  368. for(var i = 0; i < expensesList.length; i++) {
  369. expensesCode.push(expensesList[i].code);
  370. expensesName.push(expensesList[i].value);
  371. }
  372. activExpensesM(expensesCode,expensesName);
  373. };
  374. }
  375. //设置政府补贴下拉框
  376. function activExpensesM(expensesCodes,expensesNames) {
  377. var $expensesInput = $('input[data-val=expenses]');
  378. $expensesInput.mobiscroll({
  379. theme: 'ios',
  380. lang: 'zh',
  381. customWheels: true,
  382. wheels: [
  383. [{
  384. keys: [expensesCodes[1],expensesCodes[0],expensesCodes[3],expensesCodes[2]],
  385. values: [expensesNames[1],expensesNames[0],expensesNames[3],expensesNames[2]]
  386. }]
  387. ],
  388. onSelect: function(valueText, inst) {
  389. var dd = eval("[" + valueText + "]");
  390. var name=dd[0].values
  391. $(this).val(name);
  392. currExpenses = dd[0].keys;
  393. $('input[data-val=expenses]').attr("data-code",currExpenses);
  394. }
  395. });
  396. // 获取政府补贴下拉框mibiscroll实例
  397. var expensesMobiscroll = $expensesInput.mobiscroll('getInst');
  398. var valueText = "{keys:'"+$expensesInput.attr("data-code")+"',values:'"+$expensesInput.val()+"'}";
  399. expensesMobiscroll.setVal([valueText]);
  400. }
  401. function validForm(){
  402. if(!$('#agreement_checkbox').hasClass('checked')) {
  403. mui.toast("您还未接受签约协议");
  404. return false;
  405. }
  406. // if(renewFlag == "2"){ //改签
  407. if(!$.trim($("#qytdNum").attr("data-code"))){
  408. mui.toast("请选择签约团队!");
  409. return false;
  410. }
  411. if($("input[data-val=healthManagement]").val()==""){
  412. mui.toast("请选择健康管理师!");
  413. $("#btn_agree").attr("disabled",false);
  414. return false;
  415. }
  416. // }
  417. if(!currService){
  418. mui.toast("请选择服务类型!");
  419. return false;
  420. }
  421. var labelObj = $juminLabels.attr("data-code");
  422. labelObj = JSON.parse(labelObj);
  423. if(!labelObj.health) {
  424. mui.toast("请选择居民标签!");
  425. return false;
  426. }
  427. return true;
  428. }
  429. function bindEvents(){
  430. $("textarea").on("input", function(){
  431. var text = $(this).val().trim(),
  432. len = text.length;
  433. $("#count").text(len);
  434. });
  435. //选择拒绝签约说明文本,直接将内容添加到textarea中
  436. $("#explain").on('tap', '.text-tag', function(){
  437. var $this = $(this),
  438. text = $this.text(),
  439. tatext = $("textarea").val();
  440. if($this.hasClass("active")){
  441. $this.removeClass("active");
  442. var a = tatext.split(text);
  443. tatext = a.join("");
  444. $("textarea").val(tatext);
  445. $("#count").text(tatext.length);
  446. }else{
  447. $this.addClass("active");
  448. tatext += text;
  449. $("textarea").val(tatext);
  450. $("#count").text(tatext.length);
  451. }
  452. });
  453. // 点击家庭医生签约协议(勾选框)
  454. $("body").on('click', '#agreement_checkbox', function() {
  455. $(this).toggleClass("checked");
  456. });
  457. $("body").on("click","#jumin_labels",function(){
  458. var teamCode = $('#qytdNum').attr("data-code");
  459. if($.trim(teamCode)) {
  460. //判断当前服务类型是否已经选择
  461. if(!currService){
  462. mui.confirm('请先选择服务类型', "提示", ["确定"], function(){});
  463. return false;
  464. }
  465. mui.openWindow({
  466. url:"../../huanzhe/html/disease-label-choose.html",
  467. id:"disease-label-choose",
  468. extras: {
  469. teamCode: teamCode,
  470. showData: $juminLabels.attr("data-code") || null,
  471. patientCode: patient,
  472. serviceCode: currService
  473. }
  474. })
  475. } else {
  476. mui.confirm('请先选择签约团队', "提示", ["确定"], function(){
  477. });
  478. }
  479. });
  480. $("#btn_agree").click(function() { //同意
  481. if($("#btn_agree").attr("disabled")){
  482. return false;
  483. }
  484. var isValid = validForm();
  485. if(isValid){
  486. $("#btn_agree").attr("disabled",true);
  487. agreeRenew(1);
  488. }
  489. });
  490. $("#btn_refuse").click(function() { //拒绝
  491. if($("#btn_refuse").attr("disabled")){
  492. return false;
  493. }
  494. $("#btn_refuse").attr("disabled",true);
  495. agreeRenew(0);
  496. });
  497. /*居民标签*/
  498. window.addEventListener("setJuMinLabels", function setJuMinLabels(e) {
  499. var health = e.detail.health,
  500. disease = e.detail.disease,
  501. custom = e.detail.custom,
  502. labelName = e.detail.labelName;
  503. $juminLabels.val(labelName).attr("data-code",JSON.stringify({health: health,disease: disease, custom: custom }));
  504. });
  505. }
  506. function templateHelper(){
  507. template.helper("getSex", function(str){
  508. if(str == 1){
  509. return "男";
  510. }else if(str == 2){
  511. return "女";
  512. }else{
  513. return "其他";
  514. }
  515. });
  516. template.helper("formatShowTime", function(str){
  517. if(str){
  518. return str.substr(0,16);
  519. }else{
  520. return "";
  521. }
  522. });
  523. }
  524. function agreeRenew(state){
  525. var juminLabels = JSON.parse($juminLabels.attr("data-code"));
  526. refuseReason = $('#refuseReason').val();
  527. var url = "/doctor/sign/agreeRenew",
  528. params = {
  529. state: state,
  530. patient: patient,
  531. mesId: msgId || "",
  532. signCode: signCode,
  533. health: juminLabels.health || "",
  534. disease: juminLabels.disease || "",
  535. custom: juminLabels.custom || "",
  536. sevId: currService,
  537. expenses:$("input[data-val=expenses]").attr("data-code"),
  538. healthDoctor : currHealthManagement || "",
  539. teamCode : currTeam || "",
  540. refuseReason: refuseReason
  541. };
  542. //改签情况
  543. // if(renewFlag == "2"){
  544. // params.healthDoctor = currHealthManagement || "";
  545. // params.teamCode = currTeam || "";
  546. // }
  547. plus.nativeUI.showWaiting();
  548. sendPost(url, params, null, function(res){
  549. plus.nativeUI.closeWaiting();
  550. if(res.status == 200){
  551. if(res.data == -1){
  552. //已存在下个年度的签约
  553. var now = new Date();
  554. var signYear = now.getFullYear()+"-"+(now.getFullYear()+1);
  555. dialog({
  556. content: "您已完成"+signYear+"年度签约,不能再次签约",
  557. okValue: "我知道了",
  558. ok: function(){
  559. backToPre(state);
  560. }
  561. }).showModal();
  562. return false;
  563. }else if(res.data == 1){
  564. mui.toast(res.msg);
  565. backToPre(state);
  566. }else{
  567. var data = res.data;
  568. var msg = "";
  569. switch (data){
  570. case 2:
  571. msg = "已同意过申请,不能再次处理";
  572. break;
  573. case 3:
  574. msg = "患者已取消申请";
  575. break;
  576. case 4:
  577. msg = "已拒绝申请,不能再次处理";
  578. break;
  579. case 5:
  580. case 6:
  581. case 7:
  582. msg = "该签约申请已无效,不能操作";
  583. break;
  584. default:
  585. msg = "该申请已处理,无需再次处理";
  586. break;
  587. }
  588. dialog({
  589. content: msg,
  590. okValue: "我知道了",
  591. ok: function(){
  592. backToPre(state);
  593. }
  594. }).showModal();
  595. }
  596. }else{
  597. mui.toast(res.msg);
  598. }
  599. }, "POST", "", true);
  600. }
  601. function backToPre(state){
  602. var self = plus.webview.currentWebview(),
  603. parent = self.opener();
  604. if(parent && parent.id == "sign_manage"){
  605. // var tab = 4; //代缴费tab index
  606. // if(state == 1){
  607. // tab = 4;
  608. // }else{
  609. // tab = 3; //待处理tab
  610. // }
  611. //续签管理页面关闭,所以现在跳转去签约管理的tab中
  612. var tab = 1; //代缴费tab index
  613. if(state == 1){
  614. tab = 1;
  615. }else{
  616. tab = 0; //待处理tab
  617. }
  618. mui.fire(parent, "reloadTab", {tab: tab}); //刷新续签管理的代缴费tab内容
  619. parent.show();
  620. mui.later(function(){
  621. self.close();
  622. }, 300);
  623. }else{
  624. if(parent){
  625. mui.fire(parent, "updata");
  626. self.close();
  627. }
  628. }
  629. }
  630. template.helper("setPhoto", function(p) {
  631. return getImgUrl(p);
  632. });