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" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>工业 HMI 自动采集设备</title>
<title>宏禧 MES 过站平台</title>
</head>
<body>
<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) {
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">
<span>{{ name }}</span>
<a-space class="subtitle">
<slot name="extra" />
<a-button v-if="showRefresh" size="small" type="primary" @click="handleRefresh">
<slot />
<a-button v-if="showRefresh" size="small" @click="handleRefresh">
<template #icon><i-lucide-rotate-ccw /></template>刷新
</a-button>
</a-space>
@@ -24,7 +24,6 @@ defineProps({
const slots = defineSlots<{
'default'(): any;
'extra'(): any;
}>();
const emit = defineEmits(['refresh']);

View File

@@ -1,8 +1,10 @@
import { defineStore } from "pinia";
import { reactive } from "vue";
import { ref, reactive } from "vue";
import { getStation } from "@/api/pwoManage/station";
export const useJobStore = defineStore("job", () => {
const jobInfo = reactive<any>({});
const loadingJobInfo = ref(false);
function setInfo(job: any) {
Object.assign(jobInfo, job);
@@ -12,9 +14,23 @@ export const useJobStore = defineStore("job", () => {
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 {
jobInfo,
loadingJobInfo,
setInfo,
resetInfo,
refresh,
};
});

View File

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

View File

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

View File

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

View File

@@ -52,6 +52,7 @@ const handleOutfeed = async () => {
await completeStation(jobStore.jobInfo.id, storage);
openSelectLocation.value = false;
message.success('出站成功');
router.push({ name: 'PwoManage' });
} catch (error: any) {
message.error(error.message || '出站失败');
} finally {
@@ -97,7 +98,7 @@ fetchLocationList();
</a-col>
</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-modal>
</a-spin>