wangzhengchao 3 years ago
parent
commit
883a39e026

+ 7 - 2
src/permission.js

@@ -1,16 +1,21 @@
 // import {setStore, getStore, removeStore} from '@/utils/store'
 import router from './router'
-import {getToken} from '@/utils/auth'
+import {
+  getToken
+} from '@/utils/auth'
 import store from '@/store'
 import ViewUI from 'view-design'
 
 router.beforeEach((to, from, next) => {
   ViewUI.LoadingBar.start()
+  // console.log(to, 1111111111)
   const meta = to.meta || {}
   // 设置顶部标题
   store.state.common.heightTitle = to.name
   // Token 校验验证
-  if (localStorage.getItem('token')) {
+  if (to.path == '/checkMeetingOrder') {
+    next()
+  } else if (localStorage.getItem('token')) {
     if (to.matched.length === 0) {
       next('/404')
     } else {

+ 13 - 4
src/router/index.js

@@ -4,10 +4,10 @@ Vue.use(Router)
 /**
  * 重写路由的push方法
  */
- const VueRouterPush = Router.prototype.push
- Router.prototype.push = function push (to) {
-   return VueRouterPush.call(this, to).catch(err => err)
- }
+const VueRouterPush = Router.prototype.push
+Router.prototype.push = function push(to) {
+  return VueRouterPush.call(this, to).catch(err => err)
+}
 export default new Router({
   routes: [{
     path: '/',
@@ -18,6 +18,15 @@ export default new Router({
       isTab: false,
       isAuth: false
     }
+  }, {
+    path: '/checkMeetingOrder',
+    name: '会议预约详情',
+    component: () => import('@/views/checkMeetingOrder'),
+    meta: {
+      keepAlive: false,
+      isTab: false,
+      isAuth: false
+    }
   }, {
     path: '/index',
     name: 'Index',

+ 285 - 0
src/views/checkMeetingOrder/index.vue

@@ -0,0 +1,285 @@
+<template>
+  <div class="contentCard">
+    <Card class="contentCard">
+      <Tabs v-model="tabs" :animated="false">
+        <TabPane :label="`订单信息`" name="1">
+          <h3 class="title">订单信息</h3>
+          <Row class="mainCont">
+            <Col span="6" class-name="tables">订单编号</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.orderId }}
+            </Col>
+            <Col span="6" class-name="tables">订单状态</Col>
+            <Col span="6" class-name="tables">
+              <span v-show="addForm.orderState == 1">待审核</span>
+              <span v-show="addForm.orderState == 2">已驳回</span>
+              <span v-show="addForm.orderState == 3">已完成</span>
+              <span v-show="addForm.orderState == 4">待支付</span>
+              <span v-show="addForm.orderState == 5">待确认收款</span>
+              <span v-show="addForm.orderState == 6">进行中</span>
+              <span v-show="addForm.orderState == 7">已取消</span>
+            </Col>
+            <Col span="6" class-name="tables">下单人</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.creator }}
+            </Col>
+            <Col span="6" class-name="tables">订单编号</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.createDate }}
+            </Col>
+            <Col span="6" class-name="tables">下单人电话</Col>
+            <Col span="18" class-name="tables">
+              {{ addForm.creatorPhone }}
+            </Col>
+            <Col span="6" class-name="tables">联系人</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.contactName }}
+            </Col>
+            <Col span="6" class-name="tables">联系人电话</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.contactPhone }}
+            </Col>
+            <Col span="6" class-name="tables">会议室费用(元)</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.contactName }}
+            </Col>
+            <Col span="6" class-name="tables">增值服务费用(元)</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.addServicePrice }}
+            </Col>
+          </Row>
+          <Row
+            class="uplCont"
+            type="flex"
+            justify="center"
+            style="align-items: stretch"
+          >
+            <Col span="6" class-name="upl">订单总费用(元)</Col>
+            <Col span="18" class-name="uplf">
+              {{ addForm.orderPrice }}
+            </Col>
+          </Row>
+          <Row class="mainCont" style="border-top: none">
+            <Col span="6" class-name="tables">支付方式</Col>
+            <Col span="6" class-name="tables">
+              <span v-show="addForm.payType == 'code'">二维码</span>
+              <span v-show="addForm.payType == 'jsapi'">微信公众号</span>
+              <span v-show="addForm.payType == 'mini'">银联小程序</span>
+              <span v-show="addForm.payType == 'wxmini'">微信小程序</span>
+              <span v-show="addForm.payType == 'app'">app支付</span>
+              <span v-show="addForm.payType == 'h5'">H5支付</span>
+              <span v-show="addForm.payType == 'pos'">POS机支付</span>
+            </Col>
+            <Col span="6" class-name="tables">支付状态</Col>
+            <Col span="6" class-name="tables">
+              <span v-show="addForm.payState == 1">待支付</span>
+              <span v-show="addForm.payState == 2">待确认收款</span>
+              <span v-show="addForm.payState == 3">已完成支付</span>
+              <span v-show="addForm.payState == 4">已取消</span>
+            </Col>
+            <Col span="6" class-name="tables">备注信息</Col>
+            <Col span="18" class-name="tables">
+              {{ addForm.orderRemark }}
+            </Col>
+          </Row>
+          <h3 class="title">会议室信息</h3>
+          <Row class="mainCont">
+            <Col span="6" class-name="tables">会议室名称</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.meetingName }}
+            </Col>
+            <Col span="6" class-name="tables">会议室面积</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.acreage }}
+            </Col>
+            <Col span="6" class-name="tables">会议室地址</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.address }}
+            </Col>
+            <Col span="6" class-name="tables">最大容纳人数</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.capacity }}
+            </Col>
+          </Row>
+          <h3 class="title">预约信息</h3>
+          <Row class="mainCont">
+            <Col span="6" class-name="tables">预约时间</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.reserveDate }}
+            </Col>
+            <Col span="6" class-name="tables">预定天数</Col>
+            <Col span="6" class-name="tables">
+              {{ addForm.reserveDays }}
+            </Col>
+          </Row>
+          <Row
+            class="uplCont"
+            type="flex"
+            justify="center"
+            style="align-items: stretch"
+          >
+            <Col span="6" class-name="upl">增值服务</Col>
+            <Col span="18" class-name="uplf" style="padding: 10px">
+              <Table :data="td" :columns="serviceColumn" border></Table>
+            </Col>
+          </Row>
+        </TabPane>
+        <!-- <TabPane :label="'操作记录'" name="2">
+          <div style="width: 100%">
+            <Table border :columns="czColumn" :data="czData">
+              <template slot-scope="{ row }" slot="operatorContent">
+                {{ row.operatorContent }}
+                <div class="demo-upload-list" v-if="row.filePath">
+                  <img :src="row.filePath" />
+                  <div class="demo-upload-list-cover">
+                    <Icon
+                      type="ios-eye-outline"
+                      @click.native="handleView(row.filePath)"
+                    ></Icon>
+                  </div>
+                </div>
+              </template>
+            </Table>
+          </div>
+        </TabPane> -->
+        <!-- <Button slot="extra" @click="cancel()">返回</Button> -->
+      </Tabs>
+      <Modal title="查看图片" v-model="imgView">
+        <img :src="viewImg" style="width: 100%" />
+      </Modal>
+    </Card>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      imgView: false,
+      viewImg: null,
+      td: [],
+      tabs: "1",
+      addForm: {
+        orderId: "",
+        orderState: "",
+        creator: "",
+        createDate: "",
+        creatorPhone: "",
+        contactName: "",
+        contactPhone: "",
+        meetingPrice: "",
+        addServicePrice: "",
+        orderPrice: "",
+        orderRemark: "",
+        payState: "",
+        payType: "",
+        acreage: "",
+        address: "",
+        meetingName: "",
+        capacity: "",
+      },
+      serviceColumn: [
+        {
+          type: "index",
+          title: "序号",
+          width: 80,
+          align: "center",
+        },
+        {
+          title: "服务名称",
+          key: "followItem",
+          align: "center",
+          tooltip: true,
+        },
+        {
+          title: "单价",
+          key: "followItem",
+          align: "center",
+          tooltip: true,
+        },
+        {
+          title: "数量",
+          key: "followItem",
+          align: "center",
+          tooltip: true,
+        },
+        {
+          title: "金额(元)",
+          key: "followItem",
+          align: "center",
+          tooltip: true,
+        },
+      ],
+      czColumn: [
+        {
+          title: "操作类型",
+          key: "operationType",
+        },
+        {
+          title: "操作人",
+          key: "creator",
+        },
+        {
+          title: "操作时间",
+          key: "createDate",
+        },
+        {
+          title: "操作内容",
+          slot: "operatorContent",
+        },
+      ],
+      czData: [],
+    };
+  },
+  created() {
+    this.getInfo(this.$route.query.fkId);
+  },
+  methods: {
+    cancel() {
+      this.tabs = "1";
+      this.addForm = {
+        orderId: "",
+        orderState: "",
+        creator: "",
+        createDate: "",
+        creatorPhone: "",
+        contactName: "",
+        contactPhone: "",
+        meetingPrice: "",
+        addServicePrice: "",
+        orderPrice: "",
+        orderRemark: "",
+        payState: "",
+        payType: "",
+        acreage: "",
+        address: "",
+        meetingName: "",
+        capacity: "",
+      };
+      this.czData = [];
+      this.$emit("return");
+    },
+    handleView(path) {
+      this.viewImg = path;
+      this.imgView = true;
+    },
+    getInfo(id) {
+      this.api.queryOrderInfo(id).then((res) => {
+        if (res.status == 10000) {
+          this.addForm = res.data;
+        }
+      });
+      //   this.api.queryOperationLog(id).then((res) => {
+      //     this.czData = res.data;
+      //   });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.title {
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+</style>

+ 13 - 4
src/views/meetingEvent/index.vue

@@ -277,12 +277,21 @@ export default {
     });
   },
   mounted() {
-    let buttonList = JSON.parse(localStorage.getItem("buttonList"));
-    for (let i in buttonList) {
-      this.buttonShow[buttonList[i].btnCode] = true;
-    }
+    this.getButtonShow();
   },
   methods: {
+    getButtonShow() {
+      if (!localStorage.getItem("buttonList")) {
+        setTimeout(() => {
+          this.getButtonShow();
+        }, 500);
+      } else {
+        let buttonList = JSON.parse(localStorage.getItem("buttonList"));
+        for (let i in buttonList) {
+          this.buttonShow[buttonList[i].btnCode] = true;
+        }
+      }
+    },
     pageChange(val) {
       this.pageNum = val;
       this.getTableData();

+ 13 - 4
src/views/meetingRoomEquip/index.vue

@@ -334,12 +334,21 @@ export default {
     this.getTree();
   },
   mounted() {
-    let buttonList = JSON.parse(localStorage.getItem("buttonList"));
-    for (let i in buttonList) {
-      this.buttonShow[buttonList[i].btnCode] = true;
-    }
+    this.getButtonShow();
   },
   methods: {
+    getButtonShow() {
+      if (!localStorage.getItem("buttonList")) {
+        setTimeout(() => {
+          this.getButtonShow();
+        }, 500);
+      } else {
+        let buttonList = JSON.parse(localStorage.getItem("buttonList"));
+        for (let i in buttonList) {
+          this.buttonShow[buttonList[i].btnCode] = true;
+        }
+      }
+    },
     getTree() {
       this.api.serviceDictTreeList().then((res) => {
         if (res.status == 10000) {

+ 13 - 4
src/views/meetingRoomManage/index.vue

@@ -205,12 +205,21 @@ export default {
     this.getTableData();
   },
   mounted() {
-    let buttonList = JSON.parse(localStorage.getItem("buttonList"));
-    for (let i in buttonList) {
-      this.buttonShow[buttonList[i].btnCode] = true;
-    }
+    this.getButtonShow();
   },
   methods: {
+    getButtonShow() {
+      if (!localStorage.getItem("buttonList")) {
+        setTimeout(() => {
+          this.getButtonShow();
+        }, 500);
+      } else {
+        let buttonList = JSON.parse(localStorage.getItem("buttonList"));
+        for (let i in buttonList) {
+          this.buttonShow[buttonList[i].btnCode] = true;
+        }
+      }
+    },
     areaChange(val) {
       this.projectList = [];
       this.searchForm.projectId = "";

+ 13 - 4
src/views/meetingRoomOrder/index.vue

@@ -549,12 +549,21 @@ export default {
     this.getTableData();
   },
   mounted() {
-    let buttonList = JSON.parse(localStorage.getItem("buttonList"));
-    for (let i in buttonList) {
-      this.buttonShow[buttonList[i].btnCode] = true;
-    }
+    this.getButtonShow();
   },
   methods: {
+    getButtonShow() {
+      if (!localStorage.getItem("buttonList")) {
+        setTimeout(() => {
+          this.getButtonShow();
+        }, 500);
+      } else {
+        let buttonList = JSON.parse(localStorage.getItem("buttonList"));
+        for (let i in buttonList) {
+          this.buttonShow[buttonList[i].btnCode] = true;
+        }
+      }
+    },
     areaChange(val) {
       this.projectList = [];
       this.searchForm.projectId = "";