From 91c82965b2d987452ca276e3a03b48c8dcda2ae9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 19 八月 2026 11:47:26 +0800
Subject: [PATCH] config(env): 更新生产环境配置和公司名称
---
src/views/mes/pro/workorder/modules/form.vue | 64 ++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/src/views/mes/pro/workorder/modules/form.vue b/src/views/mes/pro/workorder/modules/form.vue
index 1181216..2a51ec9 100644
--- a/src/views/mes/pro/workorder/modules/form.vue
+++ b/src/views/mes/pro/workorder/modules/form.vue
@@ -8,7 +8,6 @@
import { confirm, useVbenModal } from "@vben/common-ui";
import {
- BarcodeBizTypeEnum,
MesProWorkOrderStatusEnum,
} from "@vben/constants";
@@ -24,9 +23,13 @@
} from "#/api/mes/pro/workorder";
import { batchSaveWorkOrderProcess, getWorkOrderProcessListByWorkOrderId } from "#/api/mes/pro/workorder/process";
import { $t } from "#/locales";
- import { BarcodeDetail } from "#/views/wls/barcode/components";
+ // import { BarcodeDetail } from "#/views/wls/barcode/components";
import { useFormSchema } from "../data";
+ import PredictDelivery from "./ai/predict-delivery.vue";
+ import PredictDuration from "./ai/predict-duration.vue";
+ import PredictMaterial from "./ai/predict-material.vue";
+ import PredictRisk from "./ai/predict-risk.vue";
import ItemList from "./item-list.vue";
import ProcessList from "./process-list.vue";
@@ -35,7 +38,7 @@
const formData = ref<MesProWorkOrderApi.WorkOrder>();
const originalSnapshot = ref("");
const subTabsName = ref("process");
- const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>();
+ // const barcodeDetailRef = ref<InstanceType<typeof BarcodeDetail>>();
const processListRef = ref<InstanceType<typeof ProcessList>>();
const currentProductId = ref<number>(); // 褰撳墠閫変腑鐨勪骇鍝� ID锛堢敤浜庡伐搴忓姞杞斤級
const tempProcessList = ref<MesProWorkOrderProcessApi.WorkOrderProcess[]>([]); // 涓存椂宸ュ簭鍒楄〃
@@ -50,6 +53,12 @@
() =>
formType.value === "update" &&
formData.value?.status === MesProWorkOrderStatusEnum.PREPARE
+ );
+ const canUseAi = computed(
+ () =>
+ formData.value?.id &&
+ (formData.value?.status === MesProWorkOrderStatusEnum.PREPARE ||
+ formData.value?.status === MesProWorkOrderStatusEnum.CONFIRMED)
);
const getTitle = computed(() => {
const isChild = !!formData.value?.parentId;
@@ -137,17 +146,17 @@
}
/** 鏌ョ湅璁㈠崟鏉$爜 */
- function handleBarcode() {
- if (!formData.value?.id) {
- return;
- }
- barcodeDetailRef.value?.openByBusiness(
- formData.value.id,
- BarcodeBizTypeEnum.WORKORDER,
- formData.value.code,
- formData.value.name
- );
- }
+ // function handleBarcode() {
+ // if (!formData.value?.id) {
+ // return;
+ // }
+ // barcodeDetailRef.value?.openByBusiness(
+ // formData.value.id,
+ // BarcodeBizTypeEnum.WORKORDER,
+ // formData.value.code,
+ // formData.value.name
+ // );
+ // }
/** 宸ュ簭鍒楄〃鍙樺寲鍥炶皟 */
function handleProcessListChange(list: MesProWorkOrderProcessApi.WorkOrderProcess[]) {
@@ -351,12 +360,21 @@
</Tabs>
</template>
<template #prepend-footer>
- <div class="flex flex-auto items-center">
- <Button v-if="showMainBtn"
- type="primary"
- @click="modalApi.onConfirm()">
- {{ mainActionText }}
- </Button>
+ <div class="flex flex-auto flex-col gap-2">
+ <div v-if="canUseAi" class="flex items-center gap-2">
+ <PredictMaterial :work-order-id="formData!.id" />
+ <PredictDuration :work-order-id="formData!.id" />
+ <PredictRisk :work-order-id="formData!.id" />
+ <PredictDelivery :work-order-id="formData!.id" />
+ </div>
+ <div v-if="canUseAi && showMainBtn" class="border-t border-gray-200" />
+ <div class="flex items-center">
+ <Button v-if="showMainBtn"
+ type="primary"
+ @click="modalApi.onConfirm()">
+ {{ mainActionText }}
+ </Button>
+ </div>
</div>
</template>
<template #append-footer>
@@ -365,13 +383,13 @@
@click="handleSave">
淇濆瓨淇敼
</Button>
- <Button v-if="formType === 'detail' && formData?.id"
+ <!-- <Button v-if="formType === 'detail' && formData?.id"
@click="handleBarcode">
鏌ョ湅鏉$爜
- </Button>
+ </Button> -->
<Button @click="modalApi.close()">鍙栨秷</Button>
</div>
</template>
</Modal>
- <BarcodeDetail ref="barcodeDetailRef" />
+ <!-- <BarcodeDetail ref="barcodeDetailRef" /> -->
</template>
--
Gitblit v1.9.3