Blame view

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

任超 committed
102
          <el-col :span="16">
103
            <el-form-item label="坐落:">
田浩浩 committed
104
              <el-input disabled v-model="ruleForm.zdjbxx.zl"></el-input>
任超 committed
105 106 107 108 109
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
110
            <el-form-item label="使用期限:">
田浩浩 committed
111
              <el-input disabled v-model="ruleForm.jsydsyq.tdsyqx"></el-input>
任超 committed
112 113
            </el-form-item>
          </el-col>
jiaozeping@pashanhoo.com committed
114

任超 committed
115
          <el-col :span="16">
116
            <el-form-item label="使用权起止时间:">
田浩浩 committed
117
              <el-input disabled v-model="ruleForm.jsydsyq.syqqzsj"></el-input>
任超 committed
118 119 120 121 122
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col>
123
            <el-form-item label="附记:" prop="fj">
124
              <el-input type="textarea" v-model="ruleForm.jsydsyq.fj" :disabled="$route.query.viewtype == '1'"></el-input>
任超 committed
125 126 127
            </el-form-item>
          </el-col>
        </el-row>
任超 committed
128 129 130 131
        <div class="slxx_title title-block">
          权利人信息
          <div class="triangle"></div>
        </div>
任超 committed
132
        <el-row :gutter="10">
133
          <el-col :span="12">
134
            <el-form-item label="共有方式:">
135
              <el-radio-group :disabled="$route.query.viewtype == 0" v-model="ruleForm.sldy.gyfs">
田浩浩 committed
136 137 138 139
                <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
140 141 142
              </el-radio-group>
            </el-form-item>
          </el-col>
143
          <el-col :span="6" v-show="ruleForm.sldy.gyfs == '1'">
144
            <el-form-item label="是否分别持证:">
145
              <el-radio-group v-model="ruleForm.sldy.sqfbcz">
renchao@pashanhoo.com committed
146 147
                <el-radio :label=1></el-radio>
                <el-radio :label=0></el-radio>
任超 committed
148 149 150
              </el-radio-group>
            </el-form-item>
          </el-col>
151
          <el-col :span="6" v-show="ruleForm.sldy.sqfbcz == '0'&&ruleForm.sldy.gyfs == '1'">
152
            <el-form-item label="持证人:">
任超 committed
153
              <el-select v-model="ruleForm.czr" placeholder="持证人">
154
                <el-option v-for="item in czrOptions" :key="item.zjh" :label="item.sqrmc" :value="item.zjh">
任超 committed
155 156 157
                </el-option>
              </el-select>
            </el-form-item>
任超 committed
158 159
          </el-col>
        </el-row>
renchao@pashanhoo.com committed
160
        <qlrCommonTable :tableData="ruleForm.qlrList" @upDateQlrxxList="upDateQlrxxList" :key="key"
161
          :viewtype="$route.query.viewtype" :gyfs="ruleForm.sldy.gyfs" />
1  
jiaozeping@pashanhoo.com committed
162

任超 committed
163
        <div v-if="ruleForm.ywrList && ruleForm.ywrList.length > 0">
164 165 166
          <div class="slxx_title title-block">
            义务人信息
            <div class="triangle"></div>
167
          </div>
renchao@pashanhoo.com committed
168
          <qlrCommonTable v-if="ruleForm.ywrList" :tableData="ruleForm.ywrList" :key="key" @upDateQlrxxList="upDateYwrxxList"
169 170 171
            :viewtype="$route.query.viewtype" />
        </div>

任超 committed
172 173 174 175
        <div class="slxx_title title-block">
          登记原因
          <div class="triangle"></div>
        </div>
任超 committed
176 177
        <el-row :gutter="10">
          <el-col>
178
            <el-form-item label="登记原因:" prop="djyy">
蔡俊立 committed
179
              <el-input class="textArea" type="textarea" :disabled="$route.query.viewtype"
180
                v-model="ruleForm.jsydsyq.djyy">
任超 committed
181
              </el-input>
任超 committed
182 183 184 185
            </el-form-item>
          </el-col>
        </el-row>
      </div>
186
      <el-row class="btn" v-if="!$route.query.viewtype && ableOperation">
