Browse Source

修改齐套绑定

cjb 2 months ago
parent
commit
346eeda443

+ 0 - 1
entry/src/main/ets/common/util/request/WmsRequest.ets

@@ -46,7 +46,6 @@ WmsRequest.interceptors.request.use((config: InternalAxiosRequestConfig) => {
 
 // 添加响应拦截器
 WmsRequest.interceptors.response.use((response: AxiosResponse) => {
-  console.log("hhtest", "---------------------------")
   // 对响应数据做点什么
   printResponse(response)
   let res = handleRes(response)

+ 6 - 5
entry/src/main/ets/view/wms/OperationMaterialKitTwoStep.ets

@@ -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()
           }