手动输入区间

This commit is contained in:
weicw
2023-09-20 18:53:56 +08:00
parent d93010e6fc
commit 030c4a9c69
9 changed files with 64 additions and 364 deletions

View File

@@ -64,8 +64,8 @@
</u-form-item>
<u-form-item prop="monthlyRent">
<u-cell title="月租金(每月)" :isLink="false">
<u-input type="digit" slot="value" class="input" v-model="form.monthlyRent" inputAlign="right"
maxlength="30" :border="false" placeholder="请输入月租金" />
<u-input type="digit" slot="value" class="input" :value="monthlyRent" inputAlign="right" disabled-color="#FFFFFF"
maxlength="30" :border="false" placeholder="请输入月租金" disabled />
</u-cell>
</u-form-item>
<u-form-item prop="propertyFees">
@@ -317,6 +317,16 @@
},
}
},
computed: {
monthlyRent() {
const {extent, rent} = this.form
if(extent && rent) {
return (extent * rent).toFixed(2)
}else {
return 0
}
}
},
/**
* 生命周期函数--监听页面加载
@@ -477,13 +487,11 @@
const app = this
if (app.disabled === true) return
console.log("app.tempFile: ", app.tempFile);
const supporting = this.supportingData.filter(item=>item.checked)
this.$refs.uForm.validate().then(() => {
app.disabled = true
app.form.houseLabel = JSON.stringify(app.houseLabel)
app.form.files = JSON.stringify(app.fileList1)
app.form.videoUrl = app.fileList2[0]?app.fileList2[0].url: null
app.form.supporting = JSON.stringify(supporting)
const saveOrUpdate = app.selectId > 0 ? updateHouseInfo : addHouseInfo;
saveOrUpdate(app.form).then(result => {
app.$toast('保存成功')

View File

@@ -36,7 +36,7 @@
</scroll-view>
<view class="dict">
<view class="dict-item">
<text class="title">{{ form.videoUrl.monthlyRent || 0 }}/</text>
<text class="title">{{ form.monthlyRent || 0 }}/</text>
<text class="desc">月租</text>
</view>
<view class="dict-item">