finish charge

This commit is contained in:
java110 2023-03-17 15:48:41 +08:00
parent 5d8233a8e6
commit 10eed0917a
5 changed files with 70 additions and 5 deletions

View File

@ -57,3 +57,31 @@ export function saveExamineStaffValue(dataObj){
});
})
}
/**
* 查询用工考核
* @param {Object} dataObj 对象
*/
export function getExamineStaffValue(dataObj) {
return new Promise(
(resolve, reject) => {
request({
url: url.listExamineStaffValue,
method: "GET",
data: dataObj,
//动态数据
success: function(res) {
if (res.data.code == 0) {
let _data = res.data.data;
resolve(_data);
return;
}
reject(res.data.msg);
},
fail: function(e) {
reject(e);
}
});
})
}

View File

@ -14,6 +14,14 @@ from '../../constant/url.js'
import mapping from '../../constant/MappingConstant.js'
export function getOwnerId() {
let _ownerInfo = wx.getStorageSync(mapping.OWNER_INFO);
if (_ownerInfo) {
return _ownerInfo.ownerId;
}
return "-1"
}
/**
* 查询当前业主信息
*/
@ -83,7 +91,7 @@ export function refreshOwner() {
},
success: function(res) {
let _json = res.data;
if (_json.code == 0 && _json.data && _json.data.length >0) {
if (_json.code == 0 && _json.data && _json.data.length > 0) {
let _ownerInfo = _json.data[0];
if (_ownerInfo == null || _ownerInfo == undefined) {
//没有业主信息

View File

@ -201,6 +201,8 @@ export default {
stopCharge:baseUrl+"app/chargeMachine.stopCharge", // 结束充电
listChargeMachineOrder:baseUrl+"app/chargeMachine.listChargeMachineOrder", // 查询充电订单
saveExamineStaffValue:baseUrl+"app/examine.saveExamineStaffValue", // 查询充电订单
listExamineStaffValue:baseUrl+"app/examine.listExamineStaffValue", // 查询充电订单
NEED_NOT_LOGIN_PAGE: [
'pages/login/login',

View File

@ -42,8 +42,10 @@
<script>
import uSlider from '@/components/u-slider/u-slider.vue';
import {getExamineStaffs,saveExamineStaffValue} from '../../api/examine/examineApi.js';
import {getExamineStaffs,saveExamineStaffValue,getExamineStaffValue} from '../../api/examine/examineApi.js';
import {getCommunityId} from '../../api/community/communityApi.js';
import {getOwnerId} from '../../api/owner/ownerApi.js'
export default {
data() {
return {
@ -72,6 +74,7 @@
communityId:getCommunityId()
}).then(_data=>{
_that.staff = _data[0];
_that._loadOwnerScoreStaff()
})
},
_showStaffId:function(_staffId){
@ -89,6 +92,30 @@
}).then(_data=>{
uni.navigateBack();
})
},
_loadOwnerScoreStaff:function(){
let _that = this;
let date = new Date();
let year = date.getFullYear();
getExamineStaffValue({
page:1,
row:50,
staffId:this.staff.staffId,
esYear:year,
ownerId:getOwnerId(),
communityId:getCommunityId()
}).then(_data =>{
if(!_data || _data.length < 1){
return ;
}
_that.staff.projects.forEach((item)=>{
_data.forEach(_project=>{
if(item.projectId = _project.projectId){
item.value = _project.examineValue;
}
})
})
})
}
}
}

View File

@ -148,7 +148,7 @@
},
_switchPort:function(_port){
if(!_port.state == 'FREE'){
if(_port.state != 'FREE'){
return;
}
this.curPort = _port;