123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343 |
- <template>
- <div class="peripheral">
- <van-tabs v-model="active" @change="getActive" title-active-color="#1D18BC">
- <van-tab title="待办">
- <div class="tabs-box">
- <div class="part-2">
- <div
- class="card-item white-card"
- v-for="item in list1"
- :key="item.id"
- @click="goViewInfo(item)"
- >
- <div class="card-top">
- <div class="card-left">
- <p class="tit">{{ item.subject }}</p>
- <div class="date">
- <p>预约时间:{{ item.appointtime }}</p>
- <p>经办时间:{{ item.handlerTime }}</p>
- <p v-if="item.cancelReason">
- 取消原因:{{ item.cancelReason }}
- </p>
- </div>
- </div>
- <div class="card-right">
- <span class="z" v-if="item.state == '1'">等待审核</span>
- <span class="y" v-if="item.state == '2'"> 等待付费</span>
- <span class="y" v-if="item.state == '3'">等待确认</span>
- <span class="g" v-if="item.state == '4'">预定成功</span>
- <span class="h" v-if="item.state == '5'">已取消</span>
- </div>
- </div>
- <div class="card-bottom">
- <span
- class="normal-button-app z-bt"
- @click.stop="goViewInfo(item)"
- >{{ item.state == "1" ? "审核" : "确认" }}</span
- >
- <span
- class="normal-button-app y-bt"
- @click.stop="cancelApple(item)"
- >取消</span
- >
- </div>
- </div>
- </div>
- </div>
- </van-tab>
- <van-tab title="已办">
- <div class="tabs-box">
- <div class="part-2">
- <!-- @click="goNavigator('meetingRoom-audit-app')" -->
- <div
- class="card-item white-card"
- v-for="item in list1"
- :key="item.id"
- @click="goViewInfoDetial(item)"
- >
- <div class="card-top">
- <div class="card-left">
- <p class="tit">{{ item.subject }}</p>
- <div class="date">
- <p>预约时间:{{ item.appointtime }}</p>
- <p>经办时间:{{ item.examineTime }}</p>
- <p v-if="item.cancelReason">
- 取消原因:{{ item.cancelReason }}
- </p>
- </div>
- </div>
- <div class="card-right">
- <span class="z" v-if="item.state == '1'">等待审核</span>
- <span class="y" v-if="item.state == '2'"> 等待付费</span>
- <span class="y" v-if="item.state == '3'">等待确认</span>
- <span class="g" v-if="item.state == '4'">预定成功</span>
- <span class="h" v-if="item.state == '5'">已取消</span>
- </div>
- </div>
- <div class="card-bottom">
- <!-- <span
- class="normal-button-app z-bt"
- @click.stop="goNavigator('meetingRoom-paymentVoucher')"
- >确认</span
- >
- <span class="normal-button-app y-bt">取消</span> -->
- </div>
- </div>
- </div>
- </div>
- </van-tab>
- </van-tabs>
- </div>
- </template>
- <script>
- // import auth from "@/service/auth";
- import PositionNav from "./components/position-nav/index.vue";
- import { listApp, cancelAppoint } from "@/js_sdk/http";
- export default {
- components: {
- PositionNav,
- },
- data() {
- return {
- active: 0,
- currUser: {},
- list1: [
- {
- title: "指数基金投资培训会 ",
- timeStart: "2021/3/21 下午2:00",
- timeEnd: "2021/3/21 下午2:00",
- type: "1",
- text: "",
- },
- {
- title: "会议主题XXXXXXXXX ",
- timeStart: "2021/3/21 下午2:00",
- timeEnd: "2021/3/21 下午2:00",
- type: "2",
- text: "",
- },
- {
- title: "会议主题XXXXXXXXX ",
- timeStart: "2021/3/21 下午2:00",
- timeEnd: "2021/3/21 下午2:00",
- type: "3",
- text: "天气不好",
- },
- {
- title: "会议主题XXXXXXXXX ",
- timeStart: "2021/3/21 下午2:00",
- timeEnd: "2021/3/21 下午2:00",
- type: "4",
- text: "天气不好",
- },
- {
- title: "会议主题XXXXXXXXX ",
- timeStart: "2021/3/21 下午2:00",
- timeEnd: "2021/3/21 下午2:00",
- type: "5",
- text: "",
- },
- ],
- };
- },
- onLoad() {
- // this.currUser = auth.currUser();
- console.log(123123);
- // this.activeClick();
- this.getAppointList("1,3");
- },
- methods: {
- getActive(event) {
- console.log(event.detail.index);
- if (event.detail.index == 0) {
- this.getAppointList("1,3");
- } else {
- this.getAppointList("2,4,5");
- }
- },
- cancelApple(item) {
- const reqData = {
- id: item.id,
- };
- cancelAppoint(reqData).then((res) => {
- if (res.key == 200) {
- this.$showToast("取消成功!");
- this.activeClick();
- }
- });
- },
- activeClick() {
- if (this.active == 0) {
- this.getAppointList("1,3");
- } else {
- this.getAppointList("2,4,5");
- }
- },
- // 获取预约列表
- getAppointList(state) {
- this.list1 = [];
- const token = uni.getStorageSync("laocui_user_info");
- console.log(token);
- const reqData = {
- states: state,
- };
- if (this.active != 0) {
- // reqData.userId = JSON.parse(token).user.id;
- }
- listApp(reqData).then((res) => {
- this.list1 = res.data;
- });
- },
- // 操作跳转页面
- goViewInfo(item) {
- if (item.state == "1") {
- this.goNavigator("meetingRoom-audit-app", {
- id: item.id,
- readOnlyType: false,
- });
- } else {
- this.goNavigator("meetingRoom-confirm-app", {
- id: item.id,
- readOnlyType: false,
- });
- }
- },
- // 操作跳转页面
- goViewInfoDetial(item) {
- if (item.state == "2" || item.state == "5") {
- uni.navigateTo({
- url:
- "/pages/subPackages/meetingroom/components/audit?id=" +
- item.id +
- "&readOnlyType=" +
- true,
- });
- // this.goNavigator("meetingRoom-audit-app", {
- // id: item.id,
- // readOnlyType: true,
- // });
- } else {
- this.goNavigator("meetingRoom-confirm-app", {
- id: item.id,
- readOnlyType: true,
- });
- }
- },
- },
- };
- </script>
- <style lang="scss" >
- .normal-button-app {
- font-size: 26rpx;
- padding: 13rpx 35rpx;
- border-radius: 30rpx;
- margin-left: 26rpx;
- // 紫色
- &.z-bt {
- border: 1px solid #6600ff;
- background: #ecdfff;
- color: #6600ff;
- }
- // 黄色
- &.y-bt {
- border: 1px solid #ffa913;
- background: #fff7e8;
- color: #ffa913;
- }
- //绿色
- &.l-bt {
- border: 1px solid #54d478;
- background: #9bd8ac4d;
- color: #54d478;
- }
- //红色
- &.r-bt {
- border: 1px solid #f61212;
- background: #ffebeb;
- color: #e80f0f;
- }
- // 灰色
- &.h-bt {
- border: 1px solid #888888;
- background: #fafafa;
- color: #555555;
- }
- }
- .white-card {
- padding: 30rpx;
- background: #fff;
- box-shadow: 0px 0px 30rpx 0px rgba(0, 0, 0, 0.1);
- border-radius: 20rpx;
- }
- .peripheral {
- .tabs-box {
- margin: 40rpx 0;
- .part-2 {
- overflow-y: auto;
- height: calc(100vh - 240rpx);
- box-sizing: border-box;
- .card-item {
- margin: 0 30rpx 15rpx;
- .card-top {
- // @include flex;
- display: flex;
- .card-left {
- display: flex;
- justify-content: space-between;
- flex-direction: column;
- width: 80%;
- .tit {
- width: 100%;
- font-size: 32rpx;
- color: #333;
- font-weight: bold;
- // @include line-over;
- margin-bottom: 30rpx;
- }
- .date {
- line-height: 1.4;
- font-size: 28rpx;
- color: #999;
- }
- }
- .card-right {
- align-self: flex-start;
- span {
- font-size: 28rpx;
- }
- .z {
- color: #976dec;
- }
- .y {
- color: #ffb41f;
- }
- .g {
- color: #54d478;
- }
- .h {
- color: #999999;
- }
- }
- }
- }
- .card-bottom {
- height: 80rpx;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- }
- }
- }
- }
- </style>
|