#
whycq
2023-10-16 67271e43ba60ea115e0e92d9639ecb5a50e59e2c
#
8个文件已修改
213 ■■■■ 已修改文件
components/z-input/z-input.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/LoginDemo/LoginDemo.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/api/addMat.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/component/demo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/project/pakin/pakin.vue 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/project/project.json 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/z-input/z-input.vue
@@ -119,9 +119,8 @@
        display: flex;
        align-items: center;
        min-height: 35px;
        background-color: #FFF;
        background-color: #f8f8f8;
        margin: 8px;
        /* border-bottom: 1px solid darkgray; */
    }
    .put {
        display: flex;
@@ -129,14 +128,14 @@
    }
    
    .inner1 {
        width: 65px;
        width: 55px;
        padding-left: 8px;
        color: #606164;
        font-weight: 900;
        font-family:'Helvetica Neue';
    }
    .inner2 {
        background-color: #f1f3f4;
        background-color: #FFF;
        flex: 1;
        display: flex;
        align-items: center;
@@ -146,7 +145,7 @@
    }
    .p-input {
        flex:1;
        padding-left: 8px;
        padding: 4px;
    }
    .p-icon {
        margin-left: 8px;
pages/LoginDemo/LoginDemo.vue
@@ -103,7 +103,6 @@
                this.$refs.settings.open()
            },
            cancel() {
                console.log(uni.getStorageSync('Network'));
                this.$refs.settings.close()
            },
            confirm() {
pages/api/addMat.js
@@ -1,7 +1,9 @@
async function addMat() {
let network = uni.getStorageSync('Network')
let baseUrl = `http://${network[0].ip}:${network[0].port}/${network[0].address}`
async function addMat(matnr) {
    let that = this,item = {};
    var ress = await uni.request({
        url: 'http://192.168.4.188:8089/bfwms/mat/auth',
        url: `${baseUrl}/mat/auth`,
        data: {matnr: '3CPPJ.B.GMB.LZ.QBY4-10/15P316LLZ'},
    }).then((result)=> {
        let mat = result.data.data
@@ -18,14 +20,6 @@
    return item
}
function isEmpty(obj) {
    if (JSON.stringify(obj) === '{}') {
        return true
    }
    return  obj == "undefined" || obj == null || obj === "" || obj == {};
}
module.exports = {
    addMat: addMat,
    isEmpty: isEmpty
}
pages/component/demo.vue
@@ -37,7 +37,7 @@
</template>
<script>
    import addMat, { isEmpty } from '../api/addMat.js'
    import addMat from '../api/addMat.js'
    export default {
        data() {
            return {
pages/home/home.vue
@@ -3,7 +3,7 @@
        <scroll-view scroll-y class="page">
            <view class="nav-list">
                <navigator hover-class='none' class="nav-li" navigateTo
                :url="'/pages' + item.url"
                :url="'/pages/project' + item.url"
                :class="'bg-'+item.color" 
                :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1',width: item.width}]"
                v-for="(item,index) in menu" 
pages/project/pakin/pakin.vue
@@ -1,24 +1,185 @@
<template>
    <view>
        <view class="head">
            <z-input v-for="it in page"
            :desc="it.title"
            :name="it.name"
            :btn="it.btn"
            :btn-name="it.btnName"
            v-model="it.val"
            :index="it.id"
            :lenCheck="it.lenCheck"
            :focus="it.focus"
            @inputVal='input2'
            ></z-input>
        </view>
        <u-sticky  >
            <view class="sticky">商品列表</view>
        </u-sticky>
        <z-data-list class="data-list"
            v-for="(it,i) in zDataList"
            :key="i"
            :list="it.detl"
            :index="i+1"
            @goDetail='goDetail(it.detl,i)'
        ></z-data-list>
        <!-- 垫高 -->
        <view style="height: 100rpx;"></view>
        
    </view>
</template>
<script>
    import { mapState } from 'vuex'
    import addMat from '@/pages/api/addMat.js'
    export default {
        data() {
            return {}
            return {
                zDataList: [
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 1},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 2},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 3},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 4},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 5},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 1},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 2},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 3},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 4},
                        ]
                    },
                    {
                        detl: [
                            {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
                            {key: '商品名称',value: '尼龙头(灰白)'},
                            {key: '规格',value: '700*699*80'},
                            {key: '批号',value: '20231007204944',type: 'input'},
                            {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
                            {key: '序号',value: 5},
                        ]
                    }
                ],
                list: [
                    {}
                ]
            }
        },
        onShow() {
            console.log(this.page);
        },
        computed: mapState({
            page: state => state.project.menu
        })
            page: state => state.project.menu[0].page.input
        }),
        methods: {
            input2(arr) {
                if(arr[1] == 'matnr') {
                    this.getMat(arr[0])
                }
            },
            async getMat(matnr) {
                let mat = await addMat.addMat()
                if (!addMat.isEmpty(mat)) {
                    this.zDataList.push(mat)
                }
            },
        }
    }
</script>
<style>
    .head {
        background-color: #f8f8f8;
        margin-top: -8px;
    }
    .sticky {
        height: 70rpx;
        margin-top: -8px;
        text-align: center;
        background-color: #f8f8f8;
        display: flex;
        align-items: center;
        justify-content: center;
    }
</style>
pages/project/project.json
@@ -10,7 +10,14 @@
            "cuIcon": "pullup",
            "width": "90%",
            "sort": 1,
            "page": 0
            "page": {
                "input": [
                    {"id":1,"name": "barcode","title": "托盘码","val": "2","lenCheck": 8,"focus": true},
                    {"id":2,"name": "matnr","title": "物料码","val": "2","btn": true,"btnName": "提取","focus": true}
                ],
                "list": {}
            }
        },
        {
            "title": "订单组托",
store/index.js
@@ -3,13 +3,10 @@
import Vuex from 'vuex'
import project from '@/pages/project/project'
Vue.use(Vuex);//vue的插件机制
Vue.use(Vuex);
//Vuex.Store 构造器选项
const store = new Vuex.Store({
    state:{//存放状态
        "username":"foo",
        "age":18,
    state:{
        "homeList": [
            {
                name: '入库',