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

修改报备与驳回的逻辑

xiaohaizhao 2 лет назад
Родитель
Сommit
af2e3aaecc
1 измененных файлов с 54 добавлено и 42 удалено
  1. 54 42
      packageA/project/detail.js

+ 54 - 42
packageA/project/detail.js

@@ -363,47 +363,62 @@ Page({
                 })
                 break;
             case "报备审核":
-                /*  wx.showModal({
-                     title: '提示',
-                     content: '是否确认审核项目',
-                     complete: ({
-                         confirm
-                     }) => {
-                         if (confirm) that.handleReport(2)
-                     }
-                 }) */
-                _Http.basic({
-                    "id": 20230628155602,
-                    "content": {
-                        "sa_projectid": that.data.sa_projectid,
-                        "type": "mobile"
-                    }
-                }).then(res => {
-                    console.log("获取报备地址", res)
-                    if (res.msg != '成功') return wx.showToast({
-                        title: res.msg,
-                        icon: "none"
-                    });
-                    if (res.data === '') return wx.showToast({
-                        title: '暂无审核权限',
+                if (wx.getStorageSync('userMsg').siteid == 'HY') {
+                    wx.showToast({
+                        title: '请前往WEB端操作',
                         icon: "none"
-                    });
-                    getApp().globalData.webviewurl = res.data;
-                    wx.navigateTo({
-                        url: './webview',
                     })
-                })
+                } else {
+                    wx.showModal({
+                        title: '提示',
+                        content: '是否确认审核项目',
+                        complete: ({
+                            confirm
+                        }) => {
+                            if (confirm) that.handleReport(2)
+                        }
+                    })
+                }
+
+                /*  _Http.basic({
+                     "id": 20230628155602,
+                     "content": {
+                         "sa_projectid": that.data.sa_projectid,
+                         "type": "mobile"
+                     }
+                 }).then(res => {
+                     console.log("获取报备地址", res)
+                     if (res.msg != '成功') return wx.showToast({
+                         title: res.msg,
+                         icon: "none"
+                     });
+                     if (res.data === '') return wx.showToast({
+                         title: '暂无审核权限',
+                         icon: "none"
+                     });
+                     getApp().globalData.webviewurl = res.data;
+                     wx.navigateTo({
+                         url: './webview',
+                     })
+                 }) */
                 break;
             case "报备驳回(退回)":
-                wx.showModal({
-                    title: '提示',
-                    content: '是否确认报备驳回(退回)项目',
-                    complete: ({
-                        confirm
-                    }) => {
-                        if (confirm) that.handleReport(3)
-                    }
-                })
+                if (wx.getStorageSync('userMsg').siteid == 'HY') {
+                    wx.showToast({
+                        title: '请前往WEB端操作',
+                        icon: "none"
+                    })
+                } else {
+                    wx.showModal({
+                        title: '提示',
+                        content: '是否确认报备驳回(退回)项目',
+                        complete: ({
+                            confirm
+                        }) => {
+                            if (confirm) that.handleReport(3)
+                        }
+                    })
+                }
                 break;
             case "跟进":
                 wx.navigateTo({
@@ -565,11 +580,8 @@ Page({
                 mask: true
             })
             if (res.data != '失败') {
-                if (type != 1) {
-                    this.getDetail();
-                } else {
-                    this.getTags();
-                }
+                this.getDetail();
+                this.getTags();
             }
         })
     },