#
whycq
2024-04-05 83f35c6890374a14270b297cb5645582a8107637
#
2个文件已修改
175 ■■■■■ 已修改文件
pages/phyz/stationManage/stationDetl.vue 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/stationManage/stationManage.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/phyz/stationManage/stationDetl.vue
@@ -15,8 +15,16 @@
            </view>
        </view>
        
        <!-- 工作档 -->
        <view class="wrkMast">
            <view >工作号</view>
            <view>工作类型</view>
            <view>源库位</view>
        </view>
        <!-- 弹窗 -->
        <!-- 修改数量 -->
        <view>
            <uni-popup ref="emptyPakin" type="dialog">
                <view class="popup">
@@ -34,13 +42,36 @@
            </uni-popup>
        </view>
        
        <!-- 弹窗 -->
        <view>
            <uni-popup ref="emptyOut" type="dialog">
                <view class="popup">
                    <!-- 标题 -->
                    <view class="title">请选择货架类型</view>
                    <view class="popup-item">
                        <view class="dropdown" @click="toggleDropdown()">
                            <input type="text" style="width: 650rpx;" v-model="containerType"  placeholder="请选择货架类型">
                            <uni-icons :type="isOpen ? 'top' : 'bottom'" color="#c1c1c1" style="margin-left: 10rpx;"></uni-icons>
                            <scroll-view scroll-y="ture" class="dropdown-content" v-if="isOpen">
                                <view class="dropdown-item" v-for="option in selects" @click="selected(option)">{{option}}</view>
                            </scroll-view>
                        </view>
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="emptyOutClose">取消</view>
                        <view class="btn-right" @click="emptyOutConfirm()">出库</view>
                    </view>
                </view>
            </uni-popup>
        </view>
        
        
        
        <!-- 底部操作按钮 -->
        <view class="buttom">
            <button size="mini" type="primary" @click="emptyPakin()" v-if="btnType == 'emptyPakin'">空板入库</button>
            <button size="mini" type="primary" @click="emptyPakin()" v-if="btnType == 'emptyPakin'">空板入库</button>
            <button size="mini" type="primary" @click="emptyOut()" v-if="btnType == 'emptyPakin'">呼叫空板</button>
            <button size="mini" type="primary" @click="containerMoveOut()" v-if="btnType == 'out'">确认出库</button>
            <button size="mini" type="primary" @click="pickIn()" v-if="btnType == 'pick'">已拣料回库</button>
        </view>
