Blame view

src/views/workflow/main/sdqxx/index.vue 5.06 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
<!--
 * @Description:
 * @Autor: renchao
 * @LastEditTime: 2023-09-14 17:19:26
-->
<template>
  <div class="slxx sdqxx">
    <el-form
      :model="ruleForm"
      ref="ruleForm"
      v-Loading="loading"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
      label-width="130px">
      <div class="slxx_con" :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 v-model="ruleForm.serviceCode"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="行政区划区县代码:">
              <el-input v-model="ruleForm.areacode"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="登记系统业务号:">
              <el-input v-model="ruleForm.ywh"></el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="推送日期:">
              <el-input v-model="ruleForm.SENDTIME"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="原户主姓名:">
              <el-input v-model="ruleForm.mcOld"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="原户主身份证号码:">
              <el-input v-model="ruleForm.zjhmOld"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="原户主联系电话:">
              <el-input v-model="ruleForm.lxdhOld"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="新户主姓名:">
              <el-input v-model="ruleForm.mcNew"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="新户主身份证号码:">
              <el-input v-model="ruleForm.zjhmNew"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="新户主联系电话:">
              <el-input v-model="ruleForm.lxdhNew"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="房产证编号:">
              <el-input v-model="ruleForm.fczbh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="是否过户:">
              <el-switch
                v-model="ruleForm.sfgh"
                :active-value='1'
                active-text="是"
                :inactive-value="0"
                inactive-text="否">
              </el-switch>
            </el-form-item>
          </el-col>

        </el-row>
        <el-row :gutter="10">
          <el-col :span="24">
            <el-form-item label="房屋坐落(地址):">
              <el-input v-model="ruleForm.fwzl" type="textarea"
                :rows="2"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row class="btn" v-if="viewEdit">
          <el-form-item>
            <el-button type="primary" @click="onSubmit">保存</el-button>
          </el-form-item>
        </el-row>
      </div>
    </el-form>
  </div>
</template>
<script>
  import { mapGetters } from "vuex";
  import { getDlxxByBsmSldy, saveOrUpdateDlxx } from "@/api/sfxx.js";
  export default {
    computed: {
      ...mapGetters(["dictData", "flag"]),
    },
    mounted () {
      // this.loading = true
      this.viewEdit = this.$parent.currentSelectTab.ableOperation;
      this.propsParam = this.$attrs;
      var formdata = new FormData();
      formdata.append("bsmSldy", this.propsParam.bsmSldy);
      formdata.append("djlx", this.propsParam.djlx);
      formdata.append("isEdit", this.viewEdit);
      console.log(this.propsParam)
      this.getDlxxByBsmSldy()
    },
    data () {
      return {
        loading: false,
        //表单是否可操作
        viewEdit: false,
        ruleForm: {
          SFGH: 1
        }
      }
    },
    methods: {
      getDlxxByBsmSldy() {
        getDlxxByBsmSldy(this.propsParam.bsmSldy).then((res) => {
          if (res.code === 200) {
            if (res.result != null) {
              this.ruleForm = res.result
            }
          }
        });
      },
      saveOrUpdateDlxx() {
        saveOrUpdateDlxx(this.ruleForm).then((res) => {
          if (res.code === 200) {
           this.$message.success("成功")
          }
        });
      },
      onSubmit () {
        this.saveOrUpdateDlxx()
      }
    }
  }
</script>
<style scoped lang="scss">
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
</style>