#
zhou zhou
2 天以前 7a3f79cb315a4dd10ee04ee6c72e476e24226b6f
#
4个文件已修改
267 ■■■■■ 已修改文件
pages.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/AGV/StartInTask.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/listing/itemSelect.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/listing/matnrPalletising.vue 260 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -544,7 +544,7 @@
        }, {
            "path": "pages/phyz/bcp/bcpOrder",
            "style": {
                "navigationBarTitleText": "半成品入库单",
                "navigationBarTitleText": "半入库单",
                "enablePullDownRefresh": false
            }
pages/AGV/StartInTask.vue
@@ -119,6 +119,9 @@
            console.log('当前页面按钮权限:', this.buttonPermissions);
        },
        methods: {    
            hasButtonPermission(route) {
                return this.buttonPermissions.includes(route);
            },
            selChange(val) {
                uni.setStorageSync('whAreaId', val)
            },
pages/listing/itemSelect.vue
@@ -65,7 +65,7 @@
                        <view class="cu-item">
                            <view class="content">
                                <text class="text-black">可组盘数量: <text
                                        class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text>
                                        class="text-grey ">{{item.ableQty}}</text></text>
                            </view>                            
                        </view>
                        
pages/listing/matnrPalletising.vue
@@ -96,7 +96,7 @@
                    <view class="cu-item">
                        <view class="content">
                            <text class="text-black">可组盘数量: <text
                                    class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text>
                                    class="text-grey ">{{item.ableQty}}</text></text>
                        </view>
                        
                    </view>
@@ -106,7 +106,7 @@
                                <view class="title text-blue"><text
                                        class="text-red text-xl vertical-middle">*</text>组盘数量:
                                </view>
                                <uni-number-box style="width: 70%;" :min="0" :max="max" :decimal="2" :step="0.01" v-model="item.receiptQty"
                                <uni-number-box style="width: 70%;" :min="0" :max="item.ableQty" :decimal="2" :step="0.01" v-model="item.receiptQty"
                                    ></uni-number-box>
                            </view>
                        </view>
@@ -117,6 +117,43 @@
        <view class="cu-bar btn-group foot">
            <button v-if="hasButtonPermission('reset')" class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
            <button v-if="hasButtonPermission('submit')" class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">组托</button>
            <button v-if="hasButtonPermission('submitNoJudge')" class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm2">组托</button>
        </view>
        <!-- AGV呼叫确认弹窗 -->
        <view class="modal-mask" v-if="showAgvModal" @click="closeAgvModal">
            <view class="modal-container" @click.stop>
                <view class="modal-header">
                    <text class="cuIcon-deliver" style="font-size: 48rpx; color: #0081ff;"></text>
                    <text class="modal-title">AGV呼叫确认</text>
                </view>
                <view class="modal-body">
                    <text class="modal-message">是否需要呼叫AGV进行托盘搬运?</text>
                </view>
                <view class="modal-footer">
                    <button class="modal-btn modal-btn-cancel" @click="handleAgvNo">不需要</button>
                    <button class="modal-btn modal-btn-confirm" @click="handleAgvYes">需要呼叫</button>
                </view>
            </view>
        </view>
        <!-- AGV站点输入弹窗 -->
        <view class="modal-mask" v-if="showAgvInputModal" @click="closeAgvInputModal">
            <view class="modal-container" @click.stop>
                <view class="modal-header">
                    <text class="cuIcon-locationfill" style="font-size: 48rpx; color: #0081ff;"></text>
                    <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>
                </view>
                <view class="modal-footer">
                    <button class="modal-btn modal-btn-cancel" @click="closeAgvInputModal">取消</button>
                    <button class="modal-btn modal-btn-confirm" @click="confirmAgvStation">确定</button>
                </view>
            </view>
        </view>
    </view>
</template>
@@ -144,7 +181,10 @@
                isconfirm: false,                
                matnrCode:'',
                max: 99999999,
                buttonPermissions: [] // 按钮权限列表
                buttonPermissions: [], // 按钮权限列表
                showAgvModal: false, // AGV确认弹窗
                showAgvInputModal: false, // AGV站点输入弹窗
                agvStationInput: '' // AGV站点输入值
            }
        },
        computed: {
@@ -325,7 +365,7 @@
            prev() {
                this.isconfirm = false
            },
            async confirm() {
            confirm() {
                if(this.container === '' || this.container === null){
                    uni.showToast({
                        title: "容器码为空",
@@ -342,6 +382,30 @@
                    })
                    return ;
                }
                // 显示AGV确认弹窗
                this.showAgvModal = true;
            },
            confirm2() {
                if(this.container === '' || this.container === null){
                    uni.showToast({
                        title: "容器码为空",
                        icon: "none",
                        position: 'top'
                    })
                    return ;
                }
                if(this.list.length ===0 || this.list === null){
                    uni.showToast({
                        title: "未添加明细",
                        icon: "none",
                        position: 'top'
                    })
                    return ;
                }
                this.submitConfirm2();
            },
            // 提交组托请求
            async submitConfirm2() {
                this.repeatClick = true                
                const newArr = this.list.map(item => {
                    
@@ -351,14 +415,91 @@
                    };
                });
                const requestData = {
                    items: newArr,
                    barcode: this.container,
                };
                const {
                    code,
                    data,
                    msg
                } = await request('/waitPakin/merge', {
                } = await request('/waitPakin/merge', requestData)
                if (code === 200) {
                    uni.showToast({
                        title: '组盘成功'
                    })
                    this.list = []
                    this.barcode = ''
                    this.container = ''
                    this.isconfirm = false
                } else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                        position: 'top'
                    })
                }
                this.repeatClick = false
            },
            // 关闭AGV确认弹窗
            closeAgvModal() {
                this.showAgvModal = false;
            },
            // 选择不需要AGV
            handleAgvNo() {
                this.showAgvModal = false;
                this.submitConfirm('');
            },
            // 选择需要AGV
            handleAgvYes() {
                this.showAgvModal = false;
                this.agvStationInput = '';
                this.showAgvInputModal = true;
            },
            // 关闭AGV站点输入弹窗
            closeAgvInputModal() {
                this.showAgvInputModal = false;
                this.agvStationInput = '';
            },
            // 确认AGV站点
            confirmAgvStation() {
                if (this.agvStationInput.trim() === '') {
                    uni.showToast({
                        title: "AGV站点不能为空",
                        icon: "none",
                        position: 'top'
                    });
                    return;
                }
                this.showAgvInputModal = false;
                this.submitConfirm(this.agvStationInput);
            },
        // 提交组托请求
        async submitConfirm(agvStation) {
            this.repeatClick = true
            const newArr = this.list.map(item => {
                return {
                    ...item,
                    anfme: item.anfme === null ? 0 : +item.anfme,
                };
            });
            const requestData = {
                    items: newArr,
                    barcode: this.container,                    
                })
            };
            // 如果有AGV站点,添加到请求参数中
            if (agvStation) {
                requestData.agvStation = agvStation;
            }
            const {
                code,
                data,
                msg
            } = await request('/waitPakin/merge/v2', requestData)
                if (code === 200) {
                    uni.showToast({
                        title: '组盘成功'
@@ -396,7 +537,6 @@
    .text-blue {
        color: #0081ff !important;
    }
    .act {
@@ -409,4 +549,110 @@
        min-height: 80upx;
        align-items: center;
    }
    /* 弹窗遮罩层 */
    .modal-mask {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 999;
    }
    /* 弹窗容器 */
    .modal-container {
        width: 600rpx;
        background-color: #ffffff;
        border-radius: 24rpx;
        overflow: hidden;
        box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.15);
    }
    /* 弹窗头部 */
    .modal-header {
        padding: 40rpx 30rpx 20rpx;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
    }
    .modal-title {
        font-size: 34rpx;
        font-weight: bold;
        color: #333;
        /* margin-top: 16rpx; */
    }
    /* 弹窗内容 */
    .modal-body {
        padding: 40rpx 30rpx;
    }
    .modal-message {
        font-size: 30rpx;
        color: #666;
        text-align: center;
        display: block;
    }
    /* 输入框容器 */
    .input-wrapper {
        background-color: #f5f7fa;
        border-radius: 12rpx;
        padding: 20rpx;
        border: 2rpx solid #e4e7ed;
    }
    .agv-input {
        width: 100%;
        height: 70rpx;
        font-size: 30rpx;
        color: #333;
        background-color: transparent;
    }
    /* 弹窗底部按钮 */
    .modal-footer {
        display: flex;
        border-top: 1rpx solid #eee;
    }
    .modal-btn {
        flex: 1;
        height: 100rpx;
        line-height: 100rpx;
        font-size: 32rpx;
        border: none;
        border-radius: 0;
        background-color: #fff;
    }
    .modal-btn::after {
        border: none;
    }
    .modal-btn-cancel {
        color: #999;
        border-right: 1rpx solid #eee;
    }
    .modal-btn-confirm {
        color: #fff;
        background: linear-gradient(135deg, #0081ff 0%, #1890ff 100%);
        font-weight: bold;
    }
    .modal-btn-confirm:active {
        background: linear-gradient(135deg, #0070dd 0%, #1480e8 100%);
    }
    .modal-btn-cancel:active {
        background-color: #f5f5f5;
    }
</style>