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
2226922b
Commit
2226922b
authored
Oct 29, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报工人员多选
parent
8c6f39cb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
346 deletions
+76
-346
http.api.js
common/http.api.js
+4
-2
userPersonnel.vue
pages/mes/prodReport/components/userPersonnel.vue
+30
-11
index.vue
pages/mes/prodReport/index.vue
+42
-333
No files found.
common/http.api.js
View file @
2226922b
...
...
@@ -145,10 +145,12 @@ const install = (Vue, vm) => {
getIpqcCode
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/system/autocode/get/IPQC_CODE'
,
params
),
//查看人员管理精确查询
getMdWorkunitWorkerByUserName
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/md/workunitWorker/getMdWorkunitWorkerByUserName'
,
params
),
//查看人员管理
userQuery
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/md/workunitWorker/getMdWorkunitWorkerByUserName'
,
params
),
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/md/workunitWorker/list'
,
params
),
//增加缺陷记录
addDefectrecord
:
(
params
=
{})
=>
vm
.
$u
.
putJson
(
config
.
adminPath
+
'/mes/qc/defectrecord'
,
params
),
...
...
pages/mes/prodReport/components/userPersonnel.vue
View file @
2226922b
...
...
@@ -3,13 +3,20 @@
<view
class=
"search"
>
<u-form
:model=
"tableParams"
labelAlign=
"right"
class=
"tableForm"
>
<u-form-item
:label=
"$t('工号')"
label-width=
"60px"
name=
"userName"
>
<u-input
type=
"text"
v-model=
"tableParams.userName"
:placeholder=
"$t('请扫描/输入工号')"
@
confirm=
"confirmUserName($event)"
/>
<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>
<u-form-item>
<u-button
class=
"btn"
@
click=
"handleClick"
type=
"primary"
size=
"medium"
>
{{
$t
(
'搜索'
)
}}
</u-button>
</u-form-item>
</u-form>
</view>
<view>
<zb-table
ref=
"zbTable"
rowKey=
"userName"
: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>
</
template
>
...
...
@@ -26,6 +33,8 @@ export default {
data
()
{
return
{
params
:
{
pageNum
:
1
,
pageSize
:
10
,
workunitId
:
this
.
data
?.
workunitId
||
null
},
total
:
0
,
...
...
@@ -36,6 +45,10 @@ export default {
tableData
:
[],
tableSelectData
:
[],
tableColumn
:
[
{
type
:
'selection'
,
width
:
40
},
{
name
:
'userName'
,
label
:
i18n
.
t
(
'工号'
),
...
...
@@ -61,15 +74,10 @@ export default {
// }
// },
mounted
()
{
//
this.getList();
this
.
getList
();
// this.data.workstationName
},
methods
:
{
confirmUserName
(
e
)
{
this
.
tableParams
.
userName
=
e
if
(
!
this
.
tableParams
.
userName
)
return
this
.
$u
.
toast
(
i18n
.
t
(
'请输入报工人工号'
))
this
.
handleClick
()
},
handleClick
()
{
if
(
this
.
tableParams
.
userName
)
{
this
.
params
.
userName
=
this
.
tableParams
.
userName
;
...
...
@@ -81,16 +89,27 @@ export default {
}
else
{
delete
this
.
params
.
nickName
}
this
.
params
.
pageNum
=
1
;
this
.
getList
();
},
async
getList
()
{
const
res
=
await
this
.
$u
.
api
.
userQuery
(
this
.
params
);
if
(
res
.
code
==
200
&&
res
.
data
)
{
this
.
tableData
.
push
(
res
.
data
)
}
else
{
this
.
$u
.
toast
(
i18n
.
t
(
'查不到报工人数据'
))
console
.
log
(
res
,
'res'
);
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
rows
.
map
((
item
)
=>
{
return
{
...
item
,
workunitName
:
this
.
data
?.
workunitName
||
null
};
});
this
.
total
=
res
.
total
;
}
},
// 分页触发
change
(
e
)
{
this
.
params
.
pageNum
=
e
.
current
;
this
.
getList
();
},
toggleRowSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
;
...
...
pages/mes/prodReport/index.vue
View file @
2226922b
This diff is collapsed.
Click to expand it.
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