Blame view

src/views/ywbl/slsqxx/tdsyq/slxx.vue 17.5 KB
1
<!--
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-08-16 16:09:58
5 6 7 8
-->
<template>
  <!-- 受理信息 -->
  <div class="slxx">
xiaomiao committed
9 10 11 12 13 14 15
    <el-form
      :model="ruleForm"
      :rules="rules"
      class="loadingtext"
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
xiaomiao committed
16 17
      label-width="120px"
    >
18 19
      <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''">
        <div class="slxx_title title-block">
20
          申请业务信息
21 22 23 24
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="8">
xiaomiao committed
25
            <el-form-item label="业务号:">
26 27 28 29 30
              <el-input disabled v-model="ruleForm.flow.ywh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="受理人员:">
tianhaohao@pashanhoo.com committed
31
              <el-input disabled v-model="ruleForm.slsq.slry"></el-input>
32 33 34 35
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="受理时间:">
tianhaohao@pashanhoo.com committed
36
              <el-input disabled v-model="ruleForm.slsq.slsj"></el-input>
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <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="登记情形:">
tianhaohao@pashanhoo.com committed
53
              <el-input disabled v-model="ruleForm.slsq.djqxmc"></el-input>
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
          不动产单元情况
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="宗地代码:">
              <el-input disabled v-model="ruleForm.zdjbxx.zddm"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="不动产单元号:">
              <el-input disabled v-model="ruleForm.zdjbxx.bdcdyh"></el-input>
            </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-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="宗地面积:">
              <el-input disabled v-model="ruleForm.zdjbxx.zdmj"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
85 86
            <el-form-item label="权利设定方式:">
              <el-input disabled v-model="ruleForm.zdjbxx.qlsdfsmc"></el-input>
87 88 89 90 91
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
92
            <el-form-item label="农用地面积:">
93
              <div class="flex">
xiaomiao committed
94 95
                <el-input
                  v-model="ruleForm.tdsyq.nydmj"
96
                  :disabled="!viewEdit"
xiaomiao committed
97 98
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
                ></el-input>
xiaomiao committed
99 100
                <el-select
                  v-model="mjdw"
101
                  :disabled="!viewEdit"
xiaomiao committed
102 103
                  style="width: 68px"
                >
xiaomiao committed
104 105 106 107
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
xiaomiao committed
108 109
                    :value="item.dcode"
                  >
110 111 112
                  </el-option>
                </el-select>
              </div>
113 114
            </el-form-item>
          </el-col>
115 116
          <el-col :span="8">
            <el-form-item label="耕地面积:">
117
              <div class="flex">
xiaomiao committed
118 119
                <el-input
                  v-model="ruleForm.tdsyq.gdmj"
120
                  :disabled="!viewEdit"
xiaomiao committed
121 122
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
                ></el-input>
xiaomiao committed
123 124
                <el-select
                  v-model="mjdw"
125
                  :disabled="!viewEdit"
xiaomiao committed
126 127
                  style="width: 68px"
                >
xiaomiao committed
128 129 130 131
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
xiaomiao committed
132 133
                    :value="item.dcode"
                  >
134 135 136
                  </el-option>
                </el-select>
              </div>
137 138 139 140
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="林地面积:">
141
              <div class="flex">
xiaomiao committed
142 143
                <el-input
                  v-model="ruleForm.tdsyq.ldmj"
144
                  :disabled="!viewEdit"
xiaomiao committed
145 146
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
                ></el-input>
xiaomiao committed
147 148
                <el-select
                  v-model="mjdw"
149
                  :disabled="!viewEdit"
xiaomiao committed
150 151
                  style="width: 68px"
                >
xiaomiao committed
152 153 154 155
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
xiaomiao committed
156 157
                    :value="item.dcode"
                  >
158 159 160
                  </el-option>
                </el-select>
              </div>
161 162 163
            </el-form-item>
          </el-col>
        </el-row>
164
        <el-row :gutter="10">
165
          <el-col :span="8">
166
            <el-form-item label="草地面积:">
167
              <div class="flex">
xiaomiao committed
168 169
                <el-input
                  v-model="ruleForm.tdsyq.cdmj"
170
                  :disabled="!viewEdit"
xiaomiao committed
171 172
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
                ></el-input>
xiaomiao committed
173 174
                <el-select
                  v-model="mjdw"
175
                  :disabled="!viewEdit"
xiaomiao committed
176 177
                  style="width: 68px"
                >
xiaomiao committed
178 179 180 181
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
xiaomiao committed
182 183
                    :value="item.dcode"
                  >
184 185 186
                  </el-option>
                </el-select>
              </div>
187 188
            </el-form-item>
          </el-col>
189 190
          <el-col :span="8">
            <el-form-item label="其他农用地面积:">
191
              <div class="flex">
xiaomiao committed
192 193
                <el-input
                  v-model="ruleForm.tdsyq.qtnydmj"
194
                  :disabled="!viewEdit"
xiaomiao committed
195 196
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
                ></el-input>
