index.vue 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <div class="subPage">
  3. <div class="flex-h top">
  4. <div class="flex-item">
  5. <div>
  6. <i class="iconfont icon-qrcode"></i>
  7. <span>1</span>
  8. <span>请用户出示核销的二维码<br>请将网页输入法切换为英文</span>
  9. </div>
  10. </div>
  11. <div class="flex-item">
  12. <div>
  13. <i class="iconfont icon-saoma"></i>
  14. <span>2</span>
  15. <span>点击“立即核销”按钮<br>使用扫码枪扫描客户二维码</span>
  16. </div>
  17. </div>
  18. <div class="flex-item">
  19. <div>
  20. <i class="iconfont icon-hexiao"></i>
  21. <span>3</span>
  22. <span>根据提示进行核销操作</span>
  23. </div>
  24. </div>
  25. </div>
  26. <div style="text-align:center;margin-top:40px;">
  27. <el-button type="danger" round @click="centerDialogVisible = true">立即核销</el-button>
  28. </div>
  29. <el-dialog
  30. title="核销"
  31. :visible.sync="centerDialogVisible"
  32. width="500px"
  33. center>
  34. <div v-if="centerDialogVisible">
  35. <el-input
  36. autofocus
  37. ref="input"
  38. placeholder="请输入核销码"
  39. v-model="verificationCode"
  40. clearable>
  41. </el-input>
  42. </div>
  43. <span slot="footer" class="dialog-footer">
  44. <el-button @click="centerDialogVisible = false; verificationCode = '';">取 消</el-button>
  45. <el-button type="primary" @click="toVerificationList">确 定</el-button>
  46. </span>
  47. </el-dialog>
  48. </div>
  49. </template>
  50. <script>
  51. export default {
  52. name: '',
  53. data () {
  54. return {
  55. centerDialogVisible: false, // 显隐核销弹窗
  56. verificationCode: '', // 核销码
  57. }
  58. },
  59. mounted () {
  60. this.$nextTick(function () { })
  61. },
  62. methods: {
  63. toVerificationList () { // 定向到核销列表
  64. if (this.verificationCode !== '') {
  65. this.$router.push({ name: 'qrcodeVerificationList', query: { code: this.verificationCode } })
  66. } else {
  67. this.$message({
  68. message: '核销码为空!',
  69. type: 'error'
  70. })
  71. }
  72. },
  73. }
  74. }
  75. </script>
  76. <!-- Add "scoped" attribute to limit CSS to this component only -->
  77. <style lang="scss" scoped>
  78. @import "page.scss";
  79. </style>