sureOut.vue 1.9 KB

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