Blame view

src/views/djbworkflow/djbBook/components/blxxtabs/fdcq.vue 24.7 KB
xiaomiao committed
1 2 3
<!--
 * @Description:
 * @Autor: renchao
4
 * @LastEditTime: 2023-08-02 08:38:11
xiaomiao committed
5 6 7 8 9 10 11
-->
<template>
  <!-- 受理信息 -->
  <div class="slxx">
    <el-form
      :model="ruleForm"
      :rules="rules"
xiaomiao committed
12 13
      :class="{ readonly: editDisabled }"
      class="loadingtext"
xiaomiao committed
14 15 16
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
xiaomiao committed
17
      :show-message="false"
xiaomiao committed
18
      inline-message
19
      label-width="145px">
xiaomiao committed
20 21 22 23 24 25 26
      <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">
xiaomiao committed
27
            <el-form-item label="补录编号:">
xiaomiao committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
              <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>
        <div class="slxx_title title-block">
43
          房地产权(独幢、层、套、间房屋)
xiaomiao committed
44 45
          <div class="triangle"></div>
        </div>
46
        <el-row :gutter="10" class="ssqlxx">
xiaomiao committed
47 48 49 50 51 52 53
          <el-col :span="24" v-if="ssqlxxshow">
            <el-form-item label="上手权利信息:">
              <select-table
                v-model="ruleForm.ssQlxx"
                :table-width="550"
                :tableData="ssQlxxList"
                :props="props"
54
                @change="ssQlxxchange">
xiaomiao committed
55 56 57
                <el-table-column
                  prop="qllxmc"
                  width="130"
58
                  label="权利类型"></el-table-column>
xiaomiao committed
59 60 61
                <el-table-column
                  prop="bdcqzh"
                  width="160"
62
                  label="不动产权证书"></el-table-column>
xiaomiao committed
63 64 65 66 67 68 69 70
                <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>
          </el-col>
        </el-row>
xiaomiao committed
71 72 73 74 75 76 77 78 79 80 81
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="不动产单元号:">
              <el-input disabled v-model="ruleForm.qlxx.bdcdyh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="业务号:">
              <el-input v-model="ruleForm.qlxx.ywh"></el-input>
            </el-form-item>
          </el-col>
82
          <el-col :span="8">
xiaomiao committed
83
            <el-form-item label="上手业务号:">
xiaomiao committed
84
              <el-input disabled v-model="ruleForm.qlxx.ssywh"></el-input>
xiaomiao committed
85 86 87 88 89 90 91 92 93 94
            </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.qlxx.qllxmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
95 96
            <el-form-item label="登记类型:" prop="qlxx.djlx" :rules="rules.djlxrules">
              <el-select v-model="ruleForm.qlxx.djlx" @change="djlxchange">
xiaomiao committed
97
                <el-option
xiaomiao committed
98
                  v-for="item in djlxlist"
xiaomiao committed
99 100
                  :key="item.dcode"
                  :label="item.dname"
101
                  :value="item.dcode">
102 103
                </el-option>
              </el-select>
xiaomiao committed
104 105 106 107 108 109 110
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="房地坐落:">
              <el-input v-model="ruleForm.qlxx.zl"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
111
          <el-col :span="8">
xiaomiao committed
112 113 114 115
            <el-form-item label="土地使用权人:">
              <el-input v-model="ruleForm.fdcq2.tdsyqr"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
116
          <el-col :span="8">
xiaomiao committed
117
            <el-form-item label="独用土地面积:">
xiaomiao committed
118
              <div class="flex">
119 120
                <el-input v-model="ruleForm.fdcq2.dytdmj"
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
121
                <el-select
xiaomiao committed
122 123
                  disabled
                  v-model="mjdw"
xiaomiao committed
124 125 126 127 128 129 130 131
                  style="width: 20%">
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
                    :value="item.dcode">
                  </el-option>
                </el-select>
132
              </div>
