Blame view

src/views/djbworkflow/djbBook/components/blxxtabs/tdsyq.vue 24.5 KB
xiaomiao committed
1 2 3
<!--
 * @Description:
 * @Autor: renchao
4
 * @LastEditTime: 2023-11-03 14:48:37
xiaomiao committed
5 6 7 8 9
-->
<template>
  <!-- 受理信息 -->
  <div class="slxx">
    <el-form
xiaomiao committed
10
      :model="ruleForm"
xiaomiao committed
11 12
      :rules="rules"
      ref="ruleForm"
xiaomiao committed
13
      :class="{ readonly: editDisabled }"
14
      v-Loading="loading"
xiaomiao committed
15
      :show-message="false"
xiaomiao committed
16 17
      :label-position="flag ? 'top' : ''"
      :inline="flag"
18
      label-width="145px">
xiaomiao committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
      <div class="slxx_con" v-if="isShow" :class="flag ? 'formMarginBot0' : ''">
        <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.repair.ywh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="补录人员:">
              <el-input disabled v-model="ruleForm.repair.slry"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="补录时间:">
              <el-input disabled v-model="ruleForm.repair.slsj"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
xiaomiao committed
41
        <div class="slxx_title title-block bdcqk">
xiaomiao committed
42
          土地所有权信息
xiaomiao committed
43
          <div class="count" v-if="ssqlxxshow">
xiaomiao committed
44 45 46
            <el-form-item
              label="上手权利信息:"
              prop="ssQlxx.bdcqzh"
47
              style="display:flex"
48
              :rules="rules.ssQlxxrules">
xiaomiao committed
49 50 51 52
              <select-table
                v-model="ruleForm.ssQlxx"
                :tableData="ssQlxxList"
                :props="props"
53
                @change="ssQlxxchange">
xiaomiao committed
54 55 56
                <el-table-column
                  prop="qllxmc"
                  width="130"
57
                  label="权利类型"></el-table-column>
xiaomiao committed
58 59 60
                <el-table-column
                  prop="bdcqzh"
                  width="160"
61
                  label="不动产权证书"></el-table-column>
xiaomiao committed
62 63 64 65 66 67
                <el-table-column prop="qlrmc" label="权利人"></el-table-column>
                <el-table-column prop="mjmc" label="面积"></el-table-column>
                <el-table-column prop="ytmc" label="用途"></el-table-column>
                <el-table-column prop="zl" label="坐落"></el-table-column>
              </select-table>
            </el-form-item>
xiaomiao committed
68 69 70 71
          </div>
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
xiaomiao committed
72 73
          <el-col :span="8">
            <el-form-item label="上手业务号:">
xiaomiao committed
74
              <el-input disabled v-model="ruleForm.qlxx.ssywh"></el-input>
xiaomiao committed
75 76 77
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
78 79 80
            <el-form-item
              label="登记类型:"
              prop="qlxx.djlx"
81
              :rules="rules.djlxrules">
xiaomiao committed
82
              <el-select v-model="ruleForm.qlxx.djlx" @change="djlxchange">
xiaomiao committed
83 84 85 86
                <el-option
                  v-for="item in djlxlist"
                  :key="item.dcode"
                  :label="item.dname"
87
                  :value="item.dcode">
xiaomiao committed
88 89 90 91
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
92 93 94 95 96
          <el-col :span="8">
            <el-form-item label="不动产单元号:">
              <el-input disabled v-model="ruleForm.qlxx.bdcdyh"></el-input>
            </el-form-item>
          </el-col>
97 98
        </el-row>
        <el-row :gutter="10">
99
          <el-col :span="8">
xiaomiao committed
100 101 102
            <el-form-item
              label="业务号:"
              prop="qlxx.ywh"
103
              :rules="rules.ywhrules">
xiaomiao committed
104
              <el-input maxlength="20" onkeyup="this.value=this.value.replace(/[^\w_]/g,'');" v-model="ruleForm.qlxx.ywh"></el-input>
