|
|
|
@ -22,6 +22,7 @@ |
|
|
|
|
<script> |
|
|
|
|
import detailsCard from './components/detailsCard.vue' |
|
|
|
|
import oilOrderApi from '@/api/oil-order.js' |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
detailsCard |
|
|
|
@ -100,19 +101,30 @@ export default { |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
cardListFn() { |
|
|
|
|
let a = this.orderData.companyAccounts |
|
|
|
|
? this.orderData.companyAccounts.map(item => { |
|
|
|
|
item['cardType'] = 0 |
|
|
|
|
return item |
|
|
|
|
}) |
|
|
|
|
let networkId = this.$pinia.state.value.user.user?.networkId |
|
|
|
|
// console.log('this.$pinia.value', networkId) |
|
|
|
|
let company = this.orderData.companyAccounts |
|
|
|
|
? this.orderData.companyAccounts |
|
|
|
|
.filter(item => { |
|
|
|
|
return item.companyId == networkId |
|
|
|
|
}) |
|
|
|
|
.map(item => { |
|
|
|
|
item['cardType'] = 0 |
|
|
|
|
return item |
|
|
|
|
}) |
|
|
|
|
: [] |
|
|
|
|
let b = this.orderData.otherAccounts |
|
|
|
|
? this.orderData.otherAccounts.map(item => { |
|
|
|
|
item['cardType'] = 1 |
|
|
|
|
return item |
|
|
|
|
}) |
|
|
|
|
let other = this.orderData.otherAccounts |
|
|
|
|
? this.orderData.otherAccounts |
|
|
|
|
.filter(item => { |
|
|
|
|
return item.companyId == networkId |
|
|
|
|
}) |
|
|
|
|
.map(item => { |
|
|
|
|
item['cardType'] = 1 |
|
|
|
|
return item |
|
|
|
|
}) |
|
|
|
|
: [] |
|
|
|
|
this.cardList = [...a, ...b] |
|
|
|
|
console.log('other', other) |
|
|
|
|
this.cardList = [...company, ...other] |
|
|
|
|
}, |
|
|
|
|
updateDetails() { |
|
|
|
|
this.detailsList[0][0].value = this.orderData.orderSerialNumber || '暂无数据' |
|
|
|
|