Browse Source

20241120

dev
qiezi 1 year ago
parent
commit
8dcfee3522
  1. 28
      src/printFormat/alphaHardTagPrintFormat.js
  2. 1245
      src/printFormat/antenna.js
  3. 19
      src/views/modules/label/printer.vue
  4. 10
      src/views/modules/label/record.vue

28
src/printFormat/alphaHardTagPrintFormat.js

@ -30,7 +30,6 @@ export function printAlphaHardTagLabel (printList, icons, printerName, flag) {
//批量循环打印
for (let i = 0; i < printList.length; i++) {
let row = printList[i]
console.log(row.pictureMap)
LODOP.SET_PRINTER_INDEXA(printerName)
if (flag === 'Y'){
if (row.printLabelType === 0){
@ -165,33 +164,6 @@ const printProductLabel = (LODOP,row) =>{
LODOP.SET_SHOW_MODE("MESSAGE_PARSING_URL", "");//该语句隐藏进度条或修改提示信息
LODOP.SET_PRINT_PAGESIZE(0,1100,1005,"");
eval(`${row.templateNo}(LODOP,row)`)
// switch (row.templateNo){
// case 'template1':
// template1(LODOP,row)
// break;
// case 'template2':
// template2(LODOP,row)
// break;
// case 'template3':
// template3(LODOP,row)
// break;
// case 'template4':
// template4(LODOP,row)
// break;
// case 'template5':
// template5(LODOP,row)
// break;
// case 'template6':
// break;
// case 'template7':
// break;
// case 'template8':
// break;
// case 'template9':
// break;
// case 'template10':
// break;
// }
}
// const printTop = 17;

1245
src/printFormat/antenna.js
File diff suppressed because it is too large
View File

19
src/views/modules/label/printer.vue

@ -693,7 +693,7 @@ export default {
if (this.currentPart.moldCodeRequired === 'Y'){
this.printCurrentPart.moldCode = this.currentPart.moldCode;
}
if (this.printCurrentPart.category === 'Alpha/Hard Tag-Serials'){
if (this.printCurrentPart.category === 'Hardware(Antenna)-Serials'){
this.$set(this.printCurrentPart,'printLabelType',0)
this.handleQueryTemplate();
}
@ -701,7 +701,8 @@ export default {
},
handleQueryTemplate(){
let params = {
partNo: this.currentPart.partNo,
site: this.currentPart.site,
}
this.templateList = [];
queryExternalLabelTemplate(params).then(({data})=>{
@ -848,13 +849,13 @@ export default {
continue
}
if (label.printType === 'Alpha/Hard Tag'){
if (this.printCurrentPart.category === 'Alpha/Hard Tag-Serials'){
printAlphaHardTagLabel(prints,icons,label.defaultPrinterName,this.$store.state.user.autoSerialNumber)
printAlphaHardTagLabel(prints,icons,label.defaultPrinterName)
}else if (label.printType === 'Hardware(Antenna)'){
if (this.printCurrentPart.category === 'Hardware(Antenna)-Serials'){
printAntennaLabel(prints,icons,label.defaultPrinterName,this.$store.state.user.autoSerialNumber)
}else {
printAlphaHardTagLabel(prints,icons,label.defaultPrinterName)
printAntennaLabel(prints,icons,label.defaultPrinterName)
}
}else if (label.printType === 'Hardware(Antenna)'){
printAntennaLabel(prints,icons,label.defaultPrinterName)
}else if (label.printType === 'RF' || this.currentPart.category === 'RFID'){
printRF_RFIDLabel(prints,icons,label.defaultPrinterName)
}
@ -1327,7 +1328,7 @@ export default {
<el-input-number :step="0" :min="0" :controls="false" v-model="printCurrentPart.totalShipQty" disabled></el-input-number>
</el-form-item>
</el-col>
<el-col :span="24" v-if="printCurrentPart.category !== 'Alpha/Hard Tag-Serials' || $store.state.user.autoSerialNumber !== 'Y'">
<el-col :span="24" v-if="printCurrentPart.category !== 'Hardware(Antenna)-Serials' || $store.state.user.autoSerialNumber !== 'Y'">
<el-form-item v-if="printCurrentPart.serialNumberRequired === 'Y'" key="serialNumber" label="Serial Number" prop="serialNumber" :show-message="false">
<el-input v-model="printCurrentPart.serialNumber"></el-input>
</el-form-item>
@ -1367,7 +1368,7 @@ export default {
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" v-if="$store.state.user.autoSerialNumber === 'Y' && printCurrentPart.category === 'Alpha/Hard Tag-Serials'">
<el-row :gutter="10" v-if="$store.state.user.autoSerialNumber === 'Y' && printCurrentPart.category === 'Hardware(Antenna)-Serials'">
<el-col :span="8">
<el-form-item label="Template">
<el-select v-model="printCurrentPart.templateNo" style="width: 100%">

10
src/views/modules/label/record.vue

@ -374,7 +374,7 @@ export default {
username:this.$store.state.user.name,
boxNo:item.boxNo,
category:item.category,
pictureClassIfy:'BoxPicture'
pictureClassify:'BoxPicture'
}
})
let {data} = await selectLabelFormatUserDefaultPrintListByUserId(params)
@ -457,13 +457,13 @@ export default {
continue
}
if (str[1] === 'Alpha/Hard Tag'){
printAlphaHardTagLabel(dataList,base64List,str[0])
}else if (str[1] === 'Hardware(Antenna)'){
if (print.category === 'Alpha/Hard Tag-Serials'){
printAlphaHardTagLabel(dataList,base64List,str[0],this.$store.state.user.autoSerialNumber)
}else {
printAlphaHardTagLabel(dataList,base64List,str[0])
}else {
printAntennaLabel(dataList,base64List,str[0],this.$store.state.user.autoSerialNumber)
}
}else if (str[1] === 'Hardware(Antenna)'){
printAntennaLabel(dataList,base64List,str[0])
}else if (str[1] === 'RF' || str[1] === 'RFID'){
printRF_RFIDLabel(dataList,base64List,str[0])
}

Loading…
Cancel
Save