廖井涛
6 天以前 583b80a582f9280a262ee72506d31d1bfa46f734
north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -4,7 +4,7 @@
import {useRouter} from 'vue-router'
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElDatePicker, ElMessage} from "element-plus";
import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus";
import {useI18n} from 'vue-i18n'
import footSum from "@/hook/footSum"
import {addListener} from "@/hook/mouseMove";
@@ -22,6 +22,8 @@
//工序
const valueProcess = ref()
//终止状态
let terminationVal = ref(1)
//根据以下字段汇总查询
const stateValue = ref('')
@@ -135,8 +137,13 @@
  if (optionVal == '') {
    optionVal = null
  }
  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
  let terminationVals = terminationVal.value
  if (terminationVals == '') {
    terminationVals = null
  }
  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
    if (res.code == 200) {
      total.value = res.data.total
      produceList = deepClone(res.data.data)
      produceList.forEach(item => {
@@ -167,13 +174,17 @@
  if (optionVal == '') {
    optionVal = null
  }
  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
  let terminationVals = terminationVal.value
  if (terminationVals == '') {
    terminationVals = null
  }
  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
    if (res.code == 200) {
      total.dataTotal = res.data.total.total * 1
      total.pageTotal = res.data.total.pageTotal
      pageTotal.value = res.data.total
      total.value = res.data.total
      total.value = res.data.total;
      total.dataTotal = res.data.total.total * 1;
      total.pageTotal = res.data.total.pageTotal;
      pageTotal.value = res.data.total;
      res.data.data.forEach(item => {
        // 如果 shape 可能是字符串就用 ==,如果一定是数字就用 ===
        item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape');
@@ -229,13 +240,17 @@
  if (optionVal == '') {
    optionVal = null
  }
  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => {
  let terminationVals = terminationVal.value
  if (terminationVals == '') {
    terminationVals = null
  }
  request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => {
    if (res.code == 200) {
      total.dataTotal = res.data.total.total * 1
      total.pageTotal = res.data.total.pageTotal
      pageTotal.value = res.data.total
      total.value = res.data.total
      total.value = res.data.total;
      total.dataTotal = res.data.total.total * 1;
      total.pageTotal = res.data.total.pageTotal;
      pageTotal.value = res.data.total;
      produceList = deepClone(res.data.data)
      produceList.forEach(item => {
        // 如果 shape 可能是字符串就用 ==,如果一定是数字就用 ===
@@ -345,6 +360,7 @@
      slots: {filter: 'num1_filter'},},
    {field: 'childHeight', width: 120, title: t('order.height'),visible: true,filters: [{data: ''}],
      slots: {filter: 'num1_filter'},},
    {field: 'thickness',width: 90, title: t('order.totalThickness'),visible: true},
    {field: 'stockNum', width: 120, title: t('productStock.inventoryQuantity'),visible: true,filters: [{data: ''}],
      slots: {filter: 'num1_filter'},},
    {field: 'stockArea', width: 120, title: t('report.inventoryArea'),visible: true,filters: [{data: ''}],
@@ -380,7 +396,7 @@
        const List = ["quantity",'stockNum','stockArea',]
        if (List.includes(column.field)) {
          //return footSum(data, column.field)
          return footSum(data, column.field)
          return total.value?.[column.field] ?? 0
        }
        return ''
      })
@@ -398,6 +414,10 @@
  let inputProject = form.project
  if (inputProject == '') {
    inputProject = null
  }
  let terminationVals = terminationVal.value
  if (terminationVals == '') {
    terminationVals = null
  }
  if(date===null){
    ElMessage.warning(t('report.pleaseSelectADateFirst'))
@@ -421,7 +441,8 @@
    date: date,
    processes: processes,
    orderId: inputVal,
    project: inputProject
    project: inputProject,
    terminationVals:terminationVals
  })
  request.post(url,dataMp.value,{responseType :'blob'}).then(res => {
    const blob = new Blob([res])
@@ -467,6 +488,9 @@
const handleCellDblClick = ({ row, column, cell, $event }) => {
  VxeUI.clipboard.copy(row[column.property])
}
function onlandingTerminationChange(checked) {
  terminationVal.value = checked ? 0 : 1
}
</script>
<template>
@@ -498,6 +522,13 @@
              :value="item.basic_name"
          />
        </el-select>
      &nbsp;
      <el-checkbox
          :model-value="terminationVal === 0"
          @change="onlandingTerminationChange"
      >
        {{ t('processCard.termination') }}
      </el-checkbox>
        &nbsp;
        <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button>
    </div>