Browse Source

20241115

dev
qiezi 1 year ago
parent
commit
03c4c2100f
  1. 1328
      src/printFormat/alphaHardTagPrintFormat.js
  2. 2
      src/printFormat/logisticLabel.js
  3. 22
      src/views/modules/label/printer.vue
  4. 21
      src/views/modules/label/record.vue
  5. 18
      src/views/modules/part/external.vue

1328
src/printFormat/alphaHardTagPrintFormat.js
File diff suppressed because it is too large
View File

2
src/printFormat/logisticLabel.js

@ -31,7 +31,7 @@ export const printLogisticLabel = (printList, printerName) => {
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(42,126,40,20,"QTY"); LODOP.ADD_PRINT_TEXT(42,126,40,20,"QTY");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.SET_PRINT_STYLEA(0,"FontSize",14);
LODOP.ADD_PRINT_TEXT(63,126,50,20,"DESC"); LODOP.ADD_PRINT_TEXT(63,126,50,20,"DESC");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); LODOP.SET_PRINT_STYLEA(0,"FontSize",10);

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

@ -45,7 +45,7 @@ const printer = {
rollsPerCarton: 0, rollsPerCarton: 0,
orderNo: '', orderNo: '',
templateNo:'', templateNo:'',
printLabelType:'',
printLabelType:0,
} }
export default { export default {
name: 'printer', name: 'printer',
@ -690,7 +690,7 @@ export default {
this.printCurrentPart.moldCode = this.currentPart.moldCode; this.printCurrentPart.moldCode = this.currentPart.moldCode;
} }
if (this.printCurrentPart.category === 'Alpha/Hard Tag-Serials'){ if (this.printCurrentPart.category === 'Alpha/Hard Tag-Serials'){
this.$set(this.printCurrentPart,'printLabelType','Carton Label')
this.$set(this.printCurrentPart,'printLabelType',0)
this.handleQueryTemplate(); this.handleQueryTemplate();
} }
this.handleQueryCategory(); this.handleQueryCategory();
@ -819,6 +819,13 @@ export default {
freeInfo2: item.freeInfo2, freeInfo2: item.freeInfo2,
tradingMark: item.tradingMark, tradingMark: item.tradingMark,
weightUmName: item.weightUmName, weightUmName: item.weightUmName,
pictureMap:item.pictureMap,
printLabelType:item.printLabelType,
templateNo:item.templateNo,
dateStr:item.dateStr,
printStr1:item.printStr1,
printStr2:item.printStr2,
printStr3:item.printStr3,
} }
if (item.packingWeight){ if (item.packingWeight){
params.weight = new Decimal(item.packingWeight).mul(item.qtyPerCarton).toNumber(); params.weight = new Decimal(item.packingWeight).mul(item.qtyPerCarton).toNumber();
@ -837,7 +844,11 @@ export default {
continue continue
} }
if (label.printType === 'Alpha/Hard Tag'){ if (label.printType === 'Alpha/Hard Tag'){
printAlphaHardTagLabel(prints,icons,label.defaultPrinterName)
if (this.printCurrentPart.category === 'Alpha/Hard Tag-Serials'){
printAlphaHardTagLabel(prints,icons,label.defaultPrinterName,this.$store.state.user.autoSerialNumber)
}else {
printAlphaHardTagLabel(prints,icons,label.defaultPrinterName)
}
}else if (label.printType === 'Hardware(Antenna)'){ }else if (label.printType === 'Hardware(Antenna)'){
printAntennaLabel(prints,icons,label.defaultPrinterName) printAntennaLabel(prints,icons,label.defaultPrinterName)
}else if (label.printType === 'RF' || this.currentPart.category === 'RFID'){ }else if (label.printType === 'RF' || this.currentPart.category === 'RFID'){
@ -1362,8 +1373,9 @@ export default {
<el-col :span="8"> <el-col :span="8">
<el-form-item label="Label Type"> <el-form-item label="Label Type">
<el-select v-model="printCurrentPart.printLabelType" style="width: 100%"> <el-select v-model="printCurrentPart.printLabelType" style="width: 100%">
<el-option label="Carton Label" value="Carton Label"></el-option>
<el-option label="Product Label" value="Product Label"></el-option>
<el-option label="Carton Label & Product Label" :value="0"></el-option>
<el-option label="Carton Label" :value="1"></el-option>
<el-option label="Product Label" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>

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

@ -318,6 +318,8 @@ export default {
columnWidth: 140 columnWidth: 140
} }
], ],
queryLoading:false,
} }
}, },
watch:{ watch:{
@ -342,6 +344,7 @@ export default {
...this.printRecord, ...this.printRecord,
site: this.$store.state.user.site, site: this.$store.state.user.site,
} }
this.queryLoading = true
getPrintLabelRecordPage(params,this.no,this.size).then(({data}) => { getPrintLabelRecordPage(params,this.no,this.size).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.printLabelRecordList = data.rows this.printLabelRecordList = data.rows
@ -349,8 +352,10 @@ export default {
} else { } else {
this.$message.warning(data.message) this.$message.warning(data.message)
} }
this.queryLoading = false
}).catch((error) => { }).catch((error) => {
this.$message.error(error.message) this.$message.error(error.message)
this.queryLoading = false
}) })
}, },
handleSelectionChange (val) { handleSelectionChange (val) {
@ -413,6 +418,14 @@ export default {
freeInfo2:item.freeInfo2, freeInfo2:item.freeInfo2,
tradingMark: item.tradingMark, tradingMark: item.tradingMark,
weightUmName: item.weightUmName, weightUmName: item.weightUmName,
pictureMap:item.pictureMap,
printLabelType:item.printLabelType,
templateNo:item.templateNo,
category:item.category,
dateStr:item.dateStr,
printStr1:item.printStr1,
printStr2:item.printStr2,
printStr3:item.printStr3,
} }
if (item.packingWeight){ if (item.packingWeight){
params.weight = new Decimal(item.packingWeight).mul(item.qtyPerCarton).toNumber(); params.weight = new Decimal(item.packingWeight).mul(item.qtyPerCarton).toNumber();
@ -444,7 +457,11 @@ export default {
continue continue
} }
if (str[1] === 'Alpha/Hard Tag'){ if (str[1] === 'Alpha/Hard Tag'){
printAlphaHardTagLabel(dataList,base64List,str[0])
if (print.category === 'Alpha/Hard Tag-Serials'){
printAlphaHardTagLabel(dataList,base64List,str[0],this.$store.state.user.autoSerialNumber)
}else {
printAlphaHardTagLabel(dataList,base64List,str[0])
}
}else if (str[1] === 'Hardware(Antenna)'){ }else if (str[1] === 'Hardware(Antenna)'){
printAntennaLabel(dataList,base64List,str[0]) printAntennaLabel(dataList,base64List,str[0])
}else if (str[1] === 'RF' || str[1] === 'RFID'){ }else if (str[1] === 'RF' || str[1] === 'RFID'){
@ -591,7 +608,7 @@ export default {
</el-form> </el-form>
</div> </div>
<qr-code ref="qrCode"></qr-code> <qr-code ref="qrCode"></qr-code>
<el-table :data="printLabelRecordList" ref="table" @selection-change="handleSelectionChange"
<el-table :data="printLabelRecordList" v-loading="queryLoading" ref="table" @selection-change="handleSelectionChange"
style="width: 100%;margin-top: 10px" border :height="height"> style="width: 100%;margin-top: 10px" border :height="height">
<el-table-column type="selection" width="55" fixed="left" align="center"></el-table-column> <el-table-column type="selection" width="55" fixed="left" align="center"></el-table-column>
<el-table-column <el-table-column

18
src/views/modules/part/external.vue

@ -37,6 +37,9 @@ let part = {
qtyPerCarton:0, qtyPerCarton:0,
qtyPerRoll:0, qtyPerRoll:0,
rollsPerCarton:0, rollsPerCarton:0,
printStr1:'',
printStr2:'',
printStr3:'',
} }
export default { export default {
name: "ExternalPart", name: "ExternalPart",
@ -1306,6 +1309,21 @@ export default {
<el-input v-model="savePart.partDesc"></el-input> <el-input v-model="savePart.partDesc"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" v-if="$store.state.user.autoSerialNumber === 'Y'">
<el-form-item label="Print Str1" :show-message="false">
<el-input v-model="savePart.printStr1"></el-input>
</el-form-item>
</el-col>
<el-col :span="8" v-if="$store.state.user.autoSerialNumber === 'Y'">
<el-form-item label="Print Str2" :show-message="false">
<el-input v-model="savePart.printStr2"></el-input>
</el-form-item>
</el-col>
<el-col :span="8" v-if="$store.state.user.autoSerialNumber === 'Y'">
<el-form-item label="Print Str3" :show-message="false">
<el-input v-model="savePart.printStr3"></el-input>
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="Part Category" prop="category" :show-message="false"> <el-form-item label="Part Category" prop="category" :show-message="false">
<el-select v-model="savePart.category" placeholder="" @change="changeCategory" style="width: 100%"> <el-select v-model="savePart.category" placeholder="" @change="changeCategory" style="width: 100%">

Loading…
Cancel
Save