#
zhou zhou
3 小时以前 5e4b8e610be4a6e42c07c0104c95f5fe697d5412
#
2个文件已修改
116 ■■■■■ 已修改文件
pages/AGV/StartInTask.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/listing/matnrPalletising.vue 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/AGV/StartInTask.vue
@@ -3,7 +3,7 @@
        <form>
            <view class="cu-form-group margin-top">
                <view class="title">接驳站点</view>
                <input placeholder="请扫描接驳站点条码" v-model="barcode" ></input>
                <input placeholder="请扫描接驳站点条码" v-model="agvStation" ></input>
                <!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
            </view>    
            <view class="cu-form-group">
@@ -103,7 +103,8 @@
                curCode: '',
                whAreaId:'',
                repeatClick: false,
                buttonPermissions: [] // 按钮权限列表
                buttonPermissions: [] ,// 按钮权限列表
                agvStation:''
                
            }
        },
@@ -178,13 +179,20 @@
            },
            async confirm() {                
                if(this.barcode === '' || this.barcode ===null){
                if(this.agvStation === '' || this.agvStation ===null){
                    uni.showToast({
                        title: "接驳站点不能为空",
                        icon: "none",
                    })
                    return ;
                }
                if(this.barcode === '' || this.barcode ===null){
                    uni.showToast({
                        title: "容器号不能为空",
                        icon: "none",
                    })
                    return ;
                }
                if(this.whAreaId === '' || this.whAreaId ===null){
                    uni.showToast({
                        title: "目标库区不能为空",
pages/listing/matnrPalletising.vue
@@ -145,8 +145,22 @@
                    <text class="modal-title">输入AGV站点</text>
                </view>
                <view class="modal-body">
                    <view class="input-wrapper">
                        <input class="agv-input" type="text" v-model="agvStationInput" placeholder="请输入AGV站点编号" />
                    <view class="form-item">
                        <text class="form-label">AGV站点</text>
                        <view class="input-wrapper">
                            <input class="agv-input" type="text" v-model="agvStationInput" placeholder="请输入AGV站点编号" />
                        </view>
                    </view>
                    <view class="form-item">
                        <text class="form-label">目标库区</text>
                        <view class="input-wrapper picker-wrapper">
                            <picker mode="selector" :range="rangeText" @change="pickerChange">
                                <view class="picker-view">
                                    <text>{{ whAreaId ? selectedText : '请选择库区' }}</text>
                                    <text class="cuIcon-right picker-arrow"></text>
                                </view>
                            </picker>
                        </view>
                    </view>
                </view>
                <view class="modal-footer">
@@ -171,6 +185,7 @@
    export default {
        data() {
            return {
                whAreaId:'',
                barcode: '',
                container: '',
                megreQty: '',
@@ -191,14 +206,27 @@
            ...mapState('user', ['dynamicFields']),
            allCount() {
                return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0
            },
            rangeText() {
                return this.range.map(item => item.text)
            },
            selectedText() {
                const found = this.range.find(item => item.value === this.whAreaId)
                return found ? found.text : '请选择库区'
            }
        },
        mounted() {
            this.getRece()
            // 获取按钮权限
            this.buttonPermissions = uni.getStorageSync('buttonPermissions') || [];
            console.log('当前页面按钮权限:', this.buttonPermissions);
        },
        methods: {
            pickerChange(e) {
                const index = e.detail.value
                this.whAreaId = this.range[index].value
                uni.setStorageSync('whAreaId', this.whAreaId)
            },
            // 检查按钮权限
            hasButtonPermission(route) {
                return this.buttonPermissions.includes(route);
@@ -410,6 +438,7 @@
            },
            // 选择不需要AGV
            handleAgvNo() {
                this.showAgvModal = false;
                this.submitConfirm('');
            },
@@ -429,6 +458,14 @@
                if (this.agvStationInput.trim() === '') {
                    uni.showToast({
                        title: "AGV站点不能为空",
                        icon: "none",
                        position: 'top'
                    });
                    return;
                }
                if (this.whAreaId.trim() === '') {
                    uni.showToast({
                        title: "目标库区不能为空",
                        icon: "none",
                        position: 'top'
                    });
@@ -457,6 +494,7 @@
            if (agvStation) {
                requestData.staNo = agvStation;
                requestData.agvSign = 1;
                requestData.area = this.whAreaId;
            }else{
                requestData.agvSign = 0;
            }
@@ -482,6 +520,19 @@
                })
            }
            this.repeatClick = false
        },
        async getRece() {
            const {
                code,
                data,
                msg
            } = await request('/areas/receipt', {}, 'get')
            if (code === 200) {
                this.range = data.map(item => ({
                    value: item.id,
                    text: item.warehouseId$ + "-- " + item.name
                }));
            }
        },
        }
    }
@@ -557,7 +608,24 @@
    
    /* 弹窗内容 */
    .modal-body {
        padding: 40rpx 30rpx;
        padding: 30rpx;
    }
    .form-item {
        margin-bottom: 24rpx;
    }
    .form-item:last-child {
        margin-bottom: 0;
    }
    .form-label {
        display: block;
        font-size: 28rpx;
        color: #333;
        font-weight: 500;
        margin-bottom: 12rpx;
        padding-left: 4rpx;
    }
    
    .modal-message {
@@ -571,8 +639,18 @@
    .input-wrapper {
        background-color: #f5f7fa;
        border-radius: 12rpx;
        padding: 20rpx;
        padding: 10rpx;
        border: 2rpx solid #e4e7ed;
        transition: border-color 0.2s;
    }
    .input-wrapper:focus-within {
        border-color: #0081ff;
    }
    .picker-wrapper {
        display: flex;
        align-items: center;
    }
    
    .agv-input {
@@ -583,6 +661,22 @@
        background-color: transparent;
    }
    
    .picker-view {
        width: 100%;
        height: 70rpx;
        line-height: 70rpx;
        font-size: 30rpx;
        color: #333;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .picker-arrow {
        color: #999;
        font-size: 28rpx;
    }
    /* 弹窗底部按钮 */
    .modal-footer {
        display: flex;