zjj
2025-05-12 ba934cc7fb81a09d5ef98fecf0fda79bbe9e210a
#AGV解绑
2个文件已修改
2个文件已添加
561 ■■■■■ 已修改文件
pages.json 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/AGV/StaUnBind.vue 264 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/AGV/StartInTask.vue 264 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/index.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -37,6 +37,18 @@
            }
        },
        {
            "path": "pages/AGV/StaUnBind",
            "style": {
                "navigationBarTitleText": "AGV站点解绑"
            }
        },
        {
            "path": "pages/AGV/StartInTask",
            "style": {
                "navigationBarTitleText": "AGV启动入库"
            }
        },
        {
            "path": "pages/listing/matnrPalletising",
            "style": {
                "navigationBarTitleText": "物料组盘"
pages/AGV/StaUnBind.vue
New file
@@ -0,0 +1,264 @@
<template>
    <view class="has-foot">
        <form>
            <view class="cu-form-group ">
                <view class="title">接驳站</view>
                <input placeholder="请扫描接驳站条码" v-model="barcode" ></input>
                <text class='cuIcon-search text-blue' @click="search"></text>
            </view>
        </form>
        <view class="flex solid-bottom padding-sm justify-between">
            <view class="text-blue">容器码:{{container}}</view>
        </view>
        <view class="cu-list det menu sm-border  padding">
            <block v-for="(item, index) in list" :key="index">
                <view class="cu-bar bg-white solid-bottom margin-top-sm">
                    <view class="action">
                        <view class="index">
                            {{index+1}}
                        </view>
                        <view class="text-blue">
                            {{`${item.maktx}`}}
                        </view>
                    </view>
                    <!--     <view class="action" >
                        <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
                    </view> -->
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-black">ASN:</text>
                    </view>
                    <view class="action">
                        <text class="text-grey ">{{item.asnCode}}</text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-black">供应商批次:</text>
                    </view>
                    <view class="action">
                        <text class="text-grey">{{item.splrBatch}}</text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-black">库存批次:</text>
                    </view>
                    <view class="action">
                        <text class="text-grey ">{{item.batch}}</text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-black">收货数量:</text>
                    </view>
                    <view class="action">
                        <text class="text-grey ">{{item.anfme}}</text>
                    </view>
                </view>
            </block>
        </view>
        <view class="cu-bar btn-group foot">
            <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
            <button class="cu-btn bg-blue shadow-blur" @click="confirm">解绑</button>
        </view>
        <uni-popup ref="popup" class="cu-popup">
            <view class="popup-content">
                <view class="head">
                    <text>推荐</text>
                    <text class='cuIcon-close text-red close' @click="close"></text>
                </view>
                <div class="body">
                    <view class="cu-list grid col-3 no-border">
                        <view class="item" v-for="el in range">
                            <view class="cu-btn round  sm" :class="[el===curCode?'bg-blue':'line-blue']"
                                @click="itemChange(el)">{{el}}</view>
                        </view>
                    </view>
                </div>
                <view class="cu-bar btn-group ">
                    <button class="cu-btn bg-blue shadow-blur" @click="popupSubmit">提交</button>
                </view>
            </view>
        </uni-popup>
    </view>
</template>
<script>
    import {
        request
    } from '../../common/request.js'
    import {
        mapState,
        mapMutations,
        mapActions,
        mapGetters
    } from 'vuex';
    export default {
        data() {
            return {
                barcode: '',
                areaName: '',
                locCode: '',
                container: '',
                list: [],
                range: [],
                curCode: ''
            }
        },
        computed: {
            ...mapState('user', ['dynamicFields']),
        },
        mounted() {},
        methods: {
            async search() {
                let that = this
                const {
                    code,
                    data,
                    msg
                } = await request('/staBind/list', {
                    sta: this.barcode
                })
                if (code === 200) {
                    if(data.list.length >0){
                        that.container = data.barcode
                        that.list = data.list
                    }
                } else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                    })
                }
            },
            remove(index) {
                this.list.splice(index, 1);
            },
            clear() {
                this.list = []
                this.container = ''
                this.barcode = ''
            },
            open() {
                this.$refs.popup.open()
            },
            close() {
                this.$refs.popup.close()
            },
            popupSubmit() {
                this.$refs.popup.close()
            },
            itemChange(el) {
                this.curCode = el
            },
            async confirm() {
                if(this.barcode === '' || this.barcode ===null){
                    uni.showToast({
                        title: "接驳站码不能为空",
                        icon: "none",
                    })
                    return ;
                }
                const {
                    code,
                    data,
                    msg
                } = await request('/AGV/staUnBind',{
                        sta: this.barcode
                    }
                )
                if (code === 200) {
                    uni.showToast({
                        title: '解绑成功'
                    })
                    this.clear()
                } else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                    })
                }
            },
        }
    }
