zhaoxiaohai 3 gadi atpakaļ
vecāks
revīzija
a30e8e556b

+ 1 - 2
packageA/setclient/modules/contacts/add/index.js

@@ -180,6 +180,7 @@ Page({
                 icon: "none"
             });
             setTimeout(() => {
+                wx.navigateBack()
                 getCurrentPages().forEach(v => {
                     if (v.__route__ == 'packageA/setclient/modules/contacts/detail/index') {
                         v.getDetail();
@@ -206,13 +207,11 @@ Page({
                         }
                     } else if (v.__route__ == 'packageA/project/modules/contacts/search/index') {
                         let index = v.data.list.findIndex(value => value.contactsid == res.data.contactsid);
-                        console.log(index)
                         if (index != -1) v.setData({
                             [`list[${index}]`]: res.data
                         })
                     }
                 });
-                wx.navigateBack();
             }, 500)
         });
     },

+ 11 - 0
packageA/setclient/modules/offers/index.js

@@ -40,6 +40,17 @@ Component({
                 });
             })
         },
+        addOffers() {
+            const {
+                enterprisename,
+                sys_enterpriseid
+            } = getCurrentPages().find(v => v.__route__ == 'packageA/setclient/detail').data.detail;
+            wx.navigateTo({
+                url: `/packageA/offers/addSetclientOffer?data=${JSON.stringify({
+                    sys_enterpriseid:[enterprisename,[sys_enterpriseid]]
+                })}`,
+            })
+        },
         /* 修改总数 */
         changeTotal() {
             this.setData({

+ 4 - 6
packageA/setclient/modules/offers/index.wxml

@@ -5,12 +5,10 @@
     <view class="expand">
         <!-- <navigator url="#" class="but" bindtap="toSearch">
             <van-icon name="search" />
-        </navigator>
-        <navigator url="/packageA/setclient/modules/contacts/quickly/index?sys_enterpriseid={{sys_enterpriseid}}" class="but">
-            <van-icon name="plus" />
         </navigator> -->
+        <navigator url="#" class="but" bindtap="addOffers">
+            <van-icon name="plus" />
+        </navigator>
     </view>
 </view>
-<list list='{{list}}' />
-
-
+<list list='{{list}}' />