|
@@ -677,12 +677,12 @@ struct thisScanDialog {
|
|
|
@State tempArray: HouseStockMaterial[] = []
|
|
|
tempMergeArray: HouseStockMaterial[] = []
|
|
|
|
|
|
- onPageShow(): void {
|
|
|
+ aboutToAppear(): void {
|
|
|
if (this.materialArray && this.materialArray.length > 0) {
|
|
|
- this.tempArray = this.materialArray
|
|
|
+ this.tempArray = JSON.parse(JSON.stringify(this.materialArray));
|
|
|
}
|
|
|
if (this.materialMergeArray && this.materialMergeArray.length > 0) {
|
|
|
- this.tempMergeArray = this.materialMergeArray
|
|
|
+ this.tempMergeArray = JSON.parse(JSON.stringify(this.materialMergeArray));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -700,7 +700,7 @@ struct thisScanDialog {
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
|
|
|
List({space: 4, scroller: this.scroller}) {
|
|
|
- ForEach(this.materialArray, (item: HouseStockMaterial, index: number) => {
|
|
|
+ ForEach(this.tempArray, (item: HouseStockMaterial, index: number) => {
|
|
|
ListItem() {
|
|
|
Row() {
|
|
|
Column({space: 1}) {
|
|
@@ -809,9 +809,10 @@ struct thisScanDialog {
|
|
|
.width('50%')
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.onClick(()=>{
|
|
|
+ this.materialArray = []
|
|
|
+ this.materialMergeArray = []
|
|
|
this.materialArray = this.tempArray
|
|
|
this.materialMergeArray = this.tempMergeArray
|
|
|
- console.log('hhtest', JSON.stringify(this.materialMergeArray));
|
|
|
if (this.controller != undefined) {
|
|
|
this.controller.close()
|
|
|
}
|