Commit 1dab08f7 authored by lvtz's avatar lvtz

fix

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