#
whycq
2024-05-30 873e64746e0f64889392a34dbe62dc8913d9ecf3
pages/phyz/stationManage/stationDetl.vue
@@ -190,6 +190,23 @@
         </uni-popup>
      </view>
      
      <!-- 弹窗 -->
      <view>
         <uni-popup ref="empIn" type="dialog">
            <view class="popup">
               <!-- 标题 -->
               <view class="title">请输入货架码</view>
               <view class="popup-item">
                  <view class="popup-item-left">货架码:</view>
                  <view class="popup-item-right"><input type="text" v-model="barcode"></view>
               </view>
               <view class="btn">
                  <view class="btn-left" @click="empInClose">取消</view>
                  <view class="btn-right" @click="empInConfirm()">确认进场</view>
               </view>
            </view>
         </uni-popup>
      </view>
      
      
      <!-- 底部操作按钮 -->
@@ -206,6 +223,8 @@
         <button size="mini" type="primary" @click="startPakin()" v-if="btnType == 'start'">启动入库</button>
         <button size="mini" type="primary" @click="allocationOut()" v-if="btnType == 'allocationOut'">调拨离场</button>
         <button size="mini" type="primary" @click="allocationIn()" v-if="btnType == 'allocationIn'">调拨进场</button>
         <button size="mini" type="primary" @click="empOut()" v-if="btnType == 'empOut'">空架离场</button>
         <button size="mini" type="primary" @click="empIn()" v-if="btnType == 'allocationIn'">空架进场</button>
      </view>
   </view>
</template>
@@ -476,7 +495,10 @@
                        } else if (wrkMast.ioType == 112) {
                           wrkMast['ioTitle'] = '调拨入库'
                           _this.btnType = 'null'
                        }
                        } else if (wrkMast.ioType == 113) {
                           wrkMast['ioTitle'] = '货架回流'
                           _this.btnType = 'empOut'
                        }
                        if (wrkMast.barcode == barcode) {
                           mast = wrkMast
                        }
@@ -721,6 +743,34 @@
               }
            });
         },
         // 空架离场
         empOut() {
            let that = this
            let params = []
            let param = { devNo: this.station.devNo, containerCode: this.station.barcode, }
            params.push(param)
            uni.request({
               url: that.baseUrl + '/agvMobile/hand/control/empOut',
               header: {'token': uni.getStorageSync('token')},
               data: {devNo: that.station.devNo},
               method: 'POST',
               success(result) {
                  var res = result.data
                  if (res.code === 200) {
                     setTimeout(()=> {
                        that.barcode = ''
                        that.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' })
                  }
               }
            });
         },
         allocationIn() {
            this.$refs.allocationIn.open()
         },
@@ -755,6 +805,40 @@
               }
            });
         },
         empIn() {
            this.$refs.empIn.open()
         },
         empInClose() {
            this.$refs.empIn.close()
         },
         empInConfirm() {
            let that = this
            let params = []
            let param = { devNo: this.station.devNo, containerCode: this.station.barcode, }
            params.push(param)
            uni.request({
               url: that.baseUrl + '/agvMobile/hand/control/empIn',
               header: {'token': uni.getStorageSync('token')},
               data: {devNo: that.station.devNo, barcode: that.barcode},
               method: 'POST',
               success(result) {
                  var res = result.data
                  if (res.code === 200) {
                     that.$refs.empIn.close()
                     setTimeout(()=> {
                        that.barcode = ''
                        that.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' })
                  }
               }
            });
         },
         doBack() {
            this.$refs.doBack.open()
         },