Compare commits
5 Commits
281e1dfc83
...
44878e2979
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44878e2979 | ||
|
|
cd6a96442c | ||
|
|
734d16539a | ||
|
|
31a13fcee9 | ||
|
|
ef5eae7e0f |
@@ -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>
|
||||
|
||||
@@ -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
BIN
src/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -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']);
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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,6 +232,7 @@ onUnmounted(() => {
|
||||
|
||||
<!-- Process Info -->
|
||||
<a-col :span="8">
|
||||
<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="工序名称">
|
||||
@@ -258,7 +261,11 @@ onUnmounted(() => {
|
||||
</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 -->
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user