105 106 107 108 109 110 111 112
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="权利类型:">
              <el-input disabled v-model="ruleForm.qlxx.qllxmc"></el-input>
            </el-form-item>
          </el-col>

xiaomiao committed
113
          <el-col :span="8">
xiaomiao committed
114 115 116
            <el-form-item
              label="登簿人:"
              prop="qlxx.dbr"
117
              :rules="rules.dbrrules">
xiaomiao committed
118 119 120 121 122 123 124
              <el-input v-model="ruleForm.qlxx.dbr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item
              label="登记机构:"
              prop="qlxx.djjg"
125
              :rules="rules.djjgrules">
xiaomiao committed
126 127 128
              <el-input v-model="ruleForm.qlxx.djjg"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
129
          <el-col :span="8">
xiaomiao committed
130 131 132
            <el-form-item
              label="不动产权证号:"
              prop="qlxx.bdcqzh"
133
              :rules="rules.bdcqzhrules">
xiaomiao committed
134 135 136 137
              <el-input v-model="ruleForm.qlxx.bdcqzh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
138 139 140 141 142 143
            <el-form-item label="权属状态:">
              <el-select v-model="ruleForm.qlxx.qszt">
                <el-option
                  v-for="item in qsztlist"
                  :key="item.dcode"
                  :label="item.dname"
144
                  :value="item.dcode">
xiaomiao committed
145 146 147 148 149 150 151
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="登记原因:">
xiaomiao committed
152
              <el-input v-model="ruleForm.tdsyq.djyy"></el-input>
xiaomiao committed
153 154 155
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
156
            <el-form-item label="农用地面积:">
xiaomiao committed
157 158
              <div class="flex">
                <el-input
159
                  maxlength="12"
xiaomiao committed
160 161
                  v-model="ruleForm.tdsyq.nydmj"
                  :disabled="!ableOperation"
162
                  oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"></el-input>
xiaomiao committed
163
                <el-select
164
                  v-model="ruleForm.tdsyq.mjdw"
xiaomiao committed
165
                  :disabled="!ableOperation"
166
                  style="width: 68px">
xiaomiao committed
167 168 169 170
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
171
                    :value="item.dcode">
xiaomiao committed
172 173 174
                  </el-option>
                </el-select>
              </div>
xiaomiao committed
175 176 177
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
178
            <el-form-item label="耕地面积:">
xiaomiao committed
179 180
              <div class="flex">
                <el-input
181
                  maxlength="12"
xiaomiao committed
182 183
                  v-model="ruleForm.tdsyq.gdmj"
                  :disabled="!ableOperation"
184
                  oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"></el-input>
xiaomiao committed
185
                <el-select
186
                  v-model="ruleForm.tdsyq.mjdw"
xiaomiao committed
187
                  :disabled="!ableOperation"
188
                  style="width: 68px">
xiaomiao committed
189 190 191 192
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
193
                    :value="item.dcode">
xiaomiao committed
194 195 196
                  </el-option>
                </el-select>
              </div>
xiaomiao committed
197 198
            </el-form-item>
          </el-col>
199 200
        </el-row>
        <el-row :gutter="10">
xiaomiao committed
201
          <el-col :span="8">
xiaomiao committed
202
            <el-form-item label="林地面积:">
xiaomiao committed
203 204
              <div class="flex">
                <el-input
205
                  maxlength="12"
xiaomiao committed
206 207
                  v-model="ruleForm.tdsyq.ldmj"
                  :disabled="!ableOperation"
208
                  oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"></el-input>
xiaomiao committed
209
                <el-select
210
                  v-model="ruleForm.tdsyq.mjdw"
xiaomiao committed
211
                  :disabled="!ableOperation"
212
                  style="width: 68px">
xiaomiao committed
213 214 215 216
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
217
                    :value="item.dcode">
xiaomiao committed
218 219 220
                  </el-option>
                </el-select>
              </div>
xiaomiao committed
221 222 223
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
224
            <el-form-item label="草地面积:">
xiaomiao committed
225 226
              <div class="flex">
                <el-input
227
                  maxlength="12"
