Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling
commit
927797efce
8 changed files with 1435 additions and 24 deletions
@ -0,0 +1,200 @@ |
||||
<template> |
||||
<basic-container> |
||||
<el-tabs v-model="tabPosition" class="demo-tabs" @tab-change="tabPositionChange"> |
||||
<el-tab-pane label="镀前入库" name="beforePlatingEntry"></el-tab-pane> |
||||
<el-tab-pane label="镀前出库" name="beforePlatingBound"></el-tab-pane> |
||||
</el-tabs> |
||||
<!-- 表格数据 --> |
||||
<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" |
||||
@current-change="currentChange" |
||||
@size-change="sizeChange" |
||||
@refresh-change="refreshChange" |
||||
@on-load="onLoad" |
||||
> |
||||
<template #menu-left> |
||||
<el-button type="primary" @click="handleAdd(tabPosition)">新 增</el-button> |
||||
</template> |
||||
</avue-crud> |
||||
<!-- 镀前入库新增 --> |
||||
<before-plating-entry-dialog |
||||
:show-dialog="showDialog" |
||||
@closeDialog="closeDialog" |
||||
></before-plating-entry-dialog> |
||||
<!-- 镀前出库 --> |
||||
<before-plating-bound-dialog |
||||
:show-dialog="boundDialog" |
||||
@closeDialog="closeDialog" |
||||
></before-plating-bound-dialog> |
||||
<!-- 镀后入库 --> |
||||
<after-plating-entry-dialog |
||||
:show-dialog="afterBoundDialog" |
||||
@closeDialog="closeDialog" |
||||
></after-plating-entry-dialog> |
||||
</basic-container> |
||||
</template> |
||||
|
||||
<script> |
||||
import columnData from '../js/platingColumnData'; |
||||
import beforePlatingEntryDialog from './components/beforePlatingEntryDialog.vue'; |
||||
import beforePlatingBoundDialog from './components/beforePlatingBoundDialog.vue'; |
||||
import afterPlatingEntryDialog from './components/afterPlatingEntryDialog.vue'; |
||||
import { getList, deleteById } from '@/api/productionManagement/beforeAndAfterPlating'; |
||||
export default { |
||||
components: { |
||||
beforePlatingEntryDialog, |
||||
beforePlatingBoundDialog, |
||||
afterPlatingEntryDialog, |
||||
}, |
||||
data() { |
||||
return { |
||||
tabPosition: 'beforePlatingEntry', |
||||
showDialog: false, |
||||
boundDialog: false, |
||||
afterBoundDialog: false, |
||||
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: true, |
||||
selection: false, |
||||
viewBtn: false, |
||||
delBtn: true, |
||||
editBtn: false, |
||||
addBtn: false, |
||||
labelWidth: 120, |
||||
menu: false, |
||||
menuWidth: 140, |
||||
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', |
||||
addBtnIcon: ' ', |
||||
viewBtnIcon: ' ', |
||||
delBtnIcon: ' ', |
||||
editBtnIcon: ' ', |
||||
column: [], |
||||
}, |
||||
data: [], |
||||
tableData: [], |
||||
cardNo: '', |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
query: { |
||||
paType: 1, //1-镀前入库 2-镀前出库 3-镀后入库 |
||||
}, |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.option.column = columnData[this.tabPosition]; |
||||
}, |
||||
methods: { |
||||
// 点击新增按钮 |
||||
handleAdd(val) { |
||||
if (val == 'beforePlatingEntry') { |
||||
this.showDialog = true; |
||||
} else if (val == 'beforePlatingBound') { |
||||
this.boundDialog = true; |
||||
} else { |
||||
this.afterBoundDialog = true; |
||||
} |
||||
}, |
||||
rowDel() { |
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { |
||||
confirmButtonText: '确认', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}).then(() => { |
||||
deleteById().then(res => { |
||||
this.$message({ |
||||
type: 'success', |
||||
message: '删除成功!', |
||||
}); |
||||
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(); |
||||
}, |
||||
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); |
||||
}, |
||||
// 关闭弹窗 |
||||
closeDialog() { |
||||
this.showDialog = false; |
||||
this.boundDialog = false; |
||||
this.afterBoundDialog = false; |
||||
}, |
||||
tabPositionChange(value, event) { |
||||
this.option.column = columnData[this.tabPosition]; |
||||
this.option.menu = false; |
||||
if (this.tabPosition == 'beforePlatingEntry') { |
||||
this.query.paType = 1; |
||||
this.onLoad(this.page, this.query); |
||||
} else if (this.tabPosition == 'beforePlatingBound') { |
||||
this.query.paType = 2; |
||||
this.onLoad(this.page, this.query); |
||||
} else { |
||||
this.option.menu = true; |
||||
this.query.paType = 3; |
||||
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> |
||||
@ -0,0 +1,378 @@ |
||||
<template> |
||||
<div> |
||||
<avue-crud |
||||
:option="option" |
||||
:table-loading="loading" |
||||
:data="data" |
||||
v-model="form" |
||||
v-model:page="page" |
||||
v-model:query="query" |
||||
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="typeFun(1)"> 转工单 </el-button> |
||||
<el-button type="primary" @click="typeFun(0)"> 入库单 </el-button> |
||||
<el-button type="primary" @click="typeFun(null)"> 全部 </el-button> |
||||
</template> |
||||
<template #menu-right |
||||
><el-button type="primary" @click="printClick" :loading="printLoading"> 打印 </el-button> |
||||
</template> |
||||
<template #menu="{ row }"> </template> |
||||
|
||||
<template #heatTreat="scope"> </template> |
||||
</avue-crud> |
||||
|
||||
<!-- 打印 --> |
||||
<print v-if="printShow" :showPrint="printShow" @cancel="cancel"></print> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
queryNewRecord, |
||||
handoverRecordPrint, |
||||
} from '@/api/productionManagement/beforeAndAfterPlating'; |
||||
import print from './print.vue'; |
||||
export default { |
||||
components: { print }, |
||||
data() { |
||||
return { |
||||
printShow: false, |
||||
printLoading: false, |
||||
form: {}, |
||||
selectionList: [], |
||||
query: {}, |
||||
loading: false, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
columnSort: true, |
||||
tip: false, |
||||
height: 'auto', |
||||
calcHeight: 32, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
searchIcon: true, |
||||
searchIndex: 3, |
||||
tree: false, |
||||
border: true, |
||||
index: false, |
||||
selection: true, |
||||
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, |
||||
column: [ |
||||
{ |
||||
label: '订单状态', |
||||
prop: 'statusName', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '移交人员', |
||||
prop: 'createName', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '单号', |
||||
prop: 'hrCode', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '移交类型', |
||||
prop: 'hrType', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
hide: true, |
||||
}, |
||||
{ |
||||
label: '移交类型', |
||||
prop: 'hrTypeName', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '零件号', |
||||
prop: 'partCode', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '批次号', |
||||
prop: 'batchNo', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '移交数量', |
||||
prop: 'handoverQty', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '车间订单号', |
||||
prop: 'woCode', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '流程卡号', |
||||
prop: 'cardNo', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '生产标识', |
||||
prop: 'prodIdent', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '移交部门', |
||||
prop: 'handoverUnit', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '一级工序(B)号', |
||||
prop: 'roamNo', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '接收部门', |
||||
prop: 'recDept', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '备注', |
||||
prop: 'memo', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '移交时间', |
||||
prop: 'createTime', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
{ |
||||
label: '打印时间', |
||||
prop: 'printTime', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
width: 160, |
||||
}, |
||||
], |
||||
}, |
||||
|
||||
data: [], |
||||
}; |
||||
}, |
||||
methods: { |
||||
typeFun(type) { |
||||
this.query.hrType = type; |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
printClick() { |
||||
if (this.selectionList.length === 0) { |
||||
return this.$message.warning('请先选择数据再进行打印!'); |
||||
} |
||||
this.printLoading = true; |
||||
this.list = []; |
||||
this.selectionList.forEach(item => { |
||||
this.list.push(item.id); |
||||
}); |
||||
this.printShow = true; |
||||
handoverRecordPrint({ hrIds: this.list.join(',') }).then(res => { |
||||
console.log(res, 'res'); |
||||
this.printLoading = false; |
||||
}); |
||||
// this.$refs.printClick.open('prHandoverRecord/print', { |
||||
// list: this.list, |
||||
// hrType: this.hrType |
||||
// }); |
||||
// // 清除表格选中 |
||||
// this.$refs.myTable.clearSelection(); |
||||
// setTimeout(() => { |
||||
// this.$refs.myTable.load(); |
||||
// }, 1000); |
||||
}, |
||||
cancel() { |
||||
this.printShow = false; |
||||
}, |
||||
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; |
||||
queryNewRecord(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; |
||||
} |
||||
); |
||||
}, |
||||
}, |
||||
mounted() {}, |
||||
}; |
||||
</script> |
||||
d |
||||
@ -0,0 +1,222 @@ |
||||
<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> </template> |
||||
<template #menu-right> </template> |
||||
<template #menu="{ row }"> </template> |
||||
|
||||
<template #heatTreat="scope"> </template> |
||||
</avue-crud> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import { queryDelLogRecord } from '@/api/productionManagement/beforeAndAfterPlating'; |
||||
export default { |
||||
components: {}, |
||||
data() { |
||||
return { |
||||
form: {}, |
||||
selectionList: [], |
||||
query: {}, |
||||
loading: false, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
columnSort: true, |
||||
tip: false, |
||||
height: 'auto', |
||||
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, |
||||
column: [ |
||||
{ |
||||
label: '车间订单', |
||||
prop: 'prWorkOrder', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '删除的数据', |
||||
prop: 'aroundData', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '删除人', |
||||
prop: 'userName', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '删除时间', |
||||
prop: 'delTime', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
], |
||||
}, |
||||
|
||||
data: [], |
||||
}; |
||||
}, |
||||
methods: { |
||||
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; |
||||
queryDelLogRecord(page.currentPage, page.pageSize, Object.assign(params, this.query)).then( |
||||
res => { |
||||
this.data = res.data.data.records; |
||||
this.loading = false; |
||||
this.selectionClear(); |
||||
} |
||||
); |
||||
}, |
||||
}, |
||||
mounted() {}, |
||||
}; |
||||
</script> |
||||
d |
||||
@ -0,0 +1,358 @@ |
||||
<template> |
||||
<el-dialog v-drag v-loading="loading" title="打印预览" :modelValue="showPrint" :before-close="cancel" :def-width="1200" top="0" fullscreen > |
||||
<el-button v-print="printObj" type="primary" class="printButton">打印</el-button> |
||||
<div v-if="showPrint" id="printMe" ref="printContent" class="printBox"> |
||||
<template v-for="(item, index) in tablist"> |
||||
|
||||
<table v-if="item.hrType == 1" border="0" class="table_box" style="width:100%"> |
||||
<tr class="tr_fist"> |
||||
<td style="border:0;font-size:20px"> |
||||
<div class="tableTitleBarcodeCenter" style="transform: translate(-50%);">转工交接单</div> |
||||
</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td style="border:0;font-size:20px;"> |
||||
<div class="tableTitleBarcode tableTitleBarcodeCenter" style="height:20px"> |
||||
<vue-barcode :value="item.hrCode" format="CODE128" class="barCode" width="2" height="36" /> |
||||
</div> |
||||
</td> |
||||
</tr> |
||||
|
||||
<tr class="tr_fist"> |
||||
<td colspan="10" style="border:0;font-size:12px;padding-bottom:30px"> |
||||
<div class="tableTitle"> |
||||
<div style="z-index:9999">车间订单:{{ item.woCode }}</div> |
||||
</div> |
||||
</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td>委托车间</td> |
||||
<td>{{ item.entrustDept }}</td> |
||||
|
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td>承制车间</td> |
||||
<td>4A</td> |
||||
|
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td rowspan="2" colspan="3">工作订单</td> |
||||
<td rowspan="2" colspan="2">批次号</td> |
||||
<td rowspan="2" colspan="2">零件号</td> |
||||
<td rowspan="2">生产标识</td> |
||||
<td colspan="2">委托数</td> |
||||
<td colspan="2">完成数</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td>数量</td> |
||||
<td>重量</td> |
||||
<td>数量</td> |
||||
<td>重量</td> |
||||
</tr> |
||||
<tr class="textTd" style="page-break-inside: avoid"> |
||||
<td colspan="3">{{ item.poCode }}</td> |
||||
<td colspan="2">{{ item.batchNo }}</td> |
||||
<td colspan="2">{{ item.partCode }}</td> |
||||
<td>{{ item.prodIdent }}</td> |
||||
<td>{{ item.makeQty }}</td> |
||||
<td>{{ }}</td> |
||||
<td>{{ item.handoverQty }}</td> |
||||
<td>{{ }}</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td rowspan="2">废品数</td> |
||||
<td rowspan="2">试验数</td> |
||||
<td rowspan="2">消耗数</td> |
||||
<td colspan="2">定额</td> |
||||
<td colspan="2">金额</td> |
||||
<td colspan="3" rowspan="2">转工人:{{ item.createMan }}</td> |
||||
<td colspan="2" rowspan="3">收件人:{{ }}</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td>单件</td> |
||||
<td>合计</td> |
||||
<td>单件</td> |
||||
<td>合计</td> |
||||
</tr> |
||||
<tr class="textTd" style="page-break-inside: avoid"> |
||||
<td>{{ item.scrapQty }}</td> |
||||
<td>{{ item.testQty }}</td> |
||||
<td>{{ item.useQty }}</td> |
||||
<td>{{ }}</td> |
||||
<td>{{ }}</td> |
||||
<td>{{ }}</td> |
||||
<td>{{ }}</td> |
||||
<td colspan="3">时间:{{ item.tableDate }}</td> |
||||
</tr> |
||||
|
||||
</table> |
||||
<table v-if="item.hrType == 0" border="0" class="table_box" style="width:100%"> |
||||
<tr class="tr_fist"> |
||||
<td colspan="16" style="border:0;font-size:20px"> |
||||
<div class="tableTitleBarcode" style="height:50px"> |
||||
<vue-barcode :value="item.hrCode" format="CODE128" class="barCode" width="3" height="36" /> |
||||
</div> |
||||
</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td colspan="16" style="border:0;font-size:20px;padding-top:30px"> |
||||
<div>热表分厂零部件入库支出卡</div> |
||||
</td> |
||||
</tr> |
||||
<tr class="tr_fist" style="border:0"> |
||||
<td colspan="16" style="border:0"> |
||||
<div style="width:100%;border:1px #000 solid" /> |
||||
</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td colspan="16" style="border:0;font-size:12px"> |
||||
<div class="tableTitle"> |
||||
<div style="z-index:9999">工作订单:{{ item.poCode }}</div> |
||||
<div>车间订单:{{ item.woCode }}</div> |
||||
<div>入库单号:{{ item.hrCode }}</div> |
||||
<div>计划部门:{{ item.useDept }}</div> |
||||
<div>委托车间:{{ item.entrustDept }}</div> |
||||
</div> |
||||
</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td>镀种</td> |
||||
<td>型别</td> |
||||
<td colspan="2">生产标识</td> |
||||
<td colspan="2">零件号</td> |
||||
<td>名称</td> |
||||
<td>产品系列</td> |
||||
<td>原编码</td> |
||||
<td>计划数量</td> |
||||
<td>重量</td> |
||||
<td>试</td> |
||||
<td>耗</td> |
||||
<td>废</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td>{{ item.plate }}</td> |
||||
<td>{{ item.productTypePart }}</td> |
||||
<td colspan="2">{{ item.prodIdent }}</td> |
||||
<td colspan="2">{{ item.partCode }}</td> |
||||
<td>{{ item.partName }}</td> |
||||
<td>{{ item.productType }}</td> |
||||
<td>{{ item.oldCode }}</td> |
||||
<td>{{ item.makeQty }}</td> |
||||
<td>{{ item.weight }}</td> |
||||
<td>{{ }}</td> |
||||
<td>{{ }}</td> |
||||
<td>{{ }}</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td colspan="2">批次号</td> |
||||
<td>{{ item.batchNo }}</td> |
||||
<td colspan="2">提交数量</td> |
||||
<td>{{ item.handoverQty }}</td> |
||||
<td colspan="2">实收数量</td> |
||||
<td>{{ }}</td> |
||||
<td>实收重量</td> |
||||
<td>{{ }}</td> |
||||
<td colspan="2">收件人</td> |
||||
<td>{{ }}</td> |
||||
|
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td colspan="2">相似物料号</td> |
||||
<td colspan="12">{{ }}</td> |
||||
|
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td>序号</td> |
||||
<td>年</td> |
||||
<td>月</td> |
||||
<td>日</td> |
||||
<td>收入数</td> |
||||
<td>支出数</td> |
||||
<td>库存数</td> |
||||
<td>序号</td> |
||||
<td>年</td> |
||||
<td>月</td> |
||||
<td>日</td> |
||||
<td>收入数</td> |
||||
<td>支出数</td> |
||||
<td>库存数</td> |
||||
</tr> |
||||
<tr v-for="(item, index) in 8" class="textTd" style="page-break-inside: avoid"> |
||||
<td>{{ index+1 }}</td> |
||||
<td /> |
||||
<td /> |
||||
<td /> |
||||
<td /> |
||||
<td /> |
||||
<td /> |
||||
<td>{{ (index+1)*2 }}</td> |
||||
<td /> |
||||
<td /> |
||||
<td /> |
||||
<td /> |
||||
<td /> |
||||
<td /> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td colspan="16" style="border:0;font-size:12px"> |
||||
<div class="tableTitle"> |
||||
<div>保管员:{{ item.custodian }}</div> |
||||
<div>库房号:{{ }}</div> |
||||
<div>库位号:{{ }}</div> |
||||
<div>车间提交人:{{ item.createMan }}</div> |
||||
<div>计划员:{{ item.planUser }}</div> |
||||
<div /> |
||||
</div> |
||||
</td> |
||||
</tr> |
||||
<tr class="tr_fist"> |
||||
<td colspan="16" style="border:0;font-size:12px"> |
||||
<div class="tableTitle"> |
||||
<div style="z-index:9999">审理单号:{{ }}</div> |
||||
<div>备注:{{ }}</div> |
||||
<div>使用部门:{{ item.recDept }}</div> |
||||
<div>制表日期:{{ item.tableDate }}</div> |
||||
<div /> |
||||
</div> |
||||
</td> |
||||
</tr> |
||||
|
||||
</table> |
||||
<table> |
||||
<tr v-for="i in 3" class="tr_fist"> |
||||
<td colspan="16" style="border:0;font-size:12px"> |
||||
<div class="tableTitle" /> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
</template> |
||||
|
||||
</div> |
||||
</el-dialog> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
name: 'Print', |
||||
props: { |
||||
showPrint: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
idList: { |
||||
type: Array, |
||||
default: () => [] |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
tablist: [], |
||||
loading: false, |
||||
printObj: { |
||||
id: 'printMe', |
||||
popTitle: '打印66', |
||||
ignoreClass: 'noprint', |
||||
endCallback: (e) => { |
||||
console.log(e, 5555); |
||||
} |
||||
} |
||||
}; |
||||
}, |
||||
watch: {}, |
||||
|
||||
created() {}, |
||||
methods: { |
||||
open() { |
||||
this.loading = true; |
||||
this.$ajax |
||||
.post('prHandoverRecord/newPrint', { |
||||
list: this.idList |
||||
}) |
||||
.then((res) => { |
||||
if (this.$ifAjax(res)) { |
||||
this.tablist = res.data; |
||||
} |
||||
this.loading = false; |
||||
}); |
||||
}, |
||||
cancel() { |
||||
this.tablist = []; |
||||
this.$emit('cancel'); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
<style scoped lang="scss"> |
||||
.printButton { |
||||
float: right; |
||||
margin-right: 8px; |
||||
margin-top: 16px; |
||||
} |
||||
.printBox { |
||||
width: 100%; |
||||
padding: 6px; |
||||
text-align: center; |
||||
page-break-before: auto; |
||||
page-break-after: always; |
||||
.printTitle { |
||||
font-size: 20px; |
||||
font-weight: 700; |
||||
padding: 8px; |
||||
// margin-bottom: 6px; |
||||
} |
||||
} |
||||
|
||||
table { |
||||
tr { |
||||
page-break-inside: avoid; |
||||
} |
||||
td { |
||||
width: 168px; |
||||
height: 20px; |
||||
border: 1px solid #000; |
||||
background: transparent; |
||||
color: #000; |
||||
font-size: 10px; |
||||
text-align: center; |
||||
padding: 0; |
||||
margin: 0; |
||||
} |
||||
} |
||||
table { |
||||
border: 0 !important; |
||||
font-family: 宋体; |
||||
.tr_fist { |
||||
.tableTitleBarcode { |
||||
position: relative; |
||||
.barCode { |
||||
position: absolute; |
||||
top: 0px; |
||||
left: 0; |
||||
} |
||||
} |
||||
.tableTitleBarcodeCenter { |
||||
position: absolute; |
||||
left: 50%; |
||||
.barCode { |
||||
transform: translate(-50%); |
||||
} |
||||
} |
||||
.tableTitle { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
} |
||||
} |
||||
} |
||||
@media print { |
||||
@page { |
||||
size: auto; |
||||
margin: 6mm; |
||||
} |
||||
} |
||||
|
||||
.textTd { |
||||
td { |
||||
font-size: 6px !important; |
||||
} |
||||
} |
||||
</style> |
||||
@ -0,0 +1,205 @@ |
||||
<template> |
||||
<basic-container> |
||||
<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> </template> |
||||
<template #menu-right> </template> |
||||
<template #menu="{ row }"> </template> |
||||
|
||||
<template #heatTreat="scope"> </template> |
||||
</avue-crud> |
||||
</basic-container> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
components: {}, |
||||
data() { |
||||
return { |
||||
form: {}, |
||||
selectionList: [], |
||||
query: {}, |
||||
loading: false, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
columnSort: true, |
||||
tip: false, |
||||
height: 'auto', |
||||
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', |
||||
column: [ |
||||
{ |
||||
label: '配套人', |
||||
prop: 'partCode', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '配套时间', |
||||
prop: 'partName', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
], |
||||
}, |
||||
|
||||
data: [], |
||||
}; |
||||
}, |
||||
methods: { |
||||
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(); |
||||
// }); |
||||
}, |
||||
}, |
||||
mounted() {}, |
||||
}; |
||||
</script> |
||||
d |
||||
Loading…
Reference in new issue