#
whycq
2023-11-15 2667b6698161d233c150c588bcee6e0daafe6f44
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<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>