diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue
index d60bbae..b04ef3b 100644
--- a/src/views/modules/yieldReport/com_produce_report_normal.vue
+++ b/src/views/modules/yieldReport/com_produce_report_normal.vue
@@ -1,4 +1,5 @@
-
+
{{ labels.rollButtons }}
- {{ this.currentRollOps.rollNo }}
+
+ style="margin-left: 15px; margin-top: 10px; margin-bottom: 25px;">
{{ buttons.refreshButton }}
+ style="margin-left: 20px; margin-top: 10px;">
{{ buttons.switchOperator }}
-
+
{{ buttons.startTuning }}
-
+
{{ buttons.startProduce }}
+
+
+ {{ buttons.sopView }}
+
+
@@ -655,6 +662,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 预览
+
+
+
+
+
+
+
+
+
@@ -690,6 +773,7 @@ import {
import {
getUserSpecialSecurity,
} from '@/api/yieldReport/produce_order.js'
+import { sopListSearch } from '@/api/qc/qc.js'
/*打印标签专用的js*/
import {
printSfdcLabel,
@@ -759,6 +843,12 @@ export default {
showCuttingMaterialFlag: false,
showDownFlag: false,
showFinishScheduleFlag: false,
+ showSopPreviewFlag: false, // SOP预览弹出框显示状态
+ sopPreviewList: [], // SOP预览列表数据
+ sopPreviewLoading: false, // SOP预览加载状态
+ sopPageIndex: 1, // SOP预览分页当前页
+ sopPageSize: 20, // SOP预览分页大小
+ sopTotalPage: 0, // SOP预览总页数
activeTable: 'sfdc_time',
sfdcTimeList: [],
orderToolList: [],
@@ -3002,6 +3092,7 @@ export default {
switchOperator: '切换用户',
startTuning: '开始调机',
startProduce: '开始生产',
+ sopView:'SOP预览',
reportDefect: '报告不良',
toolButton: '刀模板',
materialButton: '材料',
@@ -4456,6 +4547,84 @@ export default {
});
},
+ // SOP预览相关方法
+ // 打开SOP预览弹出框
+ sopPreviewModal() {
+ // 检查是否有选择的派工单
+ if (JSON.stringify(this.currentRow) == '{}') {
+ this.$message.error('请先选择派工单');
+ return false;
+ }
+
+ // 检查是否有物料号
+ if (!this.scheduleData.partNo) {
+ this.$message.error('物料号不能为空');
+ return false;
+ }
+
+ this.showSopPreviewFlag = true;
+ this.getSopPreviewList();
+ },
+
+ // 获取SOP预览列表数据
+ getSopPreviewList() {
+ this.sopPreviewLoading = true;
+
+ sopListSearch({
+ page: this.sopPageIndex,
+ limit: this.sopPageSize,
+ partNo: this.scheduleData.partNo,
+ site: this.$store.state.user.site
+ }).then(({data}) => {
+ if (data && data.code === 0) {
+ this.sopPreviewList = data.page.list || [];
+ this.sopTotalPage = data.page.totalCount || 0;
+ } else {
+ this.sopPreviewList = [];
+ this.sopTotalPage = 0;
+ this.$message.warning(data.msg || 'SOP数据获取失败');
+ }
+ this.sopPreviewLoading = false;
+ }).catch(() => {
+ this.sopPreviewList = [];
+ this.sopTotalPage = 0;
+ this.sopPreviewLoading = false;
+ this.$message.error('SOP数据获取失败');
+ });
+ },
+
+ // SOP分页大小改变
+ sopSizeChangeHandle(val) {
+ this.sopPageSize = val;
+ this.sopPageIndex = 1;
+ this.getSopPreviewList();
+ },
+
+ // SOP分页当前页改变
+ sopCurrentChangeHandle(val) {
+ this.sopPageIndex = val;
+ this.getSopPreviewList();
+ },
+
+ // 预览SOP文件
+ previewSopFile(row) {
+ if (row.sopUrl) {
+ window.open(row.sopUrl, '_blank');
+ } else {
+ this.$message.warning('该文件暂无预览路径');
+ }
+ },
+
+ // 关闭SOP预览弹出框
+ closeSopPreview() {
+ this.showSopPreviewFlag = false;
+ // 重置分页
+ this.sopPageIndex = 1;
+ this.sopPageSize = 20;
+ this.sopPreviewList = [];
+ this.sopTotalPage = 0;
+ },
+
},
created() {