diff --git a/src/views/stocked/MoveTransformation/index.vue b/src/views/stocked/MoveTransformation/index.vue index 1eb4492..11b3b74 100644 --- a/src/views/stocked/MoveTransformation/index.vue +++ b/src/views/stocked/MoveTransformation/index.vue @@ -41,7 +41,26 @@
未分配标签信息
- + + + + + + @@ -145,6 +165,7 @@ import { bTableHeight } from "../../../composables/calcTableHeight"; import { localStorage } from "@/utils/storage"; import { cals } from '@/utils/cal' import { AssignOrDessignShipRequest, MoveTransform } from '@/api/moveTrans' +import request from '@/utils/request' const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(400); const queryFormRef = ref(ElForm); @@ -179,6 +200,7 @@ const state: any = reactive({ ChangeERPLocation: [], ChangeLocation: [], STOCKSELECTLIST: [] as any, + locDecListAll: [] as any, queryParams: { queryId: "", version: "", @@ -200,6 +222,7 @@ const state: any = reactive({ SHIPREQUESTDETAILNAME: '', DESCRIPTION: '', CAREER_ASSISTANCE: '', + ERPRECEIVELOCATION: '', }, }, RightqueryParams: { @@ -329,6 +352,7 @@ onMounted(() => { state.commitDate = year + '-' + moth + '-' + day updateTableHeight(); window.addEventListener('resize', handleResize); + getStorageSpecLocationList() }); function JudgeMentERPLocation() { @@ -414,14 +438,14 @@ function handle(row: any, event: any, column: any) { state.LShipRequestDetailName = row.SHIPREQUESTDETAILNAME state.LShipType = row.SHIPREQUESTTYPE state.queryParams.params.IsCheck = state.IsCheck - + state.queryParams.params.ERPRECEIVELOCATION = state.ChangeLocation getQueryList(state.queryParams).then((res: any) => { state.MaterialPackingList = res.data; state.MaterialPackingList2 = res.data; }); state.RightqueryParams.queryId = 'GetPackingRow'; - state.RightqueryParams.version = 'Z00002_NEW'; + state.RightqueryParams.version = 'Z00003_NEW'; state.RightqueryParams.params.MATERIALSPECNAME = row.MATERIALSPECNAME; state.RightqueryParams.params.SHIPREQUESTNAME = row.SHIPREQUESTNAME; state.RightqueryParams.params.SDK_ID = row.SDK_ID; @@ -436,7 +460,7 @@ function handle(row: any, event: any, column: any) { return (cals.add(init, current.MATERIALQUANTITY2)).toNumber(); }, 0) }); - + /* state.queryParams.queryId = 'GetLocationList'; state.queryParams.version = 'ZWP007_NEW'; state.queryParams.params.MATERIALSPECNAME = row.MATERIALSPECNAME; @@ -451,7 +475,7 @@ function handle(row: any, event: any, column: any) { getQueryList(state.queryParams).then((res: any) => { state.LocationList = res.data; }); - + */ tableInfo.value.setCurrentRow(row) } @@ -613,6 +637,37 @@ function handleStockOut() { state.buttonOut_loading = false; } } + +async function getStorageSpecLocationList() { + let erpLocation = JSON.parse(localStorage.get('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.LocationList = arr.slice(0, 50) + } else { + state.LocationList = arr + } + state.LocationList.unshift({ + STORAGENAME: '' + }) +}