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
1
Merge Requests
1
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
5466219d
Commit
5466219d
authored
Jun 17, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改生产完成逻辑
parent
bc514608
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
43 deletions
+24
-43
src/views/design/head/index.vue
+24
-43
No files found.
src/views/design/head/index.vue
View file @
5466219d
...
...
@@ -135,7 +135,6 @@ export default {
}
});
this
.
$store
.
commit
(
"changeDesktopDevice"
,
getDesktopDevice
());
this
.
isAutoFinish
=
false
;
},
created
()
{
localStorage
.
setItem
(
"desktoVersion"
,
"print"
);
...
...
@@ -270,39 +269,35 @@ export default {
} else if (this.orderType === "OP") {
params.data = { ...data };
}
//如果为惠立彩则判断当前saveImgList字段中的power是否全是true 是则生产完成
// const canCallApi =
// this.desktopDevice != 3 ||
// (data.saveImgList?.every(el => el.power) ?? false);
try {
console.log("生产完成");
// if (this.orderType !== "OP" && type == "btn") {
// await this.$api.post(
// pathMap["completeDelivery"][this.orderType],
// params
// );
// await removeFromOrderInfo(data.newId);
// bus.$emit("busEmit", {
// value: data.newId,
// type: "completeMessage"
// });
// this.$message.success("操作成功");
// } else
if (this.orderType == "OP") {
const isOP = this.orderType === "OP";
const newId = data.newId;
console.log("生产完成------", this.orderType, type);
// 统一走完成交付的场景:非OP / OP且type=btn
if (!isOP || type === "btn") {
await this.$api.post(
pathMap.completeDelivery[this.orderType],
params
);
if (this.desktopDevice === 3) {
await removeFromOrderInfo(newId);
bus.$emit("busEmit", { value: newId, type: "completeMessage" });
}
} else {
// OP 非btn:扫码入库校验库存
const { code, data: resData } = await this.$api.post(
pathMap
["scanProduce"]
[this.orderType],
pathMap
.scanProduce
[this.orderType],
{ id: params.id, status: params.data.status }
);
if (code == 301) {
if (code ==
=
301) {
this.$confirm(
`
$
{
resData
.
thirdSkuCode
}
库存不足,无法进入生产
!
请联系仓库管理人员核对库存。
<
/br>
库存数量:
$
{
resData
.
availableInventory
||
0
}
,
生产中数量:
$
{
resData
.
inventory
||
0
}
,
<
span
style
=
"color: red;"
>
可调配库存:
$
{
resData
.
inventory
||
0
}
<
/span>`,
库存数量:
$
{
resData
.
availableInventory
||
0
}
,
生产中数量:
$
{
resData
.
inventory
||
0
}
,
<
span
style
=
"color: red;"
>
可调配库存:
$
{
resData
.
inventory
||
0
}
<
/span>`,
"提示"
,
{
confirmButtonText
:
"确定"
,
...
...
@@ -316,27 +311,13 @@ export default {
this
.
$refs
.
searchRef
?.
focus
();
return
;
}
if
(
this
.
desktopDevice
==
3
)
{
bus
.
$emit
(
"busEmit"
,
{
value
:
data
.
newId
,
type
:
"productingMessage"
});
}
}
else
{
await
this
.
$api
.
post
(
pathMap
[
"completeDelivery"
][
this
.
orderType
],
params
);
if
(
this
.
desktopDevice
==
3
)
{
await
removeFromOrderInfo
(
data
.
newId
);
bus
.
$emit
(
"busEmit"
,
{
value
:
data
.
newId
,
type
:
"completeMessage"
});
}
this
.
desktopDevice
===
3
&&
bus
.
$emit
(
"busEmit"
,
{
value
:
newId
,
type
:
"productingMessage"
});
}
this
.
$message
.
success
(
"操作成功"
);
}
catch
(
error
)
{
this
.
$message
.
error
(
error
);
console
.
error
(
"setData 执行失败"
,
error
);
}
},
...
...
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