|
@@ -23,15 +23,16 @@ import Order from "@/views/process/components/order.vue";
|
|
import { useProcessStore } from "@/store";
|
|
import { useProcessStore } from "@/store";
|
|
import { useDictionaryStore } from "@/store";
|
|
import { useDictionaryStore } from "@/store";
|
|
import { getOrders } from "@/api/process";
|
|
import { getOrders } from "@/api/process";
|
|
|
|
+import { emitter, EventsNames } from "@/utils/common";
|
|
const dictS = useDictionaryStore();
|
|
const dictS = useDictionaryStore();
|
|
const store = useProcessStore();
|
|
const store = useProcessStore();
|
|
const selectSeqIndex = inject("selectSeqIndex");
|
|
const selectSeqIndex = inject("selectSeqIndex");
|
|
|
|
+const scanStatus = inject("scanStatus");
|
|
const ordersSum = ref(0);
|
|
const ordersSum = ref(0);
|
|
const emit = defineEmits(["getindex"]);
|
|
const emit = defineEmits(["getindex"]);
|
|
const ordersDataArray = inject("ordersDataArray");
|
|
const ordersDataArray = inject("ordersDataArray");
|
|
//获取未完成订单的参数
|
|
//获取未完成订单的参数
|
|
const ordersQuery = ref({
|
|
const ordersQuery = ref({
|
|
- orders: [],
|
|
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 5,
|
|
pageSize: 5,
|
|
queryComplete: 0,
|
|
queryComplete: 0,
|
|
@@ -47,12 +48,24 @@ const getOrdersData = async () => {
|
|
ordersQuery.value.totalPages = data.totalPages;
|
|
ordersQuery.value.totalPages = data.totalPages;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+//重新刷新当前页码数据
|
|
|
|
+const resetOrdersDataArray = async () => {
|
|
|
|
+ ordersDataArray.value = [];
|
|
|
|
+ ordersQuery.value = {
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 5,
|
|
|
|
+ queryComplete: 0,
|
|
|
|
+ totalPages: 1,
|
|
|
|
+ };
|
|
|
|
+ getOrdersData();
|
|
|
|
+};
|
|
const activeName = ref("false");
|
|
const activeName = ref("false");
|
|
//这里是存放控制当前选择工序的index
|
|
//这里是存放控制当前选择工序的index
|
|
const selectIndex = ref(null);
|
|
const selectIndex = ref(null);
|
|
const setSlectIndex = (index: number) => {
|
|
const setSlectIndex = (index: number) => {
|
|
if (index == null) {
|
|
if (index == null) {
|
|
selectIndex.value = null;
|
|
selectIndex.value = null;
|
|
|
|
+ scanStatus.value = false;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
selectIndex.value = index;
|
|
selectIndex.value = index;
|
|
@@ -107,6 +120,10 @@ watch(
|
|
);
|
|
);
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getOrdersData();
|
|
getOrdersData();
|
|
|
|
+ emitter.on(EventsNames.PROCESS_REDER, () => {
|
|
|
|
+ resetOrdersDataArray();
|
|
|
|
+ setSlectIndex(null);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|