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
<template>
  <div>
    <el-dialog
      title="合作方准入信息"
      :visible.sync="show"
      center
      :close-on-click-modal="false"
      width="850px">
      <el-form :model="form" ref="form">
        <el-col :span="12">
          <el-form-item label="企业工商登记名:" prop="companybusinessregistration" :rules="rules.companybusinessregistration">
            <el-input v-model="form.companybusinessregistration"></el-input>
          </el-form-item>          
        </el-col>
        <el-col :span="12">
          <el-form-item label="统一社会信用码:" prop="unifiedsocialcreditcode" :rules="rules.unifiedsocialcreditcode">
            <el-input v-model="form.unifiedsocialcreditcode"></el-input>
          </el-form-item>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button class="blueBtn" type="primary" size="mini" @click="handleSubmit">新增</el-button>
      </div>
    </el-dialog>
  </div>
</template>
 
<script>
import { addChannelLoan } from '@/api/area/partner'
export default {
  props: ['showDialog'],
  data: function() {
    return {
      form: {
        companybusinessregistration: '',
        unifiedsocialcreditcode: ''
      },
      rules: {
        companybusinessregistration: { required: true, message: '请输入企业工商登记名', trigger: 'blur' },
        unifiedsocialcreditcode: { required: true, message: '请输入统一社会信用码', trigger: 'blur' }
      }
    }
  },
  computed: {
    show: {
      get() {
        return this.showDialog
      },
      set(newVal) {
        this.$refs['form'].resetFields()
        this.$emit('update:showDialog', newVal)
      }
    }
  },
  methods: {
    handleSubmit() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          addChannelLoan(this.form).then(res => {
            if (res.code === '00') {
              let partnerParams = {
                flowno: res.result.flowno,
                ftserialno: res.result.ftSerialNo,
                objectType: res.result.objecttype,
                phaseno: res.result.phaseno,
                objectno: res.result.objectno,
                serialno: res.result.serialNo,
                unifiedsocialcreditcode: res.result.unifiedsocialcreditcode,
                                pageType: 'update',
                                addState: '01',
                                newDate:'01', // 代表数据是新增的
              }
              this.$store.commit('SET_partnerParams', partnerParams)
              this.$router.push({ path: '/area/partner/update/' })
            }
          })
        } else {
          return false
        }
      })
    },
  }
}
</script>
 
<style lang="stylus" scoped>
>>> .el-dialog__header
  padding-top 40px
  .el-dialog__title
    font-size 18px
    // font-family PingFangSC-Medium,PingFangSC
    font-weight bold
    color #222222
    line-height 25px
>>> .el-dialog__body
  height 50px
>>> .el-dialog__footer
  padding-bottom 30px
  .dialog-footer
    .blueBtn
      background-color rgba(0,129,240,1)
      border-radius 4px
      color rgba(255,255,255,1)
      padding 0
      width 120px
      height 30px
      span
        font-size 14px    
        height 20px
        font-weight 400
        line-height 20px
</style>