Blame view

src/views/ywbl/slsqxx/ygdj/slxx.vue 16.5 KB
1 2 3
<template>
  <!-- 受理信息 -->
  <div class="slxx">
xiaomiao committed
4 5 6
    <el-form
      :model="ruleForm"
      :rules="rules"
7
      v-Loading="loading"
xiaomiao committed
8 9 10
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
11
      label-width="120px">
12
      <div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
13
        <div class="slxx_title title-block">
14
          申请业务信息
15 16
          <div class="triangle"></div>
        </div>
17
        <el-row :gutter="10" v-if="ruleForm.slsq">
18
          <el-col :span="8">
19
            <el-form-item label="业务号:">
tianhaohao@pashanhoo.com committed
20
              <el-input disabled v-model="ruleForm.flow.ywh"></el-input>
21 22 23
            </el-form-item>
          </el-col>
          <el-col :span="8">
24
            <el-form-item label="受理人员:">
25
              <el-input disabled v-model="ruleForm.slsq.slry"></el-input>
26 27 28
            </el-form-item>
          </el-col>
          <el-col :span="8">
29
            <el-form-item label="受理时间:">
30
              <el-input disabled v-model="ruleForm.slsq.slsj"></el-input>
31 32 33
            </el-form-item>
          </el-col>
        </el-row>
34
        <el-row :gutter="10" v-if="ruleForm.slsq">
35
          <el-col :span="8">
36
            <el-form-item label="权利类型:">
tianhaohao@pashanhoo.com committed
37
              <el-input disabled v-model="ruleForm.sldy.qllxmc"></el-input>
38 39 40
            </el-form-item>
          </el-col>
          <el-col :span="8">
41
            <el-form-item label="登记类型:">
tianhaohao@pashanhoo.com committed
42
              <el-input disabled v-model="ruleForm.sldy.djlxmc"></el-input>
43 44 45
            </el-form-item>
          </el-col>
          <el-col :span="8">
46
            <el-form-item label="登记情形:">
47
              <el-input disabled v-model="ruleForm.slsq.djqxmc"></el-input>
48 49 50 51
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
52
          不动产情况
53 54 55
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10" v-if="ruleForm.qlxx">
56
          <el-col :span="8">
tianhaohao@pashanhoo.com committed
57
            <el-form-item label="原不动产证号:">
58 59 60
              <el-input disabled v-model="ruleForm.sldy.ybdcqzsh"></el-input>
            </el-form-item>
          </el-col>
61
          <el-col :span="8">
62
            <el-form-item label="不动产单元号:">
63 64 65
              <el-input disabled v-model="ruleForm.qlxx.bdcdyh"></el-input>
            </el-form-item>
          </el-col>
66
          <el-col :span="8">
67
            <el-form-item label="坐落:">
68
              <el-input disabled v-model="ruleForm.sldy.zl"></el-input>
69 70 71
            </el-form-item>
          </el-col>
        </el-row>
72
        <el-row :gutter="10">
73
          <el-col :span="8">
74 75
            <el-form-item label="预告登记种类:">
              <el-input disabled v-model="ruleForm.ygdj.ygdjzlmc"></el-input>
76 77 78
            </el-form-item>
          </el-col>
          <el-col :span="8">
79 80 81 82 83 84
            <el-form-item label="土地使用权人:">
              <el-input disabled v-model="ruleForm.ygdj.tdsyqr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="房屋性质:">
85
              <el-select v-model="ruleForm.ygdj.fwxz" :disabled="!viewEdit">
86
                <el-option
87
                  v-for="item in dictData['A19']"
88 89
                  :key="item.dcode"
                  :label="item.dname"
90
                  :value="item.dcode">
91 92
                </el-option>
              </el-select>
93 94
            </el-form-item>
          </el-col>
95 96
        </el-row>
        <el-row :gutter="10" v-if="ruleForm.qlxx">
97
          <el-col :span="8">
98
            <el-form-item label="房屋用途:">
“miaofang committed
99
              <el-select v-model="ruleForm.ygdj.ghyt" :disabled="!viewEdit">
100
                <el-option
101
                  v-for="item in dictData['A17']"
102 103
                  :key="item.dcode"
                  :label="item.dname"
104
                  :value="item.dcode">
105 106
                </el-option>
              </el-select>
107 108
            </el-form-item>
          </el-col>
109 110
          <el-col :span="8">
            <el-form-item label="所在层:">
111
              <el-input maxlength="20" :disabled="!viewEdit" v-model="ruleForm.ygdj.szc"></el-input>
112 113 114 115
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="总层数:">
xiaomiao committed
116
              <el-input
117
                :disabled="!viewEdit"
118
                maxlength="4"
xiaomiao committed
119
                v-model.number="ruleForm.ygdj.zcs"
120
                oninput="value=value.replace(/[^0-9]/g,'')"></el-input>
121 122
            </el-form-item>
          </el-col>
123
        </el-row>
124
        <el-row :gutter="10" v-if="ruleForm.qlxx">
125
          <el-col :span="8">
126
            <el-form-item label="房屋结构:">