xiaomiao committed
228 229
                  v-model="ruleForm.tdsyq.cdmj"
                  :disabled="!ableOperation"
230
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
231
                <el-select
232
                  v-model="ruleForm.tdsyq.mjdw"
xiaomiao committed
233
                  :disabled="!ableOperation"
234
                  style="width: 68px">
xiaomiao committed
235 236 237 238
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
239
                    :value="item.dcode">
xiaomiao committed
240 241 242
                  </el-option>
                </el-select>
              </div>
xiaomiao committed
243 244 245
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
246
            <el-form-item label="其他农用地面积:">
xiaomiao committed
247 248
              <div class="flex">
                <el-input
249
                  maxlength="12"
xiaomiao committed
250 251
                  v-model="ruleForm.tdsyq.qtnydmj"
                  :disabled="!ableOperation"
252
                  oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"></el-input>
xiaomiao committed
253
                <el-select
254
                  v-model="ruleForm.tdsyq.mjdw"
xiaomiao committed
255
                  :disabled="!ableOperation"
256
                  style="width: 68px">
xiaomiao committed
257 258 259 260
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
261
                    :value="item.dcode">
xiaomiao committed
262 263 264
                  </el-option>
                </el-select>
              </div>
xiaomiao committed
265 266
            </el-form-item>
          </el-col>
267 268
        </el-row>
        <el-row :gutter="10">
xiaomiao committed
269
          <el-col :span="8">
xiaomiao committed
270
            <el-form-item label="建筑使用面积:">
xiaomiao committed
271 272
              <div class="flex">
                <el-input
273
                  maxlength="12"
xiaomiao committed
274 275
                  v-model="ruleForm.tdsyq.jsydmj"
                  :disabled="!ableOperation"
276
                  oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"></el-input>
xiaomiao committed
277
                <el-select
278
                  v-model="ruleForm.tdsyq.mjdw"
xiaomiao committed
279
                  :disabled="!ableOperation"
280
                  style="width: 68px">
xiaomiao committed
281 282 283 284
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
285
                    :value="item.dcode">
xiaomiao committed
286 287 288
                  </el-option>
                </el-select>
              </div>
xiaomiao committed
289 290 291
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
292
            <el-form-item label="未利用地面积:">
xiaomiao committed
293 294
              <div class="flex">
                <el-input
295
                  maxlength="12"
xiaomiao committed
296 297
                  v-model="ruleForm.tdsyq.wlydmj"
                  :disabled="!ableOperation"
298
                  oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null"></el-input>
xiaomiao committed
299
                <el-select
300
                  v-model="ruleForm.tdsyq.mjdw"
xiaomiao committed
301
                  :disabled="!ableOperation"
302
                  style="width: 68px">
xiaomiao committed
303 304 305 306
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
307
                    :value="item.dcode">
xiaomiao committed
308 309 310
                  </el-option>
                </el-select>
              </div>
xiaomiao committed
311 312 313 314 315 316
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item
              label="登记时间:"
              prop="qlxx.djsj"
317
              :rules="rules.djsjrules">
xiaomiao committed
318
              <el-date-picker
xiaomiao committed
319 320
                v-model="ruleForm.qlxx.djsj"
                type="date"
xiaomiao committed
321
                class="width100"
xiaomiao committed
322 323
                placeholder="选择日期"
                value-format="yyyy-MM-dd HH:mm:ss"
324
                format="yyyy-MM-dd">
xiaomiao committed
325 326 327 328 329 330 331
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="附记:">
renchao@pashanhoo.com committed
332
              <el-input v-model="ruleForm.tdsyq.fj" type="textarea" maxlength="500" show-word-limit></el-input>
xiaomiao committed
333 334 335 336 337 338 339 340 341 342
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
          土地用途
          <div class="triangle"></div>
        </div>
        <tdytTable
          :tableData="ruleForm.tdytqxList"
          @upDateTdytxxList="upDateTdytxxList"
343
          :ableOperation="ableOperation" />
xiaomiao committed
344 345 346 347 348 349 350 351
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="共有方式:">
              <el-radio-group
xiaomiao committed
352
                :disabled="!ableOperation"