xiaomiao committed
133 134
            </el-form-item>
          </el-col>
xiaomiao committed
135
          <el-col :span="8">
xiaomiao committed
136
            <el-form-item label="分摊土地面积:">
137 138 139
              <div class="flex">
                <el-input v-model="ruleForm.fdcq2.fttdmj"
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
140
                <el-select
xiaomiao committed
141 142
                  disabled
                  v-model="mjdw"
xiaomiao committed
143 144 145 146 147 148 149 150
                  style="width: 20%">
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
                    :value="item.dcode">
                  </el-option>
                </el-select>
151
              </div>
xiaomiao committed
152 153
            </el-form-item>
          </el-col>
xiaomiao committed
154
          <el-col :span="8">
155
            <!-- 下拉框 -->
xiaomiao committed
156 157
            <el-form-item label="土地性质:" style="margin-bottom: 3px">
              <treeselect
xiaomiao committed
158
                v-model="tdxz"
xiaomiao committed
159
                noOptionsText="暂无数据"
xiaomiao committed
160
                placeholder=""
161
                :normalizer="normalizer"
xiaomiao committed
162
                :show-count="true"
163
                :options="dictData['A9']" />
xiaomiao committed
164 165
            </el-form-item>
          </el-col>
xiaomiao committed
166
          <el-col :span="8">
xiaomiao committed
167
            <el-form-item label="房地产交易价格:">
168
              <div class="flex">
xiaomiao committed
169 170
                <el-input
                  v-model="ruleForm.fdcq2.qjjg"
xiaomiao committed
171
                  style="width: 500%"
172
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
173
                <el-select v-model="ruleForm.fdcq2.jedw">
xiaomiao committed
174 175 176 177
                  <el-option
                    v-for="item in dictData['A57']"
                    :key="item.dcode"
                    :label="item.dname"
178
                    :value="item.dcode">
xiaomiao committed
179 180
                  </el-option>
                </el-select>
xiaomiao committed
181
              </div>
xiaomiao committed
182 183
            </el-form-item>
          </el-col>
xiaomiao committed
184
          <el-col :span="8">
xiaomiao committed
185 186
            <el-form-item label="权属状态:">
              <el-select v-model="ruleForm.qlxx.qszt">
xiaomiao committed
187 188 189 190
                <el-option
                  v-for="item in qsztlist"
                  :key="item.dcode"
                  :label="item.dname"
191
                  :value="item.dcode">
xiaomiao committed
192 193 194 195
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
196
          <el-col :span="8">
xiaomiao committed
197
            <el-form-item label="规划用途:">
198
              <el-select v-model="ruleForm.fdcq2.ghyt">
xiaomiao committed
199 200 201 202
                <el-option
                  v-for="item in dictData['A17']"
                  :key="item.dcode"
                  :label="item.dname"
203
                  :value="item.dcode">
204 205
                </el-option>
              </el-select>
xiaomiao committed
206 207
            </el-form-item>
          </el-col>
208
          <el-col :span="8">
xiaomiao committed
209 210 211 212
            <el-form-item label="批准用途:">
              <el-input v-model="ruleForm.fdcq2.pzyt"></el-input>
            </el-form-item>
          </el-col>
213
          <el-col :span="8">
xiaomiao committed
214 215 216 217
            <el-form-item label="实际用途:">
              <el-input v-model="ruleForm.fdcq2.sjyt"></el-input>
            </el-form-item>
          </el-col>
218
          <el-col :span="8">
xiaomiao committed
219 220
            <el-form-item label="房屋性质:">
              <el-select v-model="ruleForm.fdcq2.fwxz">
xiaomiao committed
221 222 223 224
                <el-option
                  v-for="item in dictData['A19']"
                  :key="item.dcode"
                  :label="item.dname"
225
                  :value="item.dcode">
226 227
                </el-option>
              </el-select>
xiaomiao committed
228 229 230
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
231 232 233
            <el-form-item
              label="房屋结构:"
              prop="fdcq2.fwjg"
