| | |
| | | infoAction = wTransferForInOut
|
| | | data.wTransferType = '0'
|
| | | } |
| | | console.log('------');
|
| | | infoAction(data).then(res => {
|
| | | if (this.isZKD) {
|
| | | this.info = res.data.wtransfer
|
| | |
| | | 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) {
|
| | |
| | | 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)
|
| | |
| | | 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}` |