#
whycq
2023-09-19 56ef552ecc4cf835f15547c7bdbb4151ecc023aa
#
2个文件已修改
200 ■■■■■ 已修改文件
pages/out/handIn.vue 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/out/stockOut.vue 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/out/handIn.vue
@@ -80,7 +80,7 @@
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" @click="reset('warn')">重置</button>
            <button size="mini" type="primary" @click="combConfirm('warn')">组托</button>
            <button size="mini" type="primary" @click="combConfirm('warn')">入库</button>
        </view>
        <!-- 弹窗 -->
        <!-- 修改数量 -->
@@ -131,7 +131,7 @@
                <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
            </uni-popup>
        </view>
        <!-- 确认组托 -->
        <!-- 确认入库 -->
        <view>
            <uni-popup ref="combConfirm" type="dialog">
                <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
@@ -158,18 +158,7 @@
                palletizingNo: '',
                boxType: '',
                createTime: '',
                dataList: [
                    // {
                    //     matnr: '1',
                    //     maktx: '2',
                    //     boxNo: '3',
                    //     position: '4',
                    //     weight: '5',
                    //     anfme: '6',
                    //     batch: '7',
                    //     specs: '8',
                    // }
                ],
                dataList: [],
                count: 0,
                rowNum: '',
                matnr: '',
@@ -187,6 +176,7 @@
                matFocus: false,
                matData: '',
                removeNum: 0,
                checkFlag: true,
            }
        },
        onLoad() {
@@ -413,37 +403,27 @@
            combConfirm(type) {
                this.msgType = type
                this.title = '警告'
                this.content = '是否现在组托!'
                this.content = '是否现在入库!'
                this.$refs.combConfirm.open()
            },
            combClose() {
                this.$refs.combConfirm.close()
            },
            comb() {
                uni.vibrateShort();
                let that = this;
                if (that.barcode === '') {
                    this.messageText = "请扫描托盘条码"
                    this.messageToggle('error')
                    return;
                that.combCheck(that.palletizingNo,that.boxType,that.createTime);
                if (that.checkFlag) {
                    return
                }
                if (that.dataList.length === 0) {
                    this.messageText = "请添加商品列表"
                    this.messageToggle('error')
                    return;
                }
                for (var i = 0; i < that.dataList.length; i++) {
                    if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
                        this.messageText = that.dataList[i].matnr + '组托数量不能为0'
                        this.messageToggle('error')
                        return;
                    }
                }
                console.log(that.dataList);
                uni.request({
                    url: that.baseUrl + '/mobile/comb/auth',
                    url: that.baseUrl + '/mobile/truss/comd/auth',
                    data: JSON.stringify({
                        barcode: that.barcode,
                        combMats: that.dataList
                        palletizingNo: that.palletizingNo,
                        boxType: that.boxType,
                        createTime: that.createTime,
                        matLists: that.dataList
                    }),
                    method: 'POST',
                    header: {
@@ -453,7 +433,7 @@
                        var res = result.data
                        if (res.code === 200) {
                            that.resst();
                            that.messageText = "组托成功"
                            that.messageText = "入库成功"
                            that.messageToggle('success')
                            const innerAudioContext = uni.createInnerAudioContext();
                            innerAudioContext.src = '/static/music/pakinOk.mp3';
@@ -473,6 +453,56 @@
                    }
                });
            },
            // 提交校验
            combCheck(palletizingNo,boxType,createTime) {
                if (this.barcode === '') {
                    this.messageText = "请添加托盘码"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                if (palletizingNo === '') {
                    this.messageText = "请添加码垛位"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                if (boxType === '') {
                    this.messageText = "请添加木箱类型"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                if (createTime === '') {
                    this.messageText = "请添加创建时间"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                if (this.dataList.length === 0) {
                    this.messageText = "请添加入库商品"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                for (let i = 0; i < this.dataList.length; i++) {
                    if (this.dataList[i].anfme == 0 || this.dataList[i].anfme == '') {
                        this.messageText = this.dataList[i].matnr + '退库数量不能为0'
                        this.messageToggle('error')
                        this.checkFlag = true;
                        return
                    }
                }
                for (let i = 0; i < this.dataList.length; i++) {
                    if (this.dataList[i].anfme == 0 || this.dataList[i].anfme == '') {
                        this.messageText = this.dataList[i].matnr + '退库数量不能为0'
                        this.messageToggle('error')
                        this.checkFlag = true;
                        return
                    }
                }
                this.checkFlag = false;
            },
            reset(type) {
                this.msgType = type
                this.title = '警告'
pages/out/stockOut.vue
@@ -2,10 +2,6 @@
    <view>
        <view class="code">
            <view class="item">
                <view class="code-decs">托盘码:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus">
            </view>
            <view class="item">
                <view class="code-decs">码垛位:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="palletizingNo" :focus="palletizingNoFocus">
            </view>
@@ -80,7 +76,7 @@
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" @click="reset('warn')">重置</button>
            <button size="mini" type="primary" @click="combConfirm('warn')">组托</button>
            <button size="mini" type="primary" @click="combConfirm('warn')">退库</button>
        </view>
        <!-- 弹窗 -->
        <!-- 修改数量 -->
@@ -131,7 +127,7 @@
                <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
            </uni-popup>
        </view>
        <!-- 确认组托 -->
        <!-- 确认退库 -->
        <view>
            <uni-popup ref="combConfirm" type="dialog">
                <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
@@ -158,18 +154,7 @@
                palletizingNo: '',
                boxType: '',
                createTime: '',
                dataList: [
                    // {
                    //     matnr: '1',
                    //     maktx: '2',
                    //     boxNo: '3',
                    //     position: '4',
                    //     weight: '5',
                    //     anfme: '6',
                    //     batch: '7',
                    //     specs: '8',
                    // }
                ],
                dataList: [],
                count: 0,
                rowNum: '',
                matnr: '',
@@ -187,10 +172,8 @@
                matFocus: false,
                matData: '',
                removeNum: 0,
                checkFlag: true,
            }
        },
        onLoad() {
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
@@ -413,34 +396,20 @@
            combConfirm(type) {
                this.msgType = type
                this.title = '警告'
                this.content = '是否现在组托!'
                this.content = '是否现在退库!'
                this.$refs.combConfirm.open()
            },
            combClose() {
                this.$refs.combConfirm.close()
            },
            comb() {
                uni.vibrateShort();
                let that = this;
                if (that.barcode === '') {
                    this.messageText = "请扫描托盘条码"
                    this.messageToggle('error')
                    return;
                }
                if (that.dataList.length === 0) {
                    this.messageText = "请添加商品列表"
                    this.messageToggle('error')
                    return;
                }
                for (var i = 0; i < that.dataList.length; i++) {
                    if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
                        this.messageText = that.dataList[i].matnr + '组托数量不能为0'
                        this.messageToggle('error')
                        return;
                    }
                that.combCheck(that.palletizingNo,that.boxType,that.createTime);
                if (that.checkFlag) {
                    return
                }
                uni.request({
                    url: that.baseUrl + '/mobile/comb/auth',
                    url: that.baseUrl + '/mobile/truss/auth',
                    data: JSON.stringify({
                        barcode: that.barcode,
                        combMats: that.dataList
@@ -453,7 +422,7 @@
                        var res = result.data
                        if (res.code === 200) {
                            that.resst();
                            that.messageText = "组托成功"
                            that.messageText = "退库成功"
                            that.messageToggle('success')
                            const innerAudioContext = uni.createInnerAudioContext();
                            innerAudioContext.src = '/static/music/pakinOk.mp3';
@@ -472,6 +441,50 @@
                        }
                    }
                });
            },
            // 提交校验
            combCheck(palletizingNo,boxType,createTime) {
                if (palletizingNo === '') {
                    this.messageText = "请添加码垛位"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                if (boxType === '') {
                    this.messageText = "请添加木箱类型"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                if (createTime === '') {
                    this.messageText = "请添加创建时间"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                if (this.dataList.length === 0) {
                    this.messageText = "请添加退库商品"
                    this.messageToggle('error')
                    this.checkFlag = true;
                    return
                }
                for (let i = 0; i < this.dataList.length; i++) {
                    if (this.dataList[i].anfme == 0 || this.dataList[i].anfme == '') {
                        this.messageText = this.dataList[i].matnr + '退库数量不能为0'
                        this.messageToggle('error')
                        this.checkFlag = true;
                        return
                    }
                }
                for (let i = 0; i < this.dataList.length; i++) {
                    if (this.dataList[i].anfme == 0 || this.dataList[i].anfme == '') {
                        this.messageText = this.dataList[i].matnr + '退库数量不能为0'
                        this.messageToggle('error')
                        this.checkFlag = true;
                        return
                    }
                }
                this.checkFlag = false;
            },
            reset(type) {
                this.msgType = type
@@ -501,6 +514,9 @@
<style>
    @import url('../../static/css/wms.css/wms.css');
    .list:first-child {
        margin-top: 320rpx;
    }
    .empty-list {
        height: 50%;
        width: 100%;
@@ -553,7 +569,7 @@
        width: 100%;
        background-color: white;
        position: fixed;
        margin-top: 280rpx;
        margin-top: 210rpx;
        z-index: 9;
        /* border-top: 1px solid #DCDFE6; */
        text-align: center;