Commit 1dab08f7 authored by lvtz's avatar lvtz

fix

parent 85e5736d
......@@ -33,7 +33,7 @@ function erpLeavesList (data) {
url: apis.customer.leavesMgt.leavesApi,
data,
method: 'GET',
errorresolve: 1,
errorresolve: 2,
})
}
// 请假详情
......@@ -55,7 +55,7 @@ function erpLeaveTimes (data) {
url: apis.customer.leavesMgt.leavesTimeApi,
data,
method: 'GET',
errorresolve: 1,
errorresolve: 2,
})
}
export {
......
......@@ -58,8 +58,6 @@ Page({
page: 1,
hasmore: true,
})
this.getErpLeaveTimes();
this.getErpLeavesList('init');
app.getCurrentSchoolStudentId({
source_id: this.data.sid,
source_type: 10,
......@@ -68,6 +66,8 @@ Page({
studentInfo: res.student.formal_school_student
})
this.getCourseList('init');
this.getErpLeaveTimes();
this.getErpLeavesList('init');
})
},
onReady: function () {
......@@ -238,6 +238,9 @@ Page({
school_id: this.data.sid
}).then(res=>{
const {data,code} = res;
if(code == 40000){
return
}
if(code!=200){
}else{
......@@ -286,6 +289,12 @@ Page({
this.setData({
LeavesListLoading: false
})
if(code == 40000){
this.setData({
LeavesEmptyPage: true
})
return
}
if (code != 200) { // 失败的处理
} else {
......@@ -420,17 +429,21 @@ Page({
const {data,code} = res;
if(code!=200){
}else{
that.setData({
[`courseList[${optBigindex}][${optIndex}].leave`]: {
status: data.status, //1为正在请假,返回的就是1
id: data.id
},
leaveContent: '',
modalLeaveShow: false,
// leavesPage: 1,
// leavesHasmore: true
wx.showToast({
title: '请假申请成功',
icon: 'success',
duration: 500,
success: function(){
that.setData({
[`courseList[${optBigindex}][${optIndex}].leave`]: {
status: 2,
id: data.id
},
leaveContent: '',
modalLeaveShow: false
})
}
})
// that.getErpLeavesList('init');
}
})
wx.hideLoading()
......
......@@ -68,7 +68,7 @@
</view>
<view class="item-contentbox">
<view class="content-item">
<view class="item-label"><view class="text">授课时间{{item.leave.status}}</view>:</view>
<view class="item-label"><view class="text">授课时间</view>:</view>
<view class="item-text">{{filter.matchTime(item.start_time,'month')}} {{filter.matchTime(item.start_time,'hour')}}-{{filter.matchTime(item.end_time,'hour')}}</view>
</view>
<view class="content-item">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment