Blame view

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

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

          <el-col :span="5" v-show="ruleForm.gyfs != '1'">
185
            <el-form-item label="是否分别持证:">
xiaomiao committed
186 187 188 189 190
              <el-radio-group
                v-model="ruleForm.sffbcz"
                :disabled="!viewEdit"
                @input="updaterow()"
              >
任超 committed
191 192 193 194 195
                <el-radio label="1"></el-radio>
                <el-radio label="0"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
xiaomiao committed
196 197 198 199
          <el-col
            :span="5"
            v-show="ruleForm.gyfs != '1' && ruleForm.sffbcz == '0'"
          >
200
            <el-form-item label="持证人:">
xiaomiao committed
201 202 203 204 205 206 207 208 209 210 211
              <el-select
                v-model="czr"
                placeholder="持证人"
                :disabled="!viewEdit"
              >
                <el-option
                  v-for="item in czrOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
任超 committed
212 213 214
                </el-option>
              </el-select>
            </el-form-item>
任超 committed
215 216
          </el-col>
        </el-row>
xiaomiao committed
217 218 219 220 221
        <qlrCommonTable
          :tableData="ruleForm.qlrList"
          :gyfs="ruleForm.gyfs"
          :disabled="viewEdit"
        />
任超 committed
222 223 224 225
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
任超 committed
226 227
        <el-row :gutter="10">
          <el-col>
228
            <el-form-item label="登记原因:" prop="djyy">
xiaomiao committed
229 230 231 232 233 234 235 236
              <el-input
                class="textArea"
                type="textarea"
                maxlength="500"
                show-word-limit
                :disabled="!viewEdit"
                v-model="ruleForm.djyy"
              >
任超 committed
237
              </el-input>
任超 committed
238 239 240 241
            </el-form-item>
          </el-col>
        </el-row>
      </div>
242
      <el-row class="btn" v-if="viewEdit">
243
        <el-form-item>
任超 committed
244 245
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
任超 committed
246 247 248 249 250
      </el-row>
    </el-form>
  </div>
