Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7283-itemSectionsMigration
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
6f26dc4990
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE vn.productionConfig
|
||||
DROP COLUMN scannableCodeType,
|
||||
DROP COLUMN scannablePreviusCodeType;
|
|
@ -10,14 +10,10 @@
|
|||
</td>
|
||||
<td colspan="2" id="shipped">{{dashIfEmpty(labelData.shipped)}}</td>
|
||||
</tr>
|
||||
<tr v-if="labelData?.qrData">
|
||||
<tr>
|
||||
<td rowspan="3"><img :src="labelData.qrData" class="qr"/></td>
|
||||
<td id="outline" class="ellipsize">{{dashIfEmpty(labelData.workerCode)}}</td>
|
||||
</tr>
|
||||
<tr v-else>
|
||||
<td rowspan="3"><div v-html="getBarcode(labelData.ticketFk)" class="basrcode"></div></td>
|
||||
<td id="outline" class="ellipsize">{{dashIfEmpty(labelData.workerCode)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="outline" class="ellipsize">{{labelCount || labelData.labelCount || 0}}</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
const {DOMImplementation, XMLSerializer} = require('xmldom');
|
||||
const vnReport = require('../../../core/mixins/vn-report.js');
|
||||
const {toDataURL} = require('qrcode');
|
||||
const jsBarcode = require('jsbarcode');
|
||||
|
||||
module.exports = {
|
||||
name: 'collection-label',
|
||||
|
@ -30,11 +28,8 @@ module.exports = {
|
|||
|
||||
const labels = await this.rawSqlFromDef('labelsData', [ticketIds]);
|
||||
|
||||
const [{scannableCodeType}] = await this.rawSqlFromDef('barcodeType');
|
||||
if (scannableCodeType === 'qr') {
|
||||
for (const labelData of labels)
|
||||
labelData.qrData = await this.getQr(labelData?.ticketFk, labelData?.workerFk);
|
||||
}
|
||||
for (const labelData of labels)
|
||||
labelData.qrData = await this.getQr(labelData?.ticketFk, labelData?.workerFk);
|
||||
|
||||
this.labelsData = labels;
|
||||
this.checkMainEntity(this.labelsData);
|
||||
|
@ -50,20 +45,6 @@ module.exports = {
|
|||
});
|
||||
return toDataURL(QRdata, {margin: 0});
|
||||
},
|
||||
getBarcode(id) {
|
||||
const xmlSerializer = new XMLSerializer();
|
||||
const document = new DOMImplementation().createDocument('http://www.w3.org/1999/xhtml', 'html', null);
|
||||
const svgNode = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||
|
||||
jsBarcode(svgNode, id, {
|
||||
xmlDocument: document,
|
||||
format: 'code128',
|
||||
displayValue: false,
|
||||
width: 3.8,
|
||||
height: 115,
|
||||
});
|
||||
return xmlSerializer.serializeToString(svgNode);
|
||||
},
|
||||
getVertical(labelData) {
|
||||
let value;
|
||||
if (labelData.collectionFk) {
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
SELECT scannableCodeType
|
||||
FROM productionConfig
|
||||
LIMIT 1
|
Loading…
Reference in New Issue