sureOut.vue 2.3 KB

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