#
whycq
2022-08-13 174d44ef6c2ca7c9b30e1421ef9a8431a439b8c3
#
2个文件已修改
1个文件已添加
368 ■■■■ 已修改文件
pages.json 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/basics/test.vue 271 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.vue 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -108,6 +108,15 @@
                "enablePullDownRefresh": false
                
            }
        },
        {
            "path" : "pages/basics/test",
            "style" :
            {
                "navigationBarTitleText": "测试",
                "enablePullDownRefresh": false
            }
        }
        
        
pages/basics/test.vue
New file
@@ -0,0 +1,271 @@
<template>
    <view >
        <scroll-view scroll-y catch:touchmove="touchmove">
            <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="square-content">
                    <view class="content-input">
                        <input readonly="value" v-model="locNo" type="text" placeholder="扫码 / 输入" >
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></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>
                <view class="square-content">
                    <view class="content-input">
                        <input v-model="userId" type="text" placeholder="扫码 / 输入">
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="foucss()"></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>PACK条码</text></view>
                </view>
                <view class="square-content">
                    <view class="content-input">
                        <input v-model="barcode" type="text" placeholder="扫码 / 输入">
                        <uni-icons type="closeempty" size="20" color="#dadada" @click="foucss()"></uni-icons>
                    </view>
                </view>
            </view>
        </scroll-view>
        <view class="footer flex justify-around">
            <view>
                <button class="cu-btn lg" @click="resst()">重置</button>
            </view>
            <view>
                <button class="cu-btn lg pakin-btn bg-blue" @click="confirm()">确认</button>
            </view>
        </view>
        <view>
            <!-- 提示信息弹窗 -->
            <uni-popup ref="message" type="message">
                <uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
            </uni-popup>
        </view>
    </view>
</template>
<script>
    import permision from "@/common/permission.js"
    export default {
        data() {
            return {
                commonUrl:null,
                locNo: '',
                userId: '',
                barcode: '',
                barcodeFocus:true,
                focus:false,
                type: 'center',
                msgType: 'success',
                messageText: '这是一条成功提示',
            }
        },
        mounted(){
            const UIP = uni.getStorageSync('UIP');
            this.baseIP = UIP;
            const UPORT = uni.getStorageSync('UPORT');
            this.basePORT = UPORT
            const PROJ = uni.getStorageSync('UPROJ');
            this.baseUrl = PROJ
            this.getUrl()
        },
        onLoad() {
            // #ifdef APP
            setInterval(()=>{
                uni.hideKeyboard()
            },20)
            // #endif
        },
        methods: {
            // 获取url
            getUrl() {
                this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
            },
            confirm() {
                let that = this
                var testMast = {locNo:that.locNo,
                        userId:that.userId,
                        barcode:that.barcode}
                uni.request({
                    url: that.commonUrl + '/test/startUp/auth',
                    data: {
                        testMast:testMast,
                    },
                    header: {
                        'token':uni.getStorageSync('token')
                    },
                    method: 'GET',
                    success(result) {
                        console.log(result)
                    }
                })
            },
            change(e) {
                console.log('当前模式:' + e.type + ',状态:' + e.show);
            },
        }
    }
