sign_manage.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>签约管理</title>
  6. <link rel="shortcut icon" href="../../../favicon.ico">
  7. <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
  8. <link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
  9. <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
  10. <link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
  11. <link rel="stylesheet" type="text/css" href="../css/sign_manage.css"/>
  12. </head>
  13. <body class="m0">
  14. <div id="app" v-cloak>
  15. <div class="re-title no-select">
  16. <div class="name">签约管理</div>
  17. </div>
  18. <div class="c-h100 p10">
  19. <div class="c-h100 c-border">
  20. <div class="lh28 pt10 plr10 clearfix">
  21. <div class="c-position-r fl mr20 mb10">
  22. 签约状态:<span class="list-tit set-bg cur-pit c-999" @click="selectStatus()">{{statusTit}}</span>
  23. <ul class="pull-list m0 p0 c-border-l c-border-r c-border-b" v-if="isShowList">
  24. <li class="cur-pit c-999" v-for="(status, index) in statusArr" :key="index" @click="selectLi(status)">{{status.statusName}}</li>
  25. </ul>
  26. </div>
  27. <p class="fl plr5 c-border mb10"><input type="text" v-model="keyword" class="inp c-999" placeholder="搜索居民姓名、手机号"><span class="sosou-btn" @click="suosou()"></span></p>
  28. <p class="fr btn plr10 mb10 c-fff h30 bgc-12b7f5 cur-pit" v-if="statusCode == 3 && isFocus" @click="remainFocus(1)">全部提醒关注</p>
  29. <p class="fr btn plr10 mb10 c-fff h30 bgc-12b7f5 cur-pit" v-if="statusCode == 5 && isMoney" @click="remainMoney(1)">全部提醒缴费</p>
  30. </div>
  31. <table width="100%" class="c-border-t lh40 p0 patient-table">
  32. <tr class="c-border-b c-999 clearfix">
  33. <th class="w-14">居民姓名</th>
  34. <th class="w-20">{{ statusCode == 3 ? "签约时间" : (statusCode == 1 ? "申请时间" : "预签约时间")}}</th>
  35. <th class="w-10">性别</th>
  36. <th class="w-10">年龄</th>
  37. <th class="w-10">类型</th>
  38. <th class="w-18">联系方式</th>
  39. <th class="w-18">操作</th>
  40. </tr>
  41. <tr v-for="(list, index) in resultList" :key="index" class="c-border-b clearfix">
  42. <td class="w-14">{{list.patientName || ""}}</td>
  43. <td class="w-20">{{list.applyDate || "无时间记录"}}</td>
  44. <td class="w-10">{{list.sex == 1 ? '男' : '女'}}</td>
  45. <td class="w-10">{{list.age ? list.age : '<1'}}岁</td>
  46. <td class="w-10">{{+list.renewFlag ? '续签' : '新签'}}</td>
  47. <td class="w-18">{{list.mobile || "无联系方式"}}</td>
  48. <td class="w-18">
  49. <span v-if="statusCode == 1" class="mr10 c-12b7f5 cur-pit" @click="handle(list)">处理</span>
  50. <span v-if="list.status == 1" class="mr10 c-12b7f5 cur-pit" @click="looking(list)">查看</span>
  51. <span v-if="list.expensesRemindStatus == 0" class="mr10 c-12b7f5 cur-pit" @click="remainMoney(0, list)">提醒缴费</span>
  52. <span v-if="!list.openid && list.wechatFocusRemind == 0" class="c-12b7f5 cur-pit" @click="remainFocus(0, list)">提醒关注</span>
  53. <span v-if="list.expensesRemindStatus == 1 || (list.wechatFocusRemind == 1 && !list.openid)" class="c-999">已提醒</span>
  54. </td>
  55. </tr>
  56. </table>
  57. <div class="mt20 mb10 lh24 pr30 c-t-center clearfix" v-show="resultList.length">
  58. <div class="fr ml10 clearfix">
  59. <span class="fl c-border w40 m0">
  60. <input class="fl w40 h22 c-f999" v-model="editPage" />
  61. </span>
  62. <span class="fr bgc-12b7f5 c-fff c-f12 btn sure-btn" @click="setPage(editPage)">跳转</span>
  63. </div>
  64. <span class="fr btn page-btn ml10" @click="setPage(page + 2)" v-if="page == 1 && (page + 2) <= allPage">{{page + 2}}</span>
  65. <span class="fr btn page-btn ml10" @click="setPage(page + 1)" v-if="(page + 1) <= allPage">{{page + 1}}</span>
  66. <span class="fr btn page-btn ml10 btn-active">{{page}}</span>
  67. <span class="fr btn page-btn ml10" @click="setPage(page - 1)" v-if="page != 1">{{page - 1}}</span>
  68. <span class="fr btn page-btn ml10" @click="setPage(page - 2)" v-if="page > 2 && page == allPage">{{page - 2}}</span>
  69. <span class="fr">当前第{{page}}页,共{{allPage}}页,{{allRecords}}条数据</span>
  70. </div>
  71. <p class="pt60 c-t-center c-999 c-f24" v-show="!resultList.length">无数据</p>
  72. </div>
  73. </div>
  74. </div>
  75. <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
  76. <script src="../../../js/jquery-2.2.4.js"></script>
  77. <script src="../../../plugins/layer/layer.min.js"></script>
  78. <script src="../../../js/bootstrap.min.js"></script>
  79. <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
  80. <script src="../../../plugins/toastr/toastr.min.js"></script>
  81. <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
  82. <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
  83. <script src="../../../api/http-request.js" type="text/javascript"></script>
  84. <script src="../../../api/sign_api.js" type="text/javascript"></script>
  85. <script type="text/javascript">
  86. var doctorType = (JSON.parse(window.localStorage.getItem('wlyyAgent'))||{}).doctorType
  87. var httpData=GetRequest()
  88. function showSuccessMessage(msg) {
  89. layer.msg(msg, {
  90. icon: 1
  91. })
  92. }
  93. function showErrorMessage(msg) {
  94. layer.msg(msg, {
  95. icon: 5
  96. })
  97. }
  98. function showWarningMessage(msg) {
  99. layer.msg(msg, {
  100. icon: 2
  101. })
  102. }
  103. function showInfoMessage(msg) {
  104. layer.msg(msg, {
  105. icon: 6
  106. })
  107. }
  108. gobalVue = new Vue({
  109. el: "#app",
  110. data: {
  111. isShowList: false,
  112. keyword: "",
  113. isFocus: false,
  114. isMoney: false,
  115. statusTit: null,
  116. statusCode: httpData.statusCode || 3,
  117. statusArr: [{
  118. statusName: '待签约',
  119. statusCode: '1'
  120. }, {
  121. statusName: '待缴费',
  122. statusCode: '5'
  123. }, {
  124. statusName: '已签约',
  125. statusCode: '3'
  126. }],
  127. resultList: [],
  128. editPage: null,
  129. page: 1,
  130. allPage: null,
  131. allRecords: null,
  132. allCount: null
  133. },
  134. mounted: function() {
  135. this.getStatusTit();
  136. this.isRemainFocus();
  137. this.isRemainMoney();
  138. this.signCount();
  139. },
  140. methods: {
  141. signCount: function() {
  142. var vm = this,
  143. param = {
  144. patientInfo: this.keyword
  145. },
  146. loadding = layer.load(0, {shade: false});
  147. signAPI.signCount(param).then(function(res) {
  148. layer.close(loadding)
  149. if(res.status == 200) {
  150. vm.allCount = res.data;
  151. vm.signList();
  152. } else {
  153. showErrorMessage(res.msg);
  154. }
  155. })
  156. },
  157. isRemainFocus: function() {
  158. var vm = this,
  159. loadding = layer.load(0, {shade: false});
  160. signAPI.isRemainFocus().then(function(res) {
  161. layer.close(loadding)
  162. if(res.status == 200) {
  163. if(!res.data) {
  164. vm.isFocus = true;
  165. }
  166. } else {
  167. showErrorMessage(res.msg);
  168. }
  169. })
  170. },
  171. isRemainMoney: function() {
  172. var vm = this,
  173. loadding = layer.load(0, {shade: false});
  174. signAPI.isRemainMoney().then(function(res) {
  175. layer.close(loadding)
  176. if(res.status == 200) {
  177. if(!res.data) {
  178. vm.isMoney = true;
  179. }
  180. } else {
  181. showErrorMessage(res.msg);
  182. }
  183. })
  184. },
  185. signList: function() {
  186. var vm = this
  187. vm.allPage = null
  188. var params = {
  189. doctorType: doctorType,
  190. status: vm.statusCode, //处理方式(1待签约 5待缴费 3已签约)
  191. page: vm.page,
  192. pageSize: 10,
  193. patientInfo: vm.keyword
  194. }
  195. var loadding = layer.load(0, {shade: false});
  196. signAPI.signList(params).then(function(res) {
  197. layer.close(loadding)
  198. if(res.status == 200) {
  199. if(vm.statusCode == 3) {
  200. vm.allRecords = vm.allCount.signCount
  201. } else if(vm.statusCode == 5) {
  202. vm.allRecords = vm.allCount.waitPayCount
  203. } else {
  204. vm.allRecords = vm.allCount.waitSignCount
  205. }
  206. vm.allPage = Math.ceil(vm.allRecords / 10)
  207. vm.resultList = res.data.list
  208. } else {
  209. showErrorMessage(res.msg);
  210. }
  211. })
  212. },
  213. selectStatus: function() {
  214. this.isShowList = !this.isShowList;
  215. },
  216. selectLi: function(data) {
  217. this.isShowList = false;
  218. if (this.statusTit === data.statusName) {
  219. return false;
  220. }
  221. this.page = 1;
  222. this.statusTit = data.statusName;
  223. this.statusCode = data.statusCode;
  224. this.keyword = "";
  225. this.signCount();
  226. },
  227. getStatusTit: function() {
  228. if(!httpData.statusCode) {
  229. this.statusTit = "已签约"
  230. } else {
  231. for (var i = 0; i < 3; i++) {
  232. if(this.statusArr[i].statusCode == httpData.statusCode) {
  233. this.statusTit = this.statusArr[i].statusName
  234. }
  235. }
  236. if (httpData.signStatus) {
  237. this.handle(httpData)
  238. }
  239. }
  240. },
  241. suosou: function() {
  242. this.page = 1;
  243. this.signCount();
  244. },
  245. handle: function(list) {
  246. var status;
  247. if(list.signStatus) {
  248. status = list.signStatus == 1 ? 0 : 1;
  249. } else {
  250. status = list.renewFlag == 1 || list.renewFlag == 2 ? 1 : 0;
  251. }
  252. layer.open({
  253. type: 2,
  254. area: ['80%', '648px'],
  255. shade: 0.5,
  256. title: '签约申请处理',
  257. fixed: true, //不固定
  258. maxmin: true,
  259. closeBtn: 1,
  260. shift: 5,
  261. shadeClose: false, //点击遮罩关闭层
  262. content: "sign_handle.html?patientCode="+list.patientCode+'&signCode='+list.code + '&status=' + status + '&msgid=' + list.msgid + "&renewFlag=" + list.renewFlag + "&applyDate=" + list.applyDate
  263. });
  264. },
  265. looking: function(list) {
  266. if(this.statusCode == 3) {
  267. layer.open({
  268. type: 2,
  269. area: ['80%', '648px'],
  270. shade: 0.5,
  271. title: '签约申请详情',
  272. fixed: true, //不固定
  273. maxmin: true,
  274. closeBtn: 1,
  275. shift: 5,
  276. shadeClose: false, //点击遮罩关闭层
  277. content: "sign_detail.html?patientCode="+list.patientCode+'&signCode='+list.code
  278. });
  279. } else {
  280. // 居民信息页
  281. layer.open({
  282. type: 2,
  283. area: ['740px', '645px'],
  284. shade: 0.5,
  285. title: '修改居民标签',
  286. fixed: true, //不固定
  287. maxmin: true,
  288. closeBtn: 1,
  289. shift: 5,
  290. shadeClose: false, //点击遮罩关闭层
  291. content: "userInfo.html?patient="+list.patientCode
  292. });
  293. }
  294. },
  295. remainMoney: function(status, list) {
  296. showInfoMessage("功能正在优化中,暂停使用,谢谢!")
  297. return false;
  298. var vm = this,
  299. loading = layer.load(0, {shade: false})
  300. param = {
  301. patient: list ? list.patientCode : "",
  302. isAll: status
  303. }
  304. signAPI.remainMoney(param).then(function(res) {
  305. layer.close(loading)
  306. if(res.status == 200) {
  307. showSuccessMessage(res.msg)
  308. vm.signList()
  309. } else {
  310. showErrorMessage(res.msg);
  311. }
  312. })
  313. },
  314. remainFocus: function(status, list) {
  315. showInfoMessage("功能正在优化中,暂停使用,谢谢!")
  316. return false;
  317. var vm = this,
  318. loading = layer.load(0, {shade: false})
  319. param = {
  320. patient: list ? list.patientCode : "",
  321. isAll: status
  322. }
  323. signAPI.remainFocus(param).then(function(res) {
  324. layer.close(loading)
  325. if(res.status == 200) {
  326. showSuccessMessage(res.msg)
  327. vm.signList()
  328. } else {
  329. showErrorMessage(res.msg);
  330. }
  331. })
  332. },
  333. setPage: function(key) {
  334. if (+key && +key > 0 && +key <= this.allPage) {
  335. this.page = +key;
  336. this.signList()
  337. } else {
  338. showWarningMessage('无效的页数跳转!');
  339. }
  340. }
  341. }
  342. })
  343. </script>
  344. </body>
  345. </html>