parent
1bbfc5f5f1
commit
454613a321
4 changed files with 273 additions and 4 deletions
@ -0,0 +1,241 @@ |
||||
<template> |
||||
<el-dialog title="详情" append-to-body :modelValue="openShow" width="60%" @close="closeDialog"> |
||||
<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" |
||||
> |
||||
<template #menu-left> </template> |
||||
<template #menu-right> </template> |
||||
<template #menu="{ row }"> </template> |
||||
|
||||
<template #actualWeighing="scope"> |
||||
{{ scope.row.actualWeighing<0?'0g' : scope.row.actualWeighing+'g' }} |
||||
</template> |
||||
</avue-crud> |
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
// import { updateProcess } from '../../api/flowManagement/index'; |
||||
import { getQuantityLocation } from '@/api/logisticsManagement/materialPacking'; |
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
rowData: { |
||||
type: Object, |
||||
default: () => {}, |
||||
}, |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow: false, |
||||
option: { |
||||
columnSort: true, |
||||
tip: false, |
||||
calcHeight: 32, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
searchIcon: true, |
||||
searchIndex: 3, |
||||
tree: false, |
||||
border: true, |
||||
index: true, |
||||
selection: false, |
||||
addBtn: false, |
||||
editBtn: false, |
||||
viewBtn: false, |
||||
delBtn: false, |
||||
editBtnText: '修改', |
||||
labelWidth: 120, |
||||
menuWidth: 80, |
||||
dialogWidth: 900, |
||||
dialogClickModal: false, |
||||
searchEnter: true, |
||||
excelBtn: false, |
||||
filterBtn: true, |
||||
searchShowBtn: false, |
||||
excelBtn: true, |
||||
showOverflowTooltip: true, |
||||
addBtnIcon: ' ', |
||||
viewBtnIcon: ' ', |
||||
delBtnIcon: ' ', |
||||
editBtnIcon: ' ', |
||||
gridBtn: false, |
||||
searchLabelPosition: 'left', |
||||
searchGutter: 24, |
||||
searchSpan: 6, |
||||
menuAlign: 'left', |
||||
gridBtn: false, |
||||
searchMenuPosition: 'right', |
||||
align: 'center', |
||||
menu: false, |
||||
header: false, |
||||
column: [ |
||||
{ |
||||
label: '流程卡号', |
||||
prop: 'cardNo', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
label: '生产单号', |
||||
prop: 'yoCode', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
label: '零件号', |
||||
prop: 'partCode', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
label: '零件名称', |
||||
prop: 'partName', |
||||
span: 24, |
||||
}, |
||||
{ |
||||
label: '重量', |
||||
prop: 'actualWeighing', |
||||
span: 24, |
||||
}, |
||||
], |
||||
}, |
||||
data: [], |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
console.log(8989898989, this.rowData); |
||||
this.init() |
||||
}, |
||||
methods: { |
||||
init() { |
||||
getQuantityLocation({ boxBarcode: this.rowData.boxBarcode }).then(res => { |
||||
this.data = res.data.data.yieldOrderList; |
||||
}); |
||||
}, |
||||
closeDialog() { |
||||
this.openShow = false; |
||||
this.$emit('closeDialog'); |
||||
}, |
||||
submit() { |
||||
this.closeDialog(); |
||||
}, |
||||
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; |
||||
// 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></style> |
||||
Loading…
Reference in new issue