Blame view

src/views/ywbl/slsqxx/jsydsyq/slxx300.vue 12.8 KB
xiaomiao committed
1 2
0
<!--
xiaomiao committed
3
 * @Description:
4
 * @Autor: renchao
renchao@pashanhoo.com committed
5
 * @LastEditTime: 2023-08-22 16:25:54
6
-->
7 8
<template>
  <!-- 受理信息 -->
9
  <div class="slxx loadingtext">
xiaomiao committed
10 11 12 13 14 15
    <el-form
      :model="ruleForm"
      :rules="rules"
      ref="ruleForm"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
16
      label-width="120px">
17
      <div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
18
        <div class="slxx_title title-block">
19
          申请业务信息
20 21 22 23
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="8">
24
            <el-form-item label="业务号:">
tianhaohao@pashanhoo.com committed
25
              <el-input disabled v-model="ruleForm.flow.ywh"></el-input>
26 27 28
            </el-form-item>
          </el-col>
          <el-col :span="8">
29
            <el-form-item label="受理人员:">
30
              <el-input disabled v-model="ruleForm.slsq.slry"></el-input>
31 32 33
            </el-form-item>
          </el-col>
          <el-col :span="8">
34
            <el-form-item label="受理时间:">
35
              <el-input disabled v-model="ruleForm.slsq.slsj"></el-input>
36 37 38
            </el-form-item>
          </el-col>
        </el-row>
39
        <el-row :gutter="10">
40
          <el-col :span="8">
41
            <el-form-item label="权利类型:">
tianhaohao@pashanhoo.com committed
42
              <el-input disabled v-model="ruleForm.sldy.qllxmc"></el-input>
43 44 45
            </el-form-item>
          </el-col>
          <el-col :span="8">
46
            <el-form-item label="登记类型:">
tianhaohao@pashanhoo.com committed
47
              <el-input disabled v-model="ruleForm.sldy.djlxmc"></el-input>
48 49 50
            </el-form-item>
          </el-col>
          <el-col :span="8">
51
            <el-form-item label="登记情形:">
52
              <el-input disabled v-model="ruleForm.slsq.djqxmc"></el-input>
53 54 55
            </el-form-item>
          </el-col>
        </el-row>
xiaomiao committed
56 57
        <div
          class="slxx_title title-block flex"
58
          style="justify-content: space-between">
59
          不动产单元情况
60
          <el-button @click="compare">变化情况对比+</el-button>
61 62 63
        </div>
        <el-row :gutter="10">
          <el-col :span="8">
64
            <el-form-item label="原不动产权证号:">
65
              <el-input disabled v-model="ruleForm.sldy.ybdcqzsh"></el-input>
66 67 68
            </el-form-item>
          </el-col>
          <el-col :span="8">
69
            <el-form-item label="不动产单元号:">
田浩浩 committed
70
              <el-input disabled v-model="ruleForm.qlxx.bdcdyh"></el-input>
71 72 73
            </el-form-item>
          </el-col>
          <el-col :span="8">
74
            <el-form-item label="权利性质:">
田浩浩 committed
75
              <el-input disabled v-model="ruleForm.zdjbxx.qlxzmc"></el-input>
76 77 78 79 80
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
81
            <el-form-item label="宗地面积:">
田浩浩 committed
82
              <el-input disabled v-model="ruleForm.zdjbxx.zdmj"></el-input>
83 84 85
            </el-form-item>
          </el-col>
          <el-col :span="8">
86
            <el-form-item label="土地用途:">
田浩浩 committed
87
              <el-input disabled v-model="ruleForm.qlxx.ytmc"></el-input>
88 89 90
            </el-form-item>
          </el-col>
          <el-col :span="8">
91
            <el-form-item label="权利设定方式:">
田浩浩 committed
92
              <el-input disabled v-model="ruleForm.zdjbxx.qlsdfsmc"></el-input>
93 94 95 96 97
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
98
            <el-form-item label="取得价格:">
xiaomiao committed
99 100
              <div style="display: flex">
                <el-input
xiaomiao committed
101
                  maxlength="11"
xiaomiao committed
102 103
                  v-model="ruleForm.jsydsyq.qdjg"
                  style="width: 500%"
104
                  oninput="value = (value.match(/^\d*(\.?\d{0,2})/g)[0]) || null"
105
                  disabled></el-input>
