wu
2024-09-05 52516230c75988540b51e7160b1f5c03b96583ea
UI-Project/src/views/Slicecage/slicecage.vue
@@ -16,6 +16,7 @@
const dialogFormVisiblea = ref(false)
const dialogFormVisibleb = ref(false)
const dialogFormVisiblec = ref(false)
const dialogFormVisibles = ref(false)
const tableData = ref([])
const tableDatagh = ref([])
const tableDatab = ref([])
@@ -24,6 +25,7 @@
const tableDataf = ref([])
const tableDatae = ref([])
const tableDatax = ref([])
const tableDatas = ref([])
const carPosition = ref([])
const ganghua = ref('')
const adjustedRects = ref([]);
@@ -384,6 +386,33 @@
    console.error('发生错误:', error);  
  }  
}; 
 // 指定流程卡
 const brokes = 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/appointFlowCard",{
        flowCardId: row.flow_card_id,
        layer: row.layer,
    });
    if (response.code === 200) {
      ElMessage.success(response.message);
      } else {
      ElMessage.error(response.message);
      }
    }
  } catch (error) {
    console.error('发生错误:', error);
  }
};
// 出片队列拿走
const brokeb = async(row) => {  
  try {
@@ -518,7 +547,23 @@
  } catch (error) {  
    // console.error('Error fetching rects :', error);  
  }  
}); 
const fetchFlows = async () => {
  try {
    const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectFlowCardByCache');
    if (response.code === 200) {
      tableDatas.value = response.data
    } else {
      ElMessage.warning(response.msg)
    }
  } catch (error) {
    // console.error('Error fetching rects :', error);
  }
}
const fetchFlow = async () => {
  try  {
    const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass')
@@ -775,6 +820,7 @@
    <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="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
    <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">非钢化流程卡查询</el-button>
    <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" />
    <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;">
@@ -1459,6 +1505,19 @@
      </div>
    </template>
</el-dialog>
<el-dialog v-model="dialogFormVisibles" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')">
    <el-table  ref="table" style="margin-top: 20px;height: 500px;"
        :data="tableDatas" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="flow_card_id" fixed align="center" :label="$t('searchOrder.processcards')"/>
          <el-table-column prop="layer" align="center" label="层" />
          <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" />
          <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" >
            <template #default="scope">
              <el-button size="mini" type="text" plain @click="brokes(scope.row)">指定流程卡</el-button>
            </template>
        </el-table-column>
        </el-table>
</el-dialog>
</template>
<style scoped>
#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}