parent
bd21d71434
commit
e931c9c1e2
1 changed files with 685 additions and 0 deletions
@ -0,0 +1,685 @@ |
||||
<template> |
||||
<basic-container> |
||||
<!-- 热表生产监控 --> |
||||
<avue-crud |
||||
:option="option" |
||||
:table-loading="loading" |
||||
:data="data" |
||||
v-model="form" |
||||
v-model:page="page" |
||||
ref="crud" |
||||
@search-change="searchChange" |
||||
@search-reset="searchReset" |
||||
@selection-change="selectionChange" |
||||
@current-change="currentChange" |
||||
@size-change="sizeChange" |
||||
@refresh-change="refreshChange" |
||||
@on-load="onLoad" |
||||
> |
||||
<template #menu-left> |
||||
|
||||
</template> |
||||
|
||||
<template #menu-right> |
||||
|
||||
</template> |
||||
|
||||
<template #menu="scope"> |
||||
<el-button type="text" @click="clickProduction(scope.row)">生产监控</el-button> |
||||
|
||||
</template> |
||||
|
||||
|
||||
</avue-crud> |
||||
<!-- 生产监控 --> |
||||
<workRate |
||||
v-if="isWorkRateOpen" |
||||
:showDialog="isWorkRateOpen" |
||||
@closeDialog="closeDialog" |
||||
:rowItem="rowItem" |
||||
></workRate> |
||||
</basic-container> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import workRate from '@/views/workRate/index.vue'; |
||||
import { getList, turnType } from '@/api/productionManagement/productionMonitoring'; |
||||
|
||||
export default { |
||||
components: { |
||||
|
||||
workRate, |
||||
}, |
||||
data() { |
||||
return { |
||||
isWorkRateOpen: false, |
||||
isPriorityOpen: false, |
||||
showAbnormal: false, |
||||
showOemDialog: false, |
||||
showBatches: false, |
||||
showClose: false, |
||||
data: [], |
||||
printForm: {}, |
||||
printRules: { |
||||
quantity: [{ required: true, message: '请输入数量', trigger: 'blur' }], |
||||
}, |
||||
rowItem: {}, |
||||
selectionList: [], |
||||
form: {}, |
||||
loading: false, |
||||
printDialog: false, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
height: 'auto', |
||||
calcHeight: 32, |
||||
rowKey: 'woId', |
||||
tip: false, |
||||
simplePage: true, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
searchIcon: true, |
||||
searchIndex: 3, |
||||
tree: false, |
||||
border: true, |
||||
index: true, |
||||
selection: false, |
||||
viewBtn: false, |
||||
delBtn: false, |
||||
addBtn: false, |
||||
editBtn: false, |
||||
editBtnText: '修改', |
||||
viewBtnText: '详情', |
||||
labelWidth: 120, |
||||
menuWidth: 70, |
||||
dialogWidth: 1200, |
||||
dialogClickModal: false, |
||||
searchEnter: true, |
||||
excelBtn: false, |
||||
filterBtn: true, |
||||
searchShowBtn: false, |
||||
columnSort: true, |
||||
excelBtn: true, |
||||
columnSort: true, |
||||
showOverflowTooltip: true, |
||||
searchLabelPosition: 'left', |
||||
searchGutter: 24, |
||||
searchSpan: 6, |
||||
menuAlign: 'left', |
||||
gridBtn: false, |
||||
searchMenuPosition: 'right', |
||||
align: 'center', |
||||
column: [ |
||||
{ |
||||
label: '主加工单位', |
||||
prop: 'mainTsName', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
fixed: 'left', |
||||
width: 130, |
||||
}, |
||||
|
||||
{ |
||||
label: '当前工序', |
||||
prop: 'ppsName', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '下一工序', |
||||
prop: 'ppsNameNext', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '订单状态', |
||||
prop: 'runStatus', |
||||
type: 'select', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, //order_status |
||||
dicUrl: '/blade-system/dict/dictionary?code=order_status', |
||||
props: { |
||||
label: 'dictValue', |
||||
value: 'dictKey', |
||||
}, |
||||
}, |
||||
{ |
||||
label: '车间订单号', |
||||
prop: 'woCode', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
// searchLabelWidth: 100, |
||||
}, |
||||
{ |
||||
label: '加工单位', |
||||
prop: 'processingUnit', |
||||
search: false, |
||||
sortable: true, |
||||
fixed: 'left', |
||||
overHidden: true, |
||||
hide: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '加工班组', |
||||
prop: 'tsId', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: '加工外协商', |
||||
prop: 'ocId', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
hide: true, |
||||
// searchLabelWidth: 100, |
||||
}, |
||||
{ |
||||
label: '生产订单号', |
||||
prop: 'yoCode', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
// hide: true, |
||||
width: 150, |
||||
// searchLabelWidth: 100, |
||||
}, |
||||
{ |
||||
label: '计划单号', |
||||
prop: 'ypCode', |
||||
search: true, |
||||
sortable: true, |
||||
// hide: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '返工单号', |
||||
prop: 'reworkCode', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '零件号', |
||||
prop: 'partCode', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
searchOrder: 19, |
||||
}, |
||||
{ |
||||
label: '批次号', |
||||
prop: 'batchNo', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
searchOrder: 18, |
||||
}, |
||||
{ |
||||
label: '流程卡号', |
||||
prop: 'cardNo', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
searchOrder: 20, |
||||
}, |
||||
{ |
||||
label: '产品型号', |
||||
prop: 'productType', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '产品名称', |
||||
prop: 'partName', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: 'MES流程卡号', |
||||
prop: 'mesCardNo', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '生产标识', |
||||
prop: 'productIdent', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '镀种信息', |
||||
prop: 'plate', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '生产数量', |
||||
prop: 'makeQty', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '面积(dm²)', |
||||
prop: 'totalArea', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '单批次面积', |
||||
prop: 'area', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '订单优先级', |
||||
prop: 'priorityName', |
||||
type: 'select', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
// searchLabelWidth: 100, |
||||
}, |
||||
{ |
||||
label: '订单优先级', |
||||
prop: 'priority', |
||||
type: 'select', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
// searchLabelWidth: 100, |
||||
hide: true, |
||||
dicUrl: '/blade-system/dict/dictionary?code=orderPriority', |
||||
props: { |
||||
label: 'dictValue', |
||||
value: 'dictKey', |
||||
}, |
||||
}, |
||||
{ |
||||
label: '需求部门', |
||||
prop: 'useDept', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '需求交期', |
||||
prop: 'demandDate', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '会议要求周期', |
||||
prop: 'meetCycle', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '调度员', |
||||
prop: 'dispatcherName', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '协作计划', |
||||
prop: 'collaborateText', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '计划下达时间', |
||||
prop: 'sendDownTime', |
||||
sortable: true, |
||||
filter: true, |
||||
selectWidth: 150, |
||||
searchLabelWidth: 90, |
||||
span: 12, |
||||
search: true, |
||||
width: 150, |
||||
searchSpan: 8, |
||||
type: 'date', |
||||
format: 'YYYY-MM-DD HH:mm:ss', |
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss' |
||||
}, |
||||
{ |
||||
label: '计划完工时间', |
||||
prop: 'planEndDate', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
searchLabelWidth: 100, |
||||
type: 'date', |
||||
format: 'YYYY-MM-DD HH:mm:ss', |
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
width: 150, |
||||
}, |
||||
|
||||
{ |
||||
label: '镀后入库时间', |
||||
prop: 'putStoreTime', |
||||
sortable: true, |
||||
filter: true, |
||||
span: 12, |
||||
search: true, |
||||
searchSpan: 8, |
||||
width: 150, |
||||
searchLabelWidth: 90, |
||||
type: 'date', |
||||
format: 'YYYY-MM-DD HH:mm:ss', |
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
||||
}, |
||||
|
||||
{ |
||||
label: '外协状态', |
||||
prop: 'oemType', |
||||
type: 'select', |
||||
search: false, |
||||
hide: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
|
||||
dicData: [ |
||||
{ |
||||
value: -1, |
||||
label: '场内', |
||||
}, |
||||
{ |
||||
value: 1, |
||||
label: '整单', |
||||
}, |
||||
{ |
||||
value: 2, |
||||
label: '协作', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '生产数量', |
||||
prop: 'productionQuantity', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '入库数量', |
||||
prop: 'inventoryQty', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '试验数量', |
||||
prop: 'testQty', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '报废数量', |
||||
prop: 'scrapQty', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
|
||||
{ |
||||
label: '备注', |
||||
prop: 'memo', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
width: 150, |
||||
}, |
||||
], |
||||
}, |
||||
itemData: [], //存数据 |
||||
}; |
||||
}, |
||||
mounted() {}, |
||||
methods: { |
||||
printCraftCard_new(row) { |
||||
window.open(window.PROCESS_FLOW_CARD_HEAT_METER + '?woId=' + row.woId, '_blank'); |
||||
}, |
||||
// 优先级调整 |
||||
priorityFn(row) { |
||||
this.itemData = [row]; |
||||
this.isPriorityOpen = true; |
||||
}, |
||||
priorityFnBatch() { |
||||
if (this.selectionList.length == 0) { |
||||
return this.$message.error('请先选择数据'); |
||||
} |
||||
this.itemData = this.selectionList; |
||||
this.isPriorityOpen = true; |
||||
}, |
||||
selectionChange(val) { |
||||
this.selectionList = val; |
||||
}, |
||||
// 转外协 |
||||
handleOutsource(row, type) { |
||||
if (type == 'all') { |
||||
if (this.selectionList.length == 0) { |
||||
this.$message.error('请先选择数据'); |
||||
} else { |
||||
this.itemData = this.selectionList; |
||||
this.showOemDialog = true; |
||||
} |
||||
} else { |
||||
this.itemData = [row]; |
||||
this.showOemDialog = true; |
||||
} |
||||
}, |
||||
// 分批 |
||||
handleBatches(row) { |
||||
this.itemData = [row]; |
||||
this.showBatches = true; |
||||
}, |
||||
// 关闭 |
||||
handleClose(row) { |
||||
this.itemData = [row]; |
||||
this.showClose = true; |
||||
}, |
||||
|
||||
// 转烧结 |
||||
handleSintering(row) { |
||||
this.$confirm('确定将此订单转到烧结中心吗?', '是否继续', { |
||||
confirmButtonText: '确认', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}).then(() => { |
||||
let query = { |
||||
yoId: row.yoId, |
||||
yieldType: '12002', |
||||
}; |
||||
turnType(query).then(res => { |
||||
this.$message.success('转烧结成功'); |
||||
this.onLoad(this.page, this.query); |
||||
}); |
||||
}); |
||||
}, |
||||
// 生产监控 |
||||
clickProduction(row) { |
||||
this.rowItem = row; |
||||
this.isWorkRateOpen = true; |
||||
}, |
||||
// 打印标签 |
||||
handlePrintTags() { |
||||
if (this.selectionList.length == 0) { |
||||
this.$message.error('请先选择数据'); |
||||
} else { |
||||
this.printForm = { |
||||
quantity: 1, |
||||
}; |
||||
this.printDialog = true; |
||||
} |
||||
}, |
||||
// 确定打印 |
||||
submitPrint() { |
||||
this.$refs.printForm.validate(valid => { |
||||
if (valid) { |
||||
let ids = this.selectionList.map(item => item.woId); |
||||
window.open( |
||||
window.PROCESS_FLOW_CARD_PRINT + |
||||
'?woId=' + |
||||
ids.join(',') + |
||||
'&num=' + |
||||
this.printForm.quantity |
||||
); |
||||
this.printDialog = false; |
||||
} |
||||
}); |
||||
}, |
||||
// 打印 |
||||
handlePrint() { |
||||
if (this.selectionList.length == 0) { |
||||
this.$message.error('请先选择数据'); |
||||
} else { |
||||
} |
||||
}, |
||||
//查询【生产中3、工艺变更5、检验中4、审理中6】状态的订单 |
||||
queryOrdersHandle(status) { |
||||
this.query = { |
||||
runStatus: status, |
||||
}; |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
|
||||
// 异常申报 |
||||
handleAbnormal(row) { |
||||
this.itemData = [row]; |
||||
this.showAbnormal = true; |
||||
}, |
||||
// 关闭弹窗 |
||||
closeDialog(type) { |
||||
this.showOemDialog = false; |
||||
this.isWorkRateOpen = false; |
||||
this.showBatches = false; |
||||
this.showClose = false; |
||||
this.showAbnormal = false; |
||||
this.isPriorityOpen = false; |
||||
// if (type) { |
||||
this.onLoad(this.page, this.query); |
||||
// } |
||||
}, |
||||
currentChange(currentPage) { |
||||
this.page.currentPage = currentPage; |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
refreshChange() { |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
searchReset() { |
||||
this.query = {}; |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
searchChange(params, done) { |
||||
this.query = params; |
||||
this.page.currentPage = 1; |
||||
this.onLoad(this.page, params); |
||||
done(); |
||||
}, |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
selectionClear() { |
||||
this.selectionList = []; |
||||
this.$refs.crud.toggleSelection(); |
||||
}, |
||||
onLoad(page, params = {}) { |
||||
this.loading = true; |
||||
getList( |
||||
page.currentPage, |
||||
page.pageSize, |
||||
Object.assign(params, this.query) |
||||
).then(res => { |
||||
this.data = res.data.data.records; |
||||
this.loading = false; |
||||
this.page.total = res.data.data.total; |
||||
this.selectionClear(); |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
:deep(.el-dropdown-link) { |
||||
cursor: pointer; |
||||
color: var(--el-color-primary); |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 12px; // 与 el-button type="text" 字体一致 |
||||
|
||||
&:hover { |
||||
color: var(--el-color-primary-light-3); |
||||
} |
||||
} |
||||
|
||||
:deep(.el-dropdown-menu__item) { |
||||
font-size: 12px; // 下拉项字体与按钮一致 |
||||
padding: 8px 16px; |
||||
|
||||
&:hover { |
||||
background-color: var(--el-fill-color-light); |
||||
} |
||||
} |
||||
</style> |
||||
Loading…
Reference in new issue