xiaomiao committed
197 198
                <el-select
                  v-model="mjdw"
199
                  :disabled="!viewEdit"
xiaomiao committed
200 201
                  style="width: 68px"
                >
xiaomiao committed
202 203 204 205
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
xiaomiao committed
206 207
                    :value="item.dcode"
                  >
208 209 210
                  </el-option>
                </el-select>
              </div>
211 212
            </el-form-item>
          </el-col>
213 214
          <el-col :span="8">
            <el-form-item label="建筑使用面积:">
215
              <div class="flex">
xiaomiao committed
216 217
                <el-input
                  v-model="ruleForm.tdsyq.jsydmj"
218
                  :disabled="!viewEdit"
xiaomiao committed
219 220
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
                ></el-input>
xiaomiao committed
221 222
                <el-select
                  v-model="mjdw"
223
                  :disabled="!viewEdit"
xiaomiao committed
224 225
                  style="width: 68px"
                >
xiaomiao committed
226 227 228 229
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
xiaomiao committed
230 231
                    :value="item.dcode"
                  >
232 233 234
                  </el-option>
                </el-select>
              </div>
235 236
            </el-form-item>
          </el-col>
237 238 239 240
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="未利用地面积:">
241
              <div class="flex">
xiaomiao committed
242 243
                <el-input
                  v-model="ruleForm.tdsyq.wlydmj"
244
                  :disabled="!viewEdit"
xiaomiao committed
245 246
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
                ></el-input>
xiaomiao committed
247 248
                <el-select
                  v-model="mjdw"
249
                  :disabled="!viewEdit"
xiaomiao committed
250 251
                  style="width: 68px"
                >
xiaomiao committed
252 253 254 255
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
xiaomiao committed
256 257
                    :value="item.dcode"
                  >
258 259 260
                  </el-option>
                </el-select>
              </div>
261 262
            </el-form-item>
          </el-col>
263
        </el-row>
264
        <div class="slxx_title title-block">
xiaomiao committed
265 266 267 268 269
          土地用途
          <div class="triangle"></div>
        </div>
        <tdytTable
          :tableData="ruleForm.tdytqxList"
270
          :ableOperation="viewEdit"
xiaomiao committed
271 272
          @upDateTdytxxList="upDateTdytxxList"
        />
273 274 275 276 277 278 279
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="共有方式:">
xiaomiao committed
280
              <el-radio-group
281
                :disabled="!viewEdit"
xiaomiao committed
282 283
                v-model="ruleForm.sldy.gyfs"
              >
284 285 286 287 288 289 290
                <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>
291
          <el-col :span="6" v-show="ruleForm.sldy.gyfs != '0'">
292
            <el-form-item label="是否分别持证:">
xiaomiao committed
293 294
              <el-radio-group
                v-model="ruleForm.sldy.sqfbcz"
xiaomiao committed
295 296 297
                :disabled="!viewEdit"
                @input="updaterow()"
              >
xiaomiao committed
298 299
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
300 301 302
              </el-radio-group>
            </el-form-item>
          </el-col>
xiaomiao committed
303 304
          <el-col
            :span="6"
xiaomiao committed
305 306
            v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'"
          >
307
            <el-form-item label="持证人:">
xiaomiao committed
308
              <el-select
xiaomiao committed
309
                v-model="czr"
xiaomiao committed
310
                placeholder="持证人"
xiaomiao committed
311 312
                :disabled="!viewEdit"
              >
xiaomiao committed
313 314 315 316
                <el-option
                  v-for="item in czrOptions"
                  :key="item.zjh"
                  :label="item.sqrmc"
xiaomiao committed
317 318
                  :value="item.zjh"
                >
319 320 321 322 323
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
xiaomiao committed
324 325
        <qlrCommonTable
          :tableData="ruleForm.qlrList"
326
          :disabled="viewEdit"
xiaomiao committed
327 328
          @upDateQlrxxList="upDateQlrxxList"
          :key="key"
xiaomiao committed
329 330
          :gyfs="ruleForm.sldy.gyfs"
        />
331 332 333 334 335 336

        <div v-if="ruleForm.ywrList && ruleForm.ywrList.length > 0">
          <div class="slxx_title title-block">
            义务人信息
            <div class="triangle"></div>
          </div>
xiaomiao committed
337 338
          <qlrCommonTable
            v-if="ruleForm.ywrList"
339
            :disabled="viewEdit"
xiaomiao committed
340 341
            :tableData="ruleForm.ywrList"
            :key="key"
xiaomiao committed
342 343
            @upDateQlrxxList="upDateYwrxxList"
          />
344 345 346 347 348 349 350 351 352
        </div>

        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col>
            <el-form-item label="登记原因:" prop="djyy">
xiaomiao committed
353 354
              <el-input
                class="textArea"
xiaomiao committed
355 356
                maxlength="500"
                show-word-limit
xiaomiao committed
357
                type="textarea"
358
                :disabled="!viewEdit"
