zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<template>
  <div>
    <el-dialog title="收货地址" :close-on-click-modal="false" center :visible.sync="dialogFormVisible" width="850px">
      <el-form :model="form">
        <el-col :span="12">
          <el-form-item label="产品名称">
            <el-select v-model="form.product" filterable placeholder="请选择活动区域">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.valueDesc"
                :value="item.value"
              >
              </el-option>
            </el-select>
            <!-- <el-input v-model="form.name" autocomplete="off"></el-input> -->
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="活动区域" >
            <el-select v-model="form.region" filterable placeholder="请选择活动区域">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
 
<script>
  import {
    clickAddProjectProductInfo,
    projectQrycondition,
  } from '@/api/area'
  import { mapState } from 'vuex'
  export default {
    props: {
      dialogFormVisible: {
        type: Boolean,
        default: false
      }
    },
    data() {
      return {
        form: {
          ncreditratio: '',
          accountperiod: '',
          product: '',
          productname: '',
          city: '',
          putoutwaitdays: '',
          stageratiomax: '',
          packagingmode: '',
          takeratiomax: '',
          levermultiple: '',
          creditratio: '',
          paymenttype: '',
          businesstype: ''
        },
        options: []
      }
    },
    ...mapState({
      detailsParams: state => state.risk.detailsParams
        }),
    created() {
      this.initForm()
    },
    methods: {
      async initForm() {
        let params = {
          objectType: this.detailsParams.objectType,
          dataType: this.detailsParams.dataType,
          projectFlag: this.detailsParams.projectFlag,
          projectType: this.detailsParams.projectType,
          serialno: this.detailsParams.objectNo
        }
        let config = {
          visible: false,
          required: false,
          writeAble: false
        }
        Object.keys(this.form).forEach(key => {
          this.config[key] = config
        })
        // 产品下拉
        this.selectLoad()
        let res = await clickAddProjectProductInfo(params)
          // console.log(res.result)
          this.phaseno = res.result.phaseno // 阶段号
          this.projectFlag = res.result.projectFlag // 立项
          Object.keys(res.result).forEach(key => {
            let merge = this._.merge({}, this.config, res.result)
            this.config = merge
            this.$set(this.form, key, res.result[key].value)
            this.$set(this.modifyFrom, key, res.result[key].value)
          })
      },
      selectLoad () {
      if (this.config.codeNo !== null && this.config.codeNo !== 'CreditStageRatio') {
                let params = { conditionName: this.config.codeNo }
        projectQrycondition(params).then(res => {
                    this.options = res.result
        })
      }
    },
    },
  }
</script>
 
<style scoped>
  
</style>