姜永辉 il y a 2 ans
Parent
commit
be5996605b

+ 1 - 0
api/pages/core/staff.js

@@ -11,6 +11,7 @@ module.exports = {
     staffService: {
         // 前缀
         prefix: 'mdm-server-dkic-b1/core/staff/', 
+        
     },
 
     routeUrl: {

+ 6 - 2
mixins/index.js

@@ -80,7 +80,9 @@ module.exports = {
       //     list:[{name:'t1',label:'t1'},{name:'t2',label:'t2'}],
       //     message:''
       //   }
-      if (res && res.code === Constants.SUCESS_CODE) {
+      console.log('re',res);
+
+      if (res && res.data.code === Constants.SUCESS_CODE) {
         let tableData = this.data.tableData;
         let list = res.data.data.list;
         if (!list || list.length === 0) {
@@ -148,6 +150,7 @@ module.exports = {
     return new Promise(resolve => {
       if (this.getData) {
         let res = this.getData(params);
+        console.log('resf',res);
         resolve(res);
       } else {
         return ({})
@@ -381,6 +384,7 @@ module.exports = {
           }
         })
       }
+      return res;
     }
   },
   /**
@@ -396,7 +400,7 @@ module.exports = {
         service: app.globalData[routeObjName + 'Service']
       })
     }
-    console.log('rrr', routeObjName, this.data.service);
+ 
     this.searchData();
   },
   /**

+ 4 - 48
package-basic-data/pages/test/test.js

@@ -8,8 +8,8 @@
  *		于继渤		        2022-0-12	            1.00		   	    
  *******************************************************************************/
 const Constants = require('@/utils/Constants.js');
-const util = require('../../../utils/util.js')
-const mixins = require('../../../mixins/index.js')
+const util = require('@/utils/util.js')
+const mixins = require('@/mixins/index.js')
 const app = getApp()
 Page({
   mixins: [mixins],
@@ -31,7 +31,7 @@ Page({
     // 列表区(脚部信息)
     footerInfo: [{ name: 'categoryQuantity', title: '品类 共' }, { name: 'tsumQuantity', title: '件' }],
     // 列表区(内容)
-    contentList: [{ name: 'orderNo', title: '订单单号' }, { name: 'customerPhone', title: '客户电话' }, { name: 'addressFull', title: '客户地址' }, { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: '业务员' }], title: '客户地址' }],
+    contentList: [{ name: 'staffCode', title: '员工编码' },  { name: 'staffPhone', title: '员工电话' }, { name: 'orgName', title: '业务部门' }],
 
     contentObj: {
       '成交': [{ name: 'orderNo', title: '订单单号' }, { name: 'customerPhone', title: '客户电话',phone:true }, { name: 'addressFull', title: '客户地址' }, { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: '业务员' }], title: '客户地址' }],
@@ -120,51 +120,7 @@ Page({
       Customer_Receive: true,
       Customer_Add: true
 
-    })
-
-
-
-
-    if (JSON.stringify(options) !== '{}') {
-
-      if (options.frommine) {
-
-        let frommine = JSON.parse(options.frommine)
-        var createtime = this.selectComponent('#createtime');
-        createtime.data.dataDefaultSearch = util.jumpPageDate(frommine.date.value)
-        createtime.data.createTimeType = frommine.date
-
-        let keyType = this.selectComponent('#keyType')
-        let keyTypeList = keyType.data.moreList
-        keyTypeList.forEach(kIt => {
-          if (frommine.keyTypeList) {
-            if (frommine.keyTypeList.some(it => kIt.id === it)) {
-              kIt.infotype = 'info'
-            }
-          }
-        })
-        keyType.setData({
-          moreList: keyTypeList
-        })
-
-        let searchForm = { ...this.data.searchForm }
-        searchForm.keyTypeList = frommine.keyTypeNameList
-
-        this.setData({
-          active: frommine.active,
-          createTimeType: frommine.date,
-          searchForm: searchForm,
-          searchFormNumber: (frommine.keyTypeNameList && frommine.keyTypeNameList.length > 0) ? 1 : null,
-          createTimeSearch: util.jumpPageDate(frommine.date.value),
-          staffIds: frommine.staffId ? [frommine.staffId] : [],
-          staffNames: frommine.staffNames,
-        })
-
-        createtime.init()
-      }
-    } else {
-      // this.searchData()
-    }
+    }) 
   },
   /**
    * 生命周期函数--监听页面显示

+ 5 - 3
package-basic-data/pages/test/test.wxml

@@ -1,6 +1,8 @@
 <!-- 前台导入wxmlUtil.wxs -->
-<wxs src='../../../utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<!-- 加载图层 -->
+<loading wx:if="{{loading}}" ></loading>
+<!-- 粘性布局的查询条件 -->
 <van-sticky scroll-top="0">
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','telephone'])}}">
@@ -11,7 +13,7 @@
 <van-empty wx:if="{{dataList.length<=0}}" description="暂无数据" />
 
 <!-- 列表区 -->
-<dk-list list="{{dataList}}" titleCorner="salesChannelName" title="customerName" status="displayStatus" footerTag="customerForm" collectCol="collectAmount" collectName="收款" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}" contentCol="displayStatus" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
+<dk-list list="{{tableData}}"  title="staffName" status="flgCanLogin" footerTag="customerForm" collectCol="collectAmount" collectName="收款" subTitle="makeTime" content="{{contentList}}"   footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
 
 <van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">到底了~</van-divider>
 <view style="height: 135rpx;"></view>

+ 1 - 1
pages/home-page/home-page.js

@@ -16,7 +16,7 @@ const util = require('@/utils/util.js')
 const mixins = require('@/mixins/index.js')
 
 Page({
-  mixins: [mixins],
+  // mixins: [mixins],
   /**
    * 页面的初始数据
    */

+ 20 - 21
pages/mine/mine.js

@@ -253,7 +253,7 @@ Page({
    */
   getAppCount() {
     let params = {
-      cpId: app.globalData.user.cpId,
+      // cpId: app.globalData.user.cpId,
       userId: app.globalData.user.userId,
     }
     api.request(Constants.BPM_WAITING_FOR_APPRAVAL + 'list_count', 'POST', params).then(res => {
@@ -292,17 +292,17 @@ Page({
    */
   onLoad: function (options) {
     //20220820加入和客户列表的权限
-    let customerflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.CUSTOMERS)
-    let orderflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.ORDER_BILLING)
-    let receivecustomersflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.RECEIVE_CUSTOMERS)
-    let waitApprovalflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.WAITAPPROVAL)
-    let storeManagerFlg = common.hasPageUUidRight(Constants.PAGE_RIGHT.STORE_MANAGER)
+    // let customerflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.CUSTOMERS)
+    // let orderflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.ORDER_BILLING)
+    // let receivecustomersflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.RECEIVE_CUSTOMERS)
+    // let waitApprovalflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.WAITAPPROVAL)
+    // let storeManagerFlg = common.hasPageUUidRight(Constants.PAGE_RIGHT.STORE_MANAGER)
     this.setData({
-      storeManagerFlg,
-      customerflg,
-      orderflg,
-      receivecustomersflg,
-      waitApprovalflg,
+      storeManagerFlg:false,
+      customerflg:false,
+      orderflg:false,
+      receivecustomersflg:false,
+      waitApprovalflg:false,
       version: wx.getAccountInfoSync().miniProgram.version,
     })
     /**
@@ -317,16 +317,16 @@ Page({
         active: storeManagerFlg ? 'store' : 'staff'
       })
     }
-    this.getAppCount()
+    // this.getAppCount()
     /** 获取胶囊信息 */
     this.setData({
       menuBtnInfo: wx.getMenuButtonBoundingClientRect()
     })
 
-    this.getReportData()
+    // this.getReportData()
 
 
-    this.getNoticeCount()
+    // this.getNoticeCount()
   },
 
 
@@ -416,14 +416,13 @@ Page({
   onShow() {
     if (this.data.mineFlag) {
 
-      this.getAppCount()
+      // this.getAppCount()
       /** 获取胶囊信息 */
       this.setData({
         menuBtnInfo: wx.getMenuButtonBoundingClientRect()
       })
-      this.getReportData()
-
-      this.getNoticeCount()
+     
+ 
     }
   },
   /**
@@ -436,13 +435,13 @@ Page({
     that.setData({
       loadingShow: true,
     })
-    this.getAppCount()
+    // this.getAppCount()
     /** 获取胶囊信息 */
     this.setData({
       menuBtnInfo: wx.getMenuButtonBoundingClientRect()
     })
-    this.getReportData()
-    this.getNoticeCount()
+    // this.getReportData()
+    // this.getNoticeCount()
     //隐藏导航条加载动画
     wx.hideNavigationBarLoading();
     setTimeout(function () {