OCR出库
This commit is contained in:
		
							parent
							
								
									3d83968969
								
							
						
					
					
						commit
						bc124fb907
					
				| 
						 | 
					@ -740,21 +740,16 @@ export default {
 | 
				
			||||||
          title: '加载中...',
 | 
					          title: '加载中...',
 | 
				
			||||||
          mask: true,
 | 
					          mask: true,
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        let res = null
 | 
					        const res = await getDeviceListAPINew({ maCode: this.queryCodeParams.maCode })
 | 
				
			||||||
        if (this.queryParams?.jiJuType == 2) {
 | 
					 | 
				
			||||||
          res = await getDeviceListAPINew(this.queryCodeParams.maCode)
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          res = await getDeviceListAPI(this.queryCodeParams.maCode)
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        console.log('🚀 ~ getCode ~ res:', res)
 | 
					        console.log('🚀 ~ getCode ~ res:', res)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (res.code === 200 && res.data && res.data.length > 0) {
 | 
					        if (res.code === 200 && res.data && res.data.length > 0) {
 | 
				
			||||||
          this.optionList = response.data.map((option) => ({
 | 
					          this.optionList = res.data.map((option) => ({
 | 
				
			||||||
            value: option.maId,
 | 
					            value: option.maId,
 | 
				
			||||||
            text: option.maCode,
 | 
					            text: option.maCode,
 | 
				
			||||||
          }))
 | 
					          }))
 | 
				
			||||||
          if (response.data.length === 1) {
 | 
					          if (res.data.length === 1) {
 | 
				
			||||||
            this.codeData = response.data[0]
 | 
					            this.codeData = res.data[0]
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          uni.showToast({
 | 
					          uni.showToast({
 | 
				
			||||||
| 
						 | 
					@ -774,12 +769,7 @@ export default {
 | 
				
			||||||
    async changeTag() {
 | 
					    async changeTag() {
 | 
				
			||||||
      if (!this.queryCodeParams.maId) return
 | 
					      if (!this.queryCodeParams.maId) return
 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
        let res = null
 | 
					        const res = await getDeviceListAPINew({ maId: this.queryCodeParams.maId })
 | 
				
			||||||
        if (this.queryParams?.jiJuType == 2) {
 | 
					 | 
				
			||||||
          res = await getDeviceListAPINew({ maId: this.queryCodeParams.maId })
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          res = await getDeviceListAPI({ maId: this.queryCodeParams.maId })
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (res.data && res.data.length !== 0) {
 | 
					        if (res.data && res.data.length !== 0) {
 | 
				
			||||||
          this.codeData = res.data[0]
 | 
					          this.codeData = res.data[0]
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -740,21 +740,16 @@ export default {
 | 
				
			||||||
          title: '加载中...',
 | 
					          title: '加载中...',
 | 
				
			||||||
          mask: true,
 | 
					          mask: true,
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        let res = null
 | 
					        const res = await getDeviceListAPINew({ maCode: this.queryCodeParams.maCode })
 | 
				
			||||||
        if (this.queryParams?.jiJuType == 2) {
 | 
					 | 
				
			||||||
          res = await getDeviceListAPINew(this.queryCodeParams.maCode)
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          res = await getDeviceListAPI(this.queryCodeParams.maCode)
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        console.log('🚀 ~ getCode ~ res:', res)
 | 
					        console.log('🚀 ~ getCode ~ res:', res)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (res.code === 200 && res.data && res.data.length > 0) {
 | 
					        if (res.code === 200 && res.data && res.data.length > 0) {
 | 
				
			||||||
          this.optionList = response.data.map((option) => ({
 | 
					          this.optionList = res.data.map((option) => ({
 | 
				
			||||||
            value: option.maId,
 | 
					            value: option.maId,
 | 
				
			||||||
            text: option.maCode,
 | 
					            text: option.maCode,
 | 
				
			||||||
          }))
 | 
					          }))
 | 
				
			||||||
          if (response.data.length === 1) {
 | 
					          if (res.data.length === 1) {
 | 
				
			||||||
            this.codeData = response.data[0]
 | 
					            this.codeData = res.data[0]
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          uni.showToast({
 | 
					          uni.showToast({
 | 
				
			||||||
| 
						 | 
					@ -774,12 +769,7 @@ export default {
 | 
				
			||||||
    async changeTag() {
 | 
					    async changeTag() {
 | 
				
			||||||
      if (!this.queryCodeParams.maId) return
 | 
					      if (!this.queryCodeParams.maId) return
 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
        let res = null
 | 
					        const res = await getDeviceListAPINew({ maId: this.queryCodeParams.maId })
 | 
				
			||||||
        if (this.queryParams?.jiJuType == 2) {
 | 
					 | 
				
			||||||
          res = await getDeviceListAPINew({ maId: this.queryCodeParams.maId })
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          res = await getDeviceListAPI({ maId: this.queryCodeParams.maId })
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if (res.data && res.data.length !== 0) {
 | 
					        if (res.data && res.data.length !== 0) {
 | 
				
			||||||
          this.codeData = res.data[0]
 | 
					          this.codeData = res.data[0]
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue