Blame view

src/views/djbworkflow/djbBook/components/blxxtabs/fdcq.vue 17.4 KB
xiaomiao committed
1 2 3
<!--
 * @Description:
 * @Autor: renchao
4
 * @LastEditTime: 2023-06-25 15:52:42
xiaomiao committed
5 6 7 8 9 10 11 12 13 14 15
-->
<template>
  <!-- 受理信息 -->
  <div class="slxx">
    <el-form
      :model="ruleForm"
      :rules="rules"
      class="loadingtext"
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
xiaomiao committed
16
      inline-message
xiaomiao committed
17
      label-width="145px"
xiaomiao committed
18
    >
xiaomiao committed
19 20 21 22 23 24 25
      <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
26
            <el-form-item label="补录编号11:">
xiaomiao committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
              <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">
42
          房地产权(独幢、层、套、间房屋)
xiaomiao committed
43 44 45 46 47 48 49 50 51 52 53 54 55
          <div class="triangle"></div>
        </div>
        <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>
56
          <el-col :span="8">
xiaomiao committed
57 58 59 60 61 62 63 64 65 66 67 68 69
            <el-form-item label="上手业务号:">
              <el-input v-model="ruleForm.qlxx.ssywh"></el-input>
            </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">
            <el-form-item label="登记类型:">
70
              <el-select v-model="ruleForm.qlxx.djlx">
xiaomiao committed
71
                <el-option
xiaomiao committed
72
                  v-for="item in djlxlist"
xiaomiao committed
73 74 75 76
                  :key="item.dcode"
                  :label="item.dname"
                  :value="item.dcode"
                >
77 78
                </el-option>
              </el-select>
xiaomiao committed
79 80 81 82 83 84 85
            </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
86
          <el-col :span="8">
xiaomiao committed
87 88 89 90
            <el-form-item label="土地使用权人:">
              <el-input v-model="ruleForm.fdcq2.tdsyqr"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
91
          <el-col :span="8">
xiaomiao committed
92 93 94 95
            <el-form-item label="独用土地面积:">
              <el-input v-model="ruleForm.fdcq2.dytdmj"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
96
          <el-col :span="8">
xiaomiao committed
97 98 99 100
            <el-form-item label="分摊土地面积:">
              <el-input v-model="ruleForm.fdcq2.fttdmj"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
101
          <el-col :span="8">
102
            <!-- 下拉框 -->
xiaomiao committed
103 104
            <el-form-item label="土地性质:" style="margin-bottom: 3px">
              <treeselect
xiaomiao committed
105 106
                v-model="tdxz"
                 noOptionsText="暂无数据"
xiaomiao committed
107
                placeholder=""
108
                :normalizer="normalizer"
xiaomiao committed
109 110 111
                :show-count="true"
                :options="dictData['A9']"
              />
xiaomiao committed
112 113
            </el-form-item>
          </el-col>
xiaomiao committed
114
          <el-col :span="8">
xiaomiao committed
115
            <el-form-item label="房地产交易价格:">
xiaomiao committed
116 117 118 119 120
              <div style="display: flex">
                <el-input
                  v-model="ruleForm.fdcq2.qjjg"
                  style="width: 500%"
                ></el-input>
xiaomiao committed
121
                <el-select v-model="ruleForm.fdcq2.jedw">
xiaomiao committed
122 123 124 125 126 127
                  <el-option
                    v-for="item in dictData['A57']"
                    :key="item.dcode"
                    :label="item.dname"
                    :value="item.dcode"
                  >
xiaomiao committed
128 129
                  </el-option>
                </el-select>
xiaomiao committed
130
              </div>
xiaomiao committed
131 132
            </el-form-item>
          </el-col>
xiaomiao committed
133 134 135 136 137 138 139 140
              <el-col :span="8">
            <el-form-item label="权属状态:">
              <el-select v-model="ruleForm.qlxx.qszt">
                <el-option v-for="item in qsztlist" :key="item.dcode" :label="item.dname" :value="item.dcode">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
141
          <el-col :span="8">
xiaomiao committed
142
            <el-form-item label="规划用途:">