xiaomiao committed
353
                v-model="ruleForm.qlxx.gyfs">
xiaomiao committed
354 355 356 357 358 359 360 361 362 363 364 365
                <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>
        </el-row>
        <qlrCommonTable
          :tableData="ruleForm.qlrData"
          @upDateQlrxxList="upDateQlrxxList"
          :key="key"
xiaomiao committed
366 367
          :ableOperation="ableOperation"
          :gyfs="ruleForm.qlxx.gyfs" />
xiaomiao committed
368
      </div>
xiaomiao committed
369
      <el-row class="btn" v-if="ableOperation">
xiaomiao committed
370 371 372 373 374 375 376 377
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
  import { mapGetters } from "vuex";
  import store from "@/store/index.js";
  import ywmix from "@/views/ywbl/mixin/index";
  import { init, getSsQlxx, getQlxxByQlxxBsm, save } from "@/api/djbRepair.js";
  import qlrCommonTable from "@/views/djbworkflow/components/qlrCommonTable";
  import selectTable from "@/components/selectTable/index.vue";
  import tdytTable from "@/views/workflow/components/tdytTable";
  export default {
    mixins: [ywmix],
    components: { qlrCommonTable, tdytTable, selectTable },
    computed: {
      ...mapGetters(["dictData", "flag"]),
      // 根据流程判断表单是否为只读
      editDisabled () {
        if (!this.ableOperation) {
          //只读状态
          return true;
xiaomiao committed
395
        }
396
        return false;
xiaomiao committed
397
      },
398 399 400
    },
    data () {
      return {
401
        loading: false,
402 403 404 405
        ssqlxxshow: true,
        props: {
          label: "bdcqzh",
          value: "bdcdyid",
xiaomiao committed
406
        },
407 408 409 410 411 412 413 414 415 416
        // 键名转换,方法默认是label和children进行树状渲染
        normalizer (node) {
          //方法
          if (node.children == null || node.children == "null") {
            delete node.children;
          }
          return {
            id: node.dcode,
            label: node.dname,
          };
xiaomiao committed
417
        },
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
        //表单是否可操作
        propsParam: this.$attrs,
        key: 0,
        // 登记类型
        djlxlist: [
          {
            dcode: "100",
            dname: "首次登记",
          },
          {
            dcode: "200",
            dname: "转移登记",
          },
          {
            dcode: "300",
            dname: "变更登记",
          },
          {
            dcode: "500",
            dname: "更正登记",
          },
xiaomiao committed
439

440 441 442 443 444 445 446 447
          {
            dcode: "901",
            dname: "补证",
          },
          {
            dcode: "902",
            dname: "换证",
          },
xiaomiao committed
448
        ],
449 450 451 452 453 454 455 456 457 458
        // 权属状态
        qsztlist: [
          {
            dcode: "1",
            dname: "现势",
          },
          {
            dcode: "2",
            dname: "历史",
          },
459
        ],
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477
        isShow: false,
        disabled: true,
        ssQlxxList: [],
        ruleForm: {},
        ableOperation: false,
        //传递参数\
        rules: {
          ssQlxxrules: [
            { required: true, message: "上手权利信息", trigger: "blur" },
          ],
          bdcqzhrules: [
            { required: true, message: "不动产权证号:", trigger: "blur" },
          ],
          // qxdmrules: [{ required: true, message: "区县代码", trigger: "blur" }],
          djjgrules: [{ required: true, message: "登记机构", trigger: "blur" }],
          dbrrules: [{ required: true, message: "登簿人", trigger: "blur" }],
          djsjrules: [{ required: true, message: "登记时间", trigger: "blur" }],
          djlxrules: [{ required: true, message: "登记类型", trigger: "change" }],
xiaomiao committed
478
          ywhrules: [{ required: true, message: "业务号", trigger: "blur" }],
479 480
        },
      };
xiaomiao committed
481
    },
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497
    created () { },
    mounted () {
      this.loadData();
      this.ableOperation = this.$parent.ableOperation;
    },
    methods: {
      /**
       * @description: ssQlxxchange
       * @param {*} val
       * @author: renchao
       */
      ssQlxxchange (val) {
        this.ruleForm.ssQlxx = val;
        this.ruleForm.qlxx.ssywh = val.ywh;
        this.ssQlxxchangediolog(val);
      },
yuanbo committed
498 499 500 501 502
      /**
       * @description: 弹框事件
       * @param {*} val
       * @author: renchao
       */
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521
      ssQlxxchangediolog (val) {
        this.$confirm("是否将上手权利信息同步到表单", "提示", {
          iconClass: "el-icon-question", //自定义图标样式
          confirmButtonText: "确认", //确认按钮文字更换
          cancelButtonText: "取消", //取消按钮文字更换
          showClose: true, //是否显示右上角关闭按钮
          type: "warning",
        })
          .then(() => {
            getQlxxByQlxxBsm({ qlxxBsm: val.bsmQlxx }).then((res) => {
              if (res.code == 200) {
                this.nowlist = res.result;
                for (var key in this.ruleForm.tdsyq) {
                  if (
                    this.ruleForm.tdsyq[key] == "" ||
                    this.ruleForm.tdsyq[key] == null
                  ) {
                    this.ruleForm.tdsyq[key] = this.nowlist.tdsyq[key];
                  }
522
                }
523 524 525 526
                for (var key in this.ruleForm.qlxx) {
                  if (
                    this.ruleForm.qlxx[key] == "" ||
                    this.ruleForm.qlxx[key] == null &&
xiaomiao committed
527 528 529 530 531 532
                    key != "ywh" &&
                    key != "dbr" &&
                    key != "djsj" &&
                    key != "ssywh" &&
                    key != "ssywh" &&
                    key != "bdcqzh") {
533
                    this.ruleForm.qlxx[key] = this.nowlist.qlxx[key];
xiaomiao committed
534

535
                  }
xiaomiao committed
536
                }
537
                this.ruleForm.qlxx.gyfs = this.nowlist.qlxx.gyfs
538 539 540 541 542 543 544 545 546 547 548 549 550
                if (!this.ruleForm.tdytqxList.length) {
                  this.ruleForm.tdytqxList = this.nowlist.tdytqxList;
                }
                if (!this.ruleForm.qlrData.length) {
                  this.ruleForm.qlrData = this.nowlist.qlrData;
                }
                if (!this.ruleForm.ywrData.length) {
                  this.ruleForm.ywrData = this.nowlist.ywrData;
                }
                this.$message({
                  type: "success",
                  message: "同步成功!",
                });
xiaomiao committed
551
              }
552 553 554 555 556 557 558
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消同步",
            });
xiaomiao committed
559
          });
560 561 562 563 564 565 566 567 568 569 570 571 572
      },
      /**
       * @description: djlxchange
       * @param {*} val
       * @author: renchao
       */
      djlxchange (val) {
        if (val == null || val == 100) {
          this.ssqlxxshow = false;
        } else {
          this.ssqlxxshow = true;
        }
      },
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587

      // 字典
      /**
       * @description: 字典
       * @param {*} val
       * @author: renchao
       */
      getDictData (val) {
        return store.getters.dictData[val];
      },
      /**
       * @description: loadData
       * @author: renchao
       */
      loadData () {
588
        this.loading = true
589 590
        this.propsParam.isEdit = this.$parent.isEdit;
        init(this.propsParam).then((res) => {
591
          this.loading = false
592 593
          if (res.code == 200) {
            this.ruleForm = res.result;
594 595 596
            let djlx = this.ruleForm.qlxx.djlx;
            if (djlx == null || djlx == 100) {
              this.ssqlxxshow = false;
xiaomiao committed
597
            }
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627
            this.isShow = true;
            //获取主体信息
            getSsQlxx({
              bdcdyid: this.propsParam.bdcdyid,
              qllx: this.propsParam.qllx,
              bsmQlxx: this.ruleForm.qlxx.bsmQlxx,
            }).then((res) => {
              if (res.code == 200) {
                this.ssQlxxList = res.result;
              }
            });
          }
        });
      },
      // 更新土地用途信息
      /**
       * @description: 更新土地用途信息
       * @param {*} val
       * @author: renchao
       */
      upDateTdytxxList (val) {
        this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
        this.key++;
      },
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateQlrxxList (val) {
628 629 630 631
        if (!_.isEqual(val, this.ruleForm.qlrData)) {
          this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val));
          this.czrOptions = this.ruleForm.qlrData;
        }
632
      },
