addjtfc.vue 4.94 KB
<template>
  <dialogBox title="家庭房产查询" @closeDialog="closeDialog" width="70%" :isButton="false" v-model="myValue">
    <div class="jtfccx-edit">
      <div class="jtfccx-edit-con">
        <b class="title">申请信息</b>
        <el-form :model="form" label-width="120px">
          <el-row>
            <el-col :span="8">
              <el-form-item label="查询用途" label-width="90px">
                <el-input v-model="form.djSqcxDO.cxyt" class="width200px"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="16">
              <el-form-item label="与产权人的关系">
                <el-radio-group v-model="form.djSqcxDO.ycyrgx">
                  <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>
        </el-form>
        <personInfoTable @getInfoList="handleGetSqList" :dataList="form.sqrList" />

        <b class="title">权利人</b>
        <personInfoTable @getInfoList="handleGetQlList" :dataList="form.qlrList" />
        <div v-show="isSearch">
          <b class="title">查询结果</b>
          <lb-table :column="cxjgColumns" :data="form.cxjgList" :maxHeight="200" heightNumSetting :pagination="false">
          </lb-table>
        </div>
      </div>
      <el-divider></el-divider>
      <div class="submit-button" style="padding-bottom:50px">
        <el-button @click="resetClick">重置</el-button>
        <el-button type="primary" v-show="isSearch==false" @click="queryChick">查询</el-button>
        <el-button type="primary" v-show="isSearch&&form.dyjlList.length > 0">房产结果打印(1)</el-button>
        <el-button type="primary" v-show="isSearch&&form.dyjlList.length == 0">无房证明打印(1)</el-button>
        <el-button @click="closeDialog">关闭</el-button>
      </div>
    </div>
  </dialogBox>
</template>

<script>
import personInfoTable from "./personInfoTable";
import { addJtfcCxjgXx } from "@/api/sqcx";
import { datas, sendThis } from "./addjtfcdata";

export default {
  components: {
    personInfoTable,
  },
  props: {
    value: { type: Boolean, default: false },
  },
  mounted() {
    sendThis(this);
    // this.form.sqrList=_.cloneDeep(this.newData);
    // this.form.qlrList=_.cloneDeep(this.newData);
  },
  data() {
    return {
      myValue: this.value,
      isSearch: false,
      newData: [
        {
          sqrxm: "",
          sqrzjlxbm: "",
          sqrzjhm: "",
          lxdh: "",
          inputErr: false,
        },
      ],
      cxjgColumns: datas.columns(),
      form: {
        djSqcxDO: { ycyrgx: "1", cxyt: "" },
        sqrList: this.newData,
        qlrList: this.newData,
        cxjgList: [],
        dyjlList: [],
      },
    };
  },
  watch: {
    value(val) {
      this.myValue = val;
      // this.qldataList = _.cloneDeep(this.dataList)
      // this.sqdataList = _.cloneDeep(this.dataList)
      // this.addJtfc.sqrList = _.cloneDeep(this.dataList)
      // this.addJtfc.qlrList = _.cloneDeep(this.dataList)
    },
    "form.djSqcxDO.ycyrgx"(val) {
      if (val == "1") {
        this.$alert(this.form.sqrList);
        this.form.qlrList = this.form.sqrList;
      } else {
        this.form.qlrList = [];
        this.form.qlrList.push(this.newData);
      }
    },
    "form.djSqcxDO.ycyrgx": {
      handler(newValue, oldName) {},
    },
  },
  methods: {
    closeDialog() {
      this.$emit("input", false);
    },
    handleGetSqList(val) {
      // if (!_.isEqual(val, this.dataList) && this.ruleForm.ycyrgx == 1) {
      //   this.qldataList = val
      //   this.addJtfc.qlrList = val
      // } else
      //   this.addJtfc.sqrList = val
    },
    handleGetQlList(val) {
      // if (this.ruleForm.ycyrgx != 1) {
      //   this.addJtfc.qlrList = val
      // }
    },
    queryChick() {
      addJtfcCxjgXx(this.form).then((res) => {
        if (res.code == 200) {
          this.$alert("ddd");
        }
        // this.searchData.data = res.result;
        // this.isSearch = true
      });
    },
    resetClick() {
      this.form.djSqcxDO = { ycyrgx: "1", cxyt: "" };
      this.form.sqrList = _.cloneDeep(this.dataList);
      this.form.qlrList = _.cloneDeep(this.dataList);
    },
    handleRead(row) {},

    //抵押
    dyClick() {},

    //查封
    cfClick() {},
  },
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";

.title {
  padding-bottom: 10px;
  margin-bottom: 10px;
  display: block;
  border-bottom: 1px solid $borderColor;
}

.jtfccx-edit {
  @include flex;
  flex-direction: column;
  overflow-y: hidden;
  max-height: 87vh;
  padding: 0 2px;

  .jtfccx-edit-con {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
  }

  .submit-button {
    text-align: center;
    height: 52px;
    padding-top: 10px;
    background-color: #fff;
  }
}
</style>