#
whycq
2022-06-17 d511ffc4d2b1e0fce010a204348a21cfae89747b
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
<template>
    <view>
        <form>
            <view class="cu-form-group margin-top">
                <view class="title">出库单号:</view>
                <input v-model="billNo" placeholder="扫码 / 输入" name="input" @input="searchBillNo">
            </view>
            <view class="cu-form-group margin-top">
                
                <view class="title" >出库口:</view>
                <view class="combox" >
                    <uni-combox :candidates="candidates" placeholder="请选择出库站点" v-model="city"></uni-combox>
                </view>
            </view>
        </form>
        
        <view style="margin-top: 10px;">
            <uni-table ref="table" border stripe emptyText="暂无更多数据">
                <uni-tr>
                    <uni-th align="center" width="50">出库数量</uni-th>
                    <uni-th align="center" width="70">产品ID</uni-th>
                    <uni-th align="center" width="80">产品代号</uni-th>
                    <uni-th align="center" width="70">产品名称</uni-th>
                </uni-tr>
                <uni-tr v-for="(item, index) in matData" :key="index">
                    <uni-td align="center">{{item.qty}}</uni-td>
                    <uni-td align="center">{{item.matNo}}</uni-td>
                    <uni-td align="center">{{item.size}}</uni-td>
                    <uni-td align="center">{{item.matName}}</uni-td>
                </uni-tr>
            </uni-table>
        </view>
        
        <view class="cu-bar foot justify-center input" style="height: 130rpx;">
            <view class="reset flex solid-bottom padding justify-center" >
                <button class="cu-btn bg-yellow main-btn margin-xs" style="width: 400rpx;">启动出库</button>
            </view>
        </view>
        
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                billNo: null,
                matData:[],
                candidates: ['北京', '南京', '东京', '武汉', '天津', '上海', '海口'],
                city: ''
            }
        },
        mounted(){
            const UIP = uni.getStorageSync('UIP');
            this.baseIP = UIP;
            const UPORT = uni.getStorageSync('UPORT');
            this.basePORT = UPORT;
        },
        methods: {
            searchBillNo() {
                let that = this;
                uni.request({
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/waitMatout/list/auth",
                    header: {'token':uni.getStorageSync('token')},
                    data: {
                        curr:1,
                        limit:10,
                        typeCode:1,
                        bill_no:that.billNo
                    },
                    success(result) {
                        
                        let res = result.data
                        if (res.code === 200 ) {
                            that.matData = res.data.records
                            console.log(that.matData)
                        } else if (res.code === 403) {
                            uni.navigateBack({
                                delta: 1
                            })
                        } else {
                            
                        }
                        
                    }
                })
            }
        }
    }
</script>
 
<style>
    .pda-btn1 {
        margin-left:260rpx;
        margin-right: auto;
        margin-top: 150rpx;
        width: 200rpx;
        height: 80rpx;
        font-size: 30upx;
        font-weight: bold;
    }
    .combox {
        width: 200px;
        padding: 12px;
    }
</style>