diff --git a/package-lock.json b/package-lock.json
index 065436f..d52fcf7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4280,6 +4280,11 @@
}
}
},
+ "dijkstrajs": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
+ "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="
+ },
"dns-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
@@ -4545,11 +4550,21 @@
}
}
},
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ },
"emojis-list": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k="
},
+ "encode-utf8": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/encode-utf8/-/encode-utf8-1.0.3.tgz",
+ "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw=="
+ },
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -16339,6 +16354,11 @@
"integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=",
"dev": true
},
+ "pngjs": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmmirror.com/pngjs/-/pngjs-5.0.0.tgz",
+ "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw=="
+ },
"portfinder": {
"version": "1.0.13",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz",
@@ -17465,6 +17485,183 @@
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
},
+ "qrcode": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmmirror.com/qrcode/-/qrcode-1.5.3.tgz",
+ "integrity": "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==",
+ "requires": {
+ "dijkstrajs": "^1.0.1",
+ "encode-utf8": "^1.0.3",
+ "pngjs": "^5.0.0",
+ "yargs": "^15.3.1"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "camelcase": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
+ },
+ "cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
+ },
+ "require-main-filename": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "which-module": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz",
+ "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ=="
+ },
+ "wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "y18n": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz",
+ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ=="
+ },
+ "yargs": {
+ "version": "15.4.1",
+ "resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+ "requires": {
+ "cliui": "^6.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^4.1.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^4.2.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^18.1.2"
+ }
+ },
+ "yargs-parser": {
+ "version": "18.1.3",
+ "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "requires": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ }
+ }
+ }
+ },
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
diff --git a/package.json b/package.json
index 7ab7206..6b09e27 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
"node-sass": "4.13.1",
"npm": "^6.9.0",
"pubsub-js": "^1.9.3",
+ "qrcode": "^1.5.3",
"sass-loader": "6.0.6",
"svg-sprite-loader": "3.7.3",
"vue": "2.6.10",
diff --git a/src/api/category/categoty.js b/src/api/category/categoty.js
new file mode 100644
index 0000000..3a1c97d
--- /dev/null
+++ b/src/api/category/categoty.js
@@ -0,0 +1,3 @@
+import {createAPI} from '../../utils/httpRequest'
+
+export const getCategoryList = (data) => createAPI('part/category/list','post', data)
diff --git a/src/api/label/labelFormatUserDefault.js b/src/api/label/labelFormatUserDefault.js
index 4255486..438dc71 100644
--- a/src/api/label/labelFormatUserDefault.js
+++ b/src/api/label/labelFormatUserDefault.js
@@ -9,5 +9,6 @@ export const updateLabelFormatUserDefault = (data) => createAPI(`/label/format/u
export const removeLabelFormatUserDefault = (data) => createAPI(`/label/format/user/default/remove`,'post',data)
export const selectLabelFormatUserDefaultListByUserId = (data) => createAPI(`/label/format/user/default/user/list`,'post',data)
export const selectLabelFormatUserDefaultPrintListByUserId = (data) => createAPI(`/label/format/user/default/user/print/list`,'post',data)
+export const getRollPrinterNameList = (data) => createAPI(`/label/format/user/default/user/roll`,'post',data)
diff --git a/src/api/label/printRollLabelRecord.js b/src/api/label/printRollLabelRecord.js
new file mode 100644
index 0000000..441afe4
--- /dev/null
+++ b/src/api/label/printRollLabelRecord.js
@@ -0,0 +1,4 @@
+import {createAPI} from '../../utils/httpRequest'
+
+export const getPrintRollLabelRecordPage = (data,no,size) => createAPI(`/label/print/roll/record/page/${no}/${size}`,'post',data)
+export const savePrintRollLabelRecord = (data) => createAPI(`/label/print/roll/record/save`,'post',data)
diff --git a/src/printFormat/roll_label.js b/src/printFormat/roll_label.js
new file mode 100644
index 0000000..fb2c687
--- /dev/null
+++ b/src/printFormat/roll_label.js
@@ -0,0 +1,77 @@
+import getLodop from '@/utils/LodopFuncs.js'
+
+const ckpLogo = 'iVBORw0KGgoAAAANSUhEUgAAAlkAAABxCAYAAADmmLY1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAALiMAAC4jAXilP3YAAB7qSURBVHhe7Z3dkeQ2soVlgjyQIkYKPWpfevSoG3G7r17XBJkwJlwTxo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o5VWiSQLDzGyQP089wu4+I+fSO8tEeK3QTzZDletZLTXbDOraVmA4P/V/qkqFKSyY93p8Wp3hDmmwFfA+LBZY6hfoY5Ns8v7xwzg/5aj2+N5jmwhXWeeY+fdo2SvPsabcLcnOao7SaHJutxVMp/oVwCMyXZvHApwmSdg6EU6CSOeQzyeCjjlIVxTMdELRARFNslv5fDn5qpn/REsif0oxRRZM4J6nikn9/T3AIXU7OR42DI8HvmtsdlntN5rJU5cNEJ+RPX02KW8hPGVrqbEEK2sSZkJhlCxoQmK17Mf4SQKmiyCHksaLLixfxHCKmCJouQx4ImK17Mf4SQKmiyCHksaLLixfxHCKmCJouQx4ImK17Mf4SQKmiyCHksaLLixfxHCKmCJouQx4ImK17Mf4SQKmiyCHksaLLixfxHCKmCJouQx4ImK17Mf4SQKmiyCHksaLLixfxHCKmCJouQx4ImK17Mf4SQKmiyCHksaLLixfxHCKmCJouQxwJ/jFqLWcpP+MPg0t2EELINTRYhj0eK0fd1zFJ+gpGVriaEkG1osgh5PH76/PpNi1uqX59eXv+WbiaEkH1osgh5PH749ffvYQa02KW69M5dLEJINTRZhDwmMFrc0fLTp89v/6LBIoQ0ke94k9Fq1S+//fGjFEEIGRjEqhbDVL1uzdV33/0XfQsL+SziPYAAAAAASUVORK5CYII='
+
+export const print_roll_label = (printList,printerName)=>{
+ const LODOP = getLodop()
+ if (LODOP){
+ LODOP.SET_LICENSES("","549DA0AD145DA11D8FC8654C58657B8EA09","","");
+ if (null == printerName || printerName === '') {
+ console.info('未设置打印机!')
+ } else {
+ LODOP.SET_PRINTER_INDEXA(printerName)
+ }
+ LODOP.SET_PRINT_MODE('CUSTOM_TASK_NAME', '多条页')
+ for (let i = 0; i < printList.length; i++) {
+ let row = printList[i];
+ LODOP.NewPage();
+ LODOP.ADD_PRINT_IMAGE(2,-2,"20mm","20mm",`
`);
+ LODOP.SET_PRINT_STYLEA(0,"Stretch",2);
+ LODOP.ADD_PRINT_IMAGE(4,126,62,12,"
");
+ LODOP.SET_PRINT_STYLEA(0,"Stretch",2);
+
+ LODOP.ADD_PRINT_TEXT(17,78,25,20,"REF");
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+ LODOP.ADD_PRINT_TEXT(17,132,25,20,"QTY");
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+ LODOP.ADD_PRINT_TEXT(27,78,30,20,"DESC");
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+ LODOP.ADD_PRINT_TEXT(17,98,40,20,row.ref);
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+ LODOP.ADD_PRINT_TEXT(17,150,35,20,row.qty);
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+ LODOP.ADD_PRINT_TEXT(27,101,83,35,row.desc);
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+ LODOP.ADD_PRINT_TEXT(48,78,30,20,"ROLL");
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+
+ LODOP.ADD_PRINT_TEXT(66,78,29,15,"DATE");
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+ LODOP.ADD_PRINT_TEXT(66,100,85,16,row.date);
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+
+ LODOP.ADD_PRINT_TEXT(48,100,80,20,row.rollNo);
+ LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
+ LODOP.SET_PRINT_STYLEA(0,"FontSize",5);
+ LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+ LODOP.PRINT();
+ }
+ }
+
+}
diff --git a/src/views/modules/label/QrCode.vue b/src/views/modules/label/QrCode.vue
new file mode 100644
index 0000000..f56ad4c
--- /dev/null
+++ b/src/views/modules/label/QrCode.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
diff --git a/src/views/modules/label/format.vue b/src/views/modules/label/format.vue
index 6e9d944..2aac5bb 100644
--- a/src/views/modules/label/format.vue
+++ b/src/views/modules/label/format.vue
@@ -410,6 +410,7 @@ export default {
+
@@ -474,6 +475,7 @@ export default {
+
diff --git a/src/views/modules/label/printer.vue b/src/views/modules/label/printer.vue
index c932730..a071170 100644
--- a/src/views/modules/label/printer.vue
+++ b/src/views/modules/label/printer.vue
@@ -16,6 +16,10 @@ import {printRF_RFIDLabel} from '../../../printFormat/RF_RFID'
import getLodop from '@/utils/LodopFuncs.js'
import {getTableDefaultListLanguage, getTableUserListLanguage} from '../../../api/table'
+import {getCategoryList} from '../../../api/category/categoty'
+import QrCode from './QrCode.vue'
+import {savePrintRollLabelRecord} from '../../../api/label/printRollLabelRecord'
+import {print_roll_label} from '../../../printFormat/roll_label'
const printer = {
customerNo: '',
@@ -36,10 +40,11 @@ const printer = {
serialNumberRequired: '',
qtyPerRoll: 0,
rollsPerCarton: 0,
+ orderNo: '',
}
export default {
name: 'printer',
- components: { LinkedFormat, CustomerInfo, ExternalPart, PictureModule},
+ components: {QrCode, LinkedFormat, CustomerInfo, ExternalPart, PictureModule},
props:{
height:{
type:Number,
@@ -56,10 +61,7 @@ export default {
...printer
},
partCategoryList:[
- {categoryNo:'Hardware(Antenna)',categoryDesc:'Hardware(Antenna)',manufacturerRequired:'N',moldCodeRequired:'N',serialNumberRequired:'Y'},
- {categoryNo:'Alpha/Hard Tag',categoryDesc:'Alpha/Hard Tag',manufacturerRequired:'Y',moldCodeRequired:'Y',serialNumberRequired:'Y'},
- {categoryNo:'RF',categoryDesc:'RF',manufacturerRequired:'N',moldCodeRequired:'N',serialNumberRequired:'N'},
- {categoryNo:'RFID',categoryDesc:'RFID',manufacturerRequired:'N',moldCodeRequired:'N',serialNumberRequired:'N'},
+
],
partVisible:false,
customerVisible:false,
@@ -83,6 +85,7 @@ export default {
totalShipQty: [{required: true, message: 'Please input Total Ship Qty', trigger: ['blur','change']}],
cartonCount: [{required: true, message: 'Please input Carton Count', trigger: ['blur','change']}],
manufacturerTime: [{required: true, message: 'Please input Manufacturer Date', trigger: ['blur','change']}],
+ orderNo: [{required: true, message: 'Please input PO', trigger: ['blur','change']}],
},
columnList:[
{
@@ -470,6 +473,7 @@ export default {
manufacturerList:[],
labelFormatList:[],
base64List:[],
+ status:0,
}
},
watch:{
@@ -542,17 +546,11 @@ export default {
this.$message.error(error)
})
},
- handlePrint(){
+ handlePrint(status){
if (this.labelFormatList.length === 0){
this.$message.warning("There is no maintenance of print label format")
return
}
- for (let label of this.labelFormatList) {
- if (!label.defaultPrinterName){
- this.$message.warning("The default printer name is not set")
- return
- }
- }
this.printCurrentPart = JSON.parse(JSON.stringify(this.currentPart))
this.$set(this.printCurrentPart,'cartonCount',1)
this.$set(this.printCurrentPart,'manufacturerNo','')
@@ -576,6 +574,21 @@ export default {
if (this.currentPart.moldCodeRequired === 'Y'){
this.printCurrentPart.moldCode = this.currentPart.moldCode;
}
+ let labelList = [];
+ if (status === 1){
+ labelList = this.labelFormatList.filter((item)=> item.labelType === 'Roll Label')
+ this.printCurrentPart.rollsPerCarton = 1;
+ this.$set(this.printCurrentPart,'orderNo','')
+ }else {
+ labelList = this.labelFormatList.filter((item)=> item.labelType === 'Shipment Carton')
+ }
+ for (let label of labelList) {
+ if (!label.defaultPrinterName){
+ this.$message.warning("The default printer name is not set")
+ return
+ }
+ }
+ this.status = status;
this.printVisible = true;
},
getExternalPartManufacturerList(){
@@ -599,7 +612,11 @@ export default {
handlePrintOrSave(){
this.$refs.printForm.validate((valid,obj) => {
if (valid){
- this.savePrintLabelRecord();
+ if(this.status === 0){
+ this.savePrintLabelRecord();
+ }else if (this.status === 1){
+ this.savePrintRollLabelRecord();
+ }
}else {
for (let i = 0; i < Object.keys(obj).length; i++) {
this.$message.warning(obj[Object.keys(obj)[i]][0].message)
@@ -619,7 +636,8 @@ export default {
if (data && data.code === 0) {
let notFound = [];
// 打印机集合
- for (let label of this.labelFormatList) {
+ let labelList = this.labelFormatList.filter((item)=> item.labelType === 'Shipment Carton')
+ for (let label of labelList) {
let prints = data.rows.map((item) => {
return {
qrCode: `(00)${item.partNo}(01)${item.qtyPerCarton}(02)${item.umName}(03)${item.manufacturerDate}(04)${item.serialNumber}(05)${item.manufacturerNo}(06)${item.moldCode}(07)${item.boxNo}(08)`,
@@ -751,7 +769,7 @@ export default {
})
},
-// 获取 tableDefault 列
+ // 获取 tableDefault 列
async getColumnList (tableId, columnId) {
let queryTable = {
functionId: this.$route.meta.menuId,
@@ -786,16 +804,81 @@ export default {
},
totalShipQty(){
return new Decimal(this.printCurrentPart.qtyPerCarton).mul(this.printCurrentPart.cartonCount).toNumber()
+ },
+ getCategoryList(){
+ let params = {};
+ getCategoryList(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.partCategoryList = data.rows;
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
+ savePrintRollLabelRecord(){
+ // 新增 打印记录
+ let params = {
+ ...this.printCurrentPart
+ }
+ // 请求接口
+ savePrintRollLabelRecord(params).then(({data})=>{
+ if (data && data.code === 0) {
+ let labelList = this.labelFormatList.filter((item)=> item.labelType === 'Roll Label')
+ let prints = data.rows.map((item) => {
+ return {
+ qrCode: `(00)${item.partNo}(01)${item.qtyPerRoll}(02)${item.umName}(03)${item.manufacturerDate}(04)${item.serialNumber? item.serialNumber : ''}(05)${item.manufacturerNo? item.manufacturerNo : ''}(06)${item.moldCode? item.moldCode : ''}(07)(08)${item.rollNo}`,
+ ref: item.partNo,
+ rev: item.rev,
+ qty: item.qtyPerRoll,
+ uom: item.umName,
+ desc: item.partDesc,
+ date: item.manufacturerDate,
+ manufacturer: item.manufacturerNo,
+ moldCode: item.moldCode,
+ rollNo: item.rollNo,
+ sn: item.serialNumber,
+ }
+ });
+ let qrCodeList = this.$refs.qrCode.init(prints.map((item)=>{
+ return item.qrCode
+ }))
+ for (let i = 0; i < qrCodeList.length; i++) {
+ prints[i].qrCode = qrCodeList[i]
+ }
+ let notFound = [];
+ for (let label of labelList) {
+ if (!this.printerSetupList.includes(label.defaultPrinterName)) {
+ notFound.push(label.defaultPrinterName)
+ continue
+ }
+ print_roll_label(prints,label.defaultPrinterName)
+ }
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
+ loadQrCode(){
+ let arr = ['2','4','6','8']
+ console.log(this.$refs.qrCode.init(arr))
+ },
+ getLodopPrinterName(){
+ const lodop = getLodop()
+ for (let i = 0; i < lodop.GET_PRINTER_COUNT(); i++) {
+ this.printerSetupList.push(lodop.GET_PRINTER_NAME(i))
+ }
}
},
mounted () {
- const lodop = getLodop()
- for (let i = 0; i < lodop.GET_PRINTER_COUNT(); i++) {
- this.printerSetupList.push(lodop.GET_PRINTER_NAME(i))
- }
+ this.getLodopPrinterName();
},
created () {
this.getExternalPartCustomerList();
+ this.getCategoryList();
this.getTableUserColumn("30004Table",1)
this.getTableUserColumn("30004Table2",2)
this.getTableUserColumn("30004Table3",3)
@@ -848,20 +931,22 @@ export default {
-
+
-
+
-
+
- Print
+ Print-Carton Label
+ Print-Roll Label
+
-
+
+
+
+
+
+
-
+
@@ -910,7 +1000,7 @@ export default {
-
+
@@ -918,7 +1008,7 @@ export default {
-
+
@@ -926,7 +1016,7 @@ export default {
-
+
@@ -934,7 +1024,7 @@ export default {
-
+
@@ -951,7 +1041,7 @@ export default {
-
+
diff --git a/src/views/modules/label/roll.vue b/src/views/modules/label/roll.vue
new file mode 100644
index 0000000..336d104
--- /dev/null
+++ b/src/views/modules/label/roll.vue
@@ -0,0 +1,609 @@
+
+
+
+
+
+
+
+
+
+ Customer No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Part No
+
+
+
+
+
+
+
+
+
+
+ Query
+ Print
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/label/userDefault.vue b/src/views/modules/label/userDefault.vue
index d4cdeff..cb80776 100644
--- a/src/views/modules/label/userDefault.vue
+++ b/src/views/modules/label/userDefault.vue
@@ -286,6 +286,7 @@ export default {
+
diff --git a/src/views/modules/part/external.vue b/src/views/modules/part/external.vue
index 79dd954..43866f3 100644
--- a/src/views/modules/part/external.vue
+++ b/src/views/modules/part/external.vue
@@ -15,6 +15,7 @@ import LinkedManufacturer from './manufacturer/linkedManufacturer.vue'
import {getExternalPartManufacturerList} from '../../../api/part/externalPartManufacturer'
import {getTableDefaultListLanguage, getTableUserListLanguage} from '../../../api/table'
import {Decimal} from 'decimal.js'
+import {getCategoryList} from '../../../api/category/categoty'
let part = {
site:'',
@@ -54,10 +55,7 @@ export default {
active:'Y',
},
partCategoryList:[
- {categoryNo:'Hardware(Antenna)',categoryDesc:'Hardware(Antenna)',manufacturerRequired:'N',moldCodeRequired:'N',serialNumberRequired:'Y'},
- {categoryNo:'Alpha/Hard Tag',categoryDesc:'Alpha/Hard Tag',manufacturerRequired:'Y',moldCodeRequired:'Y',serialNumberRequired:'Y'},
- {categoryNo:'RF',categoryDesc:'RF',manufacturerRequired:'N',moldCodeRequired:'N',serialNumberRequired:'N'},
- {categoryNo:'RFID',categoryDesc:'RFID',manufacturerRequired:'N',moldCodeRequired:'N',serialNumberRequired:'N'},
+
],
partRules:{
partNo: [{ required: true, message: 'Please input Part No', trigger: ['blur','change'] }],
@@ -704,11 +702,17 @@ export default {
this.savePart.partNo = newVal.toUpperCase()
},
"savePart.category"(newVal,oldVal){
- const category = this.partCategoryList.find((item)=>item.categoryNo === newVal);
+ const category = this.partCategoryList.find((item)=>item.categoryValue === newVal);
if (category){
this.savePart.manufacturerRequired = category.manufacturerRequired;
this.savePart.moldCodeRequired = category.moldCodeRequired;
this.savePart.serialNumberRequired = category.serialNumberRequired;
+ this.savePart.rollLabelRequired = category.rollLabelRequired;
+ if (this.savePart.serialNumberRequired === 'Y'){
+ this.savePart.qtyPerRoll = 1;
+ this.savePart.rollsPerCarton = 1;
+ this.savePart.qtyPerCarton = 1;
+ }
}
},
"part.partNo"(newVal,oldVal){
@@ -818,7 +822,7 @@ export default {
moldCodeRequired: 'N',
serialNumberRequired: 'N',
}
- this.savePart.category = this.partCategoryList.length > 0 ? this.partCategoryList[0].categoryNo : ''
+ this.savePart.category = this.partCategoryList.length > 0 ? this.partCategoryList[0].categoryValue : ''
this.savePartVisible = true;
}
},
@@ -1005,12 +1009,25 @@ export default {
qtyPerCarton(){
return new Decimal(this.savePart.qtyPerRoll).mul(this.savePart.rollsPerCarton).toNumber();
},
+ getCategoryList(){
+ let params = {};
+ getCategoryList(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.partCategoryList = data.rows;
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
},
computed:{
},
created () {
this.selectUnitList();
+ this.getCategoryList();
this.selectExternalPartList();
this.getTableUserColumn("10002Table", 1)
this.getTableUserColumn("10002Table2", 2)
@@ -1032,7 +1049,7 @@ export default {
-
+
@@ -1106,7 +1123,7 @@ export default {
-
+
@@ -1127,12 +1144,12 @@ export default {
-
+
-
+