From 08bb5d242135e2c1f0fc17d2b5f7ae548275a3a2 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 28 八月 2026 17:15:33 +0800
Subject: [PATCH] feat(mes): 实现临时码预生成和补录功能
---
src/views/mes/pro/bagCode/modules/generate-form.vue | 29 ++---------------------------
1 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/src/views/mes/pro/bagCode/modules/generate-form.vue b/src/views/mes/pro/bagCode/modules/generate-form.vue
index 6ea36bc..316e9fd 100644
--- a/src/views/mes/pro/bagCode/modules/generate-form.vue
+++ b/src/views/mes/pro/bagCode/modules/generate-form.vue
@@ -3,33 +3,18 @@
import type { MesProBagCodeApi } from "#/api/mes/pro/bagCode";
import { useVbenModal } from "@vben/common-ui";
- import { MesProBatchStatusEnum } from "@vben/constants";
import { message } from "ant-design-vue";
import { useVbenForm } from "#/adapter/form";
import { generateBagCodes } from "#/api/mes/pro/bagCode";
- import { getBatchSimpleList } from "#/api/mes/pro/batch";
defineOptions({ name: "MesProBagCodeGenerateForm" });
const emit = defineEmits(["success"]);
- /** 鏋勫缓琛ㄥ崟锛堟壒娆′笅鎷夐�夐」鐢卞閮ㄥ姞杞芥敞鍏ワ級 */
- function buildSchema(batchOptions: { label: string; value: number }[]): VbenFormSchema[] {
+ function buildSchema(): VbenFormSchema[] {
return [
- {
- fieldName: "batchId",
- label: "鐢熶骇鎵规",
- component: "Select",
- componentProps: {
- options: batchOptions,
- optionFilterProp: "label",
- placeholder: "璇烽�夋嫨鐢熶骇涓殑鎵规",
- showSearch: true,
- },
- rules: "selectRequired",
- },
{
fieldName: "count",
label: "鐢熸垚琚嬫暟",
@@ -86,17 +71,7 @@
if (!isOpen) return;
modalApi.lock();
try {
- // 浠呯敓浜т腑鐨勬壒娆″厑璁哥敓鎴愯鐮�
- const batches = await getBatchSimpleList();
- const options = batches
- .filter(
- (batch) => batch.status === MesProBatchStatusEnum.PRODUCING
- )
- .map((batch) => ({
- label: batch.code!,
- value: batch.id!,
- }));
- await formApi.setState({ schema: buildSchema(options) });
+ await formApi.setState({ schema: buildSchema() });
} finally {
modalApi.unlock();
}
--
Gitblit v1.9.3