Promise.all([this.orderListReceivablesPlan(data)])
.then((e) => {
const dataone = {
receivablesId: this.$route.query.id
}
this.receivablesRcvDetail(dataone)
})
orderListReceivablesPlan (row) { // 回款期次
const data = { orderId: row.id }
return new Promise(resolve => {
orderListReceivablesPlan(data).then(res => {
resolve( res.data)
})
})
},
//获取数据字典 省市区 上级 部门
Promise.all([dictionary({ typeCode: '8' }), dictionary({ typeCode: '1' }), dictionary({ typeCode: '5' }), listGeologyTree()]).then(res => {
sessionStorage.jobSourceList = JSON.stringify(res[0].data) //工作来源
sessionStorage.politicsList = JSON.stringify(res[1].data) //政治面貌
sessionStorage.raceList = JSON.stringify(res[2].data) //种族
res[3].data.forEach(item => {
areaList.province_list[item.id] = item.name
item.children && item.children.forEach(i => {
areaList.city_list[i.id] = i.name == '市辖区' ? item.name : i.name
i.children && i.children.forEach(n => {
areaList.county_list[n.id] = n.name
})
})
})
})
promise.all的使用
最新推荐文章于 2024-04-24 15:12:48 发布