update 辅材入库列表仓库、库位下拉框查询修改

This commit is contained in:
18110972313 2025-05-08 15:45:28 +08:00
parent 42a683a1bf
commit c0ae21753d

View File

@ -53,14 +53,14 @@
</el-input>
</template>
</el-table-column>
<el-table-column prop="ERPLOCATION" label="" width="180">
<el-table-column prop="ERPLOCATION" label="库" width="180">
<template #default="scope">
<!-- <el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px"
default-first-option @focus="getStorageSpec(scope.row.ERPLOCATION)" filterable >-->
<el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px"
default-first-option filterable >
<el-option v-for="item in state.ERPLocationList" :key="item.VALUE" :label="item.LABEL"
:value="item.VALUE" />
default-first-option filterable @change="getStorageSpec">
<el-option v-for="item in state.ERPLocationList" :key="item.ENUMVALUE" :label="item.DESCRIPTION"
:value="item.ENUMVALUE" />
</el-select>
</template>
</el-table-column>
@ -71,8 +71,8 @@
default-first-option filterable >-->
<el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px"
default-first-option filterable >
<el-option v-for="item in state.POCreateLocationList" :key="item.VALUE" :label="item.LABEL"
:value="item.VALUE" />
<el-option v-for="item in state.POCreateLocationList" :key="item.STORAGENAME" :label="item.DESCRIPTION"
:value="item.STORAGENAME" />
</el-select>
</template>
</el-table-column>
@ -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