mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-26 08:16:47 +08:00
210 lines
8.0 KiB
JavaScript
210 lines
8.0 KiB
JavaScript
/**
|
|
业主详情页面
|
|
**/
|
|
(function(vc) {
|
|
vc.extends({
|
|
data: {
|
|
dataReportInfo: {
|
|
curDay: 'thirty',
|
|
_currentTab: 'dataReportEarnedStatistics',
|
|
fees: [],
|
|
orders: [],
|
|
inouts: [{
|
|
name: '进场车辆数',
|
|
value: '1000元',
|
|
}, {
|
|
name: '出场车辆数',
|
|
value: '3元',
|
|
}, {
|
|
name: '人员进场数',
|
|
value: '3元',
|
|
}, {
|
|
name: '同步人脸数',
|
|
value: '3元',
|
|
}, {
|
|
name: '入库数',
|
|
value: '3元',
|
|
}, {
|
|
name: '出库数',
|
|
value: '3元',
|
|
}, {
|
|
name: '入库金额',
|
|
value: '3元',
|
|
}, {
|
|
name: '出库金额',
|
|
value: '3元',
|
|
}, {
|
|
name: '调拨数',
|
|
value: '3元',
|
|
}, {
|
|
name: '装修申请',
|
|
value: '3元',
|
|
}, {
|
|
name: '物品放行',
|
|
value: '3元',
|
|
}, {
|
|
name: '交房数',
|
|
value: '3元',
|
|
}, {
|
|
name: '退房数',
|
|
value: '3元',
|
|
}, {
|
|
name: '业主绑定数',
|
|
value: '3元',
|
|
}, {
|
|
name: '未考勤人数',
|
|
value: '3元',
|
|
}, ],
|
|
others: [{
|
|
name: '场地预约数',
|
|
value: '3元',
|
|
}, {
|
|
name: '合同数',
|
|
value: '3元',
|
|
}, {
|
|
name: '合同资产变更',
|
|
value: '3元',
|
|
}, {
|
|
name: '租期变更',
|
|
value: '3元',
|
|
}, {
|
|
name: '主题变更',
|
|
value: '3元',
|
|
}, {
|
|
name: '到期合同',
|
|
value: '3元',
|
|
}, {
|
|
name: '车辆数',
|
|
value: '3元',
|
|
}, {
|
|
name: '车位申请数',
|
|
value: '3元',
|
|
}, {
|
|
name: '停车券购买',
|
|
value: '3元',
|
|
}, {
|
|
name: '停车券赠送',
|
|
value: '3元',
|
|
}, {
|
|
name: '停车券核销',
|
|
value: '3元',
|
|
}, {
|
|
name: '赠送优惠券',
|
|
value: '3元',
|
|
}, {
|
|
name: '使用优惠券',
|
|
value: '3元',
|
|
}, {
|
|
name: '赠送积分',
|
|
value: '3元',
|
|
}, {
|
|
name: '使用积分',
|
|
value: '3元',
|
|
}, ],
|
|
conditions: {
|
|
startDate: '',
|
|
endDate: '',
|
|
communityId: vc.getCurrentCommunity().communityId
|
|
}
|
|
}
|
|
},
|
|
_initMethod: function() {
|
|
$that._initDate();
|
|
$that.changeTab($that.dataReportInfo._currentTab);
|
|
$that._loadDataReportFee();
|
|
$that._loadDataReportOrder();
|
|
|
|
},
|
|
_initEvent: function() {
|
|
vc.on('dataReport', 'listOwnerData', function(_info) {
|
|
$that.changeTab($that.dataReportInfo._currentTab);
|
|
});
|
|
},
|
|
methods: {
|
|
_initDate: function() {
|
|
vc.initDate('startDate', function(_value) {
|
|
$that.dataReportInfo.conditions.startDate = _value;
|
|
});
|
|
vc.initDate('endDate', function(_value) {
|
|
$that.dataReportInfo.conditions.endDate = _value;
|
|
});
|
|
let _data = new Date();
|
|
let _month = _data.getMonth() + 1;
|
|
let _newDate = "";
|
|
if (_month < 10) {
|
|
_newDate = _data.getFullYear() + "-0" + _month + "-01";
|
|
} else {
|
|
_newDate = _data.getFullYear() + "-" + _month + "-01";
|
|
}
|
|
$that.dataReportInfo.conditions.startDate = _newDate;
|
|
_data.setMonth(_data.getMonth() + 1);
|
|
_month = _data.getMonth() + 1;
|
|
if (_month < 10) {
|
|
_newDate = _data.getFullYear() + "-0" + _month + "-01";
|
|
} else {
|
|
_newDate = _data.getFullYear() + "-" + _month + "-01";
|
|
}
|
|
$that.dataReportInfo.conditions.endDate = _newDate;
|
|
},
|
|
_changeDate: function(_day) {
|
|
$that.dataReportInfo.curDay = _day;
|
|
let _endDate = new Date();
|
|
$that.dataReportInfo.conditions.endDate = _endDate.getFullYear() + "-" + (_endDate.getMonth() + 1) + "-" + _endDate.getDate();
|
|
if (_day == 'today') {
|
|
$that.dataReportInfo.conditions.startDate = _endDate.getFullYear() + "-" + (_endDate.getMonth() + 1) + "-" + _endDate.getDate();
|
|
} else if (_day == 'yesterday') {
|
|
_endDate.setDate(_endDate.getDate() - 1);
|
|
$that.dataReportInfo.conditions.endDate = _endDate.getFullYear() + "-" + (_endDate.getMonth() + 1) + "-" + _endDate.getDate();
|
|
$that.dataReportInfo.conditions.startDate = _endDate.getFullYear() + "-" + (_endDate.getMonth() + 1) + "-" + _endDate.getDate();
|
|
} else if (_day == 'seven') {
|
|
_endDate.setDate(_endDate.getDate() - 7);
|
|
$that.dataReportInfo.conditions.startDate = _endDate.getFullYear() + "-" + (_endDate.getMonth() + 1) + "-" + _endDate.getDate();
|
|
} else if (_day == 'thirty') {
|
|
_endDate.setDate(_endDate.getDate() - 30);
|
|
$that.dataReportInfo.conditions.startDate = _endDate.getFullYear() + "-" + (_endDate.getMonth() + 1) + "-" + _endDate.getDate();
|
|
}
|
|
|
|
},
|
|
_loadDataReportFee: function() {
|
|
let param = {
|
|
params: $that.dataReportInfo.conditions
|
|
}
|
|
//发送get请求
|
|
vc.http.apiGet('/dataReport.queryFeeDataReport',
|
|
param,
|
|
function(json, res) {
|
|
let _json = JSON.parse(json);
|
|
$that.dataReportInfo.fees = _json.data
|
|
},
|
|
function(errInfo, error) {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
_loadDataReportOrder: function() {
|
|
let param = {
|
|
params: $that.dataReportInfo.conditions
|
|
}
|
|
//发送get请求
|
|
vc.http.apiGet('/dataReport.queryOrderDataReport',
|
|
param,
|
|
function(json, res) {
|
|
let _json = JSON.parse(json);
|
|
$that.dataReportInfo.orders = _json.data
|
|
},
|
|
function(errInfo, error) {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
changeTab: function(_tab) {
|
|
$that.dataReportInfo._currentTab = _tab;
|
|
vc.emit(_tab, 'switch', {
|
|
ownerId: $that.dataReportInfo.ownerId,
|
|
ownerName: $that.dataReportInfo.name,
|
|
link: $that.dataReportInfo.link,
|
|
})
|
|
},
|
|
}
|
|
});
|
|
})(window.vc); |