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
6f86e825
Commit
6f86e825
authored
Mar 09, 2024
by
528360026@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改组合单创建根据组合规格多个组合规则自动产生多个组合单
parent
dc9b3799
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
46 deletions
+117
-46
index.vue
src/views/mes/pro/combination/index.vue
+21
-19
info.vue
src/views/mes/pro/combination/info.vue
+11
-5
infos.vue
src/views/mes/pro/combination/infos.vue
+55
-0
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+30
-22
No files found.
src/views/mes/pro/combination/index.vue
View file @
6f86e825
...
...
@@ -105,28 +105,30 @@
>
</
template
>
</el-table-column>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
/>
<!-- <el-table-column label="序号" align="center" prop="combinationSort"/>-->
<!-- <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"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['pro:combination:edit']"
>
修改
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['pro:combination:remove']"
>
删除
</el-button
>
</
template
>
<!-- <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:combination:edit']"-->
<!-- >修改-->
<!-- </el-button>--
>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['pro:combination:remove']"-->
<!-- >删除-->
<!-- </el-button>--
>
<!-- </template>--
>
</el-table-column>
</el-table>
...
...
src/views/mes/pro/combination/info.vue
View file @
6f86e825
...
...
@@ -99,7 +99,8 @@
<el-table-column
label=
"组合单号"
align=
"center"
prop=
"combinationCode"
/>
<el-table-column
label=
"序号"
align=
"center"
width
prop=
"combinationSort"
>
<template
slot-scope=
"scope"
>
<el-input-number
v-model=
"scope.row.combinationSort"
@
change=
"handleChangeSort(scope.row)"
:min=
"0"
style=
"width: 140px"
<el-input-number
v-model=
"scope.row.combinationSort"
@
change=
"handleChangeSort(scope.row)"
:min=
"0"
style=
"width: 140px"
label=
"序号"
></el-input-number>
</
template
>
</el-table-column>
...
...
@@ -229,18 +230,23 @@ export default {
watch
:
{
combinationCode
:
{
handler
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
this
.
$nextTick
(()
=>
{
this
.
queryParams
.
combinationCode
=
newVal
;
this
.
getList
();
}
}
)
},
immediate
:
true
immediate
:
true
,
deep
:
true
}
},
created
()
{
this
.
getList
();
//
this.getList();
},
methods
:
{
changeCombination
(
combinationCode
)
{
this
.
queryParams
.
combinationCode
=
combinationCode
;
this
.
getList
();
},
handleChangeSort
(
item
)
{
updateCombination
({...
item
}).
then
(
response
=>
{
});
...
...
src/views/mes/pro/combination/infos.vue
0 → 100644
View file @
6f86e825
<
template
>
<div>
<el-tabs
type=
"border-card"
>
<el-tab-pane
v-for=
"item in combinationCodes"
>
<div
slot=
"label"
@
click=
"changeCombination(item)"
>
{{
item
}}
</div>
<CombinationInfo
ref=
"caonima"
:combinationCode=
"combinationCode"
></CombinationInfo>
</el-tab-pane>
</el-tabs>
</div>
</
template
>
<
script
>
import
CombinationInfo
from
"./info.vue"
;
import
Da
from
"element-ui/src/locale/lang/da"
;
export
default
{
name
:
"CombinationInfos"
,
components
:
{
CombinationInfo
},
props
:
{
combinationCodes
:
{
type
:
Array
,
default
:
null
}
},
data
()
{
return
{
combinationCode
:
''
,
key
:
''
}
},
watch
:
{
combinationCodes
:
{
handler
(
newVal
,
oldVal
)
{
this
.
$nextTick
(()
=>
{
this
.
combinationCode
=
this
.
combinationCodes
[
0
]
})
},
immediate
:
true
}
},
created
()
{
},
methods
:
{
changeCombination
(
combinationCode
)
{
this
.
$nextTick
(()
=>
{
this
.
combinationCode
=
combinationCode
this
.
$refs
.
caonima
[
0
].
changeCombination
(
combinationCode
)
})
}
}
};
</
script
>
<
style
scoped
>
</
style
>
src/views/mes/pro/workorder/indexApply.vue
View file @
6f86e825
...
...
@@ -757,8 +757,9 @@
<
/el-dialog
>
<
el
-
dialog
title
=
"组合单明细"
:
visible
.
sync
=
"combOpen"
width
=
"800px"
append
-
to
-
body
@
close
=
"getList"
>
<
CombinationInfo
:
combinationCode
=
"combinationCode"
><
/CombinationInfo
>
<
el
-
dialog
title
=
"组合单明细"
v
-
if
=
"combOpen"
:
visible
.
sync
=
"combOpen"
width
=
"800px"
append
-
to
-
body
@
close
=
"getList"
>
<
CombinationInfos
:
combinationCodes
=
"combinationCodes"
><
/CombinationInfos
>
<
/el-dialog
>
<
/div
>
<
/template
>
...
...
@@ -784,7 +785,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"
;
import
CombinationInfo
s
from
"@/views/mes/pro/combination/infos
.vue"
;
import
{
batchAddArrange
}
from
"@/api/mes/pro/arrange"
;
export
default
{
...
...
@@ -795,7 +796,7 @@ export default {
"mes_workorder_type"
,
],
components
:
{
CombinationInfo
,
CombinationInfo
s
,
Treeselect
,
ItemSelect
,
ClientSelect
,
...
...
@@ -809,7 +810,7 @@ export default {
autoGenFlag
:
false
,
optType
:
undefined
,
combOpen
:
false
,
combinationCode
:
[],
combinationCode
s
:
[],
// 遮罩层
loading
:
true
,
// 显示搜索条件
...
...
@@ -909,7 +910,7 @@ export default {
methods
:
{
showCombDetail
(
combinationCode
)
{
this
.
combOpen
=
true
;
this
.
combinationCode
=
combinationCode
;
this
.
combinationCode
s
=
[
combinationCode
]
;
}
,
async
handleArrange
()
{
...
...
@@ -936,26 +937,33 @@ export default {
}
,
async
handleCombination
()
{
let
params
=
[]
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
combinationCode
!=
''
)
{
let
hasNonEmptyCombination
=
false
;
this
.
selectedRows
.
every
((
item
,
index
)
=>
{
if
(
item
.
combinationCode
!=
''
&&
item
.
combinationCode
!=
null
)
{
this
.
$modal
.
msgWarning
(
`${item.workorderCode
}
生产单已绑定组合单,不能再绑定!`
);
return
hasNonEmptyCombination
=
true
;
return
false
;
// 结束every循环
}
return
true
;
// 继续检查下一个项
}
);
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
params
.
push
({
combinationSort
:
index
+
1
,
workorderId
:
item
.
workorderId
,
workorderCode
:
item
.
workorderCode
,
salesOrderId
:
0
,
combinationCode
:
null
}
)
}
);
if
(
!
hasNonEmptyCombination
)
{
this
.
selectedRows
.
forEach
((
item
,
index
)
=>
{
params
.
push
({
combinationSort
:
index
+
1
,
workorderId
:
item
.
workorderId
,
workorderCode
:
item
.
workorderCode
,
salesOrderId
:
0
,
combinationCode
:
null
}
)
}
);
batchAddCombination
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增组合单成功"
);
this
.
getList
();
}
);
batchAddCombination
(
params
).
then
(
response
=>
{
this
.
combOpen
=
true
this
.
combinationCodes
=
response
this
.
$modal
.
msgSuccess
(
"新增组合单成功"
);
this
.
getList
();
}
);
}
}
,
/** 查询生产工单列表 */
getList
()
{
...
...
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