verification.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <div class="box">
  3. <div class="null-page" v-show="yes"></div>
  4. <el-card class="box-card order-list">
  5. <div slot="header" class="clearfix"><span>核销台</span></div>
  6. <div class="ns-verification">
  7. <div class="ns-verification-flow">
  8. <div class="ns-verification-icon">
  9. <div><i class="iconfont icon-shurutianxiebi"></i></div>
  10. <p>输入核销码</p>
  11. </div>
  12. <div><i class="iconfont icon-jiang-copy"></i></div>
  13. <div class="ns-verification-icon">
  14. <div><i class="iconfont icon-hexiao"></i></div>
  15. <p>核销</p>
  16. </div>
  17. </div>
  18. <div class="ns-verification-wrap">
  19. <el-input v-model="verify_code" placeholder="请输入核销码"></el-input>
  20. <el-button @click="confirm">确认</el-button>
  21. </div>
  22. </div>
  23. </el-card>
  24. </div>
  25. </template>
  26. <script>
  27. import {
  28. checkisverifier,
  29. verifyInfo
  30. } from "@/api/order/verification"
  31. export default {
  32. name: "verification",
  33. components: {},
  34. data: () => {
  35. return {
  36. verify_code: "",
  37. yes: true
  38. }
  39. },
  40. created() {},
  41. layout: 'member',
  42. mounted() {
  43. let self = this;
  44. setTimeout(function() {
  45. self.yes = false
  46. }, 300)
  47. },
  48. methods: {
  49. confirm() {
  50. var reg = /[\S]+/
  51. if (!reg.test(this.verify_code)) {
  52. this.$message({
  53. message: "请输入核销码",
  54. type: "warning"
  55. })
  56. return false
  57. }
  58. verifyInfo({
  59. verify_code: this.verify_code
  60. })
  61. .then(res => {
  62. if (res.code >= 0) {
  63. this.$router.push({
  64. path: "/order/verification_detail",
  65. query: {
  66. code: this.verify_code
  67. }
  68. })
  69. } else {
  70. this.$message({
  71. message: res.message,
  72. type: "warning"
  73. })
  74. }
  75. })
  76. .catch(err => {
  77. this.$message.error(err.message)
  78. })
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .box {
  85. width: 100%;
  86. position: relative;
  87. }
  88. .null-page {
  89. width: 100%;
  90. height: 730px;
  91. background-color: #FFFFFF;
  92. position: absolute;
  93. top: 0;
  94. left: 0;
  95. z-index: 9;
  96. }
  97. .ns-verification {
  98. margin: 20px 0;
  99. background: #ffffff;
  100. padding: 80px;
  101. text-align: center;
  102. .ns-verification-flow {
  103. display: flex;
  104. justify-content: center;
  105. .ns-verification-icon {
  106. width: 150px;
  107. margin: 0 20px;
  108. div {
  109. display: inline-block;
  110. background: #eee;
  111. width: 60px;
  112. height: 60px;
  113. text-align: center;
  114. line-height: 60px;
  115. border-radius: 50%;
  116. }
  117. p {
  118. color: #999999;
  119. margin-top: 5px;
  120. }
  121. }
  122. i {
  123. font-size: 30px;
  124. color: #999999;
  125. }
  126. }
  127. .ns-verification-wrap {
  128. display: inline-block;
  129. width: 500px;
  130. margin-top: 50px;
  131. .el-button {
  132. margin-top: 50px;
  133. background: $base-color;
  134. color: #ffffff;
  135. }
  136. }
  137. }
  138. </style>