Blame view

src/views/ywbl/slsqxx/ygdj/slxx300.vue 13.8 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="业务号:">
20
              <el-input disabled v-model="ruleForm.slsq.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="权利类型:">
37
              <el-input disabled v-model="ruleForm.slsq.qllxmc"></el-input>
38 39 40
            </el-form-item>
          </el-col>
          <el-col :span="8">
41
            <el-form-item label="登记类型:">
42
              <el-input disabled v-model="ruleForm.slsq.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
            </el-form-item>
          </el-col>
        </el-row>
51
        <div
xiaomiao committed
52
          class="slxx_title title-block flex"
53
          style="justify-content: space-between">
xiaomiao committed
54 55
          不动产单元情况
          <el-button @click="compare">变化情况对比+</el-button>
56
        </div>
57
        <el-row :gutter="10" v-if="ruleForm.qlxx">
58
          <el-col :span="8">
59
            <el-form-item label="不动产单元号:">
60 61 62 63
              <el-input disabled v-model="ruleForm.qlxx.bdcdyh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="16">
64
            <el-form-item label="坐落:">
65
              <el-input disabled v-model="ruleForm.sldy.zl"></el-input>
66 67 68 69 70
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
71 72
            <el-form-item label="预告登记种类:">
              <el-input disabled v-model="ruleForm.ygdj.ygdjzlmc"></el-input>
73 74 75
            </el-form-item>
          </el-col>
          <el-col :span="8">
76 77
            <el-form-item label="规划用途:">
              <el-input disabled v-model="ruleForm.ygdj.ytmc"></el-input>
78 79 80
            </el-form-item>
          </el-col>
          <el-col :span="8">
81 82
            <el-form-item label="房屋性质:">
              <el-input disabled v-model="ruleForm.ygdj.fwxzmc"></el-input>
83 84 85
            </el-form-item>
          </el-col>
        </el-row>
86
        <el-row :gutter="10" v-if="ruleForm.qlxx">
87
          <el-col :span="8">
88 89
            <el-form-item label="房屋结构:">
              <el-input disabled v-model="ruleForm.ygdj.fwjgmc"></el-input>
90 91
            </el-form-item>
          </el-col>
92
          <el-col :span="8">
93 94
            <el-form-item label="建筑面积:">
              <el-input disabled v-model="ruleForm.ygdj.jzmj"></el-input>
95 96 97
            </el-form-item>
          </el-col>
          <el-col :span="8">
98 99
            <el-form-item label="取得价格:">
              <el-input disabled v-model="ruleForm.ygdj.qdjg"></el-input>
100 101 102
            </el-form-item>
          </el-col>
        </el-row>
103
        <el-row :gutter="10">
104
          <el-col :span="8">
105
            <el-form-item label="所在层:">
106 107 108 109
              <el-input disabled v-model="ruleForm.ygdj.szc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
110
            <el-form-item label="总层数:">
xiaomiao committed
111 112 113
              <el-input
                disabled
                v-model.number="ruleForm.ygdj.zcs"
114
                oninput="value=value.replace(/[^0-9]/g,'')"></el-input>
115
            </el-form-item>
116 117
          </el-col>
        </el-row>
118 119 120 121 122
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
123
          <el-col :span="12" v-if="ruleForm.qlxx">
124
            <el-form-item label="共有方式:">
xiaomiao committed
125 126
              <el-radio-group
                :disabled="!viewEdit"
127
                v-model="ruleForm.sldy.gyfs">
128 129 130 131 132 133 134
                <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>
135 136 137 138
          <el-col :span="6" v-show="ruleForm.sldy.gyfs != '0'">
            <el-form-item label="是否分别持证:">
              <el-radio-group
                v-model="ruleForm.sldy.sqfbcz"
xiaomiao committed
139
                :disabled="!viewEdit"
140
                @input="updaterow()">
141 142 143 144 145 146 147
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col
            :span="6"
148
            v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
149 150
            <el-form-item label="持证人:">
              <el-select
