Blame view

src/views/workflow/components/addQlr.vue 6.87 KB
任超 committed
1 2 3
<template>
  <dialogBox title="申请人信息" width="60%" isMain v-model="myValue" :isFullscreen="false" @submitForm="submitForm"
    @closeDialog="closeDialog">
任超 committed
4
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
任超 committed
5 6 7
      <el-row>
        <el-col :span="8">
          <el-form-item label="权利人类型" prop="qlrlx">
任超 committed
8
            <el-select clearable v-model="ruleForm.qlrlx" class="width100" placeholder="请选择">
任超 committed
9 10 11 12 13 14
              <el-option v-for="item in dictData['A36']" :key="item.dcode" :label="item.dname" :value="item.dcode">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
15 16
          <el-form-item label="姓名/名称" prop="sqrmc">
            <el-input v-model="ruleForm.sqrmc" maxlegth="15"></el-input>
任超 committed
17 18 19 20
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="证件种类" prop="zjzl">
任超 committed
21
            <el-select clearable v-model="ruleForm.zjzl" class="width100" placeholder="请选择">
任超 committed
22 23 24 25 26 27 28 29 30
              <el-option v-for="item in dictData['A30']" :key="item.dcode" :label="item.dname" :value="item.dcode">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="证件号" prop="zjh">
任超 committed
31
            <el-input v-model="ruleForm.zjh" maxlength="15"></el-input>
任超 committed
32 33 34
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
35 36
          <el-form-item label="联系电话" prop="dh" :rules="$rules.common.phone">
            <el-input v-model="ruleForm.dh" maxlength="11"></el-input>
任超 committed
37 38 39
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
40
          <el-form-item label="性别">
任超 committed
41
            <el-select clearable v-model="ruleForm.xb" class="width100" placeholder="请选择">
任超 committed
42 43 44
              <el-option v-for="item in dictData['A43']" :key="item.dcode" :label="item.dname" :value="item.dcode">
              </el-option>
            </el-select>
任超 committed
45 46 47 48
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
任超 committed
49
        <el-col :span="8">
任超 committed
50
          <el-form-item label="法人名称">
任超 committed
51 52 53 54
            <el-input v-model="ruleForm.frmc"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
55
          <el-form-item label="国家/地区">
任超 committed
56 57 58 59
            <el-input v-model="ruleForm.gjdq"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
60
          <el-form-item label="户籍所在省市">
任超 committed
61 62 63 64 65 66 67
            <el-input v-model="ruleForm.szss"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="16">
任超 committed
68
          <el-form-item label="地址">
任超 committed
69 70 71 72
            <el-input v-model="ruleForm.dz"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
73
          <el-form-item label="邮编">
任超 committed
74 75 76 77
            <el-input v-model="ruleForm.yb"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
任超 committed
78

任超 committed
79 80
      <el-row>
        <el-col :span="8">
任超 committed
81
          <el-form-item label="发证机关">
任超 committed
82 83 84 85
            <el-input v-model="ruleForm.fzjg"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
86
          <el-form-item label="电子邮件">
任超 committed
87 88 89 90
            <el-input v-model="ruleForm.dzyj"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
91
          <el-form-item label="权利比例">
任超 committed
92 93 94 95 96 97 98
            <el-input v-model="ruleForm.qlbl"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
任超 committed
99
          <el-form-item label="工作单位">
任超 committed
100 101 102 103
            <el-input v-model="ruleForm.gzdw"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="16">
任超 committed
104
          <el-form-item label="代理机构">
任超 committed
105 106 107 108 109 110 111
            <el-input v-model="ruleForm.dljg"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
任超 committed
112
          <el-form-item label="联系电话" :rules="$rules.common.phone">
任超 committed
113 114 115 116
            <el-input v-model="ruleForm.lxdh" maxlength="11"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
117
          <el-form-item label="代理人姓名">
任超 committed
118 119 120 121
            <el-input v-model="ruleForm.dlrxm"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
122
          <el-form-item label="代理人证件类型">
任超 committed
123
            <el-select clearable v-model="ruleForm.dlrzjlx" class="width100" placeholder="请选择">
任超 committed
124 125 126 127 128 129 130 131
              <el-option v-for="item in dictData['A30']" :key="item.dcode" :label="item.dname" :value="item.dcode">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
任超 committed
132
          <el-form-item label="代理人证件号">
任超 committed
133 134 135
            <el-input v-model="ruleForm.dlrzjh" maxlength="20"></el-input>
          </el-form-item>
        </el-col>
任超 committed
136 137 138 139 140 141 142 143 144
      </el-row>
    </el-form>
  </dialogBox>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
  props: {
    value: { type: Boolean, default: false },
任超 committed
145
    details: { type: Object, default: {} }
任超 committed
146 147 148 149 150 151 152 153 154
  },
  computed: {
    ...mapGetters(["dictData"]),
  },
  data () {
    return {
      myValue: this.value,
      ruleForm: {
        qlrlx: '',
任超 committed
155
        sqrmc: '',
任超 committed
156 157
        zjzl: '',
        zjh: '',
任超 committed
158
        dh: '',
任超 committed
159 160 161 162 163 164 165 166 167 168 169 170 171 172
        xb: '',
        frmc: '',
        gjdq: '',
        szss: '',
        dz: '',
        yb: '',
        fzjg: '',
        dzyj: '',
        qlbl: '',
        gzdw: '',
        dljg: '',
        dlrxm: '',
        dlrzjlx: '',
        dlrzjh: ''
任超 committed
173 174 175 176 177
      },
      rules: {
        qlrlx: [
          { required: true, message: '权利人类型', trigger: 'change' }
        ],
任超 committed
178
        sqrmc: [
任超 committed
179 180 181
          { required: true, message: '姓名/名称', trigger: 'blur' }
        ],
        zjzl: [
任超 committed
182
          { required: true, message: '证件种类', trigger: 'change' }
任超 committed
183 184 185 186 187 188 189 190 191
        ],
        zjh: [
          { required: true, message: '证件号', trigger: 'blur' }
        ]
      }
    }
  },
  watch: {
    value (val) {
任超 committed
192
      this.myValue = _.cloneDeep(val)
任超 committed
193
    },
任超 committed
194 195 196 197 198 199
    details: {
      handler: function (val, oldVal) {
        this.ruleForm = val
      },
      deep: true
    }
任超 committed
200 201 202 203
  },
  methods: {
    closeDialog () {
      this.$emit("input", false);
任超 committed
204
      this.$refs['ruleForm'].resetFields();
任超 committed
205 206
    },
    submitForm () {
任超 committed
207
      this.$emit("input", false);
任超 committed
208 209 210 211 212 213 214 215 216 217 218 219
      this.$emit("updateDetail", _.cloneDeep(this.ruleForm));
      // this.$refs['ruleForm'].validate((valid) => {
      //   if (valid) {
      //     this.$message({
      //       message: '修改成功!',
      //       type: 'success'
      //     })

      //   } else {
      //     this.$message.error('请完善必填项');
      //   }
      // })
任超 committed
220 221 222
    }
  }
}
任超 committed
223 224 225 226 227 228 229 230 231
</script>
<style scoped lang="scss">
.submit-button {
  text-align: center;
  height: 52px;
  padding-top: 10px;
  background-color: #fff;
}
</style>