This commit is contained in:
郭飞 2025-04-27 19:01:23 +08:00
commit 3001ad2824
6 changed files with 202 additions and 28 deletions

View File

@ -135,7 +135,6 @@
<el-select <el-select
size="small" size="small"
filterable filterable
@change="changeLocW"
v-model="desParams.params.ERPLOCATION" v-model="desParams.params.ERPLOCATION"
placeholder="下拉选择仓库" placeholder="下拉选择仓库"
> >
@ -160,9 +159,9 @@
> >
<el-option <el-option
v-for="item in locDecList2" v-for="item in locDecList2"
:key="item.VALUE" :key="item.STORAGENAME"
:label="item.LABEL" :label="item.DESCRIPTION"
:value="item.VALUE" :value="item.STORAGENAME"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -216,6 +215,7 @@
import { getORG } from '@/api/auth' import { getORG } from '@/api/auth'
import { cals } from '@/utils/cal' import { cals } from '@/utils/cal'
import { getOpCode } from '@/api/opcode' import { getOpCode } from '@/api/opcode'
import request from '@/utils/request'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(330) const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(330)
const queryFormRef = ref(ElForm) const queryFormRef = ref(ElForm)
@ -427,6 +427,8 @@
updateTableHeight() updateTableHeight()
window.addEventListener('resize', handleResize) window.addEventListener('resize', handleResize)
StorageList()
getStorageSpecLocationList()
}) })
function getRKey(row: any) { function getRKey(row: any) {
@ -573,7 +575,7 @@
function getlocDec(query: any) { function getlocDec(query: any) {
// console.log(query) // console.log(query)
let arr = state.locDecListAll.filter((item: any) => { let arr = state.locDecListAll.filter((item: any) => {
return item.LABEL.includes(query) || item.VALUE.includes(query) return item.STORAGENAME.includes(query) || item.STORAGENAME.includes(query)
}) })
// console.log(arr) // console.log(arr)
if (arr.length > 50) { if (arr.length > 50) {
@ -679,6 +681,21 @@
// state.loading2 = false // state.loading2 = false
state.Button_state = false state.Button_state = false
} }
async function getStorageSpecLocationList() {
let erpLocation = JSON.parse(localStorage.getItem('orgNo'));
request({
url: '/api/api/storage/getLocationNameForERPLocation',
method: 'post',
data: {
erpLocation: erpLocation,
SITENAME: 'SDK',
},
}).then((res: any) => {
state.locDecListAll = res.resultObj;
console.log(state.locDecList2)
});
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -20,7 +20,6 @@
<el-select <el-select
size="default" size="default"
filterable filterable
@change="changeWare(formData.ERPRECEIVELOCATION,formData.ERPFACTORY)"
v-model="formData.ERPRECEIVELOCATION" v-model="formData.ERPRECEIVELOCATION"
placeholder="下拉选择库位" placeholder="下拉选择库位"
> >
@ -33,7 +32,24 @@
</el-select> </el-select>
<!-- <el-input v-model="formData.ERPRECEIVELOCATION" placeholder="接收仓库" /> --> <!-- <el-input v-model="formData.ERPRECEIVELOCATION" placeholder="接收仓库" /> -->
</el-form-item> </el-form-item>
<el-form-item v-show="USE_LOCATION != 'N'" label="目的货位" prop="portFormRefData.SEARCHTYPE"> <!-- <el-form-item label="仓库">
<el-select
size="default"
filterable
@change="changeWare(formData.ERPRECEIVELOCATION,formData.ERPFACTORY)"
v-model="formData.ERPRECEIVELOCATION"
placeholder="下拉选择库位"
>
<el-option
v-for="item in locDecList"
:key="item.ENUMVALUE"
:label="item.DESCRIPTION"
:value="item.ENUMVALUE"
/>
</el-select>
&lt;!&ndash; <el-input v-model="formData.ERPRECEIVELOCATION" placeholder="接收仓库" /> &ndash;&gt;
</el-form-item>-->
<!-- <el-form-item v-show="USE_LOCATION != 'N'" label="目的货位" prop="portFormRefData.SEARCHTYPE">
<el-cascader <el-cascader
@visible-change="handleOuterClick" @visible-change="handleOuterClick"
v-model="state.StorageSelect" v-model="state.StorageSelect"
@ -41,10 +57,27 @@
:props="{ :props="{
checkStrictly: true, checkStrictly: true,
label: 'DESCRIPTION', label: 'DESCRIPTION',
value: 'ERPLOCATION', value: 'STORAGENAME',
children: 'children' children: 'children'
}" }"
/> />
</el-form-item>-->
<el-form-item label="目的货位" prop="portFormRefData.SEARCHTYPE">
<el-select
size="default"
filterable
v-model="state.StorageSelect"
default-first-option
placeholder="下拉选择货位"
:filter-method="handleOuterClick"
>
<el-option
v-for="item in state.StorageSelectList"
:key="item.STORAGENAME"
:label="item.DESCRIPTION"
:value="item.STORAGENAME"
/>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -141,6 +174,7 @@ export default {
import { reactive, ref, onMounted, toRefs, getCurrentInstance } from 'vue' import { reactive, ref, onMounted, toRefs, getCurrentInstance } from 'vue'
import { ElForm, ElMessageBox } from 'element-plus' import { ElForm, ElMessageBox } from 'element-plus'
import { allocateStockInCommit, BpelEvent, getQueryList } from '@/api/common' import { allocateStockInCommit, BpelEvent, getQueryList } from '@/api/common'
import request from '@/utils/request'
// import { getPageList } from "@/api/menu"; // import { getPageList } from "@/api/menu";
// import { Header } from "element-plus/es/components/table-v2/src/components"; // import { Header } from "element-plus/es/components/table-v2/src/components";
@ -156,6 +190,7 @@ const state = reactive({
locDecList: [] as any, locDecList: [] as any,
StorageSelect: [] as any, StorageSelect: [] as any,
StorageSelectList: [] as any, StorageSelectList: [] as any,
locDecListAll: [] as any,
formData: { formData: {
SHIPREQUESTNAME: '', SHIPREQUESTNAME: '',
SHIPREQUESTSTATE: '', SHIPREQUESTSTATE: '',
@ -339,6 +374,8 @@ onMounted(() => {
hide: false hide: false
} }
] ]
WareList()
getStorageSpecLocationList()
}) })
/*****************************************************下面方法******************************************/ /*****************************************************下面方法******************************************/
@ -454,9 +491,9 @@ function getBoxList() {
// state.formData.ERPRECEIVELOCATION = res.data[0]?.ERPRECEIVELOCATION // state.formData.ERPRECEIVELOCATION = res.data[0]?.ERPRECEIVELOCATION
state.formData.SHIPREQUESTSTATE = res.data[0]?.SHIPREQUESTSTATE state.formData.SHIPREQUESTSTATE = res.data[0]?.SHIPREQUESTSTATE
if(state.formData.ERPRECEIVEFACTORY) { /*if(state.formData.ERPRECEIVEFACTORY) {
WareList(state.formData.ERPRECEIVEFACTORY) WareList(state.formData.ERPRECEIVEFACTORY)
} }*/
}) })
.catch((error: any) => { .catch((error: any) => {
@ -467,13 +504,14 @@ function getBoxList() {
// getDetailList() // // getDetailList() //
getAllPackingList() getAllPackingList()
} }
async function WareList(firstLocation: any) { async function WareList() {
try { try {
let erpLocation = JSON.parse(localStorage.getItem('orgNo'))
const res = await getQueryList({ const res = await getQueryList({
queryId: 'GetErpLocationList', queryId: 'GetErpLocationList',
version: 'WEB00001', version: 'WEB00001',
params: { params: {
ERPFACTORYNAME: firstLocation, ERPFACTORYNAME: erpLocation,
SITENAME: 'SDK' SITENAME: 'SDK'
}, },
pageNum: 1, pageNum: 1,
@ -529,8 +567,17 @@ function getAllPackingList() {
}) })
} }
function handleOuterClick() { function handleOuterClick(query: any) {
StorageList(state.formData.ERPRECEIVELOCATION) //StorageList(state.formData.ERPRECEIVELOCATION)
let arr = state.locDecListAll.filter((item: any) => {
return item.DESCRIPTION.includes(query) || item.STORAGENAME.includes(query)
})
// console.log(arr)
if (arr.length > 50) {
state.StorageSelectList = arr.slice(0, 50)
} else {
state.StorageSelectList = arr
}
} }
async function StorageList(firstLocation: any) { async function StorageList(firstLocation: any) {
@ -792,6 +839,21 @@ function stockIn() {
console.log(res, 'res') console.log(res, 'res')
}) })
} }
async function getStorageSpecLocationList() {
let erpLocation = JSON.parse(localStorage.getItem('orgNo'));
request({
url: '/api/api/storage/getLocationNameForERPLocation',
method: 'post',
data: {
erpLocation: erpLocation,
SITENAME: 'SDK',
},
}).then((res: any) => {
state.locDecListAll = res.resultObj;
console.log(state.locDecListAll)
});
}
</script> </script>
<style scoped> <style scoped>

View File

@ -140,7 +140,6 @@
<el-select <el-select
size="small" size="small"
filterable filterable
@change="changeLocW"
v-model="desParams.params.ERPLOCATION" v-model="desParams.params.ERPLOCATION"
placeholder="下拉选择仓库" placeholder="下拉选择仓库"
> >
@ -165,9 +164,9 @@
> >
<el-option <el-option
v-for="item in locDecList2" v-for="item in locDecList2"
:key="item.VALUE" :key="item.STORAGENAME"
:label="item.LABEL" :label="item.DESCRIPTION"
:value="item.VALUE" :value="item.STORAGENAME"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -221,6 +220,7 @@ import { bTableHeight } from '../../../composables/calcTableHeight'
import { getORG } from '@/api/auth' import { getORG } from '@/api/auth'
import { cals } from '@/utils/cal' import { cals } from '@/utils/cal'
import { getOpCode } from '@/api/opcode' import { getOpCode } from '@/api/opcode'
import request from '@/utils/request'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(330) const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(330)
const queryFormRef = ref(ElForm) const queryFormRef = ref(ElForm)
@ -426,7 +426,7 @@ onMounted(() => {
let pwd: any = localStorage.getItem('remeberPwd') let pwd: any = localStorage.getItem('remeberPwd')
ERPFactoryQuery() ERPFactoryQuery()
queryInfo() queryInfo()
getStorageSpecLocationList()
updateTableHeight() updateTableHeight()
window.addEventListener('resize', handleResize) window.addEventListener('resize', handleResize)
}) })
@ -574,8 +574,9 @@ async function changeLocW() {
} }
function getlocDec(query: any) { function getlocDec(query: any) {
// console.log(query) // console.log(query)
//let arr = state.locDecListAll;
let arr = state.locDecListAll.filter((item: any) => { let arr = state.locDecListAll.filter((item: any) => {
return item.LABEL.includes(query) || item.VALUE.includes(query) return item.STORAGENAME.includes(query) || item.STORAGENAME.includes(query)
}) })
// console.log(arr) // console.log(arr)
if (arr.length > 50) { if (arr.length > 50) {
@ -681,6 +682,21 @@ async function submit() {
// state.loading2 = false // state.loading2 = false
state.Button_state = false state.Button_state = false
} }
async function getStorageSpecLocationList() {
let erpLocation = JSON.parse(localStorage.getItem('orgNo'));
request({
url: '/api/api/storage/getLocationNameForERPLocation',
method: 'post',
data: {
erpLocation: erpLocation,
SITENAME: 'SDK',
},
}).then((res: any) => {
state.locDecListAll = res.resultObj;
console.log(state.locDecList2)
});
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -144,7 +144,7 @@
<el-row class="page-search" justify="end" align="middle"> <el-row class="page-search" justify="end" align="middle">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="目的货位" prop="portFormRefData.SEARCHTYPE"> <!-- <el-form-item label="目的货位" prop="portFormRefData.SEARCHTYPE">
<el-cascader <el-cascader
@visible-change="handleOuterClick" @visible-change="handleOuterClick"
v-model="state.StorageSelect" v-model="state.StorageSelect"
@ -156,6 +156,23 @@
children: 'children' children: 'children'
}" }"
/> />
</el-form-item>-->
<el-form-item label="目的货位" prop="portFormRefData.SEARCHTYPE">
<el-select
size="small"
filterable
v-model="state.StorageSelect"
default-first-option
placeholder="下拉选择货位"
:filter-method="getlocDec"
>
<el-option
v-for="item in state.StorageSelectList"
:key="item.STORAGENAME"
:label="item.DESCRIPTION"
:value="item.STORAGENAME"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -195,6 +212,7 @@ import { waitForDebugger } from 'inspector'
import { FirstInFirstOut, IFTRUE } from '@/utils/CommonUtil' import { FirstInFirstOut, IFTRUE } from '@/utils/CommonUtil'
import { bTableHeight } from '../../../composables/calcTableHeight' import { bTableHeight } from '../../../composables/calcTableHeight'
import { AssignShipRequest, DeAssignShipRequest, AllCommitMoveInInvoice } from '@/api/StockOut' import { AssignShipRequest, DeAssignShipRequest, AllCommitMoveInInvoice } from '@/api/StockOut'
import request from '@/utils/request'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(480) const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(480)
@ -218,6 +236,7 @@ const state = reactive({
MaterialPackingList: [] as any, MaterialPackingList: [] as any,
MaterialPackingUsername: [] as any, MaterialPackingUsername: [] as any,
StorageSelect: [] as any, StorageSelect: [] as any,
locDecListAll: [] as any,
StorageSelectList: [] as any, StorageSelectList: [] as any,
lineRow: [] as any, lineRow: [] as any,
queryParams: { queryParams: {
@ -368,6 +387,7 @@ onMounted(() => {
updateTableHeight() updateTableHeight()
window.addEventListener('resize', handleResize) window.addEventListener('resize', handleResize)
getStorageSpecLocationList()
}) })
// //
function updateList(col: any) { function updateList(col: any) {
@ -700,7 +720,7 @@ async function handle(row: any, event: any, column: any) {
state.firstLocation = row.ERPLOCATION state.firstLocation = row.ERPLOCATION
} }
function handleOuterClick() { function handleOuterClick() {
StorageList(state.firstLocation) //StorageList(state.firstLocation)
} }
async function StorageList(firstLocation: any) { async function StorageList(firstLocation: any) {
@ -733,6 +753,34 @@ async function StorageList(firstLocation: any) {
// state // state
} }
} }
async function getStorageSpecLocationList() {
let erpLocation = JSON.parse(localStorage.getItem('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.StorageSelectList = arr.slice(0, 50)
} else {
state.StorageSelectList = arr
}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -217,7 +217,6 @@
<el-select <el-select
size="small" size="small"
filterable filterable
@change="changeLocW"
@blur="focusLocW" @blur="focusLocW"
v-model="desParams.params.ERPLOCATION" v-model="desParams.params.ERPLOCATION"
placeholder="下拉选择仓库" placeholder="下拉选择仓库"
@ -244,9 +243,9 @@
> >
<el-option <el-option
v-for="item in locDecList2" v-for="item in locDecList2"
:key="item.VALUE" :key="item.STORAGENAME"
:label="item.LABEL" :label="item.DESCRIPTION"
:value="item.VALUE" :value="item.STORAGENAME"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -306,6 +305,7 @@ import { bTableHeight } from '../../../composables/calcTableHeight'
import { getORG } from '@/api/auth' import { getORG } from '@/api/auth'
import { cals } from '@/utils/cal' import { cals } from '@/utils/cal'
import { search } from '@/api/wareHouse' import { search } from '@/api/wareHouse'
import request from '@/utils/request'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(330) const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(330)
const queryFormRef = ref(ElForm) const queryFormRef = ref(ElForm)
@ -531,6 +531,7 @@ onMounted(() => {
updateTableHeight() updateTableHeight()
window.addEventListener('resize', handleResize) window.addEventListener('resize', handleResize)
getStorageSpecLocationList()
}) })
function handleInput(val: any) { function handleInput(val: any) {
@ -788,7 +789,7 @@ async function changeLocW() {
function getlocDec(query: any) { function getlocDec(query: any) {
// console.log(query) // console.log(query)
let arr = state.locDecListAll.filter((item: any) => { let arr = state.locDecListAll.filter((item: any) => {
return item.LABEL.includes(query) || item.VALUE.includes(query) return item.STORAGENAME.includes(query) || item.STORAGENAME.includes(query)
}) })
// console.log(arr) // console.log(arr)
if (arr.length > 50) { if (arr.length > 50) {
@ -1068,6 +1069,20 @@ async function submit() {
// state.loading2 = false // state.loading2 = false
state.Button_state = false state.Button_state = false
} }
async function getStorageSpecLocationList() {
let erpLocation = JSON.parse(localStorage.getItem('orgNo'));
request({
url: '/api/api/storage/getLocationNameForERPLocation',
method: 'post',
data: {
erpLocation: erpLocation,
SITENAME: 'SDK',
},
}).then((res: any) => {
state.locDecListAll = res.resultObj;
});
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -255,6 +255,7 @@ import { IFTRUE } from '@/utils/CommonUtil'
import { bTableHeight } from '../../../composables/calcTableHeight' import { bTableHeight } from '../../../composables/calcTableHeight'
import { getORG } from '@/api/auth' import { getORG } from '@/api/auth'
import { search } from '@/api/wareHouse' import { search } from '@/api/wareHouse'
import request from '@/utils/request'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(240) const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(240)
const queryFormRef = ref(ElForm) const queryFormRef = ref(ElForm)
@ -450,6 +451,7 @@ onMounted(() => {
let pwd: any = localStorage.getItem('remeberPwd'); let pwd: any = localStorage.getItem('remeberPwd');
state.ERPFACTORY = JSON.parse(localStorage.getItem('orgNo')) || ''; state.ERPFACTORY = JSON.parse(localStorage.getItem('orgNo')) || '';
getStorageSpecLocationList()
}) })
// //
function updateList(col: any) { function updateList(col: any) {
@ -566,7 +568,7 @@ function handleOuterClick(isVisible: any) {
return return
} }
} }
StorageList(firstLocation) //StorageList(firstLocation)
} }
} }
@ -701,6 +703,20 @@ async function submit() {
state.loading2 = false state.loading2 = false
state.Button_state = false state.Button_state = false
} }
async function getStorageSpecLocationList() {
let erpLocation = JSON.parse(localStorage.getItem('orgNo'));
request({
url: '/api/api/storage/getLocationNameForERPLocation',
method: 'post',
data: {
erpLocation: erpLocation,
SITENAME: 'SDK',
},
}).then((res: any) => {
state.StorageSelectAll = res.resultObj;
});
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">