127
              <el-select v-model="ruleForm.ygdj.fwjg" :disabled="!viewEdit">
128 129 130 131
                <el-option
                  v-for="item in dictData['A46']"
                  :key="item.dcode"
                  :label="item.dname"
132
                  :value="item.dcode">
133 134
                </el-option>
              </el-select>
135 136
            </el-form-item>
          </el-col>
137 138

          <el-col :span="8">
139
            <el-form-item label="建筑面积:">
140
              <div class="flex">
xiaomiao committed
141
                <el-input
142
                  maxlength="12"
xiaomiao committed
143 144
                  v-model="ruleForm.ygdj.jzmj"
                  :disabled="!viewEdit"
145
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
146
                <el-select :disabled="!viewEdit" v-model="mjdw" style="width: 68px">
147 148 149 150
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
151
                    :value="item.dcode">
152 153 154
                  </el-option>
                </el-select>
              </div>
155
            </el-form-item>
156
          </el-col>
157
          <el-col :span="8">
158
            <el-form-item label="取得价格:">
159
              <div class="flex">
160
                <el-input
161
                  :disabled="!viewEdit"
162
                  maxlength="11"
xiaomiao committed
163
                  v-model="ruleForm.ygdj.qdjg"
164
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
165
                <el-select
166
                  v-model="ruleForm.ygdj.jedw"
167
                  :disabled="!viewEdit"
168
                  style="width: 68px">
169 170 171 172
                  <el-option
                    v-for="item in dictData['A57']"
                    :key="item.dcode"
                    :label="item.dname"
173
                    :value="item.dcode">
174 175
                  </el-option>
                </el-select>
176
              </div>
177 178 179
            </el-form-item>
          </el-col>
        </el-row>
180
        <el-row :gutter="10">
181 182
          <el-col :span="24">
            <el-form-item label="附记:">
xiaomiao committed
183
              <el-input
184
                :disabled="!viewEdit"
xiaomiao committed
185 186 187
                v-model="ruleForm.ygdj.fj"
                type="textarea"
                maxlength="500"
188
                show-word-limit></el-input>
189
            </el-form-item>
190 191
          </el-col>
        </el-row>
192 193 194 195 196
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
197
          <el-col :span="12" v-if="ruleForm.qlxx">
198
            <el-form-item label="共有方式:">
xiaomiao committed
199 200
              <el-radio-group
                :disabled="!viewEdit"
201
                v-model="ruleForm.sldy.gyfs">
202 203 204 205
                <el-radio label="0">单独所有</el-radio>
                <el-radio label="1">共同共有</el-radio>
                <el-radio label="2">按份所有</el-radio>
                <el-radio label="3">其它共有</el-radio>
206 207 208
              </el-radio-group>
            </el-form-item>
          </el-col>
209 210 211 212
          <el-col :span="6" v-show="ruleForm.sldy.gyfs != '0'">
            <el-form-item label="是否分别持证:">
              <el-radio-group
                v-model="ruleForm.sldy.sqfbcz"
xiaomiao committed
213
                :disabled="!viewEdit"
214
                @input="updaterow()">
215 216 217 218 219 220 221
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col
            :span="6"
222
            v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
223 224
            <el-form-item label="持证人:">
              <el-select
xiaomiao committed
225
                v-model="czr"
226
                placeholder="持证人"
227
                :disabled="!viewEdit">
228
                <el-option
229 230
                  v-for="(item,index) in czrOptions"
                  :key="index"
231
                  :label="item.sqrmc"
232
                  :value="item.id">
233 234 235 236
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
237
        </el-row>
xiaomiao committed
238 239 240 241
        <qlrCommonTable
          @upDateQlrxxList="upDateQlrxxList"
          :disabled="viewEdit"
          :tableData="ruleForm.qlrList"
242
          :gyfs="ruleForm.sldy.gyfs" />
243 244 245 246
        <div class="slxx_title title-block">
          义务人信息
          <div class="triangle"></div>
        </div>
247
        <ywrCommonTable
xiaomiao committed
248 249 250
          @upDateQlrxxList="upDateYwrxxList"
          :disabled="viewEdit"
          :tableData="ruleForm.ywrList"
251
          :gyfs="ruleForm.sldy.gyfs" />
252 253 254 255 256 257
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col>
258 259 260 261 262 263 264 265 266 267 268
            <el-form-item v-if="ruleForm.sldy.djlx=='400'" label="注销登记原因:" prop="djyy">
              <el-input
                class="textArea"
                type="textarea"
                maxlength="500"
                show-word-limit
                :disabled="!viewEdit"
                v-model="ruleForm.ygdj.zxyy">
              </el-input>
            </el-form-item>
            <el-form-item v-else label="登记原因:" prop="djyy">
xiaomiao committed
269 270 271 272 273 274
              <el-input
                class="textArea"
                type="textarea"
                maxlength="500"
                show-word-limit
                :disabled="!viewEdit"
275
                v-model="ruleForm.ygdj.djyy">
276 277 278 279 280
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
281
      <el-row class="btn" v-if="isSave">
282
        <el-form-item>
