md
This commit is contained in:
parent
163fbf5ec1
commit
fdc8fb4a85
@ -126,6 +126,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
// this.queryData();
|
||||
this.recordLatestBill();
|
||||
},
|
||||
watch: {
|
||||
// "billCode": {
|
||||
@ -152,13 +153,20 @@ export default {
|
||||
recordLatestBill(billCode){
|
||||
const storage = window.localStorage.getItem('queryDataStorage') ? JSON.parse(window.localStorage.getItem('queryDataStorage')) : {}
|
||||
this.latestBillList = storage["latestBillList"] ? storage["latestBillList"] : [];
|
||||
this.latestBillList.push(billCode);
|
||||
let list= this.latestBillList.filter(function(item, index, arr) {
|
||||
return arr.indexOf(item, 0) === index;
|
||||
})
|
||||
this.latestBillList=list;
|
||||
storage["latestBillList"] = this.latestBillList
|
||||
window.localStorage.setItem('queryDataStorage', JSON.stringify(storage))
|
||||
|
||||
if(billCode){
|
||||
this.latestBillList.push(billCode);
|
||||
let list= this.latestBillList.filter(function(item, index, arr) {
|
||||
return arr.indexOf(item, 0) === index;
|
||||
})
|
||||
this.latestBillList=list;
|
||||
}
|
||||
|
||||
if(this.latestBillList&&this.latestBillList.length>0){
|
||||
this.latestBillList= this.latestBillList.reverse()
|
||||
storage["latestBillList"] = this.latestBillList
|
||||
window.localStorage.setItem('queryDataStorage', JSON.stringify(storage))
|
||||
}
|
||||
|
||||
},
|
||||
latestClick(item){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user