Browse Source

2026-01-07

工单材料上机记录
master
fengyuan_yang 5 days ago
parent
commit
ddcdcaa43e
  1. 12
      src/api/schedule/materialOnMachineRecord.js
  2. 24
      src/views/modules/qc/sopListComponent.vue
  3. 1056
      src/views/modules/schedule/searchMaterialOnMachineRecord.vue

12
src/api/schedule/materialOnMachineRecord.js

@ -0,0 +1,12 @@
import { createAPI } from "@/utils/httpRequest.js";
/**
* 分页查询工单材料上机记录
*/
export const listMaterialOnMachineRecord = data => createAPI('/materialOnMachineRecord/list', 'POST', data);
/**
* 材料异常退料复用现有的异常下机接口
*/
export const materialReturnDuringProduction = data => createAPI('/schedule/materialReturnDuringProduction', 'POST', data);

24
src/views/modules/qc/sopListComponent.vue

@ -83,13 +83,13 @@
label="来源系统"
min-width="100">
</el-table-column>
<el-table-column
prop="standardFields"
header-align="center"
align="center"
label="4个标准字段"
min-width="120">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="standardFields"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- label="4个标准字段"-->
<!-- min-width="120">-->
<!-- </el-table-column>-->
<el-table-column
fixed="right"
header-align="center"
@ -230,26 +230,26 @@ export default {
this.$message.warning('该文件暂无预览路径')
return
}
//
const fileName = row.sopName || row.sopUrl
let fileSuffix = ''
if (fileName.includes('.')) {
fileSuffix = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase()
}
//
const imageTypes = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
const videoTypes = ['mp4', 'avi', 'mov', 'wmv', 'flv']
const pdfTypes = ['pdf']
const txtTypes = ['txt']
const officeTypes = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
if (officeTypes.includes(fileSuffix)) {
this.$message.warning(`暂不支持在线预览${fileSuffix.toUpperCase()}文件,请使用下载功能`)
return
}
let mimeType = 'application/octet-stream'
if (imageTypes.includes(fileSuffix)) {
mimeType = 'image/' + fileSuffix
@ -260,7 +260,7 @@ export default {
} else if (txtTypes.includes(fileSuffix)) {
mimeType = 'text/plain'
}
downloadSopFile(row.sopUrl).then(({ data }) => {
const blob = new Blob([data], { type: mimeType })
const fileURL = URL.createObjectURL(blob)

1056
src/views/modules/schedule/searchMaterialOnMachineRecord.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save