wangfei
2024-08-01 cbbfbfc60079a8ccdc1f40b5011c7c3c7a1b87a2
UI-Project/src/views/Returns/returns.vue
@@ -17,6 +17,8 @@
const flakea = ref(false)
const flakeb = ref(false)
const flakec = ref(false)
const dialoglea = ref(false)
const tableDatax = ref([])
const user = ref('');
const projectNo = ref('');
const workstationId = ref('');
@@ -87,6 +89,40 @@
  } catch (error) {
    // 处理请求失败的情况
    // ElMessage.error('获取表格数据失败,请重试');
  }
};
const handlezhiban = () => {
  dialoglea.value = true; // 打开绑定架子对话框
  fetchFlowCardId();
};
// 值班信息
const fetchFlowCardId = async () => {
  try  {
    const response = await request.post('/loadGlass/work_assignment/selectWorkAssignment',{
      line: 2001,
      workingProcedure : '冷加工'
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
      tableDatax.value = response.data;
      console.log(tableDatax.value);
      console
    } else {
      ElMessage.error(response.message);
    }
}
catch (error) {
    // 处理错误
    console.error(error);
  }
}
const handleConfirmb = async () => {
  const response = await request.post("/loadGlass/work_assignment/updateWorkAssignment", tableDatax.value)
  if (response.code === 200) {
    ElMessage.success(response.message);
    dialoglea.value = false;
  } else {
    ElMessage.error(response.message);
  }
};
onMounted(() => {  
@@ -654,6 +690,7 @@
    <el-button style="margin-top: 5px;margin-left: 15px;"   id="searchButton" type="primary" @click="dialogFormVisible = true">{{ $t('basicData.selectproject') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="primary" @click="handleBind">{{ $t('basicData.startloading') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
    <!-- <el-button style="margin-top: 5px;margin-left: 20px;"  id="searchButton" type="danger" @click="handleBindb">停止任务</el-button> -->
    
    <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
@@ -715,6 +752,32 @@
      </div>
    </template>
  </el-dialog>
<el-dialog v-model="dialoglea" top="15vh" width="70%" :title="$t('searchOrder.dutyinformation')">
    <el-table  ref="table" style="margin-top: 20px;height: 300px;"
        :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="line" fixed align="center" :label="$t('searchOrder.line')"/>
          <el-table-column prop="workProcesses" fixed align="center" :label="$t('searchOrder.process')" />
          <el-table-column prop="teamsGroupsName" align="center" :label="$t('searchOrder.team')">
        <template #default="{ row }">
          <el-input v-model="row.teamsGroupsName" autocomplete="off" min-width="150"/>
        </template>
      </el-table-column>
          <el-table-column prop="deviceName" align="center" :label="$t('searchOrder.basic')">
            <template #default="{ row }">
          <el-input v-model="row.deviceName" autocomplete="off" min-width="150"/>
        </template>
        </el-table-column>
        </el-table>
        <template #footer>
      <div id="dialog-footer">
        <el-button type="primary" @click="handleConfirm">
          {{ $t('searchOrder.add') }}
        </el-button>
        <el-button @click="dialoglea = false">{{ $t('searchOrder.cancel') }}</el-button>
      </div>
    </template>
</el-dialog>
  <el-dialog v-model="blinda" top="30vh" width="25%" :title="$t('basicData.whetherpause')">
    <template #footer>
      <div id="dialog-footer">