蔡俊立 committed
106
                <el-select v-model="ruleForm.jsydsyq.jedw" disabled>
xiaomiao committed
107 108 109 110
                  <el-option
                    v-for="item in dictData['A57']"
                    :key="item.dcode"
                    :label="item.dname"
111
                    :value="item.dcode">
蔡俊立 committed
112 113 114
                  </el-option>
                </el-select>
              </div>
115 116 117 118
            </el-form-item>
          </el-col>

          <el-col :span="16">
119
            <el-form-item label="坐落:">
120
              <el-input disabled v-model="ruleForm.sldy.zl"></el-input>
121 122 123 124 125
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col>
126
            <el-form-item label="附记:" prop="fj">
xiaomiao committed
127
              <el-input
xiaomiao committed
128 129 130
                type="textarea"
                maxlength="500"
                show-word-limit
xiaomiao committed
131
                v-model="ruleForm.jsydsyq.fj"
132
                :disabled="!viewEdit"></el-input>
133 134 135
            </el-form-item>
          </el-col>
        </el-row>
136
        <div class="slxx_title title-block">
xiaomiao committed
137 138 139 140 141
          土地用途
          <div class="triangle"></div>
        </div>
        <tdytTable
          :tableData="ruleForm.tdytqxList"
142
          :ableOperation="viewEdit"
143
          @upDateTdytxxList="upDateTdytxxList" />
144
        <div class="slxx_title title-block">
145 146
          权利人信息
          <div class="triangle"></div>
147
        </div>
148
        <el-row :gutter="10">
149
          <el-col :span="12">
150
            <el-form-item label="共有方式:">
xiaomiao committed
151
              <el-radio-group
152
                :disabled="!viewEdit"
153
                v-model="ruleForm.sldy.gyfs">
154 155 156 157
                <el-radio label="0">单独所有</el-radio>
                <el-radio label="1">共同共有</el-radio>
                <el-radio label="2">按份所有</el-radio>
                <el-radio label="3">其它共有</el-radio>
158 159 160
              </el-radio-group>
            </el-form-item>
          </el-col>
161
          <el-col :span="6" v-show="ruleForm.sldy.gyfs != '0'">
162
            <el-form-item label="是否分别持证:">
xiaomiao committed
163 164
              <el-radio-group
                v-model="ruleForm.sldy.sqfbcz"
xiaomiao committed
165
                :disabled="!viewEdit"
166
                @input="updaterow()">
167 168
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
169 170 171
              </el-radio-group>
            </el-form-item>
          </el-col>
172 173
          <el-col
            :span="6"
174
            v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
175
            <el-form-item label="持证人:">
xiaomiao committed
176
              <el-select
xiaomiao committed
177
                v-model="czr"
xiaomiao committed
178
                placeholder="持证人"
179
                :disabled="!viewEdit">
xiaomiao committed
180 181
                <el-option
                  v-for="item in czrOptions"
182 183
                  :key="item.zjh"
                  :label="item.sqrmc"
184
                  :value="item.zjh">
185 186 187 188 189
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
xiaomiao committed
190 191
        <qlrCommonTable
          :tableData="ruleForm.qlrList"
192
          :disabled="viewEdit"
xiaomiao committed
193
          @upDateQlrxxList="upDateQlrxxList"
194
          :gyfs="ruleForm.sldy.gyfs" />
195 196 197 198 199 200
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col>
201
            <el-form-item label="登记原因:" prop="djyy">
xiaomiao committed
202 203 204
              <el-input
                class="textArea"
                type="textarea"
xiaomiao committed
205 206
                maxlength="500"
                show-word-limit
207
                :disabled="!viewEdit"
208
                v-model="ruleForm.jsydsyq.djyy">
209 210 211 212 213
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
214
      <el-row class="btn" v-if="viewEdit">
215
        <el-form-item>
216 217 218 219 220 221 222
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
      </el-row>
    </el-form>
  </div>
