fix: 开卡记录bug修复。
This commit is contained in:
@@ -59,44 +59,44 @@
|
|||||||
</u-sticky>
|
</u-sticky>
|
||||||
<div class="app-container" style="overflow: auto">
|
<div class="app-container" style="overflow: auto">
|
||||||
|
|
||||||
<div class="header-con" v-show ="accountsList.length>0" ref="searchHeightRef">
|
<div class="header-con" v-show ="oneCount>0" ref="searchHeightRef">
|
||||||
<div class="item" v-show ="accountsList.length>0">
|
<div class="item" v-show ="oneCount>0">
|
||||||
<img src="@/static/images/one.png" alt="" />
|
<img src="@/static/images/one.png" alt="" />
|
||||||
<div class="info-sum">
|
<div class="info-sum">
|
||||||
<div class="title">{{ getNameAndCounts(0).name }}</div>
|
<div class="title">{{ oneName }}</div>
|
||||||
<div class="num">{{ getNameAndCounts(0).count }}<span>张</span></div>
|
<div class="num">{{ oneCount }}<span>张</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" v-show ="accountsList.length>1">
|
<div class="item" v-show ="twoCount>0">
|
||||||
<img src="@/static/images/ticketSum.png" alt="" />
|
<img src="@/static/images/ticketSum.png" alt="" />
|
||||||
<div class="info-sum">
|
<div class="info-sum">
|
||||||
<div class="title">{{ getNameAndCounts(1).name }}</div>
|
<div class="title">{{ twoName }}</div>
|
||||||
<div class="num">{{ getNameAndCounts(1).count }}<span>张</span></div>
|
<div class="num">{{ twoCount }}<span>张</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-con" v-show ="accountsList.length>2" ref="searchHeightRef">
|
<div class="header-con" v-show ="threeCount>0" ref="searchHeightRef">
|
||||||
<div class="item" v-show ="accountsList.length>2">
|
<div class="item" v-show ="threeCount>0">
|
||||||
<img src="@/static/images/one.png" alt="" />
|
<img src="@/static/images/one.png" alt="" />
|
||||||
<div class="info-sum">
|
<div class="info-sum">
|
||||||
<div class="title">{{getNameAndCounts(2).name }}</div>
|
<div class="title">{{threeName }}</div>
|
||||||
<div class="num">{{ getNameAndCounts(2).count }}<span>张</span></div>
|
<div class="num">{{ threeCount }}<span>张</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item" v-show ="accountsList.length>3">
|
<div class="item" v-show ="fourCount>0">
|
||||||
<img src="@/static/images/ticketSum.png" alt="" />
|
<img src="@/static/images/ticketSum.png" alt="" />
|
||||||
<div class="info-sum">
|
<div class="info-sum">
|
||||||
<div class="title">{{ getNameAndCounts(3).name }}</div>
|
<div class="title">{{ fourName }}</div>
|
||||||
<div class="num">{{ getNameAndCounts(3).count }}<span>张</span></div>
|
<div class="num">{{ fourCount }}<span>张</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-con" v-show ="accountsList.length>4" ref="searchHeightRef">
|
<div class="header-con" v-show ="fiveCount>0" ref="searchHeightRef">
|
||||||
<div class="item" v-show ="accountsList.length>4">
|
<div class="item" v-show ="fiveCount>0">
|
||||||
<img src="@/static/images/one.png" alt="" />
|
<img src="@/static/images/one.png" alt="" />
|
||||||
<div class="info-sum">
|
<div class="info-sum">
|
||||||
<div class="title">{{ getNameAndCounts(4).name }}</div>
|
<div class="title">{{ fiveName }}</div>
|
||||||
<div class="num">{{ getNameAndCounts(4).count }}<span>张</span></div>
|
<div class="num">{{ fiveCount }}<span>张</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -139,6 +139,16 @@
|
|||||||
const isShow = ref(false)
|
const isShow = ref(false)
|
||||||
const accountsList = ref([])
|
const accountsList = ref([])
|
||||||
const timeShow= ref(false)
|
const timeShow= ref(false)
|
||||||
|
const oneName= ref("")
|
||||||
|
const oneCount= ref(0)
|
||||||
|
const twoName= ref("")
|
||||||
|
const twoCount= ref(0)
|
||||||
|
const threeName= ref("")
|
||||||
|
const threeCount= ref(0)
|
||||||
|
const fourName= ref("")
|
||||||
|
const fourCount= ref(0)
|
||||||
|
const fiveName= ref("")
|
||||||
|
const fiveCount= ref(0)
|
||||||
const time =ref( Number(new Date()))
|
const time =ref( Number(new Date()))
|
||||||
const flag= ref(true)
|
const flag= ref(true)
|
||||||
const account = ref({
|
const account = ref({
|
||||||
@@ -190,18 +200,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNameAndCounts(i) {
|
|
||||||
|
|
||||||
if (accountsList.value != null&&accountsList.value != '')
|
|
||||||
{
|
|
||||||
if(accountsList.value.length>i){
|
|
||||||
return accountsList.value[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
return {name:"",count:""}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function openOrCloseDate(data) {
|
function openOrCloseDate(data) {
|
||||||
timeShow.value = !timeShow.value
|
timeShow.value = !timeShow.value
|
||||||
@@ -237,6 +235,23 @@ function searchSubmit() {
|
|||||||
account.value = { ...res.data }
|
account.value = { ...res.data }
|
||||||
listData.value = listData.value.concat(res.data.tableDebitList)
|
listData.value = listData.value.concat(res.data.tableDebitList)
|
||||||
accountsList.value = accountsList.value.concat(res.data.accountsList)
|
accountsList.value = accountsList.value.concat(res.data.accountsList)
|
||||||
|
if(accountsList.value.length>0){
|
||||||
|
oneName.value= accountsList.value[0].name
|
||||||
|
oneCount.value= accountsList.value[0].count
|
||||||
|
}
|
||||||
|
if(accountsList.value.length>1){
|
||||||
|
twoName.value= accountsList.value[1].name
|
||||||
|
twoCount.value= accountsList.value[1].count
|
||||||
|
}
|
||||||
|
if(accountsList.value.length>2){
|
||||||
|
threeName.value= accountsList.value[2].name
|
||||||
|
threeCount.value= accountsList.value[2].count
|
||||||
|
}
|
||||||
|
if(accountsList.value.length>=3){
|
||||||
|
fourName.value= accountsList.value[3].name
|
||||||
|
fourCount.value= accountsList.value[3].count
|
||||||
|
}
|
||||||
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user