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
e7e91326
Commit
e7e91326
authored
Mar 01, 2024
by
528360026@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化生产工单显示组合单
parent
68cbf634
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
802 additions
and
41 deletions
+802
-41
chooseWorkorderForComb.vue
src/views/mes/pro/combination/chooseWorkorderForComb.vue
+693
-0
index.vue
src/views/mes/pro/combination/index.vue
+3
-3
info.vue
src/views/mes/pro/combination/info.vue
+74
-36
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+32
-2
No files found.
src/views/mes/pro/combination/chooseWorkorderForComb.vue
0 → 100644
View file @
e7e91326
This diff is collapsed.
Click to expand it.
src/views/mes/pro/combination/index.vue
View file @
e7e91326
...
...
@@ -93,7 +93,7 @@
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<!--
<el-table-column
label=
"销售订单号"
align=
"center"
prop=
"combinationId"
/>
-->
<!--
<el-table-column
label=
"组合单号"
align=
"center"
prop=
"combinationCode"
/>
-->
<el-table-column
label=
"组合编码"
width
=
"180"
prop=
"combinationCode"
>
<el-table-column
label=
"组合编码"
width
prop=
"combinationCode"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
...
...
@@ -105,7 +105,7 @@
</
template
>
</el-table-column>
<!-- <el-table-column label="序号" align="center" prop="combinationSort"/>-->
<el-table-column
label=
"生产工单号"
align=
"center"
prop=
"workorderCode"
/
>
<!-- <el-table-column label="生产工单号" align="center" prop="workorderCode"/>--
>
<!-- <el-table-column label="销售订单号" align="center" prop="salesOrderNumber"/>-->
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -160,7 +160,7 @@
</el-dialog>
<el-dialog
title=
"组合单明细"
:visible
.
sync=
"combOpen"
width=
"800px"
append-to-body
>
<el-dialog
title=
"组合单明细"
:visible
.
sync=
"combOpen"
width=
"800px"
append-to-body
@
close=
"getList"
>
<CombinationInfo
:combinationCode=
"combinationCode"
></CombinationInfo>
</el-dialog>
</div>
...
...
src/views/mes/pro/combination/info.vue
View file @
e7e91326
<
template
>
<div
class=
"app-container"
>
<!--
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
-->
<!--
<el-form-item
label=
"组合单号"
prop=
"combinationCode"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.combinationCode"-->
<!-- placeholder="请输入组合单号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"生产工单号"
prop=
"workorderCode"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.workorderCode"-->
<!-- placeholder="请输入生产工单号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"销售订单号"
prop=
"salesOrderNumber"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.salesOrderNumber"-->
<!-- placeholder="请输入销售订单号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</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-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
-->
<!--
<el-form-item
label=
"组合单号"
prop=
"combinationCode"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.combinationCode"-->
<!-- placeholder="请输入组合单号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"生产工单号"
prop=
"workorderCode"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.workorderCode"-->
<!-- placeholder="请输入生产工单号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</el-form-item>
-->
<!--
<el-form-item
label=
"销售订单号"
prop=
"salesOrderNumber"
>
-->
<!--
<el-input-->
<!-- v-model="queryParams.salesOrderNumber"-->
<!-- placeholder="请输入销售订单号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!--
</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-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-plus"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleCombination"
v-hasPermi=
"['pro:combination:add']"
>
拆分为组合单
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
...
...
@@ -139,6 +151,11 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<el-dialog
title=
"追加生产单"
:visible
.
sync=
"combOpen"
width=
"800px"
append-to-body
@
close=
"getList"
>
<choose-workorder-for-comb
:combinationCode=
"combinationCode"
></choose-workorder-for-comb>
</el-dialog>
</div>
</template>
...
...
@@ -148,12 +165,14 @@ import {
getCombination
,
delCombination
,
addCombination
,
updateCombination
,
combList
updateCombination
,
combList
,
batchAddCombination
}
from
"@/api/mes/pro/combination"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
ChooseWorkorderForComb
from
"@/views/mes/pro/combination/chooseWorkorderForComb.vue"
;
export
default
{
name
:
"CombinationInfo"
,
components
:
{
ChooseWorkorderForComb
},
props
:
{
combinationCode
:
{
type
:
String
,
...
...
@@ -164,6 +183,7 @@ export default {
return
{
// 遮罩层
loading
:
true
,
combOpen
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
...
...
@@ -176,6 +196,7 @@ export default {
total
:
0
,
// 生产组合单表格数据
combinationList
:
[],
selectedRows
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
...
...
@@ -196,8 +217,6 @@ export default {
{
required
:
true
,
message
:
"序号不能为空"
,
trigger
:
"blur"
}
],
workorderCode
:
[
{
required
:
true
,
message
:
"生产工单号不能为空"
,
trigger
:
"blur"
}
],
salesOrderNumber
:
[
{
required
:
true
,
message
:
"销售订单号不能为空"
,
trigger
:
"blur"
}
]
}
};
...
...
@@ -217,6 +236,25 @@ export default {
this
.
getList
();
},
methods
:
{
async
handleCombination
()
{
let
params
=
[]
const
res
=
await
delCombination
(
this
.
ids
);
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
params
.
push
({
combinationSort
:
index
,
workorderId
:
item
.
workorderId
,
workorderCode
:
item
.
workorderCode
,
salesOrderId
:
0
,
combinationCode
:
null
})
});
batchAddCombination
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增组合单成功"
);
this
.
getList
();
});
},
genCode
()
{
genCode
(
'COMBINATION_CODE'
).
then
(
response
=>
{
this
.
form
.
oqcCode
=
response
;
...
...
@@ -233,7 +271,7 @@ export default {
},
handleView
(
row
){
handleView
(
row
)
{
this
.
reset
();
this
.
getList
();
const
combinationCode
=
row
.
combinationCode
;
...
...
@@ -266,13 +304,13 @@ export default {
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
combinationId
)
this
.
single
=
selection
.
length
!==
1
this
.
selectedRows
=
selection
;
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加生产组合单"
;
this
.
combOpen
=
true
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
...
...
src/views/mes/pro/workorder/indexApply.vue
View file @
e7e91326
...
...
@@ -285,7 +285,17 @@
align=
"center"
prop=
"combinationCode"
:show-overflow-tooltip=
"true"
/>
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"showCombDetail(scope.row.combinationCode)"
>
{{
scope
.
row
.
combinationCode
}}
</el-button
>
</
template
>
</el-table-column>
<el-table-column
label=
"工单名称"
width=
"200"
...
...
@@ -731,6 +741,11 @@
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
el
-
dialog
title
=
"组合单明细"
:
visible
.
sync
=
"combOpen"
width
=
"800px"
append
-
to
-
body
@
close
=
"getList"
>
<
CombinationInfo
:
combinationCode
=
"combinationCode"
><
/CombinationInfo
>
<
/el-dialog
>
<
/div
>
<
/template
>
...
...
@@ -755,6 +770,7 @@ import Treeselect from "@riophae/vue-treeselect";
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
addCombination
,
batchAddCombination
}
from
"@/api/mes/pro/combination"
;
import
CombinationInfo
from
"@/views/mes/pro/combination/info.vue"
;
export
default
{
name
:
"Workorder"
,
...
...
@@ -764,6 +780,7 @@ export default {
"mes_workorder_type"
,
],
components
:
{
CombinationInfo
,
Treeselect
,
ItemSelect
,
ClientSelect
,
...
...
@@ -776,6 +793,8 @@ export default {
//自动生成编码
autoGenFlag
:
false
,
optType
:
undefined
,
combOpen
:
false
,
combinationCode
:
[],
// 遮罩层
loading
:
true
,
// 显示搜索条件
...
...
@@ -873,8 +892,18 @@ export default {
this
.
getList
();
}
,
methods
:
{
showCombDetail
(
combinationCode
)
{
this
.
combOpen
=
true
;
this
.
combinationCode
=
combinationCode
;
}
,
async
handleCombination
()
{
let
params
=
[]
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
combinationCode
!=
''
)
{
this
.
$modal
.
msgWarning
(
`${item.workorderCode
}
生产单已绑定组合单,不能再绑定!`
);
return
}
}
);
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
params
.
push
({
combinationSort
:
index
,
...
...
@@ -1056,7 +1085,8 @@ export default {
// this.optType="add";
}
,
// 查询明细按钮操作
handleView
(
row
)
{
handleView
handleView
(
row
)
{
handleView
this
.
reset
();
this
.
getTreeselect
();
const
workorderId
=
row
.
workorderId
||
this
.
ids
;
...
...
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