skyouc
2025-01-17 8b8e38d50c96bedbacc7f8a6ca73f5d7f0393777
pages/order/orderOutConfirm.vue
@@ -21,7 +21,7 @@
      <view class="list-view">
         <scroll-view style="overflow: hidden;overflow-y: scroll;height: auto;">
            <checkbox-group @change="checkboxChange">
               <label class="order__list" v-for="(item, index) in range" :key="index">
               <label :class="item.workQty == item.anfme ? 'order__list' : 'order-list-cell'"  v-for="(item, index) in range" :key="index">
                  <view class="order__list__right">
                     <checkbox :value="item.id" :checked="item.checked" style="transform:scale(0.7)" />
                  </view>
@@ -46,7 +46,7 @@
      <view>
         <uni-popup ref="combConfirm" type="dialog">
            <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
               @confirm="comb" @close="combClose"></uni-popup-dialog>
               @confirm="shippingConfirm" @close="combClose"></uni-popup-dialog>
         </uni-popup>
      </view>
      <view>
@@ -69,7 +69,7 @@
            messageText: '',
            title: '',
            content: '',
            dataList: [{}],
            shipping: [],
            barcode: '',
            matFocus: '',
            value: '0',
@@ -86,7 +86,7 @@
            let that = this
            setTimeout(() => {
               that.getOrderDetl()
            }, 600)
            }, 700)
         },
         /**
          * 获取发货订单明细信息
@@ -121,7 +121,6 @@
                  }
               },
               complete() {
                  that.resst()
                  that.$toast.hideLoading()
               }
            });
@@ -132,6 +131,7 @@
          */
         resst() {
            this.orderNo = ''
            this.shipping = []
         },
         /**
          * checkbox选中事件
@@ -162,6 +162,60 @@
               this.range.map(item => {
                  return item.checked = true
               })
            }
         },
         //确认发货
         shippinged() {
            if (this.orderNo == undefined || this.orderNo == null || this.orderNo.trim() == '') {
               this.messageToggle('error', '订单编码不能为空!!')
               return
            }
            let that = this
            this.$toast.loading('加载中...')
            uni.request({
               url: that.baseUrl + '/pda/shipping/confirm',
               data: JSON.stringify(that.shipping),
               method: 'POST',
               header: {
                  'token': uni.getStorageSync('token')
               },
               success(result) {
                  var res = result.data
                  if (res.code === 200) {
                     that.messageToggle('success', '发货成功!!')
                     that.range = res.data.map(item => {
                        return {...item, checked: true}
                     })
                  } else {
                     that.messageText = res.msg
                     that.messageToggle('error')
                  }
               },
               complete() {
                  that.resst()
                  that.$toast.hideLoading()
               }
            });
         },
         combConfirm() {
            this.dialogToggle('dialog', '确认', '是否确认发货?')
         },
         shippingConfirm(type) {
            if (this.range == null) {
               this.messageToggle('error', '发货单数据为空!!');
               return
            }
            /**过滤未选中订单明细*/
            this.shipping = this.range.filter(item => {
               return item.checked == true
            })
            if (this.shipping != null && this.shipping.length > 0) {
               this.shippinged()
            }
         },
         
@@ -263,6 +317,19 @@
      background-color: #3eb689;
      color: #FFF;
   }
   .order-list-cell {
      margin: 20rpx;
      font-size: 14px;
      border-radius: 20rpx;
      border: 1px solid #eeeeee;
      display: flex;
      position: relative;
      background-color: #FD4D11;
      color: #FFF;
   }
   .order__list__left {
      flex: 1;
      padding: 20rpx;