Browse Source

2025-12-26

pda的其他入库和拆合组托功能如果未找到用户打印机配置,就跳过不打印
master
fengyuan_yang 3 weeks ago
parent
commit
c357ba865f
  1. 2
      package.json
  2. 36
      src/utils/LodopFuncs.js
  3. 4
      src/views/modules/label-split-merge/labelSplitMerge.vue
  4. 4
      src/views/modules/other-inout/otherInboundDetail.vue

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "gaotao-fast-vue", "name": "gaotao-fast-vue",
"version": "1.2.3",
"version": "1.2.4",
"description": "gaotao-fast-vue基于vue、element-ui构建开发,实现gaotao-fast后台管理前端功能,提供一套更优的前端解决方案。", "description": "gaotao-fast-vue基于vue、element-ui构建开发,实现gaotao-fast后台管理前端功能,提供一套更优的前端解决方案。",
"author": "daxiong.yang <daxiong.yang@qq.com>", "author": "daxiong.yang <daxiong.yang@qq.com>",
"private": true, "private": true,

36
src/utils/LodopFuncs.js

@ -3,8 +3,10 @@ import { MessageBox } from 'element-ui'
//用双端口加载主JS文件Lodop.js(或CLodopfuncs.js兼容老版本)以防其中某端口被占: //用双端口加载主JS文件Lodop.js(或CLodopfuncs.js兼容老版本)以防其中某端口被占:
var MainJS = "CLodopfuncs.js", var MainJS = "CLodopfuncs.js",
URL_WS1 = "ws://192.168.1.147:8000/" + MainJS, //ws用8000/18000
URL_WS2 = "ws://192.168.1.147:18000/" + MainJS,
URL_WS1 = "ws://10.1.15.53:8000/" + MainJS, //ws用8000/18000
URL_WS2 = "ws://10.1.15.53:18000/" + MainJS,
// URL_WS1= "ws://192.168.1.147:8000/" + MainJS, //ws用8000/18000
// URL_WS2= "ws://192.168.1.147:18000/" + MainJS,
URL_HTTP1 = "http://localhost:8000/" + MainJS, //http用8000/18000 URL_HTTP1 = "http://localhost:8000/" + MainJS, //http用8000/18000
URL_HTTP2 = "http://localhost:18000/" + MainJS, URL_HTTP2 = "http://localhost:18000/" + MainJS,
URL_HTTP3 = "https://localhost.lodop.net:8443/" + MainJS; //https用8000/8443 URL_HTTP3 = "https://localhost.lodop.net:8443/" + MainJS; //https用8000/8443
@ -116,11 +118,11 @@ function getLodop(oOBJECT, oEMBED) {
if (!LODOP) { if (!LODOP) {
logger.info("LodopFuncs.js getLodop no CLodop"); logger.info("LodopFuncs.js getLodop no CLodop");
MessageBox({ MessageBox({
title: 'Information',
title: '打印组件',
type: 'warning', type: 'warning',
showCancelButton: true, showCancelButton: true,
confirmButtonText: 'Download',
cancelButtonText: 'Cancel',
confirmButtonText: '下载',
cancelButtonText: '取消',
zIndex: 3000, zIndex: 3000,
message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。", message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。",
callback: res => { callback: res => {
@ -141,11 +143,11 @@ function getLodop(oOBJECT, oEMBED) {
if (needUpgrade) { if (needUpgrade) {
MessageBox({ MessageBox({
title: 'Information',
title: '打印组件',
type: 'warning', type: 'warning',
showCancelButton: true, showCancelButton: true,
confirmButtonText: 'Download',
cancelButtonText: 'Cancel',
confirmButtonText: '下载',
cancelButtonText: '取消',
zIndex: 3000, zIndex: 3000,
message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。", message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。",
callback: res => { callback: res => {
@ -188,11 +190,11 @@ function getLodop(oOBJECT, oEMBED) {
//==Lodop插件未安装时提示下载:== //==Lodop插件未安装时提示下载:==
if ((!LODOP) || (!LODOP.VERSION)) { if ((!LODOP) || (!LODOP.VERSION)) {
MessageBox({ MessageBox({
title: 'Information',
title: '打印组件',
type: 'warning', type: 'warning',
showCancelButton: true, showCancelButton: true,
confirmButtonText: 'Download',
cancelButtonText: 'Cancel',
confirmButtonText: '下载',
cancelButtonText: '取消',
zIndex: 3000, zIndex: 3000,
message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。", message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。",
callback: res => { callback: res => {
@ -206,11 +208,11 @@ function getLodop(oOBJECT, oEMBED) {
if (LODOP.VERSION < "6.2.2.6") { if (LODOP.VERSION < "6.2.2.6") {
MessageBox({ MessageBox({
title: 'Information',
title: '打印组件',
type: 'warning', type: 'warning',
showCancelButton: true, showCancelButton: true,
confirmButtonText: 'Download',
cancelButtonText: 'Cancel',
confirmButtonText: '下载',
cancelButtonText: '取消',
zIndex: 3000, zIndex: 3000,
message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。", message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。",
callback: res => { callback: res => {
@ -231,11 +233,11 @@ function getLodop(oOBJECT, oEMBED) {
return LODOP; return LODOP;
} catch (err) { } catch (err) {
MessageBox({ MessageBox({
title: 'Information',
title: '打印组件',
type: 'warning', type: 'warning',
showCancelButton: true, showCancelButton: true,
confirmButtonText: 'Download',
cancelButtonText: 'Cancel',
confirmButtonText: '下载',
cancelButtonText: '取消',
zIndex: 3000, zIndex: 3000,
message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。", message: "您没有安装打印组件或者您安装的版本不是最新版本,请下载并安装或升级,同时请检查相关服务是否已启动,最后请关闭并重新打开浏览器。",
callback: res => { callback: res => {

4
src/views/modules/label-split-merge/labelSplitMerge.vue

@ -412,7 +412,9 @@ export default {
printerName = printerConfig.printerName; printerName = printerConfig.printerName;
console.log('使用用户配置的打印机:', printerName); console.log('使用用户配置的打印机:', printerName);
} else { } else {
console.log('未找到用户打印机配置,使用默认打印机');
console.warn('未找到用户打印机配置,跳过打印');
this.$message.warning('未配置用户打印机,请在系统中配置默认打印机后再打印');
return;
} }
// 4. // 4.

4
src/views/modules/other-inout/otherInboundDetail.vue

@ -674,7 +674,9 @@ export default {
printerName = printerConfig.printerName; printerName = printerConfig.printerName;
console.log('使用用户配置的打印机:', printerName); console.log('使用用户配置的打印机:', printerName);
} else { } else {
console.log('未找到用户打印机配置,使用默认打印机');
console.warn('未找到用户打印机配置,跳过打印');
this.$message.warning('未配置用户打印机,请在系统中配置默认打印机后再打印');
return;
} }
// 4. // 4.

Loading…
Cancel
Save