Mr.Zhang
2023-09-11 c4bf789deae97a35db17378ae7565cff435bac59
minipro_standard/pages/OutOperation/OutOperation.vue
@@ -244,7 +244,6 @@
               infoAction = wTransferForInOut
               data.wTransferType = '0'
            }
            console.log('------');
            infoAction(data).then(res => {
               if (this.isZKD) {
                  this.info = res.data.wtransfer
@@ -272,29 +271,36 @@
         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() {
            if (this.type == QRCodeType.ZKD) {
@@ -346,11 +352,14 @@
                     wtransferId: this.id
                  }).then(res => {
                     if (res.code === 200) {
                        this.$store.dispatch.dispatch('getUpcomingNum')
                        this.$store.dispatch('getUpcomingNum')
                        uni.$u.toast('操作成功')
                        uni.redirectTo({
                           url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.info.id}&dbid=${this.dbid}`
                        })
                           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)
@@ -365,7 +374,7 @@
                  wOutboundType: 0
               }).then(res => {
                  if (res.code === 200) {
                     this.$store.dispatch.dispatch('getUpcomingNum')
                     this.$store.dispatch('getUpcomingNum')
                     uni.$u.toast('操作成功')
                     uni.redirectTo({
                        url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.info.id}`