|
@@ -1,7 +1,17 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="commonTitle">
|
|
|
- {{ activeName == "ok" ? "已完成工单" : "待完成工单" }}[{{ ordersSum }}]
|
|
|
+ <div
|
|
|
+ style="display: flex; justify-content: space-between; align-items: center"
|
|
|
+ >
|
|
|
+ <div class="commonTitle">
|
|
|
+ {{ activeName == "ok" ? "已完成工单" : "待完成工单" }}[{{ ordersSum }}]
|
|
|
+ </div>
|
|
|
+ <svg-icon
|
|
|
+ icon-class="toRefresh"
|
|
|
+ size="47"
|
|
|
+ style="margin-bottom: 10px"
|
|
|
+ @click="toRefresh"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
<el-tabs
|
|
@@ -53,7 +63,7 @@ const selectedOderStatus = inject("selectedOderStatus");
|
|
|
const ordersSum = ref(0);
|
|
|
const commonS = useCommonStoreHook();
|
|
|
const map = commonS.loadingMap;
|
|
|
-const emit = defineEmits(["getindex"]);
|
|
|
+const emit = defineEmits(["getindex", "refresh"]);
|
|
|
const ordersDataArray = inject("ordersDataArray");
|
|
|
const selectSeqArray = inject("selectSeqArray");
|
|
|
//获取未完成订单的参数
|
|
@@ -64,6 +74,44 @@ const ordersQuery = ref({
|
|
|
totalPages: 1,
|
|
|
});
|
|
|
const wrapRef = ref(null);
|
|
|
+const OpKey = inject("OpKey");
|
|
|
+const SeqKey = inject("SeqKey");
|
|
|
+
|
|
|
+const toRefresh = async () => {
|
|
|
+ const { code, data } = await getOrders({
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: ordersQuery.value.pageSize * 5,
|
|
|
+ queryComplete: ordersQuery.value.queryComplete,
|
|
|
+ });
|
|
|
+ if (code == "200") {
|
|
|
+ ordersDataArray.value = [];
|
|
|
+ ordersDataArray.value.push(...data.records);
|
|
|
+ ordersSum.value = data.totalCount;
|
|
|
+ ordersQuery.value.totalPages = data.totalPages;
|
|
|
+
|
|
|
+ // 记录工序、流转卡号数据
|
|
|
+ emit("refresh");
|
|
|
+
|
|
|
+ //点击工单数据重置
|
|
|
+ if (selectIndex.value != null) {
|
|
|
+ store.odersData.productLineId =
|
|
|
+ ordersDataArray.value[selectIndex.value].productLineId;
|
|
|
+ store.odersData.workOrderCode =
|
|
|
+ ordersDataArray.value[selectIndex.value].workOrderCode;
|
|
|
+ store.processInfo.materialName =
|
|
|
+ ordersDataArray.value[selectIndex.value].materialName;
|
|
|
+ store.processInfo.materialModel =
|
|
|
+ ordersDataArray.value[selectIndex.value].materialModel;
|
|
|
+ store.odersData.operationId = "";
|
|
|
+ store.processInfo.operationCode = "";
|
|
|
+ store.processInfo.operationName = "";
|
|
|
+ store.useSeqNo = "";
|
|
|
+ selectSeqArray.value = [];
|
|
|
+ selectSeqIndex.value = null;
|
|
|
+ emit("getindex", selectIndex.value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
//获取未完成订单Data
|
|
|
const getOrdersData = async () => {
|
|
|
const { code, data } = await getOrders(ordersQuery.value);
|