sign_handle.js 20 KB

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