#
whycq
2023-06-26 95cbe9595aa314006519b06640710023baa6eeac
#
3个文件已修改
117 ■■■■ 已修改文件
pages.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/orderPutOn2.vue 111 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -33,7 +33,7 @@
        {
            "path": "pages/order/orderPakin",
            "style": {
                "navigationBarTitleText": "订单入库"
                "navigationBarTitleText": "订单组托"
            }
        },
        {
@@ -93,7 +93,7 @@
        {
            "path": "pages/order/orderPutOn2",
            "style": {
                "navigationBarTitleText": "订单上架2"
                "navigationBarTitleText": "订单组托2"
            }
        },
        {
pages/home/home.vue
@@ -46,7 +46,7 @@
                        url: '/pakin/putOn'
                    },
                    {
                        title: '订单上架2',
                        title: '订单组托2',
                        name: 'putOn',
                        color: 'cyan',
                        cuIcon: 'pullup',
pages/order/orderPutOn2.vue
@@ -2,26 +2,26 @@
    <view>
        <view class="code">
            <view class="item">
                <view class="code-decs">库位号:</view>
                <view class="code-decs">托盘码:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
                    @input="barcodeInput()">
            </view>
            <view class="item">
                <view class="code-decs">物料号:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()">
                <view class="item-right">
                    <button></button>
                    <text style="text-align: right;color: #409EFF;" @click="selectMat()">搜索</text>
                    <uni-icons type="right" color="#c1c1c1"></uni-icons>
                </view>
                <view class="code-decs">订单号:</view>
                <uni-combox :candidates="orderNoList" placeholder="请选择订单" v-model="orderNo" @input="getOrderDet"></uni-combox>
            </view>
        </view>
        <view class="mat-list-title">
            商品列表
            <view style="width: 200rpx;"></view>
            <view style="-webkit-flex: 1;flex: 1;">商品列表</view>
            <view style="width: 200rpx;"><button size="mini" type="primary" @click="getChecked">提取</button></view>
        </view>
        <scroll-view>
            <view class="list" v-for="(item,i) in dataList" :key="i">
                <view class="list-left">
            <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange">
                <view class="aside">
                    <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/>
                </view>
                <view class="list-left" style="margin: 0;">
                    <view class="list-left-item">
                        <view class="desc">No:</view>
                        <view class="left-item">{{i + 1}}</view>
@@ -67,7 +67,7 @@
                    <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
                    <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
                </view>
            </view>
            </checkbox-group>
        </scroll-view>
        <!-- 底部操作按钮 -->
        <view class="buttom">
@@ -99,7 +99,8 @@
                    <view class="popup-item">
                        <view class="popup-item-left">数量:</view>
                        <view class="popup-item-right" style="border: none;justify-content: center;">
                            <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" />
                            <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474"
                                @change="changeValue" />
                        </view>
                    </view>
                    <view class="btn">
@@ -156,6 +157,7 @@
                barcode: '',
                barcodeFocus: '',
                dataList: [],
                checkedDataList: [],
                count: 0,
                rowNum: '',
                matnr: '',
@@ -170,14 +172,64 @@
                barcodeFocus: true,
                matFocus: false,
                matData: '',
                removeNum: 0
                removeNum: 0,
                orderNoList: [],
                orderNo: '',
            }
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.getOrderNoList()
        },
        methods: {
            set(e) {
                var ck = this.dataList[e].checked
                this.dataList[e].checked = ck ? false:true
            },
            getChecked() {
                var checkedList = []
                for(var i = 0; i < this.dataList.length; i++) {
                    var t = !this.dataList[i].checked
                    if (this.dataList[i].checked) {
                        checkedList.push(this.dataList[i])
                    }
                }
                this.dataList = checkedList
            },
            getOrderDet() {
                let that = this
                uni.request({
                    url: that.baseUrl + '/order/list/orderNo',
                    data: {orderNo: that.orderNo} ,
                    method: 'GET',
                    success(res) {
                        res = res.data;
                        if (res.code === 200) {
                            that.dataList = res.data
                            for (var i = 0; i < that.dataList.length; i++) {
                                that.$set(that.dataList[i],'checked',false)
                            }
                        }
                    }
                })
            },
            checkboxChange: function (e) {
            },
            getOrderNoList() {
                let that = this
                uni.request({
                    url: this.baseUrl + '/order/list/all',
                    method: 'POST',
                    success(res) {
                        res = res.data
                        for (var i = 0; i < res.data.length; i++) {
                            that.orderNoList.push(res.data[i].order_no)
                        }
                    }
                })
            },
            messageToggle(type) {
                this.msgType1 = type
                this.$refs.message.open()
@@ -269,7 +321,8 @@
            checkMat(mat) {
                mat['orderNo'] = this.order
                var len = this.dataList.length
                var add = true ,sameItem = false
                var add = true,
                    sameItem = false
                for (var i = 0; i < len; i++) {
                    if (mat.orderNo != this.dataList[i].orderNo) {
                        add = true
@@ -331,9 +384,9 @@
                    }
                }
                uni.request({
                    url: that.baseUrl + '/mobile/manDetl/in',
                    url: that.baseUrl + '/mobile/comb/auth',
                    data: JSON.stringify({
                        locNo: that.barcode,
                        barcode: that.barcode,
                        combMats: that.dataList
                    }),
                    method: 'POST',
@@ -370,7 +423,7 @@
            // 确认重置
            resetConfirm() {
                this.dataList = []
                this.order = ''
                this.orderNo = ''
                this.barcode = ''
                this.messageText = "重置完成"
                this.messageToggle('success')
@@ -440,20 +493,32 @@
<style>
    @import url('../../static/css/wms.css/wms.css');
    .list {
        display: flex;
        min-height: 80rpx;
        background-color: #FFF;
        margin: auto 20rpx;
        margin: 20rpx 20rpx;
        border-radius: 20rpx;
        box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
    }
    .list:first-child {
        margin-top: 410rpx;
        margin-top: 360rpx;
    }
    .list:last-child {
        margin-bottom: 120rpx;
    }
    .aside {
        width: 100rpx;
        /* background-color: #303133; */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .code {
        width: 100%;
        position: fixed;
@@ -461,6 +526,7 @@
        background-color: #FFF;
        z-index: 10;
    }
    .item {
        display: flex;
        align-items: center;
@@ -491,8 +557,9 @@
    }
    
    .mat-list-title {
        display: flex;
        align-items: center;
        height: 80rpx;
        line-height: 80rpx;
        width: 100%;
        background-color: white;
        position: fixed;
@@ -501,5 +568,7 @@
        /* border-top: 1px solid #DCDFE6; */
        text-align: center;
        box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
    }
</style>