From dfbc800b69555f352d4427867e4d72da087707a6 Mon Sep 17 00:00:00 2001 From: 18110972313 <780768673@qq.com> Date: Sun, 27 Apr 2025 14:27:44 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E7=A7=BB=E5=BA=93?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B4=A7=E4=BD=8D=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stocked/MoveLibrary/index.vue | 52 ++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/src/views/stocked/MoveLibrary/index.vue b/src/views/stocked/MoveLibrary/index.vue index 9859dd3..10562eb 100644 --- a/src/views/stocked/MoveLibrary/index.vue +++ b/src/views/stocked/MoveLibrary/index.vue @@ -144,7 +144,7 @@ - + + + + + @@ -195,6 +212,7 @@ import { waitForDebugger } from 'inspector' import { FirstInFirstOut, IFTRUE } from '@/utils/CommonUtil' import { bTableHeight } from '../../../composables/calcTableHeight' import { AssignShipRequest, DeAssignShipRequest, AllCommitMoveInInvoice } from '@/api/StockOut' +import request from '@/utils/request' const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(480) @@ -218,6 +236,7 @@ const state = reactive({ MaterialPackingList: [] as any, MaterialPackingUsername: [] as any, StorageSelect: [] as any, + locDecListAll: [] as any, StorageSelectList: [] as any, lineRow: [] as any, queryParams: { @@ -368,6 +387,7 @@ onMounted(() => { updateTableHeight() window.addEventListener('resize', handleResize) + getStorageSpecLocationList() }) // 更新列 function updateList(col: any) { @@ -700,7 +720,7 @@ async function handle(row: any, event: any, column: any) { state.firstLocation = row.ERPLOCATION } function handleOuterClick() { - StorageList(state.firstLocation) + //StorageList(state.firstLocation) } async function StorageList(firstLocation: any) { @@ -733,6 +753,34 @@ async function StorageList(firstLocation: any) { // 处理错误,可能重置 state 或进行其他恢复操作 } } + +async function getStorageSpecLocationList() { + let erpLocation = JSON.parse(localStorage.getItem('orgNo')); + request({ + url: '/api/api/storage/getLocationNameForERPLocation', + method: 'post', + data: { + erpLocation: erpLocation, + SITENAME: 'SDK', + }, + }).then((res: any) => { + state.locDecListAll = res.resultObj; + }); +} + +function getlocDec(query: any) { + // console.log(query) + //let arr = state.locDecListAll; + let arr = state.locDecListAll.filter((item: any) => { + return item.STORAGENAME.includes(query) || item.STORAGENAME.includes(query) + }) + // console.log(arr) + if (arr.length > 50) { + state.StorageSelectList = arr.slice(0, 50) + } else { + state.StorageSelectList = arr + } +}