Blame view

src/views/ywbl/slsqxx/fwsyq/slxx.vue 15.9 KB
1
<!--
xiaomiao committed
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-09-20 14:27:29
5
-->
任超 committed
6
<template>
任超 committed
7
  <!-- 受理信息 -->
jiaozeping@pashanhoo.com committed
8
  <div class="slxx">
xiaomiao committed
9 10 11 12
    <el-form
      :model="ruleForm"
      :rules="rules"
      ref="ruleForm"
13
      v-Loading="loading"
xiaomiao committed
14 15
      :label-position="flag ? 'top' : ''"
      :inline="flag"
16
      label-width="120px">
17
      <div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
任超 committed
18
        <div class="slxx_title title-block">
19
          申请业务信息
任超 committed
20 21
          <div class="triangle"></div>
        </div>
任超 committed
22 23
        <el-row :gutter="10">
          <el-col :span="8">
24
            <el-form-item label="业务号:" prop="ywh">
任超 committed
25
              <el-input disabled v-model="ruleForm.ywh"></el-input>
任超 committed
26 27 28
            </el-form-item>
          </el-col>
          <el-col :span="8">
29
            <el-form-item label="受理人员:" prop="slry">
任超 committed
30
              <el-input disabled v-model="ruleForm.slry"></el-input>
任超 committed
31 32 33
            </el-form-item>
          </el-col>
          <el-col :span="8">
34
            <el-form-item label="受理时间:" prop="slsj">
任超 committed
35
              <el-input disabled v-model="ruleForm.slsj"></el-input>
任超 committed
36 37 38 39 40
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
41
            <el-form-item label="权利类型:" prop="qllx">
xiaomiao committed
42 43 44 45 46
              <el-select
                disabled
                v-model="ruleForm.qllx"
                filterable
                clearable
47
                placeholder="请选择权利类型">
xiaomiao committed
48 49 50 51
                <el-option
                  v-for="item in dictData['A8']"
                  :key="item.dcode"
                  :label="item.dname"
52
                  :value="item.dcode">
任超 committed
53 54 55 56 57
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
58
            <el-form-item label="登记类型:" prop="djlx">
xiaomiao committed
59 60 61 62 63
              <el-select
                disabled
                v-model="ruleForm.djlx"
                filterable
                clearable
64
                placeholder="请选择登记类型">
xiaomiao committed
65 66 67 68
                <el-option
                  v-for="item in dictData['A21']"
                  :key="item.dcode"
                  :label="item.dname"
69
                  :value="item.dcode">
任超 committed
70 71 72 73 74
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
75
            <el-form-item label="登记情形:" prop="djqx">
任超 committed
76
              <el-input disabled v-model="ruleForm.djqxmc"></el-input>
任超 committed
77 78 79
            </el-form-item>
          </el-col>
        </el-row>
任超 committed
80 81 82 83
        <div class="slxx_title title-block">
          不动产单元情况
          <div class="triangle"></div>
        </div>
任超 committed
84 85
        <el-row :gutter="10">
          <el-col :span="8">
86
            <el-form-item label="宗地代码:" prop="zddm">
87
              <el-input disabled v-model="ruleForm.bdcdyh"></el-input>
任超 committed
88 89 90
            </el-form-item>
          </el-col>
          <el-col :span="8">
91
            <el-form-item label="不动产单元号:" prop="bdcdyh">
任超 committed
92
              <el-input disabled v-model="ruleForm.bdcdyh"></el-input>
任超 committed
93 94 95
            </el-form-item>
          </el-col>
          <el-col :span="8">
96
            <el-form-item label="权利性质:" prop="qlxzmc">
97
              <el-input disabled v-model="ruleForm.qlxzmc"></el-input>
任超 committed
98 99 100 101 102
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
103
            <el-form-item label="自然幢号:" prop="zrzh">
104
              <el-input disabled v-model="ruleForm.zrzDetail.zrzh"></el-input>
任超 committed
105 106 107
            </el-form-item>
          </el-col>
          <el-col :span="8">
108
            <el-form-item label="户不动产单元号:" prop="ghytmc">
109
              <el-input disabled v-model="ruleForm.ghytmc"></el-input>
任超 committed
110 111 112
            </el-form-item>
          </el-col>
          <el-col :span="8">
113
            <el-form-item label="登记状态:" prop="djzt">