187
        <el-form-item>
任超 committed
188 189
          <el-button type="primary" @click="onSubmit">保存</el-button>
        </el-form-item>
任超 committed
190 191 192 193 194
      </el-row>
    </el-form>
  </div>
</template>
<script>
renchao@pashanhoo.com committed
195 196 197 198 199
  import { mapGetters } from "vuex"
  import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js"
  import qlrCommonTable from "@/views/workflow/components/qlrCommonTable"
  export default {
    mounted () {
200
      this.ableOperation = this.$parent.currentSelectTab.ableOperation
renchao@pashanhoo.com committed
201 202 203 204 205 206
      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);
207
      formdata.append("isEdit", this.ableOperation);
renchao@pashanhoo.com committed
208 209 210 211 212 213 214
      Init(formdata).then((res) => {
        this.$nextTick(() => {
          that.ruleForm = res.result;
          that.$endLoading();
          that.isShow = true;
          this.czrOptions = this.ruleForm.qlrList;
        })
任超 committed
215
      })
216
    },
renchao@pashanhoo.com committed
217 218 219 220 221 222
    components: { qlrCommonTable },
    computed: {
      ...mapGetters(["dictData", "flag"])
    },
    data () {
      return {
223 224
        //表单是否可操作
        ableOperation: true,
renchao@pashanhoo.com committed
225 226 227 228 229 230 231 232 233
        key: 0,
        isShow: false,
        disabled: true,
        czrOptions: [],
        ruleForm: {},
        //传递参数
        propsParam: {},
        rules: {}
      }
任超 committed
234
    },
renchao@pashanhoo.com committed
235 236 237 238 239 240 241 242 243 244 245 246 247 248
    methods: {
      // 更新权利人信息
      upDateQlrxxList (val) {
        this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val))
        this.czrOptions = this.ruleForm.qlrList;
        this.key++
      },
      // 更新义务人信息
      upDateYwrxxList (val) {
        this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val))
        this.key++
      },
      onSubmit () {
        if (this.ruleForm.qlrList.length == 0) {
249 250 251 252 253 254 255
          this.$message({
            showClose: true,
            message: "请确认权利人信息",
            type: "error",
          });
          return false;
        }
renchao@pashanhoo.com committed
256

257
        if (this.ruleForm.sldy.gyfs == "0") {
renchao@pashanhoo.com committed
258 259 260 261 262 263 264 265 266
          if (this.ruleForm.qlrList.length > 1) {
            this.$message({
              showClose: true,
              message: "共有方式:单独所有,权利人只能是一个人",
              type: "error",
            });
            return false;
          }
          this.ruleForm.qlrList[0].sfczr = "1";
267
        }
268
        if (this.ruleForm.sldy.gyfs == "1") {
renchao@pashanhoo.com committed
269
          //是否分别持证
270
          if (this.ruleForm.sldy.sqfbcz == '1') { //是
renchao@pashanhoo.com committed
271
            this.ruleForm.qlrList.forEach((item, index) => {
272
              item.sfczr = "1"
renchao@pashanhoo.com committed
273 274 275 276
            });
          } else {
            this.ruleForm.qlrList.forEach((item, index) => {
              if (item.zjh == this.ruleForm.czr) {
277 278 279
                item.sfczr = "1"
              } else {
                item.sfczr = "0"
renchao@pashanhoo.com committed
280
              }
281
            })
renchao@pashanhoo.com committed
282
          }
283
        }
renchao@pashanhoo.com committed
284 285 286 287 288
        saveData(this.ruleForm).then((res) => {
          if (res.code === 200) {
            this.$message({
              showClose: true,
              message: "保存成功!",
289 290 291
              type: "success"
            })
            this.$store.dispatch('user/refreshPage', true);
renchao@pashanhoo.com committed
292 293 294 295
          } else {
            this.$message({
              showClose: true,
              message: res.message,
296 297
              type: "error"
            })
renchao@pashanhoo.com committed
298
          }
299 300 301 302
        })
      }
    }
  }
任超 committed
303 304
</script>
<style scoped lang='scss'>
renchao@pashanhoo.com committed
305 306
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
任超 committed
307
</style>