Blame view

src/views/workflow/components/addQlr.vue 6.62 KB
任超 committed
1
<template>
任超 committed
2 3 4
  <dialogBox title="申请人信息" width="60%" isMain v-model="myValue" :isFullscreen="false" @submitForm="submitForm"
    @closeDialog="closeDialog">
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
任超 committed
5 6
      <el-row>
        <el-col :span="8">
田浩浩 committed
7
          <el-form-item label="权利人类型" prop="sqrlx">
任超 committed
8 9
            <el-select clearable v-model="ruleForm.sqrlx" class="width100" placeholder="请选择">
              <el-option v-for="item in dictData['A36']" :key="item.dcode" :label="item.dname" :value="item.dcode">
任超 committed
10 11 12 13 14
              </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 22
            <el-select clearable v-model="ruleForm.zjzl" class="width100" placeholder="请选择">
              <el-option v-for="item in dictData['A30']" :key="item.dcode" :label="item.dname" :value="item.dcode">
任超 committed
23 24 25 26 27 28 29 30
              </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
          <el-form-item label="联系电话" prop="dh">
任超 committed
36
            <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 42
            <el-select clearable v-model="ruleForm.xb" class="width100" placeholder="请选择">
              <el-option v-for="item in dictData['A43']" :key="item.dcode" :label="item.dname" :value="item.dcode">
任超 committed
43 44
              </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="地址">
1  
jiaozeping@pashanhoo.com committed
69
            <el-input v-model="ruleForm.txdz"></el-input>
任超 committed
70 71 72
          </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 124
            <el-select clearable v-model="ruleForm.dlrzjlx" class="width100" placeholder="请选择">
              <el-option v-for="item in dictData['A30']" :key="item.dcode" :label="item.dname" :value="item.dcode">
任超 committed
125 126 127 128 129 130 131
              </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
      </el-row>
    </el-form>
  </dialogBox>
</template>
<script>
1  
jiaozeping@pashanhoo.com committed
141
import { mapGetters } from "vuex";
任超 committed
142 143 144
export default {
  props: {
    value: { type: Boolean, default: false },
1  
jiaozeping@pashanhoo.com committed
145
    details: { type: Object, default: {} },
任超 committed
146 147 148 149
  },
  computed: {
    ...mapGetters(["dictData"]),
  },
任超 committed
150
  data () {
任超 committed
151 152 153
    return {
      myValue: this.value,
      ruleForm: {
1  
jiaozeping@pashanhoo.com committed
154 155 156 157 158 159 160 161 162
        sqrlx: "",
        sqrmc: "",
        zjzl: "",
        zjh: "",
        dh: "",
        xb: "",
        frmc: "",
        gjdq: "",
        szss: "",
1  
jiaozeping@pashanhoo.com committed
163
        txdz: "",
1  
jiaozeping@pashanhoo.com committed
164 165 166 167 168 169 170 171 172
        yb: "",
        fzjg: "",
        dzyj: "",
        qlbl: "",
        gzdw: "",
        dljg: "",
        dlrxm: "",
        dlrzjlx: "",
        dlrzjh: "",
任超 committed
173 174
      },
      rules: {
1  
jiaozeping@pashanhoo.com committed
175 176 177 178 179 180
        sqrlx: [{ required: true, message: "权利人类型", trigger: "change" }],
        sqrmc: [{ required: true, message: "姓名/名称", trigger: "blur" }],
        zjzl: [{ required: true, message: "证件种类", trigger: "change" }],
        zjh: [{ required: true, message: "证件号", trigger: "blur" }],
      },
    };
任超 committed
181 182
  },
  watch: {
任超 committed
183
    value (val) {
1  
jiaozeping@pashanhoo.com committed
184
      this.myValue = _.cloneDeep(val);
任超 committed
185
    },
任超 committed
186 187
    details: {
      handler: function (val, oldVal) {
1  
jiaozeping@pashanhoo.com committed
188
        this.ruleForm = val;
任超 committed
189
      },
1  
jiaozeping@pashanhoo.com committed
190 191
      deep: true,
    },
任超 committed
192 193
  },
  methods: {
任超 committed
194
    closeDialog () {
任超 committed
195
      this.$emit("input", false);
1  
jiaozeping@pashanhoo.com committed
196
      this.$refs["ruleForm"].resetFields();
任超 committed
197
    },
任超 committed
198
    submitForm () {
1  
jiaozeping@pashanhoo.com committed
199 200 201 202 203 204 205 206 207 208 209
      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
          this.$emit("input", false);
          this.$emit("updateDetail", _.cloneDeep(this.ruleForm));
        } else {
          return false;
        }
      });
    },
  },
};
任超 committed
210 211 212 213 214 215 216 217 218
</script>
<style scoped lang="scss">
.submit-button {
  text-align: center;
  height: 52px;
  padding-top: 10px;
  background-color: #fff;
}
</style>