Procházet zdrojové kódy

Merge branch '变更负责人' into 测试

xiaohaizhao před 2 roky
rodič
revize
5164258525

+ 28 - 21
packageA/contacts/detail.js

@@ -327,28 +327,35 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _Http.basic({
-                    "id": 20220930103701,
-                    "content": {
-                        ownertable: that.data.ownertable,
-                        ownerid: that.data.ownerid,
-                        userid: arr[0]
+                if (confirm) wx.showModal({
+                    title: '提示',
+                    content: '是否参与该数据的后续工作',
+                    complete: (s) => {
+                        _Http.basic({
+                            "id": 20220930103701,
+                            "content": {
+                                ownertable: that.data.ownertable,
+                                ownerid: that.data.ownerid,
+                                userid: arr[0],
+                                isaddoldleader: s.confirm ? 1 : 0
+                            }
+                        }).then(res => {
+                            console.log("更换负责人", res)
+                            if (res.msg != '成功') return wx.showToast({
+                                title: res.msg,
+                                icon: "none"
+                            });
+                            wx.showToast({
+                                title: '更换成功!',
+                                icon: "none",
+                                mask: true
+                            });
+                            setTimeout(() => {
+                                that.getDetail(true);
+                                wx.navigateBack();
+                            }, 300)
+                        })
                     }
-                }).then(res => {
-                    console.log("更换负责人", res)
-                    if (res.msg != '成功') return wx.showToast({
-                        title: res.msg,
-                        icon: "none"
-                    });
-                    wx.showToast({
-                        title: '更换成功!',
-                        icon: "none",
-                        mask: true
-                    });
-                    setTimeout(() => {
-                        that.getDetail(true);
-                        wx.navigateBack();
-                    }, 300)
                 })
             }
         })

+ 27 - 20
packageA/contract/detail.js

@@ -759,27 +759,34 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _Http.basic({
-                    "id": 20220930103701,
-                    "content": {
-                        ownertable: "sa_contract",
-                        ownerid: that.data.detail.sa_contractid,
-                        userid: arr[0]
+                if (confirm) wx.showModal({
+                    title: '提示',
+                    content: '是否参与该数据的后续工作',
+                    complete: (s) => {
+                        _Http.basic({
+                            "id": 20220930103701,
+                            "content": {
+                                ownertable: "sa_contract",
+                                ownerid: that.data.detail.sa_contractid,
+                                userid: arr[0],
+                                isaddoldleader: s.confirm ? 1 : 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)
+                        })
                     }
-                }).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)
                 })
             }
         })

+ 31 - 24
packageA/offers/detail.js

@@ -556,31 +556,38 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _Http.basic({
-                    "id": 20220930103701,
-                    "content": {
-                        ownertable: "sa_quotedprice",
-                        ownerid: that.data.detail.sa_quotedpriceid,
-                        userid: arr[0]
+                if (confirm) wx.showModal({
+                    title: '提示',
+                    content: '是否参与该数据的后续工作',
+                    complete: (s) => {
+                        _Http.basic({
+                            "id": 20220930103701,
+                            "content": {
+                                ownertable: "sa_quotedprice",
+                                ownerid: that.data.detail.sa_quotedpriceid,
+                                userid: arr[0],
+                                isaddoldleader: s.confirm ? 1 : 0
+                            }
+                        }).then(res => {
+                            console.log("更换负责人", res)
+                            if (res.msg != '成功') return wx.showToast({
+                                title: res.data,
+                                icon: "none"
+                            });
+                            wx.showToast({
+                                title: '更换成功!',
+                                icon: "none",
+                                mask: true
+                            });
+                            setTimeout(() => {
+                                that.getDetail();
+                                wx.navigateBack();
+                                /*  getCurrentPages().forEach(v => {
+                                     if (['packageA/project/index'].includes(v.__route__)) v.getList(true)
+                                 }) */
+                            }, 300)
+                        })
                     }
-                }).then(res => {
-                    console.log("更换负责人", res)
-                    if (res.msg != '成功') return wx.showToast({
-                        title: res.data,
-                        icon: "none"
-                    });
-                    wx.showToast({
-                        title: '更换成功!',
-                        icon: "none",
-                        mask: true
-                    });
-                    setTimeout(() => {
-                        that.getDetail();
-                        wx.navigateBack();
-                        /*  getCurrentPages().forEach(v => {
-                             if (['packageA/project/index'].includes(v.__route__)) v.getList(true)
-                         }) */
-                    }, 300)
                 })
             }
         })

+ 24 - 16
packageA/project/detail.js

@@ -686,23 +686,31 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _Http.basic({
-                    "id": 20220930103701,
-                    "content": {
-                        ownertable: "sa_project",
-                        ownerid: that.data.detail.sa_projectid,
-                        userid: arr[0]
+                if (confirm) wx.showModal({
+                    title: '提示',
+                    content: '是否参与该数据的后续工作',
+                    complete: (s) => {
+                        _Http.basic({
+                            "id": 20220930103701,
+                            "content": {
+                                ownertable: "sa_project",
+                                ownerid: that.data.detail.sa_projectid,
+                                userid: arr[0],
+                                isaddoldleader: s.confirm ? 1 : 0
+                            }
+                        }).then(res => {
+                            console.log("更换负责人", res)
+                            wx.showToast({
+                                title: res.msg != '成功' ? res.data : '更换成功',
+                                icon: "none",
+                                mask: true
+                            });
+                            if (res.msg == '成功') setTimeout(() => {
+                                that.getDetail(true);
+                                wx.navigateBack();
+                            }, 300)
+                        })
                     }
-                }).then(res => {
-                    wx.showToast({
-                        title: res.msg != '成功' ? res.data : '更换成功',
-                        icon: "none",
-                        mask: true
-                    });
-                    if (res.msg == '成功') setTimeout(() => {
-                        that.getDetail(true);
-                        wx.navigateBack();
-                    }, 300)
                 })
             }
         })

