车辆管理系统-后台管理系统web
spring
4 天以前 9a11bff3d98aea29f37abc34a00a17f5c92ade9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<template>
  <div class="order-container">
    <div v-if="hasPremi" class="OrderCancellation">
      <div class="header"></div>
      <div class="whiteBg">
        <div class="input">
          <input placeholder="请输入排队号码" v-model="verify_code" />
        </div>
        <div class="bnt" @click="storeCancellation">查询</div>
      </div>
      <div class="scan" @click="openQRCode">
        <img src="../../../assets/imgs/scanCode.png" @click="openQRCode" />
      </div>
    </div>
  </div>
</template>
<script>
import { getVeghicleByNumApi } from "@/api/vehicle";
import { Encrypt } from "@/utils/aes";
import { checkPermi } from "@/utils/permission"; // 权限判断函数
 
export default {
  name: "OrderCancellation",
  components: {},
  props: {},
  data: function () {
    return {
      iShidden: true,
      orderInfo: null,
      verify_code: "",
      hasPremi: false,
    };
  },
  created() {
    import("@/assets/js/media_750");
  },
  mounted() {
    if (checkPermi(["admin:doorkeeper:page"])) {
      //有权限
      this.hasPremi = true;
    } else {
      //没有
      this.hasPremi = false;
      this.$router.push({
        path: "/maintain/user",
      });
    }
  },
  methods: {
    storeCancellation: function () {
      if (!this.verify_code) return this.$dialog.error("请输入排队号码");
 
      getVeghicleByNumApi(this.verify_code, false)
        .then((res) => {
          //先判断有效期 获取当前系统时间 不在有效期内 提示
 
          if (res.vehicleStatusCode == 1255) {
            this.$dialog.error("正在排队中不允许入厂,请等待叫号");
          } else if (res.vehicleStatusCode == 1257) {
            this.$dialog.error("已过号不允许入厂,请重新排队");
          } else {
            this.$router.push({
              path: "hexiaoInfo",
              query: {
                queueNumber: Encrypt(this.verify_code),
              },
            });
          }
        })
        .catch((err) => {
          console.log(err);
          if (err.message) {
            this.$dialog.error(err.message);
          } else {
            this.$dialog.error("未查到车辆信息");
          }
        });
    },
    openQRCode: function () {
      window.location.href = "scan";
      // this.$router.push({
      //   path: "hexiao",
      // });
    },
  },
};
</script>
<style lang="scss">
.order-container {
  height: 100%;
}
.OrderCancellation {
  background: linear-gradient(151deg, #e0e7ff 0%, #ffffff 100%);
  height: 100%;
}
 
.OrderCancellation .header {
  background: url("../../../assets/imgs/mobileHeadbj.png") no-repeat;
  width: 100%;
  height: 47vw;
  background-size: 100% 100%;
}
 
.OrderCancellation .whiteBg {
  width: 7.07rem;
  background-color: #fff;
  margin: -2.13rem auto 0 auto;
  padding-top: 1.3rem;
  padding-bottom: 0.3536rem;
  border-radius: 0.2rem 0.2rem 0 0;
}
 
.OrderCancellation .whiteBg .input {
  width: 6rem;
  margin: 0 auto;
  border-bottom: 0.02rem solid #999;
}
 
.OrderCancellation .whiteBg .input input {
  padding: 0.25rem;
  font-size: 0.5rem;
  color: #282828;
  width: 100%;
  text-align: center;
  border: none;
}
 
.OrderCancellation .whiteBg .bnt {
  font-size: 0.3rem;
  color: #fff;
  width: 6.24rem;
  height: 1rem;
  border-radius: 0.12rem;
  background: #3873f3;
  margin: 0.7rem auto 0 auto;
  text-align: center;
  line-height: 1rem;
}
 
.OrderCancellation .scan {
  width: 2.49rem;
  height: 2.49rem;
  margin: 2.75rem auto 0 auto;
}
 
.OrderCancellation .scan img {
  width: 100%;
  height: 100%;
  display: block;
}
.no-tip {
  text-align: center;
  position: absolute;
  top: 40%;
  width: 100%;
  font-size: 28px;
}
 
@media screen and (max-width: 1023px) {
  .main-container {
    background-color: #fff !important;
 
    .app-main {
      height: 100vh !important;
      background-color: #fff !important;
    }
  }
}
</style>