dengjunjie
2024-12-24 a70034659894cf2c3cd88584cd3e424f3203c8e5
添加PDA拣选完成
已修改8个文件
已添加4个文件
2359 ■■■■ 文件已修改
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages.json 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/index/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/raworderboxing/raworderboxing.vue 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/QueryData.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/TakeStock.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/inboundorder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/index.vue 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/pickingMat.vue 496 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/raworderboxing.vue 587 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/receiveorder.vue 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/receiveorderoutbound.vue 665 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs
@@ -26,7 +26,11 @@
        {
            return Service.GetStockOutboundOrder(saveModel);
        }
        /// <summary>
        /// æ‹£é€‰å®Œæˆ
        /// </summary>
        /// <param name="palletCode"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("MaterialPick"), AllowAnonymous]
        public WebResponseContent MaterialPick(string palletCode)
        {
´úÂë¹ÜÀí/»´°²PDA/pages.json
@@ -23,9 +23,9 @@
        },
        
        {
            "path": "pages/stash/printingink/index",
            "path": "pages/stash/index",
            "style": {
                "navigationBarTitleText": "油墨仓",
                "navigationBarTitleText": "功能",
                "enablePullDownRefresh": false
            }
        },
@@ -33,6 +33,13 @@
            "path": "pages/stash/inboundorder",
            "style": {
                "navigationBarTitleText": "组盘",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/stash/raworderboxing",
            "style": {
                "navigationBarTitleText": "组盘入库",
                "enablePullDownRefresh": false
            }
        },
