增加出站功能
This commit is contained in:
15
components.d.ts
vendored
15
components.d.ts
vendored
@@ -10,7 +10,6 @@ declare module 'vue' {
|
|||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AButton: typeof import('ant-design-vue/es')['Button']
|
AButton: typeof import('ant-design-vue/es')['Button']
|
||||||
ACard: typeof import('ant-design-vue/es')['Card']
|
ACard: typeof import('ant-design-vue/es')['Card']
|
||||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
|
||||||
ACol: typeof import('ant-design-vue/es')['Col']
|
ACol: typeof import('ant-design-vue/es')['Col']
|
||||||
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
|
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
|
||||||
ActionButtons: typeof import('./src/components/common/ActionButtons/index.vue')['default']
|
ActionButtons: typeof import('./src/components/common/ActionButtons/index.vue')['default']
|
||||||
@@ -21,7 +20,6 @@ declare module 'vue' {
|
|||||||
AForm: typeof import('ant-design-vue/es')['Form']
|
AForm: typeof import('ant-design-vue/es')['Form']
|
||||||
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
||||||
AInput: typeof import('ant-design-vue/es')['Input']
|
AInput: typeof import('ant-design-vue/es')['Input']
|
||||||
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
|
|
||||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
AMenu: typeof import('ant-design-vue/es')['Menu']
|
||||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||||
@@ -35,20 +33,19 @@ declare module 'vue' {
|
|||||||
ATable: typeof import('ant-design-vue/es')['Table']
|
ATable: typeof import('ant-design-vue/es')['Table']
|
||||||
ATableSummaryCell: typeof import('ant-design-vue/es')['TableSummaryCell']
|
ATableSummaryCell: typeof import('ant-design-vue/es')['TableSummaryCell']
|
||||||
ATableSummaryRow: typeof import('ant-design-vue/es')['TableSummaryRow']
|
ATableSummaryRow: typeof import('ant-design-vue/es')['TableSummaryRow']
|
||||||
|
ATag: typeof import('ant-design-vue/es')['Tag']
|
||||||
ATypographyText: typeof import('ant-design-vue/es')['TypographyText']
|
ATypographyText: typeof import('ant-design-vue/es')['TypographyText']
|
||||||
Header: typeof import('./src/components/Header/index.vue')['default']
|
DictTag: typeof import('./src/components/common/DictTag/index.vue')['default']
|
||||||
|
Header: typeof import('./src/components/common/Header/index.vue')['default']
|
||||||
ILucideBuilding: typeof import('~icons/lucide/building')['default']
|
ILucideBuilding: typeof import('~icons/lucide/building')['default']
|
||||||
ILucideChevronDown: typeof import('~icons/lucide/chevron-down')['default']
|
ILucideChevronDown: typeof import('~icons/lucide/chevron-down')['default']
|
||||||
ILucideCopy: typeof import('~icons/lucide/copy')['default']
|
ILucideCopy: typeof import('~icons/lucide/copy')['default']
|
||||||
ILucideCpu: typeof import('~icons/lucide/cpu')['default']
|
ILucideRotateCcw: typeof import('~icons/lucide/rotate-ccw')['default']
|
||||||
ILucideLoader: typeof import('~icons/lucide/loader')['default']
|
|
||||||
ILucideLock: typeof import('~icons/lucide/lock')['default']
|
|
||||||
ILucideRefreshCw: typeof import('~icons/lucide/refresh-cw')['default']
|
|
||||||
ILucideRotateCw: typeof import('~icons/lucide/rotate-cw')['default']
|
ILucideRotateCw: typeof import('~icons/lucide/rotate-cw')['default']
|
||||||
ILucideShieldCheck: typeof import('~icons/lucide/shield-check')['default']
|
|
||||||
ILucideUser: typeof import('~icons/lucide/user')['default']
|
|
||||||
Lucide: typeof import('./src/components/common/Lucide/index.vue')['default']
|
Lucide: typeof import('./src/components/common/Lucide/index.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
Subtitle: typeof import('./src/components/common/Subtitle/index.vue')['default']
|
||||||
|
Title: typeof import('./src/components/common/Title/index.vue')['default']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.bottom-section {
|
.bottom-section {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 16px;
|
padding: 12px 14px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, computed } from 'vue';
|
import { ref, onMounted, computed, getCurrentInstance } from 'vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { useJobStore } from '@/store';
|
import { useJobStore } from '@/store';
|
||||||
import type { ColumnsType } from 'ant-design-vue/es/table/interface';
|
import type { ColumnsType } from 'ant-design-vue/es/table/interface';
|
||||||
import { delay } from '@/utils/mock';
|
import { listMainMaterialEntryLog } from '@/api/pwoManage/primaryMaterial'
|
||||||
|
import { listMainMaterialOutboundLog } from '@/api/pwoManage/primaryMaterial';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as any
|
||||||
|
const { main_material_ok_level, main_material_ng_level } = proxy.useDict("main_material_ok_level", "main_material_ng_level")
|
||||||
|
|
||||||
const jobStore = useJobStore();
|
const jobStore = useJobStore();
|
||||||
|
|
||||||
@@ -20,11 +24,12 @@ const primaryMaterialColumns = [
|
|||||||
{ title: '序号', dataIndex: 'index', key: 'index', align: 'center', width: 80 },
|
{ title: '序号', dataIndex: 'index', key: 'index', align: 'center', width: 80 },
|
||||||
{ title: 'Wafer ID', dataIndex: 'waferCode', key: 'waferCode', align: 'center' },
|
{ title: 'Wafer ID', dataIndex: 'waferCode', key: 'waferCode', align: 'center' },
|
||||||
{ title: 'Die ID', dataIndex: 'dieCode', key: 'dieCode', align: 'center' },
|
{ title: 'Die ID', dataIndex: 'dieCode', key: 'dieCode', align: 'center' },
|
||||||
{ title: '结果', dataIndex: 'result', key: 'result', filters: [{ text: 'OK', value: 'OK', }, { text: 'NG', value: 'NG', }], onFilter: (value: string, record: any) => record.result.indexOf(value) === 0, align: 'center' },
|
{ title: '结果', dataIndex: 'result', key: 'result', align: 'center' },
|
||||||
{ title: '质量等级', dataIndex: 'qualityLevel', key: 'qualityLevel', filters: [{ text: 'A', value: 'A', }, { text: 'B', value: 'B', }], onFilter: (value: string, record: any) => record.qualityLevel.indexOf(value) === 0, align: 'center' },
|
{ title: '质量等级', dataIndex: 'qualityLevel', key: 'qualityLevel' },
|
||||||
{ title: '操作', key: 'action', align: 'center', width: 120 },
|
{ title: '操作', key: 'action', align: 'center', width: 120 },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// 总计数据
|
||||||
const totals = computed(() => {
|
const totals = computed(() => {
|
||||||
let okNum = 0;
|
let okNum = 0;
|
||||||
let ngNum = 0;
|
let ngNum = 0;
|
||||||
@@ -43,15 +48,11 @@ const primaryMaterialTableData = ref<PrimaryMaterialTableItem[]>([]);
|
|||||||
|
|
||||||
const loadingPrimaryMaterialList = ref(false);
|
const loadingPrimaryMaterialList = ref(false);
|
||||||
const fetchPrimaryMaterialList = async () => {
|
const fetchPrimaryMaterialList = async () => {
|
||||||
// const stationId = jobStore.jobInfo.id;
|
const stationId = jobStore.jobInfo.id;
|
||||||
// if (!stationId) return;
|
if (!stationId) return;
|
||||||
loadingPrimaryMaterialList.value = true;
|
loadingPrimaryMaterialList.value = true;
|
||||||
try {
|
try {
|
||||||
const rows = await delay(1000, [
|
const { rows } = await listMainMaterialEntryLog({ stationId });
|
||||||
{ key: '1', waferCode: 'WF-20250401-0001', dieCode: 'DIE-20250401-0001', result: 'OK', qualityLevel: 'A' },
|
|
||||||
{ key: '2', waferCode: 'WF-20250401-0001', dieCode: 'DIE-20250401-0001', result: 'NG', qualityLevel: 'A' },
|
|
||||||
{ key: '3', waferCode: 'WF-20250401-0001', dieCode: 'DIE-20250401-0001', result: 'OK', qualityLevel: 'B' }
|
|
||||||
]);
|
|
||||||
primaryMaterialTableData.value = rows;
|
primaryMaterialTableData.value = rows;
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error.message || '查询治具列表失败');
|
message.error(error.message || '查询治具列表失败');
|
||||||
@@ -83,7 +84,7 @@ fetchPrimaryMaterialList()
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="equipment__container">
|
<div class="equipment__container">
|
||||||
<div class="main-title">主材报工</div>
|
<Title name="主材报工" showRefresh @refresh="fetchPrimaryMaterialList" />
|
||||||
<div class="table-wrapper" ref="customTable">
|
<div class="table-wrapper" ref="customTable">
|
||||||
<a-table :dataSource="primaryMaterialTableData" :columns="primaryMaterialColumns as ColumnsType<PrimaryMaterialTableItem>"
|
<a-table :dataSource="primaryMaterialTableData" :columns="primaryMaterialColumns as ColumnsType<PrimaryMaterialTableItem>"
|
||||||
:pagination="false" bordered sticky size="middle" :scroll="{ y: tableHeight }"
|
:pagination="false" bordered sticky size="middle" :scroll="{ y: tableHeight }"
|
||||||
@@ -91,12 +92,14 @@ fetchPrimaryMaterialList()
|
|||||||
<template #bodyCell="{ column, index, record }">
|
<template #bodyCell="{ column, index, record }">
|
||||||
<template v-if="column.key === 'index'">{{ index + 1 }}</template>
|
<template v-if="column.key === 'index'">{{ index + 1 }}</template>
|
||||||
<template v-if="column.key === 'result'">
|
<template v-if="column.key === 'result'">
|
||||||
<a-switch v-model:checked="record.result" checked-children="OK" checkedValue="OK" un-checked-children="NG" unCheckedValue="NG" />
|
<a-switch v-model:checked="record.result" checked-children="NG" checkedValue="NG" un-checked-children="OK" unCheckedValue="OK" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'qualityLevel'">
|
<template v-if="column.key === 'qualityLevel'">
|
||||||
<a-select v-model:value="record.qualityLevel" style="width: 80%">
|
<a-select v-model:value="record.qualityLevel" style="width: 80%" v-if="record.result === 'OK'">
|
||||||
<a-select-option value="A">A</a-select-option>
|
<a-select-option v-for="dict in main_material_ok_level" :value="dict.value">{{ dict.label }}</a-select-option>
|
||||||
<a-select-option value="B">B</a-select-option>
|
</a-select>
|
||||||
|
<a-select v-model:value="record.qualityLevel" style="width: 80%" v-else>
|
||||||
|
<a-select-option v-for="dict in main_material_ng_level" :value="dict.value">{{ dict.label }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
@@ -145,30 +148,22 @@ fetchPrimaryMaterialList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-title {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 600;
|
|
||||||
border-bottom: 1px solid #c9c9c9;
|
|
||||||
padding: 0 0 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper {
|
.table-wrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep(.ant-switch) {
|
::v-deep(.ant-switch) {
|
||||||
|
background-color: #04d903;
|
||||||
|
&:hover {
|
||||||
|
background-color: #02eb02;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ant-switch-checked {
|
||||||
background-color: #ff0000;
|
background-color: #ff0000;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #ff2525;
|
background-color: #ff2525;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.ant-switch-checked {
|
|
||||||
background-color: #04d903;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: #02eb02;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed, reactive } from 'vue';
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
import { useRouter, useRoute } from 'vue-router';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import { listStorageLocation } from '@/api/pwoManage/location';
|
||||||
|
import { completeStation } from '@/api/pwoManage/station';
|
||||||
|
import { useJobStore } from '@/store';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
|
const jobStore = useJobStore();
|
||||||
|
|
||||||
const menuItems = [
|
const menuItems = [
|
||||||
{ label: '主材报工', key: 'JobReport', progress: 30 },
|
{ label: '主材报工', key: 'JobReport', progress: 30 },
|
||||||
{ label: '工序参数', key: 'ParameterConfiguration', progress: 80 },
|
{ label: '工序参数', key: 'ParameterConfiguration', progress: 80 },
|
||||||
@@ -18,12 +23,35 @@ const handleMenuClick = (name: string) => {
|
|||||||
router.push({ name });
|
router.push({ name });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const locationOptions = ref<any>([]);
|
||||||
|
const fetchLocationList = async () => {
|
||||||
|
try {
|
||||||
|
const { rows } = await listStorageLocation({});
|
||||||
|
locationOptions.value = rows;
|
||||||
|
} catch (error: any) {
|
||||||
|
message.error(error.message || '获取库位列表失败');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const openSelectLocation = ref(false);
|
||||||
|
const handleSelectLocation = () => {
|
||||||
|
fetchLocationList();
|
||||||
|
openSelectLocation.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const storage = reactive({});
|
||||||
|
const handleChangeLocation = (value: any, option: any) => {
|
||||||
|
Object.assign(storage, option);
|
||||||
|
};
|
||||||
|
|
||||||
// 确认出站
|
// 确认出站
|
||||||
const outfeeding = ref(false);
|
const outfeeding = ref(false);
|
||||||
const handleOutfeed = async () => {
|
const handleOutfeed = async () => {
|
||||||
outfeeding.value = true;
|
outfeeding.value = true;
|
||||||
try {
|
try {
|
||||||
router.push({ name: 'JobReport' });
|
await completeStation(jobStore.jobInfo.id, storage);
|
||||||
|
openSelectLocation.value = false;
|
||||||
|
message.success('出站成功');
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error.message || '出站失败');
|
message.error(error.message || '出站失败');
|
||||||
} finally {
|
} finally {
|
||||||
@@ -41,6 +69,8 @@ function renderTableHeight() {
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
renderTableHeight
|
renderTableHeight
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fetchLocationList();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -62,10 +92,14 @@ defineExpose({
|
|||||||
:stroke-color="activeKey === item.key ? '#1890ff' : undefined" class="menu-progress" />
|
:stroke-color="activeKey === item.key ? '#1890ff' : undefined" class="menu-progress" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-button type="primary" size="large" @click="handleOutfeed">确认出站</a-button>
|
<a-button type="primary" size="large" @click="handleSelectLocation">确认出站</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
|
<a-modal title="选择出站库位" :open="openSelectLocation" @ok="handleOutfeed" @cancel="openSelectLocation = false">
|
||||||
|
<a-select style="width: 100%" @change="handleChangeLocation" :options="locationOptions" :fieldNames="{ label: 'storageLocationCode', value: 'id' }" />
|
||||||
|
</a-modal>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user