|
|
@ -29,6 +29,7 @@ import {queryExternalLabelTemplate} from '../../../api/part/externalLabelTemplat |
|
|
import {download} from '../../../api/oss/oss' |
|
|
import {download} from '../../../api/oss/oss' |
|
|
import {savePartInfoByExcel} from '../../../api/part/external' |
|
|
import {savePartInfoByExcel} from '../../../api/part/external' |
|
|
import {importSerialNumber} from '../../../api/print/print' |
|
|
import {importSerialNumber} from '../../../api/print/print' |
|
|
|
|
|
import {printAntennaAutoSNLabel} from '../../../printFormat/hardwareAntennaAutoSN' |
|
|
|
|
|
|
|
|
const printer = { |
|
|
const printer = { |
|
|
customerNo: '', |
|
|
customerNo: '', |
|
|
@ -860,6 +861,9 @@ export default { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
let labelList = data.rows |
|
|
let labelList = data.rows |
|
|
let icons = this.base64List.map((item)=>{return{icon: item,}}) |
|
|
let icons = this.base64List.map((item)=>{return{icon: item,}}) |
|
|
|
|
|
|
|
|
|
|
|
// 2025-05-14 将组装好的打印对象存储到集合 |
|
|
|
|
|
let printLabel = []; |
|
|
for (let i = 0; i < labelList.length; i++) { |
|
|
for (let i = 0; i < labelList.length; i++) { |
|
|
let item = labelList[i]; |
|
|
let item = labelList[i]; |
|
|
let params = { |
|
|
let params = { |
|
|
@ -894,19 +898,32 @@ export default { |
|
|
} |
|
|
} |
|
|
let qrCodeList = this.$refs.qrCode.init([params.qrCode]) |
|
|
let qrCodeList = this.$refs.qrCode.init([params.qrCode]) |
|
|
params.qrCode = qrCodeList[0] |
|
|
params.qrCode = qrCodeList[0] |
|
|
|
|
|
|
|
|
|
|
|
// 2025-05-14 添加到集合中 --其他保留原来方案 |
|
|
|
|
|
// 天线标签 && 有SN && 自动产生SN |
|
|
|
|
|
if (item.printType === 'Hardware(Antenna)' && this.printCurrentPart.category === 'Hardware(Antenna)-Serials' && this.$store.state.user.autoSerialNumber === 'Y'){ |
|
|
|
|
|
printLabel.push({ |
|
|
|
|
|
...params, |
|
|
|
|
|
printerName:item.printerName, |
|
|
|
|
|
icons:icons, |
|
|
|
|
|
}) |
|
|
|
|
|
}else { |
|
|
if (item.printType === 'Alpha/Hard Tag'){ |
|
|
if (item.printType === 'Alpha/Hard Tag'){ |
|
|
printAlphaHardTagLabel([params],icons,item.printerName,true) |
|
|
printAlphaHardTagLabel([params],icons,item.printerName,true) |
|
|
}else if (item.printType === 'Hardware(Antenna)'){ |
|
|
|
|
|
if (this.printCurrentPart.category === 'Hardware(Antenna)-Serials'){ |
|
|
|
|
|
printAntennaLabel([params],icons,item.printerName,this.$store.state.user.autoSerialNumber,true) |
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
|
}else if (item.printType === 'Hardware(Antenna)' && this.printCurrentPart.category === 'Hardware(Antenna)-Serials' && this.$store.state.user.autoSerialNumber === 'N'){ |
|
|
|
|
|
// 2025-05-15 将天线标签 && 有SN && 自动产生SN 按其他方式处理了,这里默认都是不存在SN的方式即不存在产品标签 |
|
|
|
|
|
printAntennaLabel([params],icons,item.printerName,'N',true) |
|
|
|
|
|
}else if (item.printType === 'Hardware(Antenna)' && this.printCurrentPart.category !== 'Hardware(Antenna)-Serials'){ |
|
|
|
|
|
// 2025-05-15 将天线标签 && 有SN && 自动产生SN 按其他方式处理了,这里默认都是不存在SN的方式即不存在产品标签 |
|
|
printAntennaLabel([params],icons,item.printerName,'N',true) |
|
|
printAntennaLabel([params],icons,item.printerName,'N',true) |
|
|
} |
|
|
|
|
|
}else if (item.printType === 'RF' || this.currentPart.category === 'RFID'){ |
|
|
}else if (item.printType === 'RF' || this.currentPart.category === 'RFID'){ |
|
|
printRF_RFIDLabel([params],icons,item.printerName,true) |
|
|
printRF_RFIDLabel([params],icons,item.printerName,true) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 判断数组是否存在数据,存在特殊处理 |
|
|
|
|
|
if (printLabel.length > 0){ |
|
|
|
|
|
printAntennaAutoSNLabel(printLabel) |
|
|
|
|
|
} |
|
|
this.printTest = false |
|
|
this.printTest = false |
|
|
// let notFound = []; |
|
|
// let notFound = []; |
|
|
// // 打印机集合 |
|
|
// // 打印机集合 |
|
|
|