Blame view

src/views/ywbl/slsqxx/ygdj/slxx.vue 15.8 KB
1 2 3
<template>
  <!-- 受理信息 -->
  <div class="slxx">
xiaomiao committed
4 5 6
    <el-form
      :model="ruleForm"
      :rules="rules"
7
      v-Loading="loading"
xiaomiao committed
8 9 10
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
11
      label-width="120px">
12
      <div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
13
        <div class="slxx_title title-block">
14
          申请业务信息
15 16
          <div class="triangle"></div>
        </div>
17
        <el-row :gutter="10" v-if="ruleForm.slsq">
18
          <el-col :span="8">
19
            <el-form-item label="业务号:">
tianhaohao@pashanhoo.com committed
20
              <el-input disabled v-model="ruleForm.flow.ywh"></el-input>
21 22 23
            </el-form-item>
          </el-col>
          <el-col :span="8">
24
            <el-form-item label="受理人员:">
25
              <el-input disabled v-model="ruleForm.slsq.slry"></el-input>
26 27 28
            </el-form-item>
          </el-col>
          <el-col :span="8">
29
            <el-form-item label="受理时间:">
30
              <el-input disabled v-model="ruleForm.slsq.slsj"></el-input>
31 32 33
            </el-form-item>
          </el-col>
        </el-row>
34
        <el-row :gutter="10" v-if="ruleForm.slsq">
35
          <el-col :span="8">
36
            <el-form-item label="权利类型:">
tianhaohao@pashanhoo.com committed
37
              <el-input disabled v-model="ruleForm.sldy.qllxmc"></el-input>
38 39 40
            </el-form-item>
          </el-col>
          <el-col :span="8">
41
            <el-form-item label="登记类型:">
tianhaohao@pashanhoo.com committed
42
              <el-input disabled v-model="ruleForm.sldy.djlxmc"></el-input>
43 44 45
            </el-form-item>
          </el-col>
          <el-col :span="8">
46
            <el-form-item label="登记情形:">
47
              <el-input disabled v-model="ruleForm.slsq.djqxmc"></el-input>
48 49 50 51
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
52
          不动产情况
53 54 55
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10" v-if="ruleForm.qlxx">
56
          <el-col :span="8">
tianhaohao@pashanhoo.com committed
57
            <el-form-item label="原不动产证号:">
58 59 60
              <el-input disabled v-model="ruleForm.sldy.ybdcqzsh"></el-input>
            </el-form-item>
          </el-col>
61
          <el-col :span="8">
62
            <el-form-item label="不动产单元号:">
63 64 65
              <el-input disabled v-model="ruleForm.qlxx.bdcdyh"></el-input>
            </el-form-item>
          </el-col>
66
          <el-col :span="8">
67
            <el-form-item label="坐落:">
68
              <el-input disabled v-model="ruleForm.sldy.zl"></el-input>
69 70 71
            </el-form-item>
          </el-col>
        </el-row>
72
        <el-row :gutter="10">
73
          <el-col :span="8">
74 75
            <el-form-item label="预告登记种类:">
              <el-input disabled v-model="ruleForm.ygdj.ygdjzlmc"></el-input>
76 77 78
            </el-form-item>
          </el-col>
          <el-col :span="8">
79 80 81 82 83 84 85
            <el-form-item label="土地使用权人:">
              <el-input disabled v-model="ruleForm.ygdj.tdsyqr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="房屋性质:">
              <el-select v-model="ruleForm.ygdj.fwxz">
86
                <el-option
87
                  v-for="item in dictData['A19']"
88 89
                  :key="item.dcode"
                  :label="item.dname"
90
                  :value="item.dcode">
91 92
                </el-option>
              </el-select>
93 94
            </el-form-item>
          </el-col>
95 96
        </el-row>
        <el-row :gutter="10" v-if="ruleForm.qlxx">
97
          <el-col :span="8">
98 99
            <el-form-item label="房屋用途:">
              <el-select v-model="ruleForm.ygdj.ghyt">
100
                <el-option
101
                  v-for="item in dictData['A17']"
102 103
                  :key="item.dcode"
                  :label="item.dname"
104
                  :value="item.dcode">
105 106
                </el-option>
              </el-select>
107 108
            </el-form-item>
          </el-col>
109 110
          <el-col :span="8">
            <el-form-item label="所在层:">
111
              <el-input maxlength="20" v-model="ruleForm.ygdj.szc"></el-input>
112 113 114 115
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="总层数:">
xiaomiao committed
116
              <el-input
117
                maxlength="4"
xiaomiao committed
118
                v-model.number="ruleForm.ygdj.zcs"
119
                oninput="value=value.replace(/[^0-9]/g,'')"></el-input>
120 121
            </el-form-item>
          </el-col>
122
        </el-row>
123
        <el-row :gutter="10" v-if="ruleForm.qlxx">
124
          <el-col :span="8">
125
            <el-form-item label="房屋结构:">
126
              <el-select v-model="ruleForm.ygdj.fwjg">
127 128 129 130
                <el-option
                  v-for="item in dictData['A46']"
                  :key="item.dcode"
                  :label="item.dname"
131
                  :value="item.dcode">
132 133
                </el-option>
              </el-select>
134 135
            </el-form-item>
          </el-col>
136 137

          <el-col :span="8">
138
            <el-form-item label="建筑面积:">
139
              <div class="flex">
xiaomiao committed
140
                <el-input
141
                  maxlength="12"
xiaomiao committed
142 143
                  v-model="ruleForm.ygdj.jzmj"
                  :disabled="!viewEdit"
144
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
145
                <el-select disabled v-model="mjdw" style="width: 68px">
146 147 148 149
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
150
                    :value="item.dcode">
151 152 153
                  </el-option>
                </el-select>
              </div>
154
            </el-form-item>
155
          </el-col>
156
          <el-col :span="8">
157
            <el-form-item label="取得价格:">
158
              <div class="flex">
159 160
                <el-input
                  maxlength="11"
xiaomiao committed
161 162
                  v-model="ruleForm.ygdj.qdjg"
                  style="width: 500%"
163
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
164
                <el-select
165
                  v-model="ruleForm.ygdj.jedw"
166
                  :disabled="!viewEdit"
167
                  style="width: 68px">
168 169 170 171
                  <el-option
                    v-for="item in dictData['A57']"
                    :key="item.dcode"
                    :label="item.dname"
172
                    :value="item.dcode">
173 174
                  </el-option>
                </el-select>
175
              </div>
176 177 178
            </el-form-item>
          </el-col>
        </el-row>
179
        <el-row :gutter="10">
180 181
          <el-col :span="24">
            <el-form-item label="附记:">
xiaomiao committed
182 183 184 185
              <el-input
                v-model="ruleForm.ygdj.fj"
                type="textarea"
                maxlength="500"
186
                show-word-limit></el-input>
187
            </el-form-item>
188 189
          </el-col>
        </el-row>
190 191 192 193 194
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
195
          <el-col :span="12" v-if="ruleForm.qlxx">
196
            <el-form-item label="共有方式:">
xiaomiao committed
197 198
              <el-radio-group
                :disabled="!viewEdit"
199
                v-model="ruleForm.sldy.gyfs">
200 201 202 203
                <el-radio label="0">单独所有</el-radio>
                <el-radio label="1">共同共有</el-radio>
                <el-radio label="2">按份所有</el-radio>
                <el-radio label="3">其它共有</el-radio>
204 205 206
              </el-radio-group>
            </el-form-item>
          </el-col>
207 208 209 210
          <el-col :span="6" v-show="ruleForm.sldy.gyfs != '0'">
            <el-form-item label="是否分别持证:">
              <el-radio-group
                v-model="ruleForm.sldy.sqfbcz"
xiaomiao committed
211
                :disabled="!viewEdit"
212
                @input="updaterow()">
213 214 215 216 217 218 219
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col
            :span="6"
220
            v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
221 222
            <el-form-item label="持证人:">
              <el-select
xiaomiao committed
223
                v-model="czr"
224
                placeholder="持证人"
225
                :disabled="!viewEdit">
226 227 228 229
                <el-option
                  v-for="item in czrOptions"
                  :key="item.zjh"
                  :label="item.sqrmc"
230
                  :value="item.zjh">
231 232 233 234
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
235
        </el-row>
xiaomiao committed
236 237 238 239
        <qlrCommonTable
          @upDateQlrxxList="upDateQlrxxList"
          :disabled="viewEdit"
          :tableData="ruleForm.qlrList"
240
          :gyfs="ruleForm.sldy.gyfs" />
241 242 243 244
        <div class="slxx_title title-block">
          义务人信息
          <div class="triangle"></div>
        </div>
245
        <ywrCommonTable
xiaomiao committed
246 247 248
          @upDateQlrxxList="upDateYwrxxList"
          :disabled="viewEdit"
          :tableData="ruleForm.ywrList"
249
          :gyfs="ruleForm.sldy.gyfs" />
250 251 252 253 254 255
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col>
256 257 258 259 260 261 262 263 264 265 266
            <el-form-item v-if="ruleForm.sldy.djlx=='400'" label="注销登记原因:" prop="djyy">
              <el-input
                class="textArea"
                type="textarea"
                maxlength="500"
                show-word-limit
                :disabled="!viewEdit"
                v-model="ruleForm.ygdj.zxyy">
              </el-input>
            </el-form-item>
            <el-form-item v-else label="登记原因:" prop="djyy">
xiaomiao committed
267 268 269 270 271 272
              <el-input
                class="textArea"
                type="textarea"
                maxlength="500"
                show-word-limit
                :disabled="!viewEdit"
273
                v-model="ruleForm.ygdj.djyy">
274 275 276 277 278
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
279
      <el-row class="btn" v-if="viewEdit">
280
        <el-form-item>
281 282 283 284 285 286 287
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
288 289
  import ywmix from "@/views/ywbl/mixin/index";
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
290
  import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
