Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
mes
mes-ui
Commits
80817fc7
Commit
80817fc7
authored
Apr 22, 2025
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排班计划
parent
1093605f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
6 deletions
+37
-6
index.vue
src/views/mes/cal/plan/index.vue
+29
-2
team.vue
src/views/mes/cal/plan/team.vue
+8
-4
No files found.
src/views/mes/cal/plan/index.vue
View file @
80817fc7
...
...
@@ -60,6 +60,16 @@
v-hasPermi=
"['mes:cal:calplan:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
size=
"mini"
:disabled=
"single"
@
click=
"handleCopy"
v-hasPermi=
"['mes:cal:calplan:copy']"
>
复制
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
...
...
@@ -253,7 +263,7 @@
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"cancel"
v
-
if
=
"optType =='view' || form.status !='PREPARE'"
>
返回
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
v
-
if
=
"form.status =='PREPARE' && optType !='view' "
>
确
定
<
/el-button
>
<
el
-
button
type
=
"success"
@
click
=
"handleFinish"
v
-
if
=
"form.status =='PREPARE' && optType !='view' && form.planId !=null"
>
完成
<
/el-button
>
<
el
-
button
type
=
"success"
@
click
=
"handleFinish"
v
-
if
=
"form.status =='PREPARE' && optType !='view' &&
optType !='copy' &&
form.planId !=null"
>
完成
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
...
...
@@ -264,6 +274,7 @@
import
{
listCalplan
,
getCalplan
,
delCalplan
,
addCalplan
,
updateCalplan
,
finishCalplan
}
from
"@/api/mes/cal/calplan"
;
import
Shift
from
"./shift"
;
import
Team
from
"./team"
;
import
dayjs
from
'dayjs'
import
{
genCode
}
from
"@/api/system/autocode/rule"
export
default
{
name
:
"Calplan"
,
...
...
@@ -411,11 +422,27 @@ export default {
this
.
optType
=
"edit"
;
}
);
}
,
// 复制
handleCopy
(
row
)
{
this
.
reset
();
const
planId
=
row
.
planId
||
this
.
ids
getCalplan
(
planId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
.
status
=
"PREPARE"
this
.
form
.
endDate
=
dayjs
().
add
(
1
,
'month'
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
this
.
form
.
startDate
=
dayjs
().
add
(
1
,
'month'
).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
this
.
handleAutoGenChange
()
this
.
open
=
true
;
this
.
title
=
"添加排班计划"
;
this
.
optType
=
"copy"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
console
.
log
(
'this.form'
,
this
.
form
)
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
planId
!=
null
)
{
if
(
this
.
form
.
planId
!=
null
&&
this
.
optType
!==
"copy"
)
{
let
params
=
Object
.
assign
({
}
,
this
.
form
)
params
.
calShifts
=
this
.
$refs
.
shiftTab
.
shiftList
params
.
calWorkunits
=
this
.
$refs
.
teamTab
.
teamList
...
...
src/views/mes/cal/plan/team.vue
View file @
80817fc7
...
...
@@ -22,7 +22,7 @@
</el-table-column>
</el-table>
<pagination
v-show=
"total>0&&planId"
v-show=
"total>0&&planId
&&optType != 'copy'
"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
...
...
@@ -71,7 +71,11 @@ export default {
return
}
this
.
loading
=
true
;
listPlanteam
(
this
.
queryParams
).
then
(
response
=>
{
const
param
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
queryParams
))
if
(
this
.
optType
==
'copy'
)
{
param
[
'pageSize'
]
=
999999
}
listPlanteam
(
param
).
then
(
response
=>
{
this
.
teamList
=
response
.
rows
;
this
.
total
=
response
.
total
this
.
loading
=
false
;
...
...
@@ -87,11 +91,11 @@ export default {
const
data
=
rows
.
map
(
team
=>
{
return
{
...
team
,
planId
:
this
.
planId
,
planId
:
this
.
optType
===
'copy'
?
null
:
this
.
planId
,
planCode
:
this
.
form
.
planCode
,
}
});
if
(
!
this
.
planId
)
{
if
(
!
this
.
planId
||
this
.
optType
===
'copy'
)
{
this
.
teamList
.
push
(...
rows
)
return
}
...
...
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