Blame view

src/views/djbworkflow/djbBook/components/blxxtabs/jsydsyq.vue 14.3 KB
xiaomiao committed
1 2 3
<!--
 * @Description:
 * @Autor: renchao
xiaomiao committed
4
 * @LastEditTime: 2023-06-25 15:52:42
xiaomiao committed
5 6 7 8 9 10 11 12 13 14 15
-->
<template>
  <!-- 受理信息 -->
  <div class="slxx">
    <el-form
      :model="ruleForm"
      :rules="rules"
      class="loadingtext"
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
xiaomiao committed
16
      inline-message
xiaomiao committed
17
      label-width="145px"
xiaomiao committed
18
    >
xiaomiao committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
      <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>
        <div class="slxx_title title-block">
tianhaohao@pashanhoo.com committed
42
          建设用地、宅基地使用权信息
xiaomiao committed
43 44 45 46 47 48 49 50 51 52 53 54 55
          <div class="triangle"></div>
        </div>
        <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>
xiaomiao committed
56
          <el-col :span="8">
xiaomiao committed
57 58 59 60 61 62 63 64 65 66 67 68 69
            <el-form-item label="上手业务号:">
              <el-input v-model="ruleForm.qlxx.ssywh"></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.qlxx.qllxmc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="登记类型:">
xiaomiao committed
70
              <el-select v-model="ruleForm.qlxx.djlx">
xiaomiao committed
71
                <el-option
xiaomiao committed
72
                  v-for="item in djlxlist"
xiaomiao committed
73 74 75 76
                  :key="item.dcode"
                  :label="item.dname"
                  :value="item.dcode"
                >
xiaomiao committed
77 78
                </el-option>
              </el-select>
xiaomiao committed
79 80
            </el-form-item>
          </el-col>
xiaomiao committed
81
          <el-col :span="8">
xiaomiao committed
82 83
            <el-form-item label="权属状态:">
              <el-select v-model="ruleForm.qlxx.qszt">
xiaomiao committed
84 85 86 87 88 89
                <el-option
                  v-for="item in qsztlist"
                  :key="item.dcode"
                  :label="item.dname"
                  :value="item.dcode"
                >
xiaomiao committed
90 91 92 93
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
xiaomiao committed
94

xiaomiao committed
95
          <el-col :span="8">
xiaomiao committed
96 97 98 99 100
            <el-form-item label="登记原因:">
              <el-input v-model="ruleForm.jsydsyq.djyy"></el-input>
            </el-form-item>
          </el-col>
          <!-- <el-col :span="8">
xiaomiao committed
101 102 103
            <el-form-item label="房地坐落:">
              <el-input v-model="ruleForm.qlxx.zl"></el-input>
            </el-form-item>
xiaomiao committed
104
          </el-col> -->
xiaomiao committed
105
          <el-col :span="8">
tianhaohao@pashanhoo.com committed
106 107
            <el-form-item label="使用权面积:">
              <el-input v-model="ruleForm.jsydsyq.syqmj"></el-input>
xiaomiao committed
108
            </el-form-item>
xiaomiao committed
109
          </el-col>
xiaomiao committed
110
          <el-col :span="8">
xiaomiao committed
111 112 113 114
            <el-form-item label="使用权起始时间">
              <el-input v-model="ruleForm.jsydsyq.syqqssj"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
115
          <el-col :span="8">
xiaomiao committed
116 117 118 119
            <el-form-item label="使用权结束时间">
              <el-input v-model="ruleForm.jsydsyq.syqjssj"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
120
          <el-col :span="8">
xiaomiao committed
121 122 123 124 125 126 127 128 129
            <el-form-item label="土地使用期限">
              <el-input v-model="ruleForm.jsydsyq.tdsyqx"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="土地用途">
              <el-input v-model="ruleForm.jsydsyq.yt"></el-input>
            </el-form-item>
          </el-col>
xiaomiao committed
130
          <el-col :span="8">
xiaomiao committed
131
            <el-form-item label="取得价格:">
xiaomiao committed
132 133 134 135 136
              <div style="display: flex">
                <el-input
                  v-model="ruleForm.jsydsyq.qdjg"
                  style="width: 500%"
                ></el-input>
xiaomiao committed
137
                <el-select v-model="ruleForm.jsydsyq.jedw">
xiaomiao committed
138 139 140 141 142 143
                  <el-option
                    v-for="item in dictData['A57']"
                    :key="item.dcode"
                    :label="item.dname"
                    :value="item.dcode"
                  >
xiaomiao committed
144 145
                  </el-option>
                </el-select>
xiaomiao committed
146
              </div>
xiaomiao committed
147 148
            </el-form-item>
          </el-col>
xiaomiao committed
149

xiaomiao committed
150
          <el-col :span="8">
