Blame view

src/views/sqcx/dydjb/components/addDydjb.vue 8.49 KB
蔡俊立 committed
1
<template>
2
  <dialogBox title="房屋明细查询" @closeDialog="closeDialog" width="75%" :isButton="false" v-model="myValue">
蔡俊立 committed
3
    <el-steps :active="activeStep" finish-status="success">
4 5 6
      <el-step title="条件录入"></el-step>
      <el-step title="结果查询"></el-step>
      <el-step title="结果展示"></el-step>
蔡俊立 committed
7
    </el-steps>
蔡俊立 committed
8
    <div v-if="isSearch">
9
      <dydjbInfo ref="dydjbInfo" />
蔡俊立 committed
10 11
    </div>
    <div class="jtfccx-edit" v-else>
蔡俊立 committed
12 13
      <div class="jtfccx-edit-con">
        <b class="title"></b>
14
        <el-form :model="form" label-width="110px">
蔡俊立 committed
15 16 17
          <el-row>
            <el-col :span="6">
              <el-form-item label="查询用途" label-width="90px">
18
                <el-input v-model="form.djSqcxDO.cxyt" class="width100"></el-input>
蔡俊立 committed
19 20
              </el-form-item>
            </el-col>
21 22 23
            <el-col :span="8">
              <el-form-item label="不动产权证号">
                <el-input v-model="form.djSqcxDO.bdcqzh" class="width100"></el-input>
蔡俊立 committed
24 25
              </el-form-item>
            </el-col>
26
            <el-col :span="10">
蔡俊立 committed
27 28 29 30 31 32 33 34 35 36
              <el-form-item label="与产权人的关系">
                <el-radio-group v-model="form.djSqcxDO.ycqrgx">
                  <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>
蔡俊立 committed
37
        <b class="title">申请人</b>
蔡俊立 committed
38 39 40 41 42 43 44 45
        <lb-table :column="sqrColumns" key="sqr1" :data="form.sqrList" :maxHeight="200" heightNumSetting
          :pagination="false">
        </lb-table>
        <b class="title">权利人</b>
        <lb-table :column="qlrColumns" key="ql2r" :data="form.qlrList" :maxHeight="200" heightNumSetting
          :pagination="false">
        </lb-table>
        <div class="submit-button" style="padding-bottom:50px">
46 47 48
          <el-button @click="resetClick" v-show="!isSearch">重置</el-button>
          <el-button type="primary" @click="queryChick" v-show="!isSearch">查询</el-button>
          <el-button @click="closeDialog">关闭</el-button>
蔡俊立 committed
49 50 51 52 53 54 55
        </div>
      </div>
    </div>
  </dialogBox>
</template>