633 634 635 636 637 638 639
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        this.$refs.ruleForm.validate((valid) => {
          if (valid) {
640 641 642 643 644 645 646 647 648
            let arr = this.ruleForm.tdytqxList.filter(item => !item.yt)
            if (arr.length > 0) {
              this.$message({
                showClose: true,
                message: "土地用途不能为空",
                type: "error",
              });
              return false;
            }
649
            if (this.ruleForm.qlrData.length == 0) {
xiaomiao committed
650 651
              this.$message({
                showClose: true,
652
                message: "请确认权利人信息",
xiaomiao committed
653 654 655 656
                type: "error",
              });
              return false;
            }
657
            if (this.ruleForm.qlxx.gyfs == "0") {
658 659 660 661 662 663 664 665
              if (this.ruleForm.qlrData.length > 1) {
                this.$message({
                  showClose: true,
                  message: "共有方式:单独所有,权利人只能是一个人",
                  type: "error",
                });
                return false;
              }
xiaomiao committed
666
            } else {
xiaomiao committed
667
              if (this.ruleForm.qlrData.length <= 1) {
668 669 670 671 672
                this.$message({
                  showClose: true,
                  message: "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
                  type: "error",
                });
673
                return false;
674
              }
xiaomiao committed
675
            }
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693
            save(this.ruleForm).then((res) => {
              if (res.code === 200) {
                this.$message({
                  showClose: true,
                  message: "保存成功!",
                  type: "success",
                });
                this.$parent.changeywh();
                this.$store.dispatch("user/refreshPage", true);
              } else {
                this.$message({
                  showClose: true,
                  message: res.message,
                  type: "error",
                });
              }
            });
          } else {
694 695 696 697 698
            this.$message({
              showClose: true,
              message: "请完善表单信息",
              type: "error"
            })
699
            return false;
xiaomiao committed
700
          }
701 702 703
        })
      }
    }
