Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

official-car-issue.vue 2.2KB

2 år sedan
1 år sedan
2 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!-- 公务车发行 -->
  2. <template>
  3. <view class="title">公务车车牌号</view>
  4. <car-number-input inputColor="#fff" @numberInputResult="inputResult"></car-number-input>
  5. <view class="title">公务车车牌颜色</view>
  6. <view style="margin-left: 30rpx;margin-right: 100rpx;">
  7. <numberplate-color :numberplate="state.numberplate" @numberplateResult="checkNumberplateColor"></numberplate-color>
  8. </view>
  9. <view class="btn">
  10. <submit-button title="确定" @submit="confirm"></submit-button>
  11. </view>
  12. <!-- 未检测到车辆订单信息弹窗提示 -->
  13. <u-popup v-model="state.showPopup" mode="center" >
  14. <official-car-issue-hint @cancel="state.showPopup = false" @confirm="popupConfirm"></official-car-issue-hint>
  15. </u-popup>
  16. </template>
  17. <script setup lang="ts">
  18. import { msg, navTo } from '@/utils/utils';
  19. import { reactive } from "vue";
  20. import officialCarIssueHint from "./components/popup-official-car-issue-hint";
  21. import numberplateColor from "./components/layout-numberplate-color";
  22. const state = reactive({
  23. showPopup:false, //显示提示窗
  24. numberplate:'贵A1234', //车牌号
  25. numberplateColorID:-1, //选择的车牌ID
  26. })
  27. /* 车牌输入结果 */
  28. const inputResult = (result) =>{
  29. state.numberplate = result;
  30. }
  31. /* 选择车牌颜色 */
  32. const checkNumberplateColor = (item) => {
  33. state.numberplateColorID = item.id;
  34. }
  35. /* 弹窗点击确定 */
  36. const popupConfirm = () =>{
  37. msg('点击确定');
  38. state.showPopup = false;
  39. }
  40. /* 确定 */
  41. const confirm = () =>{
  42. if(!state.numberplate || state.numberplate === '贵A1234'){
  43. msg('请输入车牌号!');
  44. return;
  45. }
  46. if(state.numberplateColorID === -1){
  47. msg('请选择车牌颜色!');
  48. return;
  49. }
  50. if(true){//查询到结果
  51. navTo('/subpackage/personal-center/official-car-issue-result');
  52. }else{//没查询到结果
  53. state.showPopup = true;
  54. }
  55. }
  56. </script>
  57. <style>
  58. page{
  59. background-color: #EEF7F7;
  60. }
  61. :deep(.u-mode-center-box){
  62. border-radius: 20rpx;
  63. }
  64. </style>
  65. <style lang="scss" scoped>
  66. .title{
  67. font-size: 30rpx;
  68. color: #000000;
  69. font-weight: 600;
  70. padding: 36rpx 30rpx 40rpx;
  71. }
  72. .btn{
  73. margin: 60rpx 40rpx 50rpx;
  74. }
  75. </style>