OCR出库

This commit is contained in:
bb_pan 2025-08-12 19:07:07 +08:00
parent 3d83968969
commit bc124fb907
2 changed files with 10 additions and 30 deletions

View File

@ -740,21 +740,16 @@ export default {
title: '加载中...',
mask: true,
})
let res = null
if (this.queryParams?.jiJuType == 2) {
res = await getDeviceListAPINew(this.queryCodeParams.maCode)
} else {
res = await getDeviceListAPI(this.queryCodeParams.maCode)
}
const res = await getDeviceListAPINew({ maCode: this.queryCodeParams.maCode })
console.log('🚀 ~ getCode ~ res:', res)
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,
text: option.maCode,
}))
if (response.data.length === 1) {
this.codeData = response.data[0]
if (res.data.length === 1) {
this.codeData = res.data[0]
}
} else {
uni.showToast({
@ -774,12 +769,7 @@ export default {
async changeTag() {
if (!this.queryCodeParams.maId) return
try {
let res = null
if (this.queryParams?.jiJuType == 2) {
res = await getDeviceListAPINew({ maId: this.queryCodeParams.maId })
} else {
res = await getDeviceListAPI({ maId: this.queryCodeParams.maId })
}
const res = await getDeviceListAPINew({ maId: this.queryCodeParams.maId })
if (res.data && res.data.length !== 0) {
this.codeData = res.data[0]
}

View File

@ -740,21 +740,16 @@ export default {
title: '加载中...',
mask: true,
})
let res = null
if (this.queryParams?.jiJuType == 2) {
res = await getDeviceListAPINew(this.queryCodeParams.maCode)
} else {
res = await getDeviceListAPI(this.queryCodeParams.maCode)
}
const res = await getDeviceListAPINew({ maCode: this.queryCodeParams.maCode })
console.log('🚀 ~ getCode ~ res:', res)
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,
text: option.maCode,
}))
if (response.data.length === 1) {
this.codeData = response.data[0]
if (res.data.length === 1) {
this.codeData = res.data[0]
}
} else {
uni.showToast({
@ -774,12 +769,7 @@ export default {
async changeTag() {
if (!this.queryCodeParams.maId) return
try {
let res = null
if (this.queryParams?.jiJuType == 2) {
res = await getDeviceListAPINew({ maId: this.queryCodeParams.maId })
} else {
res = await getDeviceListAPI({ maId: this.queryCodeParams.maId })
}
const res = await getDeviceListAPINew({ maId: this.queryCodeParams.maId })
if (res.data && res.data.length !== 0) {
this.codeData = res.data[0]
}