291 292 293 294 295 296 297
  import { Init, saveData } from "@/api/workflow/ygdjFlow.js";
  import { mapGetters } from "vuex";
  export default {
    mixins: [ywmix],
    mounted () {
      this.viewEdit = this.$parent.currentSelectTab.ableOperation;
      this.propsParam = this.$attrs;
298
      this.loading = true
299 300 301 302 303 304 305 306 307 308 309 310 311
      var formdata = new FormData();
      formdata.append("bsmSldy", this.propsParam.bsmSldy);
      formdata.append("djlx", this.propsParam.djlx);
      formdata.append("isEdit", this.viewEdit);
      Init(formdata).then((res) => {
        if (res.code === 200 && res.result) {
          this.ruleForm = res.result;
          this.czrOptions = this.ruleForm.qlrList;
          this.ruleForm.qlrList.forEach((item) => {
            if (item.sfczr == 1) {
              this.czr = item.sqrmc
            }
          })
312 313 314
          setTimeout(() => {
            this.loading = false
          }, 200)
315 316
        }
      })
317
    },
318
    components: { qlrCommonTable, ywrCommonTable },
319 320
    computed: {
      ...mapGetters(["dictData", "flag"]),
321
    },
322 323
    data () {
      return {
324
        loading: false,
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
        mjdw: "1",
        //表单是否可操作
        viewEdit: true,
        disabled: true,
        tdytOption: [],
        czrOptions: [],
        czr: "",
        ruleForm: {
          qlxx: {},
          sldy: {},
          slsq: {},
          ygdj: {},
          zdjbxx: {},
        },
        //传递参数
        propsParam: this.$attrs,
        rules: {},
      };
343
    },
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377
    methods: {
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateQlrxxList (val) {
        this.ruleForm.qlrList = _.cloneDeep(val);
        this.czrOptions = this.ruleForm.qlrList;
      },
      /**
       * @description: 更新业务人信息
       * @param {*} val
       * @author: renchao
       */
      upDateYwrxxList (val) {
        this.ruleForm.ywrList = _.cloneDeep(val);
      },
      // 是否持证人变化
      /**
       * @description: 是否持证人变化
       * @param {*} val
       * @author: renchao
       */
      updaterow () {
        this.czr = "";
      },
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        let that = this;
        if (this.ruleForm.qlrList.length == 0) {
xiaomiao committed
378 379
          this.$message({
            showClose: true,
380
            message: "请确认权利人信息",
xiaomiao committed
381 382 383 384
            type: "error",
          });
          return false;
        }
385 386 387 388 389 390 391 392 393 394 395

        if (this.ruleForm.sldy.gyfs == "0") {
          if (this.ruleForm.qlrList.length > 1) {
            this.$message({
              showClose: true,
              message: "共有方式:单独所有,权利人只能是一个人",
              type: "error",
            });
            return false;
          }
          this.ruleForm.qlrList[0].sfczr = "1";
396
        } else {
397 398
          if (this.ruleForm.qlrList.length <= 1) {
            this.$message({
399
              showClose: true,
400 401
              message:
                "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
402 403 404 405
              type: "error",
            });
            return false;
          }
406 407 408 409
          //是否分别持证
          if (this.ruleForm.sldy.sqfbcz == "1") {
            //是
            this.ruleForm.qlrList.forEach((item, index) => {
410
              item.sfczr = "1";
411 412 413 414 415 416 417 418 419
            });
          } else {
            if (!that.czr) {
              that.$message({
                showClose: true,
                message: "请选择持证人",
                type: "error",
              });
              return false;
420
            }
421 422 423 424 425 426 427 428
            this.ruleForm.qlrList.forEach((item, index) => {
              if (item.zjh == this.czr) {
                item.sfczr = "1";
              } else {
                item.sfczr = "0";
              }
            });
          }
xiaomiao committed
429
        }
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
        saveData(this.ruleForm).then((res) => {
          if (res.code === 200) {
            this.$message({
              showClose: true,
              message: "保存成功!",
              type: "success",
            });
            this.$store.dispatch("user/refreshPage", true);
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: "error",
            });
          }
        });
      },
447
    },
448
  };
449
</script>
xiaomiao committed
450
<style scoped lang="scss">
451
  @import "~@/styles/public.scss";
452

453 454 455 456 457
  /deep/.el-form {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
  }
458

459 460 461
  /deep/.el-form-item__label {
    padding: 0;
  }
462

463 464 465
  /deep/.el-radio {
    margin-right: 10px;
  }
466

467 468 469
  /deep/.el-select {
    width: 100%;
  }
470

471 472 473
  /deep/.el-form-item {
    margin-bottom: 8px;
  }
474

475 476 477
  .marginBot0 {
    margin-bottom: 0 !important;
  }
478

479 480 481
  .slxx {
    box-sizing: border-box;
  }
482

483 484 485 486 487 488 489 490
  .slxx_con {
    flex: 1;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
    padding-right: 3px;
    overflow-x: hidden;
  }
491

492 493 494
  .submit_btn {
    height: 50px;
  }
495

496 497 498 499 500 501 502 503 504 505
  .slxx_title {
    border-bottom: 1px solid $borderColor;
    padding-left: 10px;
    padding-bottom: 5px;
    margin-bottom: 10px;
    margin-top: 5px;
    font-size: 16px;
    font-weight: 500;
    color: #4a4a4a;
  }
506

507 508 509 510 511 512 513
  .btn {
    text-align: center;
    padding-top: 10px;
    height: 36px;
    background-color: #ffffff;
    padding: 5px 0;
  }
514

515 516 517 518
  .textArea {
    /deep/.el-textarea__inner {
      min-height: 90px !important;
    }
519 520
  }

521 522 523
  /deep/.el-form-item__label {
    padding-bottom: 0px;
  }
524
</style>