</script>
<style>
    /* @import "../../colorui/main.css";
    @import "../../colorui/icon.css"; */
    /*
     */
    .pop-btn {
        position: absolute;
        width: 100%;
        bottom: 20rpx;
    }
    .pak-seach-box {
        background-color: #FFFFFF;
        margin: 15rpx 15rpx 0rpx 15rpx;
        width: 96%;
        height: 150rpx;
        border-radius: 20rpx;
    }
    .box-top{
        display: block;
        height: 60rpx;
        width: 720rpx;
    }
    .color-block-blue {
        background-color: #1E9FFF;
        display: inline-block;
        float: left;
        margin: 15rpx 15rpx 0 15rpx;
        width: 12rpx;
        height: 40rpx;
        border: 5rpx solid #1E9FFF;
        border-radius: 20rpx;
    }
    .title {
        display: inline-block;
        float: left;
        font-size: 34rpx;
        font-weight: 700;
        height: 50rpx;
        line-height: 50rpx;
        margin-top: 10rpx;
    }
    .box-buttom {
        display: inline-block;
        background-color: #ededed;
        width: 65%;
        height: 60rpx;
        border-radius: 20rpx;
        margin: 15rpx 15rpx 0rpx 15rpx;
    }
    .box-buttom input {
        width: 75%;
        float: left;
        margin: 8rpx 10rpx 0rpx 25rpx;
    }
    .box-buttom .search-icon{
        width: 60rpx;
        height: 60rpx;
        float: right;
        margin-top: 5rpx;
        margin-right: 10rpx;
    }
    /* .pak-seach-box input {
        background-color: #ededed;
        border: 1rpx solid #d8d8d8;
        display: inline-block;
        border-radius: 20rpx;
        float: left;
        width: 70%;
        height: 60rpx;
        line-height: 60rpx;
        margin: 15rpx 15rpx 0rpx 15rpx;
        padding-left: 20rpx;
    } */
    .pak-seach-box button {
        background-color: #1E9FFF;
        color: #ffffff;
        display: inline-block;
        float: right;
        width: 180rpx;
        height: 60rpx;
        margin: 15rpx 15rpx 0rpx 15rpx;
        line-height: 60rpx;
    }
    .pakin-btn {
        background-color: #1E9FFF;
    }
    .pak-data-box {
        background-color: #F1F1F1;
        margin: 15rpx 15rpx 0rpx 15rpx;
        width: 96%;
        height: 70rpx;
        border-radius: 20rpx;
    }
    .pak-data-box .box-top {
        background-color: #FFFFFF;
        height: 70rpx;
        border-radius: 20rpx 20rpx 20rpx 20rpx;
    }
    .bg-false {
        background-color: #FFFFFF;
    }
    .bg-true {
        background-color: #ebebeb;
    }
    .data-list {
        border-bottom: 1px solid #d8d8d8;
        height: 130rpx;
        margin: 15rpx;
        border-radius: 20rpx;
    }
    .data-list:first-child {
        margin-top: 20rpx;
    }
    .data-list:last-child {
        margin-bottom: 200rpx;
    }
    /* .data-list-left {
        display: inline-block;
        float: left;
        text-align: center;
        width: 100rpx;
        height: 180rpx;
        line-height: 180rpx;
    } */
    .data-list-left {
        display: inline-block;
        float: left;
        margin-left: 6%;
        height: 130rpx;
        /* line-height: 100rpx; */
        color: #676767;
    }
    .matnr {
        font-size: 14px;
        font-weight: 700;
        /* padding-top: 15rpx; */
        padding-top: 15rpx;
    }
    .data-list-right {
        display: inline-block;
        float: right;
        height: 130rpx;
        line-height: 130rpx;
        margin-right: 10%;
    }
</style>
pages/index/index.vue
@@ -24,53 +24,53 @@
            return {
                elements:[
                    {
                        title: '下线打包',
                        name: 'offline',
                        title: '测试',
                        name: 'test',
                        color: 'blue',
                        cuIcon: 'forward'
                    },
                    {
                        title: '委外入库',
                        name: 'outPakin',
                        color: 'blue',
                        cuIcon: 'copy'
                    },
                    {
                        title: '出库确认',
                        name: 'checkout',
                        color: 'blue',
                        cuIcon: 'edit'
                    },
                    {
                        title: '残次品',
                        name: 'bad',
                        color: 'blue',
                        cuIcon: 'delete'
                    },
                    {
                        title: '库位盘点',
                        name: 'stockCheck',
                        color: 'blue',
                        cuIcon: 'safe'
                    },
                    {
                        title: '组托入库',
                        name: 'pakin',
                        color: 'grey',
                        cuIcon: 'copy'
                    },
                    {
                        title: '订单组托',
                        name: 'order',
                        color: 'grey',
                        cuIcon: 'goods'
                    },
                    {
                        title: '退出登录',
                        name: 'logOut',
                        color: 'grey',
                        cuIcon: 'exit'
                    },
                    // {
                    //     title: '委外入库',
                    //     name: 'outPakin',
                    //     color: 'blue',
                    //     cuIcon: 'copy'
                    // },
                    // {
                    //     title: '出库确认',
                    //     name: 'checkout',
                    //     color: 'blue',
                    //     cuIcon: 'edit'
                    // },
                    // {
                    //     title: '残次品',
                    //     name: 'bad',
                    //     color: 'blue',
                    //     cuIcon: 'delete'
                    // },
                    // {
                    //     title: '库位盘点',
                    //     name: 'stockCheck',
                    //     color: 'blue',
                    //     cuIcon: 'safe'
                    // },
                    // {
                    //     title: '组托入库',
                    //     name: 'pakin',
                    //     color: 'grey',
                    //     cuIcon: 'copy'
                    // },
                    // {
                    //     title: '订单组托',
                    //     name: 'order',
                    //     color: 'grey',
                    //     cuIcon: 'goods'
                    // },
                    // {
                    //     title: '退出登录',
                    //     name: 'logOut',
                    //     color: 'grey',
                    //     cuIcon: 'exit'
                    // },
                    
                    ]
            }