skyouc
2025-09-24 b38d60e4cc25c1a6f809c9652f87071d92179f2f
pda新增修改
5个文件已修改
145 ■■■■■ 已修改文件
pages/AGV/AGVMoveCall.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/AGV/AGVPakin.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mat/matQuery.vue 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mat/matSelected.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/AGV/AGVMoveCall.vue
@@ -11,7 +11,8 @@
            </view>
            <view class="item">
                <view class="code-decs">目标库位:</view>
                <uni-combox :candidates="staList" placeholder="请选择站点"  v-model="tarSite"></uni-combox>
                <input type="text" placeholder=" 扫码 / 输入" v-model="tarSite" >
                <!-- <uni-combox :candidates="staList" placeholder="请选择站点"  v-model="tarSite"></uni-combox> -->
            </view>
        </view>
        <view class="mat-list-title">
@@ -157,7 +158,7 @@
                    success(result) {
                        result = result.data
                        if (result.code === 200 && result.data) {
                             staResults.push(...result.data);
                            staResults.push(...result.data);
                            staResults.forEach(item => {
                                that.staList.push(item?.locNo)
                            })
pages/AGV/AGVPakin.vue
@@ -16,7 +16,7 @@
                <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>
                    <!-- <text style="text-align: right;color: #409EFF;" @click="findMat()">提取+</text> -->
                    <uni-icons type="right" color="#c1c1c1"></uni-icons>
                </view>
            </view>
@@ -30,6 +30,12 @@
                    <view class="list-left-item">
                        <view class="desc">No:</view>
                        <view class="left-item">{{i + 1}}</view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">订单号:</view>
                        <view class="left-item">
                            <uni-tag :text="item.orderNo" type="primary"></uni-tag>
                        </view>
                    </view>
                    <view class="list-left-item">
                        <view class="desc">料号:</view>
@@ -146,7 +152,7 @@
                baseUrl: '',
                token: '',
                barcode: '',
                orderNo: '',
                orderNo: null,
                dataList: [],
                count: 0,
                rowNum: '',
@@ -182,7 +188,7 @@
                // 不设置定时器 会出现扫入的字符串不全
                setTimeout(() => {
                    var len = this.orderNo.length
                    this.barcodeFocuss()
                    // this.barcodeFocuss()
                }, 200)
            },
            barcodeInput() {
@@ -221,16 +227,11 @@
            // 搜索物料
            findMat() {
                let that = this
                // 判断物料长度是否为1
                // if (that.dataList.length >= 1) {
                //     this.messageText = "只能添加一种物料"
                //     this.messageToggle('warn')
                //     that.matnr = ''
                //     return
                // }
                uni.request({
                    url: that.baseUrl + '/mat/auth',
                    url: that.baseUrl + '/mobile/scan/order/mats',
                    method: 'POST',
                    data: {
                        orderNo: that.orderNo,
                        matnr: that.matnr
                    },
                    header: {
@@ -258,9 +259,9 @@
                                    },
                                },
                            });
                        } else if (res.code == 403) {
                        } else if (result.code == 403) {
                            uni.showToast({
                                title: res.msg,
                                title: result.msg,
                                icon: "none",
                                position: 'top'
                            })
@@ -271,24 +272,28 @@
                            }, 1000);
                        } else {
                            uni.showToast({
                                title: res.msg,
                                title: result.msg,
                                icon: "none",
                                position: 'top'
                            })
                        }
                    }
                });
            },
            selectMat() {
                let that = this
                if (that.orderNo == null || that.orderNo == undefined ) {
                    that.messageText = '请填写订单编号!!'
                    that.messageToggle('error')
                    return;
                }
                uni.navigateTo({
                    url: "../mat/matQuery",
                    success: function(res) {
                        // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                        res.eventChannel.emit('commonUrl', {
                            commonUrl: ''
                        res.eventChannel.emit('orderNo', {
                            orderNo: that.orderNo
                        })
                    },
                    events: {
pages/home/home.vue
@@ -68,7 +68,7 @@
                        url: '/AGV/AGVPakin'
                    },
                    {
                        title: '呼叫Agv',
                        title: 'Agv入库',
                        name: 'AGVMoveCall',
                        color: 'green',
                        cuIcon: 'pullup',
pages/mat/matQuery.vue
@@ -1,30 +1,36 @@
<template>
    <view>
        <!-- 搜索框 -->
        <view class="search-bar">
            <uni-search-bar v-model="condition" placeholder=" 扫码 / 输入" bgColor="#EEEEEE" @confirm="search" />
        <view class="form">
            <view class="form-item">
                <view class="form-item-desc"><text>商品编码</text></view>
                <view class="form-item-content"><text>{{mat.matnr}}</text></view>
            </view>
            <view class="form-item">
                <view class="form-item-desc"><text>商品名称</text></view>
                <view class="form-item-content" style="word-break: break-all;line-height: 1.5;"><text>{{mat.maktx}}</text></view>
            </view>
            <view class="form-item">
                <view class="form-item-desc"><text>规格</text></view>
                <view class="form-item-content"><text>{{mat.specs}}</text></view>
            </view>
            <view class="form-item">
                <view class="form-item-desc"><text>批号</text></view>
                <view class="form-item-content">
                    <view class="form-input">
                        <input type="text" v-model="mat.batch">
                    </view>
                </view>
            </view>
            <view class="form-item">
                <view class="form-item-desc"><text>数量</text></view>
                <view class="form-item-content">
                    <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" />
                </view>
            </view>
        </view>
        <scroll-view>
            <view class="tag-list" v-for="(item,i) in tagList" :key="i" @click="showTag(item.id)">
                <view class="tag">
                    <view style="display: flex;">
                        <view class="wms-tag" :style="baColor" >分类</view>
                    </view>
                </view>
                <view class="tag-item">{{item.name}}</view>
            </view>
        </scroll-view>
        <view>
            <view class="tag-list" v-for="(item,i) in matList" :key="i" @click="findBySelect(item.matnr)">
                <view class="tag">
                    <view style="display: flex;">
                        <view class="wms-tag" :style="baColor" >商品</view>
                    </view>
                </view>
                <view class="tag-item">商品编号: {{item.matnr}}</view>
                <view class="tag-item" style="word-break: break-all;width: 90%;">商品名称: {{item.maktx  ? item.maktx : '--'}}</view>
                <view class="tag-item">商品规格: {{item.specs  ? item.specs : '--'}}</view>
            </view>
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" type="primary" @click="back()">提取</button>
        </view>
        <uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
    </view>
@@ -43,6 +49,7 @@
                baColor: "background-color: #0081ff;",
                desc: '商品编号:',
                baseUrl: '',
                orderNo: '',
                token: '',
                status: 'more',
                contentText: {
@@ -60,21 +67,24 @@
                this.showMat(this.tagIdNow);
            }
        },
        onLoad() {
        onLoad(option) {
            // 没啥用了
            let that = this
            // const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
            // #ifdef APP-NVUE
            const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
            // #endif
            // #ifndef APP-NVUE
            const eventChannel = this.getOpenerEventChannel();
            // #endif
            // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
            eventChannel.on('commonUrl', function(data) {
                that.commonUrl = data.commonUrl
            eventChannel.on('orderNo', function(data) {
                that.orderNo = data.orderNo
                that.showTag(data.orderNo)
            })
        },
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.showTag(10009)
        },
        methods: {
            search() {
pages/mat/matSelected.vue
@@ -1,6 +1,10 @@
<template>
    <view>
        <view class="form">
        <view class="form" v-for="mat in mats">
            <view class="form-item">
                <view class="form-item-desc"><text>订单号</text></view>
                <view class="form-item-content"><text>{{mat.orderNo}}</text></view>
            </view>
            <view class="form-item">
                <view class="form-item-desc"><text>商品编码</text></view>
                <view class="form-item-content"><text>{{mat.matnr}}</text></view>
@@ -24,7 +28,7 @@
            <view class="form-item">
                <view class="form-item-desc"><text>数量</text></view>
                <view class="form-item-content">
                    <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" />
                    <uni-number-box :value="mat.enableQty" :max="99999999" :step='1' color="#747474" @change="changeValue" />
                </view>
            </view>
        </view>
@@ -46,6 +50,8 @@
                    batch: null,
                    anfme: 0,
                },
                selectNum: null,
                mats: null,
                baseIP:'',
                basePORT:'',
            }
@@ -61,8 +67,7 @@
            
            // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
            eventChannel.on('mat', function(data) {
                that.mat = data.data
                that.mat.anfme = 0
                that.mats = data.data
            })
            
            
@@ -75,14 +80,22 @@
                
            },
            changeValue(value) {
                this.mat.anfme = value
                this.mats[0].anfme = value
                this.selectNum = value
            },
            back() {
                if (this.mat.anfme === 0) {
                if (this.mats[0].anfme === 0) {
                    uni.showToast({title: '请输入数量', icon: "none", position: 'top'});
                    return;
                }
                this.getOpenerEventChannel().emit('matList', {data: this.mat});
                console.log("=======>");
                console.log(this.mats[0]);
                if (this.selectNum != null) {
                    this.mats[0].anfme = this.selectNum
                } else {
                    this.mats[0].anfme = this.mats[0].enableQty
                }
                this.getOpenerEventChannel().emit('matList', {data: this.mats[0]});
                uni.navigateBack({
                    
                })