jiangping
2023-10-16 d7fe8ae3888c8e2b1eea3c1e3769be0d42a21cc9
minipro_standard/pages/OutOperation/OutOperation.vue
@@ -208,7 +208,8 @@
      onLoad(option) {
         this.type = option.type
         this.id = option.id
         this.isZKD = this.type == QRCodeType.ZKD
         this.isZKD = this.type == QRCodeType.ZKD
         this.dbid = option.dbid
         if (option.dbid) {
            this.getDBs(option.dbid)
         } else {
@@ -242,16 +243,16 @@
            } else if (this.type == QRCodeType.ZKD) {
               infoAction = wTransferForInOut
               data.wTransferType = '0'
            }
            }
            infoAction(data).then(res => {
               // this.warehouseId = this.info.wtransferWarehouseList[0].warehouseId
               console.log(this.type == QRCodeType.ZKD);
               if (this.isZKD) {
                  this.info = res.data.wtransfer
                  this.warehouseList = res.data.wtransferWarehouseList
                  this.warehouseList = res.data.wtransferWarehouseList
                  this.warehouseId = this.warehouseList[0].warehouseId
               } else {
                  this.info = res.data.woutbound
                  this.woutboundDetailsWait = res.data.woutboundDetailsWait
                  this.woutboundDetailsWait = res.data.woutboundDetailsWait
                  this.warehouseId = this.woutboundDetailsWait[0].warehouseId
               }
            }).catch(err => {
               uni.$u.toast(err)
@@ -270,31 +271,38 @@
         selectMaterail(v) {
            let tempList = this.warehouseList[0].wtransferDetailList
            let materials = v.materials
            materials.forEach(materail => {
               tempList.forEach(item => {
                  if (materail.materialId == item.materialId && materail.procedureId == item
                     .procedureId && materail.qualityType == item.qualityType && materail.batch ==
                     item.batch) {
                     let isExist = false
                     this.outboundList.forEach(selected => {
                        if (selected.newId == materail.id) {
                           isExist = true
                           return
                        }
                     })
                     if (isExist) {
                        uni.$u.toast('该物料批次已存在')
                        return
                     }
                     let obj = JSON.parse(JSON.stringify(materail))
                     obj.newId = item.id
                     this.outboundList.push(obj)
                  }
            materials.forEach(materail => {
               tempList.forEach(item => {
                  item.wstockExtListVOList.forEach(hw => {
                     if (materail.materialId == hw.materialId && materail.procedureId == hw
                        .procedureId && materail.qualityType == hw.qualityType && materail.batch ==
                        hw.batch) {
                        let isExist = false
                        this.outboundList.forEach(selected => {
                           if (selected.newId == materail.id) {
                              isExist = true
                              return
                           }
                        })
                        if (isExist) {
                           uni.$u.toast('该物料批次已存在')
                           return
                        }
                        let obj = JSON.parse(JSON.stringify(materail))
                        obj.newId = item.id
                        this.outboundList.push(obj)
                     }
                  })
               })
            })
         },
         dele(index) {
             this.outboundList.splice(index, 1)
         },
         submit() {
         submit() {
            if (this.type == QRCodeType.ZKD) {
               if (this.outboundList.length > 0) {
                  let result = this.outboundList.reduce((a, b) => {
@@ -344,8 +352,14 @@
                     wtransferId: this.id
                  }).then(res => {
                     if (res.code === 200) {
                        this.$store.dispatch.dispatch('getUpcomingNum')
                        uni.$u.toast('操作成功')
                        this.$store.dispatch('getUpcomingNum')
                        uni.$u.toast('操作成功')
                        uni.redirectTo({
                           url: `/pages/warehousingDetails/warehousingDetails?id=${this.info.id}&dbid=${this.dbid}`
                        })
                        // uni.redirectTo({
                        //    url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.info.id}&dbid=${this.dbid}`
                        // })
                        // setTimeout(() => {
                        //   router.replace({ name: 'wTransferDetail', query: { id: info.value.wtransfer.id, dbid: route.query.dbid } })
                        // }, 2000)
@@ -360,8 +374,11 @@
                  wOutboundType: 0
               }).then(res => {
                  if (res.code === 200) {
                     this.$store.dispatch.dispatch('getUpcomingNum')
                     uni.$u.toast('操作成功')
                     this.$store.dispatch('getUpcomingNum')
                     uni.$u.toast('操作成功')
                     uni.redirectTo({
                        url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.info.id}`
                     })
                     // setTimeout(() => {
                     //   // router.go(-1)
                     //   router.replace({ name: 'wOutboundDetail', query: { id: info.value.wtransfer.id } })
@@ -733,7 +750,7 @@
      bottom: 0;
      left: 30rpx;
      padding-bottom: 68rpx;
      z-index: 9999;
      .page_footer_qr {
         flex: 1;
         height: 88rpx;