#
whycq
2022-06-27 b8544ee0bc7d93762d6ffe2d1765129ecaef46f9
#
2个文件已修改
402 ■■■■ 已修改文件
pages/basics/orderOut.vue 175 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/basics/stoOut.vue 227 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/basics/orderOut.vue
@@ -39,9 +39,9 @@
        
        <checkbox-group @change="checkbox">
            <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
                <label class="left-check-box">
                <!-- <label class="left-check-box">
                    <checkbox :value="item.id+''" :checked="item.checked" style="display: block;" />
                </label>
                </label> -->
                <view class="data-list-left">
                    <view class="matnr"><text style="width: 700rpx;">编码:{{item.matnr}}</text></view>
                    <view><text style="width: 700rpx;">品名:{{item.maktx}}</text></view>
@@ -51,7 +51,7 @@
                    </view>
                </view>
                <view class="data-list-right">
                    <label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label>
                    <!-- <label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label> -->
                    <!-- list中删除键 -->
                    <!-- <label><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove(item,index)"></uni-icons></label> -->
                </view>
@@ -65,7 +65,7 @@
                    <uni-th align="center" width="80">产品代号</uni-th>
                    <uni-th align="center" width="70">产品名称</uni-th>
                </uni-tr>
                <uni-tr v-for="(item, index) in matData" :key="index">
                <uni-tr v-for="(item, index) in matList" :key="index">
                    <uni-td align="center">{{item.qty}}</uni-td>
                    <uni-td align="center">{{item.matNo}}</uni-td>
                    <uni-td align="center">{{item.size}}</uni-td>
