meetingroom.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. <template>
  2. <div class="peripheral">
  3. <van-tabs v-model="active" @change="getActive" title-active-color="#1D18BC">
  4. <van-tab title="待办">
  5. <div class="tabs-box">
  6. <div class="part-2">
  7. <div
  8. class="card-item white-card"
  9. v-for="item in list1"
  10. :key="item.id"
  11. @click="goViewInfo(item)"
  12. >
  13. <div class="card-top">
  14. <div class="card-left">
  15. <p class="tit">{{ item.subject }}</p>
  16. <div class="date">
  17. <p>预约时间:{{ item.appointtime }}</p>
  18. <p>经办时间:{{ item.handlerTime }}</p>
  19. <p v-if="item.cancelReason">
  20. 取消原因:{{ item.cancelReason }}
  21. </p>
  22. </div>
  23. </div>
  24. <div class="card-right">
  25. <span class="z" v-if="item.state == '1'">等待审核</span>
  26. <span class="y" v-if="item.state == '2'"> 等待付费</span>
  27. <span class="y" v-if="item.state == '3'">等待确认</span>
  28. <span class="g" v-if="item.state == '4'">预定成功</span>
  29. <span class="h" v-if="item.state == '5'">已取消</span>
  30. </div>
  31. </div>
  32. <div class="card-bottom">
  33. <span
  34. class="normal-button-app z-bt"
  35. @click.stop="goViewInfo(item)"
  36. >{{ item.state == "1" ? "审核" : "确认" }}</span
  37. >
  38. <span
  39. class="normal-button-app y-bt"
  40. @click.stop="cancelApple(item)"
  41. >取消</span
  42. >
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </van-tab>
  48. <van-tab title="已办">
  49. <div class="tabs-box">
  50. <div class="part-2">
  51. <!-- @click="goNavigator('meetingRoom-audit-app')" -->
  52. <div
  53. class="card-item white-card"
  54. v-for="item in list1"
  55. :key="item.id"
  56. @click="goViewInfoDetial(item)"
  57. >
  58. <div class="card-top">
  59. <div class="card-left">
  60. <p class="tit">{{ item.subject }}</p>
  61. <div class="date">
  62. <p>预约时间:{{ item.appointtime }}</p>
  63. <p>经办时间:{{ item.examineTime }}</p>
  64. <p v-if="item.cancelReason">
  65. 取消原因:{{ item.cancelReason }}
  66. </p>
  67. </div>
  68. </div>
  69. <div class="card-right">
  70. <span class="z" v-if="item.state == '1'">等待审核</span>
  71. <span class="y" v-if="item.state == '2'"> 等待付费</span>
  72. <span class="y" v-if="item.state == '3'">等待确认</span>
  73. <span class="g" v-if="item.state == '4'">预定成功</span>
  74. <span class="h" v-if="item.state == '5'">已取消</span>
  75. </div>
  76. </div>
  77. <div class="card-bottom">
  78. <!-- <span
  79. class="normal-button-app z-bt"
  80. @click.stop="goNavigator('meetingRoom-paymentVoucher')"
  81. >确认</span
  82. >
  83. <span class="normal-button-app y-bt">取消</span> -->
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </van-tab>
  89. </van-tabs>
  90. </div>
  91. </template>
  92. <script>
  93. // import auth from "@/service/auth";
  94. import PositionNav from "./components/position-nav/index.vue";
  95. import { listApp, cancelAppoint } from "@/js_sdk/http";
  96. export default {
  97. components: {
  98. PositionNav,
  99. },
  100. data() {
  101. return {
  102. active: 0,
  103. currUser: {},
  104. list1: [
  105. {
  106. title: "指数基金投资培训会 ",
  107. timeStart: "2021/3/21 下午2:00",
  108. timeEnd: "2021/3/21 下午2:00",
  109. type: "1",
  110. text: "",
  111. },
  112. {
  113. title: "会议主题XXXXXXXXX ",
  114. timeStart: "2021/3/21 下午2:00",
  115. timeEnd: "2021/3/21 下午2:00",
  116. type: "2",
  117. text: "",
  118. },
  119. {
  120. title: "会议主题XXXXXXXXX ",
  121. timeStart: "2021/3/21 下午2:00",
  122. timeEnd: "2021/3/21 下午2:00",
  123. type: "3",
  124. text: "天气不好",
  125. },
  126. {
  127. title: "会议主题XXXXXXXXX ",
  128. timeStart: "2021/3/21 下午2:00",
  129. timeEnd: "2021/3/21 下午2:00",
  130. type: "4",
  131. text: "天气不好",
  132. },
  133. {
  134. title: "会议主题XXXXXXXXX ",
  135. timeStart: "2021/3/21 下午2:00",
  136. timeEnd: "2021/3/21 下午2:00",
  137. type: "5",
  138. text: "",
  139. },
  140. ],
  141. };
  142. },
  143. onLoad() {
  144. // this.currUser = auth.currUser();
  145. console.log(123123);
  146. // this.activeClick();
  147. this.getAppointList("1,3");
  148. },
  149. methods: {
  150. getActive(event) {
  151. console.log(event.detail.index);
  152. if (event.detail.index == 0) {
  153. this.getAppointList("1,3");
  154. } else {
  155. this.getAppointList("2,4,5");
  156. }
  157. },
  158. cancelApple(item) {
  159. const reqData = {
  160. id: item.id,
  161. };
  162. cancelAppoint(reqData).then((res) => {
  163. if (res.key == 200) {
  164. this.$showToast("取消成功!");
  165. this.activeClick();
  166. }
  167. });
  168. },
  169. activeClick() {
  170. if (this.active == 0) {
  171. this.getAppointList("1,3");
  172. } else {
  173. this.getAppointList("2,4,5");
  174. }
  175. },
  176. // 获取预约列表
  177. getAppointList(state) {
  178. this.list1 = [];
  179. const token = uni.getStorageSync("laocui_user_info");
  180. console.log(token);
  181. const reqData = {
  182. states: state,
  183. };
  184. if (this.active != 0) {
  185. // reqData.userId = JSON.parse(token).user.id;
  186. }
  187. listApp(reqData).then((res) => {
  188. this.list1 = res.data;
  189. });
  190. },
  191. // 操作跳转页面
  192. goViewInfo(item) {
  193. if (item.state == "1") {
  194. this.goNavigator("meetingRoom-audit-app", {
  195. id: item.id,
  196. readOnlyType: false,
  197. });
  198. } else {
  199. this.goNavigator("meetingRoom-confirm-app", {
  200. id: item.id,
  201. readOnlyType: false,
  202. });
  203. }
  204. },
  205. // 操作跳转页面
  206. goViewInfoDetial(item) {
  207. if (item.state == "2" || item.state == "5") {
  208. uni.navigateTo({
  209. url:
  210. "/pages/subPackages/meetingroom/components/audit?id=" +
  211. item.id +
  212. "&readOnlyType=" +
  213. true,
  214. });
  215. // this.goNavigator("meetingRoom-audit-app", {
  216. // id: item.id,
  217. // readOnlyType: true,
  218. // });
  219. } else {
  220. this.goNavigator("meetingRoom-confirm-app", {
  221. id: item.id,
  222. readOnlyType: true,
  223. });
  224. }
  225. },
  226. },
  227. };
  228. </script>
  229. <style lang="scss" >
  230. .normal-button-app {
  231. font-size: 26rpx;
  232. padding: 13rpx 35rpx;
  233. border-radius: 30rpx;
  234. margin-left: 26rpx;
  235. // 紫色
  236. &.z-bt {
  237. border: 1px solid #6600ff;
  238. background: #ecdfff;
  239. color: #6600ff;
  240. }
  241. // 黄色
  242. &.y-bt {
  243. border: 1px solid #ffa913;
  244. background: #fff7e8;
  245. color: #ffa913;
  246. }
  247. //绿色
  248. &.l-bt {
  249. border: 1px solid #54d478;
  250. background: #9bd8ac4d;
  251. color: #54d478;
  252. }
  253. //红色
  254. &.r-bt {
  255. border: 1px solid #f61212;
  256. background: #ffebeb;
  257. color: #e80f0f;
  258. }
  259. // 灰色
  260. &.h-bt {
  261. border: 1px solid #888888;
  262. background: #fafafa;
  263. color: #555555;
  264. }
  265. }
  266. .white-card {
  267. padding: 30rpx;
  268. background: #fff;
  269. box-shadow: 0px 0px 30rpx 0px rgba(0, 0, 0, 0.1);
  270. border-radius: 20rpx;
  271. }
  272. .peripheral {
  273. .tabs-box {
  274. margin: 40rpx 0;
  275. .part-2 {
  276. overflow-y: auto;
  277. height: calc(100vh - 240rpx);
  278. box-sizing: border-box;
  279. .card-item {
  280. margin: 0 30rpx 15rpx;
  281. .card-top {
  282. // @include flex;
  283. display: flex;
  284. .card-left {
  285. display: flex;
  286. justify-content: space-between;
  287. flex-direction: column;
  288. width: 80%;
  289. .tit {
  290. width: 100%;
  291. font-size: 32rpx;
  292. color: #333;
  293. font-weight: bold;
  294. // @include line-over;
  295. margin-bottom: 30rpx;
  296. }
  297. .date {
  298. line-height: 1.4;
  299. font-size: 28rpx;
  300. color: #999;
  301. }
  302. }
  303. .card-right {
  304. align-self: flex-start;
  305. span {
  306. font-size: 28rpx;
  307. }
  308. .z {
  309. color: #976dec;
  310. }
  311. .y {
  312. color: #ffb41f;
  313. }
  314. .g {
  315. color: #54d478;
  316. }
  317. .h {
  318. color: #999999;
  319. }
  320. }
  321. }
  322. }
  323. .card-bottom {
  324. height: 80rpx;
  325. display: flex;
  326. justify-content: flex-end;
  327. align-items: center;
  328. }
  329. }
  330. }
  331. }
  332. </style>