#
whycq
2025-02-07 6edc1c4e1df51e69a264e092addf8fa50ebc2a91
pages/phyz/stationManage/confirmProcessed.vue
@@ -45,7 +45,7 @@
               <view class="title">出库数量</view>
               <view class="popup-item">
                  <view>
                     <uni-number-box :value="data.anfme" :step='1' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
                     <uni-number-box :value="data.anfme" :step='0.01' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
                  </view>
                  
               </view>
@@ -77,6 +77,12 @@
                  <view class="popup-item-left">站点号:</view>
                  <view class="popup-item-right"><input type="text" v-model="devNo"></view>
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">目标楼层:</view>
                  <view class="popup-item-right" style="border: none;">
                     <uni-combox style="height: 50rpx;" :candidates="floorList" placeholder="请选择目标楼层" v-model="floor">
                  </uni-combox></view>
               </view>
               <view class="btn">
                  <button class="btn-left" @click="processedClose">取消</button>
                  <button class="btn-right" @click="processedConfirm()" :disabled="processedDis">加工完成</button>
@@ -99,6 +105,8 @@
            baseUrl: '',
            token: '',
            dataList: [],
            floorList:['二厂','三厂'],
            floor: '',
            count: 0,
            containerType: '',
            isOpen: true,
@@ -120,13 +128,52 @@
         const eventChannel = this.getOpenerEventChannel();
         // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
         eventChannel.on('item', function(data) {
            console.log(data);
            for (let k of data.item) {
               k['maxCount'] = k.anfme
               _this.getWrkDetl(k.wrkNo)
            }
            _this.dataList = require('lodash').cloneDeep(data.item)
            // _this.dataList = require('lodash').cloneDeep(data.item)
         })
      },
      methods: {
         // 获取工作明细
         getWrkDetl(wrkNo) {
            let _this = this
            uni.request({
               url: `${_this.baseUrl}/agv/wrkDetl/list/auth`,
               header: {'token': uni.getStorageSync('token')},
               data: {
                  curr: 1,
                  limit: 1000,
                  wrk_no: wrkNo
               },
               method: 'GET',
               success(res) {
                  res = res.data
                  if (res.code === 200) {
                     for (let k of res.data.records) {
                        k['maxCount'] = k.anfme
                        if (k.threeCode) {
                           if (k.threeCode.includes("B")) {
                              _this.floor = '二厂'
                           } else if (k.threeCode.includes("G")) {
                              _this.floor = '三厂'
                           } else {
                              _this.floor = ''
                           }
                        }
                     }
                     _this.dataList = res.data.records
                  } 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' })
                  }
               }
            })
         },
         processed() {
            this.$refs.process.open()
         },
@@ -134,12 +181,22 @@
            this.$refs.process.close()
         },
         processedConfirm() {
            let factor = ''
            if (!this.floor) {
               uni.showToast({ title: '请选择楼层', icon: "error", position: 'top' })
               return
            }
            if (this.floor == '二厂') {
               factor = 'B'
            } else if (this.floor == '三厂') {
               factor = 'G'
            }
            this.processedDis = true
            let that = this
            uni.request({
               url: that.baseUrl + '/agvMobile/hand/control/processed',
               url: that.baseUrl + '/agvMobile/hand/control/processed/v2',
               header: {'token': uni.getStorageSync('token')},
               data: {devNo: that.devNo, barcode: that.barcode,wrkDetls:that.dataList},
               data: {devNo: that.devNo, barcode: that.barcode,wrkDetls:that.dataList,factory: factor},
               method: 'POST',
               success(result) {
                  that.processedDis = false
@@ -295,7 +352,7 @@
      justify-content: center;
   }
   .popup-item-left {
      width: 16vw;
      /* width: 16vw; */
      padding-right: 20rpx;
      text-align: right;
      color: #606266;
@@ -332,6 +389,7 @@
   .btn-right {
      display: flex;
      flex: 1;
      height: 100%;
      justify-content: center;
      align-items: center;
      color: #409EFF;