123
zhang
2025-05-30 e9ae77e42ca35e30de229663a72ca899aaf9046e
pages/phyz/checkLocDetl/locDetl.vue
@@ -11,7 +11,7 @@
            <view>货架码:{{containerDetl.barcode}}</view>
            <view>库存品类:{{containerDetl.count}}</view>
         </view>
         <view class="list-right" @click="goToLocDetl(containerDetl)">
         <view class="list-right" @click="goToLocDetl(containerDetl,'con')">
            <uni-icons type="right" size="25"  color="#fff"></uni-icons>
         </view>
      </view>
@@ -23,7 +23,7 @@
            <view>货架码:{{locDetl.barcode}}</view>
            <view>库存品类:{{locDetl.count}}</view>
         </view>
         <view class="list-right" @click="goToLocDetl(locDetl)">
         <view class="list-right" @click="goToLocDetl(locDetl,'loc')">
            <uni-icons type="right" size="25"  color="#fff"></uni-icons>
         </view>
      </view>
@@ -44,8 +44,8 @@
                  </view>
               </view>
               <view class="btn">
                  <view class="btn-left" @click="changeClose()">取消</view>
                  <view class="btn-right" @click="changeCount()">修改</view>
                  <button class="btn-left" @click="changeClose()">取消</button>
                  <button class="btn-right" @click="changeCount()" :disabled="changeDis">修改</button>
               </view>
            </view>
         </uni-popup>
@@ -54,7 +54,7 @@
      <!-- 底部操作按钮 -->
      <view class="buttom">
         <button size="mini" type="primary" @click="changeSts('warn')">更改库位状态</button>
         <button size="mini" type="primary" @click="changeStart('warn')">纠正库位</button>
         <button size="mini" type="primary" @click="changeStart('warn')" :disabled="changeStartDis">纠正库位</button>
      </view>
   </view>
</template>
@@ -90,7 +90,9 @@
               {title: 'O.空库位',val: 'O'},
               {title: 'X.禁用',val: 'X'},
            ],
            sourceLoc: ''
            sourceLoc: '',
            changeDis: false,
            changeStartDis: false
         }
      },
      onShow() {
@@ -120,7 +122,6 @@
               method: 'POST',
               success(res) {
                  res = res.data
                  console.log(res);
                  if (res.code === 200) {
                     if (res.data.containerCode.length > 0) {
                        _this.dataList = res.data.containerCode
@@ -150,7 +151,7 @@
               }
            })
         },
         goToLocDetl(item) {
         goToLocDetl(item,type) {
            let _this = this
            if (item.data.length <= 0) {
               uni.showToast({ title: '没有库存', icon: "error", position: 'top' })
@@ -160,8 +161,11 @@
               url: "./locDetlList",
               success: function(res) {
                  // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                  res.eventChannel.emit('item', {
                     item: item
                  // res.eventChannel.emit('item', {
                  //    item: item
                  // })
                  res.eventChannel.emit('baseInfo', {
                     info: {locNo:_this.locNo,barcode:_this.barcode,type: type}
                  })
               },
               events: {
@@ -206,6 +210,7 @@
                  _this.sourceLoc[key] = ''
               }
            })
            _this.changeDis = true
            uni.request({
               url: `${_this.baseUrl}/agv/locMast/update/auth`,
               header: {
@@ -216,6 +221,7 @@
               method: 'POST',
               success(res) {
                  res = res.data
                  _this.changeDis = false
                  if (res.code === 200) {
                     uni.showToast({ title: res.msg, icon: "success", position: 'top' })
                     _this.$refs.chageDetl.close()
@@ -228,11 +234,15 @@
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               },
               fail(res) {
                  _this.changeDis = false
               }
            })
         },
         changeStart() {
            let _this = this
            _this.changeStartDis = true
            let param = {locNo:_this.locNo,containerCode: _this.barcode}
            uni.request({
               url: `${_this.baseUrl}/agvMobile/update/detl/v1`,
@@ -241,6 +251,7 @@
               method: 'POST',
               success(res) {
                  res = res.data
                  _this.changeStartDis = false
                  if (res.code === 200) {
                     uni.showToast({ title: res.msg, icon: "success", position: 'top' })
                     _this.$refs.chageDetl.close()
@@ -253,6 +264,9 @@
                  } else {
                     uni.showToast({ title: res.msg, icon: "error", position: 'top' })
                  }
               },
               fail(res) {
                  _this.changeStartDis = false
               }
            })
         }