From ebac7be5316cd0b0d440786c51281a904312289d Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Thu, 15 Sep 2022 19:38:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +-- .../staffAttendanceReplenishCheckIn.js | 33 +++++++++++++++++-- .../staffAttendanceManage.js | 20 +++++------ 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/app.js b/app.js index 112518e87..9ff513fc8 100755 --- a/app.js +++ b/app.js @@ -32,8 +32,8 @@ let opts = { } -app.use('/callComponent', proxy('http://192.168.100.108:8008', opts)); -app.use('/app', proxy('http://192.168.100.108:8008', opts)); +app.use('/callComponent', proxy('http://192.168.100.108:8088', opts)); +app.use('/app', proxy('http://192.168.100.108:8088', opts)); app.use('/ws', createProxyMiddleware({ target: 'http://192.168.100.108:8008', changeOrigin: true, diff --git a/public/components/property/staffAttendanceReplenishCheckIn/staffAttendanceReplenishCheckIn.js b/public/components/property/staffAttendanceReplenishCheckIn/staffAttendanceReplenishCheckIn.js index 5e2d05e92..2619a51c5 100644 --- a/public/components/property/staffAttendanceReplenishCheckIn/staffAttendanceReplenishCheckIn.js +++ b/public/components/property/staffAttendanceReplenishCheckIn/staffAttendanceReplenishCheckIn.js @@ -3,8 +3,8 @@ data: { staffAttendanceReplenishCheckInInfo: { details: [], - remark:'', - detailId:'', + remark: '', + detailId: '', } }, _initMethod: function() {}, @@ -15,7 +15,34 @@ }); }, methods: { - + + _doReplenishCheckIn: function() { + let _data = { + detailId: $that.staffAttendanceReplenishCheckInInfo.detailId, + remark: $that.staffAttendanceReplenishCheckInInfo.remark + } + + vc.http.apiPost( + '/attendanceClasses.attendanceReplenishCheckIn', + JSON.stringify(_data), { + emulateJSON: true + }, + function(json, res) { + let _json = JSON.parse(json) + if (_json.code == 0) { + //关闭model + $('#staffAttendanceReplenishCheckInModel').modal('hide'); + vc.emit('staffAttendanceManage', 'listMonthAttendance', {}); + vc.toast("添加成功"); + return; + } + }, + function(errInfo, error) { + console.log('请求失败处理'); + vc.toast(errInfo); + }); + } + } }); diff --git a/public/pages/property/staffAttendanceManage/staffAttendanceManage.js b/public/pages/property/staffAttendanceManage/staffAttendanceManage.js index 1c4dddb6b..ae555f3da 100644 --- a/public/pages/property/staffAttendanceManage/staffAttendanceManage.js +++ b/public/pages/property/staffAttendanceManage/staffAttendanceManage.js @@ -25,10 +25,10 @@ }, _initEvent: function() { vc.on('staffAttendanceManage', 'listMonthAttendance', function(_param) { - vc.component._listMonthAttendances(DEFAULT_PAGE, DEFAULT_ROWS); + vc.component._loadStaffAttendances(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('pagination', 'page_event', function(_currentPage) { - vc.component._listMonthAttendances(_currentPage, DEFAULT_ROWS); + vc.component._loadStaffAttendances(_currentPage, DEFAULT_ROWS); }); vc.on('staffAttendanceManage', 'switchOrg', function(_org) { $that.staffAttendanceManageInfo.orgId = _org.orgId; @@ -165,26 +165,26 @@ date: $that.staffAttendanceManageInfo.curYear + "-" + _curMonth + '-' + _day }); }, - _replenishCheckIn:function(_day){ + _replenishCheckIn: function(_day) { let _details = $that._getAttendanceDetail(_day); - if(!_details || _details.length<1){ + if (!_details || _details.length < 1) { vc.toast('不存在 补考勤任务'); - return ; + return; } let _newDetails = []; - _details.forEach(item=>{ - if(item.state == '10000'){ + _details.forEach(item => { + if (item.state == '10000') { _newDetails.push(item) } }); - if(_newDetails.length<1){ + if (_newDetails.length < 1) { vc.toast('不存在 补考勤任务'); - return ; + return; } - vc.emit('staffAttendanceReplenishCheckIn', 'openModel',_newDetails); + vc.emit('staffAttendanceReplenishCheckIn', 'openModel', _newDetails); } } });