jiaosong
2023-10-18 051abca66db233f5dbde3f69aa706422e1ac9fd9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
  <GlobalWindow
    :title="title"
    :visible.sync="visible"
    :confirm-working="isWorking"
  >
    <NoBikeBillDetail v-if="form.type==4" ref="noBikeBillDetail"/>
    <BillDetail v-else ref="billDetail"/>
  </GlobalWindow>
</template>
 
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import BillDetail from './billDetail.vue'
import NoBikeBillDetail from './noBikeBillDetail.vue'
export default {
  name: 'OperaSitesWindow',
  extends: BaseOpera,
  components: { GlobalWindow, BillDetail, NoBikeBillDetail },
  data () {
    return {
      // 表单数据
      form: {
        endDate: '',
        startDate: '',
        type: ''
      },
      
    }
  },
  created () {
    this.config({
      api: '/business/sites',
      'field.id': 'id'
    })
  },
  methods: {
    open (title, target) {
      this.title = title
      this.visible = true
      // 新建
      this.form = target
      this.$nextTick(() => {
        if (target.type == 4) {
          this.$refs.noBikeBillDetail.reload(target)
        } else {
          this.$refs.billDetail.reload(target)
        }
      })
    },
  },
  
}
</script>