|
@ -4,51 +4,52 @@ |
|
|
<view @click="tabChange(0)"> |
|
|
<view @click="tabChange(0)"> |
|
|
<view :class="['t-txt', tabIdx==0?'active':'']"> |
|
|
<view :class="['t-txt', tabIdx==0?'active':'']"> |
|
|
<text>预约审批</text> |
|
|
<text>预约审批</text> |
|
|
<view class="t-label">99</view> |
|
|
|
|
|
|
|
|
<!-- <view class="t-label">99</view> --> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view @click="tabChange(1)"> |
|
|
<view @click="tabChange(1)"> |
|
|
<view :class="['t-txt', tabIdx==1?'active':'']"> |
|
|
<view :class="['t-txt', tabIdx==1?'active':'']"> |
|
|
<text>请假审批</text> |
|
|
<text>请假审批</text> |
|
|
<view class="t-label">99</view> |
|
|
|
|
|
|
|
|
<!-- <view class="t-label">99</view> --> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view @click="tabChange(2)"> |
|
|
<view @click="tabChange(2)"> |
|
|
<view :class="['t-txt', tabIdx==2?'active':'']"> |
|
|
<view :class="['t-txt', tabIdx==2?'active':'']"> |
|
|
<text>换班审批</text> |
|
|
<text>换班审批</text> |
|
|
<view class="t-label">99</view> |
|
|
|
|
|
|
|
|
<!-- <view class="t-label">99</view> --> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="l-bar"> |
|
|
<view class="l-bar"> |
|
|
<view>审核人数:3人</view> |
|
|
|
|
|
|
|
|
<view>审核人数: 0人</view> |
|
|
<view @click="toRecord">审批记录</view> |
|
|
<view @click="toRecord">审批记录</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="l-null" v-if="false"> |
|
|
|
|
|
<image></image> |
|
|
|
|
|
|
|
|
<view class="l-null" v-if="approveList.length<=0"> |
|
|
|
|
|
<image mode="aspectFit" src="/static/images/no_result.png"></image> |
|
|
<view>抱歉,没有相关课程订单信息...</view> |
|
|
<view>抱歉,没有相关课程订单信息...</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="l-list" v-else> |
|
|
<view class="l-list" v-else> |
|
|
<view class="l-item"> |
|
|
|
|
|
|
|
|
<view class="l-item" v-for="(e,i) in approveList" :key="i" @click="selectItem(i)"> |
|
|
<view class="l-content"> |
|
|
<view class="l-content"> |
|
|
<view class="c-user"> |
|
|
<view class="c-user"> |
|
|
<image></image> |
|
|
|
|
|
<view>胡可课</view> |
|
|
|
|
|
|
|
|
<image :src="e.user_data.avatar_url" mode="aspectFit"></image> |
|
|
|
|
|
<view>{{e.user_name || '-'}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="c-content"> |
|
|
<view class="c-content"> |
|
|
<view class="c-name">羽毛球课程(羽毛球课)</view> |
|
|
|
|
|
|
|
|
<view class="c-name">{{e.course_name || '-'}}</view> |
|
|
<view class="c-times"> |
|
|
<view class="c-times"> |
|
|
<view v-for="(e, i) in approveList" :key="i">2020-08-22 10:30</view> |
|
|
|
|
|
|
|
|
<view v-for="(k, j) in e.duration_list" :key="j">{{k || '-'}}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="c-status"> |
|
|
<view class="c-status"> |
|
|
<view class="s-icon" v-if="true"></view> |
|
|
|
|
|
<view class="s-txt s-active" v-else>通过</view> |
|
|
|
|
|
|
|
|
<image class="s-img" v-if="e.defineSelected" mode="aspectFit" src="/static/images/selected_c97.png"></image> |
|
|
|
|
|
<view class="s-icon" v-else></view> |
|
|
|
|
|
<!-- <view class="s-txt s-active" v-else>通过</view> --> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="l-reason"> |
|
|
<view class="l-reason"> |
|
|
<view>原因:</view> |
|
|
<view>原因:</view> |
|
|
<view>作业内容作业内容作业内容作业内容作业内容作业内容作业内容作业内容作业内容作业内…</view> |
|
|
|
|
|
|
|
|
<view>{{e.for_leave_reason || '-'}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="l-unfold"> |
|
|
<view class="l-unfold"> |
|
|
<view> |
|
|
<view> |
|
@ -61,12 +62,13 @@ |
|
|
|
|
|
|
|
|
<view class="l-bot-bar"> |
|
|
<view class="l-bot-bar"> |
|
|
<view class="bb-select"> |
|
|
<view class="bb-select"> |
|
|
<view></view> |
|
|
|
|
|
<text>全选</text> |
|
|
|
|
|
|
|
|
<image v-if="isSelectAll" mode="aspectFit" src="/static/images/selected_c97.png"></image> |
|
|
|
|
|
<view v-else></view> |
|
|
|
|
|
<text @click="selectAll">全选</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="bb-btns"> |
|
|
<view class="bb-btns"> |
|
|
<view hover-class="hover-active">不同意</view> |
|
|
|
|
|
<view hover-class="hover-active">同意</view> |
|
|
|
|
|
|
|
|
<view hover-class="hover-active" @click="handleApprove(2)">不同意</view> |
|
|
|
|
|
<view hover-class="hover-active" @click="handleApprove(1)">同意</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -80,6 +82,12 @@ import { mapState } from 'vuex'; |
|
|
export default { |
|
|
export default { |
|
|
computed: { |
|
|
computed: { |
|
|
...mapState([ 'storeInfo' ]), |
|
|
...mapState([ 'storeInfo' ]), |
|
|
|
|
|
isSelectAll(){ |
|
|
|
|
|
let { approveList } = this; |
|
|
|
|
|
if(approveList.length<=0)return false; |
|
|
|
|
|
let bolArr = approveList.map(e=>!!e.defineSelected); |
|
|
|
|
|
return !bolArr.includes(false); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
data(){ |
|
|
data(){ |
|
|
return { |
|
|
return { |
|
@ -91,14 +99,58 @@ export default { |
|
|
this.getApproveList(); |
|
|
this.getApproveList(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
selectAll(){ |
|
|
|
|
|
let { isSelectAll } = this; |
|
|
|
|
|
let _list = [...this.approveList]; |
|
|
|
|
|
if(_list.length<=0)return |
|
|
|
|
|
console.warn(this.isSelectAll) |
|
|
|
|
|
this.approveList = _list.map(e=>{ |
|
|
|
|
|
return { |
|
|
|
|
|
...e, |
|
|
|
|
|
defineSelected: !this.isSelectAll, |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
console.warn(this.approveList) |
|
|
|
|
|
}, |
|
|
|
|
|
selectItem(index){ |
|
|
|
|
|
let _list = [...this.approveList]; |
|
|
|
|
|
_list[index].defineSelected = !_list[index].defineSelected; |
|
|
|
|
|
this.approveList = _list; |
|
|
|
|
|
}, |
|
|
|
|
|
handleApprove: util.debounce(function(status){ |
|
|
|
|
|
let { approveList } = this; |
|
|
|
|
|
let _selectedArr = approveList.filter(ele=>{ |
|
|
|
|
|
return ele.defineSelected |
|
|
|
|
|
}) |
|
|
|
|
|
if(_selectedArr.length<=0)return; |
|
|
|
|
|
servers.post({ |
|
|
|
|
|
url: API.approve.handleApprove, |
|
|
|
|
|
data: { |
|
|
|
|
|
status, |
|
|
|
|
|
approve_ids: _selectedArr.map(item=>item.id || ''), |
|
|
|
|
|
}, |
|
|
|
|
|
isDefaultGet: false, |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
if(res.data.code == 0){ |
|
|
|
|
|
util.showNone(res.data.message || '操作成功!'); |
|
|
|
|
|
setTimeout(_=> util.routeTo(), 1200); |
|
|
|
|
|
}else{ |
|
|
|
|
|
util.showNone(res.data.message || '操作失败!'); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, 300, 300), |
|
|
tabChange(i){ |
|
|
tabChange(i){ |
|
|
|
|
|
this.approveList = []; |
|
|
this.tabIdx = i; |
|
|
this.tabIdx = i; |
|
|
|
|
|
this.getApproveList(i); |
|
|
}, |
|
|
}, |
|
|
toRecord(){ |
|
|
toRecord(){ |
|
|
util.routeTo(`/pages/approve/record/record`,'nT'); |
|
|
util.routeTo(`/pages/approve/record/record`,'nT'); |
|
|
}, |
|
|
}, |
|
|
getApproveList(approve_type = 0){ |
|
|
getApproveList(approve_type = 0){ |
|
|
let { storeInfo } = this; |
|
|
let { storeInfo } = this; |
|
|
|
|
|
util.showLoad(); |
|
|
servers.get({ |
|
|
servers.get({ |
|
|
url: API.approve.getApproveList, |
|
|
url: API.approve.getApproveList, |
|
|
data: { |
|
|
data: { |
|
@ -109,7 +161,8 @@ export default { |
|
|
failMsg: '加载失败!' |
|
|
failMsg: '加载失败!' |
|
|
}) |
|
|
}) |
|
|
.then(res=>{ |
|
|
.then(res=>{ |
|
|
let _list = res.list || []; |
|
|
|
|
|
|
|
|
util.hideLoad(); |
|
|
|
|
|
let _list = res.list || [{},{}]; |
|
|
this.approveList = _list; |
|
|
this.approveList = _list; |
|
|
console.warn('approve list --->', res); |
|
|
console.warn('approve list --->', res); |
|
|
}) |
|
|
}) |
|
@ -178,7 +231,6 @@ export default { |
|
|
.l-bar{ |
|
|
.l-bar{ |
|
|
padding: 0 50upx; |
|
|
padding: 0 50upx; |
|
|
height: 92upx; |
|
|
height: 92upx; |
|
|
background-color: yellowgreen; |
|
|
|
|
|
@include centerFlex(space-between); |
|
|
@include centerFlex(space-between); |
|
|
>view{ |
|
|
>view{ |
|
|
font-size: 28upx; |
|
|
font-size: 28upx; |
|
@ -197,6 +249,7 @@ export default { |
|
|
.l-list{ |
|
|
.l-list{ |
|
|
padding: 0 24upx; |
|
|
padding: 0 24upx; |
|
|
.l-item{ |
|
|
.l-item{ |
|
|
|
|
|
margin-bottom: 24upx; |
|
|
padding: 24upx; |
|
|
padding: 24upx; |
|
|
background-color: #fff; |
|
|
background-color: #fff; |
|
|
.l-content{ |
|
|
.l-content{ |
|
@ -211,7 +264,6 @@ export default { |
|
|
width: 100upx; |
|
|
width: 100upx; |
|
|
height: 100upx; |
|
|
height: 100upx; |
|
|
border-radius: 50%; |
|
|
border-radius: 50%; |
|
|
background-color: skyblue; |
|
|
|
|
|
} |
|
|
} |
|
|
>view{ |
|
|
>view{ |
|
|
max-width: 120upx; |
|
|
max-width: 120upx; |
|
@ -242,10 +294,10 @@ export default { |
|
|
height: 36upx; |
|
|
height: 36upx; |
|
|
border: 2upx solid #9a9a9d; |
|
|
border: 2upx solid #9a9a9d; |
|
|
border-radius: 50%; |
|
|
border-radius: 50%; |
|
|
>image{ |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
.s-img{ |
|
|
|
|
|
width: 36upx; |
|
|
|
|
|
height: 36upx; |
|
|
} |
|
|
} |
|
|
.s-txt{ |
|
|
.s-txt{ |
|
|
font-size: 28upx; |
|
|
font-size: 28upx; |
|
@ -301,7 +353,6 @@ export default { |
|
|
display: block; |
|
|
display: block; |
|
|
width: 346upx; |
|
|
width: 346upx; |
|
|
height: 346upx; |
|
|
height: 346upx; |
|
|
background-color: skyblue; |
|
|
|
|
|
} |
|
|
} |
|
|
>view{ |
|
|
>view{ |
|
|
text-align: center; |
|
|
text-align: center; |
|
@ -327,12 +378,18 @@ export default { |
|
|
color: #333; |
|
|
color: #333; |
|
|
@include centerFlex(flex-start); |
|
|
@include centerFlex(flex-start); |
|
|
>view{ |
|
|
>view{ |
|
|
margin-right: 14upx; |
|
|
|
|
|
width: 36upx; |
|
|
width: 36upx; |
|
|
height: 36upx; |
|
|
height: 36upx; |
|
|
border-radius: 50%; |
|
|
border-radius: 50%; |
|
|
border: 2upx solid #9a9a9d; |
|
|
border: 2upx solid #9a9a9d; |
|
|
} |
|
|
} |
|
|
|
|
|
>image{ |
|
|
|
|
|
width: 36upx; |
|
|
|
|
|
height: 36upx; |
|
|
|
|
|
} |
|
|
|
|
|
>text{ |
|
|
|
|
|
margin-left: 14upx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
.bb-btns{ |
|
|
.bb-btns{ |
|
|