From 0517176cf1c439d04be39a2313cf114ffc3ae080 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 19 十月 2026 13:07:51 +0800
Subject: [PATCH] feat(config): 添加生产环境配置并更新公司部署设置

---
 src/views/wls/returnissue/data.ts |   76 +++++++++++++++++++-------------------
 1 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/views/wls/returnissue/data.ts b/src/views/wls/returnissue/data.ts
index 4ca6336..ff3033b 100644
--- a/src/views/wls/returnissue/data.ts
+++ b/src/views/wls/returnissue/data.ts
@@ -1,25 +1,21 @@
 锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
+import type { MesWmProductIssueLineApi } from '#/api/mes/wm/productissue/line';
 import type { MesWmReturnIssueApi } from '#/api/mes/wm/returnissue';
 import type { MesWmReturnIssueDetailApi } from '#/api/mes/wm/returnissue/detail';
 import type { MesWmReturnIssueLineApi } from '#/api/mes/wm/returnissue/line';
 
 import { h, markRaw } from 'vue';
 
-import {
-  DICT_TYPE,
-  MesAutoCodeRuleCode,
-  MesProWorkOrderStatusEnum,
-} from '@vben/constants';
+import { DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
 import { getDictOptions } from '@vben/hooks';
 
 import { Button } from 'ant-design-vue';
 
 import { z } from '#/adapter/form';
 import { generateAutoCode } from '#/api/mes/md/autocode/record';
-import { MdWorkstationSelect } from '#/views/mes/md/workstation/components';
-import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components';
+import { WmProductIssueLineSelect } from '#/views/wls/productissue/components';
 import { WmMaterialStockSelect } from '#/views/wls/materialstock/components';
 import {
   WmWarehouseAreaSelect,
@@ -103,20 +99,21 @@
       rules: 'required',
     },
     {
-      fieldName: 'workOrderId',
-      label: '鐢熶骇璁㈠崟',
-      component: markRaw(ProWorkOrderSelect),
+      fieldName: 'workOrderCode',
+      label: '鐢熶骇璁㈠崟鍙�',
+      component: 'Input',
       componentProps: {
-        status: MesProWorkOrderStatusEnum.CONFIRMED,
+        disabled: isHeaderReadonly(formType),
+        placeholder: '璇疯緭鍏ョ敓浜ц鍗曞彿',
       },
-      rules: 'selectRequired',
     },
     {
-      fieldName: 'workstationId',
+      fieldName: 'workstationName',
       label: '宸ヤ綔绔�',
-      component: markRaw(MdWorkstationSelect),
+      component: 'Input',
       componentProps: {
-        placeholder: '璇烽�夋嫨宸ヤ綔绔�',
+        disabled: isHeaderReadonly(formType),
+        placeholder: '璇疯緭鍏ュ伐浣滅珯鍚嶇О',
       },
     },
     {
@@ -125,9 +122,9 @@
       component: 'DatePicker',
       componentProps: {
         class: '!w-full',
-        format: 'YYYY-MM-DD HH:mm:ss',
+        format: 'YYYY-MM-DD',
         placeholder: '璇烽�夋嫨閫�鏂欐棩鏈�',
-        showTime: true,
+        showTime: false,
         valueFormat: 'YYYY-MM-DD HH:mm:ss',
       },
     },
@@ -166,11 +163,12 @@
       },
     },
     {
-      fieldName: 'workOrderId',
-      label: '鐢熶骇璁㈠崟',
-      component: markRaw(ProWorkOrderSelect),
+      fieldName: 'workOrderCode',
+      label: '鐢熶骇璁㈠崟鍙�',
+      component: 'Input',
       componentProps: {
-        placeholder: '璇烽�夋嫨鐢熶骇璁㈠崟',
+        allowClear: true,
+        placeholder: '璇疯緭鍏ョ敓浜ц鍗曞彿',
       },
     },
     {
@@ -223,7 +221,7 @@
       field: 'returnDate',
       title: '閫�鏂欐棩鏈�',
       width: 180,
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
     },
     {
       field: 'status',
@@ -316,27 +314,29 @@
 }
 
 /** 閫�鏂欏崟琛屾柊澧�/淇敼鐨勮〃鍗� */
-export function useLineFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
+export function useLineFormSchema(
+  formApi?: VbenFormApi,
+  workOrderId?: number,
+): VbenFormSchema[] {
   return [
     {
-      fieldName: 'materialStockId',
-      label: '搴撳瓨璁板綍',
-      component: markRaw(WmMaterialStockSelect),
+      fieldName: 'issueLineId',
+      label: '棰嗘枡璁板綍',
+      component: markRaw(WmProductIssueLineSelect),
       componentProps: {
-        // 閫夋嫨搴撳瓨璁板綍鍚庯紝鑷姩鍥炲~鐗╂枡/鎵规/鏁伴噺
-        onChange: async (stock?: MesWmMaterialStockApi.MaterialStock) => {
+        workOrderId,
+        onChange: async (line?: MesWmProductIssueLineApi.ProductIssueLine) => {
           await formApi?.setValues({
-            batchCode: stock?.batchCode,
-            batchId: stock?.batchId,
-            itemId: stock?.itemId,
-            materialDisplayName: stock
-              ? [stock.itemName, stock.specification].filter(Boolean).join(' | ')
+            batchCode: line?.batchCode,
+            batchId: line?.batchId,
+            itemId: line?.itemId,
+            materialDisplayName: line
+              ? [line.itemName, line.specification].filter(Boolean).join(' | ')
               : undefined,
-            quantity: stock?.quantity,
-            quantityMax: stock?.quantity,
+            quantity: line?.quantity,
+            quantityMax: line?.quantity,
           });
         },
-        virtualFilter: 'only',
       },
       rules: 'selectRequired',
     },
@@ -390,7 +390,7 @@
       component: 'Input',
       componentProps: {
         disabled: true,
-        placeholder: '閫夋嫨搴撳瓨鍚庤嚜鍔ㄥ甫鍑�',
+        placeholder: '閫夋嫨棰嗘枡璁板綍鍚庤嚜鍔ㄥ甫鍑�',
       },
     },
     {
@@ -399,7 +399,7 @@
       component: 'Input',
       componentProps: {
         disabled: true,
-        placeholder: '閫夋嫨搴撳瓨鍚庤嚜鍔ㄥ甫鍑�',
+        placeholder: '閫夋嫨棰嗘枡璁板綍鍚庤嚜鍔ㄥ甫鍑�',
       },
     },
     {

--
Gitblit v1.9.3