143
              <el-select v-model="ruleForm.fdcq2.ghyt">
xiaomiao committed
144 145 146 147 148 149
                <el-option
                  v-for="item in dictData['A17']"
                  :key="item.dcode"
                  :label="item.dname"
                  :value="item.dcode"
                >
150 151
                </el-option>
              </el-select>
xiaomiao committed
152 153
            </el-form-item>
          </el-col>
154
          <el-col :span="8">
xiaomiao committed
155 156 157 158
            <el-form-item label="批准用途:">
              <el-input v-model="ruleForm.fdcq2.pzyt"></el-input>
            </el-form-item>
          </el-col>
159
          <el-col :span="8">
xiaomiao committed
160 161 162 163
            <el-form-item label="实际用途:">
              <el-input v-model="ruleForm.fdcq2.sjyt"></el-input>
            </el-form-item>
          </el-col>
164
          <el-col :span="8">
xiaomiao committed
165 166
            <el-form-item label="房屋性质:">
              <el-select v-model="ruleForm.fdcq2.fwxz">
xiaomiao committed
167 168 169 170 171 172
                <el-option
                  v-for="item in dictData['A19']"
                  :key="item.dcode"
                  :label="item.dname"
                  :value="item.dcode"
                >
173 174
                </el-option>
              </el-select>
xiaomiao committed
175 176 177
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
178
            <el-form-item label="房屋结构:" prop="fdcq2.fwjg"  :rules="rules.fwjgrules">
xiaomiao committed
179
              <el-select v-model="ruleForm.fdcq2.fwjg">
xiaomiao committed
180 181 182 183 184 185
                <el-option
                  v-for="item in dictData['A46']"
                  :key="item.dcode"
                  :label="item.dname"
                  :value="item.dcode"
                >
186 187
                </el-option>
              </el-select>
xiaomiao committed
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
            </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
210
          <el-col :span="8">
xiaomiao committed
211 212 213 214 215 216 217 218 219 220 221
            <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
222
            <el-form-item label="不动产权证号:" prop="qlxx.bdcqzh"  :rules="rules.bdcqzhrules">
xiaomiao committed
223 224 225 226
              <el-input v-model="ruleForm.qlxx.bdcqzh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
227
            <el-form-item label="区县代码:" prop="qlxx.qxdm" :rules="rules.qxdmrules">
xiaomiao committed
228 229 230 231
              <el-input v-model="ruleForm.qlxx.qxdm"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
232
            <el-form-item label="登记机构:" prop="qlxx.djjg" :rules="rules.djjgrules">
xiaomiao committed
233 234 235 236
              <el-input v-model="ruleForm.qlxx.djjg"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
237
            <el-form-item label="登簿人:" prop="qlxx.dbr" :rules="rules.dbrrules">
xiaomiao committed
238 239 240 241
              <el-input v-model="ruleForm.qlxx.dbr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
242
            <el-form-item label="登记时间:" prop="qlxx.djsj" :rules="rules.djsjrules">
xiaomiao committed
243 244 245 246 247 248 249 250
              <el-date-picker
                v-model="ruleForm.qlxx.djsj"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd HH:mm:ss"
                format="yyyy-MM-dd"
              >
              </el-date-picker>
xiaomiao committed
251 252 253 254
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
255
          <el-col :span="24">
xiaomiao committed
256 257 258 259 260
            <el-form-item label="登记原因:">
              <el-input v-model="ruleForm.fdcq2.djyy"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
261 262
        <el-row>
          <el-col :span="24">
xiaomiao committed
263 264 265 266 267 268
            <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
269 270 271
          土地用途
          <div class="triangle"></div>
        </div>
272
        <tdytTable
xiaomiao committed
273
          :tableData="ruleForm.tdytqxList"
xiaomiao committed
274
          @upDateTdytxxList="upDateTdytxxList"
xiaomiao committed
275 276
        />
        <div class="slxx_title title-block">
xiaomiao committed
277 278 279 280 281 282 283
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="共有方式:">
              <el-radio-group
xiaomiao committed
284 285
                v-model="ruleForm.qlxx.gyqk"
              >
xiaomiao committed
286 287 288 289 290 291 292
                <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>
