Blame view

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

任超 committed
114
          <el-col :span="16">
115
            <el-form-item label="坐落:">
xiaomiao committed
116
              <el-input v-model="ruleForm.zdjbxx.zl"></el-input>
任超 committed
117 118 119
            </el-form-item>
          </el-col>
        </el-row>
xiaomiao committed
120
        <!-- <el-row :gutter="10">
任超 committed
121
          <el-col :span="8">
122
            <el-form-item label="使用期限:">
xiaomiao committed
123
              <el-input v-model="ruleForm.jsydsyq.tdsyqx"></el-input>
任超 committed
124 125
            </el-form-item>
          </el-col>
jiaozeping@pashanhoo.com committed
126

任超 committed
127
          <el-col :span="16">
128
            <el-form-item label="使用权起止时间:">
xiaomiao committed
129
              <el-input v-model="ruleForm.jsydsyq.syqqzsj"></el-input>
任超 committed
130 131
            </el-form-item>
          </el-col>
xiaomiao committed
132
        </el-row> -->
任超 committed
133 134
        <el-row :gutter="10">
          <el-col>
135
            <el-form-item label="附记:" prop="fj">
xiaomiao committed
136
              <el-input type="textarea" v-model="ruleForm.jsydsyq.fj"></el-input>
任超 committed
137 138 139
            </el-form-item>
          </el-col>
        </el-row>
140
        <div class="slxx_title title-block">
xiaomiao committed
141 142 143 144
          土地用途
          <div class="triangle"></div>
        </div>
        <tdytTable
145
          :ableOperation="ableOperation"
xiaomiao committed
146
          :tableData="ruleForm.tdytqxList"
147
          @upDateTdytxxList="upDateTdytxxList" />
任超 committed
148 149 150 151
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
任超 committed
152
        <el-row :gutter="10">
153
          <el-col :span="12">
154
            <el-form-item label="共有方式:">
xiaomiao committed
155
              <el-radio-group :disabled="!ableOperation" v-model="ruleForm.sldy.gyfs">
田浩浩 committed
156 157 158 159
                <el-radio label="0">单独所有</el-radio>
                <el-radio label="1">共同共有</el-radio>
                <el-radio label="2">按份所有</el-radio>
                <el-radio label="3">其它共有</el-radio>
任超 committed
160 161 162
              </el-radio-group>
            </el-form-item>
          </el-col>
163
          <el-col :span="6" v-show="ruleForm.sldy.gyfs != '0'">
164
            <el-form-item label="是否分别持证:">
165 166 167 168 169
              <el-radio-group
                v-model="ruleForm.sldy.sqfbcz"
                :disabled="!ableOperation">
                <el-radio :label="1"></el-radio>
                <el-radio :label="0"></el-radio>
任超 committed
170 171 172
              </el-radio-group>
            </el-form-item>
          </el-col>
173 174
          <el-col
            :span="6"
175
            v-show="ruleForm.sldy.sqfbcz == '0' && ruleForm.sldy.gyfs != '0'">
176
            <el-form-item label="持证人:">
177 178 179 180 181 182 183 184 185
              <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">
任超 committed
186 187 188
                </el-option>
              </el-select>
            </el-form-item>
任超 committed
189 190
          </el-col>
        </el-row>
191 192
        <qlrCommonTable :tableData="ruleForm.qlrList"
          :disabled="!ableOperation"
xiaomiao committed
193
          @upDateQlrxxList="upDateQlrxxList" :key="key" :gyfs="ruleForm.sldy.gyfs" />
1  
jiaozeping@pashanhoo.com committed
194

任超 committed
195
        <div v-if="ruleForm.ywrList && ruleForm.ywrList.length > 0">
196 197 198
          <div class="slxx_title title-block">
            义务人信息
            <div class="triangle"></div>
199
          </div>
xiaomiao committed
200
          <qlrCommonTable v-if="ruleForm.ywrList" :disabled="!ableOperation" :tableData="ruleForm.ywrList" :key="key" @upDateQlrxxList="upDateYwrxxList" />
201 202
        </div>

任超 committed
203 204 205 206
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
任超 committed
207 208
        <el-row :gutter="10">
          <el-col>
209
            <el-form-item label="登记原因:" prop="djyy">
xiaomiao committed
210
              <el-input class="textArea" type="textarea" :disabled="!ableOperation"
211
                v-model="ruleForm.jsydsyq.djyy">
任超 committed
212
              </el-input>
任超 committed
213 214 215 216
            </el-form-item>
          </el-col>
        </el-row>
      </div>
xiaomiao committed
217
      <el-row class="btn" v-if="ableOperation">
218
        <el-form-item>
任超 committed
219 220
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
任超 committed
221 222 223 224 225
      </el-row>
    </el-form>
  </div>
</template>
<script>
renchao@pashanhoo.com committed
226
  import { mapGetters } from "vuex"
227
  import ywmix from "@/views/ywbl/mixin/index"
renchao@pashanhoo.com committed
228
  import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js"
xiaomiao committed
229
  import tdytTable from "@/views/workflow/components/tdytTable";
renchao@pashanhoo.com committed
230 231
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable"
  export default {
232
    mixins: [ywmix],
renchao@pashanhoo.com committed
233
    mounted () {
234
      this.ableOperation = this.$parent.currentSelectTab.ableOperation
renchao@pashanhoo.com committed
235 236 237 238 239 240
      this.propsParam = this.$attrs;
      var formdata = new FormData();
      let that = this
      this.$startLoading();
      formdata.append("bsmSldy", this.propsParam.bsmSldy);
      formdata.append("djlx", this.propsParam.djlx);
241
      formdata.append("isEdit", this.ableOperation);
renchao@pashanhoo.com committed
242 243 244 245 246 247 248
      Init(formdata).then((res) => {
        this.$nextTick(() => {
          that.ruleForm = res.result;
          that.$endLoading();
          that.isShow = true;
          this.czrOptions = this.ruleForm.qlrList;
        })
任超 committed
249
      })
250
    },
251
    components: { qlrCommonTable, tdytTable },
renchao@pashanhoo.com committed
252
    computed: {
xiaomiao committed
253
      ...mapGetters(["dictData", "flag"]),
254 255 256 257 258 259 260 261
      // 根据流程判断表单是否为只读
      editDisabled () {
        if (!this.ableOperation) {
          //只读状态
          return true;
        }
        return false;
      },
renchao@pashanhoo.com committed
262 263 264
    },
    data () {
      return {
265
        mjdw: "1",
266 267
        //表单是否可操作
        ableOperation: true,
renchao@pashanhoo.com committed
268 269 270 271 272 273 274 275 276
        key: 0,
        isShow: false,
        disabled: true,
        czrOptions: [],
        ruleForm: {},
        //传递参数
        propsParam: {},
        rules: {}
      }
任超 committed
277
    },
renchao@pashanhoo.com committed
278
    methods: {
yuanbo committed
279 280 281 282 283
      /**
       * @description: 更新土地用途信息
       * @param {*} val
       * @author: renchao
       */
284 285 286 287
      upDateTdytxxList (val) {
        this.ruleForm.tdytqxList && (this.ruleForm.tdytqxList = _.cloneDeep(val));
        this.key++;
      },
renchao@pashanhoo.com committed
288
      // 更新权利人信息
yuanbo committed
289 290 291 292 293
      /**
       * @description: 更新权利人信息
       * @param {*} val
       * @author: renchao
       */
renchao@pashanhoo.com committed
294 295 296 297 298 299
      upDateQlrxxList (val) {
        this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val))
        this.czrOptions = this.ruleForm.qlrList;
        this.key++
      },
      // 更新义务人信息
yuanbo committed
300 301 302 303 304
      /**
       * @description: 更新义务人信息
       * @param {*} val
       * @author: renchao
       */
renchao@pashanhoo.com committed
305 306 307 308
      upDateYwrxxList (val) {
        this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val))
        this.key++
      },
yuanbo committed
309 310 311 312
      /**
       * @description: onSubmit
       * @author: renchao
       */
renchao@pashanhoo.com committed
313
      onSubmit () {
314
        let that = this
315 316 317 318 319 320 321 322 323
        let arr = this.ruleForm.tdytqxList.filter(item => !item.yt)
        if (arr.length > 0) {
          this.$message({
            showClose: true,
            message: "土地用途不能为空",
            type: "error",
          });
          return false;
        }
renchao@pashanhoo.com committed
324
        if (this.ruleForm.qlrList.length == 0) {
325 326 327 328 329 330 331
          this.$message({
            showClose: true,
            message: "请确认权利人信息",
            type: "error",
          });
          return false;
        }
332
        if (this.ruleForm.sldy.gyfs == "0") {
renchao@pashanhoo.com committed
333 334 335 336 337 338 339 340 341
          if (this.ruleForm.qlrList.length > 1) {
            this.$message({
              showClose: true,
              message: "共有方式:单独所有,权利人只能是一个人",
              type: "error",
            });
            return false;
          }
          this.ruleForm.qlrList[0].sfczr = "1";
342
        } else {
renchao@pashanhoo.com committed
343
          //是否分别持证
344 345
          if (this.ruleForm.sldy.sqfbcz == "1") {
            //是
renchao@pashanhoo.com committed
346
            this.ruleForm.qlrList.forEach((item, index) => {
347
              item.sfczr = "1";
renchao@pashanhoo.com committed
348 349
            });
          } else {
350 351 352 353 354 355 356 357
            if (!that.ruleForm.czr) {
              that.$message({
                showClose: true,
                message: "请选择持证人",
                type: "error",
              });
              return false;
            }
renchao@pashanhoo.com committed
358 359
            this.ruleForm.qlrList.forEach((item, index) => {
              if (item.zjh == this.ruleForm.czr) {
360
                item.sfczr = "1";
361
              } else {
362
                item.sfczr = "0";
renchao@pashanhoo.com committed
363
              }
364
            });
renchao@pashanhoo.com committed
365
          }
366
        }
367 368 369 370
        /**
         * @description: saveData
         * @author: renchao
         */
renchao@pashanhoo.com committed
371 372 373 374 375
        saveData(this.ruleForm).then((res) => {
          if (res.code === 200) {
            this.$message({
              showClose: true,
              message: "保存成功!",
376 377 378
              type: "success"
            })
            this.$store.dispatch('user/refreshPage', true);
renchao@pashanhoo.com committed
379 380 381 382
          } else {
            this.$message({
              showClose: true,
              message: res.message,
383 384
              type: "error"
            })
renchao@pashanhoo.com committed
385
          }
386 387 388 389
        })
      }
    }
  }
任超 committed
390 391
</script>
<style scoped lang='scss'>
renchao@pashanhoo.com committed
392 393
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
xiaomiao committed
394
</style>