<script>
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
  import { addFwmxCxjgXx, getFwmxInfo, printJtcfInfo } from "@/api/jtfc.js";
  import { getPrintTemplateByCode } from "@/api/print";
  import { datas, sendThis } from "./dydjbdata";
  import { getLodop } from "@/utils/LodopFuncs"
  import dydjbInfo from "./dydjbInfo.vue";
  import { mapGetters } from "vuex";
  export default {
    computed: {
      ...mapGetters(["dictData"]),
    },
    components: { dydjbInfo },
    props: {
      value: { type: Boolean, default: false },
      sqcxBsm: { type: String, default: "" },
    },
    mounted () {
      sendThis(this);
    },
    data () {
      return {
        activeStep: 0,
        myValue: this.value,
        //是否查询
        isSearch: false,
        //查询结果列表字段
        cxjgColumns: datas.columns(),
        //申请人列表字段
        sqrColumns: datas.sqrCol(),
        //权利人列表字段
        qlrColumns: datas.qlrCol(),
        newData: {
          sqrxm: "",
          sqrzjlxbm: "",
          sqrzjhm: "",
          lxdh: "",
          inputErr: false,
        },
        form: {
          djSqcxDO: { ycqrgx: "1", cxyt: "", bdcqzh: "" },
          sqrList: [],
          qlrList: [],
          cxjgList: [],
          dyjlList: [],
        },
      };
    },
    watch: {
      value (val) {
        this.myValue = val;
        let that = this
        if (val) {
          this.form.sqrList = []
          this.form.qlrList = []
          this.isSearch = false
          if (this.sqcxBsm == "") {
            that.add("sqr");
            that.add("qlr");
          } else {
            that.loadData();
          }
        }
蔡俊立 committed
117
      },
118 119 120
      "form.djSqcxDO.ycqrgx" (val) {
        if (val == "1") {
          this.form.qlrList = _.cloneDeep(this.form.sqrList);
蔡俊立 committed
121
        } else {
122 123 124 125 126 127 128
          this.form.qlrList = [];
          this.add("qlr");
        }
      },
      "form.sqrList" (val) {
        if (this.form.djSqcxDO.ycqrgx == '1') {
          this.form.qlrList = _.cloneDeep(this.form.sqrList)
蔡俊立 committed
129 130 131
        }
      }
    },
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
    methods: {
      /**
       * @description: closeDialog
       * @author: renchao
       */
      closeDialog () {
        this.$emit("input", false);
        this.activeStep = 0;
        this.form = {
          djSqcxDO: { ycqrgx: "1", cxyt: "", bdcqzh: "" },
          sqrList: [],
          qlrList: [],
          cxjgList: [],
          dyjlList: [],
        }
      },
      //加载详细信息
      /**
       * @description: 加载详细信息
       * @author: renchao
       */
      loadData () {
        this.$startLoading();
        getFwmxInfo({ sqcxBsm: this.sqcxBsm }).then((res) => {
          this.$endLoading();
          if (res.code == 200) {
            this.activeStep = 2;
            this.isSearch = true;
            this.$nextTick(() => {
              this.$refs.dydjbInfo.setResult(res.result)
            })
          }
        });
      },
      //查询结果
      /**
       * @description: 查询结果
       * @author: renchao
       */
      queryChick () {
        this.$startLoading();
        this.activeStep = 1;
        addFwmxCxjgXx(this.form).then((res) => {
          this.$endLoading();
          if (res.code == 200) {
            this.activeStep = 2;
蔡俊立 committed
178 179 180 181
            this.isSearch = true;
            this.$nextTick(() => {
              this.$refs.dydjbInfo.setResult(res.result)
            })
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
            this.$parent.queryClick();
          }
        });
      },
      //重置
      /**
       * @description: 重置
       * @author: renchao
       */
      resetClick () {
        this.form.djSqcxDO = { ycqrgx: "1", cxyt: "", bdcqzh: "" };
        this.form.sqrList = _.cloneDeep([this.newData]);
        this.form.qlrList = _.cloneDeep([this.newData]);
        this.form.cxjgList = [];
        this.form.dyjlList = [];
        this.isSearch = false;
      },
      /**
       * @description: handleRead
       * @author: renchao
       */
      handleRead (scope) { },
      //添加申请人或权利人
      /**
       * @description: 添加申请人或权利人
       * @param {*} type
       * @author: renchao
       */
      add (type) {
        if (type == "sqr") {
          this.form.sqrList.push(_.cloneDeep(this.newData));
        } else {
          this.form.qlrList.push(_.cloneDeep(this.newData));
蔡俊立 committed
215
        }
216 217 218 219 220 221 222 223 224 225 226 227 228 229
      },
      //移除申请人或权利人
      /**
       * @description: 移除申请人或权利人
       * @param {*} index
       * @param {*} row
       * @param {*} type
       * @author: renchao
       */
      remove (index, row, type) {
        if (type == "sqr") {
          this.form.sqrList.splice(index, 1);
        } else {
          this.form.qlrList.splice(index, 1);
蔡俊立 committed
230
        }
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
      },
      //电话号码校验
      /**
       * @description: 电话号码校验
       * @param {*} row
       * @author: renchao
       */
      teltest (row) {
        const reg = /^1([38]\d|5[0-35-9]|7[3678])\d{8}$/;
        if (row.lxdh == "" || row.lxdh.length <= 10 || !reg.test(row.lxdh)) {
          row.inputErr = true;
          return false;
        } else {
          row.inputErr = false;
          return true;
        }
      },
蔡俊立 committed
248
    },
249
  };
蔡俊立 committed
250 251 252 253
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
xiaomiao committed
254 255 256 257 258 259 260 261 262 263
  /deep/.dialog_title::before{
    content: "";
    display: block;
    width: 4px;
    height: 18px;
    background: none;
    position: absolute;
    top: -4px;
    left: 0px;
  }
蔡俊立 committed
264 265 266 267 268 269 270
.title {
  padding-bottom: 10px;
  margin-bottom: 10px;
  display: block;
  border-bottom: 1px solid $borderColor;
}

271 272 273 274 275 276
  .jtfccx-edit {
    @include flex;
    flex-direction: column;
    overflow-y: hidden;
    max-height: 85vh;
    padding: 0 2px;
蔡俊立 committed
277

278 279 280 281 282
    .jtfccx-edit-con {
      flex: 1;
      height: 100%;
      overflow-y: scroll;
    }
蔡俊立 committed
283

284 285 286 287 288 289
    .submit-button {
      text-align: center;
      height: 52px;
      padding-top: 10px;
      background-color: #fff;
    }
蔡俊立 committed
290
  }
xiaomiao committed
291

xiaomiao committed
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314
/deep/.el-dialog__headerbtn .el-dialog__close {
    color: #6B7A99 !important;
    position: relative;
    top: -7px;
}
/deep/.dialogBox .dialog_title{
  .el-icon-full-screen{
 color: #409eff!important;
  }
   b {
 color: white;
  flex: 0.1;
  margin: auto;
  text-align: center;
  align-items: center;
}
}
/deep/.el-dialog__header {
  background: linear-gradient(3deg, #409eff, #a7cbee);
}
/deep/.el-dialog__headerbtn .el-dialog__close{
        color: #409eff!important;
}
蔡俊立 committed
315
</style>