xiaomiao committed
293
          <!-- <el-col :span="6" v-show="ruleForm.qlxx.gyfs == '1'">
xiaomiao committed
294 295
            <el-form-item label="是否分别持证:">
              <el-radio-group v-model="ruleForm.qlxx.sqfbcz">
xiaomiao committed
296 297
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
xiaomiao committed
298 299
              </el-radio-group>
            </el-form-item>
xiaomiao committed
300 301
          </el-col> -->
          <!-- <el-col
xiaomiao committed
302 303 304
            :span="6"
            v-show="ruleForm.qlxx.sqfbcz == '0' && ruleForm.qlxx.gyfs == '1'"
          >
xiaomiao committed
305 306
            <el-form-item label="持证人:">
              <el-select v-model="ruleForm.czr" placeholder="持证人">
xiaomiao committed
307 308 309 310 311 312
                <el-option
                  v-for="item in czrOptions"
                  :key="item.zjh"
                  :label="item.sqrmc"
                  :value="item.zjh"
                >
xiaomiao committed
313 314 315
                </el-option>
              </el-select>
            </el-form-item>
xiaomiao committed
316
          </el-col> -->
xiaomiao committed
317 318
        </el-row>
        <qlrCommonTable
xiaomiao committed
319
          :tableData="ruleForm.qlrData"
xiaomiao committed
320 321
          @upDateQlrxxList="upDateQlrxxList"
          :key="key"
xiaomiao committed
322 323
          :gyfs="ruleForm.qlxx.gyfs"
        />
xiaomiao committed
324
      </div>
xiaomiao committed
325
      <el-row class="btn" v-if="!$route.query.viewtype">
xiaomiao committed
326 327 328 329 330 331 332 333 334
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import { mapGetters } from "vuex";
xiaomiao committed
335
import { init, save } from "@/api/djbbl.js";
xiaomiao committed
336
import qlrCommonTable from "@/views/djbworkflow/components/qlrCommonTable";
xiaomiao committed
337
import tdytTable from "@/views/workflow/components/tdytTable";
xiaomiao committed
338
// import the component
xiaomiao committed
339 340 341
// import Treeselect from '@riophae/vue-treeselect'
//   // import the styles
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
xiaomiao committed
342
export default {
xiaomiao committed
343
  components: { qlrCommonTable, tdytTable },
xiaomiao committed
344 345 346 347 348
  computed: {
    ...mapGetters(["dictData", "flag"]),
  },
  data() {
    return {
xiaomiao committed
349 350 351 352 353 354 355 356 357 358 359 360
      // 键名转换,方法默认是label和children进行树状渲染
      normalizer(node) {
        //方法
        if (node.children == null || node.children == "null") {
          delete node.children;
        }
        return {
          id: node.dcode,
          label: node.dname,
        };
      },

xiaomiao committed
361 362
      //表单是否可操作
      propsParam: this.$attrs,
xiaomiao committed
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
           // 登记类型
      djlxlist: [
        {
          dcode: "100",
          dname: "首次登记",
        },
        {
          dcode: "200",
          dname: "转移登记",
        },
        {
          dcode: "300",
          dname: "变更登记",
        },
        {
          dcode: "500",
          dname: "更正登记",
        },

        {
          dcode: "901",
          dname: "补证",
        },
        {
          dcode: "902",
          dname: "换证",
        },
      ],
xiaomiao committed
391 392 393 394 395 396 397 398 399 400 401
      // 权属状态
      qsztlist: [
        {
          dcode: "1",
          dname: "现势",
        },
        {
          dcode: "2",
          dname: "历史",
        },
      ],
xiaomiao committed
402
      key: 0,
xiaomiao committed
403
      tdxz:null,
xiaomiao committed
404 405 406 407
      isShow: false,
      disabled: true,
      czrOptions: [],
      ruleForm: {},
xiaomiao committed
408 409
     //传递参数\
         rules: {
xiaomiao committed
410

xiaomiao committed
411 412 413 414 415 416 417
          bdcqzhrules:[
            { required: true, message: "不动产权证号:", trigger: "change" },
          ],
        qxdmrules: [{ required: true, message: "区县代码", trigger: "blur" }],
        djjgrules: [{ required: true, message: "登记机构", trigger: "change" }],
        dbrrules: [{ required: true, message: "登簿人", trigger: "blur" }],
        djsjrules: [{ required: true, message: "登记时间", trigger: "change" }],
xiaomiao committed
418
        fwjgrules: [{ required: true, message: "房屋结构", trigger: "change" }],
xiaomiao committed
419
      },
xiaomiao committed
420 421 422 423 424 425 426 427
    };
  },
  created() {
    this.loadData();
  },
  mounted() {},
  methods: {
    loadData() {
xiaomiao committed
428

xiaomiao committed
429 430
      this.propsParam.isEdit=this.$parent.isEdit
      init(this.propsParam).then((res) => {
xiaomiao committed
431 432
        if (res.code == 200) {
          this.ruleForm = res.result;
xiaomiao committed
433 434 435 436 437
         if( this.ruleForm.tdytqxList.length>0){
            this.tdxz=this.ruleForm.tdytqxList[0].qlxzbm
          }else{
            this.tdxz=null
          }
xiaomiao committed
438 439 440 441
          this.isShow = true;
        }
      });
    },
xiaomiao committed
442
    // 更新土地用途信息
xiaomiao committed
443 444 445 446
    upDateTdytxxList(val) {
      this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
      this.key++;
    },
xiaomiao committed
447 448
    // 更新权利人信息
    upDateQlrxxList(val) {
xiaomiao committed
449 450
      this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val));
      this.czrOptions = this.ruleForm.qlrData;
xiaomiao committed
451 452 453 454
      this.key++;
    },
    // 更新义务人信息
    upDateYwrxxList(val) {
xiaomiao committed
455
      this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val));
