From 0b523220931d70aa752c3beaca5ed32ca85511c5 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期四, 28 三月 2024 11:36:05 +0800
Subject: [PATCH] Merge refs/remotes/origin/master into refs/heads/master

---
 packageBookService/pages/bookServices/detail/components/tree/index.js |   71 ++++++++++++++++++++++++++++++-----
 1 files changed, 60 insertions(+), 11 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js
index 1527680..1486ac7 100644
--- a/packageBookService/pages/bookServices/detail/components/tree/index.js
+++ b/packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -34,6 +34,14 @@
     isShowCheck: {
       type: Boolean,
       value: false,
+    },
+    paymentPage: {
+      type: Boolean,
+      value: false,
+    },
+    superior: {
+      type: Boolean,
+      value: false,
     }
   },
   data: {
@@ -50,6 +58,15 @@
     console.log('鍑嗗');
   },
   onShow() {
+    debugger
+    this.setData({
+      sonPurchaseSaleMethodId: ''
+    })
+  },
+  onLoad() {
+    this.setData({
+      sonPurchaseSaleMethodId: ''
+    })
   },
   observers: {
     'openIds': function (newValue) {
@@ -301,11 +318,23 @@
         treeList: updatedTreeList  // 鏇存柊 treeList 鏁版嵁
       });
 
+      if (!list.checked) {
+        if (this.properties.superior) {
+          console.log(852);
 
-      this.setData({
-        superiorPurchaseSaleMethodId: list
-      })
-      console.log(this.data.superiorPurchaseSaleMethodId, 'superiorPurchaseSaleMethodId');
+          this.properties.superior = false
+          this.setData({
+            superiorPurchaseSaleMethodId: []
+          })
+        }
+        if (!this.properties.superior) {
+          this.setData({
+            superiorPurchaseSaleMethodId: list
+          })
+        }
+      }
+
+      // console.log(this.data.superiorPurchaseSaleMethodId, 'superiorPurchaseSaleMethodId');
       list.forEach(items => {
         console.log(items.checked, 'itesasd');
         if (!items.checked) {
@@ -314,21 +343,41 @@
           })
         }
       })
-      this.onCloudShoppingCart()
+      // this.onCloudShoppingCart()
     },
     // 瀛愰」鍕鹃��
     checkResource(e) {
       const citem = e.currentTarget.dataset.item
-      // console.log(e);
-
-
+      console.log(citem, '5648');
       const updataList = this.checkResoucrceInfo(this.properties.treeList, citem.id)
-      console.log(updataList);
+      console.log(citem.checked, 'citem.checked');
+      if (!citem.checked) {
+        //閫変腑鐨勬椂鍊欐坊鍔爄d
+        let sonPurchaseSaleMethodId = this.data.sonPurchaseSaleMethodId || []
+        console.log(this.properties.paymentPage, 'this.properties.paymentPage');
+        if (this.properties.paymentPage) {
+          console.log(789987);
+          sonPurchaseSaleMethodId = []
+          this.properties.paymentPage = false
+        }
+        if (!this.properties.paymentPage) {
+          sonPurchaseSaleMethodId.push(citem.saleMethod[0].Id)
+        }
+
+
+        this.setData({
+          sonPurchaseSaleMethodId: sonPurchaseSaleMethodId
+        })
+        console.log(this.data.sonPurchaseSaleMethodId);
+      } else {
+        // 鍙栨秷閫変腑鐨勬椂鍊欏垹闄d
+
+      }
+
       this.setData({
         treeList: updataList,
-        sonPurchaseSaleMethodId: citem.saleMethod[0].Id
-      })
 
+      })
     },
     // 鍔犲叆璐墿杞�
     async onCloudShoppingCart() {

--
Gitblit v1.9.1