xiaomiao committed
151 152 153 154 155
            <el-form-item
              label="不动产权证号:"
              prop="qlxx.bdcqzh"
              :rules="rules.bdcqzhrules"
            >
xiaomiao committed
156 157 158 159
              <el-input v-model="ruleForm.qlxx.bdcqzh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
160 161 162 163 164
            <el-form-item
              label="区县代码:"
              prop="qlxx.qxdm"
              :rules="rules.qxdmrules"
            >
xiaomiao committed
165 166 167 168
              <el-input v-model="ruleForm.qlxx.qxdm"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
169 170 171 172 173
            <el-form-item
              label="登记机构:"
              prop="qlxx.djjg"
              :rules="rules.djjgrules"
            >
xiaomiao committed
174 175 176 177
              <el-input v-model="ruleForm.qlxx.djjg"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
178 179 180 181 182
            <el-form-item
              label="登簿人:"
              prop="qlxx.dbr"
              :rules="rules.dbrrules"
            >
xiaomiao committed
183 184 185 186
              <el-input v-model="ruleForm.qlxx.dbr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
xiaomiao committed
187 188 189 190 191
            <el-form-item
              label="登记时间:"
              prop="qlxx.djsj"
              :rules="rules.djsjrules"
            >
xiaomiao committed
192 193 194 195 196 197 198 199
             <el-date-picker
                v-model="ruleForm.qlxx.djsj"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd HH:mm:ss"
                format="yyyy-MM-dd"
              >
              </el-date-picker>
xiaomiao committed
200 201 202
            </el-form-item>
          </el-col>
        </el-row>
xiaomiao committed
203
        <el-row>
xiaomiao committed
204
          <el-col :span="24">
xiaomiao committed
205
            <el-form-item label="附记:">
xiaomiao committed
206
              <el-input v-model="ruleForm.jsydsyq.fj"></el-input>
xiaomiao committed
207 208
            </el-form-item>
          </el-col>
xiaomiao committed
209
        </el-row>
xiaomiao committed
210 211 212 213 214 215 216 217
        <div class="slxx_title title-block">
          土地用途
          <div class="triangle"></div>
        </div>
        <tdytTable
          :tableData="ruleForm.tdytqxList"
          @upDateTdytxxList="upDateTdytxxList"
        />
xiaomiao committed
218
        <div class="slxx_title title-block">
xiaomiao committed
219 220 221 222 223 224 225 226
          权利人信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="共有方式:">
              <el-radio-group
                :disabled="$route.query.viewtype == 0"
xiaomiao committed
227 228
                v-model="ruleForm.qlxx.gyqk"
              >
xiaomiao committed
229 230 231 232 233 234 235
                <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
236
          <el-col :span="6" v-show="ruleForm.qlxx.gyfs == '1'">
xiaomiao committed
237 238
            <el-form-item label="是否分别持证:">
              <el-radio-group v-model="ruleForm.qlxx.sqfbcz">
xiaomiao committed
239 240
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
xiaomiao committed
241 242
              </el-radio-group>
            </el-form-item>
xiaomiao committed
243
          </el-col>
xiaomiao committed
244 245 246 247
          <el-col
            :span="6"
            v-show="ruleForm.qlxx.sqfbcz == '0' && ruleForm.qlxx.gyfs == '1'"
          >
xiaomiao committed
248 249
            <el-form-item label="持证人:">
              <el-select v-model="ruleForm.czr" placeholder="持证人">
xiaomiao committed
250 251 252 253 254 255
                <el-option
                  v-for="item in czrOptions"
                  :key="item.zjh"
                  :label="item.sqrmc"
                  :value="item.zjh"
                >
xiaomiao committed
256 257 258
                </el-option>
              </el-select>
            </el-form-item>
xiaomiao committed
259
          </el-col>
xiaomiao committed
260 261
        </el-row>
        <qlrCommonTable
xiaomiao committed
262
          :tableData="ruleForm.qlrData"
xiaomiao committed
263 264 265
          @upDateQlrxxList="upDateQlrxxList"
          :key="key"
          :viewtype="$route.query.viewtype"
xiaomiao committed
266 267
          :gyfs="ruleForm.qlxx.gyfs"
        />
xiaomiao committed
268 269

      </div>
xiaomiao committed
270
      <el-row class="btn" v-if="!$route.query.viewtype">
