Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
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
TFMOM
TF-MOM-WEB
Commits
90781eec
Commit
90781eec
authored
Apr 01, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
胶漆申领批量操作
parent
472a197f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
23 deletions
+58
-23
footer.vue
...s/src/views/taskExecution/components/LacClaims/footer.vue
+1
-1
header.vue
...s/src/views/taskExecution/components/LacClaims/header.vue
+57
-22
No files found.
applications/dee-mes/src/views/taskExecution/components/LacClaims/footer.vue
View file @
90781eec
...
...
@@ -35,7 +35,7 @@
</div>
<!-- 表格 -->
<div>
<div>
<div
class=
"dee-table"
>
<el-table
ref=
"table"
v-loading=
"loading"
...
...
applications/dee-mes/src/views/taskExecution/components/LacClaims/header.vue
View file @
90781eec
...
...
@@ -6,22 +6,18 @@
<span>
提示:双击可编辑时间/规格
</span>
<el-button
size=
"mini"
:disabled=
"
rowData.applyStatus && rowData.applyStatus !== 'notApplied' ||$parent.$parent.$parent.$refs.footer&& $parent.$parent.$parent.$refs.footer.tableData.length > 0
"
style=
"width: 100px"
@
click=
"applyStorageReqItem"
>
胶漆使用申请
</el-button>
<el-button
size=
"mini"
:disabled=
"rowData.applyStatus !== 'applied'"
@
click=
"cancelApplyStorageReqItem"
>
撤销申请
</el-button>
</span>
</p>
<!-- 表格 -->
<div>
<div>
<div
class=
"dee-table"
>
<el-table
ref=
"table"
v-loading=
"loading"
...
...
@@ -32,8 +28,14 @@
highlight-current-row
:cell-class-name=
"deeTableCellStyle"
@
row-click=
"rowClick"
@
selection-change=
"handleSelectionChange"
@
cell-dblclick=
"deeTableEdit"
>
<el-table-column
type=
"selection"
width=
"55"
:selectable=
"selectable"
/>
<el-table-column
type=
"index"
:width=
"80"
...
...
@@ -200,7 +202,8 @@ export default {
needSpecRow
:
null
,
rowData
:
{},
defultRow
:
null
,
specOptions
:
[]
specOptions
:
[],
selectedRow
:
[]
}
},
created
()
{},
...
...
@@ -232,6 +235,9 @@ export default {
{
'name'
:
'inStorageRequestItems'
},
{
'name'
:
'extScanCodeRecords'
},
{
'name'
:
'extMaterial'
,
'openProps'
:
[
...
...
@@ -263,7 +269,8 @@ export default {
needTimeLoading
:
false
,
needTimeSelect
:
false
,
needSpecLoading
:
false
,
needSpecSelect
:
false
needSpecSelect
:
false
,
cardNo
:
p
.
extScanCodeRecords
&&
p
.
extScanCodeRecords
.
length
&&
p
.
extScanCodeRecords
[
0
].
allocateNo
||
''
}
})
this
.
tablePagination
.
total
=
res
.
items
.
totalElements
...
...
@@ -329,32 +336,52 @@ export default {
this
.
$parent
.
$parent
.
$parent
.
$refs
.
footer
.
getTableData
(
this
.
rowData
.
id
)
},
300
)
},
selectable
(
row
,
index
)
{
// 存在胶漆料调配号的数据不能使用申请也不能撤销
if
(
row
.
cardNo
)
{
return
false
}
else
{
return
true
}
},
handleSelectionChange
(
val
)
{
this
.
selectedRow
=
val
},
/**
* 胶漆使用申请
*/
applyStorageReqItem
(
row
)
{
const
that
=
this
if
(
!
that
.
rowData
.
spec
)
{
if
(
!
this
.
selectedRow
||
!
this
.
selectedRow
.
length
)
return
this
.
$utils
.
showMessageWarning
(
'请选择需要操作的数据!'
)
const
validSpec
=
this
.
selectedRow
.
find
(
item
=>
!
item
.
spec
)
if
(
validSpec
)
{
this
.
$utils
.
showMessageWarning
(
'规格不能为空!'
)
return
}
const
validStatus
=
this
.
selectedRow
.
find
(
item
=>
item
.
applyStatus
===
'applied'
)
if
(
validStatus
)
{
this
.
$utils
.
showMessageWarning
(
'只能操作状态为未申请的数据!'
)
return
}
const
params
=
this
.
selectedRow
.
map
(
item
=>
{
return
{
id
:
item
.
id
,
spec
:
item
.
spec
}
})
||
[]
post
(
`/ExtSupportingItem/deal/supportingItem?applyState=true`
,
{
id
:
that
.
rowData
.
id
,
spec
:
this
.
rowData
.
spec
}
params
)
.
then
((
res
)
=>
{
if
(
res
.
message
.
includes
(
'成功'
))
{
this
.
getTableData
()
th
at
.
$message
({
th
is
.
$message
({
showClose
:
true
,
message
:
'申请成功!'
,
type
:
'success'
})
}
else
{
th
at
.
$message
({
th
is
.
$message
({
showClose
:
true
,
message
:
'保存失败'
,
type
:
'error'
...
...
@@ -368,24 +395,32 @@ export default {
* 撤销胶漆使用申请
*/
cancelApplyStorageReqItem
()
{
var
that
=
this
if
(
!
this
.
selectedRow
||
!
this
.
selectedRow
.
length
)
return
this
.
$utils
.
showMessageWarning
(
'请选择需要操作的数据!'
)
const
validStatus
=
this
.
selectedRow
.
find
(
item
=>
item
.
applyStatus
!==
'applied'
)
if
(
validStatus
)
{
this
.
$utils
.
showMessageWarning
(
'只能操作状态为已申请的数据!'
)
return
}
const
params
=
this
.
selectedRow
.
map
(
item
=>
{
return
{
id
:
item
.
id
,
spec
:
item
.
spec
}
})
||
[]
post
(
`/ExtSupportingItem/deal/supportingItem?applyState=false`
,
{
id
:
that
.
rowData
.
id
,
spec
:
this
.
rowData
.
spec
}
params
)
.
then
((
res
)
=>
{
if
(
res
.
message
.
includes
(
'成功'
))
{
this
.
getTableData
()
th
at
.
$message
({
th
is
.
$message
({
showClose
:
true
,
message
:
'撤销申请成功!'
,
type
:
'success'
})
}
else
{
th
at
.
$message
({
th
is
.
$message
({
showClose
:
true
,
message
:
'保存失败'
,
type
:
'error'
...
...
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