234
              :rules="rules.fwjgrules">
xiaomiao committed
235
              <el-select v-model="ruleForm.fdcq2.fwjg">
xiaomiao committed
236 237 238 239
                <el-option
                  v-for="item in dictData['A46']"
                  :key="item.dcode"
                  :label="item.dname"
240
                  :value="item.dcode">
241 242
                </el-option>
              </el-select>
xiaomiao committed
243 244 245 246 247 248 249 250 251 252 253 254 255 256
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="所在层:">
              <el-input v-model="ruleForm.fdcq2.szc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="总层数:">
              <el-input v-model="ruleForm.fdcq2.zcs"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="建筑面积:">
257 258 259
              <div class="flex">
                <el-input v-model="ruleForm.fdcq2.jzmj"
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
260
                <el-select
261
                  disabled
xiaomiao committed
262
                  v-model="mjdw"
xiaomiao committed
263 264 265 266 267 268 269 270
                  style="width: 20%">
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
                    :value="item.dcode">
                  </el-option>
                </el-select>
271
              </div>
xiaomiao committed
272 273 274 275
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="专有建筑面积:">
276 277 278
              <div class="flex">
                <el-input v-model="ruleForm.fdcq2.zyjzmj"
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
279
                <el-select
280
                  disabled
xiaomiao committed
281
                  v-model="mjdw"
xiaomiao committed
282 283 284 285 286 287 288 289
                  style="width: 20%">
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
                    :value="item.dcode">
                  </el-option>
                </el-select>
290
              </div>
xiaomiao committed
291 292
            </el-form-item>
          </el-col>
xiaomiao committed
293
          <el-col :span="8">
xiaomiao committed
294
            <el-form-item label="分摊建筑面积:">
xiaomiao committed
295
              <div class="flex">
296 297
                <el-input v-model="ruleForm.fdcq2.ftjzmj"
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"></el-input>
xiaomiao committed
298
                <el-select
299
                  disabled
xiaomiao committed
300
                  v-model="mjdw"
xiaomiao committed
301 302 303 304 305 306 307 308
                  style="width: 20%">
                  <el-option
                    v-for="item in dictData['A7']"
                    :key="item.dcode"
                    :label="item.dname"
                    :value="item.dcode">
                  </el-option>
                </el-select>
309
              </div>
xiaomiao committed
310 311 312 313
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="竣工时间:">
314
              <el-date-picker
xiaomiao committed
315
                v-model="ruleForm.fdcq2.jgsj"
316
                class="width100"
xiaomiao committed
317 318 319
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd HH:mm:ss"
320
                format="yyyy-MM-dd">
xiaomiao committed
321
              </el-date-picker>
xiaomiao committed
322 323 324 325
            </el-form-item>
          </el-col>

          <el-col :span="8">
xiaomiao committed
326 327 328
            <el-form-item
              label="不动产权证号:"
              prop="qlxx.bdcqzh"
329
              :rules="rules.bdcqzhrules">
xiaomiao committed
330 331 332
              <el-input v-model="ruleForm.qlxx.bdcqzh"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
333 334 335 336 337 338
          <!-- <el-col :span="8">
            <el-form-item
              label="区县代码:"
              prop="qlxx.qxdm"
              :rules="rules.qxdmrules"
            >
xiaomiao committed
339 340
              <el-input v-model="ruleForm.qlxx.qxdm"></el-input>
            </el-form-item>
xiaomiao committed
341
          </el-col> -->
xiaomiao committed
342
          <el-col :span="8">
xiaomiao committed
343 344 345
            <el-form-item
              label="登记机构:"
              prop="qlxx.djjg"
346
              :rules="rules.djjgrules">
xiaomiao committed
347 348 349 350
              <el-input v-model="ruleForm.qlxx.djjg"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
351 352 353
            <el-form-item
              label="登簿人:"
              prop="qlxx.dbr"
