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
97d0d917
Commit
97d0d917
authored
Mar 12, 2024
by
528360026@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编排单增加生成任务单
parent
d6810e06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
52 deletions
+113
-52
index.vue
src/views/mes/pro/arrange/index.vue
+78
-45
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+35
-7
No files found.
src/views/mes/pro/arrange/index.vue
View file @
97d0d917
...
...
@@ -51,30 +51,43 @@
>
新增
</el-button>
</el-col>
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['pro:arrange:edit']"-->
<!-- >修改-->
<!--
</el-button>
-->
<!--
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['pro:arrange:remove']"-->
<!-- >删除-->
<!--
</el-button>
-->
<!--
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-plus"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDofinish"
v-hasPermi=
"['mes:pro:workorder:dofinish']"
>
生成任务单
</el-button
>
</el-col>
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['pro:arrange:edit']"-->
<!-- >修改-->
<!--
</el-button>
-->
<!--
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['pro:arrange:remove']"-->
<!-- >删除-->
<!--
</el-button>
-->
<!--
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
...
...
@@ -91,7 +104,7 @@
<el-table
v-loading=
"loading"
:data=
"arrangeList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
label=
"编号"
align=
"center"
prop=
"arrangeId"
/>
-->
<!--
<el-table-column
label=
"编号"
align=
"center"
prop=
"arrangeId"
/>
-->
<el-table-column
label=
"编排单号"
align=
"center"
prop=
"arrangeCode"
>
<template
slot-scope=
"scope"
>
<el-button
...
...
@@ -108,26 +121,26 @@
<!-- <el-table-column label="序号" align="center" prop="arrangeSort"/>-->
<!-- <el-table-column label="生产工单号" align="center" prop="workorderId"/>-->
<!-- <el-table-column label="生产工单编号" align="center" prop="workorderCode"/>-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['pro:arrange:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['pro:arrange:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['pro:arrange:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['pro:arrange:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
...
...
@@ -169,6 +182,7 @@
<
script
>
import
{
listArrange
,
getArrange
,
delArrange
,
addArrange
,
updateArrange
,
listGroupArrange
}
from
"@/api/mes/pro/arrange"
;
import
ArrangeInfo
from
"@/views/mes/pro/arrange/info.vue"
;
import
{
addProtaskList
}
from
"@/api/mes/pro/protask"
;
export
default
{
name
:
"Arrange"
,
...
...
@@ -195,6 +209,7 @@ export default {
title
:
""
,
// 是否显示弹出层
open
:
false
,
selectedRows
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -220,6 +235,23 @@ export default {
this
.
getList
();
},
methods
:
{
handleDofinish
()
{
this
.
$modal
.
confirm
(
"是否生成选中的任务单?"
)
.
then
(()
=>
{
const
workorderIds
=
this
.
selectedRows
.
flatMap
(
row
=>
{
return
row
.
workorderIds
.
split
(
','
).
map
(
id
=>
parseInt
(
id
,
10
));
});
return
addProtaskList
(
workorderIds
);
})
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"生成成功"
);
})
.
catch
(()
=>
{
// 用户取消或出现错误时的处理
});
},
handleView
(
row
)
{
this
.
arrangeOpen
=
true
;
...
...
@@ -260,6 +292,7 @@ export default {
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
arrangeId
)
this
.
selectedRows
=
selection
;
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
...
...
src/views/mes/pro/workorder/indexApply.vue
View file @
97d0d917
...
...
@@ -186,9 +186,9 @@
icon=
"el-icon-plus"
size=
"mini"
:disabled=
"multiple"
@
click=
"handle
Dofinish
"
@
click=
"handle
Arrange
"
v-hasPermi=
"['mes:pro:workorder:dofinish']"
>
生成
任务
单
>
生成
编排
单
</el-button
>
</el-col>
...
...
@@ -199,9 +199,9 @@
icon=
"el-icon-plus"
size=
"mini"
:disabled=
"multiple"
@
click=
"handle
Arrange
"
@
click=
"handle
Dofinish
"
v-hasPermi=
"['mes:pro:workorder:dofinish']"
>
生成
编排
单
>
生成
任务
单
</el-button
>
</el-col>
...
...
@@ -763,6 +763,12 @@
@
close
=
"getList"
>
<
CombinationInfos
:
combinationCodes
=
"combinationCodes"
><
/CombinationInfos
>
<
/el-dialog
>
<
el
-
dialog
title
=
"编排单明细"
v
-
if
=
"arrangeOpen"
:
visible
.
sync
=
"arrangeOpen"
width
=
"800px"
append
-
to
-
body
@
close
=
"getList"
>
<
ArrangeInfo
:
arrange
-
code
=
"arrangeCode"
><
/ArrangeInfo
>
<
/el-dialog
>
<
/div
>
<
/template
>
...
...
@@ -789,6 +795,7 @@ import {getToken} from "@/utils/auth";
import
{
addCombination
,
batchAddCombination
}
from
"@/api/mes/pro/combination"
;
import
CombinationInfos
from
"@/views/mes/pro/combination/infos.vue"
;
import
{
batchAddArrange
}
from
"@/api/mes/pro/arrange"
;
import
ArrangeInfo
from
"@/views/mes/pro/arrange/info.vue"
;
export
default
{
name
:
"Workorder"
,
...
...
@@ -798,6 +805,7 @@ export default {
"mes_workorder_type"
,
],
components
:
{
ArrangeInfo
,
CombinationInfos
,
Treeselect
,
ItemSelect
,
...
...
@@ -813,6 +821,8 @@ export default {
optType
:
undefined
,
combOpen
:
false
,
combinationCodes
:
[],
arrangeOpen
:
false
,
arrangeCode
:
[],
// 遮罩层
loading
:
true
,
// 显示搜索条件
...
...
@@ -933,6 +943,8 @@ export default {
}
);
batchAddArrange
(
params
).
then
(
response
=>
{
this
.
arrangeOpen
=
true
;
this
.
arrangeCode
=
response
;
this
.
$modal
.
msgSuccess
(
"新增编排单成功"
);
this
.
getList
();
}
);
...
...
@@ -1209,17 +1221,33 @@ export default {
this
.
$modal
.
confirm
(
"是否生成选中的任务单?"
)
.
then
(()
=>
{
const
ids
=
this
.
selectedRows
.
map
((
v
)
=>
v
.
workorderId
);
console
.
log
(
"00000"
,
ids
);
let
allCodesNotEmpty
=
true
;
return
addProtaskList
(
ids
);
this
.
selectedRows
.
every
(
row
=>
{
if
(
row
.
arrangeCode
==
''
||
row
.
arrangeCode
==
null
)
{
allCodesNotEmpty
=
false
;
return
false
;
// 结束every循环
}
return
true
;
// 继续检查下一个元素
}
);
if
(
allCodesNotEmpty
)
{
const
ids
=
this
.
selectedRows
.
map
((
v
)
=>
v
.
workorderId
);
console
.
log
(
"00000"
,
ids
);
return
addProtaskList
(
ids
);
}
else
{
this
.
$modal
.
msgWarning
(
"存在未设置编码单的任务单,请确认后再试!"
);
return
Promise
.
reject
();
// 或者返回一个已解决的Promise以停止链式调用
}
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"生成成功"
);
}
)
.
catch
(()
=>
{
// 用户取消或出现错误时的处理
}
);
}
,
handleToolNumCheck
()
{
this
.
$modal
...
...
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