<template>
|
<view>
|
<view class="status_bar">
|
<!-- 这里是状态栏 -->
|
</view>
|
<uni-nav-bar left-icon="left" title="报销申请" @clickLeft="back" @clickRight="scan" :fixed="true" :border="false"
|
rightWidth="160rpx" leftWidth="160rpx">
|
</uni-nav-bar>
|
<!-- todo:搜索 -->
|
<view class="main-box">
|
<view class="box" v-for="item in list" @click="goDetl(item)">
|
<view style="display: flex;">
|
<view class="box-title" style="flex: 1;">{{item.user$}}提交的报销申请</view>
|
<view class="box-time">{{item.createTime$.substring(0,10)}}</view>
|
</view>
|
<view class="box-item">报销类型:{{item.templateName}}</view>
|
<view class="box-item">是否冲账:{{item.businessTripDays$}}</view>
|
<view style="display: flex;">
|
<view class="box-item" style="flex: 1;">状态:{{item.status$}}</view>
|
<view class="box-settle" :style="item.bgcolor">{{item.settle$}}</view>
|
</view>
|
</view>
|
</view>
|
|
|
<view class="fxbtn">
|
<uni-icons type="plusempty" color="#fff" @click="add()" ></uni-icons>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
list: [{
|
user$: "张芬",
|
status$: "未完成",
|
createTime$:"2023-11-09 13:30:54",
|
templateName: '项目未完成',
|
checkData: '否',
|
settle$: '等待节点3审核'
|
}, ]
|
}
|
},
|
onShow() {
|
this.getReimburseOnline()
|
},
|
methods: {
|
add() {
|
uni.navigateTo({
|
url: '/pages/business/goBusiness/modiReimburseOnlineDetl',
|
success: function(res) {
|
res.eventChannel.emit('reimburseOnlineDetl', {
|
data: 'add'
|
})
|
}
|
})
|
},
|
goDetl(e) {
|
console.log(e);
|
uni.navigateTo({
|
url: '/pages/business/goBusiness/reimburseOnlineDetl',
|
success: function(res) {
|
res.eventChannel.emit('busunessDetl', {
|
data: e
|
})
|
}
|
})
|
},
|
getReimburseOnline() {
|
let _this = this
|
uni.request({
|
url: `${_this.baseUrl}/reimburseOnline/list/auth`,
|
header: { 'token': uni.getStorageSync('token') },
|
success(res) {
|
res = res.data
|
if (res.code === 200) {
|
for (let k of res.data.records) {
|
if (k.settle == 3) {
|
k['bgcolor'] = 'color: #12d489'
|
} else if (k.settle == 2) {
|
k['bgcolor'] = 'color: #ffbd67'
|
}
|
}
|
_this.list = res.data.records
|
}
|
// _this.list =
|
}
|
})
|
},
|
back() {
|
uni.navigateBack({})
|
},
|
scan() {
|
uni.navigateTo({
|
url: '/pages/authority/authority'
|
})
|
},
|
}
|
}
|
</script>
|
|
<style>
|
.flex-row {
|
display: flex;
|
}
|
|
.flex-col {
|
display: flex;
|
flex-direction: column;
|
}
|
|
.main-box {
|
/* margin: 16rpx; */
|
/* background-color: #FFF; */
|
border-radius: 20rpx;
|
padding: 8rpx;
|
}
|
|
.box {
|
margin: 16rpx 8rpx;
|
/* height: 200px; */
|
box-shadow: 0 0 5px #dddddd;
|
background-color: #FFF;
|
padding: 16rpx 32rpx;
|
position: relative;
|
border-radius: 20rpx;
|
font-size: 24rpx;
|
color: #bdbdbd;
|
}
|
|
.box-flag {
|
position: absolute;
|
right: 0;
|
top: 10rpx;
|
background-color: #74B9E9;
|
padding: 6rpx;
|
font-size: 10rpx;
|
color: #FFF;
|
}
|
|
.box-time {
|
color: #bdbdbd;
|
}
|
|
.box-settle {
|
font-size: 26rpx;
|
/* font-weight: bold; */
|
}
|
|
.box-title {
|
font-size: 28rpx;
|
font-weight: bold;
|
color: #000;
|
}
|
|
.box-single-row {}
|
</style>
|