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
4963c5b7
Commit
4963c5b7
authored
Mar 13, 2025
by
tanjunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 生产排产增加虚拟报工功能
parent
35f11bcc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
3 deletions
+46
-3
protask.js
src/api/mes/pro/protask.js
+8
-0
index.vue
src/views/mes/pro/scheduleList/index.vue
+20
-1
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+18
-2
No files found.
src/api/mes/pro/protask.js
View file @
4963c5b7
...
@@ -122,3 +122,11 @@ export function updateNotInspectionStatusApi(data) {
...
@@ -122,3 +122,11 @@ export function updateNotInspectionStatusApi(data) {
method
:
"put"
,
method
:
"put"
,
});
});
}
}
// 虚拟报工
export
function
updateProTaskWorkunitApi
(
data
)
{
return
request
({
url
:
`/mes/pro/taskWorkunit/updateProTaskWorkunit/
${
data
.
taskWorkunitId
}
?virtualFlag=
${
data
.
virtualFlag
}
`
,
method
:
"post"
,
});
}
\ No newline at end of file
src/views/mes/pro/scheduleList/index.vue
View file @
4963c5b7
...
@@ -181,6 +181,15 @@
...
@@ -181,6 +181,15 @@
@
click=
"handleDeleteTask"
@
click=
"handleDeleteTask"
>
工序删除
</el-button>
>
工序删除
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
size=
"mini"
:disabled=
'single'
@
click=
"handleVirtualReporting"
>
虚拟报工
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -623,7 +632,7 @@ import {
...
@@ -623,7 +632,7 @@ import {
getworkstationList
,
getworkstationList
,
gettaskWorkunitList
,
gettaskWorkunitList
,
getdefaultWorkCenterList
}
from
'@/api/mes/pro/scheduleList'
getdefaultWorkCenterList
}
from
'@/api/mes/pro/scheduleList'
import
{
putProtaskSplit
,
splitWorkstation
,
deleteTask
}
from
'@/api/mes/pro/protask'
import
{
putProtaskSplit
,
splitWorkstation
,
deleteTask
,
updateProTaskWorkunitApi
}
from
'@/api/mes/pro/protask'
import
BrandSelect
from
"@/components/TmTool/index.vue"
;
import
BrandSelect
from
"@/components/TmTool/index.vue"
;
import
shiftSelectMixin
from
'@/utils/shiftSelectMixin'
import
shiftSelectMixin
from
'@/utils/shiftSelectMixin'
import
OrderList
from
'./orderList.vue'
import
OrderList
from
'./orderList.vue'
...
@@ -796,6 +805,16 @@ export default {
...
@@ -796,6 +805,16 @@ export default {
});
});
})
})
},
},
handleVirtualReporting
()
{
const
params
=
{
taskWorkunitId
:
this
.
selectedRows
[
0
].
taskWorkunitId
,
virtualFlag
:
!
this
.
selectedRows
[
0
].
virtualFlag
,
}
updateProTaskWorkunitApi
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"更改成功"
);
this
.
getList
();
})
},
async
handleChangeWorkshopId
()
{
async
handleChangeWorkshopId
()
{
// this.workstationList = []
// this.workstationList = []
this
.
queryWorkunitParams
.
workstationId
=
null
this
.
queryWorkunitParams
.
workstationId
=
null
...
...
src/views/mes/pro/workorder/indexApply.vue
View file @
4963c5b7
...
@@ -226,7 +226,7 @@
...
@@ -226,7 +226,7 @@
</el-dialog>
</el-dialog>
<el-table
v-loading=
"loading"
:data=
"workorderList"
row-key=
"workorderId"
default-expand-all
:max-height=
"tableHeight"
ref=
"tableRef"
<el-table
v-loading=
"loading"
:data=
"workorderList"
row-key=
"workorderId"
default-expand-all
:max-height=
"tableHeight"
ref=
"tableRef"
@
selection-change=
"handleSelectionChange"
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }">
@
selection-change=
"handleSelectionChange"
:tree-props=
"
{ children: 'children', hasChildren: 'hasChildren' }"
:summary-method="getSummaries" show-summary
>
<!-- 新增复选框 -->
<!-- 新增复选框 -->
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"工单编码"
width=
"180"
prop=
"workorderCode"
>
<el-table-column
label=
"工单编码"
width=
"180"
prop=
"workorderCode"
>
...
@@ -1272,7 +1272,23 @@ export default {
...
@@ -1272,7 +1272,23 @@ export default {
// this.single = selection.length!==1
// this.single = selection.length!==1
// this.multiple = !selection.length
// this.multiple = !selection.length
//
}
,
//
}
,
getSummaries(param){
const { columns, data
}
= param
const sums = []
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = '总数量'
}
else if (column.label === '工单数量') {
const temp = data.reduce((prev, curr) => {
return prev + Number(curr.quantity);
}
, 0)
sums[index] = Number.isInteger(temp) ? temp : temp.toFixed(3);
}
else {
sums[index] = ''
}
}
)
return sums
}
,
// 查询记录
// 查询记录
handleSelectChangerecord() {
handleSelectChangerecord() {
...
...
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