wangfei
2024-11-21 999ac56a03c8221a084a3afab870d258dd4d9741
UI-Project/src/views/Returns/upreturns2.vue
@@ -96,7 +96,8 @@
    const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', {
      stationCell: 6,
      engineerId: selectedProjectNo.value,
      filmRemove: filmRemove.value,
      // filmRemove: filmRemove.value,
      filmRemove: parseInt(filmRemove.value, 10),
    })
    window.localStorage.setItem('engineeringId', selectedProjectNo.value)
    window.localStorage.setItem('filmRemove', filmRemove.value)
@@ -121,10 +122,10 @@
  let engineeringId = window.localStorage.getItem('engineeringId')
  if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
    try {
      // const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
        const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        stationCell: 6,
        filmRemove: filmRemove,
      const response = await request.post('/loadGlass/engineering/engineering/pause', {
        // const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
        // stationCell: 6,
        // filmRemove: filmRemove,
        engineerId: engineeringId,
        state: 1,
      })
@@ -148,8 +149,8 @@
    let engineeringId = window.localStorage.getItem('engineeringId')
    console.log(engineeringId);
    if (engineeringId !== '') {
      const response = await request.post('/loadGlass/engineering/engineering/pauseTask', {
        stationCell: 6,
      const response = await request.post('/loadGlass/engineering/engineering/pause', {
        // stationCell: 6,
        engineerId: engineeringId,
        state: 0,
      })
@@ -236,6 +237,28 @@
    ElMessage.error(t('basicData.glassnull'));
  }
};
function getStatusType2(filmRemove) {
  switch (filmRemove) {
    case 0:
      return 'success';
    case 1:
      return 'info';
    case 2:
      return 'warning';
  }
}
function getStatusText2(filmRemove) {
  switch (filmRemove) {
    case 0:
      return t('Mounting.noremoval');//完成
    case 1:
      return t('Mounting.coarselyground');//新建
    case 2:
      return t('Mounting.finegrinding');//执行中
  }
}
</script>
<template>
  <div style="height: 500px;">
@@ -301,18 +324,29 @@
            min-width="80"
            prop="state"
          >
          <template #default="scope">
          <el-tag
            :type="scope.row.state === 100 ? 'success' : 'warning'"
            @click="toggleEnableState(scope.row)"
          >
            {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
          </el-tag>
        </template>
          </el-table-column>
          <template #default="scope">
            <el-tag
                :type="scope.row.state === 100 ? 'success' : 'warning'"
                @click="toggleEnableState(scope.row)"
            >
              {{ scope.row.state === 100 ? $t('Mounting.pass') : $t('Mounting.waiting') }}
            </el-tag>
          </template>
      </el-table-column>
      <el-table-column prop="filmsId" :label="$t('Mounting.createtime')" align="center"/>
      <!-- <el-table-column prop="filmRemove" :label="$t('Mounting.removalmethodp')" align="center"/> -->
      <!-- <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/> -->
      <el-table-column
          align="center"
          :label="$t('Mounting.removalmethodp')"
          prop="filmRemove"
      >
        <template #default="scope">
          <el-tag :type="getStatusType2(scope.row.filmRemove)">
            {{ getStatusText2(scope.row.filmRemove) }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column prop="stationCell" :label="$t('Mounting.loadinglinea')" align="center"/>
    </el-table>
      </div>
    </el-card>