zhoushihao
2024-05-23 a8959c68af98c26e14888f946f40501b94fbc6e5
UI-Project/src/views/Returns/returns.vue
@@ -14,7 +14,16 @@
const adda = ref(false)
const flake = ref(false)
const flakea = ref(false)
// const value = ref('')
// const patternHeight = ref('');
// const patternWidth = ref('');
// const filmsId = ref('');
// const patternThickness = ref('');
// const number = ref('');
//  patternHeight.value = '';
    //  patternWidth.value = '';
    //  filmsId.value = '';
    //  patternThickness.value = '';
    //  number.value = '';
import request from "@/utils/request"
const ida = ref(null); 
import { ref, onMounted } from "vue";
@@ -57,7 +66,7 @@
    }
  } catch (error) {
    // 处理请求失败的情况
    ElMessage.error('获取表格数据失败,请重试');
    // ElMessage.error('获取表格数据失败,请重试');
  }
};
   request.get("/loadGlass/LoadGlass/list").then((res) => {
@@ -244,8 +253,14 @@
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      window.location.reload()
      // window.location.reload()
      add.value = false;
     tableDataa.value = response.data;
    //  patternHeight = '';
    //  patternWidth.value = '';
    //  filmsId.value = '';
    //  patternThickness.value = '';
    //  number.value = '';
      window.localStorage.setItem('workstationId', response.data.workstationId)
      let workstationId = window.localStorage.getItem('workstationId')
      if (workstationId == '1') {
@@ -277,8 +292,9 @@
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      window.location.reload()
      // window.location.reload()
      add.value = false;
     tableDataa.value = response.data;
      window.localStorage.setItem('workstationId', response.data.workstationId)
      let workstationId = window.localStorage.getItem('workstationId')
      if (workstationId == '1') {
@@ -320,6 +336,7 @@
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      adda.value = false;
     tableDataa.value = response.data;
      window.localStorage.setItem('workstationId', response.data.workstationId)
      let workstationId = window.localStorage.getItem('workstationId')
      if (workstationId == '1') {
@@ -345,8 +362,9 @@
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      window.location.reload()
      // window.location.reload()
      dialogFormVisible.value = false;
      selectedProjectNo.value = ''
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.msg);
@@ -367,8 +385,10 @@
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      window.location.reload()
      // window.location.reload()
      blind.value = false;
      tableData.splice(0, tableData.length, ...response.data);
      selectedProjectNoa.value = ''
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.msg);
@@ -379,36 +399,6 @@
    console.error(error);
  }
}
// const handle = async () => {
//   try  {
//   let engineeringId = window.localStorage.getItem('engineeringId')
// console.log(engineeringId);
// if (engineeringId !== '') {
//   const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
//       engineeringId: engineerId.va,
//       state: 1,
//     })
//     if (response.code == 200) {
//       // 绑定成功,处理逻辑
//       ElMessage.success(response.message);
//       blind.value = false;
//     } else {
//       // 请求失败,显示错误消息
//       ElMessage.error(response.msg);
//     }
//   }
//     else  {
//       ElMessage({
//         type: 'info',
//         message: '工程号不能为空!',
//       })
//     }
// }
// catch (error) {
//     // 处理错误
//     console.error(error);
//   }
// }
// 暂停
const handlea = async () => {
  try  {
@@ -422,8 +412,11 @@
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      window.location.reload()
      // window.location.reload()
      blinda.value = false;
      // tableData.value = response.data
      // tableData.value = [];
      tableData.splice([]);
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.msg);
@@ -454,9 +447,10 @@
    if (response.code == 200) {
      // 绑定成功,处理逻辑
      ElMessage.success(response.message);
      window.location.reload()
      // window.location.reload()
      blindb.value = false;
    } else {
      tableData.splice([]);
      // 请求失败,显示错误消息
      ElMessage.error(response.msg);
    }
@@ -474,11 +468,12 @@
  }
}
onMounted(fetchTableData);
function getStatusText(state: number) {
  switch (state) {
function getStatusText(state: number) {
  switch (state) {
    case 0:  
      return '等待中';  
    case 1:  
      return '上片中';
    case 2:  
      return '上片中';  
    case 100:  
@@ -697,7 +692,7 @@
     :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
        >
          <el-table-column prop="patternWidth" align="center" label="宽" min-width="80" />
          <el-table-column prop="patternHeight" align="center" label="长" min-width="80" />
          <el-table-column prop="patternHeight" align="center" label="高" min-width="80" />
          <el-table-column prop="filmsId" align="center" label="膜系" min-width="80" />
          <el-table-column prop="number" align="center" label="数量" min-width="80" />
          <el-table-column fixed="right" label="操作" align="center" width="150">
@@ -717,7 +712,7 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
              <el-form-item label="长:" :required="true" style="width: 14vw">
              <el-form-item label="高:" :required="true" style="width: 14vw">
                <el-input  v-model="patternHeight" autocomplete="off" />
              </el-form-item></div></div>
          </el-col>