You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
360 lines
9.2 KiB
360 lines
9.2 KiB
<template> |
|
<basic-container> |
|
<!-- 添加量填报 --> |
|
<avue-crud |
|
:option="option" |
|
:table-loading="loading" |
|
:data="data" |
|
v-model="form" |
|
v-model:page="page" |
|
ref="crud" |
|
@row-update="rowUpdate" |
|
@row-del="rowDel" |
|
@row-save="rowSave" |
|
@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="handleAdd">新增</el-button> |
|
</template> |
|
|
|
<template #menu="scope"> </template> |
|
</avue-crud> |
|
|
|
<!-- 新增 --> |
|
<addQuantityDialog |
|
v-if="showDialog" |
|
:showDialog="showDialog" |
|
@closeDialog="closeDialog" |
|
:moldAddMore="moldAddMore" |
|
></addQuantityDialog> |
|
</basic-container> |
|
</template> |
|
|
|
<script> |
|
import { getList, add, remove, update } from '@/api/processManagement/addQuantity.js'; |
|
|
|
import addQuantityDialog from './components/addQuantityDialog.vue'; |
|
|
|
export default { |
|
components: { addQuantityDialog }, |
|
data() { |
|
return { |
|
moldAddMore:false, |
|
query: {}, |
|
loading: false, |
|
title: '新增', |
|
tableData: [], |
|
showDialog: false, |
|
data: [], |
|
form: {}, |
|
page: { |
|
pageSize: 10, |
|
currentPage: 1, |
|
total: 0, |
|
}, |
|
wcData: [ |
|
{ |
|
area: 13000.0, |
|
batchNo: null, |
|
bigBatch: false, |
|
checkout: false, |
|
craftAbility: '化学镀镍', |
|
createTime: '2023-02-06 12:31:36', |
|
deleted: false, |
|
describe: null, |
|
endPoint: null, |
|
keyValue: 81, |
|
limitType: 0, |
|
processes: '上挂、下挂、交检、化学镀镍、喷砂', |
|
quantity: null, |
|
roundCycle: null, |
|
saturation: 85.0, |
|
sign: '4', |
|
startPoint: null, |
|
team: '化学镀镍一班崔胜伟、化学镀镍一班郭家梁', |
|
updateTime: '2023-03-06 18:42:47', |
|
wcCode: '001', |
|
wcId: 81, |
|
wcName: '化学镀镍作业中心', |
|
whetherPlate: false, |
|
}, |
|
{ |
|
area: 0.0, |
|
batchNo: null, |
|
bigBatch: false, |
|
checkout: false, |
|
craftAbility: '镀后接收', |
|
createTime: '2023-02-06 12:48:41', |
|
deleted: false, |
|
describe: null, |
|
endPoint: null, |
|
keyValue: 85, |
|
limitType: 0, |
|
processes: '镀后接收', |
|
quantity: null, |
|
roundCycle: null, |
|
saturation: null, |
|
sign: '4', |
|
startPoint: null, |
|
team: '零件管理班', |
|
updateTime: '2023-03-06 18:23:20', |
|
wcCode: '004', |
|
wcId: 85, |
|
wcName: '镀后库作业中心', |
|
whetherPlate: true, |
|
}, |
|
{ |
|
area: 0.0, |
|
batchNo: null, |
|
bigBatch: false, |
|
checkout: true, |
|
craftAbility: '镀后检验', |
|
createTime: '2023-02-06 12:49:33', |
|
deleted: false, |
|
describe: null, |
|
endPoint: null, |
|
keyValue: 86, |
|
limitType: 0, |
|
processes: '镀后检验、性能检测、镀后自检外观检验、镀后自检尺寸检验', |
|
quantity: null, |
|
roundCycle: null, |
|
saturation: null, |
|
sign: '4', |
|
startPoint: null, |
|
team: '检验班', |
|
updateTime: '2023-06-06 15:07:27', |
|
wcCode: '005', |
|
wcId: 86, |
|
wcName: '检验作业中心', |
|
whetherPlate: false, |
|
}, |
|
{ |
|
area: 20000.0, |
|
batchNo: null, |
|
bigBatch: false, |
|
checkout: false, |
|
craftAbility: '涂色标、清洗', |
|
createTime: '2023-02-07 10:30:14', |
|
deleted: false, |
|
describe: null, |
|
endPoint: null, |
|
keyValue: 87, |
|
limitType: 0, |
|
processes: '涂色标、涂色标(带)', |
|
quantity: null, |
|
roundCycle: null, |
|
saturation: 90.0, |
|
sign: '4', |
|
startPoint: null, |
|
team: '涂色标班组', |
|
updateTime: '2023-03-06 18:16:54', |
|
wcCode: '006', |
|
wcId: 87, |
|
wcName: '涂色标作业中心', |
|
whetherPlate: false, |
|
}, |
|
], |
|
option: { |
|
height: 'auto', |
|
calcHeight: 32, |
|
rowKey: 'keyValue', |
|
tip: false, |
|
simplePage: true, |
|
searchShow: true, |
|
searchMenuSpan: 6, |
|
searchIcon: true, |
|
searchIndex: 3, |
|
tree: false, |
|
border: true, |
|
index: true, |
|
selection: false, |
|
viewBtn: false, |
|
delBtn: true, |
|
addBtn: false, |
|
editBtn: true, |
|
editBtnText: '修改', |
|
addBtnIcon: ' ', |
|
viewBtnIcon: ' ', |
|
delBtnIcon: ' ', |
|
editBtnIcon: ' ', |
|
viewBtnText: '详情', |
|
labelWidth: 120, |
|
searchLabelWidth: 120, |
|
menu: true, |
|
menuWidth: 140, |
|
dialogWidth: 1200, |
|
dialogClickModal: false, |
|
searchEnter: true, |
|
excelBtn: false, |
|
filterBtn: true, |
|
searchShowBtn: false, |
|
columnSort: true, |
|
excelBtn: true, |
|
columnSort: true, |
|
showOverflowTooltip: true, |
|
menuAlign: 'left', |
|
gridBtn: false, |
|
searchLabelPosition: 'left', |
|
searchGutter: 24, |
|
searchSpan: 6, |
|
searchMenuPosition: 'right', |
|
align: 'center', |
|
column: [ |
|
{ |
|
label: '作业中心', |
|
prop: 'wcId', |
|
type: 'select', |
|
search: true, |
|
sortable: true, |
|
overHidden: true, |
|
headerAlign: 'center', |
|
align: 'left', |
|
searchLabelWidth: 80, |
|
dicUrl: '/blade-desk/bsWorkCenter/getList', |
|
props: { |
|
label: 'wcName', |
|
value: 'id', |
|
}, |
|
}, |
|
{ |
|
label: '作业槽', |
|
prop: 'batchNo', |
|
search: true, |
|
sortable: true, |
|
overHidden: true, |
|
type: 'select', |
|
headerAlign: 'center', |
|
align: 'center', |
|
searchLabelWidth: 80, |
|
rules: [ |
|
{ |
|
required: true, |
|
message: '请输入作业槽', |
|
trigger: 'blur', |
|
}, |
|
], |
|
}, |
|
{ |
|
label: '添加量', |
|
prop: 'addValue', |
|
search: false, |
|
sortable: true, |
|
overHidden: true, |
|
headerAlign: 'center', |
|
align: 'center', |
|
}, |
|
{ |
|
label: '添加时间', |
|
prop: 'addTime', |
|
search: true, |
|
sortable: true, |
|
headerAlign: 'center', |
|
align: 'center', |
|
type: 'date', |
|
format: 'YYYY-MM-DD HH:mm:ss', |
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
// display: false, |
|
searchRange: true, |
|
|
|
searchLabelWidth: 80, |
|
startPlaceholder: '开始时间', |
|
endPlaceholder: '结束时间', |
|
}, |
|
], |
|
}, |
|
}; |
|
}, |
|
mounted() {}, |
|
methods: { |
|
handleAdd() { |
|
this.title = '新增'; |
|
this.tableData = []; |
|
this.showDialog = true; |
|
this.moldAddMore=true |
|
}, |
|
closeDialog() { |
|
this.showDialog = false; |
|
}, |
|
insertEvent() { |
|
const record = { bsWorkCenter: { wcId: '' }, _select: false }; |
|
this.tableData.push(record); |
|
}, |
|
selectChange(list, row) { |
|
row._select = !row._select; |
|
}, |
|
rowDel(row) { |
|
this.$confirm('确定将选择数据删除?', { |
|
confirmButtonText: '确定', |
|
cancelButtonText: '取消', |
|
type: 'warning', |
|
}) |
|
.then(() => { |
|
return remove(row.id); |
|
}) |
|
.then(() => { |
|
this.onLoad(this.page); |
|
this.$message({ |
|
type: 'success', |
|
message: '操作成功!', |
|
}); |
|
}); |
|
}, |
|
rowUpdate(row, index, done, loading) { |
|
update(row).then( |
|
() => { |
|
this.onLoad(this.page); |
|
this.$message({ |
|
type: 'success', |
|
message: '操作成功!', |
|
}); |
|
done(); |
|
}, |
|
error => { |
|
window.console.log(error); |
|
loading(); |
|
} |
|
); |
|
}, |
|
//删除所选行 |
|
remove() {}, |
|
handleSave() { |
|
this.showDialog = false; |
|
}, |
|
searchReset() { |
|
this.query = {}; |
|
this.onLoad(this.page); |
|
}, |
|
searchChange(params, done) { |
|
this.query = params; |
|
this.page.currentPage = 1; |
|
this.onLoad(this.page, params); |
|
done(); |
|
}, |
|
currentChange(currentPage) { |
|
this.page.currentPage = currentPage; |
|
}, |
|
sizeChange(pageSize) { |
|
this.page.pageSize = pageSize; |
|
}, |
|
refreshChange() { |
|
this.onLoad(this.page, this.query); |
|
}, |
|
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; |
|
}); |
|
}, |
|
}, |
|
}; |
|
</script> |
|
|
|
<style></style>
|
|
|