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
ximai
mes-ui
Commits
c30880cf
Commit
c30880cf
authored
Jan 20, 2024
by
全洪江
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.local.topsunit.com/mes/mes-ui
into dev
parents
14c21484
7f5e773b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1110 additions
and
250 deletions
+1110
-250
single.vue
src/components/itemSelect/single.vue
+143
-59
index.vue
src/components/routesProcessSelect/index.vue
+285
-0
sapProperty.vue
src/views/mes/md/product/components/sapProperty.vue
+90
-0
index.vue
src/views/mes/md/product/index.vue
+12
-1
index.vue
src/views/mes/pro/proroute/index.vue
+159
-71
routeprocess.vue
src/views/mes/pro/proroute/routeprocess.vue
+4
-7
ProcessProd.vue
src/views/mes/proofing/components/ProcessProd.vue
+230
-0
ProogingBom.vue
src/views/mes/proofing/components/ProogingBom.vue
+57
-34
ProogingProcess.vue
src/views/mes/proofing/components/ProogingProcess.vue
+59
-62
proofingInfo.vue
src/views/mes/proofing/proofingInfo.vue
+71
-16
No files found.
src/components/itemSelect/single.vue
View file @
c30880cf
This diff is collapsed.
Click to expand it.
src/components/routesProcessSelect/index.vue
0 → 100644
View file @
c30880cf
<
template
>
<el-dialog
title=
"工艺路线选择"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
"true"
width=
"80%"
center
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"110px"
>
<el-form-item
label=
"工艺路线编号"
prop=
"routeCode"
>
<el-input
v-model=
"queryParams.routeCode"
placeholder=
"请输入工艺路线编号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"工艺路线名称"
prop=
"routeName"
>
<el-input
v-model=
"queryParams.routeName"
placeholder=
"请输入工艺路线名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"enableFlag"
>
<el-input
v-model=
"queryParams.enableFlag"
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-table
v-loading=
"loading"
:data=
"processRoutesList"
highlight-current-row
@
current-change=
"handleCurrent"
@
row-dblclick=
"handleRowDbClick"
height=
"400"
>
<el-table-column
width=
"50"
align=
"center"
>
<template
v-slot=
"scope"
>
<el-radio
v-model=
"selectedRouteId"
:label=
"scope.row.routeId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio
>
</
template
>
</el-table-column>
<el-table-column
label=
"工艺路线编号"
align=
"center"
prop=
"routeCode"
/>
<el-table-column
label=
"工艺路线名称"
align=
"center"
prop=
"routeName"
/>
<el-table-column
label=
"工艺路线说明"
align=
"center"
prop=
"routeDesc"
/>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"enableFlag"
/>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<el-tabs
type=
"border-card"
style=
"margin-top: 30px"
>
<el-tab-pane
label=
"工序"
>
<el-table
v-loading=
"processLoading"
:data=
"processList"
>
<el-table-column
label=
"工序编码"
width=
"120px"
fixed
align=
"center"
prop=
"processCode"
/>
<el-table-column
label=
"工序名称"
width=
"150px"
fixed
align=
"center"
prop=
"processName"
/>
<el-table-column
label=
"下一道工序"
width=
"150px"
align=
"center"
prop=
"nextProcessName"
/>
<el-table-column
label=
"与下一道工序关系"
width=
"150px"
align=
"center"
prop=
"linkType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_link_type"
:value=
"scope.row.linkType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"关键工序"
width=
"100px"
align=
"center"
prop=
"keyFlag"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_yes_no"
:value=
"scope.row.keyFlag"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"质检确认"
width=
"100px"
align=
"center"
prop=
"isCheck"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_yes_no"
:value=
"scope.row.isCheck"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"准备时间"
align=
"center"
prop=
"defaultPreTime"
/>
<el-table-column
label=
"等待时间"
align=
"center"
prop=
"defaultSufTime"
/>
</el-table>
</el-tab-pane>
</el-tabs>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"confirmSelect"
>
确 定
</el-button>
<el-button
@
click=
"showFlag = false"
>
取 消
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
{
listProroute
}
from
"@/api/mes/pro/proroute"
;
import
{
listRouteprocess
}
from
"@/api/mes/pro/routeprocess"
;
export
default
{
name
:
"RoutesProcessSelectSingle"
,
components
:
{},
dicts
:
[
"sys_yes_no"
,
"mes_link_type"
,
"sys_yes_no"
],
data
()
{
return
{
showFlag
:
false
,
// 选中数组
selectedRouteId
:
undefined
,
selectedRows
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
processList
:
[],
// 品牌表格数据
processRoutesList
:
[],
// // 品牌名称
// brandName: undefined,
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
processLoading
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
routeCode
:
null
,
routeName
:
null
,
routeDesc
:
null
,
enableFlag
:
null
,
},
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询工厂列表 */
getList
()
{
this
.
loading
=
true
;
listProroute
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
processRoutesList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
handleCurrent
(
row
)
{
const
params
=
{
pageNum
:
1
,
pageSize
:
1000
,
routeId
:
row
.
routeId
,
};
this
.
processLoading
=
true
;
listRouteprocess
(
params
)
.
then
(({
rows
})
=>
{
this
.
processList
=
rows
;
this
.
processLoading
=
false
;
})
.
catch
(()
=>
{
this
.
processLoading
=
false
;
});
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
getProcess
()
{},
// 单选选中数据
handleRowChange
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
//双击选中
handleRowDbClick
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
},
//确定选中
confirmSelect
()
{
if
(
this
.
selectedRouteId
==
null
||
this
.
selectedRouteId
==
0
)
{
this
.
$notify
({
title
:
"提示"
,
type
:
"warning"
,
message
:
"请至少选择一条数据!"
,
});
return
;
}
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
},
},
};
</
script
>
src/views/mes/md/product/components/sapProperty.vue
0 → 100644
View file @
c30880cf
<
template
>
<div
class=
"base-info"
>
<el-form
:model=
"form"
ref=
"form"
label-width=
"120px"
size=
"mini"
>
<el-row
class=
"form-wrap"
:gutter=
"10"
>
<template
v-for=
"item in sapProperties"
>
<el-col
:span=
"8"
:key=
"item.id"
>
<el-form-item
:label=
"item.name"
:prop=
"item.sapField"
:rules=
"
{required: true, validator: (rule, value, callback) => onValidate(rule, value, callback, item), trigger: ['blur', 'change']}">
<el-input-all
v-model=
"form[item.sapField]"
:item=
"item"
/>
</el-form-item>
</el-col>
</
template
>
</el-row>
</el-form>
<div>
<el-button
@
click=
"onConfirm"
>
确认
</el-button>
</div>
</div>
</template>
<
script
>
import
{
listByType
}
from
'@/api/mes/md/sapproperty'
export
default
{
props
:
{
},
data
()
{
return
{
sapProperties
:
[],
customer
:
{},
form
:
{},
sapProperty
:
{
id
:
''
,
type
:
''
,
viewType
:
''
,
name
:
''
,
typeId
:
''
,
sapField
:
''
,
relationField
:
''
,
typeName
:
''
,
dataType
:
''
,
length
:
''
,
min
:
''
,
max
:
''
,
regEx
:
''
,
dictId
:
''
,
errMsg
:
''
,
dictDataList
:
[]
},
}
},
methods
:
{
onConfirm
()
{
console
.
log
(
this
.
form
)
},
onValidate
(
rule
,
value
,
callback
,
item
)
{
if
(
value
===
''
||
value
==
null
)
{
callback
(
new
Error
(
item
.
errMsg
))
}
else
{
if
(
item
.
dataType
===
1
)
{
if
(
value
.
length
>
item
.
length
||
!
new
RegExp
(
item
.
regEx
).
test
(
value
))
callback
(
new
Error
(
item
.
errMsg
))
}
else
if
([
2
,
3
].
includes
(
item
.
dataType
))
{
if
(
value
<
item
.
min
||
value
>
max
)
callback
(
new
Error
(
item
.
errMsg
))
}
callback
()
}
},
init
()
{
this
.
$refs
.
form
&&
this
.
$refs
.
form
.
resetFields
()
this
.
form
=
{}
listByType
({
type
:
5
}).
then
(
res
=>
{
this
.
sapProperties
=
res
.
data
})
}
},
created
()
{
}
}
</
script
>
<
style
scoped
>
.form-wrap
{
max-height
:
400px
;
overflow-y
:
auto
;
}
</
style
>
src/views/mes/md/product/index.vue
View file @
c30880cf
...
...
@@ -509,7 +509,7 @@
</el-col>
</el-row>
</el-form>
<el-tabs
type=
"border-card"
v-if=
"form.itemId != null && form.itemOrProduct == 'PRODUCT'"
>
<el-tabs
type=
"border-card"
v-
model=
"activeName"
@
tab-click=
"onTabClick"
v-
if=
"form.itemId != null && form.itemOrProduct == 'PRODUCT'"
>
<el-tab-pane
label=
"基本信息"
>
<BaseInfo
ref=
"baseInfo"
...
...
@@ -551,6 +551,9 @@
<el-tab-pane
label=
"客户loss"
>
<CustomerLoss
:optType=
"optType"
:itemId=
"form.itemId"
></CustomerLoss>
</el-tab-pane>
<el-tab-pane
label=
"SAP特性"
name=
"SapProperty"
>
<SapProperty
ref=
"SapProperty"
/>
</el-tab-pane>
<el-tab-pane
label=
"SOP"
>
<SOPTab
:itemId=
"form.itemId"
:optType=
"optType"
></SOPTab>
</el-tab-pane>
...
...
@@ -629,6 +632,7 @@ import FaceColor from "./components/faceColor.vue";
import
BackFaceColor
from
"./components/backFaceColor.vue"
;
import
CustomerLoss
from
"./components/customerLoss.vue"
;
import
ItemBom
from
"./components/itembom.vue"
;
import
SapProperty
from
'./components/sapProperty.vue'
import
SOPTab
from
"./components/sop.vue"
;
import
{
listAllUnitmeasure
}
from
"@/api/mes/md/unitmeasure"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
...
...
@@ -641,6 +645,7 @@ export default {
name
:
"MdItem"
,
dicts
:
[
"sys_yes_no"
,
"mes_item_product"
],
components
:
{
SapProperty
,
Treeselect
,
BaseInfo
,
SpecProperty
,
...
...
@@ -657,6 +662,7 @@ export default {
},
data
()
{
return
{
activeName
:
'BaseInfo'
,
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -852,6 +858,7 @@ export default {
if
(
this
.
queryParams
.
itemTypeId
!=
0
)
{
this
.
form
.
itemTypeId
=
this
.
queryParams
.
itemTypeId
;
}
this
.
activeName
=
'BaseInfo'
this
.
optType
=
"add"
;
this
.
open
=
true
;
this
.
title
=
"新增物料/产品"
;
...
...
@@ -860,6 +867,7 @@ export default {
handleUpdate
(
row
)
{
this
.
reset
();
this
.
getTreeselect
();
this
.
activeName
=
'BaseInfo'
const
itemId
=
row
.
itemId
||
this
.
ids
;
getMdItem
(
itemId
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
;
...
...
@@ -981,6 +989,9 @@ export default {
this
.
form
.
itemCode
=
null
;
}
},
onTabClick
()
{
this
.
$refs
[
this
.
activeName
].
init
&&
this
.
$refs
[
this
.
activeName
].
init
(
this
.
form
.
itemId
)
}
},
};
</
script
>
src/views/mes/pro/proroute/index.vue
View file @
c30880cf
This diff is collapsed.
Click to expand it.
src/views/mes/pro/proroute/routeprocess.vue
View file @
c30880cf
...
...
@@ -117,9 +117,9 @@
<el-form-item
label=
"与下一道工序关系"
prop=
"linkType"
>
<el-tooltip
effect=
"dark"
placement=
"right"
>
<div
slot=
"content"
>
S-to-S:当前工序开始生产,下一道工序才可开始生产
</br>
F-to-F:当前工序结束生产,下一道工序才可结束生产
</br>
S-to-F:当前工序开始生产,下一道工序才可结束生产
</br>
S-to-S:当前工序开始生产,下一道工序才可开始生产
</br>
F-to-F:当前工序结束生产,下一道工序才可结束生产
</br>
S-to-F:当前工序开始生产,下一道工序才可结束生产
</br>
F-to-S:当前工序结束生产,下一道工序才可开始生产
</div>
<el-select
v-model=
"form.linkType"
placeholder=
"请选择与下一道工序关系"
>
...
...
@@ -144,10 +144,7 @@
<el-col
:span=
"7"
>
<el-form-item
label=
"是否关键工序"
prop=
"keyFlag"
>
<el-tooltip
effect=
"dark"
placement=
"right"
>
<div
slot=
"content"
>
是:整个工单的生产进度将根据当前工序的生产报工数量进行更新
</br>
每个工艺流程只能有一个关键工序
</div>
<div
slot=
"content"
>
是:整个工单的生产进度将根据当前工序的生产报工数量进行更新
</br>
每个工艺流程只能有一个关键工序
</div>
<el-select
v-model=
"form.keyFlag"
>
<el-option
v-for=
"dict in dict.type.sys_yes_no"
...
...
src/views/mes/proofing/components/ProcessProd.vue
0 → 100644
View file @
c30880cf
<
template
>
<div
class=
"process-prod"
>
<!-- 设置物料弹窗 -->
<el-dialog
:visible
.
sync=
"showProcessProd"
width=
"800px"
:before-close=
"beforeClose"
append-to-body
title=
"设置物料"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
</el-button
>
</el-col>
</el-row>
<el-table
:data=
"tableData"
>
<el-table-column
label=
"物料名称"
prop=
"itemName"
align=
"center"
/>
<el-table-column
label=
"单位"
prop=
"unitOfMeasure"
align=
"center"
/>
<el-table-column
label=
"数量"
prop=
"quantity"
align=
"center"
/>
<el-table-column
label=
"备注"
prop=
"remark"
align=
"center"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"150"
>
<template
slot-scope=
"
{ row, $index }">
<el-button
type=
"text"
icon=
"el-icon-edit"
size=
"small"
@
click=
"updateRow(row, $index)"
>
修改
</el-button
>
<el-button
type=
"text"
icon=
"el-icon-delete"
size=
"small"
@
click=
"deleteRow($index)"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
<div
slot=
"footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"cancleConnect"
>
关闭
</el-button
>
</div>
</el-dialog>
<!-- 选择Bom物料 -->
<el-dialog
:visible
.
sync=
"showFlag"
title=
"选择Bom物料"
width=
"800px"
append-to-body
>
<el-table
:data=
"bomList"
@
current-change=
"handleRowChange"
@
row-dblclick=
"handleRowDbClick"
>
<el-table-column
width=
"50"
align=
"center"
>
<
template
v-slot=
"scope"
>
<el-radio
v-model=
"selectedItemId"
:label=
"scope.row.itemId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio
>
</
template
>
</el-table-column>
<el-table-column
label=
"物料名称"
prop=
"itemName"
/>
<el-table-column
label=
"单位"
prop=
"unitOfMeasure"
/>
<el-table-column
label=
"用料比例"
prop=
"quantity"
/>
</el-table>
<div
slot=
"footer"
>
<el-button
@
click=
"configmSelect"
>
确认
</el-button>
<el-button
@
click=
"showFlag = false"
>
取消
</el-button>
</div>
</el-dialog>
<!-- 编辑物料关联信息 -->
<el-dialog
:visible
.
sync=
"editConnectVisible"
width=
"400px"
title=
"编辑物料关联信息"
>
<el-form
:model=
"form"
inline
size=
"small"
label-width=
"80px"
>
<el-form-item
label=
"物料名称"
>
<el-input
disabled
v-model=
"form.itemName"
></el-input>
</el-form-item>
<el-form-item
label=
"单位"
>
<el-input
disabled
v-model=
"form.unitOfMeasure"
></el-input>
</el-form-item>
<el-form-item
label=
"数量"
>
<el-input
type=
"number"
v-model=
"form.quantity"
></el-input>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
:rows=
"3"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"submitEditConnect"
>
确认
</el-button
>
<el-button
size=
"small"
@
click=
"editConnectVisible = false"
>
取消
</el-button
>
</div>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
props
:
{
bomList
:
{
type
:
Array
,
default
:
()
=>
[],
},
process
:
{
type
:
Object
,
default
:
()
=>
({}),
},
},
data
()
{
return
{
form
:
{
itemName
:
""
,
unitOfMeasure
:
""
,
quantity
:
""
,
remark
:
""
,
},
currentRowIdx
:
undefined
,
tableData
:
[],
selectedItemId
:
undefined
,
selectedRows
:
null
,
showFlag
:
false
,
showProcessProd
:
false
,
editConnectVisible
:
false
,
};
},
computed
:
{
title
()
{
return
'设置'
+
this
.
process
.
itemName
+
'物料'
}
},
watch
:
{
process
:
{
handler
(
val
)
{
this
.
tableData
=
val
.
processItemList
;
},
deep
:
true
,
},
},
methods
:
{
handleRowChange
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
handleRowDbClick
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
this
.
tableData
.
unshift
(
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
},
/**新增按钮 */
handleAdd
()
{
this
.
showFlag
=
true
;
},
/**确认选择关联的Bom */
configmSelect
()
{
if
(
this
.
selectedItemId
==
null
||
this
.
selectedItemId
==
0
)
{
return
;
}
this
.
tableData
.
unshift
({
...
this
.
selectedRows
,
processId
:
this
.
process
.
processId
,
});
this
.
showFlag
=
false
;
},
/**编辑 */
updateRow
(
row
,
idx
)
{
this
.
resetForm
();
Object
.
assign
(
this
.
form
,
row
);
this
.
currentRowIdx
=
idx
;
this
.
editConnectVisible
=
true
;
},
deleteRow
(
index
)
{
this
.
tableData
.
splice
(
index
,
1
);
},
cancleConnect
()
{
this
.
$emit
(
"updateItem"
,
this
.
tableData
);
this
.
showProcessProd
=
false
;
},
beforeClose
(
done
)
{
// 更新父组件的processItemList
this
.
$emit
(
"updateItem"
,
this
.
tableData
);
done
();
},
/**重置表单 */
resetForm
()
{
this
.
form
=
{
itemName
:
""
,
unitOfMeasure
:
""
,
quantity
:
""
,
remark
:
""
,
};
},
/** 提交编辑关联信息 */
submitEditConnect
()
{
this
.
tableData
.
splice
(
this
.
currentRowIdx
,
1
,
this
.
form
);
this
.
editConnectVisible
=
false
;
},
},
};
</
script
>
<
style
>
.process-prod
{
padding
:
0
20px
;
}
</
style
>
src/views/mes/proofing/components/ProogingBom.vue
View file @
c30880cf
...
...
@@ -21,30 +21,16 @@
>
删除
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-delete"
size=
"mini"
>
产品分类导入
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-delete"
size=
"mini"
@
click=
"$refs['ItemBomSelectRef'].showFlag = true"
>
产品导入
</el-button
>
<ItemBomSelect
ref=
"ItemBomSelectRef"
@
onSelected=
"onItemBomSelect"
/>
</el-col>
</el-row>
<el-table
:data=
"tableData"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"itemName"
width=
"120"
/>
<el-table-column
label=
"组件数量"
align=
"center"
...
...
@@ -91,28 +77,28 @@
label=
"BOM行备注"
align=
"center"
prop=
"bomItemRemark"
width=
"120"
min-
width=
"120"
/>
<el-table-column
label=
"物料备注"
align=
"center"
prop=
"itemRemark"
width=
"120"
min-
width=
"120"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"120"
>
<template
slot-scope=
"
{ row, index }">
<template
slot-scope=
"
{ row,
$
index }">
<el-button
type=
"text"
icon=
"el-icon-edit"
size=
"small"
@
click=
"updateRow(row)"
@
click=
"updateRow(row
, $index
)"
>
修改
</el-button
>
<el-button
type=
"text"
icon=
"el-icon-delete"
size=
"small"
@
click=
"deleteRow(index)"
@
click=
"deleteRow(
$
index)"
>
删除
</el-button
>
</
template
>
...
...
@@ -128,6 +114,24 @@
label-width=
"100px"
size=
"small"
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"产品"
prop=
"itemId"
>
<el-input
v-model=
"form.itemName"
readonly
placeholder=
"请选择产品"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"$refs['ItemSelectRef'].showFlag = true"
></el-button>
</el-input>
<ItemSelect
ref=
"ItemSelectRef"
@
onSelected=
"onItemSelect"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"组件数量"
prop=
"quantity"
>
...
...
@@ -214,9 +218,10 @@
<
script
>
import
ItemBomSelect
from
"@/components/itemBomSelect/single.vue"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
export
default
{
components
:
{
ItemBomSelect
},
inject
:
[
'mode'
],
components
:
{
ItemBomSelect
,
ItemSelect
},
inject
:
[
"mode"
],
data
()
{
return
{
/**弹窗状态 */
...
...
@@ -227,9 +232,12 @@ export default {
rules
:
{},
/**多选 */
selection
:
[],
optType
:
'add'
,
/**表单初始化数据 */
form
:
{
quantity
:
""
,
itemName
:
""
,
itemId
:
""
,
unitOfMeasure
:
""
,
scrapPercentage
:
""
,
alternativeGroup
:
""
,
...
...
@@ -239,11 +247,10 @@ export default {
bomItemRemark
:
""
,
itemRemark
:
""
,
},
currentRowIdx
:
undefined
};
},
created
()
{
},
created
()
{},
methods
:
{
/**多选 */
handleSelectionChange
(
val
)
{
...
...
@@ -255,10 +262,13 @@ export default {
handleAdd
()
{
this
.
resetForm
();
this
.
showFlag
=
true
;
this
.
optType
=
'add'
},
/**更新行 */
updateRow
(
row
)
{
updateRow
(
row
,
idx
)
{
Object
.
assign
(
this
.
form
,
row
);
this
.
currentRowIdx
=
idx
this
.
optType
=
'edit'
this
.
showFlag
=
true
;
},
/**删除行 */
...
...
@@ -270,11 +280,22 @@ export default {
// this.tableData.unshift({...row})
// }
},
onItemSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
itemId
=
row
.
itemId
;
this
.
form
.
itemName
=
row
.
itemName
;
this
.
form
.
unit
=
row
.
unitOfMeasure
;
}
},
/**表单提交 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
tableData
.
unshift
({
...
this
.
form
});
if
(
this
.
optType
==
'add'
)
{
this
.
tableData
.
unshift
({
...
this
.
form
});
}
else
{
this
.
tableData
.
splice
(
this
.
currentRowIdx
,
1
,
this
.
form
)
}
this
.
showFlag
=
false
;
}
});
...
...
@@ -282,6 +303,8 @@ export default {
/**重置表单 */
resetForm
()
{
this
.
form
=
{
itemName
:
""
,
itemId
:
""
,
quantity
:
""
,
unitOfMeasure
:
""
,
scrapPercentage
:
""
,
...
...
@@ -295,8 +318,8 @@ export default {
},
/**获取组件数据 */
getComData
()
{
return
this
.
tableData
}
return
this
.
tableData
;
}
,
},
};
</
script
>
...
...
src/views/mes/proofing/components/ProogingProcess.vue
View file @
c30880cf
<
template
>
<div>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
@
click=
"handleDelete"
>
删除
</el-button
>
</el-col>
</el-row>
<el-table
:data=
"tableData"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"工序名称"
prop=
"processName"
width=
"120"
align=
"center"
/>
<el-table-column
label=
"工序编码"
prop=
"processCode"
width=
"120"
align=
"center"
/>
<el-table-column
label=
"与下一道工序关系"
prop=
"linkType"
width=
"160"
align=
"center"
/>
<el-table-column
label=
"工作站"
prop=
"workstationId"
width=
"120"
align=
"center"
/>
<el-table-column
label=
"甘特图显示颜色"
prop=
"colorCode"
width=
"120"
align=
"center"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"120"
>
<template
slot-scope=
"
{ row, index }">
<el-table
:data=
"tableData"
>
<el-table-column
label=
"工序名称"
prop=
"processName"
align=
"center"
/>
<el-table-column
label=
"工序编码"
prop=
"processCode"
align=
"center"
/>
<el-table-column
label=
"与下一道工序关系"
prop=
"linkType"
align=
"center"
/>
<el-table-column
label=
"工作站"
prop=
"workstationId"
align=
"center"
/>
<el-table-column
label=
"甘特图显示颜色"
prop=
"colorCode"
align=
"center"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"150"
>
<template
slot-scope=
"
{ row, $index }">
<el-button
type=
"text"
icon=
"el-icon-edit"
size=
"small"
@
click=
"updateRow(row)"
>
修改
</el-button
@
click=
"openSetProd(row, $index)"
>
设置物料
</el-button>
<el-button
type=
"text"
icon=
"el-icon-
delete
"
icon=
"el-icon-
edit
"
size=
"small"
@
click=
"
deleteRow(
index)"
>
删除
</el-button
@
click=
"
updateRow(row, $
index)"
>
修改
</el-button
>
</
template
>
</el-table-column>
</el-table>
<el-dialog
:visible
.
sync=
"showFlag"
width=
"700px"
title=
"添加工艺"
>
<ProcessProd
:process=
"currentRow"
:bomList=
"bomList"
ref=
"ProcessProdRef"
@
updateItem=
"updateItem"
/>
<el-dialog
v-dialogDrag
:visible
.
sync=
"showFlag"
width=
"800px"
title=
"添加工序"
>
<el-form
ref=
"form"
:model=
"form"
...
...
@@ -145,8 +138,15 @@
<
script
>
import
ItemBomSelect
from
"@/components/itemBomSelect/single.vue"
;
import
ProcessProd
from
"./ProcessProd.vue"
;
export
default
{
components
:
{
ItemBomSelect
},
components
:
{
ItemBomSelect
,
ProcessProd
},
props
:
{
bomList
:
{
type
:
Array
,
default
:
()
=>
[],
},
},
data
()
{
return
{
/**弹窗状态 */
...
...
@@ -155,8 +155,6 @@ export default {
tableData
:
[],
/**表单规则 */
rules
:
{},
/**多选 */
selection
:
[],
/**表单初始化数据 */
form
:
{
quantity
:
""
,
...
...
@@ -169,44 +167,43 @@ export default {
bomItemRemark
:
""
,
itemRemark
:
""
,
},
currentRow
:
{},
currentRowIndex
:
undefined
,
};
},
methods
:
{
/**多选 */
handleSelectionChange
(
val
)
{
this
.
selection
=
val
;
setList
(
rows
)
{
this
.
tableData
=
rows
.
map
(
item
=>
{
item
.
processItemList
=
[]
return
item
});
},
/**删除操作 */
handleDelete
()
{},
/**添加操作 */
handleAdd
()
{
this
.
resetForm
();
this
.
showFlag
=
true
;
/** 更新工序的物料信息 */
updateItem
(
items
)
{
this
.
tableData
[
this
.
currentRowIndex
].
processItemList
=
items
;
},
openSetProd
(
row
,
idx
)
{
this
.
currentRow
=
row
;
this
.
currentRowIndex
=
idx
;
this
.
$refs
[
"ProcessProdRef"
].
showProcessProd
=
true
;
},
/**更新行 */
updateRow
(
row
)
{
updateRow
(
row
,
idx
)
{
Object
.
assign
(
this
.
form
,
row
);
this
.
currentRowIndex
=
idx
;
this
.
showFlag
=
true
;
},
/**删除行 */
deleteRow
(
index
)
{
this
.
tableData
.
splice
(
index
,
1
);
},
onItemBomSelect
(
row
)
{
// if (row != undefined && row != null) {
// this.tableData.unshift({...row})
// }
},
/**表单提交 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
tableData
.
unshift
({
...
this
.
form
});
this
.
showFlag
=
false
;
}
});
},
getComData
()
{},
getComData
()
{
return
this
.
tableData
;
},
/**重置表单 */
resetForm
()
{
this
.
form
=
{
...
...
src/views/mes/proofing/proofingInfo.vue
View file @
c30880cf
...
...
@@ -14,7 +14,7 @@
ref=
"form"
size=
"small"
:inline=
"true"
label-width=
"
100px
"
label-width=
"
8em
"
>
<el-row>
<el-col
:md=
"8"
:xs=
"12"
>
...
...
@@ -29,7 +29,11 @@
<el-col
:md=
"8"
:xs=
"12"
style=
"height: 50.5px"
>
<el-form-item
label=
"产品"
prop=
"itemId"
>
<el-input
v-model=
"form.itemName"
readonly
placeholder=
"请选择产品"
>
<el-input
v-model=
"form.itemName"
readonly
placeholder=
"请选择产品"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
...
...
@@ -41,11 +45,25 @@
</el-col>
<el-col
:md=
"8"
:xs=
"12"
style=
"height: 50.5px"
>
<el-form-item
label=
"工艺路线"
prop=
"routeId"
>
<el-input
v-model=
"form.routeId"
placeholder=
"请选择工艺路线"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
></el-button>
<el-input
v-model=
"form.routeName"
readonly
placeholder=
"请选择工艺路线"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"$refs['RoutesProcessSelectRef'].showFlag = true"
></el-button>
</el-input>
<RoutesProcessSelect
ref=
"RoutesProcessSelectRef"
@
onSelected=
"onRoutesProcessSelect"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"简称"
prop=
"abbreviation"
>
<el-input
...
...
@@ -64,10 +82,9 @@
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"样品数量"
prop=
"num"
>
<el-input
v-model=
"form.num"
placeholder=
"请输入样品数量"
></el-input>
<el-input
v-model=
"form.num"
placeholder=
"请输入样品数量"
>
<
template
slot=
"suffix"
>
{{
form
.
unit
}}
</
template
>
</el-input>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
...
...
@@ -143,12 +160,12 @@
</el-row>
</el-form>
<el-tabs
type=
"border-card"
>
<el-tabs
type=
"border-card"
@
tab-click=
"tabClick"
>
<el-tab-pane
label=
"BOM"
>
<ProogingBom
ref=
"ProogingBomRef"
/>
</el-tab-pane>
<el-tab-pane
label=
"工艺"
>
<ProogingProcess
ref=
"ProogingProcessRef"
/>
<ProogingProcess
ref=
"ProogingProcessRef"
:bomList=
"bomList"
/>
</el-tab-pane>
</el-tabs>
</PageWrapper>
...
...
@@ -159,9 +176,13 @@
import
ProogingBom
from
"./components/ProogingBom.vue"
;
import
ProogingProcess
from
"./components/ProogingProcess.vue"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
import
RoutesProcessSelect
from
"@/components/routesProcessSelect/index.vue"
;
import
{
listRouteprocess
}
from
"@/api/mes/pro/routeprocess"
;
import
{
Loading
}
from
"element-ui"
;
import
{
addPrototypeRequest
}
from
"@/api/mes/pro/prototypeRequest"
;
export
default
{
components
:
{
ProogingBom
,
ProogingProcess
,
ItemSelect
},
components
:
{
ProogingBom
,
ProogingProcess
,
ItemSelect
,
RoutesProcessSelect
},
dicts
:
[],
provide
()
{
return
{
...
...
@@ -170,12 +191,15 @@ export default {
},
data
()
{
return
{
bomList
:
[],
// 表单参数
form
:
{
prototypeRequestCode
:
""
,
itemId
:
""
,
itemName
:
""
,
unit
:
""
,
routeId
:
""
,
routeName
:
""
,
abbreviation
:
""
,
enName
:
""
,
num
:
""
,
...
...
@@ -209,21 +233,52 @@ export default {
},
created
()
{},
methods
:
{
/** 点击tab 获取bom的数据,将参数传递给后面的组件 */
tabClick
(
val
)
{
if
(
val
.
index
!=
0
)
{
this
.
bomList
=
this
.
$refs
[
"ProogingBomRef"
].
getComData
();
console
.
log
(
this
.
bomList
,
"7777777"
);
}
},
onItemSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
itemId
=
row
.
itemId
;
this
.
form
.
itemName
=
row
.
itemName
;
this
.
form
.
unit
=
row
.
unitOfMeasure
;
}
},
onRoutesProcessSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
routeId
=
row
.
routeId
;
this
.
form
.
routeName
=
row
.
routeName
;
const
params
=
{
pageNum
:
1
,
pageSize
:
1000
,
routeId
:
row
.
routeId
,
};
listRouteprocess
(
params
).
then
(({
rows
})
=>
{
this
.
$refs
[
"ProogingProcessRef"
].
setList
(
rows
);
});
}
},
/**提交 */
saveForm
()
{
const
bom
Data
=
this
.
$refs
.
ProogingBomRef
.
getComData
()
const
process
Data
=
this
.
$refs
.
ProogingProcess
.
getComData
()
const
bom
List
=
this
.
$refs
.
ProogingBomRef
.
getComData
();
const
process
List
=
this
.
$refs
.
ProogingProcessRef
.
getComData
();
const
params
=
{
...
this
.
form
,
bomList
:
bomData
,
processList
:
processData
}
bomList
,
processList
,
};
console
.
log
(
'params'
,
params
)
const
loadingInstance
=
Loading
.
service
({
fullscreen
:
true
});
addPrototypeRequest
(
params
).
then
((
res
)
=>
{
loadingInstance
.
close
();
this
.
$modal
.
msgSuccess
(
"提交成功!"
);
}).
catch
(()
=>
{
loadingInstance
.
close
();
})
},
/**重置表单 */
resetForm
()
{
...
...
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