#
whycq
2024-04-05 82de02f5d5b50f78176ebdffbe472d66a7d7845c
pages/phyz/order/orderList.vue
@@ -30,9 +30,15 @@
      <view style="height: 100rpx;"></view>
      
      <!-- 底部操作按钮 -->
      <view class="buttom">
      <view class="buttom" v-if="orderType == 'in'">
         <button size="mini" @click="reset('warn')">重置</button>
         <button size="mini" type="primary" @click="combConfirm('warn')">去组托</button>
      </view>
      <!-- 底部操作按钮 -->
      <view class="buttom" v-if="orderType == 'out'">
         <button size="mini" @click="reset('warn')">重置</button>
         <button size="mini" type="primary" @click="combConfirm2('warn')">去出库</button>
      </view>
      
   </view>
@@ -53,6 +59,7 @@
            newDataList: [],
            allCheck: false,
            allCheckBtnTitle: '全选',
            orderType: 'out'
         }
      },
      onLoad() {
@@ -72,7 +79,18 @@
               
            })
            that.getOrderDetl(data.item.id)
            that.orderType = 'in'
         })
         eventChannel.on('item1', function(data) {
            console.log(data);
            that.orderId = data.item.orderId
            console.log(data.item.id);
            uni.setNavigationBarTitle({
               title: data.item.orderNo,
            })
            that.getOrderDetl(data.item.id)
            that.orderType = 'out'
         })
      },
      onShow() {
@@ -85,7 +103,6 @@
         // 订单明细
         getOrderDetl(id) {
            let _this = this
            console.log(id);
            uni.request({
               url: `${_this.baseUrl}/orderDetl/list/auth`,
               header: {'token': uni.getStorageSync('token')},
@@ -99,7 +116,9 @@
                  res = res.data
                  console.log(res);
                  if (res.code === 200) {
                     res.data.records
                     _this.dataList = res.data.records
                     _this.oldDataList = [..._this.dataList]
                  } 
               }
@@ -178,6 +197,7 @@
            let _this = this
            let combList = []
            for (let k of _this.dataList) {
               k['csocode'] = k.threeCode
               if (k.checked) {
                  combList.push(k)
               }
@@ -187,7 +207,29 @@
               return
            }
            uni.navigateTo({
               url: "../AGV/AGVPakin2",
               url: "../AGV/AGVPakin3",
               success: function(res) {
                  // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                  res.eventChannel.emit('mats', {
                     mats: combList
                  })
               },
            });
         },
         combConfirm2(type) {
            let _this = this
            let combList = []
            for (let k of _this.dataList) {
               if (k.checked) {
                  combList.push(k)
               }
            }
            if (combList.length == 0) {
               uni.showToast({ title: '请选择出库商品', icon: "error", position: 'top'})
               return
            }
            uni.navigateTo({
               url: "./preview",
               success: function(res) {
                  // 通过eventChannel向被打开页面传送数据   向另外一个页面传递值的
                  res.eventChannel.emit('mats', {