|
|
|
@ -595,7 +595,7 @@ import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
|
|
|
|
|
validateError(msg) { |
|
|
|
|
this.$message.error(msg) |
|
|
|
|
}, |
|
|
|
|
getPlanList(val) { |
|
|
|
|
async getPlanList (val) { |
|
|
|
|
console.log(val,"传值") |
|
|
|
|
let ids=[] |
|
|
|
|
if (!!val){ |
|
|
|
@ -606,7 +606,7 @@ import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
|
|
|
|
|
this.processUdgetPlanIds=ids.join(","); |
|
|
|
|
let params = {} |
|
|
|
|
params.ids = JSON.stringify(ids) |
|
|
|
|
this.requestSubTableData(this.url.list, params, this.processMaterialWarehousingListTable) |
|
|
|
|
await this.requestSubTableDatas(this.url.list, params, this.processMaterialWarehousingListTable) |
|
|
|
|
// getAction(this.url.list,params).then((res)=>{ |
|
|
|
|
// if(res.success){ |
|
|
|
|
// console.log('将要回填的数据',res.result) |
|
|
|
@ -614,50 +614,51 @@ import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
|
|
|
|
|
// }) |
|
|
|
|
}, |
|
|
|
|
/** 查询某个tab的数据 */ |
|
|
|
|
requestSubTableData(url, params, tab, success) { |
|
|
|
|
requestSubTableDatas(url, params, tab, success) { |
|
|
|
|
tab.loading = true |
|
|
|
|
getAction(url, params).then(res => { |
|
|
|
|
let { result } = res |
|
|
|
|
let dataSource = [] |
|
|
|
|
if (result) { |
|
|
|
|
if (Array.isArray(result)) { |
|
|
|
|
dataSource = result |
|
|
|
|
} else if (Array.isArray(result.records)) { |
|
|
|
|
dataSource = result.records |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
tab.dataSource = dataSource; |
|
|
|
|
// console.log("tab.dataSource",tab.dataSource) |
|
|
|
|
tab.dataSource.forEach(item =>{ |
|
|
|
|
let par = { id : item.materialGroup,} |
|
|
|
|
let param = {id : item.materialNumber,} |
|
|
|
|
getAction(this.url.queryByIdDescription,par).then( res=>{ |
|
|
|
|
// console.log(res); |
|
|
|
|
if(res.success){ |
|
|
|
|
this.processMaterialWarehousingListTable.columns[0].options= [{ |
|
|
|
|
title : res.result.materialClassify, |
|
|
|
|
value : item.materialGroup, |
|
|
|
|
disabled : true }]; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
getAction(this.url.queryByIdMerchandiseNews,param).then( res=>{ |
|
|
|
|
// console.log(res); |
|
|
|
|
if(res.success){ |
|
|
|
|
this.processMaterialWarehousingListTable.columns[1].options= [{ |
|
|
|
|
title : res.result.materialsNumber, |
|
|
|
|
value : item.materialNumber, |
|
|
|
|
disabled : true }]; |
|
|
|
|
getAction(url, params).then(res => { |
|
|
|
|
let { result } = res |
|
|
|
|
let dataSource = [] |
|
|
|
|
if (result) { |
|
|
|
|
if (Array.isArray(result)) { |
|
|
|
|
dataSource = result |
|
|
|
|
} else if (Array.isArray(result.records)) { |
|
|
|
|
dataSource = result.records |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// console.log("tab.dataSource",tab.dataSource) |
|
|
|
|
dataSource.forEach(item =>{ |
|
|
|
|
let par = { id : item.materialGroup,} |
|
|
|
|
let param = {id : item.materialNumber,} |
|
|
|
|
getAction(this.url.queryByIdDescription,par).then( res=>{ |
|
|
|
|
// console.log(res); |
|
|
|
|
if(res.success){ |
|
|
|
|
this.processMaterialWarehousingListTable.columns[0].options= [{ |
|
|
|
|
title : res.result.materialClassify, |
|
|
|
|
value : item.materialGroup, |
|
|
|
|
disabled : true }]; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
getAction(this.url.queryByIdMerchandiseNews,param).then( res=>{ |
|
|
|
|
// console.log(res); |
|
|
|
|
if(res.success){ |
|
|
|
|
this.processMaterialWarehousingListTable.columns[1].options= [{ |
|
|
|
|
title : res.result.materialsNumber, |
|
|
|
|
value : item.materialNumber, |
|
|
|
|
disabled : true }]; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
tab.dataSource = dataSource; |
|
|
|
|
typeof success === 'function' ? success(res) : '' |
|
|
|
|
}).finally(() => { |
|
|
|
|
tab.loading = false |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
typeof success === 'function' ? success(res) : '' |
|
|
|
|
}).finally(() => { |
|
|
|
|
tab.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|