354
              :rules="rules.dbrrules">
xiaomiao committed
355 356 357 358
              <el-input v-model="ruleForm.qlxx.dbr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
359 360 361
            <el-form-item
              label="登记时间:"
              prop="qlxx.djsj"
362
              :rules="rules.djsjrules">
xiaomiao committed
363 364 365
              <el-date-picker
                v-model="ruleForm.qlxx.djsj"
                type="date"
xiaomiao committed
366
                class="width100"
xiaomiao committed
367 368
                placeholder="选择日期"
                value-format="yyyy-MM-dd HH:mm:ss"
369
                format="yyyy-MM-dd">
xiaomiao committed
370
              </el-date-picker>
xiaomiao committed
371 372 373 374
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
375
          <el-col :span="24">
xiaomiao committed
376 377 378 379 380
            <el-form-item label="登记原因:">
              <el-input v-model="ruleForm.fdcq2.djyy"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
381 382
        <el-row>
          <el-col :span="24">
xiaomiao committed
383 384 385 386 387 388
            <el-form-item label="附记:">
              <el-input v-model="ruleForm.fdcq2.fj"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
xiaomiao committed
389 390 391
          土地用途
          <div class="triangle"></div>
        </div>
392
        <tdytTable
xiaomiao committed
393
          :tableData="ruleForm.tdytqxList"
xiaomiao committed
394
          @upDateTdytxxList="upDateTdytxxList"
395
          :ableOperation="ableOperation" />
xiaomiao committed
396
        <div class="slxx_title title-block">
xiaomiao committed
397 398 399 400 401 402
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="共有方式:">
403 404
              <el-radio-group
                :disabled="!ableOperation"
xiaomiao committed
405
                v-model="ruleForm.qlxx.gyfs">
xiaomiao committed
406 407 408 409 410 411 412
                <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>
xiaomiao committed
413
          <el-col :span="6" v-show="ruleForm.qlxx.gyfs != '0'">
414 415
            <el-form-item label="是否分别持证:">
              <el-radio-group
xiaomiao committed
416
                v-model="ruleForm.qlxx.sqfbcz"
417 418 419 420 421 422 423 424
                :disabled="!ableOperation">
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col
            :span="6"
xiaomiao committed
425
            v-show="ruleForm.qlxx.sqfbcz == '0' && ruleForm.qlxx.gyfs == '1'">
426 427 428 429 430 431 432 433 434 435 436 437 438 439
            <el-form-item label="持证人:">
              <el-select
                v-model="ruleForm.czr"
                placeholder="持证人"
                :disabled="!ableOperation">
                <el-option
                  v-for="item in czrOptions"
                  :key="item.zjh"
                  :label="item.sqrmc"
                  :value="item.zjh">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
xiaomiao committed
440 441
        </el-row>
        <qlrCommonTable
xiaomiao committed
442
          :tableData="ruleForm.qlrData"
xiaomiao committed
443
          @upDateQlrxxList="upDateQlrxxList"
xiaomiao committed
444
          :ableOperation="ableOperation"
xiaomiao committed
445
          :key="key"
446
          :gyfs="ruleForm.qlxx.gyfs" />
xiaomiao committed
447
      </div>
xiaomiao committed
448
      <el-row class="btn" v-if="ableOperation">
xiaomiao committed
449 450 451 452 453 454 455 456
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
457
  import { mapGetters } from "vuex";
458
  import ywmix from "@/views/ywbl/mixin/index"
