wangfei
2024-07-22 0d8edc55b0001c0cdd441b894aea5fcf2f880118
UI-Project/src/views/Slicecage/slicecage.vue
@@ -14,7 +14,9 @@
const dialogFormVisible = ref(false)
const dialogFormVisiblea = ref(false)
const dialogFormVisibleb = ref(false)
const dialogFormVisiblec = ref(false)
const tableData = ref([])
const tableDatagh = ref([])
const tableDatab = ref([])
const tableDatac = ref([])
const tableDatad = ref([])
@@ -70,7 +72,18 @@
const cell9=ref(true);
const selectedRow = ref(null); // 存储选中的行数据  
 
onMounted(async () => {
  try {
    const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass');
    if (response.code === 200) {
      tableDatagh.value = response.data
    } else {
      ElMessage.warning(response.msg)
    }
  } catch (error) {
    // console.error('Error fetching rects :', error);
  }
});
    // 当前页码和每页显示的条数
    const currentPage = ref(1);
    const itemsPerPage = computed(() => {
@@ -349,6 +362,33 @@
    console.error('发生错误:', error);  
  }  
}; 
 // 指定钢化
 const brokee = async(row) => {
  try {
    const confirmResult = await ElMessageBox.confirm(
      t('searchOrder.specifytemperinga'),
      t('searchOrder.prompt'),
      {
        confirmButtonText: t('searchOrder.yes'),
        cancelButtonText: t('searchOrder.cancel'),
        type: 'warning',
      }
    );
    if (confirmResult === 'confirm') {
      const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/TemperingGlass",{
        engineerId: row.engineer_id,
        temperingLayoutId: row.tempering_layout_id,
    });
    if (response.code === 200) {
      ElMessage.success(response.message);
      } else {
      ElMessage.error(response.message);
      }
    }
  } catch (error) {
    console.error('发生错误:', error);
  }
};
// 出片队列拿走
const brokeb = async(row) => {  
  try {
@@ -617,6 +657,7 @@
  <div style="height: 600px;">
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="primary" @click="dialogFormVisiblea = true">{{ $t('searchOrder.cageinformation') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;"   id="searchButton" type="info" @click="dialogFormVisiblec = true">{{ $t('searchOrder.temperingqueries') }}</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;">
        <el-table height="100px" ref="table" 
@@ -1239,6 +1280,19 @@
        </el-table-column>
        </el-table>
</el-dialog>
<el-dialog v-model="dialogFormVisiblec" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
        :data="tableDatagh" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="engineer_id" fixed align="center" :label="$t('searchOrder.projectnumber')" min-width="150"/>
          <el-table-column prop="tempering_layout_id" fixed align="center" :label="$t('searchOrder.layoutnumber')" min-width="120" />
          <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" min-width="150" />
          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="150">
            <template #default="scope">
              <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button>
            </template>
        </el-table-column>
        </el-table>
</el-dialog>
 
</template>
<style scoped>