zck 2 tháng trước cách đây
mục cha
commit
83fd1104b9

+ 71 - 0
src/view/equipment/maintenance.vue

@@ -44,6 +44,7 @@
 						:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 						:header-cell-style="{ padding: '0px' }" @row-click="yearRowClick"
             :row-class-name="pchzrowClassStyle"  
+            show-summary :summary-method="getyearSummaries"
 						highlight-current-row="true" @row-dblclick="gytableDatadoubleClick"  id="pchztable"
 						style="width: 100%;height: 30vh" border tooltip-effect="dark" :data="yeartableData" row-key="ID" >
             <el-table-column  sortable align="center" label="使用部门" prop="使用部门"  width="120" />
@@ -72,6 +73,7 @@
 						:row-style="{ height: '20px' }" :selectable="checkboxT"
 						:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 						:header-cell-style="{ padding: '0px' }" @row-click="wxmonthRowClick" 
+            show-summary :summary-method="getmonthSummaries"
 						highlight-current-row="true" @row-dblclick="wxmonthdoubleClick"  id="wxtable"
             @selection-change="wxSelectionChange"
 						style="width: 100%;height: 30vh" border tooltip-effect="dark" :data="wxmonthtableData" row-key="ID" >
@@ -1327,6 +1329,75 @@ console.log(type.value)
 }
 
 
+	//合计
+	const getyearSummaries = (param) => {  
+	  const { columns, data } = param;  
+	  const sums = {};  
+	  //选择你希望合计的列
+	  const summableLabels = ["维修次数","保养次数","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",];
+	  columns.forEach((column, index) => {  
+		  if (index === 1) {  
+			  sums[index] = '次数合计';  
+			  return;  
+		  }  
+
+		  if (summableLabels.includes(column.label)) {  
+			  const values = data.map(item => Number(item[column.property]));  
+
+			  // 检查数组中是否所有值都是 NaN  
+			  if (!values.every(value => isNaN(value))) {  
+				  sums[index] = values.reduce((prev, curr) => {  
+					  const value = Number(curr);  
+					  if (!isNaN(value)) {  
+						  return prev + value; 
+					  }  
+					  return prev;  
+				  }, 0);  
+				  // 如果需要,可以在这里添加单位  
+				  // sums[index] += ' 件';  
+			  } else {  
+				   sums[index] = 'N/A';  
+			  }  
+		  }  
+	  });  
+
+	  return sums;  
+  };
+
+  const getmonthSummaries = (param) => {  
+	  const { columns, data } = param;  
+	  const sums = {};  
+	  //选择你希望合计的列
+	  const summableLabels = ["故障维修工时",];
+	  columns.forEach((column, index) => {  
+		  if (index === 1) {  
+			  sums[index] = '次数合计';  
+			  return;  
+		  }  
+
+		  if (summableLabels.includes(column.label)) {  
+			  const values = data.map(item => Number(item[column.property]));  
+
+			  // 检查数组中是否所有值都是 NaN  
+			  if (!values.every(value => isNaN(value))) {  
+				  sums[index] = values.reduce((prev, curr) => {  
+					  const value = Number(curr);  
+					  if (!isNaN(value)) {  
+						  return prev + value; 
+					  }  
+					  return prev;  
+				  }, 0);  
+				  // 如果需要,可以在这里添加单位  
+				  // sums[index] += ' 件';  
+			  } else {  
+				   sums[index] = 'N/A';  
+			  }  
+		  }  
+	  });  
+
+	  return sums;  
+  };
+
 
 // 导出
 const wxtjDialog = ref(false)

+ 2 - 2
src/view/job/processSheet/BoxprocessSheet.vue

@@ -337,8 +337,8 @@ for (let i = start; i <= end; i++) {
       };
       console.log("执行打印:", currentIndex);
 	  console.log(printdata)
-	  return;
-    //   hiprintTemplate.print2(printdata);
+	//   return;
+      hiprintTemplate.print2(printdata);
     }, delay);
   })(i, i - start + 1);  // 传入 currentIndex 和 relativeIndex
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 77 - 3894
src/view/job/processSheet/processSheet.vue


+ 214 - 10
src/view/managements/hardversionlibrary.vue

@@ -10,8 +10,9 @@
                 <el-button type="primary" class="bt" icon="search" @click="on_search">查询</el-button>
                 <el-button type="primary" class="bt" icon="edit" @click="onADD">添加</el-button>
                 <el-button type="primary" class="bt" icon="delete" :disabled="!selectedIds" @click="on_delete">删除</el-button>
-                <el-button type="primary" class="bt" icon="download"  @click="ToExcel" >导出到Excel</el-button>
-                <el-button type="primary" class="bt" icon="download"  @click="ToExcel" >导出报废印版</el-button>
+                <el-button type="primary" class="bt" icon="download"  @click="HzToExcel" >导出到Excel(汇总)</el-button>
+                <el-button type="primary" class="bt" icon="download"  @click="MxToExcel" >导出到Excel(明细)</el-button>
+                <el-button type="primary" class="bt" icon="download"  @click="BfToExcel" >导出报废印版</el-button>
                 <el-button type="primary" class="bt" icon="edit" @click="onsync">获取U8资料</el-button>
               </el-form-item>
             </el-form>
@@ -82,7 +83,7 @@
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                         :data="wlmxtableData"  border row-key="ID"
                         size="small" v-if="!showKH"
-                        :cell-class-name="gxbgCellClass"
+                        :cell-class-name="gxbgCellClass" id="gdtable"
                         highlight-current-row="true" @row-dblclick="updateCompanyFunc2"
                         @row-click="tableRowClick2" :show-overflow-tooltip="true"
                         >
@@ -141,6 +142,9 @@
               :title="type === 'create' ? '产品印版资料新增' : '产品印版资料修改'"
               :width="'40%'"  
               :style="{ minWidth: '700px' }"
+              draggable
+              :append-to-body="true"
+              class="dialog-plate"
             >
             <el-form :model="Plate" label-width="120px">
                 <!-- 第一行:部门 -->
@@ -292,6 +296,27 @@
   </el-form>
 </el-dialog>
 
+<!-- 年月选择弹窗 -->
+<el-dialog v-model="bfExportVisible" title="选择年月" width="400px">
+  <el-form :model="Plate" label-width="80px">
+    <el-form-item label="选择年月">
+      <el-date-picker
+        v-model="bfExportDate"
+        type="month"
+        placeholder="选择年月"
+        :default-value="new Date()"
+        style="width: 200px"
+      />
+    </el-form-item>
+  </el-form>
+  <template #footer>
+    <div class="dialog-footer">
+      <el-button @click="bfExportVisible = false">取消</el-button>
+      <el-button type="primary" @click="confirmBfExport">确认导出</el-button>
+    </div>
+  </template>
+</el-dialog>
+
   
           </el-main>
         </layout-content>
@@ -303,14 +328,14 @@
   // 全量引入格式化工具 请按需保留
   import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
   
-  import {ref, reactive} from 'vue'
+  import {ref, reactive, watch, nextTick} from 'vue'
   import * as XLSX from 'xlsx'
   import FileSaver from 'file-saver'
   import dayjs, { Dayjs } from 'dayjs';
   import { exportExcelFile } from '@/utils/excel'
   import { useUserStore } from '@/pinia/modules/user'
   import {ElMessage,ElMessageBox} from "element-plus";
-  import {getPPTab,getPPList,getPPEdit,getPPDetail,getPPCode,getPPReceive,getPPDetaiDel,getPPkhTab,InventoryCodeData,MNInventoryCodeData} from "@/api/mes/job.js"
+  import {getPPTab,getPPList,getPPEdit,getPPDetail,getPPCode,getPPReceive,getPPDetaiDel,getPPkhTab,InventoryCodeData,MNInventoryCodeData,getPrintdata} from "@/api/mes/job.js"
   const userStore = useUserStore()
   const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
   defineOptions({name: 'Company'})
@@ -509,6 +534,22 @@ getTreeData()
     车间: nameToWorkshop[userStore.userInfo.nickName] || '' 
     })
   const dialogPlateVisible = ref(false)