xiaomiao committed
271 272 273 274 275 276 277 278
        <el-form-item>
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
xiaomiao committed
279
import store from "@/store/index.js";
xiaomiao committed
280
import { mapGetters } from "vuex";
xiaomiao committed
281
import { init, save } from "@/api/djbbl.js";
xiaomiao committed
282
import qlrCommonTable from "@/views/djbworkflow/components/qlrCommonTable";
xiaomiao committed
283
import tdytTable from "@/views/workflow/components/tdytTable";
xiaomiao committed
284
export default {
xiaomiao committed
285
  components: { qlrCommonTable, tdytTable },
xiaomiao committed
286 287 288 289 290
  computed: {
    ...mapGetters(["dictData", "flag"]),
  },
  data() {
    return {
xiaomiao committed
291 292 293 294 295 296 297 298 299 300 301
      // 键名转换,方法默认是label和children进行树状渲染
      normalizer(node) {
        //方法
        if (node.children == null || node.children == "null") {
          delete node.children;
        }
        return {
          id: node.dcode,
          label: node.dname,
        };
      },
xiaomiao committed
302 303 304 305
      //表单是否可操作
      propsParam: this.$attrs,
      ableOperation: true,
      key: 0,
xiaomiao committed
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
      // 登记类型
      djlxlist: [
        {
          dcode: "100",
          dname: "首次登记",
        },
        {
          dcode: "200",
          dname: "转移登记",
        },
        {
          dcode: "300",
          dname: "变更登记",
        },
        {
          dcode: "500",
          dname: "更正登记",
        },

        {
          dcode: "901",
          dname: "补证",
        },
        {
          dcode: "902",
          dname: "换证",
        },
      ],
xiaomiao committed
334
      // 权属状态
xiaomiao committed
335 336 337 338 339 340 341 342 343 344
      qsztlist: [
        {
          dcode: "1",
          dname: "现势",
        },
        {
          dcode: "2",
          dname: "历史",
        },
      ],
xiaomiao committed
345
      tdxz: null,
xiaomiao committed
346 347 348 349 350
      isShow: false,
      disabled: true,
      czrOptions: [],
      ruleForm: {},
      //传递参数\
xiaomiao committed
351 352 353 354 355 356 357 358 359
      rules: {
        bdcqzhrules: [
          { required: true, message: "不动产权证号:", trigger: "change" },
        ],
        qxdmrules: [{ required: true, message: "区县代码", trigger: "blur" }],
        djjgrules: [{ required: true, message: "登记机构", trigger: "change" }],
        dbrrules: [{ required: true, message: "登簿人", trigger: "blur" }],
        djsjrules: [{ required: true, message: "登记时间", trigger: "change" }],
      },
xiaomiao committed
360 361 362 363 364 365 366
    };
  },
  created() {
    this.loadData();
  },
  mounted() {},
  methods: {
xiaomiao committed
367 368 369 370
    // 字典
    getDictData(val) {
      return store.getters.dictData[val];
    },
xiaomiao committed
371
    loadData() {
xiaomiao committed
372

xiaomiao committed
373
      this.propsParam.isEdit = this.$parent.isEdit;
xiaomiao committed
374
      init(this.propsParam).then((res) => {
xiaomiao committed
375 376
        if (res.code == 200) {
          this.ruleForm = res.result;
xiaomiao committed
377 378 379 380
          if (this.ruleForm.tdytqxList.length > 0) {
            this.tdxz = this.ruleForm.tdytqxList[0].qlxzbm;
          } else {
            this.tdxz = null;
xiaomiao committed
381
          }
xiaomiao committed
382 383 384 385
          this.isShow = true;
        }
      });
    },
xiaomiao committed
386
    // 更新土地用途信息
xiaomiao committed
387 388 389 390
    upDateTdytxxList(val) {
      this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
      this.key++;
    },
xiaomiao committed
391 392
    // 更新权利人信息
    upDateQlrxxList(val) {
xiaomiao committed
393 394
      this.ruleForm.qlrData && (this.ruleForm.qlrData = _.cloneDeep(val));
      this.czrOptions = this.ruleForm.qlrData;
xiaomiao committed
395 396 397 398
      this.key++;
    },
    // 更新义务人信息
    upDateYwrxxList(val) {
xiaomiao committed
399
      this.ruleForm.ywrData && (this.ruleForm.ywrData = _.cloneDeep(val));
xiaomiao committed
400 401 402
      this.key++;
    },
    onSubmit() {
xiaomiao committed
403 404 405 406 407 408 409 410 411 412
      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
          if (this.ruleForm.qlrData.length == 0) {
            this.$message({
              showClose: true,
              message: "请确认权利人信息",
              type: "error",
            });
            return false;
          }
xiaomiao committed
413

xiaomiao committed
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
          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";
              });
xiaomiao committed
432
            } else {
xiaomiao committed
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455
              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",
              });
              this.$store.dispatch("user/refreshPage", true);
            } else {
              this.$message({
                showClose: true,
                message: res.message,
                type: "error",
              });
xiaomiao committed
456 457 458
            }
          });
        } else {
xiaomiao committed
459
          return false;
xiaomiao committed
460 461 462 463 464 465 466 467 468 469
        }
      });
    },
  },
};
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
</style>