Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
electron-printer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhuzhequan
electron-printer
Commits
b05935fc
Commit
b05935fc
authored
Mar 26, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改惠立彩生产图片逻辑
parent
e654a4f1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
18 deletions
+68
-18
src/views/design/head/index.vue
+42
-5
src/views/design/main/index.vue
+26
-13
No files found.
src/views/design/head/index.vue
View file @
b05935fc
...
@@ -451,7 +451,6 @@ export default {
...
@@ -451,7 +451,6 @@ export default {
async
hasDesignImagesCanvasJsonList
(
designImagesCanvasJsonList
,
bool
)
{
async
hasDesignImagesCanvasJsonList
(
designImagesCanvasJsonList
,
bool
)
{
let
imageResList
=
[];
let
imageResList
=
[];
let
urlList
=
[];
// 当adjustable有值时 直接赋值宽高
// 当adjustable有值时 直接赋值宽高
if
(
if
(
...
@@ -493,9 +492,19 @@ export default {
...
@@ -493,9 +492,19 @@ export default {
// }
// }
}
}
}
}
if
(
this
.
desktopDevice
==
3
)
{
designImagesCanvasJsonList
=
JSON
.
parse
(
designImagesCanvasJsonList
);
console
.
log
(
"designImagesCanvasJsonList"
,
designImagesCanvasJsonList
);
if
(
!
designImagesCanvasJsonList
[
0
].
images
)
{
this
.
dialogVisible
=
true
;
return
;
}
}
// 根据生产单号查找 素材图片 下载到本地 然后返回本地地址去显示
// 根据生产单号查找 素材图片 下载到本地 然后返回本地地址去显示
if
(
!
imageResList
.
length
&&
!
bool
)
{
if
(
!
imageResList
.
length
&&
!
bool
)
{
try
{
let
newType
=
this
.
orderType
;
let
newType
=
this
.
orderType
;
if
(
this
.
orderType
==
"CN"
&&
this
.
desktopDevice
==
3
)
{
if
(
this
.
orderType
==
"CN"
&&
this
.
desktopDevice
==
3
)
{
newType
=
this
.
orderType
==
"CN"
?
"CNHLC"
:
"USHLC"
;
newType
=
this
.
orderType
==
"CN"
?
"CNHLC"
:
"USHLC"
;
...
@@ -513,7 +522,9 @@ export default {
...
@@ -513,7 +522,9 @@ export default {
res
.
data
.
forEach
((
el
)
=>
{
res
.
data
.
forEach
((
el
)
=>
{
imageResList
=
imageResList
.
concat
(
el
.
list
||
[]);
imageResList
=
imageResList
.
concat
(
el
.
list
||
[]);
});
});
if
(
this
.
desktopDevice
==
3
)
urlList
=
res
.
data
.
map
((
el
)
=>
el
.
url
);
}
catch
(
error
)
{
this
.
dialogVisible
=
true
;
}
}
else
if
(
bool
)
{
}
else
if
(
bool
)
{
//如果有本地数据 则直接获取本地数据同图片
//如果有本地数据 则直接获取本地数据同图片
imageResList
=
this
.
detail
?.
saveImgList
||
[];
imageResList
=
this
.
detail
?.
saveImgList
||
[];
...
@@ -546,7 +557,6 @@ export default {
...
@@ -546,7 +557,6 @@ export default {
type: "
sendFile
",
type: "
sendFile
",
value: [...newImgList],
value: [...newImgList],
productMark: this.detail.productMark,
productMark: this.detail.productMark,
urls: urlList,
};
};
if (
if (
...
@@ -891,6 +901,14 @@ export default {
...
@@ -891,6 +901,14 @@ export default {
clearArray() {
clearArray() {
setOrderInfo([]);
setOrderInfo([]);
},
},
forcedProductionFN(bool) {
if (bool) this.isForcedProduction = true;
},
closeDialog() {
this.detail = null;
this.$store.commit("
setProductDetail
", {});
this.dialogVisible = false;
},
},
},
};
};
</
script
>
</
script
>
...
@@ -1122,11 +1140,11 @@ export default {
...
@@ -1122,11 +1140,11 @@ export default {
<div
style=
"margin-left: 10px;"
>
<div
style=
"margin-left: 10px;"
>
<el-checkbox
v-model=
"isAutoFinish"
>
自动完成上一单
</el-checkbox>
<el-checkbox
v-model=
"isAutoFinish"
>
自动完成上一单
</el-checkbox>
</div>
</div>
<div
style=
"margin-left: 10px;"
v-if=
"desktopDevice == 3"
>
<
!--
<
div
style=
"margin-left: 10px;"
v-if=
"desktopDevice == 3"
>
<el-checkbox
v-model=
"isForcedProduction"
style=
"color: red;"
<el-checkbox
v-model=
"isForcedProduction"
style=
"color: red;"
>
自动强制生产
</el-checkbox
>
自动强制生产
</el-checkbox
>
>
</div>
</div>
-->
<div
style=
"margin-left: 10px;"
v-show=
"desktopDevice != 3"
>
<div
style=
"margin-left: 10px;"
v-show=
"desktopDevice != 3"
>
<el-checkbox
v-model=
"checked"
>
自动裁切
</el-checkbox>
<el-checkbox
v-model=
"checked"
>
自动裁切
</el-checkbox>
</div>
</div>
...
@@ -1184,6 +1202,25 @@ export default {
...
@@ -1184,6 +1202,25 @@ export default {
<
el
-
button
@
click
=
"clearCache"
type
=
"primary"
>
清除
<
/el-button>
<
el
-
button
@
click
=
"clearCache"
type
=
"primary"
>
清除
<
/el-button>
<
/template>
<
/template>
<
/el-dialog>
<
/el-dialog>
<
el
-
dialog
title
=
"警告:无法直接生产"
:
visible
.
sync
=
"dialogVisible"
width
=
"30%"
>
<
div
>
素材效果已经超出台版范围,无法直接打印。请更换打印设
备,或者进行强制生产
<
/div>
<
div
>
注
:
“自动强制生产”会让每次生产都强制生产
<
/div>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"closeDialog"
>
取消
<
/el-button>
<!--
<
el
-
button
@
click
=
"forcedProductionFN"
>
强制生产
<
/el-button>
<
el
-
button
@
click
=
"forcedProductionFN(true)"
style
=
"color: red;"
>
自动强制生产
<
/el-button
>
-->
<
/span>
<
/el-dialog>
<
/div>
<
/div>
<
/template>
<
/template>
...
...
src/views/design/main/index.vue
View file @
b05935fc
...
@@ -273,6 +273,8 @@ export default {
...
@@ -273,6 +273,8 @@ export default {
productDetail
(
newValue
)
{
productDetail
(
newValue
)
{
this
.
detail
=
{
...
newValue
};
this
.
detail
=
{
...
newValue
};
console
.
log
(
325
,
this
.
detail
);
console
.
log
(
325
,
this
.
detail
);
if
(
Object
.
keys
(
this
.
detail
).
length
)
{
if
(
this
.
newDesktopDevice
==
3
)
{
if
(
this
.
newDesktopDevice
==
3
)
{
this
.
logList
.
unshift
(
this
.
logList
.
unshift
(
`订单:
${
this
.
detail
.
newId
}
-
${
`订单:
${
this
.
detail
.
newId
}
-
${
...
@@ -303,6 +305,12 @@ export default {
...
@@ -303,6 +305,12 @@ export default {
// 其他情况保持原顺序(稳定排序)
// 其他情况保持原顺序(稳定排序)
return
0
;
return
0
;
});
});
}
else
{
this
.
imgList
=
[];
this
.
selectImgList
=
[];
this
.
selectIndex
=
-
1
;
this
.
selectImgIndex
=
0
;
}
// console.log(249, this.detail.imageAry);
// console.log(249, this.detail.imageAry);
},
},
...
@@ -778,7 +786,7 @@ export default {
...
@@ -778,7 +786,7 @@ export default {
rate
=
height_px
/
width_px
;
rate
=
height_px
/
width_px
;
// }
// }
if
(
this
.
newDesktopDevice
==
3
&&
imgType
)
{
if
(
this
.
newDesktopDevice
==
3
)
{
const
scale
=
bh
/
data
.
height
;
const
scale
=
bh
/
data
.
height
;
width_px
=
data
.
width
*
scale
;
width_px
=
data
.
width
*
scale
;
height_px
=
data
.
height
*
scale
;
height_px
=
data
.
height
*
scale
;
...
@@ -1807,7 +1815,8 @@ export default {
...
@@ -1807,7 +1815,8 @@ export default {
selectImgList.length &&
selectImgList.length &&
!isOver &&
!isOver &&
!isMove &&
!isMove &&
!selectImgList.some((el) => el.isCut)
!selectImgList.some((el) => el.isCut) &&
newDesktopDevice !== 3
"
"
>
>
<b
style=
"color:green"
>
该单无需拖动设计,直接打印
</b>
<b
style=
"color:green"
>
该单无需拖动设计,直接打印
</b>
...
@@ -1816,27 +1825,31 @@ export default {
...
@@ -1816,27 +1825,31 @@ export default {
class=
"print-tip"
class=
"print-tip"
:style=
"{ left: isView ? '' : '6%' }"
:style=
"{ left: isView ? '' : '6%' }"
v-if=
"
v-if=
"
productMark == 'custom_part' && selectImgList.length && isOver
productMark == 'custom_part' &&
selectImgList.length &&
isOver &&
newDesktopDevice !== 3
"
"
>
>
<b
style=
"color:red"
<b
style=
"color:red"
>
素材效果已经超出台版范围,请更换更大台版或和客户协调沟通
</b
>
素材效果已经超出台版范围,请更换更大台版或和客户协调沟通
</b
>
>
</div>
</div>
<div
class=
"print-tip"
:style=
"{ left: isView ? '' : '22%' }"
>
<div
<b
class=
"print-tip"
style=
"color:red
"
:style=
"{ left: isView ? '' : '22%' }
"
v-if=
"
v-if=
"
selectImgList.length &&
newDesktopDevice == 3 &&
newDesktopDevice == 3 &&
isOver
&&
productMark == 'custom_part'
&&
!isForcedProduction
detail.productMark
"
"
>
该生产单素材已经被强制调整适配台版大小,请关注
</b
>
>
<b
<!-- <b
style=
"color:green"
style="color:red"
v-if=
"selectImgList.length && newDesktopDevice == 3 && !isOver"
v-if="!selectImgList.length && !isForcedProduction"
>该生产单素材已经被强制调整适配台版大小,请关注</b
> -->
<b
style=
"color:green"
v-if=
"selectImgList.length"
>
该单无需拖动设计,直接打印
</b
>
该单无需拖动设计,直接打印
</b
>
>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment