Przeglądaj źródła

1、完善待办工作

zhoux 2 lat temu
rodzic
commit
8dc8fa137a

+ 1 - 0
api/pages/ivt/inboundOther.js

@@ -17,6 +17,7 @@ module.exports = {
     inboundRepeal: 'repeal/',
     selectInbound:'select_inbound',
     inBoundCancel: 'inbound_cancel',
+    selectWaitInboundCount:'select_wait_inbound_count',
   },
 
   routeUrl: {

+ 1 - 0
api/pages/ivt/outboundOther.js

@@ -17,6 +17,7 @@ module.exports = {
     outboundRepeal: 'repeal/',
     selectOutbound:'select_outbound',
     outBoundCancel: 'outbound_cancel',
+    selectWaitOutboundCount:'select_wait_outbound_count',
   },
 
   routeUrl: {

+ 85 - 20
pages/mine/mine.js

@@ -76,12 +76,14 @@ Page({
       },
       {
         title: '待入库',
-        path: '/package4/pages/order-billing/order-billing',
+        code:'entry-handle',
+        path: '/package-inventory/pages/warehousing-processing/warehousing-processing',
         icon: 'order-billing.png',
       },
       {
         title: '待出库',
-        path: '/package4/pages/order-billing/order-billing',
+        code:'out-handle',
+        path: '/package-inventory/pages/outbound-processing/outbound-processing',
         icon: 'order-billing.png',
       },
     ],
@@ -120,7 +122,84 @@ Page({
       url: '/pages/company/company',
     })
   },
-
+  /**
+   * @desc : 跳转到功能页面
+   * @author : 于继渤
+   * @date : 2024/1/23 9:16
+   */
+  toApp(e) {
+    let item = e.currentTarget.dataset.item
+    let hasRightFlag = false;
+    let menuUuid = null
+    let menuList = app.globalData.menus
+    if (menuList && menuList.length > 0) {
+      // 查看该功能是否有权限
+      let filters = menuList.filter(it => it.objectCode == item.code);
+      if (filters && filters.length > 0) {
+        menuUuid = filters[0].menuUuid
+        hasRightFlag = true;
+      }
+    }
+    if (!hasRightFlag) {
+      util.showToast('没有该功能权限');
+      return;
+    }
+    // 打开页面
+    if (item.path) {
+      wx.navigateTo({
+        url: item.path,
+        success: function (res) {
+          res.eventChannel.emit('params', { formMode: 'index', menuUuid: menuUuid })
+        }
+      })
+    }
+  },
+  /**
+  * @desc : 查询待入库数据
+  * @author : 周兴
+  * @date : 2024/4/9
+  */
+  getWaitInbound() {
+    let params = {
+      appCode: Constants.APP_CODE,
+    }
+    let service = app.globalData['inboundOtherService']
+    api.request(service.prefix + service.selectWaitInboundCount, 'POST', params).then(res => {
+      if (res.data.code == Constants.SUCESS_CODE) {
+        let waitMenu = this.data.waitMenu;
+        let filters = waitMenu.filter(it=>it.code=='entry-handle')
+        if(filters && filters.length > 0){
+          filters[0].count = res.data.data;
+          this.setData({
+            waitMenu:waitMenu
+          })
+        }
+      }
+    });
+  },
+  /**
+  * @desc : 查询待出库数据
+  * @author : 周兴
+  * @date : 2024/4/9
+  */
+ getWaitOutbound() {
+  let params = {
+    appCode: Constants.APP_CODE,
+  }
+  let service = app.globalData['outboundOtherService']
+  api.request(service.prefix + service.selectWaitOutboundCount, 'POST', params).then(res => {
+    if (res.data.code == Constants.SUCESS_CODE) {
+      let waitMenu = this.data.waitMenu;
+      let filters = waitMenu.filter(it=>it.code=='out-handle')
+      if(filters && filters.length > 0){
+        filters[0].count = res.data.data;
+        this.setData({
+          waitMenu:waitMenu
+        })
+      }
+    }
+  });
+},
   /**
    * @desc : 修改密码跳转
    * @date : 2022/5/12 13:49
@@ -143,23 +222,6 @@ Page({
     })
   },
 
-  /**
-    * @desc : 菜单跳转
-    * @date : 2022/5/12 13:49
-    * @author : 姜永辉
-    */
-  toApp(e) {
-    let _this = this;
-    let url = e.currentTarget.dataset.url
-    if (!url) {
-      wx.showToast({
-        title: '功能开发中',
-        image: '/static/image/warning.png',
-        duration: 2000
-      })
-      return
-    }
-  },
 
   /**
   * @desc : 微信支付-随机生成单号
@@ -448,6 +510,9 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    // 获取待办信息
+    this.getWaitInbound();
+    this.getWaitOutbound();
     //20220820加入和客户列表的权限
     // let customerflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.CUSTOMERS)
     // let orderflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.ORDER_BILLING)

+ 2 - 2
pages/mine/mine.wxml

@@ -45,8 +45,8 @@
 
     <view class="todo-view-title">待办工作</view>
     <view class="todo-view-app">
-      <view class="todo-view-app-item" wx:for="{{waitMenu}}" wx:for-item="item" data-item="{{item}}">
-        <view class="todo-view-app-item-icon" catchtap="toApprove">
+      <view class="todo-view-app-item" wx:for="{{waitMenu}}" wx:for-item="item" data-item="{{item}}" catchtap="toApp">
+        <view class="todo-view-app-item-icon" >
           <!-- 待办角标提醒 -->
           <view class="todo-view-app-item-icon-tip" wx:if="{{item.count}}">{{item.count?item.count:0}}</view>
           <image src="{{imageUrl + item.icon}}" style="width:100%;height:100%;" />

+ 10 - 0
utils/Constants.js

@@ -346,6 +346,16 @@ module.exports = {
   },
 
   /**
+   * @desc   : 明细报表编码
+   * @author : 周兴
+   * @date   : 2024/3/27 10:07
+   */
+  reportCode:{
+    // 销售单明细表
+    orderDetailReport:'order-detail-report'
+  },
+
+  /**
    * @desc   : 数据种类数据
    * @author : 周兴
    * @date   : 2024/3/9 16:17