mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化代码
This commit is contained in:
parent
43b42a6807
commit
55547d1089
@ -352,6 +352,11 @@
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
|
||||
.font-1 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 1px solid #e7eaec;
|
||||
}
|
||||
|
||||
@ -0,0 +1,165 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 padding-r-0">
|
||||
<div class=" border-radius bg-white padding-top-sm">
|
||||
<div class="row">
|
||||
<div class="col-md-8 margin-xs margin-bottom">
|
||||
<input type="text" :placeholder="vc.i18n('请扫码枪扫码核销','communitySpaceConfirm')" v-model="communitySpaceConfirmInfo.timeId" class="form-control " @keyup.enter="_confirmCommunitySpace()">
|
||||
</div>
|
||||
<div class="col-md-3 margin-xs margin-bottom">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_confirmCommunitySpace()">
|
||||
<vc:i18n name="核销"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="margin-xs-r bg-white treeview attendance-staff">
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">核销结果</span>
|
||||
<span>{{communitySpaceConfirmInfo.order.remark}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">核销时间</span>
|
||||
<span>{{communitySpaceConfirmInfo.order.createTime}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">场地</span>
|
||||
<span>{{communitySpaceConfirmInfo.order.spaceName}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">预约日期</span>
|
||||
<span>{{communitySpaceConfirmInfo.order.appointmentTime}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">预约小时</span>
|
||||
<span>{{communitySpaceConfirmInfo.order.hours}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">预约人</span>
|
||||
<span>{{communitySpaceConfirmInfo.order.personName}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">预约电话</span>
|
||||
<span>{{communitySpaceConfirmInfo.order.personTel}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择预约人','communitySpaceManage')" v-model="communitySpaceConfirmInfo.conditions.personName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择预约电话','communitySpaceManage')" v-model="communitySpaceConfirmInfo.conditions.personTel" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择预约时间','communitySpaceManage')" v-model="communitySpaceConfirmInfo.conditions.appointmentTime" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryCommunitySpaceConfirmMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span>
|
||||
<vc:i18n name="查询"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
核销订单
|
||||
</th>
|
||||
<th class="text-center">
|
||||
场地
|
||||
</th>
|
||||
<th class="text-center">
|
||||
预约日期
|
||||
</th>
|
||||
<th class="text-center">
|
||||
预约时间
|
||||
</th>
|
||||
<th class="text-center">
|
||||
预约人
|
||||
</th>
|
||||
<th class="text-center">
|
||||
预约电话
|
||||
</th>
|
||||
<th class="text-center">
|
||||
核销时间
|
||||
</th>
|
||||
<th class="text-center">
|
||||
备注
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in communitySpaceConfirmInfo.orders">
|
||||
<td class="text-center">{{item.orderId}}</td>
|
||||
<th class="text-center">
|
||||
{{item.spaceName}}
|
||||
</th>
|
||||
<td class="text-center">
|
||||
{{item.appointmentTime}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.hours}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.personName}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.personTel}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.createTime}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.remark}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@ -0,0 +1,121 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function(vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
communitySpaceConfirmInfo: {
|
||||
orders: [],
|
||||
order: {
|
||||
remark: '',
|
||||
appointmentTime: '',
|
||||
createTime: '',
|
||||
hours: '',
|
||||
spaceName: '',
|
||||
personName: '',
|
||||
personTel: '',
|
||||
},
|
||||
timeId: '',
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
conditions: {
|
||||
spaceId: '',
|
||||
personName: '',
|
||||
personTel: '',
|
||||
appointmentTime: '',
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function() {
|
||||
$that._listCommunitySpaceConfirms(1, 10);
|
||||
},
|
||||
_initEvent: function() {
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
vc.component._listCommunitySpaceConfirms(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listCommunitySpaceConfirms: function(_page, _rows) {
|
||||
vc.component.communitySpaceConfirmInfo.conditions.page = _page;
|
||||
vc.component.communitySpaceConfirmInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: vc.component.communitySpaceConfirmInfo.conditions
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/communitySpace.listCommunitySpaceConfirmOrder',
|
||||
param,
|
||||
function(json, res) {
|
||||
let _communitySpaceConfirmInfo = JSON.parse(json);
|
||||
vc.component.communitySpaceConfirmInfo.total = _communitySpaceConfirmInfo.total;
|
||||
vc.component.communitySpaceConfirmInfo.records = _communitySpaceConfirmInfo.records;
|
||||
vc.component.communitySpaceConfirmInfo.orders = _communitySpaceConfirmInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.communitySpaceConfirmInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_confirmCommunitySpace: function(_page, _rows) {
|
||||
|
||||
let _timeId = $that.communitySpaceConfirmInfo.timeId;
|
||||
if (!_timeId) {
|
||||
vc.toast('请扫码');
|
||||
return;
|
||||
}
|
||||
|
||||
let _data = {
|
||||
timeId: _timeId,
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/communitySpace.saveCommunitySpaceConfirmOrder',
|
||||
JSON.stringify(_data), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
$that.communitySpaceConfirmInfo.timeId = '';
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code != 0) {
|
||||
vc.toast(_json.msg);
|
||||
return;
|
||||
}
|
||||
$that._listCommunitySpaceConfirms(1, 10);
|
||||
vc.toast("核销成功");
|
||||
if (!_json.data || _json.data.length < 1) {
|
||||
return;
|
||||
}
|
||||
vc.copyObject(_json.data[0], $that.communitySpaceConfirmInfo.order);
|
||||
|
||||
if (!$that.communitySpaceConfirmInfo.order.remark) {
|
||||
$that.communitySpaceConfirmInfo.order.remark = "核销成功";
|
||||
}
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
$that.communitySpaceConfirmInfo.timeId = '';
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
_moreCondition: function() {
|
||||
if (vc.component.communitySpaceConfirmInfo.moreCondition) {
|
||||
vc.component.communitySpaceConfirmInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.communitySpaceConfirmInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_queryCommunitySpaceConfirmMethod: function() {
|
||||
$that._listCommunitySpaceConfirms(1, 10);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -61,7 +61,7 @@
|
||||
<div class="ibox-title">
|
||||
<h5><span><vc:i18n name="预约订单" namespace="communitySpacePersonManage"></vc:i18n></span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
@ -100,7 +100,7 @@
|
||||
<td class="text-center">{{communitySpacePerson.createTime}}</td>
|
||||
<td class="text-center">{{communitySpacePerson.remark}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<div class="btn-group" v-if="communitySpacePerson.state == 'S'">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteCommunitySpacePersonModel(communitySpacePerson)"><span><vc:i18n name='取消预约'></vc:i18n></span></button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user