xiaomiao committed
359 360
                v-model="ruleForm.tdsyq.djyy"
              >
361 362 363 364 365
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
366
      <el-row class="btn" v-if="viewEdit">
367 368 369 370 371 372 373 374
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
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
import { mapGetters } from "vuex";
import ywmix from "@/views/ywbl/mixin/index";
import { Init, saveData } from "@/api/workflow/tdsyqFlow.js";
import tdytTable from "@/views/workflow/components/tdytTable";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
export default {
  mixins: [ywmix],
  components: { qlrCommonTable, tdytTable },
  mounted() {
    this.viewEdit = this.$parent.currentSelectTab.ableOperation;
    this.propsParam = this.$attrs;
    var formdata = new FormData();
    let that = this;
    this.$startLoading();
    formdata.append("bsmSldy", this.propsParam.bsmSldy);
    formdata.append("djlx", this.propsParam.djlx);
    formdata.append("isEdit", this.viewEdit);
    Init(formdata).then((res) => {
      this.$nextTick(() => {
        that.ruleForm = res.result;
        this.czrOptions = this.ruleForm.qlrList;
        that.$endLoading();
        that.isShow = true;
        this.czrOptions = this.ruleForm.qlrList;
        this.ruleForm.qlrList.forEach((item) => {
          if (item.sfczr == 1) {
            this.czr = item.sqrmc;
          }
403
        });
xiaomiao committed
404
      });
xiaomiao committed
405 406
    });
  },
407

xiaomiao committed
408 409 410 411 412 413 414 415 416
  computed: {
    ...mapGetters(["dictData", "flag"]),
  },
  data() {
    return {
      mjdw: "1",
      value2: {
        id: "520000198407304275",
        user: "史平",
417
      },
xiaomiao committed
418 419 420 421
      props: {
        label: "user",
        value: "id",
        keyword: "keyword",
422
      },
xiaomiao committed
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501

      //表单是否可操作
      viewEdit: true,
      key: 0,
      isShow: false,
      disabled: true,
      czrOptions: [],
      czr: "",
      ruleForm: {},
      //传递参数
      propsParam: {},
      rules: {},
    };
  },
  methods: {
    /**
     * @description: 更新土地用途信息
     * @param {*} val
     * @author: renchao
     */
    upDateTdytxxList(val) {
      this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
      this.key++;
    },
    /**
     * @description: 更新权利人信息
     * @param {*} val
     * @author: renchao
     */
    upDateQlrxxList(val) {
      this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val));
      this.czrOptions = this.ruleForm.qlrList;
      this.key++;
    },
    // 更新义务人信息
    /**
     * @description: 更新义务人信息
     * @param {*} val
     * @author: renchao
     */
    upDateYwrxxList(val) {
      this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val));
      this.key++;
    },
    // 是否持证人变化
    /**
     * @description: 是否持证人变化
     * @param {*} val
     * @author: renchao
     */
    updaterow() {
      this.czr = "";
    },
    /**
     * @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",
        });
        return false;
      }
      if (this.ruleForm.qlrList.length == 0) {
        this.$message({
          showClose: true,
          message: "请确认权利人信息",
          type: "error",
        });
        return false;
      }

      if (this.ruleForm.sldy.gyfs == "0") {
        if (this.ruleForm.qlrList.length > 1) {
502 503
          this.$message({
            showClose: true,
xiaomiao committed
504
            message: "共有方式:单独所有,权利人只能是一个人",
505 506 507 508
            type: "error",
          });
          return false;
        }
xiaomiao committed
509 510 511
        this.ruleForm.qlrList[0].sfczr = "1";
      } else {
        if (this.ruleForm.qlrList.length <= 1) {
512 513
          this.$message({
            showClose: true,
xiaomiao committed
514 515
            message:
              "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
516 517 518 519
            type: "error",
          });
          return false;
        }
xiaomiao committed
520 521 522 523 524 525
        //是否分别持证
        if (this.ruleForm.sldy.sqfbcz == "1") {
          //是
          this.ruleForm.qlrList.forEach((item, index) => {
            item.sfczr = "1";
          });
526
        } else {
xiaomiao committed
527 528
          if (!that.czr) {
            that.$message({
529
              showClose: true,
xiaomiao committed
530
              message: "请选择持证人",
531 532 533 534
              type: "error",
            });
            return false;
          }
xiaomiao committed
535 536
          this.ruleForm.qlrList.forEach((item, index) => {
            if (item.zjh == this.czr) {
537
              item.sfczr = "1";
xiaomiao committed
538 539
            } else {
              item.sfczr = "0";
540
            }
xiaomiao committed
541
          });
xiaomiao committed
542
        }
xiaomiao committed
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563
      }
      /**
       * @description: saveData
       * @author: renchao
       */
      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",
          });
        }
      });
xiaomiao committed
564
    },
xiaomiao committed
565 566
  },
};
567
</script>
xiaomiao committed
568
<style scoped lang="scss">
xiaomiao committed
569 570
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
571
</style>