From 679c5b64e0dcbee2ea29c38c9c55c3ff1d4b6258 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 02 十一月 2026 10:51:36 +0800
Subject: [PATCH] 诚发五金:入库/调整/移库/调拨/盘点表单去掉库区库位选择,改由后端默认库区库位兜底

---
 src/views/wls/materialstock/components/stock-adjust-modal.vue |   77 --------------------------------------
 1 files changed, 1 insertions(+), 76 deletions(-)

diff --git a/src/views/wls/materialstock/components/stock-adjust-modal.vue b/src/views/wls/materialstock/components/stock-adjust-modal.vue
index 53ad6ca..8931fed 100644
--- a/src/views/wls/materialstock/components/stock-adjust-modal.vue
+++ b/src/views/wls/materialstock/components/stock-adjust-modal.vue
@@ -22,11 +22,7 @@
 import { MdmItemSelect } from '#/views/basicData/mdm/components';
 import { SrmSupplierSelect } from '#/views/srm/supplier/components';
 import BatchConfigDisplay from './batch-config-display.vue';
-import {
-  WmWarehouseAreaSelect,
-  WmWarehouseLocationSelect,
-  WmWarehouseSelect,
-} from '#/views/wls/warehouse/components';
+import { WmWarehouseSelect } from '#/views/wls/warehouse/components';
 
 const emit = defineEmits<{
   success: [];
@@ -35,8 +31,6 @@
 // 鎿嶄綔绫诲瀷锛�1=鍏ュ簱锛�2=鍑哄簱
 const operateType = ref<1 | 2>(1);
 const selectedItem = ref<MdmItemApi.Item | null>(null);
-const selectedWarehouse = ref<any>(null);
-const selectedLocation = ref<any>(null);
 
 // 鏄惁鍚敤鎵规绠$悊
 const batchEnabled = ref(false);
@@ -102,19 +96,6 @@
   await formApi.setFieldValue('manualBatchEntry', false);
 }
 
-/** 浠撳簱閫夋嫨鍙樺寲 */
-async function handleWarehouseChange(item: any) {
-  selectedWarehouse.value = item;
-  await formApi.setFieldValue('locationId', undefined);
-  await formApi.setFieldValue('areaId', undefined);
-}
-
-/** 搴撳尯閫夋嫨鍙樺寲 */
-async function handleLocationChange(item: any) {
-  selectedLocation.value = item;
-  await formApi.setFieldValue('areaId', undefined);
-}
-
 /** 鎵嬪姩濉啓鎵规鍙峰彉鍖� */
 async function handleManualBatchEntryChange(value: boolean) {
   manualBatchEntry.value = value;
@@ -165,54 +146,6 @@
       component: markRaw(WmWarehouseSelect),
       componentProps: {
         placeholder: '璇烽�夋嫨浠撳簱',
-        onChange: handleWarehouseChange,
-      },
-      rules: 'selectRequired',
-    },
-    {
-      fieldName: 'locationId',
-      label: '搴撳尯',
-      component: markRaw(WmWarehouseLocationSelect),
-      componentProps: {
-        placeholder: '璇烽�夋嫨搴撳尯',
-        warehouseId: selectedWarehouse.value?.id,
-        onChange: handleLocationChange,
-      },
-      dependencies: {
-        triggerFields: ['warehouseId'],
-        componentProps: (values: any) => ({
-          placeholder: '璇烽�夋嫨搴撳尯',
-          warehouseId: values.warehouseId,
-          onChange: handleLocationChange,
-        }),
-        trigger: (values: any, formApi: any) => {
-          if (values.locationId !== undefined) {
-            void formApi.setFieldValue('locationId', undefined);
-            void formApi.setFieldValue('areaId', undefined);
-          }
-        },
-      },
-      rules: 'selectRequired',
-    },
-    {
-      fieldName: 'areaId',
-      label: '搴撲綅',
-      component: markRaw(WmWarehouseAreaSelect),
-      componentProps: {
-        placeholder: '璇烽�夋嫨搴撲綅',
-        locationId: selectedLocation.value?.id,
-      },
-      dependencies: {
-        triggerFields: ['locationId'],
-        componentProps: (values: any) => ({
-          placeholder: '璇烽�夋嫨搴撲綅',
-          locationId: values.locationId,
-        }),
-        trigger: (values: any, formApi: any) => {
-          if (values.areaId !== undefined) {
-            void formApi.setFieldValue('areaId', undefined);
-          }
-        },
       },
       rules: 'selectRequired',
     },
@@ -399,8 +332,6 @@
   onOpenChange: async (isOpen: boolean) => {
     if (!isOpen) {
       selectedItem.value = null;
-      selectedWarehouse.value = null;
-      selectedLocation.value = null;
       batchEnabled.value = false;
       operateType.value = 1;
       modalTitle.value = '搴撳瓨璋冩暣';
@@ -427,8 +358,6 @@
       await formApi.setValues({
         itemId: data.itemId,
         warehouseId: data.warehouseId,
-        locationId: data.locationId,
-        areaId: data.areaId,
       });
       if (data.itemId) {
         const itemDetail = await getItem(data.itemId);
@@ -492,8 +421,6 @@
       const params: MaterialStockAdjustInParams = {
         itemId: values.itemId,
         warehouseId: values.warehouseId,
-        locationId: values.locationId,
-        areaId: values.areaId,
         batchCode: values.batchCode,
         produceDate: values.produceDate,
         expireDate: values.expireDate,
@@ -512,8 +439,6 @@
       const params: MaterialStockAdjustOutParams = {
         itemId: values.itemId,
         warehouseId: values.warehouseId,
-        locationId: values.locationId,
-        areaId: values.areaId,
         batchCode: values.batchCode,
         vendorId: values.vendorId,
         quantity: values.quantity,

--
Gitblit v1.9.3