sign_handle.js 21 KB

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