feat(house): 添加房屋信息表单中的单位字段支持
- 在房屋信息模型中添加了租金单位、月租金单位和面积单位字段 - 修改表单界面为面积、单价和总价字段添加单位输入框 - 更新字典选择器的代码配置从 premium 到 premium2 - 设置默认单位值为泰铢和泰铢/菜 - 修复表单提交时使用正确的租金字段映射
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
VITE_APP_NAME=后台管理(开发环境)
|
VITE_APP_NAME=后台管理(开发环境)
|
||||||
#VITE_API_URL=http://127.0.0.1:9200/api
|
VITE_API_URL=http://127.0.0.1:9200/api
|
||||||
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,14 +18,20 @@ export interface HouseInfo {
|
|||||||
leaseMethod?: string;
|
leaseMethod?: string;
|
||||||
// 租金
|
// 租金
|
||||||
rent?: string;
|
rent?: string;
|
||||||
|
// 租金单位
|
||||||
|
rentUnit?: string;
|
||||||
// 月租金
|
// 月租金
|
||||||
monthlyRent?: string;
|
monthlyRent?: string;
|
||||||
|
// 月租金单位
|
||||||
|
monthlyRentUnit?: string;
|
||||||
// 佣金
|
// 佣金
|
||||||
commission?: string;
|
commission?: string;
|
||||||
// 物业费
|
// 物业费
|
||||||
propertyFees?: string;
|
propertyFees?: string;
|
||||||
// 面积
|
// 面积
|
||||||
extent?: string;
|
extent?: string;
|
||||||
|
// 面积单位
|
||||||
|
extentUnit?: string;
|
||||||
// 楼层
|
// 楼层
|
||||||
floor?: string;
|
floor?: string;
|
||||||
// 房号
|
// 房号
|
||||||
|
|||||||
@@ -50,30 +50,47 @@
|
|||||||
<span v-else>{{ form.phone }}</span>
|
<span v-else>{{ form.phone }}</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="面积(莱)" name="extent">
|
<a-form-item label="面积(莱)" name="extent">
|
||||||
<a-input
|
<a-space v-if="editStatus">
|
||||||
v-if="editStatus"
|
<a-input
|
||||||
allow-clear
|
v-if="editStatus"
|
||||||
placeholder="请输入该房屋面积"
|
allow-clear
|
||||||
v-model:value="form.extent"
|
placeholder="房屋面积"
|
||||||
/>
|
v-model:value="form.extent"
|
||||||
|
/>
|
||||||
|
<a-input
|
||||||
|
placeholder="单位"
|
||||||
|
v-model:value="form.extentUnit"
|
||||||
|
/>
|
||||||
|
</a-space>
|
||||||
<span v-else>{{ form.extent }}</span>
|
<span v-else>{{ form.extent }}</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="单价(莱)" name="rent">
|
<a-form-item label="单价(莱)" name="rent">
|
||||||
<a-input
|
<a-space v-if="editStatus">
|
||||||
v-if="editStatus"
|
<a-input
|
||||||
allow-clear
|
allow-clear
|
||||||
placeholder="请输入单价"
|
placeholder="单价"
|
||||||
v-model:value="form.rent"
|
v-model:value="form.rent"
|
||||||
/>
|
/>
|
||||||
|
<a-input
|
||||||
|
placeholder="单位"
|
||||||
|
v-model:value="form.rentUnit"
|
||||||
|
/>
|
||||||
|
</a-space>
|
||||||
<span v-else>{{ form.rent }}</span>
|
<span v-else>{{ form.rent }}</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="总价" name="monthlyRent">
|
<a-form-item label="总价" name="monthlyRent">
|
||||||
<a-input
|
<a-space v-if="editStatus">
|
||||||
v-if="editStatus"
|
<a-input
|
||||||
allow-clear
|
v-if="editStatus"
|
||||||
placeholder="请输入总价"
|
allow-clear
|
||||||
v-model:value="form.monthlyRent"
|
placeholder="总价"
|
||||||
/>
|
v-model:value="form.monthlyRent"
|
||||||
|
/>
|
||||||
|
<a-input
|
||||||
|
placeholder="单位"
|
||||||
|
v-model:value="form.rentUnit"
|
||||||
|
/>
|
||||||
|
</a-space>
|
||||||
<span v-else>{{ form.monthlyRent }}</span>
|
<span v-else>{{ form.monthlyRent }}</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- <a-form-item label="房号" name="roomNumber">-->
|
<!-- <a-form-item label="房号" name="roomNumber">-->
|
||||||
@@ -120,7 +137,7 @@
|
|||||||
<a-form-item label="是否可溢价" name="premium">
|
<a-form-item label="是否可溢价" name="premium">
|
||||||
<DictSelect
|
<DictSelect
|
||||||
v-if="editStatus"
|
v-if="editStatus"
|
||||||
dict-code="premium"
|
dict-code="premium2"
|
||||||
v-model:value="form.premium"
|
v-model:value="form.premium"
|
||||||
placeholder="是否可溢价"
|
placeholder="是否可溢价"
|
||||||
/>
|
/>
|
||||||
@@ -396,8 +413,11 @@ import {ref, reactive, watch, computed} from 'vue';
|
|||||||
houseType: undefined,
|
houseType: undefined,
|
||||||
leaseMethod: undefined,
|
leaseMethod: undefined,
|
||||||
rent: undefined,
|
rent: undefined,
|
||||||
|
rentUnit: '泰铢',
|
||||||
monthlyRent: undefined,
|
monthlyRent: undefined,
|
||||||
|
monthlyRentUnit: undefined,
|
||||||
extent: undefined,
|
extent: undefined,
|
||||||
|
extentUnit: '泰铢/菜',
|
||||||
floor: undefined,
|
floor: undefined,
|
||||||
roomNumber: undefined,
|
roomNumber: undefined,
|
||||||
realName: undefined,
|
realName: undefined,
|
||||||
@@ -673,7 +693,7 @@ import {ref, reactive, watch, computed} from 'vue';
|
|||||||
content: content.value,
|
content: content.value,
|
||||||
files: JSON.stringify(files.value),
|
files: JSON.stringify(files.value),
|
||||||
houseLabel: JSON.stringify(houseLabelData.value),
|
houseLabel: JSON.stringify(houseLabelData.value),
|
||||||
monthlyRent: monthlyRent.value,
|
monthlyRent: form.rent,
|
||||||
type: props.type
|
type: props.type
|
||||||
};
|
};
|
||||||
const saveOrUpdate = isUpdate.value ? updateHouseInfo : addHouseInfo;
|
const saveOrUpdate = isUpdate.value ? updateHouseInfo : addHouseInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user