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