任超 committed
114
              <el-select disabled v-model="ruleForm.djzt" filterable clearable>
xiaomiao committed
115 116 117 118
                <el-option
                  v-for="item in djztList"
                  :key="item.value"
                  :label="item.label"
119
                  :value="item.value">
任超 committed
120 121 122 123 124 125 126
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
127
            <el-form-item label="图幅丘幢号:" prop="tfqzh">
任超 committed
128
              <el-input disabled v-model="ruleForm.tfqzh"></el-input>
任超 committed
129 130
            </el-form-item>
          </el-col>
jiaozeping@pashanhoo.com committed
131

任超 committed
132
          <el-col :span="16">
133
            <el-form-item label="坐落:" prop="zl">
任超 committed
134
              <el-input disabled v-model="ruleForm.zl"></el-input>
任超 committed
135 136 137 138 139
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
140
            <el-form-item label="房屋用途:">
141
              <el-input disabled v-model="ruleForm.ytmc"></el-input>
任超 committed
142 143
            </el-form-item>
          </el-col>
任超 committed
144
          <el-col :span="8">
145
            <el-form-item label="房屋性质:">
任超 committed
146
              <el-input disabled v-model="ruleForm.fwxz"></el-input>
任超 committed
147 148
            </el-form-item>
          </el-col>
任超 committed
149
          <el-col :span="8">
150
            <el-form-item label="房屋结构:">
任超 committed
151
              <el-input disabled v-model="ruleForm.fwjg"></el-input>
任超 committed
152 153 154
            </el-form-item>
          </el-col>
        </el-row>
155
        <div class="slxx_title title-block">
xiaomiao committed
156 157 158 159
          土地用途
          <div class="triangle"></div>
        </div>
        <tdytTable
160
          :ableOperation="viewEdit"
xiaomiao committed
161
          :tableData="ruleForm.tdytqxList"
162
          @upDateTdytxxList="upDateTdytxxList" />
任超 committed
163 164 165 166
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
任超 committed
167
        <el-row :gutter="10">
任超 committed
168
          <el-col :span="14">
169
            <el-form-item label="共有方式:">
170
              <el-radio-group :disabled="!viewEdit" v-model="ruleForm.gyfs">
任超 committed
171 172 173
                <el-radio label="1">单独所有</el-radio>
                <el-radio label="2">共同共有</el-radio>
                <el-radio label="3">按份所有</el-radio>
任超 committed
174 175 176
              </el-radio-group>
            </el-form-item>
          </el-col>
177 178

          <el-col :span="5" v-show="ruleForm.gyfs != '1'">
179
            <el-form-item label="是否分别持证:">
xiaomiao committed
180 181 182
              <el-radio-group
                v-model="ruleForm.sffbcz"
                :disabled="!viewEdit"
183
                @input="updaterow()">
任超 committed
184 185 186 187 188
                <el-radio label="1"></el-radio>
                <el-radio label="0"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
xiaomiao committed
189 190
          <el-col
            :span="5"
191
            v-show="ruleForm.gyfs != '0' && ruleForm.sffbcz == '0'">
192
            <el-form-item label="持证人:">
xiaomiao committed
193 194 195
              <el-select
                v-model="czr"
                placeholder="持证人"
196
                :disabled="!viewEdit">
xiaomiao committed
197
                <el-option
198 199 200 201
                  v-for="(item,index) in czrOptions"
                  :key="index"
                  :label="item.sqrmc"
                  :value="item.id">
任超 committed
202 203 204
                </el-option>
              </el-select>
            </el-form-item>
任超 committed
205 206
          </el-col>
        </el-row>
xiaomiao committed
207 208
        <qlrCommonTable
          :tableData="ruleForm.qlrList"
209
          @upDateQlrxxList="upDateQlrxxList"
xiaomiao committed
210
          :gyfs="ruleForm.gyfs"
211
          :disabled="viewEdit" />
任超 committed
212 213 214 215
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
任超 committed
216 217
        <el-row :gutter="10">
          <el-col>
218
            <el-form-item label="登记原因:" prop="djyy">
xiaomiao committed
219 220 221 222 223 224
              <el-input
                class="textArea"
                type="textarea"
                maxlength="500"
                show-word-limit
                :disabled="!viewEdit"
225
                v-model="ruleForm.djyy">
任超 committed
226
              </el-input>
任超 committed
227 228 229 230
            </el-form-item>
          </el-col>
        </el-row>
      </div>
231
      <el-row class="btn" v-if="isSave">
232
        <el-form-item>
任超 committed
233 234
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
任超 committed
235 236 237 238 239
      </el-row>
    </el-form>
  </div>
</template>
<script>
240 241 242 243 244 245 246 247
  import ywmix from "@/views/ywbl/mixin/index";
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
  import tdytTable from "@/views/workflow/components/tdytTable";
  import { Init } from "@/api/workflow/fwsyqFlow.js";
  import { mapGetters } from "vuex";
  export default {
    mixins: [ywmix],
    mounted () {
248
      let that = this
249
      this.loading = true
250 251
      this.viewEdit = this.$parent.currentSelectTab.ableOperation;
      this.propsParam = this.$attrs;
任超 committed
252
      var formdata = new FormData();
253
      formdata.append("bsmSldy", this.propsParam.bsmSldy);
jiaozeping@pashanhoo.com committed
254
      Init(formdata).then((res) => {
255 256 257
        setTimeout(() => {
          this.loading = false
        }, 200)
任超 committed
258
        if (res.code === 200 && res.result) {
259 260 261 262 263 264
          this.ruleForm = {
            ...res.result,
            ...res.result.zdjbxxdatas,
            ...res.result.qlxxdatas,
            ...res.result.jsydsyqdatas,
          };
265
          this.ruleForm.qlrList.forEach((item) => {
266 267 268
            item.id = item.bsmSqr
            if (item.sfczr == '1') {
              that.czr = item.bsmSqr
269 270 271
            }
          });
          this.czrOptions = this.ruleForm.qlrList;
272
          that.isSave = this.viewEdit
273
        } else {
274 275 276 277 278 279
          that.isSave = false
          that.$confirm(res.message, '提示', {
            cancelButtonText: '取消',
            showConfirmButton: false,
            type: 'warning'
          })
liangyifan committed
280
        }
281 282
      }).catch(() => {
        this.loading = false
283
        this.isSave = false
284
      })
liangyifan committed
285
    },
286 287 288 289 290 291
    components: { qlrCommonTable, tdytTable },
    computed: {
      ...mapGetters(["dictData", "flag"]),
    },
    data () {
      return {
292
        isSave: true,
293 294 295 296 297 298 299 300 301 302 303
        // 键名转换,方法默认是label和children进行树状渲染
        normalizer (node) {
          //方法
          if (node.children == null || node.children == "null") {
            delete node.children;
          }
          return {
            id: node.dcode,
            label: node.dname,
          };
        },
304
        loading: false,
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
        //表单是否可操作
        viewEdit: false,
        disabled: true,
        tdytOption: [],
        czrOptions: [],
        czr: "",
        ruleForm: {
          ywh: "",
          slry: "",
          slsj: "",
          qllx: "",
          djlx: "",
          djqx: "",
          // 宗地代码
          zddm: "",
          bdcdyh: "",
          qlxzmc: "",
          qlrxx: [],
          // 自然幢号
          zrzh: "",
          // 户不动产单元号
          ghytmc: "",
          djzt: "",
          // 图幅丘幢号
          tfqzh: "",
          zl: "",
          // 房屋用途
          fwyt: "",
          fwxz: "",
          fwjg: "",
          // 权利人信息
          gyfs: "1",
          // 是否分别持证
          sffbcz: "",
          // 持证人
          czr: "",
          djyy: "",
        },
        //传递参数
        propsParam: {},
        rules: {},
      };
    },
    methods: {
      /**
       * @description: 更新土地用途信息
       * @param {*} val
       * @author: renchao
       */
      upDateTdytxxList (val) {
        this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
        this.czrOptions = this.ruleForm.qlrData;
        this.key++;
      },
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateQlrxxList (val) {
        if (!_.isEqual(val, this.ruleForm.qlrList)) {
          this.ruleForm.qlrList = _.cloneDeep(val);
          this.czrOptions = this.ruleForm.qlrList;
        }
        this.num = 0
        this.ruleForm.qlrList.forEach(item => {
          if (item.id == this.czr) {
            this.num++
          }
        })
        if (this.num == 0) {
          this.czr = ''
        }
      },
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
      /**
       * @description: 是否持证人变化
       * @param {*} val
       * @author: renchao
       */
      updaterow () {
        this.czr = "";
      },
      /**
       * @description: list
       * @param {*} bsmSldy
       * @author: renchao
       */
      list (bsmSldy) {
        var formdata = new FormData();
        formdata.append("bsmSldy", bsmSldy);
        formdata.append("isEdit", this.viewEdit);
        Init(formdata).then((res) => {
          if (res.code === 200 && res.result) {
            this.ruleForm = {
              ...res.result,
              ...res.result.zdjbxxdatas,
              ...res.result.qlxxdatas,
              ...res.result.jsydsyqdatas,
            };
404 405
          } else {
            this.$message.error(res.message);
406
          }
xiaomiao committed
407
        });
408 409 410 411 412 413 414 415 416
      },
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        let that = this;
        let arr = this.ruleForm.tdytqxList.filter((item) => !item.yt);
        if (arr.length > 0) {
417 418
          this.$message({
            showClose: true,
419
            message: "土地用途不能为空",
420 421 422 423
            type: "error",
          });
          return false;
        }
424
        if (this.ruleForm.qlrList.length == 0) {
425 426
          this.$message({
            showClose: true,
427
            message: "请确认权利人信息",
428 429 430 431
            type: "error",
          });
          return false;
        }
432 433 434 435 436 437 438 439 440 441 442

        if (this.ruleForm.gyfs == "0") {
          if (this.ruleForm.qlrList.length > 1) {
            this.$message({
              showClose: true,
              message: "共有方式:单独所有,权利人只能是一个人",
              type: "error",
            });
            return false;
          }
          this.ruleForm.qlrList[0].sfczr = "1";
443
        } else {
444 445
          if (this.ruleForm.qlrList.length <= 1) {
            this.$message({
446
              showClose: true,
447 448
              message:
                "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
449 450 451 452
              type: "error",
            });
            return false;
          }
453 454 455 456
          //是否分别持证
          if (this.ruleForm.sqfbcz == "1") {
            //是
            this.ruleForm.qlrList.forEach((item, index) => {
457
              item.sfczr = "1";
458 459
            });
          } else {
460
            if (that.czr === '') {
461 462 463
              that.$message({
                showClose: true,
                message: "请选择持证人",
464 465
                type: "error"
              })
466
              return false;
467
            }
468
            this.ruleForm.qlrList.forEach((item, index) => {
469 470
              if (item.id == that.czr) {
                item.sfczr = "1"
471
              } else {
472
                item.sfczr = "0"
473
              }
474
            })
475
          }
xiaomiao committed
476
        }
477 478 479 480 481 482 483
        fristReg(this.ruleForm).then((res) => {
          if (res.code === 200 && res.result) {
            console.log(res);
            //this.ruleForm = { ...res.result, ...res.result.zdjbxxdatas, ...res.result.qlxxdatas, ...res.result.jsydsyqdatas }
          }
        });
      },
xiaomiao committed
484
    },
485
  };
任超 committed
486
</script>
xiaomiao committed
487
<style scoped lang="scss">
488
  @import "~@/styles/public.scss";
任超 committed
489

490 491 492 493 494
  /deep/.el-form {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
  }
任超 committed
495

496 497 498
  /deep/.el-form-item__label {
    padding: 0;
  }
任超 committed
499

500 501 502
  /deep/.el-radio {
    margin-right: 10px;
  }
任超 committed
503

504 505 506
  /deep/.el-select {
    width: 100%;
  }
任超 committed
507

508 509 510
  /deep/.el-form-item {
    margin-bottom: 8px;
  }
任超 committed
511

512 513 514
  .marginBot0 {
    margin-bottom: 0 !important;
  }
任超 committed
515

516 517 518
  .slxx {
    box-sizing: border-box;
  }
任超 committed
519

520 521 522 523 524 525 526 527
  .slxx_con {
    flex: 1;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
    padding-right: 3px;
    overflow-x: hidden;
  }
任超 committed
528

529 530 531
  .submit_btn {
    height: 50px;
  }
任超 committed
532

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

541 542 543 544
  .textArea {
    /deep/.el-textarea__inner {
      min-height: 90px !important;
    }
1  
liangyifan committed
545
  }
任超 committed
546

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