Просмотр исходного кода

更换负责人是否继续参与工作

xiaohaizhao 2 лет назад
Родитель
Сommit
f0b9455576

+ 31 - 32
packageA/contacts/detail.js

@@ -327,40 +327,39 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _Http.basic({
-                    "id": 20220930103701,
-                    "content": {
-                        ownertable: that.data.ownertable,
-                        ownerid: that.data.ownerid,
-                        userid: arr[0],
-                        // isaddoldleader: s.confirm ? 1 : 0
+                if (confirm) wx.showModal({
+                    title: '提示',
+                    content: '是否参与该数据的后续工作',
+                    confirmText: "参与",
+                    cancelText: "不参与",
+                    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(() => {
+                                wx.navigateBack({
+                                    delta: 2
+                                });
+                            }, 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(() => {
-                        wx.navigateBack({
-                            delta: 2
-                        });
-                    }, 300)
                 })
-                /*  if (confirm) wx.showModal({
-                     title: '提示',
-                     content: '是否参与该数据的后续工作',
-                     confirmText: "参与",
-                     cancelText: "不参与",
-                     complete: (s) => {
-                         
-                     }
-                 }) */
             }
         })
     },

+ 27 - 29
packageA/contract/detail.js

@@ -759,41 +759,39 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _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",
-                        mask: true
-                    });
-                    setTimeout(() => {
-                        wx.navigateBack({
-                            delta: 2
-                        });
-                    }, 300)
-                })
-
-                /* wx.showModal({
+                if (confirm) wx.showModal({
                     title: '提示',
                     content: '是否参与该数据的后续工作',
                     confirmText: "参与",
                     cancelText: "不参与",
                     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",
+                                mask: true
+                            });
+                            setTimeout(() => {
+                                wx.navigateBack({
+                                    delta: 2
+                                });
+                            }, 300)
+                        })
                     }
-                }) */
+                })
             }
         })
     },

+ 30 - 31
packageA/offers/detail.js

@@ -553,43 +553,42 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _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(() => {
-                        wx.navigateBack({
-                            delta: 2
-                        });
-                        /*  getCurrentPages().forEach(v => {
-                             if (['packageA/project/index'].includes(v.__route__)) v.getList(true)
-                         }) */
-                    }, 300)
-                })
-                /*  wx.showModal({
+                if (confirm) wx.showModal({
                     title: '提示',
                     content: '是否参与该数据的后续工作',
                     confirmText: "参与",
                     cancelText: "不参与",
                     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(() => {
+                                wx.navigateBack({
+                                    delta: 2
+                                });
+                                /*  getCurrentPages().forEach(v => {
+                                     if (['packageA/project/index'].includes(v.__route__)) v.getList(true)
+                                 }) */
+                            }, 300)
+                        })
                     }
-                }) */
+                })
             }
         })
     }

+ 27 - 29
packageA/project/detail.js

@@ -682,37 +682,35 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _Http.basic({
-                    "id": 20220930103701,
-                    "content": {
-                        ownertable: "sa_project",
-                        ownerid: that.data.detail.sa_projectid,
-                        userid: arr[0],
-                        // isaddoldleader: s.confirm ? 1 : 0
+                if (confirm) wx.showModal({
+                    title: '提示',
+                    content: '是否参与该数据的后续工作',
+                    confirmText: "参与",
+                    cancelText: "不参与",
+                    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(() => {
+                                wx.navigateBack({
+                                    delta: 2
+                                });
+                            }, 300)
+                        })
                     }
-                }).then(res => {
-                    console.log("更换负责人", res)
-                    wx.showToast({
-                        title: res.msg != '成功' ? res.data : '更换成功',
-                        icon: "none",
-                        mask: true
-                    });
-                    if (res.msg == '成功') setTimeout(() => {
-                        wx.navigateBack({
-                            delta: 2
-                        });
-                    }, 300)
                 })
-
-                /*  wx.showModal({
-                     title: '提示',
-                     content: '是否参与该数据的后续工作',
-                     confirmText: "参与",
-                     cancelText: "不参与",
-                     complete: (s) => {
-                     
-                     }
-                 }) */
             }
         })
     },

+ 34 - 35
packageA/saleClue/detail.js

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

+ 30 - 31
packageA/setclient/detail.js

@@ -293,43 +293,42 @@ Page({
             complete: ({
                 confirm
             }) => {
-                if (confirm) _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",
-                        mask: true
-                    });
-                    getCurrentPages().forEach(v => {
-                        if (['packageA/setclient/index'].includes(v.__route__)) v.getList(true)
-                    })
-                    setTimeout(() => {
-                        wx.navigateBack({
-                            delta: 2
-                        });
-                    }, 300)
-                })
-                /*  wx.showModal({
+                if (confirm) wx.showModal({
                     title: '提示',
                     content: '是否参与该数据的后续工作',
                     confirmText: "参与",
                     cancelText: "不参与",
                     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",
+                                mask: true
+                            });
+                            getCurrentPages().forEach(v => {
+                                if (['packageA/setclient/index'].includes(v.__route__)) v.getList(true)
+                            })
+                            setTimeout(() => {
+                                wx.navigateBack({
+                                    delta: 2
+                                });
+                            }, 300)
+                        })
                     }
-                }) */
+                })
             }
         })
     },

+ 33 - 34
pages/group/modules/list/index.js

@@ -75,47 +75,46 @@ Component({
                 complete: ({
                     confirm
                 }) => {
-                    if (confirm) _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({
-                                delta: 2
-                            });
-                        }, 300)
-                    })
-
-                   /*  wx.showModal({
+                    if (confirm) wx.showModal({
                         title: '提示',
                         content: '是否参与该数据的后续工作',
                         confirmText: "参与",
                         cancelText: "不参与",
                         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({
+                                        delta: 2
+                                    });
+                                }, 300)
+                            })
 
                         }
-                    }) */
+                    })
                 }
             })
         },