xiaomiao committed
151
                v-model="czr"
152
                placeholder="持证人"
153
                :disabled="!viewEdit">
154
                <el-option
155 156
                  v-for="(item,index) in czrOptions"
                  :key="index"
157
                  :label="item.sqrmc"
158
                  :value="item.id">
159 160 161 162
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
163
        </el-row>
xiaomiao committed
164 165 166 167
        <qlrCommonTable
          @upDateQlrxxList="upDateQlrxxList"
          :tableData="ruleForm.qlrList"
          :disabled="viewEdit"
168
          :gyfs="ruleForm.sldy.gyfs" />
169 170 171 172
        <div class="slxx_title title-block">
          义务人信息
          <div class="triangle"></div>
        </div>
173
        <ywrCommonTable
xiaomiao committed
174 175 176
          @upDateQlrxxList="upDateYwrxxList"
          :tableData="ruleForm.ywrList"
          :disabled="viewEdit"
177
          :gyfs="ruleForm.sldy.gyfs" />
178 179 180 181 182 183
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col>
184
            <el-form-item label="登记原因:" prop="djyy">
xiaomiao committed
185 186 187 188 189 190
              <el-input
                class="textArea"
                type="textarea"
                maxlength="500"
                show-word-limit
                :disabled="!viewEdit"
191
                v-model="ruleForm.ygdj.djyy">
192 193 194 195 196
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
197
      <el-row class="btn" v-if="isSave">
198
        <el-form-item>
199 200 201 202 203 204 205
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
206 207
  import ywmix from "@/views/ywbl/mixin/index";
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
208
  import ywrCommonTable from "@/views/workflow/components/ywrCommonTable";
