1
647556386
2025-04-17 a95a257a702360e7632b5daeb5b554163382720c
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
<template>
    <view>
        <view class="itemstyle">
            <uni-forms label-width="180">
                <uni-forms-item label="外箱码:">
                    <uni-easyinput type="text" placeholder="请扫描外箱码" ref='midInput' :focus="!focus" v-model="barcode"
                        @input="barcodeInput" />
                </uni-forms-item>
                <uni-forms-item>
                    <button @click="InEmpty" type="primary" size="default" style="margin-top: 2%;">出货</button>
                </uni-forms-item>
            </uni-forms>
        </view>
        <view style="padding: 0 14rpx 20rpx;">
            <!-- 当前出库外包号 -->
            <view v-for="(i,index) in listOutBags" :key="index" class="item_box">
                <view style="line-height: 17px;color: #596671;font-size: 14px;text-align: left;font-weight: bold;">外包号:{{i}}
                </view>
            </view>
        </view>
        <view style="padding: 0 14rpx 20rpx;">
            <!-- 明细 -->
            <view v-for="i in list" :key="i.id" class="item_box">
                <view style="line-height: 17px;color: #596671;font-size: 14px;text-align: left;font-weight: bold;">订单明细行号:{{i.rowId}}
                </view>
                <view style="margin-top: 22rpx;height: 140rpx;display: flex;flex-direction: column;justify-content: space-around;">
                    <view style="color: #00070F;font-size: 12px;">客户代号:{{i.customer}}</view>
                    <view style="color: #00070F;font-size: 12px;">产品编号:{{i.pCode}}</view>
                    <view style="color: #00070F;font-size: 12px;">订单数量:{{i.qtyPcs}}</view>
                    <view style="color: #00070F;font-size: 12px;">已出数量:{{i.overQtyPcs}}</view>
                </view>
            </view>
        </view>
        <uni-load-more :status="status" v-if="loadVisible"></uni-load-more>
        <u-toast ref="uToast" />
    </view>
</template>
 
<script>
    const innerAudioContext = uni.createInnerAudioContext();
    export default {
        data() {
            return {
                focus: false,
                barcode: "",
                proOutNo: "",
                id: null,
                list:[],
                listOutBags:[]
            }
        },
        onShow() {},
        onLoad(res) {
            this.proOutNo=res.proOutNo;
            this.GetDetail(res.id);
            this.id=res.id;
            //已出箱号
        },
        methods: {
            GetDetail(value) {
                this.$u.post('/api/ProOutOrder/GetOrderDetails?keyId='+value).then(
                    res => {
                        if (res.status) {
                            this.list=res.data.proOutOrderDetails;
                            this.listOutBags=res.data.outBags;
                        } else {
                            this.$refs.uToast.show({
                                title: res.message,
                                type: "error"
                            })
                        }
                    })
            },
            voiceSpeech(src) {
                innerAudioContext.src = src; // '../../static/success.mp3';
                innerAudioContext.play();
            },
            barcodeInput(value) {
                this.$nextTick(function(x) {
                    if (this.barcode.length > 0) {
                        this.focus = true;
                        this.barcode=value.split(',')[0];
                    }
                })
            },
            InEmpty() {
                if (this.barcode == "") {
                    this.$refs.uToast.show({
                        title: "请扫描外箱码",
                        type: 'error'
                    })
                    return;
                }
                var postData = {
                    MainData: {
                        
                    },
                    DelKeys:[this.barcode]
                }
                this.$u.post('/api/ProOutOrder/OutProductPK?proOutNo='+this.proOutNo,postData).then(
                    res => {
                        if (res.status) {
                            this.$refs.uToast.show({
                                title: "成功",
                                type: "success"
                            })
                            this.barcode = "";
                            this.focus = false;
                            this.address = "";
                            this.GetDetail(this.id);
                        } else {
                            this.$refs.uToast.show({
                                title: res.message,
                                type: "error"
                            })
                        }
                    })
            }
        }
    }
</script>
 
<style lang="scss">
    @import '@/common/uni-ui.scss';
 
    .content {
        display: flex;
        height: 150px;
    }
 
    .content-text {
        font-size: 14px;
        color: #666;
    }
 
    .itemstyle {
        margin-top: 30px;
        margin-left: 5%;
    }
    .item_box {
        background-color: white;
        // height: 344rpx;
        border-radius: 12rpx;
        padding: 40rpx 38rpx 28rpx 34rpx;
        font-size: 24rpx;
        line-height: 34rpx;
        margin-top: 20rpx;
    }
    .headerstyle {
        width: 90%;
    }
</style>