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
Hide 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 @@
<view
class=
"dmodel-table"
>
<view
class=
"search"
>
<u-form
:model=
"tableParams"
labelAlign=
"right"
class=
"tableForm"
>
<u-form-item
:label=
"$t('工号')"
label-width=
"60px"
name=
"userName"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.userName"
:placeholder=
"$t('请输入编号')"
/>
</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
:label=
"$t('不合格原因')"
label-width=
"100px"
name=
"abnormalReason"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.abnormalReason"
/>
</u-form-item>
<u-form-item>
<u-button
class=
"btn"
@
click=
"handleClick"
type=
"primary"
size=
"medium"
>
{{
$t
(
'搜索'
)
}}
</u-button>
...
...
@@ -14,7 +11,7 @@
</u-form>
</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
class=
"uni-pagination-box"
><uni-pagination
show-icon
:page-size=
"params.pageSize"
:current=
"params.pageNum"
:total=
"total"
@
change=
"change"
/></view>
</view>
...
...
@@ -25,44 +22,33 @@
export
default
{
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
params
:
{
pageNum
:
1
,
pageSize
:
10
,
workunitId
:
this
.
data
?.
workunitId
||
null
abnormalType
:
"UNQUALIFIED_REASON"
},
total
:
0
,
tableParams
:
{
nickName
:
null
,
userName
:
null
abnormalReason
:
null
},
tableData
:
[],
tableSelectData
:
[],
tableColumn
:
[
{
type
:
'
selection
'
,
type
:
'
radio
'
,
width
:
40
},
{
name
:
'
userName
'
,
label
:
i18n
.
t
(
'
工号
'
),
name
:
'
abnormalReason
'
,
label
:
i18n
.
t
(
'
不合格原因
'
),
width
:
160
},
{
name
:
'nickName'
,
label
:
i18n
.
t
(
'姓名'
),
width
:
200
},
{
name
:
'workunitName'
,
label
:
i18n
.
t
(
'工作单元'
),
name
:
'remark'
,
label
:
i18n
.
t
(
'备注'
),
width
:
160
}
]
...
...
@@ -79,29 +65,18 @@
},
methods
:
{
handleClick
()
{
if
(
this
.
tableParams
.
userName
)
{
this
.
params
.
userName
=
this
.
tableParams
.
userName
;
}
else
{
delete
this
.
params
.
userName
}
if
(
this
.
tableParams
.
nickName
)
{
this
.
params
.
nickName
=
this
.
tableParams
.
nickName
;
if
(
this
.
tableParams
.
abnormalReason
)
{
this
.
params
.
abnormalReason
=
this
.
tableParams
.
abnormalReason
;
}
else
{
delete
this
.
params
.
nickName
delete
this
.
params
.
abnormalReason
}
this
.
params
.
pageNum
=
1
;
this
.
getList
();
},
async
getList
()
{
const
res
=
await
this
.
$u
.
api
.
userQuery
(
this
.
params
);
console
.
log
(
res
,
'res'
);
const
res
=
await
this
.
$u
.
api
.
abnormal
.
detail
(
this
.
params
);
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
rows
.
map
((
item
)
=>
{
return
{
...
item
,
workunitName
:
this
.
data
?.
workunitName
||
null
};
});
this
.
tableData
=
res
.
rows
this
.
total
=
res
.
total
;
}
},
...
...
pages/mes/prodReport/index.vue
View file @
8c6f39cb
...
...
@@ -283,7 +283,6 @@
>
<u-number-box
:min="0"
@
change
=
"quantityChanged()"
:max="getFeedbackMax(feedback)"
:input-width="190"
v-model="feedback.quantityQualify"
...
...
@@ -298,8 +297,7 @@
>
<u-number-box
:min="0"
@
change
=
"quantityChanged()"
:
max
=
"99999999999999999999999999999999999999999"
:max="getquantityQualifyMax(feedback)"
:input-width="190"
v-model="feedback.quantityUnqualify"
:long-press="false"
...
...
@@ -318,14 +316,15 @@
</u-form-item>
</u-col>
<u-col span="6">
<
u
-
form
-
item
:
label
=
"$t('不合格原因:')"
prop
=
"abnormal
Type
"
>
<
u
-
input
v
-
model
=
"feedback.abnormal
Type
"
disabled
><
/u-input
>
<u-form-item :label="$t('不合格原因:')" prop="abnormal
Reason
">
<u-input v-model="feedback.abnormal
Reason
" disabled></u-input>
<u-button
@tap="chooseReason(feedback)"
type="success"
size="mini"
>{{ $t('选择原因') }}</u-button
>
</u-form-item>
</u-col>
<u-col :span="6">
<u-form-item :label="$t('报工人:')" prop="nickName">
...
...
@@ -349,25 +348,6 @@
</u-form-item>
</u-col>
</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>
</view>
</view>
...
...
@@ -442,7 +422,7 @@
:title="$t('不合格原因')"
:cancelText="$t('取消')"
:confirmText="$t('确认')"
@
confirm
=
"
user
Determine()"
@confirm="
abnormalReason
Determine()"
show-cancel-button
:title-style="{
'background-color': '#1E3770',
...
...
@@ -454,10 +434,9 @@
width="1300rpx"
>
<view>
<
userPersonnel
ref
=
"
userPersonnel
Ref"
<
abnormalReason
ref="
abnormalReason
Ref"
v-if="abnormalReasonVisible"
:
data
=
"usePersonData"
/>
</view>
</u-modal>
...
...
@@ -714,6 +693,7 @@ import config from '@/common/config.js'
import SearchInput from '@/components/ScanInput/index.vue'
import User from '@/components/User/User.vue'
import abnormalReason from './components/abnormalReason.vue'
import userPersonnel from './components/userPersonnel.vue'
import printTemplate from './components/printTemplate.vue'
import editFeeding from './components/editFeeding.vue'
...
...
@@ -730,6 +710,7 @@ export default {
mixins: [cameraAuthMixin],
components: {
SearchInput,
abnormalReason,
editFeeding,
userPersonnel,
printTemplate,
...
...
@@ -894,6 +875,7 @@ export default {
reason: null,
desc: null,
},
abnormalReasonVisible: false,
screenHeight: 768,
usePersonData: {},
title: i18n.t('生产报工'),
...
...
@@ -1650,10 +1632,18 @@ export default {
} else if (this.isWaiXie || feedback.surpassState){
return 9999999999999999999999999999999999999999
} 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() {
uni.$emit('changeWorkunit')
},
...
...
@@ -1941,6 +1931,15 @@ export default {
knifeTemp() {
// 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() {
let nick = ''
let user = ''
...
...
@@ -2222,39 +2221,12 @@ export default {
}
})
},
quantityChanged
(
val
)
{
this
.
feedbackForm
.
quantity
=
this
.
feedbackForm
.
quantityQualify
+
this
.
feedbackForm
.
quantityUnqualify
}
,
changeShow() {
console.log(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) {
this.printTemplateData = row
this.printTemplateVisible = true
...
...
@@ -2322,6 +2294,10 @@ export default {
feedbackTime: this.parseTime(new Date()),
whether: '',
closeType: null,
abnormalId: null,
abnormalReason: null,
abnormalType: null,
abnormalRemark: null,
printTemplate: '',
tableSizeData: [],
decompressionValue: '',
...
...
@@ -2790,6 +2766,13 @@ export default {
if (!item.nickName) {
this.$u.toast(i18n.t('报工人不能为空'))
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
}
...
...
@@ -2830,6 +2813,10 @@ export default {
itemName: item.processName,
workstationId: item.workstationId,
workstationCode: item.workstationCode,
abnormalId: item.abnormalId,
abnormalReason: item.abnormalReason,
abnormalType: item.abnormalType,
abnormalRemark: item.abnormalRemark,
workorderId: item.workorderId,
workorderCode: item.workorderCode,
workstationName: item.workstationName,
...
...
@@ -2861,6 +2848,10 @@ export default {
itemId: item.itemId,
itemCode: item.itemCode,
itemName: item.itemName,
abnormalId: item.abnormalId,
abnormalReason: item.abnormalReason,
abnormalType: item.abnormalType,
abnormalRemark: item.abnormalRemark,
workstationId: item.workstationId,
workstationCode: item.workstationCode,
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