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