update 增加货位下拉框
This commit is contained in:
parent
3c2d712272
commit
b9128a8b8d
@ -222,7 +222,7 @@ const state = reactive({
|
||||
locDecList2: [] as any,
|
||||
locDecListAll: [] as any,
|
||||
EVENTOUT: ['BarCodeToTransferIn','调拨出库','MES消耗','auxiliaryStockOut','CompletedShipRequestZL','CompletedShipRequestBL','CompletedShipRequestLL','CompletedShipRequestNLCC'],
|
||||
EVENTIN: ['AlloctionStockIn','FGStockIn','ReturnStockIn','NormalStockInForSDK','NoChargeStockIn','NoChargeStockIn',],
|
||||
EVENTIN: ['AlloctionStockIn','FGStockIn','ReturnStockIn','NormalStockInForSDK','NoChargeStockIn','NoChargeStockIn','NormalStockInDelivery'],
|
||||
|
||||
|
||||
queryParams: {
|
||||
|
@ -59,20 +59,20 @@
|
||||
default-first-option @focus="getStorageSpec(scope.row.ERPLOCATION)" filterable >-->
|
||||
<el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px"
|
||||
default-first-option filterable @change="getStorageSpec">
|
||||
<el-option v-for="item in state.ERPLocationList" :key="item.ENUMVALUE" :label="item.DESCRIPTION"
|
||||
:value="item.ENUMVALUE" />
|
||||
<el-option v-for="item in state.ERPLocationList" :key="item.VALUE" :label="item.LABEL"
|
||||
:value="item.VALUE" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="ERPLOCATIONDESC" label="库位(CN)" width="180"></el-table-column>-->
|
||||
<el-table-column prop="LOCATIONNAME" label="货位" width="180">
|
||||
<template #default="scope">
|
||||
<!-- <el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px" @focus="getStorageSpec(scope.row.ERPLOCATION)"
|
||||
default-first-option filterable >-->
|
||||
<el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px"
|
||||
<el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px" @focus="getStorageSpec(scope.row.ERPLOCATION)"
|
||||
default-first-option filterable >
|
||||
<el-option v-for="item in state.POCreateLocationList" :key="item.STORAGENAME" :label="item.DESCRIPTION"
|
||||
:value="item.STORAGENAME" />
|
||||
<!-- <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-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -254,8 +254,8 @@ function handleQuery() {
|
||||
if (res.resultObj) {
|
||||
// 加载库位
|
||||
if (res.resultObj.length > 0) {
|
||||
getERPLocation()
|
||||
//getStorageSpec(res.resultObj[0].ERPFACTORY)
|
||||
getERPLocation(res.resultObj[0].ERPFACTORY)
|
||||
getStorageSpec(res.resultObj[0].ERPFACTORY)
|
||||
}
|
||||
state.MATERIALRECEIVEACT = res.resultObj
|
||||
} else {
|
||||
@ -374,38 +374,26 @@ function formatDate(date: any) {
|
||||
return year + "-" + month + "-" + day;
|
||||
}
|
||||
function getStorageSpec(value: any) {
|
||||
/*state.POCreateLocationList = []
|
||||
state.POCreateLocationList = []
|
||||
getQueryList({
|
||||
queryId: "GetLocationForCreatePO",
|
||||
version: "00002",
|
||||
version: "00001",
|
||||
params: {
|
||||
SITENAME: "SDK",
|
||||
//ERPLOCATION: value
|
||||
ERPLOCATION: value
|
||||
} as 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() {
|
||||
let erpLocation = JSON.parse(localStorage.get('orgNo'));
|
||||
function getERPLocation(erpfactory: any) {
|
||||
getQueryList({
|
||||
queryId: "GetErpLocationList",
|
||||
version: "WEB00001",
|
||||
queryId: "GetERPLocationForCreatePO",
|
||||
version: "00001",
|
||||
params: {
|
||||
SITENAME: localStorage.get('siteName') || 'SDK',
|
||||
ERPFACTORYNAME: erpLocation,//PO
|
||||
SITENAME: "SDK",
|
||||
ERPFACTORYNAME: erpfactory,//PO
|
||||
} as any,
|
||||
}).then((res: any) => {
|
||||
state.ERPLocationList = res.data
|
||||
|
@ -29,7 +29,7 @@
|
||||
highlight-current-row row-key="id" @row-click="handle">
|
||||
<el-table-column prop="MATERIALSPECNAME" fixed="left" label="料号" width="100" />
|
||||
<el-table-column prop="ERPFACTORY" label="组织" width="100" />
|
||||
<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>
|
||||
@ -37,6 +37,16 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="LOCATIONNAME" label="货位" width="180">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px"
|
||||
@focus="getStorageSpec(scope.row.ERPLOCATION)" default-first-option filterable
|
||||
:filter-method="locatioNFilter">
|
||||
<el-option v-for="item in state.LocationList" :key="item.VALUE" :label="item.LABEL"
|
||||
:value="item.VALUE" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="REQUESTQUANTITY" label="订单数量" width="100" />
|
||||
<el-table-column prop="RECEIVEDQUANTITY" label="已接收数量" width="100" />
|
||||
<el-table-column prop="STOCKINQTY" label="已入库数量" width="100" />
|
||||
@ -883,6 +893,22 @@ function getERPLocation(erpfactory: any) {
|
||||
state.ERPLocationList = res.data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 货位卡顿处理
|
||||
* @param query
|
||||
*/
|
||||
function locatioNFilter(query : any) {
|
||||
console.log(query)
|
||||
let arr = state.AllLocationList.filter((item : any) => {
|
||||
return (item.LABEL.includes(query) || item.VALUE.includes(query))
|
||||
})
|
||||
if (arr.length > 50) {
|
||||
state.LocationList = arr.slice(0, 50)
|
||||
} else {
|
||||
state.LocationList = arr
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
Loading…
x
Reference in New Issue
Block a user