From 2d490943e72a4668413b5fe1e091bfaa15398f4e Mon Sep 17 00:00:00 2001
From: CD配唱片 <CD配唱片>
Date: 星期四, 08 五月 2025 14:17:46 +0800
Subject: [PATCH] 提交钣金异常料号报表静态页及联调,工艺路线下拉加载表格加入节流优化避免下拉加载1s之内多次调用接口问题
---
src/api/basicData/sheetMetalConfig/sheetMetalConfig.js | 9 +++
src/views/basicData/calendarView/index.vue | 4
src/views/mainPlan/abnormalPartNumberReport/index.vue | 73 ++++-------------------
src/views/mainPlan/sheetMetalOrderManage/index.vue | 2
src/views/mainPlan/sheetMetalSupplyGap/index.vue | 19 -----
src/utils/i18n/locales/plan/index.js | 10 ++
src/utils/throttle.js | 2
src/views/mainPlan/sheetMetalRedundantReport/index.vue | 30 ---------
8 files changed, 37 insertions(+), 112 deletions(-)
diff --git a/src/api/basicData/sheetMetalConfig/sheetMetalConfig.js b/src/api/basicData/sheetMetalConfig/sheetMetalConfig.js
index 73bf5c4..c4effbc 100644
--- a/src/api/basicData/sheetMetalConfig/sheetMetalConfig.js
+++ b/src/api/basicData/sheetMetalConfig/sheetMetalConfig.js
@@ -31,4 +31,13 @@
method: "get",
params: query
});
+}
+
+// 閽i噾寮傚父鏂欏彿宸ュ崟 /ApsPlateStandardRequireError/list
+export function plateStandardRequireErrorList(query) {
+ return request({
+ url: `/aps/ApsPlateStandardRequireError/list`,
+ method: "get",
+ params: query
+ });
}
\ No newline at end of file
diff --git a/src/utils/i18n/locales/plan/index.js b/src/utils/i18n/locales/plan/index.js
index 6da39b5..75901c0 100644
--- a/src/utils/i18n/locales/plan/index.js
+++ b/src/utils/i18n/locales/plan/index.js
@@ -165,7 +165,10 @@
demandQuantity:"闇�姹傛暟閲�",
netRequirement:"鍑�闇�姹傞噺",
bomItemID: "椤� ID",
- customizePlannedCompletionDate:"鑷畾涔夎鍒掑畬宸ユ棩"
+ customizePlannedCompletionDate:"鑷畾涔夎鍒掑畬宸ユ棩",
+ //閽i噾鏂欏彿宸ュ崟寮傚父
+ 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",
+ //閽i噾鏂欏彿宸ュ崟寮傚父
+ abnormalCause:"Abnormal cause",
+ creationTime:"Creation time"
},
};
diff --git a/src/utils/throttle.js b/src/utils/throttle.js
index 530320a..17ced74 100644
--- a/src/utils/throttle.js
+++ b/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;
diff --git a/src/views/basicData/calendarView/index.vue b/src/views/basicData/calendarView/index.vue
index 6bc1757..800243c 100644
--- a/src/views/basicData/calendarView/index.vue
+++ b/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;
diff --git a/src/views/mainPlan/abnormalPartNumberReport/index.vue b/src/views/mainPlan/abnormalPartNumberReport/index.vue
index 0585e63..b8ea020 100644
--- a/src/views/mainPlan/abnormalPartNumberReport/index.vue
+++ b/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) {
diff --git a/src/views/mainPlan/sheetMetalOrderManage/index.vue b/src/views/mainPlan/sheetMetalOrderManage/index.vue
index 9279751..4af67d6 100644
--- a/src/views/mainPlan/sheetMetalOrderManage/index.vue
+++ b/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();
diff --git a/src/views/mainPlan/sheetMetalRedundantReport/index.vue b/src/views/mainPlan/sheetMetalRedundantReport/index.vue
index 0585e63..b9f7dbf 100644
--- a/src/views/mainPlan/sheetMetalRedundantReport/index.vue
+++ b/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;
diff --git a/src/views/mainPlan/sheetMetalSupplyGap/index.vue b/src/views/mainPlan/sheetMetalSupplyGap/index.vue
index af444f9..58092c8 100644
--- a/src/views/mainPlan/sheetMetalSupplyGap/index.vue
+++ b/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() {
--
Gitblit v1.9.3