From 5665117df3930c7c9fd9a673c7927d44001b241d Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Fri, 19 Nov 2021 11:23:08 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../property/addMeterWater/addMeterWater.html | 13 +++-
.../property/addMeterWater/addMeterWater.js | 15 +++-
.../property/addRoomView/addRoomView.html | 4 +-
.../property/addRoomView/addRoomView.js | 68 ++++++++++---------
.../property/editRoom/editRoom.html | 5 +-
.../components/property/editRoom/editRoom.js | 7 ++
public/pages/property/room/room.html | 4 +-
public/pages/property/room/room.js | 8 ++-
8 files changed, 79 insertions(+), 45 deletions(-)
diff --git a/public/components/property/addMeterWater/addMeterWater.html b/public/components/property/addMeterWater/addMeterWater.html
index c736590e4..ff9a7c64f 100755
--- a/public/components/property/addMeterWater/addMeterWater.html
+++ b/public/components/property/addMeterWater/addMeterWater.html
@@ -21,7 +21,8 @@
注:单元选择为0表示为商铺
diff --git a/public/components/property/addRoomView/addRoomView.js b/public/components/property/addRoomView/addRoomView.js
index f1ccf6eda..ef6f0b088 100755
--- a/public/components/property/addRoomView/addRoomView.js
+++ b/public/components/property/addRoomView/addRoomView.js
@@ -22,7 +22,8 @@
roomArea: '',
roomRent: '0',
communityId: vc.getCurrentCommunity().communityId,
- attrs: []
+ attrs: [],
+ roomSubTypes: []
}
},
watch: {
@@ -35,63 +36,68 @@
},
_initMethod: function () {
$that._loadRoomAttrSpec();
+ //与字典表关联
+ vc.getDict('building_room', "room_sub_type", function (_data) {
+ vc.component.addRoomViewInfo.roomSubTypes = _data;
+ });
},
_initEvent: function () {
vc.on('addRoomViewInfo', 'onIndex',
function (_index) {
vc.component.addRoomViewInfo.index = _index;
});
+
},
methods: {
addRoomValidate() {
vc.component.addRoomViewInfo.apartment = vc.component.addRoomViewInfo.apartment1 + vc.component.addRoomViewInfo.apartment2;
return vc.validate.validate({
- addRoomViewInfo: vc.component.addRoomViewInfo
- },
+ addRoomViewInfo: vc.component.addRoomViewInfo
+ },
{
'addRoomViewInfo.roomNum': [{
limit: "required",
param: "",
errInfo: "房屋编号不能为空"
},
- {
- limit: "maxLength",
- param: "12",
- errInfo: "房屋编号长度不能超过12位"
- },
+ {
+ limit: "maxLength",
+ param: "12",
+ errInfo: "房屋编号长度不能超过12位"
+ },
],
'addRoomViewInfo.layer': [{
limit: "required",
param: "",
errInfo: "房屋楼层不能为空"
},
- {
- limit: "num",
- param: "",
- errInfo: "房屋楼层高度必须为数字"
- },
+ {
+ limit: "num",
+ param: "",
+ errInfo: "房屋楼层高度必须为数字"
+ },
],
'addRoomViewInfo.apartment': [{
limit: "required",
param: "",
errInfo: "房屋户型不能为空"
},
- {
- limit: "maxLength",
- param: "50",
- errInfo: "房屋户型不能大于50"
- },
+ {
+ limit: "maxLength",
+ param: "50",
+ errInfo: "房屋户型不能大于50"
+ },
],
'addRoomViewInfo.builtUpArea': [{
limit: "required",
param: "",
errInfo: "建筑面积不能为空"
},
- {
- limit: "money",
- param: "",
- errInfo: "建筑面积错误,如 300.00"
- },
+ {
+ limit: "money",
+ param: "",
+ errInfo: "建筑面积错误,如 300.00"
+ },
],
'addRoomViewInfo.roomArea': [{
limit: "required",
@@ -121,11 +127,11 @@
param: "",
errInfo: "房屋状态不能为空"
},
- {
- limit: "maxLength",
- param: "12",
- errInfo: "房屋状态 不能超过12位"
- },
+ {
+ limit: "maxLength",
+ param: "12",
+ errInfo: "房屋状态 不能超过12位"
+ },
],
'addRoomViewInfo.roomSubType': [{
limit: "required",
@@ -150,7 +156,7 @@
$that._loadAttrValue(item.specCd, item.values);
$that.addRoomViewInfo.attrs.push(item);
}
- console.log('attrs : ',$that.addRoomViewInfo.attrs);
+ console.log('attrs : ', $that.addRoomViewInfo.attrs);
});
});
},
@@ -168,11 +174,11 @@
// 验证attr必填项
let msg = '';
vc.component.addRoomViewInfo.attrs.forEach((item) => {
- if (item.required == 'Y' && item.value == ""){
+ if (item.required == 'Y' && item.value == "") {
msg = item.specHoldplace;
}
})
- if(msg){
+ if (msg) {
return;
}
//侦听回传
diff --git a/public/components/property/editRoom/editRoom.html b/public/components/property/editRoom/editRoom.html
index b1cf8c39e..3b2295b04 100755
--- a/public/components/property/editRoom/editRoom.html
+++ b/public/components/property/editRoom/editRoom.html
@@ -69,9 +69,8 @@