From 10eed0917a321b62ddabaefc4446b831bd5b13a2 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 17 Mar 2023 15:48:41 +0800 Subject: [PATCH] finish charge --- api/examine/examineApi.js | 28 ++++++++++++++++++++++++++ api/owner/ownerApi.js | 14 ++++++++++--- constant/url.js | 2 ++ pages/complaint/examineStaffScore.vue | 29 ++++++++++++++++++++++++++- pages/machine/machineToCharge.vue | 2 +- 5 files changed, 70 insertions(+), 5 deletions(-) diff --git a/api/examine/examineApi.js b/api/examine/examineApi.js index fab4566..37f5953 100644 --- a/api/examine/examineApi.js +++ b/api/examine/examineApi.js @@ -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); + } + }); + }) +} diff --git a/api/owner/ownerApi.js b/api/owner/ownerApi.js index 7fa96cc..cab862f 100755 --- a/api/owner/ownerApi.js +++ b/api/owner/ownerApi.js @@ -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" +} + /** * 查询当前业主信息 */ @@ -51,7 +59,7 @@ export function getCurOwner() { communityName: _ownerInfo.communityName }; wx.setStorageSync(mapping.CURRENT_COMMUNITY_INFO, - _currentCommunityInfo); + _currentCommunityInfo); } resolve(_json.data[0]); } @@ -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) { //没有业主信息 @@ -303,4 +311,4 @@ export function loadLoginOwner(_data) { } }); }) -} \ No newline at end of file +} diff --git a/constant/url.js b/constant/url.js index 69a8f36..c5e7966 100755 --- a/constant/url.js +++ b/constant/url.js @@ -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', diff --git a/pages/complaint/examineStaffScore.vue b/pages/complaint/examineStaffScore.vue index b100210..a5cdabd 100644 --- a/pages/complaint/examineStaffScore.vue +++ b/pages/complaint/examineStaffScore.vue @@ -42,8 +42,10 @@