+ 30 - 23
packageA/saleClue/detail.js

@@ -424,30 +424,37 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _Http.basic({
-                    "id": 20220930103701,
-                    "content": {
-                        ownertable: "sat_orderclue",
-                        ownerid: that.data.detail.sat_orderclueid,
-                        userid: arr[0]
+                if (confirm) wx.showModal({
+                    title: '提示',
+                    content: '是否参与该数据的后续工作',
+                    complete: (s) => {
+                        _Http.basic({
+                            "id": 20220930103701,
+                            "content": {
+                                ownertable: "sat_orderclue",
+                                ownerid: that.data.detail.sat_orderclueid,
+                                userid: arr[0],
+                                isaddoldleader: s.confirm ? 1 : 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();
+                                /*  getCurrentPages().forEach(v => {
+                                     if (['packageA/project/index'].includes(v.__route__)) v.getList(true)
+                                 }) */
+                            }, 300)
+                        })
                     }
-                }).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();
-                        /*  getCurrentPages().forEach(v => {
-                             if (['packageA/project/index'].includes(v.__route__)) v.getList(true)
-                         }) */
-                    }, 300)
                 })
             }
         })

+ 34 - 27
packageA/setclient/detail.js

@@ -293,30 +293,37 @@ Page({
             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();
-                        getCurrentPages().forEach(v => {
-                            if (['packageA/setclient/index'].includes(v.__route__)) v.getList(true)
+                if (confirm) wx.showModal({
+                    title: '提示',
+                    content: '是否参与该数据的后续工作',
+                    complete: (s) => {
+                        _Http.basic({
+                            "id": 20220930103701,
+                            "content": {
+                                ownertable: "sa_customers",
+                                ownerid: that.data.sa_customersid,
+                                userid: arr[0],
+                                isaddoldleader: s.confirm ? 1 : 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();
+                                getCurrentPages().forEach(v => {
+                                    if (['packageA/setclient/index'].includes(v.__route__)) v.getList(true)
+                                })
+                                wx.navigateBack();
+                            }, 300)
                         })
-                        wx.navigateBack();
-                    }, 300)
+                    }
                 })
             }
         })
@@ -381,10 +388,10 @@ Page({
                 icon: "icon-zhuanyi",
                 label: "更换负责人"
             })
-         /*    if (isLeader) tabbarList.push({
-                icon: "icon-dibu-biangengchengjiaozhuangtai",
-                label: "更改合作状态"
-            }) */
+            /*    if (isLeader) tabbarList.push({
+                   icon: "icon-dibu-biangengchengjiaozhuangtai",
+                   label: "更改合作状态"
+               }) */
             tabbarList.push({
                 icon: "icon-shanchu",
                 label: "作废"

+ 32 - 25
pages/group/modules/list/index.js

@@ -75,33 +75,40 @@ Component({
                 complete: ({
                     confirm
                 }) => {
-                    if (confirm) _Http.basic({
-                        "id": 20220930103701,
-                        "content": {
-                            ownertable: that.data.ownertable,
-                            ownerid: that.data.ownerid,
-                            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(() => {
-                            getCurrentPages().forEach(v => {
-                                if (["packageA/project/index", "ackageA/setclient/index", "pages/group/index"].includes(v.__route__)) {
-                                    v.getList(true);
-                                } else if (["packageA/setclient/detail", "packageA/project/detail"].includes(v.__route__)) {
-                                    v.getDetail()
+                    if (confirm) wx.showModal({
+                        title: '提示',
+                        content: '是否参与该数据的后续工作',
+                        complete: (s) => {
+                            _Http.basic({
+                                "id": 20220930103701,
+                                "content": {
+                                    ownertable: that.data.ownertable,
+                                    ownerid: that.data.ownerid,
+                                    userid: arr[0],
+                                    isaddoldleader: s.confirm ? 1 : 0
                                 }
+                            }).then(res => {
+                                console.log("更换负责人", res)
+                                if (res.msg != '成功') return wx.showToast({
+                                    title: res.data,
+                                    icon: "none"
+                                });
+                                wx.showToast({
+                                    title: '更换成功!',
+                                    icon: "none"
+                                });
+                                setTimeout(() => {
+                                    getCurrentPages().forEach(v => {
+                                        if (["packageA/project/index", "ackageA/setclient/index", "pages/group/index"].includes(v.__route__)) {
+                                            v.getList(true);
+                                        } else if (["packageA/setclient/detail", "packageA/project/detail"].includes(v.__route__)) {
+                                            v.getDetail()
+                                        }
+                                    })
+                                    wx.navigateBack();
+                                }, 300)
                             })
-                            wx.navigateBack();
-                        }, 300)
+                        }
                     })
                 }
             })