提交钣金异常料号报表静态页及联调,工艺路线下拉加载表格加入节流优化避免下拉加载1s之内多次调用接口问题
已修改8个文件
149 ■■■■ 文件已修改
src/api/basicData/sheetMetalConfig/sheetMetalConfig.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/i18n/locales/plan/index.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/throttle.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/calendarView/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/abnormalPartNumberReport/index.vue 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/sheetMetalOrderManage/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/sheetMetalRedundantReport/index.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/sheetMetalSupplyGap/index.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basicData/sheetMetalConfig/sheetMetalConfig.js
@@ -31,4 +31,13 @@
    method: "get",
    params: query
  });
}
// 钣金异常料号工单 /ApsPlateStandardRequireError/list
export function plateStandardRequireErrorList(query) {
  return request({
    url: `/aps/ApsPlateStandardRequireError/list`,
    method: "get",
    params: query
  });
}
src/utils/i18n/locales/plan/index.js
@@ -165,7 +165,10 @@
    demandQuantity:"需求数量",
    netRequirement:"净需求量",
    bomItemID: "项 ID",
    customizePlannedCompletionDate:"自定义计划完工日"
    customizePlannedCompletionDate:"自定义计划完工日",
    //钣金料号工单异常
    abnormalCause:"异常原因",
    creationTime:"工单创建时间"
  },
};
export const en = {
@@ -335,6 +338,9 @@
    demandQuantity:"Demand Quantity",
    netRequirement:"Net Requirement",
    bomItemID:"Item ID",
    customizePlannedCompletionDate:"Customize the planned completion date"
    customizePlannedCompletionDate:"Customize the planned completion date",
    //钣金料号工单异常
    abnormalCause:"Abnormal cause",
    creationTime:"Creation time"
  },
};
src/utils/throttle.js
@@ -1,9 +1,7 @@
export function throttle(func, delay) {
    let lastTime = 0;
    return function(...args) {
      const now = Date.now();
      if (now - lastTime >= delay) {
        func.apply(this, args);
        lastTime = now;
src/views/basicData/calendarView/index.vue
@@ -211,7 +211,7 @@
    }
    .item {
      width: calc(100% / 7);
      height: 80px;
      height: 92px;
      text-align: center;
      border-top: 1px solid #ccc;
      border-right: 1px solid #ccc;
@@ -221,7 +221,7 @@
      .text_cell_right {
        text-align: right;
        margin-right:20px;
        margin-top:20px;
        margin-top:30px;
      }
      .text_cell {
        padding-top: 10px;
src/views/mainPlan/abnormalPartNumberReport/index.vue
@@ -84,18 +84,9 @@
<script setup name="Calendar">
import HxlhTable from "@/components/HxlhTable";
import {
  listCalendar,
  getCalendar,
  delCalendar,
  addCalendar,
  updateCalendar,
} from "@/api/basicData/calendar";
import { redundantOrderList } from "@/api/basicData/sheetMetalConfig/sheetMetalConfig";
import axios from "axios";
import { listAll_plant } from "@/api/basicData/plant";
import { listAll_shop, listAps_shop } from "@/api/basicData/shop";
import { selectProcessNameList } from "@/api/basicData/processRoute.js";
import { plateStandardRequireErrorList } from "@/api/basicData/sheetMetalConfig/sheetMetalConfig.js";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
@@ -103,15 +94,7 @@
const orderList = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
  form: {
    type: "1",
  },
  queryParams: {
    pageNum: 1,
    pageSize: 10,
@@ -120,11 +103,7 @@
  },
});
const { queryParams, form, rules } = toRefs(data);
const typeRadioNumber = ref(1);
const plantList = ref([]);
const shopList = ref([]);
const allShopList = ref([]);
const processList = ref([]);
const height = ref(document.documentElement.clientHeight - 220 + "px;");
// 表格配置-列表
const columns = ref([]);
@@ -140,31 +119,19 @@
    columns.value = [
      {
        title: t("plan.table.workOrderNo"),
        field: "documentNumber",
        field: "docNum",
        width: 150,
        align: "center",
      },
      {
        title: t("plan.table.subItemPartNumber"),
        field: "itemNumber",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.productionQuantity"),
        field: "productionQuantity",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.mismatchedProductionQuantity"),
        field: "unmatchedQuantity",
        title: t("plan.table.itemNumber"),
        field: "itemNum",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.applicableFactories"),
        field: "plant",
        field: "orgCode",
        width: 200,
        align: "center",
        formatter: ({ cellValue, row, column }) => {
@@ -178,37 +145,25 @@
        },
      },
      {
        title: t("plan.table.productionBase"),
        field: "productionBase",
        title: t("plan.table.abnormalCause"),
        field: "message",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "planStartDay",
        title: t("plan.table.creationTime"),
        field: "createTime",
        width: 200,
        align: "center",
      },
      {
        title: t("plan.table.planEndDayDate"),
        field: "planEndDay",
        width: 100,
        align: "center",
      },
      {
        title: t("plan.table.workorderCreationTime"),
        field: "orderCreateTime",
        width: 100,
        align: "center",
      },
      }
    ];
  },
  { immediate: true, deep: true }
);
/** 查询日历管理列表 */
/** 查询料号异常工单列表 */
function getList() {
  loading.value = true;
  redundantOrderList(queryParams.value).then((response) => {
  plateStandardRequireErrorList(queryParams.value).then((response) => {
    orderList.value = response.rows;
    page.value.total = response.total;
    loading.value = false;
@@ -238,11 +193,11 @@
/** 导出按钮操作 */
function handleExport() {
  proxy.download(
    "aps/apsPlatePlan/redundantOrderListExport",
    "aps/ApsPlateStandardRequireError/export",
    {
      ...queryParams.value,
    },
    `redundantOrderList_${new Date().getTime()}.xlsx`
    `abnormalPartNumberReport_${new Date().getTime()}.xlsx`
  );
}
function changePageNo(currentPage) {
src/views/mainPlan/sheetMetalOrderManage/index.vue
@@ -180,7 +180,7 @@
import axios from "axios";
import { listAll_plant } from "@/api/basicData/plant";
import { listAll_shop, listAps_shop } from "@/api/basicData/shop";
import { selectProcessNameList } from "@/api/basicData/processRoute.js";
import { plateStandardRequireErrorList } from "@/api/basicData/sheetMetalConfig/sheetMetalConfig.js";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
src/views/mainPlan/sheetMetalRedundantReport/index.vue
@@ -84,18 +84,8 @@
<script setup name="Calendar">
import HxlhTable from "@/components/HxlhTable";
import {
  listCalendar,
  getCalendar,
  delCalendar,
  addCalendar,
  updateCalendar,
} from "@/api/basicData/calendar";
import { redundantOrderList } from "@/api/basicData/sheetMetalConfig/sheetMetalConfig";
import axios from "axios";
import { listAll_plant } from "@/api/basicData/plant";
import { listAll_shop, listAps_shop } from "@/api/basicData/shop";
import { selectProcessNameList } from "@/api/basicData/processRoute.js";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
const { proxy } = getCurrentInstance();
@@ -103,15 +93,7 @@
const orderList = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
  form: {
    type: "1",
  },
  queryParams: {
    pageNum: 1,
    pageSize: 10,
@@ -119,12 +101,8 @@
    itemNumber: null,
  },
});
const { queryParams, form, rules } = toRefs(data);
const typeRadioNumber = ref(1);
const { queryParams } = toRefs(data);
const plantList = ref([]);
const shopList = ref([]);
const allShopList = ref([]);
const processList = ref([]);
const height = ref(document.documentElement.clientHeight - 220 + "px;");
// 表格配置-列表
const columns = ref([]);
@@ -216,12 +194,6 @@
     loading.value = false;
  });
}
// 表单重置
function reset() {
  proxy.resetForm("queryRef");
}
/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.pageNum = 1;
src/views/mainPlan/sheetMetalSupplyGap/index.vue
@@ -87,7 +87,6 @@
import {
  supplyGapList
} from "@/api/basicData/sheetMetalConfig/sheetMetalConfig";
import axios from "axios";
import { listAll_plant } from "@/api/basicData/plant";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
const { t, locale } = useI18n();
@@ -102,9 +101,6 @@
const total = ref(0);
const title = ref("");
const data = reactive({
  form: {
    type: "1",
  },
  queryParams: {
    pageNum: 1,
    pageSize: 10,
@@ -112,12 +108,8 @@
    requireId: null
  },
});
const { queryParams, form, rules } = toRefs(data);
const typeRadioNumber = ref(1);
const { queryParams } = toRefs(data);
const plantList = ref([]);
const shopList = ref([]);
const allShopList = ref([]);
const processList = ref([]);
const height = ref(document.documentElement.clientHeight - 220 + "px;");
// 表格配置-列表
const columns = ref([]);
@@ -238,7 +230,7 @@
    bomLineCode: null,
    requireId: null
  };
  proxy.resetForm("calendarRef");
  proxy.resetForm("queryRef");
}
/** 搜索按钮操作 */
@@ -252,13 +244,6 @@
function resetQuery() {
  proxy.resetForm("queryRef");
  handleQuery();
}
// 多选框选中数据
function handleSelectionChange(selection) {
  ids.value = selection.map((item) => item.id);
  single.value = selection.length != 1;
  multiple.value = !selection.length;
}
/** 导出按钮操作 */
function handleExport() {