459 460 461 462 463
  import { init, getSsQlxx, 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 {
464
    mixins: [ywmix],
465 466 467 468 469 470 471 472
    components: { qlrCommonTable, tdytTable, selectTable },
    computed: {
      ...mapGetters(["dictData", "flag"]),
      // 根据流程判断表单是否为只读
      editDisabled () {
        if (!this.ableOperation) {
          //只读状态
          return true;
xiaomiao committed
473
        }
474
        return false;
xiaomiao committed
475
      },
476 477 478
    },
    data () {
      return {
479
        mjdw: "1",
480 481 482 483
        ssqlxxshow: true,
        props: {
          label: "bdcqzh",
          value: "bdcdyid",
xiaomiao committed
484
        },
485 486 487 488 489 490 491 492 493 494
        // 键名转换,方法默认是label和children进行树状渲染
        normalizer (node) {
          //方法
          if (node.children == null || node.children == "null") {
            delete node.children;
          }
          return {
            id: node.dcode,
            label: node.dname,
          };
xiaomiao committed
495 496
        },

497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525
        //表单是否可操作
        propsParam: this.$attrs,
        // 登记类型
        djlxlist: [
          {
            dcode: "100",
            dname: "首次登记",
          },
          {
            dcode: "200",
            dname: "转移登记",
          },
          {
            dcode: "300",
            dname: "变更登记",
          },
          {
            dcode: "500",
            dname: "更正登记",
          },

          {
            dcode: "901",
            dname: "补证",
          },
          {
            dcode: "902",
            dname: "换证",
          },
xiaomiao committed
526
        ],
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
        // 权属状态
        qsztlist: [
          {
            dcode: "1",
            dname: "现势",
          },
          {
            dcode: "2",
            dname: "历史",
          },
        ],
        key: 0,
        tdxz: null,
        isShow: false,
        disabled: true,
        czrOptions: [],
        ssQlxxList: [],
544 545 546 547 548
        ruleForm: {
          fdcq2: {
            ftjzmj: ''
          }
        },
549 550 551 552 553 554 555 556 557 558 559 560 561 562
        ableOperation: false,
        //传递参数\
        rules: {
          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" }],
          fwjgrules: [{ required: true, message: "房屋结构", trigger: "change" }],
          djlxrules: [{ required: true, message: "登记类型", trigger: "change" }],
        },
      };
xiaomiao committed
563
    },
564 565 566 567
    created () { },
    mounted () {
      this.loadData();
      this.ableOperation = this.$parent.ableOperation;
xiaomiao committed
568
    },
569
    methods: {
yuanbo committed
570 571 572 573 574
      /**
       * @description: ssQlxxchange
       * @param {*} val
       * @author: renchao
       */
575 576
      ssQlxxchange (val) {
        this.ruleForm.ssQlxx = val;
xiaomiao committed
577
        this.ruleForm.qlxx.ssywh = val.ywh;
578
      },
yuanbo committed
579 580 581 582 583
      /**
       * @description: djlxchange
       * @param {*} val
       * @author: renchao
       */
584 585 586 587 588 589 590
      djlxchange (val) {
        if (val == null || val == 100) {
          this.ssqlxxshow = false;
        } else {
          this.ssqlxxshow = true;
        }
      },
yuanbo committed
591 592 593 594
      /**
       * @description: loadData
       * @author: renchao
       */
595 596 597 598 599 600
      loadData () {
        this.$startLoading();
        this.propsParam.isEdit = this.$parent.isEdit;
        init(this.propsParam).then((res) => {
          if (res.code == 200) {
            this.ruleForm = res.result;
601
            console.log(this.ruleForm, 'this.ruleForm');
602 603 604 605 606 607 608
            let djlx = this.ruleForm.qlxx.djlx;
            if (djlx == null || djlx == 100) {
              this.ssqlxxshow = false;
            }
            this.$endLoading();
            if (this.ruleForm.tdytqxList.length > 0) {
              this.tdxz = this.ruleForm.tdytqxList[0].qlxzbm;
xiaomiao committed
609

610 611 612 613
            } else {
              this.tdxz = null;
            }
            this.isShow = true;
xiaomiao committed
614
          }
615
        });
xiaomiao committed
616
        //获取主体信息
617 618 619 620 621 622
        getSsQlxx({
          bdcdyid: this.propsParam.bdcdyid,
          qllx: this.propsParam.qllx,
        }).then((res) => {
          if (res.code == 200) {
            this.ssQlxxList = res.result;
xiaomiao committed
623
          }
624 625 626
        });
      },
      // 更新土地用途信息
yuanbo committed
627 628 629 630 631
      /**
       * @description: 更新土地用途信息
       * @param {*} val
       * @author: renchao
       */
632 633 634 635 636
      upDateTdytxxList (val) {
        this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
        this.key++;
      },
      // 更新权利人信息
yuanbo committed
637 638 639 640 641
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
642 643 644 645 646 647
      upDateQlrxxList (val) {
        this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val));
        this.czrOptions = this.ruleForm.qlrData;
        this.key++;
      },
      // 更新义务人信息
yuanbo committed
648 649 650 651 652
      /**
       * @description: 更新义务人信息
       * @param {*} val
       * @author: renchao
       */
653 654 655 656
      upDateYwrxxList (val) {
        this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val));
        this.key++;
      },
yuanbo committed
657 658 659 660
      /**
       * @description: onSubmit
       * @author: renchao
       */
661 662 663 664
      onSubmit () {
        this.$refs.ruleForm.validate((valid) => {
          if (valid) {
            if (this.ruleForm.qlrData.length == 0) {
xiaomiao committed
665 666
              this.$message({
                showClose: true,
667
                message: "请确认权利人信息",
xiaomiao committed
668 669 670 671
                type: "error",
              });
              return false;
            }
672
            if (this.ruleForm.tdytqxList.length == 0 && !this.tdxz) {
xiaomiao committed
673 674
              this.$message({
                showClose: true,
675 676
                message: "请补充土地用途信息",
                type: "error",
xiaomiao committed
677
              });
678 679 680
              return false;
            }
            if (!this.tdxz) {
xiaomiao committed
681 682
              this.$message({
                showClose: true,
683
                message: "请补充土地性质",
xiaomiao committed
684 685
                type: "error",
              });
686
              return false;
xiaomiao committed
687
            }
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728
            this.ruleForm.tdytqxList = this.ruleForm.tdytqxList.map((item) => {
              return {
                ...item,
                qlxzbm: this.tdxz,
              };
            });
            if (this.ruleForm.qlxx.gyfs == "0") {
              if (this.ruleForm.qlrData.length > 1) {
                this.$message({
                  showClose: true,
                  message: "共有方式:单独所有,权利人只能是一个人",
                  type: "error",
                });
                return false;
              }
              this.ruleForm.qlrData[0].sfczr = "1";
            }
            // if (this.ruleForm.qlxx.gyfs == "1") {
            //   //是否分别持证
            //   if (this.ruleForm.qlxx.sqfbcz == "1") {
            //     //是
            //     this.ruleForm.qlrData.forEach((item, index) => {
            //       item.sfczr = "1";
            //     });
            //   } else {
            //     this.ruleForm.qlrData.forEach((item, index) => {
            //       if (item.zjh == this.ruleForm.czr) {
            //         item.sfczr = "1";
            //       } else {
            //         item.sfczr = "0";
            //       }
            //     });
            //   }
            // }
            save(this.ruleForm).then((res) => {
              if (res.code === 200) {
                this.$message({
                  showClose: true,
                  message: "保存成功!",
                  type: "success",
                });
729
                this.$parent.changeywh()
730 731 732 733 734 735 736 737 738 739 740 741 742 743
                this.$store.dispatch("user/refreshPage", true);
              } else {
                this.$message({
                  showClose: true,
                  message: res.message,
                  type: "error",
                });
              }
            });
          } else {
            return false;
          }
        });
      },
xiaomiao committed
744
    },
745
  };
xiaomiao committed
746 747
</script>
<style scoped lang="scss">
748 749
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
xiaomiao committed
750
  .el-date-editor.el-input {
751 752 753 754 755
    width: 100%;
  }
  .el-table__row {
    height: 30px !important;
  }
xiaomiao committed
756
</style>