From 24132593cfd76c9a25758a42ab9068a1cdbebeee Mon Sep 17 00:00:00 2001 From: 18110972313 <780768673@qq.com> Date: Sun, 27 Apr 2025 11:13:36 +0800 Subject: [PATCH 1/5] =?UTF-8?q?update=20=E4=BA=A7=E6=88=90=E5=93=81?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E3=80=81=E8=B0=83=E6=8B=A8=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=93=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/stockIn/AllocateStockIn/index.vue | 80 ++++++++++++++++++--- src/views/stockIn/ProductStockIn/index.vue | 28 ++++++-- 2 files changed, 93 insertions(+), 15 deletions(-) diff --git a/src/views/stockIn/AllocateStockIn/index.vue b/src/views/stockIn/AllocateStockIn/index.vue index b5c321c..f2b96e2 100644 --- a/src/views/stockIn/AllocateStockIn/index.vue +++ b/src/views/stockIn/AllocateStockIn/index.vue @@ -20,7 +20,6 @@ @@ -33,7 +32,24 @@ - + + + + + + @@ -141,6 +174,7 @@ export default { import { reactive, ref, onMounted, toRefs, getCurrentInstance } from 'vue' import { ElForm, ElMessageBox } from 'element-plus' import { allocateStockInCommit, BpelEvent, getQueryList } from '@/api/common' +import request from '@/utils/request' // import { getPageList } from "@/api/menu"; // import { Header } from "element-plus/es/components/table-v2/src/components"; @@ -156,6 +190,7 @@ const state = reactive({ locDecList: [] as any, StorageSelect: [] as any, StorageSelectList: [] as any, + locDecListAll: [] as any, formData: { SHIPREQUESTNAME: '', SHIPREQUESTSTATE: '', @@ -339,6 +374,8 @@ onMounted(() => { hide: false } ] + WareList() + getStorageSpecLocationList() }) /*****************************************************下面方法******************************************/ @@ -454,9 +491,9 @@ function getBoxList() { // state.formData.ERPRECEIVELOCATION = res.data[0]?.ERPRECEIVELOCATION state.formData.SHIPREQUESTSTATE = res.data[0]?.SHIPREQUESTSTATE - if(state.formData.ERPRECEIVEFACTORY) { + /*if(state.formData.ERPRECEIVEFACTORY) { WareList(state.formData.ERPRECEIVEFACTORY) - } + }*/ }) .catch((error: any) => { @@ -467,13 +504,14 @@ function getBoxList() { // getDetailList() // 之前是列表取的出库单详情 getAllPackingList() } -async function WareList(firstLocation: any) { +async function WareList() { try { + let erpLocation = JSON.parse(localStorage.getItem('orgNo')) const res = await getQueryList({ queryId: 'GetErpLocationList', version: 'WEB00001', params: { - ERPFACTORYNAME: firstLocation, + ERPFACTORYNAME: erpLocation, SITENAME: 'SDK' }, pageNum: 1, @@ -529,8 +567,17 @@ function getAllPackingList() { }) } -function handleOuterClick() { - StorageList(state.formData.ERPRECEIVELOCATION) +function handleOuterClick(query: any) { + //StorageList(state.formData.ERPRECEIVELOCATION) + let arr = state.locDecListAll.filter((item: any) => { + return item.DESCRIPTION.includes(query) || item.STORAGENAME.includes(query) + }) + // console.log(arr) + if (arr.length > 50) { + state.StorageSelectList = arr.slice(0, 50) + } else { + state.StorageSelectList = arr + } } async function StorageList(firstLocation: any) { @@ -792,6 +839,21 @@ function stockIn() { console.log(res, 'res') }) } + +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; + console.log(state.locDecListAll) + }); +}