Blame view

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

          <el-col :span="8">
xiaomiao committed
330 331 332
            <el-form-item
              label="不动产权证号:"
              prop="qlxx.bdcqzh"
333
              :rules="rules.bdcqzhrules">
xiaomiao committed
334 335 336
              <el-input v-model="ruleForm.qlxx.bdcqzh"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
337 338 339 340 341 342
          <!-- <el-col :span="8">
            <el-form-item
              label="区县代码:"
              prop="qlxx.qxdm"
              :rules="rules.qxdmrules"
            >
xiaomiao committed
343 344
              <el-input v-model="ruleForm.qlxx.qxdm"></el-input>
            </el-form-item>
xiaomiao committed
345
          </el-col> -->
xiaomiao committed
346
          <el-col :span="8">
xiaomiao committed
347 348 349
            <el-form-item
              label="登记机构:"
              prop="qlxx.djjg"
350
              :rules="rules.djjgrules">
xiaomiao committed
351 352 353 354
              <el-input v-model="ruleForm.qlxx.djjg"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
355 356 357
            <el-form-item
              label="登簿人:"
              prop="qlxx.dbr"
358
              :rules="rules.dbrrules">
xiaomiao committed
359 360 361 362
              <el-input v-model="ruleForm.qlxx.dbr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
363 364 365
            <el-form-item
              label="登记时间:"
              prop="qlxx.djsj"
366
              :rules="rules.djsjrules">
xiaomiao committed
367 368 369
              <el-date-picker
                v-model="ruleForm.qlxx.djsj"
                type="date"
xiaomiao committed
370
                class="width100"
xiaomiao committed
371 372
                placeholder="选择日期"
                value-format="yyyy-MM-dd HH:mm:ss"
373
                format="yyyy-MM-dd">
xiaomiao committed
374
              </el-date-picker>
xiaomiao committed
375 376 377 378
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
379
          <el-col :span="24">
xiaomiao committed
380 381 382 383 384
            <el-form-item label="登记原因:">
              <el-input v-model="ruleForm.fdcq2.djyy"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
385 386
        <el-row>
          <el-col :span="24">
xiaomiao committed
387
            <el-form-item label="附记:">
renchao@pashanhoo.com committed
388
              <el-input v-model="ruleForm.fdcq2.fj" type="textarea" maxlength="500" show-word-limit></el-input>
xiaomiao committed
389 390 391 392
            </el-form-item>
          </el-col>
        </el-row>
        <div class="slxx_title title-block">
xiaomiao committed
393 394 395
          土地用途
          <div class="triangle"></div>
        </div>
396
        <tdytTable
xiaomiao committed
397
          :tableData="ruleForm.tdytqxList"
xiaomiao committed
398
          @upDateTdytxxList="upDateTdytxxList"
399
          :ableOperation="ableOperation" />
xiaomiao committed
400
        <div class="slxx_title title-block">
xiaomiao committed
401 402 403 404 405 406
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="共有方式:">
407 408
              <el-radio-group
                :disabled="!ableOperation"
xiaomiao committed
409
                v-model="ruleForm.qlxx.gyfs">
xiaomiao committed
410 411 412 413 414 415 416 417 418
                <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
xiaomiao committed
419
          :tableData="ruleForm.qlrData"
xiaomiao committed
420
          @upDateQlrxxList="upDateQlrxxList"
xiaomiao committed
421
          :ableOperation="ableOperation"
xiaomiao committed
422
          :key="key"
xiaomiao committed
423
          :gyfs="ruleForm.qlxx.gyfs" />
xiaomiao committed
424
      </div>
xiaomiao committed
425
      <el-row class="btn" v-if="ableOperation">
xiaomiao committed
426 427 428 429 430 431 432 433
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
xiaomiao committed
434
  import ywmix from "./dataprocessing";
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
  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 },
    data () {
      return {
        mjdw: "1",
        // 键名转换,方法默认是label和children进行树状渲染
        normalizer (node) {
          //方法
          if (node.children == null || node.children == "null") {
            delete node.children;
          }
          return {
            id: node.dcode,
            label: node.dname,
          };
xiaomiao committed
455
        },
456 457 458 459 460 461
        key: 0,
        tdxz: null,
        isShow: false,
        disabled: true,
        czrOptions: [],
        ssQlxxList: [],
xiaomiao committed
462
        ruleForm: {},
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
        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" }],
          fwjgrules: [{ required: true, message: "房屋结构", trigger: "change" }],
          djlxrules: [{ required: true, message: "登记类型", trigger: "change" }],
          ywhrules: [{ required: true, message: "业务号", trigger: "blur" }],
        },
      };
xiaomiao committed
481
    },
