zck 10 kuukautta sitten
vanhempi
sitoutus
5dbb17ee8e

+ 12 - 0
src/api/mes/job.js

@@ -498,3 +498,15 @@ export const PowerMachineDetail = (params) => {
   })
 }
 
+
+/*
+	印版管理
+*/
+//印版管理->左侧菜单
+export const getPPTab = (params) => {
+  return service({
+    url: '/mes_server/Printing_Plate/getTab',
+    method: 'get',
+    params
+  })
+}

+ 49 - 9
src/view/DecisionSupport/ProductionAchievementRate.vue

@@ -40,6 +40,7 @@
 						:row-style="{ height: '20px' }" :selectable="checkboxT"
 						:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 						:header-cell-style="{ padding: '0px' }" @row-click="pchzRowClick"
+            :row-class-name="pchzrowClassStyle"
 						highlight-current-row="true" @row-dblclick="gytableDatadoubleClick"  id="pchztable"
 						style="width: 100%;height: 30vh" border tooltip-effect="dark" :data="pchztableData" row-key="ID" >
 				<el-table-column fixed align="left" label="机台编号" prop="机台编号"  width="110"/>
@@ -129,9 +130,10 @@
             v-if="ismachine"
 						:show-overflow-tooltip="true"
 						@selection-change="selectionChange($event)"
-						:row-style="{ height: '20px' }" :row-class-name="totalClassName" :cell-class-name="tableDataCellClass"
+						:row-style="{ height: '20px' }"  :cell-class-name="tableDataCellClass"
 						:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-						:header-cell-style="{ padding: '0px' }" @row-click="getUid" 
+						:header-cell-style="{ padding: '0px' }" @row-click="sbmxRowClick" 
+            :row-class-name="sbmxrowClassStyle"
 						highlight-current-row="true" @row-dblclick="JPgytableDatadoubleClick" id="sbmxtable"
 						style="width: 100%;height: 45vh" border tooltip-effect="dark" :data="sbmxtableData" row-key="ID" >
 					<el-table-column  align="left" fixed label="机台编号" prop="机台编号"  width="90"/>
@@ -251,7 +253,11 @@ const getTreeData = async () => {
         children: []
       };
 
