qlfFwFdcqDzXm.vue
7.38 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!--
* @Description :房地产权(项目内多幢房屋)项目属性表单组件
* @Autor : miaofang
* @LastEditTime : 2023-05-17 17:13:37
-->
<template>
<div class="multiplehouseInfoXmsx itemForm">
<el-form :model="ruleForm" ref="formList" label-width="115px" :key="key">
<div v-for="(item, index) in ruleForm.itemList" :key="index" class="multiplehouseInfoXmsx-item">
<p class="multiplehouseInfoXmsx-item-name">项目属性{{ index + 1 }}</p>
<div class="multiplehouseInfoXmsx-item-list">
<el-row>
<el-col :span="16">
<el-form-item :prop="'itemList.' + index + '.XMMC'" :rules="rules.XMMC">
<span slot="label">
项目名称: <br />
<p class="label-detail">(XMMC)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model="ruleForm.itemList[index].XMMC"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.BDCDYH'" :rules="rules.BDCDYH">
<span slot="label">
不动产单元号: <br />
<p class="label-detail">(BDCDYH)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model="ruleForm.itemList[index].BDCDYH"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.ZH'" :rules="rules.ZH">
<span slot="label">
幢号: <br />
<p class="label-detail">(ZH)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model="ruleForm.itemList[index].ZH"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.ZCS'" :rules="{ ...rules.ZCS, ...typeNum }">
<span slot="label">
总层数: <br />
<p class="label-detail">(ZCS)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model.number="ruleForm.itemList[index].ZCS"
title="" type="number" v-only-number="{ max: 9999, min: 0, precision: 0 }"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.GHYT'" :rules="rules.GHYT">
<span slot="label">
规划用途: <br />
<p class="label-detail">(GHYT)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model="ruleForm.itemList[index].GHYT"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.FWJG'" :rules="rules.FWJG">
<span slot="label">
房屋结构: <br />
<p class="label-detail">(FWJG)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model="ruleForm.itemList[index].FWJG"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.JZMJ'" :rules="{ ...rules.JZMJ, ...typeNum }">
<span slot="label">
建筑面积:<br />
<p class="label-detail">(JZMJ)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model.number="ruleForm.itemList[index].JZMJ"
title="" type="number" v-only-number="{ max: 999999999999999, min: 0, precision: 2 }"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.JGSJ'" :rules="rules.JGSJ">
<span slot="label">
竣工时间: <br />
<p class="label-detail">(JGSJ)</p>
</span>
<el-date-picker :disabled="$store.state.business.Edit" type="date" clearable
v-model="ruleForm.itemList[index].JGSJ" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.ZTS'" :rules="{ ...rules.ZTS, ...typeNum }">
<span slot="label">
总套数: <br />
<p class="label-detail">(ZTS)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model.number="ruleForm.itemList[index].ZTS"
v-only-number="{ max: 9999, min: 0, precision: 0 }"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :prop="'itemList.' + index + '.QXDM'" :rules="rules.QXDM">
<span slot="label">
区县代码: <br />
<p class="label-detail">(QXDM)</p>
</span>
<el-input :disabled="$store.state.business.Edit" v-model="ruleForm.itemList[index].QXDM"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
</el-form>
<message-tips ref="msg" />
</div>
</template>
<script>
// 房地产权(项目内多幢房屋)项目属性
import qlfFwFdcqDzXm from "@/api/qlfFwFdcqDzXm";
import ruleMixin from "@/mixins/ruleMixin.js";
export default {
mixins: [ruleMixin],
props: {
bsmSjsb: {
type: String,
default: "",
},
bsmYwsjb: {
type: String,
default: "",
},
},
data() {
return {
ruleForm: {
itemList: [
{
XMMC: "",
BDCDYH: "",
ZH: "",
ZCS: "",
GHYT: "",
FWJG: "",
JZMJ: "",
JGSJ: "",
ZTS: "",
QXDM: "",
},
],
},
};
},
methods: {
async featchData() {
try {
let { result: res } = await qlfFwFdcqDzXm.getQlfFwFdcqDzXmById(
this.bsmSjsb
);
this.ruleForm.itemList = res;
//this.featchRule()
} catch (error) {
this.$refs.msg.messageShow();
}
},
handleUpdateForm() {
return new Promise(async (resolve, reject) => {
try {
let res = await qlfFwFdcqDzXm.updateQlfFwFdcqDzXm(
this.ruleForm.itemList
);
// this.$refs['formList'].resetFields();
resolve(res.code);
} catch (error) {
this.$refs.msg.messageShow();
}
});
},
},
};
</script>
<style scoped lang="scss">
@import "./css/itemForm.scss";
.multiplehouseInfoXmsx-item {
display: flex;
height: 100%;
margin-bottom: 15px;
margin-right: 5px;
&-name {
display: flex;
align-items: center;
justify-content: center;
width: 20px;
padding: 10px 20px;
line-height: 28px;
border: 1px solid #ccc;
margin-right: 15px;
border-radius: 3px;
}
&-list {
width: 100%;
flex: 1;
display: flex;
justify-content: center;
flex-direction: column;
}
}
</style>