+  
+  watch(dialogPlateVisible, async (val) => {
+    if (val) {
+      await nextTick()
+      const dialogEl = document.querySelector('.dialog-plate .el-dialog')
+      if (dialogEl) {
+        dialogEl.style.transform = ''
+        dialogEl.style.left = ''
+        dialogEl.style.top = ''
+      }
+    }
+  })
+  
+  // 年月选择弹窗
+  const bfExportVisible = ref(false)
+  const bfExportDate = ref('')
   const type = ref('create') // 'create' 或 'update'
   const onADD = () => {
     // 新增逻辑
@@ -826,11 +867,11 @@ const on_delete = async () => {
 }
 
 
-const ToExcel = () => {
+const HzToExcel = () => {
   if(showKH.value === false){
     console.log('导出版材')
     const el = document.getElementById('wltable');
-  const filename = '版材库导出.xlsx';
+  const filename = '版材库导出汇总.xlsx';
   
   // 1. 获取原始表格数据
   const wb = XLSX.utils.table_to_book(el, { raw: true });
@@ -838,9 +879,9 @@ const ToExcel = () => {
 
   // 2. 定义需要转换为数字的列(基于原始列字母)
   const originalNumberColumns = {
-    'G': 0,
-    'H': 0,
-    'I': 0, 
+    'G': 2,
+    'H': 2,
+    'I': 2, 
   };
 
   // 3. 创建新工作表(左移后的数据)
@@ -906,6 +947,169 @@ const ToExcel = () => {
   }
 }
 
+const MxToExcel = () => {
+  if(showKH.value === false){
+    console.log('导出版材')
+    const el = document.getElementById('gdtable');
+  const filename = '版材库导出明细.xlsx';
+  
+  // 1. 获取原始表格数据
+  const wb = XLSX.utils.table_to_book(el, { raw: true });
+  const ws = wb.Sheets[wb.SheetNames[0]];
+
+  // 2. 定义需要转换为数字的列(基于原始列字母)
+  const originalNumberColumns = {
+    'C': 2,
+  };
+
+  // 3. 创建新工作表(左移后的数据)
+  const newWs = {};
+  const range = XLSX.utils.decode_range(ws['!ref']);
+
+  // 调整列范围(删除A列)
+  range.s.c = 0;  // 从A列开始(原B列)
+  range.e.c -= 1; // 结束列减1
+  newWs['!ref'] = XLSX.utils.encode_range(range);
+
+  // 复制其他工作表属性(排除A列)
+  if (ws['!cols']) newWs['!cols'] = ws['!cols'].slice(1);
+  if (ws['!rows']) newWs['!rows'] = ws['!rows'];
+  if (ws['!merges']) newWs['!merges'] = ws['!merges'];
+
+  // 4. 左移所有列数据(A列→删除,B列→A列,C列→B列...)
+  Object.keys(ws).forEach(address => {
+    if (!address.startsWith('!')) {
+      const col = address.charAt(0);
+      const row = address.slice(1);
+
+      if (col !== 'A') { // 跳过A列
+        // 计算新列字母(左移一列)
+        const newCol = String.fromCharCode(col.charCodeAt(0) - 1);
+        const newAddress = newCol + row;
+        
+        // 复制单元格数据
+        newWs[newAddress] = { ...ws[address] };
+      }
+    }
+  });
+
+  // 5. 转换数字格式(基于左移后的列字母)
+  Object.keys(newWs).forEach(address => {
+    const col = address.charAt(0);
+    const originalCol = String.fromCharCode(col.charCodeAt(0));
+
+    if (originalNumberColumns[originalCol] !== undefined) {
+      const cell = newWs[address];
+      const num = parseFloat(cell.v);
+      
+      if (!isNaN(num)) {
+        cell.t = 'n';
+        cell.v = num;
+        cell.z = originalNumberColumns[originalCol] === 0 
+          ? '0' 
+          : `0.${'0'.repeat(originalNumberColumns[originalCol])}`;
+      }
+    }
+  });
+
+  // 6. 更新工作簿并导出
+  wb.Sheets[wb.SheetNames[0]] = newWs;
+  const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
+
+  try {
+    FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
+  } catch (e) {
+    console.error('导出失败:', e);
+  }
+  return wbout;
+  }
+}
+
+// 导出报废印版
+const BfToExcel = () => {
+  // 显示年月选择弹窗
+  bfExportVisible.value = true
+}
+
+// 确认导出报废印版
+const confirmBfExport = async () => {
+  if (!bfExportDate.value) {
+    ElMessage.error('请选择年月')
+    return
+  }
+  
+  try {
+    // 获取用户选择的日期
+    const selectedDate = new Date(bfExportDate.value)
+    // 手动增加一个月
+    selectedDate.setMonth(selectedDate.getMonth() + 1)
+    // 格式化为 YYYY-MM
+    const formattedDate = selectedDate.toISOString().slice(0, 7)
+    
+    // 调用接口获取数据
+    const response = await getPrintdata({
+      date: formattedDate
+    })
+    
+    if (response.code !== 0) {
+      ElMessage.error('获取数据失败: ' + (response.msg || '未知错误'))
+      return
+    }
+    
+    const data = response.data || []
+    
+    if (data.length === 0) {
+      ElMessage.warning('该月暂无数据')
+      bfExportVisible.value = false
+      return
+    }
+    
+    // 准备导出数据
+    const filename = `报废印版_${formattedDate}.xlsx`
+    
+    // 处理数据:修改表头名称并删除 UniqID 列
+    const processedData = data.map(item => {
+      const newItem = {}
+      for (const key in item) {
+        // 修改表头名称
+        let newKey = key
+        if (key === 'Sys_id') {
+          newKey = '创建人员'
+        } else if (key === 'Sys_rq') {
+          newKey = '创建日期'
+        } else if (key === 'Mod_rq') {
+          newKey = '修改日期'
+        } else if (key === 'UniqID') {
+          // 删除 UniqID 列
+          continue
+        }
+        newItem[newKey] = item[key]
+      }
+      return newItem
+    })
+    
+    // 将数据转换为表格格式
+    const ws = XLSX.utils.json_to_sheet(processedData)
+    const wb = XLSX.utils.book_new()
+    XLSX.utils.book_append_sheet(wb, ws, '报废印版')
+    
+    // 导出
+    const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' })
+    
+    try {
+      FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename)
+      ElMessage.success('导出成功')
+    } catch (e) {
+      console.error('导出失败:', e)
+      ElMessage.error('导出失败')
+    }
+    
+    bfExportVisible.value = false
+  } catch (error) {
+    console.error('请求失败:', error)
+  }
+}
+
 const onsync = async() => {
   try {
     // 并行请求两个接口

+ 311 - 74
src/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue

@@ -2,7 +2,7 @@
   <el-dialog
     :model-value="modelValue"
     fullscreen
-    :title="props.title"
+    :title="dynamicTitle"
     destroy-on-close
     :before-close="() => emits('update:modelValue', false )"
   >
@@ -35,6 +35,18 @@
             class="chart3"
             autoresize
             :option="option3"
+            @click="handleChart3Click"
+          />
+        </el-row>
+
+        <el-row
+          style="height: 20vh"
+        >
+          <v-chart
+            class="chart4"
+            autoresize
+            :option="option4"
+            @click="handleChart4Click"
           />
         </el-row>
 
@@ -142,10 +154,37 @@ import { CanvasRenderer } from 'echarts/renderers'
 import { BarChart, LineChart, PieChart, ScatterChart } from 'echarts/charts'
 import { GridComponent, LegendComponent, TitleComponent, TooltipComponent } from 'echarts/components'
 import VChart, { THEME_KEY } from 'vue-echarts'
-import { defineEmits, defineProps, provide, ref } from 'vue'
+import { defineEmits, defineProps, provide, ref, computed, onMounted, onUnmounted, watch } from 'vue'
 
 const props = defineProps(['modelValue', 'title','formData'])
-const emits = defineEmits(['update:modelValue'])
+const emits = defineEmits(['update:modelValue', 'navigateBack', 'xunchaVisible'])
+
+// 动态生成title
+const dynamicTitle = computed(() => {
+  if (!currentFrequency.value || !props.formData) return props.title || '';
+  
+  // 格式化日期时间
+  const date = new Date(currentFrequency.value);
+  const month = String(date.getMonth() + 1).padStart(2, '0');
+  const day = String(date.getDate()).padStart(2, '0');
+  const time = currentFrequency.value.split(' ')[1].substring(0, 5);
+  const dateTimeStr = `${month}-${day} `;
+  
+  // 提取设备信息
+  const machineInfo = props.formData.machine || '';
+  
+  // 提取工单和印件信息
+  const orderNo = props.formData.工单编号 || '';
+  const yjno = props.formData.印件号 || '';
+  const productName = props.formData.产品名称 || '';
+  const orderProductStr = `${orderNo}-->${yjno}${productName ? `(${productName})` : ''}`;
+  
+  // 提取工序信息
+  const gyName = props.formData.工序名称 || '';
+  const gyStr = gyName.split('【')[0] || '';
+  
+  return `【${dateTimeStr}】【${machineInfo}】【${orderProductStr}】【${gyStr}】`;
+});
 
 use([
   CanvasRenderer,
@@ -184,21 +223,7 @@ const handleBtnActive = async(e) => {
   }
 }
 
-// const prevClick = async() => {
-// 	if(currentFrequency.value.split(' ')[1].substring(0,2)=='08'){
-// 		let previousDay = new Date(currentFrequency.value); // 创建一个表示当前时间的Date对象
-// 		previousDay.setDate(previousDay.getDate() - 1); // 将日期设置为前一天
-// 		let year = previousDay.getFullYear();
-// 		let month = previousDay.getMonth() + 1;
-// 		let day = previousDay.getDate();
-// 		currentFrequency.value=`${year}-${month}-${day} 20:30:00`
-// 		console.log(currentFrequency.value); // 输出前一天日期
-// 	}else{
-// 		let now = currentFrequency.value.split(' ')[0]
-// 		currentFrequency.value=`${now} 08:30:00`
-// 	}
-// 	GetMachineDetail()
-// }
+
 const prevClick = async() => {
     if (currentFrequency.value.split(' ')[1].substring(0, 2) === '08') {
         // 当前是白班,切换到前一天夜班
@@ -213,20 +238,7 @@ const prevClick = async() => {
     await GetMachineDetail(); // 重新获取数据并更新图表
 };
 
-// const nextClick = async() => {
-// 	if(currentFrequency.value.split(' ')[1].substring(0,2)=='20'){
-// 		let nextDay = new Date(currentFrequency.value); // 创建一个表示当前时间的Date对象
-// 		nextDay.setDate(nextDay.getDate() + 1); // 将日期设置为后一天
-// 		let year = nextDay.getFullYear();
-// 		let month = nextDay.getMonth() + 1;
-// 		let day = nextDay.getDate();
-// 		currentFrequency.value=`${year}-${month}-${day} 08:30:00`
-// 	}else{
-// 		let now = currentFrequency.value.split(' ')[0]
-// 		currentFrequency.value=`${now} 20:30:00`
-// 	}
-// 	GetMachineDetail()
-// }
+
 const nextClick = async() => {
     if (currentFrequency.value.split(' ')[1].substring(0, 2) === '20') {
         // 当前是夜班,切换到下一天白班
@@ -340,42 +352,66 @@ const isDayShift = currentFrequency.value.split(' ')[1].substring(0, 2) === '08'
 
 		    },
 		  }
+		  // 找到最后一个有数据的索引
+		  let lastDataIndex = -1;
+		  for (let i = data.length - 1; i >= 0; i--) {
+			if (data[i][1] > 0) {
+				lastDataIndex = i;
+				break;
+			}
+		  }
+		  
 		  option2.value={
-			  xAxis: {
-				type: 'category',
-				axisLabel: {
-				  interval: 59, // 控制显示的刻度标签间隔,每小时一个
-				},
+		  xAxis: {
+			type: 'category',
+			axisLabel: {
+			  interval: 59, // 控制显示的刻度标签间隔,每小时一个
+			},
         data: data.map(item => item[0]), // 使用动态生成的 X 轴数据
-			  },
-			  yAxis: {
-				name: '实时产量',
-				nameLocation: 'end',
-				nameGap: 5,
-				nameTextStyle: {
-				  align: 'left',
-				  verticalAlign: 'bottom',
-				}
-			  },
-			  grid: {
-				left: '8%',
-				right: '2%',
-				top: '22%',
-				bottom: '15%',
-			  },
-			  tooltip: {
-				trigger: 'axis'
-			  },
-			  series: {
-				name: '速度',
-				type: 'line',
-				data: data,
-			  },
-			  textStyle: {
-				fontWeight: 'bolder',
-				fontSize: 16,
-			  },
+		  },
+		  yAxis: {
+			name: '实时产量',
+			nameLocation: 'end',
+			nameGap: 5,
+			nameTextStyle: {
+			  align: 'left',
+			  verticalAlign: 'bottom',
 			}
+		  },
+		  grid: {
+			left: '8%',
+			right: '2%',
+			top: '22%',
+			bottom: '15%',
+		  },
+		  tooltip: {
+			trigger: 'axis'
+		  },
+		  series: {
+			name: '产量',
+			type: 'bar',
+			data: data.map((item, index) => {
+				if (index === lastDataIndex) {
+					return {
+						value: item[1],
+						itemStyle: {
+							color: '#ff0000'
+						},
+						emphasis: {
+							itemStyle: {
+								color: '#ff0000'
+							}
+						}
+					};
+				}
+				return item[1];
+			}),
+		  },
+		  textStyle: {
+			fontWeight: 'bolder',
+			fontSize: 16,
+		  },
+		}
 			response.data.首件.map(item=>{
 				timeData.value.push([item.split(' ')[1].substring(0,5),'首件与过程'])
 			})
@@ -417,21 +453,107 @@ const isDayShift = currentFrequency.value.split(' ')[1].substring(0, 2) === '08'
 			    bottom: '15%',
 			  },
 			  series: {
-			    type: 'scatter',
-			    symbol: 'arrow',
-			    symbolSize: 20,
-			    label: {
-			      show: true,
-			      position: 'right',
-			      formatter: '{@value}' // 点旁边显示label,这里使用name: '横坐标'这样写也可以,鼠标移入出现提示。
-			    },
-			    data: timeData.value,
+				type: 'scatter',
+				symbol: 'arrow',
+				symbolSize: 20,
+				label: {
+					show: true,
+					position: 'right',
+					formatter: '{@value}' // 点旁边显示label,这里使用name: '横坐标'这样写也可以,鼠标移入出现提示。
+				},
+				data: timeData.value.map((item, index) => {
+					if (index === timeData.value.length - 1) {
+						return {
+							value: item,
+							itemStyle: {
+								color: '#ff0000'
+							},
+							emphasis: {
+								itemStyle: {
+									color: '#ff0000'
+								}
+							}
+						};
+					}
+					return item;
+				}),
+				emphasis: {
+					focus: 'series'
+				}
 			  },
 			  textStyle: {
 			    fontWeight: 'bolder',
 			    fontSize: 16,
 			  },
 			}
+			// 处理 chart4 数据 - 现场巡查记录
+			const patrolData = [];
+			response.data['现场巡查记录'].map(item => {
+				patrolData.push([item.split(' ')[1].substring(0, 5), '现场巡查']);
+			});
+			option4.value = {
+			  xAxis: {
+				axisLabel: {
+				  interval: 59, // 控制显示的刻度标签间隔,每小时一个
+				},
+				data: data.map(item => item[0]), // 使用动态生成的 X 轴数据
+			  },
+			  yAxis: {
+				name: '巡查时间',
+				nameLocation: 'end',
+				nameGap: 5,
+				nameTextStyle: {
+				  align: 'left',
+				  verticalAlign: 'bottom'
+				},
+				axisLine: {
+				  show: true,
+				},
+				data: ['现场巡查'],
+			  },
+			  tooltip: {
+				trigger: 'item'
+			  },
+			  grid: {
+				left: '8%',
+				right: '2%',
+				top: '22%',
+				bottom: '15%',
+			  },
+			  series: {
+				type: 'scatter',
+				symbol: 'arrow',
+				symbolSize: 20,
+				label: {
+					show: true,
+					position: 'right',
+					formatter: '{@value}'
+				},
+				data: patrolData.map((item, index) => {
+					if (index === patrolData.length - 1) {
+						return {
+							value: item,
+							itemStyle: {
+								color: '#ff0000'
+							},
+							emphasis: {
+								itemStyle: {
+									color: '#ff0000'
+								}
+							}
+						};
+					}
+					return item;
+				}),
+				emphasis: {
+					focus: 'series'
+				}
+			  },
+			  textStyle: {
+				fontWeight: 'bolder',
+				fontSize: 16,
+			  },
+			}
 	}
 }
 
@@ -496,6 +618,31 @@ const Worklist = async () => {
 	GetMachineDetail()
 }
 Worklist()
+
+// 处理图表3的点击事件
+const handleChart3Click = (params) => {
+	console.log('handleChart3Click called');
+	console.log('params:', params);
+	console.log('params.dataIndex:', params.dataIndex);
+	console.log('timeData.value.length:', timeData.value.length);
+	// 检查是否点击的是最后一个数据点
+	if (params.dataIndex === timeData.value.length - 1) {
+		console.log('Emitting navigateBack event');
+		// 触发navigateBack事件
+		emits('navigateBack');
+	}
+};
+
+// 处理图表4的点击事件
+const handleChart4Click = (params) => {
+	console.log('handleChart4Click called');
+	console.log('params:', params);
+	console.log('params.dataIndex:', params.dataIndex);
+	console.log('params.value:', params.value);
+	// 直接触发xunchaVisible事件,不进行条件判断
+	console.log('Emitting xunchaVisible event');
+	emits('xunchaVisible');
+};
 const xAxisData = data.map(item => item?.[0])
 
 const option2 = ref({
@@ -581,6 +728,96 @@ const option3 = ref({
   },
 })
 
+const option4 = ref({
+  xAxis: {
+    axisLabel: {
+      interval: 59, // 控制显示的刻度标签间隔,每小时一个
+    },
+    data: xAxisData,
+  },
+  yAxis: {
+    name: '巡查时间',
+    nameLocation: 'end',
+    nameGap: 5,
+    nameTextStyle: {
+      align: 'left',
+      verticalAlign: 'bottom'
+    },
+    axisLine: {
+      show: true,
+    },
+    data: ['现场巡查'],
+  },
+  tooltip: {
+    trigger: 'item'
+  },
+  grid: {
+    left: '8%',
+    right: '2%',
+    top: '22%',
+    bottom: '15%',
+  },
+  series: {
+    type: 'scatter',
+    symbol: 'arrow',
+    symbolSize: 20,
+    label: {
+      show: true,
+      position: 'right',
+      formatter: '{@value}'
+    },
+    data: [],
+  },
+  textStyle: {
+    fontWeight: 'bolder',
+    fontSize: 16,
+  },
+})
+
+// 自动刷新功能
+let refreshTimer = null
+
+const startRefreshTimer = () => {
+  // 清除之前的定时器
+  if (refreshTimer) {
+    clearInterval(refreshTimer)
+  }
+  // 设置新的定时器,每15分钟刷新一次
+  refreshTimer = setInterval(() => {
+    GetMachineDetail()
+  }, 15 * 60 * 1000)
+}
+
+const stopRefreshTimer = () => {
+  if (refreshTimer) {
+    clearInterval(refreshTimer)
+    refreshTimer = null
+  }
+}
+
+// 监听弹窗打开/关闭状态
+watch(() => props.modelValue, (newValue) => {
+  if (newValue) {
+    // 弹窗打开时,启动定时器
+    startRefreshTimer()
+  } else {
+    // 弹窗关闭时,停止定时器
+    stopRefreshTimer()
+  }
+})
+
+// 组件挂载时启动定时器
+onMounted(() => {
+  if (props.modelValue) {
+    startRefreshTimer()
+  }
+})
+
+// 组件卸载时停止定时器
+onUnmounted(() => {
+  stopRefreshTimer()
+})
+
 </script>
 
 <style scoped>

+ 89 - 7
src/view/performance/chejianbaogong.vue

@@ -676,6 +676,29 @@
 					  
 					</el-table>
 				  </el-tab-pane>
+				   
+				  <el-tab-pane label="检验记录" @click="loadInspectionRecords" name="third">
+					<div style="width: 100%; overflow-x: auto;">
+						<el-table
+							tooltip-effect="dark"
+							:data="inspectionRecordsData"
+							row-key="ID"
+							highlight-current-row="true"
+							:show-overflow-tooltip="true"
+							border
+							style="width: 100%; height: 60vh; min-width: 900px;">
+							<el-table-column prop="工单编号" label="工单编号" width="120" />
+							<el-table-column prop="印件号" label="印件号" width="80" />
+							<el-table-column prop="工序名称" label="工序名称" width="200" />
+							<el-table-column prop="类别" label="类别" width="100" />
+							<el-table-column prop="流程单号" label="流程单号" width="80" />
+							<el-table-column prop="检验项目" label="检验项目" width="150" />
+							<el-table-column prop="检验结果" label="检验结果" width="80" />
+							<el-table-column prop="量测仪器" label="量测仪器" width="100" />
+							<el-table-column prop="提交时间" label="提交时间" width="180" />
+						</el-table>
+					</div>
+				  </el-tab-pane>
 				  
 				</el-tabs>
 			  </div>
@@ -2263,6 +2286,8 @@
 			v-model="dialogSbyxgl"
 			:title="titleinfo"
 			:formData="formData"
+			@navigate-back="handleNavigateBack"
+			@xuncha-visible="handleXunchaVisible"
 		  />
 
 		  <el-dialog v-model="GetDedhVisible" id="tableFplb" @keydown="ent($event)" style="margin-top: 5%;"  >
@@ -2370,6 +2395,7 @@
 	fieldInspectionRecord,
 	InspectionItemAdd,
 	ProcessInspectionRecordsItem,
+	ProcessInspectionRecord,
 	MachineDetailList,
 	facilityPrintGetTab,
 	facilityPrintDetail,
@@ -3001,7 +3027,7 @@ const warningres = (arr) => {
 	  let llyg = {
 			  '自备':'自备',
 			  '张杭强':1024,
-			  '李当林':2019,
+			  '李当林':1124,
 		  }
 	  switch(falg){
 		  case 'create':
@@ -3262,6 +3288,7 @@ const warningres = (arr) => {
   const huanxingStatus=ref(0)
   const yinbantreeData=ref([])
   const fujiaselectData=ref([])
+  const inspectionRecordsData=ref([])
   const searchInfo = ref({})
   const onHxadd = () => {
 	huanxingstatus.value=true
@@ -3764,10 +3791,17 @@ const yinbaninvertSelection = () => {
 		  xunchaData.value.product_name=response.data.product_name
 		  xunchaData.value.gxmc=response.data.gxmc
 		  xunchaData.value.lcdh=0
-		  xunchaData.value.sczl_bh=''
+		  xunchaData.value.sczl_bh='' 
 		  xunchaData.value.sczl_name=''
 		  xunchaData.value.remark=''
 		  zhichengVisible.value = true;
+		  // 自动聚焦到左侧菜单栏第一个数据
+		  setTimeout(() => {
+			  if (zhichengtreeData.value && zhichengtreeData.value.length > 0) {
+				  const firstNode = zhichengtreeData.value[0];
+				  zhichengNodeClick(firstNode);
+			  }
+		  }, 100);
 	  }
   }
   
@@ -4772,6 +4806,8 @@ const yinbaninvertSelection = () => {
 			zhichengVisible.value=false
 			zhibiaoselectData.value=[]
 			fujiaselectData.value=[]
+			// 打开设备状态弹窗
+			dialogSbyxgl.value=true
 	  }
   }
   const closedianjianDialog = async () => {
@@ -4782,6 +4818,24 @@ const yinbaninvertSelection = () => {
   const closezhichengDialog = async () => {
 	  zhichengVisible.value=false
   }
+  // 处理返回事件
+  function handleNavigateBack() {
+	  console.log('handleNavigateBack called in chejianbaogong');
+	  dialogSbyxgl.value=false
+	  // 直接打开制程检验弹窗
+	  console.log('Opening zhichengVisible in chejianbaogong');
+	  onzhicheng();
+//	  console.log('zhichengVisible.value:', zhichengVisible.value);
+  }
+  // 处理巡查事件
+  function handleXunchaVisible() {
+	  console.log('handleXunchaVisible called in chejianbaogong');
+	  dialogSbyxgl.value=false
+	  // 直接打开巡查弹窗
+	  console.log('Opening xunchaVisible in chejianbaogong');
+	  onxuncha();
+	  console.log('xunchaVisible.value:', xunchaVisible.value);
+  }
   
   //获取机台生产信息
   const ReportProduceInfo = async (value,inputName) => {
@@ -4792,11 +4846,18 @@ const yinbaninvertSelection = () => {
 	  xunchaData.value.product_name=response.data.product_name
 	  xunchaData.value.gxmc=response.data.gxmc
 	  xunchaData.value.lcdh=0
-	  xunchaData.value.sczl_bh=''
-	  xunchaData.value.sczl_name=''
-	  xunchaData.value.remark=''
+	  xunchaData.value.sczl_bh='' 
+	  xunchaData.value.sczl_name='' 
+	  xunchaData.value.remark='' 
 	  FieldInspectionRecord()
 	  xunchaVisible.value=true
+	  // 自动聚焦到左侧菜单栏第一个数据
+	  setTimeout(() => {
+		  if (xunchatreeData.value && xunchatreeData.value.length > 0) {
+			  const firstNode = xunchatreeData.value[0];
+			  xunchaNodeClick(firstNode);
+		  }
+	  }, 100);
 	}
   }
   // 假设 xunchaselectData 是一个 ref 对象
@@ -4887,6 +4948,8 @@ const yinbaninvertSelection = () => {
 	if (response.code === 0) {
 		successres('提交成功')
 		xunchaVisible.value=false
+		// 跳转到机台状态页面
+		onstatus();
 	}
   }
   
@@ -4958,11 +5021,13 @@ const yinbaninvertSelection = () => {
 	}
   };
   const category =ref()
-  const zhichengNodeClick = (node, check) => {
+  const zhichengNodeClick = async (node, check) => {
 	  if(node.label){
 		  zhichengstatus.value=true
 		  category.value=node.label
-		  processInspectionRecordsItem()
+		  await processInspectionRecordsItem()
+		  // 同时获取检验记录数据
+		  await loadInspectionRecords()
 	  }
   };
   const processInspectionRecordsItem = async (value) => {
@@ -6281,6 +6346,23 @@ const handleFplbClick = (nodeData, node, component) => {
   }
 };
   
+const loadInspectionRecords = async () => {
+	let time = new Date();
+	// 格式化日期为 YYYY-MM-DD 格式
+	const year = time.getFullYear();
+	const month = String(time.getMonth() + 1).padStart(2, '0');
+	const day = String(time.getDate()).padStart(2, '0');
+	const formattedDate = `${year}-${month}-${day}`;
+	// 保持机台名称包含 # 符号
+	const machineName = JTMC;
+	// 提取班组信息,A班传A,B班传B
+	const team = BZMC.value.charAt(0);
+	const response = await ProcessInspectionRecord({ machine: machineName, date: formattedDate, team: team });
+	if (response.code === 0) {
+		inspectionRecordsData.value = response.data;
+	}
+};
+  
   </script>
   <style scoped>
   /* 设备作业清单 正在生产中 背景颜色 */

+ 93 - 14
src/view/quality/management.vue

@@ -8,9 +8,25 @@
         </div>
       </el-aside>
       <el-container>
-		  
+	  
         <el-main>
-
+          <el-table ref="multipleTable" style="width: 100%;height: 70vh" tooltip-effect="dark"
+                    :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                    :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                    :data="tableData"  border row-key="工单编号"
+                    size="small"
+                    highlight-current-row="true"
+                    @row-click="tableRowClick" :show-overflow-tooltip="true">
+            <el-table-column  sortable align="center" label="类别" prop="类别"  width="120" />
+            <el-table-column  sortable align="center" label="工单编号" prop="工单编号"  width="120" />
+            <el-table-column  sortable align="center" label="印件号" prop="印件号"  width="100" />
+            <el-table-column  sortable align="center" label="工序名称" prop="工序名称"  width="200" />
+            <el-table-column  sortable align="center" label="流程单号" prop="流程单号"  width="100" />
+            <el-table-column  sortable align="center" label="班组编号" prop="班组编号"  width="100" />
+            <el-table-column  sortable align="center" label="检验项目" prop="检验项目"  width="150" />
+            <el-table-column  sortable align="center" label="检验备注" prop="检验备注"  width="150" />
+            <el-table-column  sortable align="center" label="提交时间" prop="提交时间"  width="180" />
+          </el-table>
         </el-main>
       </el-container>
     </el-container>
@@ -18,17 +34,9 @@
 </template>
 <script setup>
 import {
-  getDepartment,
-  getMachineInfo
-} from '@/api/mes/job'
-import {
-  createCompany,
-  deleteCompany,
-  deleteCompanyByIds,
-  updateCompany,
-  findCompany,
-  getCompanyList
-} from '@/api/company'
+  ManagementInspectionMenu,
+  ManagementInspectionList,
+} from '@/api/jixiaoguanli/jitairibaobiao'
 // 全量引入格式化工具 请按需保留
 import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
 import { ElMessage, ElMessageBox } from 'element-plus'
@@ -40,6 +48,75 @@ defineOptions({
     name: 'Company'
 })
 
+// =========== 获取左侧树形结构 ===========
+const treeData = ref([])
+const defaultProps = {
+  children: 'children',
+  label: 'label'
+}
+
+const getMenuData = async () => {
+  try {
+    const response = await ManagementInspectionMenu();
+    console.log("左侧菜单列表↓");
+    console.log(response);
+    const formattedData = [];
+    for (const category in response.data) {
+      // 对日期进行去重处理
+      const uniqueDates = [...new Set(response.data[category])];
+      // 对日期进行倒序排序
+      const sortedDates = uniqueDates.sort((a, b) => new Date(b) - new Date(a));
+      const categoryNode = {
+        label: category, // 使用机台号作为节点标签
+        children: sortedDates.map(item => ({
+          label: item, // 将日期作为子节点标签
+          machine: category, // 存储机台号
+          date: item // 存储日期
+        }))
+      };
+      formattedData.push(categoryNode);
+    }
+    treeData.value = formattedData;
+  } catch (error) {
+    console.error(error)
+  }
+}
+getMenuData();
+
+// 表格数据
+const tableData = reactive([]);
+
+//点击左侧树形 获取右侧table列表
+const handleNodeClick = async (node) => {
+  // 只处理叶子节点(包含machine和date属性的节点)
+  if (node.machine && node.date) {
+    console.log("点击的节点:", node);
+    await getInspectionList(node.machine, node.date);
+  }
+};
+
+// 获取巡查列表数据
+const getInspectionList = async (machine, date) => {
+  try {
+    const response = await ManagementInspectionList({ machine, date });
+    console.log("右侧表格数据↓");
+    console.log(response);
+    if (response.code === 0) {
+      tableData.splice(0, tableData.length, ...response.data);
+    } else {
+      ElMessage({ type: 'error', message: '获取数据失败' });
+    }
+  } catch (error) {
+    console.error(error);
+    ElMessage({ type: 'error', message: '网络错误' });
+  }
+};
+
+// 表格行点击事件
+const tableRowClick = (row) => {
+  console.log("点击的行:", row);
+};
+
 </script>
 
 <style>
@@ -55,6 +132,8 @@ defineOptions({
   background-color: #fff;
   padding: 10px;
   margin-right: 20px;
+  max-height: 70vh;
+  overflow-y: auto;
 }
 
 .JKWTree-tree h3 {
@@ -66,4 +145,4 @@ defineOptions({
 .JKWTree-content {
   flex: 1;
 }
-</style>
+</style>

+ 102 - 21
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -62,7 +62,7 @@
           <el-dialog v-model="cpgyfzlist" title="产品工艺复制"  style="width: 35%;top: 15%;">
               <el-form-item label="参照产品代号:" prop="process" class="mab">
                 <el-input disabled v-model="cpgyfzformData['process']" id="process" @keydown="add_cpgyfzent($event, 'fzybzl', 'process', 'processName')"   style="width: 160px;"/>
-                <el-input disabled v-model="cpgyfzformData['processName']" id="processName" @keydown="add_cpgyfzent($event, 'process', 'processName', 'gongyifa')"  style="width: 360px;"/>
+                <el-input disabled v-model="cpgyfzformData['processName']" id="processName" @keydown="add_cpgyfzent($event, 'process', 'processName', 'gongyifa')"  style="width: 560px;"/>
               </el-form-item>
 
             <el-form-item label="参照工艺方案:" prop="originalName" class="mab">
@@ -73,7 +73,7 @@
 
             <el-form-item label="目标产品代号:" prop="process" class="mab">
               <el-input v-model="cpgyfzformData['mubprocess']" id="mubprocess" @keydown="add_cpgyfzent($event, 'gongyifa', 'mubprocess', 'mubprocessName')"   style="width: 160px;"/>
-              <el-input disabled v-model="cpgyfzformData['mubprocessName']" id="mubprocessName" @keydown="add_cpgyfzent($event, 'mubprocess', 'mubprocessName', 'fzgyzl')"  style="width: 360px;"/>
+              <el-input disabled v-model="cpgyfzformData['mubprocessName']" id="mubprocessName" @keydown="add_cpgyfzent($event, 'mubprocess', 'mubprocessName', 'fzgyzl')"  style="width: 560px;"/>
             </el-form-item>
 <!--            cpgyfzformData.fzgyzl === true-->
             <el-form-item label="" class="mab" >
@@ -710,7 +710,7 @@
           <el-tabs v-model="activeName" @tab-click="handleClick" class="ta">
 
             <el-tab-pane label="印件资料"  @click="showTable('印件资料')"  name="first">
-              <el-table ref="multipleTable"
+              <el-table ref="yjTable"
                         :show-overflow-tooltip="true"
                         highlight-current-row="true"
                         :row-style="{ height: '20px' }"
@@ -736,7 +736,7 @@
             </el-tab-pane>
 
             <el-tab-pane label="工艺资料" @click="showTable('工艺资料')" name="second">
-              <el-table ref="multipleTable"
+              <el-table ref="gyTable"
                         highlight-current-row="true"
                         :show-overflow-tooltip="true"
                         :row-style="{ height: '20px' }"
@@ -2672,7 +2672,12 @@ const tableRowClick = async (row) => {
 };
 const yjSelection = ref('')
 const gySelection = ref('')
+const yjSelectedItems = ref([])  // 保存选中的印件资料详细信息
+const gySelectedItems = ref([])  // 保存选中的工艺资料详细信息
+const yjTable = ref(null)  // 印件资料表格引用
+const gyTable = ref(null)  // 工艺资料表格引用
 // 印件资料多选、工艺资料多选
+
 const selectionChange = (selection, type) => {
   const ids = selection.map(item => {
 	  if(type === '印件资料'){
@@ -2686,9 +2691,11 @@ const selectionChange = (selection, type) => {
   console.log(ids)
   if (type === '印件资料') {
     yjSelection.value = ids.join(',')
+    yjSelectedItems.value = selection  // 保存选中项
   }
   if (type === '工艺资料') {
     gySelection.value = ids.join(',')
+    gySelectedItems.value = selection  // 保存选中项
   }
 }
 // ===========删除印件资料、工艺资料 ===========
@@ -2696,30 +2703,104 @@ const delgd_delclick = async () => {
   console.log(yjSelection.value)
   console.log(gySelection.value)
 
-  if (yjSelection.value !== '') {
-    try {
-      const res1 = await PrintlDel({UniqId: yjSelection.value})
-      res1.code === 0 && ElMessage.success('印件资料删除成功')
-	  GetInfo()
-    } catch(err) {
-      ElMessage.error(err)
-    }
+  if (yjSelection.value === '' && gySelection.value === '') {
+    ElMessage.warning('请选择要删除的资料')
+    return
+  }
+
+  let confirmMsg = '确定要删除\n'
+  
+  if (yjSelectedItems.value.length > 0) {
+    confirmMsg += '【印件资料】\n'
+    yjSelectedItems.value.forEach((item, index) => {
+      confirmMsg += `  ${index + 1}. ${item.yj_yjmc || '未知'}\n`
+    })
   }
-  if (gySelection.value !== ''){
-    try {
-
-      const res2 = await ProcessDel({UniqId: gySelection.value,sys_id:userStore.userInfo.nickName})
-      res2.code === 0 && ElMessage.success('工艺资料删除成功')
-	  GetInfo()
-    } catch(err) {
-      ElMessage.error(err)
+  
+  if (gySelectedItems.value.length > 0) {
+    if (yjSelectedItems.value.length > 0) {
+      confirmMsg += '\n'
     }
+    confirmMsg += '【工艺资料】\n'
+    gySelectedItems.value.forEach((item, index) => {
+      const gxh = item.Gy0_gxh || item['工序'] || '未知工序号'
+      const gxmc = item.combinedProp2 || item.add_gxmc || '未知工序名称'
+      confirmMsg += `  ${gxh}-${gxmc}\n`
+    })
   }
+  confirmMsg += '吗?\n'
+  
+  await ElMessageBox.confirm(
+    confirmMsg.replace(/\n/g, '<br/>'),
+    '提示',
+    {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning',
+      dangerouslyUseHTMLString: true
+    }
+  ).then(async () => {
+    const deletePromises = []
+    
+    if (yjSelection.value !== '') {
+      deletePromises.push(
+        PrintlDel({UniqId: yjSelection.value})
+          .then(res => {
+            if (res.code === 0) {
+              ElMessage.success('印件资料删除成功')
+            } else {
+              ElMessage.error('印件资料删除失败')
+            }
+          })
+          .catch(err => {
+            ElMessage.error('印件资料删除失败')
+          })
+      )
+    }
+    
+    if (gySelection.value !== '') {
+      deletePromises.push(
+        ProcessDel({UniqId: gySelection.value, sys_id: userStore.userInfo.nickName})
+          .then(res => {
+            if (res.code === 0) {
+              ElMessage.success('工艺资料删除成功')
+            } else {
+              ElMessage.error('工艺资料删除失败')
+            }
+          })
+          .catch(err => {
+            ElMessage.error('工艺资料删除失败')
+          })
+      )
+    }
+    
+    await Promise.all(deletePromises)
+    
+    yjtableData.value = []
+    gytableData.value = []
+    yjSelection.value = ''
+    yjSelectedItems.value = []
+    gySelection.value = ''
+    gySelectedItems.value = []
+    
+    await nextTick()
+    
+    if (yjTable.value) {
+      yjTable.value.clearSelection()
+    }
+    if (gyTable.value) {
+      gyTable.value.clearSelection()
+    }
+    
+    GetInfo()
+  }).catch(() => {
+    ElMessage.info('已取消删除')
+  })
+}
 
   // const getProductData_data = await getProductData({product_code:_Gd_gdbh.value});
   // yjtableData.splice(0, yjtableData.length, ...getProductData_data.data.yjData);
   // gytableData.splice(0, gytableData.length, ...getProductData_data.data.gyData);
-}
 //搜索查询
 const searchInfo = ref('')
 //点击【查询】按钮

+ 110 - 25
src/view/yunyin/chanpinziliao/hhbiaozhungongdan.vue

@@ -563,7 +563,7 @@
               <!-- 印件资料列表、工艺资料列表、BOM资料列表  -->
               <el-tabs v-model="activeName" @tab-click="handleClick">
                 <el-tab-pane label="印件资料"  @click="showTable('印件资料')"  name="first">
-                  <el-table ref="multipleTable"
+                  <el-table ref="yjTable"
                             :row-style="{ height: '20px' }"
                             :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                             :header-cell-style="{ padding: '0px' }"
@@ -589,7 +589,7 @@
                 </el-tab-pane>
   
                 <el-tab-pane label="工艺资料" @click="showTable('工艺资料')" name="second">
-                  <el-table ref="multipleTable"
+                  <el-table ref="gyTable"
                             :row-style="{ height: '20px' }"
                             :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                             :header-cell-style="{ padding: '0px' }"
@@ -4482,6 +4482,11 @@
   const gdSelection = ref('')
   const yjSelection = ref('')
   const gySelection = ref('')
+  const gdSelectedItems = ref([])  // 保存选中的工单资料详细信息
+  const yjSelectedItems = ref([])  // 保存选中的印件资料详细信息
+  const gySelectedItems = ref([])  // 保存选中的工艺资料详细信息
+  const yjTable = ref(null)  // 印件资料表格引用
+  const gyTable = ref(null)  // 工艺资料表格引用
   // 印件资料多选、工艺资料多选
   const selectionChange = (selection, type) => {
     const ids = selection.map(item => {
@@ -4489,9 +4494,11 @@
     })
     if (type === '印件资料') {
       yjSelection.value = ids.join(',')
+      yjSelectedItems.value = selection
     }
     if (type === '工艺资料') {
       gySelection.value = ids.join(',')
+      gySelectedItems.value = selection
     }
   }
   const handleSelectionChange = (selection, type) => {
@@ -4502,41 +4509,99 @@
     })
     console.log(ids.join(','))
     gdSelection.value = ids.join(',')
+    gdSelectedItems.value = selection  // 保存选中的工单项目
   }
   
   // ===========删除工单资料 ===========
   const delgdzl_onclick = async () => {
     console.log(gdSelection.value)
-    if (gdSelection.value !== '') {
-      try {
-        console.log(_Gd_gdbh.value)
-        console.log(gdSelection.value)
-        const res1 = await WorkOrderDel({UniqId: gdSelection.value,sys_id: userStore.userInfo.nickName})
-        if(res1.code === 0){
-          ElMessage.success('工单删除成功')
-  
-          console.log(_Gd_khdh.value)
-          const WorkListdata = await WorkList({Gd_khdh:_Gd_khdh.value,limit:pageSize.value,page:page.value});
-          console.log(WorkListdata)
-          tableData.splice(0,tableData.length,...WorkListdata.data.data);//表格数据
-          total.value =WorkListdata.data.total;//共多少条
-          yjtableData.value = [];
-          gytableData.value = [];
-          bomtableData.value = [];
+    
+    let confirmMsg = '确定要删除\n'
+    
+    if (gdSelectedItems.value.length > 0) {
+      confirmMsg += '【工单资料】\n'
+      gdSelectedItems.value.forEach((item, index) => {
+        const gdbh = item['工单编号'] || item.gdbh || '未知'
+        const cpname = item['产品名称'] || item['成品名称'] || '未知'
+        confirmMsg += `  ${index + 1}. 工单编号:${gdbh} 成品名称:${cpname}\n`
+      })
+    }
+    confirmMsg += '吗?\n'
+    
+    await ElMessageBox.confirm(
+      confirmMsg.replace(/\n/g, '<br/>'),
+      '提示',
+      {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        dangerouslyUseHTMLString: true
+      }
+    ).then(async () => {
+      if (gdSelection.value !== '') {
+        try {
+          console.log(_Gd_gdbh.value)
+          console.log(gdSelection.value)
+          const res1 = await WorkOrderDel({UniqId: gdSelection.value,sys_id: userStore.userInfo.nickName})
+          if(res1.code === 0){
+            ElMessage.success('工单删除成功')
+
+            console.log(_Gd_khdh.value)
+            const WorkListdata = await WorkList({Gd_khdh:_Gd_khdh.value,limit:pageSize.value,page:page.value});
+            console.log(WorkListdata)
+            tableData.splice(0,tableData.length,...WorkListdata.data.data);//表格数据
+            total.value =WorkListdata.data.total;//共多少条
+            yjtableData.value = [];
+            gytableData.value = [];
+            bomtableData.value = [];
+          }
+
+        } catch(err) {
+          ElMessage.error(err)
         }
-  
-      } catch(err) {
-        ElMessage.error(err)
       }
-    }
+    }).catch(() => {
+      ElMessage.info('已取消删除')
+    })
   }
   
   
   // ===========删除印件资料、工艺资料 ===========
   const delgd_delclick = async () => {
-    console.log(yjSelection.value)
-    console.log(gySelection.value)
-    if (yjSelection.value !== '') {
+    
+    let confirmMsg = '确定要删除\n'
+    
+    if (yjSelectedItems.value.length > 0) {
+      confirmMsg += '【印件资料】\n'
+      yjSelectedItems.value.forEach((item, index) => {
+        confirmMsg += `  ${index + 1}. ${item['印件名称'] || '未知'}\n`
+      })
+    }
+    
+    if (gySelectedItems.value.length > 0) {
+      if (yjSelectedItems.value.length > 0) {
+        confirmMsg += '\n'
+      }
+      confirmMsg += '【工艺资料】\n'
+      gySelectedItems.value.forEach((item, index) => {
+        const gxh = item['工序号'] || '未知工序号'
+        const gxmc = item['工序名称'] || '未知工序名称'
+        confirmMsg += `  ${gxh}-${gxmc}\n`
+      })
+    }
+    confirmMsg += '吗?\n'
+    
+    await ElMessageBox.confirm(
+      confirmMsg.replace(/\n/g, '<br/>'),
+      '提示',
+      {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        dangerouslyUseHTMLString: true
+      }
+    ).then(async () => {
+      if (yjSelection.value !== '') {
       try {
         const res1 = await PrintDetailDel({UniqId: yjSelection.value})
         res1.code === 0 && ElMessage.success('印件资料删除成功')
@@ -4554,9 +4619,29 @@
     }
   
     const workOrderListDetail_data = await workOrderListDetail({Gd_gdbh:_Gd_gdbh.value});
+
+    yjtableData.value = []
+    gytableData.value = []
+    yjSelection.value = ''
+    yjSelectedItems.value = []
+    gySelection.value = ''
+    gySelectedItems.value = []
+
+    await nextTick()
+
+    if (yjTable.value) {
+      yjTable.value.clearSelection()
+    }
+    if (gyTable.value) {
+      gyTable.value.clearSelection()
+    }
+
     yjtableData.value = workOrderListDetail_data.data.printList;
     gytableData.value = workOrderListDetail_data.data.processList;
     bomtableData.value = workOrderListDetail_data.data.BOM;
+    }).catch(() => {
+      ElMessage.info('已取消删除')
+    })
   }
   
   //点击技术附件按钮

+ 369 - 44
src/view/yunyin/huheguanli/huhebaogong.vue

@@ -10,6 +10,8 @@
 				<!-- <el-button type="primary" size="large" class="bt" style="color:white;font-size: 16px;font-weight: bold;width: 90px"  @click="onchanliang"  v-if="zdtreeType === true" >日产量上报</el-button> -->
 				<el-button type="primary" class="bt" @click="openRoleDialog" v-if="AddType === true">糊盒角色</el-button>
 				<el-button type="primary" class="bt" @click="openTeamDialog" v-if="AddType === true">糊盒班组</el-button>
+				<el-button type="primary" class="bt" @click="gyAddDialog" v-if="AddType === true">新增</el-button>
+				<el-button type="primary" class="bt" @click="gyDeleteDialog"  v-if="DelType === true" >删除</el-button>
                 <!-- <el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
                 <el-button type="primary" class="bt" icon="download" @click="mxToExcel" >导出到Excel(明细)</el-button> -->
               </el-form-item>
@@ -623,7 +625,26 @@
 			  <el-row :gutter="24" style="height: 40px;">
 				<el-col :span="6">
 				  <el-form-item label="工单编号:" prop="flatFeed" class="mab" >
-				   <el-input v-model="gyformdata.工单编号" id="工单编号"  @blur="getCPMCsubmit()" @keydown="ent1($event)"   />
+				   <el-select
+						v-model="gyformdata.工单编号"
+						id="工单编号"
+						placeholder="请输入或选择工单"
+						style="width: 100%;"
+						@change="gyHandleWorkOrderChange"
+						filterable
+						remote
+						:remote-method="gySearchWorkOrders"
+						:loading="gyWorkOrderLoading"
+						clearable
+						:default-first-option="true"
+					>
+						<el-option
+							v-for="item in gyWorkOrderOptions"
+							:key="item.value"
+							:label="item.label"
+							:value="item.value"
+						/>
+					</el-select>
 				  </el-form-item>
 				</el-col>
 				<el-col :span="18">
@@ -637,7 +658,23 @@
 			<el-row :gutter="24" style="height: 40px;">
 			  <el-col :span="10">
 			    <el-form-item label="工序名称:" prop="flatFeed" class="mab">
-			    <el-input v-model="gyformdata.gxmc" id="工序名称" @focus="gxmcHandleFocus()" @blur="getGXsubmit()" @keydown="ent1($event)" style="width: 350px;"  />
+			      <el-select
+			        v-model="gyformdata.gxmc"
+			        id="工序名称"
+			        placeholder="请选择工序"
+			        style="width: 350px;"
+			        @change="handleGyGxmcBlur"
+			        :loading="gyProcessLoading"
+			        filterable
+			        clearable
+			      >
+			        <el-option
+			          v-for="item in gyProcessOptions"
+			          :key="item.value"
+			          :label="item.label"
+			          :value="item.value"
+			        />
+			      </el-select>
 			    <el-input v-model="gyformdata.gxh" id="工序号"  :readonly=true :clearable="true" style="width: 80px;" />
 			    </el-form-item>
 			  </el-col>
@@ -659,13 +696,14 @@
 				  <el-form-item label="机器:"  class="mab" prop="remark">
 				    <el-select v-model="gyformdata.sczl_jtbh" 
 				               id="机器"  @keydown="ent1($event)" @change="jtbh_change()"
-				               style="flex: 1; height: auto; width: 100px;">
+				               style="flex: 1; height: auto; width: 200px;"
+							   :loading="gyMachineLoading"
+							   filterable>
 				      <el-option
-				          v-for="(item, index) in gdzl_MachineList_address.data"
-				          :key="index"
-				          :label="item.split('->')[0].trim()"
-				          :value="item.split('->')[0].trim()">
-				        {{ item }}
+				          v-for="item in gyMachineOptions"
+				          :key="item.value"
+				          :label="item.label"
+				          :value="item.value">
 				      </el-option>
 				    </el-select>
 				  </el-form-item>
@@ -717,9 +755,14 @@
 
 			  <el-row :gutter="24">
 			    <el-col :span="8">
-			      <el-form-item label="加工联数:" prop="flatFeed" class="mab" >
-			      <el-input v-model="gyformdata.联数" id="加工联数"  @keydown="ent1($event)"  style="width: 100px; margin-right: 30px;" />
+			      <el-form-item :label="gyLsLabel + ':'" prop="flatFeed" class="mab" >
+			      <el-input v-model="gyformdata.联数" :id="gyLsLabel"  @keydown="ent1($event)"  style="width: 100px; margin-right: 30px;" />
 				  </el-form-item>
+			    </el-col>
+				<el-col :span="6">
+			      <el-form-item label="来料异常:" prop="flatFeed" class="mab">
+			  				  <el-input v-model="gyformdata.来料异常" id="来料异常" @keydown="ent1($event)"  style="width: 200px;" />
+			      </el-form-item>
 			    </el-col>
 				<el-col :span="6">
 			      <el-form-item label="来料数量:" prop="flatFeed" class="mab">
@@ -772,10 +815,15 @@
 			      <el-input v-model="gyformdata.设备运行工时"  id="设备运行工时"  @keydown="ent1($event)" style="width: 100px;" />
 			      </el-form-item>
 			    </el-col>
-			  	<el-col :span="5" style="margin-top:0px; margin-bottom: 1px;">
+			  	<!-- <el-col :span="5" style="margin-top:0px; margin-bottom: 1px;">
 			  	<el-form-item label="定额代号" prop="id" style="margin-top:0px; margin-bottom: 1px;">
 			  		<el-input v-model="gyformdata.dedh" id="定额代号" readonly style="margin-top:0px; margin-bottom: 1px;"  @keydown="ent1($event)"  placeholder="" />
 			  	</el-form-item>
+			  	</el-col> -->
+			  	<el-col :span="5" style="margin-top:0px; margin-bottom: 1px;">
+			  	<el-form-item label="日定额" style="margin-top:0px; margin-bottom: 1px;">
+			  		<el-input v-model="gyformdata.dedh" id="定额代号" type="number" style="margin-top:0px; margin-bottom: 1px;"  @keydown="ent1($event)"  placeholder="请输入数字" />
+			  	</el-form-item>
 			  	</el-col>
 
           <el-col :span="4">
@@ -1474,8 +1522,8 @@
   <script setup>
   // 全量引入格式化工具 请按需保留
   import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
-  import { getTab,getGluingClassLList,GetProduction,setMachineTeam,AddGluingReportData,getGluingReportDataList,getGluingReportDataDetail,getGluingReportDetailUpdate,UpdateGluingReportClass,getGluingcoleTab, getGluingcoleList,GluingReportList, getGluingcoleDetail, getGluingcoleDetaiEdit, UpdateGluingcoleStatus, 
-	saveGluingcoleDetail, AddGluingClass, UpdateGluingClass,getGluingcole} from '@/api/mes/huhejob'
+  import { getTab,getGluingClassLList,GetProduction,setMachineTeam,AddGluingReportData,getGluingReportDataList,getGluingReportDataDetail,getGluingReportDetailUpdate,UpdateGluingReportClass,deleteGluingReportData,getGluingcoleTab, getGluingcoleList,GluingReportList, getGluingcoleDetail, getGluingcoleDetaiEdit, UpdateGluingcoleStatus, 
+	saveGluingcoleDetail, AddGluingClass, UpdateGluingClass,getGluingcole,getWorkOrderList,getMachineList,gitProcessList} from '@/api/mes/huhejob'
   import {
   facilityProduction,
   facilityWorklist,
@@ -1488,7 +1536,7 @@
   import {ref, reactive,watch,computed} from 'vue'
   import { useUserStore } from '@/pinia/modules/user'
   import { exportExcelFile } from '@/utils/excel'
-  import {ElMessage} from "element-plus";
+  import {ElMessage, ElMessageBox} from "element-plus";
 // import { el } from 'element-plus/es/locale';
   defineOptions({name: 'Company'})
 
@@ -1602,32 +1650,15 @@ const handleNodeClick = (nodeData,node) => {
 	  else if (nodeData.level === 3) {
 		  CJMC.value=nodeData.parentNode.parentNode.label
 		  JTMC=nodeData.machineName.split("-")[0]
-		  // 等于TH开头的机台
-		//   if (/^TH.+/.test(JTMC)) {
-		// 	  isTHJT.value = true
-		// 	  JTMCOn.value=false
-		// 	  dateOn.value=true
-		// 	  FacilityInspect()
-		// 	  JPmachineDetails(JTMC, nodeData.label);
-			  
-		// 	  nodedate=node.label
-		// 	  JPgytableData.value=[]
-		// 	  showbutton.value=false
-		// 	  DelType.value = true
-		// 	  AddType.value = true
-		//   } else {
 			  isTHJT.value = false
 			  JTMCOn.value=false
 			  dateOn.value=true
 			  nodedate.value=node.label
 			  gytableData.value=[]
 			  showbutton.value=false
-			//   FacilityInspect()
 			  FacilitychanLiang()
-        DelType.value = false
-        AddType.value = false
-		//   }
-		 
+        DelType.value = true
+        AddType.value = true
 	   }
 }
 
@@ -2112,7 +2143,7 @@ for (let i = 0; i < 30; i++) {
 		endTime: formData3.value.下机时间||'',
 		sczl_rq: formData3.value.日期,
 		sczl_ls: formData3.value.Gy0_ls,
-		sczl_dedh: formData3.value.定额代号,
+		sczl_dedh: formData3.value.dedh,
 		工价系数: formData3.value.工价系数||1,
 		保养工时: formData3.value.保养工时,
 		装版工时: formData3.value.装版工时,
@@ -2212,6 +2243,31 @@ const formatOtherFields = (item) => {
 //   }
 }
 
+// 加工联数label变量(用于修改弹窗)
+const gyLsLabel = ref('加工联数')
+
+// 加工联数label更新方法
+const updateGyLsLabel = (gxmc) => {
+  if (gxmc && gxmc.startsWith('手工')) {
+    if (gxmc === '手工贴片' || gxmc === '手工贴磁铁') {
+      gyLsLabel.value = '加工片数'
+    } else if (gxmc === '手工打孔') {
+      gyLsLabel.value = '孔数'
+    } else if (gxmc === '手工拆片') {
+      gyLsLabel.value = '加工联数'
+    } else {
+      gyLsLabel.value = '加工联数'
+    }
+  } else {
+    gyLsLabel.value = '加工联数'
+  }
+}
+
+// 修改弹窗工序名称blur处理
+const handleGyGxmcBlur = () => {
+  updateGyLsLabel(gyformdata.value.gxmc)
+}
+
 const gyformdata = ref({
   工单编号: '',
   cpmc: '',
@@ -2250,6 +2306,7 @@ const gyformdata = ref({
   bzdh: '',
   role: '',
   price: '',
+  Uid: '',
   // 初始化组员数据结构
   组员1: { 角色:'', 编号: '', 姓名: '', 比例: '' },
   组员2: { 角色:'', 编号: '', 姓名: '', 比例: '' },
@@ -2284,8 +2341,100 @@ const gyformdata = ref({
 })
 
 const gychanliangVisible = ref(false)
+const type2 = ref('edit')
+const selectedGyRows = ref([])
+
+const selectionChange = (val) => {
+	selectedGyRows.value = val
+}
+
+const gyAddDialog = async () => {
+	type2.value = 'create'
+	const selectDate = nodedate.value || new Date().toISOString().split('T')[0]
+	
+	await getGyMachineList(CJMC.value)
+	
+	Object.assign(gyformdata.value, {
+		工单编号: '',
+		cpmc: '',
+		yjno: '',
+		yjmc: '',
+		gxmc: '',
+		gxh: '',
+		gymc: '',
+		rq: selectDate + ' 00:00:00',
+		starttime: selectDate + ' 00:00:00',
+		num: '',
+		sj1: '',
+		sj2: selectDate + ' 23:59:59',
+		色度数: '',
+		联数: '',
+		产量: '',
+		制程废品: '',
+		制程次品: '',
+		前工序废: '',
+		来料异常: '',
+		装版总工时: '',
+		装版工时: '',
+		打样总工时: '',
+		打样工时: '',
+		保养工时: '',
+		异常总工时: '',
+		异常类型: '',
+		异常补时: '',
+		通电工时: '',
+		dedh: '',
+		码包: '',
+		码开始行: '',
+		码结束行: '',
+		主电表: '',
+		辅电表: '',
+		bzdh: '',
+		role: '',
+		price: '',
+		sczl_jtbh: JTMC,
+		班组: '',
+		Uid: '',
+		来料数量: '',
+		异常工时: '',
+		设备运行工时: '',
+		上机时间: selectDate + ' 08:00:00',
+		组员1: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员2: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员3: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员4: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员5: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员6: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员7: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员8: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员9: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员10: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员11: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员12: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员13: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员14: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员15: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员16: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员17: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员18: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员19: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员20: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员21: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员22: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员23: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员24: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员25: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员26: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员27: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员28: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员29: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+		组员30: { 角色:'', 编号: '', 姓名: '', 比例: '' },
+	})
+	gychanliangVisible.value = true
+}
 
 const gytableDatadoubleClick = async(row) => {
+	type2.value = 'edit'
   console.log('双击行数据:', row)
   GYID.value = row.Uid
   try {
@@ -2369,6 +2518,7 @@ const gytableDatadoubleClick = async(row) => {
       gyformdata.value = {
         ...gyformdata.value, // 保留初始结构
         ...apiData, // 覆盖API数据
+        Uid: row.Uid,
         cpmc: apiData.产品名称 || '',
 		sczl_jtbh:JTMC,
         yjno: apiData.印件号 || '',
@@ -2405,6 +2555,9 @@ const gytableDatadoubleClick = async(row) => {
         })
       }
       
+      // 根据工序名称更新加工联数的label
+      updateGyLsLabel(gyformdata.value.gxmc)
+      
       gychanliangVisible.value = true
     } else {
       console.error('获取数据失败:', res.msg)
@@ -2530,9 +2683,10 @@ const handleBzConfirm = async () => {
 const gychanliangenterDialog = async(row) => {
 	console.log(gyformdata.value)
   // return;
-	const params = {
+	const baseParams = {
 		sczl_gdbh: gyformdata.value.工单编号,
 		sczl_gxmc: gyformdata.value.gxmc,
+		来料异常: gyformdata.value.来料异常,
 		来料数量: gyformdata.value.来料数量,
 		sczl_cl: gyformdata.value.产量,
 		sczl_zcfp: gyformdata.value.制程废品,
@@ -2540,7 +2694,7 @@ const gychanliangenterDialog = async(row) => {
 		endTime: gyformdata.value.sj2,
 		sczl_rq: gyformdata.value.rq,
 		sczl_ls: gyformdata.value.联数,
-		sczl_dedh: gyformdata.value.定额代号,
+		sczl_dedh: gyformdata.value.dedh,
 		工价系数: gyformdata.value.工价系数,
 		保养工时: gyformdata.value.保养工时,
 		装版工时: gyformdata.value.装版工时,
@@ -2549,8 +2703,7 @@ const gychanliangenterDialog = async(row) => {
 		设备运行工时: gyformdata.value.设备运行工时,
 		sczl_jtbh:gyformdata.value.sczl_jtbh,
     sczl_bzdh:gyformdata.value.班组,
-		id: gyformdata.value.Uid,
-    role: gyformdata.value.role,
+		sys_id: userStore.userInfo.nickName,
     price: gyformdata.value.price,
     bh1: gyformdata.value.组员1['编号'],
     bh2: gyformdata.value.组员2['编号'],
@@ -2612,18 +2765,34 @@ const gychanliangenterDialog = async(row) => {
     rate28: gyformdata.value.组员28['比例'],
     rate29: gyformdata.value.组员29['比例'],
     rate30: gyformdata.value.组员30['比例'],
-
-
-
 	}
+	
+	let params;
+	if(type2.value === 'create'){
+		params = baseParams
+	}else{
+		params = {
+			...baseParams,
+			id: gyformdata.value.Uid,
+			role: gyformdata.value.role
+		}
+	}
+	
 	console.log(params)
-	const res = await getGluingReportDetailUpdate(params)
+	
+	let res;
+	if(type2.value === 'create'){
+		res = await AddGluingReportData(params)
+	}else{
+		res = await getGluingReportDetailUpdate(params)
+	}
+	
 	if(res.code === 0){
-		ElMessage.success('修改成功');
+		ElMessage.success(type2.value === 'create' ? '新增成功' : '修改成功');
 		FacilitychanLiang()
 		gychanliangVisible.value = false
 	}else{
-		ElMessage.error('修改失败');
+		ElMessage.error(type2.value === 'create' ? '新增失败' : '修改失败');
 	}
 }
 
@@ -2631,6 +2800,29 @@ const gycloseDialog = () => {
 	gychanliangVisible.value = false
 }
 
+const gyDeleteDialog = async() => {
+	if(selectedGyRows.value.length === 0){
+		ElMessage.warning('请先勾选要删除的数据');
+		return;
+	}
+	
+	ElMessageBox.confirm('确定要删除选中的报工数据吗?', '提示', {
+		confirmButtonText: '确定',
+		cancelButtonText: '取消',
+		type: 'warning'
+	}).then(async() => {
+		const ids = selectedGyRows.value.map(row => row.Uid);
+		const res = await deleteGluingReportData({id: ids.join(',')})
+		if(res.code === 0){
+			ElMessage.success('删除成功');
+			FacilitychanLiang();
+		}else{
+			ElMessage.error('删除失败');
+		}
+	}).catch(() => {
+		ElMessage.info('已取消删除');
+	})
+}
 
 
 
@@ -2640,6 +2832,139 @@ const gdzl_MachineList_address = reactive({
   data: []
 });
 
+const gyMachineOptions = ref([])
+const gyMachineLoading = ref(false)
+
+const gyProcessOptions = ref([])
+const gyProcessLoading = ref(false)
+
+const gyWorkOrderOptions = ref([])
+const gyWorkOrderLoading = ref(false)
+const gyWorkOrderCache = ref({})
+let gyWorkOrderSearchTimer = null
+
+const getGyMachineList = async (workshopName) => {
+	if (!workshopName) {
+		gyMachineOptions.value = []
+		gyProcessOptions.value = []
+		return
+	}
+	
+	try {
+		gyMachineLoading.value = true
+		gyProcessLoading.value = true
+		
+		const [machineResponse, processResponse] = await Promise.all([
+			getMachineList({ search: workshopName }),
+			gitProcessList({ search: workshopName })
+		])
+		
+		if (machineResponse.code === 0) {
+			const machineData = machineResponse.data || {}
+			const formattedMachines = Object.entries(machineData).map(([key, value]) => ({
+				value: key,
+				label: `${key}-${value}`,
+				machineName: value
+			}))
+			
+			gyMachineOptions.value = formattedMachines
+		} else {
+			gyMachineOptions.value = []
+		}
+		
+		if (processResponse.code === 0) {
+			const processData = processResponse.data || []
+			const formattedProcesses = processData.map(item => ({
+				value: item,
+				label: item
+			}))
+			
+			gyProcessOptions.value = formattedProcesses
+		} else {
+			gyProcessOptions.value = []
+		}
+	} catch (error) {
+		console.error('获取机台和工序列表失败:', error)
+		gyMachineOptions.value = []
+		gyProcessOptions.value = []
+	} finally {
+		gyMachineLoading.value = false
+		gyProcessLoading.value = false
+	}
+}
+
+const gySearchWorkOrders = async (query) => {
+	const trimmedQuery = query ? query.trim() : ''
+	
+	if (!trimmedQuery || trimmedQuery.length < 4) {
+		gyWorkOrderOptions.value = []
+		return
+	}
+	
+	if (gyWorkOrderSearchTimer) {
+		clearTimeout(gyWorkOrderSearchTimer)
+	}
+	
+	gyWorkOrderSearchTimer = setTimeout(async () => {
+		try {
+			gyWorkOrderLoading.value = true
+			
+			if (gyWorkOrderCache.value[query]) {
+				gyWorkOrderOptions.value = gyWorkOrderCache.value[query]
+				gyWorkOrderLoading.value = false
+				return
+			}
+			
+			const response = await getWorkOrderList({
+				search: query.trim()
+			})
+			
+			if (response.code === 0) {
+				const data = response.data || []
+				
+				const uniqueWorkOrders = []
+				const seenOrders = new Set()
+				
+				data.forEach(item => {
+					if (!seenOrders.has(item['工单编号'])) {
+						seenOrders.add(item['工单编号'])
+						uniqueWorkOrders.push({
+							value: item['工单编号'],
+							label: item['工单编号'],
+							productName: item['产品名称'],
+							originalData: item
+						})
+					}
+				})
+				
+				gyWorkOrderOptions.value = uniqueWorkOrders
+				gyWorkOrderCache.value[query] = uniqueWorkOrders
+			} else {
+				gyWorkOrderOptions.value = []
+			}
+		} catch (error) {
+			console.error('搜索工单失败:', error)
+			gyWorkOrderOptions.value = []
+		} finally {
+			gyWorkOrderLoading.value = false
+		}
+	}, 500)
+}
+
+const gyHandleWorkOrderChange = (selectedOrder) => {
+	if (!selectedOrder) {
+		gyformdata.value.cpmc = ''
+		return
+	}
+	
+	const selectedWorkOrder = gyWorkOrderOptions.value.find(item => item.value === selectedOrder)
+	if (selectedWorkOrder) {
+		gyformdata.value.cpmc = selectedWorkOrder.productName || ''
+	} else {
+		gyformdata.value.cpmc = ''
+	}
+}
+
 
 
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 805 - 31
src/view/yunyin/huheguanli/huhechejianbaogong.vue


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 787 - 138
src/view/yunyin/huheguanli/huhetiming.vue


+ 14 - 12
src/view/yunyin/huheguanli/huheyuangongrigongzi.vue

@@ -409,10 +409,8 @@ const tableCols1 = [
   { label: '员工姓名', prop: '员工姓名', width: '105' },
   { label: '日期', prop: '日期', width: '120' },
   { label: '计件工资', prop: '计件工资', width: '105' },
-  // { label: '加班工资', prop: '加班工资', width: '105' },
-  // { label: '计时时数', prop: '计时时数', width: '105' },
-  // { label: '计时工资', prop: '计时工资', width: '135' },
-  // { label: '日工资合计', prop: '日工资合计', width: '135' },
+  { label: '计时工资', prop: '计时工资', width: '105' },
+  { label: '日工资总和', prop: '日工资总和', width: '135' },
   { label: '月工资总和', prop: '月工资总和', width: '135' },
 ]
 const tableCols2 = [
@@ -423,11 +421,12 @@ const tableCols2 = [
   { label: '机台编号', prop: 'sczl_jtbh', width: '105' },
   { label: '分配比例', prop: '分配比例', width: '105' },
   { label: '产量', prop: 'sczl_cl', width: '135' },
-  { label: '计件单价', prop: 'price', width: '105' },
-  // { label: '班组换算产量', prop: '班组换算产量', width: '135' },
-  // { label: '工序难度系数', prop: '工序难度系数', width: '135' },
-  // { label: '个人计件工资', prop: '个人计件工资', width: '135' },
-  // { label: '个人加班工资', prop: '个人加班工资', width: '135' },
+  { label: '计件单价', prop: '计件单价', width: '105' },
+  { label: '个人计件工资', prop: '计件工资', width: '135' },
+  { label: '计时单价', prop: '计时单价', width: '135' },
+  { label: '计时备注', prop: '计时备注', width: '135' },
+  { label: '计时工资', prop: '计时工资', width: '135' },
+  { label: '计时时长', prop: '计时时长', width: '135' },
   { label: '装版工时', prop: '装版工时', width: '120' },
   { label: '保养工时', prop: '保养工时', width: '105' },
   // { label: '打样工时', prop: '打样工时', width: '105' },
@@ -549,6 +548,8 @@ const getTableData = async () => {
               '员工姓名': employee.姓名,
               '日期': daily.日期,
               '计件工资': daily.计件工资,
+              '计时工资': daily.计时工资,
+              '日工资总和': daily.日工资总和,
               '月工资总和': '', // 每日明细不显示月总和
               'rowType': 'daily', // 标识行类型
             });
@@ -589,7 +590,7 @@ const generateSummaryData = (data) => {
         '加班工资': 0,
         '计时时数': 0,
         '计时工资': 0,
-        '日工资合计': 0
+        '日工资总和': 0
       };
       currentName = name;
     }
@@ -600,7 +601,7 @@ const generateSummaryData = (data) => {
     currentSummary['加班工资'] += parseFloat(item['加班工资']);
     currentSummary['计时时数'] += parseFloat(item['计时时数']);
     currentSummary['计时工资'] += parseFloat(item['计时工资']);
-    currentSummary['日工资合计'] += parseFloat(item['日工资合计']);
+    currentSummary['日工资总和'] += parseFloat(item['日工资总和']);
 	currentSummary['员工姓名']='合计('+currentSummary['日期']+'天)';
   });
 
@@ -615,7 +616,7 @@ const generateSummaryData = (data) => {
 	summary['加班工资'] = summary['加班工资'].toFixed(2);
 	summary['计时时数'] = summary['计时时数'].toFixed(2);
 	summary['计时工资'] = summary['计时工资'].toFixed(2);
-	summary['日工资合计'] = summary['日工资合计'].toFixed(2);
+	summary['日工资总和'] = summary['日工资总和'].toFixed(2);
   });
 
   return summaryData;
@@ -696,6 +697,7 @@ const Getlocate = async () => {
               '员工姓名': employee.姓名,
               '日期': daily.日期,
               '计件工资': daily.计件工资,
+              '计时工资': daily.计时工资,
               '月工资总和': '', // 每日明细不显示月总和
               'rowType': 'daily', // 标识行类型
               'employeeId': employee.员工编号,

+ 32 - 1
src/view/yunyin/shengchanguanli/PrintingPlateRequisition.vue

@@ -110,6 +110,9 @@
     destroy-on-close
     :width="'40%'"  
     :style="{ minWidth: '700px' }"
+    draggable
+    :append-to-body="true"
+    class="dialog-plate"
   >
     <el-form :model="Plate" label-width="120px">
       <el-row :gutter="20">
@@ -178,7 +181,11 @@
     title="印版印数"
     :width="'20%'"  
     :style="{ minWidth: '200px' }"
+    draggable
+    :append-to-body="true"
+    class="dialog-withdraw"
   >
+    <div style="padding-bottom: 10px; color: #999; font-size: 14px;">胶印柔板请填写次数</div>
     <el-form-item label="印数">
       <el-input v-model="Plate.印数" type="number" placeholder="请输入印数" />
     </el-form-item>
@@ -250,7 +257,7 @@
   // 全量引入格式化工具 请按需保留
   import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
   
-  import {ref, reactive,nextTick} from 'vue'
+  import {ref, reactive,nextTick, watch} from 'vue'
   import * as XLSX from 'xlsx'
   import FileSaver from 'file-saver'
   import dayjs, { Dayjs } from 'dayjs';
@@ -434,6 +441,30 @@ const transformData = (data) => {
     const orderSelectDialogVisible = ref(false)
     const machineSelectDialogVisible = ref(false)
 
+    watch(dialogPlateVisible, async (val) => {
+      if (val) {
+        await nextTick()
+        const dialogEl = document.querySelector('.dialog-plate .el-dialog')
+        if (dialogEl) {
+          dialogEl.style.transform = ''
+          dialogEl.style.left = ''
+          dialogEl.style.top = ''
+        }
+      }
+    })
+
+    watch(dialogwithdrawVisible, async (val) => {
+      if (val) {
+        await nextTick()
+        const dialogEl = document.querySelector('.dialog-withdraw .el-dialog')
+        if (dialogEl) {
+          dialogEl.style.transform = ''
+          dialogEl.style.left = ''
+          dialogEl.style.top = ''
+        }
+      }
+    })
+
     // 表格引用
     const orderTableRef = ref(null)
     const machineTableRef = ref(null)

+ 761 - 0
src/view/yunyin/shengchanguanli/WorkshopInformationStatistics.vue

@@ -0,0 +1,761 @@
+<template>
+    <div>
+      <layout>
+        <layout-header>
+          <div class="">
+            <el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule" >
+              <el-form-item>
+                <el-button type="primary" class="bt" icon="edit" @click="openAddDialog">新增</el-button>
+                <el-button type="primary" class="bt" icon="edit" @click="openEditDialog" :disabled="selectedIds.length === 0">修改</el-button>
+                <el-button type="danger" class="bt" icon="delete" @click="batchDeleteFunc" :disabled="selectedIds.length === 0">批量删除</el-button>
+                <el-button type="primary" class="bt" icon="download" @click="hzToExcel">导出到Excel</el-button>
+              </el-form-item>
+            </el-form>
+          </div>
+        </layout-header>
+
+        <layout>
+          <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
+            <div class="JKWTree-tree" style="height: 200px">
+              <h3>车间生产信息统计</h3>
+              <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
+                <template #default="{ node, data }">
+                  <div :style="{ color: selectedDate === data.date || selectedDate === data.month || selectedDate === data.year ? 'red' : '' }">
+                    {{ node.label }}
+                  </div>
+                </template>
+              </el-tree>
+            </div>
+          </layout-sider>
+
+          <layout-content >
+          <el-main>
+            <div class="gva-table-box">
+              <el-table ref="multipleTable" style="width: 100%;height: 65vh" tooltip-effect="dark"
+                        :row-style="{ height: '25px' }"  :header-cell-style="{ padding: '0px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :data="tableData" border row-key="id"
+                        size="small"
+                        highlight-current-row
+                        :current-row-key="currentRowKey"
+                        @row-click="tableRowClick" :show-overflow-tooltip="true"
+                        @selection-change="handleSelectionChange">
+                <el-table-column type="selection" width="40" :selectable="checkSelectable" />
+                <el-table-column align="center" label="车间" prop="车间" width="100" />
+                <el-table-column align="center" label="机组" prop="机组" width="130" />
+                <el-table-column align="center" label="机台编号" prop="机台编号" width="120" />
+                <el-table-column align="center" label="机台名称" prop="机台名称" width="150" />
+                <el-table-column align="center" label="班组" prop="班组" width="80" />
+                <el-table-column align="center" label="日期" prop="sczl_rq" width="120" />
+                <el-table-column align="center" label="理论速度" prop="theoretical_speed" width="100" />
+                <el-table-column align="center" label="计划生产时间" prop="scheduled_production" width="120" />
+                <el-table-column align="center" label="计划保养时间" prop="scheduled_maintenance" width="120" />
+                <el-table-column align="center" label="计划交接班时间" prop="scheduled_handover" width="140" />
+                <el-table-column align="center" label="设备故障时间" prop="fault" width="120" />
+                <el-table-column align="center" label="换型时间" prop="changeover" width="100" />
+                <el-table-column align="center" label="打样时间" prop="proofing" width="100" />
+                <el-table-column align="center" label="异常时间" prop="abnormal" width="100" />
+                <el-table-column align="center" label="计划产量" prop="planned_output" width="100" />
+                <el-table-column align="center" label="实际产量" prop="actual_output" width="100" />
+                <el-table-column align="center" label="不良品数量" prop="defective_product" width="120" />
+                <el-table-column align="center" label="操作" width="60" >
+                  <template #default="{ row }">
+                    <el-button size="small" type="danger" @click="deleteFunc(row)">删除</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+
+              <div class="gva-pagination">
+                <el-pagination layout="total, prev, pager, next" :current-page="page" :page-size="pageSize"
+                 :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
+              </div>
+            </div>
+          </el-main>
+        </layout-content>
+        </layout>
+      </layout>
+
+      <el-dialog v-model="addDialogVisible" :title="isEdit ? '修改生产信息' : '新增生产信息'" width="95%" style="top: 2%" class="add-dialog">
+        <div class="add-header">
+          <el-form-item label="日期:" class="date-form-item">
+            <el-date-picker v-model="addDate" type="date" placeholder="选择日期" style="width: 200px;" />
+          </el-form-item>
+          <span class="hint">注:每个机台自动生成A班和B班两条数据</span>
+        </div>
+        <el-table :data="addTableData" border size="small" style="width: 100%;" :height="tableHeight" @row-click="handleAddRowClick">
+            <el-table-column type="selection" width="40" />
+            <el-table-column align="center" label="车间" prop="车间" width="100" />
+            <el-table-column align="center" label="机组" prop="机组" width="100" />
+            <el-table-column align="center" label="机台编号" prop="机台编号" width="120" />
+            <el-table-column align="center" label="机台名称" prop="机台名称" width="150" />
+            <el-table-column align="center" label="班组" prop="sczl_bzdh" width="80" />
+            <el-table-column align="center" label="理论速度" width="100">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.theoretical_speed" style="width: 100%;" @input="handleNumberInput($event, row, 'theoretical_speed')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.theoretical_speed }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="计划生产时间" width="120">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.scheduled_production" style="width: 100%;" @input="handleNumberInput($event, row, 'scheduled_production')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.scheduled_production }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="计划保养时间" width="120">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.scheduled_maintenance" style="width: 100%;" @input="handleNumberInput($event, row, 'scheduled_maintenance')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.scheduled_maintenance }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="计划交接班时间" width="140">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.scheduled_handover" style="width: 100%;" @input="handleNumberInput($event, row, 'scheduled_handover')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.scheduled_handover }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="设备故障时间" width="120">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.fault" style="width: 100%;" @input="handleNumberInput($event, row, 'fault')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.fault }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="换型时间" width="100">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.changeover" style="width: 100%;" @input="handleNumberInput($event, row, 'changeover')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.changeover }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="打样时间" width="100">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.proofing" style="width: 100%;" @input="handleNumberInput($event, row, 'proofing')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.proofing }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="异常时间" width="100">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.abnormal" style="width: 100%;" @input="handleNumberInput($event, row, 'abnormal')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.abnormal }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="计划产量" width="100">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.planned_output" style="width: 100%;" @input="handleNumberInput($event, row, 'planned_output')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.planned_output }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="实际产量" width="100">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.actual_output" style="width: 100%;" @input="handleNumberInput($event, row, 'actual_output')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.actual_output }}
+                </template>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="不良品数量" width="120">
+              <template #default="{ row }">
+                <template v-if="editRowKey === row.__rowKey">
+                  <el-input v-model="row.defective_product" style="width: 100%;" @input="handleNumberInput($event, row, 'defective_product')" @click.stop />
+                </template>
+                <template v-else>
+                  {{ row.defective_product }}
+                </template>
+              </template>
+            </el-table-column>
+          </el-table>
+        <template #footer>
+          <div class="dialog-footer">
+            <div class="footer-buttons">
+              <el-button @click="closeAddDialog">取消</el-button>
+              <el-button type="primary" @click="confirmAdd">确定</el-button>
+            </div>
+          </div>
+</template>
+      </el-dialog>
+
+      <el-dialog v-model="exportDialogVisible" title="导出Excel" width="400px" style="top: 20%">
+        <div style="padding: 20px;">
+          <el-form-item label="日期:">
+            <el-date-picker v-model="exportDate" type="month" placeholder="选择月份" style="width: 100%;" />
+          </el-form-item>
+        </div>
+        <template #footer>
+          <div class="dialog-footer">
+            <div class="footer-buttons">
+              <el-button @click="exportDialogVisible = false">取消</el-button>
+              <el-button type="primary" @click="confirmExport">确定</el-button>
+            </div>
+          </div>
+        </template>
+      </el-dialog>
+    </div>
+  </template>
+  <script setup>
+  import { Layout, LayoutHeader, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+  import {PisgetMenu,PisgetList,PisgetBaseData,PisbatchAdd,PisbatchDelete,PisbatchUpdate,ToExcel} from '@/api/mes/job'
+  import {ref, reactive, onMounted} from 'vue'
+  import {ElMessage, ElMessageBox} from "element-plus";
+  import service from '@/utils/request';
+  defineOptions({name: 'WorkshopInformationStatistics'})
+const path = `${import.meta.env.VITE_BASE_PATH}:${import.meta.env.VITE_UPLOADS_PORT}`
+console.log(path)
+  const treeData = ref([])
+  const defaultProps = reactive({
+    children: 'children',
+    label: 'label'
+  })
+  const selectedDate = ref('')
+  const tableData = ref([])
+  const currentRowKey = ref(null)
+  const requestIdCounter = ref(0)
+  const page = ref(1)
+  const pageSize = ref(9999)
+  const total = ref(0)
+  const searchInfo = ref('')
+  const selectedIds = ref([])
+  const searchRule = reactive({})
+
+  const addDialogVisible = ref(false)
+  const addDate = ref('')
+  const addTableData = ref([])
+  const editRowKey = ref('')
+  const tableHeight = ref(500)
+  const isEdit = ref(false)
+  const exportDialogVisible = ref(false)
+  const exportDate = ref('')
+
+  const formatDate = (date) => {
+    if (!date) return ''
+    if (typeof date === 'string') return date
+    const d = new Date(date)
+    const year = d.getFullYear()
+    const month = String(d.getMonth() + 1).padStart(2, '0')
+    const day = String(d.getDate()).padStart(2, '0')
+    return `${year}-${month}-${day}`
+  }
+
+  const fetchMenu = async () => {
+    try {
+      const res = await PisgetMenu()
+      if (res.code === 0) {
+        const data = res.data || []
+        treeData.value = data.map(yearItem => ({
+          label: yearItem.year + '年',
+          year: yearItem.year,
+          children: (yearItem.children || []).map(monthItem => ({
+            label: monthItem.month,
+            month: monthItem.month,
+            children: (monthItem.children || []).map(day => ({
+              label: day,
+              date: day
+            }))
+          }))
+        }))
+      }
+    } catch (e) {
+      ElMessage.error('获取菜单失败')
+    }
+  }
+
+  const fetchList = async (date) => {
+    if (!date) return
+    const currentRequestId = ++requestIdCounter.value
+    tableData.value = []
+    total.value = 0
+    try {
+      const res = await PisgetList({ date })
+      if (currentRequestId !== requestIdCounter.value) return
+      if (res.code === 0) {
+        const data = res.data || []
+        const seen = new Set()
+        const uniqueData = []
+        for (const item of data) {
+          if (item.id && !seen.has(item.id)) {
+            seen.add(item.id)
+            uniqueData.push(item)
+          }
+        }
+        tableData.value = uniqueData
+        total.value = uniqueData.length
+      }
+    } catch (e) {
+      if (currentRequestId === requestIdCounter.value) {
+        ElMessage.error('获取数据失败')
+      }
+    }
+  }
+
+  const fetchBaseData = async () => {
+    try {
+      const res = await PisgetBaseData()
+      if (res.code === 0) {
+        const equipmentList = res.data || []
+        const tempData = []
+        let rowIndex = 0
+        equipmentList.forEach(item => {
+          const shiftList = item.班组列表 || ['A班', 'B班']
+          shiftList.forEach(shift => {
+            tempData.push({
+              __rowKey: `${item.机台编号}_${shift}_${rowIndex++}`,
+              车间: item.车间,
+              机组: item.机组,
+              机台编号: item.机台编号,
+              机台名称: item.机台名称,
+              sczl_jtbh: item.机台编号,
+              sczl_bzdh: shift,
+              theoretical_speed: item.理论速度 || 0,
+              scheduled_production: 0,
+              scheduled_maintenance: 0,
+              scheduled_handover: 0,
+              fault: 0,
+              changeover: 0,
+              proofing: 0,
+              abnormal: 0,
+              planned_output: 0,
+              actual_output: 0,
+              defective_product: 0
+            })
+          })
+        })
+        addTableData.value = tempData
+      }
+    } catch (e) {
+      ElMessage.error('获取机台数据失败')
+    }
+  }
+
+  const handleNodeClick = (data) => {
+    if (data.date) {
+      selectedDate.value = data.date
+      fetchList(data.date)
+    } else if (data.month) {
+      selectedDate.value = data.month
+      // fetchList(data.month)
+    } else if (data.year) {
+      selectedDate.value = data.year
+      // fetchList(data.year)
+    }
+  }
+
+  const handleNodeExpand = () => {}
+
+  const checkSelectable = (row) => {
+    return !!row.机台编号
+  }
+
+  const tableRowClick = (row) => {
+    currentRowKey.value = row.id
+  }
+
+  const handleSelectionChange = (val) => {
+    selectedIds.value = val.map(item => item.id)
+    
+  }
+
+  const handleCurrentChange = () => {}
+
+  const handleSizeChange = () => {}
+
+  const calculateTableHeight = () => {
+    const dialog = document.querySelector('.add-dialog')
+    if (dialog) {
+      const dialogHeader = dialog.querySelector('.el-dialog__header')
+      const dialogFooter = dialog.querySelector('.el-dialog__footer')
+      const addHeader = dialog.querySelector('.add-header')
+      let headerHeight = dialogHeader ? dialogHeader.offsetHeight : 60
+      let footerHeight = dialogFooter ? dialogFooter.offsetHeight : 60
+      let addHeaderHeight = addHeader ? addHeader.offsetHeight : 50
+      tableHeight.value = Math.max(dialog.clientHeight - headerHeight - footerHeight - addHeaderHeight - 20, 400)
+    }
+  }
+
+  const openAddDialog = async () => {
+    addDate.value = ''
+    editRowKey.value = ''
+    await fetchBaseData()
+    addDialogVisible.value = true
+    setTimeout(() => {
+      calculateTableHeight()
+      window.addEventListener('resize', calculateTableHeight)
+    }, 200)
+  }
+
+  const closeAddDialog = () => {
+    addDialogVisible.value = false
+    isEdit.value = false
+    window.removeEventListener('resize', calculateTableHeight)
+  }
+
+  const handleAddRowClick = (row) => {
+    if (editRowKey.value === row.__rowKey) {
+      editRowKey.value = ''
+    } else {
+      editRowKey.value = row.__rowKey
+    }
+  }
+
+  const validateNumberInput = (value) => {
+    let cleaned = value.replace(/[^\d.]/g, '')
+    const parts = cleaned.split('.')
+    if (parts.length > 2) {
+      cleaned = parts[0] + '.' + parts.slice(1).join('')
+    }
+    return cleaned
+  }
+
+  const handleNumberInput = (value, row, field) => {
+    const cleaned = validateNumberInput(value)
+    if (cleaned !== value) {
+      row[field] = cleaned
+    }
+  }
+
+  const confirmAdd = async () => {
+    if (!addDate.value) {
+      ElMessage.warning('请选择日期')
+      return
+    }
+
+    const list = addTableData.value.map(row => {
+      const data = {
+        sczl_jtbh: row.sczl_jtbh,
+        sczl_bzdh: row.sczl_bzdh,
+        sczl_rq: formatDate(addDate.value),
+        theoretical_speed: row.theoretical_speed,
+        scheduled_production: row.scheduled_production,
+        scheduled_maintenance: row.scheduled_maintenance,
+        scheduled_handover: row.scheduled_handover,
+        fault: row.fault,
+        changeover: row.changeover,
+        proofing: row.proofing,
+        abnormal: row.abnormal,
+        planned_output: row.planned_output,
+        actual_output: row.actual_output,
+        defective_product: row.defective_product
+      }
+      if (row.id) {
+        data.id = row.id
+      }
+      return data
+    })
+
+    try {
+      let res
+      if (isEdit.value) {
+        res = await PisbatchUpdate({ list, sys_id: 'admin' })
+      } else {
+        res = await PisbatchAdd({ list, sys_id: 'admin' })
+      }
+      if (res.code === 0) {
+        ElMessage.success(isEdit.value ? '修改成功' : '新增成功')
+        addDialogVisible.value = false
+        isEdit.value = false
+        selectedIds.value = []
+        window.removeEventListener('resize', calculateTableHeight)
+        if (selectedDate.value) {
+          fetchList(selectedDate.value)
+        }
+        fetchMenu()
+      } else {
+        ElMessage.error(res.msg || (isEdit.value ? '修改失败' : '新增失败'))
+      }
+    } catch (e) {
+      ElMessage.error(isEdit.value ? '修改失败' : '新增失败')
+    }
+  }
+
+  const openEditDialog = () => {
+    if (selectedIds.value.length === 0) {
+      ElMessage.warning('请至少选择一条记录进行修改')
+      return
+    }
+    const selectedRows = tableData.value.filter(item => selectedIds.value.includes(item.id))
+    if (selectedRows.length === 0) {
+      ElMessage.warning('未找到选中的记录')
+      return
+    }
+    const monthRow = selectedRows.find(row => row.query_type === 'month')
+    if (monthRow) {
+      ElMessage.warning('月汇总数据不支持编辑,请选择具体日期')
+      return
+    }
+    isEdit.value = true
+    addDate.value = selectedRows[0].sczl_rq || ''
+    addTableData.value = selectedRows.map((row, index) => ({
+      __rowKey: `${row.sczl_jtbh}_${row.sczl_bzdh}_${index}`,
+      id: row.id,
+      车间: row.车间 || '',
+      机组: row.机组 || '',
+      机台编号: row.机台编号 || '',
+      机台名称: row.机台名称 || '',
+      sczl_jtbh: row.sczl_jtbh || '',
+      sczl_bzdh: row.sczl_bzdh || '',
+      theoretical_speed: row.theoretical_speed || 0,
+      scheduled_production: row.scheduled_production || 0,
+      scheduled_maintenance: row.scheduled_maintenance || 0,
+      scheduled_handover: row.scheduled_handover || 0,
+      fault: row.fault || 0,
+      changeover: row.changeover || 0,
+      proofing: row.proofing || 0,
+      abnormal: row.abnormal || 0,
+      planned_output: row.planned_output || 0,
+      actual_output: row.actual_output || 0,
+      defective_product: row.defective_product || 0
+    }))
+    addDialogVisible.value = true
+    setTimeout(() => {
+      calculateTableHeight()
+      window.addEventListener('resize', calculateTableHeight)
+    }, 200)
+  }
+
+  const deleteFunc = async (row) => {
+    if (row.query_type === 'month') {
+      ElMessage.warning('月汇总数据不支持删除,请选择具体日期')
+      return
+    }
+    try {
+      await ElMessageBox.confirm('确定要删除这条记录吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+      const res = await PisbatchDelete({ ids: row.id, sys_id: 'admin' })
+      if (res.code === 0) {
+        ElMessage.success('删除成功')
+        if (selectedDate.value) {
+          fetchList(selectedDate.value)
+        }
+        fetchMenu()
+      } else {
+        ElMessage.error(res.msg || '删除失败')
+      }
+    } catch (e) {
+      if (e !== 'cancel') {
+        ElMessage.error('删除失败')
+      }
+    }
+  }
+
+  const batchDeleteFunc = async () => {
+    try {
+      await ElMessageBox.confirm(`确定要删除选中的 ${selectedIds.value.length} 条记录吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+      const res = await PisbatchDelete({ ids: selectedIds.value.join(','), sys_id: 'admin' })
+      if (res.code === 0) {
+        ElMessage.success('删除成功')
+        selectedIds.value = []
+        if (selectedDate.value) {
+          fetchList(selectedDate.value)
+        }
+        fetchMenu()
+      } else {
+        ElMessage.error(res.msg || '删除失败')
+      }
+    } catch (e) {
+      if (e !== 'cancel') {
+        ElMessage.error('删除失败')
+      }
+    }
+  }
+
+  const hzToExcel = () => {
+    let defaultDate = ''
+    if (selectedDate.value) {
+      if (selectedDate.value.length === 7) {
+        defaultDate = selectedDate.value
+      } else if (selectedDate.value.length === 10) {
+        defaultDate = selectedDate.value.substring(0, 7)
+      }
+    }
+    if (!defaultDate) {
+      const now = new Date()
+      const year = now.getFullYear()
+      const month = String(now.getMonth() + 1).padStart(2, '0')
+      defaultDate = `${year}-${month}`
+    }
+    exportDate.value = defaultDate
+    exportDialogVisible.value = true
+  }
+
+  const confirmExport = async () => {
+    if (!exportDate.value) {
+      ElMessage.warning('请选择日期')
+      return
+    }
+    try {
+      const month = typeof exportDate.value === 'string' ? exportDate.value : formatDate(exportDate.value).substring(0, 7)
+      const res = await ToExcel({ sys_id: 'admin', month })
+      if (res.code === 0) {
+        let url = res.data.url
+        if (url) {
+if (!url.startsWith('http')) {
+    url = `${path}/${url}`
+}
+          const link = document.createElement('a')
+          link.href = url
+          link.download = url.split('/').pop()
+          link.target = '_blank'
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link)
+          exportDialogVisible.value = false
+          ElMessage.success('导出成功')
+        } else {
+          ElMessage.warning('未获取到文件链接')
+        }
+      } else {
+        ElMessage.error(res.msg || '导出失败')
+      }
+    } catch (e) {
+      ElMessage.error('导出失败')
+    }
+  }
+
+  onMounted(() => {
+    fetchMenu()
+  })
+  </script>
+  
+  <style scoped>
+  .add-header {
+    display: flex;
+    align-items: center;
+    margin-bottom: 15px;
+    padding: 10px;
+    background-color: #f5f7fa;
+    border-radius: 4px;
+  }
+
+  .date-form-item {
+    margin-bottom: 0 !important;
+    margin-right: 15px;
+  }
+
+  .date-form-item .el-form-item__label {
+    font-weight: bold;
+    padding-right: 8px;
+  }
+
+  .add-header .hint {
+    color: #606266;
+    font-size: 13px;
+    padding-left: 10px;
+    border-left: 1px solid #e4e7ed;
+  }
+
+  :deep(.add-dialog .el-dialog__body) {
+    display: flex;
+    flex-direction: column;
+    max-height: calc(95vh - 100px);
+    overflow: hidden;
+  }
+
+  :deep(.add-dialog .el-dialog__body > .el-table) {
+    flex: 1;
+    min-height: 0;
+  }
+
+  :deep(.add-dialog .el-input__inner) {
+    text-align: center;
+  }
+
+  .dialog-footer {
+    display: flex;
+    justify-content: flex-end;
+    padding: 10px 20px;
+  }
+
+  .footer-buttons {
+    display: flex;
+    gap: 10px;
+  }
+
+  .JKWTree-container {
+    display: flex;
+  }
+  .JKWTree-tree {
+    background-color: #fff;
+    padding: 10px;
+    margin-right: 20px;
+  }
+  .JKWTree-tree h3 {
+    font-size: 15px;
+    font-weight: 700;
+    margin: 10px 0;
+  }
+  .JKWTree-content {
+    flex: 1;
+  }
+
+  :deep(.el-table__body tr.current-row) > td {
+    background: #ff80ff !important;
+  }
+  </style>
+  <style scoped>
+  :deep(.el-table td .cell) {
+    line-height: 20px !important;
+  }
+  :deep(.el-tabs__header){
+    margin-bottom: 0;
+  }
+  .search{
+    margin-left: 0px !important;
+    margin-right: 10px !important;
+  }
+  .bt{
+    margin-left: 2px !important;
+    padding: 3px !important;
+    font-size: 12px;
+  }
+  .el-tabs__header{
+    margin: 0px !important;
+  }
+  .gva-table-box{
+    padding: 0px !important;
+  }
+  .mab{
+    margin-bottom: 5px;
+  }
+  </style>
+  

+ 44 - 5
src/view/yunyin/shengchanguanli/chengpinrucang.vue

@@ -18,7 +18,7 @@
             <el-form-item>
               <el-input v-model="positionvalue" placeholder="输入工单编号或产品名称" style="width: 180px;"/>
               <el-button type="primary" class="search" icon="search" @click="onSearch"></el-button>
-              <el-button type="primary" class="bt" @click="onDel">删除</el-button>
+              <!-- <el-button type="primary" class="bt" @click="onDel">删除</el-button> -->
 			  <el-button type="primary" class="bt" @click="onSMB">入仓末板数据统计</el-button>
 			  <el-button type="primary" class="bt" @click="onDay">各日统计</el-button>
 			  <el-button type="primary" class="bt" @click="onAdd">新增</el-button>
@@ -32,8 +32,10 @@
 			  
             </el-form-item>
             <!-- 数据展示 -->
+              <!-- @row-dblclick="doubleClick" -->
+               <!-- 隐藏的双击修改 -->
             <el-table ref="multipleTable" height=68vh style="width: 100%" tooltip-effect="dark" :data="tableData" row-key="ID" @row-click="Click"
-              highlight-current-row="true" border @selection-change="handleSelectionChange" :show-overflow-tooltip="true" @row-dblclick="doubleClick">
+              highlight-current-row="true" border @selection-change="handleSelectionChange" :show-overflow-tooltip="true">
               <el-table-column type="selection" width="45" />
 			  <el-table-column align="left"   label="入仓类型" prop="入仓类型" width="90"/>
               <el-table-column align="left"   label="仓库编号" prop="仓库编号" width="85"/>
@@ -62,6 +64,11 @@
 			  <el-table-column align="left"  label="创建时间" prop="sys_rq" width="140"/>
 			  <el-table-column align="left"  label="修改时间" prop="mod_rq" width="140"/>
 			  <el-table-column align="left"  label="UNIQID" prop="UniqId" width="90"/>
+			  <el-table-column align="center" label="操作" fixed="right" width="80">
+			    <template #default="scope">
+			      <el-button type="primary" link @click.stop="onSyncLog(scope.row)">查看日志</el-button>
+			    </template>
+			  </el-table-column>
             </el-table>
             <!-- 分页 -->
             <div class="gva-pagination">
@@ -399,7 +406,27 @@
             </div>
           </el-dialog>
 
-          			<!--工单生产批次信息查询【弹窗】-->
+          			<!-- 同步日志详情弹窗 -->
+		<el-dialog v-model="syncLogVisible" title="同步日志详情" destroy-on-close width="90%">
+		  <el-table :data="syncLogData" border style="width: 100%" max-height="500">
+		    <el-table-column prop="id" label="ID" width="60" align="center" />
+		    <el-table-column prop="Gdbh" label="工单编号" width="110" align="left" />
+		    <el-table-column prop="wlbm" label="物料编码" width="120" align="left" />
+		    <el-table-column prop="Yjdh" label="印件代号" width="120" align="left" />
+		    <el-table-column prop="Yjno" label="印件号" width="70" align="center" />
+		    <el-table-column prop="yjmc" label="印件名称" min-width="280" align="left" :show-overflow-tooltip="true" />
+		    <el-table-column prop="type" label="操作类型" width="85" align="center" />
+		    <el-table-column prop="status" label="同步状态" width="90" align="center" />
+		    <el-table-column prop="status_msg" label="状态信息" min-width="150" align="left" :show-overflow-tooltip="true" />
+		    <el-table-column prop="sys_id" label="操作人" width="120" align="left" />
+		    <el-table-column prop="sys_rq" label="操作时间" width="160" align="left" />
+		  </el-table>
+		  <template #footer>
+		    <el-button @click="syncLogVisible = false">关闭</el-button>
+		  </template>
+		</el-dialog>
+
+		<!--工单生产批次信息查询【弹窗】-->
                 <el-dialog
 			v-model="scpconlist"
 			title=""
@@ -437,7 +464,8 @@ import {
   getDayList,
   mbList,
   finishedadd,
-  finishedEdit
+  finishedEdit,
+  getSyncLog
 } from '@/api/jixiaoguanli/jitairibaobiao'
 
 // 全量引入格式化工具 请按需保留
@@ -897,7 +925,7 @@ const _getOrderProcessCount = async () => {
     // 优化后的代码,使用模板字符串连接字段值并在单个数字前添加零
     const formattedYjno = item.Gy0_yjno.length === 1 ? `0${item.Gy0_yjno}` : item.Gy0_yjno;
     const formattedGxh = item.Gy0_gxh.length === 1 ? `0${item.Gy0_gxh}` : item.Gy0_gxh;
-    const concatenatedValue = `${formattedYjno}-${formattedGxh} ${item.Gy0_gxmc}`;
+    const concatenatedValue = `${formattedYjno}-${formattedGxh} ${item.Gy0_gxmc} 【${item.Add_gxmc} 】`;
     return {
       ...item,
       concatenatedData: concatenatedValue, // 使用新属性名
@@ -1527,6 +1555,17 @@ function openFolderDialog() {
 
 
 
+// ============== 同步日志详情 ===============
+const syncLogVisible = ref(false)
+const syncLogData = ref([])
+const onSyncLog = async (row) => {
+  const response = await getSyncLog({ UniqId: row.UniqId })
+  if (response.code === 0) {
+    syncLogData.value = response.data
+    syncLogVisible.value = true
+  }
+}
+
 // 生命周期钩子
 onMounted(async () => {
 });

+ 99 - 19
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -859,7 +859,7 @@
 		  v-model="zhichengVisible"
 		  title="制程检验记录"
 		  destroy-on-close
-		  width="1100px"
+		  width="1200px"
 		  style="height: 78%;"
 		>
 		  <el-row :gutter="24" style="margin-top:0px; margin-bottom: 1px;">
@@ -978,11 +978,32 @@
 		            <!-- <el-table-column prop="缺陷备注" label="缺陷及记录"  width="720"/> -->
 					
 		            <el-table-column prop="编号"  label="编号" width="80"/>
-					
-					
-		          </el-table>
-		        </el-tab-pane>
-		      </el-tabs>
+				
+				
+          </el-table>
+        </el-tab-pane>
+        
+        <el-tab-pane label="检验记录" @click="loadInspectionRecords" name="third">
+            <el-table
+                tooltip-effect="dark"
+                :data="inspectionRecordsData"
+                row-key="ID"
+                highlight-current-row="true"
+                :show-overflow-tooltip="true"
+                border
+                style="width: 100%; height: 320px; min-width: 400px;">
+                <el-table-column prop="工单编号" label="工单编号" width="110" />
+                <el-table-column prop="印件号" label="印件号" width="70" />
+                <el-table-column prop="工序名称" label="工序名称" width="120" />
+                <el-table-column prop="类别" label="类别" width="100" />
+                <el-table-column prop="流程单号" label="流程单号" width="100" />
+                <el-table-column prop="检验项目" label="检验项目" width="130" />
+                <el-table-column prop="检验结果" label="检验结果" width="100" />
+                <el-table-column prop="量测仪器" label="量测仪器" width="100" />
+                <el-table-column prop="提交时间" label="提交时间" width="160" />
+            </el-table>
+        </el-tab-pane>
+      </el-tabs>
 		    </div>
 		  </div>
 		  <template #footer>
@@ -2463,7 +2484,9 @@
 		  v-if="dialogSbyxgl"
 		  v-model="dialogSbyxgl"
 		  :title="titinfo"
-		  :formData="formData" />
+		  :formData="formData"
+		  @navigate-back="handleNavigateBack"
+		  @xuncha-visible="handleXunchaVisible" />
         </el-main>
       </el-container>
     </el-container>
@@ -2542,7 +2565,8 @@ import {
    JpChanliangEdit,
    JpUploade,
    getRejectRate,
-   LazhiGongData
+   LazhiGongData,
+   ProcessInspectionRecord
 } from '@/api/jixiaoguanli/jitairibaobiao'
 import{ 
 	AccountingParameter,
@@ -4996,16 +5020,26 @@ const onzhicheng = async () => {
 		xunchaData.value.sczl_name=''
 		xunchaData.value.remark=''
 		zhichengVisible.value = true;
+		// 自动聚焦到左侧菜单栏第一个数据
+		setTimeout(() => {
+			if (zhichengtreeData.value && zhichengtreeData.value.length > 0) {
+				const firstNode = zhichengtreeData.value[0];
+				zhichengNodeClick(firstNode);
+			}
+		}, 100);
 	}
 }
 const category =ref()
 const zhibiaoselectData=ref([])
 const fujiaselectData=ref([])
-const zhichengNodeClick = (node, check) => {
+const inspectionRecordsData=ref([])
+const zhichengNodeClick = async (node, check) => {
 	if(node.label){
 		zhichengstatus.value=true
 		category.value=node.label
-		processInspectionRecordsItem()
+		await processInspectionRecordsItem()
+		// 同时获取检验记录数据
+		await loadInspectionRecords()
 	}
 };
 
@@ -5123,25 +5157,47 @@ const zhichengDialog = async () => {
 	const filteredData = zhibiaoselectData.value.filter(item => item.selected !== "不检测");
 	const response = await ProcessInspectionRecordsItemAdd(filteredData);
 	if (response.code === 0) {
-		  ElMessage({
-		    type: 'success',
-		    message: '成功'
-		  })
-		  zhichengVisible.value=false
-		  zhibiaoselectData.value=[]
-		  fujiaselectData.value=[]
-	}
+	  ElMessage({
+	    type: 'success',
+	    message: '成功'
+	  })
+	  zhichengVisible.value=false
+	  zhibiaoselectData.value=[]
+	  fujiaselectData.value=[]
+	  handleButtonClick(JTMC)
+}
 }
 const closezhichengDialog = async () => {
 	zhichengVisible.value=false
 }
 //设置机台状态
 const dialogSbyxgl=ref(false)
+//设置机台状态
 function onstatus() {
 	dialogSbyxgl.value=true
 	 SetMachineStatus()
 }
 
+// 处理返回事件
+function handleNavigateBack() {
+	console.log('handleNavigateBack called');
+	dialogSbyxgl.value=false
+	// 直接打开制程检验弹窗
+	console.log('Opening zhichengVisible');
+	onzhicheng();
+	console.log('zhichengVisible.value:', zhichengVisible.value);
+}
+
+// 处理巡查事件
+function handleXunchaVisible() {
+	console.log('handleXunchaVisible called');
+	dialogSbyxgl.value=false
+	// 直接打开巡查弹窗
+	console.log('Opening xunchaVisible');
+	onxuncha();
+	console.log('xunchaVisible.value:', xunchaVisible.value);
+}
+
 
 //设置机台状态
 const SetMachineStatus = async () => {
@@ -5325,6 +5381,13 @@ const handleyinbanDialogClose = () =>{
 }
 const onxuncha = async() => {
 	xunchaVisible.value=true
+	// 自动聚焦到左侧菜单栏第一个数据
+	setTimeout(() => {
+		if (xunchatreeData.value && xunchatreeData.value.length > 0) {
+			const firstNode = xunchatreeData.value[0];
+			xunchaNodeClick(firstNode);
+		}
+	}, 100);
 }
 
 //获取设备点检->检验项目
@@ -7057,7 +7120,7 @@ const GetLl = (falg) => {
 	let llyg = {
 		'自备':'自备',
 		'张杭强':1024,
-		'李当林':2019,
+		'李当林':1124,
 	} 
 	switch(falg){
 		case 'create':
@@ -8972,6 +9035,23 @@ const rcgdsjonDialog = async () => {
 };
 const rcgdsjcloseDialog = () => {onllexcel.value = false}
 	
+const loadInspectionRecords = async () => {
+	console.log("检验记录")
+	let time = new Date();
+	// 格式化日期为 YYYY-MM-DD 格式
+	const year = time.getFullYear();
+	const month = String(time.getMonth() + 1).padStart(2, '0');
+	const day = String(time.getDate()).padStart(2, '0');
+	const formattedDate = `${year}-${month}-${day}`;
+	// 保持机台名称包含 # 符号
+	const machineName = JTMC;
+	// 提取班组信息,A班传A,B班传B
+	const team = BZMC.value.charAt(0);
+	const response = await ProcessInspectionRecord({ machine: machineName, date: formattedDate, team: team });
+	if (response.code === 0) {
+		inspectionRecordsData.value = response.data;
+	}
+};
 
 </script>
 

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác