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
c17461ce
Commit
c17461ce
authored
Apr 26, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改生产排产
parent
aff0696b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
221 additions
and
79 deletions
+221
-79
scheduleList.js
src/api/mes/pro/scheduleList.js
+44
-4
index.vue
src/views/mes/pro/scheduleList/index.vue
+177
-75
No files found.
src/api/mes/pro/scheduleList.js
View file @
c17461ce
...
@@ -14,7 +14,7 @@ export function updateList(query) {
...
@@ -14,7 +14,7 @@ export function updateList(query) {
return
request
({
return
request
({
url
:
"/mes/pro/taskWorkunit/update"
,
url
:
"/mes/pro/taskWorkunit/update"
,
method
:
"post"
,
method
:
"post"
,
data
:
query
,
data
:
query
});
});
}
}
// 下达生产
// 下达生产
...
@@ -22,7 +22,7 @@ export function makeProduction(query) {
...
@@ -22,7 +22,7 @@ export function makeProduction(query) {
return
request
({
return
request
({
url
:
"/mes/pro/taskWorkunit/makeProduction"
,
url
:
"/mes/pro/taskWorkunit/makeProduction"
,
method
:
"post"
,
method
:
"post"
,
data
:
query
,
data
:
query
});
});
}
}
...
@@ -31,7 +31,7 @@ export function makeSchedule(query) {
...
@@ -31,7 +31,7 @@ export function makeSchedule(query) {
return
request
({
return
request
({
url
:
"/mes/pro/protask/schedule"
,
url
:
"/mes/pro/protask/schedule"
,
method
:
"post"
,
method
:
"post"
,
data
:
query
,
data
:
query
});
});
}
}
...
@@ -40,6 +40,46 @@ export function taskWorkunitList(query) {
...
@@ -40,6 +40,46 @@ export function taskWorkunitList(query) {
return
request
({
return
request
({
url
:
"/mes/pro/taskWorkunit/workorderList"
,
url
:
"/mes/pro/taskWorkunit/workorderList"
,
method
:
"post"
,
method
:
"post"
,
data
:
query
,
data
:
query
});
}
// 车间列表查询
export
function
getworkshopList
(
query
)
{
// workshopId workshopName
return
request
({
url
:
"/mes/md/workshop/list"
,
method
:
"get"
});
}
// 工作中心查询
export
function
getworkstationList
(
query
)
{
// workshopId workstationId workstationName
return
request
({
url
:
"/mes/md/workstation/list"
,
method
:
"get"
,
params
:
query
});
});
}
}
// 查询任务工作单元列表
export
function
gettaskWorkunitList
(
query
)
{
// workshopId workCenterId = workstationId workstationName workunitId workunitName
return
request
({
url
:
"md/workunit/list"
,
method
:
"get"
,
params
:
query
,
});
}
// 默认工作中心查询
export
function
getdefaultWorkCenterList
()
{
// workshopId workCenterId = workstationId workstationName workunitId workunitName
return
request
({
url
:
"/mes/md/workstation/defaultList"
,
method
:
"get"
});
}
src/views/mes/pro/scheduleList/index.vue
View file @
c17461ce
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
style=
"display: flex;"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<div
style=
"width: 600px; margin-right:10px;"
>
<el-form
:model=
"queryWorkunitParams"
ref=
"queryWorkunitForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"车间"
prop=
"workshopId"
>
<el-select
v-model=
"queryWorkunitParams.workshopId"
placeholder=
"请选择车间"
clearable
@
change=
"handleChangeWorkshopId"
>
<el-option
v-for=
"dict in workshopList"
:key=
"dict.workshopId"
:label=
"dict.workshopName"
:value=
"dict.workshopId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"工作中心"
prop=
"workstationId"
>
<el-select
v-model=
"queryWorkunitParams.workstationId"
placeholder=
"请选择工作中心"
clearable
@
change=
"handleChangeWorkStationId"
>
<el-option
v-for=
"dict in workstationList"
:key=
"dict.workstationId"
:label=
"dict.workstationName"
:value=
"dict.workstationId"
/>
</el-select>
</el-form-item>
<!--
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleWorkunitQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetWorkunitQuery"
>
重置
</el-button>
</el-form-item>
-->
</el-form>
<div
v-if=
"taskWorkunitList.length"
class=
"cardBox"
>
<div
class=
"list"
>
<div
@
click
.
stop=
"handleClick(item,index)"
class=
"list-item"
:class=
"
{'active': currentTask === index}" v-for="(item,index) in taskWorkunitList" :key="index">
<div
class=
"item-top"
>
工作单元:
{{
item
.
workunitCode
}}
</div>
<div>
工作单元名称:
{{
item
.
workunitName
}}
</div>
</div>
</div>
</div>
</div>
<div>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"任务号"
prop=
"taskCode"
>
<el-form-item
label=
"任务号"
prop=
"taskCode"
>
<el-input
<el-input
v-model=
"queryParams.taskCode"
v-model=
"queryParams.taskCode"
...
@@ -62,16 +99,6 @@
...
@@ -62,16 +99,6 @@
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<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-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"单据状态"
prop=
"maintenanceStatus"
>
<el-select
v-model=
"queryParams.maintenanceStatus"
placeholder=
"请选择单据状态"
clearable
>
<el-option
v-for=
"dict in dict.TASK_STATUS"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
-->
</el-form>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
...
@@ -83,47 +110,47 @@
...
@@ -83,47 +110,47 @@
@
click=
"handleSchedule"
@
click=
"handleSchedule"
>
排程
</el-button>
>
排程
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<
!--
<
el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
size=
"mini"
size=
"mini"
@
click=
"handleSumbmitMakeProduction"
@
click=
"handleSumbmitMakeProduction"
>
下达生产
</el-button>
>
下达生产
</el-button>
</el-col>
</el-col>
-->
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:data=
"maintenanceList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"maintenanceList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"任务单编码"
width=
"120"
prop=
"task
Code"
>
<el-table-column
label=
"编排单号"
width=
"120"
prop=
"arrange
Code"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
@
click=
"handleView(scope.row)"
@
click=
"taskWorkunitId= scope.row.taskWorkunitId, arrangCodeVisible = true"
v-hasPermi=
"['mes:pro:protask:query']"
>
{{
scope
.
row
.
arrangeCode
}}
</el-button
>
{{
scope
.
row
.
taskCode
}}
</el-button
>
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"
编排单号"
width=
"120"
prop=
"arrange
Code"
>
<el-table-column
label=
"
任务单编码"
width=
"120"
prop=
"task
Code"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
@
click=
"taskWorkunitId= scope.row.taskWorkunitId, arrangCodeVisible = true"
@
click=
"handleView(scope.row)"
>
{{
scope
.
row
.
arrangeCode
}}
</el-button
v-hasPermi=
"['mes:pro:protask:query']"
>
{{
scope
.
row
.
taskCode
}}
</el-button
>
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- <el-table-column
<el-table-column
label="任务单名称"
label=
"工序名称"
width="200"
align=
"center"
align=
"center"
prop="
task
Name"
prop=
"
process
Name"
:show-overflow-tooltip=
"true"
:show-overflow-tooltip=
"true"
/> -->
/>
<el-table-column
label=
"排产数量"
align=
"center"
prop=
"quantity"
/>
<el-table-column
<el-table-column
label=
"工作中心"
label=
"工作中心"
align=
"center"
align=
"center"
...
@@ -136,29 +163,6 @@
...
@@ -136,29 +163,6 @@
prop=
"workunitName"
prop=
"workunitName"
width=
"140"
width=
"140"
/>
/>
<!-- <el-table-column
label="工艺名称"
width="200"
align="center"
prop="routeName"
show-overflow-tooltip
/> -->
<el-table-column
label=
"工序名称"
align=
"center"
prop=
"processName"
:show-overflow-tooltip=
"true"
/>
<!-- <el-table-column
label="产品名称"
width="200"
align="center"
prop="itemName"
:show-overflow-tooltip="true"
/>
<el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" /> -->
<el-table-column
label=
"排产数量"
align=
"center"
prop=
"quantity"
/>
<el-table-column
<el-table-column
label=
"计划开始时间"
label=
"计划开始时间"
align=
"center"
align=
"center"
...
@@ -172,13 +176,6 @@
...
@@ -172,13 +176,6 @@
}}
<
/span
>
}}
<
/span
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<!--
<
el
-
table
-
column
label
=
"生产时长"
align
=
"center"
prop
=
"duration"
width
=
"120"
>
<
/el-table-column> --
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"计划结束时间"
label
=
"计划结束时间"
align
=
"center"
align
=
"center"
...
@@ -191,16 +188,6 @@
...
@@ -191,16 +188,6 @@
}}
<
/span
>
}}
<
/span
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<!--
<
el
-
table
-
column
label
=
"需求日期"
align
=
"center"
prop
=
"requestDate"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
requestDate
,
"{y
}
-{m
}
-{d
}
"
)
}}
<
/span
>
<
/template
>
<
/el-table-column> --
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"操作"
label
=
"操作"
width
=
"150px"
width
=
"150px"
...
@@ -228,6 +215,7 @@
...
@@ -228,6 +215,7 @@
:
limit
.
sync
=
"queryParams.pageSize"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
@
pagination
=
"getList"
/>
/>
<
/div
>
<!--
添加或修改要维护刀模版对话框
-->
<!--
添加或修改要维护刀模版对话框
-->
<
el
-
dialog
<
el
-
dialog
...
@@ -389,7 +377,15 @@
...
@@ -389,7 +377,15 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
getListData
,
updateList
,
makeProduction
,
makeSchedule
}
from
'@/api/mes/pro/scheduleList'
import
{
getListData
,
updateList
,
makeProduction
,
makeSchedule
,
getworkshopList
,
getworkstationList
,
gettaskWorkunitList
,
getdefaultWorkCenterList
}
from
'@/api/mes/pro/scheduleList'
import
BrandSelect
from
"@/components/TmTool/index.vue"
;
import
BrandSelect
from
"@/components/TmTool/index.vue"
;
import
OrderList
from
'./orderList.vue'
import
OrderList
from
'./orderList.vue'
import
arrangCodeList
from
'./arrangCodeList.vue'
import
arrangCodeList
from
'./arrangCodeList.vue'
...
@@ -399,11 +395,19 @@ export default {
...
@@ -399,11 +395,19 @@ export default {
name
:
"scheduleList"
,
name
:
"scheduleList"
,
data
()
{
data
()
{
return
{
return
{
currentTask
:
null
,
workshopList
:
[],
workstationList
:
[],
taskWorkunitList
:
[],
queryWorkunitParams
:
{
workshopId
:
null
,
workstationId
:
null
}
,
taskWorkunitId
:
null
,
taskWorkunitId
:
null
,
arrangCodeVisible
:
false
,
arrangCodeVisible
:
false
,
scheduleVisible
:
false
,
scheduleVisible
:
false
,
// 遮罩层
// 遮罩层
loading
:
tru
e
,
loading
:
fals
e
,
// 选中数组
// 选中数组
ids
:
[],
ids
:
[],
// 非单个禁用
// 非单个禁用
...
@@ -441,11 +445,64 @@ export default {
...
@@ -441,11 +445,64 @@ export default {
}
;
}
;
}
,
}
,
created
()
{
created
()
{
this
.
getList
();
// this.getList();
this
.
hanldeGetdefaultWorkCenterList
()
}
,
}
,
methods
:
{
methods
:
{
hanldeGetdefaultWorkCenterList
()
{
getdefaultWorkCenterList
().
then
(
async
(
res
)
=>
{
console
.
log
(
res
,
5566
)
if
(
res
&&
res
.
length
)
{
this
.
queryWorkunitParams
.
workshopId
=
res
[
0
].
workshopId
}
this
.
hanldeGetworkshopList
()
await
this
.
hanldeGetworkstationList
()
this
.
queryWorkunitParams
.
workstationId
=
res
[
0
].
workstationId
?
res
[
0
].
workstationId
:
this
.
workstationList
[
0
].
workstationId
this
.
hanldeGettaskWorkunitList
()
this
.
getList
()
}
);
}
,
async
hanldeGetworkshopList
()
{
const
response
=
await
getworkshopList
()
this
.
workshopList
=
response
.
rows
}
,
handleChangeWorkshopId
()
{
this
.
workstationList
=
[]
this
.
queryWorkunitParams
.
workstationId
=
null
this
.
hanldeGetworkstationList
()
}
,
async
hanldeGetworkstationList
()
{
if
(
!
this
.
queryWorkunitParams
.
workshopId
)
{
return
}
const
response
=
await
getworkstationList
({
workshopId
:
this
.
queryWorkunitParams
.
workshopId
}
)
this
.
workstationList
=
response
.
rows
}
,
handleChangeWorkStationId
()
{
this
.
hanldeGettaskWorkunitList
()
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
workunitId
=
''
this
.
getList
()
}
,
async
hanldeGettaskWorkunitList
()
{
this
.
taskWorkunitList
=
[]
this
.
currentTask
=
null
if
(
!
this
.
queryWorkunitParams
.
workstationId
)
{
return
}
console
.
log
(
this
.
queryWorkunitParams
.
workstationId
,
'this.queryWorkunitParams.workstationId'
)
const
response
=
await
gettaskWorkunitList
({
workstationId
:
this
.
queryWorkunitParams
.
workstationId
}
)
this
.
taskWorkunitList
=
response
.
rows
}
,
handleClick
(
row
,
index
)
{
this
.
currentTask
=
index
this
.
queryParams
.
workunitId
=
row
.
workunitId
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
}
,
/** 查询要维护刀模版列表 */
/** 查询要维护刀模版列表 */
getList
()
{
async
getList
()
{
this
.
queryParams
.
workCenterId
=
this
.
queryWorkunitParams
.
workstationId
this
.
loading
=
true
;
this
.
loading
=
true
;
const
params
=
{...
this
.
queryParams
}
const
params
=
{...
this
.
queryParams
}
if
(
params
.
scheduleEndDate
&&
params
.
scheduleEndDate
.
length
>
0
)
{
if
(
params
.
scheduleEndDate
&&
params
.
scheduleEndDate
.
length
>
0
)
{
...
@@ -458,11 +515,10 @@ export default {
...
@@ -458,11 +515,10 @@ export default {
}
}
delete
params
.
scheduleStartDate
delete
params
.
scheduleStartDate
delete
params
.
scheduleEndDate
delete
params
.
scheduleEndDate
getListData
(
params
).
then
(
response
=>
{
const
response
=
await
getListData
(
params
)
this
.
maintenanceList
=
response
.
rows
;
this
.
maintenanceList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
}
);
}
,
}
,
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
...
@@ -491,6 +547,16 @@ export default {
...
@@ -491,6 +547,16 @@ export default {
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
}
,
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleWorkunitQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetWorkunitQuery
()
{
this
.
resetForm
(
"queryWorkunitForm"
);
this
.
handleWorkunitQuery
();
}
,
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
this
.
getList
();
...
@@ -588,3 +654,39 @@ export default {
...
@@ -588,3 +654,39 @@ export default {
}
}
}
;
}
;
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
cardBox
{
padding
:
10
px
;
margin
-
right
:
30
px
;
max
-
height
:
600
px
;
overflow
-
y
:
auto
;
.
list
{
.
list
-
item
{
padding
:
10
px
;
border
:
1
px
solid
#
eee
;
border
-
radius
:
6
px
;
margin
-
bottom
:
10
px
;
cursor
:
pointer
;
.
item
-
top
{
font
-
size
:
16
px
;
font
-
weight
:
600
;
}
&
:
nth
-
child
(
2
n
)
{
background
:
#
dfdfdf
;
}
&
:
nth
-
child
(
2
n
+
1
)
{
background
:
#
efefef
;
}
&
:
hover
{
background
:
#
85
ce61
;
color
:
#
fff
;
}
&
.
active
{
background
:
#
85
ce61
;
color
:
#
fff
;
}
}
}
}
<
/style
>
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