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
f2ff72cf
Commit
f2ff72cf
authored
Jan 25, 2024
by
赵汉亭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务单2
parent
8faa183f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
441 additions
and
371 deletions
+441
-371
single.vue
src/components/workunitSelect/single.vue
+152
-151
prototypeMakeApply.vue
src/views/mes/pro/prototypeMake/prototypeMakeApply.vue
+2
-2
prototypeMakeInfo.vue
src/views/mes/pro/prototypeMake/prototypeMakeInfo.vue
+2
-2
ganttedit.vue
src/views/mes/pro/schedule/ganttedit.vue
+4
-4
ganttx.vue
src/views/mes/pro/schedule/ganttx.vue
+219
-171
index.vue
src/views/mes/pro/schedule/index.vue
+62
-41
No files found.
src/components/workunitSelect/single.vue
View file @
f2ff72cf
<
template
>
<el-dialog
title=
"工作单元选择"
<el-dialog
title=
"工作单元选择"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
false
: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=
"workunitCode"
>
<el-input
v-model=
"queryParams.workunitCode"
...
...
@@ -32,40 +40,46 @@
/>
</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-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=
"workorderList"
@
current-change=
"handleCurrent"
@
row-dblclick=
"handleRowDbClick"
>
<el-table-column
width=
"55"
align=
"center"
>
<el-table
v-loading=
"loading"
:data=
"workunitList"
@
current-change=
"handleCurrent"
@
row-dblclick=
"handleRowDbClick"
>
<el-table-column
width=
"55"
align=
"center"
>
<template
v-slot=
"scope"
>
<el-radio
v-model=
"selectedWorkorderId"
:label=
"scope.row.workorderId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio>
</
template
>
</el-table-column>
<el-table-column
label=
"工单编码"
width=
"180"
prop=
"workorderCode"
>
</el-table-column>
<el-table-column
label=
"工单名称"
width=
"200"
align=
"center"
prop=
"workorderName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"工单来源"
align=
"center"
prop=
"orderSource"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_workorder_sourcetype"
:value=
"scope.row.orderSource"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"订单编号"
width=
"140"
align=
"center"
prop=
"sourceCode"
/>
<el-table-column
label=
"产品编号"
width=
"120"
align=
"center"
prop=
"productCode"
/>
<el-table-column
label=
"产品名称"
width=
"200"
align=
"center"
prop=
"productName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"productSpc"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"单位"
align=
"center"
prop=
"unitOfMeasure"
/>
<el-table-column
label=
"工单数量"
align=
"center"
prop=
"quantity"
/>
<el-table-column
label=
"客户编码"
align=
"center"
prop=
"clientCode"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"clientName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"需求日期"
align=
"center"
prop=
"requestDate"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
requestDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<el-radio
v-model=
"selectedWorkunitId"
:label=
"scope.row.workunitId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio
>
</
template
>
</el-table-column>
<el-table-column
label=
"工作站名称"
width=
"180"
prop=
"workunitCode"
/>
<el-table-column
label=
"工作单元编码"
width=
"200"
align=
"center"
prop=
"workunitName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"orderSource"
/>
</el-table>
<pagination
v
-
show
=
"total
>
0"
v-show=
"total
>
0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
...
...
@@ -73,23 +87,25 @@
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"confirmSelect"
>
确 定
</el-button>
<
el
-
button
@
click
=
"showFlag=
false"
>
取
消
<
/el-button
>
<el-button
@
click=
"showFlag =
false"
>
取 消
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
{
listWorkorder
}
from
"@/api/mes/pro
/workunit"
;
export
default
{
name
:
'WorkOrderSelectSingle'
,
import
{
listWorkunit
}
from
"@/api/mes/md
/workunit"
;
export
default
{
name
:
"WorkunitSelectSingle"
,
components
:
{},
dicts
:
[
'mes_order_status'
,
'mes_workorder_sourcetype'
],
props
:{
workunit
:
{
type
:
Object
,
default
:
function
(){
return
{
'workorderType'
:
'SELF'
}
}}
//外部传入的工单过滤信息
dicts
:
[],
props
:
{
workstationName
:
{
type
:
String
,
default
:
""
,
},
workunitId
:
{
type
:
Number
|
undefined
,
default
:
undefined
,
},
//外部传入的工单过滤信息
},
data
()
{
return
{
...
...
@@ -97,7 +113,7 @@
// 遮罩层
loading
:
true
,
// 选中数组
selectedWorkorder
Id
:
undefined
,
selectedWorkunit
Id
:
undefined
,
selectedRows
:
[],
// 非单个禁用
single
:
true
,
...
...
@@ -108,47 +124,32 @@
// 总条数
total
:
0
,
// 生产工单表格数据
workorder
List
:
[],
workunit
List
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
workorderCode
:
null
,
workorderName
:
null
,
workorderType
:
this
.
workunit
.
workunitType
,
orderSource
:
null
,
sourceCode
:
null
,
productId
:
null
,
productCode
:
null
,
productName
:
null
,
productSpc
:
null
,
unitOfMeasure
:
null
,
quantity
:
null
,
quantityProduced
:
null
,
quantityChanged
:
null
,
quantityScheduled
:
null
,
clientId
:
null
,
clientCode
:
null
,
clientName
:
null
,
requestDate
:
null
,
parentId
:
null
,
ancestors
:
null
,
status
:
'CONFIRMED'
,
workunitCode
:
null
,
workunitName
:
null
,
workstationId
:
null
,
workstationName
:
this
.
workstationName
,
workunitId
:
null
,
enableFlag
:
"Y"
,
},
}
};
},
created
()
{
this
.
getList
();
this
.
queryParams
.
workstationName
=
this
.
workstationName
;
},
methods
:
{
methods
:
{
/** 查询生产工单列表 */
getList
()
{
this
.
loading
=
true
;
listWorkorder
(
this
.
queryParams
).
then
(
response
=>
{
this
.
workorder
List
=
response
.
rows
;
listWorkunit
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
workunit
List
=
response
.
rows
;
this
.
loading
=
false
;
});
},
...
...
@@ -161,38 +162,38 @@
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
handleCurrent
(
row
)
{
if
(
row
)
{
handleCurrent
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
// 单选选中数据
handleRowChange
(
row
)
{
if
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
//双击选中
handleRowDbClick
(
row
)
{
if
(
row
)
{
handleRowDbClick
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
this
.
$emit
(
'onSelected'
,
this
.
selectedRows
);
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
},
//确定选中
confirmSelect
()
{
if
(
this
.
selectedWorkorderId
==
null
||
this
.
selectedWorkorderId
==
0
)
{
confirmSelect
()
{
if
(
this
.
selectedWorkunitId
==
null
||
this
.
selectedWorkunitId
==
0
)
{
this
.
$notify
({
title
:
'提示'
,
type
:
'warning'
,
message
:
'请至少选择一条数据!'
title
:
"提示"
,
type
:
"warning"
,
message
:
"请至少选择一条数据!"
,
});
return
;
}
this
.
$emit
(
'onSelected'
,
this
.
selectedRows
);
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
}
}
},
},
};
</
script
>
src/views/mes/pro/prototypeMake/prototypeMakeApply.vue
View file @
f2ff72cf
...
...
@@ -47,7 +47,7 @@
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<
!--
<
el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
...
...
@@ -57,7 +57,7 @@
v-hasPermi=
"['mes:pro:prototypeMake:add']"
>
新增
</el-button
>
</el-col>
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
...
...
src/views/mes/pro/prototypeMake/prototypeMakeInfo.vue
View file @
f2ff72cf
...
...
@@ -133,7 +133,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<
!-- <
el-col :md="8" :xs="12">
<el-form-item label="NG原因" prop="ngReason">
<el-input
v-model="form.ngReason"
...
...
@@ -141,7 +141,7 @@
disabled
></el-input>
</el-form-item>
</el-col>
</el-col>
-->
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"计划完成日期"
prop=
"plannedFinishDate"
>
<el-date-picker
...
...
src/views/mes/pro/schedule/ganttedit.vue
View file @
f2ff72cf
...
...
@@ -59,10 +59,10 @@ export default {
workorderName
:
null
,
orderSource
:
null
,
sourceCode
:
null
,
product
Id
:
null
,
product
Code
:
null
,
product
Name
:
null
,
productSpc
:
null
,
item
Id
:
null
,
item
Code
:
null
,
item
Name
:
null
,
specification
:
null
,
unitOfMeasure
:
null
,
quantity
:
null
,
quantityProduced
:
null
,
...
...
src/views/mes/pro/schedule/ganttx.vue
View file @
f2ff72cf
This diff is collapsed.
Click to expand it.
src/views/mes/pro/schedule/index.vue
View file @
f2ff72cf
...
...
@@ -287,68 +287,74 @@
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
label
-
width
=
"80px"
>
<
el
-
row
>
<
el
-
col
:
lg
=
"
6
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
col
:
lg
=
"
8
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"编号"
prop
=
"taskCode"
>
<
el
-
input
v
-
model
=
"form.taskCode"
readonly
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.taskCode"
readonly
=
"readonly"
disabled
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"
6
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
col
:
lg
=
"
8
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"名称"
prop
=
"taskName"
>
<
el
-
input
v
-
model
=
"form.taskName"
readonly
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.taskName"
readonly
=
"readonly"
disabled
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"
6
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
col
:
lg
=
"
8
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"产品名称"
prop
=
"itemName"
>
<
el
-
input
v
-
model
=
"form.itemName"
readonly
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.itemName"
readonly
=
"readonly"
disabled
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"6"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
lg
=
"8"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"工序名称"
prop
=
"processName"
>
<
el
-
input
v
-
model
=
"form.processName"
readonly
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.processName"
readonly
=
"readonly"
disabled
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"
6
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
col
:
lg
=
"
8
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"工作站"
prop
=
"workstationName"
>
<
el
-
input
v
-
model
=
"form.workstationName"
readonly
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.workstationName"
readonly
=
"readonly"
disabled
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"6"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"工作单元"
prop
=
"workunitId"
>
<
el
-
input
v
-
model
=
"form.workunitName"
/>
<
el
-
col
:
lg
=
"8"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"工作单元"
prop
=
"workunitId"
required
:
true
>
<
el
-
input
v
-
model
=
"form.workunitName"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"$refs['WorkunitSelect'].showFlag = true"
><
/el-button
>
<
/el-input
>
<
WorkuintSelect
ref
=
"WorkunitSelect"
:
workstationName
=
"form.workstationName"
@
onSelected
=
"onWorkunitSelect"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"6"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"排产数量"
prop
=
"quantity"
>
<
el
-
input
v
-
model
=
"form.quantity"
readonly
=
"readonly"
/>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
lg
=
"8"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"排产数量"
prop
=
"quantity"
required
:
true
>
<
el
-
input
-
number
:
step
=
"1"
:
min
=
"0"
v
-
model
=
"form.quantity"
placeholder
=
"请输入排产数量"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"
6
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"开始
生产时间"
prop
=
"startTime"
>
<
el
-
col
:
lg
=
"
8
"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"开始
时间"
prop
=
"startTime"
required
:
true
>
<
el
-
date
-
picker
v
-
model
=
"form.startTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd
:hh-mm-
ss"
type
=
"date
time
"
value
-
format
=
"yyyy-MM-dd
hh:mm:
ss"
placeholder
=
"请选择开始时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"6"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"生产时长"
prop
=
"duration"
>
<
el
-
input
v
-
model
=
"form.duration"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
lg
=
"6"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"需求日期"
prop
=
"requestDate"
>
<
el
-
date
-
picker
v
-
model
=
"form.requestDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择需求日期"
>
<
/el-date-picker
>
<
el
-
col
:
lg
=
"8"
:
md
=
"8"
:
sm
=
"12"
:
xs
=
"12"
>
<
el
-
form
-
item
label
=
"生产时长"
prop
=
"duration"
required
:
true
>
<
el
-
input
-
number
:
step
=
"1"
:
min
=
"0"
v
-
model
=
"form.duration"
placeholder
=
"请输入生产时长"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"24"
>
<
el
-
form
-
item
label
=
"备注"
prop
=
"remark"
>
<
el
-
input
...
...
@@ -360,21 +366,21 @@
<
/el-col
>
<
/el-row
>
<
/el-form
>
<
el
-
steps
<
!--
<
el
-
steps
:
active
=
"activeProcess"
v
-
if
=
"form.taskId != null"
align
-
center
simple
>
<
el
-
step
>
-->
<!--
<
el
-
step
v
-
for
=
"(item, index) in processOptions"
:
title
=
"item.itemName"
:
key
=
"item.itemId"
@
click
.
native
=
"handleStepClick(index)"
>
<
/el-step
>
<
/el-steps
>
<
template
v
-
if
=
"activeProcess == index && form.taskId != null"
>
<
/el-steps>
--
>
<
!--
<
template
v
-
if
=
"activeProcess == index && form.taskId != null"
>
<
el
-
card
v
-
for
=
"(item, index) in processOptions"
:
key
=
"index"
>
<
ProTask
:
workorderId
=
"form.taskId"
...
...
@@ -384,7 +390,7 @@
:
optType
=
"optType"
><
/ProTask
>
<
/el-card
>
<
/template
>
<
/template>
--
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
...
...
@@ -432,8 +438,10 @@ import {
addProtaskList
,
}
from
"@/api/mes/pro/protask"
;
import
{
listProductprocess
}
from
"@/api/mes/pro/routeprocess"
;
import
WorkuintSelect
from
"@/components/workunitSelect/single.vue"
;
import
ProTask
from
"./proTask.vue"
;
import
GanttChar
from
"./ganttx.vue"
;
import
{
listWorkunit
}
from
"@/api/mes/md/workunit"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
...
...
@@ -444,6 +452,7 @@ export default {
Treeselect
,
ProTask
,
GanttChar
,
WorkuintSelect
,
}
,
data
()
{
return
{
...
...
@@ -554,10 +563,22 @@ export default {
this
.
$refs
.
ganttChar
.
reload
();
}
);
}
,
// 获取工作单元
onWorkunitSelect
(
row
)
{
console
.
log
(
45456
,
row
);
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
workunitId
=
row
.
workunitId
;
this
.
form
.
workunitName
=
row
.
workunitName
;
console
.
log
(
111111
,
this
.
form
)
}
}
,
//获取当前产品对应的生产工序
getProcess
()
{
listProductprocess
(
this
.
form
.
product
Id
).
then
((
response
)
=>
{
listProductprocess
(
this
.
form
.
item
Id
).
then
((
response
)
=>
{
this
.
processOptions
=
response
.
data
;
}
);
}
,
...
...
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