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
d3a903ba
Commit
d3a903ba
authored
Jun 16, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改问题
parent
73b1e52c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
21 deletions
+38
-21
src/views/design/head/index.vue
+38
-21
No files found.
src/views/design/head/index.vue
View file @
d3a903ba
...
...
@@ -70,7 +70,7 @@ export default {
selectGridIndex
:
0
,
pkg
,
actionIndex
:
-
1
,
//
isAutoFinish: true,
isAutoFinish
:
true
,
isForcedProduction
:
false
,
cacheVisible
:
false
,
showPrintDialog
:
false
,
...
...
@@ -124,7 +124,6 @@ export default {
])
},
mounted
()
{
// console.log(pkg, "pkg");
this
.
$nextTick
(()
=>
{
this
.
$refs
.
searchRef
?.
focus
();
if
(
this
.
desktopDevice
!==
3
)
{
...
...
@@ -191,6 +190,9 @@ export default {
//更新数据到本地数据
updateOrderInfoItem
(
this
.
detail
.
newId
,
this
.
detail
,
this
.
faceType
);
}
if
(
this
.
orderType
==
"OP"
)
{
this
.
checkAndCompleteProduction
(
this
.
detail
);
}
console
.
log
(
"updateOrderInfoItemitem"
,
item
);
console
.
log
(
"本地数据updateOrderInfoItem:"
,
getOrderInfoMap
());
}
...
...
@@ -230,23 +232,38 @@ export default {
break
;
}
},
// 判断是否可完成生产
canCompleteProduction
(
data
)
{
if
(
!
data
)
return
false
;
if
(
this
.
desktopDevice
!==
3
)
return
true
;
const
list
=
data
?.
saveImgList
;
if
(
!
list
?.
length
)
return
false
;
return
list
.
every
(
el
=>
el
.
power
);
console
.
log
(
"saveImgList"
,
data
.
saveImgList
);
console
.
log
(
"saveImgList"
,
data
.
saveImgList
?.
every
(
el
=>
el
.
power
)
);
if
(
!
data
?.
saveImgList
?.
length
)
return
false
;
return
data
.
saveImgList
?.
every
(
el
=>
el
.
power
)
??
false
;
},
checkAndCompleteProduction
(
data
)
{
if
(
this
.
desktopDevice
!==
3
||
!
this
.
canCompleteProduction
(
data
))
return
;
this
.
setData
(
data
);
// 校验并执行数据赋值
async
checkAndCompleteProduction
(
data
)
{
const
{
desktopDevice
}
=
this
;
console
.
log
(
"desktopDevice"
,
desktopDevice
);
console
.
log
(
"canCompleteProduction"
,
this
.
canCompleteProduction
(
data
));
await
this
.
$nextTick
();
if
(
desktopDevice
!==
3
||
(
desktopDevice
==
3
&&
this
.
canCompleteProduction
(
data
))
)
{
await
this
.
setData
(
data
);
}
},
// 扫码后直接调用scanProduce转至生产中(惠立彩需确保所有面下载完成)
// 点击生产完成按钮,调用completeDelivery转至待配货
async
setData
(
data
,
type
)
{
if
(
!
data
)
return
this
.
$message
.
warning
(
"请扫描生产单号/操作单号"
);
if
(
!
this
.
canCompleteProduction
(
data
))
{
if
(
this
.
desktopDevice
==
3
&&
!
this
.
canCompleteProduction
(
data
))
{
if
(
type
==
"btn"
)
{
const
item
=
data
.
saveImgList
?.
find
(
el
=>
!
el
.
power
);
this
.
$message
.
warning
(
...
...
@@ -260,6 +277,7 @@ export default {
id: data.id,
orderType: this.orderType
};
if (this.orderType === "CN") {
params.podJomallOrderCnId = data.podJomallOrderCnId;
} else if (this.orderType === "US") {
...
...
@@ -287,6 +305,7 @@ export default {
value: data.newId,
type: "completeMessage"
});
this.$message.success("操作成功");
} else if (this.orderType == "OP") {
bus.$emit("busEmit", {
value: data.newId,
...
...
@@ -330,9 +349,8 @@ export default {
type
:
"completeMessage"
});
}
this
.
$message
.
success
(
"操作成功"
);
}
this
.
$message
.
success
(
"操作成功"
);
}
catch
(
error
)
{
console
.
error
(
"setData 执行失败"
,
error
);
}
...
...
@@ -652,11 +670,13 @@ export default {
async getDataInfo(e, isForcedProduction) {
//查询后先检查当前是否有数据,有则先走生产完成
if (
this.detail &&
Object.keys(this.detail).length > 0 &&
this.isAutoFinish &&
this.user.factory.countryCode === "
US
"
this.factoryType === "
US
" &&
this.orderType !== "
OP
"
) {
try {
await this.setData(this.detail);
...
...
@@ -685,7 +705,7 @@ export default {
//判断上一单未勾选添加当天日期是否跳过(us)
if (
this.
user.factory.countryCod
e === "
US
" &&
this.
factoryTyp
e === "
US
" &&
!this.isAutoFinish &&
today != getNowDate()
) {
...
...
@@ -749,10 +769,9 @@ export default {
}
this.detail = findByPodProductionNo.data;
if (this.orderType == "
OP
") {
this.checkAndCompleteProduction
(this.detail);
if (this.orderType == "
OP
"
&& this.desktopDevice !== 3
) {
await this.setData
(this.detail);
}
//赋值当前扫码为生产单号的标识
if (!this.detail["
newId
"]) {
this.detail["
newId
"] = this.productionNo;
...
...
@@ -1245,9 +1264,7 @@ export default {
</el-button>
</div>
<div
style=
"margin-left: 10px;"
>
<el-checkbox
v-if=
"user.factory.countryCode === 'US'"
v-model=
"isAutoFinish"
<el-checkbox
v-if=
"factoryType === 'US'"
v-model=
"isAutoFinish"
>
自动完成上一单
</el-checkbox
>
</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