Compare commits

..

5 Commits

Author SHA1 Message Date
tao
44878e2979 配置出站后路由跳转 2026-01-09 10:11:27 +08:00
tao
cd6a96442c 优化 Title 组件结构 2026-01-09 10:11:16 +08:00
tao
734d16539a 增加修改主材出站接口 2026-01-09 10:11:07 +08:00
tao
31a13fcee9 增加刷新作业信息功能 2026-01-09 10:09:19 +08:00
tao
ef5eae7e0f 更改页签名、登录页名 2026-01-08 11:08:54 +08:00
9 changed files with 75 additions and 49 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>工业 HMI 自动采集设备</title> <title>宏禧 MES 过站平台</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@@ -36,6 +36,15 @@ export function addWaferDieOutboundLogBySpecifiedNg(data: any) {
}); });
} }
// 修改主材出站
export function updateMainMaterialOutboundLog(data: any) {
return request({
url: '/mes/station/out-log/main-material',
method: 'put',
data
})
}
// 删除主材出站 // 删除主材出站
export function delMainMaterialOutboundLog(id: ID) { export function delMainMaterialOutboundLog(id: ID) {
return request({ return request({

BIN
src/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -2,8 +2,8 @@
<div class="title"> <div class="title">
<span>{{ name }}</span> <span>{{ name }}</span>
<a-space class="subtitle"> <a-space class="subtitle">
<slot name="extra" /> <slot />
<a-button v-if="showRefresh" size="small" type="primary" @click="handleRefresh"> <a-button v-if="showRefresh" size="small" @click="handleRefresh">
<template #icon><i-lucide-rotate-ccw /></template>刷新 <template #icon><i-lucide-rotate-ccw /></template>刷新
</a-button> </a-button>
</a-space> </a-space>
@@ -24,7 +24,6 @@ defineProps({
const slots = defineSlots<{ const slots = defineSlots<{
'default'(): any; 'default'(): any;
'extra'(): any;
}>(); }>();
const emit = defineEmits(['refresh']); const emit = defineEmits(['refresh']);

View File

@@ -1,8 +1,10 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import { reactive } from "vue"; import { ref, reactive } from "vue";
import { getStation } from "@/api/pwoManage/station";
export const useJobStore = defineStore("job", () => { export const useJobStore = defineStore("job", () => {
const jobInfo = reactive<any>({}); const jobInfo = reactive<any>({});
const loadingJobInfo = ref(false);
function setInfo(job: any) { function setInfo(job: any) {
Object.assign(jobInfo, job); Object.assign(jobInfo, job);
@@ -12,9 +14,23 @@ export const useJobStore = defineStore("job", () => {
Object.assign(jobInfo, {}); Object.assign(jobInfo, {});
} }
async function refresh() {
loadingJobInfo.value = true;
try {
const { data } = await getStation(jobInfo.id);
Object.assign(jobInfo, data);
} catch (error: any) {
console.log(error.message);
} finally {
loadingJobInfo.value = false;
}
}
return { return {
jobInfo, jobInfo,
loadingJobInfo,
setInfo, setInfo,
resetInfo, resetInfo,
refresh,
}; };
}); });

View File

@@ -99,7 +99,7 @@ refreshCaptcha()
<div class="login-header"> <div class="login-header">
<h2 class="login-title"> <h2 class="login-title">
<i-lucide-cpu class="title-icon" /> <i-lucide-cpu class="title-icon" />
工业控制系统 HMI 宏禧 MES 过站平台
</h2> </h2>
<p class="login-subtitle">请登录您的账户</p> <p class="login-subtitle">请登录您的账户</p>
</div> </div>

View File

@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, watch, getCurrentInstance } from 'vue'; import { ref, getCurrentInstance } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import type { ColumnsType } from 'ant-design-vue/es/table/interface'; import type { ColumnsType } from 'ant-design-vue/es/table/interface';
@@ -36,10 +36,10 @@ const columns = [
]; ];
const loadingStations = ref(false); const loadingStations = ref(false);
const fetchStations = async (traceOrderCode: string) => { const fetchStations = async () => {
try { try {
loadingStations.value = true; loadingStations.value = true;
const res = await listStation({ traceOrderCode }); const res = await listStation({ traceOrderCode: pwoStore.pwoInfo.code });
tableData.value = (res.rows || []).map((item: any, idx: number) => { tableData.value = (res.rows || []).map((item: any, idx: number) => {
return { return {
key: String(item.id ?? idx), key: String(item.id ?? idx),
@@ -63,16 +63,6 @@ const handleOutfeed = () => {
router.push({ name: 'Outfeed' }); router.push({ name: 'Outfeed' });
}; };
watch(
() => pwoStore.pwoInfo.code,
(val) => {
if (val) {
fetchStations(val);
}
},
{ immediate: true }
)
function rowClick(record: TableItem) { function rowClick(record: TableItem) {
return { return {
onClick: () => { onClick: () => {
@@ -80,6 +70,10 @@ function rowClick(record: TableItem) {
}, },
}; };
} }
defineExpose({
fetchStations
});
</script> </script>
<template> <template>

View File

@@ -111,6 +111,7 @@ const handleChange = async (value: string, option: LotTraceOrderData) => {
Object.assign(workOrderInfo, data); Object.assign(workOrderInfo, data);
pwoStore.setInfo(data); pwoStore.setInfo(data);
jobStore.resetInfo(); jobStore.resetInfo();
infeedRef.value?.fetchStations();
} catch (error: any) { } catch (error: any) {
message.error(error.message || '获取工单信息失败'); message.error(error.message || '获取工单信息失败');
} finally { } finally {
@@ -126,6 +127,7 @@ const handleRefresh = async () => {
const { data } = await getLotTraceOrder(workOrderInfo.id) const { data } = await getLotTraceOrder(workOrderInfo.id)
Object.assign(workOrderInfo, data); Object.assign(workOrderInfo, data);
pwoStore.setInfo(data); pwoStore.setInfo(data);
infeedRef.value?.fetchStations();
} catch (error: any) { } catch (error: any) {
message.error(error.message || '刷新工单信息失败'); message.error(error.message || '刷新工单信息失败');
} finally { } finally {
@@ -230,6 +232,7 @@ onUnmounted(() => {
<!-- Process Info --> <!-- Process Info -->
<a-col :span="8"> <a-col :span="8">
<a-spin :spinning="jobStore.loadingJobInfo">
<a-card title="工序信息" class="info-card" :bordered="false"> <a-card title="工序信息" class="info-card" :bordered="false">
<a-form :model="processInfo" :colon="false" v-show="!collapsed"> <a-form :model="processInfo" :colon="false" v-show="!collapsed">
<a-form-item label="工序名称"> <a-form-item label="工序名称">
@@ -258,7 +261,11 @@ onUnmounted(() => {
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-form> </a-form>
<template #extra>
<a-button @click="jobStore.refresh"><template #icon><i-lucide-rotate-cw /></template></a-button>
</template>
</a-card> </a-card>
</a-spin>
</a-col> </a-col>
<!-- Action Buttons --> <!-- Action Buttons -->

View File

@@ -52,6 +52,7 @@ const handleOutfeed = async () => {
await completeStation(jobStore.jobInfo.id, storage); await completeStation(jobStore.jobInfo.id, storage);
openSelectLocation.value = false; openSelectLocation.value = false;
message.success('出站成功'); message.success('出站成功');
router.push({ name: 'PwoManage' });
} catch (error: any) { } catch (error: any) {
message.error(error.message || '出站失败'); message.error(error.message || '出站失败');
} finally { } finally {
@@ -97,7 +98,7 @@ fetchLocationList();
</a-col> </a-col>
</a-row> </a-row>
<a-modal title="选择出站库位" :open="openSelectLocation" @ok="handleOutfeed" @cancel="openSelectLocation = false"> <a-modal title="选择出站库位" :open="openSelectLocation" @ok="handleOutfeed" >
<a-select style="width: 100%" @change="handleChangeLocation" :options="locationOptions" :fieldNames="{ label: 'storageLocationCode', value: 'id' }" /> <a-select style="width: 100%" @change="handleChangeLocation" :options="locationOptions" :fieldNames="{ label: 'storageLocationCode', value: 'id' }" />
</a-modal> </a-modal>
</a-spin> </a-spin>