@@ -58,9 +65,16 @@
            }
        },
        {
            "path": "pages/receiveorder/receiveorder",
            "path": "pages/stash/receiveorder",
            "style": {
                "navigationBarTitleText": "收货",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/stash/receiveorderoutbound",
            "style": {
                "navigationBarTitleText": "收货单",
                "enablePullDownRefresh": false
            }
        },
@@ -76,13 +90,6 @@
            "path": "pages/raworderboxing/inboundorder",
            "style": {
                "navigationBarTitleText": "入库订单",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/raworderboxing/raworderboxing",
            "style": {
                "navigationBarTitleText": "组盘",
                "enablePullDownRefresh": false
            }
        },
@@ -176,13 +183,6 @@
        //生产领料单(仓库手动备料)
        {
            "path": "pages/receiveorder/receiveorder",
            "style": {
                "navigationBarTitleText": "收货单",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/receiveorder/receiveorderoutbound",
            "style": {
                "navigationBarTitleText": "收货单",
                "enablePullDownRefresh": false
´úÂë¹ÜÀí/»´°²PDA/pages/index/index.vue
@@ -3,7 +3,7 @@
    <view class="" slot="body">
        <!-- <view v-for="(item,index) in tree" :key="item.id"> -->
        <u-grid :col="3">
            <u-grid-item @tap="clickCoupon(item.url,item.menuId,item.description)" v-for="(item) in tree"
            <u-grid-item @tap="clickCoupon(item.url,item.menuId,item.description,item.menuName)" v-for="(item) in tree"
                :key="item.menuId">
                <u-icon name="home" :size="50"></u-icon>
                <view class="grid-text">{{item.menuName}}</view>
@@ -115,14 +115,15 @@
                // return true;
                return this.datas.find(x => x.text == text);
            },
            clickCoupon(url, menuid, warehouseid) {
            clickCoupon(url, menuid, warehouseid, menuname) {
                // console.log("clickCoupon")
                if (this.hasLogin()) {
                    this.$u.route({
                        url: url,
                        params: {
                            menuId: menuid,
                            warehouseId: warehouseid
                            warehouseId: warehouseid,
                            menuName: menuname
                        }
                    })
                } else {
´úÂë¹ÜÀí/»´°²PDA/pages/raworderboxing/raworderboxing.vue
@@ -24,7 +24,7 @@
                        </uni-forms-item>
                    </uni-forms>
                    <uni-list>
                        <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode">
                        <!-- <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode">
                            <template v-slot:body>
                                <view class="uni-list-box">
                                    <view class="uni-content">
@@ -33,7 +33,7 @@
                                    </view>
                                </view>
                            </template>
                        </uni-list-item>
                        </uni-list-item> -->
                        <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="item.sn">
                            <template v-slot:body>
                                <view class="uni-list-box">
@@ -41,9 +41,12 @@
                                        @click="deleteList(item.sn)">
                                    </uni-icons>
                                    <view class="uni-content">
                                        <view class="uni-title-sub uni-ellipsis-2">订单号:{{item.orderNo}}</view>
                                        <view class="uni-note">物料编码:{{item.matCode}}</view>
                                        <view class="uni-note">数量:{{item.matQty}}</view>
                                        <view class="uni-title-sub uni-ellipsis-2">采购单号:{{item.purchaseOrderNo}}</view>
                                        <view class="uni-note">物料编码:{{item.materielCode}}</view>
                                        <view class="uni-note">批次号:{{item.lotNo}}</view>
                                        <view class="uni-note">数量:{{item.quantity}}</view>
                                        <view class="uni-note">生产日期:{{item.productionDate}}</view>
                                        <view class="uni-note">有效期:{{item.effectiveDate}}</view>
                                    </view>
                                </view>
                            </template>
@@ -150,7 +153,7 @@
    export default {
        data() {
            return {
                items: ['组盘', '入库', '单据信息'],//, '解盘'
                items: ['组盘', '入库', '单据信息'], //, '解盘'
                current: 0,
                matTotal: [],
                matInfos: [],
@@ -168,7 +171,8 @@
                value: "",
                matInfo: [],
                value2: "",
                matTotals:[]
                matTotals: [],
                warehouseId:""
            }
        },
        onShow() {},
@@ -176,6 +180,7 @@
            this.focus = false;
            this.addressFocus = false;
            this.orderNo = res.orderNo;
            this.warehouseId=res.warehouseId;
            this.label = "单据编号:" + this.orderNo;
            this.getData();
        },
@@ -185,7 +190,7 @@
                innerAudioContext.play();
            },
            //解盘
            releasebox(){
            releasebox() {
                if (this.value.length == 0) {
                    this.$refs.uToast.show({
                        title: "请扫码",
@@ -223,7 +228,7 @@
                    }
                })
            },
            releaseboxInput(){
            releaseboxInput() {
                this.$nextTick(() => {
                    if (this.value.length == 0) {
                        return;
@@ -267,7 +272,7 @@
                    }
                })
            },
            updateFocus() {
                this.$nextTick(() => {
                    this.materSn = '';
@@ -311,7 +316,7 @@
                this.$nextTick(function(x) {
                    if (this.barcode.length > 0) {
                        // if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') {
                            this.focus = true;
                        this.focus = true;
                        // } else {
                        //     this.$refs.uToast.show({
                        //         title: "扫码错误,请扫描托盘码",
@@ -329,53 +334,93 @@
                        setTimeout(() => {
                            this.materSn = "";
                        }, 10);
                        var matInfo = matSn.split('|');
                        if (matInfo.length == 7) {
                            var matObj = {
                                matCode: matInfo[1],
                                matProductionDate: matInfo[3],
                                matQty: matInfo[5],
                                orderNo: matInfo[6],
                                sn: matSn
                            }
                            var temp = this.matInfos.find(x => x.orderNo == matObj.orderNo);
                            if (!temp) {
                                var tmp = this.matTotal.find(x => x.matCode == matObj.matCode);
                                if (!tmp) {
                                    this.matTotal.push({
                                        matCode: matObj.matCode,
                                        matQuantity: parseInt(matObj.matQty)
                        this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
                            if (res.status) {
                                // debugger
                                // this.matTotal.push({
                                //     matCode: res.data.materielCode,
                                //     matQuantity: parseInt(res.data.quantity)
                                // });
                                // this.sns.push(res.data.serialNumber);
                                this.matInfos.splice(0, this.matInfos.length);
                                this.matInfos.push(res.data);
                                if (res.message) {
                                    this.$refs.uToast.show({
                                        title: res.message,
                                        type: "error"
                                    })
                                } else {
                                    tmp.matQuantity += parseInt(matObj.matQty);
                                    // setTimeout(this.updateFocus,200);
                                    setTimeout(() => {
                                        this.voiceSpeech('../../static/fail.mp3');
                                    }, 100);
                                    return;
                                }
                                this.sns.push(matSn);
                                this.matInfos.push(matObj);
                                setTimeout(this.updateFocus, 200);
                                // setTimeout(this.updateFocus,200);
                                setTimeout(() => {
                                    this.voiceSpeech('../../static/success.mp3');
                                }, 100);
                            } else {
                                // this.innerCode = "";
                                this.$refs.uToast.show({
                                    title: "扫码重复",
                                    title: res.message,
                                    type: "error"
                                })
                                setTimeout(this.updateFocus, 200);
                                // setTimeout(this.updateFocus,200);
                                setTimeout(() => {
                                    this.voiceSpeech('../../static/fail.mp3');
                                }, 100);
                            }
                        } else {
                            this.$refs.uToast.show({
                                title: "扫码错误,请扫描正确内箱码",
                                type: "error"
                            })
                            setTimeout(this.updateFocus, 200);
                            setTimeout(() => {
                                this.voiceSpeech('../../static/fail.mp3');
                            }, 100);
                        }
                        })
                        // var matInfo = matSn.split('|');
                        // if (matInfo.length == 7) {
                        //     var matObj = {
                        //         matCode: matInfo[1],
                        //         matProductionDate: matInfo[3],
                        //         matQty: matInfo[5],
                        //         orderNo: matInfo[6],
                        //         sn: matSn
                        //     }
                        //     var temp = this.matInfos.find(x => x.orderNo == matObj.orderNo);
                        //     if (!temp) {
                        //         var tmp = this.matTotal.find(x => x.matCode == matObj.matCode);
                        //         if (!tmp) {
                        //             this.matTotal.push({
                        //                 matCode: matObj.matCode,
                        //                 matQuantity: parseInt(matObj.matQty)
                        //             })
                        //         } else {
                        //             tmp.matQuantity += parseInt(matObj.matQty);
                        //         }
                        //         this.sns.push(matSn);
                        //         this.matInfos.push(matObj);
                        //         setTimeout(this.updateFocus, 200);
                        //         setTimeout(() => {
                        //             this.voiceSpeech('../../static/success.mp3');
                        //         }, 100);
                        //     } else {
                        //         this.$refs.uToast.show({
                        //             title: "扫码重复",
                        //             type: "error"
                        //         })
                        //         setTimeout(this.updateFocus, 200);
                        //         setTimeout(() => {
                        //             this.voiceSpeech('../../static/fail.mp3');
                        //         }, 100);
                        //     }
                        // } else {
                        //     this.$refs.uToast.show({
                        //         title: "扫码错误,请扫描正确内箱码",
                        //         type: "error"
                        //     })
                        //     setTimeout(this.updateFocus, 200);
                        //     setTimeout(() => {
                        //         this.voiceSpeech('../../static/fail.mp3');
                        //     }, 100);
                        // }
                    }
                })
            },
@@ -383,17 +428,18 @@
                var postData = {
                    MainData: {
                        "barcode": this.inboundBarcode,
                        "startPoint": this.address
                        "startPoint": this.address,
                        "warehouseId":this.warehouseId
                    }
                }
                this.$u.post('/api/Inbound/RequestInbound', postData).then(res => {
                this.$u.post('/api/Task/RequestInboundTask', postData).then(res => {
                    if (res.status) {
                        uni.$showMsg(res.message);
                        this.inboundBarcode = "";
                        this.address = "";
                        setTimeout(()=>{
                        setTimeout(() => {
                            this.addressFocus = false;
                        },200);
                        }, 200);
                    } else {
                        this.$refs.uToast.show({
                            title: res.message,
@@ -423,7 +469,7 @@
                        sn = item.sn;
                        var tmp = this.matTotal.find(x => x.matCode == item.matCode);
                        if (tmp) {
                            tmp.matQuantity -= parseInt(item.matQty);
                            tmp.matQuantity -= parseInt(item.quantity);
                        } else {
                        }
@@ -443,7 +489,7 @@
                    })
                    return;
                }
                if (this.sns.length == 0) {
                if (this.matInfos.length == 0) {
                    this.$refs.uToast.show({
                        title: "请扫描内箱标签",
                        type: 'error'
@@ -452,9 +498,10 @@
                }
                this.$u.post('/api/InboundOrder/MaterielGroup', {
                    MainData: {
                        "pallet_barcode": this.barcode,
                        "palletCode": this.barcode,
                        "orderNo": this.orderNo,
                        "isFull": this.check
                        // "isFull": this.check
                        "warehouseId":this.warehouseId
                    },
                    DelKeys: this.sns
                }).then(res => {
´úÂë¹ÜÀí/»´°²PDA/pages/stash/QueryData.vue
@@ -1,23 +1,33 @@
<template>
    <view >
    <view>
        <!-- <uni-forms ref="formData" :modelValue="formData" label-width="120"> -->
        <uni-forms class="customcss" label-width="120">
            <uni-forms-item label="条码信息">
                <uni-easyinput type="text" :focus="!barcodefocus" v-model="barcode" placeholder="请扫描托盘条码或小火车条码" ref='midInput'
            <uni-forms-item label="托盘条码">
                <uni-easyinput type="text" :focus="!barcodefocus" v-model="barcode" placeholder="请扫描托盘条码" ref='midInput'
                    @input="locationNoinputChange()" />
            </uni-forms-item>
        </uni-forms>
        <uni-list class="footer">
            <uni-list-item direction="column" v-for="(item,index) in infos" :key="index">
        <uni-list>
            <uni-list-item direction="column" v-if="stockInfoBarcode">
                <template v-slot:body>
                    <view class="uni-list-box">
                        <view class="uni-content">
                            <view class="uni-title-sub uni-ellipsis-2">物料编号:{{item.matCode}}</view>
                            <view class="uni-title-sub uni-ellipsis-2">物料名称:{{item.matName}}</view>
                            <view class="uni-title-sub uni-ellipsis-2">托盘号:{{item.barcode}}</view>
                            <view class="uni-title-sub uni-ellipsis-2">出库数量:{{item.quantity}}</view>
                            <view class="uni-title-sub uni-ellipsis-2">配送地址:{{item.address}}</view>
                            <view class="uni-title-sub uni-ellipsis-2">当前位置:{{item.currentAddress}}</view>
                            <view class="uni-title-sub uni-ellipsis-2">托盘号:{{stockInfoBarcode}}</view>
                        </view>
                    </view>
                </template>
            </uni-list-item>
            <uni-list-item direction="column" v-for="(item,index) in stockInfoDetail" :key="index">
                <template v-slot:body>
                    <view class="uni-list-box">
                        <view class="uni-content">
                            <view class="uni-title-sub uni-ellipsis-2">物料编号:{{item.materielCode}}</view>
                            <view class="uni-note">物料名称:{{item.materielName}}</view>
                            <view class="uni-note">物料批次:{{item.batchNo}}</view>
                            <view class="uni-note">库存数量:{{item.stockQuantity}}</view>
                            <view class="uni-note">出库数量:{{item.outboundQuantity}}</view>
                            <view class="uni-note">生产日期:{{item.productionDate}}</view>
                            <view class="uni-note">有 æ•ˆ æœŸï¼š{{item.effectiveDate}}</view>
                        </view>
                    </view>
                </template>
@@ -32,12 +42,16 @@
    export default {
        data() {
            return {
                infos: [],
                // stockInfo: [],
                stockInfoDetail: [],
                barcode: '',
                barcodefocus: false,
                warehouseId: 0,
                stockInfoBarcode: '',
            }
        },
        onLoad(res) {
            this.warehouseId = res.warehouseId;
        },
        methods: {
            locationNoinputChange() {
@@ -45,21 +59,27 @@
                    if (this.barcode != '') {
                        var postData = {
                            MainData: {
                                "barcode": this.barcode
                                "barcode": this.barcode,
                                "warehouseId": this.warehouseId,
                            }
                        };
                        this.$u.post('/api/Carry/GetCarryInfo', postData).then(res => {
                        this.$u.post('/api/StockInfo/StockQueryData', postData).then(res => {
                            this.stockInfoBarcode = "";
                            // this.stockInfo = [];
                            this.stockInfoDetail = [];
                            if (res.status) {
                                this.infos = res.data
                                this.stockInfoBarcode = res.data.palletCode,
                                    // this.stockInfo = res.data,
                                    this.stockInfoDetail = res.data.details
                            } else {
                                this.$refs.uToast.show({
                                    // title: "未找到托盘信息",
                                    title: res.message,
                                    type: "error"
                                })
                            }
                            this.barcode = "";
                        })
                        this.istrue = true;
                    }
                })
            }
@@ -140,4 +160,4 @@
    .footer {
        // padding-top: 20%;
    }
</style>
</style>
´úÂë¹ÜÀí/»´°²PDA/pages/stash/TakeStock.vue
@@ -32,7 +32,7 @@
                            <checkbox :checked="isPicking" @click="checkedClick">是否拣选</checkbox>
                        </uni-forms-item>
                        <uni-forms-item>
                            <button @click="picking" type="primary" style="margin-left: 0px;">拣选</button>
                            <button @click="picking" type="primary" style="margin-left: 0px;">盘点完成</button>
                        </uni-forms-item>
                    </uni-forms>
                    <uni-list>
´úÂë¹ÜÀí/»´°²PDA/pages/stash/inboundorder.vue
@@ -28,7 +28,7 @@
    export default {
        data() {
            return {
                page: "/pages/raworderboxing/raworderboxing?",
                page: "/pages/stash/raworderboxing?",
                loadVisible: false,
                searchValue: "",
                status: "more",
´úÂë¹ÜÀí/»´°²PDA/pages/stash/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,172 @@
<template>
    <!-- <u-card :title="title" > -->
    <view class="" slot="body">
        <!-- <view v-for="(item,index) in tree" :key="item.id"> -->
        <u-grid :col="3">
            <u-grid-item @tap="clickCoupon(item.url)" v-for="(item) in tree" :key="item.menuId">
                <u-icon name="coupon" :size="50"></u-icon>
                <view class="grid-text">{{item.menuName}}</view>
            </u-grid-item>
        </u-grid>
        <!-- </view> -->
        <u-toast ref="uToast" />
    </view>
    <!-- </u-card> -->
</template>
<script>
    import {
        config
    } from '../../common/config.js'
    export default {
        data() {
            return {
                // title: '操作功能'
                datas: [],
                tree: [],
                warehouseId: "",
                version: ""
            }
        },
        onShow() {
            // uni.getSystemInfo({
            //     success: (res) => {
            //         this.version = res.appWgtVersion;
            //         // console.log(res);
            //         //检测当前平台,如果是安卓则启动安卓更新
            //         if (res.platform == "android") {
            //             this.AndroidCheckUpdate();
            //         }
            //     }
            // });
        },
        onLoad(res) {
            // var id = this.$mp.query.id;
            // this.warehouseId = this.$mp.query.warehouseId;
            this.warehouseId = res.warehouseId;
            uni.setNavigationBarTitle({
                title: res.menuName
            });
            this.getCurrentTree(res.menuId);
        },
        mounted() {
        },
        methods: {
            AndroidCheckUpdate: function() {
                var _this = this;
                uni.request({
                    url: 'http://10.1.211.101:9004/api/PDA/GetPDAVersion?version=' + this.version,
                    method: 'GET',
                    data: {},
                    success: res => {
                        if (res.data.data) {
                            uni.showToast({
                                title: '有新的版本发布,检测到您目前为Wifi连接,程序已启动自动更新。新版本下载完成后将自动弹出安装程序。',
                                mask: false,
                                duration: 5000,
                                icon: "none"
                            });
                            var dtask = plus.downloader.createDownload(
                                "http://10.1.211.101:9004/api/PDA/DownLoadApp", {},
                                function(d, status) {
                                    // ä¸‹è½½å®Œæˆ
                                    if (status == 200) {
                                        plus.runtime.install(plus.io.convertLocalFileSystemURL(d
                                            .filename), {}, {}, function(error) {
                                            uni.showToast({
                                                title: '安装失败',
                                                mask: false,
                                                duration: 1500
                                            });
                                        })
                                    } else {
                                        uni.showToast({
                                            title: '更新失败',
                                            mask: false,
                                            duration: 1500
                                        });
                                    }
                                });
                            dtask.start();
                        }
                    },
                    fail: () => {
                        console.log('请求失败')
                    },
                    complete: () => {}
                });
            },
            getCurrentTree(id) {
                this.$u.post('/api/Sys_Menu/GetTreeMenuPDAStash?ParentId=' + id, {}).then(result => {
                    this.tree = result;
                })
            },
            getTree(id, data, isRootId) {
                this.datas.forEach((x) => {
                    if (x.pid == id) {
                        x.lv = data.lv + 1;
                        if (isRootId) {
                            x.rootId = id;
                        }
                        if (!data.children) data.children = [];
                        data.children.push(x);
                        this.getTree(x.id, x, isRootId);
                    }
                });
            },
            getPermission(text) {
                // return true;
                return this.datas.find(x => x.text == text);
            },
            clickCoupon(url) {
                // console.log("clickCoupon")
                if (this.hasLogin()) {
                    // this.$u.route(url)
                    this.$u.route({
                        url: url,
                        params: {
                            warehouseId: this.warehouseId
                        }
                    })
                } else {
                    this.$t.message.loading('登录失效请重新登录')
                    uni.reLaunch({
                        url: '/pages/login/login'
                    });
                }
            },
            lock() {
                console.log("lock")
                if (this.hasLogin()) {
                    this.$u.route("pages/feeding/feeding")
                } else {
                    this.$t.message.loading('登录失效请重新登录')
                    uni.reLaunch({
                        url: '/pages/login/login'
                    });
                }
            },
            //判断是否登录
            hasLogin() {
                let haslogin = uni.getStorageSync('jo_user')
                if (haslogin == null || haslogin == "") {
                    return false
                } else {
                    return true
                }
            }
        }
    }
</script>
<style lang="scss" scoped>
    .grid-text {
        font-size: 28rpx;
        margin-top: 4rpx;
        color: $u-type-info;
    }
</style>
´úÂë¹ÜÀí/»´°²PDA/pages/stash/pickingMat.vue
@@ -1,96 +1,162 @@
<template>
    <view>
        <view class="header">
            <uni-forms label-width="120">
                <uni-forms-item label="托盘条码">
                    <uni-easyinput type="text" @input="inputChange()" v-model="value" placeholder="请扫码" ref='midInput'
                        :focus="true" />
                </uni-forms-item>
                <uni-forms-item>
                    <button @click="submit" type="primary" size="default" style="margin-top: 2%;">拣选完成</button>
                </uni-forms-item>
            </uni-forms>
        <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
        </uni-segmented-control>
        <view class="content">
            <view v-if="current === 0" class="headerstyle">
                <view class="itemstyle">
                    <uni-forms label-width="120">
                        <uni-forms-item label="托盘条码">
                            <uni-easyinput type="text" :focus="!istrue" v-model="barcode" placeholder="请扫描托盘条码"
                                ref='midInput' @input="inputChangebarcode()" />
                        </uni-forms-item>
                        <uni-forms-item>
                            <button @click="picking" type="primary" style="margin-left: 0px;">拣选完成</button>
                        </uni-forms-item>
                    </uni-forms>
                    <uni-list>
                        <uni-list-item direction="column" v-for="item in matInfos" :key="item.sn">
                            <template v-slot:body>
                                <view class="uni-list-box">
                                    <!-- <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
                                        @click="deleteList(item.sn)">
                                    </uni-icons> -->
                                    <view class="uni-content">
                                        <view class="uni-title-sub uni-ellipsis-2">单据编号:{{item.orderNo}}</view>
                                        <view class="uni-note">托盘编号:{{item.palletCode}}</view>
                                        <view class="uni-note">物料批次:{{item.batchNo}}</view>
                                        <view class="uni-note">物料编码:{{item.materielCode}}</view>
                                        <view class="uni-note">物料名称:{{item.materielName}}</view>
                                        <view class="uni-note">单据数量:{{item.orderQuantity}}</view>
                                        <view class="uni-note">原始库存:{{item.originalQuantity}}</view>
                                        <view class="uni-note">分配库存:{{item.assignQuantity}}</view>
                                        <view class="uni-note">剩余库存:{{item.originalQuantity-item.assignQuantity}}</view>
                                    </view>
                                </view>
                            </template>
                        </uni-list-item>
                    </uni-list>
                </view>
            </view>
            <view v-if="current === 2" class="headerstyle">
                <view class="itemstyle">
                    <uni-forms label-width="120">
                        <uni-forms-item label="托盘条码">
                            <uni-easyinput type="text" :focus="!istrue2" v-model="barcode2" placeholder="请扫描托盘条码"
                                ref='midInput' @input="inputChangebarcode2()" />
                        </uni-forms-item>
                        <uni-forms-item label="内箱标签">
                            <uni-easyinput type="text" @input="inputChange2()" v-model="innerboxcode"
                                placeholder="请扫描内箱标签" ref='midInput' :focus="istrue2" />
                        </uni-forms-item>
                        <uni-forms-item>
                            <button @click="submit" type="primary" size="default" style="margin-top: 2%;">组盘</button>
                        </uni-forms-item>
                    </uni-forms>
                </view>
            </view>
            <view v-if="current === 1" class="headerstyle">
                <view class="itemstyle">
                    <uni-forms label-width="120">
                        <uni-forms-item label="托盘条码">
                            <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode"
                                placeholder="请扫描托盘条码" ref='midInput' @input="inputChangebarcode3" />
                        </uni-forms-item>
                        <uni-forms-item label="地址条码">
                            <uni-easyinput type="text" v-model="address" placeholder="请扫描地址条码" ref='midInput'
                                :focus="addressFocus" />
                        </uni-forms-item>
                        <uni-forms-item>
                            <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">入库确认</button>
                        </uni-forms-item>
                    </uni-forms>
                </view>
            </view>
        </view>
        <uni-list class="footer">
            <uni-list-item direction="column" v-if="value2">
                <label>{{value2}}</label>
            </uni-list-item>
            <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode">
                <template v-slot:body>
                    <view class="uni-list-box">
                        <view class="uni-content">
                            <view class="uni-title-sub uni-ellipsis-2">物料编码:{{item.matCode}}</view>
                            <view class="uni-title-sub uni-ellipsis-2">数量:{{item.matQuantity}}</view>
                        </view>
                    </view>
                </template>
            </uni-list-item>
            <uni-list-item direction="column" v-for="(item,index) in matInfo" :key="index">
                <template v-slot:body>
                    <view class="uni-list-box">
                        <view class="uni-content">
                            <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">物料编码:{{item.matCode}}
                            </view>
                            <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">物料名称:{{item.matName}}
                            </view>
                            <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">数量:{{item.matQty}}
                            </view>
                        </view>
                    </view>
                </template>
            </uni-list-item>
        </uni-list>
        <u-toast ref="uToast" />
    </view>
</template>
<script>
    // const SixUniTts = uni.requireNativePlugin("SmallSix-SixUniTts")
    export default {
        data() {
            return {
                value: "",
                matInfo: [],
                value2: "",
                matTotal:[]
                items: ['拣选', '入库'], //'拣选组盘',
                current: 0,
                isPicking: false,
                istrue: false,
                matInfos: [],
                barcode: '',
                materialsns: "",
                boxBarcodes: [],
                sns: [],
                barcodefocus: true,
                totalNum: 0,
                pickNum: 0,
                num: 0,
                orderTotalNum: 0,
                orderPickNum: 0,
                orderNo: "",
                matTotal: [],
                istrue2: false,
                barcode2: '',
                innerboxcode: "",
                sns2: [],
                barcodefocus: true,
                addressFocus: false,
                inboundBarcode: "",
                address: "",
                warehouseId: 0,
            }
        },
        onLoad(res) {
            //this.hideboard();
            this.barcodefocus = false;
            this.warehouseId = res.warehouseId;
            this.istrue = false;
        },
        methods: {
            submit() {
                if (this.value.length == 0) {
            onClickItem(e) {
                this.barcodeFo = true;
                this.focus = false;
                this.addressFocus = false;
                if (this.current !== e.currentIndex) {
                    this.current = e.currentIndex;
                }
            },
            inbound() {
                if (this.inboundBarcode == "") {
                    this.$refs.uToast.show({
                        title: "请扫码",
                        title: "请扫描托盘条码",
                        type: "error"
                    })
                    return;
                }
                var param;
                var matInfo = this.value.split('|');
                if (matInfo.length == 7) {
                    param = {
                        MainData: {
                            "innerCode": this.value
                        }
                    }
                } else {
                    param = {
                        MainData: {
                            "barcode": this.value
                        }
                if (this.address == "") {
                    this.$refs.uToast.show({
                        title: "请扫描地址条码",
                        type: "error"
                    })
                    return;
                }
                var postData = {
                    MainData: {
                        "barcode": this.inboundBarcode,
                        "startPoint": this.address,
                        "warehouseId": this.warehouseId
                    }
                }
                this.$u.post('/api/StockOperate/ReleaseAllBox', param).then(resdt => {
                    if (resdt.status) {
                        uni.$showMsg('解盘成功!')
                        this.value = "";
                        this.matInfo = [];
                this.$u.post('/api/Task/RequestInboundTask', postData).then(res => {
                    if (res.status) {
                        uni.$showMsg(res.message);
                        this.inboundBarcode = "";
                        this.address = "";
                        setTimeout(() => {
                            this.addressFocus = false;
                        }, 200);
                    } else {
                        this.$refs.uToast.show({
                            title: resdt.message,
                            title: res.message,
                            type: "error"
                        })
                    }
@@ -101,47 +167,195 @@
                    })
                })
            },
            inputChangebarcode3() {
                this.addressFocus = false;
                this.$nextTick(function(x) {
                    if (this.inboundBarcode != '') {
                        this.addressFocus = true;
                    }
                })
            },
            picking() {
                if (this.barcode == "") {
                    this.$refs.uToast.show({
                        title: "请扫描托盘条码",
                        type: "error"
                    })
                    return;
                }
                this.$u.post('/api/OutStockLockInfo/MaterialPick?palletCode=' + this.barcode, {}).then(res => {
                    if (res.status) {
                        uni.$showMsg('拣选成功!')
                        this.barcode = "";
                        this.matInfos = [];
                    } else {
                        this.$refs.uToast.show({
                            title: res.message,
                            type: "error"
                        })
                    }
                })
            },
            inputChange(e) {
                this.$nextTick(() => {
                    if (this.value.length == 0) {
                        return;
                    }
                    var matInfo = this.value.split('|');
                    this.matInfo = [];
                    this.istrue = false;
                    var matInfo = this.materialsns.split('|');
                    if (matInfo.length == 7) {
                        this.$u.post('/api/StockOperate/GetStockInfoByInnerCode', {
                            MainData: {
                                "innerCode": this.value
                            }
                        }).then(res => {
                            if (res.status) {
                                this.matInfo = res.data.stockInfo;
                                this.matTotal = res.data.stockTotal;
                            } else {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                        var matObj = {
                            matCode: matInfo[1],
                            matProductionDate: matInfo[3],
                            matQty: matInfo[5],
                            orderNo: matInfo[6],
                            sn: this.materialsns,
                            isPicking: this.isPicking
                        }
                        var temp = this.boxBarcodes.find(x => x.orderNo == matObj.orderNo);
                        if (!temp) {
                            var tmp = this.matTotal.find(x => x.matCode == matObj.matCode);
                            if (!tmp) {
                                this.matTotal.push({
                                    matCode: matObj.matCode,
                                    matQuantity: parseInt(matObj.matQty)
                                })
                            } else {
                                tmp.matQuantity += parseInt(matObj.matQty);
                            }
                        })
                            this.sns.push({
                                innerboxcode: this.materialsns,
                                isSplit: this.isPicking
                            });
                            this.boxBarcodes.push(matObj);
                            this.isPicking = false;
                            setTimeout(this.updateFocus, 100);
                        } else {
                            this.$refs.uToast.show({
                                title: "扫码重复",
                                type: "error"
                            })
                            setTimeout(this.updateFocus, 100);
                        }
                    } else {
                        this.$u.post('/api/StockOperate/GetStockInfoByBarcode', {
                        this.$refs.uToast.show({
                            title: "扫码错误,请扫描正确内箱码",
                            type: "error"
                        })
                        setTimeout(this.updateFocus, 100);
                    }
                })
            },
            checkedClick() {
                this.isPicking = !this.isPicking;
                this.istrue = false;
                this.$nextTick(function(x) {
                    if (this.barcode != '') {
                        this.istrue = true;
                    }
                })
            },
            updateFocus() {
                this.materialsns = '';
                if (!this.istrue) {
                    this.istrue = true;
                }
            },
            inputChangebarcode() {
                this.boxBarcodes = [];
                this.istrue = false;
                this.$nextTick(function(x) {
                    if (this.barcode != '') {
                        var postData = {
                            MainData: {
                                "barcode": this.value
                                "barcode": this.barcode,
                                "warehouseId": this.warehouseId,
                            }
                        }).then(res => {
                            if (res.status) {
                                this.matInfo = res.data.stockInfo;
                                this.matTotal = res.data.stockTotal;
                                // console.log(res.data);
                                // console.log(this.matTotal);
                        };
                        this.$u.post('/api/OutStockLockInfo/GetStockOutboundOrder', postData).then(res => {
                            this.matInfos = [];
                            if (res != null) {
                                this.matInfos = res
                            } else {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    title: "未找到拣选信息",
                                    type: "error"
                                })
                            }
                        })
                        this.istrue = true;
                    }
                })
            },
            deleteList(res) {
                this.matTotal.map((item, index) => {
                    var temp = this.boxBarcodes.find(x => x.sn == res);
                    if (temp) {
                        if (item.matCode == temp.matCode) {
                            if (item.matQuantity - temp.matQty == 0) {
                                this.matTotal.splice(index, 1);
                            } else {
                                item.matQuantity -= temp.matQty;
                            }
                        }
                    }
                })
                this.sns.map((item, index) => {
                    if (item.innerboxcode == res) {
                        this.sns.splice(index, 1);
                    }
                })
                this.boxBarcodes.map((item, index) => {
                    if (item.sn == res) {
                        this.boxBarcodes.splice(index, 1);
                    }
                })
            },
            submit() {
                if (this.barcode2 == "") {
                    this.$refs.uToast.show({
                        title: "请扫描托盘条码",
                        type: "error"
                    })
                    return;
                }
                if (this.innerboxcode == "") {
                    this.$refs.uToast.show({
                        title: "请扫描内箱标签",
                        type: "error"
                    })
                    return;
                }
                this.$u.post('/api/StockOperate/PickingBoxing', {
                    MainData: {
                        "barcode": this.barcode2,
                        "innerboxcode": this.innerboxcode
                    },
                    DelKeys: this.sns2
                }).then(res => {
                    if (res.status) {
                        uni.$showMsg('组盘成功!')
                        this.barcode2 = "";
                        this.innerboxcode = "";
                    } else {
                        this.$refs.uToast.show({
                            title: res.message,
                            type: "error"
                        })
                    }
                }).catch(err => {
                    this.$refs.uToast.show({
                        title: err.message,
                        type: "error"
                    })
                })
            },
            inputChange2(e) {
            },
            inputChangebarcode2() {
                this.istrue2 = false;
                this.$nextTick(function(x) {
                    if (this.barcode2 != '') {
                        this.istrue2 = true;
                    }
                })
            },
@@ -152,86 +366,22 @@
<style lang="scss">
    @import '@/common/uni-ui.scss';
    page {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        background-color: #efeff4;
        min-height: 100%;
        height: auto;
    }
    .tips {
        color: #67c23a;
        font-size: 14px;
        line-height: 40px;
        text-align: center;
        background-color: #f0f9eb;
        height: 0;
        opacity: 0;
        transform: translateY(-100%);
        transition: all 0.3s;
    }
    .tips-ani {
        transform: translateY(0);
        height: 40px;
        opacity: 1;
    }
    .content {
        width: 100%;
        display: flex;
    }
    .list-picture {
        width: 100%;
        height: 145px;
    }
    .thumb-image {
        width: 100%;
        height: 100%;
    }
    .ellipsis {
        display: flex;
        overflow: hidden;
    }
    .uni-ellipsis-1 {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .uni-ellipsis-2 {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .customcss {
        display: flex;
        position: fixed;
        width: 100%;
        top: 10px;
        text-align: center;
        z-index: 999;
        left: 30px;
        height: 20%;
    }
    .footer {
        // padding-top: 30%;
    }
    .header {
        width: 100%;
        height: 150px;
        background-color: #ffffff;
        padding: 20rpx 40rpx;
    }
    .content-text {
        font-size: 14px;
        color: #666;
    }
    .itemstyle {
        margin-top: 20px;
        margin-left: 5%;
    }
    .headerstyle {
        width: 90%;
    }
</style>
´úÂë¹ÜÀí/»´°²PDA/pages/stash/raworderboxing.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,587 @@
<template>
    <view>
        <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
        </uni-segmented-control>
        <view class="content">
            <view v-if="current === 0" class="headerstyle">
                <view class="itemstyle">
                    <uni-forms label-width="180">
                        <uni-forms-item :label="label">
                        </uni-forms-item>
                        <uni-forms-item label="托盘条码:">
                            <uni-easyinput type="text" placeholder="请扫描托盘条码" ref='midInput' :focus="!focus"
                                v-model="barcode" @input="barcodeInput" />
                        </uni-forms-item>
                        <uni-forms-item label="内箱标签:">
                            <uni-easyinput type="text" placeholder="请扫描内箱标签" ref='midInput' :focus="focus"
                                v-model="materSn" @input="snInput" />
                        </uni-forms-item>
                        <uni-forms-item label="初始寿命:" v-if="Test">
                            <uni-easyinput type="text" placeholder="请输入初始寿命" ref='midInput' v-model="Initiallife" />
                        </uni-forms-item>
                        <!-- <uni-forms-item>
                            <checkbox checked="check">是否满盘</checkbox>
                        </uni-forms-item> -->
                        <uni-forms-item>
                            <button @click="submit" type="primary" size="default" style="margin-top: 2%;">组盘</button>
                        </uni-forms-item>
                    </uni-forms>
                    <uni-list>
                        <!-- <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode">
                            <template v-slot:body>
                                <view class="uni-list-box">
                                    <view class="uni-content">
                                        <view class="uni-title-sub uni-ellipsis-2">物料编码:{{item.matCode}}</view>
                                        <view class="uni-title-sub uni-ellipsis-2">数量:{{item.matQuantity}}</view>
                                    </view>
                                </view>
                            </template>
                        </uni-list-item> -->
                        <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="item.sn">
                            <template v-slot:body>
                                <view class="uni-list-box">
                                    <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
                                        @click="deleteList(item.sn)">
                                    </uni-icons>
                                    <view class="uni-content">
                                        <view class="uni-title-sub uni-ellipsis-2">采购单号:{{item.purchaseOrderNo}}</view>
                                        <view class="uni-note">物料编码:{{item.materielCode}}</view>
                                        <view class="uni-note">批次号:{{item.lotNo}}</view>
                                        <view class="uni-note">数量:{{item.quantity}}</view>
                                        <view class="uni-note">生产日期:{{item.productionDate}}</view>
                                        <view class="uni-note">有效期:{{item.effectiveDate}}</view>
                                    </view>
                                </view>
                            </template>
                        </uni-list-item>
                    </uni-list>
                </view>
            </view>
            <view v-if="current === 1" class="headerstyle">
                <view class="itemstyle">
                    <uni-forms label-width="120">
                        <uni-forms-item label="托盘条码">
                            <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode"
                                placeholder="请扫描托盘条码" ref='midInput' @input="inputChangebarcode" />
                        </uni-forms-item>
                        <uni-forms-item label="地址条码">
                            <uni-easyinput type="text" v-model="address" placeholder="请扫描地址条码" ref='midInput'
                                :focus="addressFocus" />
                        </uni-forms-item>
                        <uni-forms-item>
                            <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">入库确认</button>
                        </uni-forms-item>
                    </uni-forms>
                </view>
            </view>
            <view v-if="current === 2" class="headerstyle">
                <view class="itemstyle">
                    <uni-list :border="true">
                        <uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="index">
                            <template v-slot:body>
                                <view class="uni-list-box">
                                    <view class="uni-content">
                                        <view style="font-size: 18px;">单据号:{{orderNo}}</view>
                                        <view style="font-size: 18px;">物料编码:{{item.materielCode}}</view>
                                        <!-- <view style="font-size: 18px;">物料名称:{{item.matName}}</view> -->
                                        <view style="font-size: 18px;">数量:{{item.orderQuantity}}</view>
                                        <view style="font-size: 18px;">单位:{{item.unit}}</view>
                                        <view style="font-size: 18px;">组盘数量:{{item.receiptQuantity}}</view>
                                    </view>
                                </view>
                            </template>
                        </uni-list-item>
                    </uni-list>
                </view>
            </view>
            <view v-if="current === 3" class="headerstyle">
                <view class="itemstyle">
                    <uni-forms label-width="120">
                        <uni-forms-item>
                            <uni-easyinput type="text" @input="releaseboxInput" v-model="value" placeholder="请扫码"
                                ref='midInput' :focus="true" />
                        </uni-forms-item>
                        <uni-forms-item>
                            <button @click="releasebox" type="primary" size="default">解盘</button>
                        </uni-forms-item>
                    </uni-forms>
                    <uni-list>
                        <uni-list-item direction="column" v-if="value2">
                            <template v-slot:body>
                                <view class="uni-list-box">
                                    <view class="uni-content">
                                        <view class="uni-title-sub uni-ellipsis-2">托盘号:{{value2}}</view>
                                    </view>
                                </view>
                            </template>
                        </uni-list-item>
                        <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode">
                            <template v-slot:body>
                                <view class="uni-list-box">
                                    <view class="uni-content">
                                        <view class="uni-title-sub uni-ellipsis-2">物料编码:{{item.matCode}}</view>
                                        <view class="uni-title-sub uni-ellipsis-2">数量:{{item.matQuantity}}</view>
                                    </view>
                                </view>
                            </template>
                        </uni-list-item>
                        <uni-list-item direction="column" v-for="(item,index) in matInfo" :key="index">
                            <template v-slot:body>
                                <view class="uni-list-box">
                                    <view class="uni-content">
                                        <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
                                            ç‰©æ–™ç¼–码:{{item.matCode}}
                                        </view>
                                        <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
                                            ç‰©æ–™åç§°ï¼š{{item.matName}}
                                        </view>
                                        <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
                                            æ•°é‡ï¼š{{item.matQty}}
                                        </view>
                                    </view>
                                </view>
                            </template>
                        </uni-list-item>
                    </uni-list>
                </view>
            </view>
        </view>
        <u-toast ref="uToast" />
    </view>
</template>
<script>
    const innerAudioContext = uni.createInnerAudioContext();
    export default {
        data() {
            return {
                items: ['组盘', '入库', '单据信息'], //, '解盘'
                current: 0,
                matTotal: [],
                matInfos: [],
                orderNo: "",
                label: "",
                orderInfo: [],
                focus: false,
                barcode: "",
                materSn: "",
                Initiallife: 1000,
                sns: [],
                addressFocus: false,
                inboundBarcode: "",
                address: "",
                check: true,
                value: "",
                matInfo: [],
                value2: "",
                matTotals: [],
                warehouseId: "",
                Test: false,
                Testcheck: false,
            }
        },
        onShow() {},
        onLoad(res) {
            this.focus = false;
            this.addressFocus = false;
            this.orderNo = res.orderNo;
            this.warehouseId = res.warehouseId;
            this.Test = this.warehouseId == 1; //把1改成测试架仓库区ID
            this.label = "单据编号:" + this.orderNo;
            this.getData();
        },
        methods: {
            voiceSpeech(src) {
                innerAudioContext.src = src; // '../../static/success.mp3';
                innerAudioContext.play();
            },
            //解盘
            releasebox() {
                if (this.value.length == 0) {
                    this.$refs.uToast.show({
                        title: "请扫码",
                        type: "error"
                    })
                    return;
                }
                var param;
                var matInfo = this.value.split('|');
                if (matInfo.length == 7) {
                    param = {
                        MainData: {
                            "innerCode": this.value
                        }
                    }
                } else {
                    param = {
                        MainData: {
                            "barcode": this.value
                        }
                    }
                }
                this.$u.post('/api/StockOperate/ReleaseAllBox', param).then(resdt => {
                    if (resdt.status) {
                        uni.$showMsg('解盘成功!')
                        this.value = "";
                        this.matInfo = [];
                        this.matTotals = [];
                        this.value2 = "";
                    } else {
                        this.$refs.uToast.show({
                            title: resdt.message,
                            type: "error"
                        })
                    }
                })
            },
            releaseboxInput() {
                this.$nextTick(() => {
                    if (this.value.length == 0) {
                        return;
                    }
                    var matInfo = this.value.split('|');
                    this.matInfo = [];
                    if (matInfo.length == 7) {
                        this.$u.post('/api/StockOperate/GetStockInfoByInnerCode', {
                            MainData: {
                                "innerCode": this.value
                            }
                        }).then(res => {
                            if (res.status) {
                                this.matInfo = res.data.stockInfo;
                                this.matTotals = res.data.stockTotal;
                                this.value2 = res.data.barcode;
                            } else {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                                })
                            }
                        })
                    } else {
                        this.$u.post('/api/StockOperate/GetStockInfoByBarcode', {
                            MainData: {
                                "barcode": this.value
                            }
                        }).then(res => {
                            if (res.status) {
                                this.matInfo = res.data.stockInfo;
                                this.matTotals = res.data.stockTotal;
                                this.value2 = res.data.barcode;
                            } else {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                                })
                            }
                        })
                    }
                })
            },
            updateFocus() {
                debugger
                this.$nextTick(() => {
                    this.materSn = '';
                    if (!this.focus) {
                        this.focus = true;
                    }
                });
            },
            barcodeFocus() {
                debugger
                this.barcode = '';
                if (this.focus) {
                    this.focus = false;
                }
            },
            getData() {
                var postData = {
                    MainData: {
                        orderNo: this.orderNo
                    },
                }
                this.$u.post('/api/InboundOrderDetail/GetInboundOrderDetails', postData).then((res) => {
                    if (res.status) {
                        this.orderInfo = res.data;
                        if (this.orderInfo.length > 3) {
                            this.loadVisible = true;
                        }
                    }
                })
            },
            onClickItem(e) {
                this.focus = false;
                this.addressFocus = false;
                if (this.current !== e.currentIndex) {
                    this.current = e.currentIndex;
                    if (this.current == 2) {
                        this.getData();
                    }
                }
            },
            barcodeInput() {
                this.$nextTick(function(x) {
                    if (this.barcode.length > 0) {
                        // if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') {
                        this.focus = true;
                        // } else {
                        //     this.$refs.uToast.show({
                        //         title: "扫码错误,请扫描托盘码",
                        //         type: "error"
                        //     })
                        // }
                    }
                })
            },
            snInput() {
                this.$nextTick(() => {
                    if (this.materSn != "") {
                        this.focus = false;
                        var matSn = this.materSn;
                        setTimeout(() => {
                            this.materSn = "";
                        }, 10);
                        this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
                            this.Testcheck = false;
                            if (res.status) {
                                // debugger
                                // this.matTotal.push({
                                //     matCode: res.data.materielCode,
                                //     matQuantity: parseInt(res.data.quantity)
                                // });
                                // this.sns.push(res.data.serialNumber);
                                this.matInfos.splice(0, this.matInfos.length);
                                this.matInfos.push(res.data);
                                if (res.message) {
                                    this.$refs.uToast.show({
                                        title: res.message,
                                        type: "error"
                                    })
                                    // setTimeout(this.updateFocus,200);
                                    setTimeout(() => {
                                        this.voiceSpeech('../../static/fail.mp3');
                                    }, 100);
                                    return;
                                }
                                // setTimeout(this.updateFocus,200);
                                setTimeout(() => {
                                    this.voiceSpeech('../../static/success.mp3');
                                }, 100);
                            } else {
                                // this.innerCode = "";
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                                })
                                // setTimeout(this.updateFocus,200);
                                setTimeout(() => {
                                    this.voiceSpeech('../../static/fail.mp3');
                                }, 100);
                            }
                        })
                        // var matInfo = matSn.split('|');
                        // if (matInfo.length == 7) {
                        //     var matObj = {
                        //         matCode: matInfo[1],
                        //         matProductionDate: matInfo[3],
                        //         matQty: matInfo[5],
                        //         orderNo: matInfo[6],
                        //         sn: matSn
                        //     }
                        //     var temp = this.matInfos.find(x => x.orderNo == matObj.orderNo);
                        //     if (!temp) {
                        //         var tmp = this.matTotal.find(x => x.matCode == matObj.matCode);
                        //         if (!tmp) {
                        //             this.matTotal.push({
                        //                 matCode: matObj.matCode,
                        //                 matQuantity: parseInt(matObj.matQty)
                        //             })
                        //         } else {
                        //             tmp.matQuantity += parseInt(matObj.matQty);
                        //         }
                        //         this.sns.push(matSn);
                        //         this.matInfos.push(matObj);
                        //         setTimeout(this.updateFocus, 200);
                        //         setTimeout(() => {
                        //             this.voiceSpeech('../../static/success.mp3');
                        //         }, 100);
                        //     } else {
                        //         this.$refs.uToast.show({
                        //             title: "扫码重复",
                        //             type: "error"
                        //         })
                        //         setTimeout(this.updateFocus, 200);
                        //         setTimeout(() => {
                        //             this.voiceSpeech('../../static/fail.mp3');
                        //         }, 100);
                        //     }
                        // } else {
                        //     this.$refs.uToast.show({
                        //         title: "扫码错误,请扫描正确内箱码",
                        //         type: "error"
                        //     })
                        //     setTimeout(this.updateFocus, 200);
                        //     setTimeout(() => {
                        //         this.voiceSpeech('../../static/fail.mp3');
                        //     }, 100);
                        // }
                    }
                })
            },
            inbound() {
                if (this.inboundBarcode == "") {
                    this.$refs.uToast.show({
                        title: "请扫描托盘条码",
                        type: "error"
                    })
                    return;
                }
                if (this.address == "") {
                    this.$refs.uToast.show({
                        title: "请扫描地址条码",
                        type: "error"
                    })
                    return;
                }
                var postData = {
                    MainData: {
                        "barcode": this.inboundBarcode,
                        "startPoint": this.address,
                        "warehouseId": this.warehouseId
                    }
                }
                this.$u.post('/api/Task/RequestInboundTask', postData).then(res => {
                    if (res.status) {
                        uni.$showMsg(res.message);
                        this.inboundBarcode = "";
                        this.address = "";
                        setTimeout(() => {
                            this.addressFocus = false;
                        }, 200);
                    } else {
                        this.$refs.uToast.show({
                            title: res.message,
                            type: "error"
                        })
                    }
                }).catch(err => {
                    this.$refs.uToast.show({
                        title: err.message,
                        type: "error"
                    })
                })
            },
            inputChangebarcode() {
                this.addressFocus = false;
                this.$nextTick(function(x) {
                    if (this.inboundBarcode != '') {
                        this.addressFocus = true;
                    }
                })
            },
            deleteList(res) {
                var sn = '';
                this.matInfos.map((item, index) => {
                    if (item.sn == res) {
                        this.matInfos.splice(index, 1);
                        sn = item.sn;
                        var tmp = this.matTotal.find(x => x.matCode == item.matCode);
                        if (tmp) {
                            tmp.matQuantity -= parseInt(item.quantity);
                        } else {
                        }
                    }
                })
                this.sns.map((item, index) => {
                    if (item == res) {
                        this.sns.splice(index, 1);
                    }
                })
            },
            submit() {
                if (this.barcode == "") {
                    this.$refs.uToast.show({
                        title: "请扫描托盘条码",
                        type: 'error'
                    })
                    return;
                }
                if (this.matInfos.length == 0) {
                    this.$refs.uToast.show({
                        title: "请扫描内箱标签",
                        type: 'error'
                    })
                    return;
                }
                if (this.Test) {
                    if (!this.Testcheck) {
                        this.Testcheck = true;
                        this.$refs.uToast.show({
                            title: "请确认初始寿命",
                            type: 'error'
                        })
                        return;
                    }
                }
                this.$u.post('/api/InboundOrder/MaterielGroup', {
                    MainData: {
                        "palletCode": this.barcode,
                        "orderNo": this.orderNo,
                        "initiallife":this.Initiallife,
                        // "isFull": this.check
                        "warehouseId": this.warehouseId
                    },
                    DelKeys: this.sns
                }).then(res => {
                    this.Testcheck = false;
                    if (res.status) {
                        this.$refs.uToast.show({
                            title: "组盘成功",
                            type: "success"
                        })
                        this.focus = false;
                        this.barcode = "";
                        this.matInfos = [];
                        this.sns = [];
                        this.matTotal = [];
                    } 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%;
    }
    .headerstyle {
        width: 90%;
    }
</style>
´úÂë¹ÜÀí/»´°²PDA/pages/stash/receiveorder.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,181 @@
<template>
    <view>
        <u-sticky>
            <view style="background-color: #ffffff;">
                <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
            </view>
        </u-sticky>
        <uni-list :border="true">
            <uni-list-item direction="column" clickable @click="groupClick(item.receiveOrderNo)" link
                :to="page+item.receiveOrderNo+'&receiveOrderId='+item.receiveOrderId" v-for="item in allReceivingOrders"
                :key="item.receiveOrderNo">
                <template v-slot:body>
                    <uni-group margin-top="20">
                        <view> æ”¶è´§å•号:{{item.receiveOrderNo}} </view>
                        <!-- <view> è®¢å•类型:{{item.receiveOrderType}} </view>
                        <view> è®¢å•状态:{{item.receiveOrderStatus}} </view> -->
                        <view> ä¾›åº”商代号:{{item.suppliersId}} </view>
                    </uni-group>
                </template>
            </uni-list-item>
        </uni-list>
        <uni-load-more :status="status" v-if="loadVisible"></uni-load-more>
        <u-back-top :scroll-top="scrollTop" top="400"></u-back-top>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                page: "/pages/stash/receiveorderoutbound?orderNo=",
                loadVisible: false,
                searchValue: "",
                status: "more",
                allReceivingOrders: [],
                pageNo: 1,
                scrollTop: 0
            }
        },
        onLoad(res) {
            this.getData();
        },
        onPageScroll(e) {
            this.scrollTop = e.scrollTop;
        },
        onReachBottom() {
            this.pageNo += 1;
            this.getData();
        },
        methods: {
            search(res) {
                this.pageNo = 1;
                this.getData();
            },
            groupClick() {
            },
            getData() {
                var postData = {
                    MainData: {
                        orderNo: this.searchValue,
                        pageNo: this.pageNo
                    },
                }
                this.$u.post('/api/ReceiveOrder/GetReceiveOrders', postData).then((res) => {
                    if (res.status) {
                        if (res.data.length > 0) {
                            if (this.searchValue == '') {
                                this.allReceivingOrders = this.allReceivingOrders.concat(res.data);
                                // this.allReceivingOrders = res.data;
                                if (this.allReceivingOrders.length > 3) {
                                    this.loadVisible = true;
                                } else {
                                    this.loadVisible = false;
                                }
                            } else {
                                // this.allReceivingOrders = res.data;
                                if (postData.MainData.pageNo == 1) {
                                    this.allReceivingOrders = [];
                                }
                                this.allReceivingOrders = this.allReceivingOrders.concat(res.data);
                                if (this.allReceivingOrders.length > 3) {
                                    this.loadVisible = true;
                                } else {
                                    this.loadVisible = false;
                                }
                            }
                        } else {
                            this.status = 'noMore';
                            //this.allReceivingOrders = [];
                            this.loadVisible = true;
                        }
                    }
                })
            }
        }
    }
</script>
<style lang="scss">
    @import '@/common/uni-ui.scss';
    page {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        background-color: #efeff4;
        min-height: 100%;
        height: auto;
    }
    .tips {
        color: #67c23a;
        font-size: 14px;
        line-height: 40px;
        text-align: center;
        background-color: #f0f9eb;
        height: 0;
        opacity: 0;
        transform: translateY(-100%);
        transition: all 0.3s;
    }
    .tips-ani {
        transform: translateY(0);
        height: 40px;
        opacity: 1;
    }
    .content {
        width: 100%;
        display: flex;
    }
    .list-picture {
        width: 100%;
        height: 145px;
    }
    .thumb-image {
        width: 100%;
        height: 100%;
    }
    .ellipsis {
        display: flex;
        overflow: hidden;
    }
    .uni-ellipsis-1 {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .uni-ellipsis-2 {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .customcss {
        display: flex;
        position: fixed;
        width: 100%;
        top: 10px;
        text-align: center;
        z-index: 999;
        left: 30px;
        height: 20%;
    }
    .footer {
        padding-top: 50%;
    }
</style>
´úÂë¹ÜÀí/»´°²PDA/pages/stash/receiveorderoutbound.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,665 @@
<template>
    <view>
        <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
        </uni-segmented-control>
        <view v-if="current === 0" class="headerstyle">
            <view class="itemstyle">
                <uni-forms style="margin-left: 2%;margin-top: 20px;" label-width="180">
                    <uni-forms-item :label="label" style="margin-top: -20px;"></uni-forms-item>
                    <!-- <uni-forms-item label="单据类型:生产领料单" style="margin-top: -20px;"></uni-forms-item> -->
                    <uni-forms-item label="内箱码:" style="margin-top: -20px;">
                        <uni-easyinput type="text" placeholder="请扫描内箱码" ref='midInput' :focus="focus"
                            v-model="innerCode" @input="innercodeInput" />
                    </uni-forms-item>
                    <uni-forms-item :label="PurchaseOrderNo" style="margin-top: -20px;"></uni-forms-item>
                    <uni-forms-item :label="matCode" style="margin-top: -20px;"></uni-forms-item>
                    <uni-forms-item :label="LotNo" style="margin-top: -20px;"></uni-forms-item>
                    <uni-forms-item :label="ProductionDate" style="margin-top: -20px;"></uni-forms-item>
                    <uni-forms-item :label="EffectiveDate" style="margin-top: -20px;"></uni-forms-item>
                    <uni-forms-item :label="orderQty" style="margin-top: -20px;"></uni-forms-item>
                    <uni-forms-item :label="remaindQty" style="margin-top: -20px;">
                        <uni-easyinput type="text" placeholder="请输入实际数量" v-model="Quantity" ref='midInput' />
                    </uni-forms-item>
                </uni-forms>
                <uni-forms-item>
                    <button @click="submit" type="primary" size="default" style="margin-top: 2%;">确认收货</button>
                </uni-forms-item>
                <uni-forms-item>
                    <button @click="submit1" type="primary" size="default" style="margin-top: 2%;">完成收货</button>
                </uni-forms-item>
            </view>
        </view>
        <view v-if="current === 1" class="headerstyle">
            <view class="itemstyle">
                <u-sticky>
                    <!-- <view style="background-color: #ffffff;">
                        <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
                    </view> -->
                </u-sticky>
                <!-- <uni-forms label-width="180">
                    <uni-forms-item label="区域">
                        <uni-data-select v-if="show" v-model="value" :localdata="range"></uni-data-select>
                    </uni-forms-item>
                    <uni-forms-item label="楼层">
                        <uni-data-select v-if="show" v-model="floor" :localdata="floorrange"></uni-data-select>
                    </uni-forms-item>
                    <uni-forms-item label="出库区域">
                        <uni-data-select v-if="show" v-model="endType" :localdata="endTypeRange"></uni-data-select>
                    </uni-forms-item>
                </uni-forms> -->
                <uni-list :border="true">
                    <uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="item.dtlId">
                        <template v-slot:body>
                            <view class="uni-list-box">
                                <!-- <button class="button" type="primary" style="position: absolute;right: 1%;" size="mini"
                                    @click="inputDialogToggle(item.matCode)"><text
                                        class="button-text">出库</text></button> -->
                                <!-- <button type="primary" style="position: absolute;right: 1%;" size="mini"
                                    @click="outbound(item.matCode)">出库</button> -->
                                <view class="uni-content">
                                    <view style="font-size: 18px;">收货单号:{{orderNo}}</view>
                                    <view style="font-size: 18px;">采购单号:{{item.purchaseOrderNo}}</view>
                                    <view style="font-size: 18px;">物料编号:{{item.materielCode}}</view>
                                    <view style="font-size: 18px;">批次号:{{item.lotNo}}</view>
                                    <view style="font-size: 18px;">收货数量:{{item.receivedQuantity}}</view>
                                    <view style="font-size: 18px;">是否质检:{{item.ifInspection==1?"是":"否"}}</view>
                                </view>
                            </view>
                        </template>
                    </uni-list-item>
                </uni-list>
            </view>
            <view>
                <!-- è¾“入框示例 -->
                <uni-popup ref="inputDialog" type="dialog">
                    <uni-popup-dialog ref="inputClose" mode="input" title="输入内容" :value="outNum" placeholder="请输入内容"
                        @confirm="outbound"></uni-popup-dialog>
                </uni-popup>
            </view>
        </view>
        <view v-if="current === 2" class="headerstyle">
            <view class="itemstyle">
                <uni-forms label-width="120">
                    <uni-forms-item label="楼层">
                        <uni-data-select v-if="show" v-model="printfloor"
                            :localdata="printfloorrange"></uni-data-select>
                    </uni-forms-item>
                    <uni-forms-item label="内箱标签">
                        <uni-easyinput type="text" :focus="tagFocus" v-model="tag" placeholder="请扫描内箱标签" ref='midInput'
                            @input="tagInput" />
                    </uni-forms-item>
                    <uni-forms-item :label="tagmatCode"></uni-forms-item>
                    <uni-forms-item :label="tagmatName"></uni-forms-item>
                    <uni-forms-item :label="tagQty"></uni-forms-item>
                    <uni-forms-item label="拆分数量">
                        <uni-easyinput type="number" v-model="number" placeholder="请输入拆分数量" ref='midInput'
                            :focus="numberFocus" />
                    </uni-forms-item>
                    <uni-forms-item>
                        <button @click="printTag" type="primary" size="default" style="margin-top: 2%;">打印标签</button>
                    </uni-forms-item>
                </uni-forms>
            </view>
        </view>
        <view v-if="current === 3" class="headerstyle">
            <view class="itemstyle">
                <uni-forms label-width="120">
                    <uni-forms-item label="托盘条码">
                        <uni-easyinput type="text" :focus="!istrue" v-model="barcode" placeholder="请扫描托盘条码"
                            ref='midInput' @input="inputChangebarcode" />
                    </uni-forms-item>
                    <uni-forms-item label="地址条码">
                        <uni-easyinput type="text" v-model="address" placeholder="请扫描地址条码" ref='midInput'
                            :focus="istrue" />
                    </uni-forms-item>
                    <uni-forms-item>
                        <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">入库</button>
                    </uni-forms-item>
                </uni-forms>
            </view>
        </view>
        <view v-if="current === 4" class="headerstyle">
            <view class="itemstyle">
                <uni-forms label-width="120">
                    <uni-forms-item>
                        <uni-easyinput type="text" @input="releaseboxInput" v-model="releasevalue" placeholder="请扫码"
                            ref='midInput' :focus="releasefocus" />
                    </uni-forms-item>
                    <uni-forms-item>
                        <button @click="releasebox" type="primary" size="default" style="margin-top: 2%;">解盘</button>
                    </uni-forms-item>
                </uni-forms>
                <uni-list>
                    <uni-list-item direction="column" v-if="value2">
                        <template v-slot:body>
                            <view class="uni-list-box">
                                <view class="uni-content">
                                    <view class="uni-title-sub uni-ellipsis-2">托盘号:{{value2}}</view>
                                </view>
                            </view>
                        </template>
                    </uni-list-item>
                    <uni-list-item direction="column" v-for="item in matTotals" :key="item.matCode">
                        <template v-slot:body>
                            <view class="uni-list-box">
                                <view class="uni-content">
                                    <view class="uni-title-sub uni-ellipsis-2">物料编码:{{item.matCode}}</view>
                                    <view class="uni-title-sub uni-ellipsis-2">数量:{{item.matQuantity}}</view>
                                </view>
                            </view>
                        </template>
                    </uni-list-item>
                    <uni-list-item direction="column" v-for="(item,index) in matInfo" :key="index">
                        <template v-slot:body>
                            <view class="uni-list-box">
                                <view class="uni-content">
                                    <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
                                        ç‰©æ–™ç¼–码:{{item.matCode}}
                                    </view>
                                    <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
                                        ç‰©æ–™åç§°ï¼š{{item.matName}}
                                    </view>
                                    <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
                                        æ•°é‡ï¼š{{item.matQty}}
                                    </view>
                                </view>
                            </view>
                        </template>
                    </uni-list-item>
                </uni-list>
            </view>
        </view>
        <u-toast ref="uToast" />
    </view>
</template>
<script>
    import {
        config
    } from '../../common/config';
    const innerAudioContext = uni.createInnerAudioContext();
    export default {
        data() {
            return {
                show: true,
                items: ['扫描', '明细'], //, '拆分', '入库', '解盘'
                current: 0,
                orderNo: "",
                orderInfo: [],
                label: "",
                innerCode: "",
                PurchaseOrderNo: "采购单号:",
                matCode: "物料编码:",
                LotNo: "物料批次:",
                orderQty: "订单数量:",
                Quantity: "",
                ProductionDate: "生产日期:",
                EffectiveDate: "有效日期:",
                matName: "物料名称:",
                currentQty: "已扫数量:",
                scanQty: "累计数量:",
                remaindQty: "实际数量:",
                tagFocus: true,
                numberFocus: false,
                focus: true,
                tag: "",
                number: "",
                tagmatCode: "物料编码:",
                tagmatName: "物料名称:",
                tagQty: "包装数量:",
                value: "",
                range: [],
                floor: "",
                floorrange: [],
                printfloor: "",
                printfloorrange: [],
                barcode: "",
                address: "",
                istrue: false,
                outNum: 0,
                itemCode: "",
                releasefocus: true,
                releasevalue: "",
                matInfo: [],
                matTotals: [],
                value2: "",
                searchValue: "",
                endType: "",
                endTypeRange: [],
                sns: "",
                receiveOrderId:0,
            }
        },
        onLoad(res) {
            this.range = config.warehouseRange;
            this.endTypeRange = config.outboundAreaRange;
            if (config.outboundArea) {
                this.endType = config.outboundArea;
            }
            if (config.warehouseArea) {
                this.value = config.warehouseArea;
            }
            this.orderNo = res.orderNo;
            this.receiveOrderId=res.receiveOrderId;
            this.label = "收货单号:" + this.orderNo;
            this.getData();
        },
        mounted() {
            this.printfloorrange = config.printFloorRange;
            this.floorrange = config.outboundFloorRange;
            if (config.outboundFloor) {
                this.floor = config.outboundFloor;
            }
            if (config.printFloor) {
                this.printfloor = config.printFloor;
            }
        },
        methods: {
            inputDialogToggle(itemCode) {
                this.itemCode = itemCode;
                this.$refs.inputDialog.open()
            },
            voiceSpeech(src) {
                innerAudioContext.src = src; // '../../static/success.mp3';
                innerAudioContext.play();
            },
            search() {
                this.getData();
            },
            releasebox() {
                if (this.releasevalue.length == 0) {
                    this.$refs.uToast.show({
                        title: "请扫码",
                        type: "error"
                    })
                    return;
                }
                var param;
                var matInfo = this.releasevalue.split('|');
                if (matInfo.length == 7) {
                    param = {
                        MainData: {
                            "innerCode": this.releasevalue
                        }
                    }
                } else {
                    param = {
                        MainData: {
                            "barcode": this.releasevalue
                        }
                    }
                }
                this.$u.post('/api/StockOperate/ReleaseAllBox', param).then(resdt => {
                    if (resdt.status) {
                        uni.$showMsg('解盘成功!')
                        this.releasevalue = "";
                        this.matInfo = [];
                        this.matTotals = [];
                        this.value2 = "";
                    } else {
                        this.$refs.uToast.show({
                            title: resdt.message,
                            type: "error"
                        })
                    }
                })
            },
            releaseboxInput() {
                this.$nextTick(() => {
                    if (this.releasevalue.length == 0) {
                        return;
                    }
                    var matInfo = this.releasevalue.split('|');
                    this.matInfo = [];
                    if (matInfo.length == 7) {
                        this.$u.post('/api/StockOperate/GetStockInfoByInnerCode', {
                            MainData: {
                                "innerCode": this.releasevalue
                            }
                        }).then(res => {
                            if (res.status) {
                                this.matInfo = res.data.stockInfo;
                                this.matTotals = res.data.stockTotal;
                                this.value2 = res.data.barcode;
                            } else {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                                })
                            }
                        })
                    } else {
                        this.$u.post('/api/StockOperate/GetStockInfoByBarcode', {
                            MainData: {
                                "barcode": this.releasevalue
                            }
                        }).then(res => {
                            if (res.status) {
                                this.matInfo = res.data.stockInfo;
                                this.matTotals = res.data.stockTotal;
                                this.value2 = res.data.barcode;
                            } else {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                                })
                            }
                        })
                    }
                })
            },
            updateFocus() {
                this.$nextTick(() => {
                    this.innerCode = '';
                    if (!this.focus) {
                        this.focus = true;
                    }
                });
            },
            submit() {
                if (this.sns == "") {
                    this.$refs.uToast.show({
                        title: "请扫描内箱标签",
                        type: 'error'
                    })
                    return;
                }
                if (this.Quantity == "") {
                    this.$refs.uToast.show({
                        title: "请输入实际数量",
                        type: 'error'
                    })
                    return;
                }
                this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this
                    .orderNo, {}).then(res => {
                    if (res.status) {
                        this.$refs.uToast.show({
                            title: "确认收货成功",
                            type: "success"
                        })
                        this.sns = "";
                    } else {
                        this.$refs.uToast.show({
                            title: res.message,
                            type: "error"
                        })
                    }
                })
            },
            submit1() {
                this.$u.post('/api/ReceiveOrder/FeedbackReceiveOrder?orderId=' + this
                    .receiveOrderId, {}).then(x => {
                    if (x.status) {
                        this.$refs.uToast.show({
                            title: "完成收货成功",
                            type: "success"
                        })
                        this.sns = "";
                    } else {
                        this.$refs.uToast.show({
                            title: x.message,
                            type: "error"
                        })
                    }
                })
            },
            inbound() {
                if (this.barcode.length == 0) {
                    this.$refs.uToast.show({
                        title: "请扫描托盘号",
                        type: "error"
                    })
                    return;
                }
                if (this.address.length == 0) {
                    this.$refs.uToast.show({
                        title: "请扫描地址条码",
                        type: "error"
                    })
                    return;
                }
                var postData = {
                    MainData: {
                        "barcode": this.barcode,
                        "startPoint": this.address
                    }
                }
                this.$u.post('/api/Inbound/RequestInbound', postData).then(res => {
                    if (res.status) {
                        uni.$showMsg(res.message);
                        this.barcode = "";
                        this.address = "";
                        this.istrue = false;
                    } else {
                        this.$refs.uToast.show({
                            title: res.message,
                            type: "error"
                        })
                    }
                }).catch(err => {
                    this.$refs.uToast.show({
                        title: err.message,
                        type: "error"
                    })
                })
            },
            inputChangebarcode() {
                this.istrue = false;
                this.$nextTick(function(x) {
                    if (this.barcode != '') {
                        this.istrue = true;
                    }
                })
            },
            onClickItem(e) {
                this.focus = false;
                this.addressFocus = false;
                if (this.current !== e.currentIndex) {
                    this.current = e.currentIndex;
                    if (this.current == 1) {
                        this.getData();
                    }
                }
            },
            getData() {
                var postData = {
                    MainData: {
                        orderNo: this.orderNo,
                        searchValue: this.searchValue
                    },
                }
                this.$u.post('/api/ReceiveOrderDetail/GetReceiveOrderInfos', postData).then((res) => {
                    if (res.status) {
                        this.orderInfo = res.data;
                        if (this.orderInfo.length > 3) {
                            this.loadVisible = true;
                        }
                    }
                })
            },
            innercodeInput() {
                this.$nextTick(() => {
                    if (this.innerCode == "") {
                        return;
                    }
                    var innerCode = this.innerCode;
                    setTimeout(() => {
                        this.innerCode = "";
                    }, 10);
                    this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + innerCode, {}).then((res) => {
                        if (res.status) {
                            this.sns = res.data.serialNumber;
                            // this.matInfos.splice(0, this.matInfos.length);
                            // this.matInfos.push(res.data);
                            this.matCode = "物料编码:" + res.data.materielCode;
                            this.LotNo = "物料批次:" + res.data.lotNo;
                            this.PurchaseOrderNo = "采购单号:" + res.data.purchaseOrderNo;
                            this.EffectiveDate = "有效日期:" + res.data.effectiveDate;
                            this.ProductionDate = "生产日期:" + res.data.productionDate;
                            this.orderQty = "订单数量:" + res.data.quantity;
                            this.Quantity = res.data.quantity;
                            if (res.message) {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                                })
                                setTimeout(() => {
                                    this.voiceSpeech('../../static/fail.mp3');
                                }, 100);
                                return;
                            }
                            setTimeout(() => {
                                this.voiceSpeech('../../static/success.mp3');
                            }, 100);
                        } else {
                            this.$refs.uToast.show({
                                title: res.message,
                                type: "error"
                            })
                            setTimeout(() => {
                                this.voiceSpeech('../../static/fail.mp3');
                            }, 100);
                        }
                    })
                })
            },
            tagInput() {
                this.$nextTick(() => {
                    var tagInfos = this.tag.split('|');
                    if (tagInfos.length == 7) {
                        this.tagmatCode = "物料编码:" + tagInfos[1];
                        this.tagQty = "物料数量:" + tagInfos[5];
                    } else {
                        this.$refs.uToast.show({
                            title: "内箱码扫描错误",
                            type: "error"
                        })
                    }
                    this.numberFocus = true;
                })
            },
            printTag() {
                if (this.tag == "") {
                    this.$refs.uToast.show({
                        title: "请扫描内箱标签",
                        type: "error"
                    })
                    return;
                }
                if (this.number <= 0) {
                    this.$refs.uToast.show({
                        title: "请输入数量",
                        type: "error"
                    })
                    return;
                }
                if (this.printfloor.length <= 0) {
                    this.$refs.uToast.show({
                        title: "请选择楼层",
                        type: "error"
                    })
                    return;
                }
                var postData = {
                    MainData: {
                        tag: this.tag,
                        number: this.number,
                        floor: this.printfloor
                    }
                }
                this.$u.post('/api/StockOperate/PrintTag', postData).then(res => {
                    if (res.status) {
                        this.$refs.uToast.show({
                            title: "打印成功",
                            type: "success"
                        })
                        this.tagmatCode = "物料编码:";
                        this.tagQty = "包装数量:";
                        this.tag = "";
                    } else {
                        this.$refs.uToast.show({
                            title: res.message,
                            type: "error"
                        })
                    }
                })
            },
            outbound(val) {
                if (this.floor == "") {
                    this.$refs.uToast.show({
                        title: "请选择楼层",
                        type: "error"
                    })
                    return;
                }
                if (this.value == "") {
                    this.$refs.uToast.show({
                        title: "请选择区域",
                        type: "error"
                    })
                    return;
                }
                if (this.endType == "") {
                    this.$refs.uToast.show({
                        title: "请选择出库区域",
                        type: "error"
                    })
                    return;
                }
                var postData = {
                    MainData: {
                        matCode: this.itemCode,
                        orderNo: this.orderNo,
                        system: this.value,
                        floor: this.floor,
                        outNum: val,
                        endType: this.endType
                    }
                }
                this.$u.post('/api/ErpOrder/ReceiveOrderOutbound', postData).then(res => {
                    if (res.status) {
                        this.$refs.uToast.show({
                            title: "成功",
                            type: "success"
                        })
                        this.getData();
                    } 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: 20px;
        margin-left: 5%;
    }
    .headerstyle {
        width: 90%;
    }
</style>