704
  };
xiaomiao committed
705 706
</script>
<style scoped lang="scss">
707 708 709 710 711 712 713
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
  /deep/.el-form {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
  }
xiaomiao committed
714

715 716 717
  /deep/.el-form-item__label {
    padding: 0;
  }
xiaomiao committed
718

719 720 721
  /deep/.el-radio {
    margin-right: 10px;
  }
xiaomiao committed
722

723 724 725
  /deep/.el-select {
    width: 100%;
  }
xiaomiao committed
726

727 728 729
  /deep/.el-form-item {
    margin-bottom: 8px;
  }
xiaomiao committed
730

731 732 733
  .marginBot0 {
    margin-bottom: 0 !important;
  }
xiaomiao committed
734

735 736 737
  .slxx {
    box-sizing: border-box;
  }
xiaomiao committed
738

739 740 741 742 743 744 745 746
  .slxx_con {
    flex: 1;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
    padding-right: 3px;
    overflow-x: hidden;
  }
xiaomiao committed
747

748 749 750
  .submit_btn {
    height: 50px;
  }
xiaomiao committed
751

752 753 754 755 756 757 758 759 760 761
  .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;
  }
xiaomiao committed
762

763 764 765 766 767 768 769
  .btn {
    text-align: center;
    padding-top: 10px;
    height: 36px;
    background-color: #ffffff;
    padding: 5px 0;
  }
xiaomiao committed
770

771 772 773 774
  .textArea {
    /deep/.el-textarea__inner {
      min-height: 90px !important;
    }
xiaomiao committed
775 776
  }

777 778 779
  /deep/.el-form-item__label {
    padding-bottom: 0px;
  }
xiaomiao committed
780
</style>