Blame view

src/views/djbworkflow/djbBook/components/blxxtabs/fdcq.vue 20.6 KB
xiaomiao committed
1 2 3
<!--
 * @Description:
 * @Autor: renchao
4
 * @LastEditTime: 2023-07-21 09:48:32
xiaomiao committed
5 6 7 8 9 10 11
-->
<template>
  <!-- 受理信息 -->
  <div class="slxx">
    <el-form
      :model="ruleForm"
      :rules="rules"
xiaomiao committed
12 13
      :class="{ readonly: editDisabled }"
      class="loadingtext"
xiaomiao committed
14 15 16
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
xiaomiao committed
17
      :show-message="false"
xiaomiao committed
18
      inline-message
19
      label-width="145px">
xiaomiao committed
20 21 22 23 24 25 26
      <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''">
        <div class="slxx_title title-block">
          补录信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="8">
xiaomiao committed
27
            <el-form-item label="补录编号:">
xiaomiao committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
              <el-input disabled v-model="ruleForm.repair.ywh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="补录人员:">
              <el-input disabled v-model="ruleForm.repair.slry"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="补录时间:">
              <el-input disabled v-model="ruleForm.repair.slsj"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
43
          房地产权(独幢、层、套、间房屋)
xiaomiao committed
44 45
          <div class="triangle"></div>
        </div>
46
        <el-row :gutter="10" class="ssqlxx">
xiaomiao committed
47 48 49 50 51 52 53
          <el-col :span="24" v-if="ssqlxxshow">
            <el-form-item label="上手权利信息:">
              <select-table
                v-model="ruleForm.ssQlxx"
                :table-width="550"
                :tableData="ssQlxxList"
                :props="props"
54
                @change="ssQlxxchange">
xiaomiao committed
55 56 57
                <el-table-column
                  prop="qllxmc"
                  width="130"
58
                  label="权利类型"></el-table-column>
xiaomiao committed
59 60 61
                <el-table-column
                  prop="bdcqzh"
                  width="160"
62
                  label="不动产权证书"></el-table-column>
xiaomiao committed
63 64 65 66 67 68 69 70
                <el-table-column prop="qlrmc" label="权利人"></el-table-column>
                <el-table-column prop="mjmc" label="面积"></el-table-column>
                <el-table-column prop="ytmc" label="用途"></el-table-column>
                <el-table-column prop="zl" label="坐落"></el-table-column>
              </select-table>
            </el-form-item>
          </el-col>
        </el-row>
xiaomiao committed
71 72 73 74 75 76 77 78 79 80 81
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="不动产单元号:">
              <el-input disabled v-model="ruleForm.qlxx.bdcdyh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="业务号:">
              <el-input v-model="ruleForm.qlxx.ywh"></el-input>
            </el-form-item>
          </el-col>
82
          <el-col :span="8">
xiaomiao committed
83
            <el-form-item label="上手业务号:">
xiaomiao committed
84
              <el-input disabled v-model="ruleForm.qlxx.ssywh"></el-input>
xiaomiao committed
85 86 87 88 89 90 91 92 93 94
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="权利类型:">
              <el-input disabled v-model="ruleForm.qlxx.qllxmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
95 96
            <el-form-item label="登记类型:" prop="qlxx.djlx" :rules="rules.djlxrules">
              <el-select v-model="ruleForm.qlxx.djlx" @change="djlxchange">
xiaomiao committed
97
                <el-option
xiaomiao committed
98
                  v-for="item in djlxlist"
xiaomiao committed
99 100
                  :key="item.dcode"
                  :label="item.dname"
101
                  :value="item.dcode">
102 103
                </el-option>
              </el-select>
xiaomiao committed
104 105 106 107 108 109 110
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="房地坐落:">
              <el-input v-model="ruleForm.qlxx.zl"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
111
          <el-col :span="8">
xiaomiao committed
112 113 114 115
            <el-form-item label="土地使用权人:">
              <el-input v-model="ruleForm.fdcq2.tdsyqr"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
116
          <el-col :span="8">
xiaomiao committed
117 118 119 120
            <el-form-item label="独用土地面积:">
              <el-input v-model="ruleForm.fdcq2.dytdmj"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
