产品入库,半成品委外单

This commit is contained in:
朱昊天
2026-05-11 17:59:12 +08:00
parent d1aab9dba1
commit f94ddb433d
31 changed files with 2119 additions and 77 deletions

View File

@@ -27,7 +27,7 @@
<el-button type="warning" plain icon="Download" size="mini" @click="handleExport">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain size="mini" @click="openFlow">统计/打印</el-button>
<el-button type="info" plain size="mini" @click="openFlow">统计/导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
</el-row>
@@ -277,7 +277,7 @@
</div>
<template #footer>
<el-button :disabled="!flowResult" @click="printFlow">打印</el-button>
<el-button :disabled="!flowResult" @click="exportFlow">导出Excel</el-button>
<el-button @click="flowOpen = false">关闭</el-button>
</template>
</el-dialog>
@@ -497,29 +497,24 @@ export default {
this.flowLoading = false
})
},
printFlow() {
const el = this.$refs.flowPrintContent
if (!el) return
const w = window.open('', '_blank')
if (!w) return
const html = `
<html>
<head>
<title>物料出入库统计</title>
<style>
body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","PingFang SC","Microsoft YaHei",sans-serif; padding: 12px; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #dcdfe6; padding: 6px 8px; font-size: 12px; }
</style>
</head>
<body>${el.innerHTML}</body>
</html>`
w.document.open()
w.document.write(html)
w.document.close()
w.focus()
w.print()
w.close()
exportFlow() {
if (!this.flowForm.itemId) {
this.$modal.msgError('请选择物料')
return
}
if (!this.flowForm.timeRange || this.flowForm.timeRange.length !== 2) {
this.$modal.msgError('请选择时间范围')
return
}
this.download(
'/gear/stockIoOrder/materialFlow/export',
{
itemId: this.flowForm.itemId,
startTime: this.flowForm.timeRange[0],
endTime: this.flowForm.timeRange[1]
},
`material_flow_${this.flowForm.itemId}_${new Date().getTime()}.xlsx`
)
},
submitEdit() {
this.$refs.editFormRef.validate((valid) => {