@@ -99,7 +99,7 @@
    export default {
        data() {
            return {
                billNo: null,
                billNo: 'CK6266262626A',
                matList: [],
                sites: [],
                siteId: ''
@@ -118,37 +118,35 @@
                this.billNo = null
            },
            searchBillNo() {
                console.log(1)
                let that = this;
                uni.request({
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/orderDetl/list/auth",
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mobile/order/out/pakout/auth",
                    header: {
                        'content-type':"application/x-www-form-urlencoded",
                        // 'content-type':"application/x-www-form-urlencoded",
                        'token':uni.getStorageSync('token')
                        },
                    data: {
                        curr:1,
                        limit:10,
                        // typeCode:1,
                        order_no: that.billNo
                        staNo:102,
                        orderNo:20220622,
                    },
                    method:"POST",
                    success(result) {
                        console.log(that.billNo)
                        console.log(result)
                        let res = result.data
                        if (res.code === 200 ) {
                            that.matData = res.data.records
                            that.staNoSelect()
                        } else if (res.code == 403) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
                            setTimeout(() => {
                                uni.reLaunch({
                                    url: '../login/login'
                                });
                            }, 1000);
                        } else {
                            uni.showToast({title: res.msg, icon: "none",position: 'top'})
                        }
                        // let res = result.data
                        // if (res.code === 200 ) {
                        //     that.matList = res.data.records
                        //     that.staNoSelect()
                        // } else if (res.code == 403) {
                        //     uni.showToast({title: res.msg, icon: "none", position: 'top'})
                        //     setTimeout(() => {
                        //         uni.reLaunch({
                        //             url: '../login/login'
                        //         });
                        //     }, 1000);
                        // } else {
                        //     uni.showToast({title: res.msg, icon: "none",position: 'top'})
                        // }
                    },
                })
            },
@@ -179,8 +177,8 @@
            },
            outbound() {
                let that = this
                if (that.matData.length === 0) {
                    uni.showToast({title: "请先添加产品", icon: "none",position: 'top'})
                if (that.matList.length === 0) {
                    uni.showToast({title: "请选择出库口", icon: "none",position: 'top'})
                } else {
                    if (that.siteId == '') {
                        uni.showToast({title: "请选择出库口", icon: "none",position: 'top'})
@@ -188,22 +186,24 @@
                    }
                };
                var staNo = that.siteId.substring(0,3)
                var locDetls = [];
                that.matData.forEach(function(elem) {
                that.matList.forEach(function(elem) {
                    locDetls.push({billNo:elem.billNo,seqNo:elem.seqNo, matNo: elem.matNo, count: elem.qty,});
                });
                let param = {
                    outSite: 173,
                    outSite: staNo,
                    locDetls: locDetls
                }
                console.log(param)
                return
                uni.request({
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mat/out/start",
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/plate/out/start",
                    header: {
                        'token':uni.getStorageSync('token')},
                    data: JSON.stringify(param),
                    method:"POST",
                    success(result) {
                        console.log(result)
                        if (result.data.code === 200) {
                            uni.showToast({title: result.data.msg, icon: "none",position: 'top'})
                            that.reset()
@@ -213,9 +213,9 @@
                    }
                })
            },
            reset() {
            resst() {
                this.billNo = '';
                this.matData = [];
                this.matList = [];
                this.siteId = '';
            }
        }
@@ -236,4 +236,111 @@
        width: 200px;
        padding: 12px;
    }
    .bg-false {
        background-color: #FFFFFF;
    }
    .bg-true {
        background-color: #ebebeb;
    }
    .data-list {
        border-bottom: 1px solid #d8d8d8;
        height: 180rpx;
        width: 94%;
        margin: 15rpx auto 15rpx auto;
        border-radius: 20rpx;
    }
    .data-list:first-child {
        margin-top: 20rpx;
    }
    .data-list:last-child {
        margin-bottom: 160rpx;
    }
    /* .data-list-left {
        display: inline-block;
        float: left;
        text-align: center;
        width: 100rpx;
        height: 180rpx;
        line-height: 180rpx;
    } */
    .left-check-box {
        display: inline-block;
        /* background-color: #1E9FFF; */
        float: left;
        height: 100%;
        width: 100rpx;
        text-align: center;
        line-height: 170rpx;
    }
    .data-list-left {
        /* background-color: #ffff7f; */
        display: inline-block;
        float: left;
        height: 180rpx;
        width: 500rpx;
        color: #676767;
        text-indent: 20rpx;
    }
    .matnr {
        padding-top: 10rpx;
    }
    .data-list-right {
        /* background-color: #55ffff; */
        display: inline-block;
        float: right;
        width: 100rpx;
        height: 180rpx;
        line-height: 180rpx;
    }
    .data-list-right label {
        display: inline-block;
        float: left;
        width: 100rpx;
        height: 180rpx;
    }
    .revise-box {
        width: 500rpx;
        height: 500rpx;
    }
    .revise-box-top {
        width: 100%;
        height: 100rpx;
        background-color: #fff;
        padding: 10rpx;
    }
    .changeBox {
        width: 100%;
        height: 100rpx;
        line-height: 120rpx;
        text-align: center;
        background-color: #FFF;
        margin-top: 20rpx;
        border-bottom: 1px solid #e3e3e3;
    }
    .text-box {
        width: 100%;
        height: 100rpx;
        line-height: 120rpx;
        text-align: center;
        /* padding-left: 120rpx; */
        background-color: #FFF;
        margin-top: 20rpx;
        border-bottom: 1px solid #e3e3e3;
    }
    .changeBox .num-box {
        display:  inline-block;
        float: left;
    }
    .changeBox button {
        float: left;
    }
    .revise-box-buttom {
        position: absolute;
        width: 100%;
        height: 100rpx;
        line-height: 100rpx;
        background-color: #FFFFFF;
        bottom: 0;
        text-align: center;
    }
</style>
pages/basics/stoOut.vue
@@ -1,20 +1,63 @@
<template>
    <view>
        <form>
            <view class="cu-form-group margin-top">
                <view class="title">库位号:</view>
                <input v-model="billNo" placeholder="扫码 / 输入" name="input" @input="searchBillNo">
        <view class="square-2">
            <view class="square-title">
                <view class="title-sign"><view class="sign"></view></view>
                <view class="title-text"><text>库位号码</text></view>
            </view>
            <view class="cu-form-group margin-top">
            <view class="square-content">
                <view class="content-input">
                    <input type="text" v-model="locNo" placeholder="扫码 / 输入" @input="searchLocNo">
                    <uni-icons type="closeempty" size="20" color="#dadada" @click="removeLocNo"></uni-icons>
                </view>
            </view>
        </view>
        <view class="square-2">
            <view class="square-title">
                <view class="title-sign"><view class="sign"></view></view>
                <view class="title-text"><text>出库口</text></view>
                
                <view class="title" >出库口:</view>
                <view class="combox" >
                    <uni-combox :candidates="sites" placeholder="请选择出库站点" v-model="siteId" @click="staNoSelect()"></uni-combox>
            </view>
                <view class="content-combox">
                    <uni-combox  emptyTips="暂无数据"
                        :candidates="sites" v-model="siteId"  @click="staNoSelect()" placeholder="请选择出库站点">
                    </uni-combox>
                </view>
            </view>
        </form>
        
        <view style="margin-top: 10px;">
        <view class="square-1">
            <view class="square-title">
                <view class="title-sign"><view class="sign"></view></view>
                <view class="title-text"><text>商品列表</text></view>
            </view>
        </view>
        <view class="square-none" v-show="matList.length === 0">
            <view class="v-show">暂无更多数据...</view>
        </view>
        <checkbox-group @change="checkbox">
            <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
                <!-- <label class="left-check-box">
                    <checkbox :value="item.id+''" :checked="item.checked" style="display: block;" />
                </label> -->
                <view class="data-list-left">
                    <view class="matnr"><text style="width: 700rpx;">编码:{{item.matnr}}</text></view>
                    <view><text style="width: 700rpx;">品名:{{item.maktx}}</text></view>
                    <view><text style="width: 700rpx;">批号:{{item.batch}}</text></view>
                    <view>
                        <text style="width: 700rpx;">数量:{{item.anfme}}</text>
                    </view>
                </view>
                <view class="data-list-right">
                    <!-- <label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label> -->
                    <!-- list中删除键 -->
                    <!-- <label><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove(item,index)"></uni-icons></label> -->
                </view>
            </view>
        </checkbox-group>
      <!--  <view style="margin-top: 10px;">
            <uni-table ref="table" border stripe emptyText="暂无更多数据">
                <uni-tr>
                    <uni-th align="center" width="50">出库数量</uni-th>
@@ -22,14 +65,14 @@
                    <uni-th align="center" width="80">产品代号</uni-th>
                    <uni-th align="center" width="70">产品名称</uni-th>
                </uni-tr>
                <uni-tr v-for="(item, index) in matData" :key="index">
                <uni-tr v-for="(item, index) in matList" :key="index">
                    <uni-td align="center">{{item.qty}}</uni-td>
                    <uni-td align="center">{{item.matNo}}</uni-td>
                    <uni-td align="center">{{item.size}}</uni-td>
                    <uni-td align="center">{{item.matName}}</uni-td>
                </uni-tr>
            </uni-table>
        </view>
        </view> -->
        
        <!-- 底部按钮 -->
        <view class="footer flex justify-around">
@@ -49,13 +92,6 @@
            </label>
        </view>
        
       <!-- <view class="cu-bar foot input" style="height: 130rpx;">
            <view class="flex solid-bottom padding justify-start">
                <button class="cu-btn bg-yellow main-btn margin-xs" style="width: 430rpx;" @click="outbound()">启动出库</button>
                <button class="cu-btn bg-grey main-btn margin-xs" @click="reset">重 置</button>
            </view>
        </view> -->
    </view>
</template>
 
@@ -63,8 +99,8 @@
    export default {
        data() {
            return {
                billNo: null,
                matData: [],
                locNo: null,
                matList: [],
                sites: [],
                siteId: ''
            }
@@ -77,21 +113,30 @@
            this.staNoSelect();
        },
        methods: {
            searchBillNo() {
            // 清空单号搜索框
            removeLocNo() {
                this.locNo = null
            },
            searchLocNo() {
                let that = this;
                uni.request({
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/waitMatout/list/auth",
                    header: {'token':uni.getStorageSync('token')},
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/locDetl/list/auth",
                    header: {
                        'content-type':"application/x-www-form-urlencoded",
                        'token':uni.getStorageSync('token')
                        },
                    data: {
                        curr:1,
                        limit:10,
                        typeCode:1,
                        bill_no:that.billNo
                        // typeCode:1,
                        loc_no: that.locNo
                    },
                    method:"POST",
                    success(result) {
                        console.log(result)
                        let res = result.data
                        if (res.code === 200 ) {
                            that.matData = res.data.records
                            that.matList = res.data.records
                            that.staNoSelect()
                        } else if (res.code == 403) {
                            uni.showToast({title: res.msg, icon: "none", position: 'top'})
@@ -133,8 +178,8 @@
            },
            outbound() {
                let that = this
                if (that.matData.length === 0) {
                    uni.showToast({title: "请先添加产品", icon: "none",position: 'top'})
                if (that.matList.length === 0) {
                    uni.showToast({title: "请选择出库口", icon: "none",position: 'top'})
                } else {
                    if (that.siteId == '') {
                        uni.showToast({title: "请选择出库口", icon: "none",position: 'top'})
@@ -142,34 +187,35 @@
                    }
                };
                var staNo = that.siteId.substring(0,3)
                var locDetls = [];
                that.matData.forEach(function(elem) {
                    locDetls.push({billNo:elem.billNo,seqNo:elem.seqNo, matNo: elem.matNo, count: elem.qty,});
                that.matList.forEach(function(elem) {
                    console.log(elem)
                    locDetls.push({locNo:elem.locNo,matnr:elem.matnr, batch: elem.batch, count: elem.anfme,});
                });
                let param = {
                    outSite: 173,
                    outSite: staNo,
                    locDetls: locDetls
                }
                uni.request({
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mat/out/start",
                    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/plate/out/start",
                    header: {
                        'token':uni.getStorageSync('token')},
                    data: JSON.stringify(param),
                    method:"POST",
                    success(result) {
                        console.log(result)
                        if (result.data.code === 200) {
                            uni.showToast({title: result.data.msg, icon: "none",position: 'top'})
                            that.reset()
                            that.resst()
                        } else {
                            uni.showToast({title: result.data.msg, icon: "none",position: 'top'})
                        }
                    }
                })
            },
            reset() {
            resst() {
                this.billNo = '';
                this.matData = [];
                this.matList = [];
                this.siteId = '';
            }
        }
@@ -190,4 +236,111 @@
        width: 200px;
        padding: 12px;
    }
    .bg-false {
        background-color: #FFFFFF;
    }
    .bg-true {
        background-color: #ebebeb;
    }
    .data-list {
        border-bottom: 1px solid #d8d8d8;
        height: 180rpx;
        width: 94%;
        margin: 15rpx auto 15rpx auto;
        border-radius: 20rpx;
    }
    .data-list:first-child {
        margin-top: 20rpx;
    }
    .data-list:last-child {
        margin-bottom: 160rpx;
    }
    /* .data-list-left {
        display: inline-block;
        float: left;
        text-align: center;
        width: 100rpx;
        height: 180rpx;
        line-height: 180rpx;
    } */
    .left-check-box {
        display: inline-block;
        /* background-color: #1E9FFF; */
        float: left;
        height: 100%;
        width: 100rpx;
        text-align: center;
        line-height: 170rpx;
    }
    .data-list-left {
        /* background-color: #ffff7f; */
        display: inline-block;
        float: left;
        height: 180rpx;
        width: 500rpx;
        color: #676767;
        text-indent: 20rpx;
    }
    .matnr {
        padding-top: 10rpx;
    }
    .data-list-right {
        /* background-color: #55ffff; */
        display: inline-block;
        float: right;
        width: 100rpx;
        height: 180rpx;
        line-height: 180rpx;
    }
    .data-list-right label {
        display: inline-block;
        float: left;
        width: 100rpx;
        height: 180rpx;
    }
    .revise-box {
        width: 500rpx;
        height: 500rpx;
    }
    .revise-box-top {
        width: 100%;
        height: 100rpx;
        background-color: #fff;
        padding: 10rpx;
    }
    .changeBox {
        width: 100%;
        height: 100rpx;
        line-height: 120rpx;
        text-align: center;
        background-color: #FFF;
        margin-top: 20rpx;
        border-bottom: 1px solid #e3e3e3;
    }
    .text-box {
        width: 100%;
        height: 100rpx;
        line-height: 120rpx;
        text-align: center;
        /* padding-left: 120rpx; */
        background-color: #FFF;
        margin-top: 20rpx;
        border-bottom: 1px solid #e3e3e3;
    }
    .changeBox .num-box {
        display:  inline-block;
        float: left;
    }
    .changeBox button {
        float: left;
    }
    .revise-box-buttom {
        position: absolute;
        width: 100%;
        height: 100rpx;
        line-height: 100rpx;
        background-color: #FFFFFF;
        bottom: 0;
        text-align: center;
    }
</style>