Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes-pad
Commits
a3fd3d23
Commit
a3fd3d23
authored
Sep 21, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
序列号报工
parent
5097c590
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
12 deletions
+71
-12
index.vue
pages/mes/prodReport/index.vue
+71
-12
No files found.
pages/mes/prodReport/index.vue
View file @
a3fd3d23
...
...
@@ -141,7 +141,7 @@
<u-col
:span=
"6"
v-if=
"feedback.isSerialReport && Number(feedback.isSerialReport) === 1"
>
<u-form-item
label=
"序列号:"
name=
"qrcode"
>
<uni-easyinput
type=
"text"
suffixIcon=
"scan"
v-model=
"feedback.qrcode"
style=
"width: 200px"
@
change=
"onQrcodechange"
@
iconClick=
"iconClickQrcode"
placeholder=
"请输入序列号"
/>
@
iconClick=
"iconClickQrcode"
placeholder=
"请输入序列号"
@
focus=
"feedback.oldqrcode = feedback.qrcode"
/>
</u-form-item>
</u-col>
</u-row>
...
...
@@ -163,7 +163,7 @@
<u-row>
<u-col
span=
"6"
>
<u-form-item
label=
"合格数量:"
prop=
"quantityQualify"
>
<u-number-box
:min=
"0"
@
change=
"quantityChanged()"
:max=
"9999999999999999999999999999999999999999"
:input-width=
"190"
<u-number-box
:min=
"0"
@
change=
"quantityChanged()"
:max=
"
feedback.isSerialReport && Number(feedback.isSerialReport) === 1 ? 1 :
9999999999999999999999999999999999999999"
:input-width=
"190"
v-model=
"feedback.quantityQualify"
:long-press=
"false"
></u-number-box>
</u-form-item>
</u-col>
...
...
@@ -1508,27 +1508,77 @@ export default {
});
},
iconClickQrcode
()
{
this
.
feedbackForms
[
0
][
'oldqrcode'
]
=
this
.
feedbackForms
[
0
][
'qrcode'
]
uni
.
scanCode
({
success
:
(
res
)
=>
{
// console.log(res, 'res');
this
.
feedbackForms
[
0
][
'qrcode'
]
=
res
.
result
this
.
onQrcodechange
();
this
.
onQrcodechange
(
res
.
result
);
},
fail
:
()
=>
{
this
.
$u
.
toast
(
'扫码失败,请重新扫描'
);
}
});
},
onQrcodechange
(){
onQrcodechange
(
val
){
if
(
!
val
)
return
const
datas
=
Object
.
assign
({},
this
.
feedbackForms
[
0
]);
this
.
$u
.
api
.
validateSerialNo
({
"qrcode"
:
datas
.
qrcode
,
"taskWorkunitId"
:
datas
.
taskWorkunitId
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
this
.
feedbackForms
[
0
][
'oldqrcode'
])
{
const
item
=
this
.
feedbackForms
[
0
]
const
par
=
{
//工单
taskWorkunitId
:
item
.
taskWorkunitId
,
taskId
:
item
.
taskId
,
taskCode
:
item
.
taskCode
,
quantityFeedback
:
item
.
quantityQualify
+
item
.
quantityUnqualify
,
quantityQualify
:
item
.
quantityQualify
,
quantityUnqualify
:
item
.
quantityUnqualify
,
userName
:
item
.
userName
||
this
.
vuex_user
.
userName
,
feedbackType
:
item
.
feedbackType
,
routeId
:
item
.
routeId
,
routeCode
:
item
.
routeCode
,
processId
:
item
.
processId
,
processCode
:
item
.
processCode
,
processName
:
item
.
processName
,
itemId
:
item
.
itemId
,
itemCode
:
item
.
itemCode
,
itemName
:
item
.
itemName
,
workstationId
:
item
.
workstationId
,
workstationCode
:
item
.
workstationCode
,
workorderId
:
item
.
workorderId
,
workorderCode
:
item
.
workorderCode
,
workstationName
:
item
.
workstationName
,
startTime
:
item
.
scheduleStartDate
,
printTemplate
:
item
.
printTemplate
,
netWeight
:
item
.
netWeight
,
feedbackTime
:
item
.
feedbackTime
,
minPackageNum
:
item
.
minPackageNum
,
printContents
:
item
.
whether
==
'1'
?
item
.
printContents
:
null
}
if
(
item
.
isSerialReport
&&
Number
(
item
.
isSerialReport
)
===
1
)
{
par
[
'qrcode'
]
=
item
.
qrcode
par
[
'decompressionValue'
]
=
item
.
decompressionValue
par
[
'remark'
]
=
item
.
remark
}
this
.
$u
.
api
.
feedback
(
par
).
then
(
res
=>
{
if
(
!
res
.
msg
)
{
this
.
$u
.
toast
(
'上报成功'
);
}
else
{
this
.
$u
.
toast
(
res
.
msg
);
}
this
.
feedbackForms
[
0
][
'qrcode'
]
=
val
})
}
else
{
this
.
feedbackForms
[
0
][
'qrcode'
]
=
val
}
this
.
feedbackForms
[
0
][
'feedbackTime'
]
=
this
.
parseTime
(
new
Date
())
}
else
{
console
.
log
(
'sadasd'
,
res
)
this
.
feedbackForms
[
0
][
'qrcode'
]
=
this
.
feedbackForms
[
0
][
'oldqrcode'
]
?
this
.
feedbackForms
[
0
][
'oldqrcode'
]
:
''
this
.
$u
.
toast
(
res
.
msg
||
'序列号扫描报错'
)
}
})
...
...
@@ -2108,14 +2158,15 @@ export default {
const
feedback
=
{
...
item
,
workorderFeedback
:
0
,
qrcode
:
''
,
qrcode
:
item
.
qrcode
,
oldqrcode
:
item
.
qrcode
,
workorderUnfeedback
:
0
,
workstationId
:
item
.
workstationId
,
userName
:
this
.
vuex_user
.
userName
,
taskId
:
item
.
taskId
,
taskWorkunitId
:
item
.
taskWorkunitId
,
processId
:
item
.
processId
,
workorderId
:
item
.
proWorkorderList
.
length
>
0
?
item
.
proWorkorderList
[
0
].
workorderId
:
null
,
feedbackChannel
:
'PAD'
,
quantity
:
item
.
quantity
,
//默认为排产数量-合格数-不合格数
...
...
@@ -2124,8 +2175,7 @@ export default {
printName
:
''
,
lastProcess
:
item
.
isLastProcess
==
1
,
//未工序
nickName
:
this
.
vuex_user
.
nickName
,
workorderId
:
0
,
workorderCode
:
null
,
workorderCode
:
item
.
proWorkorderList
.
length
>
0
?
item
.
proWorkorderList
[
0
].
workorderCode
:
null
,
netWeight
:
0
,
minPackageNum
:
0
,
workorderList
:
[],
...
...
@@ -2218,7 +2268,11 @@ export default {
encasementNum
:
0
,
mergePack
:
0
};
feedback
.
quantityQualify
=
item
.
quantityWait
if
(
feedback
.
isSerialReport
&&
Number
(
feedback
.
isSerialReport
)
===
1
){
feedback
.
quantityQualify
=
1
}
else
{
feedback
.
quantityQualify
=
item
.
quantityWait
}
if
(
feedback
.
taskType
&&
feedback
.
taskType
===
3
)
{
feedback
.
quantityQualify
=
item
.
quantity
-
item
.
quantityQualify
-
item
.
quantityUnqualify
feedback
.
quantityUnqualify
=
item
.
quantityUnqualify
...
...
@@ -2613,6 +2667,11 @@ export default {
minPackageNum
:
item
.
minPackageNum
,
printContents
:
item
.
whether
==
'1'
?
item
.
printContents
:
null
}
if
(
item
.
isSerialReport
&&
Number
(
item
.
isSerialReport
)
===
1
)
{
par
[
'qrcode'
]
=
item
.
qrcode
par
[
'decompressionValue'
]
=
item
.
decompressionValue
par
[
'remark'
]
=
item
.
remark
}
if
(
item
.
taskType
===
3
)
{
par
.
closeType
=
item
.
closeType
}
...
...
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