From a241b66efcc41e973290a6722fb7a4d79b833ea1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 13 十月 2026 09:54:32 +0800
Subject: [PATCH] feat(bi): 为图表配置接口添加名称字段

---
 src/views/erp/sale/order/modules/form.vue |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/views/erp/sale/order/modules/form.vue b/src/views/erp/sale/order/modules/form.vue
index a027e83..c7edfa7 100644
--- a/src/views/erp/sale/order/modules/form.vue
+++ b/src/views/erp/sale/order/modules/form.vue
@@ -5,9 +5,10 @@
 
 import { computed, ref } from 'vue';
 
-import { useVbenModal } from '..\..\..\..\..\packages\effects\common-ui\src';
+import { useVbenModal } from '@vben/common-ui';
+import { formatDate } from '@vben/utils';
 
-import { message } from 'ant-design-vue';
+import { message, Tag } from 'ant-design-vue';
 
 import { useVbenForm } from '#/adapter/form';
 import { getAccountSimpleList } from '#/api/erp/finance/account';
@@ -133,7 +134,20 @@
     try {
       formData.value = await getSaleOrder(data.id);
       // 璁剧疆鍒� values
-      await formApi.setValues(formData.value);
+      await formApi.setValues({
+        ...formData.value,
+        productionFinishTime: formatDate(formData.value.productionFinishTime),
+      });
+      if (formData.value?.attachmentList?.length) {
+        const blobIds = formData.value.attachmentList.map((item) => ({
+          uid: String(item.id),
+          name: item.name || '',
+          url: item.url || '',
+          status: 'done',
+          id: item.id,
+        }));
+        await formApi.setFieldValue('blobIds', blobIds);
+      }
     } finally {
       modalApi.unlock();
     }
@@ -144,10 +158,14 @@
 <template>
   <Modal
     :title="getTitle"
-    class="w-3/4"
+    class="w-5/6"
     :show-confirm-button="formType !== 'detail'"
   >
     <Form class="mx-3">
+      <template #productionStatus="{ modelValue }">
+        <Tag v-if="modelValue === 0" color="warning">鏈畬鎴�</Tag>
+        <Tag v-else-if="modelValue === 1" color="success">宸插畬鎴�</Tag>
+      </template>
       <template #items>
         <ItemForm
           ref="itemFormRef"

--
Gitblit v1.9.3