@@ -57,7 +88,11 @@
                    loadingText: '更新状态'
                },
                btnType: 'emptyPakin',
                barcode: ''
                barcode: '',
                containerType: '',
                selects: [],
                option: '',
                isOpen: false
            }
        },
        onShow() {
@@ -87,6 +122,7 @@
                    success(res) {
                        res = res.data
                        if (res.code === 200) {
                            if (res.data.records[0].locSts == 'O') {
                                _this.btnType = 'emptyPakin' 
                            } else if (res.data.records[0].locSts == 'F') {
@@ -94,6 +130,7 @@
                            } else {
                                _this.btnType = 'working' 
                            }
                            setTimeout(()=>{
                                for  (let k of res.data.records) {
                                    if (k.locSts != 'O') {
@@ -105,7 +142,10 @@
                                _this.station = res.data.records[0]
                                _this.reload.loading = false
                                _this.reload.loadingText = '更新状态'
                                _this.getContainerType()
                            },500)
                            _this.getWrkMast()
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                            setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
@@ -148,18 +188,22 @@
                this.$refs.emptyPakin.close()
            },
            emptyPakinConfirm() {
                this.emptyPakinClose()
                let _this = this;
                if (this.barcode.length != 6) {
                    uni.showToast({ title: '货架条码异常', icon: "error", position: 'top' })
                    return
                }
                let params = []
                let param = { devNo: this.station.devNo, containerCode: this.barcode, }
                params.push(param)
                this.emptyPakinClose()
                uni.request({
                    url: `${_this.baseUrl}/agvMobile/pakin/empty/auth`,
                    data: { pad: params },
                    method: 'POST',
                    header: { 'token': uni.getStorageSync('token') },
                    success(res) {
                        var res = result.data
                        var res = res.data
                        if (res.code === 200) {
                            setTimeout(()=> {
                                _this.barcode = ''
@@ -174,7 +218,87 @@
                        }
                    }
                });
            },
            emptyOut() {
                this.$refs.emptyOut.open()
            },
            emptyOutClose() {
                this.$refs.emptyOut.close()
            },
            emptyOutConfirm() {
                this.emptyOutClose()
                let _this = this;
                let params = []
                let param = { devNo: this.station.devNo, containerType: this.containerType, }
                params.push(param)
                uni.request({
                    url: `${_this.baseUrl}/agvMobile/pakout/empty/auth`,
                    data: { pad: params },
                    method: 'POST',
                    header: { 'token': uni.getStorageSync('token') },
                    success(res) {
                        var res = result.data
                        if (res.code === 200) {
                            setTimeout(()=> {
                                _this.containerType = ''
                                _this.reloadStation()
                            },1000)
                            uni.showToast({ title: '呼叫成功', icon: "success", position: 'top' })
                        } else if (res.code == 403) {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                            setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
                        } else {
                            uni.showToast({ title: res.msg, icon: "error", position: 'top' })
            }
                    }
                });
            },
            getContainerType() {
                let _this = this
                uni.request({
                    url: `${_this.baseUrl}/agvMobile/pakout/empty/container/selector/auth`,
                    header: {'token': uni.getStorageSync('token')},
                    data: JSON.stringify({devNo: _this.station.devNo}),
                    method: 'POST',
                    success(res) {
                        res = res.data
                        if (res.code === 200) {
                            _this.selects = res.data
                        }
                        console.log(res);
                    }
                })
            },
            // 开启 / 关闭下拉框
            toggleDropdown() {
                this.isOpen = !this.isOpen
            },
            // 选择货架类型
            selected(option) {
                this.containerType = option
            },
            // 查询工作档
            getWrkMast() {
                let _this = this
                uni.request({
                    url: `${_this.baseUrl}/agv/wrkMast/list/auth`,
                    header: {'token': uni.getStorageSync('token')},
                    data: {
                        curr: 1,
                        limit: 1000,
                        condition:  _this.station.devNo
                    },
                    method: 'GET',
                    success(res) {
                        res = res.data
                        if (res.code === 200) {
                            for (let item of res.data.records) {
                            }
                        }
                    }
                })
            },
        }
    }
</script>
@@ -205,11 +329,21 @@
    }
    
    
    .wrkMast {
    }
    .popup {
        width: 80vw;
        min-height: 100rpx;
        background-color: #FFF;
        border-radius: 25rpx;
        position: relative;
    }
    .title {
        height: 100rpx;
@@ -220,6 +354,7 @@
        font-size: 16px;
    }
    .popup-item {
        position: relative;
        height: 80rpx;
        line-height: 80rpx;
        display: flex;
@@ -268,4 +403,29 @@
        align-items: center;
        color: #409EFF;
    }
    .dropdown {
        position: relative;
        display: flex;
        width: 93%;
        align-items: center;
        padding: 0rpx 20rpx;
    }
    .dropdown-content {
        position: absolute;
        top: calc(100% + 15rpx);
        left: 0;
        width: calc(100% - 20rpx);
        max-height: 300rpx;
        background-color: #fff;
        box-shadow: 0 0px 6px rgba(0, 0, 0, 0.3);
        border-radius: 8rpx;
        z-index: 10;
    }
    .dropdown-item {
        padding: 12rpx;
        line-height: 1.2;
        font-size: 22px;
        color: #3a3a3a;
    }
</style>
pages/phyz/stationManage/stationManage.vue
@@ -118,13 +118,10 @@
                option: 'pick'
            }
        },
        onLoad() {
        onShow() {
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
            this.getBasDevp('all')
        },
        onShow() {
        },
        methods: {
            searchValueInput() {