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

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss_wx_app

姜永辉 1 год назад
Родитель
Сommit
dd6d68d11c
69 измененных файлов с 3461 добавлено и 202 удалено
  1. 3 1
      api/pages/report/report.js
  2. 2 1
      app.json
  3. 1 1
      components/dkbase/dk-list/dk-list.wxss
  4. 1 1
      components/dkbase/dk-navbar/dk-navbar.wxml
  5. 1 1
      components/dkbase/dk-popup/dk-popup.wxml
  6. 9 9
      components/dkbase/dk-tree-form/dk-tree-form.wxml
  7. 5 0
      components/dkbusiness/dk-muti-dropdown-item/dk-muti-dropdown-item.js
  8. 1 1
      components/dkbusiness/dk-muti-dropdown-item/dk-muti-dropdown-item.wxml
  9. 1 1
      components/dkbusiness/dk-single-dropdown-item/dk-single-dropdown-item.wxml
  10. 23 2
      mixins/index.js
  11. 1 1
      package-basic-data/pages/basic-data/basic-data.wxml
  12. 0 1
      package-basic-data/pages/basic-data/basic-data.wxss
  13. 222 60
      package-basic-data/pages/beginner-guide/beginner-guide.js
  14. 2 1
      package-basic-data/pages/beginner-guide/beginner-guide.json
  15. 41 2
      package-basic-data/pages/beginner-guide/beginner-guide.wxml
  16. 67 1
      package-basic-data/pages/beginner-guide/beginner-guide.wxss
  17. 1 1
      package-basic-data/pages/customer-list/customer-list.wxml
  18. 11 0
      package-basic-data/pages/customer-list/detail/detail.js
  19. 1 1
      package-basic-data/pages/customer-list/detail/detail.wxml
  20. 1 1
      package-basic-data/pages/product-attribute/product-attribute.wxml
  21. 0 3
      package-basic-data/pages/product-attribute/product-attribute.wxss
  22. 12 0
      package-basic-data/pages/product-file/add/add.js
  23. 1 0
      package-basic-data/pages/product-file/product-file.js
  24. 3 3
      package-basic-data/pages/product-file/product-file.wxml
  25. 0 3
      package-basic-data/pages/product-file/product-file.wxss
  26. 2 2
      package-basic-data/pages/staff/staff.wxml
  27. 1 1
      package-business-analysis/pages/cus-rec-pay-report/cus-rec-pay-report.wxml
  28. 1 1
      package-business-analysis/pages/detail-report/detail-report.wxml
  29. 147 21
      package-business-analysis/pages/echarts-data.js
  30. 282 0
      package-business-analysis/pages/profit-report/echarts-data.js
  31. 235 0
      package-business-analysis/pages/profit-report/org-rank/org-rank.js
  32. 4 0
      package-business-analysis/pages/profit-report/org-rank/org-rank.json
  33. 26 0
      package-business-analysis/pages/profit-report/org-rank/org-rank.wxml
  34. 15 0
      package-business-analysis/pages/profit-report/org-rank/org-rank.wxss
  35. 709 0
      package-business-analysis/pages/profit-report/profit-report.js
  36. 4 0
      package-business-analysis/pages/profit-report/profit-report.json
  37. 177 0
      package-business-analysis/pages/profit-report/profit-report.wxml
  38. 884 0
      package-business-analysis/pages/profit-report/profit-report.wxss
  39. 20 1
      package-inventory/pages/ivt-detail-report/ivt-detail-report.js
  40. 4 23
      package-inventory/pages/ivt-detail-report/ivt-detail-report.wxml
  41. 0 4
      package-inventory/pages/ivt-detail-report/ivt-detail-report.wxss
  42. 1 1
      package-inventory/pages/ivt-sum-report/ivt-sum-report.wxml
  43. 20 1
      package-inventory/pages/ivt-warning-report/ivt-warning-report.js
  44. 4 23
      package-inventory/pages/ivt-warning-report/ivt-warning-report.wxml
  45. 0 8
      package-inventory/pages/ivt-warning-report/ivt-warning-report.wxss
  46. 1 1
      package-inventory/pages/warehousing-processing/warehousing-processing.wxml
  47. 1 1
      package-purchase/pages/supplier-list/supplier-list.wxml
  48. 2 2
      package-sales/pages/customer-collection/customer-collection.wxml
  49. 1 1
      package-sales/pages/order-billing/add/add.js
  50. 2 2
      package-sales/pages/order-billing/add/add.wxml
  51. 1 1
      package-sales/pages/order-billing/order-billing.wxml
  52. 1 1
      package-sales/pages/order-return/order-return.wxml
  53. 1 1
      package-sales/pages/sales-outbound/sales-outbound.wxml
  54. 1 1
      package-sales/pages/sales-tracking-report/sales-tracking-report.wxml
  55. 61 0
      pages/ec-canvas/ec-canvas-new.js
  56. 3 0
      pages/ec-canvas/ec-canvas-new.json
  57. 2 0
      pages/ec-canvas/ec-canvas-new.wxml
  58. 1 0
      pages/ec-canvas/ec-canvas-new.wxss
  59. 250 0
      pages/ec-canvas/ec-canvas.js
  60. 4 0
      pages/ec-canvas/ec-canvas.json
  61. 4 0
      pages/ec-canvas/ec-canvas.wxml
  62. 4 0
      pages/ec-canvas/ec-canvas.wxss
  63. 0 0
      pages/ec-canvas/echarts.min.js
  64. 121 0
      pages/ec-canvas/wx-canvas.js
  65. 28 4
      pages/home-page/home-page.js
  66. 7 4
      pages/home-page/home-page.wxml
  67. 14 0
      pages/home-page/home-page.wxss
  68. 1 1
      pages/index/index.wxss
  69. 4 0
      utils/Constants.js

+ 3 - 1
api/pages/report/report.js

@@ -38,7 +38,9 @@ module.exports = {
     // 客户收款明细表
     getRecPayDetailReport:'get_rec_pay_detail_report',
     // 客户收支表
-    getCusRecPayReportItem:'get_cus_rec_pay_report_item'
+    getCusRecPayReportItem:'get_cus_rec_pay_report_item',
+    // 销售利润
+    getSaleProfit:'get_sale_profit'
   },
   routeUrl: {
     report: {

+ 2 - 1
app.json

@@ -200,7 +200,8 @@
                 "pages/staff-order-rank/staff-order-rank",
                 "pages/staff-repay-rank/staff-repay-rank",
                 "pages/detail-report/detail-report",
-                "pages/cus-rec-pay-report/cus-rec-pay-report"
+                "pages/cus-rec-pay-report/cus-rec-pay-report",
+                "pages/profit-report/profit-report"
             ]
         },
         {

+ 1 - 1
components/dkbase/dk-list/dk-list.wxss

@@ -32,7 +32,7 @@
   background: linear-gradient(95.33deg, #ADC6FF -2.27%, #F0F5FF 60.66%),
     linear-gradient(0deg, #F4F8FF, #F4F8FF),
     radial-gradient(58.28% 235.72% at 10.78% 50%, rgba(191, 213, 255, 0.6) 0%, rgba(216, 229, 255, 0) 56.69%);
-  padding: 20rpx 20rpx;
+  padding: 14rpx 14rpx;
   border-radius: 15rpx 15rpx;
 }
 

+ 1 - 1
components/dkbase/dk-navbar/dk-navbar.wxml

@@ -1,7 +1,7 @@
 <!--components/dkbase/dk-navbar/dk-navbar.wxml-->
 <van-nav-bar
   left-arrow
-  z-index="998"
+  z-index="10000"
   bind:click-left="clickLeft"
   fixed="{{fixed}}"
   custom-style="{{customStyle}}"

+ 1 - 1
components/dkbase/dk-popup/dk-popup.wxml

@@ -79,7 +79,7 @@
       </van-cell>
       <!--数字类--> 
       <dk-number-input wx:if="{{item.type=='number'}}" sign="{{(item.sign || item.sign == '')?item.sign:'¥'}}" digits="{{(item.digits || item.digits == 0)?item.digits:2}}" fontSize="14" left="30rpx" data-key="{{item.code}}" data-item="{{item}}" max="{{(item.max || item.max == '')?item.max:10000000}}" min="{{(item.min || item.min == '')?item.min:-10000000}}"  data-index="{{index}}" center="{{'right'}}" readonly="{{!!readonly || !!item.readonly}}" 
-      placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" contentRight="{{true}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="{{item.inputColor?item.inputColor:'#FF7B1A'}}" titleFontWeight="normal" required="{{item.required?true:false }}" requiredLeft="15rpx" titleColor="#95A8CB" inputValue="{{form[item.code]}}" titleWidth = "174px"bind:triggerBindValue="changeNumberField" bind:triggerBindBlur="blurNumberField"percentSignFlag="{{item.percentSignFlag}}" negative="{{item.negative}}"></dk-number-input>
+      placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" contentRight="{{true}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="{{item.inputColor?item.inputColor:'#FF7B1A'}}" titleFontWeight="normal" required="{{item.required?true:false }}" requiredLeft="15rpx" titleColor="{{item.readonly?'#272829':'#95A8CB'}}" inputValue="{{form[item.code]}}" titleWidth = "174px"bind:triggerBindValue="changeNumberField" bind:triggerBindBlur="blurNumberField"percentSignFlag="{{item.percentSignFlag}}" negative="{{item.negative}}"></dk-number-input>
  
       <!--备注-->
       <van-field wx:if="{{item.type=='textarea'}}" type="textarea" required="{{item.required?true:false }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" value="{{ form[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" readonly="{{!!readonly || !!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:500}}" right-icon="{{item.rightIcon}}" bind:change="changeField" errorMessage="{{item.errMsg}}">

+ 9 - 9
components/dkbase/dk-tree-form/dk-tree-form.wxml

@@ -1,19 +1,19 @@
 <view wx:for="{{tree}}" class="{{!item[parentIdKey]?'Outer-frame':''}}">
     <!-- 列表上半部分 -->
-    <view wx:if="{{!item[parentIdKey]}}" style="display: flex;padding:3vw;background: linear-gradient(to right,#A8D0EF, #DAEFFF);border-radius: 15rpx 15rpx 0 0 ">
-        <view style="display: flex;"data-item="{{item}}" data-type="fa"  bindtap="clickName">
+    <view wx:if="{{!item[parentIdKey]}}" style="display: flex;padding:3vw;background: linear-gradient(95.33deg, #ADC6FF -2.27%, #F0F5FF 60.66%), linear-gradient(0deg, #F4F8FF, #F4F8FF), radial-gradient(58.28% 235.72% at 10.78% 50%, rgba(191, 213, 255, 0.6) 0%, rgba(216, 229, 255, 0) 56.69%);border-radius: 15rpx 15rpx 0 0 ">
+        <view style="display: flex;" data-item="{{item}}" data-type="fa" bindtap="clickName">
 
-            <van-image round width="39rpx" height="39rpx"  src="{{imageUrl + 'org-img.png'}}" />
+            <van-image round width="39rpx" height="39rpx" src="{{imageUrl + 'org-img.png'}}" />
 
-            <view style="margin-left:5vw;font-size: 16px;" >{{item[nameKey]}}</view>
+            <view style="margin-left:5vw;font-size: 16px;">{{item[nameKey]}}</view>
         </view>
         <view style=" text-align: right;position: absolute;right: 40rpx;" data-id="{{item[idKey]}}" data-open="{{item.open}}" bindtap="onchange">
             <van-icon wx:if="{{ item.open }}" color="#bdb7b7" name="arrow-down" />
-            <van-icon wx:else  color="#bdb7b7" name="arrow" />
-           
+            <van-icon wx:else color="#bdb7b7" name="arrow" />
+
         </view>
     </view>
-    <!-- 列表下半部分 --> 
+    <!-- 列表下半部分 -->
     <view class="{{(item.children && item.children.length > 0 && !item[parentIdKey] && item.open)?'list-below-item':''}}">
         <view style="width: 100%;">
             <view wx:if="{{item[parentIdKey]}}" style="display:flex;align-items:center;margin-left:{{item[itemListKey].length !== 0 ? depth*40 : depth*60}}rpx;font-size:15px; " class="list-below-item">
@@ -26,7 +26,7 @@
                 <view wx:if="{{ischekboxFlag}}">
                     <checkbox checked="{{item.selected}}" bindchange="handleCheckboxChange" data-id="{{item.id}}"> </checkbox>
                 </view>
-                <view class="{{item[itemListKey].length !== 0 ?'parent':'node'}} " style="width: 100%;margin-left: 5vw;font-size: 14px;" data-item="{{item}}" data-type="sub"  data-open="{{item.open}}" bindtap="clickName">
+                <view class="{{item[itemListKey].length !== 0 ?'parent':'node'}} " style="width: 100%;margin-left: 5vw;font-size: 14px;" data-item="{{item}}" data-type="sub" data-open="{{item.open}}" bindtap="clickName">
                     <!-- bindtap="onchange" -->
                     {{item[nameKey]}}
 
@@ -46,7 +46,7 @@
             </view>
             <view wx:if="{{item[itemListKey]}}">
                 <view hidden="{{!item.open}}">
-                    <dk-tree-form  bind:clickName="subclickName" treeList="{{item[itemListKey]}}" ischekboxFlag="{{ischekboxFlag}}" isNameImgFlag= "{{isNameImgFlag}}" nameKey="{{nameKey}}" idKey="{{idKey}}" parentIdKey="{{parentIdKey}}" itemListKey="{{itemListKey}}"isLastClickFlag="{{isLastClickFlag}}" id="treeSelect" bind:onclick="click" depth="{{depth+1}}"></dk-tree-form >
+                    <dk-tree-form bind:clickName="subclickName" treeList="{{item[itemListKey]}}" ischekboxFlag="{{ischekboxFlag}}" isNameImgFlag="{{isNameImgFlag}}" nameKey="{{nameKey}}" idKey="{{idKey}}" parentIdKey="{{parentIdKey}}" itemListKey="{{itemListKey}}" isLastClickFlag="{{isLastClickFlag}}" id="treeSelect" bind:onclick="click" depth="{{depth+1}}"></dk-tree-form>
                 </view>
             </view>
         </view>

+ 5 - 0
components/dkbusiness/dk-muti-dropdown-item/dk-muti-dropdown-item.js

@@ -360,6 +360,11 @@ Component({
         DataSourceCode = 'recType'
         name = '收支类型'
       }
+      // 库存
+      if(typeName === 'warehouse'){
+        DataSourceCode = 'warehouse',
+        name = '库存'
+      }
 
       this.setData({
         DataSourceCode: DataSourceCode

+ 1 - 1
components/dkbusiness/dk-muti-dropdown-item/dk-muti-dropdown-item.wxml

@@ -1,6 +1,6 @@
 <wxs src='../../../utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <!-- 弹窗 -->
-<van-popup show="{{show}}" position="right" z-index="9999999" custom-style="overflow-x:hidden;width: 75%;z-index:9999999;height:100%;" bind:close="onClose">
+<van-popup show="{{show}}" position="right" z-index="100" custom-style="overflow-x:hidden;width: 75%;z-index:100;height:100%;" bind:close="onClose">
  
  <van-sticky scroll-top="0" offset-top="{{ navBarHeight }}">
    <view wx:if="{{Top_Height_Flag}}" style="height: 21vw;background: #fff;"></view>

+ 1 - 1
components/dkbusiness/dk-single-dropdown-item/dk-single-dropdown-item.wxml

@@ -1,6 +1,6 @@
 <!-- 弹窗 -->
 
-<van-popup show="{{show}}" position="right" z-index="10000" custom-style="overflow-x:hidden;width: 75%;height:100%;z-index:9999999;" bind:close="onClose">
+<van-popup show="{{show}}" position="right" z-index="100" custom-style="overflow-x:hidden;width: 75%;height:100%;z-index:100;" bind:close="onClose">
   <van-sticky scroll-top="0">
     <van-search custom-class="search-class" shape="round" model:value="{{ condition }}" input-class="background:#c8c8c8;" placeholder="搜索" bind:change="onChange_input" bind:blur="blur_input" />
     <view class="choose_label">

+ 23 - 2
mixins/index.js

@@ -83,7 +83,9 @@ module.exports = {
     // params事件监听,解决重复进入的问题
     paramsInitFlag: true,
     // 自定义导航栏的高度
-    navBarHeight: 0
+    navBarHeight: 0,
+    // 页面头部高度
+    stickyHeight: 0
   },
   /**
    * @desc : 获取路由信息,供data中的对象使用
@@ -1172,6 +1174,12 @@ module.exports = {
             guideUrl: data.guideUrl
           })
         }
+        //是否返回原始页面
+        if (data.formReturnMode) {
+          _this.setData({
+            formReturnMode: data.formReturnMode
+          })
+        }
         if (data.params) {
           _this.setData({
             params: data.params
@@ -1235,7 +1243,7 @@ module.exports = {
         }
         if (data.formMode == Constants.formMode.add) {
           // 加载暂存数据
-          // _this.loadTempData();
+          _this.loadTempData();
         }
       })
       setTimeout(() => {
@@ -1319,5 +1327,18 @@ module.exports = {
     this.setData({
       navBarHeight: detail.height
     })
+  },
+  /**
+   * 获取sticky组件高度
+   * @author: 刘尧
+   */
+  getStickyHeight(e){
+    let that = this
+    let query = wx.createSelectorQuery().in(this);
+    query.select('#sticky').boundingClientRect(function (rect) {
+      that.setData({
+        stickyHeight: rect.height
+      })
+    }).exec()
   }
 };

+ 1 - 1
package-basic-data/pages/basic-data/basic-data.wxml

@@ -1,7 +1,7 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
-<dk-navbar titleFontColor="#000000" navbarTitle="基础资料" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="基础资料" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['dataName','dataCode','remarks'])}}">
   </dk-dropdown-menu>

+ 0 - 1
package-basic-data/pages/basic-data/basic-data.wxss

@@ -5,7 +5,6 @@ page{
   color:#0072ff;
   position: fixed;
   left:20rpx;
-  top: 387.86rpx;
   width:130rpx !important; 
 }
 .sidebar-item{

+ 222 - 60
package-basic-data/pages/beginner-guide/beginner-guide.js

@@ -1,66 +1,228 @@
-// package-basic-data/pages/beginner-guide/beginner-guide.js
+const Constants = require('@/utils/Constants.js');
 Page({
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    stepsText: '录入商品信息是进行店铺管理的第一步,店铺信息的完善是精细化运营的必经之路',
+    steps: [
+      {
+        no: 1,
+        title: '录入资料',
+        status: 1
+      },
+      {
+        no: 2,
+        title: '开单记账',
+        status: 0
+      },
+      {
+        no: 3,
+        title: '分析报表',
+        status: 0
+      },
+    ],
+    stepsItems: [
+      {
+        title: '添加商品',
+        label: '管理你的商品信息',
+        desc: '演示教程'
+      },
+      {
+        title: '添加客户',
+        label: '维护你的客户资料',
+        desc: '演示教程'
+      },
+      {
+        title: '添加供应商',
+        label: '维护你的供应商',
+        desc: ''
+      },
+      {
+        title: '添加营业员',
+        label: '多人看店不忙碌',
+        desc: '演示教程'
+      },
+
+    ]
+  },
+  /**
+   * @desc :顶部步骤点击事件
+   * @date : 2024/6/13 08:49
+   * @author : 于继渤
+   */
+  handleClickStep(e) {
+    let steps = this.data.steps
+    let stepsItems = this.data.stepsItems
+    let stepsText = this.data.stepsText
+    let index = e.currentTarget.dataset.index
+    console.log(e.currentTarget.dataset.index)
+    steps.forEach(res => {
+      res.status = 0
+    })
+    steps[index].status = 1
+    if (steps[index].no == 1) {
+      stepsText = '录入商品信息是进行店铺管理的第一步,店铺信息的完善是精细化运营的必经之路'
+      stepsItems = [
+        {
+          title: '添加商品',
+          label: '管理你的商品信息',
+          desc: '演示教程'
+        },
+        {
+          title: '添加客户',
+          label: '维护你的客户资料',
+          desc: '演示教程'
+        },
+        {
+          title: '添加供应商',
+          label: '维护你的供应商',
+          desc: ''
+        },
+        {
+          title: '添加营业员',
+          label: '多人看店不忙碌',
+          desc: '演示教程'
+        }
+      ]
+
+    } else if (steps[index].no == 2) {
+      stepsText = '记录单据让每笔交易有速可循,告别手工记录,数字化管理店铺'
+      stepsItems = [
+        {
+          title: '销售单',
+          label: '卖一笔记一笔',
+          desc: '演示教程'
+        },
+        {
+          title: '进货单',
+          label: '记录每次进货',
+          desc: '演示教程'
+        },
+        {
+          title: '收款单',
+          label: '不忘每笔应收款',
+          desc: ''
+        },
+        {
+          title: '付款单',
+          label: '记录每笔应付款',
+          desc: ''
+        },
+      ]
+    } else if (steps[index].no == 3) {
+      stepsText = '系统自动生成数据报表,数据辅助决策,助力生意增长'
+      stepsItems = [
+        {
+          title: '利润统计',
+          label: '查看店铺盈利情况',
+          desc: '演示教程'
+        },
+        {
+          title: '销售统计',
+          label: '掌握商品销售排名',
+          desc: ''
+        },
+        {
+          title: '库存统计',
+          label: '库存清晰不错乱',
+          desc: ''
+        }
+      ]
+    }
 
-    },
+    this.setData({
+      steps: steps,
+      stepsItems: stepsItems,
+      stepsText: stepsText
+    })
+  },
+
+
+  /**
+   * @desc :列表点击事件
+   * @date : 2024/6/13 08:49
+   * @author : 于继渤
+   */
+  chickStepsItem(e) {
+    let item = e.currentTarget.dataset.item
+    let url = ''
+    if (item.title == '添加商品') {
+      url = '/package-basic-data/pages/product-file/add/add'
+    }
+    if (item.title == '添加客户') {
+      url = '/package-basic-data/pages/customer-list/add/add'
+    }
+    if (item.title == '添加供应商') {
+      url = '/package-purchase/pages/supplier-list/add/add'
+    }
+    if (item.title == '添加营业员') {
+      url = '/package-basic-data/pages/staff/add/add'
+    }
+    if (item.title == '销售单') {
+      url = '/package-sales/pages/order-billing/add/add'
+    }
+    if (item.title == '进货单') {
+      url = '/package-purchase/pages/purchase-order/add/add'
+    }
+    if (item.title == '收款单') {
+      url = '/'
+    }
+    if (item.title == '付款单') {
+      url = '/'
+    }
+    if (item.title == '利润统计') {
+      url = '/'
+    }
+    if (item.title == '销售统计') {
+      url = '/'
+    }
+    if (item.title == '库存统计') {
+      url = '/'
+    }
+    this.setData({
+      loading: true
+    })
+    let _this = this
+    wx.navigateTo({
+      url: url,
+      events: {
+        bandData: function (e) {
+        }
+      },
+      success: function (res) {
+        res.eventChannel.emit('params', {
+          formMode:  Constants.formMode.add ,
+          formReturnMode: Constants.formReturnMode.beginnerGuide 
+        })
+        setTimeout(() => {
+          _this.setData({
+            loading: false
+          })
+        }, 1000)
+      }
+    })
+  },
+
+  /**
+   * @desc :演示教程
+   * @date : 2024/6/13 08:49
+   * @author : 于继渤
+   */
+  openBeginnerGuide(e) {
+    let item = e.currentTarget.dataset.item
+    console.log('演示教程', item)
+  },
+
+
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
 
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
 
-    }
 })

+ 2 - 1
package-basic-data/pages/beginner-guide/beginner-guide.json

@@ -1,3 +1,4 @@
 {
-    "usingComponents": {}
+    "usingComponents": {},
+    "navigationBarTitleText": "新手引导"
 }

+ 41 - 2
package-basic-data/pages/beginner-guide/beginner-guide.wxml

@@ -1,2 +1,41 @@
-<!--package-basic-data/pages/beginner-guide/beginner-guide.wxml-->
-<text>package-basic-data/pages/beginner-guide/beginner-guide.wxml</text>
+<view class="dk-card-outer-class">
+  <view class="dk-card-class">
+    <view class="steps-container">
+      <view class="steps">
+        <view class="step-line-1"></view>
+        <view wx:for="{{steps}}" wx:key="index" class="step {{item.status}}" data-id="{{index}}">
+
+          <view class="step-icon">
+
+            <view wx:if="{{item.status === 1}}" catch:tap="handleClickStep" data-index="{{index}}" style="display: flex;align-items: center;justify-content:center; width: 60rpx;height: 60rpx; background-color: #1B365D;padding:10rpx;border-radius: 50%;color: white;">{{item.no}}</view>
+            <!-- <view wx:elif="{{item.status === 'completed'}}">2</view> -->
+            <view wx:else catch:tap="handleClickStep" data-index="{{index}}" style="display: flex;align-items: center;justify-content:center; width: 60rpx;height: 60rpx; padding:10rpx;border-radius: 50%;color: #1B365D;background-color: #F8F8F8;">{{item.no}}</view>
+
+
+            <view class="step-line" wx:if="{{index !== steps.length - 1}}"></view>
+          </view>
+          <view class="step-title">{{item.title}}</view>
+        </view>
+        <view class="step-line-2"></view>
+      </view>
+    </view>
+
+
+    <view style="padding:20rpx;padding-left: 30rpx;padding-right: 30rpx; font-size: 26rpx;color: #1B365D;line-height: 40rpx;">{{stepsText}}</view>
+  </view>
+
+</view>
+
+<view class="dk-card-outer-class">
+  <view class="dk-card-class">
+
+    <view wx:for="{{stepsItems}}">
+      <van-cell is-link label="{{item.label}}"  border="{{ false }}" data-item="{{item}}" bind:tap="chickStepsItem">
+        <view slot="title" style="display: flex;font-size: 30rpx;">
+          <view>{{item.title}}</view>
+          <view catch:tap="openBeginnerGuide"  data-item="{{item}}"  style="margin-left: 40rpx;color: #56CBD4;">{{item.desc}}</view>
+        </view>
+      </van-cell>
+    </view>
+  </view>
+</view>

+ 67 - 1
package-basic-data/pages/beginner-guide/beginner-guide.wxss

@@ -1 +1,67 @@
-/* package-basic-data/pages/beginner-guide/beginner-guide.wxss */
+.steps-container {
+  display: flex;
+  /* padding: 0 55rpx; */
+  padding: 10rpx;
+  justify-content: space-between;
+  /* width: 100%; */
+}
+.steps {
+  display: flex;
+  justify-content: space-between;
+  width: 100%;
+  position: relative;
+}
+ 
+.step {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+  flex: 1;
+}
+ 
+.step-icon {
+  width: 44rpx;
+  height: 44rpx;
+  position: relative;
+  margin: 10rpx 60rpx 60rpx 20rpx;
+}
+ 
+.step-title {
+  color: #1B365D;
+  text-align: center;
+  font-size: 30rpx;
+  font-weight: 500;
+  /* line-height: 44rpx; */
+}
+ 
+.step-title image {
+  width: 44rpx;
+  height: 44rpx;
+}
+ 
+.step-line {
+  width: 150rpx;
+  height: 2rpx;
+  background-color: #ccc;
+  position: absolute;
+  left: 80rpx;
+  top: 40rpx;
+}
+.step-line-1 {
+  width: 55rpx;
+  height: 2rpx;
+  background-color: #ccc;
+  position: absolute;
+  left: 20rpx;
+  /* z-index: 99; */
+  top: 50rpx;
+}
+.step-line-2 {
+  width: 55rpx;
+  height: 2rpx;
+  background-color: #ccc;
+  position: absolute;
+  right: 20rpx;
+  /* z-index: 99; */
+  top: 50rpx;
+}

+ 1 - 1
package-basic-data/pages/customer-list/customer-list.wxml

@@ -1,8 +1,8 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
-<dk-navbar titleFontColor="#000000" navbarTitle="客户列表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="客户列表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['cusName','cusPhone','adddressFull','remarks'])}}">
   </dk-dropdown-menu>

+ 11 - 0
package-basic-data/pages/customer-list/detail/detail.js

@@ -61,6 +61,17 @@ Page({
       })
     }
   },
+    /**
+    * @desc   : 打电话
+    * @author : 周兴
+    * @date   : 2024/2/19 11:46
+    */
+   openTelPhone(e) { 
+    let item = e.currentTarget.dataset.item; 
+    wx.makePhoneCall({
+      phoneNumber: item.cusPhone,
+    })
+  },
   /**
    * @desc : 收款单保存后重新刷新数据
    * @date : 2024/5/24 15:49

+ 1 - 1
package-basic-data/pages/customer-list/detail/detail.wxml

@@ -20,7 +20,7 @@
     <view>
       <image class="scan-image-icon" fit="fill" src="{{imageUrl+'/customer_detail_02.png'}}"></image>
     </view>
-    <view style="padding-left: 10rpx;">
+    <view style="padding-left: 10rpx;"catchtap="openTelPhone"data-item="{{item}}">
       {{item.cusPhone}}
     </view>
   </view>

+ 1 - 1
package-basic-data/pages/product-attribute/product-attribute.wxml

@@ -1,7 +1,7 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<dk-navbar titleFontColor="#000000" navbarTitle="商品属性" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
 <!-- 顶部信息 -->
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="商品属性" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['attributeName'])}}">
   </dk-dropdown-menu>

+ 0 - 3
package-basic-data/pages/product-attribute/product-attribute.wxss

@@ -5,10 +5,7 @@ page{
   color:#0072ff;
   position: fixed;
   left:20rpx;
-  /* top: 196rpx; */
-  top: 387.86rpx;
   width:130rpx !important;
-  
 }
 .sidebar-item{
   padding: 30rpx 25rpx 20rpx 35rpx !important;

+ 12 - 0
package-basic-data/pages/product-file/add/add.js

@@ -949,6 +949,18 @@ Page({
         });
       }, 200)
     }
+    //新手引导过来,需要返回
+    if (this.data.formReturnMode == Constants.formReturnMode.beginnerGuide) {
+      const eventChannel = this.getOpenerEventChannel();
+      eventChannel.emit('refresh', {
+        id: 1
+      })
+      setTimeout(() => {
+        wx.navigateBack({
+          delta: 1
+        });
+      }, 200)
+    }
   },
   /**
    * @desc : 页面加载数据方法

+ 1 - 0
package-basic-data/pages/product-file/product-file.js

@@ -164,6 +164,7 @@ Page({
   },
   onLoad(){
     let _this = this;
+    this.getStickyHeight()
     wx.getSystemInfo({
       success: function (res) {
         _this.setData({

+ 3 - 3
package-basic-data/pages/product-file/product-file.wxml

@@ -1,7 +1,7 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
-<dk-navbar titleFontColor="#000000" navbarTitle="商品档案" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
-<van-sticky scroll-top="0">
+<van-sticky scroll-top="0" id="sticky">
+  <dk-navbar titleFontColor="#000000" navbarTitle="商品档案" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel'])}}">
   </dk-dropdown-menu>
@@ -10,7 +10,7 @@
 <view style="display: flex;">
   <!-- 左侧菜单列表 -->
   <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class">
-    <view style="height:calc({{windowHeight+'px'}} - {{'390rpx'}});overflow: scroll;margin-top: 2vw;">
+    <view style="height:calc({{windowHeight+'px'}} - {{'390rpx'}});overflow: scroll;">
       <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.brandName}}" data-id="{{item.brandId}}" wx:for="{{sidebarList}}" />
     </view>
   </van-sidebar>

+ 0 - 3
package-basic-data/pages/product-file/product-file.wxss

@@ -5,10 +5,7 @@ page{
   color:#0072ff;
   position: fixed;
   left:20rpx;
-  /* top: 196rpx; */
-  top: 387.86rpx;
   width:130rpx !important;
-  
 }
 .sidebar-item{
   padding: 30rpx 25rpx 20rpx 35rpx !important;

+ 2 - 2
package-basic-data/pages/staff/staff.wxml

@@ -2,16 +2,16 @@
 
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <van-dialog id="van-dialog" />
-<dk-navbar titleFontColor="#000000" navbarTitle="员工列表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
 <!-- 加载图层 -->
 <loading wx:if="{{loading}}"></loading>
 <!-- 粘性布局的查询条件 -->
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="员工列表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['staffName','telephone'])}}">
   </dk-dropdown-menu>
+  <dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
 </van-sticky>
-<dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
 <!-- 暂无数据 -->
 <van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
 <!-- 列表区 -->

+ 1 - 1
package-business-analysis/pages/cus-rec-pay-report/cus-rec-pay-report.wxml

@@ -1,6 +1,6 @@
 <view>
-  <dk-navbar titleFontColor="#000000" navbarTitle="客户收支表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
   <van-sticky scroll-top="0">
+    <dk-navbar titleFontColor="#000000" navbarTitle="客户收支表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
     <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{placeholder}}"></dk-dropdown-menu>
   </van-sticky>
   <view class="content">

+ 1 - 1
package-business-analysis/pages/detail-report/detail-report.wxml

@@ -1,7 +1,7 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <loading wx:if="{{loading}}"></loading>
-<dk-navbar titleFontColor="#000000" navbarTitle="{{titleText}}" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
 <van-sticky scroll-top="0" wx:if="{{loadFlag}}">
+  <dk-navbar titleFontColor="#000000" navbarTitle="{{titleText}}" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight" bind:getNavbarHeight="getNavbarHeight"/>
 	<!-- 查询条件 -->
 	<dk-dropdown-menu  model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{placeholder}}">
 	</dk-dropdown-menu>