-      for (const year in rawData['设备工时达成率统计']) {
+      // 获取所有年份并按降序排序
+      const sortedYears = Object.keys(rawData['设备工时达成率统计'])
+        .sort((a, b) => parseInt(b) - parseInt(a));
+
+      for (const year of sortedYears) {
         const yearData = rawData['设备工时达成率统计'][year];
         if (!yearData) continue;
 
@@ -260,7 +266,16 @@ const getTreeData = async () => {
           children: []
         };
 
-        for (const monthKey in yearData) {
+        // 获取该年所有月份并按降序排序
+        const sortedMonths = Object.keys(yearData)
+          .sort((a, b) => {
+            // 处理格式为YYYYMM的月份键
+            const monthA = a.length === 6 ? parseInt(a.substring(4)) : parseInt(a);
+            const monthB = b.length === 6 ? parseInt(b.substring(4)) : parseInt(b);
+            return monthB - monthA;
+          });
+
+        for (const monthKey of sortedMonths) {
           const monthData = yearData[monthKey];
           if (!monthData) continue;
 
@@ -336,10 +351,12 @@ const handleNodeExpand = (nodeData, node) => {
   console.log('节点展开:', nodeData)
 }
 
-
+const currentjtbh = ref('')//储存设备汇总表格当前选中的机台编号
+const currentrq = ref('')//储存设备明细表格当前选中的日期
 // 排产表格行点击事件处理
 const pchzRowClick = async (row) => {
   console.log('行点击:', row)
+  currentjtbh.value = row.机台编号;
   const response = await PARDetail({jtbh:row.机台编号,bz:row.班组})
   if (response?.code === 0 && Array.isArray(response.data)) {
     pcmxtableData.value = response.data;
@@ -347,7 +364,7 @@ const pchzRowClick = async (row) => {
   }
 }
 
-// 排产表格行点击事件处理
+// 设备汇总表格行点击事件处理
 const sbhzRowClick = async (row) => {
   console.log('行点击:', row)
   const response = await PARDetailpro({jtbh:row.机台编号,bz:row.班组,rq:row.sczl_rq})
@@ -355,8 +372,15 @@ const sbhzRowClick = async (row) => {
     sbmxtableData.value = response.data;
     console.log('表格数据更新成功:', response.data); 
   }
-}  
-  
+} 
+
+
+
+
+//设备明细表格行点击事件处理
+const sbmxRowClick = async (row) => {
+  currentrq.value = row.日期;
+}
 
   
 //导出按钮(汇总)
@@ -532,7 +556,20 @@ const rqexcelcloseDialog = () => {
 };
   
   
-  
+ //===============颜色==================================
+//排产汇总表格样式
+const pchzrowClassStyle = ({row,rowIndex}) =>{
+  if(row['机台编号']== currentjtbh.value){
+    return "warning-row"
+  }
+}
+
+//设备明细表格样式
+ const sbmxrowClassStyle = ({row,rowIndex}) =>{
+  if(row['日期']== currentrq.value){
+    return "warning-row"
+  }
+}
   
   </script>
   
@@ -590,6 +627,9 @@ const rqexcelcloseDialog = () => {
   }
 
   
+  :deep(.el-table__body .warning-row) {
+  background: #FFFF80 !important;
+}
   /* 选中某行时的背景色 */
   :deep(.el-table__body tr.current-row) > td {
     background: #ff80ff !important;

+ 3 - 3
src/view/DecisionSupport/operation/operation.vue

@@ -51,8 +51,8 @@
                 <el-table-column align="left" sortable label="保养工时"   prop="保养工时" width="120" />
                 <el-table-column align="left" sortable label="打样总工时"   prop="打样总工时"  width="120" />
                 <el-table-column align="left" sortable label="打样补产工时"   prop="打样补产工时" width="150" />
-                <el-table-column align="left" sortable label="装板总工时"   prop="装板总工时" width="130" />
-                <el-table-column align="left" sortable label="装板补产工时"       prop="装板补产工时"   width="140"/>
+                <el-table-column align="left" sortable label="装版总工时"   prop="装版总工时" width="130" />
+                <el-table-column align="left" sortable label="装版补产工时"       prop="装版补产工时"   width="140"/>
                 <el-table-column align="left" sortable label="异常停机工时"   prop="异常停机工时" width="140" />
               </el-table>
 
@@ -80,7 +80,7 @@
                   <el-table-column align="left" sortable label="保养工时" prop="保养工时"  width="110"/>
                   <el-table-column align="left" sortable label="打样总工时" prop="打样总工时"  width="140"/>
                   <el-table-column align="left" sortable label="打样补产工时" prop="打样补产工时"  width="140"/>
-                  <el-table-column align="left" sortable label="装补产工时" prop="装板补产工时"  width="160"/>
+                  <el-table-column align="left" sortable label="装补产工时" prop="装板补产工时"  width="160"/>
                   <el-table-column align="left" sortable label="异常停机工时" prop="异常停机工时"  width="160"/>
                   <el-table-column align="left" sortable label="墨色数" prop="墨色数"  width="160"/>
                 </el-table>

+ 37 - 2
src/view/DecisionSupport/outputsum/index.vue

@@ -43,7 +43,8 @@
                         @selection-change="handleSelectionChange"
                         :show-overflow-tooltip="true"       
 						   show-summary
-          :summary-method="getSummaries">
+          :summary-method="getSummaries"
+          >
                         <!-- 多选框 -->
                         <!-- <el-table-column type="selection" width="30" /> -->
                 <el-table-column align="left" label="设备编号"   prop="机台编号"  width="81" />
@@ -80,7 +81,7 @@
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                           :header-cell-style="{ padding: '0px' }"
                           :show-overflow-tooltip="true"
-                          highlight-current-row="true"
+                          highlight-current-row="true"  
                           @selection-change="selectionChange($event, '印件资料')"
                           style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jqtabledata" row-key="ID">
                           <!-- 多选框 -->
@@ -395,6 +396,40 @@ const tableRowClick = async (row) => {
 
 
 
+	//合计
+	// const getSummaries = (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;  
+  // };  
 
 </script>
 <style scoped>

+ 6 - 5
src/view/DecisionSupport/productioncents/index.vue

@@ -44,10 +44,11 @@
               >
                 <el-table-column type="selection" width="30" />
                 <el-table-column align="left"   label="机台编号" prop="机台编号"  width="100"/>
-                <el-table-column align="left"   label="工单编号" prop="工单编号" width="100" />
-                <el-table-column align="left"   label="印件号" prop="工序号" width="110" />
-                <el-table-column align="left"   label="工序号" prop="工序" width="110"/>
-                <el-table-column align="left"   label="工序名称" prop="工序名称"  width="440"/>
+                <el-table-column align="left"   label="工单编号" prop="工单编号" width="90" />
+                <el-table-column align="left"   label="印件号" prop="工序号" width="70" />
+                <el-table-column align="left"   label="印件名称" prop="印件名称" width="420" />
+                <el-table-column align="left"   label="工序号" prop="工序" width="70"/>
+                <el-table-column align="left"   label="工序名称" prop="工序名称"  width="420"/>
                 <el-table-column align="left"   label="班组编号" prop="班组编号" width="110"/>
                 <el-table-column align="left"   label="班组实际产量" prop="班组产量" width="120" />
                 <el-table-column align="left"   label="班组制程废品" prop="班组制程废品" width="160" />
@@ -87,7 +88,7 @@
                 <el-table-column    align="center" label="01月" prop="01月" width="100"/>
                 <el-table-column    align="left" label="02月" prop="02月" width="100" />
                 <el-table-column    align="left" label="03月" prop="03月" width="100" />
-                <el-table-column    align="left" label="04月" prop="04月" width="100"  />
+                <el-table-column    align="left" label="04月" prop="04月" width="100" />
                 <el-table-column    align="left" label="05月" prop="05月" width="100" />
                 <el-table-column    align="left" label="06月" prop="06月" width="100" />
                 <el-table-column    align="left" label="07月" prop="07月" width="100" />

+ 0 - 2
src/view/equipment/Inspectionstatistics.vue

@@ -6,8 +6,6 @@
             <!--          按钮部分-->
             <el-form ref="elSearchFormRef"   class="demo-form-inline" :rules="searchRule" >
               <el-form-item>
-                <el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input>
-                <el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel(汇总)</el-button>
               </el-form-item>
             </el-form>
   

+ 8 - 3
src/view/equipment/powerconsumption.vue

@@ -102,22 +102,27 @@
   const treeData = ref([])
   const hztableData = ref([])
   const mxtableData = ref([])
-const getTreeData = async() => {
+  const getTreeData = async() => {
   const res = await getPMTab()
   if (res.code === 0) {
     const { data } = res
     const transformedData = []
 
-    for (const [date, workshops] of Object.entries(data)) {
+    // 获取所有日期并按降序排序
+    const sortedDates = Object.keys(data).sort((a, b) => b.localeCompare(a))
+    
+    for (const date of sortedDates) {
+      const workshops = data[date]
       const transformedItem = {
         label: date,
         children: workshops.map((workshop) => ({
-          label: workshop.trim(),  // 添加trim()去除车间名称中的空格
+          label: workshop.trim(),
           date: date,
         })),
       }
       transformedData.push(transformedItem)
     }
+    
     treeData.value = transformedData
   }
 }

+ 38 - 3
src/view/managements/hardversionlibrary.vue

@@ -105,11 +105,46 @@
   import {ref, reactive} from 'vue'
   import { exportExcelFile } from '@/utils/excel'
   import {ElMessage} from "element-plus";
+  import {getPPTab,PowerMachineList,PowerMachineDetail} from "@/api/mes/job.js"
+  
   defineOptions({name: 'Company'})
   // =========== 获取左侧树侧形结构 ===========
-  
+  const treeData = ref([])
+  const getTreeData = async () => {
+  try {
+    const res = await getPPTab()
+    if (res.code === 0) {
+      treeData.value = transformData(res.data)
+    } else {
+      console.error('获取数据失败:', res.msg)
+    }
+  } catch (error) {
+    console.error('请求出错:', error)
+  }
+}
 
-  
+// 转换数据格式为el-tree需要的结构
+const transformData = (data) => {
+  return Object.entries(data).map(([key, value]) => {
+    const children = Object.entries(value).map(([subKey, subValue]) => {
+      return {
+        label: subKey,
+        children: Object.entries(subValue).map(([typeKey, typeValue]) => {
+          return {
+            label: typeKey,
+            children: typeValue.map(item => ({
+              label: item
+            }))
+          }
+        })
+      }
+    })
+    return {
+      label: key,
+      children
+    }
+  })
+}
   
 
   
@@ -118,7 +153,7 @@
 
   
 
-  
+  getTreeData()
   
   
   

+ 3 - 0
src/view/performance/12-orderAccounting/index.vue

@@ -63,6 +63,7 @@
             <!--              <el-table-column type="selection" width="55" />-->
             <el-table-column align="left" sortable   label="车间" prop="cj"  width="150"/>
             <el-table-column align="left" sortable  label="员工编号" prop="bh" width="150" />
+            <!-- <el-table-column align="left" sortable  label="班组" prop="bz"  width="80"/> -->
             <el-table-column align="left" sortable  label="员工姓名" prop="xm"  width="150"/>
             <el-table-column align="left" sortable  label="超节损金额" prop="je" width="150" >
             <template v-slot="{ row }">
@@ -515,6 +516,7 @@ const tableCols1 = [
   { label: '印件号', prop: 'jjcp_yjno', width: '70'},
   { label: '联数', prop: 'yj_ls', width: '70'},
   { label: '产品代号', prop: '成品编码', width: '110' ,sortable:'sortable'},
+  { label: '印件代号', prop: 'yjdh', width: '110' ,sortable:'sortable'},
   { label: '产品名称', prop: '成品名称', width: '250' ,sortable:'sortable'},
   { label: '实际投料', prop: '实际投料', width: '90'},
   { label: '计量单位', prop: '计量单位', width: '85'},
@@ -639,6 +641,7 @@ const  handleSearch = async() => {
           ? '√'
           : '',
       date: date,
+      考核: String(item['考核']) === '是' ? '参与' : '否'
     }))
   }