</template>
<script>
xiaomiao committed
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 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 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
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() {
    this.viewEdit = this.$parent.currentSelectTab.ableOperation;
    this.propsParam = this.$attrs;
    var formdata = new FormData();
    formdata.append("bsmSldy", this.propsParam.bsmSldy);
    Init(formdata).then((res) => {
      if (res.code === 200 && res.result) {
        this.ruleForm = {
          ...res.result,
          ...res.result.zdjbxxdatas,
          ...res.result.qlxxdatas,
          ...res.result.jsydsyqdatas,
        };
        this.ruleForm.qlrList.forEach((item) => {
          if (item.sfczr == 1) {
            this.czr = item.sqrmc;
          }
        });
        this.czrOptions = this.ruleForm.qlrList;
      }
    });
  },
  components: { qlrCommonTable, tdytTable },
  computed: {
    ...mapGetters(["dictData", "flag"]),
  },
  data() {
    return {
      //表单是否可操作
      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++;
    },
    // 是否持证人变化
    /**
     * @description: 是否持证人变化
     * @param {*} val
     * @author: renchao
     */
    updaterow() {
      this.czr = "";
    },
    /**
     * @description: list
     * @param {*} bsmSldy
     * @author: renchao
     */
    list(bsmSldy) {
任超 committed
356
      var formdata = new FormData();
xiaomiao committed
357 358
      formdata.append("bsmSldy", bsmSldy);
      formdata.append("isEdit", this.viewEdit);
jiaozeping@pashanhoo.com committed
359
      Init(formdata).then((res) => {
任超 committed
360
        if (res.code === 200 && res.result) {
361 362 363 364 365 366
          this.ruleForm = {
            ...res.result,
            ...res.result.zdjbxxdatas,
            ...res.result.qlxxdatas,
            ...res.result.jsydsyqdatas,
          };
liangyifan committed
367
        }
368
      });
liangyifan committed
369
    },
xiaomiao committed
370 371 372 373 374 375 376 377 378 379 380 381
    /**
     * @description: onSubmit
     * @author: renchao
     */
    onSubmit() {
      let that = this;
      let arr = this.ruleForm.tdytqxList.filter((item) => !item.yt);
      if (arr.length > 0) {
        this.$message({
          showClose: true,
          message: "土地用途不能为空",
          type: "error",
382
        });
xiaomiao committed
383 384 385 386 387 388 389 390 391 392 393 394 395
        return false;
      }
      if (this.ruleForm.qlrList.length == 0) {
        this.$message({
          showClose: true,
          message: "请确认权利人信息",
          type: "error",
        });
        return false;
      }

      if (this.ruleForm.gyfs == "0") {
        if (this.ruleForm.qlrList.length > 1) {
396 397
          this.$message({
            showClose: true,
xiaomiao committed
398
            message: "共有方式:单独所有,权利人只能是一个人",
399 400 401 402
            type: "error",
          });
          return false;
        }
xiaomiao committed
403 404 405
        this.ruleForm.qlrList[0].sfczr = "1";
      } else {
        if (this.ruleForm.qlrList.length <= 1) {
406 407
          this.$message({
            showClose: true,
xiaomiao committed
408 409
            message:
              "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
410 411 412 413
            type: "error",
          });
          return false;
        }
xiaomiao committed
414 415 416 417 418 419
        //是否分别持证
        if (this.ruleForm.sqfbcz == "1") {
          //是
          this.ruleForm.qlrList.forEach((item, index) => {
            item.sfczr = "1";
          });
420
        } else {
xiaomiao committed
421 422
          if (!that.czr) {
            that.$message({
423
              showClose: true,
xiaomiao committed
424
              message: "请选择持证人",
425 426 427 428
              type: "error",
            });
            return false;
          }
xiaomiao committed
429 430
          this.ruleForm.qlrList.forEach((item, index) => {
            if (item.zjh == this.czr) {
431
              item.sfczr = "1";
xiaomiao committed
432 433
            } else {
              item.sfczr = "0";
434
            }
xiaomiao committed
435
          });
436
        }
437
      }
xiaomiao committed
438 439 440 441 442 443 444 445 446
      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 }
        }
      });
    },
  },
};
任超 committed
447
</script>
xiaomiao committed
448 449
<style scoped lang="scss">
@import "~@/styles/public.scss";
任超 committed
450

xiaomiao committed
451 452 453 454 455
/deep/.el-form {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 130px);
}
任超 committed
456

xiaomiao committed
457 458 459
/deep/.el-form-item__label {
  padding: 0;
}
任超 committed
460

xiaomiao committed
461 462 463
/deep/.el-radio {
  margin-right: 10px;
}
任超 committed
464

xiaomiao committed
465 466 467
/deep/.el-select {
  width: 100%;
}
任超 committed
468

xiaomiao committed
469 470 471
/deep/.el-form-item {
  margin-bottom: 8px;
}
任超 committed
472

xiaomiao committed
473 474 475
.marginBot0 {
  margin-bottom: 0 !important;
}
任超 committed
476

xiaomiao committed
477 478 479
.slxx {
  box-sizing: border-box;
}
任超 committed
480

xiaomiao committed
481 482 483 484 485 486 487 488
.slxx_con {
  flex: 1;
  height: 100%;
  background-color: #ffffff;
  overflow-y: auto;
  padding-right: 3px;
  overflow-x: hidden;
}
任超 committed
489

xiaomiao committed
490 491 492
.submit_btn {
  height: 50px;
}
任超 committed
493

xiaomiao committed
494 495 496 497 498 499 500 501 502 503
.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;
}
任超 committed
504

xiaomiao committed
505 506 507 508 509 510 511
.btn {
  text-align: center;
  padding-top: 10px;
  height: 36px;
  background-color: #ffffff;
  padding: 5px 0;
}
任超 committed
512

xiaomiao committed
513 514 515
.textArea {
  /deep/.el-textarea__inner {
    min-height: 90px !important;
1  
liangyifan committed
516
  }
xiaomiao committed
517
}
任超 committed
518

xiaomiao committed
519 520 521
/deep/.el-form-item__label {
  padding-bottom: 0px;
}
522
</style>