spring
4 天以前 435881d494e2be4ba5ce8bfccb02d6ef49e07314
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
160
161
162
<template>
    <view class="page">
        <view class="bigbg"/>
        <u-navbar title="" :background="background" :border-bottom="false"/>
        <view class="title">成品外协</view>
        <view class="wrap">
            <u-row justify="space-between" gutter="30">
                <u-col span="6">
                    <view class="box box1" @click="navTo('/pages/wareHouse/outsource/report')">
                        <view class="row1">报检成品</view>
                        <view class="row2">扫描</view>
                        <view class="row3">合格证号</view>
                    </view>
                </u-col>
                <u-col span="6">
                    <view class="box box2" @click="navTo('/pages/wareHouse/outsource/check')">
                        <view class="row1">检测</view>
                        <view class="row2"><text class="text">{{unInspNum}}</text>个待检测</view>
                        <view class="row3">请进入</view>
                    </view>
                </u-col>
            </u-row>
            <u-row justify="space-between" gutter="30">
                <u-col span="6">
                    <view class="box box3" @click="navTo('/pages/wareHouse/outsource/packing')">
                        <view class="row1">包装</view>
                        <view class="row2"><text class="text">{{inspedNum}}</text>个待验证</view>
                        <view class="row3">请进入</view>
                    </view>
                </u-col>
                <u-col span="6">
                    <view class="box box4" @click="navTo('/pages/wareHouse/outsource/instock')">
                        <view class="row1">入库</view>
                        <view class="row2"><text class="text">{{packagingNum}}</text>个待验证</view>
                        <view class="row3">请进入</view>
                    </view>
                </u-col>
            </u-row>
        </view>
    </view>
</template>
 
<script>
    import content_bg from '@/static/custom/outsource/index_bg.png'
    export default {
        data() {
            return {
                background:{
                    backgroundImage: `url(${content_bg})`,
                    backgroundAttachment: 'fixed',
                    backgroundSize: '100% auto',
                    backgroundRepeat: 'no-repeat',
                },
                unInspNum:0,//待检测数量
                inspedNum:0,//已检测(待包装)数量
                packagingNum:0 //已包装(待入库)数量
            }
        },
        onShow() {
            this.queryData('unInsp')
            this.queryData('insped')
            this.queryData('packaging')
        },
        methods: {
            //查询数量
            queryData(state){
                let param = {
                    current: 1,
                    size: 100,
                    state: state
                }
                this.$u.api.outsource.queryData(param).then(res => {
                    console.log(res);
                    if (res.code === 0) {
                        this[state+'Num'] = res.data.total
                    }
                });
            },
            navTo(url) {
                uni.navigateTo({
                    url: url
                });
            },
            goBack(){
                uni.navigateBack({
                    
                })
            }
        }
    }
</script>
 
<style scoped lang="scss">
.bigbg{
    background-color: #F6F9FF;
    background-image: url('~@/static/custom/outsource/index_bg.png');
    // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0));
    padding: 0 20rpx;
    background-attachment: fixed;
    background-size: 100% auto;
    background-repeat: no-repeat;
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: -1;
}
.page{
    
}
.title{
    font-weight: bold;
    font-size: 50rpx;
    padding: 60rpx 0 130rpx 20rpx;
}
.box {
    background-color: rgba(255,255,255,0.7);
    border-radius: 20rpx;
    margin-bottom: 30rpx;
    padding: 30rpx;
    font-size: 32rpx;
    color: #666666;
    box-shadow: 0 0 6rpx 2rpx #f0f0f0;
    background-repeat: no-repeat;
    background-position: right 10rpx top 10rpx;
    background-size: 40% auto;
    .row1{
        padding-bottom: 40rpx;
    }
    .row2{
        color: #666666;
        padding: 10rpx 0;
        .text{
            color: black;
            font-weight: bold;
            font-size: 38rpx;
            padding-right: 10rpx;
        }
    }
    .row3{
        color: #B4B4B6;
    }
}
.box1{
    .row2{
        color: black;
        font-weight: bold;
        font-size: 38rpx;
    }
    background-image: url('~@/static/custom/outsource/bg1.png');
}
.box2{
    background-image: url('~@/static/custom/outsource/bg2.png');
    background-size: 35% auto;
}
.box3{
    background-image: url('~@/static/custom/outsource/bg3.png');
}
.box4{
    background-image: url('~@/static/custom/outsource/bg4.png');
}
</style>