Blame view

src/components/Business/kttFwC.vue 7.88 KB
yangwei committed
1 2 3 4 5 6 7 8 9 10
<template>
  <div class="houseFloor itemForm">
    <el-form :model="ruleForm" :rules="rules" ref="formList" label-width="121px" :key="key">
      <el-row>
        <el-col :span="8">
          <el-form-item prop="YSDM">
            <span slot="label">
              要素代码: <br />
              <p class="label-detail">(YSDM)</p>
            </span>
11
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.ysdm"></el-input>
yangwei committed
12 13 14 15 16 17 18 19 20
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="CH">
            <span slot="label">
              层号: <br />
              <p class="label-detail">(CH)</p>
            </span>
21
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.ch"></el-input>
yangwei committed
22 23 24 25 26 27 28 29 30
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="ZRZH">
            <span slot="label">
              自然幢号: <br />
              <p class="label-detail">(ZRZH)</p>
            </span>
31
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.zrzh"></el-input>
yangwei committed
32 33 34 35 36 37 38 39 40 41 42
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="SJC">
            <span slot="label">
              实际层: <br />
              <p class="label-detail">(SJC)</p>
            </span>
43
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.sjc"></el-input>
yangwei committed
44 45 46 47 48 49 50 51 52
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="MYC">
            <span slot="label">
              名义层: <br />
              <p class="label-detail">(MYC)</p>
            </span>
53
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.myc"></el-input>
yangwei committed
54 55 56 57 58 59 60 61 62
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="CJZMJ" :rules="{ type: 'number' }">
            <span slot="label">
              层建筑面积: <br />
              <p class="label-detail">(CJZMJ)</p>
            </span>
63
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
64
              v-only-number="{ max: 999999999999999, min: 0, precision: 3 }" title="" type="number"
65
              v-model.number="ruleForm.cjzmj"></el-input-number>
yangwei committed
66 67 68 69 70 71 72 73 74 75 76
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="CTNJZMJ" :rules="{ type: 'number' }">
            <span slot="label">
              层套内建筑面积: <br />
              <p class="label-detail">(CTNJZMJ)</p>
            </span>
77
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
78
              v-only-number="{ max: 999999999999999, min: 0, precision: 3 }" title="" type="number"
79
              v-model.number="ruleForm.ctnjzmj"></el-input-number>
yangwei committed
80 81 82 83 84 85 86 87 88
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="CYTMJ" :rules="{ type: 'number' }">
            <span slot="label">
              层阳台面积: <br />
              <p class="label-detail">(CYTMJ)</p>
            </span>
89
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
90
              v-only-number="{ max: 999999999999999, min: 0, precision: 3 }" title="" type="number"
91
              v-model.number="ruleForm.cytmj"></el-input-number>
yangwei committed
92 93 94 95 96 97 98 99 100
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="CGYJZMJ" :rules="{ type: 'number' }">
            <span slot="label">
              层共有建筑面积: <br />
              <p class="label-detail">(CGYJZMJ)</p>
            </span>
101
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
102
              v-only-number="{ max: 999999999999999, min: 0, precision: 3 }" title="" type="number"
103
              v-model.number="ruleForm.cgyjzmj"></el-input-number>
yangwei committed
104 105 106 107 108 109 110 111 112 113 114
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="CFTJZMJ" :rules="{ type: 'number' }">
            <span slot="label">
              层分摊建筑面积: <br />
              <p class="label-detail">(CFTJZMJ)</p>
            </span>
115
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
116
              v-only-number="{ max: 999999999999999, min: 0, precision: 3 }" title="" type="number"
117
              v-model.number="ruleForm.cftjzmj"></el-input-number>
yangwei committed
118 119 120 121 122 123 124 125 126
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="CBQMJ" :rules="{ type: 'number' }">
            <span slot="label">
              层半墙面积: <br />
              <p class="label-detail">(CBQMJ)</p>
            </span>
127
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
128
              v-only-number="{ max: 999999999999999, min: 0, precision: 3 }" title="" type="number"
129
              v-model.number="ruleForm.cbqmj"></el-input-number>
yangwei committed
130 131 132 133 134 135 136 137 138
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="CG" :rules="{ type: 'number' }">
            <span slot="label">
              层高: <br />
              <p class="label-detail">(CG)</p>
            </span>
139
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
140
              v-only-number="{ max: 999999999999999, min: 0, precision: 3 }" title="" type="number" v-model.number="ruleForm.cg">
141
            </el-input-number>
yangwei committed
142 143 144 145 146 147 148 149 150 151 152
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="SPTYMJ" :rules="{ type: 'number' }">
            <span slot="label">
              水平投影面积: <br />
              <p class="label-detail">(SPTYMJ)</p>
            </span>
153
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
154
              v-only-number="{ max: 999999999999999, min: 0, precision: 3 }" title="" type="number"
155
              v-model.number="ruleForm.sptymj"></el-input-number>
yangwei committed
156 157 158 159 160 161 162 163 164
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="QXDM">
            <span slot="label">
              区县代码: <br />
              <p class="label-detail">(QXDM)</p>
            </span>
165
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.qxdm"></el-input>
yangwei committed
166 167 168 169 170 171 172 173 174
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <message-tips ref="msg" />
  </div>
</template>
<script>
// 层信息
175 176
import kttFwC from "@/api/kttFwC";
import ruleMixin from "@/mixins/ruleMixin.js";
yangwei committed
177 178 179 180 181
export default {
  mixins: [ruleMixin],
  props: {
    bsmSjsb: {
      type: String,
182
      default: "",
yangwei committed
183 184 185
    },
    bsmYwsjb: {
      type: String,
186 187
      default: "",
    },
yangwei committed
188
  },
189
  data() {
yangwei committed
190 191
    return {
      ruleForm: {
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
        YSDM: "",
        CH: "",
        ZRZH: "",
        SJC: "",
        MYC: "",
        CJZMJ: "",
        CTNJZMJ: "",
        CYTMJ: "",
        CGYJZMJ: "",
        CFTJZMJ: "",
        CBQMJ: "",
        CG: "",
        SPTYMJ: "",
        QXDM: "",
      },
    };
yangwei committed
208 209
  },
  methods: {
210
    async featchData() {
yangwei committed
211
      try {
212 213
        let { result: res } = await kttFwC.getKttFwCById(this.bsmSjsb);
        this.ruleForm = res;
yangwei committed
214 215
        //this.featchRule()
      } catch (error) {
216
        this.$refs.msg.messageShow();
yangwei committed
217 218
      }
    },
219
    handleUpdateForm() {
yangwei committed
220 221
      return new Promise(async (resolve, reject) => {
        try {
222
          let res = await kttFwC.updateKttFwC(this.ruleForm);
yangwei committed
223
          // this.$refs['formList'].resetFields();
224
          resolve(res.code);
yangwei committed
225
        } catch (error) {
226
          this.$refs.msg.messageShow();
yangwei committed
227
        }
228
      });
yangwei committed
229
    },
230 231
  },
};
yangwei committed
232 233 234 235 236 237
</script>
<style scoped lang="scss">
@import "./css/itemForm.scss";
</style>