diff --git a/src/views/stocked/NoOrMoveLibrary/index.vue b/src/views/stocked/NoOrMoveLibrary/index.vue index 9362139..e88cda2 100644 --- a/src/views/stocked/NoOrMoveLibrary/index.vue +++ b/src/views/stocked/NoOrMoveLibrary/index.vue @@ -199,14 +199,14 @@ @@ -351,6 +351,7 @@ const state = reactive({ MATERIALSPECNAME: '', ERPLOCATION: '', ERPFACTORY: '', + destinationErpFactory: '', LOCATIONNAME: '', CHARGE: '', DESC_CN:'', @@ -629,13 +630,21 @@ function changeFac(e: any) { console.log(e) state.queryParams.params.ERPLOCATION = '' state.queryParamsERPLocation.params.ERPFACTORYNAME = e + + state.queryParams.params.destinationErpFactory = '' + state.queryParams.params.destinationErpFactory = e + state.spcERPFactoryList = [] as any ERPLocationQuery() - if(e.ERPFACTORY == "1010" || e.ERPFACTORY == "1020") { + if(e == "1010" || e == "1020") { state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => - (e.ERPFACTORY == "1010" || e.ERPFACTORY == "1020") + (item.ERPFACTORY === "1010" || item.ERPFACTORY === "1020") + ) + }else { + state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => + (item.ERPFACTORY === e) ) } - + } function changeERPLocation(e: any) { // console.log(e) @@ -659,9 +668,20 @@ function ERPFactoryQuery() { getORG({ orgNo: null }) .then((res: any) => { state.ERPFactoryList = res.resultObj + //state.spcERPFactoryList = res.resultObj state.ERPFactoryList.unshift({ ERPFACTORY: '' }) + if(state.queryParams.params.ERPFACTORY == "1010" || state.queryParams.params.ERPFACTORY == "1020") { + state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => + (item.ERPFACTORY === "1010" || item.ERPFACTORY === "1020") + ) + }else { + state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => + (item.ERPFACTORY === state.queryParams.params.ERPFACTORY) + ) + } + state.queryParams.params.destinationErpFactory = state.queryParams.params.ERPFACTORY }) .catch(() => {}) } @@ -1016,8 +1036,8 @@ async function submit() { row.AIMERPLOCATION = state.desParams.params.ERPLOCATION row.AIMLOCATIONNAME = state.desParams.params.LOCATIONNAME - row.AIMERPFACTORY = row.ERPFACTORY - + //row.AIMERPFACTORY = row.ERPFACTORY + row.AIMERPFACTORY = state.queryParams.params.destinationErpFactory }) console.log('BoxListInfo',BoxListInfo)