From 78caa769e452f63288743b8997f7b4c21bb06ce5 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 06 十一月 2026 19:00:38 +0800
Subject: [PATCH] feat(crm,mes): 扩展客户字段与重构批次号生成逻辑
---
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 aeb5883..e9e7fb0 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 { ErpSupplierSelect } from '#/views/erp/purchase/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',
},
@@ -398,8 +331,6 @@
onOpenChange: async (isOpen: boolean) => {
if (!isOpen) {
selectedItem.value = null;
- selectedWarehouse.value = null;
- selectedLocation.value = null;
batchEnabled.value = false;
operateType.value = 1;
modalTitle.value = '搴撳瓨璋冩暣';
@@ -426,8 +357,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);
@@ -491,8 +420,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,
@@ -511,8 +438,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