mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
优化代码
This commit is contained in:
parent
9525adba3f
commit
86d46e5604
@ -18,9 +18,9 @@
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addShops', 'addShopsModel', function (_params) {
|
||||
vc.component.refreshAddShopsInfo();
|
||||
$that.refreshAddShopsInfo();
|
||||
$('#addShopsModel').modal('show');
|
||||
vc.component.addShopsInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
$that.addShopsInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
});
|
||||
vc.on('addShops', 'addShops', 'notify', function (_param) {
|
||||
if (_param.hasOwnProperty('floorId')) {
|
||||
@ -31,7 +31,7 @@
|
||||
methods: {
|
||||
addShopsValidate: function () {
|
||||
return vc.validate.validate({
|
||||
addShopsInfo: vc.component.addShopsInfo
|
||||
addShopsInfo: $that.addShopsInfo
|
||||
}, {
|
||||
'addShopsInfo.roomNum': [
|
||||
{
|
||||
@ -127,13 +127,13 @@
|
||||
});
|
||||
},
|
||||
addShops: function () {
|
||||
if (!vc.component.addShopsValidate()) {
|
||||
if (!$that.addShopsValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'room.saveShops',
|
||||
JSON.stringify(vc.component.addShopsInfo),
|
||||
'/room.saveShops',
|
||||
JSON.stringify($that.addShopsInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
@ -155,7 +155,7 @@
|
||||
});
|
||||
},
|
||||
refreshAddShopsInfo: function () {
|
||||
vc.component.addShopsInfo = {
|
||||
$that.addShopsInfo = {
|
||||
floorId: '',
|
||||
roomNum: '',
|
||||
layer: '',
|
||||
@ -170,4 +170,4 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc, window.vc.component);
|
||||
})(window.vc, window.$that);
|
||||
@ -1,4 +1,4 @@
|
||||
<div id="editRoomModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
<div id="editRoomModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
@ -42,7 +42,7 @@
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editRoomInfo.unitId">
|
||||
<option selected disabled value="">{{vc.i18n('必填','editRoom')}},请选择单元</option>
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择单元','editRoom')}}</option>
|
||||
<option v-for="(unit,index) in editRoomUnits" :key="index"
|
||||
v-bind:value="unit.unitId">{{unit.unitNum}}{{vc.i18n('单元','editRoom')}}
|
||||
</option>
|
||||
@ -55,7 +55,7 @@
|
||||
</label>
|
||||
<div class="col-sm-5" style="display: inline">
|
||||
<select class="custom-select" v-model="editRoomInfo.apartment1">
|
||||
<option selected value="">{{vc.i18n('必填','editRoom')}},请选择房屋户型</option>
|
||||
<option selected value="">{{vc.i18n('必填,请选择房屋户型','editRoom')}}</option>
|
||||
<option value="10">{{vc.i18n('一室','editRoom')}}</option>
|
||||
<option value="20">{{vc.i18n('两室','editRoom')}}</option>
|
||||
<option value="30">{{vc.i18n('三室','editRoom')}}</option>
|
||||
@ -68,7 +68,7 @@
|
||||
</div>
|
||||
<div class="col-sm-5" style="display: inline">
|
||||
<select class="custom-select" v-model="editRoomInfo.apartment2">
|
||||
<option selected value="">{{vc.i18n('必填','editRoom')}},请选择房屋户型</option>
|
||||
<option selected value="">{{vc.i18n('必填,请选择房屋户型','editRoom')}}</option>
|
||||
<option value="101">{{vc.i18n('一厅','editRoom')}}</option>
|
||||
<option value="102">{{vc.i18n('两厅','editRoom')}}</option>
|
||||
<option value="103">{{vc.i18n('三厅','editRoom')}}</option>
|
||||
@ -87,7 +87,7 @@
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editRoomInfo.roomSubType">
|
||||
<option selected disabled value="">{{vc.i18n('必填','editRoom')}},请选择房屋类型</option>
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择房屋类型','editRoom')}}</option>
|
||||
<option :value="item.statusCd"
|
||||
v-for="(item,index) in editRoomInfo.roomSubTypes">{{item.name}}
|
||||
</option>
|
||||
@ -143,8 +143,8 @@
|
||||
<option value="2005">{{vc.i18n('已装修','editRoom')}}</option>
|
||||
<option value="2004">{{vc.i18n('未入住','editRoom')}}</option>
|
||||
<!--wuxw 关闭 这里和后端对不上 后端要求提供开始时间和结束时间 前段 没有这个选项,不清楚什么场景下的需求,后面的兄弟记得补充-->
|
||||
<!-- <option value="2006">{{vc.i18n('已出租','editRoom')}}</option> -->
|
||||
<option value="2008">{{vc.i18n('空闲','editRoom')}}</option>
|
||||
<!-- <option value="2006">{{vc.i18n('已出租','editRoom')}}</option>
|
||||
<option value="2008">{{vc.i18n('空闲','editRoom')}}</option>-->
|
||||
<option value="2009">{{vc.i18n('装修中','editRoom')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span><vc:i18n name="查询条件" namespace="shops"></vc:i18n></span>
|
||||
<vc:i18n name="查询条件" namespace="shops"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<!-- <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
|
||||
@ -55,7 +55,7 @@
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span><vc:i18n name="商铺信息" namespace="shops"></vc:i18n></span>
|
||||
<vc:i18n name="商铺信息" namespace="shops"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;" v-if="vc.hasPrivilege('502020082453087940')">
|
||||
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
|
||||
@ -71,7 +71,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<span><vc:i18n name="商铺" namespace="shops"></vc:i18n></span>ID
|
||||
<vc:i18n name="商铺ID" namespace="shops"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<span><vc:i18n name="商铺编号" namespace="shops"></vc:i18n></span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user