zhangfufeng 1 неделя назад
Родитель
Сommit
8fd09e2266

+ 2 - 1
api/jms.js

@@ -1,7 +1,7 @@
 // 以下是业务服务器API地址
 var WxApiRoot = 'http://127.0.0.1:19220/jzfranchiseeapiservice/';
 //  // uat环境使用
-  // var WxApiRoot = 'https://uat.jms.lifejingzhi.com/jzfranchiseeapiservice/';
+//   var WxApiRoot = 'https://uat.jms.lifejingzhi.com/jzfranchiseeapiservice/';
 
  // 云平台上线时使用
 //  var WxApiRoot = 'https://jms.lifejingzhi.com/jzfranchiseeapiservice/';
@@ -58,6 +58,7 @@ var WxApiRoot = 'http://127.0.0.1:19220/jzfranchiseeapiservice/';
 	GetOrderGoodsById: WxApiRoot + 'jmsapp/mallAftersale/getOrderGoodsById',
 	RefundisPass: WxApiRoot + 'jmsapp/mallAftersale/isPass',
 	PreRefundCheck: WxApiRoot + 'jmsapp/mallAftersale/preRefundCheck',
+    FraWeekReport: WxApiRoot + 'jmsapp/fraWeekReport/getFraWeekReport',
 
  };
 

+ 3 - 4
app.json

@@ -1,11 +1,9 @@
 {
   "pages": [
 		"pages/temp/serviceOrder/serviceOrder",
-    "pages/index/index",
-  
+        "pages/index/index",
 		"pages/temp/login/login",
 		"pages/temp/register/register",
-	
 		"pages/temp/jzxhAppletsUserPro/jzxhAppletsUserPro",
 		"pages/temp/cancelOrder/cancelOrder",
 		"pages/temp/takeOrder/takeOrder",
@@ -33,7 +31,8 @@
 		"pages/temp/serviceSupply/serviceSupply",
 		"pages/temp/supplyOrder/supplyOrder",
 		"pages/temp/supplyRecord/supplyRecord",
-		"pages/temp/supplyDetail/supplyDetail"
+		"pages/temp/supplyDetail/supplyDetail",
+		"pages/temp/fraWeekReport/fraWeekReport"
 
   ],
   "window": {

+ 50 - 0
pages/temp/fraWeekReport/fraWeekReport.js

@@ -0,0 +1,50 @@
+const util = require("../../../utils/jmsUtil");
+const api = require("../../../api/jms");
+Page({
+
+    data: {},
+    onPageScroll(e) {
+
+    },
+
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    }, onHide: function () {
+        console.log('onHide');
+    }, onUnload: function () {
+        console.log('onunload');
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+    getFraWeekReport() {
+        util.request(api.GetFraWeekReport, {}, 'GET').then(res => {
+            if (res.errno === 0) {
+                this.setData({
+                    fraWeekReport: res.data.fraWeekReport,
+                    showFraWeekReportFlag: res.data.showFraWeekReportFlag
+                })
+            } else {
+                wx.showToast({
+                    title: res.errmsg, icon: 'none'
+                })
+            }
+        });
+    },
+
+})

+ 7 - 0
pages/temp/fraWeekReport/fraWeekReport.json

@@ -0,0 +1,7 @@
+{ 
+  "navigationBarTitleText": "数据统计",
+  "navigationBarBackgroundColor": "#fff",
+  "usingComponents": {
+   
+  }
+}

+ 7 - 0
pages/temp/fraWeekReport/fraWeekReport.wxml

@@ -0,0 +1,7 @@
+<view class="whole-page">
+
+    <view class="no-data">
+        <image src="/images/no-data.png" class="no-data-img"></image>
+        <text class="no-data-text">暂无数据</text>
+    </view>
+</view>

+ 0 - 0
pages/temp/fraWeekReport/fraWeekReport.wxss


+ 123 - 130
pages/temp/serviceOrder/serviceOrder.js

@@ -1,151 +1,144 @@
 const app = getApp()
 const util = require("../../../utils/jmsUtil.js");
 const api = require('../../../api/jms.js');
-import moment from 'moment'
-
 
 
 Page({
-  data: {
-	
-		userInfo:{
-			userName:'',
-			headImg:'',
-			fraName:'',
-		},
-		serviceOrder:'',
-		ticket:'',
-		aftersale:'',
-		wmsOrderCount:'',
-   
-
-  },
-  onPageScroll(e) {
- 
-  },
-
- 
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-  
-
-		let userInfo=wx.getStorageSync('userInfo');
-		console.log(userInfo);
-		app.globalData.userInfo=userInfo;
-		this.setData({
-			userInfo:userInfo
-		});
-		
-
-	},
-	getHomeInfo(){
-		util.request(api.GetHomeInfo, {}, 'GET').then(res => {
-			if (res.errno === 0) {
-			    this.setData({
-						serviceOrder:res.data.serviceOrder,
-						ticket:res.data.ticket,
-						aftersale:res.data.aftersale,
-						wmsOrderCount:res.data.wmsOrderCount
-					})
-			} else {
-				wx.showToast({
-					title: res.errmsg,
-					icon: 'none'
-				})
-			}
-		});
-	},
- 
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-  
-		this.getHomeInfo();
-  },
-  onHide: function () {
-    console.log('onHide');
-  },
-  onUnload: function () {
-    console.log('onunload');
-  },
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-
-  exitLogin: function () {
-    wx.showModal({
-      title: '',
-      confirmColor: '#b4282d',
-      content: '退出登录?',
-      success: function (res) {
-        if (!res.confirm) {
-          return;
-        }
-
-        // util.request(api.AuthLogout, {}, 'POST');
-        app.globalData.hasLogin = false;
-        wx.removeStorageSync('token');
-        wx.removeStorageSync('userInfo');
-        // wx.redirectTo({
-        //   url: '/pages/temp/login/login'
-        // });
-        wx.redirectTo({
-          url: '/pages/index/index'
-        });
-      }
-    })
+    noop() {
+
+    },
+    data: {
 
-	},
-	goService(){
-		wx.navigateTo({
-			url: '/pages/temp/orderBoard/orderBoard'
-		});
-	},
-	goTicket(){
-		wx.navigateTo({
-			url: '/pages/ticket/ticketList/ticketList'
-		});
-	},
-	goRefund(){
-		wx.navigateTo({
-			url: '/pages/refund/refundList/refundList'
-		});
-	},
-	goMall(){
-		wx.navigateTo({
-			url: '/pages/mall/catalog/catalog'
-		});
-	},
-	goOrder(){
-		wx.navigateTo({
-			url: '/pages/mall/order/order'
-		});
-	},
+        userInfo: {
+            userName: '', headImg: '', fraName: '',
+        },
+        serviceOrder: '',
+        ticket: '',
+        aftersale: '',
+        wmsOrderCount: '',
+        showFraWeekReportFlag: false,
+        fraWeekReportId: null
 
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
 
-  },
+    }, onPageScroll(e) {
 
+    },
 
 
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+
+
+        let userInfo = wx.getStorageSync('userInfo');
+        console.log(userInfo);
+        app.globalData.userInfo = userInfo;
+        this.setData({
+            userInfo: userInfo
+        });
 
 
+    },
+    getHomeInfo() {
+        util.request(api.GetHomeInfo, {}, 'GET').then(res => {
+            if (res.errno === 0) {
+                this.setData({
+                    serviceOrder: res.data.serviceOrder,
+                    ticket: res.data.ticket,
+                    aftersale: res.data.aftersale,
+                    wmsOrderCount: res.data.wmsOrderCount,
+                    showFraWeekReportFlag: res.data.showFraWeekReportFlag,
+                    fraWeekReportId: res.data.fraWeekReportId
+                })
+            } else {
+                wx.showToast({
+                    title: res.errmsg, icon: 'none'
+                })
+            }
+        });
+    },
+    closePopup() {
+        console.log('closePopup');
+        this.setData({
+            showFraWeekReportFlag: false
+        })
+    },
+
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+        this.getHomeInfo();
+    }, onHide: function () {
+        console.log('onHide');
+    }, onUnload: function () {
+        console.log('onunload');
+    }, /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+
+    exitLogin: function () {
+        wx.showModal({
+            title: '', confirmColor: '#b4282d', content: '退出登录?', success: function (res) {
+                if (!res.confirm) {
+                    return;
+                }
+
+                // util.request(api.AuthLogout, {}, 'POST');
+                app.globalData.hasLogin = false;
+                wx.removeStorageSync('token');
+                wx.removeStorageSync('userInfo');
+                // wx.redirectTo({
+                //   url: '/pages/temp/login/login'
+                // });
+                wx.redirectTo({
+                    url: '/pages/index/index'
+                });
+            }
+        })
+
+    }, goService() {
+        wx.navigateTo({
+            url: '/pages/temp/orderBoard/orderBoard'
+        });
+    }, goTicket() {
+        wx.navigateTo({
+            url: '/pages/ticket/ticketList/ticketList'
+        });
+    }, goRefund() {
+        wx.navigateTo({
+            url: '/pages/refund/refundList/refundList'
+        });
+    }, goMall() {
+        wx.navigateTo({
+            url: '/pages/mall/catalog/catalog'
+        });
+    }, goOrder() {
+        wx.navigateTo({
+            url: '/pages/mall/order/order'
+        });
+    }, goWeekData() {
+        wx.navigateTo({
+            url: '/pages/temp/fraWeekReport/fraWeekReport?id=' + this.data.fraWeekReportId,
+        })
+    },
 
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
 
+    },
 
- 
 
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
 
-  },
+    },
 
 })

+ 88 - 65
pages/temp/serviceOrder/serviceOrder.wxml

@@ -1,80 +1,103 @@
 <!-- <wxs src="../../../utils/format.wxs" module="format" /> -->
 
 
-<view class="whole-page"  > 
-  <view class="user-wrapper">
-    <view class="user-info">
-      <image class="user-img" src="{{userInfo.headImg?userInfo.headImg:'/static/images/upgrade/head-user.png'}}" mode="aspectFill"></image>
-      <view class="user-right">
-        <view class="user-name">
-          <view> <text>{{userInfo.userName}}</text> </view>
-					<view class="logout-text"  bindtap="exitLogin">退出登录</view>
-          <!-- <view class="job-year" wx:if="{{momthInfo.state==1}}">已上线</view>
-          <view class="job-year" wx:if="{{momthInfo.state==0}}">审核中</view> -->
+<view class="whole-page">
+    <view class="user-wrapper">
+        <view class="user-info">
+            <image class="user-img" src="{{userInfo.headImg?userInfo.headImg:'/static/images/upgrade/head-user.png'}}"
+                   mode="aspectFill"></image>
+            <view class="user-right">
+                <view class="user-name">
+                    <view>
+                        <text>{{userInfo.userName}}</text>
+                    </view>
+                    <view class="logout-text" bindtap="exitLogin">退出登录</view>
+                    <!-- <view class="job-year" wx:if="{{momthInfo.state==1}}">已上线</view>
+                    <view class="job-year" wx:if="{{momthInfo.state==0}}">审核中</view> -->
+                </view>
+
+            </view>
+
+
         </view>
+        <view class="user-bottom">
+            <view class="company">
+                {{userInfo.fraName}}
 
-      </view>
+            </view>
+            <!-- <view class="recommend">
+              <view> 推荐码: <text>{{monthInfo.recCode}}</text></view>
+              <image src="/static/images/upgrade/icon-copy.png" mode="aspectFit" class="copy-img" bindtap="copyCode"></image>
+            </view> -->
 
 
+        </view>
     </view>
-    <view class="user-bottom">
-      <view class="company">
-        {{userInfo.fraName}}
-       
-      </view>
-      <!-- <view class="recommend">
-        <view> 推荐码: <text>{{monthInfo.recCode}}</text></view>
-        <image src="/static/images/upgrade/icon-copy.png" mode="aspectFit" class="copy-img" bindtap="copyCode"></image>
-      </view> -->
 
+    <view class="dashboard">
+        <view class="module-item" bindtap="goService">
+            <view class="title">
+                服务单
+            </view>
+            <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-service.png" mode="aspectFit"
+                   style="width:80rpx;height:80rpx;"></image>
+            <view class="board-num">{{serviceOrder}} 单</view>
+
+        </view>
+        <view class="module-item" bindtap="goTicket">
+            <view class="title">
+                咨询投诉
+            </view>
+            <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-ticket.png" mode="aspectFit"
+                   style="width:100rpx;height:100rpx;"></image>
+            <view class="board-num">{{ticket}} 单</view>
+
+        </view>
+        <view class="module-item" bindtap="goRefund">
+            <view class="title">
+                退款审核
+            </view>
+            <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-refund.png" mode="aspectFill"></image>
+            <view class="board-num">{{aftersale}} 单</view>
+
+        </view>
+        <view class="module-item" bindtap="goMall">
+            <view class="title">
+                物料采购
+            </view>
+            <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-mall.png" mode="aspectFill"></image>
+            <view class="board-num"></view>
+
+        </view>
+        <view class="module-item" bindtap="goOrder">
+            <view class="title">
+                物料订单
+            </view>
+            <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-order-jms.png" mode="aspectFill"></image>
+            <view class="board-num">{{wmsOrderCount}} 单</view>
+
+        </view>
+        <view class="module-item" bindtap="goWeekData">
+            <view class="title">
+                数据统计
+            </view>
+            <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-order-jms.png" mode="aspectFill"></image>
+            <view class="board-num"></view>
+        </view>
 
     </view>
-  </view>
-
- <view class="dashboard">
- <view class="module-item" bindtap="goService">
-     <view class="title">
-			服务单
-		 </view>
-		 <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-service.png" mode="aspectFit" style="width:80rpx;height:80rpx;"></image>
-		 <view class="board-num">{{serviceOrder}} 单</view>
-
- </view>
- <view class="module-item" bindtap="goTicket">
-     <view class="title">
-			咨询投诉
-		 </view>
-		 <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-ticket.png" mode="aspectFit" style="width:100rpx;height:100rpx;"></image>
-		 <view class="board-num">{{ticket}} 单</view>
-
- </view>
- <view class="module-item" bindtap="goRefund">
-     <view class="title">
-			退款审核
-		 </view>
-		 <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-refund.png" mode="aspectFill"></image>
-		 <view class="board-num">{{aftersale}} 单</view>
-
- </view>
- <view class="module-item" bindtap="goMall">
-     <view class="title">
-			物料采购
-		 </view>
-		 <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-mall.png" mode="aspectFill"></image>
-		 <view class="board-num"></view>
-
- </view>
- <view class="module-item" bindtap="goOrder">
-     <view class="title">
-			物料订单
-		 </view>
-		 <image src="https://mall.zhaijieshi.cc/file/wx-jms/icon-order-jms.png" mode="aspectFill"></image>
-		 <view class="board-num">{{wmsOrderCount}} 单</view>
-
- </view>
-
- </view>
 
 
+    <view class="popup" wx:if="{{showFraWeekReportFlag}}">
+        <view class="popup-mask" bindtap="closePopup">
+        </view>
+        <view class="popup-content"  >
+            <view class="popup-text—left">您的周报数据已生成</view>
+            <view class="popup-text-right" bindtap="goWeekData" >去查看</view>
+        </view>
+
+
+    </view>
+
 </view>
 

+ 36 - 1
pages/temp/serviceOrder/serviceOrder.wxss

@@ -7,7 +7,7 @@ page {
 view,text{
   box-sizing: border-box;
   color:#333;
-  font-size: 34rpx;
+  font-size: 29rpx;
 }
 .whole-page{
   min-height: 1000rpx;
@@ -166,3 +166,38 @@ margin:0 20rpx 20rpx 0;
 	height:32rpx;
 	line-height: 32rpx;
 }
+.popup-content{
+	display: flex;
+	justify-content: space-between;
+	font-size: 25rpx;
+	/*display: inline-block;*/
+	padding: 5rpx;
+}
+.popup-text-right {
+	text-align: right;
+	color: #80c0eb;
+}
+
+.popup-text-lft {
+	text-align: left;
+	color: #666666;
+}
+.popup {
+	position: fixed;
+	bottom: 5rpx;
+	left: 50%;
+	transform: translate(-50%, -50%);
+	width: 100%;
+	background-color: rgb(200,233,254);
+	padding: 5rpx;
+	z-index: 1000;
+}
+.popup-mask {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 80%;
+	height: 100%;
+	/*background-color: rgba(0, 0, 0, 0.5);*/
+	z-index: 999;
+}