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
8c6f39cb
Commit
8c6f39cb
authored
Oct 28, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不合格数量和报工人员扫码
parent
e2fe0e76
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
97 deletions
+63
-97
abnormalReason.vue
pages/mes/prodReport/components/abnormalReason.vue
+15
-40
index.vue
pages/mes/prodReport/index.vue
+48
-57
No files found.
pages/mes/prodReport/components/abnormalReason.vue
View file @
8c6f39cb
...
@@ -2,11 +2,8 @@
...
@@ -2,11 +2,8 @@
<view
class=
"dmodel-table"
>
<view
class=
"dmodel-table"
>
<view
class=
"search"
>
<view
class=
"search"
>
<u-form
:model=
"tableParams"
labelAlign=
"right"
class=
"tableForm"
>
<u-form
:model=
"tableParams"
labelAlign=
"right"
class=
"tableForm"
>
<u-form-item
:label=
"$t('工号')"
label-width=
"60px"
name=
"userName"
>
<u-form-item
:label=
"$t('不合格原因')"
label-width=
"100px"
name=
"abnormalReason"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.userName"
:placeholder=
"$t('请输入编号')"
/>
<uni-easyinput
type=
"text"
v-model=
"tableParams.abnormalReason"
/>
</u-form-item>
<u-form-item
:label=
"$t('姓名')"
label-width=
"60px"
name=
"nickName"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.nickName"
:placeholder=
"$t('请输入名称')"
/>
</u-form-item>
</u-form-item>
<u-form-item>
<u-form-item>
<u-button
class=
"btn"
@
click=
"handleClick"
type=
"primary"
size=
"medium"
>
{{
$t
(
'搜索'
)
}}
</u-button>
<u-button
class=
"btn"
@
click=
"handleClick"
type=
"primary"
size=
"medium"
>
{{
$t
(
'搜索'
)
}}
</u-button>
...
@@ -14,7 +11,7 @@
...
@@ -14,7 +11,7 @@
</u-form>
</u-form>
</view>
</view>
<view>
<view>
<zb-table
ref=
"zbTable"
rowKey=
"
userName
"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleRowSelection=
"toggleRowSelection"
></zb-table>
<zb-table
ref=
"zbTable"
rowKey=
"
abnormalId
"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleRowSelection=
"toggleRowSelection"
></zb-table>
</view>
</view>
<view
class=
"uni-pagination-box"
><uni-pagination
show-icon
:page-size=
"params.pageSize"
:current=
"params.pageNum"
:total=
"total"
@
change=
"change"
/></view>
<view
class=
"uni-pagination-box"
><uni-pagination
show-icon
:page-size=
"params.pageSize"
:current=
"params.pageNum"
:total=
"total"
@
change=
"change"
/></view>
</view>
</view>
...
@@ -25,44 +22,33 @@
...
@@ -25,44 +22,33 @@
export
default
{
export
default
{
props
:
{
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
},
data
()
{
data
()
{
return
{
return
{
params
:
{
params
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
workunitId
:
this
.
data
?.
workunitId
||
null
abnormalType
:
"UNQUALIFIED_REASON"
},
},
total
:
0
,
total
:
0
,
tableParams
:
{
tableParams
:
{
nickName
:
null
,
abnormalReason
:
null
userName
:
null
},
},
tableData
:
[],
tableData
:
[],
tableSelectData
:
[],
tableSelectData
:
[],
tableColumn
:
[
tableColumn
:
[
{
{
type
:
'
selection
'
,
type
:
'
radio
'
,
width
:
40
width
:
40
},
},
{
{
name
:
'
userName
'
,
name
:
'
abnormalReason
'
,
label
:
i18n
.
t
(
'
工号
'
),
label
:
i18n
.
t
(
'
不合格原因
'
),
width
:
160
width
:
160
},
},
{
{
name
:
'nickName'
,
name
:
'remark'
,
label
:
i18n
.
t
(
'姓名'
),
label
:
i18n
.
t
(
'备注'
),
width
:
200
},
{
name
:
'workunitName'
,
label
:
i18n
.
t
(
'工作单元'
),
width
:
160
width
:
160
}
}
]
]
...
@@ -79,29 +65,18 @@
...
@@ -79,29 +65,18 @@
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
if
(
this
.
tableParams
.
userName
)
{
if
(
this
.
tableParams
.
abnormalReason
)
{
this
.
params
.
userName
=
this
.
tableParams
.
userName
;
this
.
params
.
abnormalReason
=
this
.
tableParams
.
abnormalReason
;
}
else
{
}
else
{
delete
this
.
params
.
userName
delete
this
.
params
.
abnormalReason
}
if
(
this
.
tableParams
.
nickName
)
{
this
.
params
.
nickName
=
this
.
tableParams
.
nickName
;
}
else
{
delete
this
.
params
.
nickName
}
}
this
.
params
.
pageNum
=
1
;
this
.
params
.
pageNum
=
1
;
this
.
getList
();
this
.
getList
();
},
},
async
getList
()
{
async
getList
()
{
const
res
=
await
this
.
$u
.
api
.
userQuery
(
this
.
params
);
const
res
=
await
this
.
$u
.
api
.
abnormal
.
detail
(
this
.
params
);
console
.
log
(
res
,
'res'
);
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
rows
.
map
((
item
)
=>
{
this
.
tableData
=
res
.
rows
return
{
...
item
,
workunitName
:
this
.
data
?.
workunitName
||
null
};
});
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
}
}
},
},
...
...
pages/mes/prodReport/index.vue
View file @
8c6f39cb
...
@@ -283,7 +283,6 @@
...
@@ -283,7 +283,6 @@
>
>
<
u
-
number
-
box
<
u
-
number
-
box
:
min
=
"0"
:
min
=
"0"
@
change
=
"quantityChanged()"
:
max
=
"getFeedbackMax(feedback)"
:
max
=
"getFeedbackMax(feedback)"
:
input
-
width
=
"190"
:
input
-
width
=
"190"
v
-
model
=
"feedback.quantityQualify"
v
-
model
=
"feedback.quantityQualify"
...
@@ -298,8 +297,7 @@
...
@@ -298,8 +297,7 @@
>
>
<
u
-
number
-
box
<
u
-
number
-
box
:
min
=
"0"
:
min
=
"0"
@
change
=
"quantityChanged()"
:
max
=
"getquantityQualifyMax(feedback)"
:
max
=
"99999999999999999999999999999999999999999"
:
input
-
width
=
"190"
:
input
-
width
=
"190"
v
-
model
=
"feedback.quantityUnqualify"
v
-
model
=
"feedback.quantityUnqualify"
:
long
-
press
=
"false"
:
long
-
press
=
"false"
...
@@ -318,14 +316,15 @@
...
@@ -318,14 +316,15 @@
<
/u-form-item
>
<
/u-form-item
>
<
/u-col
>
<
/u-col
>
<
u
-
col
span
=
"6"
>
<
u
-
col
span
=
"6"
>
<
u
-
form
-
item
:
label
=
"$t('不合格原因:')"
prop
=
"abnormal
Type
"
>
<
u
-
form
-
item
:
label
=
"$t('不合格原因:')"
prop
=
"abnormal
Reason
"
>
<
u
-
input
v
-
model
=
"feedback.abnormal
Type
"
disabled
><
/u-input
>
<
u
-
input
v
-
model
=
"feedback.abnormal
Reason
"
disabled
><
/u-input
>
<
u
-
button
<
u
-
button
@
tap
=
"chooseReason(feedback)"
@
tap
=
"chooseReason(feedback)"
type
=
"success"
type
=
"success"
size
=
"mini"
size
=
"mini"
>
{{
$t
(
'选择原因'
)
}}
<
/u-butto
n
>
{{
$t
(
'选择原因'
)
}}
<
/u-butto
n
>
>
<
/u-form-item
>
<
/u-col
>
<
/u-col
>
<
u
-
col
:
span
=
"6"
>
<
u
-
col
:
span
=
"6"
>
<
u
-
form
-
item
:
label
=
"$t('报工人:')"
prop
=
"nickName"
>
<
u
-
form
-
item
:
label
=
"$t('报工人:')"
prop
=
"nickName"
>
...
@@ -349,25 +348,6 @@
...
@@ -349,25 +348,6 @@
<
/u-form-item
>
<
/u-form-item
>
<
/u-col
>
<
/u-col
>
<
/u-row
>
<
/u-row
>
<!--
<
u
-
row
>
-->
<!--
<
u
-
col
span
=
"3"
width
:
max
-
content
>
<
u
-
button
class
=
"auto-size-button"
type
=
"default"
@
tap
=
"changeShow()"
>
隐藏
<
/u-button
>
<
/u-col
>
<
view
class
=
"box"
v
-
if
=
"timeTest.isshow"
>
<
u
-
col
span
=
"6"
>
<
u
-
form
-
item
label
=
"合格数量(副):"
prop
=
"feedbackQuantityFu"
>
<
uni
-
number
-
box
:
min
=
"0"
@
change
=
"quantityChangedV2(feedback, feedbackQuantityFu)"
v
-
model
=
"feedbackQuantityFu"
><
/uni-number-box
>
<
/u-form-item
>
<
/u-col
>
<
u
-
col
span
=
"6"
>
<
u
-
form
-
item
label
=
"不良品数量(副):"
prop
=
"feedbackUnQuantityFu"
>
<
uni
-
number
-
box
:
min
=
"0"
@
change
=
"quantityChangedV2(feedback, feedbackUnQuantityFu)"
v
-
model
=
"feedbackUnQuantityFu"
><
/uni-number-box
>
<
/u-form-item
>
<
/u-col
>
<
/view> --
>
<
/u-form
>
<
/u-form
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
...
@@ -442,7 +422,7 @@
...
@@ -442,7 +422,7 @@
:
title
=
"$t('不合格原因')"
:
title
=
"$t('不合格原因')"
:
cancelText
=
"$t('取消')"
:
cancelText
=
"$t('取消')"
:
confirmText
=
"$t('确认')"
:
confirmText
=
"$t('确认')"
@
confirm
=
"
user
Determine()"
@
confirm
=
"
abnormalReason
Determine()"
show
-
cancel
-
button
show
-
cancel
-
button
:
title
-
style
=
"{
:
title
-
style
=
"{
'background-color': '#1E3770',
'background-color': '#1E3770',
...
@@ -454,10 +434,9 @@
...
@@ -454,10 +434,9 @@
width
=
"1300rpx"
width
=
"1300rpx"
>
>
<
view
>
<
view
>
<
userPersonnel
<
abnormalReason
ref
=
"
userPersonnel
Ref"
ref
=
"
abnormalReason
Ref"
v
-
if
=
"abnormalReasonVisible"
v
-
if
=
"abnormalReasonVisible"
:
data
=
"usePersonData"
/>
/>
<
/view
>
<
/view
>
<
/u-modal
>
<
/u-modal
>
...
@@ -714,6 +693,7 @@ import config from '@/common/config.js'
...
@@ -714,6 +693,7 @@ import config from '@/common/config.js'
import
SearchInput
from
'@/components/ScanInput/index.vue'
import
SearchInput
from
'@/components/ScanInput/index.vue'
import
User
from
'@/components/User/User.vue'
import
User
from
'@/components/User/User.vue'
import
abnormalReason
from
'./components/abnormalReason.vue'
import
userPersonnel
from
'./components/userPersonnel.vue'
import
userPersonnel
from
'./components/userPersonnel.vue'
import
printTemplate
from
'./components/printTemplate.vue'
import
printTemplate
from
'./components/printTemplate.vue'
import
editFeeding
from
'./components/editFeeding.vue'
import
editFeeding
from
'./components/editFeeding.vue'
...
@@ -730,6 +710,7 @@ export default {
...
@@ -730,6 +710,7 @@ export default {
mixins
:
[
cameraAuthMixin
],
mixins
:
[
cameraAuthMixin
],
components
:
{
components
:
{
SearchInput
,
SearchInput
,
abnormalReason
,
editFeeding
,
editFeeding
,
userPersonnel
,
userPersonnel
,
printTemplate
,
printTemplate
,
...
@@ -894,6 +875,7 @@ export default {
...
@@ -894,6 +875,7 @@ export default {
reason
:
null
,
reason
:
null
,
desc
:
null
,
desc
:
null
,
}
,
}
,
abnormalReasonVisible
:
false
,
screenHeight
:
768
,
screenHeight
:
768
,
usePersonData
:
{
}
,
usePersonData
:
{
}
,
title
:
i18n
.
t
(
'生产报工'
),
title
:
i18n
.
t
(
'生产报工'
),
...
@@ -1650,10 +1632,18 @@ export default {
...
@@ -1650,10 +1632,18 @@ export default {
}
else
if
(
this
.
isWaiXie
||
feedback
.
surpassState
){
}
else
if
(
this
.
isWaiXie
||
feedback
.
surpassState
){
return
9999999999999999999999999999999999999999
return
9999999999999999999999999999999999999999
}
else
if
(
!
feedback
.
surpassState
)
{
}
else
if
(
!
feedback
.
surpassState
)
{
return
feedback
.
workorderUnfeedbackSum
return
feedback
.
workorderUnfeedbackSum
-
feedback
.
quantityUnqualify
}
}
,
getquantityQualifyMax
(
feedback
){
if
(
feedback
.
isSerialReport
&&
Number
(
feedback
.
isSerialReport
)
===
1
&&
!
this
.
isWaiXie
)
{
return
1
}
else
if
(
this
.
isWaiXie
||
feedback
.
surpassState
){
return
9999999999999999999999999999999999999999
}
else
if
(
!
feedback
.
surpassState
)
{
return
feedback
.
workorderUnfeedbackSum
-
feedback
.
quantityQualify
}
}
}
,
}
,
changeWorkstation
()
{
changeWorkstation
()
{
uni
.
$emit
(
'changeWorkunit'
)
uni
.
$emit
(
'changeWorkunit'
)
}
,
}
,
...
@@ -1941,6 +1931,15 @@ export default {
...
@@ -1941,6 +1931,15 @@ export default {
knifeTemp
()
{
knifeTemp
()
{
// this.$u.toast('刀具校验通过!');
// this.$u.toast('刀具校验通过!');
}
,
}
,
abnormalReasonDetermine
(){
const
tableSelectData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
$refs
.
abnormalReasonRef
.
tableSelectData
)
)
this
.
feedbackForms
[
0
].
abnormalId
=
tableSelectData
[
0
].
abnormalId
this
.
feedbackForms
[
0
].
abnormalReason
=
tableSelectData
[
0
].
abnormalReason
this
.
feedbackForms
[
0
].
abnormalType
=
tableSelectData
[
0
].
abnormalType
this
.
feedbackForms
[
0
].
abnormalRemark
=
tableSelectData
[
0
].
remark
}
,
userDetermine
()
{
userDetermine
()
{
let
nick
=
''
let
nick
=
''
let
user
=
''
let
user
=
''
...
@@ -2222,39 +2221,12 @@ export default {
...
@@ -2222,39 +2221,12 @@ export default {
}
}
}
)
}
)
}
,
}
,
quantityChanged
(
val
)
{
this
.
feedbackForm
.
quantity
=
this
.
feedbackForm
.
quantityQualify
+
this
.
feedbackForm
.
quantityUnqualify
}
,
changeShow
()
{
changeShow
()
{
console
.
log
(
this
.
timeTest
.
isshow
)
console
.
log
(
this
.
timeTest
.
isshow
)
this
.
timeTest
.
isshow
=
!
this
.
timeTest
.
isshow
this
.
timeTest
.
isshow
=
!
this
.
timeTest
.
isshow
}
,
}
,
quantityChangedV2
(
feedback
,
val1
,
val2
)
{
let
qq
=
val1
===
0
||
val1
===
null
?
0
:
val1
let
quq
=
val2
===
0
||
val2
===
null
?
0
:
val2
if
(
qq
>
0
)
{
feedback
.
quantityQualify
=
qq
/
(
feedback
.
unitOfConvert
||
1
)
}
if
(
quq
>
0
)
{
feedback
.
quantityUnqualify
=
quq
/
(
feedback
.
unitOfConvert
||
1
)
}
feedback
.
quantityUnqualify
=
isNaN
(
feedback
.
quantityUnqualify
)
||
feedback
.
quantityUnqualify
===
null
?
0
:
feedback
.
quantityUnqualify
feedback
.
quantityQualify
=
isNaN
(
feedback
.
quantityQualify
)
||
feedback
.
quantityQualify
===
null
?
0
:
feedback
.
quantityQualify
feedback
.
quantity
=
feedback
.
quantityUnqualify
+
feedback
.
quantityQualify
}
,
getPrintTemplate
(
row
)
{
getPrintTemplate
(
row
)
{
this
.
printTemplateData
=
row
this
.
printTemplateData
=
row
this
.
printTemplateVisible
=
true
this
.
printTemplateVisible
=
true
...
@@ -2322,6 +2294,10 @@ export default {
...
@@ -2322,6 +2294,10 @@ export default {
feedbackTime
:
this
.
parseTime
(
new
Date
()),
feedbackTime
:
this
.
parseTime
(
new
Date
()),
whether
:
''
,
whether
:
''
,
closeType
:
null
,
closeType
:
null
,
abnormalId
:
null
,
abnormalReason
:
null
,
abnormalType
:
null
,
abnormalRemark
:
null
,
printTemplate
:
''
,
printTemplate
:
''
,
tableSizeData
:
[],
tableSizeData
:
[],
decompressionValue
:
''
,
decompressionValue
:
''
,
...
@@ -2790,6 +2766,13 @@ export default {
...
@@ -2790,6 +2766,13 @@ export default {
if
(
!
item
.
nickName
)
{
if
(
!
item
.
nickName
)
{
this
.
$u
.
toast
(
i18n
.
t
(
'报工人不能为空'
))
this
.
$u
.
toast
(
i18n
.
t
(
'报工人不能为空'
))
this
.
proVisible
=
true
this
.
proVisible
=
true
this
.
$refs
.
uModal
.
clearLoading
()
return
}
if
(
item
.
quantityUnqualify
&&
Number
(
item
.
quantityUnqualify
)
>
0
&&
!
item
.
abnormalReason
)
{
this
.
$u
.
toast
(
i18n
.
t
(
'不合格原因不能为空'
))
this
.
proVisible
=
true
this
.
$refs
.
uModal
.
clearLoading
()
return
return
}
}
...
@@ -2830,6 +2813,10 @@ export default {
...
@@ -2830,6 +2813,10 @@ export default {
itemName
:
item
.
processName
,
itemName
:
item
.
processName
,
workstationId
:
item
.
workstationId
,
workstationId
:
item
.
workstationId
,
workstationCode
:
item
.
workstationCode
,
workstationCode
:
item
.
workstationCode
,
abnormalId
:
item
.
abnormalId
,
abnormalReason
:
item
.
abnormalReason
,
abnormalType
:
item
.
abnormalType
,
abnormalRemark
:
item
.
abnormalRemark
,
workorderId
:
item
.
workorderId
,
workorderId
:
item
.
workorderId
,
workorderCode
:
item
.
workorderCode
,
workorderCode
:
item
.
workorderCode
,
workstationName
:
item
.
workstationName
,
workstationName
:
item
.
workstationName
,
...
@@ -2861,6 +2848,10 @@ export default {
...
@@ -2861,6 +2848,10 @@ export default {
itemId
:
item
.
itemId
,
itemId
:
item
.
itemId
,
itemCode
:
item
.
itemCode
,
itemCode
:
item
.
itemCode
,
itemName
:
item
.
itemName
,
itemName
:
item
.
itemName
,
abnormalId
:
item
.
abnormalId
,
abnormalReason
:
item
.
abnormalReason
,
abnormalType
:
item
.
abnormalType
,
abnormalRemark
:
item
.
abnormalRemark
,
workstationId
:
item
.
workstationId
,
workstationId
:
item
.
workstationId
,
workstationCode
:
item
.
workstationCode
,
workstationCode
:
item
.
workstationCode
,
workorderId
:
item
.
workorderId
,
workorderId
:
item
.
workorderId
,
...
...
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