482 483 484 485
    created () { },
    mounted () {
      this.loadData();
      this.ableOperation = this.$parent.ableOperation;
xiaomiao committed
486
    },
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505
    methods: {
      /**
       * @description: ssQlxxchange
       * @param {*} val
       * @author: renchao
       */
      ssQlxxchange (val) {
        this.ruleForm.ssQlxx = val;
        this.ruleForm.qlxx.ssywh = val.ywh;
        this.ssQlxxchangediolog(val);
      },
      // 弹框事件
      ssQlxxchangediolog (val) {
        this.$confirm("是否将上手权利信息同步到表单", "提示", {
          iconClass: "el-icon-question", //自定义图标样式
          confirmButtonText: "确认", //确认按钮文字更换
          cancelButtonText: "取消", //取消按钮文字更换
          showClose: true, //是否显示右上角关闭按钮
          type: "warning",
xiaomiao committed
506 507


508 509 510 511 512 513 514 515 516 517 518
        }).then(() => {
          getQlxxByQlxxBsm({ qlxxBsm: val.bsmQlxx }).then((res) => {
            if (res.code == 200) {
              this.nowlist = res.result;
              for (var key in this.ruleForm.fdcq2) {
                if (
                  this.ruleForm.fdcq2[key] == "" ||
                  this.ruleForm.fdcq2[key] == null
                ) {
                  this.ruleForm.fdcq2[key] = this.nowlist.fdcq2[key];
                }
xiaomiao committed
519
              }
520 521 522
              for (var key in this.ruleForm.qlxx) {
                if (
                  this.ruleForm.qlxx[key] == "" ||
xiaomiao committed
523
                  this.ruleForm.qlxx[key] == null &&
524 525 526 527 528 529 530
                  key != "ywh" &&
                  key != "dbr" &&
                  key != "djsj" &&
                  key != "ssywh" &&
                  key != "ssywh" &&
                  key != "bdcqzh") {
                  this.ruleForm.qlxx[key] = this.nowlist.qlxx[key];
xiaomiao committed
531

xiaomiao committed
532
                }
533 534 535 536 537 538 539 540 541 542 543 544 545 546
              }
              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
547
            }
548 549
          });
        }).catch(() => {
xiaomiao committed
550 551 552 553
          this.$message({
            type: "info",
            message: "已取消同步",
          });
554 555 556 557 558 559 560
        });
      },
      /**
       * @description: djlxchange
       * @param {*} val
       * @author: renchao
       */
561 562 563 564 565
      djlxchange (val) {
        if (val == null || val == 100) {
          this.ssqlxxshow = false;
        } else {
          this.ssqlxxshow = true;
xiaomiao committed
566
        }
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593
      },
      /**
       * @description: loadData
       * @author: renchao
       */
      loadData () {
        this.$startLoading();
        this.propsParam.isEdit = this.$parent.isEdit;
        init(this.propsParam).then((res) => {
          if (res.code == 200) {
            this.ruleForm = res.result;
            let djlx = this.ruleForm.qlxx.djlx;
            if (djlx == null || djlx == 100) {
              this.ssqlxxshow = false;
            }
            this.ruleForm.fdcq2.jedw = "1";
            this.$endLoading();
            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;
              }
xiaomiao committed
594 595
            });
          }
596 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 628 629 630 631 632 633 634 635 636
        });
      },
      // 更新土地用途信息
      /**
       * @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.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val));
        this.czrOptions = this.ruleForm.qlrData;
        this.key++;
      },
      // 更新义务人信息
      /**
       * @description: 更新义务人信息
       * @param {*} val
       * @author: renchao
       */
      upDateYwrxxList (val) {
        this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val));
        this.key++;
      },
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        this.$refs.ruleForm.validate((valid) => {
          if (valid) {
            if (this.ruleForm.qlrData.length == 0) {
xiaomiao committed
637 638
              this.$message({
                showClose: true,
639
                message: "请确认权利人信息",
xiaomiao committed
640 641 642 643
                type: "error",
              });
              return false;
            }
644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669
            if (this.ruleForm.tdytqxList.length == 0) {
              this.$message({
                showClose: true,
                message: "请补充土地用途信息",
                type: "error",
              });
              return false;
            }
            if (!this.ruleForm.fdcq2.tdxz) {
              this.$message({
                showClose: true,
                message: "请补充土地性质",
                type: "error",
              });
              return false;
            }
            if (this.ruleForm.qlxx.gyfs == "0") {
              if (this.ruleForm.qlrData.length > 1) {
                this.$message({
                  showClose: true,
                  message: "请确认权利人信息",
                  type: "error",
                });
                return false;
              }
            }
xiaomiao committed
670
            if (this.ruleForm.qlxx.gyfs == "0") {
671 672 673 674 675 676 677 678 679
              if (this.ruleForm.qlrData.length > 1) {
                this.$message({
                  showClose: true,
                  message: "共有方式:单独所有,权利人只能是一个人",
                  type: "error",
                });
                return false;
              }
            } else {
xiaomiao committed
680
              if (this.ruleForm.qlrData.length <= 1) {
681 682 683 684 685 686 687
                this.$message({
                  showClose: true,
                  message: "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
                  type: "error",
                });
                return false;
              }
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704
            }
            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",
                });
              }
705 706 707 708 709 710
            });
          } else {
            return false;
          }
        });
      },
xiaomiao committed
711
    },
712
  };
xiaomiao committed
713 714
</script>
<style scoped lang="scss">
715 716 717 718 719 720 721 722
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
  .el-date-editor.el-input {
    width: 100%;
  }
  .el-table__row {
    height: 30px !important;
  }
xiaomiao committed
723
</style>