209 210 211 212 213
  import { Init, saveData } from "@/api/workflow/ygdjFlow.js";
  import { mapGetters } from "vuex";
  export default {
    mixins: [ywmix],
    mounted () {
214
      let that = this
215 216 217
      this.viewEdit = this.$parent.currentSelectTab.ableOperation;
      this.propsParam = this.$attrs;
      var formdata = new FormData();
218
      this.loading = true
219 220 221 222
      formdata.append("bsmSldy", this.propsParam.bsmSldy);
      formdata.append("djlx", this.propsParam.djlx);
      formdata.append("isEdit", this.viewEdit);
      Init(formdata).then((res) => {
223 224 225
        setTimeout(() => {
          that.loading = false
        }, 200)
226
        if (res.code === 200 && res.result) {
227 228 229 230 231
          that.ruleForm = res.result;
          that.ruleForm.qlrList.forEach((item) => {
            item.id = item.bsmSqr
            if (item.sfczr == '1') {
              that.czr = item.bsmSqr
232
            }
233
          })
234 235
          that.czrOptions = this.ruleForm.qlrList;
          that.isSave = that.viewEdit
236
        } else {
237 238 239 240 241 242
          that.isSave = false
          that.$confirm(res.message, '提示', {
            cancelButtonText: '取消',
            showConfirmButton: false,
            type: 'warning'
          })
243
        }
244 245 246
      }).catch(() => {
        that.isSave = false
        that.loading = false
247
      })
248
    },
249
    components: { qlrCommonTable, ywrCommonTable },
250 251
    computed: {
      ...mapGetters(["dictData", "flag"]),
252
    },
253 254
    data () {
      return {
255 256
        isSave: true,
        loading: false,
257 258 259 260 261 262 263 264 265 266 267
        //表单是否可操作
        viewEdit: true,
        disabled: true,
        tdytOption: [],
        czrOptions: [],
        czr: "",
        ruleForm: {},
        //传递参数
        propsParam: this.$attrs,
        rules: {},
      };
xiaomiao committed
268
    },
269 270 271 272 273 274 275 276 277 278 279
    methods: {
      /**
       * @description: onClick
       * @author: renchao
       */
      onClick () {
        this.$popup("房屋信息比对", "ywbl/ygdj/slxxCompareDetai", {
          formData: {
            bsmSldy: this.propsParam.bsmSldy,
            qllx: this.propsParam.qllx,
          },
xiaomiao committed
280
        });
281 282 283 284 285 286 287 288 289
      },
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateQlrxxList (val) {
        this.ruleForm.qlrList = _.cloneDeep(val);
        this.czrOptions = this.ruleForm.qlrList;
290 291
        this.num = 0
        this.ruleForm.qlrList.forEach(item => {
292
          if (item.id == this.czr) {
293 294 295 296
            this.num++
          }
        })
        if (this.num == 0) {
297 298
          this.czr = ''
        }
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
      },
      /**
       * @description: 是否持证人变化
       * @param {*} val
       * @author: renchao
       */
      updaterow () {
        this.czr = "";
      },
      /**
       * @description: 更新业务人信息
       * @param {*} val
       * @author: renchao
       */
      upDateYwrxxList (val) {
        this.ruleForm.ywrList = _.cloneDeep(val);
      },
316

317 318 319 320 321 322 323
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        let that = this;
        if (this.ruleForm.qlrList.length == 0) {
324 325
          this.$message({
            showClose: true,
326
            message: "请确认权利人信息",
327 328 329 330
            type: "error",
          });
          return false;
        }
331 332 333 334 335 336 337 338 339 340 341

        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";
342
        } else {
343 344
          if (this.ruleForm.qlrList.length <= 1) {
            this.$message({
345
              showClose: true,
346 347
              message:
                "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
348 349 350 351
              type: "error",
            });
            return false;
          }
352 353 354 355
          //是否分别持证
          if (this.ruleForm.sldy.sqfbcz == "1") {
            //是
            this.ruleForm.qlrList.forEach((item, index) => {
356
              item.sfczr = "1";
357 358
            });
          } else {
359
            if (that.czr === '') {
360 361 362
              that.$message({
                showClose: true,
                message: "请选择持证人",
363
                type: "error"
364 365
              });
              return false;
366
            }
367
            this.ruleForm.qlrList.forEach((item, index) => {
368 369
              if (item.id == that.czr) {
                item.sfczr = "1"
370
              } else {
371
                item.sfczr = "0"
372
              }
373
            })
374
          }
xiaomiao committed
375
        }
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
        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",
            });
          }
        });
      },
      /**
       * @description: compare
       * @author: renchao
       */
      compare () {
        this.$popupDialog(
          this.ruleForm.qlxx.qllxmc,
          "registerBook/comparison",
          {
            bsmQlxx: this.ruleForm.qlxx.bsmQlxx,
            dqqllx: "YGDJ",
          },
          "80%",
          true
        );
      },
409
    },
410
  };
411
</script>
xiaomiao committed
412
<style scoped lang="scss">
413
  @import "~@/styles/public.scss";
414

415 416 417 418 419
  /deep/.el-form {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
  }
420

421 422 423
  /deep/.el-form-item__label {
    padding: 0;
  }
424

425 426 427
  /deep/.el-radio {
    margin-right: 10px;
  }
428

429 430 431
  /deep/.el-select {
    width: 100%;
  }
432

433
  /deep/.el-form-item {
434
    margin-bottom: 3px;
435
  }
436

437 438 439
  .marginBot0 {
    margin-bottom: 0 !important;
  }
440

441 442 443
  .slxx {
    box-sizing: border-box;
  }
444

445 446 447 448 449 450 451 452
  .slxx_con {
    flex: 1;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
    padding-right: 3px;
    overflow-x: hidden;
  }
453

454 455 456
  .submit_btn {
    height: 50px;
  }
457

458 459 460 461 462 463 464
  .btn {
    text-align: center;
    padding-top: 10px;
    height: 36px;
    background-color: #ffffff;
    padding: 5px 0;
  }
465

466 467 468 469
  .textArea {
    /deep/.el-textarea__inner {
      min-height: 90px !important;
    }
470 471
  }

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