sign_handle.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. var httpData=GetRequest(),
  2. doctorInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
  3. var refuseReason = null;
  4. function showSuccessMessage(msg) {
  5. layer.msg(msg, {
  6. icon: 1
  7. })
  8. }
  9. function showErrorMessage(msg) {
  10. layer.msg(msg, {
  11. icon: 5
  12. })
  13. }
  14. function showWarningMessage(msg) {
  15. layer.msg(msg, {
  16. icon: 2
  17. })
  18. }
  19. function showInfoMessage(msg) {
  20. layer.msg(msg, {
  21. icon: 6
  22. })
  23. }
  24. function getReason(ele) {
  25. if(ele.hasClass("active")) {
  26. ele.removeClass("active")
  27. refuseReason = null
  28. return false;
  29. }
  30. ele.addClass("active").siblings().removeClass("active");
  31. refuseReason = ele.html();
  32. }
  33. top.changeTypeIndex=null;//修改居民标签的窗体
  34. top.handleVue=new Vue({
  35. el: "#app",
  36. data: {
  37. renewFlag: httpData.renewFlag, // 2 改签
  38. applyDate: decodeURI(httpData.applyDate) || "",
  39. justDoc: null,
  40. justHDoc: null,
  41. doctorType: doctorInfo.doctorType,
  42. isShowList1: false,
  43. isShowList2: false,
  44. isShowList3: false,
  45. isShowList4: false,
  46. patientInfo: {jtSign: {}},
  47. warnMsg: "",
  48. signdictList: null,
  49. teamList: null,
  50. memberList: null, // 团队成员列表
  51. doctorList: null, // 全科医生列表
  52. dictList: null,
  53. fileList: null,
  54. serverName: null,
  55. labelName: null,
  56. patLabel: [],
  57. signInfo: {
  58. signType: 1,
  59. signCode: httpData.signCode,
  60. majorDoctor: null,
  61. majorDoctorName: null,
  62. healthLabel: null,
  63. customLabel: null,
  64. disease: null,
  65. patientIDcard: null, // 必填
  66. adminTeamCode: null,
  67. teamCode: null,
  68. mesId: null, // 消息id(必填)
  69. msgid: null, // 消息id(必填)
  70. patient: httpData.patientCode,
  71. doctor: null,
  72. doctorName: null,
  73. healthDoctor: null,
  74. healthDoctorName: null,
  75. type: 1,
  76. state: 1,
  77. expenses: null,
  78. group: null,
  79. //添加服务类型数据
  80. sevId: null,
  81. // 拒绝参数
  82. // adminTeamCode:0,
  83. // type: 2,
  84. refuseReason: null
  85. },
  86. },
  87. mounted: function() {
  88. this.getSigndict();
  89. this.getDictByDictName();
  90. if(!httpData.msgid || httpData.msgid == "undefined" || httpData.msgid == "null") {
  91. this.findMsgId()
  92. } else {
  93. this.signInfo.mesId = httpData.msgid
  94. this.signInfo.msgid = httpData.msgid
  95. }
  96. this.teamLimit();
  97. this.findPatientSignServerBySignCode();
  98. },
  99. methods: {
  100. allLabels: function(selData) {
  101. var vm =this,
  102. param = {
  103. teamCode: this.signInfo.adminTeamCode
  104. },
  105. loadding = layer.load(0, {shade: false});
  106. signAPI.allLabels(param).then(function(res) {
  107. layer.close(loadding)
  108. if(res.status == 200) {
  109. $.each(res.data, function(i, v) {
  110. if(v.labelType == 2) {
  111. $.each(selData.heath, function(j, u) {
  112. if(u == v.labelCode) {
  113. if(vm.labelName == "") {
  114. vm.labelName += v.labelName
  115. } else {
  116. vm.labelName += ',' + v.labelName
  117. }
  118. }
  119. });
  120. }
  121. if(v.labelType == 3) {
  122. $.each(selData.disease, function(j, u) {
  123. if(u == v.labelCode) {
  124. if(vm.labelName == "") {
  125. vm.labelName += v.labelName
  126. } else {
  127. vm.labelName += ',' + v.labelName
  128. }
  129. }
  130. });
  131. }
  132. if(v.labelType == 4) {
  133. $.each(selData.team, function(j, u) {
  134. if(u == v.labelCode) {
  135. if(vm.labelName == "") {
  136. vm.labelName += v.labelName
  137. } else {
  138. vm.labelName += ',' + v.labelName
  139. }
  140. }
  141. });
  142. }
  143. });
  144. } else {
  145. showErrorMessage(res.msg);
  146. }
  147. })
  148. },
  149. getTeamNameByTeamCode: function() {
  150. var vm =this,
  151. params = {
  152. teamCode: vm.patientInfo.jtSign.adminTeamId
  153. },
  154. loadding = layer.load(0, {shade: false});
  155. signAPI.getTeamNameByTeamCode(params).then(function(res) {
  156. layer.close(loadding)
  157. if(res.status == 200) {
  158. vm.patientInfo.jtSign.teamName = res.data
  159. } else {
  160. showErrorMessage(res.msg);
  161. }
  162. })
  163. },
  164. patientLabel: function() {
  165. var vm =this,
  166. params = {
  167. patient: httpData.patientCode,
  168. labelType: ""
  169. },
  170. loadding = layer.load(0, {shade: false});
  171. signAPI.patientLabel(params).then(function(res) {
  172. layer.close(loadding)
  173. if(res.status == 200) {
  174. vm.patLabel = res.data
  175. } else {
  176. showErrorMessage(res.msg);
  177. }
  178. })
  179. },
  180. getSigndict: function() {
  181. var vm =this,
  182. loadding = layer.load(0, {shade: false});
  183. signAPI.getSigndict().then(function(res) {
  184. layer.close(loadding)
  185. if(res.status == 200) {
  186. vm.signdictList = res.data
  187. } else {
  188. showErrorMessage(res.msg);
  189. }
  190. })
  191. },
  192. findMsgId: function() {
  193. var vm =this,
  194. params = {
  195. sender: httpData.patientCode,
  196. signStatus: httpData.status == 0 ? 1 : (vm.renewFlag == 1 ? 8 : 9)
  197. },
  198. loadding = layer.load(0, {shade: false});
  199. signAPI.findMsgId(params).then(function(res) {
  200. layer.close(loadding)
  201. if(res.status == 200) {
  202. vm.signInfo.mesId = res.data.id
  203. vm.signInfo.msgid = res.data.id
  204. } else {
  205. showErrorMessage(res.msg);
  206. }
  207. })
  208. },
  209. signing: function() {
  210. var vm = this,
  211. loadding = layer.load(0, {shade: false}),
  212. params = {
  213. patient: httpData.patientCode
  214. }
  215. signAPI.signing(params).then(function(res) {
  216. layer.close(loadding)
  217. if(res.status == 200) {
  218. vm.patientInfo = res.data
  219. vm.signInfo.patientIDcard = res.data.idCard
  220. if(vm.doctorType == 2) {
  221. vm.signInfo.doctorName = res.data.jtSign.doctorName
  222. vm.signInfo.doctor = res.data.jtSign.doctor
  223. }
  224. if(vm.doctorType == 3) {
  225. vm.signInfo.healthDoctorName = res.data.jtSign.doctorHealthName
  226. vm.signInfo.healthDoctor = res.data.jtSign.doctorHealth
  227. }
  228. } else {
  229. showErrorMessage(res.msg);
  230. }
  231. })
  232. },
  233. selectServer:function(){
  234. var vm=this
  235. if(!this.signInfo.adminTeamCode) {
  236. showWarningMessage("请先选择签约团队");
  237. return false;
  238. }
  239. if(top.changeTypeIndex && top.$('#layui-layer-shade'+top.changeTypeIndex).length){
  240. top.xgLabel.initPage();
  241. (top.$('#layui-layer-shade'+top.changeTypeIndex).show(),top.$('#layui-layer'+top.changeTypeIndex).show());
  242. }else{
  243. top.changeTypeIndex=top.layer.open({
  244. type: 2,
  245. area: ['500px', '405px'],
  246. title: "修改居民标签",
  247. shade: 0.5,
  248. shadeClose: false,
  249. closeBtn: 0,
  250. shift: 2,
  251. content: '../html/modify-the-label.html?patient=' + httpData.patientCode+'&teamCode='+vm.signInfo.adminTeamCode+"&signCode="+httpData.signCode
  252. });
  253. }
  254. },
  255. handleStr: function(str) {
  256. if (!str || str === '') {
  257. return ''
  258. }
  259. return str.substr(0, 19)
  260. },
  261. acceptanceRes:function(res){
  262. var vm = this
  263. this.serverName = "";
  264. this.labelName = "";
  265. if(res.server.length != 0) this.signInfo.sevId = res.server.join(",");
  266. if(res.disease.length != 0) this.signInfo.disease = res.disease.join(",");
  267. if(res.heath.length != 0) this.signInfo.healthLabel = res.heath.join(",");
  268. if(res.team.length != 0) this.signInfo.customLabel = res.team.join(",");
  269. $.each(res.server, function(i, v) {
  270. $.each(vm.signdictList, function(j, u) {
  271. if(v == u.code) {
  272. if(vm.serverName == "") {
  273. vm.serverName += u.name
  274. } else {
  275. vm.serverName += ',' + u.name
  276. }
  277. }
  278. });
  279. });
  280. this.allLabels(res)
  281. },
  282. signOuttime: function() {
  283. var vm = this,
  284. loadding = layer.load(0, {shade: false}),
  285. params = {
  286. patient: httpData.patientCode
  287. }
  288. signAPI.signOuttime(params).then(function(res) {
  289. layer.close(loadding)
  290. if(res.status == 200) {
  291. vm.patientInfo = res.data
  292. vm.signInfo.adminTeamCode = vm.patientInfo.jtSign.adminTeamId
  293. vm.signInfo.teamCode = vm.patientInfo.jtSign.adminTeamId
  294. vm.signInfo.healthDoctorName = vm.patientInfo.jtSign.doctorHealthName || ""
  295. vm.signInfo.healthDoctor = vm.patientInfo.jtSign.doctorHealth || ""
  296. vm.signInfo.doctor = vm.patientInfo.jtSign.doctor || ""
  297. vm.signInfo.doctorName = vm.patientInfo.jtSign.doctorName || ""
  298. if(vm.doctorType == 2) {
  299. vm.signInfo.doctorName = doctorInfo.name
  300. vm.signInfo.doctor = doctorInfo.uid
  301. }
  302. if(vm.doctorType == 3) {
  303. vm.signInfo.healthDoctorName = doctorInfo.name
  304. vm.signInfo.healthDoctor = doctorInfo.uid
  305. }
  306. vm.signInfo.expenses = vm.patientInfo.jtSign.expensesType
  307. vm.judgeTeamToDoc(vm.signInfo.adminTeamCode)
  308. // 查找之前签约的居民标签
  309. vm.patientLabel()
  310. if(vm.renewFlag == 2) { // 获取之前签约团队名字
  311. vm.getTeamNameByTeamCode()
  312. }
  313. } else {
  314. showErrorMessage(res.msg);
  315. }
  316. })
  317. },
  318. judgeTeamToDoc: function(teamCode) {
  319. var judge = false
  320. for(var i = 0, len = this.teamList.length; i < len; i++) {
  321. if(this.teamList[i].id == teamCode) {
  322. judge = true
  323. this.teamMember()
  324. }
  325. }
  326. if(!judge) {
  327. this.signInfo.adminTeamCode = null
  328. this.signInfo.teamCode = null
  329. this.warnMsg = "您已不在原签约团队,请选择新的签约团队"
  330. if(this.doctorType == 2) {
  331. this.justHDoc = this.signInfo.healthDoctorName
  332. this.signInfo.healthDoctorName = null
  333. this.signInfo.healthDoctor = null
  334. } else {
  335. this.justDoc = this.signInfo.doctorName
  336. this.signInfo.doctor = null
  337. this.signInfo.doctorName = null
  338. }
  339. }
  340. },
  341. getDictByDictName: function() {
  342. var vm =this,
  343. loadding = layer.load(0, {shade: false}),
  344. params = {
  345. name: "SIGN_EXPENSES"
  346. }
  347. signAPI.getDictByDictName(params).then(function(res) {
  348. layer.close(loadding)
  349. if(res.status == 200) {
  350. vm.dictList = res.list
  351. } else {
  352. showErrorMessage(res.msg);
  353. }
  354. })
  355. },
  356. teamLimit: function() {
  357. var vm = this,
  358. loadding = layer.load(0, {shade: false}),
  359. params = {
  360. doctorId: doctorInfo.uid
  361. }
  362. signAPI.teamLimit(params).then(function(res) {
  363. layer.close(loadding)
  364. if(res.status == 200) {
  365. vm.teamList = res.data
  366. if (httpData.status == 0) {
  367. vm.signing()
  368. } else {
  369. vm.signOuttime();
  370. }
  371. } else {
  372. showErrorMessage(res.msg);
  373. }
  374. })
  375. },
  376. findPatientSignServerBySignCode: function() {
  377. var vm =this,
  378. loadding = layer.load(0, {shade: false}),
  379. params = {
  380. signCode: httpData.signCode
  381. };
  382. signAPI.findPatientSignServerBySignCode(params).then(function(res) {
  383. layer.close(loadding)
  384. if(res.status == 200) {
  385. vm.fileList = [];
  386. var len = res.data.length;
  387. if(res.data.length > 0) {
  388. vm.serverName = "";
  389. vm.signInfo.sevId = "";
  390. for(var i = 0; i < len; i++) {
  391. if(i == 0) {
  392. vm.serverName += res.data[i].serverTypeName
  393. vm.signInfo.sevId += res.data[i].servetType
  394. } else {
  395. vm.serverName += + ', ' + res.data[i].serverTypeName
  396. vm.signInfo.sevId += +',' + res.data[i].servetType
  397. }
  398. }
  399. }
  400. $.each(res.data, function(i, v) {
  401. if(v.serverType == 8 || v.serverType == 9 || v.serverType == 11) {
  402. vm.fileList.push(v);
  403. }
  404. });
  405. } else {
  406. showErrorMessage(res.msg);
  407. }
  408. })
  409. },
  410. teamMember: function() {
  411. var vm = this,
  412. loadding = layer.load(0, {shade: false}),
  413. params = {
  414. teamId: vm.signInfo.adminTeamCode
  415. }
  416. signAPI.teamMember(params).then(function(res) {
  417. layer.close(loadding)
  418. vm.memberList = [];
  419. vm.doctorList = [];
  420. if(res.status == 200) {
  421. var judge = false
  422. $.each(res.data, function(i, v) {
  423. if(v.available) {
  424. if(v.code == vm.signInfo.doctor && vm.doctorType == 3) {
  425. judge = true
  426. }
  427. if(v.code == vm.signInfo.healthDoctor && vm.doctorType == 2) {
  428. judge = true
  429. }
  430. }
  431. if(v.available && (v.level == 3 || v.level == 2)) {vm.memberList.push(v);}
  432. if(v.available && v.level == 2) {vm.doctorList.push(v);}
  433. });
  434. if(!judge && httpData.status == 1) {
  435. if(vm.doctorType == 3) {
  436. if(!vm.justDoc && !vm.signInfo.doctorName) {
  437. vm.signInfo.doctorName = vm.signInfo.healthDoctorName
  438. vm.signInfo.doctor = vm.signInfo.healthDoctor
  439. return false
  440. }
  441. if(!vm.justDoc) {
  442. vm.justDoc = vm.signInfo.doctorName
  443. }
  444. vm.warnMsg = "去年签约的全科医生" + vm.justDoc + "已不在您的团队,请重新选择一位全科医生"
  445. vm.justDoc = null
  446. vm.signInfo.doctor = null
  447. vm.signInfo.doctorName = null
  448. }
  449. if(vm.doctorType == 2) {
  450. if(!vm.justHDoc && !vm.signInfo.healthDoctorName) {
  451. vm.signInfo.healthDoctorName = vm.signInfo.doctorName
  452. vm.signInfo.healthDoctor = vm.signInfo.doctor
  453. return false
  454. }
  455. if(!vm.justHDoc) {
  456. vm.justHDoc = vm.signInfo.healthDoctorName
  457. }
  458. vm.warnMsg = "去年签约的健管师" + vm.justHDoc + "已不在您的团队,请重新选择一位健管师"
  459. vm.justHDoc = null
  460. vm.signInfo.healthDoctor = null
  461. vm.signInfo.healthDoctorName = null
  462. }
  463. top.changeTypeIndex=null
  464. }
  465. } else {
  466. showErrorMessage(res.msg);
  467. }
  468. })
  469. },
  470. selectStatus: function(num) {
  471. if(num == 1) {
  472. this.isShowList2 = false;
  473. this.isShowList3 = false;
  474. this.isShowList4 = false;
  475. this.isShowList1 = !this.isShowList1;
  476. } else if (num == 2) {
  477. if(!this.signInfo.adminTeamCode) {
  478. showWarningMessage("请先选择签约团队")
  479. return false;
  480. }
  481. this.isShowList1 = false;
  482. this.isShowList3 = false;
  483. this.isShowList4 = false;
  484. this.isShowList2 = !this.isShowList2;
  485. } else if (num == 3) {
  486. this.isShowList1 = false;
  487. this.isShowList2 = false;
  488. this.isShowList4 = false;
  489. this.isShowList3 = !this.isShowList3;
  490. } else {
  491. if(!this.signInfo.adminTeamCode) {
  492. showWarningMessage("请先选择签约团队")
  493. return false;
  494. }
  495. this.isShowList1 = false;
  496. this.isShowList2 = false;
  497. this.isShowList3 = false;
  498. this.isShowList4 = !this.isShowList4;
  499. }
  500. },
  501. selectLi: function(num, data) {
  502. if(num == 1) { // 选择签约团队
  503. this.isShowList1 = false;
  504. this.signInfo.adminTeamCode = data.id;
  505. this.signInfo.teamCode = data.id;
  506. if(this.doctorType == 2) {
  507. this.signInfo.healthDoctor = null
  508. this.signInfo.healthDoctorName = null
  509. }
  510. if(this.doctorType == 3) {
  511. this.signInfo.doctor = null
  512. this.signInfo.doctorName = null
  513. }
  514. // 发现切换团队时无法更新健管师列表,将这个判断取消后就可以更新.
  515. // if(!this.memberList || !this.doctorList) {
  516. this.teamMember()
  517. // }
  518. }
  519. if(num == 2) { // 选择健管师
  520. this.isShowList2 = false;
  521. this.signInfo.healthDoctorName = data.name
  522. this.signInfo.healthDoctor = data.code
  523. }
  524. if(num == 3) {
  525. this.isShowList3 = false;
  526. this.signInfo.expenses = data.code;
  527. }
  528. if(num == 4) { // 选择全科医生
  529. this.isShowList4 = false;
  530. this.signInfo.doctorName = data.name
  531. this.signInfo.doctor = data.code
  532. }
  533. },
  534. showTeamName: function(teamCode) {
  535. var teamName;
  536. if(!this.teamList) {
  537. return "请选择签约团队";
  538. }
  539. for(var i = 0, len = this.teamList.length; i < len; i++) {
  540. if(teamCode == this.teamList[i].id) {
  541. teamName = this.teamList[i].name;
  542. }
  543. }
  544. return teamName
  545. },
  546. showExpensesName: function(code) {
  547. var expensesName;
  548. if(!this.dictList) {
  549. return "请选择补贴类型";
  550. }
  551. for(var i = 0, len = this.dictList.length; i < len; i++) {
  552. if(code == this.dictList[i].code) {
  553. expensesName = this.dictList[i].value;
  554. }
  555. }
  556. return expensesName
  557. },
  558. setPatImg: function(str) {
  559. var imgStr = httpRequest.getImgUrl(str);
  560. if (imgStr == "") {
  561. return '../../../images/p-female.png';
  562. } else {
  563. return imgStr;
  564. }
  565. },
  566. lookPhoto: function(data) {
  567. parent.photoLayerIndex = parent.layer.open({
  568. type: 2,
  569. area: ['70%', '600px'],
  570. title: false,
  571. shade: 0.5,
  572. shadeClose: true,
  573. shift: 2,
  574. content: '../html/photo_show.html?serverType=' + data.serverType + '&patientCode=' + httpData.patientCode
  575. })
  576. },
  577. refuse: function() {
  578. var vm = this;
  579. layer.open({
  580. type: 1,
  581. area: ['400px', '300px'],
  582. shade: 0.5,
  583. title: '拒绝签约原因',
  584. shift: 2,
  585. shadeClose: false, //点击遮罩关闭层
  586. content: '<div class="p20 pb0"><div class="reason_list clearfix"><span class="fl mr10 mb20" onclick="getReason($(this))">居民信息填写不详</span><span class="fl mr10 mb20" onclick="getReason($(this))">签约人数已满</span><span class="fl mb20" onclick="getReason($(this))">家庭医生变更</span></div><textarea id="reason" maxLength="200" placeholder="可选择填写其他拒签原因(限200字以内)"></textarea></div>',
  587. btn: ['提 交', '取 消'],
  588. yes:function(index, layero) {
  589. if(!refuseReason) {
  590. if(!$("#reason").val()) {
  591. showWarningMessage("请选择或输入拒绝理由!");
  592. layer.close(index);
  593. return false
  594. }
  595. vm.signInfo.refuseReason = $("#reason").val()
  596. } else {
  597. if($("#reason").val()) {
  598. vm.signInfo.refuseReason = refuseReason + "。" + $("#reason").val()
  599. } else {
  600. vm.signInfo.refuseReason = refuseReason
  601. }
  602. }
  603. vm.signInfo.adminTeamCode = 0;
  604. vm.signInfo.teamCode = 0;
  605. vm.signInfo.type = 2;
  606. vm.signInfo.state = 0;
  607. vm.sign();
  608. layer.close(index);
  609. },
  610. success: function(layero){
  611. layero.find('.layui-layer-btn').css('text-align', 'center')
  612. }
  613. });
  614. },
  615. sign: function() {// type:1签约 2拒签
  616. if(this.signInfo.type == 1 && (!this.signInfo.expenses || (this.doctorType == 2 && !this.signInfo.healthDoctor) || (this.doctorType == 3 && !this.signInfo.doctor) || !this.signInfo.sevId || (!this.signInfo.disease && !this.signInfo.healthLabel && !this.signInfo.customLabel))) {
  617. showWarningMessage("请将填写完整签约信息!");
  618. return false;
  619. }
  620. var vm = this,
  621. loadding = layer.load(0, {shade: false});
  622. if (httpData.status == 0) {
  623. var param = vm.signInfo
  624. if(vm.doctorType == 2) {
  625. param.doctor = null
  626. param.doctorName = null
  627. }
  628. if(vm.doctorType == 3) {
  629. param.doctorHealth = null
  630. param.doctorHealthName = null
  631. }
  632. signAPI.sign(vm.signInfo).then(function(res) {
  633. layer.close(loadding)
  634. if(res.status == 200) {
  635. showSuccessMessage(res.msg || "操作成功")
  636. setTimeout(function() {
  637. parent.gobalVue.signCount();
  638. layer.closeAll();
  639. parent.layer.closeAll();
  640. }, 1000)
  641. } else {
  642. showErrorMessage(res.msg);
  643. }
  644. })
  645. } else {
  646. signAPI.signRenew(vm.signInfo).then(function(res) {
  647. layer.close(loadding)
  648. if(res.status == 200) {
  649. showSuccessMessage(res.msg || "操作成功")
  650. setTimeout(function() {
  651. parent.gobalVue.signCount();
  652. layer.closeAll();
  653. parent.layer.closeAll();
  654. }, 1000)
  655. } else {
  656. showErrorMessage(res.msg);
  657. }
  658. })
  659. }
  660. }
  661. }
  662. })