121
          <el-col :span="8">
xiaomiao committed
122 123 124 125
            <el-form-item label="分摊土地面积:">
              <el-input v-model="ruleForm.fdcq2.fttdmj"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
126
          <el-col :span="8">
127
            <!-- 下拉框 -->
xiaomiao committed
128 129
            <el-form-item label="土地性质:" style="margin-bottom: 3px">
              <treeselect
xiaomiao committed
130
                v-model="tdxz"
xiaomiao committed
131
                noOptionsText="暂无数据"
xiaomiao committed
132
                placeholder=""
133
                :normalizer="normalizer"
xiaomiao committed
134
                :show-count="true"
135
                :options="dictData['A9']" />
xiaomiao committed
136 137
            </el-form-item>
          </el-col>
xiaomiao committed
138
          <el-col :span="8">
xiaomiao committed
139
            <el-form-item label="房地产交易价格:">
xiaomiao committed
140 141 142
              <div style="display: flex">
                <el-input
                  v-model="ruleForm.fdcq2.qjjg"
143
                  style="width: 500%"></el-input>
xiaomiao committed
144
                <el-select v-model="ruleForm.fdcq2.jedw">
xiaomiao committed
145 146 147 148
                  <el-option
                    v-for="item in dictData['A57']"
                    :key="item.dcode"
                    :label="item.dname"
149
                    :value="item.dcode">
xiaomiao committed
150 151
                  </el-option>
                </el-select>
xiaomiao committed
152
              </div>
xiaomiao committed
153 154
            </el-form-item>
          </el-col>
xiaomiao committed
155
          <el-col :span="8">
xiaomiao committed
156 157
            <el-form-item label="权属状态:">
              <el-select v-model="ruleForm.qlxx.qszt">
xiaomiao committed
158 159 160 161
                <el-option
                  v-for="item in qsztlist"
                  :key="item.dcode"
                  :label="item.dname"
162
                  :value="item.dcode">
xiaomiao committed
163 164 165 166
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
167
          <el-col :span="8">
xiaomiao committed
168
            <el-form-item label="规划用途:">
169
              <el-select v-model="ruleForm.fdcq2.ghyt">
xiaomiao committed
170 171 172 173
                <el-option
                  v-for="item in dictData['A17']"
                  :key="item.dcode"
                  :label="item.dname"
174
                  :value="item.dcode">
175 176
                </el-option>
              </el-select>
xiaomiao committed
177 178
            </el-form-item>
          </el-col>
179
          <el-col :span="8">
xiaomiao committed
180 181 182 183
            <el-form-item label="批准用途:">
              <el-input v-model="ruleForm.fdcq2.pzyt"></el-input>
            </el-form-item>
          </el-col>
184
          <el-col :span="8">
xiaomiao committed
185 186 187 188
            <el-form-item label="实际用途:">
              <el-input v-model="ruleForm.fdcq2.sjyt"></el-input>
            </el-form-item>
          </el-col>
189
          <el-col :span="8">
xiaomiao committed
190 191
            <el-form-item label="房屋性质:">
              <el-select v-model="ruleForm.fdcq2.fwxz">
xiaomiao committed
192 193 194 195
                <el-option
                  v-for="item in dictData['A19']"
                  :key="item.dcode"
                  :label="item.dname"
196
                  :value="item.dcode">
197 198
                </el-option>
              </el-select>
xiaomiao committed
199 200 201
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
202 203 204
            <el-form-item
              label="房屋结构:"
              prop="fdcq2.fwjg"
205
              :rules="rules.fwjgrules">
xiaomiao committed
206
              <el-select v-model="ruleForm.fdcq2.fwjg">
xiaomiao committed
207 208 209 210
                <el-option
                  v-for="item in dictData['A46']"
                  :key="item.dcode"
                  :label="item.dname"
211
                  :value="item.dcode">
212 213
                </el-option>
              </el-select>
xiaomiao committed
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="所在层:">
              <el-input v-model="ruleForm.fdcq2.szc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="总层数:">
              <el-input v-model="ruleForm.fdcq2.zcs"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="建筑面积:">
              <el-input v-model="ruleForm.fdcq2.jzmj"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="专有建筑面积:">
              <el-input v-model="ruleForm.fdcq2.zyjzmj"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
