update 无来源转库页面,增加通过库存组织查询条件联动转库的目的组织

This commit is contained in:
18110972313 2025-04-28 09:59:48 +08:00
parent 9e46d660ab
commit 6036bf343d

View File

@ -199,14 +199,14 @@
<el-form-item label="目的组织" prop="ERPFACTORY"> <el-form-item label="目的组织" prop="ERPFACTORY">
<el-select <el-select
filterable filterable
v-model="queryParams.params.ERPFACTORY" v-model="queryParams.params.destinationErpFactory"
placeholder="下拉选择组织" placeholder="下拉选择组织"
size="small" size="small"
> >
<el-option <el-option
v-for="item in spcERPFactoryList" v-for="item in state.spcERPFactoryList"
:key="item.ERPFACTORY" :key="item.ERPFACTORY"
:label="item.DESCRIPTION" :label="item.ERPFACTORY"
:value="item.ERPFACTORY" :value="item.ERPFACTORY"
/> />
</el-select> </el-select>
@ -351,6 +351,7 @@ const state = reactive({
MATERIALSPECNAME: '', MATERIALSPECNAME: '',
ERPLOCATION: '', ERPLOCATION: '',
ERPFACTORY: '', ERPFACTORY: '',
destinationErpFactory: '',
LOCATIONNAME: '', LOCATIONNAME: '',
CHARGE: '', CHARGE: '',
DESC_CN:'', DESC_CN:'',
@ -629,10 +630,18 @@ function changeFac(e: any) {
console.log(e) console.log(e)
state.queryParams.params.ERPLOCATION = '' state.queryParams.params.ERPLOCATION = ''
state.queryParamsERPLocation.params.ERPFACTORYNAME = e state.queryParamsERPLocation.params.ERPFACTORYNAME = e
state.queryParams.params.destinationErpFactory = ''
state.queryParams.params.destinationErpFactory = e
state.spcERPFactoryList = [] as any
ERPLocationQuery() ERPLocationQuery()
if(e.ERPFACTORY == "1010" || e.ERPFACTORY == "1020") { if(e == "1010" || e == "1020") {
state.spcERPFactoryList = state.ERPFactoryList.filter((item: any) => 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)
) )
} }
@ -659,9 +668,20 @@ function ERPFactoryQuery() {
getORG({ orgNo: null }) getORG({ orgNo: null })
.then((res: any) => { .then((res: any) => {
state.ERPFactoryList = res.resultObj state.ERPFactoryList = res.resultObj
//state.spcERPFactoryList = res.resultObj
state.ERPFactoryList.unshift({ state.ERPFactoryList.unshift({
ERPFACTORY: '' 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(() => {}) .catch(() => {})
} }
@ -1016,8 +1036,8 @@ async function submit() {
row.AIMERPLOCATION = state.desParams.params.ERPLOCATION row.AIMERPLOCATION = state.desParams.params.ERPLOCATION
row.AIMLOCATIONNAME = state.desParams.params.LOCATIONNAME row.AIMLOCATIONNAME = state.desParams.params.LOCATIONNAME
row.AIMERPFACTORY = row.ERPFACTORY //row.AIMERPFACTORY = row.ERPFACTORY
row.AIMERPFACTORY = state.queryParams.params.destinationErpFactory
}) })
console.log('BoxListInfo',BoxListInfo) console.log('BoxListInfo',BoxListInfo)