mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
房屋页面修改
This commit is contained in:
parent
82fb87a739
commit
bf6213c8ea
@ -17,7 +17,7 @@
|
||||
configId: '',
|
||||
ownerName: '',
|
||||
objType: '3333',
|
||||
startTime: vc.dateFormat(new Date()),
|
||||
startTime: (new Date()),
|
||||
endTime: vc.addMonthDate(new Date(), 1)
|
||||
}
|
||||
},
|
||||
|
||||
@ -1,143 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span><vc:i18n name="添加房屋" namespace="addRoomView"></vc:i18n></span>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="房屋编号" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addRoomViewInfo.roomNum" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写房屋编号','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="房屋楼层" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addRoomViewInfo.layer" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写房屋楼层','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="房屋户型" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-5" style="display: inline">
|
||||
<select class="custom-select" v-model="addRoomViewInfo.apartment1">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择房屋户型','addRoomView')}}</option>
|
||||
<option value="10">{{vc.i18n('一室','addRoomView')}}</option>
|
||||
<option value="20">{{vc.i18n('两室','addRoomView')}}</option>
|
||||
<option value="30">{{vc.i18n('三室','addRoomView')}}</option>
|
||||
<option value="40">{{vc.i18n('四室','addRoomView')}}</option>
|
||||
<option value="50">{{vc.i18n('五室','addRoomView')}}</option>
|
||||
<option value="60">{{vc.i18n('六室','addRoomView')}}</option>
|
||||
<option value="70">{{vc.i18n('七室','addRoomView')}}</option>
|
||||
<option value="80">{{vc.i18n('八室','addRoomView')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5" style="display: inline">
|
||||
<select class="custom-select" v-model="addRoomViewInfo.apartment2">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择房屋户型','addRoomView')}}</option>
|
||||
<option value="101">{{vc.i18n('一厅','addRoomView')}}</option>
|
||||
<option value="102">{{vc.i18n('两厅','addRoomView')}}</option>
|
||||
<option value="103">{{vc.i18n('三厅','addRoomView')}}</option>
|
||||
<option value="104">{{vc.i18n('四厅','addRoomView')}}</option>
|
||||
<option value="105">{{vc.i18n('五厅','addRoomView')}}</option>
|
||||
<option value="106">{{vc.i18n('六厅','addRoomView')}}</option>
|
||||
<option value="107">{{vc.i18n('七厅','addRoomView')}}</option>
|
||||
<option value="108">{{vc.i18n('八厅','addRoomView')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="房屋类型" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addRoomViewInfo.roomSubType">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择房屋类型','addRoomView')}}</option>
|
||||
<option :value="item.statusCd" v-for="(item,index) in addRoomViewInfo.roomSubTypes">
|
||||
{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="addRoomViewInfo.roomSubType != '110'">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="租金" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addRoomViewInfo.roomRent" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写租金','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="建筑面积(平方)" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addRoomViewInfo.builtUpArea" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写建筑面积','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="室内面积(平方)" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addRoomViewInfo.roomArea" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写室内面积','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="算费系数" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addRoomViewInfo.feeCoefficient" type="text"
|
||||
:placeholder="vc.i18n('请填写算费系数','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="(item,index) in addRoomViewInfo.attrs">
|
||||
<div class="form-group row" v-if="item.specType == '2233'">
|
||||
<label class="col-sm-2 col-form-label">{{item.specName}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="item.value" type="text" :placeholder="item.specHoldplace"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="item.specType == '3344'">
|
||||
<label class="col-sm-2 col-form-label">{{item.specName}}</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="item.value">
|
||||
<option selected disabled value="">{{item.specHoldplace}}</option>
|
||||
<option v-for="value in item.values" :label="value.valueName" :value="value.value">
|
||||
{{item.valueName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="备注" namespace="addRoomView"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea :placeholder="vc.i18n('选填,请填写备注','addRoomView')" class="form-control"
|
||||
v-model="addRoomViewInfo.remark">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,181 +0,0 @@
|
||||
(function (vc) {
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string,
|
||||
//父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data: {
|
||||
addRoomViewInfo: {
|
||||
flowComponent: 'addRoomView',
|
||||
roomNum: '',
|
||||
layer: '',
|
||||
section: '0',
|
||||
apartment: '',
|
||||
apartment1: '',
|
||||
apartment2: '',
|
||||
builtUpArea: '',
|
||||
feeCoefficient: '1.00',
|
||||
state: '2002',
|
||||
remark: '',
|
||||
roomSubType: '110',
|
||||
roomArea: '',
|
||||
roomRent: '0',
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
attrs: [],
|
||||
roomSubTypes: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
addRoomViewInfo: {
|
||||
deep: true,
|
||||
handler: function () {
|
||||
vc.component.saveAddRoomInfo();
|
||||
}
|
||||
}
|
||||
},
|
||||
_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.roomNum': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋编号不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "64",
|
||||
errInfo: "房屋编号长度不能超过64位"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.layer': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋楼层不能为空"
|
||||
}],
|
||||
'addRoomViewInfo.apartment': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋户型不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "50",
|
||||
errInfo: "房屋户型不能大于50"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.builtUpArea': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "建筑面积不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
errInfo: "建筑面积错误,如 300.00"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.roomArea': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "室内面积不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
errInfo: "室内面积错误,如 300.00"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.feeCoefficient': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "算费系数不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
errInfo: "算费系数错误,如 300.00"
|
||||
}
|
||||
],
|
||||
'addRoomViewInfo.state': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋状态不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "12",
|
||||
errInfo: "房屋状态 不能超过12位"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.roomSubType': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋类型不能为空"
|
||||
}],
|
||||
'addRoomViewInfo.remark': [{
|
||||
limit: "maxLength",
|
||||
param: "200",
|
||||
errInfo: "备注内容不能超过200"
|
||||
}],
|
||||
});
|
||||
},
|
||||
_loadRoomAttrSpec: function () {
|
||||
$that.addRoomViewInfo.attrs = [];
|
||||
vc.getAttrSpec('building_room_attr', function (data) {
|
||||
data.forEach(item => {
|
||||
item.value = '';
|
||||
if (item.specShow == 'Y') {
|
||||
item.values = [];
|
||||
$that._loadAttrValue(item.specCd, item.values);
|
||||
$that.addRoomViewInfo.attrs.push(item);
|
||||
}
|
||||
console.log('attrs : ', $that.addRoomViewInfo.attrs);
|
||||
});
|
||||
});
|
||||
},
|
||||
_loadAttrValue: function (_specCd, _values) {
|
||||
vc.getAttrValue(_specCd, function (data) {
|
||||
data.forEach(item => {
|
||||
if (item.valueShow == 'Y') {
|
||||
_values.push(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
saveAddRoomInfo: function () {
|
||||
if (vc.component.addRoomValidate()) {
|
||||
// 验证attr必填项
|
||||
let msg = '';
|
||||
vc.component.addRoomViewInfo.attrs.forEach((item) => {
|
||||
if (item.required == 'Y' && item.value == "") {
|
||||
msg = item.specHoldplace;
|
||||
}
|
||||
})
|
||||
if (msg) {
|
||||
return;
|
||||
}
|
||||
//侦听回传
|
||||
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addRoomViewInfo);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
81
public/pages/owner/roomBindOwner/roomBindOwner.html
Normal file
81
public/pages/owner/roomBindOwner/roomBindOwner.html
Normal file
@ -0,0 +1,81 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span>
|
||||
<vc:i18n name="房屋交房" namespace="roomBindOwner"></vc:i18n>
|
||||
</span>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-white btn-sm" v-on:click="_goBack()">
|
||||
返回
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<vc:i18n name="房屋" namespace="roomBindOwner"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input v-model="roomBindOwnerInfo.roomName" type="text" disabled
|
||||
:placeholder="vc.i18n('必填,请填写房屋名称','roomBindOwner')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="业主" namespace="roomBindOwner"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-7">
|
||||
<input v-model="roomBindOwnerInfo.ownerName" disabled type="text"
|
||||
:placeholder="vc.i18n('必填,请选择业主','roomBindOwner')" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_openChooseOwner()">选择业主
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" >
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name="开始时间" namespace="roomBindOwner"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input v-model="roomBindOwnerInfo.startTime" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写开始时间','roomBindOwner')"
|
||||
class="form-control addStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" >
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name="结束时间" namespace="roomBindOwner"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input v-model="roomBindOwnerInfo.endTime" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写结束时间','roomBindOwner')"
|
||||
class="form-control addEndTime">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<button class="btn btn-primary" type="button" v-on:click="saveRoomBindOwnerInfo()"><i
|
||||
class="fa fa-check"></i> 提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="property/searchOwner" emitChooseOwner="roomBindOwner" emitLoadData="roomBindOwner"></vc:create>
|
||||
|
||||
</div>
|
||||
134
public/pages/owner/roomBindOwner/roomBindOwner.js
Normal file
134
public/pages/owner/roomBindOwner/roomBindOwner.js
Normal file
@ -0,0 +1,134 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
roomBindOwnerInfo: {
|
||||
roomId: '',
|
||||
roomName: '',
|
||||
ownerId: '',
|
||||
ownerName: '',
|
||||
state:'2001',
|
||||
stateTime: vc.dateFormat(new Date().getTime()),
|
||||
endTime: '2050-01-01',
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that.roomBindOwnerInfo.roomId = vc.getParam('roomId');
|
||||
$that.listRoom(vc.getParam('roomId'));
|
||||
$that.roomBindOwnerInfo.startTime = vc.dateFormat(new Date().getTime());
|
||||
vc.initDate('addStartTime', function (_value) {
|
||||
$that.roomBindOwnerInfo.startTime = _value;
|
||||
});
|
||||
vc.initDate('addEndTime', function (_value) {
|
||||
$that.roomBindOwnerInfo.endTime = _value;
|
||||
});
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('roomBindOwner', 'chooseOwner', function (_owner) {
|
||||
$that.roomBindOwnerInfo.ownerName = _owner.name;
|
||||
$that.roomBindOwnerInfo.ownerId = _owner.ownerId;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
roomBindOwnerValidate() {
|
||||
return vc.validate.validate({
|
||||
roomBindOwnerInfo: vc.component.roomBindOwnerInfo
|
||||
}, {
|
||||
'roomBindOwnerInfo.ownerId': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "业主不能为空"
|
||||
}
|
||||
],
|
||||
'roomBindOwnerInfo.roomId': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋不能为空"
|
||||
}],
|
||||
'roomBindOwnerInfo.startTime': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "开始时间不能为空"
|
||||
}],
|
||||
'roomBindOwnerInfo.endTime': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "结束时间不能为空"
|
||||
}],
|
||||
});
|
||||
},
|
||||
saveRoomBindOwnerInfo: function () {
|
||||
if (!vc.component.roomBindOwnerValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.component.roomBindOwnerInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/room.sellRoom',
|
||||
JSON.stringify(vc.component.roomBindOwnerInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
vc.toast('提交成功');
|
||||
$that._goBack();
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.toast(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
clearAddHandoverInfo: function () {
|
||||
vc.component.roomBindOwnerInfo = {
|
||||
roomId: '',
|
||||
roomName: '',
|
||||
ownerId: '',
|
||||
ownerName: '',
|
||||
state:'2001',
|
||||
stateTime: vc.dateFormat(new Date().getTime()),
|
||||
endTime: '2050-01-01',
|
||||
};
|
||||
},
|
||||
_goBack: function () {
|
||||
vc.goBack();
|
||||
},
|
||||
_openChooseOwner: function () {
|
||||
vc.emit('searchOwner', 'openSearchOwnerModel', {});
|
||||
},
|
||||
listRoom: function (_roomId) {
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 1,
|
||||
roomId: _roomId,
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/room.queryRooms',
|
||||
param,
|
||||
function (json, res) {
|
||||
let listRoomData = JSON.parse(json);
|
||||
let _room = listRoomData.rooms[0];
|
||||
|
||||
$that.roomBindOwnerInfo.roomId = _room.roomId;
|
||||
$that.roomBindOwnerInfo.roomName = _room.floorNum+'-'+_room.unitNum+'-'+_room.roomNum;
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -1,37 +0,0 @@
|
||||
<div>
|
||||
<div class="java110_step">
|
||||
<div id="step"></div>
|
||||
</div>
|
||||
<!-- 选择 应用信息 -->
|
||||
<div v-if="addRoomBindingInfo.index == 0">
|
||||
<vc:create path="property/viewFloorInfo" callBackListener="addRoomBinding"
|
||||
callBackFunction="notify">
|
||||
</vc:create>
|
||||
</div>
|
||||
<div v-if="addRoomBindingInfo.index == 1">
|
||||
<vc:create path="property/viewUnitInfo" callBackListener="addRoomBinding"
|
||||
callBackFunction="notify">
|
||||
</vc:create>
|
||||
</div>
|
||||
<div v-if="addRoomBindingInfo.index == 2">
|
||||
<vc:create path="property/addRoomView" callBackListener="addRoomBinding"
|
||||
callBackFunction="notify">
|
||||
</vc:create>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10"></div>
|
||||
<div class="col-md-2 " style="margin-bottom:10px; text-align:right">
|
||||
<button type="button" class="btn btn-secondary" v-on:click="_prevStep()">
|
||||
<span><vc:i18n name="上一步" namespace="addRoomBinding"></vc:i18n></span>
|
||||
</button>
|
||||
<button v-if="addRoomBindingInfo.index != 2" type="button" class="btn btn-primary" style="margin-left:10px;"
|
||||
v-on:click="_nextStep()">
|
||||
<span><vc:i18n name="下一步" namespace="addRoomBinding"></vc:i18n></span>
|
||||
</button>
|
||||
<button v-if="addRoomBindingInfo.index == 2" type="button" class="btn btn-primary" style="margin-left:10px;"
|
||||
v-on:click="_finishStep()">
|
||||
<span><vc:i18n name="完成" namespace="addRoomBinding"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,99 +0,0 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
vc.extends({
|
||||
data: {
|
||||
addRoomBindingInfo: {
|
||||
$step: {},
|
||||
index: 0,
|
||||
infos: []
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._initStep();
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on("addRoomBinding", "notify", function (_info) {
|
||||
_info.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.component.addRoomBindingInfo.infos[vc.component.addRoomBindingInfo.index] = _info;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_initStep: function () {
|
||||
vc.component.addRoomBindingInfo.$step = $("#step");
|
||||
vc.component.addRoomBindingInfo.$step.step({
|
||||
index: 0,
|
||||
time: 500,
|
||||
title: ["选择楼", "选择单元", "添加房屋"]
|
||||
});
|
||||
vc.component.addRoomBindingInfo.index = vc.component.addRoomBindingInfo.$step.getIndex();
|
||||
},
|
||||
_prevStep: function () {
|
||||
vc.component.addRoomBindingInfo.$step.prevStep();
|
||||
vc.component.addRoomBindingInfo.index = vc.component.addRoomBindingInfo.$step.getIndex();
|
||||
vc.emit('viewFloorInfo', 'onIndex', vc.component.addRoomBindingInfo.index);
|
||||
vc.emit('viewUnitInfo', 'onIndex', vc.component.addRoomBindingInfo.index);
|
||||
vc.emit('addRoomView', 'onIndex', vc.component.addRoomBindingInfo.index);
|
||||
},
|
||||
_nextStep: function () {
|
||||
var _currentData = vc.component.addRoomBindingInfo.infos[vc.component.addRoomBindingInfo.index];
|
||||
if (_currentData == null || _currentData == undefined) {
|
||||
vc.toast("请选择或填写必选信息");
|
||||
return;
|
||||
}
|
||||
vc.component.addRoomBindingInfo.$step.nextStep();
|
||||
vc.component.addRoomBindingInfo.index = vc.component.addRoomBindingInfo.$step.getIndex();
|
||||
vc.emit('viewFloorInfo', 'onIndex', vc.component.addRoomBindingInfo.index);
|
||||
vc.emit('viewUnitInfo', 'onIndex', vc.component.addRoomBindingInfo.index);
|
||||
vc.emit('addRoomView', 'onIndex', vc.component.addRoomBindingInfo.index);
|
||||
},
|
||||
_finishStep: function () {
|
||||
var _currentData = vc.component.addRoomBindingInfo.infos[vc.component.addRoomBindingInfo.index];
|
||||
if ('' == vc.component.addRoomViewInfo.unitPrice || null == vc.component.addRoomViewInfo.unitPrice) {
|
||||
vc.component.addRoomViewInfo.unitPrice = '0';
|
||||
}
|
||||
if (_currentData == null || _currentData == undefined) {
|
||||
vc.toast("请选择或填写必选信息");
|
||||
return;
|
||||
}
|
||||
if (parseInt(vc.component.viewUnitInfo.layerCount) < parseInt(vc.component.addRoomViewInfo.layer)) {
|
||||
vc.toast('楼层不可超过' + vc.component.viewUnitInfo.layerCount);
|
||||
return;
|
||||
}
|
||||
var param = {
|
||||
data: vc.component.addRoomBindingInfo.infos
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'/room.addRoomBinding',
|
||||
JSON.stringify(param), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
let _tmpResJson = JSON.parse(json);
|
||||
if (_tmpResJson.code == 0) {
|
||||
//关闭model
|
||||
vc.goBack();
|
||||
vc.toast("添加成功");
|
||||
return;
|
||||
} else {
|
||||
vc.toast(_tmpResJson.msg);
|
||||
}
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
_getFloorName: function () {
|
||||
var _tmpInfos = vc.component.addRoomBindingInfo.infos;
|
||||
for (var _tmpIndex = 0; _tmpIndex < _tmpInfos.length; _tmpIndex++) {
|
||||
if (_tmpInfos[_tmpIndex].flowComponent == 'viewFloorInfo') {
|
||||
return _tmpInfos[_tmpIndex].floorName;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
201
public/pages/property/addRoomView/addRoomView.html
Normal file
201
public/pages/property/addRoomView/addRoomView.html
Normal file
@ -0,0 +1,201 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span>
|
||||
<vc:i18n name="添加房屋" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-white btn-sm" v-on:click="_goBack()">
|
||||
<i class="fa fa-close"></i>返回
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="楼栋" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="addRoomViewInfo.floorId" @change="_loadUnit()">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择楼栋','addRoomView')}}</option>
|
||||
<option v-for="(floor,index) in addRoomViewInfo.floors" :key="index"
|
||||
v-bind:value="floor.floorId">{{floor.floorName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="单元" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="addRoomViewInfo.unitId">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择单元','addRoomView')}}</option>
|
||||
<option v-for="(unit,index) in addRoomViewInfo.units" :key="index"
|
||||
v-if="unit.unitNum != '0'" v-bind:value="unit.unitId">{{unit.unitNum}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="房屋编号" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="addRoomViewInfo.roomNum" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写房屋编号','addRoomView')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="房屋楼层" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="addRoomViewInfo.layer" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写房屋楼层','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="房屋类型" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="addRoomViewInfo.roomSubType">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择房屋类型','addRoomView')}}</option>
|
||||
<option :value="item.statusCd" v-for="(item,index) in addRoomViewInfo.roomSubTypes">
|
||||
{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right" v-if="addRoomViewInfo.roomSubType != '110'">
|
||||
<span>
|
||||
<vc:i18n name="租金" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4" v-if="addRoomViewInfo.roomSubType != '110'">
|
||||
<input v-model="addRoomViewInfo.roomRent" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写租金','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="建筑面积(平方)" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="addRoomViewInfo.builtUpArea" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写建筑面积','addRoomView')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="室内面积(平方)" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="addRoomViewInfo.roomArea" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写室内面积','addRoomView')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="算费系数" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="addRoomViewInfo.feeCoefficient" type="text"
|
||||
:placeholder="vc.i18n('请填写算费系数','addRoomView')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="房屋状态" namespace="editRoom"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="addRoomViewInfo.state">
|
||||
<option selected value="">{{vc.i18n('必填,请选择房屋状态','editRoom')}}</option>
|
||||
<option value="2002">{{vc.i18n('未销售','addRoomView')}}</option>
|
||||
<option value="2001">{{vc.i18n('已入住','addRoomView')}}</option>
|
||||
<option value="2003">{{vc.i18n('已交房','addRoomView')}}</option>
|
||||
<option value="2005">{{vc.i18n('已装修','addRoomView')}}</option>
|
||||
<option value="2004">{{vc.i18n('未入住','addRoomView')}}</option>
|
||||
<option value="2009">{{vc.i18n('装修中','addRoomView')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="addRoomViewInfo.state != '2002'">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<vc:i18n name="业主" namespace="addRoomView"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-3">
|
||||
<input v-model="addRoomViewInfo.ownerName" disabled type="text"
|
||||
:placeholder="vc.i18n('必填,请选择业主','addRoomView')" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openChooseOwner()">选择业主
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="(item,index) in addRoomViewInfo.attrs">
|
||||
<div class="form-group row" v-if="item.specType == '2233'">
|
||||
<label class="col-sm-2 col-form-label text-right">{{item.specName}}</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="item.value" type="text" :placeholder="item.specHoldplace"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="item.specType == '3344'">
|
||||
<label class="col-sm-2 col-form-label text-right">{{item.specName}}</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="item.value">
|
||||
<option selected disabled value="">{{item.specHoldplace}}</option>
|
||||
<option v-for="value in item.values" :label="value.valueName" :value="value.value">
|
||||
{{item.valueName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="备注" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<textarea :placeholder="vc.i18n('选填,请填写备注','addRoomView')" class="form-control"
|
||||
v-model="addRoomViewInfo.remark">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<button type="button" class="btn btn-warning " style="margin-right:20px;" @click="_goBack()">
|
||||
<span>
|
||||
<vc:i18n name="返回" namespace="addRoomView"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
<button class="btn btn-primary" type="button" v-on:click="saveAddRoomInfo()"><i
|
||||
class="fa fa-check"></i> 提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="property/searchOwner" emitChooseOwner="addRoomView" emitLoadData="addRoomView">
|
||||
</vc:create>
|
||||
|
||||
</div>
|
||||
242
public/pages/property/addRoomView/addRoomView.js
Normal file
242
public/pages/property/addRoomView/addRoomView.js
Normal file
@ -0,0 +1,242 @@
|
||||
(function (vc) {
|
||||
vc.extends({
|
||||
data: {
|
||||
addRoomViewInfo: {
|
||||
roomNum: '',
|
||||
layer: '',
|
||||
section: '0',
|
||||
apartment: '10102',
|
||||
builtUpArea: '',
|
||||
feeCoefficient: '1.00',
|
||||
state: '2002',
|
||||
remark: '',
|
||||
roomSubType: '110',
|
||||
roomArea: '',
|
||||
roomRent: '0',
|
||||
unitPrice:'0',
|
||||
floorId:'',
|
||||
unitId:'',
|
||||
ownerId:'',
|
||||
ownerName:'',
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
attrs: [],
|
||||
roomSubTypes: [],
|
||||
floors:[],
|
||||
units:[]
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that._loadRoomAttrSpec();
|
||||
//与字典表关联
|
||||
vc.getDict('building_room', "room_sub_type", function (_data) {
|
||||
vc.component.addRoomViewInfo.roomSubTypes = _data;
|
||||
});
|
||||
$that._loadFloor();
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addRoomView', 'chooseOwner', function (_owner) {
|
||||
$that.addRoomViewInfo.ownerName = _owner.name;
|
||||
$that.addRoomViewInfo.ownerId = _owner.ownerId;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
addRoomValidate() {
|
||||
return vc.validate.validate({
|
||||
addRoomViewInfo: vc.component.addRoomViewInfo
|
||||
}, {
|
||||
'addRoomViewInfo.roomNum': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋编号不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "64",
|
||||
errInfo: "房屋编号长度不能超过64位"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.layer': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋楼层不能为空"
|
||||
}],
|
||||
'addRoomViewInfo.apartment': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋户型不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "50",
|
||||
errInfo: "房屋户型不能大于50"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.builtUpArea': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "建筑面积不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
errInfo: "建筑面积错误,如 300.00"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.roomArea': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "室内面积不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
errInfo: "室内面积错误,如 300.00"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.feeCoefficient': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "算费系数不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
errInfo: "算费系数错误,如 300.00"
|
||||
}
|
||||
],
|
||||
'addRoomViewInfo.state': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋状态不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "12",
|
||||
errInfo: "房屋状态 不能超过12位"
|
||||
},
|
||||
],
|
||||
'addRoomViewInfo.roomSubType': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "房屋类型不能为空"
|
||||
}],
|
||||
'addRoomViewInfo.remark': [{
|
||||
limit: "maxLength",
|
||||
param: "200",
|
||||
errInfo: "备注内容不能超过200"
|
||||
}],
|
||||
});
|
||||
},
|
||||
_loadRoomAttrSpec: function () {
|
||||
$that.addRoomViewInfo.attrs = [];
|
||||
vc.getAttrSpec('building_room_attr', function (data) {
|
||||
data.forEach(item => {
|
||||
item.value = '';
|
||||
if (item.specShow == 'Y') {
|
||||
item.values = [];
|
||||
$that._loadAttrValue(item.specCd, item.values);
|
||||
$that.addRoomViewInfo.attrs.push(item);
|
||||
}
|
||||
console.log('attrs : ', $that.addRoomViewInfo.attrs);
|
||||
});
|
||||
});
|
||||
},
|
||||
_loadAttrValue: function (_specCd, _values) {
|
||||
vc.getAttrValue(_specCd, function (data) {
|
||||
data.forEach(item => {
|
||||
if (item.valueShow == 'Y') {
|
||||
_values.push(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
saveAddRoomInfo: function () {
|
||||
let msg = '';
|
||||
vc.component.addRoomViewInfo.attrs.forEach((item) => {
|
||||
if (item.required == 'Y' && item.value == "") {
|
||||
msg = item.specHoldplace;
|
||||
}
|
||||
})
|
||||
if (msg) {
|
||||
vc.toast(msg);
|
||||
return;
|
||||
}
|
||||
if (!vc.component.addRoomValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'/room.saveRoom',
|
||||
JSON.stringify($that.addRoomViewInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
let _tmpResJson = JSON.parse(json);
|
||||
if (_tmpResJson.code == 0) {
|
||||
//关闭model
|
||||
vc.goBack();
|
||||
vc.toast("添加成功");
|
||||
return;
|
||||
} else {
|
||||
vc.toast(_tmpResJson.msg);
|
||||
}
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
_goBack:function(){
|
||||
vc.goBack();
|
||||
},
|
||||
_openChooseOwner: function () {
|
||||
vc.emit('searchOwner', 'openSearchOwnerModel', {});
|
||||
},
|
||||
_loadFloor:function(){
|
||||
let param = {
|
||||
params:{
|
||||
page:1,
|
||||
row:300,
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
}
|
||||
}
|
||||
//发送get请求
|
||||
vc.http.apiGet('/floor.queryFloors',
|
||||
param,
|
||||
function(json, res) {
|
||||
let listFloorData = JSON.parse(json);
|
||||
$that.addRoomViewInfo.floors = listFloorData.apiFloorDataVoList;
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_loadUnit:function(){
|
||||
if(!$that.addRoomViewInfo.floorId){
|
||||
return ;
|
||||
}
|
||||
|
||||
let param = {
|
||||
params:{
|
||||
page:1,
|
||||
row:300,
|
||||
communityId:vc.getCurrentCommunity().communityId,
|
||||
floorId:$that.addRoomViewInfo.floorId
|
||||
}
|
||||
}
|
||||
//发送get请求
|
||||
vc.http.apiGet('/unit.queryUnits',
|
||||
param,
|
||||
function(json, res) {
|
||||
let listFloorData = JSON.parse(json);
|
||||
$that.addRoomViewInfo.units = listFloorData;
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -1,36 +0,0 @@
|
||||
<div>
|
||||
<div class="java110_step">
|
||||
<div id="step"></div>
|
||||
</div>
|
||||
<!-- 选择 应用信息 -->
|
||||
<div v-if="hireParkingSpaceInfo.index == 0">
|
||||
<!-- 选择停车位 -->
|
||||
<vc:create path="property/viewSelectParkingSpace" callBackComponent="hireParkingSpace"
|
||||
callBackFunction="notify">
|
||||
</vc:create>
|
||||
</div>
|
||||
<div v-if="hireParkingSpaceInfo.index == 1">
|
||||
<vc:create path="property/viewOwnerInfo" callBackListener="hireParkingSpace" callBackFunction="notify">
|
||||
</vc:create>
|
||||
</div>
|
||||
<div v-show="hireParkingSpaceInfo.index == 2">
|
||||
<vc:create path="property/addCar" callBackComponent="hireParkingSpace" callBackFunction="notify">
|
||||
</vc:create>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10"></div>
|
||||
<div class="col-md-2 " style="margin-bottom:10px; text-align:right">
|
||||
<button type="button" class="btn btn-secondary" v-on:click="_prevStep()">
|
||||
<span><vc:i18n name="上一步" namespace="hireParkingSpace"></vc:i18n></span>
|
||||
</button>
|
||||
<button v-if="hireParkingSpaceInfo.index != 2" type="button" class="btn btn-primary"
|
||||
style="margin-left:10px;" v-on:click="_nextStep()">
|
||||
<span><vc:i18n name="下一步" namespace="hireParkingSpace"></vc:i18n></span>
|
||||
</button>
|
||||
<button v-if="hireParkingSpaceInfo.index == 2" type="button" class="btn btn-primary"
|
||||
style="margin-left:10px;" v-on:click="_finishStep()">
|
||||
<span><vc:i18n name="提交" namespace="hireParkingSpace"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,97 +0,0 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
vc.extends({
|
||||
data: {
|
||||
hireParkingSpaceInfo: {
|
||||
$step: {},
|
||||
index: 0,
|
||||
infos: [],
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._initStep();
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on("hireParkingSpace", "notify", function (_info) {
|
||||
vc.component.hireParkingSpaceInfo.infos[vc.component.hireParkingSpaceInfo.index] = _info;
|
||||
/*if(vc.component.hireParkingSpaceInfo.index == 0){
|
||||
vc.emit('searchRoom','listenerFloorInfo',_info);
|
||||
}*/
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_initStep: function () {
|
||||
vc.component.hireParkingSpaceInfo.$step = $("#step");
|
||||
vc.component.hireParkingSpaceInfo.$step.step({
|
||||
index: 0,
|
||||
time: 500,
|
||||
title: ["选择车位", "业主信息", "车辆信息"]
|
||||
});
|
||||
vc.component.hireParkingSpaceInfo.index = vc.component.hireParkingSpaceInfo.$step.getIndex();
|
||||
},
|
||||
_prevStep: function () {
|
||||
vc.component.hireParkingSpaceInfo.$step.prevStep();
|
||||
vc.component.hireParkingSpaceInfo.index = vc.component.hireParkingSpaceInfo.$step.getIndex();
|
||||
vc.emit('viewSelectParkingSpace', 'onIndex', vc.component.hireParkingSpaceInfo.index);
|
||||
vc.emit('viewOwnerInfo', 'onIndex', vc.component.hireParkingSpaceInfo.index);
|
||||
vc.emit('addCar', 'onIndex', vc.component.hireParkingSpaceInfo.index);
|
||||
vc.emit('parkingSpaceFee', 'onIndex', vc.component.hireParkingSpaceInfo.index);
|
||||
if (vc.component.hireParkingSpaceInfo.index == 1) {
|
||||
vc.emit('viewOwnerInfo', 'callBackOwnerInfo', {});
|
||||
}
|
||||
},
|
||||
_nextStep: function () {
|
||||
var _currentData = vc.component.hireParkingSpaceInfo.infos[vc.component.hireParkingSpaceInfo.index];
|
||||
if (_currentData == null || _currentData == undefined) {
|
||||
vc.toast("请选择或填写必选信息");
|
||||
return;
|
||||
}
|
||||
vc.component.hireParkingSpaceInfo.$step.nextStep();
|
||||
vc.component.hireParkingSpaceInfo.index = vc.component.hireParkingSpaceInfo.$step.getIndex();
|
||||
vc.emit('viewSelectParkingSpace', 'onIndex', vc.component.hireParkingSpaceInfo.index);
|
||||
vc.emit('viewOwnerInfo', 'onIndex', vc.component.hireParkingSpaceInfo.index);
|
||||
vc.emit('addCar', 'onIndex', vc.component.hireParkingSpaceInfo.index);
|
||||
vc.emit('parkingSpaceFee', 'onIndex', vc.component.hireParkingSpaceInfo.index);
|
||||
if (vc.component.hireParkingSpaceInfo.index == 1) {
|
||||
vc.emit('viewOwnerInfo', 'callBackOwnerInfo', {});
|
||||
}
|
||||
},
|
||||
_finishStep: function () {
|
||||
var _currentData = vc.component.hireParkingSpaceInfo.infos[vc.component.hireParkingSpaceInfo.index];
|
||||
if (_currentData == null || _currentData == undefined) {
|
||||
vc.toast("请选择或填写必选信息");
|
||||
return;
|
||||
}
|
||||
let _infos = vc.component.hireParkingSpaceInfo.infos
|
||||
let param = _infos[2];
|
||||
param.communityId = vc.getCurrentCommunity().communityId;
|
||||
param.ownerId = _infos[1].ownerId;
|
||||
param.psId = _infos[0].psId;
|
||||
vc.http.apiPost(
|
||||
'owner.saveOwnerCar',
|
||||
JSON.stringify(param), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
json = JSON.parse(json);
|
||||
if (res.status == 200 && json.code == 0) {
|
||||
vc.toast("请记得收费哦!");
|
||||
//关闭model
|
||||
//vc.jumpToPage("/#/pages/property/listOwnerCar");
|
||||
vc.goBack();
|
||||
return;
|
||||
} else {
|
||||
vc.toast(json.msg);
|
||||
}
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -326,12 +326,27 @@
|
||||
<vc:i18n name="删除" namespace="room"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" v-if="room.state == '2002' && vc.hasPrivilege('502023021978930012')">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_toRoomBindOwner(room)">
|
||||
<vc:i18n name="交房" namespace="room"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" v-if="room.state != '2002' && room.ownerId && vc.hasPrivilege('502023021973760015')">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_toRoomUnBindOwner(room)">
|
||||
<vc:i18n name="退房" namespace="room"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" v-if="room.state != '2002'">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_toSimplifyAcceptance(room)">
|
||||
<vc:i18n name="业务受理" namespace="room"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
);
|
||||
},
|
||||
_openAddRoom: function() {
|
||||
vc.jumpToPage("/#/pages/property/addRoomBinding");
|
||||
vc.jumpToPage("/#/pages/property/addRoomView");
|
||||
},
|
||||
_openEditRoomModel: function(_room) {
|
||||
vc.emit('editRoom', 'openEditRoomModal', _room);
|
||||
@ -408,7 +408,12 @@
|
||||
_viewRoomContracts:function(_room){
|
||||
vc.emit('roomContracts', 'openRoomContractModel',_room);
|
||||
},
|
||||
|
||||
_toRoomBindOwner:function(_room){
|
||||
vc.jumpToPage('/#/pages/owner/roomBindOwner?roomId='+_room.roomId);
|
||||
},
|
||||
_toRoomUnBindOwner:function(_room){
|
||||
vc.jumpToPage('/#/pages/property/deleteOwnerRoom?ownerId='+_room.ownerId);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user