236
          <el-col :span="8">
xiaomiao committed
237 238 239 240 241 242 243 244 245 246 247
            <el-form-item label="分摊建筑面积:">
              <el-input v-model="ruleForm.fdcq2.ftjzmj"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="竣工时间:">
              <el-input v-model="ruleForm.fdcq2.jgsj"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
xiaomiao committed
248 249 250
            <el-form-item
              label="不动产权证号:"
              prop="qlxx.bdcqzh"
251
              :rules="rules.bdcqzhrules">
xiaomiao committed
252 253 254
              <el-input v-model="ruleForm.qlxx.bdcqzh"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
255 256 257 258 259 260
          <!-- <el-col :span="8">
            <el-form-item
              label="区县代码:"
              prop="qlxx.qxdm"
              :rules="rules.qxdmrules"
            >
xiaomiao committed
261 262
              <el-input v-model="ruleForm.qlxx.qxdm"></el-input>
            </el-form-item>
xiaomiao committed
263
          </el-col> -->
xiaomiao committed
264
          <el-col :span="8">
xiaomiao committed
265 266 267
            <el-form-item
              label="登记机构:"
              prop="qlxx.djjg"
268
              :rules="rules.djjgrules">
xiaomiao committed
269 270 271 272
              <el-input v-model="ruleForm.qlxx.djjg"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
273 274 275
            <el-form-item
              label="登簿人:"
              prop="qlxx.dbr"
276
              :rules="rules.dbrrules">
xiaomiao committed
277 278 279 280
              <el-input v-model="ruleForm.qlxx.dbr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
281 282 283
            <el-form-item
              label="登记时间:"
              prop="qlxx.djsj"
284
              :rules="rules.djsjrules">
xiaomiao committed
285 286 287 288 289
              <el-date-picker
                v-model="ruleForm.qlxx.djsj"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd HH:mm:ss"
290
                format="yyyy-MM-dd">
xiaomiao committed
291
              </el-date-picker>
xiaomiao committed
292 293 294 295
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
296
          <el-col :span="24">
xiaomiao committed
297 298 299 300 301
            <el-form-item label="登记原因:">
              <el-input v-model="ruleForm.fdcq2.djyy"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
302 303
        <el-row>
          <el-col :span="24">
xiaomiao committed
304 305 306 307 308 309
            <el-form-item label="附记:">
              <el-input v-model="ruleForm.fdcq2.fj"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
xiaomiao committed
310 311 312
          土地用途
          <div class="triangle"></div>
        </div>
313
        <tdytTable
xiaomiao committed
314
          :tableData="ruleForm.tdytqxList"
xiaomiao committed
315
          @upDateTdytxxList="upDateTdytxxList"
316
          :ableOperation="ableOperation" />
xiaomiao committed
317
        <div class="slxx_title title-block">
xiaomiao committed
318 319 320 321 322 323
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="共有方式:">
324 325 326
              <el-radio-group
                :disabled="!ableOperation"
                v-model="ruleForm.qlxx.gyfs">
xiaomiao committed
327 328 329 330 331 332 333 334 335
                <el-radio label="0">单独所有</el-radio>
                <el-radio label="1">共同共有</el-radio>
                <el-radio label="2">按份所有</el-radio>
                <el-radio label="3">其它共有</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <qlrCommonTable
xiaomiao committed
336
          :tableData="ruleForm.qlrData"
xiaomiao committed
337
          @upDateQlrxxList="upDateQlrxxList"
xiaomiao committed
338
          :ableOperation="ableOperation"
xiaomiao committed
339
          :key="key"
340
          :gyfs="ruleForm.qlxx.gyfs" />
xiaomiao committed
341
      </div>
xiaomiao committed
342
      <el-row class="btn" v-if="ableOperation">