283 284 285 286 287 288 289
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
290 291
  import ywmix from "@/views/ywbl/mixin/index";
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
292
  import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
293 294 295 296 297
  import { Init, saveData } from "@/api/workflow/ygdjFlow.js";
  import { mapGetters } from "vuex";
  export default {
    mixins: [ywmix],
    mounted () {
298
      let that = this
299 300
      this.viewEdit = this.$parent.currentSelectTab.ableOperation;
      this.propsParam = this.$attrs;
301
      this.loading = true
302 303 304 305 306
      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) => {
307 308 309
        setTimeout(() => {
          this.loading = false
        }, 200)
310 311 312
        if (res.code === 200 && res.result) {
          this.ruleForm = res.result;
          this.ruleForm.qlrList.forEach((item) => {
313 314 315
            item.id = item.bsmSqr
            if (item.sfczr == '1') {
              that.czr = item.bsmSqr
316 317
            }
          })
318 319 320 321 322 323 324 325 326
          that.czrOptions = this.ruleForm.qlrList
          that.isSave = that.viewEdit
        } else {
          that.isSave = false
          that.$confirm(res.message, '提示', {
            cancelButtonText: '取消',
            showConfirmButton: false,
            type: 'warning'
          })
327
        }
328 329 330
      }).catch(() => {
        this.isSave = false
        this.loading = false
331
      })
332
    },
333
    components: { qlrCommonTable, ywrCommonTable },
334
    computed: {
335
      ...mapGetters(["dictData", "flag"])
336
    },
337 338
    data () {
      return {
339
        isSave: true,
340
        loading: false,
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
        mjdw: "1",
        //表单是否可操作
        viewEdit: true,
        disabled: true,
        tdytOption: [],
        czrOptions: [],
        czr: "",
        ruleForm: {
          qlxx: {},
          sldy: {},
          slsq: {},
          ygdj: {},
          zdjbxx: {},
        },
        //传递参数
        propsParam: this.$attrs,
357 358
        rules: {}
      }
359
    },
360 361 362 363 364 365 366 367 368
    methods: {
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateQlrxxList (val) {
        this.ruleForm.qlrList = _.cloneDeep(val);
        this.czrOptions = this.ruleForm.qlrList;
369 370
        this.num = 0
        this.ruleForm.qlrList.forEach(item => {
371
          if (item.id == this.czr) {
372 373 374 375
            this.num++
          }
        })
        if (this.num == 0) {
376 377
          this.czr = ''
        }
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401
      },
      /**
       * @description: 更新业务人信息
       * @param {*} val
       * @author: renchao
       */
      upDateYwrxxList (val) {
        this.ruleForm.ywrList = _.cloneDeep(val);
      },
      /**
       * @description: 是否持证人变化
       * @param {*} val
       * @author: renchao
       */
      updaterow () {
        this.czr = "";
      },
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        let that = this;
        if (this.ruleForm.qlrList.length == 0) {
xiaomiao committed
402 403
          this.$message({
            showClose: true,
404
            message: "请确认权利人信息",
xiaomiao committed
405 406 407 408
            type: "error",
          });
          return false;
        }
409 410 411 412 413 414 415 416 417 418 419

        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";
420
        } else {
421 422
          if (this.ruleForm.qlrList.length <= 1) {
            this.$message({
423
              showClose: true,
424 425
              message:
                "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
426 427 428 429
              type: "error",
            });
            return false;
          }
430 431 432 433
          //是否分别持证
          if (this.ruleForm.sldy.sqfbcz == "1") {
            //是
            this.ruleForm.qlrList.forEach((item, index) => {
434
              item.sfczr = "1";
435 436
            });
          } else {
437
            if (that.czr === '') {
438 439 440
              that.$message({
                showClose: true,
                message: "请选择持证人",
441
                type: "error"
442 443
              });
              return false;
444
            }
445
            this.ruleForm.qlrList.forEach((item, index) => {
446 447
              if (item.id == that.czr) {
                item.sfczr = "1"
448
              } else {
449
                item.sfczr = "0"
450
              }
451
            })
452
          }
xiaomiao committed
453
        }
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470
        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",
            });
          }
        });
      },
471
    },
472
  };
473
</script>
xiaomiao committed
474
<style scoped lang="scss">
475
  @import "~@/styles/public.scss";
476

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

483 484 485
  /deep/.el-form-item__label {
    padding: 0;
  }
486

487 488 489
  /deep/.el-radio {
    margin-right: 10px;
  }
490

491 492 493
  /deep/.el-select {
    width: 100%;
  }
494

495 496 497
  /deep/.el-form-item {
    margin-bottom: 8px;
  }
498

499 500 501
  .marginBot0 {
    margin-bottom: 0 !important;
  }
502

503 504 505
  .slxx {
    box-sizing: border-box;
  }
506

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

516 517 518
  .submit_btn {
    height: 50px;
  }
519

520 521 522 523 524 525 526 527 528 529
  .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;
  }
530

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

539 540 541 542
  .textArea {
    /deep/.el-textarea__inner {
      min-height: 90px !important;
    }
543 544
  }

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