#
whycq
2024-04-11 4ad74a8d3a1f4544fec091b4f1b8aba005c5306c
pages/phyz/orderOut/orderList.vue
@@ -15,7 +15,7 @@
                  <view>名称:{{orderDetl.maktx}}</view>
                  <view>库存数量:{{orderDetl.anfme}}</view>
               </view>
               <view class="out-btn">
               <view class="out-btn" @click="pakoutPrive(orderDetl)">
                  <view>出库</view>
               </view>
            </view>
@@ -24,6 +24,28 @@
         <!-- <view class="list-right" @click="goToLocDetl(orderDetl)">
            <uni-icons type="right" size="25"  color="#fff"></uni-icons>
         </view> -->
      </view>
      <!-- 弹窗 -->
      <view>
         <uni-popup ref="pakoutPrive" 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 style="height: 340rpx;text-align: center;color: #b9b9b9;">
@@ -40,9 +62,10 @@
            token: '',
            dataList: [],
            count: 0,
            index: 0,
            barcode: '',
            agvDevp: '',
            containerType: '',
            isOpen: true,
            option: '',
            selects: []
         }
      },
      onShow() {
@@ -86,7 +109,35 @@
                  }
               }
            })
         }
         },
         pakoutPrive() {
            this.$refs.pakoutPrive.open()
         },
         pakout(item) {
            let _this = this
            let items = [item]
            uni.request({
               url: `${_this.baseUrl}/out/pakout/auth`,
               header: { 'token': uni.getStorageSync('token') },
               data: items,
               method: 'POST',
               success(res) {
                  res = res.data
                  console.log(res);
                  if (res.code === 200) {
                  }
               }
            })
         },
         // 开启 / 关闭下拉框
         toggleDropdown() {
            this.isOpen = !this.isOpen
         },
         // 选择货架类型
         selected(option) {
            this.containerType = option
         },
      }
   }
</script>
@@ -124,4 +175,94 @@
      margin-left: 20rpx;
      margin-right: 20rpx;
   }
   .popup {
      width: 80vw;
      min-height: 100rpx;
      background-color: #FFF;
      border-radius: 25rpx;
      position: relative;
   }
   .title {
      height: 100rpx;
      line-height: 100rpx;
      width: 100%;
      color: #606266;
      text-align: center;
      font-size: 16px;
   }
   .popup-item {
      position: relative;
      height: 80rpx;
      line-height: 80rpx;
      display: flex;
      align-items: center;
      font-size: 14px;
   }
   .popup-item-left {
      width: 16vw;
      padding-right: 20rpx;
      text-align: right;
      color: #606266;
   }
   .popup-item-right {
      display: flex;
      align-items: center;
      width: 50vw;
      height: 50rpx;
      padding: 2px 5px;
      border: 1px solid #E4E7ED;
      border-radius: 5rpx;
   }
   .popup-item-right input{
      color: #606266;
   }
   .btn {
      display: flex;
      height: 90rpx;
      margin-top: 20rpx;
      border-top: 1px solid #DCDFE6;
      justify-content: center;
      align-items: center;
   }
   .btn-left {
      display: flex;
      flex: 1;
      height: 100%;
      justify-content: center;
      align-items: center;
      color: #606266;
      border-right: 1px solid #DCDFE6;
   }
   .btn-right {
      display: flex;
      flex: 1;
      justify-content: center;
      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>