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
2af4e414
Commit
2af4e414
authored
Jun 09, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改问题
parent
f6e45c94
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
27 deletions
+115
-27
src/config/index.js
+3
-0
src/server/entity/function.js
+21
-0
src/server/routes/index.js
+2
-0
src/server/utils/store.js
+0
-0
src/views/design/head/index.vue
+89
-27
No files found.
src/config/index.js
View file @
2af4e414
...
...
@@ -31,6 +31,9 @@ export const pathMap = {
//判断 status 操作单状态
scanProduce
:
{
OP
:
"factory/podOrderOperation/scan-produce"
},
checkInventory
:
{
OP
:
"factory/podOrderOperation/check-inventory"
}
};
...
...
src/server/entity/function.js
View file @
2af4e414
...
...
@@ -631,5 +631,26 @@ export default {
console
.
log
(
"scanProduce"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
checkInventory
:
async
(
req
,
res
)
=>
{
env
=
getHostApi
().
apiApiHost
;
const
token
=
req
.
headers
[
"jwt-token"
];
const
params
=
req
.
body
;
let
url
=
"factory/podOrderOperation/check-inventory"
;
console
.
log
(
"checkInventory"
,
`
${
env
}
/
${
url
}
`
);
try
{
let
{
data
}
=
await
axios
.
get
(
`
${
env
}
/
${
url
}
`
,
{
headers
:
{
"jwt-token"
:
token
},
params
:
{
id
:
params
.
id
,
status
:
params
.
status
}
});
res
.
send
(
data
);
}
catch
(
error
)
{
console
.
log
(
"checkInventory"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
}
};
src/server/routes/index.js
View file @
2af4e414
...
...
@@ -65,5 +65,7 @@ autoRegisterRouter(
);
//操作单状态
autoRegisterRouter
(
router
,
"scanProduce"
,
fn
.
scanProduce
);
//检查库存
autoRegisterRouter
(
router
,
"checkInventory"
,
fn
.
checkInventory
);
export
{
router
as
default
};
src/server/utils/store.js
View file @
2af4e414
This diff is collapsed.
Click to expand it.
src/views/design/head/index.vue
View file @
2af4e414
...
...
@@ -229,7 +229,7 @@ export default {
break
;
}
},
async
setData
(
data
)
{
async
setData
(
data
,
type
)
{
if
(
!
data
)
return
this
.
$message
.
warning
(
"请扫描生产单号/操作单号"
);
let
params
=
{
id
:
data
.
id
,
...
...
@@ -256,11 +256,47 @@ export default {
}
console
.
log
(
"本地数据removeFromOrderInfo:"
,
getOrderInfoMap
());
//生产完成后在本地删除
if
(
this
.
orderType
==
"OP"
&&
(
this
.
detail
.
status
==
"PENDING_PICK"
||
this
.
detail
.
status
==
"PENDING_REPLENISH"
)
)
{
const
{
code
,
data
}
=
await
this
.
$api
.
post
(
pathMap
[
"scanProduce"
][
this
.
orderType
],
params
);
if
(
code
==
301
)
{
this
.
$confirm
(
`<p>库存不足,无法进入生产!请联系仓库管理人员核对库存。</p>
<p>库存数量:
${
data
.
availableInventory
||
0
}
,生产中数量:
${
data
.
inventory
||
0
}
,可调配库存:
${
data
.
inventory
||
0
}
</p>`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
type
:
"error"
,
dangerouslyUseHTMLString
:
true
,
// 🔥 关键:添加自定义类名
customClass
:
"custom-inventory-msgbox"
}
);
this
.
detail
=
""
;
this
.
productionNo
=
""
;
this
.
$refs
.
searchRef
?.
focus
();
return
;
}
}
else
{
await
this
.
$api
.
post
(
pathMap
[
"completeDelivery"
][
this
.
orderType
],
params
);
}
this
.
$message
.
success
(
"操作成功"
);
}
else
{
if
(
type
==
"btn"
)
{
const
item
=
data
.
saveImgList
?.
find
(
el
=>
!
el
.
power
);
this
.
$message
.
warning
(
`该订单
${
item
.
title
}
面未打印,无法生产完成`
);
}
}
},
async
sureData
()
{
...
...
@@ -272,7 +308,7 @@ export default {
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
async
()
=>
{
await
this
.
setData
(
this
.
detail
);
await
this
.
setData
(
this
.
detail
,
"btn"
);
});
},
clearCache
()
{
...
...
@@ -562,6 +598,8 @@ export default {
}
//如果该数据的图片第一次出现且素材图大于1张则把该数据储存到本地
if (newImgList.length > 1 && !bool && this.desktopDevice == 3) {
console.log("
addToOrderInfo
:
", this.detail);
addToOrderInfo(this.detail);
console.log("
本地数据
addToOrderInfo
:
", getOrderInfoMap());
}
...
...
@@ -689,31 +727,55 @@ export default {
(this.detail.status == "
PENDING_PICK
" ||
this.detail.status == "
PENDING_REPLENISH
")
) {
const { data, code } = await this.$api.post(
pathMap["
scanProduce
"][this.orderType],
{ id: this.detail.id, status: this.detail.status }
);
console.log("
scanProduce
---------
", data);
if (code == 301) {
this.$confirm(
`<p>库存不足,无法进入生产!请联系仓库管理人员核对库存。</p>
<p>库存数量:${data.availableInventory || 0},生产中数量:${data.inventory ||
0},可调配库存:${data.inventory || 0}</p>`,
"
提示
",
{
confirmButtonText: "
确定
",
type: "
error
",
dangerouslyUseHTMLString: true,
// 🔥 关键:添加自定义类名
customClass: "
custom
-
inventory
-
msgbox
"
}
);
this.detail = "";
this.productionNo = "";
this.$refs.searchRef?.focus();
return;
}
// const {
// data: checkInventoryData,
// code: checkInventoryCode
// } = await this.$api.post(pathMap["
checkInventory
"][this.orderType], {
// id: this.detail.id,
// status: this.detail.status
// });
// if (checkInventoryCode == 301) {
// this.$confirm(
// `<p>库存不足,无法进入生产!请联系仓库管理人员核对库存。</p>
// <p>库存数量:${checkInventoryData.availableInventory ||
// 0},生产中数量:${checkInventoryData.inventory ||
// 0},可调配库存:${checkInventoryData.inventory || 0}</p>`,
// "
提示
",
// {
// confirmButtonText: "
确定
",
// type: "
error
",
// dangerouslyUseHTMLString: true,
// customClass: "
custom
-
inventory
-
msgbox
"
// }
// );
// this.detail = "";
// this.productionNo = "";
// this.$refs.searchRef?.focus();
// return;
// }
// const { data, code } = await this.$api.post(
// pathMap["
scanProduce
"][this.orderType],
// { id: this.detail.id, status: this.detail.status }
// );
// if (code == 301) {
// this.$confirm(
// `<p>库存不足,无法进入生产!请联系仓库管理人员核对库存。</p>
// <p>库存数量:${data.availableInventory || 0},生产中数量:${data.inventory ||
// 0},可调配库存:${data.inventory || 0}</p>`,
// "
提示
",
// {
// confirmButtonText: "
确定
",
// type: "
error
",
// dangerouslyUseHTMLString: true,
// // 🔥 关键:添加自定义类名
// customClass: "
custom
-
inventory
-
msgbox
"
// }
// );
// this.detail = "";
// this.productionNo = "";
// this.$refs.searchRef?.focus();
// return;
// }
}
let designImagesCanvasJsonList = this.detail.drParam;
...
...
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