Sfoglia il codice sorgente

项目报备进度

xiaohaizhao 2 anni fa
parent
commit
79c0191555

+ 2 - 1
app.json

@@ -131,7 +131,8 @@
                 "report/index",
                 "report/insert",
                 "report/detail",
-                "achievement/index"
+                "achievement/index",
+                "project/webview"
             ]
         }
     ],

+ 39 - 10
packageA/project/detail.js

@@ -50,6 +50,10 @@ Page({
             label: "任务",
             icon: "icon-tabrenwu",
             model: "#Work"
+        }, {
+            label: "报备进度",
+            icon: "icon-tabfujian1",
+            model: "#ReportingProgress"
         }, {
             label: "附件",
             icon: "icon-tabfujian1",
@@ -233,12 +237,13 @@ Page({
             isLeader = s.data.editable == 1;
             editdataleader = s.data.editdataleader == 1;
         }
+        /* , {
+                    icon: "icon-genjin",
+                    label: "报备驳回(退回)"
+                }  */
         if (isAdmin) tabbarList = [{
             icon: "icon-genjin",
             label: "报备审核"
-        }, {
-            icon: "icon-genjin",
-            label: "报备驳回(退回)"
         }].concat(tabbarList);
         if (isLeader || isAdmin) {
             if (status != '已失败') tabbarList = tabbarList.concat([{
@@ -361,14 +366,35 @@ Page({
                 })
                 break;
             case "报备审核":
-                wx.showModal({
-                    title: '提示',
-                    content: '是否确认审核项目',
-                    complete: ({
-                        confirm
-                    }) => {
-                        if (confirm) that.handleReport(2)
+                /*  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 "报备驳回(退回)":
@@ -568,6 +594,9 @@ Page({
             }
         }
     },
+    onShow() {
+        console.log()
+    },
     onReachBottom() {
         this.partialRenewal();
     },

+ 2 - 1
packageA/project/detail.json

@@ -13,7 +13,8 @@
         "Opponent": "./modules/opponent/index",
         "Work": "/packageA/public/work/index",
         "Contract": "./modules/contract/index",
-        "Clue":"./modules/clue/index"
+        "Clue":"./modules/clue/index",
+        "ReportingProgress":"./modules/reportingProgress/index"
     },
     "navigationBarTitleText": "项目详情"
 }

+ 2 - 1
packageA/project/detail.wxml

@@ -1,4 +1,4 @@
-<import src="detail.skeleton.wxml"/>
+<import src="detail.skeleton.wxml" />
 <template is="skeleton" wx:if="{{loading}}" />
 
 <view class="header">
@@ -26,6 +26,7 @@
     <Opponent slot='竞争对手' id='Opponent' disabled="{{per.query(options,'opposites')||isAdmin||isLeader}}" />
     <Offers slot='报价单' id='Offers' disabled="{{per.query(options,'offer')||isAdmin||isLeader}}" isInsert='{{isInsert}}' />
     <Record slot='操作记录' id="Record" ownertable='sa_project' ownerid='{{detail.sa_projectid}}' />
+    <ReportingProgress slot='报备进度' id='ReportingProgress' />
     <Files slot='附件' id="Files" ownertable='sa_project' ownerid='{{detail.sa_projectid}}' />
     <Clue slot='关联线索' id="Clue" />
     <view style="height: 140rpx;" />

+ 40 - 0
packageA/project/modules/reportingProgress/index.js

@@ -0,0 +1,40 @@
+const _Http = getApp().globalData.http,
+    {
+        formatTime
+    } = require("../../../../utils/getTime");
+
+Component({
+    data: {
+        sa_projectid: 0,
+        content: {
+            total: null
+        }
+    },
+    methods: {
+        /* 获取产品列表 */
+        getList(id) {
+            if (id == 0) return;
+            let content = {
+                nocache: true,
+                sa_projectid: id
+            };
+            _Http.basic({
+                "id": "20230628155502",
+                content
+            }).then(res => {
+                console.log("报备进度", res)
+                if (res.msg != '成功') return wx.showToast({
+                    title: res.data,
+                    icon: "none"
+                });
+                this.setData({
+                    list: res.data.map(v => {
+                        v.time = formatTime(new Date(v.createDate), '-')
+                        return v
+                    }),
+                    sa_projectid: id
+                })
+            })
+        }
+    }
+})

+ 4 - 0
packageA/project/modules/reportingProgress/index.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 16 - 0
packageA/project/modules/reportingProgress/index.scss

@@ -0,0 +1,16 @@
+.box {
+    background-color: #fff;
+    padding: 20rpx 30rpx;
+    box-sizing: border-box;
+    font-family: PingFang SC-Regular, PingFang SC;
+    border-bottom: 1px solid #ddd;
+    .content {
+        font-size: 28rpx;
+        color: #333333;
+    }
+    .time{
+        font-size: 24rpx;
+        color: #666;
+        margin-top: 10rpx;
+    }
+}

+ 9 - 0
packageA/project/modules/reportingProgress/index.wxml

@@ -0,0 +1,9 @@
+<view class="box" wx:for="{{list}}" wx:key="id">
+    <view class="content">
+        {{item.positionName + item.actionName + item.activityName +item.msg}}
+    </view>
+    <view class="time">
+        {{item.time}}
+    </view>
+</view>
+<My_empty wx:if="{{list.length==0}}" />

+ 15 - 0
packageA/project/webview.js

@@ -0,0 +1,15 @@
+Page({
+    data: {
+        url: ""
+    },
+    onLoad(options) {
+        this.setData({
+            url: getApp().globalData.webviewurl
+        })
+    },
+    onUnload() {
+        getApp().globalData.webviewurl = "";
+        let page = getCurrentPages().find(v => v.__route__ == 'packageA/project/detail')
+        if (page && page.data.tabsList[page.data.tabsActive].label == '报备进度') page.partialRenewal()
+    },
+})

+ 4 - 0
packageA/project/webview.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "审核报备"
+}

+ 1 - 0
packageA/project/webview.scss

@@ -0,0 +1 @@
+/* packageA/project/webview.wxss */

+ 1 - 0
packageA/project/webview.wxml

@@ -0,0 +1 @@
+<web-view src="{{url}}"/>

+ 1 - 1
pages/tabbar/mine/associatedPublicNumber.wxml

@@ -25,7 +25,7 @@
             应用消息请关注公众号信息
         </view>
         <view>
-            长按二维码识别图中公众号
+            长按二维码识别图中公众号
         </view>
 
         <view style="margin-top: 20rpx;">

+ 2 - 2
pages/tabbar/mine/index.wxml

@@ -50,7 +50,7 @@
             </view>
         </view>
     </navigator>
-<!--     <navigator wx:if="{{userMsg.iswechatbinding}}" class="item" url="#" bindtap="bindingOfficialAccounts">
+    <navigator wx:if="{{userMsg.iswechatbinding}}" class="item" url="#" bindtap="bindingOfficialAccounts">
         <view class="con">
             <view class="label">
                 <text class="iconfont icon-a-wodebangdingweixin" style="color: var(--success);" />
@@ -60,7 +60,7 @@
                 <van-icon size='30rpx' name="arrow" />
             </view>
         </view>
-    </navigator> -->
+    </navigator>
 </My_card>
 <view style="width: 100vw;text-align: center;margin-top: 200rpx;">
     <van-button custom-class='out-login' color="#CCC" bindtap="outLogin" plain>退出登录</van-button>