Blame view

src/views/ywbl/slsqxx/fdcq1/slxx.vue 16.3 KB
1 2 3
<!--
 * @Description: 房屋多幢受理信息
 * @Autor: ssq
4
 * @LastEditTime: 2023-09-12 09:55:25
5 6 7
-->
<template>
  <div class="slxx">
8 9 10 11 12 13
    <el-form
      :model="ruleForm"
      :rules="rules"
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
14 15
      v-Loading="loading"
      label-width="120px">
16 17
      <div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
        <div class="slxx_title title-block">
18
          申请业务信息
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
          <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">
            <el-form-item label="权利类型:">
              <el-input disabled v-model="ruleForm.sldy.qllxmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="登记类型:">
              <el-input disabled v-model="ruleForm.sldy.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.qlxx">
          <el-col :span="8">
61 62 63 64 65
            <el-form-item label="原不动产权证号:">
              <el-input disabled v-model="ruleForm.sldy.ybdcqzsh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
66 67 68 69
            <el-form-item label="不动产单元号:">
              <el-input disabled v-model="ruleForm.qlxx.bdcdyh"></el-input>
            </el-form-item>
          </el-col>
70
          <el-col :span="8">
71
            <el-form-item label="坐落:">
xiaomiao committed
72
              <el-input maxlength="100" v-model="ruleForm.sldy.zl"></el-input>
73 74 75 76 77 78 79 80
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10" v-if="ruleForm.fdcq1">
          <el-col :span="8">
            <el-form-item label="宗地面积:">
              <div class="flex">
                <el-input disabled v-model="ruleForm.zdjbxx.zdmj"></el-input>
xiaomiao committed
81 82 83
                <el-select
                  disabled
                  v-model="ruleForm.zdjbxx.mjdw"
84
                  style="width: 20%">
85 86 87 88
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
89
                    :value="item.dcode"></el-option>
90 91 92 93 94 95 96 97 98 99 100 101
                </el-select>
              </div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="土地性质:">
              <el-input disabled v-model="ruleForm.zdjbxx.qlxzmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="土地使用权人:">
              <el-input disabled v-model="ruleForm.fdcq1.tdsyqr"></el-input>
102 103 104
            </el-form-item>
          </el-col>
        </el-row>
105
        <el-row :gutter="10" v-if="ruleForm.fdcq1">
106
          <el-col :span="8">
107
            <el-form-item label="独用土地面积:">
xiaomiao committed
108
              <el-input :disabled="!viewEdit" maxlength="12" v-model="ruleForm.fdcq1.dytdmj"></el-input>
109
            </el-form-item>
110
          </el-col>
111
          <el-col :span="8">
112
            <el-form-item label="分摊土地面积:">
xiaomiao committed
113
              <el-input :disabled="!viewEdit" maxlength="12" v-model="ruleForm.fdcq1.fttdmj"></el-input>
114 115
            </el-form-item>
          </el-col>
116

117
          <el-col :span="8">
118
            <el-form-item label="房地产交易价格:">
119 120
              <div class="flex">
                <el-input
121 122
                  maxlength="11"
                  :disabled="!viewEdit"
123 124
                  v-model="ruleForm.fdcq1.fdcjyjg"
                  style="width: 500%"
125
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
126
                <el-select :disabled="!viewEdit" v-model="ruleForm.fdcq1.jedw">
127 128 129 130
                  <el-option
                    v-for="item in dictData['A57']"
                    :key="item.dcode"
                    :label="item.dname"
131
                    :value="item.dcode"></el-option>
132 133
                </el-select>
              </div>
134 135 136 137
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
138 139
          <el-col :span="24">
            <el-form-item label="附记:">
xiaomiao committed
140
              <el-input
141
                :disabled="!viewEdit"
xiaomiao committed
142 143 144
                v-model="ruleForm.fdcq1.fj"
                type="textarea"
                maxlength="500"
145
                show-word-limit></el-input>
146 147 148 149
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
150 151 152
          房屋多幢明细
          <div class="triangle"></div>
          <fdcqxmTable
153
            :ableOperation="viewEdit"
154
            :tableData="ruleForm.fdcqxm"
155
            @updateFdcwxmList="updateFdcwxmList" />
156 157 158 159 160
          <div class="slxx_title title-block">
            土地用途
            <div class="triangle"></div>
          </div>
          <tdytTable
161
            :ableOperation="viewEdit"
162
            :tableData="ruleForm.tdytqxList"
163
            @upDateTdytxxList="upDateTdytxxList" />