xiaomiao committed
456 457 458
      this.key++;
    },
    onSubmit() {
xiaomiao committed
459 460
       this.$refs.ruleForm.validate((valid) => {
        if (valid) {
xiaomiao committed
461
      if (this.ruleForm.qlrData.length == 0) {
xiaomiao committed
462 463 464 465 466 467 468
        this.$message({
          showClose: true,
          message: "请确认权利人信息",
          type: "error",
        });
        return false;
      }
xiaomiao committed
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490
       if( this.ruleForm.tdytqxList.length==0&&!this.tdxz){
          this.$message({
          showClose: true,
          message: "请补充土地用途信息",
          type: "error",
        });
        return false;
       }
        if(!this.tdxz){
          this.$message({
          showClose: true,
          message: "请补充土地性质",
          type: "error",
        });
        return false;
       }
    this.ruleForm.tdytqxList = this.ruleForm.tdytqxList.map((item) => {
      return{
        ...item,
        qlxzbm:this.tdxz
      }
    })
xiaomiao committed
491
      if (this.ruleForm.qlxx.gyfs == "0") {
xiaomiao committed
492
        if (this.ruleForm.qlrData.length > 1) {
xiaomiao committed
493 494 495 496 497 498 499
          this.$message({
            showClose: true,
            message: "共有方式:单独所有,权利人只能是一个人",
            type: "error",
          });
          return false;
        }
xiaomiao committed
500
        this.ruleForm.qlrData[0].sfczr = "1";
xiaomiao committed
501
      }
xiaomiao committed
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518
      // 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";
      //       }
      //     });
      //   }
      // }
xiaomiao committed
519
      save(this.ruleForm).then((res) => {
xiaomiao committed
520 521 522 523 524 525 526 527
        if (res.code === 200) {
          this.$message({
            showClose: true,
            message: "保存成功!",
            type: "success",
          });
          this.$store.dispatch("user/refreshPage", true);
        } else {
xiaomiao committed
528

xiaomiao committed
529 530 531 532 533 534
          this.$message({
            showClose: true,
            message: res.message,
            type: "error",
          });
        }
xiaomiao committed
535 536 537
      });         } else {
          return false;
        }
xiaomiao committed
538
      });
xiaomiao committed
539

xiaomiao committed
540 541 542 543 544 545 546 547
    },
  },
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
</style>