+ 147 - 21
package-business-analysis/pages/echarts-data.js

@@ -16,44 +16,77 @@ const option1 = {
     width: '74%',
     y: '-7%',
   },
-  xAxis: {
-    offset: 5,
+  xAxis: [
+    {
+      offset: 5,
+      axisTick: {
+        show: false,
+      },
+      axisLine: {
+        onZero: false,
+        lineStyle: {
+          color: '#E9F0FE',
+          width: 2
+        },
+      },
+      axisLabel:{textStyle: { fontSize: 8, color: '#95A8CB' }},
+      type: 'category',
+      data: [],
+    }
+  ],
+  yAxis: [{
+    type: 'value',
     axisTick: {
       show: false,
     },
     axisLine: {
-      onZero: false,
+      show: true,
+    },
+    axisLabel: {
+      show: true,
+    },
+    splitLine: {
       lineStyle: {
-        color: '#E9F0FE',
-        width: 2
-      },
+        type: 'dashed',
+        color: '#41bc95',
+        opacity: 0.37
+      }
     },
-    axisLabel:{textStyle: { fontSize: 8, color: '#95A8CB' }},
-    type: 'category',
-    data: [],
+    min: 0,
+    splitNumber: 3
   },
-  yAxis: {
+  {
+    type: 'value',
     axisTick: {
       show: false,
     },
     axisLine: {
-      show: false,
+      show: true,
     },
     axisLabel: {
-      show: false,
+      show: true,
     },
     splitLine: {
       lineStyle: {
         type: 'dashed',
-        color: '#95A8CB',
+        color: '#41bc95',
         opacity: 0.37
       }
     },
     min: 0,
     splitNumber: 3
   },
+],
   series: [
     {
+      name: '销售毛利',
+      barMinHeight:5,
+      barWidth: '20px',
+      data: [],
+      type: 'bar'
+    },
+    {
+      name: '销售毛利率',
       barMinHeight:5,
       barWidth: '20px',
       data: [],
@@ -307,7 +340,7 @@ const option3 = {
     {
       showBackground: true,
       backgroundStyle: {
-        color: '#F8F9FD',
+        color: '#85a0f8',
         barBorderRadius: 6,
       },
       barWidth: '6px',
@@ -341,26 +374,119 @@ const getWAmount = (number)=>{
 
 const getOpData = (data,labelKey,valueKey,optionType)=>{
   let options;
+
+  //简化为万元 改为10000 不简化为1
+  let divisor = 1
+
   /* 1:正常的纵向 2:横向标题在左 3:横向标题在上*/
   if(optionType === 1){
-    options = {...option1}
-    options.xAxis.data = data.map(it=>it[labelKey].length>2?(it[labelKey].substring(0,2)+'\n'+it[labelKey].substring(2,4)):it[labelKey])
-    options.series[0].data = data.map((it,index)=>{return {value:getWAmount(it[valueKey]/10000),itemStyle: {color: option1BarColor[index],barBorderRadius: 1}}})
+    // options = {...option1}
+    options = {
+      tooltip: {
+        trigger: 'axis',
+        axisPointer: {
+          type: 'cross',
+          crossStyle: {
+            color: '#999'
+          }
+        }
+      },
+      grid: {
+        left: '15%',
+        width: '70%',
+        // y: '-7%',
+      },
+      legend: {
+        data: ['销售毛利', '销售毛利率'],
+        left: '0%',
+        // top: '1%'
+      },
+      xAxis: [
+        {
+          type: 'category',
+          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+          axisPointer: {
+            type: 'shadow'
+          }
+        }
+      ],
+      yAxis: [
+        {
+          type: 'value',
+          name: '销售毛利',
+    
+          // interval: 50,
+          axisLabel: {
+            formatter: '¥{value}'
+          }
+        },
+        {
+          type: 'value',
+          name: '销售毛利率',
+          // min: 0,
+          // max: 100,
+          // min: 0,
+          // max: 25,
+          // interval: 5,
+          axisLabel: {
+            formatter: '{value}%'
+          }
+        }
+      ],
+      series: [
+        {
+          name: '销售毛利',
+          type: 'bar',
+          color: '#41be92',
+          tooltip: {
+            // valueFormatter: function (value) {
+            //   return value + ' ml';
+            // }
+          },
+          data: [
+            2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
+          ]
+        },
+        {
+          name: '销售毛利率',
+          type: 'line',
+          color: '#efc25b',
+          yAxisIndex: 1,
+          tooltip: {
+            // valueFormatter: function (value) {
+            //   return value + ' ml';
+            // }
+          },
+          data: [
+            2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
+          ]
+        }
+      ]
+    };
+    // options.xAxis.data = data.map(it=>it[labelKey].length>2?(it[labelKey].substring(0,2)+'\n'+it[labelKey].substring(2,4)):it[labelKey])
+    options.xAxis[0].data = data.map(it=>it[labelKey])
+    // options.yAxis[0].data = data.map(it=>getWAmount(it[valueKey]/divisor))
+    // options.yAxis[1].data = data.map(it=>it.profitRate)
 
+    // options.yAxis[0].data = data.map(it=>getWAmount(it[valueKey]/divisor))
+    // options.series[0].data = data.map((it,index)=>{return {value:getWAmount(it.profit/divisor),itemStyle: {color: option1BarColor[index],barBorderRadius: 1}}})
+    options.series[0].data = data.map(it=>it.profit)
+    options.series[1].data = data.map(it=>it.profitRate)
+console.log('options',options)
     return options;
   }
   if(optionType === 2){
     options = {...option2} /** 业务员姓名太长 type2也用type3的展现形式 单独换下颜色*/
     options.yAxis[0].data = data.map(it=>it[labelKey])
-    options.yAxis[1].data = data.map(it=>getWAmount(it[valueKey]/10000))
-    options.series[0].data = data.map(it=>getWAmount(it[valueKey]/10000))
+    options.yAxis[1].data = data.map(it=>getWAmount(it[valueKey]/divisor))
+    options.series[0].data = data.map(it=>getWAmount(it[valueKey]/divisor))
     return options
   }
   if(optionType === 3){
     options = {...option3}
     options.yAxis[0].data = data.map(it=>it[labelKey])
-    options.yAxis[1].data = data.map(it=>getWAmount(it[valueKey]/10000))
-    options.series[0].data = data.map(it=>getWAmount(it[valueKey]/10000))
+    options.yAxis[1].data = data.map(it=>getWAmount(it[valueKey]/divisor))
+    options.series[0].data = data.map(it=>getWAmount(it[valueKey]/divisor))
     return options
   }
 }

+ 282 - 0
package-business-analysis/pages/profit-report/echarts-data.js

@@ -0,0 +1,282 @@
+const option1BarColor = ['#95A8CB','#77C5D5','#9BCBEB','#9FAEE5','#DEC9A3','#D59696','#D7ABD5','#BCC1CA'];
+
+const option1 = {
+  tooltip: {
+    trigger: 'item',
+    position: 'inside',
+    padding: [0, 2],
+    formatter: (a) => { return a.name.replaceAll('\n', '') + ':' + a.value },
+    textStyle: {
+      color: '#95A8CB'
+    }
+  },
+  grid: {
+    left: '13%',
+    height: '79%',
+    width: '74%',
+    y: '-7%',
+  },
+  xAxis: {
+    offset: 5,
+    axisTick: {
+      show: false,
+    },
+    axisLine: {
+      onZero: false,
+      lineStyle: {
+        color: '#E9F0FE',
+        width: 2
+      },
+    },
+    axisLabel:{textStyle: { fontSize: 8, color: '#95A8CB' }},
+    type: 'category',
+    data: [],
+  },
+  yAxis: {
+    axisTick: {
+      show: false,
+    },
+    axisLine: {
+      show: false,
+    },
+    axisLabel: {
+      show: false,
+    },
+    splitLine: {
+      lineStyle: {
+        type: 'dashed',
+        color: '#95A8CB',
+        opacity: 0.37
+      }
+    },
+    min: 0,
+    splitNumber: 3
+  },
+  series: [
+    {
+      barMinHeight:5,
+      barWidth: '20px',
+      data: [],
+      type: 'bar'
+    }
+  ]
+};
+  
+const option2 = {
+  grid: {
+    left: '6%',
+    top: '4%',
+    height: '90%',
+    width: '70%',
+    y: '-7%',
+  },
+  xAxis: {
+    axisTick: {
+      show: false,
+    },
+    axisLine: {
+      show: false,
+    },
+    axisLabel: {
+      show: false,
+    },
+    splitLine: {
+      show: false
+    }
+  },
+  yAxis: [
+    {
+      type: 'category',
+      inverse:true,
+      axisLabel: {
+        verticalAlign: "bottom",
+        align: "left",
+        padding: [0, 20, 8, 10],
+        textStyle: {
+          fontSize: 10,
+          color: "#1B365D",
+        }
+      },
+      data: [],
+      yAxisIndex: 0,
+      axisTick: {
+        show: false,
+      },
+      axisLine: {
+        show: false,
+      },
+    },
+    {
+      type: 'category',
+      inverse: true,
+      axisTick: 'none',
+      axisLine: 'none',
+      show: true,
+      axisLabel: {
+        textStyle: {
+          color: '#95A8CB',
+          fontSize: '10'
+        },
+        formatter: (value) => {
+          return '¥ '+value;
+        },
+      },
+      data:[]
+    },
+  ],
+  series: [
+    {
+      showBackground: true,
+      backgroundStyle: {
+        color: '#F8F9FD',
+        barBorderRadius: 6,
+      },
+      barWidth: '6px',
+      itemStyle: {
+        color: {
+          type: 'linear',
+          x: 0,
+          y: 0,
+          x2: 1,
+          y2: 1,
+          colorStops: [{
+            offset: 0, color: '#FFC259' 
+          }, {
+            offset: 1, color: '#FFE3AF'
+          }],
+          global: false 
+        },
+        barBorderRadius: 8,
+      },
+      data: [],
+      type: 'bar'
+    }
+  ]
+};
+
+const option3 = {
+  grid: {
+    left: '6%',
+    top: '4%',
+    height: '90%',
+    width: '70%',
+    y: '-7%',
+  },
+  xAxis: {
+    axisTick: {
+      show: false,
+    },
+    axisLine: {
+      show: false,
+    },
+    axisLabel: {
+      show: false,
+    },
+    splitLine: {
+      show: false
+    }
+  },
+  yAxis: [
+    {
+      type: 'category',
+      inverse:true,
+      axisLabel: {
+        verticalAlign: "bottom",
+        align: "left",
+        padding: [0, 20, 8, 10],
+        textStyle: {
+          fontSize: 10,
+          color: "#1B365D",
+        }
+      },
+      data: [],
+      yAxisIndex: 0,
+      axisTick: {
+        show: false,
+      },
+      axisLine: {
+        show: false,
+      },
+    },
+    {
+      type: 'category',
+      inverse: true,
+      axisTick: 'none',
+      axisLine: 'none',
+      show: true,
+      axisLabel: {
+        textStyle: {
+          color: '#95A8CB',
+          fontSize: '10'
+        },
+        formatter: (value) => {
+          return '¥ '+value;
+        },
+      },
+      data:[]
+    },
+  ],
+  series: [
+    {
+      showBackground: true,
+      backgroundStyle: {
+        color: '#F8F9FD',
+        barBorderRadius: 6,
+      },
+      barWidth: '6px',
+      itemStyle: {
+        color: {
+          type: 'linear',
+          x: 0,
+          y: 0,
+          x2: 1,
+          y2: 1,
+          colorStops: [{
+            offset: 0, color: '#11B7C6'
+          }, {
+            offset: 1, color: '#73D5E2'
+          }],
+          global: false 
+        },
+        barBorderRadius: 8,
+      },
+      data: [],
+      type: 'bar'
+    }
+  ]
+};
+
+const getWAmount = (number)=>{
+	  number =	number.toFixed(2);
+    var arr = number.split('.')
+		return parseInt(arr[0]).toLocaleString()+'.'+arr[1]
+}
+
+const getOpData = (data,labelKey,valueKey,optionType)=>{
+  let options;
+  /* 1:正常的纵向 2:横向标题在左 3:横向标题在上*/
+  if(optionType === 1){
+    options = {...option1}
+    options.xAxis.data = data.map(it=>it[labelKey].length>2?(it[labelKey].substring(0,2)+'\n'+it[labelKey].substring(2,4)):it[labelKey])
+    options.series[0].data = data.map((it,index)=>{return {value:getWAmount(it[valueKey]/10000),itemStyle: {color: option1BarColor[index],barBorderRadius: 1}}})
+    return options;
+  }
+  if(optionType === 2){
+    options = {...option2} /** 业务员姓名太长 type2也用type3的展现形式 单独换下颜色*/
+    options.yAxis[0].data = data.map(it=>it[labelKey])
+    options.yAxis[1].data = data.map(it=>getWAmount(it[valueKey]/10000))
+    options.series[0].data = data.map(it=>getWAmount(it[valueKey]/10000))
+    return options
+  }
+  if(optionType === 3){
+    options = {...option3}
+    options.yAxis[0].data = data.map(it=>it[labelKey])
+    options.yAxis[1].data = data.map(it=>getWAmount(it[valueKey]/10000))
+    options.series[0].data = data.map(it=>getWAmount(it[valueKey]/10000))
+    return options
+  }
+}
+
+module.exports = {getOpData};
+
+

+ 235 - 0
package-business-analysis/pages/profit-report/org-rank/org-rank.js

@@ -0,0 +1,235 @@
+// package5/pages/report/detail/detail.js
+
+const api = require('../../../../utils/api.js');
+const util = require('../../../../utils/util.js')
+const app = getApp()
+const Constants = require('../../../../utils/Constants.js');
+
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    active: 0,
+    createTimeType: {
+      "text": "本月",
+      "value": 3
+    },
+    month: [
+      "2024-02-01",
+      "2024-02-29"
+    ],
+    monthFlag: false,
+    monthName: "2024年2月",
+    monthOnChoose: 1706749526365,
+    option1: [
+      {
+        "text": "本日",
+        "value": 1
+      },
+      {
+        "text": "本周",
+        "value": 2
+      },
+      {
+        "text": "本月",
+        "value": 3
+      },
+      {
+        "text": "本年",
+        "value": 5
+      },
+      {
+        "text": "自定义",
+        "value": 0
+      }
+    ],
+    orgFlag: false,
+    orgIds: [],
+    orgNames: null,
+    tab1Columns: [
+      {
+        "name": "orgName",
+        "title": "门店名称",
+        "width": "35%"
+      },
+      {
+        "name": "orderAmount",
+        "title": "成交金额(万)",
+        "type": "amount",
+        "width": "25%"
+      },
+      {
+        "ifNull": "-",
+        "name": "kpiOrderAmount",
+        "title": "任务目标(万)",
+        "type": "amount",
+        "width": "20%"
+      },
+      {
+        "after": "%",
+        "name": "kpiOrderRate",
+        "title": "完成率",
+        "width": "20%"
+      }
+    ],
+    tab1TableData: [],
+    tab1TopData: [
+      {
+        "title": "成交额(总额:万)",
+        "type": "amount",
+        "value": "0.00"
+      },
+      {
+        "title": "成交额(均值:万)",
+        "type": "amount",
+        "value": "0.00"
+      }
+    ],
+    tab2TableData: [],
+    value1: 3, 
+  },
+
+  dateClick(e){
+    if(e.detail === 0){
+      this.selectComponent("#month-components").toggle(true)  
+      this.dropdowncommit({currentTarget:{dataset:{type:'month'}}})
+    }else{
+      this.getReportData()
+    }
+  },
+  onConfirmChooseDate(e) {
+    this.setData({
+      month: this.data.monthOnChoose,
+      monthName: this.formatDate(this.data.monthOnChoose)
+    })
+    this.setData({
+      monthFlag: false
+    })
+    let option1 = this.data.option1
+    option1[option1.length-1].text = this.data.monthName
+    this.setData({
+      option1: option1
+    })
+    this.selectComponent("#month-components").toggle(false)
+    this.getReportData()
+  },
+
+  onCloseChooseDate(e) {
+    this.setData({
+      // monthOnChoose: this.data.month
+      value1: 3,
+
+    })
+    this.setData({
+      monthFlag: false
+    })
+    this.selectComponent("#month-components").toggle()
+    this.getReportData()
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) { },
+
+
+  /** 查询页面展示的所有 */
+  getReportData() {
+    let params = {
+      tab1:  Object.assign(this.getBeginDateAndEndDate(this.data.month),{ userId:app.globalData.user.userId,monthDate: util.formatDayTimeMoth(new Date(this.data.month)),type: 'f_report_s001_index_org_order', cpId: app.globalData.user.ascpId, orgIds: this.data.orgIds ,dateType:this.data.value1}),
+    };
+    api.request(Constants.WX_REPORT + 'select_report_batch', 'POST', params).then(res => {
+      if (res.data.code === 200) {
+        this.setData({
+          tab1TopData: [{ title: '成交额(总额:万)', type: 'amount', value: util.parseFloatFixed2(res.data.data.tab1.sumAmount/10000) },{ title: '成交额(均值:万)', type: 'amount', value: util.parseFloatFixed2(res.data.data.tab1.avgAmount/10000) }],
+          tab1TableData: util.calc10000(res.data.data.tab1.items,['kpiOrderAmount','orderAmount'])
+        })
+      } else {
+        console.error("获取报表失败", res)
+      }
+    })
+  },
+     /**
+   * @desc : 日期组件后的回调
+   * @author : 于继渤
+   * @date : 2022/5/24 12:16
+   */
+  dateCommit(e) {
+    let dateType = e.detail.dateType
+    if (dateType === 'accountdate') {
+      if(e.detail.dateDefault.text === '自定义'){
+        this.setData({
+          value1: 0,
+        })
+      }
+      if(e.detail.dateDefault.text === '本月'){
+        this.setData({
+          value1: 3,
+        })
+      }
+      let data = e.detail.date
+      console.log(e)
+      this.setData({
+        month: data,
+        createTimeType: e.detail.dateDefault
+      })
+      this.selectComponent('#create-time-type').toggle();
+    }
+     this.getReportData()
+  },
+  //#region 基础内容
+  /** 根据月份查出第一天和最后一天 参数是时间戳*/
+  getBeginDateAndEndDate(timestamp) {
+    let month = this.data.month
+    let monthStart = month[0] ? month[0] : ''
+    let monthEnd = month[1] ? month[1] : ''
+    if (month && month[0] && (month[0].indexOf('/') != -1)) {
+      monthStart = month[0].replaceAll('/', '-')
+    }
+    if (month && month[1] && (month[1].indexOf('/') != -1)) {
+      monthEnd = month[1].replaceAll('/', '-')
+    }
+    return { beginDate: monthStart, endDate: monthEnd }
+  },
+  formatDate(value) {
+    var time = new Date(value);
+    var year = time.getFullYear();
+    var month = time.getMonth() + 1;
+    return year + "年" + month + "月"
+  },
+  onInput(e) {
+    this.setData({
+      monthOnChoose: e.detail
+    })
+  },
+
+
+  dropdowncommit(e) {
+    this.setData({
+      [e.currentTarget.dataset.type + 'Flag']: true
+    })
+  },
+
+  /** 下拉多选关闭 */
+  muticloseAll(e) {
+    this.setData({
+      orgFlag: false
+    })
+    this.selectComponent("#org-components").toggle()
+  },
+
+  /** 下拉多选确定 */
+  mutiSearchAll(e) {
+    this.setData({
+      orgIds: e.detail.idList,
+      orgNames: e.detail.names,
+      orgFlag: false
+    })
+    this.selectComponent("#org-components").toggle(false)
+    this.getReportData()
+  },
+  //#endregion
+})

+ 4 - 0
package-business-analysis/pages/profit-report/org-rank/org-rank.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "部门成交额排行"
+  }

+ 26 - 0
package-business-analysis/pages/profit-report/org-rank/org-rank.wxml

@@ -0,0 +1,26 @@
+<view>
+  <!-- 顶部筛选条件 -->
+<van-dropdown-menu>
+  <van-dropdown-item id="create-time-type" title="{{createTimeType.text}}">
+    <dk-dropdown-date id="month-components"  dateType="accountdate" blankFlag="{{false}}" dateDefault='{{createTimeType}}' defaultValue='{{createTimeType.value}}' bind:dateCommit='dateCommit'></dk-dropdown-date>
+  </van-dropdown-item>
+  <van-dropdown-item id="org-components" title="{{orgNames?orgNames:'全部门店' }}" data-type="org" bind:open="dropdowncommit">
+  </van-dropdown-item>
+</van-dropdown-menu>
+
+  <view style="width: calc(100% - 68rpx);padding: 40rpx 34rpx;">
+    <dk-table columns="{{tab1Columns}}" table-data="{{tab1TableData}}" top-data="{{tab1TopData}}" />
+  </view>
+</view>
+
+<!-- 选门店 -->
+<dk-muti-dropdown-item show="{{orgFlag}}" docName="客户资料" id='org' typeName='org' bind:muticommit='mutiSearchAll' bind:muticlose='muticloseAll'></dk-muti-dropdown-item>
+
+<!-- 选时间 -->
+<van-popup position="bottom" show="{{ monthFlag }}" bind:close="onCloseChooseDate" class="popup" style="width:100%" custom-style="border-radius:15rpx;">
+  <view style="display:flex;justify-content: space-around;height:80rpx;">
+    <view style="width:45%;text-align: left;color:#b6b6b6;line-height:80rpx;" catchtap="onCloseChooseDate">取消</view>
+    <view style="width:45%;text-align: right;color:#00A7B5;line-height:80rpx;" catchtap="onConfirmChooseDate">确定</view>
+  </view>
+  <van-datetime-picker type="year-month" value="{{ monthOnChoose }}" bind:input="onInput" show-toolbar="{{false}}" formatter="{{formatter}}" />
+</van-popup>

+ 15 - 0
package-business-analysis/pages/profit-report/org-rank/org-rank.wxss

@@ -0,0 +1,15 @@
+/* package5/pages/report/detail/detail.wxss */
+page{
+    background: #f8f9fd;
+  }
+  
+  .tab-class{
+    color:  #95A8CB;
+    font-family: 'PingFang SC';
+    font-style: normal;
+    font-weight: 500;
+    font-size: 14px;
+  }
+  .tab-active-class{
+    color: #00A7B5 !important;
+  }

+ 709 - 0
package-business-analysis/pages/profit-report/profit-report.js

@@ -0,0 +1,709 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:授权登录
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		于继渤		  2022-04-25	  1.00		   	首页
+ *******************************************************************************/
+import * as echarts from '../../../pages/ec-canvas/echarts.min';
+import { getOpData } from '../echarts-data.js'
+const app = getApp()
+const api = require('../../../utils/api.js');
+const config = require('../../../config/config.js');
+const Constants = require('../../../utils/Constants.js');
+const common = require('../../../utils/common');
+const chooseGoodsCommon = require('../../../utils/chooseGoodsCommon.js');
+const util = require('../../../utils/util.js')
+const mixins = require('@/mixins/index.js')
+
+Page({
+  mixins: [mixins],
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    service: app.globalData['reportService'],
+    // 查询条件
+    searchContent: [{
+      code: 'makeTime',
+      title: mixins.$t('currentMonth'),
+      defaultValue: 3,
+      searchType: Constants.searchType.date
+    }],
+    menuBtnInfo: null,
+
+    skuloading: false,
+
+    statusItem: { text: '张三', value: "0" },
+
+    statusItem1: { text: '佛山居然店', value: "0" },
+
+    //用户信息
+    userInfo: {},
+
+    functionItem: {
+      text: '功能分区'
+    },
+    functionRegion: [{ text: '常用功能', checked: true }, { text: '待办工作', checked: true }],
+    functionRegions: [' ', '待办工作'],
+
+    //功能分类
+    regions: [{
+      FunctionName: ' ',
+      FunctionCodeOrder: '01'
+    },
+
+    ],
+
+    functionItems: [],
+    functionItems_two: [],
+    accountTimeType: {
+      text: '本日',
+      value: 3
+    },
+    createTimeType: {
+      text: '本月',
+      value: 3
+    },
+    loading: false,
+    pageInfo: {
+      pageSize: 8,
+      currentPage: 1,
+      lastPage: 0,
+    },
+    promotionList_left: [],
+    promotionList_right: [],
+    windowHeight: 0,
+    choosedGoodsList: [],
+
+    currentDate: new Date().getTime() + 100,
+
+    //报表
+
+    lastDate: { text: '本月', value: 3 },
+    option1: [
+      { text: '本日', value: 1 },
+      { text: '本周', value: 2 },
+      { text: '本月', value: 3 },
+      // { text: '本季', value: 4 },
+      { text: '本年', value: 5 },
+      { text: '自定义', value: 0 },
+
+    ],
+    value1: 3,
+
+    orderAnalysis: {},
+    repayAnalysis: {},
+    csmAnalysisHome: {},
+
+    /** 报表数据 */
+
+    ec: {},
+    monthName: util.formatDayYm(new Date()),
+    monthFlag: false,
+    month: new Date().getTime(),
+    monthOnChoose: new Date().getTime(),
+    orgFlag: false,
+    orgIds: [],
+    orgNames: null,
+    formatter(type, value) {
+      if (type === 'year') {
+        return `${value}年`;
+      }
+      if (type === 'month') {
+        return `${value}月`;
+      }
+      if (type === 'day') {
+        return `${value}日`;
+      }
+      if (type === 'hour') {
+        return `${value}时`;
+      }
+      if (type === 'minute') {
+        return `${value}分`;
+      }
+      return value;
+    },
+  },
+  // 设置
+  onClickSet() {
+    wx.navigateTo({
+      url: './home-page-setting'
+    })
+  },
+  // 去公告页
+  toNotice() {
+    wx.navigateTo({
+      url: '/package2/pages/notice/notice'
+    })
+  },
+
+
+
+  /**
+    * 选择下拉后查询
+    */
+  dropdowncommit(e) {
+    this.setData({
+      functionRegions: e.detail.dataList
+    })
+    this.selectComponent('#functionItem').toggle();
+  },
+
+  /**
+  * @desc : 非标商品选择事件
+  * @author : 于继渤
+  * @date : 2022/8/24 13:16
+  */
+  nonGlassSpuItemsTap(e) {
+    chooseGoodsCommon.nonGlassSpuItemsTap(e, this)
+  },
+
+  /**
+* @desc : 切换sku商品规格
+* @author : 周兴
+* @date : 2022/6/1 10:16
+*/
+  changeSkuSpecs(e) {
+    chooseGoodsCommon.changeSkuSpecsCommon(e, this);
+  },
+
+  /**
+  * @desc : 切换组合促销明细
+  * @date : 2022/7/5 16:49
+  * @author : 周兴
+  */
+  changeCombinedItem(e) {
+    chooseGoodsCommon.changeCombinedItemCommon(e, this)
+  },
+  /**
+   * @desc : 销售价格编辑
+   * @author : 常皓宁
+   * @date : 2022/5/31 14:45
+   */
+  changeSalesPriceField(e) {
+    let priceSale = e.detail.value;
+    chooseGoodsCommon.changeSalesPriceCommon(priceSale, this)
+  },
+  /**
+ * @desc : 修改销售金额
+ * @author : 周兴
+ * @date : 2022/7/4 14:45
+ */
+  changeItemAmountField(e) {
+    chooseGoodsCommon.changeItemAmountFieldCommon(e, this)
+  },
+  /**
+* @desc : 改变标识
+* @author : 周兴
+* @date : 2022/8/6 17:16
+*/
+  changeAllReadyCheckBox(e) {
+    chooseGoodsCommon.changeAllReadyCheckBoxCommon(e, this)
+  },
+
+  /**
+   * @desc : 修改销售价格
+  * @author : 周兴
+  * @date : 2022/7/6 14:45
+  */
+  changeSalesPrice(priceSale) {
+    chooseGoodsCommon.changeSalesPriceCommon(priceSale, this)
+  },
+
+  /**
+   * 关闭产品
+   * @param {*} e 
+   */
+  closeAddItemInfo() {
+    chooseGoodsCommon.closeAddItemInfoCommon(this)
+  },
+
+  getCode() {
+    return new Promise((resolve, reject) => {
+      wx.qy.getQrCode({
+        success: function (res) {
+          var qrCode = res.qrCode
+          resolve(qrCode)
+        }
+      })
+
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.setData({
+      menuBtnInfo: wx.getMenuButtonBoundingClientRect()
+    })
+
+    let _this = this;
+    wx.getSystemInfo({
+      success: function (res) {
+        _this.setData({
+          windowHeight: res.windowHeight,
+          windowWidth: res.windowWidth
+        })
+      }
+    })
+
+    if (app.globalData.user) {
+      this.setData({
+        userInfo: app.globalData.user,
+      })
+    }
+    wx.setStorageSync('choosedGoodsList', [])
+
+    // 报表查询数据
+    this.getSaleProfit()
+  },
+
+
+  /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+  onPullDownRefresh: function () {
+    //调用刷新时将执行的方法
+    this.onRefresh();
+  },
+
+  onRefresh() {
+    //在当前页面显示导航条加载动画
+    wx.showNavigationBarLoading()
+    //显示 loading 提示框。需主动调用 wx.hideLoading 才能关闭提示框
+    //报表查询数据
+    this.getSaleProfit()
+  },
+
+
+
+  /**
+   * @desc : 打开商品
+   * @author : 周兴
+   * @date : 2022/7/2 20:16
+   */
+  openAddItemInfo(e) {
+    // chooseGoodsCommon.openAddItemInfoCommon(e,this,'home-page')
+    this.setData({
+      goodsSkuList: []
+    })
+
+    let item = e.currentTarget.dataset.item
+    //促销类型
+    let promotionType = e.currentTarget.dataset.promotiontype
+    //促销类型
+    item.promotionTypeName = e.currentTarget.dataset.promotiontype == 2 ? '组合促销' : '单品促销'
+    item.itemQuantity = 1
+
+    item.activityId = e.currentTarget.dataset.item.activityId
+    item.warehouseId = app.globalData.user.whId
+    item.whId = app.globalData.user.whId
+    item.warehouseName = app.globalData.user.whName
+    item.wh_Name = app.globalData.user.whName
+    // if (item.activityIds && item.activityIds.length > 0) {
+    //   item.activityId = item.activityIds[0] ? item.activityIds[0] : null
+    // }
+    item.activityName = item.activityNames
+    item.orderItemQuantity = item.itemQuantity
+
+    item.pricePromotionName = item.priceName
+    item.promotionId = item.priceId
+    delete item['apvResult']
+    delete item['apvResultName']
+    delete item['apvUserIds']
+    // delete item['combinedTypeList']
+    delete item['flgValid']
+
+    // 组合促销
+    if (promotionType == "2") {
+
+      //促销价
+      item.pricePromotion = e.currentTarget.dataset.item.pricePromotion ? e.currentTarget.dataset.item.pricePromotion : e.currentTarget.dataset.item.sumPrice
+      item.priceSale = item.pricePromotion
+      item.promotionType = Constants.PROMOTION_TYPE.COMBINED
+      if (item.imageInfo.length > 0) {
+        item.iconThumPath = item.imageInfo[0].path
+      }
+      delete item['imageInfo']
+
+      chooseGoodsCommon.getCombinedByPriceId(e, this);
+      this.setData({
+        show1: false,
+        show2: false,
+        show3: false,
+        show4: true,
+        show5: false
+      })
+    }
+    else {
+      // item.titleTag = '单品促销'
+      // item.title = item.skuModel
+      // item.desc = item.skuName
+      item.promotionType = Constants.PROMOTION_TYPE.PRMOTION
+      item.itemAmount = item.sumPrice
+
+      item.pricePromotion = e.currentTarget.dataset.item.pricePromotion ?
+        e.currentTarget.dataset.item.pricePromotion : item.sumPrice
+      item.priceSale = item.sumPrice
+      // 根据spuId获取sku相关信息
+      chooseGoodsCommon.getSkuBySpuId(e, this);
+      this.setData({
+        show1: true,
+        show2: false,
+        show3: false,
+        show4: false,
+        show5: false
+      })
+    }
+
+    this.setData({
+      currentChoosedItem: item,
+      showAdd: true,
+    })
+  },
+
+  /**
+   * @desc : 选择数据
+   * @date : 2022/7/4 16:49
+   * @author : 周兴
+   */
+  chooseSkuInfo() {
+    let currentChoosedItem = this.data.currentChoosedItem
+    currentChoosedItem.goodsSkuList = this.data.goodsSkuList
+    //校验选择商品数量不能为0
+    if (currentChoosedItem.itemQuantity === 0 || !currentChoosedItem.itemQuantity) {
+      wx.showToast({
+        title: '数量不能为0',
+        image: '/static/image/warning.png',
+        duration: 1000
+      })
+      return
+    }
+    //校验除赠品标识外价格不能为0
+    else if (!currentChoosedItem.flgGift && currentChoosedItem.priceSale == 0) {
+      wx.showToast({
+        title: '销售价格未填写',
+        image: '/static/image/warning.png',
+        duration: 1000
+      })
+      return
+    }
+    // 如果是组合需要判断bom中子件是否有标价
+    else if (currentChoosedItem.combinedList && currentChoosedItem.combinedList.length > 0) {
+      // currentChoosedItem.combinedList.forEach(it => {
+      //   if (!it.priceStandard && it.priceStandard != 0) {
+      //     wx.showToast({
+      //       title: '商品标价未设置',
+      //       image: '/static/image/warning.png',
+      //       duration: 1000
+      //     })
+      //     return;
+      //   }
+      // })
+    }
+    // 如果标价为0 不允许加入购物车
+    else if (!currentChoosedItem.priceStandard && currentChoosedItem.priceStandard != 0) {
+      // wx.showToast({
+      //   title: '商品标价未设置',
+      //   image: '/static/image/warning.png',
+      //   duration: 1000
+      // })
+      // return;
+    }
+    // 如果没有sku 那么不允许
+    if (currentChoosedItem.promotionType != Constants.PROMOTION_TYPE.COMBINED && (!currentChoosedItem.skuId || currentChoosedItem.skuId == 0)) {
+      wx.showToast({
+        title: '未选择商品规格',
+        image: '/static/image/warning.png',
+        duration: 1000
+      })
+      return
+    }
+    // 已选商品列表
+    let choosedGoodsList = this.data.choosedGoodsList
+
+
+    // 判断商品是否在已选列表中存在
+    let filterRows = choosedGoodsList.filter(it => it.id == currentChoosedItem.id);
+    let currentChoosedItemTemp = { ...currentChoosedItem }
+    if (!filterRows || filterRows.length == 0) {
+      if (!this.data.showChoosedFlag) {
+        choosedGoodsList.push(currentChoosedItemTemp)
+      }
+
+    }
+    this.setData({
+      choosedGoodsList: choosedGoodsList,
+      showAdd: false
+    })
+
+    choosedGoodsList.forEach(res => {
+      res.id = util.getGuid()
+    })
+
+    let choosedGoodsListSync = wx.getStorageSync('choosedGoodsList')
+    if (choosedGoodsListSync.length > 0) {
+      let filterRows = choosedGoodsListSync.filter(it => it.priceId + '_' + it.spuId
+        == currentChoosedItem.priceId + '_' + currentChoosedItem.spuId);
+      if (!filterRows || filterRows.length == 0) {
+        choosedGoodsListSync.push(currentChoosedItem)
+      }
+    } else {
+      choosedGoodsListSync.push(currentChoosedItem)
+    }
+
+
+
+    wx.setStorageSync('choosedGoodsList', choosedGoodsListSync)
+    wx.setStorageSync('homeData', {
+      skuData: this.data.skuData ? this.data.skuData : [],
+      skuSpecsData: this.data.skuSpecsData ? this.data.skuSpecsData : [],
+      skuSpecsList: this.data.skuSpecsList ? this.data.skuSpecsList : [],
+    })
+
+    let cartNum = choosedGoodsListSync.length  //默认数据
+    if (cartNum != 0) {
+      //设置角标
+      wx.setTabBarBadge({
+        index: 2, //第几个tab
+        text: cartNum.toString()
+      })
+    } else {
+      //移除角标
+      wx.removeTabBarBadge({
+        index: 2,
+      })
+    }
+
+    //计算合计金额
+    chooseGoodsCommon.getSumAmount(this);
+  },
+
+
+
+  /**
+ * 数量的变化事件
+ * @param {*} e 
+ */
+  changeAllreadyChooseQuantityPop(e) {
+    let currentChoosedItem = this.data.currentChoosedItem
+    currentChoosedItem.itemQuantity = e.detail
+    currentChoosedItem.itemAmount = Number(currentChoosedItem.priceSale * currentChoosedItem.itemQuantity).toFixed(2)
+    currentChoosedItem.itemAmount = isNaN(currentChoosedItem.itemAmount) ? 0 : currentChoosedItem.itemAmount
+    this.setData({
+      currentChoosedItem: currentChoosedItem
+    })
+
+  },
+
+  //触底分页函数
+  paging() {
+
+  },
+
+
+
+  /**
+   * @desc : 页面滚动时执行
+   * @date : 2022/5/12 16:49
+   * @author : 于继渤
+   */
+  onPageScroll: function () {
+
+    /**
+     * @desc : 关闭下拉  
+     * @date : 2022/5/12 16:49
+     * @author : 于继渤
+     */
+    //TODO  有ID同名问题记得修改
+    // this.selectComponent('#statusItem').onClosed()
+    // this.selectComponent('#statusItem').rerender()
+
+    // this.selectComponent('#statusItem1').onClosed()
+    // this.selectComponent('#statusItem1').rerender()
+
+    // this.selectComponent('#accountTimeType').onClosed()
+    // this.selectComponent('#accountTimeType').rerender()
+
+  },
+
+  // 报表相关
+  dateClick(e) {
+    if (e.detail === 0) {
+      this.selectComponent("#month-components").toggle(true)
+      this.dropdowncommit({ currentTarget: { dataset: { type: 'month' } } })
+    } else {
+      this.getSaleProfit()
+    }
+  },
+
+
+  /** 去详细 */
+  toDetail(e) {
+    console.log(e, '/package-business-analysis/pages/profit-report/' + e.currentTarget.dataset.url)
+    wx.navigateTo({
+      url: '/package-business-analysis/pages/profit-report/' + e.currentTarget.dataset.url
+      //  + '?orgIds=' + encodeURIComponent(JSON.stringify(this.data.orgIds)) + '&orgNames=' + encodeURIComponent(JSON.stringify(this.data.orgNames))
+        // + '&dateType=' + this.data.value1 + '&date=' + this.data.month
+    })
+  },
+
+  formatDate(value) {
+    var time = new Date(value);
+    var year = time.getFullYear();
+    var month = time.getMonth() + 1;
+    return year + "年" + month + "月"
+  },
+
+  onInput(e) {
+    this.setData({
+      monthOnChoose: e.detail
+    })
+  },
+
+  onConfirmChooseDate(e) {
+    this.setData({
+      month: this.data.monthOnChoose,
+      monthName: this.formatDate(this.data.monthOnChoose)
+    })
+    this.setData({
+      monthFlag: false
+    })
+    let option1 = this.data.option1
+    option1[option1.length - 1].text = this.data.monthName
+    this.setData({
+      option1: option1
+    })
+    this.selectComponent("#month-components").toggle(false)
+    this.getSaleProfit()
+  },
+
+  onCloseChooseDate(e) {
+    this.setData({
+      // monthOnChoose: this.data.month
+      value1: 3,
+
+    })
+    this.setData({
+      monthFlag: false
+    })
+    this.selectComponent("#month-components").toggle()
+    this.getSaleProfit()
+  },
+
+  dropdowncommit(e) {
+    this.setData({
+      [e.currentTarget.dataset.type + 'Flag']: true
+    })
+  },
+
+  /** 下拉多选关闭 */
+  muticloseAll(e) {
+    this.setData({
+      orgFlag: false
+    })
+    this.selectComponent("#org-components").toggle()
+  },
+
+  /** 下拉多选确定 */
+  mutiSearchAll(e) {
+    this.setData({
+      orgIds: e.detail.idList,
+      orgNames: e.detail.names,
+      orgFlag: false
+    })
+    this.selectComponent("#org-components").toggle(false)
+    this.getSaleProfit()
+  },
+
+  onShow() {
+    this.echartsProfitDate = this.selectComponent("#echartsProfitDate")
+    this.echartsProfitStaff = this.selectComponent("#echartsProfitStaff")
+    this.echartsProfitOrg = this.selectComponent("#echartsProfitOrg")
+    this.echartsProfitSku = this.selectComponent("#echartsProfitSku")
+  },
+
+  /** 设置echarts */
+  setEcharts(name, { data, labelKey, valueKey, type }) {
+    this[name].init((canvas, width, height, dpr) => {
+      const chart = echarts.init(canvas, null, {
+        width: width,
+        height: height,
+        devicePixelRatio: dpr
+      });
+      canvas.setChart(chart);
+      chart.setOption(getOpData(data, labelKey, valueKey, type));
+      return chart;
+    });
+  },
+  /** 根据月份查出第一天和最后一天 参数是时间戳*/
+  getBeginDateAndEndDate(timestamp) {
+    // let date = new Date(timestamp)
+    // let year = date.getFullYear();
+    // let month = date.getMonth() + 1;
+    // let yearAndMonth = year + '-' + (month >= 10 ? month : '0' + month);
+    // return { beginDate: yearAndMonth + '-01', endDate: yearAndMonth + '-' + new Date(year, month, 0).getDate() }
+    let month = this.data.month
+    let monthStart = month[0] ? month[0] : ''
+    let monthEnd = month[1] ? month[1] : ''
+    if (month && month[0] && (month[0].indexOf('/') != -1)) {
+      monthStart = month[0].replaceAll('/', '-')
+    }
+    if (month && month[1] && (month[1].indexOf('/') != -1)) {
+      monthEnd = month[1].replaceAll('/', '-')
+    }
+    return { beginDate: monthStart, endDate: monthEnd }
+
+
+
+
+  },
+
+  /**
+   * 销售毛利点击按日或按月查询
+   */
+  clickProfitDate(e) {
+    this.setData({
+      byDate: e.currentTarget.dataset.value
+    })
+    this.getSaleProfit()
+  },
+
+  /** 查询所有报表信息 */
+  /** 查询页面展示的所有 */
+  getSaleProfit() {
+    this.excute(this.data.service, this.data.service.getSaleProfit, Object.assign({
+      byDate: this.data.byDate
+    }, JSON.parse(this.data.searchForm))).then(res => {
+      if (res.data.code == Constants.SUCESS_CODE) {
+        this.setData({
+          profit: res.data.data.profit,
+        })
+
+        /** 图形重新渲染 */
+        setTimeout(() => {
+          this.setEcharts('echartsProfitDate', { data: res.data.data.dateProfit, labelKey: 'accDate', valueKey: 'profit', type: 1 })
+          this.setEcharts('echartsProfitOrg', { data: res.data.data.orgProfit, labelKey: 'orgName', valueKey: 'profit', type: 3 })
+          this.setEcharts('echartsProfitStaff', { data: res.data.data.staffProfit, labelKey: 'staffName', valueKey: 'profit', type: 3 })
+          this.setEcharts('echartsProfitSku', { data: res.data.data.skuProfit, labelKey: 'skuName', valueKey: 'profit', type: 3 })
+        }, 1000)
+
+      }
+    })
+  },
+
+   /**
+    * 显示tip
+    */
+    showTip(e) {
+      console.log(e)
+      let item = e.currentTarget.dataset.item
+      if (item) {
+        util.showToast(item);
+      }
+    },
+})
+

+ 4 - 0
package-business-analysis/pages/profit-report/profit-report.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {  "ec-canvas": "../../../pages/ec-canvas/ec-canvas"},
+  "navigationBarTitleText":"销售利润"
+}

+ 177 - 0
package-business-analysis/pages/profit-report/profit-report.wxml

@@ -0,0 +1,177 @@
+<wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
+
+<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+<!-- 顶部 -->
+
+<!-- 顶部筛选条件 -->
+<view class="head" style="position: fixed;top:0; z-index: 95;">
+  <view style="overflow: hidden;position: absolute;width: 100%; z-index: 6666;">
+    <dk-dropdown-menu  model:value="{{searchForm}}" menuList="{{searchContent}}"  bind:search="getSaleProfit" flgSearchText="{{false}}">
+	</dk-dropdown-menu>
+  </view>
+</view>
+
+
+<view class="func" style="margin-top:100rpx;">
+  <!-- 报表相关 -->
+
+
+
+  <view class="main">
+
+
+    <view class="card-view">
+      <view class="top-card">
+        <view class="top-card-title">销售利润</view>
+        <view class="top-card-icon">
+          <van-icon size="26rpx" name="question-o" data-item="销售利润=收入-成本" catchtap="showTip"/>
+        </view>
+        <view class="top-card-money">
+ 
+          <dk-cell left="0rpx" height="45rpx" contentRight="{{false}}" contentFontSize="16" contentColor="#caa977"
+              contentFontWeight="bold" content="{{profit.profit || 0}}"></dk-cell>
+        </view>
+        <view style="clear: both;" />
+      </view>
+
+      <view class="top-card">
+        <view class="top-card-title">销售利润率</view>
+        <view class="top-card-icon">
+          <van-icon size="26rpx" name="question-o" data-item="销售利润率=(收入-成本)/收入×100%" catchtap="showTip"/>
+        </view>
+        <view class="top-card-percent">{{profit.profitRate || 0}}%</view>
+        <view style="clear: both;" />
+      </view>
+
+      <view class="top-card top-card-bottom">
+        <view class="top-card-bottom-text">
+          <view class="top-card-bottom-text-title">销售总额</view>
+          <dk-cell left="0rpx" height="50rpx" contentRight="{{false}}" contentFontSize="13" contentColor="#95a8cb"
+               content="{{profit.outbound || 0}}"></dk-cell>
+        </view>
+        <view class="top-card-bottom-text">
+          <view class="top-card-bottom-text-title">成本总额</view>
+          <dk-cell left="0rpx" height="50rpx" contentRight="{{false}}" contentFontSize="13" contentColor="#95a8cb"
+               content="{{profit.inbound || 0}}"></dk-cell>
+      </view>
+          
+      </view>
+    </view>
+
+
+    <!-- 销售毛利 -->
+    <view class="card-view2">
+      <view class="card-view-header2">
+        <view class="card-view-header-name2">
+          销售毛利
+          <span class="card-view-header-name3">(近一年)</span>
+        </view>
+        <view class="card-view-header-tags2">
+          <van-button color="#f0f0f0" size="mini" bind:click="clickProfitDate" data-value="true" custom-style="{{byDate=='true'?'color: #5c91ce; border: 1px solid #5c91ce':'color: black'}}" style="margin-right: 10rpx">按日</van-button>
+          <van-button color="#ecf1fa" size="mini" bind:click="clickProfitDate" data-value="false" custom-style="{{!byDate || byDate=='false'?'color: #5c91ce; border: 1px solid #5c91ce':'color: black'}}">按月</van-button>
+          <!-- <view class="card-view-header-tags-tag">详情
+            <van-icon style="margin-left: 14rpx;" name="arrow" />
+          </view> -->
+        </view>
+      </view>
+
+      <view style="z-index: 0 !important;width: 100%; height: 600rpx;">
+        <ec-canvas type="2d" canvas-id="echartsProfitDate" id="echartsProfitDate" ec="{{ ec }}" />
+      </view>
+    </view>
+
+    <!-- 部门利润 -->
+    <view class="card-view">
+      <view class="card-view-header">
+        <view class="card-view-header-name">
+          <image src="/static/image/app.png" class="header-icon" style="width: 30rpx;height:30rpx;margin-right: 15rpx;"></image>
+          部门利润排行
+        </view>
+        <view class="card-view-header-tags" catchtap="toDetail" data-url="org-rank/org-rank">
+          <view class="card-view-header-tags-tag">详情
+            <van-icon style="margin-left: 14rpx;" name="arrow" />
+          </view>
+        </view>
+      </view>
+      <!-- <view class="card-view-content-data-echarts">
+        <view class="card-view-content-data-echarts-data">
+          <view>
+            <text class="small-small-font">¥</text>{{indexOrgOrder.sumAmount ? numberFormat.toThousandCents(numberFormat.numberFormat(indexOrgOrder.sumAmount/10000)) : '0.00'}}
+          </view>
+          <view>成交额(万)</view>
+        </view>
+      </view> -->
+      <view style="z-index: 0 !important;width: 100%; height: 327rpx;">
+        <ec-canvas type="2d" canvas-id="echartsProfitOrg" id="echartsProfitOrg" ec="{{ ec }}" />
+      </view>
+    </view>
+
+    <!-- 部门收款 -->
+    <view class="card-view">
+      <view class="card-view-header">
+        <view class="card-view-header-name">
+          <image src="/static/image/app.png" class="header-icon" style="width: 30rpx;height:30rpx;margin-right: 15rpx;"></image>
+          业务员利润排行
+        </view>
+        <view class="card-view-header-tags" catchtap="toDetail" data-url="/org-repay-rank/org-repay-rank">
+          <view class="card-view-header-tags-tag">详情
+            <van-icon style="margin-left: 14rpx;" name="arrow" />
+          </view>
+        </view>
+      </view>
+      <!-- <view class="card-view-content-data-echarts">
+        <view class="card-view-content-data-echarts-data">
+          <view>
+            <text class="small-small-font">¥</text>{{indexOrgRepay.sumAmount ? numberFormat.toThousandCents(numberFormat.numberFormat(indexOrgRepay.sumAmount/10000)) : '0.00'}}
+          </view>
+          <view>成交额(万)</view>
+        </view>
+      </view> -->
+      <view style="z-index: 0 !important;width: 100%; height: 327rpx;">
+        <ec-canvas type="2d" canvas-id="echartsProfitStaff" id="echartsProfitStaff" ec="{{ ec }}" />
+      </view>
+    </view>
+
+
+    <!-- 业务员成交 -->
+    <view class="card-view">
+      <view class="card-view-header">
+        <view class="card-view-header-name">
+          <image src="/static/image/app.png" class="header-icon" style="width: 30rpx;height:30rpx;margin-right: 15rpx;"></image>
+          商品利润排行
+        </view>
+        <view class="card-view-header-tags" catchtap="toDetail" data-url="/staff-order-rank/staff-order-rank">
+          <view class="card-view-header-tags-tag">详情
+            <van-icon style="margin-left: 14rpx;" name="arrow" />
+          </view>
+        </view>
+      </view>
+      <!-- <view class="card-view-content-data-echarts">
+        <view class="card-view-content-data-echarts-data">
+          <view>
+            <text class="small-small-font">¥</text>{{indexStaffOrder.sumAmount ? numberFormat.toThousandCents(numberFormat.numberFormat(indexStaffOrder.sumAmount/10000)) : '0.00'}}
+          </view>
+          <view>成交额(万)</view>
+        </view>
+      </view> -->
+      <view style="z-index: 0 !important;width: 100%; height: 327rpx;">
+        <ec-canvas type="2d" canvas-id="echartsProfitSku" id="echartsProfitSku" ec="{{ ec }}" />
+      </view>
+    </view>
+
+
+  </view>
+
+
+
+
+  <!-- 选时间 -->
+  <van-popup position="bottom" show="{{ monthFlag }}" bind:close="onCloseChooseDate" class="popup" style="width:100%" custom-style="border-radius:15rpx;">
+    <view style="display:flex;justify-content: space-around;height:80rpx;">
+      <view style="width:45%;text-align: left;color:#b6b6b6;line-height:80rpx;" catchtap="onCloseChooseDate">取消</view>
+      <view style="width:45%;text-align: right;color:#00A7B5;line-height:80rpx;" catchtap="onConfirmChooseDate">确定</view>
+    </view>
+    <van-datetime-picker type="year-month" value="{{ monthOnChoose }}" bind:input="onInput" show-toolbar="{{false}}" formatter="{{formatter}}" />
+  </van-popup>
+</view>
+

+ 884 - 0
package-business-analysis/pages/profit-report/profit-report.wxss

@@ -0,0 +1,884 @@
+page {
+  width: 100%;
+  margin: 0;
+  background: #FFFFFF;
+}
+
+.custom-class {
+  width: 100% !important;
+}
+
+.top {
+  position: fixed;
+  top: 2rpx;
+}
+
+.title {
+  display: flex;
+}
+
+.van-cell-text {
+  margin-left: 12rpx;
+}
+
+
+.van-button {
+  width: 100% !important;
+}
+
+
+.panel-class {
+  margin-bottom: 20rpx;
+}
+
+.test {
+  z-index: 0 !important;
+  width: 100%;
+  height: 600rpx;
+}
+
+/* .van-dropdown-menu__item {
+  flex: 0.7 !important;
+} */
+
+.menu-box {
+  width: 100%;
+  box-sizing: border-box;
+  padding: 0 0 0 22rpx;
+  display: flex;
+  align-items: center;
+  background: white;
+}
+
+.title-class {
+  width: 100% !important;
+
+}
+
+.van-ellipsis {
+  font-size: 32rpx;
+}
+
+.field-class {
+  height: 60rpx;
+  width: 100% !important;
+  padding: 0;
+  display: flex;
+  align-items: center;
+}
+
+.van-search--withaction {
+  padding-right: 0;
+  width: 488rpx !important;
+}
+
+.van-field__input--center {
+  text-align: left !important;
+}
+
+.van-ellipsis {
+  font-size: 30rpx !important;
+}
+
+.finance_block {
+  background: #f5f5f5;
+  margin: 2vw;
+  width: 50vw;
+  text-align: center;
+  padding: 1vw;
+  border-radius: 1vw;
+}
+
+/* 按钮横向排列 */
+.view_class {
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  margin-top: 10rpx;
+  margin-bottom: 10rpx;
+}
+
+.head {
+  /* z-index: 1;  */
+  /* height: 384rpx; */
+  width: 100%; 
+  /* background: #1B365D; */
+}
+
+.head-center {
+  position: absolute;
+  width: 78rpx;
+  height: 80rpx;
+  left: 39rpx;
+  top: 204rpx;
+}
+
+.nick-name {
+  width: 70% !important;
+  position: absolute;
+  width: 64rpx;
+  height: 45rpx;
+  left: 140rpx;
+  top: 209rpx;
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 600;
+  font-size: 32rpx;
+  line-height: 45rpx;
+  color: #FFFFFF;
+}
+
+.head .van-ellipsis {
+  font-weight: bolder;
+}
+
+
+.wx-avatar {
+  overflow: hidden;
+  display: block;
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 50%;
+  border: 1px solid #95a8cb;
+}
+
+.store {
+  position: absolute;
+  width: 364rpx;
+  height: 34rpx;
+  left: 140rpx;
+  top: 254rpx;
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 400;
+  font-size: 24rpx;
+  line-height: 34rpx;
+  color: #95A8CB;
+}
+
+.func {
+  width: 100%;
+  height: 440rpx;
+  margin-top: -100rpx;
+  /* background: #F8F9FD; */
+  border-radius: 40rpx 40rpx 0 0;
+
+}
+
+.func-card-blue {
+  width: 47%;
+  height: 198rpx;
+  background: linear-gradient(209.99deg, #E6F2FE 14.33%, #D7EAFF 73.85%);
+  border-radius: 19rpx;
+}
+
+.func-card-purple {
+  width: 47%;
+  height: 198rpx;
+  background: linear-gradient(209.99deg, #E2E8FF 14.33%, #D5DDFF 73.85%);
+  border-radius: 19rpx;
+}
+
+.card-title {
+  margin-top: 24rpx;
+  display: flex;
+  height: 54rpx;
+  align-items: center;
+  width: 100%;
+  /* justify-content: center; */
+}
+
+.card-name {
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 600;
+  font-size: 32rpx;
+  line-height: 48rpx;
+  margin-left: 16rpx
+}
+
+.card-name-blue {
+  color: #1B365D;
+}
+
+.card-name-purple {
+  color: #606EB2;
+}
+
+.icon-arrow {
+  width: 32rpx;
+  height: 32rpx;
+  border-radius: 16rpx;
+  margin-left: 20rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.icon-blue {
+  background-color: #B7DBFF;
+}
+
+.icon-purple {
+  background-color: #C3D0FF;
+}
+
+.icon-title {
+  width: 76rpx;
+  height: 84rpx;
+  margin-top: 20rpx;
+  margin-left: 20rpx
+}
+
+.card-bottom {
+  margin-top: 20rpx;
+  display: flex;
+  justify-content: space-evenly;
+}
+
+.card-bottom-button {
+  width: 40%;
+  background: #B7DBFF;
+  height: 80rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 15rpx;
+}
+
+.card-bottom-button-font {
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 500;
+  line-height: 31px;
+  color: #1B365D;
+}
+
+.card-bottom-button-blue {
+  background: #B7DBFF;
+  color: #1B365D;
+}
+
+.card-bottom-button-purple {
+  background: #C3D0FF;
+  color: #606EB2;
+}
+
+.combined-card {
+  margin: 10px 2%;
+  height: 430rpx;
+  background-color: #99A8E4;
+  border-radius: 15rpx;
+}
+
+.top-big-text {
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 600;
+  font-size: 32rpx;
+  line-height: 45rpx;
+  color: #FFFFFF;
+  margin-left: 18rpx;
+}
+
+.top-small-text {
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 400;
+  font-size: 24rpx;
+  line-height: 34rpx;
+  color: #FFFFFF;
+  margin-left: 12rpx;
+}
+
+.scroll-view {
+  white-space: nowrap;
+  display: flex;
+}
+
+.combined {
+  background-color: #FFFFFF;
+  border-radius: 15rpx;
+  display: inline-block;
+  height: 300rpx;
+  width: 75%;
+  margin: 0 30rpx;
+}
+
+.combined-name {
+  margin-top: 12rpx;
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 600;
+  font-size: 20rpx;
+  line-height: 28rpx;
+  color: #1B365D;
+}
+
+.combined-detail {
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 400;
+  font-size: 18rpx;
+  line-height: 25rpx;
+  color: #CAA977;
+}
+
+.combined-button-view {
+  margin-top: 15rpx;
+  display: flex;
+  justify-content: flex-end;
+}
+
+.combined-button {
+  padding: 4rpx 17rpx 0 17rpx;
+  margin-right: 17rpx;
+  height: 42rpx;
+  background: #FE4F09;
+  border-radius: 48rpx;
+  color: #FFFFFF;
+  font-family: 'PingFang SC';
+  font-style: normal;
+  font-weight: 400;
+  font-size: 15rpx;
+  line-height: 21rpx;
+  display: flex;
+  align-items: center;
+}
+
+.combined-imgs-view {
+  display: flex;
+  align-items: center;
+  justify-content: space-between
+}
+
+.sku-list {
+  display: flex;
+  justify-content: space-evenly;
+  margin-bottom: 20rpx;
+  width: 50%;
+}
+
+.sku-card {
+  width: 94%;
+  height: 495rpx;
+  background-color: #FFFFFF;
+  /* background-color: #1B365D; */
+  border-radius: 15px;
+  box-shadow: 0px 10px 20px rgba(225, 229, 238, 0.6);
+}
+
+.sku-name-detail-item {
+  width: 290rpx;
+  word-break: break-all;
+  overflow: hidden;
+  -webkit-line-clamp: 2;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+}
+
+.sku-image {
+  display: flex;
+  justify-content: center;
+}
+
+.sku-name {
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 500;
+  font-size: 26rpx;
+  line-height: 36rpx;
+  color: #1B365D;
+  display: flex;
+  justify-content: center;
+}
+
+.sku-name-detail {
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 400;
+  font-size: 22rpx;
+  line-height: 31rpx;
+  color: #CAA977;
+  display: flex;
+  justify-content: center;
+}
+
+.sku-bottom {
+  display: flex;
+  justify-content: center;
+}
+
+.sku-price {
+  line-height: 21rpx;
+  color: #FE4F09;
+  display: flex;
+  width: 290rpx;
+  line-height: 53rpx;
+  margin-top: 30rpx;
+  align-items: center;
+  justify-content: space-between;
+}
+
+
+
+
+.content {
+  text-align: justify;
+}
+
+
+.left,
+.right {
+  display: inline-block;
+  vertical-align: top;
+  width: 50%;
+}
+
+.van-icon-class {
+  width: 15%;
+  text-align: right;
+  padding-right: 10rpx;
+}
+
+.left-class {
+  color: #0072ff;
+  position: fixed;
+  left: 20rpx;
+  top: 196rpx;
+  width: 130rpx !important;
+
+}
+
+.right-class {
+  color: #0072ff;
+  position: fixed;
+  top: 88rpx;
+  width: 18% !important;
+
+}
+
+.thumb-class {
+  width: 85px !important;
+  padding-right: 55px;
+  height: 80px !important;
+}
+
+.van-card__thumb {
+  padding-right: 35px;
+  width: 50px !important;
+  height: 50px !important;
+}
+
+.label-class-two {
+  color: black !important;
+}
+
+.tags {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: stretch;
+  width: 100%;
+  flex-direction: row;
+  justify-content: flex-start;
+  background: white;
+  align-items: center;
+  margin-bottom: 5rpx;
+  margin-top: 10rpx;
+}
+
+.box {
+  height: 200rpx;
+}
+
+
+
+.price-pop-class {
+  font-size: 13px;
+  width: 75%;
+}
+
+
+.tag-bom-item {
+  padding-right: 20rpx;
+}
+
+.tag-text {
+  overflow: hidden !important;
+  text-overflow: ellipsis !important;
+  white-space: nowrap;
+  word-wrap: break-all;
+  width: 100%;
+  height: 44rpx;
+  margin-top: -10rpx;
+  margin-bottom: -10rpx;
+}
+
+.van-field__label {
+  color: #95A8CB !important;
+}
+
+
+
+.button-pop-cell-class {
+  border-radius: 15rpx !important;
+}
+
+.button-pop-class {
+  width: 640rpx !important;
+  height: 88rpx !important;
+  background: #1B365D !important;
+  border-radius: 15rpx !important;
+  border: none !important;
+}
+
+.dk-popup {
+  background-color: transparent !important;
+  overflow-x: hidden;
+}
+
+.value-class {
+  flex: none !important;
+}
+
+/* 报表 */
+
+.main {
+  padding: 38rpx 34rpx 40rpx 34rpx;
+}
+
+
+.card-view {
+  background: #FFFFFF;
+  box-shadow: 0px 10px 20px rgba(225, 229, 238, 0.6);
+  border-radius: 15rpx;
+}
+
+.card-view2 {
+  background: #f8f8f8;
+  box-shadow: 0px 10px 20px rgba(225, 229, 238, 0.6);
+  border-radius: 15rpx;
+}
+
+.top-card {
+  padding: 20rpx 40rpx;
+  height: 50rpx;
+  line-height: 50rpx;
+}
+
+.top-card-title {
+  color: red;
+  font-weight: bold;
+  float: left;
+}
+
+.top-card-icon {
+  float: left;
+  margin-left: 40rpx;
+  height: 100%;
+}
+
+.top-card-icon van-icon {
+  height: 100%;
+}
+
+.top-card-money {
+  float: right;
+  /* color: #caa977; */
+}
+
+.top-card-percent {
+  float: right;
+  color: #002340;
+}
+.top-card-bottom{
+  display: flex;
+}
+.top-card-bottom-text {
+  font-size: 24rpx;
+  color: #95a8cb;
+  margin-right: 40rpx;
+  display: flex;
+}
+
+.top-card-bottom-text-title{
+  margin-right: 20rpx;
+}
+
+.card-view-header {
+  display: flex;
+  background: linear-gradient(90deg, #deeaff 0%, #FAFEFF 100%);
+  padding: 24rpx;
+  border-radius: 15rpx 15rpx 0px 0px;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.card-view-header2 {
+  display: flex;
+  /* background: linear-gradient(90deg, #D9F2F8 0%, #FAFEFF 100%); */
+  padding: 24rpx;
+  border-radius: 15rpx 15rpx 0px 0px;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.card-view-header-name {
+  font-style: normal;
+  font-weight: bolder;
+  font-size: 16px;
+  color: #1B365D;
+  font-family: 'PingFang HK';
+  display: flex;
+  align-items: center;
+}
+
+.card-view-header-name2 {
+  font-style: normal;
+  font-size: 16px;
+  color: black;
+  font-weight: bolder;
+  font-family: 'PingFang HK';
+  display: flex;
+  align-items: center;
+}
+
+.card-view-header-name3 {
+  font-size: 14px;
+  color: #c7c7c7;
+}
+
+.card-view-header-tags-tag {
+  width: 129rpx;
+  height: 54rpx;
+  /* border-radius: 27rpx; */
+  /* border: 1px solid #00A7B5; */
+  color: #95a8cb;
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 400;
+  font-size: 26rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.card-view-header-tags2 {
+  display: flex;
+}
+
+
+.card-view-content-data {
+  display: flex;
+  justify-content: space-between;
+  padding: 24rpx 24rpx 0 24rpx;
+}
+
+.card-view-content-data-left>view:nth-child(1) {
+  font-style: normal;
+  font-weight: 600;
+  font-family: 'PingFang SC';
+  font-size: 25px;
+  color: #1B365D;
+}
+
+
+.card-view-content-data-left>view:nth-child(2) {
+  font-style: normal;
+  font-weight: 400;
+  font-size: 14px;
+  color: #95A8CB;
+  font-family: 'PingFang SC';
+  margin-top: 13rpx;
+}
+
+
+.card-view-content-data-left>view:nth-child(3) {
+  font-style: normal;
+  font-weight: 400;
+  font-size: 10px;
+  color: #1B365D;
+  display: flex;
+  align-items: center;
+  line-height: 40rpx;
+  font-family: 'PingFang SC';
+  margin-top: 11rpx;
+}
+
+.card-view-content-data-left>view:nth-child(3)>view:nth-child(n),
+.card-view-content-data-left>view:nth-child(3)>view:nth-child(n)>view:nth-child(n) {
+  display: flex;
+  align-items: center;
+}
+
+.card-view-content-data-left>view:nth-child(3)>view:nth-child(2) {
+  margin-left: 19rpx;
+}
+
+.card-view-content-data-left {
+  padding: 20rpx 0;
+}
+
+.card-view-content-data-right {
+  padding: 20rpx 0;
+  display: grid;
+}
+
+.card-view-content-data-right>view:nth-child(1) {
+  font-style: normal;
+  font-weight: 400;
+  font-size: 14px;
+  color: #1B365D;
+  text-align: right;
+  font-family: 'PingFang SC';
+}
+
+.card-view-content-data-right>view:nth-child(2) {
+  font-style: normal;
+  font-weight: 400;
+  font-size: 10px;
+  color: #95A8CB;
+  margin-bottom: 12rpx;
+  text-align: right;
+  font-family: 'PingFang SC';
+}
+
+.card-view-content-data-right>view:nth-child(3) {
+  font-style: normal;
+  font-weight: 400;
+  font-size: 10px;
+  color: #95A8CB;
+  text-align: right;
+  font-family: 'PingFang SC';
+}
+
+
+/* 小电视 */
+.card-view-content-screen {
+  display: flex;
+  flex-flow: wrap;
+  justify-content: space-between;
+  padding: 0 16rpx 22rpx 16rpx;
+}
+
+.card-view-content-screen-item {
+  border-radius: 15rpx;
+  position: relative;
+  display: grid;
+  align-content: center;
+  width: 32%;
+  height: 108rpx;
+  background: #F8F8F8;
+}
+
+.card-view-content-screen-item:nth-child(n+4) {
+  margin-top: 12rpx;
+}
+
+.card-view-content-screen-item-absolute {
+  color: #1B365D;
+  background-color: #EBEEF3;
+  font-size: 10px;
+  font-family: 'PingFang SC';
+  line-height: 30rpx;
+  padding: 0 10rpx 0 10rpx;
+  border-radius: 15rpx;
+  width: max-content;
+  position: absolute;
+  right: 4.3rpx;
+  top: 4.3rpx;
+
+}
+
+.card-view-content-screen-item-important {
+  font-weight: 600;
+  font-size: 16px;
+  font-family: 'PingFang SC';
+  color: #1B365D;
+  justify-content: center;
+  display: flex;
+  align-items: flex-end;
+}
+
+.card-view-content-screen-item-important-small {
+  font-style: normal;
+  font-weight: 400;
+  font-size: 10px;
+  font-family: 'PingFang SC';
+}
+
+.card-view-content-screen-item-text {
+  font-style: normal;
+  font-weight: 400;
+  font-size: 10px;
+  color: #95A8CB;
+  text-align: center;
+  font-family: 'PingFang SC';
+}
+
+/* eachrts类卡片样式 */
+.card-view-content-data-echarts {
+  display: flex;
+  justify-content: space-between;
+  padding: 24rpx 24rpx 0 24rpx;
+}
+
+.card-view-content-data-echarts-data {
+  display: flex;
+  align-items: flex-end;
+  width: 100%;
+  border-bottom: 1px solid #E9F0FE;
+  margin-bottom: 10px;
+}
+
+.card-view-content-data-echarts-data>view:nth-child(1) {
+  font-family: 'PingFang HK';
+  font-style: normal;
+  font-weight: 600;
+  font-size: 25px;
+  line-height: 40px;
+  color: #1B365D;
+}
+
+.card-view-content-data-echarts-data>view:nth-child(2) {
+  font-family: 'PingFang SC';
+  font-style: normal;
+  font-weight: 400;
+  font-size: 14px;
+  line-height: 40px;
+  color: #95A8CB;
+  margin-left: 14rpx;
+}
+
+.card-view:nth-child(n+2) {
+  margin-top: 40rpx;
+}
+
+.card-view:last-child::after {
+  content: " ";
+  margin-bottom: 40rpx;
+}
+
+.small-cny {
+  font-size: 12px;
+}
+
+.small-small-font {
+  font-size: 10px;
+  line-height: 16px;
+}
+
+.header-icon {
+  box-shadow: 0px 4px 8px #CBE2E7;
+}
+
+/* .van-dropdown-menu {
+  border-radius: 40rpx 40rpx 0rpx 0rpx !important;
+} */
+
+
+
+/* 瀑布流 */
+
+/* pages/test/test.wxss */

+ 20 - 1
package-inventory/pages/ivt-detail-report/ivt-detail-report.js

@@ -46,7 +46,26 @@ Page({
       leftTitle: mixins.$t('storageNum'), leftCode: 'usableQty',
       rightTitle: mixins.$t('sellableQuantity'), rightCode: 'invQty'
     }],
-
+    searchContent: [{
+      code: 'warehouse',
+      title: mixins.$t('reservoirArea'),
+      dropType: 'warehouse'
+    },{
+      code: 'SellableQuantityAsc',
+      title: mixins.$t('SellableQuantityAsc'),
+      searchType:Constants.searchType.radio, 
+      value:1, 
+      options: [
+        {
+          "text": "可售量升序",
+          "value": 1
+        },
+        {
+          "text": "可售量降序",
+          "value": 2
+        }
+      ],
+    }],
     contentList: [],
     item: Constants.billType.out,
     form: {

+ 4 - 23
package-inventory/pages/ivt-detail-report/ivt-detail-report.wxml

@@ -2,30 +2,11 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
 <van-dialog id="van-dialog" />
-<dk-navbar titleFontColor="#000000" navbarTitle="库存查询" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"  bind:getNavbarHeight="getNavbarHeight"/>
 <van-sticky offset-top="{{ 0 }}">
-  <view style="display: flex;">
-    <view style="width: 85%;">
-      <!-- 查询条件 -->
-      <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel','colorNumber'])}}">
-      </dk-dropdown-menu>
-    </view>
-
-    <view class="scan-class" style="width: 15%;display: flex;align-items: center;">
-      <image style="width: 40rpx;height: 40rpx;" class="scan-image" fit="fill" src="{{imageUrl+'/scan_image.png'}}"></image>
-    </view>
-  </view>
-
-
-  <van-dropdown-menu active-color="#1B365D" style=" width: calc(100% ) !important; ">
-    <!-- 库区 -->
-    <van-dropdown-item id="statusItemWareHouse" disabled="{{controlFlags.choosewhReadonly}}" title="{{ form.whNames ? form.whNames:$t['reservoirArea'] }}" bind:open="dropdowncommit">
-    </van-dropdown-item>
-    <!-- 可售量排序 SellableQuantityAsc-->
-    <van-dropdown-item title="{{ orderBy.text?orderBy.text:$t['SellableQuantityAsc'] }}" value="{{value}}" options="{{ orderBy }}" bind:change="onSwitchChange">
-    </van-dropdown-item>
-  </van-dropdown-menu>
-
+  <dk-navbar titleFontColor="#000000" navbarTitle="库存查询" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"  bind:getNavbarHeight="getNavbarHeight"/>
+  <!-- 查询条件 -->
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}"bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel','colorNumber'])}}">
+  </dk-dropdown-menu>
 </van-sticky>
 
 <view style="height:100%;background: #F8F9FD ;">

+ 0 - 4
package-inventory/pages/ivt-detail-report/ivt-detail-report.wxss

@@ -11,10 +11,6 @@
 	background-color: transparent !important;
 }
 
-.van-nav-bar {
-	background-color: transparent !important;
-	color: #191919 !important;
-}
 
 .van-search__content {
 	background: #F8F9FD;

+ 1 - 1
package-inventory/pages/ivt-sum-report/ivt-sum-report.wxml

@@ -1,8 +1,8 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
-<dk-navbar titleFontColor="#000000" navbarTitle="收发存汇总表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"  bind:getNavbarHeight="getNavbarHeight"/>
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="收发存汇总表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"  bind:getNavbarHeight="getNavbarHeight"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" navBarHeight="{{navBarHeight}}" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel'])}}">
   </dk-dropdown-menu>

+ 20 - 1
package-inventory/pages/ivt-warning-report/ivt-warning-report.js

@@ -41,7 +41,26 @@ Page({
     ],
     brandId: null,
     active: 0,
-
+    searchContent: [{
+      code: 'warehouse',
+      title: mixins.$t('reservoirArea'),
+      dropType: 'warehouse'
+    },{
+      code: 'SellableQuantityAsc',
+      title: mixins.$t('SellableQuantityAsc'),
+      searchType:Constants.searchType.radio, 
+      value:1, 
+      options: [
+        {
+          "text": "可售量升序",
+          "value": 1
+        },
+        {
+          "text": "可售量降序",
+          "value": 2
+        }
+      ],
+    }],
     popupTopObj: [{
       leftTitle: mixins.$t('storageNum'), leftCode: 'usableQty',
       rightTitle: mixins.$t('sellableQuantity'), rightCode: 'invQty'

+ 4 - 23
package-inventory/pages/ivt-warning-report/ivt-warning-report.wxml

@@ -2,30 +2,11 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
 <van-dialog id="van-dialog" />
-<dk-navbar titleFontColor="#000000" navbarTitle="库存预警" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
 <van-sticky offset-top="{{ 0 }}">
-  <view style="display: flex;">
-    <view style="width: 85%;">
-      <!-- 查询条件 -->
-      <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel','colorNumber'])}}">
-      </dk-dropdown-menu>
-    </view>
-
-    <view class="scan-class" style="width: 15%;display: flex;align-items: center;">
-      <image style="width: 40rpx;height: 40rpx;" class="scan-image" fit="fill" src="{{imageUrl+'/scan_image.png'}}"></image>
-    </view>
-  </view>
-
-
-  <van-dropdown-menu active-color="#1B365D" style=" width: calc(100% ) !important; ">
-    <!-- 库区 -->
-    <van-dropdown-item id="statusItemWareHouse" disabled="{{controlFlags.choosewhReadonly}}" title="{{ form.whNames ? form.whNames:$t['reservoirArea'] }}" bind:open="dropdowncommit">
-    </van-dropdown-item>
-    <!-- 可售量排序 SellableQuantityAsc-->
-    <van-dropdown-item title="{{ orderBy.text?orderBy.text:$t['SellableQuantityAsc'] }}" value="{{value}}" options="{{ orderBy }}" bind:change="onSwitchChange">
-    </van-dropdown-item>
-  </van-dropdown-menu>
-
+  <dk-navbar titleFontColor="#000000" navbarTitle="库存预警" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"  bind:getNavbarHeight="getNavbarHeight"/>
+  <!-- 查询条件 -->
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}"bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel','colorNumber'])}}">
+  </dk-dropdown-menu>
 </van-sticky>
 
 <view style="height:100%;background: #F8F9FD ;">

+ 0 - 8
package-inventory/pages/ivt-warning-report/ivt-warning-report.wxss

@@ -7,14 +7,6 @@
 	color: #ADB7C9;
 }
 
-.van-search {
-	background-color: transparent !important;
-}
-
-.van-nav-bar {
-	background-color: transparent !important;
-	color: #191919 !important;
-}
 
 .van-search__content {
 	background: #F8F9FD;

+ 1 - 1
package-inventory/pages/warehousing-processing/warehousing-processing.wxml

@@ -2,8 +2,8 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <van-dialog id="van-dialog" />
 <loading wx:if="{{loading}}"></loading>
-<dk-navbar titleFontColor="#000000" navbarTitle="入库办理" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="入库办理" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['orderNo','telephone','adddress'])}}">
   </dk-dropdown-menu>

+ 1 - 1
package-purchase/pages/supplier-list/supplier-list.wxml

@@ -3,9 +3,9 @@
 <loading wx:if="{{loading}}" ></loading>
 <!-- 添加模版 -->
 <import src="/utils/template.wxml" />
-<dk-navbar titleFontColor="#000000" navbarTitle="供应商列表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
 <template is="myTemplate" />
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="供应商列表" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
   <!-- 查询条件 --> 
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['supplierName','contactName','contactPhone'])}}">
   </dk-dropdown-menu>

+ 2 - 2
package-sales/pages/customer-collection/customer-collection.wxml

@@ -1,9 +1,9 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
-<!-- 自定义导航 -->
-<dk-navbar titleFontColor="#000000" navbarTitle="客户收款" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
 <van-sticky scroll-top="0">
+  <!-- 自定义导航 -->
+  <dk-navbar titleFontColor="#000000" navbarTitle="客户收款" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','orderNo','telephone','adddress','contractNumber'])}}">
   </dk-dropdown-menu>

+ 1 - 1
package-sales/pages/order-billing/add/add.js

@@ -338,7 +338,7 @@ Page({
       value = Number(e.detail.value)
       dataItem.factAmt = value
       //折扣 = (实际合计金额+优惠)/合计金额
-      dataItem.discount = Math.floor(((Number(value) + Number(dataItem.discAmt)) / Number(dataItem.sumAmount)) * 100)
+      dataItem.discount = dataItem.sumAmount? Math.floor(((Number(value) + Number(dataItem.discAmt)) / Number(dataItem.sumAmount)) * 100):0
       if (dataItem.sumAmount != 0) { //预防 算出的折扣是无线循环  差的金额 放到优惠上
         dataItem.discAmt = ((dataItem.sumAmount * (dataItem.discount / 100)) - dataItem.factAmt).toFixed(2)
       }

+ 2 - 2
package-sales/pages/order-billing/add/add.wxml

@@ -7,11 +7,11 @@
 bind:editItems="editItems"  bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList"bind:onCloseDel="deleteItemList" 
 bind:customersChoose="customersChoose" bind:changeCheckBox="changeCheckBox" bind:changePhoneblur="changePhoneblur"  popType="sale" priceTitle="" staff="staff" org="org"bind:openReverseCalculationPop="openReverseCalculationPop"reverseCalculationFlag="true"wholeOrderDiscountCol="discount"discountAmountCol="discAmt">
 </dk-form-bill>
-<van-dialog id="van-dialog" />
+<van-dialog id="van-dialog" />  
 <view style="height: 200rpx;"></view>
 
 <!--  保存 -->
-<dk-save-button id="saveButton"  model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" contentLineFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" bind:open="saveButton" contentList="{{contentSaveList}}" bind:change="saveChange"></dk-save-button>
+<dk-save-button id="saveButton"  model:value="{{btnFormData}}" btnAutoWidthFlag="{{formMode != 'add'}}" contentLineFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" bind:open="saveButton" contentList="{{contentSaveList}}" bind:change="saveChange"></dk-save-button>
 <!-- 修改价格反算 -->
 <dk-popup type="basic" title="修改价格"   value="{{dataItem}}" show="{{showReverseCalculationPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContentReverse}}" validFlag="{{true}}"  bind:blurNumberField ="blurNumberField"   bind:commit="editItemsReverse"  ></dk-popup>
 <!--  新手引导 -->

+ 1 - 1
package-sales/pages/order-billing/order-billing.wxml

@@ -2,8 +2,8 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <van-dialog id="van-dialog" />
 <loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
-<dk-navbar titleFontColor="#000000" navbarTitle="订单开单" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="订单开单" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','orderNo','telephone','adddress'])}}">
   </dk-dropdown-menu>

+ 1 - 1
package-sales/pages/order-return/order-return.wxml

@@ -1,8 +1,8 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<dk-navbar titleFontColor="#000000" navbarTitle="销售退货" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
 <loading wx:if="{{loading}}" ></loading>
 <van-sticky scroll-top="0">
+  <dk-navbar titleFontColor="#000000" navbarTitle="销售退货" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','orderNo','telephone','adddress'])}}">
   </dk-dropdown-menu>

+ 1 - 1
package-sales/pages/sales-outbound/sales-outbound.wxml

@@ -1,8 +1,8 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
-<dk-navbar titleFontColor="#000000" navbarTitle="销售出库" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
 <van-sticky scroll-top="0">  
+  <dk-navbar titleFontColor="#000000" navbarTitle="销售出库" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','orderNo','telephone','adddress'])}}">
   </dk-dropdown-menu>

+ 1 - 1
package-sales/pages/sales-tracking-report/sales-tracking-report.wxml

@@ -3,7 +3,7 @@
 <loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
 <van-sticky scroll-top="0">
   <!-- 查询条件 -->
-  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','orderNo','telephone','adddress'])}}">
+  <dk-dropdown-menu model:value="{{searchForm}}" navBarHeight="{{navBarHeight}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','orderNo','telephone','adddress'])}}">
   </dk-dropdown-menu>
  
 </van-sticky>

+ 61 - 0
pages/ec-canvas/ec-canvas-new.js

@@ -0,0 +1,61 @@
+// package3/pages/ec-canvas/ec-canvas-new.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+   
+})

+ 3 - 0
pages/ec-canvas/ec-canvas-new.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/ec-canvas/ec-canvas-new.wxml

@@ -0,0 +1,2 @@
+<!--package3/pages/ec-canvas/ec-canvas-new.wxml-->
+<text>package3/pages/ec-canvas/ec-canvas-new.wxml</text>

+ 1 - 0
pages/ec-canvas/ec-canvas-new.wxss

@@ -0,0 +1 @@
+/* package3/pages/ec-canvas/ec-canvas-new.wxss */

+ 250 - 0
pages/ec-canvas/ec-canvas.js

@@ -0,0 +1,250 @@
+import WxCanvas from './wx-canvas';
+import * as echarts from './echarts.min';
+
+let ctx;
+
+function compareVersion(v1, v2) {
+  v1 = v1.split('.')
+  v2 = v2.split('.')
+  const len = Math.max(v1.length, v2.length)
+
+  while (v1.length < len) {
+    v1.push('0')
+  }
+  while (v2.length < len) {
+    v2.push('0')
+  }
+
+  for (let i = 0; i < len; i++) {
+    const num1 = parseInt(v1[i])
+    const num2 = parseInt(v2[i])
+
+    if (num1 > num2) {
+      return 1
+    } else if (num1 < num2) {
+      return -1
+    }
+  }
+  return 0
+}
+
+Component({
+  properties: {
+    canvasId: {
+      type: String,
+      value: 'ec-canvas'
+    },
+
+    ec: {
+      type: Object
+    },
+
+    forceUseOldCanvas: {
+      type: Boolean,
+      value: false
+    }
+  },
+
+  data: {
+    isUseNewCanvas: false
+  },
+
+  ready: function () {
+    // Disable prograssive because drawImage doesn't support DOM as parameter
+    // See https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html
+    echarts.registerPreprocessor(option => {
+      if (option && option.series) {
+        if (option.series.length > 0) {
+          option.series.forEach(series => {
+            series.progressive = 0;
+          });
+        }
+        else if (typeof option.series === 'object') {
+          option.series.progressive = 0;
+        }
+      }
+    });
+
+    if (!this.data.ec) {
+      console.warn('组件需绑定 ec 变量,例:<ec-canvas id="mychart-dom-bar" '
+        + 'canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>');
+      return;
+    }
+
+    if (!this.data.ec.lazyLoad) {
+      this.init();
+    }
+  },
+
+  methods: {
+    init: function (callback) {
+      const version = wx.getSystemInfoSync().SDKVersion
+
+      const canUseNewCanvas = compareVersion(version, '2.9.0') >= 0;
+      const forceUseOldCanvas = this.data.forceUseOldCanvas;
+      const isUseNewCanvas = canUseNewCanvas && !forceUseOldCanvas;
+      this.setData({ isUseNewCanvas });
+
+      if (forceUseOldCanvas && canUseNewCanvas) {
+        console.warn('开发者强制使用旧canvas,建议关闭');
+      }
+
+      if (isUseNewCanvas) {
+      
+        // 2.9.0 可以使用 <canvas type="2d"></canvas>
+        this.initByNewWay(callback);
+      } else {
+        const isValid = compareVersion(version, '1.9.91') >= 0
+        if (!isValid) {
+          console.error('微信基础库版本过低,需大于等于 1.9.91。'
+            + '参见:https://github.com/ecomfe/echarts-for-weixin'
+            + '#%E5%BE%AE%E4%BF%A1%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82');
+          return;
+        } else {
+          console.warn('建议将微信基础库调整大于等于2.9.0版本。升级后绘图将有更好性能');
+          this.initByOldWay(callback);
+        }
+      }
+    },
+
+    initByOldWay(callback) {
+      // 1.9.91 <= version < 2.9.0:原来的方式初始化
+      ctx = wx.createCanvasContext(this.data.canvasId, this);
+      const canvas = new WxCanvas(ctx, this.data.canvasId, false);
+
+      echarts.setCanvasCreator(() => {
+        return canvas;
+      });
+      // const canvasDpr = wx.getSystemInfoSync().pixelRatio // 微信旧的canvas不能传入dpr
+      const canvasDpr = 1
+      var query = wx.createSelectorQuery().in(this);
+      query.select('.ec-canvas').boundingClientRect(res => {
+        if (typeof callback === 'function') {
+          this.chart = callback(canvas, res.width, res.height, canvasDpr);
+        }
+        else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
+          this.chart = this.data.ec.onInit(canvas, res.width, res.height, canvasDpr);
+        }
+        else {
+          this.triggerEvent('init', {
+            canvas: canvas,
+            width: res.width,
+            height: res.height,
+            canvasDpr: canvasDpr // 增加了dpr,可方便外面echarts.init
+          });
+        }
+      }).exec();
+    },
+
+    initByNewWay(callback) {
+      // version >= 2.9.0:使用新的方式初始化
+      const query = wx.createSelectorQuery().in(this)
+      query
+        .select('.ec-canvas')
+        .fields({ node: true, size: true })
+        .exec(res => {
+          const canvasNode = res[0].node
+          this.canvasNode = canvasNode
+
+          const canvasDpr = wx.getSystemInfoSync().pixelRatio
+          const canvasWidth = res[0].width
+          const canvasHeight = res[0].height
+
+          const ctx = canvasNode.getContext('2d')
+
+          const canvas = new WxCanvas(ctx, this.data.canvasId, true, canvasNode)
+          echarts.setCanvasCreator(() => {
+            return canvas
+          })
+
+          if (typeof callback === 'function') {
+            this.chart = callback(canvas, canvasWidth, canvasHeight, canvasDpr)
+          } else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
+            this.chart = this.data.ec.onInit(canvas, canvasWidth, canvasHeight, canvasDpr)
+          } else {
+            this.triggerEvent('init', {
+              canvas: canvas,
+              width: canvasWidth,
+              height: canvasHeight,
+              dpr: canvasDpr
+            })
+          }
+        })
+    },
+    canvasToTempFilePath(opt) {
+      if (this.data.isUseNewCanvas) {
+        // 新版
+        const query = wx.createSelectorQuery().in(this)
+        query
+          .select('.ec-canvas')
+          .fields({ node: true, size: true })
+          .exec(res => {
+            const canvasNode = res[0].node
+            opt.canvas = canvasNode
+            wx.canvasToTempFilePath(opt)
+          })
+      } else {
+        // 旧的
+        if (!opt.canvasId) {
+          opt.canvasId = this.data.canvasId;
+        }
+        ctx.draw(true, () => {
+          wx.canvasToTempFilePath(opt, this);
+        });
+      }
+    },
+
+    touchStart(e) {
+      if (this.chart && e.touches.length > 0) {
+        var touch = e.touches[0];
+        var handler = this.chart.getZr().handler;
+        handler.dispatch('mousedown', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.dispatch('mousemove', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.processGesture(wrapTouch(e), 'start');
+      }
+    },
+
+    touchMove(e) {
+      if (this.chart && e.touches.length > 0) {
+        var touch = e.touches[0];
+        var handler = this.chart.getZr().handler;
+        handler.dispatch('mousemove', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.processGesture(wrapTouch(e), 'change');
+      }
+    },
+
+    touchEnd(e) {
+      if (this.chart) {
+        const touch = e.changedTouches ? e.changedTouches[0] : {};
+        var handler = this.chart.getZr().handler;
+        handler.dispatch('mouseup', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.dispatch('click', {
+          zrX: touch.x,
+          zrY: touch.y
+        });
+        handler.processGesture(wrapTouch(e), 'end');
+      }
+    }
+  }
+});
+
+function wrapTouch(event) {
+  for (let i = 0; i < event.touches.length; ++i) {
+    const touch = event.touches[i];
+    touch.offsetX = touch.x;
+    touch.offsetY = touch.y;
+  }
+  return event;
+}

+ 4 - 0
pages/ec-canvas/ec-canvas.json

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

+ 4 - 0
pages/ec-canvas/ec-canvas.wxml

@@ -0,0 +1,4 @@
+<!-- 新的:接口对其了H5 -->
+<canvas wx:if="{{isUseNewCanvas}}" type="2d" class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>
+<!-- 旧的 -->
+<canvas wx:else class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>

+ 4 - 0
pages/ec-canvas/ec-canvas.wxss

@@ -0,0 +1,4 @@
+.ec-canvas {
+  width: 100%;
+  height: 100%;
+}

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
pages/ec-canvas/echarts.min.js


+ 121 - 0
pages/ec-canvas/wx-canvas.js

@@ -0,0 +1,121 @@
+export default class WxCanvas {
+  constructor(ctx, canvasId, isNew, canvasNode) {
+    this.ctx = ctx;
+    this.canvasId = canvasId;
+    this.chart = null;
+    this.isNew = isNew
+    if (isNew) {
+      this.canvasNode = canvasNode;
+    }
+    else {
+      this._initStyle(ctx);
+    }
+
+    // this._initCanvas(zrender, ctx);
+
+    this._initEvent();
+  }
+
+  getContext(contextType) {
+    if (contextType === '2d') {
+      return this.ctx;
+    }
+  }
+
+  // canvasToTempFilePath(opt) {
+  //   if (!opt.canvasId) {
+  //     opt.canvasId = this.canvasId;
+  //   }
+  //   return wx.canvasToTempFilePath(opt, this);
+  // }
+
+  setChart(chart) {
+    this.chart = chart;
+  }
+
+  attachEvent() {
+    // noop
+  }
+
+  detachEvent() {
+    // noop
+  }
+
+  _initCanvas(zrender, ctx) {
+    zrender.util.getContext = function () {
+      return ctx;
+    };
+
+    zrender.util.$override('measureText', function (text, font) {
+      ctx.font = font || '12px sans-serif';
+      return ctx.measureText(text);
+    });
+  }
+
+  _initStyle(ctx) {
+    var styles = ['fillStyle', 'strokeStyle', 'globalAlpha',
+      'textAlign', 'textBaseAlign', 'shadow', 'lineWidth',
+      'lineCap', 'lineJoin', 'lineDash', 'miterLimit', 'fontSize'];
+
+    styles.forEach(style => {
+      Object.defineProperty(ctx, style, {
+        set: value => {
+          if (style !== 'fillStyle' && style !== 'strokeStyle'
+            || value !== 'none' && value !== null
+          ) {
+            ctx['set' + style.charAt(0).toUpperCase() + style.slice(1)](value);
+          }
+        }
+      });
+    });
+
+    ctx.createRadialGradient = () => {
+      return ctx.createCircularGradient(arguments);
+    };
+  }
+
+  _initEvent() {
+    this.event = {};
+    const eventNames = [{
+      wxName: 'touchStart',
+      ecName: 'mousedown'
+    }, {
+      wxName: 'touchMove',
+      ecName: 'mousemove'
+    }, {
+      wxName: 'touchEnd',
+      ecName: 'mouseup'
+    }, {
+      wxName: 'touchEnd',
+      ecName: 'click'
+    }];
+
+    eventNames.forEach(name => {
+      this.event[name.wxName] = e => {
+        const touch = e.touches[0];
+        this.chart.getZr().handler.dispatch(name.ecName, {
+          zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
+          zrY: name.wxName === 'tap' ? touch.clientY : touch.y
+        });
+      };
+    });
+  }
+
+  set width(w) {
+    if (this.canvasNode) this.canvasNode.width = w
+  }
+  set height(h) {
+    if (this.canvasNode) this.canvasNode.height = h
+  }
+
+  get width() {
+    if (this.canvasNode)
+      return this.canvasNode.width
+    return 0
+  }
+  get height() {
+    if (this.canvasNode)
+      return this.canvasNode.height
+    return 0
+  }
+}

+ 28 - 4
pages/home-page/home-page.js

@@ -19,6 +19,8 @@ Page({
    * 页面的初始数据
    */
   data: {
+    // 语言包
+    $t: app.globalData.lang,
     swiperList: [
       {
         title: '本月数据',
@@ -139,7 +141,8 @@ Page({
     ],
     // 功能模块组件高度和宽度
     funcViewHeight: 0,
-    funcViewWidth: 0
+    funcViewWidth: 0,
+    freeVersionFlag: true,
   },
   /**
   * @desc : 切换公司
@@ -269,7 +272,16 @@ Page({
     let service = app.globalData['comMenuService']
     api.request(service.prefix + service.selectMenu, 'POST', params).then(res => {
       if (res.data.code == Constants.SUCESS_CODE) {
+        /**
+         * 过滤Vip标识
+         */
         let comMenuList = res.data.data
+        const menus = app.globalData.menus
+        console.log('menus', menus);
+        comMenuList.forEach(res => {
+          const comMenus = menus.filter(menu => menu.menuUuid === res.menuUuid)
+          res.isVip = comMenus[comMenus.length - 1].isVip
+        })
         // 如果标准版把销售出库 修改为订单开单
         // if (app.globalData.company.gradeCode == Constants.gradeCode.STD) {
         //   let filters = comMenuList.filter(it => it.objectCode == 'order-out');
@@ -329,12 +341,19 @@ Page({
       util.showToast('没有该功能权限');
       return;
     }
+    let companyVip = app.globalData.company.vip
+    if(e.currentTarget.dataset.item.isVip){      
+      if(!companyVip){
+        util.showToast('此功能为Vip功能!')
+        return;
+      }
+    }
     // 打开页面
     if (item.objectPath || item.url) {
       wx.navigateTo({
         url: item.objectPath ? item.objectPath : item.url,
         success: function (res) {
-          res.eventChannel.emit('params', { formMode: 'index', menuUuid: menuUuid ,guideUrl:guideUrl})
+          res.eventChannel.emit('params', { formMode: 'index', menuUuid: menuUuid, guideUrl: guideUrl })
         }
       })
     }
@@ -409,6 +428,11 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    const gradeCode = app.globalData.company.gradeCode;
+    console.log('gradeCode', gradeCode);
+    this.setData({
+      freeVersionFlag: gradeCode === 'STD'
+    })
     // 如果企业还有15天到期给出提示信息
     let company = app.globalData.company;
     if (company && company.endDate) {
@@ -460,7 +484,7 @@ Page({
           res.eventChannel.emit('params', { formType: openid, formMode: Constants.formMode.index })
         }
       })
-    }else if(options.buy){
+    } else if (options.buy) {
       wx.navigateTo({
         url: '/package-basic-data/pages/staff/staff',
         success: function (res) {
@@ -547,6 +571,6 @@ Page({
     wx.navigateTo({
       url: '/package-basic-data/pages/register/product-detail/product-detail',
     })
-  }
+  },
 })
 

+ 7 - 4
pages/home-page/home-page.wxml

@@ -26,7 +26,7 @@
         <view class="content-data-items">
           <!--成交额-->
           <view class="content-data-item">
-            <view class="content-data-item-title">
+            <view class="content-data-item-title" >
               <image src="{{imageUrl + 'right.png'}}" style="width: 28rpx;height:28rpx;margin-right: 10rpx;"></image>
               {{$t['transactionAmount']}}
             </view>
@@ -54,6 +54,9 @@
   <view class="com-menu-class">
     <view style="display: flex;flex-wrap: wrap;padding: 10rpx 0 20rpx 0;">
       <view class="app-item" style="width:20%;text-align: center;margin-top: 15rpx;margin-bottom: 15rpx;" wx:for="{{comMenuList}}" wx:for-item="item" data-code="{{item.menuUuid}}" data-url="{{item.objectPath}}" data-item="{{item}}" bindtap="toApp" wx:key="i">
+        <view wx:if="{{item.isVip}}" class="vip-icon-view">
+          <image src="{{imageUrl + 'diamond.png'}} " class="icon-title_vip" />
+        </view>
         <image src="{{item.objectIcon?(imageUrl + item.objectIcon ):''}}" style="height: 80rpx;width:80rpx;"></image>
         <view class="index-grid-item-text-class">{{item.menuName}}</view>
       </view>
@@ -62,10 +65,10 @@
 
   <!--广告-->
   <view wx:if="{{advertisementList && advertisementList.length > 0}}">
-    <swiper indicator-dots="{{true}}" autoplay="true" interval="10000">
+    <swiper indicator-dots="{{true}}" autoplay="true" interval="10000" style="height: 200rpx;">
       <block wx:for="{{advertisementList}}" wx:key="{{index}}" wx:for-item="item">
         <swiper-item>
-          <image src="{{item.adPath}}" mode="aspectFill" data-item="{{item}}" catchtap="handClickImage" />
+          <image src="{{item.adPath}}" mode="aspectFill" style="height: 200rpx;" data-item="{{item}}" catchtap="handClickImage" />
         </swiper-item>
       </block>
     </swiper>
@@ -75,7 +78,7 @@
   <view wx:if="{{advertisementList && advertisementList.length == 0}}" style="margin-top: 10rpx;"></view>
   <view class="func">
     <!-- 水印模块 -->
-    <view class="permissions-masks-fa" catchtap="masksClick" style="height: {{ funcViewHeight }}px;">
+    <view class="permissions-masks-fa" wx:if="{{freeVersionFlag}}" catchtap="masksClick" style="height: {{ funcViewHeight }}px;">
       <canvas canvas-id="watermarkCanvas" id="watermarkCanvas" style="width: {{funcViewWidth}}px; height: {{ funcViewHeight }}px;"></canvas>
     </view>
     <view style="display:flex;flex-wrap: wrap;justify-content: center;">

+ 14 - 0
pages/home-page/home-page.wxss

@@ -371,4 +371,18 @@ image {
   display: flex;
   justify-content: center;
   align-items: center;
+}
+
+.vip-icon-view{
+  width: 100%;
+  position: relative;
+  z-index: 1000;
+}
+
+.icon-title_vip {
+  width: 40rpx;
+  height: 40rpx;
+  position: absolute;
+  left: 15rpx;
+  top: 1rpx;
 }

+ 1 - 1
pages/index/index.wxss

@@ -135,5 +135,5 @@ page {
   width: 40rpx;
   height: 40rpx;
   position: absolute;
-  left: 15rpx;
+  left: 35rpx;
 }

+ 4 - 0
utils/Constants.js

@@ -193,6 +193,10 @@ module.exports = {
     //详情编辑
     detailEdit: 'detailEdit'
   },
+  //是否返回原始页面
+  formReturnMode:{
+    beginnerGuide:'beginnerGuide'
+  },
   formType: {
     shopping: 'shopping'
   },

Некоторые файлы не были показаны из-за большого количества измененных файлов