xiaomiao committed
343 344 345 346 347 348 349 350
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
351 352 353 354 355 356 357 358 359 360 361 362 363 364
  import { mapGetters } from "vuex";
  import { init, getSsQlxx, save } from "@/api/djbRepair.js";
  import qlrCommonTable from "@/views/djbworkflow/components/qlrCommonTable";
  import selectTable from "@/components/selectTable/index.vue";
  import tdytTable from "@/views/workflow/components/tdytTable";
  export default {
    components: { qlrCommonTable, tdytTable, selectTable },
    computed: {
      ...mapGetters(["dictData", "flag"]),
      // 根据流程判断表单是否为只读
      editDisabled () {
        if (!this.ableOperation) {
          //只读状态
          return true;
xiaomiao committed
365
        }
366
        return false;
xiaomiao committed
367
      },
368 369 370 371 372 373 374
    },
    data () {
      return {
        ssqlxxshow: true,
        props: {
          label: "bdcqzh",
          value: "bdcdyid",
xiaomiao committed
375
        },
376 377 378 379 380 381 382 383 384 385
        // 键名转换,方法默认是label和children进行树状渲染
        normalizer (node) {
          //方法
          if (node.children == null || node.children == "null") {
            delete node.children;
          }
          return {
            id: node.dcode,
            label: node.dname,
          };
xiaomiao committed
386 387
        },

388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416
        //表单是否可操作
        propsParam: this.$attrs,
        // 登记类型
        djlxlist: [
          {
            dcode: "100",
            dname: "首次登记",
          },
          {
            dcode: "200",
            dname: "转移登记",
          },
          {
            dcode: "300",
            dname: "变更登记",
          },
          {
            dcode: "500",
            dname: "更正登记",
          },

          {
            dcode: "901",
            dname: "补证",
          },
          {
            dcode: "902",
            dname: "换证",
          },
xiaomiao committed
417
        ],
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
        // 权属状态
        qsztlist: [
          {
            dcode: "1",
            dname: "现势",
          },
          {
            dcode: "2",
            dname: "历史",
          },
        ],
        key: 0,
        tdxz: null,
        isShow: false,
        disabled: true,
        czrOptions: [],
        ssQlxxList: [],
435 436 437 438 439
        ruleForm: {
          fdcq2: {
            ftjzmj: ''
          }
        },
440 441 442 443 444 445 446 447 448 449 450 451 452 453
        ableOperation: false,
        //传递参数\
        rules: {
          bdcqzhrules: [
            { required: true, message: "不动产权证号:", trigger: "blur" },
          ],
          // qxdmrules: [{ required: true, message: "区县代码", trigger: "blur" }],
          djjgrules: [{ required: true, message: "登记机构", trigger: "blur" }],
          dbrrules: [{ required: true, message: "登簿人", trigger: "blur" }],
          djsjrules: [{ required: true, message: "登记时间", trigger: "blur" }],
          fwjgrules: [{ required: true, message: "房屋结构", trigger: "change" }],
          djlxrules: [{ required: true, message: "登记类型", trigger: "change" }],
        },
      };
xiaomiao committed
454
    },
455 456 457 458
    created () { },
    mounted () {
      this.loadData();
      this.ableOperation = this.$parent.ableOperation;
xiaomiao committed
459
    },
460
    methods: {
yuanbo committed
461 462 463 464 465
      /**
       * @description: ssQlxxchange
       * @param {*} val
       * @author: renchao
       */
466 467
      ssQlxxchange (val) {
        this.ruleForm.ssQlxx = val;
xiaomiao committed
468
        this.ruleForm.qlxx.ssywh = val.ywh;
469
      },
yuanbo committed
470 471 472 473 474
      /**
       * @description: djlxchange
       * @param {*} val
       * @author: renchao
       */
475 476 477 478 479 480 481 482
      djlxchange (val) {
        console.log("val", val);
        if (val == null || val == 100) {
          this.ssqlxxshow = false;
        } else {
          this.ssqlxxshow = true;
        }
      },
xiaomiao committed
483

yuanbo committed
484 485 486 487
      /**
       * @description: loadData
       * @author: renchao
       */
488 489 490 491 492 493 494 495 496 497 498 499 500
      loadData () {
        this.$startLoading();
        this.propsParam.isEdit = this.$parent.isEdit;
        init(this.propsParam).then((res) => {
          if (res.code == 200) {
            this.ruleForm = res.result;
            let djlx = this.ruleForm.qlxx.djlx;
            if (djlx == null || djlx == 100) {
              this.ssqlxxshow = false;
            }
            this.$endLoading();
            if (this.ruleForm.tdytqxList.length > 0) {
              this.tdxz = this.ruleForm.tdytqxList[0].qlxzbm;
xiaomiao committed
501

502 503 504 505
            } else {
              this.tdxz = null;
            }
            this.isShow = true;
xiaomiao committed
506
          }
507
        });
xiaomiao committed
508
        //获取主体信息
509 510 511 512 513 514
        getSsQlxx({
          bdcdyid: this.propsParam.bdcdyid,
          qllx: this.propsParam.qllx,
        }).then((res) => {
          if (res.code == 200) {
            this.ssQlxxList = res.result;
xiaomiao committed
515
          }
516 517 518
        });
      },
      // 更新土地用途信息
yuanbo committed
519 520 521 522 523
      /**
       * @description: 更新土地用途信息
       * @param {*} val
       * @author: renchao
       */
524 525 526 527 528
      upDateTdytxxList (val) {
        this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
        this.key++;
      },
      // 更新权利人信息
yuanbo committed
529 530 531 532 533
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
534 535 536 537 538 539
      upDateQlrxxList (val) {
        this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val));
        this.czrOptions = this.ruleForm.qlrData;
        this.key++;
      },
      // 更新义务人信息
