slxxOverview.vue 11.2 KB
<!--
 * @Description: 受理信息
 * @Autor: renchao
 * @LastEditTime: 2023-08-01 18:14:10
-->
<template>
  <div class="slxx">
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" :label-position="flag ? 'top' : ''" :inline="flag"
      label-width="130px">
      <div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
        <div class="slxx_title title-block">
          受理信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10" v-if="ruleForm.slsq">
          <el-col :span="8">
            <el-form-item label="业务号:">
              <el-input disabled v-model="ruleForm.flow.ywh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="受理人员:">
              <el-input disabled v-model="ruleForm.slsq.slry"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="受理时间:">
              <el-input disabled v-model="ruleForm.slsq.slsj"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10" v-if="ruleForm.slsq">
          <el-col :span="8" v-if="ruleForm.sldyList.length>0">
            <el-form-item label="权利类型:">
              <el-input disabled v-model="ruleForm.sldyList[0].qllxmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8" v-if="ruleForm.sldyList.length>0">
            <el-form-item label="登记类型:">
              <el-input disabled v-model="ruleForm.sldyList[0].djlxmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="登记情形:">
              <el-input disabled v-model="ruleForm.slsq.djqxmc"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
          房屋概况
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10" v-if="ruleForm.zdjbxx">
          <el-col :span="8">
            <el-form-item label="规划用途名称:">
              <el-input disabled v-model="ruleForm.zdjbxx.ghytmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="权利设定方式名称:">
              <el-input disabled v-model="ruleForm.zdjbxx.qlsdfsmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="房屋性质:">
              <el-input disabled v-model="splicingFdcq2.fwxz"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10" v-if="ruleForm.zdjbxx">
          <el-col :span="8">
            <el-form-item label="房屋结构:">
              <el-input disabled v-model="splicingFdcq2.fwjg"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="建筑总面积:">
              <el-input disabled v-model="splicingFdcq2.jzmj"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="房屋总套数:">
              <el-input disabled v-model="splicingFdcq2.zts"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10" v-if="ruleForm.slsq">
          <el-col :span="5">
            <el-form-item label="发证方式:">
              <el-radio-group v-model="ruleForm.slsq.fzfs">
                <el-radio label="1">小证</el-radio>
                <el-radio label="2">大证</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="14" v-if="ruleForm.sldyList.length>0">
            <el-form-item label="共有方式:">
              <el-radio-group :disabled="!ableOperation" @change="showCZInfo"
                v-model="ruleForm.sldyList[0].gyfs">
                <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-col :span="5" v-show="ruleForm.sldyList.length>0 && ruleForm.slsq.gyfs == '2'">
            <el-form-item label="是否分别持证:" v-if="ruleForm.sldyList.length>0">
              <el-radio-group v-model="ruleForm.sldyList[0].sqfbcz">
                <el-radio label="1"></el-radio>
                <el-radio label="0"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="5" v-show="ruleForm.sldyList.length>0 && ruleForm.sldyList[0].gyfs == '2'">
            <el-form-item label="持证人:">
              <el-input v-model="ruleForm.slsq.czr"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <qlrCommonTable @upDateQlrxxList="upDateQlrxxList" :tableData="ruleForm.qlrList"
          :gyfs="ruleForm.slsq.gyfs" />
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col v-if="ruleForm.fdcq2List.length>0">
            <el-form-item v-if="ruleForm.slsq" label="登记原因:" prop="djyy">
              <el-input class="textArea" type="textarea" :disabled="!ableOperation"
                v-model="ruleForm.fdcq2List[0].djyy">
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <el-row class="btn" v-if="ableOperation">
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
  import ywmix from "@/views/ywbl/mixin/index"
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
  import { BatchInit, Init, saveBatchData, saveData } from "@/api/workflow/fwsyqFlow.js";
  import { mapGetters } from "vuex";
  export default {
    mixins: [ywmix],
    mounted (callbackfn, thisArg) {
      this.ableOperation = this.$parent.currentSelectTab.ableOperation
      this.propsParam = this.$attrs;
      var formdata = new FormData();
      formdata.append("bsmSldy", this.propsParam.bsmSldy);
      formdata.append("djlx", this.propsParam.djlx);
      formdata.append("bsmSlsq", this.bsmSlsq);
      formdata.append("isEdit", this.ableOperation);
      BatchInit(formdata).then((res) => {
        if (res.code == 200) {
          this.ruleForm = res.result;
          this.splicingFdcq2Info();
        }
      })
    },
    components: { qlrCommonTable },
    computed: {
      ...mapGetters(["dictData", "flag"])
    },
    data () {
      return {
        disabled: true,
        tdytOption: [],
        ruleForm: {
          cfdjList: []//查封登记
          , diyaqList: []//抵押权
          , fdcq2List: []//房屋信息集合
          , qlrList: []//权利人
          , ywrList: []//义务人
          , qlxxList: []//权利信息集合
          , sldyList: []//受理不动产单元集合
          , slsq: {}//受理申请流程明细
          , flow: {}//受理申请流程明细
          , sqrList: []//申请人
          , ssQlxxList: []//上手权利信息
          , user: {}//用户
          , zdjbxx: {}//宗地基本信息
        },
        //传递参数
        propsParam: this.$attrs,
        //表单是否可操作
        ableOperation: true,
        rules: {},
        bsmSlsq: this.$route.query.bsmSlsq,//受理申请标识码
        splicingFdcq2: {//前端根据后台数组组装展示内容
          fwxz: ''//房屋性质
          , fwjg: ''//房屋结构
          , jzmj: '' //建筑面积
          , zts: ''//房屋总套数
        }
      }
    },
    methods: {
      //组装房地产权通用信息
      /**
       * @description: 组装房地产权通用信息
       * @author: renchao
       */
      splicingFdcq2Info () {
        let fdcq2List = this.ruleForm.fdcq2List;
        let fwxzArr = [];
        let fwjgArr = [];
        let jzmj = 0;
        fdcq2List.forEach(fdcq2 => {
          fwxzArr.push(fdcq2.fwxzmc);
          fwjgArr.push(fdcq2.fwjgmc);
          jzmj += parseFloat(fdcq2.jzmj);
        })
        //将数据转为字符串
        //房屋性质
        let fwxz = Array.from(new Set(fwxzArr)).join(",");
        //房屋结构
        let fwjg = Array.from(new Set(fwjgArr)).join(",");
        this.splicingFdcq2.fwxz = fwxz;
        this.splicingFdcq2.fwjg = fwjg;
        this.splicingFdcq2.jzmj = jzmj == null ? 0 : jzmj;
        this.splicingFdcq2.zts = fdcq2List.length;

      },

      // 更新权利人信息
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateQlrxxList (val) {
        this.ruleForm.qlrList = _.cloneDeep(val);
      },
      /**
       * @description: showCZInfo
       * @author: renchao
       */
      showCZInfo () {
        console.log(this.ruleForm.slsq.gyfs);
      },
      // 更新义务人信息
      /**
       * @description: 更新义务人信息
       * @param {*} val
       * @author: renchao
       */
      upDateYwrxxList (val) {
        this.ruleForm.ywrList = _.cloneDeep(val);
      },
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        saveBatchData(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"
            })
          }
        })
      }
    }
  }
</script>
<style scoped lang='scss'>
  @import "~@/styles/public.scss";

  /deep/.el-form {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
  }

  /deep/.el-form-item__label {
    padding: 0;
  }

  /deep/.el-radio {
    margin-right: 10px;
  }

  /deep/.el-select {
    width: 100%;
  }

  /deep/.el-form-item {
    margin-bottom: 8px;
  }

  .marginBot0 {
    margin-bottom: 0 !important;
  }

  .slxx {
    box-sizing: border-box;
  }

  .slxx_con {
    flex: 1;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
    padding-right: 3px;
    overflow-x: hidden;
  }

  .submit_btn {
    height: 50px;
  }

  .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;
  }

  .btn {
    text-align: center;
    padding-top: 10px;
    height: 36px;
    background-color: #ffffff;
    padding: 5px 0;
  }

  .textArea {
    /deep/.el-textarea__inner {
      min-height: 90px !important;
    }
  }

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