diff --git a/src/views/stockIn/NoPoStockIn/index.vue b/src/views/stockIn/NoPoStockIn/index.vue index 64db23b..892903f 100644 --- a/src/views/stockIn/NoPoStockIn/index.vue +++ b/src/views/stockIn/NoPoStockIn/index.vue @@ -53,14 +53,14 @@ - + @@ -71,8 +71,8 @@ default-first-option filterable >--> - + @@ -120,6 +120,7 @@ import {getOpCode} from "@/api/opcode"; import { bTableHeight } from "../../../composables/calcTableHeight"; import Drawer from '@/views/stockIn/delivery/drawer.vue' import { getStoreDetail } from '@/api/delivery' +import request from '@/utils/request' const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(220); const route = useRoute() @@ -253,8 +254,8 @@ function handleQuery() { if (res.resultObj) { // 加载库位 if (res.resultObj.length > 0) { - getERPLocation(res.resultObj[0].ERPFACTORY) - getStorageSpec(res.resultObj[0].ERPFACTORY) + getERPLocation() + //getStorageSpec(res.resultObj[0].ERPFACTORY) } state.MATERIALRECEIVEACT = res.resultObj } else { @@ -373,7 +374,7 @@ function formatDate(date: any) { return year + "-" + month + "-" + day; } function getStorageSpec(value: any) { - state.POCreateLocationList = [] + /*state.POCreateLocationList = [] getQueryList({ queryId: "GetLocationForCreatePO", version: "00002", @@ -384,15 +385,27 @@ function getStorageSpec(value: any) { }).then((res: any) => { state.POCreateLocationList = res.data - }) + })*/ + let erpLocation = JSON.parse(localStorage.get('orgNo')); + request({ + url: '/api/api/storage/getLocationNameForERPLocation', + method: 'post', + data: { + erpLocation: erpLocation, + SITENAME: 'SDK', + }, + }).then((res: any) => { + state.POCreateLocationList = res.resultObj; + }); } -function getERPLocation(erpfactory: any) { +function getERPLocation() { + let erpLocation = JSON.parse(localStorage.get('orgNo')); getQueryList({ - queryId: "GetERPLocationForCreatePO", - version: "00001", + queryId: "GetErpLocationList", + version: "WEB00001", params: { - SITENAME: "SDK", - ERPFACTORYNAME: erpfactory,//PO + SITENAME: localStorage.get('siteName') || 'SDK', + ERPFACTORYNAME: erpLocation,//PO } as any, }).then((res: any) => { state.ERPLocationList = res.data