sureOut.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view>
  3. <view class="box">
  4. <view class="item">
  5. <view class="l">订单号:</view>
  6. <view class="r">
  7. {{form.no}}
  8. </view>
  9. </view>
  10. <view class="item">
  11. <view class="l">车牌号:</view>
  12. <view class="r">
  13. {{form.cardNo}}
  14. </view>
  15. </view>
  16. <view class="item">
  17. <view class="l">离场通道:</view>
  18. <view class="r">
  19. <u-input placeholder="离场通道" v-model="form.outChannel" />
  20. </view>
  21. </view>
  22. <view class="item">
  23. <view class="l">离场时间:</view>
  24. <view class="r">
  25. <uni-datetime-picker placeholder="离场时间" type="datetime" v-model="form.outDayTime" start="2021-11-30"
  26. end="2090-6-20" />
  27. </view>
  28. </view>
  29. </view>
  30. <u-button type="primary" @click="confirmFn">确认</u-button>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. id: '',
  38. form: {
  39. partMoney: 0
  40. },
  41. }
  42. },
  43. onLoad(options) {
  44. this.id = options.id;
  45. },
  46. onShow() {
  47. this.getBusinessById();
  48. },
  49. methods: {
  50. getBusinessById() {
  51. this.$api.getBusinessById({
  52. id: this.id
  53. }).then(resp => {
  54. this.form = resp.data;
  55. })
  56. },
  57. confirmFn() {
  58. if(!this.form.inChannel){
  59. this.$common.toast('请填写离场通道')
  60. return;
  61. }
  62. if(!this.form.outDayTime){
  63. this.$common.toast('请选择出场时间')
  64. return;
  65. }
  66. this.$api.adminSetOut(this.form).then(Resp => {
  67. this.$common.toast('操作成功');
  68. setTimeout(() => {
  69. this.$common.back()
  70. }, 500)
  71. })
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss">
  77. page {
  78. background-color: #fff;
  79. }
  80. @import '@/common/common.scss'
  81. </style>