mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 06:09:11 +08:00
优化代码
This commit is contained in:
parent
863d53d4f1
commit
7f2de5274f
@ -38,14 +38,14 @@
|
||||
<label class="col-sm-2 col-form-label">起租时间</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCarInfo.startTime" type="text" placeholder="必填,请填写起租时间"
|
||||
class="form-control editStartTime">
|
||||
class="form-control editCarStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">结租时间</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editCarInfo.endTime" type="text" placeholder="必填,请填写结租时间"
|
||||
class="form-control editEndTime">
|
||||
class="form-control editCarEndTime">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -51,12 +51,13 @@
|
||||
}
|
||||
);
|
||||
|
||||
vc.component._initDateInfo();
|
||||
//vc.component._initEditCarDateInfo();
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editCar', 'openEditCar', function (_carInfo) {
|
||||
vc.copyObject(_carInfo, $that.editCarInfo);
|
||||
$('#editCarModal').modal('show');
|
||||
vc.component._initEditCarDateInfo();
|
||||
});
|
||||
|
||||
},
|
||||
@ -159,9 +160,9 @@
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
_initDateInfo: function () {
|
||||
_initEditCarDateInfo: function () {
|
||||
vc.component.editCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
|
||||
$('.editStartTime').datetimepicker({
|
||||
$('.editCarStartTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
format: 'yyyy-mm-dd hh:ii:ss',
|
||||
@ -171,12 +172,12 @@
|
||||
todayBtn: true
|
||||
|
||||
});
|
||||
$('.editStartTime').datetimepicker()
|
||||
$('.editCarStartTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".editStartTime").val();
|
||||
var value = $(".editCarStartTime").val();
|
||||
vc.component.editCarInfo.startTime = value;
|
||||
});
|
||||
$('.editEndTime').datetimepicker({
|
||||
$('.editCarEndTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
format: 'yyyy-mm-dd hh:ii:ss',
|
||||
@ -185,14 +186,14 @@
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
});
|
||||
$('.editEndTime').datetimepicker()
|
||||
$('.editCarEndTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".editEndTime").val();
|
||||
var value = $(".editCarEndTime").val();
|
||||
var start = Date.parse(new Date(vc.component.editCarInfo.startTime))
|
||||
var end = Date.parse(new Date(value))
|
||||
if (start - end >= 0) {
|
||||
vc.toast("结租时间必须大于起租时间")
|
||||
$(".editEndTime").val('')
|
||||
$(".editCarEndTime").val('')
|
||||
} else {
|
||||
vc.component.editCarInfo.endTime = value;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</div>
|
||||
<div class="col-lg-2 text-right" v-if="simplifyOwnerCarInfo.ownerId">
|
||||
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
|
||||
v-on:click="openAddMemberModel()">
|
||||
v-on:click="_addOwnerCar()">
|
||||
<i class="fa fa-plus"></i>
|
||||
添加车辆
|
||||
</button>
|
||||
@ -28,7 +28,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="owner in simplifyOwnerCarInfo.ownerCars">
|
||||
<tr v-for="car in simplifyOwnerCarInfo.ownerCars">
|
||||
<td>
|
||||
{{car.carNum}}
|
||||
</td>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
<div>
|
||||
<div>
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px" data-page-size="10">
|
||||
<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-right">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="complaint in simplifyOwnerComplaintInfo.complaints">
|
||||
<!-- <td class="text-center">{{complaint.complaintId}}</td> -->
|
||||
<td class="text-center">{{complaint.typeCdName}}</td>
|
||||
<td class="text-center">
|
||||
{{complaint.floorNum}}号楼{{complaint.unitNum}}单元{{complaint.roomNum}}室
|
||||
</td>
|
||||
<td class="text-center">{{complaint.complaintName}}</td>
|
||||
<td class="text-center">{{complaint.tel}}</td>
|
||||
<td class="text-center">{{complaint.stateName}}</td>
|
||||
<td class="text-center">{{complaint.currentUserName == '' ? '无':complaint.currentUserName}}</td>
|
||||
<td class="text-center">{{complaint.currentUserTel == ''?'无':complaint.currentUserTel}}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openComplaintDetailModel(complaint)">详情
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openRunWorkflowImage(complaint)">流程图
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-sm-7 float-right">
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="common/viewImage"></vc:create>
|
||||
<vc:create path="common/complaintDetail"></vc:create>
|
||||
</div>
|
||||
@ -0,0 +1,84 @@
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
simplifyOwnerComplaintInfo: {
|
||||
complaints: [],
|
||||
ownerId: '',
|
||||
roomId:''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
//切换 至费用页面
|
||||
vc.on('simplifyOwnerComplaint', 'switch', function (_param) {
|
||||
vc.copyObject(_param, $that.simplifyOwnerComplaintInfo)
|
||||
$that._listSimplifyOwnerComplaint(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listSimplifyOwnerComplaint: function (_page, _row) {
|
||||
|
||||
let param = {
|
||||
params: {
|
||||
page: _page,
|
||||
row: _row,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
roomId: $that.simplifyOwnerComplaintInfo.roomId
|
||||
}
|
||||
}
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('complaintManage',
|
||||
'list',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _complaintManageInfo = JSON.parse(json);
|
||||
vc.component.simplifyOwnerComplaintInfo.total = _complaintManageInfo.total;
|
||||
vc.component.simplifyOwnerComplaintInfo.records = _complaintManageInfo.records;
|
||||
vc.component.simplifyOwnerComplaintInfo.complaints = _complaintManageInfo.complaints;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.simplifyOwnerComplaintInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
openRunWorkflowImage: function (_complaint) {
|
||||
var param = {
|
||||
params: {
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
businessKey: _complaint.complaintId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('workflow.listRunWorkflowImage',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _workflowManageInfo = JSON.parse(json);
|
||||
if (_workflowManageInfo.code != '0') {
|
||||
vc.toast(_workflowManageInfo.msg);
|
||||
|
||||
return;
|
||||
}
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: 'data:image/png;base64,' + _workflowManageInfo.data
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openComplaintDetailModel: function (_complaint) {
|
||||
vc.emit('complaintDetail', 'openComplaintDetailModal', _complaint);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
})(window.vc);
|
||||
@ -0,0 +1,40 @@
|
||||
<div>
|
||||
<div>
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px" data-page-size="10">
|
||||
<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-right">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="repair in simplifyOwnerRepairInfo.repairs">
|
||||
<td class="text-center">{{repair.repairId}}</td>
|
||||
<td class="text-center">{{repair.repairObjName}}</td>
|
||||
<td class="text-center">{{repair.repairTypeName}}</td>
|
||||
<td class="text-center">{{repair.repairName}}</td>
|
||||
<td class="text-center">{{repair.tel}}</td>
|
||||
<td class="text-center">{{repair.appointmentTime}}</td>
|
||||
<td class="text-center">{{repair.stateName}}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openRepairDetail(repair)">详情
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-sm-7 float-right">
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,59 @@
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
simplifyOwnerRepairInfo: {
|
||||
repairs: [],
|
||||
ownerId: '',
|
||||
roomId:''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
//切换 至费用页面
|
||||
vc.on('simplifyOwnerRepair', 'switch', function (_param) {
|
||||
vc.copyObject(_param, $that.simplifyOwnerRepairInfo)
|
||||
$that._listSimplifyOwnerRepair(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listSimplifyOwnerRepair: function (_page, _row) {
|
||||
|
||||
let param = {
|
||||
params: {
|
||||
page: _page,
|
||||
row: _row,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
repairObjId: $that.simplifyOwnerRepairInfo.roomId
|
||||
}
|
||||
}
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('ownerRepairManage',
|
||||
'list',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _repairPoolManageInfo = JSON.parse(json);
|
||||
vc.component.simplifyOwnerRepairInfo.total = _repairPoolManageInfo.total;
|
||||
vc.component.simplifyOwnerRepairInfo.records = _repairPoolManageInfo.records;
|
||||
vc.component.simplifyOwnerRepairInfo.repairs = _repairPoolManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.simplifyOwnerRepairInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
_openRepairDetail: function (_repairPool) {
|
||||
vc.jumpToPage('/admin.html#/pages/property/ownerRepairDetail?repairId=' + _repairPool.repairId)
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
})(window.vc);
|
||||
@ -139,12 +139,12 @@
|
||||
v-on:click="changeTab('simplifyOwnerCar')">车辆信息</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 5}"
|
||||
v-on:click="changeTab(5)">报修单</a>
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 'simplifyOwnerRepair'}"
|
||||
v-on:click="changeTab('simplifyOwnerRepair')">报修单</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 6}"
|
||||
v-on:click="changeTab(6)">投诉单</a>
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 'simplifyOwnerComplaint'}"
|
||||
v-on:click="changeTab('simplifyOwnerComplaint')">投诉单</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:simplifyAcceptanceInfo._currentTab == 7}"
|
||||
@ -169,6 +169,12 @@
|
||||
<div v-if="simplifyAcceptanceInfo._currentTab == 'simplifyOwnerCar'">
|
||||
<vc:create path="property/simplifyOwnerCar"></vc:create>
|
||||
</div>
|
||||
<div v-if="simplifyAcceptanceInfo._currentTab == 'simplifyOwnerRepair'">
|
||||
<vc:create path="property/simplifyOwnerRepair"></vc:create>
|
||||
</div>
|
||||
<div v-if="simplifyAcceptanceInfo._currentTab == 'simplifyOwnerComplaint'">
|
||||
<vc:create path="property/simplifyOwnerComplaint"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="property/deleteFee"></vc:create>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user