164 165 166 167 168 169 170
          <div class="slxx_title title-block">
            权利人信息
            <div class="triangle"></div>
          </div>
          <el-row :gutter="10">
            <el-col :span="14" v-if="ruleForm.qlxx">
              <el-form-item label="共有方式:">
171 172
                <el-radio-group
                  :disabled="!viewEdit"
173
                  v-model="ruleForm.sldy.gyfs">
174 175 176 177 178 179 180
                  <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>
181
            <el-col :span="5" v-show="ruleForm.sldy.gyfs != '0'">
182
              <el-form-item label="是否分别持证:">
xiaomiao committed
183 184 185
                <el-radio-group
                  v-model="ruleForm.sldy.sqfbcz"
                  :disabled="!viewEdit"
186
                  @input="updaterow()">
187 188
                  <el-radio :label="1"></el-radio>
                  <el-radio :label="0"></el-radio>
189 190 191
                </el-radio-group>
              </el-form-item>
            </el-col>
xiaomiao committed
192 193
            <el-col
              :span="5"
194
              v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
xiaomiao committed
195
              <el-form-item label="持证人1:">
xiaomiao committed
196 197 198
                <el-select
                  v-model="czr"
                  placeholder="持证人"
199
                  :disabled="!viewEdit">
200 201 202 203
                  <el-option
                    v-for="item in czrOptions"
                    :key="item.zjh"
                    :label="item.sqrmc"
204
                    :value="item.zjh"></el-option>
205 206 207 208
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
209 210
          <qlrCommonTable
            @upDateQlrxxList="upDateQlrxxList"
211 212
            :disabled="viewEdit"
            :tableData="ruleForm.qlrList"
213
            :gyfs="ruleForm.sldy.gyfs" />
214

215 216 217 218 219
          <div v-if="ruleForm.ywrList && ruleForm.qlxx.djlx == '200'">
            <div class="slxx_title title-block">
              义务人信息
              <div class="triangle"></div>
            </div>
220
            <ywrCommonTable
221
              v-if="ruleForm.qlxx"
222
              :disabled="viewEdit"
223 224
              @upDateQlrxxList="upDateYwrxxList"
              :tableData="ruleForm.ywrList"
225
              :gyfs="ruleForm.qlxx.gyfs" />
226

227
          </div>
228
          <div class="slxx_title title-block">
229
            登记原因
230 231
            <div class="triangle"></div>
          </div>
232 233 234
          <el-row :gutter="10">
            <el-col>
              <el-form-item v-if="ruleForm.sldy" label="登记原因:" prop="djyy">
235 236 237 238 239 240
                <el-input
                  class="textArea"
                  type="textarea"
                  maxlength="500"
                  show-word-limit
                  :disabled="!viewEdit"
241
                  v-model="ruleForm.fdcq1.djyy"></el-input>
242 243 244
              </el-form-item>
            </el-col>
          </el-row>
245
        </div>
246
      </div>
247
      <el-row class="btn" v-if="viewEdit">