yuanbo committed
540 541 542 543 544
      /**
       * @description: 更新义务人信息
       * @param {*} val
       * @author: renchao
       */
545 546 547 548
      upDateYwrxxList (val) {
        this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val));
        this.key++;
      },
yuanbo committed
549 550 551 552
      /**
       * @description: onSubmit
       * @author: renchao
       */
553 554 555 556
      onSubmit () {
        this.$refs.ruleForm.validate((valid) => {
          if (valid) {
            if (this.ruleForm.qlrData.length == 0) {
xiaomiao committed
557 558
              this.$message({
                showClose: true,
559
                message: "请确认权利人信息",
xiaomiao committed
560 561 562 563
                type: "error",
              });
              return false;
            }
564
            if (this.ruleForm.tdytqxList.length == 0 && !this.tdxz) {
xiaomiao committed
565 566
              this.$message({
                showClose: true,
567 568
                message: "请补充土地用途信息",
                type: "error",
xiaomiao committed
569
              });
570 571 572
              return false;
            }
            if (!this.tdxz) {
xiaomiao committed
573 574
              this.$message({
                showClose: true,
575
                message: "请补充土地性质",
xiaomiao committed
576 577
                type: "error",
              });
578
              return false;
xiaomiao committed
579
            }
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634
            this.ruleForm.tdytqxList = this.ruleForm.tdytqxList.map((item) => {
              return {
                ...item,
                qlxzbm: this.tdxz,
              };
            });
            if (this.ruleForm.qlxx.gyfs == "0") {
              if (this.ruleForm.qlrData.length > 1) {
                this.$message({
                  showClose: true,
                  message: "共有方式:单独所有,权利人只能是一个人",
                  type: "error",
                });
                return false;
              }
              this.ruleForm.qlrData[0].sfczr = "1";
            }
            // if (this.ruleForm.qlxx.gyfs == "1") {
            //   //是否分别持证
            //   if (this.ruleForm.qlxx.sqfbcz == "1") {
            //     //是
            //     this.ruleForm.qlrData.forEach((item, index) => {
            //       item.sfczr = "1";
            //     });
            //   } else {
            //     this.ruleForm.qlrData.forEach((item, index) => {
            //       if (item.zjh == this.ruleForm.czr) {
            //         item.sfczr = "1";
            //       } else {
            //         item.sfczr = "0";
            //       }
            //     });
            //   }
            // }
            save(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",
                });
              }
            });
          } else {
            return false;
          }
        });
      },
xiaomiao committed
635
    },
636
  };
xiaomiao committed
637 638
</script>
<style scoped lang="scss">
639 640
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
xiaomiao committed
641
</style>