廖井涛
2024-07-10 615f0f3fa6f7ca97df973e6fa98504da7e0e14cc
north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -33,8 +33,12 @@
    value: 2,
    label: t('processCard.processId'),
  },
  // {
  //   value: 3,
  //   label: t('order.project'),
  // },
  {
    value: 3,
    value: 4,
    label: t('processCard.technologyNumber'),
  },
]
@@ -104,8 +108,12 @@
const titleSelectJson = ref({
  processType: [],
})
let optionVal=stateValue.value
if (optionVal == '') {
  optionVal = null
}
//第一次加载数据
request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => {
request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
  if (res.code == 200) {
    // total.dataTotal = res.data.total.total*1
@@ -129,8 +137,11 @@
  if (inputVal == '') {
    inputVal = null
  }
  request.post(`/report/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => {
  let optionVal=stateValue.value
  if (optionVal == '') {
    optionVal = null
  }
  request.post(`/report/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${optionVal}`, filterData.value).then((res) => {
    if (res.code == 200) {
@@ -156,7 +167,11 @@
  if (inputProject == '') {
    inputProject = null
  }
  request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => {
  let optionVal=stateValue.value
  if (optionVal == '') {
    optionVal = null
  }
  request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
    if (res.code == 200) {
      // total.dataTotal = res.data.total.total*1
@@ -167,6 +182,7 @@
    } else {
      ElMessage.warning(res.msg)
    }
    //handleUpdateData(produceList)
  })
}
@@ -245,7 +261,8 @@
    {
      field: 'thisProcess', width: 120, title: t('report.workingProcedure'), filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
      filterMethod: filterChanged,
      visible: true
    },
    {
      field: 'order_id',
@@ -254,7 +271,8 @@
      showOverflow: "ellipsis",
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
      filterMethod: filterChanged,
      visible: true
    },
    {
      field: 'process_id',
@@ -263,34 +281,38 @@
      showOverflow: "ellipsis",
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
      filterMethod: filterChanged,
      visible: true
    },
    {
      field: 'customer_name', width: 130, title: t('customer.customerName'), filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
      filterMethod: filterChanged,
      visible: true
    },
    {
      field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
      filterMethod: filterChanged,
      visible: true
    },
    {
      field: 'batch', width: 100, title: t('order.batch'), filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
      filterMethod: filterChanged,
      visible: true
    },
    {field: 'order_number', width: 100, title: t('order.OrderNum')},
    {field: 'technology_number', width: 120, title: t('processCard.technologyNumber'), showOverflow: "ellipsis"},
    {field: 'shape', width: 100, title: t('order.shape')},
    {field: 'process', width: 120, title: t('craft.process')},
    {field: 'quantity', width: 120, title: t('order.quantity')},
    {field: 'child_width', width: 120, title: t('order.width')},
    {field: 'child_height', width: 120, title: t('order.height')},
    {field: 'stockNum', width: 120, title: t('productStock.inventoryQuantity')},
    {field: 'stockArea', width: 120, title: t('report.inventoryArea')},
    {field: 'product_name', width: 120, title:  t('order.product')},
    {field: 'bend_radius', width: 120, title: t('order.bendRadius')},
    {field: 'order_number', width: 100, title: t('order.OrderNum'),visible: true},
    {field: 'technology_number', width: 120, title: t('processCard.technologyNumber'), showOverflow: "ellipsis",visible: true},
    {field: 'shape', width: 100, title: t('order.shape'),visible: true},
    {field: 'process', width: 120, title: t('craft.process'),visible: true},
    {field: 'quantity', width: 120, title: t('order.quantity'),visible: true},
    {field: 'child_width', width: 120, title: t('order.width'),visible: true},
    {field: 'child_height', width: 120, title: t('order.height'),visible: true},
    {field: 'stockNum', width: 120, title: t('productStock.inventoryQuantity'),visible: true},
    {field: 'stockArea', width: 120, title: t('report.inventoryArea'),visible: true},
    {field: 'product_name', width: 120, title:  t('order.product'),visible: true},
    {field: 'bend_radius', width: 120, title: t('order.bendRadius'),visible: true},
  ],//表头按钮
  toolbarConfig: {
@@ -321,7 +343,7 @@
        return ''
      })
    ]
  }
  },
})
@@ -376,6 +398,28 @@
  })
}
const handleUpdateData = (data) =>{
  // const usedColumns = new Set();
  // data.forEach(row => {
  //   Object.keys(row).forEach(key => {
  //     usedColumns.add(key);
  //   });
  // });
  // // 更新 columns 数组的 visible 属性来控制列的显示
  // gridOptions.columns.forEach(column => {
  //
  //   column.visible = usedColumns.has(column.field);
  // });
  //const columns = gridOptions.columns;
  // const ageColumn = columns.find(col => col.property === 'age');
  // if (ageColumn) {
  //   ageColumn.visible = !ageColumn.visible;
  //   VXETable.updateColumns(tableRef.value, columns);
  // }
}
</script>
<template>
@@ -399,7 +443,7 @@
        &nbsp;&nbsp;
        <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px"></el-input>
        &nbsp;
        <el-select v-model="stateOptions[0]" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px">
        <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px">
          <el-option
              v-for="item in stateOptions"
              :key="item.value"
@@ -425,6 +469,7 @@
        class="mytable-scrollbar"
        max-height="100%"
        v-bind="gridOptions"
        :optimize="true"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->