248 249 250 251 252 253 254 255
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
256 257
  import ywmix from "@/views/ywbl/mixin/index";
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
258
  import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
  import fdcqxmTable from "@/views/workflow/components/fdcqxmTable";
  import tdytTable from "@/views/workflow/components/tdytTable";
  import { Init, saveData } from "@/api/workflow/fwsyq1Flow.js";
  import { mapGetters } from "vuex";
  export default {
    mixins: [ywmix],
    mounted () {
      this.loading = true
      this.viewEdit = 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("isEdit", this.viewEdit);
      Init(formdata).then((res) => {
274 275 276
        setTimeout(() => {
          this.loading = false
        }, 200)
277 278 279 280 281 282 283
        if (res.code === 200 && res.result) {
          this.ruleForm = {
            ...res.result,
            ...res.result.qlxxdatas,
          };
          this.ruleForm.qlrList.forEach((item) => {
            if (item.sfczr == 1) {
284
              this.czr = item.zjh
285 286 287 288
            }
          });
          this.czrOptions = this.ruleForm.qlrList;
        }
289
      })
290
    },
291
    components: { qlrCommonTable, tdytTable, fdcqxmTable, ywrCommonTable },
292 293
    computed: {
      ...mapGetters(["dictData", "flag"]),
294
    },
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
    data () {
      return {
        loading: false,
        disabled: true,
        tdytOption: [],
        czrOptions: [],
        czr: "",
        ruleForm: {
          flow: {
            ywh: "",
          },
          qlxx: {
            mj: "",
          },
          sldy: {
            gyfs: "",
          },
          slsq: {},
          fdcq1: {
            zyjzmj: "",
            ftjzmj: "",
          },
          zdjbxx: {
            ghytmc: "",
          },
        },
        //传递参数
        propsParam: this.$attrs,
        //表单是否可操作
        viewEdit: false,
        rules: {},
      };
327
    },
328
    methods: {
yuanbo committed
329 330 331 332
      /**
       * @description: updateFdcwxmList
       * @author: renchao
       */
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
      updateFdcwxmList (val) {
        this.ruleForm.fdcqxm && (this.ruleForm.fdcqxm = _.cloneDeep(val));
        this.key++;
      },
      /**
       * @description: 更新土地用途信息
       * @param {*} val
       * @author: renchao
       */
      upDateTdytxxList (val) {
        this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
        this.key++;
      },
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateQlrxxList (val) {
352 353 354 355
        if (!_.isEqual(val, this.ruleForm.qlrList)) {
          this.ruleForm.qlrList = _.cloneDeep(val);
          this.czrOptions = this.ruleForm.qlrList;
        }
356 357
        this.num = 0
        this.ruleForm.qlrList.forEach(item => {
358
          if (item.zjh == this.czr) {
359 360 361 362
            this.num++
          }
        })
        if (this.num == 0) {
363 364
          this.czr = ''
        }
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
      },
      /**
       * @description: 是否持证人变化
       * @param {*} val
       * @author: renchao
       */
      updaterow () {
        this.czr = "";
      },
      // 更新权利人信息
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateYwrxxList (val) {
        this.ruleForm.ywrList = _.cloneDeep(val);
      },
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        let that = this;
        let arr = this.ruleForm.tdytqxList.filter((item) => !item.yt);
        if (arr.length > 0) {
391 392
          this.$message({
            showClose: true,
393
            message: "土地用途不能为空",
394 395
            type: "error",
          });
396
          return false;
397
        }
398
        if (this.ruleForm.qlrList.length == 0) {
399 400
          this.$message({
            showClose: true,
401
            message: "请确认权利人信息",
402 403 404 405
            type: "error",
          });
          return false;
        }
406 407 408 409 410 411 412 413 414 415
        if (this.ruleForm.sldy.gyfs == "0") {
          if (this.ruleForm.qlrList.length > 1) {
            this.$message({
              showClose: true,
              message: "共有方式:单独所有,权利人只能是一个人",
              type: "error",
            });
            return false;
          }
          this.ruleForm.qlrList[0].sfczr = "1";
416
        } else {
417 418
          if (this.ruleForm.qlrList.length <= 1) {
            this.$message({
419
              showClose: true,
420 421
              message:
                "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
422 423 424 425
              type: "error",
            });
            return false;
          }
426 427 428 429
          //是否分别持证
          if (this.ruleForm.sldy.sqfbcz == "1") {
            //是
            this.ruleForm.qlrList.forEach((item, index) => {
430
              item.sfczr = "1";
431 432 433 434 435 436 437 438 439
            });
          } else {
            if (!that.czr) {
              that.$message({
                showClose: true,
                message: "请选择持证人",
                type: "error",
              });
              return false;
440
            }
441
            this.ruleForm.qlrList.forEach((item, index) => {
442
              if (item.zjh == that.czr) {
443 444 445 446 447 448
                item.sfczr = "1";
              } else {
                item.sfczr = "0";
              }
            });
          }
449 450
        }

451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
        saveData(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",
            });
          }
        });
      },
468
    },
469
  };
470
</script>
xiaomiao committed
471
<style scoped lang="scss">
472
  @import "~@/styles/public.scss";
473

474 475 476 477 478
  /deep/.el-form {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
  }
479

480 481 482
  /deep/.el-form-item__label {
    padding: 0;
  }
483

484 485 486
  /deep/.el-radio {
    margin-right: 10px;
  }
487

488 489 490
  /deep/.el-select {
    width: 100%;
  }
491

492 493 494
  /deep/.el-form-item {
    margin-bottom: 8px;
  }
495

496 497 498
  .marginBot0 {
    margin-bottom: 0 !important;
  }
499

500 501 502
  .slxx {
    box-sizing: border-box;
  }
503

504 505 506 507 508 509 510 511
  .slxx_con {
    flex: 1;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
    padding-right: 3px;
    overflow-x: hidden;
  }
512

513 514 515
  .submit_btn {
    height: 50px;
  }
516

517 518 519 520 521 522 523 524 525 526
  .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;
  }
527

528 529 530 531 532 533 534
  .btn {
    text-align: center;
    padding-top: 10px;
    height: 36px;
    background-color: #ffffff;
    padding: 5px 0;
  }
535

536 537 538 539
  .textArea {
    /deep/.el-textarea__inner {
      min-height: 90px !important;
    }
540 541
  }

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