43eaaadb
wuxw
开发房屋优惠折扣
|
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
|
export default {
name: 'AddApplyRoomDiscount',
components: {
UploadImageUrl
},
data() {
return {
visible: false,
form: {
roomName: '',
roomId: '',
applyType: '',
createUserName: '',
createUserTel: '',
startTime: '',
endTime: '',
createRemark: '',
feeId: '',
photos: [],
communityId: ''
},
applyTypes: [],
feeTypeCds: [],
rules: {
roomName: [
{ required: true, message: this.$t('applyRoomDiscount.validate.roomRequired'), trigger: 'blur' },
{ max: 64, message: this.$t('applyRoomDiscount.validate.roomFormat'), trigger: 'blur' }
],
applyType: [
{ required: true, message: this.$t('applyRoomDiscount.validate.applyTypeRequired'), trigger: 'change' }
],
feeId: [
{ required: true, message: this.$t('applyRoomDiscount.validate.feeIdRequired'), trigger: 'change' }
],
createUserName: [
{ required: true, message: this.$t('applyRoomDiscount.validate.createUserRequired'), trigger: 'blur' },
{ max: 64, message: this.$t('applyRoomDiscount.validate.createUserFormat'), trigger: 'blur' }
],
createUserTel: [
{ required: true, message: this.$t('applyRoomDiscount.validate.createUserTelRequired'), trigger: 'blur' },
{ pattern: /^1[3-9]\d{9}$/, message: this.$t('applyRoomDiscount.validate.createUserTelFormat'), trigger: 'blur' }
],
startTime: [
{ required: true, message: this.$t('applyRoomDiscount.validate.startTimeRequired'), trigger: 'change' }
],
endTime: [
{ required: true, message: this.$t('applyRoomDiscount.validate.endTimeRequired'), trigger: 'change' }
],
createRemark: [
{ required: true, message: this.$t('applyRoomDiscount.validate.createRemarkRequired'), trigger: 'blur' },
{ max: 512, message: this.$t('applyRoomDiscount.validate.createRemarkFormat'), trigger: 'blur' }
]
}
}
},
methods: {
open() {
this.visible = true
this.getApplyTypes()
},
handleClose() {
this.$refs.form.resetFields()
|
43eaaadb
wuxw
开发房屋优惠折扣
|
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
this.form = {
roomName: '',
roomId: '',
applyType: '',
createUserName: '',
createUserTel: '',
startTime: '',
endTime: '',
createRemark: '',
feeId: '',
photos: [],
communityId: ''
}
},
async getApplyTypes() {
try {
const { data } = await queryApplyRoomDiscountType({
page: 1,
row: 50,
|
43eaaadb
wuxw
开发房屋优惠折扣
|
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
|
flag: 0,
floorNum: parts[0].trim(),
unitNum: parts[1].trim(),
roomNum: parts[2].trim()
}
const { rooms } = await listRoomsWhereFeeSet(params)
if (rooms.length === 0) {
this.$message.error(this.$t('applyRoomDiscount.validate.roomNotFound'))
this.form.roomName = ''
return
}
const room = rooms[0]
this.form.roomId = room.roomId
this.form.createUserName = room.ownerName
this.form.createUserTel = room.link
this.queryRoomFees()
} catch (error) {
console.error('查询房屋失败:', error)
}
},
async queryRoomFees() {
try {
const params = {
page: 1,
row: 50,
|
43eaaadb
wuxw
开发房屋优惠折扣
|
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
} catch (error) {
console.error('查询费用项失败:', error)
}
},
validateDate() {
if (this.form.startTime && this.form.endTime) {
const start = new Date(this.form.startTime)
const end = new Date(this.form.endTime)
if (start >= end) {
this.$message.error(this.$t('applyRoomDiscount.validate.dateInvalid'))
this.form.endTime = ''
}
}
},
handleImageChange(photos) {
this.form.photos = photos
},
submitForm() {
this.$refs.form.validate(valid => {
if (valid) {
this.saveApplyRoomDiscount()
}
})
},
async saveApplyRoomDiscount() {
try {
|