Blame view

src/views/workflow/components/addQlr.vue 7.54 KB
任超 committed
1
<template>
1  
jiaozeping@pashanhoo.com committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
  <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
17 18
      <el-row>
        <el-col :span="8">
田浩浩 committed
19
          <el-form-item label="权利人类型" prop="sqrlx">
1  
jiaozeping@pashanhoo.com committed
20 21 22 23 24 25 26 27 28 29 30 31
            <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
32 33 34 35 36
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
37 38
          <el-form-item label="姓名/名称" prop="sqrmc">
            <el-input v-model="ruleForm.sqrmc" maxlegth="15"></el-input>
任超 committed
39 40 41 42
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="证件种类" prop="zjzl">
1  
jiaozeping@pashanhoo.com committed
43 44 45 46 47 48 49 50 51 52 53 54
            <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
55 56 57 58 59 60 61 62
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="证件号" prop="zjh">
任超 committed
63
            <el-input v-model="ruleForm.zjh" maxlength="15"></el-input>
任超 committed
64 65 66
          </el-form-item>
        </el-col>
        <el-col :span="8">
田浩浩 committed
67
          <el-form-item label="联系电话" prop="dh">
任超 committed
68
            <el-input v-model="ruleForm.dh" maxlength="11"></el-input>
任超 committed
69 70 71
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
72
          <el-form-item label="性别">
1  
jiaozeping@pashanhoo.com committed
73 74 75 76 77 78 79 80 81 82 83 84
            <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
85 86
              </el-option>
            </el-select>
任超 committed
87 88 89 90
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
任超 committed
91
        <el-col :span="8">
任超 committed
92
          <el-form-item label="法人名称">
任超 committed
93 94 95 96
            <el-input v-model="ruleForm.frmc"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
97
          <el-form-item label="国家/地区">
任超 committed
98 99 100 101
            <el-input v-model="ruleForm.gjdq"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
102
          <el-form-item label="户籍所在省市">
任超 committed
103 104 105 106 107 108 109
            <el-input v-model="ruleForm.szss"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="16">
任超 committed
110
          <el-form-item label="地址">
任超 committed
111 112 113 114
            <el-input v-model="ruleForm.dz"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
115
          <el-form-item label="邮编">
任超 committed
116 117 118 119
            <el-input v-model="ruleForm.yb"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
任超 committed
120

任超 committed
121 122
      <el-row>
        <el-col :span="8">
任超 committed
123
          <el-form-item label="发证机关">
任超 committed
124 125 126 127
            <el-input v-model="ruleForm.fzjg"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
128
          <el-form-item label="电子邮件">
任超 committed
129 130 131 132
            <el-input v-model="ruleForm.dzyj"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
133
          <el-form-item label="权利比例">
任超 committed
134 135 136 137 138 139 140
            <el-input v-model="ruleForm.qlbl"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
任超 committed
141
          <el-form-item label="工作单位">
任超 committed
142 143 144 145
            <el-input v-model="ruleForm.gzdw"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="16">
任超 committed
146
          <el-form-item label="代理机构">
任超 committed
147 148 149 150 151 152 153
            <el-input v-model="ruleForm.dljg"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
任超 committed
154
          <el-form-item label="联系电话" :rules="$rules.common.phone">
任超 committed
155 156 157 158
            <el-input v-model="ruleForm.lxdh" maxlength="11"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
159
          <el-form-item label="代理人姓名">
任超 committed
160 161 162 163
            <el-input v-model="ruleForm.dlrxm"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
任超 committed
164
          <el-form-item label="代理人证件类型">
1  
jiaozeping@pashanhoo.com committed
165 166 167 168 169 170 171 172 173 174 175 176
            <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
177 178 179 180 181 182 183
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
任超 committed
184
          <el-form-item label="代理人证件号">
任超 committed
185 186 187
            <el-input v-model="ruleForm.dlrzjh" maxlength="20"></el-input>
          </el-form-item>
        </el-col>
任超 committed
188 189 190 191 192
      </el-row>
    </el-form>
  </dialogBox>
</template>
<script>
1  
jiaozeping@pashanhoo.com committed
193
import { mapGetters } from "vuex";
任超 committed
194 195 196
export default {
  props: {
    value: { type: Boolean, default: false },
1  
jiaozeping@pashanhoo.com committed
197
    details: { type: Object, default: {} },
任超 committed
198 199 200 201
  },
  computed: {
    ...mapGetters(["dictData"]),
  },
1  
jiaozeping@pashanhoo.com committed
202
  data() {
任超 committed
203 204 205
    return {
      myValue: this.value,
      ruleForm: {
1  
jiaozeping@pashanhoo.com committed
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
        sqrlx: "",
        sqrmc: "",
        zjzl: "",
        zjh: "",
        dh: "",
        xb: "",
        frmc: "",
        gjdq: "",
        szss: "",
        dz: "",
        yb: "",
        fzjg: "",
        dzyj: "",
        qlbl: "",
        gzdw: "",
        dljg: "",
        dlrxm: "",
        dlrzjlx: "",
        dlrzjh: "",
任超 committed
225 226
      },
      rules: {
1  
jiaozeping@pashanhoo.com committed
227 228 229 230 231 232
        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
233 234
  },
  watch: {
1  
jiaozeping@pashanhoo.com committed
235 236
    value(val) {
      this.myValue = _.cloneDeep(val);
任超 committed
237
    },
任超 committed
238 239
    details: {
      handler: function (val, oldVal) {
1  
jiaozeping@pashanhoo.com committed
240
        this.ruleForm = val;
任超 committed
241
      },
1  
jiaozeping@pashanhoo.com committed
242 243
      deep: true,
    },
任超 committed
244 245
  },
  methods: {
1  
jiaozeping@pashanhoo.com committed
246
    closeDialog() {
任超 committed
247
      this.$emit("input", false);
1  
jiaozeping@pashanhoo.com committed
248
      this.$refs["ruleForm"].resetFields();
任超 committed
249
    },
1  
jiaozeping@pashanhoo.com committed
250
    submitForm() {
任超 committed
251 252 253 254 255 256 257 258 259 260 261
      // this.$refs['ruleForm'].validate((valid) => {
      //   if (valid) {
      //     this.$message({
      //       message: '修改成功!',
      //       type: 'success'
      //     })

      //   } else {
      //     this.$message.error('请完善必填项');
      //   }
      // })
1  
jiaozeping@pashanhoo.com committed
262 263 264 265 266 267 268 269 270 271 272 273

      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
          this.$emit("input", false);
          this.$emit("updateDetail", _.cloneDeep(this.ruleForm));
        } else {
          return false;
        }
      });
    },
  },
};
任超 committed
274 275 276 277 278 279 280 281 282
</script>
<style scoped lang="scss">
.submit-button {
  text-align: center;
  height: 52px;
  padding-top: 10px;
  background-color: #fff;
}
</style>