</script>
<style>
    .index {
        border: 1px solid #e54d42;
        color: #e54d42;
        border-radius: 50%;
        display: block;
        width: 50rpx;
        height: 50rpx;
        line-height: 48rpx;
        text-align: center;
        margin-right: 20rpx;
        font-size: 30rpx;
    }
    .text-blue {
        color: #0081ff !important;
    }
    .item {
        position: relative;
        display: flex;
        min-height: 80upx;
        align-items: center;
    }
    .uni-file-picker {
        width: 100%;
        margin-bottom: 10px;
    }
    .uni-select__selector {
        z-index: 999;
    }
    .tj {
        height: auto;
        padding: 6px 8px;
        display: inline-block;
        border-radius: 6px;
    }
    .item {
        display: flex;
        justify-content: center;
    }
    .item .cu-btn {
        font-size: 26upx;
    }
</style>
pages/AGV/StartInTask.vue
New file
@@ -0,0 +1,264 @@
<template>
    <view class="has-foot">
        <form>
            <view class="cu-form-group ">
                <view class="title">接驳站</view>
                <input placeholder="请扫描接驳站条码" v-model="barcode" ></input>
                <text class='cuIcon-search text-blue' @click="search"></text>
            </view>
        </form>
        <view class="flex solid-bottom padding-sm justify-between">
            <view class="text-blue">容器码:{{container}}</view>
        </view>
        <view class="cu-list det menu sm-border  padding">
            <block v-for="(item, index) in list" :key="index">
                <view class="cu-bar bg-white solid-bottom margin-top-sm">
                    <view class="action">
                        <view class="index">
                            {{index+1}}
                        </view>
                        <view class="text-blue">
                            {{`${item.maktx}`}}
                        </view>
                    </view>
                    <!--     <view class="action" >
                        <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
                    </view> -->
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-black">ASN:</text>
                    </view>
                    <view class="action">
                        <text class="text-grey ">{{item.asnCode}}</text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-black">供应商批次:</text>
                    </view>
                    <view class="action">
                        <text class="text-grey">{{item.splrBatch}}</text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-black">库存批次:</text>
                    </view>
                    <view class="action">
                        <text class="text-grey ">{{item.batch}}</text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-black">收货数量:</text>
                    </view>
                    <view class="action">
                        <text class="text-grey ">{{item.anfme}}</text>
                    </view>
                </view>
            </block>
        </view>
        <view class="cu-bar btn-group foot">
            <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
            <button class="cu-btn bg-blue shadow-blur" @click="confirm">解绑</button>
        </view>
        <uni-popup ref="popup" class="cu-popup">
            <view class="popup-content">
                <view class="head">
                    <text>推荐</text>
                    <text class='cuIcon-close text-red close' @click="close"></text>
                </view>
                <div class="body">
                    <view class="cu-list grid col-3 no-border">
                        <view class="item" v-for="el in range">
                            <view class="cu-btn round  sm" :class="[el===curCode?'bg-blue':'line-blue']"
                                @click="itemChange(el)">{{el}}</view>
                        </view>
                    </view>
                </div>
                <view class="cu-bar btn-group ">
                    <button class="cu-btn bg-blue shadow-blur" @click="popupSubmit">提交</button>
                </view>
            </view>
        </uni-popup>
    </view>
