liuhairui 1 gadu atpakaļ
vecāks
revīzija
195620281c
1 mainītis faili ar 11 papildinājumiem un 6 dzēšanām
  1. 11 6
      src/view/yunyin/shengchanguanli/gongdanshengchan.vue

+ 11 - 6
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -150,11 +150,11 @@
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
                         :header-cell-style="{ padding: '0px' }"
                         style="width: 100%;height: 74vh" border tooltip-effect="dark"
-                        highlight-current-row="true"
                         @row-click="cjpc_tableRowClick"
                         :data="paichengData" row-key="ID"
                         :cell-class-name="cjzcCellClass"
               >
+<!--                highlight-current-row="true"-->
                 <template v-for="(item, idx) in paichengColumns">
                   <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
                     <div v-if="['优先次序', '生产工时', '辅助工时', '班次安排', '排单备注','最早开工时间', '计划开工时间'].includes(item.prop)">
@@ -1224,7 +1224,8 @@ const paichengColumns = ref(
     [
       { label: '优先次序', prop: '优先次序', width: '105' },
       { label: '工单编号', prop: '工单编号', width: '100' },
-      { label: '印件名称', prop: '印件名称', width: '220' },
+      // { label: '印件名称', prop: '印件名称', width: '220' },
+      { label: '印件名称', prop: '印件名称', width: '100' },
       { label: '接货数', prop: '接货数', width: '105' },
       { label: '小时产能', prop: '小时产能', width: '100' },
       { label: '生产工时', prop: '生产工时', width: '100' },
@@ -1239,6 +1240,7 @@ const paichengColumns = ref(
     ]
 )
 const handleKeyDown = (event, x, y, prop) => {
+  console.log(event)
   const currentElement = document.getElementById(`input${x}${y}`);
   if (currentElement === null && currentElement === undefined) return
   let move = 0
@@ -1247,6 +1249,7 @@ const handleKeyDown = (event, x, y, prop) => {
       if (x === 0 && y === +y) {
         console.log("排序前的值");
         console.log(paichengData.value);
+
         paichengData.value.sort((a, b) => {
           const priorityA = parseFloat(a['优先次序']);
           const priorityB = parseFloat(b['优先次序']);
@@ -1268,12 +1271,12 @@ const handleKeyDown = (event, x, y, prop) => {
           const hours = date.getHours().toString().padStart(2, '0');
           const minutes = date.getMinutes().toString().padStart(2, '0');
           const seconds = date.getSeconds().toString().padStart(2, '0');
-
           const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
           return formattedDate;
         }
         // 获取第一行数据
         const firstRow = paichengData.value[+y];
+        console.log(firstRow)
         // 初始化上一行的计划完工时间为第一行的计划开工时间
         let prevCompletionTime = new Date(firstRow['计划开工时间']).getTime() / 1000;
         // 遍历每一行数据
@@ -1285,6 +1288,7 @@ const handleKeyDown = (event, x, y, prop) => {
           const finalTimestamp = prevCompletionTime + resultTimestamp;
           // 将计划完工时间赋值到当前行
           row['计划完工时间'] = formatTimestamp(finalTimestamp);
+          // row['计划开工时间'] =formatTimestamp(finalTimestamp);
           // 更新上一行的计划完工时间为当前行的计划完工时间
           prevCompletionTime = finalTimestamp;
 
@@ -1397,6 +1401,7 @@ const _EquipmentSchedulingdata = async ()=>{
   let machine = _machine.value;
   try {
     const EquipmentSchedulingdata = await EquipmentScheduling({machine:machine});
+    console.log(EquipmentSchedulingdata)
     if (EquipmentSchedulingdata.code === 0) {
       paichengData.value = EquipmentSchedulingdata.data
     }
@@ -1571,9 +1576,9 @@ const rowContextMenu = (row) => {
   color: blue !important;
 }
 /*车间设备制程背景粉色*/
-/*:deep(.el-table__body .background-color-column-fen div div div) {*/
-/*  background: #ff80ff !important;*/
-/*}*/
+:deep(.el-table__body .background-color-column-fen div div div) {
+  background: #ff80ff !important;
+}
 /*文字蓝色*/
 :deep(.color-column-lan div) {
   color: red !important;