zjf
2023-03-03 26e972196ed6046bcb7fb341be86241c8300fd2b
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<template>
  <el-select
    v-model="dataValue"
    :disabled="disabled"
    style="width: 100%;"
    placeholder="请选择"
    @change="valueChange(dataValue, option)">
    <el-option
      v-for="(item, index) in option"
      :key="index"
      :label="item.num"
      :value="item.planId"/>
  </el-select>
</template>
<script type="text/javascript">
import stringMixin from './stringMixin'
// import {
//   crmQueryReceivablesPlansByContractId
// } from '@/api/clients/contract'
 
export default {
  name: 'XhReceivablesPlan', // 回款 下的 回款计划
  components: {},
  mixins: [stringMixin],
  props: {
    relation: {
      // 相关ID
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data () {
    return {
      option: []
    }
  },
  computed: {},
  watch: {
    relation: function (val) {
      if (val.moduleType) {
        this.getPlanList()
      } else {
        this.option = []
      }
    }
  },
  mounted () {
    if (this.relation.moduleType) {
      this.getPlanList()
    }
  },
  methods: {
    getPlanList () {
      this.loading = true
      // crmQueryReceivablesPlansByContractId({ contractId: this.relation.contractId })
      //   .then(res => {
      //     this.loading = false
      //     this.option = res.data
      //   })
      //   .catch(() => {
      //     this.loading = false
      //   })
    }
  }
}
</script>
<style lang="less" scoped>
</style>