Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pda-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
pda
pda-ui
Commits
517eb14c
Commit
517eb14c
authored
Mar 16, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改排班计划和节假日设置
parent
9173cd9c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
543 additions
and
366 deletions
+543
-366
calholiday.js
src/api/mes/cal/calholiday.js
+13
-4
calplan.js
src/api/mes/cal/calplan.js
+12
-4
planteam.js
src/api/mes/cal/planteam.js
+14
-14
shift.js
src/api/mes/cal/shift.js
+11
-4
team.js
src/api/mes/cal/team.js
+2
-2
calendarType.vue
src/views/mes/cal/calendar/calendarType.vue
+2
-2
index.vue
src/views/mes/cal/calendar/index.vue
+5
-5
index.vue
src/views/mes/cal/holiday/index.vue
+41
-27
itemIndex.vue
src/views/mes/cal/holiday/itemIndex.vue
+223
-0
index.vue
src/views/mes/cal/plan/index.vue
+56
-82
shift.vue
src/views/mes/cal/plan/shift.vue
+101
-138
team.vue
src/views/mes/cal/plan/team.vue
+53
-76
multi.vue
src/views/mes/cal/team/calTeamSelect/multi.vue
+10
-8
No files found.
src/api/mes/cal/calholiday.js
View file @
517eb14c
...
...
@@ -9,6 +9,15 @@ export function listCalholiday(query) {
})
}
// 查询上班数据工作单元列表
export
function
listItem
(
query
)
{
return
request
({
url
:
"/md/cal/plan/workunit/list"
,
method
:
"get"
,
params
:
query
,
});
}
// 查询节假日设置详细
export
function
getCalholiday
(
holidayId
)
{
return
request
({
...
...
@@ -20,10 +29,10 @@ export function getCalholiday(holidayId) {
// 新增节假日设置
export
function
addCalholiday
(
data
)
{
return
request
({
url
:
'/mes/cal/calholiday'
,
method
:
'post'
,
data
:
data
})
url
:
"/md/cal/plan/workunit/editList"
,
method
:
"put"
,
data
:
data
,
})
;
}
// 修改节假日设置
...
...
src/api/mes/cal/calplan.js
View file @
517eb14c
...
...
@@ -29,12 +29,20 @@ export function addCalplan(data) {
// 修改排班计划
export
function
updateCalplan
(
data
)
{
return
request
({
url
:
'/mes/cal/calplan'
,
method
:
'put'
,
data
:
data
})
url
:
"/mes/cal/calplan"
,
method
:
"put"
,
data
:
data
,
})
;
}
// 完成排班计划
export
function
finishCalplan
(
data
)
{
return
request
({
url
:
"/mes/cal/calplan/releasePlan"
,
method
:
"put"
,
data
:
data
,
});
}
// 删除排班计划
export
function
delCalplan
(
planId
)
{
return
request
({
...
...
src/api/mes/cal/planteam.js
View file @
517eb14c
import
request
from
'@/utils/request'
// 查询计划
班组
列表
// 查询计划
工作单元
列表
export
function
listPlanteam
(
query
)
{
return
request
({
url
:
'/mes/cal/planteam/list'
,
method
:
'get'
,
params
:
query
})
url
:
"/md/cal/workunit/list"
,
method
:
"get"
,
params
:
query
,
})
;
}
// 新增计划
班组
// 新增计划
工作单元
export
function
addPlanteam
(
data
)
{
return
request
({
url
:
'/mes/cal/planteam'
,
method
:
'post'
,
data
:
data
})
url
:
"/md/cal/workunit/addList"
,
method
:
"post"
,
data
:
data
,
})
;
}
// 删除计划
班组
// 删除计划
工作单元
export
function
delPlanteam
(
recordId
)
{
return
request
({
url
:
'/mes/cal/planteam/'
+
recordId
,
method
:
'delete'
})
url
:
"/md/cal/workunit/"
+
recordId
,
method
:
"delete"
,
})
;
}
src/api/mes/cal/shift.js
View file @
517eb14c
...
...
@@ -3,10 +3,17 @@ import request from '@/utils/request'
// 查询计划班次列表
export
function
listShift
(
query
)
{
return
request
({
url
:
'/mes/cal/shift/list'
,
method
:
'get'
,
params
:
query
})
url
:
`/mes/cal/shift/getDetailShift/
${
query
.
shiftType
}
`
,
method
:
"get"
});
}
// 查询计划班次列表
export
function
listEditShift
(
query
)
{
return
request
({
url
:
`/mes/cal/shift/list`
,
method
:
"get"
,
params
:
query
,
});
}
// 查询计划班次详细
...
...
src/api/mes/cal/team.js
View file @
517eb14c
import
request
from
'@/utils/request'
// 查询
班组
列表
// 查询
工作单元
列表
export
function
listTeam
(
query
)
{
return
request
({
url
:
'/m
es/cal/team
/list'
,
url
:
'/m
d/workunit
/list'
,
method
:
'get'
,
params
:
query
})
...
...
src/views/mes/cal/calendar/calendarType.vue
View file @
517eb14c
<
template
>
<div
class=
"app-container"
>
<el-container>
<el-aside
width=
"200px"
>
<
!--
<
el-aside
width=
"200px"
>
<el-radio-group
v-model=
"selectedType"
class=
"x-fillitem el-group-list"
@
change=
"onSelected"
>
<el-radio-button
v-for=
"dict in dict.type.mes_calendar_type"
...
...
@@ -9,7 +9,7 @@
:label=
"dict.value"
>
{{
dict
.
label
}}
</el-radio-button>
</el-radio-group>
</el-aside>
</el-aside>
-->
<el-main>
<el-calendar
v-loading=
"loading"
v-model=
"date"
>
<template
slot=
"dateCell"
slot-scope=
"
{date, data }">
...
...
src/views/mes/cal/calendar/index.vue
View file @
517eb14c
<
template
>
<div
class=
"app-container"
>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"
分类
"
>
<el-tab-pane
label=
"
首页
"
>
<CalendarTypeView></CalendarTypeView>
</el-tab-pane>
<el-tab-pane
label=
"
班组
"
>
<el-tab-pane
label=
"
工作单元
"
>
<TeamView></TeamView>
</el-tab-pane>
<el-tab-pane
label=
"个人"
>
<
!--
<
el-tab-pane
label=
"个人"
>
<UserView></UserView>
</el-tab-pane>
</el-tab-pane>
-->
</el-tabs>
</div>
</
template
>
...
...
@@ -30,4 +30,4 @@ export default {
<
style
>
</
style
>
\ No newline at end of file
</
style
>
src/views/mes/cal/holiday/index.vue
View file @
517eb14c
...
...
@@ -5,7 +5,7 @@
<div
@
contextmenu
.
prevent=
"onRightClick(data)"
>
<el-row>
<el-col
:span=
"16"
>
<div
class=
"solar"
>
<div
class=
"solar"
>
{{
data
.
day
.
split
(
'-'
)[
2
]
}}
</div>
</el-col>
...
...
@@ -17,13 +17,13 @@
<el-row>
<el-col
:span=
"24"
>
<div
class=
"lunar"
:class=
"
{ festival : isFestival(date, data) }">
{{
solarDate2lunar
(
data
.
day
)
}}
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</div>
</
template
>
</el-calendar>
<!-- 添加或修改节假日设置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<
!-- <
el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
...
...
@@ -45,14 +45,26 @@
<el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog> -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1200px"
append-to-body
>
<item-index
ref=
"itemIndex"
v-if=
"open"
optType=
"add"
:theDay=
"theDay"
></item-index>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-hasPermi=
"['mes:cal:calholiday:edit']"
@
click=
"submitForm(2)"
>
放 假
</el-button>
<el-button
type=
"primary"
v-hasPermi=
"['mes:cal:calholiday:edit']"
@
click=
"submitForm(1)"
>
加 班
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listCalholiday
,
getCalholiday
,
delCalholiday
,
addCalholiday
,
updateCalholiday
}
from
"@/api/mes/cal/calholiday"
;
import
ItemIndex
from
"./itemIndex"
;
import
calendar
from
'@/utils/calendar'
;
export
default
{
components
:
{
ItemIndex
},
data
(){
return
{
// 遮罩层
...
...
@@ -64,7 +76,7 @@ export default {
title
:
"节假日设置"
,
// 是否显示弹出层
open
:
false
,
form
:{}
,
theDay
:
null
,
queryParams
:
{
theDay
:
null
,
holidayType
:
null
,
...
...
@@ -85,10 +97,10 @@ export default {
methods
:{
/** 查询节假日设置列表 */
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
holidayList
=
[];
this
.
workdayList
=
[];
let
that
=
this
;
let
that
=
this
;
listCalholiday
(
this
.
queryParams
).
then
(
response
=>
{
debugger
;
if
(
response
.
data
!=
null
){
...
...
@@ -98,7 +110,7 @@ export default {
}
else
{
that
.
workdayList
.
push
(
theDay
.
theDay
);
}
});
});
this
.
loading
=
false
;
}
});
...
...
@@ -106,18 +118,20 @@ export default {
onRightClick
(
date
){
this
.
open
=
true
;
this
.
reset
();
this
.
form
.
theDay
=
date
.
day
;
console
.
log
()
this
.
theDay
=
date
.
day
;
},
submitForm
(){
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
addCalholiday
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"设置成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
});
submitForm
(
isWork
){
const
datas
=
this
.
$refs
.
itemIndex
.
selectRow
.
map
(
item
=>
{
return
{
id
:
item
.
id
,
isWork
}
})
addCalholiday
(
datas
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"设置成功"
);
this
.
$refs
.
itemIndex
.
getList
();
});
},
// 取消按钮
cancel
()
{
...
...
@@ -138,20 +152,20 @@ export default {
isFestival
(
slotDate
,
slotData
)
{
let
solarDayArr
=
slotData
.
day
.
split
(
'-'
);
let
lunarDay
=
calendar
.
solar2lunar
(
solarDayArr
[
0
],
solarDayArr
[
1
],
solarDayArr
[
2
])
// 公历节日\农历节日\农历节气
let
festAndTerm
=
[];
festAndTerm
.
push
(
lunarDay
.
festival
==
null
?
''
:
' '
+
lunarDay
.
festival
)
festAndTerm
.
push
(
lunarDay
.
lunarFestival
==
null
?
''
:
''
+
lunarDay
.
lunarFestival
)
festAndTerm
.
push
(
lunarDay
.
Term
==
null
?
''
:
''
+
lunarDay
.
Term
)
festAndTerm
=
festAndTerm
.
join
(
''
)
return
festAndTerm
!=
''
},
solarDate2lunar
(
solarDate
)
{
var
solar
=
solarDate
.
split
(
'-'
)
var
lunar
=
calendar
.
solar2lunar
(
solar
[
0
],
solar
[
1
],
solar
[
2
])
var
lunar
=
calendar
.
solar2lunar
(
solar
[
0
],
solar
[
1
],
solar
[
2
])
let
lunarMD
=
lunar
.
IMonthCn
+
lunar
.
IDayCn
;
// 公历节日\农历节日\农历节气
let
festAndTerm
=
[];
...
...
@@ -159,9 +173,9 @@ export default {
festAndTerm
.
push
(
lunar
.
lunarFestival
==
null
?
''
:
''
+
lunar
.
lunarFestival
)
festAndTerm
.
push
(
lunar
.
Term
==
null
?
''
:
''
+
lunar
.
Term
)
festAndTerm
=
festAndTerm
.
join
(
''
)
return
festAndTerm
==
''
?
lunarMD
:
festAndTerm
}
}
}
...
...
@@ -186,4 +200,4 @@ export default {
.el-calendar-table
.holiday
{
background-color
:
#88E325
;
}
</
style
>
\ No newline at end of file
</
style
>
src/views/mes/cal/holiday/itemIndex.vue
0 → 100644
View file @
517eb14c
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"工作单元ID"
prop=
"workunit"
>
<el-input
v-model=
"queryParams.workunit"
placeholder=
"请输入工作单元ID"
clearable
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"工作状态"
prop=
"isWork"
>
<el-select
v-model=
"queryParams.isWork"
placeholder=
"请选择工作状态"
clearable
>
<el-option
label=
"工作"
value=
"1"
/>
<el-option
label=
"休息"
value=
"2"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"tmToolRequestItemList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"工作单元编码"
align=
"center"
prop=
"workunitCode"
/>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"工作状态"
align=
"center"
prop=
"isWork"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
isWork
==
'1'
?
'工作'
:
'休息'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"工作开始时间"
align=
"center"
prop=
"startTime"
/>
<el-table-column
label=
"工作结束时间"
align=
"center"
prop=
"endTime"
/>
<el-table-column
label=
"工作休息开始时间"
align=
"center"
prop=
"breakStartTime"
/>
<el-table-column
label=
"工作休息结束时间"
align=
"center"
prop=
"breakEndTime"
/>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
listItem
,
getTmToolRequestItem
,
delTmToolRequestItem
,
addTmToolRequestItem
,
updateTmToolRequestItem
}
from
"@/api/mes/cal/calholiday"
;
import
{
getTaskIdMaxProcessTool
}
from
"@/api/mes/pro/protask"
;
export
default
{
name
:
"TmToolRequestItem"
,
components
:
{},
props
:{
theDay
:{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
// 遮罩层
loading
:
false
,
// 选中数组
ids
:
[],
selectRow
:
[],
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 刀模板物料申请单表格数据
tmToolRequestItemList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
workunit
:
null
,
isWork
:
null
,
theDay
:
this
.
theDay
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
},
addList
:
[],
detailList
:
[]
};
},
watch
:
{
// 根据名称筛选分类树
theDay
:
{
handler
(
newName
,
oldName
)
{
if
(
newName
)
{
this
.
getList
();
}
},
immediate
:
true
}
},
created
()
{
},
methods
:
{
onItemSelect
(
list
){
// console.log(list, 'list')
this
.
addList
=
list
.
map
(
item
=>
{
return
{
itemId
:
item
.
itemId
,
itemName
:
item
.
itemName
,
allQuantity
:
1
,
nextMaintenPeriod
:
Number
(
this
.
$attrs
.
quantity
)
}
})
this
.
tmToolRequestItemList
=
this
.
detailList
.
concat
(
this
.
addList
)
this
.
$emit
(
'sum'
)
},
/** 查询刀模板物料申请单列表 */
getList
()
{
this
.
loading
=
true
;
listItem
(
this
.
queryParams
).
then
(
response
=>
{
this
.
tmToolRequestItemList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
toolRequestItemId
:
null
,
toolRequestId
:
null
,
itemId
:
null
,
allQuantity
:
null
,
nextMaintenPeriod
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
toolRequestItemId
)
this
.
selectRow
=
selection
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加刀模板物料申请单"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
toolRequestItemId
=
row
.
toolRequestItemId
||
this
.
ids
getTmToolRequestItem
(
toolRequestItemId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改刀模板物料申请单"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
toolRequestItemId
!=
null
)
{
updateTmToolRequestItem
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addTmToolRequestItem
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
toolRequestItemIds
=
row
.
toolRequestItemId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除刀模板物料申请单编号为"'
+
toolRequestItemIds
+
'"的数据项?'
).
then
(
function
()
{
return
delTmToolRequestItem
(
toolRequestItemIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'tm/tmToolRequestItem/export'
,
{
...
this
.
queryParams
},
`tmToolRequestItem_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
};
</
script
>
src/views/mes/cal/plan/index.vue
View file @
517eb14c
This diff is collapsed.
Click to expand it.
src/views/mes/cal/plan/shift.vue
View file @
517eb14c
This diff is collapsed.
Click to expand it.
src/views/mes/cal/plan/team.vue
View file @
517eb14c
<
template
>
<div
class=
"app-container"
>
<el-row>
<el-col
:span=
"12"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
班组
</span>
<el-button
style=
"float: right; padding: 3px 0"
v-if=
"optType !='view'"
@
click=
"handleAdd"
type=
"text"
>
添加
</el-button>
</div>
<el-table
v-loading=
"loading"
:data=
"teamList"
@
row-click=
"onRowClick"
>
<el-table-column
label=
"班组编号"
align=
"center"
prop=
"teamCode"
>
</el-table-column>
<el-table-column
label=
"班组名称"
align=
"center"
prop=
"teamName"
/>
<el-table-column
label=
"操作"
align=
"center"
v-if=
"optType !='view'"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['mes:cal:calplan:edit']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<TeamSelect
ref=
"teamSelect"
@
onSelected=
"onTeamSelected"
></TeamSelect>
</el-card>
</el-col>
<el-col
:span=
"12"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
成员
</span>
</div>
<el-table
v-loading=
"loading"
:data=
"teammemberList"
>
<el-table-column
label=
"用户名"
align=
"center"
prop=
"userName"
/>
<el-table-column
label=
"用户昵称"
align=
"center"
prop=
"nickName"
/>
<el-table-column
label=
"电话"
align=
"center"
prop=
"tel"
/>
</el-table>
</el-card>
</el-col>
</el-row>
<div
class=
"clearfix"
>
<span>
工作单元
</span>
<el-button
style=
"float: right;"
v-if=
"optType !='view'"
@
click=
"handleAdd"
type=
"primary"
>
新增
</el-button>
</div>
<el-table
v-loading=
"loading"
:data=
"teamList"
>
<el-table-column
label=
"工作单元ID"
align=
"center"
prop=
"workunitId"
>
</el-table-column>
<el-table-column
label=
"工作单元编码"
align=
"center"
prop=
"workunitCode"
/>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"操作"
align=
"center"
v-if=
"optType !='view'"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['mes:cal:calplan:edit']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getTeamList"
/>
<TeamSelect
ref=
"teamSelect"
@
onSelected=
"onTeamSelected"
></TeamSelect>
</div>
</template>
<
script
>
import
{
listPlanteam
,
delPlanteam
,
addPlanteam
}
from
"@/api/mes/cal/planteam"
;
import
{
listTeammember
}
from
"@/api/mes/cal/teammember"
;
import
TeamSelect
from
"@/components/calTeamSelect/multi.vue"
import
TeamSelect
from
"../team/calTeamSelect/multi.vue"
export
default
{
name
:
"PlanTeam"
,
components
:{
TeamSelect
},
props
:{
planId
:
null
,
optType
:
null
,
form
:
null
,
calendarType
:
null
},
data
(){
...
...
@@ -64,60 +54,47 @@ export default {
teammemberList
:
[],
form
:{},
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
planId
:
this
.
planId
,
teamId
:
null
,
teamCode
:
null
,
teamName
:
null
,
calendarType
:
this
.
calendarType
pageNum
:
1
,
pageSize
:
10
,
planId
:
this
.
planId
},
total
:
0
}
},
created
()
{
this
.
getTeamList
();
this
.
getTeamList
();
},
methods
:{
getTeamList
(){
this
.
loading
=
true
;
listPlanteam
(
this
.
queryParams
).
then
(
response
=>
{
this
.
teamList
=
response
.
rows
;
this
.
teamList
=
response
.
rows
;
this
.
total
=
response
.
total
this
.
loading
=
false
;
});
},
getMemberList
(
id
){
var
param
=
{
teamId
:
id
}
this
.
loading
=
true
;
listTeammember
(
param
).
then
(
response
=>
{
this
.
teammemberList
=
response
.
rows
;
this
.
loading
=
false
;
});
},
onRowClick
(
row
){
this
.
getMemberList
(
row
.
teamId
);
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
$refs
.
teamSelect
.
showFlag
=
true
;
},
onTeamSelected
(
rows
){
rows
.
forEach
(
team
=>
{
this
.
form
.
teamId
=
team
.
teamId
;
this
.
form
.
teamCode
=
team
.
teamCode
;
this
.
form
.
teamName
=
team
.
teamName
;
this
.
form
.
planId
=
this
.
planId
;
this
.
form
.
calendarType
=
this
.
calendarType
;
addPlanteam
(
this
.
form
).
then
(
response
=>
{
this
.
getTeamList
();
});
});
// console.log(rows, 'rows')
const
data
=
rows
.
map
(
team
=>
{
return
{
...
team
,
planId
:
this
.
planId
,
planCode
:
this
.
form
.
planCode
,
}
});
addPlanteam
(
data
).
then
(
response
=>
{
this
.
getTeamList
();
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
recordIds
=
row
.
recordI
d
this
.
$modal
.
confirm
(
'是否确认删除
班组
?'
).
then
(
function
()
{
const
recordIds
=
row
.
i
d
this
.
$modal
.
confirm
(
'是否确认删除
工作单元
?'
).
then
(
function
()
{
return
delPlanteam
(
recordIds
);
}).
then
(()
=>
{
this
.
getTeamList
();
...
...
@@ -130,4 +107,4 @@ export default {
<
style
>
</
style
>
\ No newline at end of file
</
style
>
src/
components
/calTeamSelect/multi.vue
→
src/
views/mes/cal/team
/calTeamSelect/multi.vue
View file @
517eb14c
<
template
>
<el-dialog
title=
"
班组
选择"
<el-dialog
title=
"
工作单元
选择"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
false
width=
"80%"
center
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<
!--
<
el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"班组编号"
prop=
"teamCode"
>
<el-input
v-model=
"queryParams.teamCode"
...
...
@@ -27,16 +26,19 @@
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
</el-form>
-->
<el-table
v-loading=
"loading"
:data=
"teamList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"
班组编号"
align=
"center"
prop=
"teamCode
"
>
<el-table-column
label=
"
工作单元ID"
width=
"80"
align=
"center"
prop=
"workunitId
"
>
</el-table-column>
<el-table-column
label=
"班组名称"
align=
"center"
prop=
"teamName"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"工作单元编码"
align=
"center"
prop=
"workunitCode"
/>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"开始时间"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"更新时间"
align=
"center"
prop=
"updateTime"
/>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
...
...
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