wangfei
2025-09-23 3a60ee203ba55ff9df9bcc81b465cfaeb5faf05b
UI-Project/src/views/hollow/hollowequipmenttwo.vue
@@ -20,10 +20,6 @@
          $t('hellow.stopproject')
        }}
        </el-button>
        <el-button style="margin-left: 10px;" :disabled="listFlow.length > 0 ? false : true" id="searchButton" type="warning" @click="handleBinde">{{
          $t('searchOrder.printlabels')
        }}
        </el-button>
      </div>
      <div id="dotClass">
@@ -44,6 +40,10 @@
          $t('hellow.taskdet')
        }}
        </el-button> 
        <el-button style="margin-left: 10px;"  id="searchButton" type="warning" @click="handleBinde(tab.tableDataa)">{{
          $t('searchOrder.printlabels')
        }}
        </el-button>
  </div>  
      <!-- 动态表格 -->
      <el-table 
@@ -401,7 +401,7 @@
    <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handlec">
          {{ $t('basicData.confirm') }}e
          {{ $t('basicData.confirm') }}
        </el-button>
        <el-button @click="blindc = false">{{ $t('basicData.cancel') }}</el-button>
      </div>
@@ -492,7 +492,7 @@
<script setup>
import { CircleCheck, Download, Printer } from "@element-plus/icons-vue/global";
import { ElMessage, ElMessageBox } from 'element-plus'
import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed } from "vue";
import { onBeforeUnmount, onMounted, onUnmounted, ref, reactive, watch, computed, getCurrentInstance } from "vue";
import request from "@/utils/request"
import requestErp from "@/utils/requestErp"
import { host, WebSocketHost } from '@/utils/constants'
@@ -655,7 +655,20 @@
const handleBindc = (row) => {
  blindc.value = true;
};
const handleBinde = (row) => {
const handleBinde = (flowCard) => {
  const summary = flowCard.reduce((map, item) => {
        const key = `${item.hollowSequence}`;
        if (!map[key]) {
          map[key] = {
            printQuantity: 1,
            order_number: item.glassType,
            processId: item.flowCardId,
            orderId:item.flowCardId.slice(0, 10)
          };
        }
        return map;
      }, {});
      listFlow.value = Object.values(summary);
  blinde.value = true;
  getTags();
  hiprint.init();
@@ -941,20 +954,6 @@
      selectedProjectNo.value = ''
      closeWebSocket(socket);
      const summary = response.data.reduce((map, item) => {
        const key = `${item.hollowSequence}`;
        if (!map[key]) {
          map[key] = {
            printQuantity: 1,
            order_number: item.glassType,
            processId: item.flowCardId,
            orderId:item.flowCardId.slice(0, 10)
          };
        }
        return map;
      }, {});
      listFlow.value = Object.values(summary);
    } else {
    }
  } catch (error) {
@@ -987,8 +986,6 @@
// 开始任务
const handlea = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/startTask?cell=" + 931 ;
      const response = await request.post(url)
      if (response.code == 200) {
@@ -996,20 +993,12 @@
        blinda.value = false;
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
  }
}
// 暂停任务
const handlec = async () => {
  try {
    let flowCardId = window.localStorage.getItem('flowCardId')
    if (flowCardId !== '') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/pauseTask?cell=" + 931;
      const response = await request.post(url)
      if (response.code == 200) {
@@ -1017,12 +1006,6 @@
        blindc.value = false;
      } else {
      }
    } else {
      ElMessage({
        type: 'info',
        message: t('basicData.infonull'),
      })
    }
  } catch (error) {
  }
}
@@ -1039,7 +1022,7 @@
      } 
    );
 if (confirmResult === 'confirm') {
      var url = "/hollowGlass/hollowGlassOutRelationInfo/deleteHollowTaskDetails?flowCardId=" + flowCardId + "&cell=" + 930;
      var url = "/hollowGlass/hollowGlassOutRelationInfo/deleteHollowTaskDetails?flowCardId=" + flowCardId + "&cell=" + 931;
      const response = await request.post(url)
    if (response.code === 200) {
      ElMessage.success(response.message);