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
05554c08
Commit
05554c08
authored
Jan 23, 2024
by
赵汉亭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产版本1
parent
c9ab2fdf
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2678 additions
and
0 deletions
+2678
-0
productionSolution.js
src/api/mes/pro/productionSolution.js
+44
-0
productionSolutionBom.js
src/api/mes/pro/productionSolutionBom.js
+44
-0
productionSolutionProcess.js
src/api/mes/pro/productionSolutionProcess.js
+44
-0
productionSolutionProcessItem.js
src/api/mes/pro/productionSolutionProcessItem.js
+44
-0
ProcessProd.vue
...ews/mes/pro/productionSolution/components/ProcessProd.vue
+232
-0
ProogingBom.vue
...ews/mes/pro/productionSolution/components/ProogingBom.vue
+338
-0
ProogingProcess.vue
...mes/pro/productionSolution/components/ProogingProcess.vue
+197
-0
proofingApply.vue
src/views/mes/pro/productionSolution/proofingApply.vue
+505
-0
proofingInfo.vue
src/views/mes/pro/productionSolution/proofingInfo.vue
+365
-0
routebominfo.vue
src/views/mes/pro/productionSolution/routebominfo.vue
+432
-0
routeprocess.vue
src/views/mes/pro/productionSolution/routeprocess.vue
+433
-0
No files found.
src/api/mes/pro/productionSolution.js
0 → 100644
View file @
05554c08
import
request
from
'@/utils/request'
// 查询生产方案列表
export
function
listProductionSolution
(
query
)
{
return
request
({
url
:
'/mes/pro/productionSolution/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询生产方案详细
export
function
getProductionSolution
(
productionSolutionId
)
{
return
request
({
url
:
'/mes/pro/productionSolution/'
+
productionSolutionId
,
method
:
'get'
})
}
// 新增生产方案
export
function
addProductionSolution
(
data
)
{
return
request
({
url
:
'/mes/pro/productionSolution'
,
method
:
'post'
,
data
:
data
})
}
// 修改生产方案
export
function
updateProductionSolution
(
data
)
{
return
request
({
url
:
'/mes/pro/productionSolution'
,
method
:
'put'
,
data
:
data
})
}
// 删除生产方案
export
function
delProductionSolution
(
productionSolutionId
)
{
return
request
({
url
:
'/mes/pro/productionSolution/'
+
productionSolutionId
,
method
:
'delete'
})
}
src/api/mes/pro/productionSolutionBom.js
0 → 100644
View file @
05554c08
import
request
from
'@/utils/request'
// 查询生产方案BOM列表
export
function
listProductionSolutionBom
(
query
)
{
return
request
({
url
:
'/mes/pro/productionSolutionBom/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询生产方案BOM详细
export
function
getProductionSolutionBom
(
bomItemId
)
{
return
request
({
url
:
'/mes/pro/productionSolutionBom/'
+
bomItemId
,
method
:
'get'
})
}
// 新增生产方案BOM
export
function
addProductionSolutionBom
(
data
)
{
return
request
({
url
:
'/mes/pro/productionSolutionBom'
,
method
:
'post'
,
data
:
data
})
}
// 修改生产方案BOM
export
function
updateProductionSolutionBom
(
data
)
{
return
request
({
url
:
'/mes/pro/productionSolutionBom'
,
method
:
'put'
,
data
:
data
})
}
// 删除生产方案BOM
export
function
delProductionSolutionBom
(
bomItemId
)
{
return
request
({
url
:
'/mes/pro/productionSolutionBom/'
+
bomItemId
,
method
:
'delete'
})
}
src/api/mes/pro/productionSolutionProcess.js
0 → 100644
View file @
05554c08
import
request
from
'@/utils/request'
// 查询生产方案工序列表
export
function
listProductionSolutionProcess
(
query
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcess/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询生产方案工序详细
export
function
getProductionSolutionProcess
(
productionSolutionProcessId
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcess/'
+
productionSolutionProcessId
,
method
:
'get'
})
}
// 新增生产方案工序
export
function
addProductionSolutionProcess
(
data
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcess'
,
method
:
'post'
,
data
:
data
})
}
// 修改生产方案工序
export
function
updateProductionSolutionProcess
(
data
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcess'
,
method
:
'put'
,
data
:
data
})
}
// 删除生产方案工序
export
function
delProductionSolutionProcess
(
productionSolutionProcessId
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcess/'
+
productionSolutionProcessId
,
method
:
'delete'
})
}
src/api/mes/pro/productionSolutionProcessItem.js
0 → 100644
View file @
05554c08
import
request
from
'@/utils/request'
// 查询生产方案工序物料列表
export
function
listProductionSolutionProcessItem
(
query
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcessItem/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询生产方案工序物料详细
export
function
getProductionSolutionProcessItem
(
productionSolutionProcessItemId
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcessItem/'
+
productionSolutionProcessItemId
,
method
:
'get'
})
}
// 新增生产方案工序物料
export
function
addProductionSolutionProcessItem
(
data
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcessItem'
,
method
:
'post'
,
data
:
data
})
}
// 修改生产方案工序物料
export
function
updateProductionSolutionProcessItem
(
data
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcessItem'
,
method
:
'put'
,
data
:
data
})
}
// 删除生产方案工序物料
export
function
delProductionSolutionProcessItem
(
productionSolutionProcessItemId
)
{
return
request
({
url
:
'/mes/pro/productionSolutionProcessItem/'
+
productionSolutionProcessItemId
,
method
:
'delete'
})
}
src/views/mes/pro/productionSolution/components/ProcessProd.vue
0 → 100644
View file @
05554c08
<
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/pro/productionSolution/components/ProogingBom.vue
0 → 100644
View file @
05554c08
<
template
>
<div>
<el-row
:gutter=
"10"
class=
"mb8"
v-if=
"mode != 'info'"
>
<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=
"物料名称"
align=
"center"
prop=
"itemName"
width=
"120"
/>
<el-table-column
label=
"组件数量"
align=
"center"
prop=
"quantity"
width=
"120"
/>
<el-table-column
label=
"计量单位"
align=
"center"
prop=
"unitOfMeasure"
width=
"120"
/>
<el-table-column
label=
"报废百分比"
align=
"center"
prop=
"scrapPercentage"
width=
"120"
/>
<el-table-column
label=
"替代组"
align=
"center"
prop=
"alternativeGroup"
width=
"120"
/>
<el-table-column
label=
"替代优先级"
align=
"center"
prop=
"alternativePriorities"
width=
"120"
/>
<el-table-column
label=
"策略"
align=
"center"
prop=
"alternativeStrategy"
width=
"120"
/>
<el-table-column
label=
"使用概率"
align=
"center"
prop=
"alternativeProbability"
width=
"120"
/>
<el-table-column
label=
"BOM行备注"
align=
"center"
prop=
"bomItemRemark"
min-width=
"120"
/>
<el-table-column
label=
"物料备注"
align=
"center"
prop=
"itemRemark"
min-width=
"120"
/>
<el-table-column
v-if=
"mode != 'info'"
label=
"操作"
align=
"center"
width=
"120"
>
<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>
<el-dialog
:visible
.
sync=
"showFlag"
width=
"700px"
title=
"添加BOM"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
inline
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"
>
<el-input
type=
"number"
v-model=
"form.quantity"
placeholder=
"请输入组件数量"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"计量单位"
prop=
"unitOfMeasure"
>
<el-input
v-model=
"form.unitOfMeasure"
placeholder=
"请输入计量单位"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"报废百分比"
prop=
"scrapPercentage"
>
<el-input
v-model=
"form.scrapPercentage"
placeholder=
"请输入报废百分比"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"替代组"
prop=
"alternativeGroup"
>
<el-input
v-model=
"form.alternativeGroup"
placeholder=
"请输入替代组"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"替代优先级"
prop=
"alternativePriorities"
>
<el-input
v-model=
"form.alternativePriorities"
placeholder=
"请输入替代优先级"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"策略"
prop=
"alternativeStrategy"
>
<el-input
v-model=
"form.alternativeStrategy"
placeholder=
"请输入策略"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"使用概率"
prop=
"alternativeProbability"
>
<el-input
v-model=
"form.alternativeProbability"
placeholder=
"请输入使用概率"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"BOM行备注"
prop=
"bomItemRemark"
>
<el-input
v-model=
"form.bomItemRemark"
placeholder=
"请输入BOM行备注"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"物料备注"
prop=
"itemRemark"
>
<el-input
v-model=
"form.itemRemark"
placeholder=
"请输入物料备注"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确定
</el-button>
<el-button
type=
"default"
@
click=
"showFlag = false"
>
取消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
ItemBomSelect
from
"@/components/itemBomSelect/single.vue"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
export
default
{
components
:
{
ItemBomSelect
,
ItemSelect
},
inject
:
[
"mode"
],
data
()
{
return
{
/**弹窗状态 */
showFlag
:
false
,
/**表格数据 */
tableData
:
[],
/**表单规则 */
rules
:
{},
/**多选 */
selection
:
[],
optType
:
"add"
,
/**表单初始化数据 */
form
:
{
quantity
:
""
,
itemName
:
""
,
itemId
:
""
,
unitOfMeasure
:
""
,
scrapPercentage
:
""
,
alternativeGroup
:
""
,
alternativePriorities
:
""
,
alternativeStrategy
:
""
,
alternativeProbability
:
""
,
bomItemRemark
:
""
,
itemRemark
:
""
,
},
currentRowIdx
:
undefined
,
};
},
created
()
{},
methods
:
{
/**多选 */
handleSelectionChange
(
val
)
{
this
.
selection
=
val
;
},
/**删除操作 */
handleDelete
()
{},
/**添加操作 */
handleAdd
()
{
this
.
resetForm
();
this
.
showFlag
=
true
;
this
.
optType
=
"add"
;
},
/**更新行 */
updateRow
(
row
,
idx
)
{
Object
.
assign
(
this
.
form
,
row
);
this
.
currentRowIdx
=
idx
;
this
.
optType
=
"edit"
;
this
.
showFlag
=
true
;
},
/**删除行 */
deleteRow
(
index
)
{
this
.
tableData
.
splice
(
index
,
1
);
},
onItemBomSelect
(
row
)
{
// if (row != undefined && row != null) {
// this.tableData.unshift({...row})
// }
},
onItemSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
itemId
=
row
.
itemId
;
this
.
form
.
itemName
=
row
.
itemName
;
this
.
form
.
unitOfMeasure
=
row
.
unitOfMeasure
;
this
.
form
.
itemRemark
=
row
.
remark
;
}
},
/**表单提交 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
optType
==
"add"
)
{
this
.
tableData
.
unshift
({
...
this
.
form
});
}
else
{
this
.
tableData
.
splice
(
this
.
currentRowIdx
,
1
,
this
.
form
);
}
this
.
showFlag
=
false
;
}
});
},
/**重置表单 */
resetForm
()
{
this
.
form
=
{
itemName
:
""
,
itemId
:
""
,
quantity
:
""
,
unitOfMeasure
:
""
,
scrapPercentage
:
""
,
alternativeGroup
:
""
,
alternativePriorities
:
""
,
alternativeStrategy
:
""
,
alternativeProbability
:
""
,
bomItemRemark
:
""
,
itemRemark
:
""
,
};
},
/**重置组件状态 */
resetState
()
{
this
.
resetForm
();
this
.
tableData
=
[];
},
/**获取组件数据 */
getComData
()
{
return
this
.
tableData
;
},
},
};
</
script
>
<
style
></
style
>
src/views/mes/pro/productionSolution/components/ProogingProcess.vue
0 → 100644
View file @
05554c08
<
template
>
<div>
<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=
"workstationName"
align=
"center"
/>
<el-table-column
label=
"标准工时"
prop=
"stdWorkingTime"
align=
"center"
/>
<el-table-column
label=
"甘特图显示颜色"
prop=
"colorCode"
align=
"center"
/>
<el-table-column
v-if=
"mode != 'info'"
label=
"操作"
align=
"center"
width=
"150"
>
<template
slot-scope=
"
{ row, $index }">
<el-button
type=
"text"
icon=
"el-icon-edit"
size=
"small"
@
click=
"openSetProd(row, $index)"
>
设置物料
</el-button>
<el-button
type=
"text"
icon=
"el-icon-edit"
size=
"small"
@
click=
"updateRow(row, $index)"
>
修改
</el-button
>
</
template
>
</el-table-column>
</el-table>
<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"
:rules=
"rules"
inline
label-width=
"100px"
size=
"small"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"工作站"
prop=
"workstationId"
>
<el-input
v-model=
"form.workstationName"
disabled
placeholder=
"请选择工作站信息"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleWorkstationSelect"
></el-button>
</el-input>
<WorkstationSelect
ref=
"WorkstationSelect"
:processId=
"form.processId"
@
onSelected=
"onWorkstationSelected"
></WorkstationSelect>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"标准工时"
prop=
"stdWorkingTime"
>
<el-input
type=
"number"
v-model=
"form.stdWorkingTime"
placeholder=
"请输入标准工时"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确定
</el-button>
<el-button
type=
"default"
@
click=
"showFlag = false"
>
取消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
ItemBomSelect
from
"@/components/itemBomSelect/single.vue"
;
import
ProcessProd
from
"./ProcessProd.vue"
;
import
WorkstationSelect
from
"@/components/workstationSelect/simpletableSingle.vue"
;
export
default
{
components
:
{
ItemBomSelect
,
ProcessProd
,
WorkstationSelect
},
inject
:
[
"mode"
],
props
:
{
bomList
:
{
type
:
Array
,
default
:
()
=>
[],
},
},
data
()
{
return
{
/**弹窗状态 */
showFlag
:
false
,
/**表格数据 */
tableData
:
[],
/**表单规则 */
rules
:
{},
/**表单初始化数据 */
form
:
{
stdWorkingTime
:
""
,
workstationId
:
""
,
workstationName
:
""
,
},
currentRow
:
{},
currentRowIndex
:
undefined
,
};
},
methods
:
{
setList
(
rows
)
{
this
.
tableData
=
rows
.
map
((
item
)
=>
{
item
.
processItemList
=
[];
return
item
;
});
},
/** 更新工序的物料信息 */
updateItem
(
items
)
{
this
.
tableData
[
this
.
currentRowIndex
].
processItemList
=
items
;
},
openSetProd
(
row
,
idx
)
{
this
.
currentRow
=
row
;
this
.
currentRowIndex
=
idx
;
this
.
$refs
[
"ProcessProdRef"
].
showProcessProd
=
true
;
},
/**更新行 */
updateRow
(
row
,
idx
)
{
Object
.
assign
(
this
.
form
,
row
);
this
.
currentRowIndex
=
idx
;
this
.
showFlag
=
true
;
},
/**表单提交 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
showFlag
=
false
;
this
.
tableData
.
splice
(
this
.
currentRowIndex
,
1
,
{
...
this
.
currentRow
,
...
this
.
form
,
});
}
});
},
getComData
()
{
return
this
.
tableData
;
},
/**重置表单 */
resetForm
()
{
this
.
form
=
{
stdWorkingTime
:
""
,
workstationId
:
""
,
workstationName
:
""
,
};
},
/**重置组件状态 */
resetState
()
{
this
.
resetForm
();
this
.
tableData
=
[];
},
// 查询工作站信息
handleWorkstationSelect
()
{
this
.
$refs
.
WorkstationSelect
.
showFlag
=
true
;
},
onWorkstationSelected
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
workstationId
=
row
.
workstationId
;
this
.
form
.
workstationName
=
row
.
workstationName
;
this
.
form
.
stdWorkingTime
=
row
.
stdWorkingTime
;
}
},
},
};
</
script
>
<
style
></
style
>
src/views/mes/pro/productionSolution/proofingApply.vue
0 → 100644
View file @
05554c08
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"产品名称"
prop=
"itemName"
>
<el-input
v-model=
"queryParams.itemName"
placeholder=
"请输入产品名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"单据状态"
prop=
"prototypeRequestStatus"
>
<el-select
v-model=
"queryParams.prototypeRequestStatus"
clearable
placeholder=
"请选择单据状态"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<!--
<el-form-item
label=
"样品名称"
prop=
"abbreviation"
>
<el-input
v-model=
"queryParams.itemName"
placeholder=
"请输入样品名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
-->
<!--
<el-date-picker
clearable
v-model=
"queryParams.abbreviation"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择申请日期"
>
</el-date-picker>
-->
<!--
</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=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['mes:pro:prototypeRequest:add']"
>
新增
</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=
"['mes:pro:prototypeRequest: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=
"['mes:pro:prototypeRequest:remove']"
>
删除
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['mes:pro:prototypeRequest:export']"
>
导出
</el-button
>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"prototypeRequestList"
row-key=
"prototypeRequestId"
default-expand-all
>
<el-table-column
label=
"样品编码"
width=
"180"
prop=
"prototypeRequestCode"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:pro:prototypeRequest:query']"
>
{{
scope
.
row
.
prototypeRequestCode
}}
</el-button
>
</
template
>
</el-table-column>
<el-table-column
label=
"产品名称"
width=
"120"
align=
"center"
prop=
"itemName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"工艺路线名称"
align=
"center"
prop=
"routeName"
>
</el-table-column>
<el-table-column
label=
"简称"
align=
"center"
prop=
"abbreviation"
>
</el-table-column>
<el-table-column
label=
"样品英文名称"
width=
"140"
align=
"center"
prop=
"enName"
/>
<el-table-column
label=
"样品数量"
width=
"120"
align=
"center"
prop=
"num"
/>
<el-table-column
label=
"打样形式"
width=
"200"
align=
"center"
prop=
"type"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"分配方式"
align=
"center"
prop=
"modality"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"表面处理"
align=
"center"
prop=
"surfaceTreatment"
/>
<el-table-column
label=
"NG原因"
align=
"center"
prop=
"ngReason"
/>
<el-table-column
label=
"计划完成日期"
align=
"center"
prop=
"plannedFinishDate"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
plannedFinishDate
,
"{y
}
-{m
}
-{d
}
"
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"版面需求时间"
align
=
"center"
prop
=
"plannedLayoutDate"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
plannedLayoutDate
,
"{y
}
-{m
}
-{d
}
"
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"申请单状态"
align
=
"center"
prop
=
"prototypeRequestStatus"
>
<
template
slot
-
scope
=
"scope"
>
<
dict
-
tag
:
options
=
"dict.type.mes_pr_status"
:
value
=
"scope.row.prototypeRequestStatus"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"测试标准"
align
=
"center"
prop
=
"testStandard"
/>
<
el
-
table
-
column
label
=
"备注"
align
=
"center"
prop
=
"remark"
/>
<
el
-
table
-
column
label
=
"操作"
width
=
"200px"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
v
-
if
=
"scope.row.prototypeRequestStatus == '0'"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['mes:pro:prototypeRequest:edit']"
>
修改
<
/el-butto
n
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-circle-check"
v
-
if
=
"scope.row.prototypeRequestStatus == '0'"
@
click
=
"handleFinish(scope.row)"
v
-
hasPermi
=
"['mes:pro:prototypeRequest:update']"
>
通过
<
/el-butto
n
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['mes:pro:prototypeRequest:remove']"
>
删除
<
/el-butto
n
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
v
-
if
=
"scope.row.prototypeRequestStatus == '1'"
@
click
=
"generatea(scope.row)"
v
-
hasPermi
=
"['mes:pro:prototypeRequest:edit']"
>
生成制作单
<
/el-butto
n
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total > 0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<
/div
>
<
/template
>
<
script
>
import
{
listPrototypeRequest
,
getPrototypeRequest
,
delPrototypeRequest
,
addPrototypeRequest
,
updatePrototypeRequest
,
dofinish
,
}
from
"@/api/mes/pro/prototypeRequest"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
import
ClientSelect
from
"@/components/clientSelect/single.vue"
;
import
VendorSelect
from
"@/components/vendorSelect/single.vue"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
export
default
{
name
:
"PrototypeRequest"
,
dicts
:
[
"mes_pr_status"
,
"mes_prototypeRequest_sourcetype"
,
"mes_prototypeRequest_type"
,
],
components
:
{
Treeselect
,
ItemSelect
,
ClientSelect
,
VendorSelect
,
}
,
data
()
{
return
{
//自动生成编码
autoGenFlag
:
false
,
optType
:
undefined
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 显示搜索条件
showSearch
:
true
,
// 非单个禁用
single
:
true
,
// 总条数
total
:
0
,
// 非多个禁用
multiple
:
true
,
// 生产工单表格数据
prototypeRequestList
:
[],
// 生产工单树选项
prototypeRequestOptions
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
itemName
:
null
,
// 可以查简称与英文名
prototypeRequestStatus
:
null
,
}
,
options
:
[
//
{
value
:
null
,
label
:
"全部订单"
}
,
{
value
:
0
,
label
:
"审批中"
}
,
{
value
:
1
,
label
:
"待制作"
}
,
{
value
:
2
,
label
:
"打样中"
}
,
{
value
:
3
,
label
:
"待质检"
}
,
{
value
:
4
,
label
:
"待确认"
}
,
{
value
:
5
,
label
:
"已完成"
}
,
],
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
// prototypeRequestCode: [
//
{
required
:
true
,
message
:
"工单编码不能为空"
,
trigger
:
"blur"
}
// ],
}
,
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
/** 查询生产工单列表 */
getList
()
{
this
.
loading
=
true
;
listPrototypeRequest
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
prototypeRequestList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
prototypeRequestId
:
null
,
prototypeRequestCode
:
null
,
itemId
:
null
,
itemName
:
null
,
routeId
:
null
,
routeName
:
null
,
abbreviation
:
null
,
enName
:
null
,
num
:
null
,
type
:
null
,
modality
:
null
,
surfaceTreatment
:
null
,
ngReason
:
null
,
plannedFinishDate
:
null
,
plannedLayoutDate
:
null
,
prototypeRequestStatus
:
null
,
testStandard
:
null
,
remark
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
}
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
/** 新增按钮操作 */
handleAdd
(
row
)
{
// 跳转到申请单界面
this
.
$router
.
push
(
"/mes/proofing/apply"
);
return
;
// this.reset();
// this.getTreeselect();
// if (row != null && row.prototypeRequestId)
{
// this.form.parentId = row.prototypeRequestId;
// this.form.orderSource = row.orderSource;
// this.form.sourceCode = row.sourceCode;
// this.form.clientId = row.clientId;
// this.form.clientCode = row.clientCode;
// this.form.clientName = row.clientName;
//
}
else
{
// this.form.parentId = 0;
//
}
// this.open = true;
}
,
// 查询明细按钮操作
handleView
(
row
)
{
this
.
reset
();
const
prototypeRequestId
=
row
.
prototypeRequestId
||
this
.
ids
;
this
.
$router
.
push
(
"/mes/proofing/info?prototypeRequestId="
+
prototypeRequestId
);
// getprototypeRequest(prototypeRequestId).then((response) =>
{
// this.form = response.data;
// this.open = true;
// this.title = "查看工单信息";
// this.optType = "view";
//
}
);
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
prototypeRequestId
=
row
.
prototypeRequestId
||
this
.
ids
;
this
.
$router
.
push
(
"/mes/proofing/edit?prototypeRequestId="
+
prototypeRequestId
);
// getPrototypeRequest(prototypeRequestId).then((response) =>
{
// // this.form = response.data;
// // this.open = true;
// // this.title = "修改生产工单";
// // this.optType="edit";
// // 跳转修改
//
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
'是否确认删除编号为"'
+
row
.
prototypeRequestId
+
'"的打样单?'
)
.
then
(
function
()
{
return
delPrototypeRequest
(
row
.
prototypeRequestId
);
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
)
.
catch
(()
=>
{
}
);
}
,
handleSelectProduct
()
{
this
.
$refs
.
itemSelect
.
showFlag
=
true
;
}
,
handleSelectClient
()
{
this
.
$refs
.
clientSelect
.
showFlag
=
true
;
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
"mes/pro/prototypeRequest/export"
,
{
...
this
.
queryParams
,
}
,
`打样申请单_${new Date().getTime()
}
.xlsx`
);
}
,
// 审批
handleFinish
(
row
)
{
row
.
prototypeRequestStatus
=
1
;
this
.
$modal
.
confirm
(
"确认通过样品申请单?一旦完成,此工单将无法继续修改"
)
.
then
(
function
()
{
return
dofinish
(
row
);
//完成申请单审批
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"审批成功"
);
}
)
.
catch
(()
=>
{
}
);
}
,
// 生成制作单
generatea
(
row
)
{
// 跳转到制作单界面
const
prototypeRequestId
=
row
.
prototypeRequestId
||
this
.
ids
;
this
.
$router
.
push
(
"/mes/pro/prototypeMake/apply?prototypeRequestId="
+
prototypeRequestId
);
return
;
}
,
}
,
}
;
<
/script
>
src/views/mes/pro/productionSolution/proofingInfo.vue
0 → 100644
View file @
05554c08
<
template
>
<div
class=
"form-page"
v-loading=
"loading"
>
<PageTitle>
{{
pageTitle
}}
<!-- 申请按钮显示 -->
<template
slot=
"buttons"
v-if=
"mode == 'apply'"
>
<el-button
size=
"mini"
@
click=
"resetForm"
>
重置
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"saveForm"
>
提交
</el-button>
</
template
>
<!-- 修改 按钮显示 -->
<
template
slot=
"buttons"
v-if=
"mode == 'edit'"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"saveForm"
>
提交
</el-button>
</
template
>
</PageTitle>
<PageWrapper>
<el-form
:model=
"form"
ref=
"form"
size=
"small"
:inline=
"true"
label-width=
"8em"
>
<el-row>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"申请单编码"
prop=
"prototypeRequestCode"
>
<el-input
disabled
v-model=
"form.prototypeRequestCode"
placeholder=
"自动生成"
></el-input>
</el-form-item>
</el-col>
<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-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-col
:md=
"8"
:xs=
"12"
style=
"height: 50.5px"
>
<el-form-item
label=
"工艺路线"
prop=
"routeId"
>
<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
v-model=
"form.abbreviation"
placeholder=
"请输入简称"
></el-input>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"样品英文名"
prop=
"enName"
>
<el-input
v-model=
"form.enName"
placeholder=
"请输入样品英文名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"样品数量"
prop=
"num"
>
<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"
>
<el-form-item
label=
"打样形式"
prop=
"type"
>
<el-input
v-model=
"form.type"
placeholder=
"请选择打样形式"
></el-input>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"分配方式"
prop=
"modality"
>
<el-input
v-model=
"form.modality"
placeholder=
"请选择分配方式"
></el-input>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"表面处理"
prop=
"surfaceTreatment"
>
<el-input
v-model=
"form.surfaceTreatment"
placeholder=
"请输入表面处理"
></el-input>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"NG原因"
prop=
"ngReason"
>
<el-input
v-model=
"form.ngReason"
placeholder=
"请输入NG原因"
></el-input>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"计划完成日期"
prop=
"plannedFinishDate"
>
<el-date-picker
value-format=
"yyyy-MM-dd"
v-model=
"form.plannedFinishDate"
placeholder=
"请输入计划完成日期"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"版面需求时间"
prop=
"plannedLayoutDate"
>
<el-date-picker
value-format=
"yyyy-MM-dd"
v-model=
"form.plannedLayoutDate"
placeholder=
"请输入版面需求时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:md=
"8"
:xs=
"12"
>
<el-form-item
label=
"测试标准"
prop=
"testStandard"
>
<el-input
v-model=
"form.testStandard"
placeholder=
"测试标准"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:md=
"24"
:xs=
"12"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"form.remark"
placeholder=
"备注"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<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"
:bomList=
"bomList"
/>
</el-tab-pane>
</el-tabs>
</PageWrapper>
</div>
</template>
<
script
>
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
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
tabPlugins
from
"@/plugins/tab"
;
import
{
addPrototypeRequest
,
getPrototypeRequest
,
updatePrototypeRequest
,
}
from
"@/api/mes/pro/prototypeRequest"
;
export
default
{
components
:
{
ProogingBom
,
ProogingProcess
,
ItemSelect
,
RoutesProcessSelect
},
dicts
:
[],
provide
()
{
return
{
mode
:
this
.
mode
,
};
},
data
()
{
return
{
loading
:
false
,
bomList
:
[],
// 表单参数
form
:
{
prototypeRequestCode
:
""
,
itemId
:
""
,
itemName
:
""
,
unit
:
""
,
routeId
:
""
,
routeName
:
""
,
abbreviation
:
""
,
enName
:
""
,
num
:
""
,
type
:
""
,
modality
:
""
,
surfaceTreatment
:
""
,
ngReason
:
""
,
plannedFinishDate
:
""
,
plannedLayoutDate
:
""
,
testStandard
:
""
,
remark
:
""
,
},
rules
:
{},
};
},
computed
:
{
scrollHeight
()
{
return
"calc(100vh - 73px - 83px)"
;
},
mode
()
{
return
this
.
$route
.
path
.
split
(
"/"
).
at
(
-
1
);
},
pageTitle
()
{
const
titles
=
{
edit
:
"打样单修改"
,
info
:
"打样单查看"
,
apply
:
"打样单申请"
,
};
return
titles
[
this
.
mode
];
},
},
created
()
{
this
.
getFormInfo
();
if
(
this
.
mode
==
"apply"
)
{
this
.
gCode
();
}
},
methods
:
{
/** 根据 id 获取页面数据 */
getFormInfo
()
{
if
(
this
.
mode
!=
"apply"
)
{
const
id
=
this
.
$route
.
query
.
prototypeRequestId
;
this
.
loading
=
true
;
getPrototypeRequest
(
id
)
.
then
(({
data
})
=>
{
Object
.
assign
(
this
.
form
,
data
);
this
.
bomList
=
data
.
bomList
;
// 设置组件数据
this
.
$refs
[
"ProogingBomRef"
].
tableData
=
data
.
bomList
;
this
.
$refs
[
"ProogingProcessRef"
].
tableData
=
data
.
processList
;
})
.
finally
(()
=>
{
this
.
loading
=
false
;
});
}
},
/** 生成编码 */
gCode
()
{
genCode
(
"PROTOTYPE_REQUEST_CODE"
).
then
((
response
)
=>
{
this
.
form
.
prototypeRequestCode
=
response
;
});
},
/** 点击tab 获取bom的数据,将参数传递给后面的组件 */
tabClick
(
val
)
{
if
(
val
.
index
!=
0
)
{
this
.
bomList
=
this
.
$refs
[
"ProogingBomRef"
].
getComData
();
}
},
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
bomList
=
this
.
$refs
.
ProogingBomRef
.
getComData
();
const
processList
=
this
.
$refs
.
ProogingProcessRef
.
getComData
();
const
params
=
{
...
this
.
form
,
bomList
,
processList
,
};
this
.
loading
=
true
;
if
(
this
.
mode
==
"apply"
)
{
addPrototypeRequest
(
params
)
.
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
$modal
.
msgSuccess
(
"提交成功!"
);
// 关闭页签
tabPlugins
.
closeOpenPage
();
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
}
else
{
updatePrototypeRequest
(
params
)
.
then
(()
=>
{
this
.
loading
=
false
;
this
.
$modal
.
msgSuccess
(
"提交成功!"
);
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
}
},
/**重置表单 */
resetForm
()
{
this
.
form
=
{
prototypeRequestCode
:
""
,
itemId
:
""
,
itemName
:
""
,
routeId
:
""
,
abbreviation
:
""
,
enName
:
""
,
num
:
""
,
type
:
""
,
modality
:
""
,
surfaceTreatment
:
""
,
ngReason
:
""
,
plannedFinishDate
:
""
,
plannedLayoutDate
:
""
,
testStandard
:
""
,
remark
:
""
,
};
this
.
$refs
[
"ProogingBomRef"
].
resetState
();
this
.
$refs
[
"ProogingProcessRef"
].
resetState
();
this
.
gCode
();
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/views/mes/pro/productionSolution/routebominfo.vue
0 → 100644
View file @
05554c08
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"产品物料编码"
prop=
"itemCode"
>
<el-input
v-model=
"queryParams.itemCode"
placeholder=
"请输入产品物料编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"产品物料名称"
prop=
"itemName"
>
<el-input
v-model=
"queryParams.itemName"
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"
v-if=
"optType !='view'"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['mes:pro:proroute:add']"
>
新增
</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=
"['mes:pro:proroute: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=
"['mes:pro:proroute:remove']"
>
删除
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"routeprocessList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"物料编码"
align=
"center"
fixed
prop=
"orderNum"
/>
<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-column
label=
"甘特图显示颜色"
align=
"center"
prop=
"colorCode"
>
<
template
slot-scope=
"scope"
>
<el-color-picker
v-model=
"scope.row.colorCode"
disabled
></el-color-picker>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"150px"
v-if=
"optType !='view'"
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=
"['mes:pro:proroute:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['mes:pro:proroute:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改工艺组成对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1100px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"序号"
prop=
"orderNum"
>
<el-input-number
:min=
"1"
v-model=
"form.orderNum"
placeholder=
"请输入序号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"工序"
prop=
"processId"
>
<el-select
v-model=
"form.processId"
placeholder=
"请选择工序"
>
<el-option
v-for=
"item in processOptions"
:key=
"item.processId"
:label=
"item.processName"
:value=
"item.processId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<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>
F-to-S:当前工序结束生产,下一道工序才可开始生产
</div>
<el-select
v-model=
"form.linkType"
placeholder=
"请选择与下一道工序关系"
>
<el-option
v-for=
"dict in dict.type.mes_link_type"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-tooltip>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"甘特图显示颜色"
prop=
"colorCode"
>
<el-color-picker
v-model=
"form.colorCode"
></el-color-picker>
</el-form-item>
</el-col>
<el-col
:span=
"7"
>
<el-input
v-model=
"form.colorCode"
maxlength=
"7"
placeholder=
"请输入颜色编码在左侧选择颜色"
/>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"是否关键工序"
prop=
"keyFlag"
>
<el-tooltip
effect=
"dark"
placement=
"right"
>
<div
slot=
"content"
>
是:整个工单的生产进度将根据当前工序的生产报工数量进行更新
</br>
每个工艺流程只能有一个关键工序
</div>
<el-select
v-model=
"form.keyFlag"
>
<el-option
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-tooltip>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"是否需要质检确认"
prop=
"isCheck"
>
<el-tooltip
effect=
"dark"
placement=
"right"
>
<div
slot=
"content"
>
是:当前工序报工时需要进行质检确认
</br>
质检合格数量作为最终生产数量
</div>
<el-select
v-model=
"form.isCheck"
>
<el-option
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"准备时间"
prop=
"defaultPreTime"
>
<el-tooltip
effect=
"dark"
content=
"当前系统支持的最小时间粒度为1小时"
placement=
"right"
>
<el-input-number
:min=
"0"
:step=
"1"
v-model=
"form.defaultPreTime"
placeholder=
"请输入准备时间"
/>
</el-tooltip>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"等待时间"
prop=
"defaultSufTime"
>
<el-input-number
:min=
"0"
:step=
"1"
v-model=
"form.defaultSufTime"
placeholder=
"请输入等待时间"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"cancel"
v-if=
"optType =='view'"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
v-else
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listRouteprocess
,
getRouteprocess
,
delRouteprocess
,
addRouteprocess
,
updateRouteprocess
}
from
"@/api/mes/pro/routeprocess"
;
import
{
listAllProcess
}
from
"@/api/mes/pro/process"
;
export
default
{
name
:
"Routeprocess"
,
dicts
:
[
'mes_link_type'
,
'sys_yes_no'
],
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 工艺组成表格数据
routeprocessList
:
[],
//工序选项
processOptions
:[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
routeId
:
this
.
routeId
,
processId
:
null
,
processCode
:
null
,
processName
:
null
,
orderNum
:
null
,
nextProcessId
:
null
,
nextProcessCode
:
null
,
nextProcessName
:
null
,
linkType
:
null
,
defaultPreTime
:
null
,
defaultSufTime
:
null
,
colorCode
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
routeId
:
[
{
required
:
true
,
message
:
"工艺路线ID不能为空"
,
trigger
:
"blur"
}
],
processId
:
[
{
required
:
true
,
message
:
"工序ID不能为空"
,
trigger
:
"blur"
}
],
nextProcessId
:
[
{
required
:
true
,
message
:
"工序ID不能为空"
,
trigger
:
"blur"
}
],
keyFlag
:
[
{
required
:
true
,
message
:
"请指定当前工序是否关键工序"
,
trigger
:
"blur"
}
],
isCheck
:
[
{
required
:
true
,
message
:
"请指定当前工序是否需要质检确认"
,
trigger
:
"blur"
}
]
}
};
},
props
:{
routeId
:
undefined
,
optType
:
undefined
},
created
()
{
this
.
getList
();
this
.
getProcess
();
},
methods
:
{
/** 查询工艺组成列表 */
getList
()
{
this
.
loading
=
true
;
listRouteprocess
(
this
.
queryParams
).
then
(
response
=>
{
this
.
routeprocessList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
//查询工序信息
getProcess
(){
listAllProcess
().
then
(
response
=>
{
this
.
processOptions
=
response
.
data
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
recordId
:
null
,
routeId
:
this
.
routeId
,
processId
:
null
,
processCode
:
null
,
processName
:
null
,
isCheck
:
'N'
,
orderNum
:
1
,
nextProcessId
:
null
,
nextProcessCode
:
null
,
nextProcessName
:
null
,
linkType
:
null
,
defaultPreTime
:
0
,
defaultSufTime
:
0
,
colorCode
:
'#00AEF3'
,
remark
:
null
,
attr1
:
null
,
attr2
:
null
,
attr3
:
null
,
attr4
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
recordId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加工艺组成"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
recordId
=
row
.
recordId
||
this
.
ids
getRouteprocess
(
recordId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改工艺组成"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
recordId
!=
null
)
{
updateRouteprocess
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addRouteprocess
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
recordIds
=
row
.
recordId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除工艺组成编号为"'
+
recordIds
+
'"的数据项?'
).
then
(
function
()
{
return
delRouteprocess
(
recordIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'mes/pro/routeprocess/export'
,
{
...
this
.
queryParams
},
`routeprocess_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
};
</
script
>
src/views/mes/pro/productionSolution/routeprocess.vue
0 → 100644
View file @
05554c08
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"工艺路线"
prop=
"itemCode"
>
<el-input
v-model=
"queryParams.itemCode"
placeholder=
"请输入产品工艺路线"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"描述"
prop=
"itemName"
>
<el-input
v-model=
"queryParams.itemName"
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"
v-if=
"optType !='view'"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['mes:pro:proroute:add']"
>
新增
</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=
"['mes:pro:proroute: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=
"['mes:pro:proroute:remove']"
>
删除
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"routeprocessList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
fixed
prop=
"orderNum"
/>
<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-column
label=
"甘特图显示颜色"
align=
"center"
prop=
"colorCode"
>
<
template
slot-scope=
"scope"
>
<el-color-picker
v-model=
"scope.row.colorCode"
disabled
></el-color-picker>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"150px"
v-if=
"optType !='view'"
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=
"['mes:pro:proroute:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['mes:pro:proroute:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改工艺组成对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1100px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"序号"
prop=
"orderNum"
>
<el-input-number
:min=
"1"
v-model=
"form.orderNum"
placeholder=
"请输入序号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"工序"
prop=
"processId"
>
<el-select
v-model=
"form.processId"
placeholder=
"请选择工序"
>
<el-option
v-for=
"item in processOptions"
:key=
"item.processId"
:label=
"item.processName"
:value=
"item.processId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<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>
F-to-S:当前工序结束生产,下一道工序才可开始生产
</div>
<el-select
v-model=
"form.linkType"
placeholder=
"请选择与下一道工序关系"
>
<el-option
v-for=
"dict in dict.type.mes_link_type"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-tooltip>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"甘特图显示颜色"
prop=
"colorCode"
>
<el-color-picker
v-model=
"form.colorCode"
></el-color-picker>
</el-form-item>
</el-col>
<el-col
:span=
"7"
>
<el-input
v-model=
"form.colorCode"
maxlength=
"7"
placeholder=
"请输入颜色编码在左侧选择颜色"
/>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"是否关键工序"
prop=
"keyFlag"
>
<el-tooltip
effect=
"dark"
placement=
"right"
>
<div
slot=
"content"
>
是:整个工单的生产进度将根据当前工序的生产报工数量进行更新
</br>
每个工艺流程只能有一个关键工序
</div>
<el-select
v-model=
"form.keyFlag"
>
<el-option
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-tooltip>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"是否需要质检确认"
prop=
"isCheck"
>
<el-tooltip
effect=
"dark"
placement=
"right"
>
<div
slot=
"content"
>
是:当前工序报工时需要进行质检确认
</br>
质检合格数量作为最终生产数量
</div>
<el-select
v-model=
"form.isCheck"
>
<el-option
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"准备时间"
prop=
"defaultPreTime"
>
<el-tooltip
effect=
"dark"
content=
"当前系统支持的最小时间粒度为1小时"
placement=
"right"
>
<el-input-number
:min=
"0"
:step=
"1"
v-model=
"form.defaultPreTime"
placeholder=
"请输入准备时间"
/>
</el-tooltip>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"等待时间"
prop=
"defaultSufTime"
>
<el-input-number
:min=
"0"
:step=
"1"
v-model=
"form.defaultSufTime"
placeholder=
"请输入等待时间"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"cancel"
v-if=
"optType =='view'"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
v-else
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listRouteprocess
,
getRouteprocess
,
delRouteprocess
,
addRouteprocess
,
updateRouteprocess
}
from
"@/api/mes/pro/routeprocess"
;
import
{
listAllProcess
}
from
"@/api/mes/pro/process"
;
export
default
{
name
:
"Routeprocess"
,
dicts
:
[
'mes_link_type'
,
'sys_yes_no'
],
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 工艺组成表格数据
routeprocessList
:
[],
//工序选项
processOptions
:[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
routeId
:
this
.
routeId
,
processId
:
null
,
processCode
:
null
,
processName
:
null
,
orderNum
:
null
,
nextProcessId
:
null
,
nextProcessCode
:
null
,
nextProcessName
:
null
,
linkType
:
null
,
defaultPreTime
:
null
,
defaultSufTime
:
null
,
colorCode
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
routeId
:
[
{
required
:
true
,
message
:
"工艺路线ID不能为空"
,
trigger
:
"blur"
}
],
processId
:
[
{
required
:
true
,
message
:
"工序ID不能为空"
,
trigger
:
"blur"
}
],
nextProcessId
:
[
{
required
:
true
,
message
:
"工序ID不能为空"
,
trigger
:
"blur"
}
],
keyFlag
:
[
{
required
:
true
,
message
:
"请指定当前工序是否关键工序"
,
trigger
:
"blur"
}
],
isCheck
:
[
{
required
:
true
,
message
:
"请指定当前工序是否需要质检确认"
,
trigger
:
"blur"
}
]
}
};
},
props
:{
routeId
:
undefined
,
optType
:
undefined
},
created
()
{
this
.
getList
();
this
.
getProcess
();
},
methods
:
{
/** 查询工艺组成列表 */
getList
()
{
this
.
loading
=
true
;
listRouteprocess
(
this
.
queryParams
).
then
(
response
=>
{
this
.
routeprocessList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
//查询工序信息
getProcess
(){
listAllProcess
().
then
(
response
=>
{
this
.
processOptions
=
response
.
data
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
recordId
:
null
,
routeId
:
this
.
routeId
,
processId
:
null
,
processCode
:
null
,
processName
:
null
,
isCheck
:
'N'
,
orderNum
:
1
,
nextProcessId
:
null
,
nextProcessCode
:
null
,
nextProcessName
:
null
,
linkType
:
null
,
defaultPreTime
:
0
,
defaultSufTime
:
0
,
colorCode
:
'#00AEF3'
,
remark
:
null
,
attr1
:
null
,
attr2
:
null
,
attr3
:
null
,
attr4
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
recordId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加工艺组成"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
recordId
=
row
.
recordId
||
this
.
ids
getRouteprocess
(
recordId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改工艺组成"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
recordId
!=
null
)
{
updateRouteprocess
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addRouteprocess
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
recordIds
=
row
.
recordId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除工艺组成编号为"'
+
recordIds
+
'"的数据项?'
).
then
(
function
()
{
return
delRouteprocess
(
recordIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'mes/pro/routeprocess/export'
,
{
...
this
.
queryParams
},
`routeprocess_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
};
</
script
>
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