</template>
<script>
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
  import { mapGetters } from "vuex";
  import ywmix from "@/views/ywbl/mixin/index";
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
  import tdytTable from "@/views/workflow/components/tdytTable";
  import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js";
  export default {
    mixins: [ywmix],
    mounted () {
      this.viewEdit = this.$parent.currentSelectTab.ableOperation;
      this.propsParam = this.$attrs;
      var formdata = new FormData();
      this.$startLoading();
      formdata.append("bsmSldy", this.propsParam.bsmSldy);
      formdata.append("djlx", this.propsParam.djlx);
      formdata.append("isEdit", this.viewEdit);
      Init(formdata).then((res) => {
        if (res.code === 200 && res.result) {
          this.ruleForm = res.result;
          this.czrOptions = this.ruleForm.qlrList;
242
        }
243 244 245 246 247 248
        this.ruleForm.qlrList.forEach((item) => {
          if (item.sfczr == 1) {
            this.czr = item.zjh
          }
        });
        this.$endLoading();
249 250
      });
    },
251 252 253
    components: { qlrCommonTable, tdytTable },
    computed: {
      ...mapGetters(["dictData", "flag"]),
254
    },
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
    data () {
      return {
        //表单是否可操作
        viewEdit: false,
        disabled: true,
        czrOptions: [],
        czr: "",
        ruleForm: {
          slywxx: {},
          qlxx: {},
          zdjbxx: {},
          jsydsyq: {},
        },
        //传递参数
        propsParam: {},
        rules: {},
      };
272
    },
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
    methods: {
      /**
       * @description: 更新土地用途信息
       * @param {*} val
       * @author: renchao
       */
      upDateTdytxxList (val) {
        this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
        this.key++;
      },
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
      upDateQlrxxList (val) {
        this.ruleForm.qlrList = _.cloneDeep(val);
        this.czrOptions = this.ruleForm.qlrList;
        this.key++;
      },
      // 是否持证人变化
      /**
       * @description: 是否持证人变化
       * @param {*} val
       * @author: renchao
       */
      updaterow () {
        this.czr = "";
      },
      /**
       * @description: onSubmit
       * @author: renchao
       */
      onSubmit () {
        let that = this;
        let arr = this.ruleForm.tdytqxList.filter((item) => !item.yt);
        if (arr.length > 0) {
310 311
          this.$message({
            showClose: true,
312
            message: "土地用途不能为空",
313 314 315 316
            type: "error",
          });
          return false;
        }
317
        if (this.ruleForm.qlrList.length == 0) {
318 319
          this.$message({
            showClose: true,
320
            message: "请确认权利人信息",
321 322 323 324
            type: "error",
          });
          return false;
        }
325 326 327 328 329 330 331 332 333 334 335

        if (this.ruleForm.sldy.gyfs == "0") {
          if (this.ruleForm.qlrList.length > 1) {
            this.$message({
              showClose: true,
              message: "共有方式:单独所有,权利人只能是一个人",
              type: "error",
            });
            return false;
          }
          this.ruleForm.qlrList[0].sfczr = "1";
336
        } else {
337 338
          if (this.ruleForm.qlrList.length <= 1) {
            this.$message({
339
              showClose: true,
340 341
              message:
                "共有方式:共同所有,按份所有,其他所有,权利人必须是两个以上",
342 343 344 345
              type: "error",
            });
            return false;
          }
346 347 348 349
          //是否分别持证
          if (this.ruleForm.sldy.sqfbcz == "1") {
            //是
            this.ruleForm.qlrList.forEach((item, index) => {
350
              item.sfczr = "1";
351 352 353 354 355 356 357 358 359
            });
          } else {
            if (!that.czr) {
              that.$message({
                showClose: true,
                message: "请选择持证人",
                type: "error",
              });
              return false;
360
            }
361 362 363 364 365 366 367 368
            this.ruleForm.qlrList.forEach((item, index) => {
              if (item.zjh == that.czr) {
                item.sfczr = "1";
              } else {
                item.sfczr = "0";
              }
            });
          }
xiaomiao committed
369
        }
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
        saveData(this.ruleForm).then((res) => {
          if (res.code === 200) {
            this.$message({
              showClose: true,
              message: "保存成功!",
              type: "success",
            });
            this.$store.dispatch("user/refreshPage", true);
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: "error",
            });
          }
        });
      },
      /**
       * @description: compare
       * @author: renchao
       */
      compare () {
        console.log("this.ruleForm", this.ruleForm);
        this.$popupDialog(
          this.ruleForm.qlxx.qllxmc,
          "registerBook/comparison",
          {
            bsmQlxx: this.ruleForm.qlxx.bsmQlxx,
            dqqllx: "JSYDSYQ",
          },
          "80%",
          true
        );
      },
xiaomiao committed
404
    },
405
  };
406
</script>
xiaomiao committed
407
<style scoped lang="scss">
408 409
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
410
</style>