</template>
<script>
    import {
        request
    } from '../../common/request.js'
    import {
        mapState,
        mapMutations,
        mapActions,
        mapGetters
    } from 'vuex';
    export default {
        data() {
            return {
                barcode: '',
                areaName: '',
                locCode: '',
                container: '',
                list: [],
                range: [],
                curCode: ''
            }
        },
        computed: {
            ...mapState('user', ['dynamicFields']),
        },
        mounted() {},
        methods: {
            async search() {
                let that = this
                const {
                    code,
                    data,
                    msg
                } = await request('/staBind/list', {
                    sta: this.barcode
                })
                if (code === 200) {
                    if(data.list.length >0){
                        that.container = data.barcode
                        that.list = data.list
                    }
                } else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                    })
                }
            },
            remove(index) {
                this.list.splice(index, 1);
            },
            clear() {
                this.list = []
                this.container = ''
                this.barcode = ''
            },
            open() {
                this.$refs.popup.open()
            },
            close() {
                this.$refs.popup.close()
            },
            popupSubmit() {
                this.$refs.popup.close()
            },
            itemChange(el) {
                this.curCode = el
            },
            async confirm() {
                if(this.barcode === '' || this.barcode ===null){
                    uni.showToast({
                        title: "接驳站码不能为空",
                        icon: "none",
                    })
                    return ;
                }
                const {
                    code,
                    data,
                    msg
                } = await request('/AGV/staUnBind',{
                        sta: this.barcode
                    }
                )
                if (code === 200) {
                    uni.showToast({
                        title: '解绑成功'
                    })
                    this.clear()
                } else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                    })
                }
            },
        }
    }
</script>
<style>
    .index {
        border: 1px solid #e54d42;
        color: #e54d42;
        border-radius: 50%;
        display: block;
        width: 50rpx;
        height: 50rpx;
        line-height: 48rpx;
        text-align: center;
        margin-right: 20rpx;
        font-size: 30rpx;
    }
    .text-blue {
        color: #0081ff !important;
    }
    .item {
        position: relative;
        display: flex;
        min-height: 80upx;
        align-items: center;
    }
    .uni-file-picker {
        width: 100%;
        margin-bottom: 10px;
    }
    .uni-select__selector {
        z-index: 999;
    }
    .tj {
        height: auto;
        padding: 6px 8px;
        display: inline-block;
        border-radius: 6px;
    }
    .item {
        display: flex;
        justify-content: center;
    }
    .item .cu-btn {
        font-size: 26upx;
    }
</style>
pages/home/index.vue
@@ -91,20 +91,37 @@
                </navigator>
            </view>
            
        </view>
        <view class="cu-bar bg-white solid-bottom margin-top">
            <view class="action">
                <text class="cuIcon-title text-orange "></text> AGV
            </view>
        </view>
        <view class="cu-list grid col-4 no-border">
            <view class="cu-item">
                <navigator hover-class='none' url="/pages/AGV/AGVStaBind" navigateTo>
                    <view class="cuIcon-punch text-blue">
                    </view>
                    <text>AGV站点绑定</text>
                    <text>站点绑定</text>
                </navigator>
            </view>
            <view class="cu-item">
                <navigator hover-class='none' url="/pages/AGV/AGVStaBind" navigateTo>
                    <view class="cuIcon-punch text-blue">
                    </view>
                    <text>AGV启动入库</text>
                    <text>启动入库</text>
                </navigator>
            </view>
            <view class="cu-item">
                <navigator hover-class='none' url="/pages/AGV/StaUnBind" navigateTo>
                    <view class="cuIcon-punch text-blue">
                    </view>
                    <text>站点解绑</text>
                </navigator>
            </view>
        </view>
        <view class="cu-bar bg-white solid-bottom margin-top">