parent
0466382569
commit
54daedb764
10 changed files with 548 additions and 58 deletions
@ -0,0 +1,326 @@ |
|||||||
|
<template> |
||||||
|
<div> |
||||||
|
<avue-crud |
||||||
|
:option="option" |
||||||
|
:table-loading="loading" |
||||||
|
:data="data" |
||||||
|
v-model="form" |
||||||
|
v-model:page="page" |
||||||
|
ref="crud" |
||||||
|
@row-del="rowDel" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@selection-change="selectionChange" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
@on-load="onLoad" |
||||||
|
> |
||||||
|
<template #menu-left> |
||||||
|
<el-button type="primary" @click="handleFn">处理</el-button> |
||||||
|
</template> |
||||||
|
<template #menu-right> </template> |
||||||
|
<template #menu="{ row }"> </template> |
||||||
|
|
||||||
|
<template #heatTreat="scope"> </template> |
||||||
|
</avue-crud> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { |
||||||
|
queryUnfinished, |
||||||
|
markComplete, |
||||||
|
} from '@/api/productionManagement/workReportingManagement.js'; |
||||||
|
export default { |
||||||
|
components: {}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
form: {}, |
||||||
|
selectionList: [], |
||||||
|
query: {}, |
||||||
|
loading: false, |
||||||
|
page: { |
||||||
|
pageSize: 10, |
||||||
|
currentPage: 1, |
||||||
|
total: 0, |
||||||
|
}, |
||||||
|
option: { |
||||||
|
columnSort: true, |
||||||
|
tip: false, |
||||||
|
height: 'auto', |
||||||
|
align: 'center', |
||||||
|
calcHeight: 32, |
||||||
|
simplePage: false, |
||||||
|
searchShow: true, |
||||||
|
searchMenuSpan: 6, |
||||||
|
searchIcon: true, |
||||||
|
searchIndex: 3, |
||||||
|
tree: false, |
||||||
|
border: true, |
||||||
|
index: false, |
||||||
|
selection: true, |
||||||
|
viewBtn: false, |
||||||
|
delBtn: false, |
||||||
|
editBtn: false, |
||||||
|
addBtnIcon: ' ', |
||||||
|
viewBtnIcon: ' ', |
||||||
|
delBtnIcon: ' ', |
||||||
|
editBtnIcon: ' ', |
||||||
|
addBtn: false, |
||||||
|
labelWidth: 120, |
||||||
|
searchLabelWidth: 'auto', |
||||||
|
menu: true, |
||||||
|
menuWidth: 200, |
||||||
|
dialogWidth: 600, |
||||||
|
dialogClickModal: false, |
||||||
|
searchEnter: true, |
||||||
|
excelBtn: true, |
||||||
|
gridBtn: false, |
||||||
|
searchShowBtn: false, |
||||||
|
showOverflowTooltip: true, |
||||||
|
searchLabelPosition: 'left', |
||||||
|
searchGutter: 24, |
||||||
|
searchSpan: 6, |
||||||
|
menuAlign: 'left', |
||||||
|
gridBtn: false, |
||||||
|
searchMenuPosition: 'right', |
||||||
|
menu: false, |
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: '车间订单号', |
||||||
|
prop: 'woCode', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: true, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划下达时间', |
||||||
|
prop: 'cardNo', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: false, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: true, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件名称', |
||||||
|
prop: 'partCode', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: true, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '批次号', |
||||||
|
prop: 'batchNo', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: true, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '流程卡号', |
||||||
|
prop: 'batchNo', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: true, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
// { |
||||||
|
// label: '当前工序', |
||||||
|
// prop: 'ppsName', |
||||||
|
// span: 24, |
||||||
|
// overflow: true, |
||||||
|
// search: false, |
||||||
|
// }, |
||||||
|
{ |
||||||
|
label: '生产数量', |
||||||
|
prop: 'workQty', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: false, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '额定镀层', |
||||||
|
prop: 'workQty', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: false, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '旧班组', |
||||||
|
prop: 'oriMakeTeam', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: false, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '新班组', |
||||||
|
prop: 'makeTeam', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: false, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '创建时间', |
||||||
|
prop: 'updateTime', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: false, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '创建人', |
||||||
|
prop: 'adjustName', |
||||||
|
span: 24, |
||||||
|
overflow: true, |
||||||
|
search: false, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
data: [], |
||||||
|
}; |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
// 处理 |
||||||
|
handleFn() { |
||||||
|
// if (this.selectionList.length <= 0) { |
||||||
|
// return this.$message.warning('请选择需要处理的数据!'); |
||||||
|
// } |
||||||
|
const woaIdList = this.selectionList.map(item => item.id); |
||||||
|
// const woaIdList = this.$refs.myTable.selection().id; |
||||||
|
if (woaIdList.length === 0) { |
||||||
|
return this.$message.warning('请选择数据'); |
||||||
|
} |
||||||
|
|
||||||
|
this.$confirm('请确认此操作!', '确认消息', { |
||||||
|
confirmButtonText: '确认', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}).then(() => { |
||||||
|
markComplete({ |
||||||
|
woaIdList, |
||||||
|
}).then(() => { |
||||||
|
this.$message.success('操作成功'); |
||||||
|
this.refreshChange(); |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
rowSave(row, done, loading) { |
||||||
|
// addPersonAbility(row).then( |
||||||
|
// () => { |
||||||
|
// this.onLoad(this.page); |
||||||
|
// this.$message({ |
||||||
|
// type: 'success', |
||||||
|
// message: '操作成功!', |
||||||
|
// }); |
||||||
|
// done(); |
||||||
|
// }, |
||||||
|
// error => { |
||||||
|
// window.console.log(error); |
||||||
|
// loading(); |
||||||
|
// } |
||||||
|
// ); |
||||||
|
}, |
||||||
|
rowUpdate(row, index, done, loading) { |
||||||
|
// updatePersonAbility(row).then( |
||||||
|
// () => { |
||||||
|
// this.onLoad(this.page); |
||||||
|
// this.$message({ |
||||||
|
// type: 'success', |
||||||
|
// message: '操作成功!', |
||||||
|
// }); |
||||||
|
// done(); |
||||||
|
// }, |
||||||
|
// error => { |
||||||
|
// window.console.log(error); |
||||||
|
// loading(); |
||||||
|
// } |
||||||
|
// ); |
||||||
|
}, |
||||||
|
rowDel(row) { |
||||||
|
this.$confirm('确定将选择数据删除?', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
// return removePersonAbility(row.id); |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
this.onLoad(this.page); |
||||||
|
this.$message({ |
||||||
|
type: 'success', |
||||||
|
message: '操作成功!', |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
searchReset() { |
||||||
|
this.query = {}; |
||||||
|
this.onLoad(this.page); |
||||||
|
}, |
||||||
|
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(); |
||||||
|
}, |
||||||
|
|
||||||
|
currentChange(currentPage) { |
||||||
|
this.page.currentPage = currentPage; |
||||||
|
}, |
||||||
|
sizeChange(pageSize) { |
||||||
|
this.page.pageSize = pageSize; |
||||||
|
}, |
||||||
|
refreshChange() { |
||||||
|
this.onLoad(this.page, this.query); |
||||||
|
}, |
||||||
|
handleChange(file, fileList) { |
||||||
|
// proxy.$Export.xlsx(file.raw).then((data) => { |
||||||
|
// data.value = data.results; |
||||||
|
// }); |
||||||
|
this.$message({ |
||||||
|
type: 'success', |
||||||
|
message: '操作成功!', |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
onLoad(page, params = {}) { |
||||||
|
this.loading = true; |
||||||
|
queryUnfinished(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(); |
||||||
|
} |
||||||
|
); |
||||||
|
}, |
||||||
|
}, |
||||||
|
mounted() {}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
d |
||||||
Loading…
Reference in new issue