Ver código fonte

客户详情

zhaoxiaohai 2 anos atrás
pai
commit
aaf6175300
1 arquivos alterados com 43 adições e 3 exclusões
  1. 43 3
      packageA/setclient/detail.js

+ 43 - 3
packageA/setclient/detail.js

@@ -43,12 +43,10 @@ Page({
         })
         this.getDetail();
     },
-
     //详情按钮回调
     tabbarOnClick({
         detail
     }) {
-        console.log(detail)
         let data = this.data.detail;
         switch (detail.label) {
             case "跟进":
@@ -69,10 +67,53 @@ Page({
                     })}`,
                 })
                 break;
+            case "更换负责人":
+                wx.navigateTo({
+                    url: `/packageA/group/select?data=${JSON.stringify({
+                         ownertable:"sa_customers",
+                         ownerid:this.data.sa_customersid,
+                    })}&radio=true`,
+                })
+                break;
             default:
+                console.log(detail)
                 break;
         }
     },
+    /* 更换负责人 */
+    handelSubmit(arr) {
+        const that = this;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认更换负责人',
+            complete: ({
+                confirm
+            }) => {
+                if (confirm) _Http.basic({
+                    "id": 20220930103701,
+                    "content": {
+                        ownertable: "sa_customers",
+                        ownerid: that.data.sa_customersid,
+                        userid: arr[0]
+                    }
+                }).then(res => {
+                    console.log("更换负责人", res)
+                    if (res.msg != '成功') return wx.showToast({
+                        title: res.data,
+                        icon: "none"
+                    });
+                    wx.showToast({
+                        title: '更换成功!',
+                        icon: "none"
+                    });
+                    setTimeout(() => {
+                        that.getDetail();
+                        wx.navigateBack();
+                    }, 300)
+                })
+            }
+        })
+    },
     /* 获取详情 */
     getDetail() {
         /* 基本信息 */
@@ -272,7 +313,6 @@ Page({
     getGroup() {
         this.selectComponent("#Group").getList();
     },
-
     onReachBottom() {
         this.partialRenewal();
     },