浏览代码

Merge branch 'master' of http://s.dev01.dkiboss.com:9001/iBOSS-2.0-Mini/iboss_wx_app

hongxudong 1 年之前
父节点
当前提交
9ec84eed47
共有 100 个文件被更改,包括 3129 次插入854 次删除
  1. 27 0
      api/pages/ivt/inboundItem.js
  2. 21 18
      api/pages/ivt/saleOutBound.js
  3. 19 16
      api/pages/ivt/saleOutBoundReturn.js
  4. 3 3
      api/pages/mst/staff.js
  5. 2 0
      api/pages/report/report.js
  6. 4 1
      api/pages/sale/order.js
  7. 2 1
      app.js
  8. 7 3
      app.json
  9. 7 0
      components/dkbase/dk-cell/dk-cell.js
  10. 10 4
      components/dkbase/dk-cell/dk-cell.wxml
  11. 1 0
      components/dkbase/dk-cell/dk-cell.wxss
  12. 179 42
      components/dkbase/dk-form-bill/dk-form-bill.js
  13. 26 18
      components/dkbase/dk-form-bill/dk-form-bill.wxml
  14. 45 2
      components/dkbase/dk-form/dk-form.js
  15. 14 3
      components/dkbase/dk-form/dk-form.wxml
  16. 29 1
      components/dkbase/dk-list/dk-list.js
  17. 21 5
      components/dkbase/dk-list/dk-list.wxml
  18. 97 0
      components/dkbase/dk-navbar/dk-navbar.js
  19. 4 0
      components/dkbase/dk-navbar/dk-navbar.json
  20. 28 0
      components/dkbase/dk-navbar/dk-navbar.wxml
  21. 39 0
      components/dkbase/dk-navbar/dk-navbar.wxss
  22. 4 0
      components/dkbase/dk-number-input/dk-number-input.js
  23. 1 1
      components/dkbase/dk-number-input/dk-number-input.wxml
  24. 6 1
      components/dkbase/dk-number-input/dk-number-input.wxss
  25. 15 1
      components/dkbase/dk-popup/dk-popup.js
  26. 8 5
      components/dkbase/dk-popup/dk-popup.wxml
  27. 1 1
      components/dkbase/dk-save-button/dk-save-button.wxml
  28. 5 0
      components/dkbase/dk-side-pull-menu/dk-side-pull-menu.js
  29. 1 1
      components/dkbase/dk-side-pull-menu/dk-side-pull-menu.wxml
  30. 1 1
      components/dkbase/dk-title/dk-title.wxml
  31. 9 9
      components/dkbase/dk-tree-form/dk-tree-form.wxml
  32. 5 1
      components/dkbusiness/dk-dropdown-menu/dk-dropdown-menu.js
  33. 4 3
      components/dkbusiness/dk-dropdown-menu/dk-dropdown-menu.wxml
  34. 10 0
      components/dkbusiness/dk-muti-dropdown-item/dk-muti-dropdown-item.js
  35. 3 3
      components/dkbusiness/dk-muti-dropdown-item/dk-muti-dropdown-item.wxml
  36. 1 1
      components/dkbusiness/dk-single-dropdown-item/dk-single-dropdown-item.wxml
  37. 1 1
      config/config.js
  38. 17 2
      i18n/zh-CN.js
  39. 6 0
      jsconfig.json
  40. 88 21
      mixins/index.js
  41. 5 4
      package-base-select/pages/select-choose-coordination/select-choose-coordination.js
  42. 253 213
      package-base-select/pages/select-goods/select-goods.js
  43. 3 3
      package-base-select/pages/select-goods/select-goods.wxml
  44. 1 1
      package-base-select/pages/select-source-sale-order/select-source-sale-order.js
  45. 289 32
      package-basic-data/pages/activity/activity.js
  46. 1 2
      package-basic-data/pages/activity/activity.json
  47. 119 75
      package-basic-data/pages/activity/activity.wxml
  48. 49 0
      package-basic-data/pages/activity/activity.wxss
  49. 36 18
      package-basic-data/pages/activity/detail/detail.js
  50. 9 4
      package-basic-data/pages/activity/detail/detail.wxml
  51. 20 1
      package-basic-data/pages/activity/detail/detail.wxss
  52. 2 1
      package-basic-data/pages/basic-data/basic-data.json
  53. 1 0
      package-basic-data/pages/basic-data/basic-data.wxml
  54. 1 3
      package-basic-data/pages/basic-data/basic-data.wxss
  55. 228 0
      package-basic-data/pages/beginner-guide/beginner-guide.js
  56. 4 0
      package-basic-data/pages/beginner-guide/beginner-guide.json
  57. 41 0
      package-basic-data/pages/beginner-guide/beginner-guide.wxml
  58. 67 0
      package-basic-data/pages/beginner-guide/beginner-guide.wxss
  59. 10 8
      package-basic-data/pages/customer-list/add/add.js
  60. 2 1
      package-basic-data/pages/customer-list/customer-list.json
  61. 2 1
      package-basic-data/pages/customer-list/customer-list.wxml
  62. 29 15
      package-basic-data/pages/customer-list/detail/detail.js
  63. 4 59
      package-basic-data/pages/customer-list/detail/detail.wxml
  64. 2 1
      package-basic-data/pages/product-attribute/product-attribute.json
  65. 1 0
      package-basic-data/pages/product-attribute/product-attribute.wxml
  66. 0 2
      package-basic-data/pages/product-attribute/product-attribute.wxss
  67. 23 3
      package-basic-data/pages/product-file/add/add.js
  68. 1 0
      package-basic-data/pages/product-file/product-file.js
  69. 2 1
      package-basic-data/pages/product-file/product-file.json
  70. 3 2
      package-basic-data/pages/product-file/product-file.wxml
  71. 0 2
      package-basic-data/pages/product-file/product-file.wxss
  72. 1 10
      package-basic-data/pages/register/product-detail/product-detail.js
  73. 1 4
      package-basic-data/pages/register/product-detail/product-detail.wxml
  74. 12 8
      package-basic-data/pages/staff/staff.js
  75. 2 1
      package-basic-data/pages/staff/staff.json
  76. 3 1
      package-basic-data/pages/staff/staff.wxml
  77. 2 1
      package-business-analysis/pages/cus-rec-pay-report/cus-rec-pay-report.json
  78. 8 14
      package-business-analysis/pages/cus-rec-pay-report/cus-rec-pay-report.wxml
  79. 58 34
      package-business-analysis/pages/detail-report/detail-report.js
  80. 2 1
      package-business-analysis/pages/detail-report/detail-report.json
  81. 2 1
      package-business-analysis/pages/detail-report/detail-report.wxml
  82. 92 63
      package-inventory/pages/cost-check/add/add.js
  83. 2 1
      package-inventory/pages/cost-check/add/add.json
  84. 5 2
      package-inventory/pages/cost-check/add/add.wxml
  85. 271 52
      package-inventory/pages/cost-check/cost-check.js
  86. 2 1
      package-inventory/pages/cost-check/cost-check.json
  87. 53 2
      package-inventory/pages/cost-check/cost-check.wxml
  88. 3 1
      package-inventory/pages/cost-check/cost-check.wxss
  89. 20 1
      package-inventory/pages/ivt-detail-report/ivt-detail-report.js
  90. 2 1
      package-inventory/pages/ivt-detail-report/ivt-detail-report.json
  91. 4 23
      package-inventory/pages/ivt-detail-report/ivt-detail-report.wxml
  92. 2 5
      package-inventory/pages/ivt-detail-report/ivt-detail-report.wxss
  93. 26 3
      package-inventory/pages/ivt-sum-report/detail/detail.js
  94. 1 1
      package-inventory/pages/ivt-sum-report/detail/detail.wxml
  95. 2 1
      package-inventory/pages/ivt-sum-report/ivt-sum-report.json
  96. 2 1
      package-inventory/pages/ivt-sum-report/ivt-sum-report.wxml
  97. 358 0
      package-inventory/pages/ivt-warning-report/ivt-warning-report.js
  98. 5 0
      package-inventory/pages/ivt-warning-report/ivt-warning-report.json
  99. 62 0
      package-inventory/pages/ivt-warning-report/ivt-warning-report.wxml
  100. 147 0
      package-inventory/pages/ivt-warning-report/ivt-warning-report.wxss

+ 27 - 0
api/pages/ivt/inboundItem.js

@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:入库
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		于继渤		  	     2024-1-19       			1.00		       	新建
+ *******************************************************************************/
+module.exports = {
+  inboundItemService: {
+      // 前缀
+      prefix: 'mdm-server/ivt/inboundItem/', 
+      costCheckOk:'cost_check_ok',
+      selectCostCheck:'select_cost_check',
+
+  },
+
+  routeUrl: {
+    inboundItem: { 
+      add: { key: 'add', url: '/package-inventory/pages/cost-check/add/add'  },
+      chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-data/select-data',type:'staff'  },
+      chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-data/select-data',type:'org' }, 
+      chooseIntType: { key: 'chooseIntType',url: '/package-base-select/pages/select-data/select-data',type:'kindData' ,kindType:'入库类型'}, 
+    }
+  } 
+};

+ 21 - 18
api/pages/ivt/saleOutBound.js

@@ -14,32 +14,35 @@ module.exports = {
     outboundInsert: 'outbound_insert',
     outboundUpdate: 'outbound_update',
     handleOutbound: 'handle_outbound',
-    getOutboundForUpdate:'get_outbound_for_update',
-    repeal:'repeal',
-    selectByCondDetail:'select_by_cond_detail', //总单带明细 
-    outboundInsertCollection:'outbound_insert_collection',
+    getOutboundForUpdate: 'get_outbound_for_update',
+    repeal: 'repeal',
+    selectByCondDetail: 'select_by_cond_detail', //总单带明细 
+    outboundInsertCollection: 'outbound_insert_collection',
     saleOrderOutboundCancel: 'sale_order_outbound_cancel',
   },
 
   routeUrl: {
-    saleOutBound: { 
-      docName:{key:'order_out' ,title:'销售单'},
-      add:{key:'add',url:'/package-sales/pages/sales-outbound/add/add'},
-      edit:{key:'edit',url:'/package-sales/pages/sales-outbound/add/add',idKey:'outId',formType:'detail'},
-      selectSourceSaleOrder:{
-        key:'selectSourceSaleOrder',url:'/package-base-select/pages/select-source-sale-order/select-source-sale-order'
+    saleOutBound: {
+      docName: { key: 'order_out', title: '销售单' },
+      add: { key: 'add', url: '/package-sales/pages/sales-outbound/add/add' },
+      edit: { key: 'edit', url: '/package-sales/pages/sales-outbound/add/add', idKey: 'outId', formType: 'detail' },
+      selectSourceSaleOrder: {
+        key: 'selectSourceSaleOrder', url: '/package-base-select/pages/select-source-sale-order/select-source-sale-order'
       },
-      
+
       selectCustomers: { key: 'selectCustomers', url: '/package-base-select/pages/select-customers/select-customers' },
-      openingInventory: { key: 'openingInventory', url: '/package-base-select/pages/select-data/select-data',type:'warehouse'  },
-      selectInventorySku:{ key: 'selectInventorySku', url: '/package-base-select/pages/select-data/select-data',type:'inventorySku'  },
-      invalid: { key: 'invalid', method: 'invalid', primaryKey: 'outId' , image:'btn-void.png'},
-      editInto: { key: 'editInto', method: 'editInto', primaryKey: 'outId', image: 'btn-edit.png'}, //编辑
-      salesOutbound:{ key: 'salesOutbound', method: 'toDetail', primaryKey: 'outId' , image:'btn-outbound-processing.png'},
-      printedBill:{ key: 'printedBill', method:'printedBill', formMode: 'index', idKey: 'outId',image:'btn-printing.png' },
-      saleOrderReturn: { key: 'saleOrderReturn', url: '/package-sales/pages/order-return/add/add' , image:'btn-sales-returns.png', tipMethod: 'isAllowedSaleOrderReturn'},
+      openingInventory: { key: 'openingInventory', url: '/package-base-select/pages/select-data/select-data', type: 'warehouse' },
+      selectInventorySku: { key: 'selectInventorySku', url: '/package-base-select/pages/select-data/select-data', type: 'inventorySku' },
+      invalid: { key: 'invalid', method: 'invalid', primaryKey: 'outId', image: 'btn-void.png' },
+      editInto: { key: 'editInto', method: 'editInto', primaryKey: 'outId', image: 'btn-edit.png' }, //编辑
+      salesOutbound: { key: 'salesOutbound', method: 'toDetail', primaryKey: 'outId', image: 'btn-outbound-processing.png' },
+      printedBill: { key: 'printedBill', method: 'printedBill', formMode: 'index', idKey: 'outId', image: 'btn-printing.png' },
+      saleOrderReturn: { key: 'saleOrderReturn', url: '/package-sales/pages/order-return/add/add', image: 'btn-sales-returns.png', tipMethod: 'isAllowedSaleOrderReturn' },
       cusReturnCollection: { key: 'cusReturnCollection', url: '/package-sales/pages/customer-collection/refund/refund', idKey: 'rpId', formMode: 'edit', image: 'btn-customer-refund.png' },
       cusCollection: { key: 'cusCollection', url: '/package-sales/pages/customer-collection/add/add', idKey: 'receivableId', formMode: 'edit', image: 'btn-customer-collection.png' },
+      detailCustomer: {
+        key: 'detailCustomer', url: '/package-basic-data/pages/customer-list/detail/detail'
+      },
     }
   }
 };

+ 19 - 16
api/pages/ivt/saleOutBoundReturn.js

@@ -13,29 +13,32 @@ module.exports = {
     prefix: 'mdm-server/ivt/outbound_sale_return/',
     outboundInsert: 'outbound_insert', //新建
     saleReturnHandleOutbound: 'handle_outbound', //办理
-    saleReturnOutboundCancel: 'outbound_cancel' ,//撤销
+    saleReturnOutboundCancel: 'outbound_cancel',//撤销
     otherOutboundUpdate: 'outbound_update', //编辑
     repeal: 'repeal', //作废
     getOutReturnForUpdate: 'get_out_return_for_update', //作废
-    saleReturnOutboundCancel:'outbound_cancel',
-    outboundInsertRefund:'outbound_insert_refund',//新建销售退货 退款
-    getOutReturnForUpdateWx:'get_out_return_for_update_wx',//新建销售退货 退款
+    saleReturnOutboundCancel: 'outbound_cancel',
+    outboundInsertRefund: 'outbound_insert_refund',//新建销售退货 退款
+    getOutReturnForUpdateWx: 'get_out_return_for_update_wx',//新建销售退货 退款
   },
 
   routeUrl: {
-    saleOutBoundReturn: { 
-      add:{key:'add',url:'/package-sales/pages/order-return/add/add'},
-      edit:{key:'edit',url:'/package-sales/pages/order-return/add/add',idKey:'outId',formType:'detail'},
-      selectSourceSaleOrder:{
-        key:'selectSourceSaleOrder',url:'/package-base-select/pages/select-source-sale-out-order/select-source-sale-out-order' , primaryKey: 'cusId'
-      }, 
+    saleOutBoundReturn: {
+      add: { key: 'add', url: '/package-sales/pages/order-return/add/add' },
+      edit: { key: 'edit', url: '/package-sales/pages/order-return/add/add', idKey: 'outId', formType: 'detail' },
+      selectSourceSaleOrder: {
+        key: 'selectSourceSaleOrder', url: '/package-base-select/pages/select-source-sale-out-order/select-source-sale-out-order', primaryKey: 'cusId'
+      },
       selectCustomers: { key: 'selectCustomers', url: '/package-base-select/pages/select-customers/select-customers' },
-      openingInventory: { key: 'openingInventory', url: '/package-base-select/pages/select-data/select-data',type:'warehouse'  },
-      selectInventorySku:{ key: 'selectInventorySku', url: '/package-base-select/pages/select-data/select-data',type:'inventorySku'  },
-      invalid: { key: 'invalid', method: 'invalid', primaryKey: 'outId' , image:'btn-void.png'},
-      salesOutReturnBound:{ key: 'salesOutReturnBound', method: 'toDetail', primaryKey: 'outId' , image:'btn-outbound-processing.png'},
-      printedBill:{ key: 'printedBill', method:'printedBill', formMode: 'index', idKey: 'cusId',image:'btn-printing.png' },
-      editInto: { key: 'editInto', method: 'editInto', primaryKey: 'outId', image: 'btn-edit.png'}, //编辑
+      openingInventory: { key: 'openingInventory', url: '/package-base-select/pages/select-data/select-data', type: 'warehouse' },
+      selectInventorySku: { key: 'selectInventorySku', url: '/package-base-select/pages/select-data/select-data', type: 'inventorySku' },
+      invalid: { key: 'invalid', method: 'invalid', primaryKey: 'outId', image: 'btn-void.png' },
+      salesOutReturnBound: { key: 'salesOutReturnBound', method: 'toDetail', primaryKey: 'outId', image: 'btn-outbound-processing.png' },
+      printedBill: { key: 'printedBill', method: 'printedBill', formMode: 'index', idKey: 'cusId', image: 'btn-printing.png' },
+      editInto: { key: 'editInto', method: 'editInto', primaryKey: 'outId', image: 'btn-edit.png' }, //编辑
+      detailCustomer: {
+        key: 'detailCustomer', url: '/package-basic-data/pages/customer-list/detail/detail'
+      },
     }
   }
 };

+ 3 - 3
api/pages/mst/staff.js

@@ -20,15 +20,15 @@ module.exports = {
             // 用name代替url,为了传递params,params和url不能一起使用
             add: { key: 'add', url: './add/add' },
             edit: { key: 'edit', url: './add/add' },
-            chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-data/select-data',type:'org' }, 
+            chooseOrg: { key: 'chooseOrg', url: '/package-base-select/pages/select-data/select-data', type: 'org' },
             chooseRole: { key: 'chooseRole', url: '/package-base-select/pages/select-data/select-data', type: 'role', chooseFlag: true },
             // 功能权限
             staffRight: { key: 'staffRight', url: '/package-base-select/pages/select-staff-right/select-staff-right', image: 'btn-functional-permissions.png', valid: true },
             // 范围权限
             staffPurview: { key: 'staffPurview', url: '/package-base-select/pages/select-staff-purview/select-staff-purview', image: 'btn-data-qua.png' },
             // 离职
-            leaveOffice: { key: 'leaveOffice', method: 'leaveOffice', image: 'btn-resignation.png',question:true },
-
+            leaveOffice: { key: 'leaveOffice', method: 'leaveOffice', image: 'btn-resignation.png', question: true },
+            buy: { key: 'buy', url: '/package-basic-data/pages/activity/activity' }
         }
     }
 };

+ 2 - 0
api/pages/report/report.js

@@ -47,6 +47,8 @@ module.exports = {
       edit: { key: 'edit', url: '/package-purchase/pages/pur-track-report/detail/detail' },
       editIvtSum: { key: 'editIvtSum', url: '/package-inventory/pages/ivt-sum-report/detail/detail' },
       editIvt: { key: 'editIvt', url: '/package-inventory/pages/ivt-detail-report/detail/detail' },
+      inBound: { key: 'inBound', url: '/package-inventory/pages/warehousing-processing/warehousing-processing' },
+      outBound: { key: 'outBound', url: '/package-inventory/pages/outbound-processing/outbound-processing'}
     }
   }
 };

+ 4 - 1
api/pages/sale/order.js

@@ -39,7 +39,10 @@ module.exports = {
       chooseChannel: { key: 'chooseChannel', url: '/package-base-select/pages/select-data/select-data', type: 'saleChannel'},
       choosecusFrom: { key: 'choosecusFrom', url: '/package-base-select/pages/select-data/select-data', type: 'customerFrom' },
       collection:{ key: 'collection', url: '/package-sales/pages/customer-collection/add/add', formMode: 'add', idKey: 'cusId',image:'btn-customer-collection.png',formType:'add' }, //跳转客户收款
-      printedBill:{ key: 'printedBill', method:'printedBill', formMode: 'index', idKey: 'cusId',image:'btn-printing.png' }
+      printedBill:{ key: 'printedBill', method:'printedBill', formMode: 'index', idKey: 'cusId',image:'btn-printing.png' },
+      detailCustomer: {
+        key: 'detailCustomer', url: '/package-basic-data/pages/customer-list/detail/detail'
+      },
     }
 
   }

+ 2 - 1
app.js

@@ -73,10 +73,11 @@ const inventoryAdjustment = require('./api/pages/ivt/inventoryAdjustment.js');
 const saleReport = require('./api/pages/mst/saleReport.js');
 const printLayout = require('./api/pages/mst/printLayout.js');
 const exportPage = require('./api/pages/common/export.js');
+const inboundItem = require('./api/pages/ivt/inboundItem.js');
 
 // api服务路由文件
 var apiList = [common, oauth,setting, company, wechatPay,user, staff, staffRight, staffPurview, settingValue, customer, role, roleFun, org, roleSensitive, goodsBrand, goodsCategory, goodsSeries, unit, supplier, warehouse, saleChannel, goodsSku, basicData,customerMst,purchase,account,payment,
-  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,activity,check,freeze,otherReceivable,otherPayable,inventoryAdjustment,report,saleReport,printLayout,exportPage]
+  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,activity,check,freeze,otherReceivable,otherPayable,inventoryAdjustment,report,saleReport,printLayout,exportPage,inboundItem]
 
 const util = require('./utils/util.js')
 const baseMethod = require('./api/pages/baseMethod.js')

+ 7 - 3
app.json

@@ -57,7 +57,9 @@
                 "pages/org/sub-org-choose/sub-org-choose",
                 "pages/activity/activity",
                 "pages/activity/detail/detail",
-                "pages/print-layout/print-layout"
+                "pages/print-layout/print-layout",
+                "pages/beginner-guide/beginner-guide"
+
             ]
         },
         {
@@ -114,7 +116,8 @@
                 "pages/inventory-check/add/add",
                 "pages/inventory-check/detail/detail",
                 "pages/cost-check/cost-check",
-                "pages/cost-check/add/add"
+                "pages/cost-check/add/add",
+                "pages/ivt-warning-report/ivt-warning-report"
             ]
         },
         {
@@ -352,7 +355,8 @@
         "dk-guide": "components/dkbase/dk-guide/dk-guide",
         "dk-list-report": "components/dkbase/dk-list-report/dk-list-report",
         "dk-goos-list": "components/dkbase/dk-goos-list/dk-goos-list",
-        "dk-stepper": "components/dkbase/dk-stepper/dk-stepper"
+        "dk-stepper": "components/dkbase/dk-stepper/dk-stepper",
+        "dk-navbar": "components/dkbase/dk-navbar/dk-navbar"
     },
     "tabBar": {
         "color": "#95A8CB",

+ 7 - 0
components/dkbase/dk-cell/dk-cell.js

@@ -99,6 +99,13 @@ Component({
       value:false
     },
     /**
+     * 内容的中删除线
+     */
+    contentLine:{
+      type:Boolean,
+      value:false
+    },
+    /**
      * 标题的颜色
      */
     titleColor:{

+ 10 - 4
components/dkbase/dk-cell/dk-cell.wxml

@@ -1,14 +1,20 @@
-<view id="totalView" class="total_class" style="--height--:{{errorMessage?('calc(' + height +' + 30rpx)' ):height}};--left--:{{left}};--center--:{{center?center:(title?'left':'center')}}">
+<view id="totalView" class="total_class" style="--height--:{{errorMessage?('calc(' + height +' + 30rpx)' ):height}};--left--:{{left}};--center--:{{center?center:(title?'left':'center')}};--line--:{{contentLine?'line-through':'none'}};">
   <view class="title_class" wx:if="{{title}}" style="--titleColor--:{{titleColor==''?contentColor:titleColor}};--fontSize--:{{fontSize + 'px'}};--fontWeight--:{{fontWeight}};--titleWidth--:{{titleWid?titleWid:''}}">{{title}} </view>
- 
+
   <!--placeholder-->
   <view wx:if="{{placeholder && !displayValue}}" class="{{contentRight?'content_class':'content_left_class'}}" style="--contentColor--:{{placeholderColor}};--fontSize--:{{(contentFontSize==0?fontSize:contentFontSize) + 'px'}};--titleWidth--:{{titleWid?titleWid :titleWidth + 'px'}};--fontWeight--:{{contentFontWeight==''?fontWeight:contentFontWeight}};--spaceWidth--:{{title?spaceWidth:''}}">{{placeholder}}</view>
   <!--错误提示信息-->
   <view wx:if="{{errorMessage}}" class="{{contentRight?'content_class':'content_left_class'}} errMsg_class" style="--contentColor--:{{placeholderColor}};--fontSize--:{{(contentFontSize==0?fontSize:contentFontSize) + 'px'}};--titleWidth--:{{titleWid?titleWid :titleWidth + 'px'}};--fontWeight--:{{contentFontWeight==''?fontWeight:contentFontWeight}};--spaceWidth--:{{title?spaceWidth:''}}">{{errorMessage}}</view>
-  <view wx:if="{{displayValue}}" class="{{contentRight?'content_class':'content_left_class'}}" style="--contentColor--:{{contentColor}};--fontSize--:{{(contentFontSize==0?fontSize:contentFontSize) + 'px'}};--titleWidth--:{{titleWid?titleWid :titleWidth + 'px'}};--fontWeight--:{{contentFontWeight==''?fontWeight:contentFontWeight}};--spaceWidth--:{{title?spaceWidth:''}};--center-:{{center}}">
+  <view wx:if="{{displayValue}}" class="{{contentRight?'content_class':'content_left_class'}}" style="--contentColor--:{{contentColor}};--fontSize--:{{(contentFontSize==0?fontSize:contentFontSize) + 'px'}};--titleWidth--:{{titleWid?titleWid :titleWidth + 'px'}};--fontWeight--:{{contentFontWeight==''?fontWeight:contentFontWeight}};--spaceWidth--:{{title?spaceWidth:''}};--center-:{{center}}"> 
+    <!-- <view wx:if="{{tail}}" style="display: flex;">
+      <view wx:if="{{amount && displayValue}}" class="sign-class" style="--fontSize--:{{signSize?signSize:((fontSize - 5 ) + 'px')}};--color--:{{contentColor}};--line--:{{tailLine?'line-through':'none'}};">{{percentSignFlag ? '' :car}}</view>
+      <view class="sign-class-tail" style="--fontSize--:{{signSize?signSize:((fontSize - 5 ) + 'px')}};--color--:{{tailColor==''?contentColor:tailColor}};--line--:{{tailLine?'line-through':'none'}};--tailFontWeight--:{{tailFontWeight==''?fontWeight:tailFontWeight}}">
+        {{tail}}
+      </view>
+    </view> -->
     <view wx:if="{{amount && displayValue}}" class="sign-class" style="--fontSize--:{{signSize?signSize:((fontSize - 5 ) + 'px')}};--color--:{{contentColor}}">{{percentSignFlag ? '' :car}}</view>{{displayValue}}
     <view wx:if="{{decimalFlag && decimalValue}}" class="sign-class" style="--fontSize--:{{signSize?signSize:((fontSize - 5 ) + 'px')}};--color--:{{contentColor}}">{{decimalValue}}</view>
-     <view wx:if="{{tail}}" class="sign-class-tail" style="--fontSize--:{{signSize?signSize:((fontSize - 5 ) + 'px')}};--color--:{{tailColor==''?contentColor:tailColor}};--line--:{{tailLine?'line-through':'none'}};--tailFontWeight--:{{tailFontWeight==''?fontWeight:tailFontWeight}}">{{tail}}</view>
+    <view wx:if="{{tail}}" class="sign-class-tail" style="--fontSize--:{{signSize?signSize:((fontSize - 5 ) + 'px')}};--color--:{{tailColor==''?contentColor:tailColor}};--line--:{{tailLine?'line-through':'none'}};--tailFontWeight--:{{tailFontWeight==''?fontWeight:tailFontWeight}}">{{tail}}</view>
   </view>
 
 </view>

+ 1 - 0
components/dkbase/dk-cell/dk-cell.wxss

@@ -6,6 +6,7 @@
   display: flex;
   text-align: var(--center--);
   justify-content: var(--center--);
+  text-decoration:var(--line--);
 }
 .title_class{
   font-size: var(--fontSize--);

+ 179 - 42
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -83,6 +83,11 @@ Component({
       type: String,
       value: 'priceCol'
     },
+    priceTailCol: {
+      type: String,
+      value: 'priceTailCol'
+    },
+    
     // 价格列
     priceCol: {
       type: String,
@@ -119,10 +124,18 @@ Component({
       type: String,
       value: 'sumQuantity'
     },
+    wholeOrderDiscountCol: {
+      type: String,
+      value: 'wholeOrderDiscountCol'
+    },
     sumAmountCol: {
       type: String,
       value: 'sumAmount'
     },
+    discountAmountCol: {
+      type: String,
+      value: 'discountAmountCol'
+    },
     swipeDisabled: {
       type: String,
     },
@@ -130,6 +143,10 @@ Component({
       type: Boolean,
       value: true
     },
+    reverseCalculationFlag: {
+      type: Boolean,
+      value: false
+    },
     isDetailFlag: {
       type: Boolean,
       value: false
@@ -483,6 +500,7 @@ Component({
         return;
       }
       let ds = e.currentTarget.dataset;
+      let popContent = this.data.popContent
       console.log('openChoosedItemInfo', e);
       if (ds.item.flgSubUnit) {
         ds.item.calculationFormula = ds.item.packBox + ds.item.unitName + '= 1' + ds.item.subUnitName
@@ -497,9 +515,31 @@ Component({
       if (this.data.type == Constants.billType.out) {
         ds.item.sumPrice = ds.item['itemQty'] * ds.item.priceOut
       }
-
-      if (this.data.type == Constants.billType.saleOut ||
-        this.data.type == Constants.billType.inventory) {
+      if (this.data.type == Constants.billType.saleOut) {
+        ds.item.sumPrice = ds.item['outingQty'] * ds.item.priceOut
+        // let index_discount = popContent.findIndex(element => element.code == 'discount');
+        // let index_discAmt = popContent.findIndex(element => element.code == 'discAmt');
+        // if (ds.item['priceOut'] && ds.item['priceOut'] > 0) { //销售单价小于0 折扣和优惠 都不可输入
+        //   popContent[index_discount].readonly = false
+        //   popContent[index_discAmt].readonly = false
+        // } else {
+        //   popContent[index_discount].readonly = true
+        //   popContent[index_discAmt].readonly = true
+        // }
+      }
+      if (this.data.type == Constants.billType.sale) {
+        ds.item.sumPrice = ds.item['itemQty'] * ds.item.priceSale
+        let index_discount = popContent.findIndex(element => element.code == 'discount');
+        let index_discAmt = popContent.findIndex(element => element.code == 'discAmt');
+        if (ds.item['priceSale'] && ds.item['priceSale'] > 0) { //销售单价小于0 折扣和优惠 都不可输入
+          popContent[index_discount].readonly = false
+          popContent[index_discAmt].readonly = false
+        } else {
+          popContent[index_discount].readonly = true
+          popContent[index_discAmt].readonly = true
+        }
+      }
+      if (this.data.type == Constants.billType.inventory) {
         ds.item.sumPrice = ds.item['outingQty'] * ds.item.priceOut
       }
       if (this.data.type == Constants.billType.saleOutReturn) { //销售退货的时候 打开商品的pup 就要计算箱片 
@@ -509,7 +549,7 @@ Component({
       //没有skuid 是外协商品 
       let popupTopObj_sku = null
       let popContent_sku = null
-      let popContent_ = util.copyObj(this.data.popContent)
+      let popContent_ = util.copyObj(popContent)
       if (ds.item.skuId) { //正常品走
         popupTopObj_sku = this.data.popupTopObj
         popContent_sku = popContent_
@@ -592,19 +632,18 @@ Component({
       }
       //计算金额
       if (this.data.type == Constants.billType.sale) {
-        this.setGoodsAmount()
+        form = this.setGoodsAmount(form);
       }
+      this.setData({
+        form: form,
+        value: JSON.stringify(form)
+      })
       if (this.data.type == Constants.billType.saleOut) {
         this.setGoodsOutAmount()
       }
       if (this.data.type == Constants.billType.saleOutReturn) {
         this.setGoodsOutReturnAmount()
-      }
-
-      this.setData({
-        form: form,
-        value: JSON.stringify(form)
-      })
+      } 
       // 外露关闭pop后事件
       this.triggerEvent("editItems", {
         data: form
@@ -648,7 +687,10 @@ Component({
         if (this.data.type == Constants.billType.out) { //销售退货
           dataItem.sumPrice = dataItem['itemQty'] * dataItem.priceOut
         }
-
+        if (this.data.type == Constants.billType.sale) { //销售订单
+          dataItem.sumPrice = dataItem['itemQty'] * dataItem.priceSale
+          dataItem.factAmt = dataItem['itemQty'] * dataItem.factPrice
+        }
       }
       if (this.data.type == Constants.billType.saleOutReturn) {
 
@@ -673,12 +715,21 @@ Component({
         dataItem.packageBox = dataItem['box'] + dataItem.subUnitName + dataItem['piece'] + dataItem.unitName
         dataItem.sumPrice = dataItem.priceOut * dataItem.itemQty
       }
-      if (this.data.type == Constants.billType.saleOut || this.data.type == Constants.billType.inventory) {
+      if (this.data.type == Constants.billType.inventory) {
+        //数量等于 包乘以包装数 加上片数 
+        dataItem['outingQty'] = dataItem['box'] * dataItem['packBox'] + dataItem['piece']
+        dataItem.packageBox = dataItem['box'] + dataItem.subUnitName + dataItem['piece'] + dataItem.unitName
+        dataItem.sumPrice = dataItem['outingQty'] * dataItem.priceOut
+        dataItem.factAmt = dataItem['outingQty'] * dataItem.factPrice
+      }
+      if (this.data.type == Constants.billType.saleOut) {
         //数量等于 包乘以包装数 加上片数 
         dataItem['outingQty'] = dataItem['box'] * dataItem['packBox'] + dataItem['piece']
         dataItem.packageBox = dataItem['box'] + dataItem.subUnitName + dataItem['piece'] + dataItem.unitName
         dataItem.sumPrice = dataItem['outingQty'] * dataItem.priceOut
+        dataItem.factAmt = dataItem['outingQty'] * dataItem.factPrice
       }
+
       this.setData({
         dataItem: JSON.stringify(dataItem)
       })
@@ -695,6 +746,14 @@ Component({
       })
     },
     /**
+     * @desc   : 打开下拉/反算页面
+     * @author : 周兴
+     * @date   : 2024/1/26 11:46
+     */
+    openReverseCalculationPop() {
+      this.triggerEvent("openReverseCalculationPop", {})
+    },
+    /**
      * @desc   : 打开下拉/跳转选择页面
      * @author : 周兴
      * @date   : 2024/1/26 11:46
@@ -1622,14 +1681,14 @@ Component({
           goodsList.push(it)
         })
         form[this.data.itemName] = goodsList
+        // 设置商品总单的金额信息 
+        if (this.data.type == Constants.billType.sale) {
+          form = this.setGoodsAmount(form);
+        }
         this.setData({
           form: form,
           value: JSON.stringify(form)
         })
-        // 设置商品总单的金额信息 
-        if (this.data.type == Constants.billType.sale) {
-          this.setGoodsAmount(e.data);
-        }
         if (this.data.type == Constants.billType.saleOut) { //销售出库 
           this.setGoodsOutList(e.data)
         }
@@ -1643,10 +1702,11 @@ Component({
         if (this.data.type == Constants.billType.pur) {
           // this.setPurGoodsAmount(e.data);
         }
-
+        console.log('jm3', this.data.form);
         // 设置是否进行收缩
         let card = this.data.cardList.filter(it => it.name == 'items');
         this.handleContentObj(card[0])
+        console.log('jm2', this.data.form);
         // 外露setGoods方法
         this.triggerEvent("setGoods", {
           data: goodsList
@@ -1733,20 +1793,21 @@ Component({
       goodsList.splice(index, 1)
       form[this.data.itemName] = goodsList
       form[this.data.deleteName] = deleteList
+      //计算
+      if (this.data.type == Constants.billType.sale) {
+        form = this.setGoodsAmount(form);
+      }
       this.setData({
         form: form,
         value: JSON.stringify(form)
       })
-      //计算
-      if (this.data.type == Constants.billType.sale) {
-        this.setGoodsAmount(goodsList);
-      }
       if (this.data.type == Constants.billType.saleOut) {
         this.setGoodsOutAmount()
       }
       if (this.data.type == Constants.billType.saleOutReturn) {
         this.setGoodsOutReturnAmount()
       }
+    
       // 外露setGoods方法
       this.triggerEvent("delItem", {
         data: goodsList
@@ -1793,24 +1854,38 @@ Component({
      * @author : 周兴
      * @date : 2024/1/19
      */
-    setGoodsAmount(data) {
+    setGoodsAmount(formdata) { 
       let cardList = this.data.cardList
-      let form = this.data.form
+      let form = formdata
+      console.log('form2', form);
       let index = cardList.findIndex(it => it.name == 'items');
       if (form.goodsList && form.goodsList.length > 0) {
         let sumStandard = Number(0)
         let sumAmount = Number(0)
+        let factAmt = Number(0)
         let sumQuantity = Number(0)
         form.goodsList.forEach(item => {
           //标价合计 =  商品标价 x  商品数量
           item.priceStd = item.priceStd ? item.priceStd : (item.priceStandard ? item.priceStandard : 0) //标价
           item.amtStd = Number(item.priceStd * item.itemQty) //合计标价金额
           item.priceSale = item.priceSale ? item.priceSale : item.priceStandard
-          item.itemAmt = item.priceSale * item.itemQty //商品金额
-          item.priceDiscount = item.priceStd ? Number((item.priceSale / item.priceStd) * 100).toFixed(2) : 100 //售价折扣
-          sumQuantity += item.itemQty //数量
-          sumAmount += item.priceSale * item.itemQty //没有售价默认取标价
-          sumStandard += (item.priceStd ? item.priceStd : item.priceStandard) * item.itemQty
+          item.factPrice = item.factPrice ? item.factPrice : item.priceSale
+          item.discount = item.discount ? item.discount : (item.factPrice == 0 ? 0 : 100)
+          item.discAmt = item.discAmt ? item.discAmt : 0
+          if (item.flgGift) { //赠品
+            item.priceSale = Number(0)
+            item.factPrice = Number(0)
+            item.discount = Number(0)
+            item.discAmt = Number(0)
+          }
+          item.itemAmt =  Number(item.priceSale) *  Number(item.itemQty) //商品金额
+          item.sumPrice =  Number(item.priceSale) *  Number(item.itemQty) //商品金额
+          item.priceDiscount = item.priceStd ? Number(( Number(item.priceSale) /  Number(item.priceStd)) * 100).toFixed(2) : 100 //售价折扣  
+          item.factAmt = Number(item.factPrice) * Number(item.itemQty)
+          sumQuantity += Number(item.itemQty) //数量
+          sumAmount +=  Number(item.priceSale) *  Number(item.itemQty) //没有售价默认取标价
+          factAmt +=  Number(item.factAmt)
+          sumStandard +=  Number((item.priceStd ? item.priceStd : item.priceStandard)) *  Number(item.itemQty)
         })
         //标价合计
         cardList[index].sumStandard = sumStandard
@@ -1821,13 +1896,16 @@ Component({
         cardList[index].sumQuantity = sumQuantity
         //TODO   需要获取当前客户可用预存
         cardList[index].canUseCollect = 0 //可用
-        cardList[index].useCollect = 0 //使用
+        cardList[index].useCollect = 0 //使用 
+        form.factAmt = factAmt
         form.sumStandard = sumStandard
         form.saleDiscount = cardList[index].saleDiscount
         form.sumAmount = sumAmount
         form.canUseCollect = 0
         form.useCollect = 0
         form.sumQuantity = sumQuantity
+        form.discount = 100//整单折扣
+        form.discAmt = 0 //优惠金额
       } else {
         cardList[index].sumStandard = 0
         cardList[index].saleDiscount = 0
@@ -1840,12 +1918,15 @@ Component({
         form.sumAmount = 0
         form.canUseCollect = 0
         form.useCollect = 0
+        form.factAmt = 0
+        form.discount = 100//整单折扣
+        form.discAmt = 0 //优惠金额
       }
-
+      console.log('form1', form);
       this.setData({
         cardList: cardList,
-        form: form
       })
+      return form
     },
     /**
      * @desc : 设置商品明细金额相关信息 销售出库
@@ -1858,6 +1939,7 @@ Component({
       let index = cardList.findIndex(it => it.name == 'items');
       if (form.goodsList && form.goodsList.length > 0) {
         let sumAmount = Number(0)
+        let factAmt = Number(0)
         let sumQuantity = Number(0)
         let sumStandard = Number(0)
         form.goodsList.forEach(item => {
@@ -1865,8 +1947,18 @@ Component({
           item.priceStd = item.priceStandard //标价
           item.outingAmt = item.priceOut * item.outingQty
           sumQuantity += item.outingQty //数量
-          sumAmount += item.priceOut * item.outingQty //没有售价默认取标价
+          if (item.flgGift) { //赠品
+            item.priceOut = Number(0)
+            item.factPrice = Number(0)
+            item.discount = Number(0)
+            item.discAmt = Number(0)
+          }
+          item.discount = item.discount ? item.discount : Number(0)
+          item.discAmt = item.discAmt ? item.discAmt : Number(0)
+          sumAmount += Number(item.priceOut) * Number(item.outingQty) //销售金额
+          factAmt += Number(item.factPrice) * Number(item.outingQty) //实际金额
           sumStandard += (item.priceStd ? item.priceStd : item.priceStandard) * item.outingQty
+
         })
         //标价合计
         cardList[index].sumStandard = sumStandard
@@ -1882,6 +1974,7 @@ Component({
         cardList[index].sumAmount = sumAmount
         cardList[index].sumQuantity = sumQuantity
         form.sumAmount = sumAmount
+        form.factAmt = factAmt
         form.sumQuantity = sumQuantity
         form.outingAmt = sumAmount
         form.outingQty = sumQuantity
@@ -1947,8 +2040,12 @@ Component({
       if (form.goodsList && form.goodsList.length > 0) {
         form.goodsList.forEach(item => {
           item.priceOut = item.priceOut ? item.priceOut : item.priceStandard
-          item.outingAmt = item.priceOut * item.itemQty
+          item.factPrice = item.priceOut
+          item.factAmt = Number(item.factPrice) * Number(item.itemQty)
+          item.outingAmt = Number(item.priceOut) * Number(item.itemQty)
           item.outingQty = item.itemQty
+          item.discount = item.factPrice == 0 ? 0 : 100
+          item.discAmt = 0
           item['outingQty_min'] = 1
           delete item['priceLimited']
           delete item['pricePurchase']
@@ -1995,20 +2092,30 @@ Component({
           if (this.data.type == Constants.billType.purInto) { //采购入库
             dataItem.sumPrice = dataItem['itemQty'] * dataItem.priceInto
           }
+          if (this.data.type == Constants.billType.sale) { //订单
+            dataItem.sumPrice = dataItem['itemQty'] * dataItem.priceSale
+            dataItem.factAmt = dataItem['itemQty'] * dataItem.factPrice 
+          }
+        }
 
+      } else if (this.data.type == Constants.billType.inventory) {
+        //箱片的取值逻辑: 箱 =(数量/包装)取整,片= (数量%包装)取余数
+        if (key == 'outingQty') {
+          dataItem['outingQty'] = value
+          dataItem['box'] = parseInt(value / dataItem.packBox)
+          dataItem['piece'] = parseFloat(Number(value % dataItem.packBox).toFixed(dataItem.decimalPlaces));
+          dataItem.packageBox = dataItem['box'] + dataItem.subUnitName + dataItem['piece'] + dataItem.unitName
         }
 
-      } else if (this.data.type == Constants.billType.saleOut ||
-        this.data.type == Constants.billType.inventory) {
+      } else if (this.data.type == Constants.billType.saleOut) {
         //箱片的取值逻辑: 箱 =(数量/包装)取整,片= (数量%包装)取余数
         if (key == 'outingQty') {
           dataItem['outingQty'] = value
           dataItem['box'] = parseInt(value / dataItem.packBox)
           dataItem['piece'] = parseFloat(Number(value % dataItem.packBox).toFixed(dataItem.decimalPlaces));
           dataItem.packageBox = dataItem['box'] + dataItem.subUnitName + dataItem['piece'] + dataItem.unitName
-          if (this.data.type == Constants.billType.saleOut) { //销售退货
-            dataItem.sumPrice = dataItem['outingQty'] * dataItem.priceOut
-          }
+          dataItem.sumPrice = dataItem['outingQty'] * dataItem.priceOut
+          dataItem.factAmt = dataItem['outingQty'] * dataItem.factPrice
         }
 
       } else if (this.data.type == Constants.billType.saleOutReturn) {
@@ -2035,6 +2142,7 @@ Component({
     blurNumberField(e) {
       console.log("blurNumberField", e);
       let dataItem = JSON.parse(this.data.dataItem)
+      let key = e.detail.key
       // 采购订单
       if (this.data.type == Constants.billType.pur) {
         dataItem.pricePur = e.detail.value
@@ -2053,10 +2161,39 @@ Component({
         dataItem.sumPrice = dataItem['itemQty'] * dataItem.priceOut
       }
       if (this.data.type == Constants.billType.saleOutReturn ||
-        this.data.type == Constants.billType.saleOut ||
         this.data.type == Constants.billType.inventory) {
-        dataItem.priceOut = e.detail.value
-        dataItem.sumPrice = dataItem['outingQty'] * dataItem.priceOut
+        if (key == "priceOut") {
+          dataItem.priceOut = e.detail.value
+          dataItem.sumPrice = dataItem['outingQty'] * dataItem.priceOut
+        }
+      }
+      if (this.data.type == Constants.billType.saleOut) {
+        if (key == "priceOut") {
+          dataItem.priceOut = e.detail.value
+          dataItem.sumPrice = dataItem['outingQty'] * dataItem.priceOut
+        }
+      }
+      if (this.data.type == Constants.billType.sale) {
+        //实际合计金额=合计金额*折扣-优惠(改折扣)
+        if (key == "factPrice") { //改实际单价 优惠金额不变 折扣和实际总额变了
+          dataItem.factPrice = e.detail.value //实际单价
+          dataItem.discount = Math.floor(dataItem.priceSale == 0 ? 100 : (((Number(dataItem.factPrice) + Number(dataItem.discAmt)) / Number(dataItem.priceSale)) * 100)) //折扣 = (实际合计金额+优惠)/合计金额
+          if (dataItem.priceSale != 0) { //预防 算出的折扣是无线循环  差的金额 放到优惠上
+            dataItem.discAmt = (dataItem.priceSale * (dataItem.discount / 100)) - dataItem.factPrice
+          }
+          dataItem.factAmt = (dataItem.factPrice * dataItem['itemQty']).toFixed(2) //实际销售金额=实际销售单价(四舍五入)*数量 
+        }
+        if (key == "discount") { //priceSale是0的时候  折扣和优惠动不了  改折扣 优惠不动 改变实际单价 和实际金额
+          dataItem.discount = e.detail.value
+          dataItem.factPrice = Number(dataItem.priceSale) * Number((Number(dataItem.discount) / 100)) - Number(dataItem.discAmt) //实际单价  = 销售单价*折扣-优惠(改折扣)
+          dataItem.factAmt = dataItem.factPrice * dataItem['itemQty'] //实际销售金额=实际销售单价(四舍五入)*数量
+        }
+        if (key == "discAmt") { //priceSale是0的时候  折扣和优惠动不了   
+          dataItem.discAmt = e.detail.value //优惠金额
+          //    dataItem.discount =   ((dataItem.factPrice/dataItem.priceSale)*100).toFixed(2)
+          dataItem.factPrice = Number(dataItem.priceSale) * Number((Number(dataItem.discount) / 100)) - Number(dataItem.discAmt) //实际单价  = 销售单价*折扣-优惠(改折扣) 
+          dataItem.factAmt = dataItem.factPrice * dataItem['itemQty'] //实际销售金额=实际销售单价(四舍五入)*数量 
+        }
       }
       this.setData({
         dataItem: JSON.stringify(dataItem)

+ 26 - 18
components/dkbase/dk-form-bill/dk-form-bill.wxml

@@ -164,27 +164,35 @@
               <van-icon name="arrow-down" />
             </view>
           </block>
-          <view class="amount-item-class" wx:if="{{gradeCode != 'STD' &&( type === 'sale' || type === 'saleOut') }}">
-            <!--标价总额-->
-            <dk-cell contentColor="#FF7B1A" titleColor="#95A8CB;" contentFontWeight="700" title="标价总额" content="{{card[sumStandardCol]?card[sumStandardCol]:0}}"></dk-cell>
-            <!--标价折扣-->
-            <dk-cell amount="{{false}}" contentColor="#FF7B1A" contentFontWeight="700" titleColor="#95A8CB;" title="标价折扣" content="{{(card[discountStandardCol] && card[discountStandardCol] != 'NaN' && card[discountStandardCol] != 'Infinity')?card[discountStandardCol] + ' %':''  +'-'}}"></dk-cell>
-          </view>
-          <view wx:if="{{sumAmountColFlag}}" class="amount-item-class">
-            <!--条数-->
-            <dk-cell titleColor="#95A8CB;" title="{{$t['goodsQuantity']+':' + (card[sumQuantityCol]?card[sumQuantityCol]:0) + $t['piece']}}" amount="{{false}}"></dk-cell>
-            <!--合计金额-->
-            <dk-cell fontSize="16" fontWeight="bold" contentFontWeight="700" contentColor="#FF7B1A" titleColor="#1B365D;" title="合计金额" content="{{card[sumAmountCol]?card[sumAmountCol]:0}}"></dk-cell>
-            <!-- <view style="display: flex;width: calc(100% - 260rpx);">
+          <view catchtap="openReverseCalculationPop">
+            <view class="amount-item-class" wx:if="{{gradeCode != 'STD' &&( type === 'sale' || type === 'saleOut') }}">
+              <!--标价总额-->
+              <dk-cell contentColor="#FF7B1A" titleColor="#95A8CB;" contentFontWeight="700" title="标价总额" content="{{card[sumStandardCol]?card[sumStandardCol]:0}}"></dk-cell>
+              <!--标价折扣-->
+              <dk-cell amount="{{false}}" contentColor="#FF7B1A" contentFontWeight="700" titleColor="#95A8CB;" title="标价折扣" content="{{(card[discountStandardCol] && card[discountStandardCol] != 'NaN' && card[discountStandardCol] != 'Infinity')?card[discountStandardCol] + ' %':''  +'-'}}"></dk-cell>
+            </view>
+            <view wx:if="{{sumAmountColFlag}}" class="amount-item-class">
+              <!--条数-->
+              <dk-cell titleColor="#95A8CB;" contentColor="#95A8CB" title="{{$t['goodsQuantity'] }}"contentFontWeight="700"  amount="{{false}}"content="{{(card[sumQuantityCol]?card[sumQuantityCol]:0) + $t['piece']}}"></dk-cell>
+              <!--合计金额-->
+              <dk-cell fontSize="16" fontWeight="bold" contentFontWeight="700" contentColor="#FF7B1A" titleColor="#1B365D;" title="合计金额" content="{{card[sumAmountCol]?card[sumAmountCol]:0}}"></dk-cell>
+              <!-- <view style="display: flex;width: calc(100% - 260rpx);">
               <view style="font-size: 16px;font-weight: bold;color:#1B365D;display: flex;align-items: center;">
                 合计金额
               </view>
               <dk-number-input style="width: calc(100% - 130rpx);" fontSize="16" center="left" data-key="{{sumAmountCol}}" inputColor="#FF7B1A"  fontWeight="700" inputValue="{{card[sumAmountCol]?card[sumAmountCol]:0}}" data-index="{{cardIndex}}"bind:triggerBindValue="changeAmount">
               </dk-number-input>
             </view> -->
-          </view>
-          <!--使用收款-->
-          <!-- <view class="amount-item-class" wx:if="{{type === 'sale' || type === 'saleOut' }}">
+            </view>
+            <view wx:if="{{reverseCalculationFlag}}" class="amount-item-class">
+              <!--整单折扣-->
+              <dk-cell contentColor="#95A8CB" titleColor="#95A8CB;"  title="{{$t['wholeOrderDiscount']}}" amount="{{false}}"content="{{(card[wholeOrderDiscountCol]?card[wholeOrderDiscountCol]:100) + '%'}}"></dk-cell>
+              <!--优惠金额-->
+              <dk-cell   contentColor="#95A8CB" titleColor="#95A8CB;" title="优惠金额" content="{{card[discountAmountCol]?card[discountAmountCol]:0}}"></dk-cell>
+           
+            </view>
+            <!--使用收款-->
+            <!-- <view class="amount-item-class" wx:if="{{type === 'sale' || type === 'saleOut' }}">
             <view style="display: flex;">
            
               <dk-cell contentColor="#FF7B1A" titleColor="#95A8CB" contentFontWeight="700" title="使用收款(可用" content="{{card[canUseCollectCol]?card[canUseCollectCol]:0}}"></dk-cell>
@@ -192,7 +200,7 @@
             </view>
             <dk-cell contentColor="#FF7B1A" contentFontWeight="700" content="{{card[useCollectCol]?card[useCollectCol]:0 }}"></dk-cell>
           </view> -->
-
+          </view>
         </view>
         <!--非明细card-->
         <view wx:if="{{card.name != 'items'}}">
@@ -245,7 +253,7 @@
               <van-icon wx:if="{{!readonly && form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
             </van-field>
             <!--数字类-->
-            <dk-number-input wx:if="{{item.type=='number'  && (item.show || item.show == undefined)}}" 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}}" data-index="{{index}}" data-card="{{card.name}}" center="left" readonly="{{!!readonly || !!item.readonly}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="#FF7B1A" titleFontWeight="normal" titleColor="#95A8CB" inputValue="{{form[item.code]}}" negative="{{item.negative}}" maxFlag="{{item.maxFlag}}" max="{{item.max}}"  min="{{item.min}}" bind:triggerBindBlur="changeNumberBlur" bind:triggerBindValue="changeNumberField"></dk-number-input>
+            <dk-number-input wx:if="{{item.type=='number'  && (item.show || item.show == undefined)}}" 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}}" data-index="{{index}}" data-card="{{card.name}}" center="left" readonly="{{!!readonly || !!item.readonly}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="#FF7B1A" titleFontWeight="normal" titleColor="#95A8CB" inputValue="{{form[item.code]}}" negative="{{item.negative}}" maxFlag="{{item.maxFlag}}" max="{{item.max}}" bind:triggerBindBlur="changeNumberBlur" bind:triggerBindValue="changeNumberField" min="{{item.min}}"></dk-number-input>
 
             <!--备注-->
             <van-field wx:if="{{item.type=='textarea'  && (item.show || item.show == undefined)}}" type="textarea" required="{{item.required?true:false }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" 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 }}" clearable readonly="{{!!readonly && !!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:500}}" right-icon="{{item.rightIcon}}" bind:change="changeField" bind:blur="blurField" bind:clear="clearField" errorMessage="{{item.errMsg}}">
@@ -289,6 +297,6 @@
   <van-datetime-picker type="date" bind:confirm="chooseDate" bind:cancel="cancelDatePop" loading="{true}" value="{{dataTime}}" min-date="{{ minDate }}" />
 </van-popup>
 
-<dk-popup id="dkPopup" stepperDecimal="decimalPlaces" type="{{popType}}" routeObjName="{{routeObjName}}" titleTagCol="{{titleTagCol}}" titleCol="{{titleCol}}" subCol="{{subCol}}" descCol="{{descCol}}" iconCol="{{iconCol}}" priceCol="{{pupPriceCol}}" priceTitle="{{priceTitle}}" value="{{dataItem}}" show="{{showPop}}" contentObj="{{popContent_sku}}" popupTopObj="{{popupTopObj_sku}}" bind:changeStep="changeStep" bind:changeCheckBox="changeCheckBox" readonly="{{readonly}}" bind:changeField="changeDetailField" bind:blurNumberField="blurNumberField" bind:commit="editItems" bind:openPackageBox="openPackageBox"></dk-popup>
+<dk-popup id="dkPopup" stepperDecimal="decimalPlaces" type="{{popType}}" routeObjName="{{routeObjName}}" titleTagCol="{{titleTagCol}}" titleCol="{{titleCol}}" subCol="{{subCol}}" descCol="{{descCol}}" iconCol="{{iconCol}}"priceTailCol="{{priceTailCol}}"  priceCol="{{pupPriceCol}}"priceTitle="{{priceTitle}}" value="{{dataItem}}" show="{{showPop}}" contentObj="{{popContent_sku}}" popupTopObj="{{popupTopObj_sku}}" bind:changeStep="changeStep" bind:changeCheckBox="changeCheckBox" readonly="{{readonly}}" bind:changeField="changeDetailField" bind:blurNumberField="blurNumberField" bind:commit="editItems" bind:openPackageBox="openPackageBox"></dk-popup>
 <!-- 箱片 -->
 <dk-popup type="basic" title="修改包装数量" titleCol="skuModel" iconCol="imagesUrl" value="{{dataItem}}" show="{{showPopBox}}" routeObjName="{{routeObjName}}" contentObj="{{popContentBox}}" bind:changeStep="changeStep" bind:commit="editItemsBox" stepperDecimal="decimalPlaces"></dk-popup>

+ 45 - 2
components/dkbase/dk-form/dk-form.js

@@ -14,6 +14,8 @@ const chooseLocation = requirePlugin('chooseLocation');
 const config = require('@/config/config.js')
 const app = getApp();
 Component({
+  //class暴露 方便外部修改内部样式   -2024/06/11 于继渤
+  // externalClasses: ['dk-card-class','dk-card-outer-class'],
   /**
    * 组件的属性列表
    */
@@ -23,6 +25,10 @@ Component({
       type: Array,
       value: []
     },
+    transparentStyle:{
+      type: Boolean,
+      value: false
+    },
     uploaderMAX: {
       type: Number,
       value: 5
@@ -63,6 +69,7 @@ Component({
     show: false,
     mutishow: false,
     showDate: false,
+    showDateDay: false,
     showDateTime: false,
     currentDate: new Date().getTime(),
     $t: app.globalData.lang,
@@ -158,6 +165,7 @@ Component({
      */
     open(e) {
       let item = e.currentTarget.dataset;
+      console.log('item',item)
       if (item.item.readonly) {
         return
       }
@@ -180,7 +188,7 @@ Component({
         this.setData({
           mutishow: true
         })
-      } else if (item.item.type == 'choose') {
+      } else if (item.item.type == 'choose' || item.item.type == 'chooseAndStr') {
         let that = this
         console.log(item, this.data.routeObjName, this.data.routeUrl);
         that.setData({
@@ -341,6 +349,7 @@ Component({
      * @date   : 2024/1/26 11:46
      */
     chooseData(e) {
+      console.log("chooseData-dkform",e.detail);
       let contentObj = this.data.contentObj;
       let form = this.data.form
       if (e.detail.ids) {
@@ -392,7 +401,8 @@ Component({
       // 如果处理id,name还需要赋值其他,需要在页面事件中自行处理
       this.triggerEvent("chooseData", {
         code: this.data.dropCode,
-        list: e.detail.list
+        //初始欠款的为空
+        list: e.detail.list?e.detail.list:e.detail.item
       })
     },
     /**
@@ -412,6 +422,39 @@ Component({
         card: item.card
       })
     },
+
+
+    openDatePopDay(e){
+      let item = e.currentTarget.dataset;
+      
+      if (item.item.readonly) {
+        return
+      }
+      this.setData({
+        showDateDay: true,
+        index: item.index,
+        key: item.key,
+        card: item.card,
+        dropDateCode: e.currentTarget.dataset.key
+      })
+    },
+        /**
+   * @desc : 选择筛选中的日期
+   * @author : 周兴
+   * @date : 2024/1/29 08:59
+   */
+  pickDateCommit(e) {
+    let form = this.data.form
+    
+    let date = e.detail.date[0] + '~' + e.detail.date[1]
+    form[this.data.dropDateCode] = date
+    form[this.data.dropDateCode + 'Start'] = e.detail.date[0];
+    form[this.data.dropDateCode + 'End'] = e.detail.date[1];
+    this.setData({
+      form: form,
+      value: JSON.stringify(form)
+    })
+  },
     /**
      * @desc   : 关闭日期pop
      * @author : 周兴

+ 14 - 3
components/dkbase/dk-form/dk-form.wxml

@@ -1,7 +1,7 @@
 <wxs src='../../../utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<view class="dk-card-outer-class">
+<view class="{{!transparentStyle ? 'dk-card-outer-class' : ''}}">
   <!-- 单据信息 -->
-  <view class="dk-card-class" wx:for="{{cardList}}" wx:for-item="card" data-item="{{card}}"> 
+  <view class="{{!transparentStyle ? 'dk-card-class' : ''}}" wx:for="{{cardList}}" wx:for-item="card" data-item="{{card}}"> 
     <view wx:for="{{contentObj[card]}}" wx:for-item="item" data-item="{{item}}" wx:key="index">
       <!--文本框-->
       <van-field wx:if="{{item.type=='str' && !item.hide}}" required="{{item.required?true:false }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" 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 }}" clearable readonly="{{!!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:50}}" right-icon="{{item.rightIcon}}" bind:change="changeField" bind:blur="blurField" bind:clear="clearField" catchtap="openStr" errorMessage="{{item.errMsg}}">
@@ -19,6 +19,11 @@
       <van-field wx:if="{{item.type=='choose' && !item.hide}}" required="{{item.required?true:false }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" value="{{ form[item.name]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{item.placeholder ? item.placeholder : wxmlUtil.setPlaceholder($t, item.title?item.title:item.code)}}" is-link catchtap="open" autosize border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
         <van-icon wx:if="{{!readonly &&  form[item.code]&& (item.clear || item.clear == undefined)}}" slot="icon" name="clear" color="#c8c9cc;" data-name="{{item.name}}" data-key="{{item.code}}"  data-item="{{item}}"catchtap="clearChoose"></van-icon>
       </van-field>
+
+      <van-field wx:if="{{item.type=='chooseAndStr' && !item.hide}}" required="{{item.required?true:false }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" value="{{ form[item.name]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{item.placeholder ? item.placeholder : wxmlUtil.setPlaceholder($t, item.title?item.title:item.code)}}"  bind:click-icon="open" autosize border="{{ false }}" readonly="{{false}}" bind:change="changeField"  input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
+        <van-icon name="arrow" slot="icon"  catchtap="open" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}"  />
+      </van-field>
+      
       <!--选择框-->
       <van-field wx:if="{{item.type=='checkbox' && !item.hide}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="left" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" errorMessage="{{item.errMsg}}">
         <view slot="end" style="text-align: right;padding-left: 10rpx;" data-item="{{item}}" data-index="{{index}}" data-value="{{form[item.code]}}" data-key="{{item.code}}" catchtap="onChange">
@@ -55,6 +60,10 @@
       <van-field wx:if="{{item.type=='date'}}" required="{{item.required?true:false }}" is-link value="{{ form[item.code]}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" data-item="{{item}}" data-key="{{item.code}}" data-index="{{index}}" data-card="{{card.name}}" errorMessage="{{item.errMsg}}" clearable border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" catchtap="openDatePop">
         <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
       </van-field>
+      <!-- 日期范围 -->
+      <van-field wx:if="{{item.type=='dateDay'}}" required="{{item.required?true:false }}" is-link value="{{ form[item.code]}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" data-item="{{item}}" data-key="{{item.code}}" data-index="{{index}}" data-card="{{card.name}}" errorMessage="{{item.errMsg}}" clearable border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" catchtap="openDatePopDay">
+        <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
+      </van-field>
       <!--时间-->
       <van-field wx:if="{{item.type=='dateTime'}}" required="{{item.required?true:false }}" is-link value="{{ form[item.code]}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" data-item="{{item}}" data-key="{{item.code}}" data-index="{{index}}" data-card="{{card.name}}" errorMessage="{{item.errMsg}}" border="{{ false }}" clearable readonly="{{true}}" input-class="dk-cell-value-class" catchtap="openDatePopTime">
         <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
@@ -110,4 +119,6 @@
 <!--日期-->
 <van-popup show="{{ showDateTime }}" custom-style="border-radius:30rpx 30rpx 0 0;" position="bottom" bind:close="cancelDatePopTime">
   <van-datetime-picker type="datetime" value="{{ currentDate }}" bind:confirm="chooseDateTime" bind:cancel="cancelDatePopTime" loading="{true}" />
-</van-popup>
+</van-popup>
+
+<dk-dropdown-date-day show="{{showDateDay}}" bind:dateCommit="pickDateCommit"></dk-dropdown-date-day>

+ 29 - 1
components/dkbase/dk-list/dk-list.js

@@ -159,7 +159,14 @@ Component({
     },
     titleBtnText:{  // 标题栏按钮
       type:String,
-    }
+    },
+    statusImageFlag:{ //自定义图 是否开启
+      type: Boolean,
+      value: false
+    },
+    statusImageFlagValue:{  //自定义显示图片状态
+      type:String,
+    },
   },
 
   /**
@@ -210,9 +217,30 @@ Component({
       // 勾选数据
       this.triggerEvent("choose", {
         item: list[index],
+        index: index,
         list: list.filter(it => it.checked), checked: list[index].checked
       })
     },
+
+      /**
+     * @desc   : 修改金额
+     * @author : 周兴
+     * @date   : 2024/5/22 11:46
+     */
+    changeAmount(e) {
+      let index = e.currentTarget.dataset.index
+      let key = e.currentTarget.dataset.key
+      let value = e.detail.value
+      let list = this.data.list;
+      if (list && list[index]) {
+        list[index][key] = Number(value)
+      }
+      this.setData({
+        list: list
+      })
+      this.triggerEvent("changeAmount", { key: key,value: value,
+        index: e.currentTarget.dataset.index })
+    },
     /**
     * @desc   : 打电话
     * @author : 周兴

+ 21 - 5
components/dkbase/dk-list/dk-list.wxml

@@ -21,7 +21,7 @@
               <view class="title-class" style="width: {{(statusFlag &&  item[status] || switchFlag || flgPoint)?'100%':'100%'}}">
                 <dk-text catchtap="toTitle" data-item="{{item}}" textDecoration="underline" fontSize="15px" value="{{item[title]}}"></dk-text>
               </view>
-            </view >
+            </view>
             <view style="display: flex;">
               <!-- 原来的弯角 -->
               <view class="corner-view" wx:if="{{item[titleCorner]}}">
@@ -54,7 +54,7 @@
               </view>
               <!--按钮-->
               <view wx:if="{{titleBtnText}}" class="status-class" data-item="{{item}}" catchtap="handleTitleBtn">
-                <view class="btn-detail-class" >{{titleBtnText}}
+                <view class="btn-detail-class">{{titleBtnText}}
                 </view>
               </view>
               <!-- 三个小点 -->
@@ -69,6 +69,10 @@
         <view wx:if="{{!switchFlag && item['flgValid'] !=null && !item['flgValid']}}" class="status-view">
           <van-image round width="150rpx" height="150rpx" src="{{imageUrl + statusImage}}" />
         </view>
+      <!-- 图标自定义 -->
+        <view wx:if="{{statusImageFlag && item[statusImageFlagValue]}}" class="status-view">
+          <van-image round width="150rpx" height="150rpx" src="{{imageUrl + statusImage}}" />
+        </view>
 
         <view wx:if="{{ !detailReportFlag}}" style="margin-top: 20rpx; margin-bottom: 20rpx;">
           <!-- 内容 -->
@@ -103,7 +107,8 @@
         </view>
         <!--明细报表-->
         <view wx:if="{{ detailReportFlag}}" style="margin-top: 10rpx;">
-          <view wx:if="{{!contentCol}}" class="table-content-row-detail" wx:for="{{content}}" wx:for-item="col" data-item="{{col}}">
+          <view wx:if="{{!contentCol}}" class="table-content-row-detail" wx:for="{{content}}"  wx:for-item="col"  wx:for-index="index_" data-item="{{col}}">
+       
             <view style="display: flex;justify-content: space-between;align-items: center;">
               <!--左侧-->
               <view class="table-content-class">
@@ -114,9 +119,20 @@
                 </view>
               </view>
               <!--右侧-->
-              <view class="table-content-class" style="display: flex;color:{{col.right.type == 'qty'?'#95A8CB':'002340'}}">
-                <view wx:if="{{col.right.type == 'qty'}}">x</view>{{item[col.right.name]?item[col.right.name]:''}}
+              <view class="table-content-class" style="display: flex;color:{{col.right.type == 'qty'?'#95A8CB':'#002340'}}">
+                <view style="display: flex;" wx:if="{{col.right.type == 'price'}}">
+                  <view style="display: flex;align-items: center;">
+                    {{col.right.title}}
+                  </view>
+                  <dk-number-input inputWidthFlag="{{true}}" fontSize="19" center="right" data-key="{{col.right.name}}" inputColor="#FF7B1A" fontWeight="600" inputValue="{{item[col.right.name]?item[col.right.name]:0}}" data-index="{{index}}" bind:triggerBindValue="changeAmount">
+                  </dk-number-input>
+                </view>
+                <view wx:if="{{col.right.type !== 'price'}}" style="display: flex;">
+                  <view wx:if="{{col.right.type == 'qty'}}">x</view>{{item[col.right.name]?item[col.right.name]:''}}
+                </view>
+
               </view>
+
             </view>
           </view>
           <!--根据contentCol切换-->

+ 97 - 0
components/dkbase/dk-navbar/dk-navbar.js

@@ -0,0 +1,97 @@
+// components/dkbase/dk-navbar/dk-navbar.js
+Component({
+
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+      navbarTitle:{
+        type: String,
+        value: 'dk自定义头部导航'
+      },
+      leftArrow:{
+        type: Boolean,
+        value: true
+      },
+      operateShow:{
+        type: Boolean,
+        value: true
+      },
+      navigationStyle: {
+        type: String,
+        value: ''
+      },
+      titleFontColor: {
+        type: String,
+        value: '#000000'
+      },
+      fixed:{
+        type: Boolean,
+        value: false
+      },
+      operateUrl:{
+        type: String,
+        value: ''
+      },
+      customStyle:{
+        type: String,
+        value: ''
+      }
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+      paddingTopNum: wx.getSystemInfoSync().statusBarHeight+7
+    },
+    lifetimes: {
+      attached: function() {
+        // 在组件实例进入页面节点树时执行
+        this.getHeight()
+      },
+      detached: function() {
+        // 在组件实例被从页面节点树移除时执行
+      },
+    },
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+      /**
+       * 获取自定义组件高度并向上抛出
+       * @author 刘尧
+       */
+      getHeight(){
+        let that = this
+        let query = wx.createSelectorQuery().in(this);
+        query.select('.van-nav-bar').boundingClientRect(function (rect) {
+          that.triggerEvent('getNavbarHeight', rect);
+        }).exec()
+      },
+      clickLeft(e){
+        this.triggerEvent('clickBack', {
+          value: e
+        })
+      },
+      operateClick(e){
+        let url = this.data.operateUrl
+        let toUrl = null;
+        if (url) {
+          // 看下是否包括http,http就跳转到product页面
+          if (url.indexOf('http') >= 0) {
+            toUrl = '/pages/product/product'
+          } else {
+            // 说明是跳本产品
+            toUrl = url;
+          }
+          wx.navigateTo({
+            url: toUrl,
+            success: function (res) {
+              res.eventChannel.emit('url', url);
+            }
+          })
+        }
+      }
+    }
+})

+ 4 - 0
components/dkbase/dk-navbar/dk-navbar.json

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

+ 28 - 0
components/dkbase/dk-navbar/dk-navbar.wxml

@@ -0,0 +1,28 @@
+<!--components/dkbase/dk-navbar/dk-navbar.wxml-->
+<van-nav-bar
+  left-arrow
+  z-index="10000"
+  bind:click-left="clickLeft"
+  fixed="{{fixed}}"
+  custom-style="{{customStyle}}"
+  border="{{false}}"
+  class="van-nav-bar"
+>
+  <view slot="title">
+    <view class="title">
+        <text style="color: {{titleFontColor}};">{{navbarTitle}}</text>
+        <van-icon wx:if="{{operateShow}}" style="margin-left: 10rpx;" size="15px" name="question-o" data-item="{{item}}" catchtap="operateClick" color="{{titleFontColor}}" />
+    </view>
+  </view>
+</van-nav-bar>
+<!-- <view class="content" style="padding-top: {{paddingTopNum}}px;background: {{navigationStyle === 'none' || fixed == true ? none : '#ffffff'}}; {{fixed == false ? '': 'position: fixed;'}}">
+  <view class="title-content">
+    <view class="left-button" bindtap="clickLeft">
+      <van-icon name="arrow-left" size="18px" color="{{titleFontColor}}"/>
+    </view>
+    <view class="title">
+      <text style="color: {{titleFontColor}};"></text>
+      <van-icon wx:if="{{operateShow}}" style="margin-left: 10rpx;" size="15px" name="question-o" data-item="{{item}}" catchtap="operateClick" color="{{titleFontColor}}" />
+    </view>
+  </view>
+</view> -->

+ 39 - 0
components/dkbase/dk-navbar/dk-navbar.wxss

@@ -0,0 +1,39 @@
+.content{
+	width: 100%;
+	height: 30px;
+  line-height: 30px;
+  padding-bottom: 15rpx;
+	top: 0;
+	left: 0;
+}
+
+.title-content{
+  display: flex;
+  justify-content: center;
+  align-content: center;
+}
+
+.title{
+  width: 91%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  align-content: center;
+}
+
+.left-button{
+  display: flex;
+  justify-content: center;
+  align-content: center;
+  position: fixed;
+  left: 20rpx;
+  padding: 15rpx;
+}
+
+.back-left-button{
+  width: 20rpx;
+  height: 17px;
+  margin: auto;
+  padding: auto;
+  left: 30rpx;
+}

+ 4 - 0
components/dkbase/dk-number-input/dk-number-input.js

@@ -127,6 +127,10 @@ Component({
       type: Number,
       value: 13
     },
+    inputWidthFlag: {
+      type: Boolean,
+      value: false
+    },
     /**
      * 字体大小
      */

+ 1 - 1
components/dkbase/dk-number-input/dk-number-input.wxml

@@ -20,7 +20,7 @@
   </view> -->
   <!--文本框-->
   <view wx:else>
-    <van-field input-align="right" required="{{required}}" label-class="input-title-class" style="--color--:{{titleColor}};--inputColor--:{{inputColor}};--fontSize--:{{fontSize + 'px'}};--width--:{{titleWidth}};--fontWeight--:{{titleFontWeight}};--inputFontWeight--:{{inputColor}}" value="{{inputValue?inputValue:undefined}}" input-align="{{center}}" label="{{titleValue}}" placeholder="{{placeholder}}" autosize auto-focus clearable border="{{ false }}" input-class="dk-cell-value-class" type="text" inputMode="decimal" bind:focus="bindFocus" bind:change="bindInput" bind:blur="bindBlur">
+    <van-field input-align="right" required="{{required}}" label-class="input-title-class" style="--color--:{{titleColor}};--inputColor--:{{inputColor}};--fontSize--:{{fontSize + 'px'}};--width--:{{titleWidth}};--fontWeight--:{{titleFontWeight}};--inputFontWeight--:{{inputColor}}" value="{{inputValue?inputValue:undefined}}" input-align="{{center}}" label="{{titleValue}}" placeholder="{{placeholder}}" autosize auto-focus clearable border="{{ false }}" input-class="{{inputWidthFlag ? 'dk-cell-value-class-input' : 'dk-cell-value-class'}}" type="text" inputMode="decimal" bind:focus="bindFocus" bind:change="bindInput" bind:blur="bindBlur">
     </van-field>
   </view>
 </view>

+ 6 - 1
components/dkbase/dk-number-input/dk-number-input.wxss

@@ -49,7 +49,12 @@
   color:var(--inputColor--) !important;
   font-weight: var(--inputFontWeight--) !important;
 }
-
+.dk-cell-value-class-input{
+  font-size:var(--fontSize--) !important;
+  color:var(--inputColor--) !important;
+  font-weight: var(--inputFontWeight--) !important;
+  width: 110rpx !important;
+}
 .van-field__input--right {
   text-align: right !important;
 }

+ 15 - 1
components/dkbase/dk-popup/dk-popup.js

@@ -40,7 +40,7 @@ Component({
     stepperDecimal:{
       type: String,
       value: ''
-    },
+    }, 
     // 是否只读
     readonly: {
       type: Boolean,
@@ -90,6 +90,12 @@ Component({
       type: String,
       value: 'price'
     },
+      // 价格
+      priceTailCol: {
+        type: String,
+        value: 'priceTailCol'
+      },
+    
     // 价格标题
     priceTitle: {
       type: String,
@@ -249,6 +255,10 @@ Component({
         if (item.required && !form[item.code]) {
           item.errMsg = title + '不为空'
           flag = false;
+        } 
+        if (item.negativeNumber && form[item.code]<0) {
+          item.errMsg = title + '不能为负数'
+          flag = false;
         }
       })
       this.setData({
@@ -475,6 +485,10 @@ Component({
       this.setData({
         form: form,
         contentObj: contentObj
+      })   
+      this.triggerEvent("changeNumberField", { 
+        value: e.detail.value, 
+        key:e.target.dataset.key
       })
     },
     /**

+ 8 - 5
components/dkbase/dk-popup/dk-popup.wxml

@@ -14,8 +14,10 @@
         <dk-text fontWeight="normal" value="{{form[descCol]}}"></dk-text>
       </view>
       <view style="display: flex;padding-top: 5rpx;">
-        <view class="price-pop-class">
-          <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="bold" title="{{priceTitle}}" content="{{form[priceCol]}}"></dk-cell>
+        <view class="price-pop-class" style="display: flex;">
+          <!-- <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="bold" title="{{priceTitle}}" tail="{{form[priceTailCol]}}" content="{{form[priceCol]}}" tailLine="{{true}}" ></dk-cell> -->
+          <dk-cell wx:if="{{form[priceTailCol] != form[priceCol]}}" height="46rpx" left="0" fontSize="12" contentColor="#FF7B1A" fontWeight="bold" title="{{priceTitle}}" contentLine="{{true}}" content="{{form[priceTailCol]}}" ></dk-cell>
+          <dk-cell height="46rpx" style="margin-left: 20rpx;" left="0" fontSize="14" contentColor="#FF7B1A" fontWeight="bold" title="{{priceTitle}}" content="{{form[priceCol]}}"  ></dk-cell>
         </view>
       </view>
       <view wx:if="{{form[subCol]}}" style="padding-right: 30rpx;float: right;">
@@ -75,9 +77,10 @@
       <van-cell wx:if="{{item.type=='negativeStep'}}" border="{{ false }}" title-class="cell_title"  title="{{item.title?item.title:'数量'}}" required="{{item.required?true:false }}" custom-class="step-class">
         <dk-stepper value="{{form[item.code]}}" input-width="60px" integer="{{ form[stepperDecimal]==0}}"decimal-length="{{ form[stepperDecimal] }}" data-index="{{index}}" data-item="{{item}}" data-key="{{item.code}}" min="{{form[item.code + '_min']?form[item.code + '_min']:( item.min?item.min:-99999999999)}}" max="{{form[item.code + '_max']?form[item.code + '_max']:( item.max?item.max:999999999)}}" bind:change="changeStep" readonly="{{!!readonly}}" />
       </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}}" min="{{item.min}}"  negative="{{item.negative}}"  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="#FF7B1A" titleFontWeight="normal" required="{{item.required?true:false }}" requiredLeft="15rpx" titleColor="#95A8CB" inputValue="{{form[item.code]}}" titleWidth = "174px"bind:triggerBindValue="changeNumberField" bind:triggerBindBlur="blurNumberField"></dk-number-input>
+      <!--数字类--> 
+      <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="{{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}}">
       </van-field>

+ 1 - 1
components/dkbase/dk-save-button/dk-save-button.wxml

@@ -30,7 +30,7 @@
     <!-- <view style="display: flex;width: {{contentList && contentList.length > 0?'50%':'100%'}};justify-content: {{btnRightFlag?'flex-end':'left'}};"> -->
     <view style="display: flex;width: {{contentList && contentList.length > 0?'auto':'100%'}};justify-content: {{btnRightFlag?'flex-end':'left'}};min-width:236rpx;">
       <view class="btn-class" style="margin-right: {{(btnAutoWidthFlag && index != buttonList.length - 1)?'20rpx':''}};  width:{{btnAutoWidthFlag?(100/buttonList.length + '%'): (item.width?item.width:'156rpx')}};" wx:for="{{buttonList}}" wx:for-item="item" data-item="{{item}}" wx:key="index">
-        <van-button size="large" plain="{{item.plain}}" data-item="{{item}}" color="{{item.color?item.color:'#3E69F6'}}" custom-style="height:88rpx;border-radius:15rpx ;" bind:click="submit" type="info">{{item.title}}
+        <van-button size="large" plain="{{item.plain}}" data-item="{{item}}" color="{{item.color?item.color:'#3E69F6'}}" custom-style="height:88rpx;border-radius:15rpx ; color:{{item.plain?'#3E69F6':'#FFFFFF'}};background:{{item.plain?'#FFFFFF':'#3E69F6'}}" bind:click="submit" type="info">{{item.title}}
         </van-button>
       </view>
     </view>

+ 5 - 0
components/dkbase/dk-side-pull-menu/dk-side-pull-menu.js

@@ -24,6 +24,11 @@ Component({
     searchFormNumber: {
       type: Number,
       default: 0
+    },
+    // 自定义导航栏高度
+    navBarHeight: {
+      type: Number,
+      default: 0
     }
   },
   options: {

+ 1 - 1
components/dkbase/dk-side-pull-menu/dk-side-pull-menu.wxml

@@ -1,5 +1,5 @@
 <!-- 抽屉 侧拉菜单-->
-<van-popup show="{{show_p}}" position="right" bind:close="onClose" class="popup" custom-style="height:100%;width:75%">
+<van-popup show="{{show_p}}" position="right" bind:close="onClose" class="popup" custom-style="height:100%;width:75%;padding-top:{{navBarHeight}}px">
   <view style="height:45rpx;"></view>
   <scroll-view scroll-y class="popup-scroll-view">
     <slot>

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

@@ -1,4 +1,4 @@
-<view style="display: flex;">
+<view style="display: flex;align-items: center;">
   <dk-tag padding="0 8rpx" class="vanTag" wx:if="{{titleTag && titleTag.length > 0}}" fontSize="{{fontSize + 'px'}}" value="{{titleTag}}"></dk-tag>
   <view class="title_class" style="--indent--:{{(indent && indent!= 0)?(indent + 'rpx'):((titleTag.length * fontSize + 2 + 12 ) * 2 + 'rpx') }};--height--:{{title.length == 0?'50rpx':'auto'}};color:#1B365D; margin-left: 8rpx;  font-weight:bold; --titleFontSize--:{{titleFontSize}} ">
     {{title}}

+ 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 - 1
components/dkbusiness/dk-dropdown-menu/dk-dropdown-menu.js

@@ -44,6 +44,11 @@ Component({
     searchTextPlaceholder: {
       type: String,
     },
+    // 自定义导航栏高度
+    navBarHeight: {
+      type: Number,
+      value: 0
+    },
     // 结果集
     value: {
       type: String,
@@ -88,7 +93,6 @@ Component({
   },
   lifetimes: {
     attached: function () {
-      console.log('ttttt',this.data.pullMenuList);
       let pullMSelectMenuList = this.data.pullMenuList.filter(it => it.pullType == Constants.pullType.mSelect);
       let pullOtherMenuList = this.data.pullMenuList.filter(it => it.pullType != Constants.pullType.mSelect);
       this.setData({

+ 4 - 3
components/dkbusiness/dk-dropdown-menu/dk-dropdown-menu.wxml

@@ -13,11 +13,12 @@
     </van-dropdown-item>
   </van-dropdown-menu>
   <!-- 多选 -->
-  <dk-muti-dropdown-item show="{{dropDownFlag}}" typeName="{{dropType}}" bind:commit='mutiSearchAll' bind:muticlose='mutiCloseAll'></dk-muti-dropdown-item>
+  <dk-muti-dropdown-item show="{{dropDownFlag}}" typeName="{{dropType}}" bind:commit='mutiSearchAll' navBarHeight="{{navBarHeight}}" bind:muticlose='mutiCloseAll'></dk-muti-dropdown-item>
   <!--单选-->
-  <dk-single-dropdown-item show="{{dropSingleDownFlag}}" typeName='{{dropType}}' bind:commit='chooseData' bind:muticlose='muticlose'></dk-single-dropdown-item>
+  <dk-single-dropdown-item show="{{dropSingleDownFlag}}" typeName='{{dropType}}' bind:commit='chooseData' navBarHeight="{{navBarHeight}}" bind:muticlose='muticlose'></dk-single-dropdown-item>
   <!-- 筛选 -->
-  <dk-side-pull-menu show_p="{{pickFlag}}" searchForm="{{form}}" bind:clearSearchForm="clearform" bind:doSearchData="mutiSearchAll" bind:onClose="mutiCloseAll">
+  <dk-side-pull-menu show_p="{{pickFlag}}" searchForm="{{form}}" bind:clearSearchForm="clearform" bind:doSearchData="mutiSearchAll" 
+  navBarHeight="{{navBarHeight}}" bind:onClose="mutiCloseAll">
     <view wx:for="{{pullMSelectMenuList}}" data-index="{{index}}" data-item="{{item}}">
       <dk-label-multiple-select id="{{item.code}}" show="{{dropDownFlag}}" typeName="{{item.typeName}}" bind:onClickTag="onClickTag"></dk-label-multiple-select>
     </view>

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

@@ -204,6 +204,11 @@ Component({
           })
         }
       }
+    },
+    // 自定义导航栏高度
+    navBarHeight: {
+      type: Number,
+      value: 0
     }
   },
 
@@ -355,6 +360,11 @@ Component({
         DataSourceCode = 'recType'
         name = '收支类型'
       }
+      // 库存
+      if(typeName === 'warehouse'){
+        DataSourceCode = 'warehouse',
+        name = '库存'
+      }
 
       this.setData({
         DataSourceCode: DataSourceCode

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

@@ -1,8 +1,8 @@
 <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">
+ <van-sticky scroll-top="0" offset-top="{{ navBarHeight }}">
    <view wx:if="{{Top_Height_Flag}}" style="height: 21vw;background: #fff;"></view>
    <van-search custom-class="search-class" shape="round" model:value="{{ conditions[typeName] }}" input-class="background:#c8c8c8;" placeholder="搜索" bind:change="onChange_input" bind:blur="blur_input" />
    <view class="choose_label" >
@@ -10,7 +10,7 @@
    </view>
  </van-sticky>
 
- <view class="root" style="height:calc(100% - 120rpx)">
+ <view class="root" style="height:calc(100% - 120rpx - 88px);margin-top: {{navBarHeight}}px;">
    <view class="scroll_search" style="overflow-x:hidden;">
      <scroll-view class="scroll_position"  scroll-x="{{false}}" scroll-y enable-back-to-top>
        <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">

+ 1 - 1
config/config.js

@@ -3,7 +3,7 @@ const profiles = 'dev';
 const configListObj = {
   // 北京东科企信软件有限公司 本地开发
   dev: {
-    server_add: 'http://192.168.0.93',     server_port: '7001',
+    server_add: 'http://192.168.0.55',     server_port: '7001',
     upload_url:'https://s.dev01.dkiboss.com:7000/api/mdm-server/file/upload',
     image_url:'https://s.dev01.dkiboss.com:7000/file',
     corpid: 'ww796c5d1684937b2f', //企业微信corpid

+ 17 - 2
i18n/zh-CN.js

@@ -21,6 +21,7 @@ const button = {
   leaveOffice: '离职',
   flgCanWxLogin: '手机登录',
   flgCanPcLogin: '电脑登录',
+  userAuthorize:'用户授权',
   flgCanLogin: '登录标识',
   parent: '父级',
   default: '默认',
@@ -43,6 +44,7 @@ const button = {
   invalidSuccessfully: '作废成功',
   tipPop: '用户区分商品色号、非标号使用',
   updateSpecialized: '升级专业版',
+  reNew:'续费',
 }
 
 // 资金
@@ -95,6 +97,12 @@ const mac = {
   returnAmount: '退款',
   biznisNo: '业务单号',
   settlement: '结算方式',
+  actualTotalAmount: '实际合计金额',
+  wholeOrderDiscount: '整单折扣',
+  goodswholeOrderDiscount: '商品折扣',
+  costPrice: '成本单价',
+  factPrice: '实际单价',
+  factAmt: '实际金额',
 }
 
 const ivt = {
@@ -172,6 +180,8 @@ const ivt = {
   inventoryInformation: '盘点信息',
   inventoryEmployees: '盘点员工',
   inventoryOrg: '盘点部门',
+  orgTwo: '部门',
+  costCheck: '核对成本',
   inventoryWh: '盘点仓库',
   chooseLnventoryLossReasons: '请输入盘亏原因',
   inboundTotalAmount: '入库总额',
@@ -216,7 +226,7 @@ const home = {
   cpInfo: '商户信息',
   paramSetting: '参数设置',
   productDetail: '产品详情',
-  homeTitle: '泛家居建陶行业云服务',
+  homeTitle: '泛家居行业云服务',
   homeProduct: '了解产品',
   homeFreeLogin: '免费体验',
   homeAddCompany: '加入企业',
@@ -228,6 +238,7 @@ const home = {
   wechatScan: '使用微信扫码',
   waitAddCom: '等待加入企业中...',
   selectCompany: '请选择进入企业',
+  buyUser:'购买授权',
 }
 
 //  基础数据
@@ -372,7 +383,8 @@ const saleOrder = {
   order_out: '销售出库',
   delivery_Time: '送货日期',
   deliveryDate: '送货日期',
-  viewVoidedDocuments: '查看作废单据',
+  viewVoidedDocuments: '包含作废单据',
+  viewNoCostDocuments: '仅查询未核对',
   docClass: '单据类型',
   openingNumberZero: '期初数量是0',
   currentNumberZero: '入库数量是0',
@@ -592,6 +604,9 @@ const goodsSku = {
   openingInv: '期初库存',
   flgPrice: '价格体系',
   packageIvtBox: '可售包装',
+  warningMsg:'警戒信息',
+  warningLowerLimit: '警戒下限',
+  warningUpperLimit: '警戒上限'
 }
 const fund = {
   openingBalance: "期初余额",

+ 6 - 0
jsconfig.json

@@ -0,0 +1,6 @@
+{
+	"compilerOptions": {
+		"target": "es2015",
+		"module": "commonjs"
+	}	
+}

+ 88 - 21
mixins/index.js

@@ -14,7 +14,7 @@ import Dialog from '@/dist/dialog/dialog.js';
 const app = getApp()
 
 module.exports = {
-  data: {  
+  data: {
     // 系统版本
     gradeCode: null,
     // 图片路径
@@ -70,6 +70,8 @@ module.exports = {
     table: null,
     // 界面的功能编码
     menuUuid: null,
+    // 操作手册跳转的链接
+    guideUrl: null,
     // 语言包
     $t: app.globalData.lang,
     // 是否进行校验
@@ -79,7 +81,11 @@ module.exports = {
     // 初始加载查询
     initSearchFlag: true,
     // params事件监听,解决重复进入的问题
-    paramsInitFlag:true
+    paramsInitFlag: true,
+    // 自定义导航栏的高度
+    navBarHeight: 0,
+    // 页面头部高度
+    stickyHeight: 0
   },
   /**
    * @desc : 获取路由信息,供data中的对象使用
@@ -262,8 +268,10 @@ module.exports = {
     let name;
     let item;
     if (typeof e === 'object') {
-      name = e.currentTarget.dataset.name;
-      item = e.currentTarget.dataset.item;
+      if (e && e.currentTarget) {
+        name = e.currentTarget.dataset.name;
+        item = e.currentTarget.dataset.item;
+      }
       // 那可能是在detail中
       if (!name && e.detail) {
         name = e.detail.name;
@@ -313,8 +321,16 @@ module.exports = {
           events: {
             // 保存成功后刷新页面
             refresh: function (data) {
-              // 刷新一览界面
-              _this.searchData();
+              console.log('data', data);
+              if (data.backFlag) {
+                // 刷新一览界面
+                wx.reLaunch({
+                  url: '/pages/welcome/welcome?' + name + '=true',
+                })
+              } else {
+                // 刷新一览界面
+                _this.searchData();
+              }
             }
           },
           success: function (res) {
@@ -379,7 +395,7 @@ module.exports = {
   printedBill(row) {
     // 查询票据
     let docName = app.globalData['routeUrl'][this.data.routeObjName].docName
-    console.log('docName',docName,row);
+    console.log('docName', docName, row);
     if (!docName || !row || !row.id) {
       return;
     }
@@ -464,7 +480,7 @@ module.exports = {
                 url: url,
                 events: {
                   // 回调后
-                  refresh: function (data) { 
+                  refresh: function (data) {
                     if (that.handleSaveData) {
                       that.handleSaveData();
                     }
@@ -492,9 +508,20 @@ module.exports = {
               url: url,
               events: {
                 // 回调后
-                refresh: function (data) { 
-                  if (that.handleSaveData) {
-                    that.handleSaveData();
+                refresh: function (data) {
+                  // 回退
+                  if (data.backFlag) {
+                    const eventChannel = that.getOpenerEventChannel();
+                    eventChannel.emit('refresh', {
+                      id: 1
+                    })
+                    wx.navigateBack({
+                      delta: 1
+                    })
+                  } else {
+                    if (that.handleSaveData) {
+                      that.handleSaveData();
+                    }
                   }
                 }
               },
@@ -502,7 +529,7 @@ module.exports = {
                 // 通过eventChannel向被打开页面传送数据
                 res.eventChannel.emit('params', {
                   params: that.data.params,
-                  formType:that.data.params.formType?that.data.params.formType:''
+                  formType: that.data.params.formType ? that.data.params.formType : ''
                 })
               }
             })
@@ -697,7 +724,6 @@ module.exports = {
     // 给参数赋值 
     this._getData(param).then(res => {
       if (res && res.data.code === Constants.SUCESS_CODE) {
-        console.log("_other", res);
         // 给变量赋值
         if (this.setValuesByEdit) {
           this.setValuesByEdit(res.data.data)
@@ -762,7 +788,8 @@ module.exports = {
             if (closeFlag) {
               const eventChannel = _this.getOpenerEventChannel();
               eventChannel.emit('refresh', {
-                id: 1
+                id: 1,
+                backFlag: true
               })
               wx.navigateBack({
                 delta: 1
@@ -1077,6 +1104,16 @@ module.exports = {
     }
   },
   /**
+   * 点击返回按钮返回上一层
+   * @author 刘尧
+   * @date 2024.05.31
+   */
+  handleNavBack() {
+    wx.navigateBack({
+      data: 1
+    })
+  },
+  /**
    * @desc : 生命周期函数(onShow)
    * @author : 周兴
    * @date : 2024/1/22
@@ -1121,11 +1158,11 @@ module.exports = {
       let _this = this;
       // 指定类型
       eventChannel.once('params', function (data) {
-        if(!_this.data.paramsInitFlag){
+        if (!_this.data.paramsInitFlag) {
           return;
         }
         _this.setData({
-          paramsInitFlag:false
+          paramsInitFlag: false
         })
         // 获取参数
         if (data.formMode) {
@@ -1134,11 +1171,18 @@ module.exports = {
             other: data.item ? (data.item.button ? data.item.button.other : null) : "",
             formMode: data.formMode,
             menuUuid: data.menuUuid,
+            guideUrl: data.guideUrl
           })
         }
-        if(data.params){
+        //是否返回原始页面
+        if (data.formReturnMode) {
           _this.setData({
-            params:data.params
+            formReturnMode: data.formReturnMode
+          })
+        }
+        if (data.params) {
+          _this.setData({
+            params: data.params
           })
         }
         //菜单编码
@@ -1202,11 +1246,11 @@ module.exports = {
           // _this.loadTempData();
         }
       })
-      setTimeout(()=>{
+      setTimeout(() => {
         _this.setData({
-          paramsInitFlag:true
+          paramsInitFlag: true
         })
-      },2000)
+      }, 2000)
     } else {
       // 加载后续数据
       this.handleLoadData();
@@ -1274,4 +1318,27 @@ module.exports = {
       wx.stopPullDownRefresh()
     }, 300)
   },
+  /**
+   * 获取自定义导航栏高度
+   * @author: 刘尧
+   */
+  getNavbarHeight(e){
+    const detail = e.detail
+    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()
+  }
 };

+ 5 - 4
package-base-select/pages/select-choose-coordination/select-choose-coordination.js

@@ -94,16 +94,17 @@ Page({
    */
   saveButton(e) {
     let formData = JSON.parse(this.data.formData)
-    console.log(formData.itemList)
-    if (this.data.item == Constants.billType.sale) {
-
-    }
+    console.log(formData.itemList) 
     formData.itemList.forEach(res => {
       if (this.data.item == Constants.billType.saleOut) {
         res['priceOut'] = res.itemPrice
         res['outingQty'] = res.itemQty
         res['outingAmt'] = res.itemAmt
       }
+      if (this.data.item == Constants.billType.sale) {
+        res['priceSale'] = res.itemPrice 
+        res['sumPrice'] = res.itemAmt
+      }
       res['brandName'] =  res['supName']+"(外协)"
     })
 

+ 253 - 213
package-base-select/pages/select-goods/select-goods.js

@@ -20,13 +20,13 @@ Page({
     gradeCode: app.globalData.company.gradeCode,
     firstFlag: true,
     orderBy: [{
-      "text": "可售量升序",
-      "value": 1
-    },
-    {
-      "text": "可售量降序",
-      "value": 2
-    }
+        "text": "可售量升序",
+        "value": 1
+      },
+      {
+        "text": "可售量降序",
+        "value": 2
+      }
     ],
     routeObjName: 'goodsSku',
     dataItem: null,
@@ -38,7 +38,38 @@ Page({
     }],
     brandId: null,
     active: 0,
-    popContent: [],
+    popContent: [{
+        code: 'itemQty',
+        type: 'negativeStep',
+        title: '数量',
+        required: true
+      },
+      {
+        code: 'whId',
+        name: 'whName',
+        title: '仓库',
+        type: 'choose',
+        urlKey: 'chooseWh'
+      },
+      {
+        code: 'skuSpec',
+        title: '规格',
+        type: 'str',
+        readonly: true,
+        dropType: ''
+      },
+      {
+        code: 'brandName',
+        title: mixins.$t('brandName'),
+        type: 'str',
+        readonly: true,
+      },
+      {
+        code: 'nonStdCode',
+        title: '色号',
+        type: 'str',
+      },
+    ],
     popContentBox: [],
     popupTopObj: [{
       leftTitle: '库存量',
@@ -101,8 +132,7 @@ Page({
       }]
       this.setData({
         buttonList: buttonList,
-        contentList: [
-          {
+        contentList: [{
             code: 'amount',
             content: 0,
             type: 'number',
@@ -120,60 +150,59 @@ Page({
     if (this.data.item == Constants.billType.sale) {
       this.setData({
         popContent: [{
-          code: 'itemQty',
-          type: 'step',
-          title: mixins.$t("count"),
-          required: true
-        },
-        {
-          code: 'packageBox',
-          type: 'packageBox',
-          title: mixins.$t("packageBox"),
-          readonly: true
-        },
+            code: 'itemQty',
+            type: 'step',
+            title: mixins.$t("count"),
+            required: true
+          },
+          {
+            code: 'packageBox',
+            type: 'packageBox',
+            title: mixins.$t("packageBox"),
+          },
 
-        {
-          code: 'priceSale',
-          type: 'number',
-          title: mixins.$t("priceSale"),
-          required: true,
-          center: 'right'
-        },
-        // {
-        //   code: 'whId',
-        //   name: 'whName',
-        //   title: mixins.$t("warehouseId"),
-        //   type: 'choose',
-        //   urlKey: 'openingInventory',
-        // },
-        {
-          code: 'whId',
-          name: 'whName',
-          title: mixins.$t("warehouseId"),
-          type: 'choose',
-          urlKey: 'chooseWh'
-        },
-        {
-          code: 'brandName',
-          title: mixins.$t('brandName'),
-          type: 'str',
-          readonly: true,
-        },
-        {
-          code: 'nonStdCode',
-          title: mixins.$t("goodsBatch"),
-          type: 'str',
-        },
-        {
-          code: 'flgGift',
-          title: mixins.$t("flgGift"),
-          type: 'checkbox',
-        },
-        {
-          code: 'usePlace',
-          title: mixins.$t("usePlace"),
-          type: 'str',
-        },
+          {
+            code: 'priceSale',
+            type: 'number',
+            title: mixins.$t("priceSale"),
+            required: true,
+            center: 'right'
+          },
+          // {
+          //   code: 'whId',
+          //   name: 'whName',
+          //   title: mixins.$t("warehouseId"),
+          //   type: 'choose',
+          //   urlKey: 'openingInventory',
+          // },
+          {
+            code: 'whId',
+            name: 'whName',
+            title: mixins.$t("warehouseId"),
+            type: 'choose',
+            urlKey: 'chooseWh'
+          },
+          {
+            code: 'brandName',
+            title: mixins.$t('brandName'),
+            type: 'str',
+            readonly: true,
+          },
+          {
+            code: 'nonStdCode',
+            title: mixins.$t("goodsBatch"),
+            type: 'str',
+          },
+          {
+            code: 'flgGift',
+            title: mixins.$t("flgGift"),
+            type: 'checkbox',
+          },
+          {
+            code: 'usePlace',
+            title: mixins.$t("usePlace"),
+            type: 'str',
+          },
         ]
       })
     }
@@ -181,48 +210,48 @@ Page({
     if (this.data.item == Constants.billType.inventory) {
       this.setData({
         popContent: [{
-          code: 'itemQty',
-          type: 'step',
-          title: mixins.$t("count"),
-          required: true
-        },
-        {
-          code: 'packageBox',
-          type: 'packageBox',
-          title: mixins.$t("packageBox"),
-        },
-        {
-          code: 'priceOut',
-          type: 'number',
-          title: mixins.$t("priceSale"),
-          required: true,
-          readonly: false
-        },
+            code: 'itemQty',
+            type: 'step',
+            title: mixins.$t("count"),
+            required: true
+          },
+          {
+            code: 'packageBox',
+            type: 'packageBox',
+            title: mixins.$t("packageBox"),
+          },
+          {
+            code: 'priceOut',
+            type: 'number',
+            title: mixins.$t("priceSale"),
+            required: true,
+            readonly: false
+          },
 
-        {
-          code: 'whName',
-          readonly: true,
-          title: mixins.$t("warehouseId"),
-          type: 'str'
-        },
-        {
-          code: 'brandName',
-          title: mixins.$t('brandName'),
-          type: 'str',
-          readonly: true,
-        },
-        {
-          code: 'nonStdCode',
-          readonly: true,
-          title: mixins.$t("goodsBatch"),
-          type: 'str',
-          tip: mixins.$t('tipPop'),
-        },
-        {
-          code: 'usePlace',
-          title: mixins.$t("usePlace"),
-          type: 'str',
-        },
+          {
+            code: 'whName',
+            readonly: true,
+            title: mixins.$t("warehouseId"),
+            type: 'str'
+          },
+          {
+            code: 'brandName',
+            title: mixins.$t('brandName'),
+            type: 'str',
+            readonly: true,
+          },
+          {
+            code: 'nonStdCode',
+            readonly: true,
+            title: mixins.$t("goodsBatch"),
+            type: 'str',
+            tip: mixins.$t('tipPop'),
+          },
+          {
+            code: 'usePlace',
+            title: mixins.$t("usePlace"),
+            type: 'str',
+          },
         ]
       })
     }
@@ -232,57 +261,60 @@ Page({
       this.setData({
 
         popContent: [{
-          code: 'itemQty',
-          type: 'step',
-          title: mixins.$t("count"),
-          required: true
-        },
-        {
-          code: 'packageBox',
-          type: 'packageBox',
-          title: mixins.$t("packageBox"),
-        },
-
-        {
-          code: 'priceOut',
-          type: 'number',
-          title: mixins.$t("priceSale"),
-          required: true,
-          readonly: false,
-          center: 'right'
-        },
-        {
-          code: 'whId',
-          name: 'whName',
-          title: mixins.$t("warehouseId"),
-          type: 'choose',
-          urlKey: 'chooseWh'
-        },
-        {
-          code: 'brandName',
-          title: mixins.$t('brandName'),
-          type: 'str',
-          readonly: true,
-        },
-        {
-          code: 'nonStdCode',
-          title: mixins.$t("goodsBatch"),
-          type: 'str',
-        },
-        {
-          code: 'usePlace',
-          title: mixins.$t("usePlace"),
-          type: 'str',
-        },
+            code: 'itemQty',
+            type: 'step',
+            title: mixins.$t("count"),
+            required: true
+          },
+          {
+            code: 'packageBox',
+            type: 'packageBox',
+            title: mixins.$t("packageBox"),
+          },
 
+          {
+            code: 'priceOut',
+            type: 'number',
+            title: mixins.$t("priceSale"),
+            required: true,
+            readonly: false,
+            center: 'right'
+          },
+          {
+            code: 'whId',
+            name: 'whName',
+            title: mixins.$t("warehouseId"),
+            type: 'choose',
+            urlKey: 'chooseWh'
+          },
+          {
+            code: 'brandName',
+            title: mixins.$t('brandName'),
+            type: 'str',
+            readonly: true,
+          },
+          {
+            code: 'nonStdCode',
+            title: mixins.$t("goodsBatch"),
+            type: 'str',
+          },
+          {
+            code: 'usePlace',
+            title: mixins.$t("usePlace"),
+            type: 'str',
+          },
+          {
+            code: 'flgGift',
+            title: mixins.$t("flgGift"),
+            type: 'checkbox',
+          },
         ]
       })
     }
     //销售退货
     if (this.data.item == Constants.billType.saleOutReturn) {
       this.setData({
-        contentList: [
-          {
+        contentList: [{
             code: 'amount',
             content: 0,
             type: 'number',
@@ -294,8 +326,7 @@ Page({
             quantity: 0
           }
         ],
-        popContent: [
-          {
+        popContent: [{
             code: 'itemQty',
             type: 'step',
             title: mixins.$t("count"),
@@ -340,43 +371,43 @@ Page({
     if (this.data.item == Constants.billType.purReturn) {
       this.setData({
         popContent: [{
-          code: 'itemQty',
-          type: 'step',
-          title: mixins.$t("count"),
-          required: true
-        },
-        {
-          code: 'packageBox',
-          type: 'packageBox',
-          title: mixins.$t("packageBox"),
-        },
-        {
-          code: 'priceStandard',
-          type: 'number',
-          title: mixins.$t("purReturnPrice"),
-          required: true,
-          readonly: true,
-          center: 'right'
-        },
-        {
-          code: 'whId',
-          name: 'whName',
-          choosePopupType: '',
-          title: mixins.$t("warehouseId"),
-          type: 'choose',
-          urlKey: 'selectInventorySku',
-        },
-        {
-          code: 'brandName',
-          title: mixins.$t('brandName'),
-          type: 'str',
-          readonly: true,
-        },
-        {
-          code: 'nonStdCode',
-          title: mixins.$t("goodsBatch"),
-          type: 'str',
-        },
+            code: 'itemQty',
+            type: 'step',
+            title: mixins.$t("count"),
+            required: true
+          },
+          {
+            code: 'packageBox',
+            type: 'packageBox',
+            title: mixins.$t("packageBox"),
+          },
+          {
+            code: 'priceStandard',
+            type: 'number',
+            title: mixins.$t("purReturnPrice"),
+            required: true,
+            readonly: true,
+            center: 'right'
+          },
+          {
+            code: 'whId',
+            name: 'whName',
+            choosePopupType: '',
+            title: mixins.$t("warehouseId"),
+            type: 'choose',
+            urlKey: 'selectInventorySku',
+          },
+          {
+            code: 'brandName',
+            title: mixins.$t('brandName'),
+            type: 'str',
+            readonly: true,
+          },
+          {
+            code: 'nonStdCode',
+            title: mixins.$t("goodsBatch"),
+            type: 'str',
+          },
         ]
       })
     }
@@ -718,15 +749,18 @@ Page({
         this.data.item == Constants.billType.inventory
       ) { //销售退货
         item = this.priceSystem(item, 'priceOut') //根据价格体系取值
-        item.priceOut = item.priceStandard ? item.priceStandard : 0 //标价
+        item.priceOut = item.priceStandard ? item.priceStandard : 0 //标价 //销售出库的inventory 
         if (this.data.gradeCode == 'STD') {
-          item.priceOut = 0
+          item.priceOut = 0 
         }
         item.sumPrice = item.priceOut * item.itemQty
       }
       if (this.data.item == Constants.billType.purReturn) { //采购退货 
         item.sumPrice = item.priceStandard ? item.priceStandard * item.itemQty : 0
       }
+      if(this.data.item == Constants.billType.sale){
+        item = this.priceSystem(item, 'priceSale') //根据价格体系取值
+      }
     }
 
     //选了辅助计量单位 正好 包装也有值 那么直接给出公式
@@ -802,17 +836,17 @@ Page({
       this.data.item == Constants.billType.inventory) {
       this.setData({
         popContentBox: [{
-          code: 'box',
-          type: 'step',
-          title: dataItem.subUnitName,
-          required: true
-        },
-        {
-          code: 'piece',
-          type: 'step',
-          title: dataItem.unitName,
-          required: true
-        },
+            code: 'box',
+            type: 'step',
+            title: dataItem.subUnitName,
+            required: true
+          },
+          {
+            code: 'piece',
+            type: 'step',
+            title: dataItem.unitName,
+            required: true
+          },
         ],
 
       })
@@ -822,10 +856,10 @@ Page({
     })
   },
   /**
- * @desc   : 修改str 文本变化
- * @author : 王英杰
- * @date   : 2024/2/2 11:46
- */
+   * @desc   : 修改str 文本变化
+   * @author : 王英杰
+   * @date   : 2024/2/2 11:46
+   */
   changeField(e) {
     console.log("changeField", e);
     let dataItem = JSON.parse(this.data.dataItem)
@@ -844,7 +878,8 @@ Page({
     let key = e.detail.key //pop里 修改项的 code
     let dataItem = JSON.parse(this.data.dataItem)
     // 采购订单
-    if (this.data.item == Constants.billType.pur ||
+    if (this.data.item == Constants.billType.sale ||
+      this.data.item == Constants.billType.pur ||
       this.data.item == Constants.billType.purInto ||
       this.data.item == Constants.billType.purReturn) {
       dataItem[key] = e.detail.value
@@ -1005,6 +1040,9 @@ Page({
         return
       }
     }
+    if (this.data.billType == Constants.billType.inventory){ //解决 销售订单的出库 没有价格问题  受销售出库的 选择库存限制
+      item.priceSale = item.priceOut
+    } 
     choosedGoodsList.push(item)
     this.setData({
       choosedGoodsList: choosedGoodsList
@@ -1029,7 +1067,7 @@ Page({
       Dialog.alert({
         title: '提示',
         message: '销售价格不能低于销售限价',
-      }).then(() => { })
+      }).then(() => {})
       return false
     }
     return true
@@ -1042,18 +1080,18 @@ Page({
   calculateParameters() {
     let contentList = this.data.contentList
     let choosedGoodsList = this.data.choosedGoodsList
-    let sumAmt = Number(0)
+    let sumPrice = Number(0)
     let sumQty = Number(0)
     choosedGoodsList.forEach(res => {
       if (this.data.billType == 'saleOut') {
-        sumAmt += (res.priceOut * res.itemQty)
+        sumPrice += (Number(res.priceOut) * Number(res.itemQty))
       } else if (this.data.billType == 'sale') {
-        sumAmt += (res.priceStandard * res.itemQty)
+        sumPrice += (Number(res.priceSale) * Number(res.itemQty))
       }
 
-      sumQty += res.itemQty
+      sumQty += Number(res.itemQty)
     })
-    contentList[0].content = choosedGoodsList.sum('sumPrice')
+    contentList[0].content = sumPrice
     contentList[1].quantity = sumQty
     this.setData({
       contentList: contentList
@@ -1077,7 +1115,7 @@ Page({
         url: chooseRoute,
         events: {
           // 回调后
-          bindData: function (data) { }
+          bindData: function (data) {}
         },
         success: function (res) {
           let data = {
@@ -1147,7 +1185,9 @@ Page({
    * @author : 姜永辉
    */
   getGoodsBrandNoPage() {
-    return this.excute(this.data.commonService, this.data.commonService.getGoodsBrandNoPage, { flgValid: true }).then(res => {
+    return this.excute(this.data.commonService, this.data.commonService.getGoodsBrandNoPage, {
+      flgValid: true
+    }).then(res => {
       console.log('getGoodsBrandNoPage', res.data.data)
       this.setData({
         typeList: this.data.typeList.concat(res.data.data)

+ 3 - 3
package-base-select/pages/select-goods/select-goods.wxml

@@ -404,15 +404,15 @@
 </dk-popup>
 
 <!-- 库存 -->
-<dk-popup wx:if="{{ billType == 'inventory' }}" type="sale" descCol="skuName"stepperDecimal ="decimalPlaces"  subCol="calculationFormula" titleTagCol="" titleCol="skuModel" iconCol="imagesUrl" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" priceTitle="标价:" priceCol="sumPrice" contentObj="{{popContent}}" bind:commit="editItems" bind:openPackageBox="openPackageBox"bind:changeStep="changeStep" bind:blurNumberField="blurNumberField" bind:changeField= "changeField" >
+<dk-popup wx:if="{{ billType == 'inventory' }}" type="sale" descCol="skuName"stepperDecimal ="decimalPlaces"  subCol="calculationFormula" titleTagCol="" titleCol="skuModel" iconCol="imagesUrl" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" priceTitle="" priceCol="sumPrice" contentObj="{{popContent}}" bind:commit="editItems" bind:openPackageBox="openPackageBox"bind:changeStep="changeStep" bind:blurNumberField="blurNumberField" bind:changeField= "changeField" >
 </dk-popup>
 
 
 <!-- 销售开单 -->
-<dk-popup wx:if="{{ billType == 'sale' }}" type="sale" titleTagCol="" subCol="calculationFormula" descCol="skuName" stepperDecimal ="decimalPlaces" titleCol="skuModel"  priceCol="sumPrice"  iconCol="imagesUrl"   value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" bind:changeStep="changeStep" bind:openPackageBox="openPackageBox" contentObj="{{popContent}}" bind:commit="editItems"bind:blurNumberField="blurNumberField">
+<dk-popup wx:if="{{ billType == 'sale' }}" type="sale" titleTagCol="" subCol="calculationFormula" descCol="skuName" stepperDecimal ="decimalPlaces" titleCol="skuModel"  priceCol="sumPrice"  iconCol="imagesUrl"   value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" bind:changeStep="changeStep" bind:openPackageBox="openPackageBox" contentObj="{{popContent}}" bind:commit="editItems" bind:blurNumberField="blurNumberField"  bind:changeField= "changeField">
 </dk-popup>
 <!-- 销售出库 -->
-<dk-popup wx:if="{{ billType == 'saleOut'}}" type="sale" titleTagCol="" subCol="calculationFormula" descCol="skuName" stepperDecimal ="decimalPlaces" titleCol="skuModel"  priceCol="sumPrice"  iconCol="imagesUrl"   value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:changeStep="changeStep"  bind:commit="editItems" popupTopObj="{{popupTopObj}}" bind:openPackageBox="openPackageBox"bind:blurNumberField="blurNumberField" bind:changeField= "changeField">
+<dk-popup wx:if="{{ billType == 'saleOut'}}" type="sale" titleTagCol="" subCol="calculationFormula" descCol="skuName" stepperDecimal ="decimalPlaces" titleCol="skuModel"  priceCol="sumPrice"  iconCol="imagesUrl"   value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:changeStep="changeStep"  bind:commit="editItems" popupTopObj="{{popupTopObj}}" bind:openPackageBox="openPackageBox" bind:blurNumberField="blurNumberField" bind:changeField= "changeField">
 </dk-popup>
 
 <!-- 箱片 -->

+ 1 - 1
package-base-select/pages/select-source-sale-order/select-source-sale-order.js

@@ -16,7 +16,7 @@ Page({
     orderService: app.globalData['orderService'],
     tableData: [],
     choooseInboundItemList: [],
-    buttonSaveList: [{ code: 'add', title: mixins.$t('confirm'), width: '120rpx', color: '#1B365D' }],
+    buttonSaveList: [{ code: 'add', title: mixins.$t('confirm'), width: '120rpx',  }],
     contentSaveList: [{ code: 'need', title: '合计金额', type: 'str' }, { code: 'amount', content: 0, type: 'number' }],
   },
   /**

+ 289 - 32
package-basic-data/pages/activity/activity.js

@@ -16,14 +16,23 @@ Page({
      * 页面的初始数据
      */
     data: {
+        // 是否加载完毕
+        loadFlag:false,
+        // 是否显示vip
+        showVip:false,
+        // 升级标识
+        upgradeFlag: false,
+        gradeCode: null,
+        freeFlag: false,
         // 企业名称
         companyName: null,
-        staffName: null,
-        staffPhone: null,
+        cpManager: null,
+        cpPhone: null,
         webMaxNum: null,
         wxMaxNum: null,
         cpEndDate: null,
         activityTable: null,
+        vipTable: null,
         readFlag: false,
         staffCount: {
             maxNum: 1,
@@ -31,6 +40,8 @@ Page({
             wxMaxNum: 0
         },
         curentAdItem: null,
+        // 选择的vip报表
+        chooseVipFlag:false,
         summaryInfo: {},
         routeObjName: 'company',
         pageFlag: false,
@@ -53,7 +64,11 @@ Page({
         // 计算截止日期
         let months = item.validLong + item.extraLong
         let endDate = app.globalData.company.endDate
-        endDate = new Date(endDate).addMonths(months)
+        // 升级需要从当天开始算
+        if (this.data.upgradeFlag) {
+            endDate = new Date()
+        }
+        endDate = new Date(endDate).addMonths(months).addDays(-1)
         summaryInfo.endDate = endDate.toDateStr();
         this.setData({
             curentAdItem: item,
@@ -63,6 +78,30 @@ Page({
         this.countSummaryAmount(item);
     },
     /**
+     * @desc : 选择VIP报表明细
+     * @author : 周兴
+     * @date : 2024/4/1
+     */
+    chooseVipItem(e) {
+        let item = e.currentTarget.dataset.item;
+        // let summaryInfo = this.data.summaryInfo
+        // // 计算截止日期
+        // let months = item.validLong + item.extraLong
+        // let endDate = app.globalData.company.endDate
+        // // 升级需要从当天开始算
+        // if (this.data.upgradeFlag) {
+        //     endDate = new Date()
+        // }
+        // endDate = new Date(endDate).addMonths(months).addDays(-1)
+        // summaryInfo.endDate = endDate.toDateStr();
+        this.setData({
+            chooseVipFlag: !this.data.chooseVipFlag,
+            // summaryInfo: summaryInfo
+        })
+        // 计算金额
+        this.countSummaryAmountSTD();
+    },
+    /**
      * @desc : 勾选已阅读表示
      * @author : 周兴
      * @date : 2024/5/17
@@ -80,6 +119,7 @@ Page({
      */
     countSummaryAmount() {
         let item = this.data.curentAdItem;
+        if(!item)return;
         let staffCount = this.data.staffCount;
         let summaryInfo = this.data.summaryInfo
         let amount = 0;
@@ -117,6 +157,70 @@ Page({
         this.countStaffInfo();
     },
     /**
+     * @desc : 获取标准版的价格显示
+     * @author : 周兴
+     * @date : 2024/4/1
+     */
+    countSummaryAmountSTD() {
+        let item = this.data.curentAdItem;
+        let vipTable = this.data.vipTable
+        let summaryInfo = this.data.summaryInfo
+        let amount = 0;
+        // 先清空
+        summaryInfo.amountInfo = '';
+        let extendDays = null;
+        let nowDate = new Date(new Date().toDateStr());
+        if (summaryInfo.reCountFlag) {
+            // 手机端用户
+            if (summaryInfo.wxMaxNum) {
+                summaryInfo.amountInfo += item.wxPrice + '(元) * ' + summaryInfo.wxMaxNum + '(个) ' 
+                amount += item.wxPrice * summaryInfo.wxMaxNum
+            }
+            // vip报表
+            if(this.data.chooseVipFlag && vipTable && vipTable.length > 0){
+                let vipItem = vipTable[0]
+                summaryInfo.amountInfo += + ' + ' +vipItem.wxPrice + '(元/VIP) ';
+                amount +=  vipItem.wxPrice;
+            }
+            if (summaryInfo.amountInfo) {
+                summaryInfo.amountInfo += ' = ' + amount + '(元)'
+                summaryInfo.amount = amount;
+            }
+            extendDays = new Date(summaryInfo.userEndDate).dayDiff(nowDate) + 1;
+        } else {
+            extendDays = new Date(summaryInfo.userEndDate).dayDiff(nowDate) + 1;
+            if (summaryInfo.wxMaxNum) {
+                summaryInfo.amountInfo += item.wxPrice + '(元)  '
+                amount += item.wxPrice * summaryInfo.wxMaxNum 
+            }
+            // vip报表
+            if(this.data.chooseVipFlag && vipTable && vipTable.length > 0){
+                let vipItem = vipTable[0]
+                console.log('vipItem.wxPrice',vipItem.wxPrice);
+                summaryInfo.amountInfo +=   ' + ' + vipItem.wxPrice + '(元/VIP) ';
+                summaryInfo.amountInfo = '( ' + summaryInfo.amountInfo + ' ) ';
+                amount +=  vipItem.wxPrice;
+            }
+            summaryInfo.amountInfo +=  ' / 365(天) * ' + extendDays + '(天) * ' + summaryInfo.wxMaxNum + '(个)'
+            if (summaryInfo.amountInfo) {
+                amount = (amount / 365 * extendDays) .toFixed(2);
+                summaryInfo.amountInfo += ' = ' + amount + '(元)'
+                summaryInfo.amount = amount;
+            }
+        }
+
+        // 计算一授权一天的单价
+        if (summaryInfo.userEndDate) {
+            let price = (summaryInfo.amount / summaryInfo.wxMaxNum / extendDays).toFixed(2);
+            summaryInfo.priceInfo = price
+            summaryInfo.extendDays = extendDays
+        }
+
+        this.setData({
+            summaryInfo: summaryInfo
+        })
+    },
+    /**
      * @desc : 统计电脑端和手机端的用户数
      * @author : 周兴
      * @date : 2024/4/1
@@ -132,8 +236,14 @@ Page({
         summaryInfo.staffInfo = '可配置手机端授权' + wxNum + '个;电脑端授权' + webNum + '个(包含当前用户)'
         summaryInfo.webMaxNum = webNum
         summaryInfo.wxMaxNum = wxNum
-        summaryInfo.buyBeginDate = new Date(this.data.cpEndDate).addDays(1).toDateStr();
-        summaryInfo.extendDays = new Date(summaryInfo.endDate).dayDiff(new Date(this.data.cpEndDate).addDays(1));
+        // 升级从当天算
+        if (this.data.upgradeFlag) {
+            summaryInfo.buyBeginDate = new Date().addDays(1).toDateStr();
+            summaryInfo.extendDays = new Date(summaryInfo.endDate).dayDiff(new Date().addDays(1));
+        } else {
+            summaryInfo.buyBeginDate = new Date(this.data.cpEndDate).addDays(1).toDateStr();
+            summaryInfo.extendDays = new Date(summaryInfo.endDate).dayDiff(new Date(this.data.cpEndDate).addDays(1));
+        }
         // 计算一授权一天的单价
         let price = (summaryInfo.amount / (webNum + wxNum) / summaryInfo.extendDays).toFixed(2);
         summaryInfo.priceInfo = price
@@ -174,35 +284,69 @@ Page({
         if (!currentUserCount) {
             return;
         }
-        // 判断数量是否超出续约授权
-        if (currentUserCount.wxNum > summaryInfo.wxMaxNum || currentUserCount.webNum > summaryInfo.webMaxNum) {
-            let staffInfo = [{ wxMaxNum: this.data.wxMaxNum, webMaxNum: this.data.webMaxNum, title: '当前授权', wxTitle: '手机授权', webTitle: '电脑授权', code: 'current' }, { wxMaxNum: summaryInfo.wxMaxNum, webMaxNum: summaryInfo.webMaxNum, title: '续费授权', wxTitle: '手机授权', webTitle: '电脑授权', code: 'renew' }]
-            this.save({ saveFlag: false, url: '/package-basic-data/pages/activity/detail/detail?staffInfo=' + JSON.stringify(staffInfo) });
+        if (this.data.gradeCode == Constants.gradeCode.STD) {
+            // 判断数量是否超出续约授权
+            if (currentUserCount.wxNum > summaryInfo.wxMaxNum && summaryInfo.reCountFlag) {
+                let staffInfo = [{ wxMaxNum: this.data.wxMaxNum, title: '当前授权', wxTitle: '手机授权', code: 'current', userTitle: '当前用户' }, { wxMaxNum: summaryInfo.wxMaxNum, title: '续费授权', wxTitle: '手机授权', code: 'renew' }]
+                this.save({ saveFlag: false, url: '/package-basic-data/pages/activity/detail/detail?staffInfo=' + JSON.stringify(staffInfo) });
+            } else {
+                this.save({});
+            }
         } else {
-            this.save({});
+            // 判断数量是否超出续约授权
+            if (currentUserCount.wxNum > summaryInfo.wxMaxNum || currentUserCount.webNum > summaryInfo.webMaxNum) {
+                let staffInfo = [{ wxMaxNum: this.data.wxMaxNum, webMaxNum: this.data.webMaxNum, title: '当前授权', wxTitle: '手机授权', webTitle: '电脑授权', code: 'current' }, { wxMaxNum: summaryInfo.wxMaxNum, webMaxNum: summaryInfo.webMaxNum, title: '续费授权', wxTitle: '手机授权', webTitle: '电脑授权', code: 'renew' }]
+                this.save({ saveFlag: false, url: '/package-basic-data/pages/activity/detail/detail?staffInfo=' + JSON.stringify(staffInfo) });
+            } else {
+                this.save({});
+            }
         }
     },
     /**
+     * @desc : 改变用户授权数
+     * @author : 周兴
+     * @date : 2024/4/1
+     */
+    changeUserSTD(e) {
+        let summaryInfo = this.data.summaryInfo
+        summaryInfo.wxMaxNum = e.detail
+        this.setData({
+            summaryInfo: summaryInfo
+        })
+        // 计算金额
+        this.countSummaryAmountSTD();
+    },
+    /**
      * @desc : 校验
      * @author : 周兴
      * @date : 2024/4/1
      */
     validData() {
-        if (!this.data.readFlag) {
-            util.showToast('请勾选阅读须知');
-            return false;
-        }
-        let curentAdItem = this.data.curentAdItem;
-        if (!curentAdItem) {
-            util.showToast('请选择活动');
-            return false
-        }
-        // 必须要选择一个授权
-        let staffCount = this.data.staffCount
-        if (!staffCount.maxNum || !staffCount.webMaxNum || !staffCount.wxMaxNum) {
-            util.showToast('请选择一个授权');
-            return false
+        // 专业版校验
+        if (this.data.gradeCode == Constants.gradeCode.PRO) {
+            if (!this.data.readFlag) {
+                util.showToast('请勾选阅读须知');
+                return false;
+            }
+            let curentAdItem = this.data.curentAdItem;
+            if (!curentAdItem) {
+                util.showToast('请选择活动');
+                return false
+            }
+            // 必须要选择一个授权
+            let staffCount = this.data.staffCount
+            if (!staffCount.maxNum && !staffCount.webMaxNum && !staffCount.wxMaxNum) {
+                util.showToast('请选择一个授权');
+                return false
+            }
+        } else {
+            let curentAdItem = this.data.curentAdItem;
+            if (!curentAdItem) {
+                util.showToast('请选择活动');
+                return false
+            }
         }
+
         return true;
     },
     /**
@@ -214,11 +358,11 @@ Page({
         let summaryInfo = this.data.summaryInfo
         let curentAdItem = this.data.curentAdItem
         let cpEndDate = this.data.cpEndDate
+        console.log('summaryInfo', summaryInfo);
         if (!summaryInfo || !cpEndDate) return;
-        params.webMaxNum = summaryInfo.webMaxNum
-        params.wxMaxNum = summaryInfo.wxMaxNum
         params.endDate = summaryInfo.endDate
-        params.gradeCode = app.globalData.company.gradeCode
+        params.userEndDate = summaryInfo.userEndDate
+        params.gradeCode = this.data.gradeCode
         params.cpId = app.globalData.company.cpId
         params.tradeNo = this.generateRandomNo();
         params.wxUserId = app.globalData.user.userId
@@ -226,6 +370,26 @@ Page({
         params.buyBeginDate = summaryInfo.buyBeginDate;
         params.buyEndDate = summaryInfo.endDate
         params.extendDays = summaryInfo.extendDays;
+        if (this.data.gradeCode == Constants.gradeCode.STD) {
+            params.buyEndDate = summaryInfo.userEndDate
+            params.endDate = app.globalData.company.endDate
+            params.wxMaxNum = summaryInfo.wxMaxNum
+            
+            if(this.data.showVip && this.data.chooseVipFlag){
+                params.vip = true;
+            }else if(!this.data.showVip && app.globalData.company.vip){
+                params.vip = true;
+            }
+            if(this.data.chooseVipFlag){
+                params.vip = true;
+            }
+            if (!summaryInfo.reCountFlag && summaryInfo.wxMaxNumSocial) {
+                params.wxMaxNum = summaryInfo.wxMaxNum + summaryInfo.wxMaxNumSocial
+            }
+        } else {
+            params.webMaxNum = summaryInfo.webMaxNum
+            params.wxMaxNum = summaryInfo.wxMaxNum
+        }
         params.buyLong = curentAdItem.activityItemName
         return params;
     },
@@ -259,6 +423,9 @@ Page({
                     })
                 }
             }
+            this.setData({
+                loadFlag:true
+            })
         });
     },
     /**
@@ -269,32 +436,122 @@ Page({
     getActivity() {
         let params = {
             appCode: Constants.APP_CODE,
-            activityTypeList: [Constants.kindCode.activityGrade, Constants.kindCode.activityMenu],
-            gradeCode: app.globalData.company.gradeCode
+
+            gradeCode: this.data.gradeCode
+        }
+        // 标准版
+        if (this.data.gradeCode == Constants.gradeCode.STD) {
+            params.activityTypeList = [Constants.kindCode.activityGrade, Constants.kindCode.activityVip];
+        } else {
+            params.activityTypeList = [Constants.kindCode.activityGrade];
         }
         let service = app.globalData['activityService']
         this.excute(service, service.selectActivityItems, params).then(res => {
             if (res.data.code == Constants.SUCESS_CODE) {
                 if (res.data && res.data.data) {
                     let activityTable = res.data.data;
+
+                    // 如果是标准版,需要进行截止日期的处理
+                    if (this.data.gradeCode == Constants.gradeCode.STD) {
+                        this.setData({
+                            activityTable:activityTable.filter(it=>it.activityType == Constants.kindCode.activityGrade),
+                            vipTable:activityTable.filter(it=>it.activityType == Constants.kindCode.activityVip),
+                        })
+                        this.handleDataStd(activityTable);
+                    }else{
+                        this.setData({
+                            activityTable: activityTable
+                        })
+                    }
+                }
+            }
+        });
+    },
+    /**
+     * @desc : 标准版处理数据
+     * @author : 周兴
+     * @date : 2024/4/1
+     */
+    handleDataStd(activityTable) {
+        if (activityTable && activityTable.length > 0) {
+            let item = activityTable[0]
+            this.setData({
+                curentAdItem: item
+            })
+            let summaryInfo = this.data.summaryInfo
+            let months = item.validLong + item.extraLong
+            let endDate = new Date().addMonths(months).addDays(-1)
+            let dayDiffs = null;
+            if (summaryInfo.userEndDate) {
+                dayDiffs = new Date(summaryInfo.userEndDate).dayDiff(new Date(new Date().toDateStr()))
+            }
+            // 如果截止日期是空,就取活动中的截止日期
+            if (!summaryInfo.userEndDate || !dayDiffs || dayDiffs < 0) {
+                summaryInfo.userEndDate = endDate.toDateStr();
+                // 重新统计,到期续费或者第一次购买用户
+                summaryInfo.reCountFlag = true;
+                summaryInfo.wxMaxNum = summaryInfo.wxMaxNumSocial
+                this.setData({
+                    showVip:true
+                })
+            }else{
+                // 如果没有购买,需要显示
+                if(!app.globalData.company.vip){
                     this.setData({
-                        activityTable: activityTable
+                        showVip:true
                     })
                 }
             }
-        });
+            summaryInfo.buyBeginDate = new Date().toDateStr();
+            console.log('summaryInfo', summaryInfo.userEndDate, endDate, months);
+
+            this.setData({
+                summaryInfo: summaryInfo
+            })
+            // 计算金额
+            this.countSummaryAmountSTD();
+        }
     },
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad(options) {
+        console.log('options', options);
+        // 升级
+        if (options && options.upgrade) {
+            wx.setNavigationBarTitle({
+                title: mixins.$t('updateSpecialized'),
+            })
+            this.setData({
+                gradeCode: Constants.gradeCode.PRO,
+                upgradeFlag: true
+            })
+        } else {
+            wx.setNavigationBarTitle({
+                title: mixins.$t('reNew'),
+            })
+            this.setData({
+                gradeCode: app.globalData.company.gradeCode
+            })
+        }
+
         this.setData({
             companyName: app.globalData.company.cpName,
-            staffName: app.globalData.user.staffName,
+            cpManager: app.globalData.company.cpManager,
+            cpPhone: app.globalData.company.cpPhone,
             cpEndDate: app.globalData.company.endDate,
             webMaxNum: app.globalData.company.webMaxNum,
             wxMaxNum: app.globalData.company.wxMaxNum,
         })
+        // 如果是标准版,需要获取用户授权数(手机)
+        let summaryInfo = {}
+        summaryInfo.wxMaxNum = 1
+        summaryInfo.wxMaxNumSocial = this.data.wxMaxNum
+        // 续费用户到期日期
+        summaryInfo.userEndDate = app.globalData.company.userEndDate
+        this.setData({
+            summaryInfo: summaryInfo
+        })
         // 获取活动
         this.getActivity();
         // 获取当前用户授权数

+ 1 - 2
package-basic-data/pages/activity/activity.json

@@ -1,4 +1,3 @@
 {
-    "usingComponents": {},
-    "navigationBarTitleText": "续费"
+    "usingComponents": {}
 }

+ 119 - 75
package-basic-data/pages/activity/activity.wxml

@@ -1,95 +1,139 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <van-dialog id="van-dialog" />
 <loading wx:if="{{loading}}"></loading>
-<!--公司信息-->
-<view class="detail-top" data-item="{{item}}" bind:tap="toDetail">
-	<image class="scan-image" fit="fill" src="{{imageUrl+'/detail_sale_order.png'}}"></image>
-	<view style="display: flex;margin:20rpx 20rpx">
-		<!-- 头像 -->
-		<open-data type="userAvatarUrl" class='wx-avatar'></open-data>
-		<view style="margin-left: 30rpx;">
-			<view class="cp-class">{{companyName}} <dk-tag style="margin-left: 20rpx;" type="primary" padding="0 10rpx" height="30rpx" color="linear-gradient(77.62deg, #CAA977 12.58%, #FFDA7A 85.49%),conic-gradient(from 154.5deg at 29.17% -8.33%, #FFE8BA -0.56deg, rgba(255, 230, 165, 0) 0.26deg, rgba(227, 184, 73, 0.34) 17.37deg, rgba(240, 187, 253, 0.23) 347.83deg, rgba(186, 234, 255, 0.38) 353.78deg, #FFE8BA 359.44deg, rgba(255, 230, 165, 0) 360.26deg);" textColor="#1B365D" radius="10rpx" fontSize="9px"  value="{{gradeCode == 'STD'?$t['std']:$t['pro']}}" catchtap="expandCard" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag></view>
-			<view class="staff-class">{{staffName + (staffPhone?(' | ' + staffPhone):'')}}</view>
-			<view class="end-date-class">{{$t['cpEndDate'] + ':' + cpEndDate}}</view>
-			<view class="staff-count-class">{{'手机端授权:' + wxMaxNum + '个,电脑端授权' + webMaxNum + '个' }}</view>
+<view wx:if="{{loadFlag}}">
+	<!--公司信息-->
+	<view class="detail-top" data-item="{{item}}" bind:tap="toDetail">
+		<image class="scan-image" fit="fill" src="{{imageUrl+'/detail_sale_order.png'}}"></image>
+		<view style="display: flex;margin:20rpx 20rpx">
+			<!-- 头像 -->
+			<open-data type="userAvatarUrl" class='wx-avatar'></open-data>
+			<view style="margin-left: 30rpx;">
+				<view class="cp-class">{{companyName}} <dk-tag style="margin-left: 20rpx;" type="primary" padding="0 10rpx" height="30rpx" color="linear-gradient(77.62deg, #CAA977 12.58%, #FFDA7A 85.49%),conic-gradient(from 154.5deg at 29.17% -8.33%, #FFE8BA -0.56deg, rgba(255, 230, 165, 0) 0.26deg, rgba(227, 184, 73, 0.34) 17.37deg, rgba(240, 187, 253, 0.23) 347.83deg, rgba(186, 234, 255, 0.38) 353.78deg, #FFE8BA 359.44deg, rgba(255, 230, 165, 0) 360.26deg);" textColor="#1B365D" radius="10rpx" fontSize="9px" value="{{gradeCode == 'STD'?$t['std']:$t['pro']}}" catchtap="expandCard" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
+				</view>
+				<view class="staff-class">{{cpManager + (cpPhone?(' | ' + cpPhone):'')}}</view>
+				<view class="end-date-class" wx:if="{{gradeCode != 'STD' && !upgradeFlag}}">{{$t['cpEndDate'] + ':' + cpEndDate}}</view>
+				<view class="staff-count-class" wx:if="{{gradeCode != 'STD'}}">{{'手机端授权:' + wxMaxNum + '个,电脑端授权' + (webMaxNum?webMaxNum:0) + '个' }}</view>
+				<view class="staff-count-class" wx:if="{{gradeCode == 'STD'}}">{{'手机端授权:' + wxMaxNum + '个(额外购买)'}}</view>
+			</view>
 		</view>
 	</view>
-</view>
 
-<!--活动-->
-<view class="func">
-	<view style="display:flex;flex-wrap: wrap;">
-		<view class="{{(curentAdItem && curentAdItem.itemId == item.itemId)?'func-card-selected':'func-card'}}" wx:for="{{activityTable}}" wx:for-item="item" wx:key="index" data-item="{{item}}" catchtap="chooseAdItem">
-			<!-- 标题 -->
-			<view class="card-title">{{item.activityItemName}}
-			</view>
-			<!-- 价格-->
-			<dk-cell fontSize="16" center="center" contentFontWeight="700" contentColor="#FF7B1A" content="{{item.stdPrice}}"></dk-cell>
-			<!-- 描述-->
-			<view class="card-desc">{{item.activityItemDescribe}}
+	<!--活动(专业版)-->
+	<view class="func" wx:if="{{gradeCode != 'STD'}}">
+		<view style="display:flex;flex-wrap: wrap;">
+			<view class="{{(curentAdItem && curentAdItem.itemId == item.itemId)?'func-card-selected':'func-card'}}" wx:for="{{activityTable}}" wx:for-item="item" wx:key="index" data-item="{{item}}" catchtap="chooseAdItem">
+				<!-- 标题 -->
+				<view class="card-title">{{item.activityItemName}}
+				</view>
+				<!-- 价格-->
+				<dk-cell fontSize="16" center="center" contentFontWeight="700" contentColor="#FF7B1A" content="{{item.stdPrice}}"></dk-cell>
+				<!-- 描述-->
+				<view class="card-desc">{{item.activityItemDescribe}}
+				</view>
 			</view>
 		</view>
 	</view>
-</view>
 
-<!--用户数-->
-<view class="card-class">
-	<!--用户数量-->
-	<van-cell border="{{ false }}" title-class="cell_title">
-		<view slot="title" style="display: flex;">
-			<view>用户数量</view>
-			<view style="font-size: 10px;">(包含手机和电脑授权)</view>
-		</view>
-		<van-stepper value="{{staffCount.maxNum}}" integer="{{true}}" min="0" max="{{1000}}" data-type="all" bind:change="changeStaffCount" />
-	</van-cell>
-	<van-cell border="{{ false }}" title="额外购买授权">
-	</van-cell>
-	<!--手机用户数-->
-	<van-cell border="{{ false }}" title-class="cell_title">
-		<view slot="title" style="display: flex;">
-			<view>手机端授权</view>
-			<view wx:if="{{curentAdItem && curentAdItem.wxPrice}}" style="display: flex;font-size: 10px;">
-				(<dk-cell fontSize="10" left="5rpx" height="50rpx" contentColor="#e00808" content="{{curentAdItem.wxPrice}}"></dk-cell>/个)
+	<!--活动(标准版)-->
+	<view class="func" wx:if="{{gradeCode == 'STD'}}">
+		<view style="display:flex;flex-wrap: wrap;">
+			<view class="func-card-std" wx:for="{{activityTable}}" wx:for-item="item" wx:key="index" data-item="{{item}}">
+				<!-- 标题 -->
+				<view class="card-title-std">{{item.activityItemName}}
+				</view>
+				<!-- 价格-->
+				<dk-cell fontSize="19" center="center" contentFontWeight="700" contentColor="#FF7B1A" content="{{item.wxPrice}}"></dk-cell>
+				<!-- 授权-->
+				<view class="card-desc-std">
+					<view>{{$t['userAuthorize']}}</view>
+					<van-stepper integer="{{true}}" value="{{ summaryInfo.wxMaxNum}}" min="1" bind:change="changeUserSTD" />
+				</view>
 			</view>
-		</view>
-		<van-stepper value="{{staffCount.wxMaxNum}}" integer="{{true}}" min="0" max="{{1000}}" data-type="wx" bind:change="changeStaffCount" />
-	</van-cell>
-	<!--电脑用户数-->
-	<van-cell border="{{ false }}" title-class="cell_title">
-		<view slot="title" style="display: flex;">
-			<view>电脑端授权</view>
-			<view wx:if="{{curentAdItem && curentAdItem.webPrice}}" style="display: flex;font-size: 10px;">
-				(<dk-cell fontSize="10" left="5rpx" height="50rpx" contentColor="#e00808" content="{{ curentAdItem.webPrice }}"></dk-cell>/个)
+
+			<!--VIP报表-->
+			<view wx:if="{{showVip}}" class="{{chooseVipFlag?'func-card-vip-std-selected':'func-card-vip-std'}}" wx:for="{{vipTable}}" wx:for-item="item" wx:key="index" data-item="{{item}}" catchtap="chooseVipItem">
+				<!-- 标题 -->
+				<view class="card-title-std">{{item.activityItemName}}
+				</view>
+				<!-- 价格-->
+				<dk-cell fontSize="19" center="center" contentFontWeight="700" contentColor="#FF7B1A" content="{{item.wxPrice}}"></dk-cell>
+				<!-- 描述-->
+				<view class="card-desc">{{item.activityItemDescribe}}
+				</view>
 			</view>
 		</view>
-		<van-stepper value="{{staffCount.webMaxNum}}" integer="{{true}}" min="0" max="{{1000}}" data-type="web" bind:change="changeStaffCount" />
-	</van-cell>
-</view>
+	</view>
 
-<!--合计-->
-<view class="summary-class">
-	<view class="summary-item-class">订单详情:</view>
-	<view class="summary-item-class">{{summaryInfo.amountInfo}}</view>
-	<view class="summary-item-class">截止日期:{{summaryInfo.endDate}}</view>
-	<view class="summary-item-class" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">{{summaryInfo.staffInfo}}</view>
-	<view class="summary-item-class" style="display: flex;justify-content: flex-end;" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">
-		折合<dk-cell fontSize="14" left="5rpx" fontWeight="bold" height="45rpx" contentColor="#FF7B1A" content="{{summaryInfo.priceInfo}}"></dk-cell>/天/授权</view>
-</view>
+	<!--用户数-->
+	<view class="card-class" wx:if="{{gradeCode != 'STD'}}">
+		<!--用户数量-->
+		<van-cell border="{{ false }}" title-class="cell_title">
+			<view slot="title" style="display: flex;">
+				<view>用户数量</view>
+				<view style="font-size: 10px;">(包含手机和电脑授权)</view>
+			</view>
+			<van-stepper value="{{staffCount.maxNum}}" integer="{{true}}" min="0" max="{{1000}}" data-type="all" bind:change="changeStaffCount" />
+		</van-cell>
+		<van-cell border="{{ false }}" title="额外购买授权">
+		</van-cell>
+		<!--手机用户数-->
+		<van-cell border="{{ false }}" title-class="cell_title">
+			<view slot="title" style="display: flex;">
+				<view>手机端授权</view>
+				<view wx:if="{{curentAdItem && curentAdItem.wxPrice}}" style="display: flex;font-size: 10px;">
+					(<dk-cell fontSize="10" left="5rpx" height="50rpx" contentColor="#e00808" content="{{curentAdItem.wxPrice}}"></dk-cell>/个)
+				</view>
+			</view>
+			<van-stepper value="{{staffCount.wxMaxNum}}" integer="{{true}}" min="0" max="{{1000}}" data-type="wx" bind:change="changeStaffCount" />
+		</van-cell>
+		<!--电脑用户数-->
+		<van-cell border="{{ false }}" title-class="cell_title">
+			<view slot="title" style="display: flex;">
+				<view>电脑端授权</view>
+				<view wx:if="{{curentAdItem && curentAdItem.webPrice}}" style="display: flex;font-size: 10px;">
+					(<dk-cell fontSize="10" left="5rpx" height="50rpx" contentColor="#e00808" content="{{ curentAdItem.webPrice }}"></dk-cell>/个)
+				</view>
+			</view>
+			<van-stepper value="{{staffCount.webMaxNum}}" integer="{{true}}" min="0" max="{{1000}}" data-type="web" bind:change="changeStaffCount" />
+		</van-cell>
+	</view>
 
-<!--注册须知-->
-<view class="notice-class">
-	<view class="notice-item-class" style="font-size: 16px;font-weight: bold;">{{noticeInfo.title}}</view>
-	<view class="notice-item-class">{{noticeInfo.cpName}}</view>
-	<view class="notice-item-class">{{noticeInfo.contact}}</view>
-	<view class="notice-item-class">{{noticeInfo.cpSize}}</view>
-	<view class="notice-item-class" style="display: flex;">
-		<van-checkbox shape="square" value="{{readFlag}}" label-class="checkbox-class" bind:change="handleChangeCheckbox">我已阅读并同意</van-checkbox>
-		<view style="color: #CE9965;">《注册须知》</view>
-		<view style="color: #CE9965;">《免责条款》</view>
+	<!--合计(专业版)-->
+	<view class="summary-class" wx:if="{{gradeCode != 'STD'}}">
+		<view class="summary-item-class">订单详情:</view>
+		<view class="summary-item-class">{{summaryInfo.amountInfo}}</view>
+		<view class="summary-item-class">截止日期:{{summaryInfo.endDate}}</view>
+		<view class="summary-item-class" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">{{summaryInfo.staffInfo}}</view>
+		<view class="summary-item-class" style="display: flex;justify-content: flex-end;" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">
+			折合<dk-cell fontSize="14" left="5rpx" fontWeight="bold" height="45rpx" contentColor="#FF7B1A" content="{{summaryInfo.priceInfo}}"></dk-cell>/天/授权</view>
 	</view>
-</view>
 
-<view style="height: 200rpx;"></view>
+	<!--合计(标准版)-->
+	<view class="summary-class" wx:if="{{gradeCode == 'STD'}}">
+		<view class="summary-item-class">订单详情:</view>
+		<view class="summary-item-class">{{summaryInfo.amountInfo}}</view>
+		<view class="summary-item-class" style="display: flex;">截止日期:<view style="color:#FF7B1A">{{summaryInfo.userEndDate}}</view>
+		</view>
+		<view class="summary-item-class" style="display: flex;justify-content: flex-end;" wx:if="{{summaryInfo.wxMaxNum}}">
+			折合<dk-cell fontSize="14" left="5rpx" fontWeight="bold" height="45rpx" contentColor="#FF7B1A" content="{{summaryInfo.priceInfo}}"></dk-cell>/天/授权</view>
+	</view>
+
+	<!--注册须知-->
+	<view class="notice-class" wx:if="{{gradeCode != 'STD'}}">
+		<view class="notice-item-class" style="font-size: 16px;font-weight: bold;">{{noticeInfo.title}}</view>
+		<view class="notice-item-class">{{noticeInfo.cpName}}</view>
+		<view class="notice-item-class">{{noticeInfo.contact}}</view>
+		<view class="notice-item-class">{{noticeInfo.cpSize}}</view>
+		<view class="notice-item-class" style="display: flex;">
+			<van-checkbox shape="square" value="{{readFlag}}" label-class="checkbox-class" bind:change="handleChangeCheckbox">我已阅读并同意</van-checkbox>
+			<view style="color: #CE9965;">《注册须知》</view>
+			<view style="color: #CE9965;">《免责条款》</view>
+		</view>
+	</view>
+
+	<view style="height: 200rpx;"></view>
+</view>
 
 <!--  保存 -->
 <dk-save-button btnAutoWidthFlag="{{true}}" buttonList="{{buttonSaveList}}" bind:open="handleSave"></dk-save-button>

+ 49 - 0
package-basic-data/pages/activity/activity.wxss

@@ -115,6 +115,32 @@ page {
 	border: 3rpx solid #CE9965;
 }
 
+.func-card-std{
+	margin: 15rpx 30rpx;
+	width: 50%;
+	height: 215rpx;
+	background: #FCF0DD;
+	border-radius: 19rpx;
+	border: 3rpx solid #CE9965;
+}
+
+.func-card-vip-std-selected{
+	margin: 15rpx 10rpx 15rpx 0;
+	width: 38%;
+	height: 215rpx;
+	background: #FCF0DD;
+	border-radius: 19rpx;
+	border: 3rpx solid #CE9965;
+}
+
+.func-card-vip-std{
+	margin: 15rpx 10rpx 15rpx 0;
+	width: 38%;
+	height: 215rpx;
+	background: #ffffff;
+	border-radius: 19rpx;
+}
+
 .card-name {
 	font-style: normal;
 	font-weight: 600;
@@ -136,6 +162,18 @@ page {
 	font-weight: 600;
 }
 
+.card-title-std{
+	margin-top: 10rpx;
+	margin-left:20rpx;
+	display: flex;
+	height: 54rpx;
+	align-items: center;
+	width: 100%;
+	color: #1B365D;
+	font-size: 16px;
+	font-weight: 600;
+}
+
 .card-desc{
 	margin-top: 10rpx;
 	display: flex;
@@ -147,6 +185,17 @@ page {
 	font-size: 11px;
 }
 
+.card-desc-std{
+	margin: 10rpx 20rpx;
+	display: flex;
+	height: 54rpx;
+	align-items: center;
+	justify-content: space-between;
+	color: #1B365D;
+	font-weight: bold;
+	font-size: 14px;
+}
+
 .card-class{
 	margin: 0 30rpx;
 	border-radius: 16rpx;

+ 36 - 18
package-basic-data/pages/activity/detail/detail.js

@@ -46,6 +46,10 @@ Page({
 		params.flgValid = true;
 		params.currentPage = 1;
 		params.pageSize = Constants.MAX_PAGE_SIZE;
+		if(this.data.gradeCode == Constants.gradeCode.STD){
+			// 标准版需要排除掉 企业授权的那个用户
+			params.flgInit = false;
+		}
 		return params;
 	},
 	/**
@@ -81,25 +85,39 @@ Page({
 	* @author : 周兴
 	*/
 	refreshTag() {
-		let tagList = this.data.tagList
-		let tableData = [...this.data.tableDataSocial]
-		tableData = tableData.filter(it => it.loginType == Constants.loginType.loginTypeWx
-			|| it.loginType == Constants.loginType.loginTypeWxPc);
-		let filters = tagList.filter(it => it.code == 'wx');
-		if (filters && filters.length > 0) {
-			filters[0].title = mixins.$t('wxRight') + '【' + tableData.length + '】'
-		}
-		let webData = [...this.data.tableDataSocial]
-		// 电脑端授权
-		webData = webData.filter(it => it.loginType == Constants.loginType.loginTypePc
-			|| it.loginType == Constants.loginType.loginTypeWxPc);
-		filters = tagList.filter(it => it.code == 'web');
-		if (filters && filters.length > 0) {
-			filters[0].title = mixins.$t('webRight') + '【' + webData.length + '】'
+		if (this.data.gradeCode == Constants.gradeCode.STD) {
+			let staffInfo = this.data.staffInfo;
+			let filters = staffInfo.filter(it => it.code == 'current');
+			if (filters && filters.length > 0) {
+				let tableData = [...this.data.tableDataSocial]
+				tableData = tableData.filter(it => it.loginType == Constants.loginType.loginTypeWx
+					|| it.loginType == Constants.loginType.loginTypeWxPc);
+				filters[0].userCount = tableData.length;
+				this.setData({
+					staffInfo: staffInfo
+				})
+			}
+		} else {
+			let tagList = this.data.tagList
+			let tableData = [...this.data.tableDataSocial]
+			tableData = tableData.filter(it => it.loginType == Constants.loginType.loginTypeWx
+				|| it.loginType == Constants.loginType.loginTypeWxPc);
+			let filters = tagList.filter(it => it.code == 'wx');
+			if (filters && filters.length > 0) {
+				filters[0].title = mixins.$t('wxRight') + '【' + tableData.length + '】'
+			}
+			let webData = [...this.data.tableDataSocial]
+			// 电脑端授权
+			webData = webData.filter(it => it.loginType == Constants.loginType.loginTypePc
+				|| it.loginType == Constants.loginType.loginTypeWxPc);
+			filters = tagList.filter(it => it.code == 'web');
+			if (filters && filters.length > 0) {
+				filters[0].title = mixins.$t('webRight') + '【' + webData.length + '】'
+			}
+			this.setData({
+				tagList: tagList
+			})
 		}
-		this.setData({
-			tagList: tagList
-		})
 	},
 	/**
 	* @desc : 停用用户,不再续费

+ 9 - 4
package-basic-data/pages/activity/detail/detail.wxml

@@ -7,21 +7,26 @@
 	<view class="detail-top-sub"> *不续费授权到期后将不能登录</view>
 	<view style="display:flex;flex-wrap: wrap;justify-content: center;">
 		<!--当前-->
-		<view class="func-card"  wx:for="{{staffInfo}}" wx:for-item="item" wx:key="index" >
+		<view class="func-card" wx:for="{{staffInfo}}" wx:for-item="item" wx:key="index">
 			<view class="func-card-title">{{item.title}}</view>
-			<view class="func-card-title">
+			<view class="func-card-content">
 				<view style="font-size: 10px;">{{item.wxTitle}}</view>
 				<view style="margin-left: 55rpx;font-size: 16px;font-weight: 700;">{{item.wxMaxNum}}</view>
 			</view>
-			<view class="func-card-title">
+			<view wx:if="{{item.webTitle}}" class="func-card-content">
 				<view style="font-size: 10px;">{{item.webTitle}}</view>
 				<view style="margin-left: 55rpx;font-size: 16px;font-weight: 700">{{item.webMaxNum}}</view>
 			</view>
+			<!--当前用户-->
+			<view wx:if="{{item.userCount}}" class="func-card-content">
+				<view style="font-size: 10px;">{{item.userTitle}}</view>
+				<view style="margin-left: 55rpx;font-size: 16px;font-weight: 700;">{{item.userCount}}</view>
+			</view>
 		</view>
 	</view>
 </view>
 
-<dk-tabs active="{{active}}"  list="{{tagList}}" bind:onChange="onChangeTabs"></dk-tabs>
+<dk-tabs wx:if="{{gradeCode != 'STD'}}" active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"></dk-tabs>
 
 <!-- 列表区 -->
 <dk-list list="{{tableData}}" title="staffName" content="{{contentList}}" routeObjName="{{routeObjName}}" flgPoint="{{false}}" titleBtnText="不再续费" bind:clickTitleBtn="handleStaff"></dk-list>

+ 20 - 1
package-basic-data/pages/activity/detail/detail.wxss

@@ -26,7 +26,14 @@
 	height: 215rpx;
 	border-radius: 19rpx;
 	background: #45CBFE4D;
+}
 
+.func-card-std {
+	margin: 40rpx 2% 20rpx 2%;
+	width: 46%;
+	height: 160rpx;
+	border-radius: 19rpx;
+	background: #45CBFE4D;
 }
 
 .func-card-title {
@@ -37,4 +44,16 @@
 	font-weight: bold;
 	color: #1B365D;
 	margin: 20rpx 0;
-}
+}
+
+
+.func-card-content {
+	display: flex;
+	align-items: center;
+	font-size: 14px;
+	font-weight: bold;
+	color: #1B365D;
+	margin: 20rpx 0;
+	padding: 0 20%;
+    justify-content: space-between;
+}

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

@@ -1,5 +1,6 @@
 {
     "usingComponents": {},
     "navigationBarTitleText": "基础资料",
-    "enablePullDownRefresh":true
+    "enablePullDownRefresh":true,
+    "navigationStyle": "custom"
 }

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

@@ -1,6 +1,7 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <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,['dataName','dataCode','remarks'])}}">
   </dk-dropdown-menu>

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

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

+ 228 - 0
package-basic-data/pages/beginner-guide/beginner-guide.js

@@ -0,0 +1,228 @@
+const Constants = require('@/utils/Constants.js');
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  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) {
+
+  },
+
+
+})

+ 4 - 0
package-basic-data/pages/beginner-guide/beginner-guide.json

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

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

@@ -0,0 +1,41 @@
+<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 - 0
package-basic-data/pages/beginner-guide/beginner-guide.wxss

@@ -0,0 +1,67 @@
+.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;
+}

+ 10 - 8
package-basic-data/pages/customer-list/add/add.js

@@ -48,13 +48,15 @@ Page({
 * @date : 2024/2/1 15:49
 * @author : 于继渤
 */
-  chooseData(e) {
-
+  chooseData(e) { 
     let formData = JSON.parse(this.data.formData)
     let code = e.detail.code
-    let data = e.detail.data.data
-
-    console.log(code, data);
+    let data = null
+    if (code == "initialPaymentId") {
+      data = e.detail.list
+    } else {
+      data = e.detail.data.data
+    }
 
     if (code == "staffId") { //员工
       formData.staffId = data.id
@@ -88,10 +90,10 @@ Page({
       formData.initialPayment = data.name
       let contentObj = this.data.contentObj;
       let center = contentObj.center
-      center = center.filter(it=>it.code != 'startAmount' && it.code != 'macId')
+      center = center.filter(it => it.code != 'startAmount' && it.code != 'macId')
       // 初始款项-欠款
       if (data.id == Constants.initialPayType.debt) {
-        center.push({ code: 'startAmount', type: 'number', required: true, min:Constants.MIN_VALUE, title: mixins.$t('initialDebtOwed') })
+        center.push({ code: 'startAmount', type: 'number', required: true, min: Constants.MIN_VALUE, title: mixins.$t('initialDebtOwed') })
       } else if (data.id == Constants.initialPayType.payment) {
         // 初始款项-预收
         center.push({ code: 'startAmount', type: 'number', required: true, title: mixins.$t('initialPayment') })
@@ -238,7 +240,7 @@ Page({
       contentObj.center = [
         { code: 'staffId', name: 'staffName', type: 'choose', required: true, title: mixins.$t('reportStaff'), urlKey: 'chooseStaff' },
         { code: 'orgId', name: 'orgName', type: 'choose', required: true, title: mixins.$t('reportOrg'), urlKey: 'chooseOrg' },
-        { code: 'initialPaymentId', name: 'initialPayment', type: 'choose', title: mixins.$t('initialRPayment'), urlKey: 'chooseInitialPaymentType' },
+        { code: 'initialPaymentId', name: 'initialPayment', type: 'drop', title: mixins.$t('initialRPayment'), urlKey: 'chooseInitialPaymentType', dropType: 'initialPayment'},
       ]
     }
     this.setData({

+ 2 - 1
package-basic-data/pages/customer-list/customer-list.json

@@ -2,5 +2,6 @@
     "usingComponents": {},
     "navigationBarTitleText": "客户列表",
     "enablePullDownRefresh": true,
-    "backgroundTextStyle": "light"
+    "backgroundTextStyle": "light",
+    "navigationStyle": "custom"
 }

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

@@ -2,8 +2,9 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <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}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['cusName','cusPhone','adddressFull','remarks'])}}">
+  <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>
   <dk-tabs wx:if="{{gradeCode !== 'STD'}}" active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
 </van-sticky>

+ 29 - 15
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
@@ -154,8 +165,10 @@ Page({
     this.setData({
       item: data,
     })
-
-    this.getCusFollowList(this.data.id)
+    // 查询客户跟进
+    if(this.data.gradeCode == Constants.gradeCode.PRO){
+      this.getCusFollowList(this.data.id)
+    }
   },
   /**
   * @desc : 切换tab
@@ -169,12 +182,13 @@ Page({
       this.getCusFollowList(cusId)
     }
     else if (name == 'deal') {
-      // 标准版查销售出库
-      if (this.data.gradeCode == Constants.gradeCode.STD) {
-        this.getOrderOut(cusId, Constants.outType.sale)
-      } else {
-        this.getOrderList(cusId)
-      }
+      // // 标准版查销售出库
+      // if (this.data.gradeCode == Constants.gradeCode.STD) {
+      //   this.getOrderOut(cusId, Constants.outType.sale)
+      // } else {
+      //   this.getOrderList(cusId)
+      // }
+      this.getOrderList(cusId)
     }
     // 收款
     else if (name == 'receipt') {
@@ -315,11 +329,12 @@ Page({
     let gradeCode = this.data.gradeCode
 
     if (key == 'sale') {
-      if (gradeCode == Constants.gradeCode.STD) { //标准
-        url = this.data.route.toSaleOutOrder.url
-      } else if (gradeCode == Constants.gradeCode.PRO) {
-        url = this.data.route.toSaleOrder.url
-      }
+      // if (gradeCode == Constants.gradeCode.STD) { //标准
+      //   url = this.data.route.toSaleOutOrder.url
+      // } else if (gradeCode == Constants.gradeCode.PRO) {
+      //   url = this.data.route.toSaleOrder.url
+      // }
+      url = this.data.route.toSaleOrder.url
     }
     else if (key == 'receipt') {
       if (gradeCode == Constants.gradeCode.STD) { //标准
@@ -337,7 +352,6 @@ Page({
       events: {
         // 保存成功后刷新页面
         refresh: function (data) {
-          console.log('dfdfd', data);
         }
       },
       success: function (res) {
@@ -423,7 +437,7 @@ Page({
       name = 'deal'
       this.setData({
         active: name,
-        activeCard: 'order-out'
+        activeCard: 'order'
       })
     } else {
       name = 'follow'

+ 4 - 59
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>
@@ -38,62 +38,7 @@
 </view>
 
 <view style="border-radius: 16rpx;margin: 20rpx 0;box-shadow: 0px 10px 20px 0px #0000000D;padding:20rpx;">
-  <!--标准版-->
-  <van-grid column-num="3" border="{{false}}" wx:if="{{gradeCode == 'STD'}}">
-    <view style="display: flex;">
-      <view class="number">
-        <view class="order-summary">
-          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.outboundAmount ? item.outboundAmount : 0}}"></dk-cell>
-        </view>
-        <view class="oreder-summary-detail">
-          订单({{item.outboundQuantity}}单)
-        </view>
-      </view>
-
-      <view class="number" style="margin-left: 0; margin-right: 0;">
-        <view class="order-summary">
-          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.outboundNotAmount ? item.outboundNotAmount : 0}}"></dk-cell>
-        </view>
-        <view class="oreder-summary-detail">
-          未出库({{item.outboundNotQuantity}}单)
-        </view>
-      </view>
-
-      <view class="number" style="margin-right: 0;">
-        <view class="order-summary">
-          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.outboundReturnAmount ? item.outboundReturnAmount : 0 }}"></dk-cell>
-        </view>
-        <view class="oreder-summary-detail">
-          退货({{item.outboundReturnQuantity}}单)
-        </view>
-      </view>
-    </view>
-    <view style="display: flex;">
-      <view class="number">
-        <view class="order-summary">
-          <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.receiptResidue ? item.receiptResidue : 0}}"></dk-cell>
-        </view>
-        <view class="oreder-summary-detail">
-          收款总额
-        </view>
-      </view>
-
-      <view class="number" style="margin-left: 0; margin-right: 0;">
-        <view class="order-summary">
-          <!--标准版(应收 - 收款)-->
-          <dk-cell wx:if="{{gradeCode == 'STD'}}" center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{(item.receivable - item.receipt) ? (item.receivable - item.receipt) : 0}}">
-          </dk-cell>
-          <dk-cell wx:else center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.receivableResidue ? item.receivableResidue : 0}}">
-          </dk-cell>
-        </view>
-        <view class="oreder-summary-detail">
-          客户欠款
-        </view>
-      </view>
-    </view>
-  </van-grid>
-  <!--专业版-->
-  <van-grid column-num="3" border="{{false}}" wx:else>
+  <van-grid column-num="3" border="{{false}}" >
     <view style="display: flex;">
       <view class="number">
         <view class="order-summary">
@@ -266,7 +211,7 @@
     <view style="margin-top: 20rpx;">
       <van-tabs type="card" border="{{false}}" active="{{ activeCard }}" bind:change="changeTag" tab-active-class="{{activeCard==0?'van-tab-active-left':(activeCard==2?'van-tab-active-right':'van-tab-active-middle')}}">
 
-        <van-tab title="销售订单" name='order' wx:if="{{gradeCode != 'STD'}}">
+        <van-tab title="销售订单" name='order'>
           <view wx:for="{{orderList}}" data-index="{{index}}" data-item="item">
 
             <view class="dk-card-outer-class">
@@ -367,7 +312,7 @@
           <van-empty wx:if="{{orderList.length==0}}" description="暂无数据" />
 
         </van-tab>
-        <van-tab title="{{gradeCode == 'STD'?'销售订单':'销售出库'}}" name='order-out'>
+        <van-tab title="销售出库" name='order-out'>
 
           <view wx:for="{{orderOutList}}" data-index="{{index}}" data-item="item">
 

+ 2 - 1
package-basic-data/pages/product-attribute/product-attribute.json

@@ -1,5 +1,6 @@
 {
     "usingComponents": {},
     "navigationBarTitleText": "商品属性",
-    "enablePullDownRefresh":true
+    "enablePullDownRefresh":true,
+    "navigationStyle": "custom"
 }

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

@@ -1,6 +1,7 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <!-- 顶部信息 -->
 <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 - 2
package-basic-data/pages/product-attribute/product-attribute.wxss

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

+ 23 - 3
package-basic-data/pages/product-file/add/add.js

@@ -147,7 +147,15 @@ Page({
         title: mixins.$t("otherPriceLimit"),
         required: true,
       }, ],
-
+      warning: [{ // 预警信息
+        type: 'textarea',
+        title: mixins.$t("warningLowerLimit"),
+        code: 'warningLowerLimit',
+      },{
+        type: 'textarea',
+        title: mixins.$t("warningUpperLimit"),
+        code: 'warningUpperLimit',
+      }],
       other: [{
         code: 'remarks',
         type: 'textarea',
@@ -941,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 : 页面加载数据方法
@@ -952,11 +972,11 @@ Page({
     //标准版商品档案新建、编辑、详情不展示价格体系  
     if (this.data.gradeCode == Constants.gradeCode.STD) { //标准版
       this.setData({
-        cardList: ['main', 'goods', "unit", "warehouse", 'other'],
+        cardList: ['main', 'goods', "unit", "warehouse", 'warning', 'other'],
       })
     } else {
       this.setData({
-        cardList: ['main', 'goods', "unit", "warehouse", 'price', 'other'],
+        cardList: ['main', 'goods', "unit", "warehouse", 'price', 'warning', 'other'],
       })
     }
     if (this.data.formMode == Constants.formMode.edit) {

+ 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({

+ 2 - 1
package-basic-data/pages/product-file/product-file.json

@@ -1,5 +1,6 @@
 {
     "usingComponents": {},
     "navigationBarTitleText": "商品档案",
-    "enablePullDownRefresh":true
+    "enablePullDownRefresh":true,
+    "navigationStyle": "custom"
 }

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

@@ -1,6 +1,7 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
-<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>
@@ -9,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 - 2
package-basic-data/pages/product-file/product-file.wxss

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

+ 1 - 10
package-basic-data/pages/register/product-detail/product-detail.js

@@ -158,14 +158,5 @@ Page({
 
     },
 
-    /**
-     * 点击返回按钮返回上一层
-     * @author 刘尧
-     * @date 2024.05.31
-     */
-    navBackClick(){
-      wx.navigateBack({
-        data: 1
-      })
-    }
+    
 })

+ 1 - 4
package-basic-data/pages/register/product-detail/product-detail.wxml

@@ -1,11 +1,8 @@
 <!-- 头部导航栏以及销售任务进度 -->
+<dk-navbar fixed="{{true}}" titleFontColor="#ffffff" navbarTitle="产品详情" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" customStyle="background-color:transparent;"/>
 <view class="top-navigation">
   <image class="background-image" src="{{imageUrl + 'computer.png'}}" />
   <view class="navigation-content">
-    <view class="navigation-menu" style="top:{{statusHeight + 'rpx'}}">
-      <image class="back-left-button" catchtap="navBackClick" src="{{imageUrl + 'back_left.png'}}" />
-      <view style="color: #FFFFFF;">产品详情</view>
-    </view>
     <view class="navigation-task-progress">
       <view class="task-progress-top">
         <view class="task-progress-standard">

+ 12 - 8
package-basic-data/pages/staff/staff.js

@@ -18,12 +18,16 @@ Page({
   data: {
     // 查询条件
     searchContent: [],
-    totallength: 0, //视图下方提醒数量
     // 底部保存按钮
-    buttonFootList: [{
-      name: 'add',
-      title: mixins.$t('add')
-    }],
+    buttonFootList: [
+      {
+        code: 'buy',
+        title: mixins.$t('buyUser')
+      },
+      {
+        code: 'add',
+        title: mixins.$t('add')
+      }],
     contentnFootList: [
 
     ],
@@ -138,14 +142,14 @@ Page({
    * @date : 2024/2/1 15:49
    * @author : 姜永辉
    */
-  leaveOffice(e) { 
-    let item = e 
+  leaveOffice(e) {
+    let item = e
     let params = {
       staffId: item.staffId,
       flgValid: false,
       wxUserId: item.wxUserId,
       hrStatus: 2 // 离职2 在职1
-    } 
+    }
     this.excute(this.data.service, this.data.service.leaveOffice, params).then(res => {
       if (res.data.code == Constants.SUCESS_CODE) {
         // 重新查询

+ 2 - 1
package-basic-data/pages/staff/staff.json

@@ -2,5 +2,6 @@
     "usingComponents": {},
     "navigationBarTitleText": "员工列表",
     "enablePullDownRefresh": true,
-    "backgroundTextStyle": "light"
+    "backgroundTextStyle": "light",
+    "navigationStyle": "custom"
   }

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

@@ -1,15 +1,17 @@
 <!-- 前台导入wxmlUtil.wxs -->
+
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <van-dialog id="van-dialog" />
 <!-- 加载图层 -->
 <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']}}" />
 <!-- 列表区 -->

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

@@ -1,4 +1,5 @@
 {
     "usingComponents": {},
-    "navigationBarTitleText": "客户收支表"
+    "navigationBarTitleText": "客户收支表",
+    "navigationStyle": "custom"
 }

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

@@ -1,7 +1,8 @@
-<!--package-business-analysis/pages/cus-rec-pay-report/cus-rec-pay-report.wxml-->
 <view>
-  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}"
-    bind:search="searchData" searchTextPlaceholder="{{placeholder}}"></dk-dropdown-menu>
+  <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">
     <view class="item-card" wx:for="{{cardDate}}" wx:for-index="index" wx:for-item="item">
       <view class="card-title">
@@ -15,14 +16,9 @@
               实际欠款
             </view>
             <view class="icon-view">
-              <van-icon size="15px" name="question-o" />
-              <!-- <van-icon size="15px" name="gold-coin-o" style="margin-left:10rpx;" /> -->
+              <van-icon size="12px" name="question-o" />
             </view>
-            <!-- <view style="font-size: 28rpx;font-weight: 700;">
-              ¥{{item.arrears}}
-            </view> -->
-            <dk-cell left="0rpx" height="45rpx" contentRight="{{false}}" contentFontSize="14" contentColor="#FF7B1A"
-              contentFontWeight="bold" content="{{item.arrears}}"></dk-cell>
+            <dk-cell left="0rpx" height="45rpx" contentRight="{{false}}" contentFontSize="14" contentColor="#002340" contentFontWeight="bold" content="{{item.arrears}}"></dk-cell>
           </view>
         </view>
       </view>
@@ -30,8 +26,7 @@
         <view class="content-item" wx:for="{{item.item}}" wx:for-index="index" wx:for-item="itemInfo">
           <view class="top">
             <view class="title">{{itemInfo.biznisNo}}</view>
-            <!-- <view class="money">¥{{itemInfo.outAmt || itemInfo.returnAmt}}</view> -->
-            <dk-cell left="0rpx" height="45rpx" contentRight="{{false}}" contentFontSize="14" contentColor="#FF7B1A"
+            <dk-cell left="0rpx" height="45rpx" contentRight="{{false}}" contentFontSize="14" contentColor="#A5814A"
               contentFontWeight="bold" content="{{itemInfo.outAmt || itemInfo.returnAmt}}"></dk-cell>
           </view>
           <view class="under">
@@ -41,8 +36,7 @@
         </view>
         <view class="total">
           <view class="total-title">合计</view>
-          <!-- <view class="total-money">¥{{item.totalMoney? item.totalMoney: 0}}</view> -->
-          <dk-cell left="0rpx" height="45rpx" contentRight="{{false}}" contentFontSize="17" contentColor="#FF7B1A"
+          <dk-cell left="0rpx" height="45rpx" contentRight="{{false}}" contentFontSize="17" contentColor="#A5814A"
             contentFontWeight="bold" content="{{item.totalMoney? item.totalMoney: 0}}"></dk-cell>
         </view>
       </view>

+ 58 - 34
package-business-analysis/pages/detail-report/detail-report.js

@@ -67,6 +67,7 @@ Page({
     loadFlag: false,
     // 初始不进行自动查询
     initSearchFlag: false,
+    titleText: ''
   },
   /**
    * @desc : 设置查询参数
@@ -116,6 +117,9 @@ Page({
         wx.setNavigationBarTitle({
           title: filters[0].menuName,
         })
+        this.setData({
+          titleText: filters[0].menuName
+        })
 
         // 根据objectCode设置页面各个属性
         this.setPropertis(filters[0].objectCode);
@@ -155,7 +159,7 @@ Page({
       case Constants.menuCode.outboundDetailReport:
         routeObjName = 'report'
         method = 'getOutboundDetailReport'
-        placeholder = ['orderNo', 'customerName', 'telephone']
+        placeholder = ['orderNo', 'customerName', 'telephone', 'address']
         contentCol = 'outStatusName'
         listTitle = 'outNo'
         listStatus = 'outStatusName'
@@ -201,7 +205,7 @@ Page({
             [
               {
                 left: { tag: 'brandName', title: 'skuModel', type: 'title' },
-                right:{ name: 'outDate'},
+                right: { name: 'outDate' },
               },
               {
                 left: { name: 'skuName', },
@@ -223,7 +227,7 @@ Page({
             [
               {
                 left: { tag: 'brandName', title: 'skuModel', type: 'title' },
-                right:{ name: 'outDate'},
+                right: { name: 'outDate' },
               },
               {
                 left: { name: 'skuName', },
@@ -389,21 +393,37 @@ Page({
         listTitle = 'orderNo'
         listStatus = 'outStatusName'
         listSubTitle = 'cusPhone'
-        pullMenuList = [{
-          code: 'outStatus',
-          pullType: 'mSelect',
-          typeName: 'outStatus'
-        }, {
-          code: 'receiveStatus',
-          pullType: 'mSelect',
-          typeName: 'receiveStatus'
-        }, {
-          code: 'followCount',
-          dataType: 'number'
-        }, {
-          code: 'nextFollowTime',
-          dataType: 'date'
-        }]
+        pullMenuList =
+          [
+            {
+              code: 'outStatus',
+              pullType: 'mSelect',
+              typeName: 'outStatus'
+            },
+            {
+              code: 'skuName',
+            },
+            {
+              code: 'skuModel',
+            },
+            {
+              code: 'nonStdCode',
+              title: '色号'
+            },
+            {
+              code: 'brandName',
+            },
+            {
+              code: 'isFlgGift',
+              title: '是否赠品',
+              dataType: 'checkbox'
+            },
+            {
+              code: 'isExtCo',
+              title: '外协品查询',
+              dataType: 'checkbox'
+            },
+          ]
 
         content = [
           {
@@ -476,21 +496,25 @@ Page({
         listTitle = 'purNo'
         listStatus = 'intoStatus'
         listSubTitle = 'pickupDate'
-        pullMenuList = [{
-          code: 'outStatus',
-          pullType: 'mSelect',
-          typeName: 'outStatus'
-        }, {
-          code: 'receiveStatus',
-          pullType: 'mSelect',
-          typeName: 'receiveStatus'
-        }, {
-          code: 'followCount',
-          dataType: 'number'
-        }, {
-          code: 'nextFollowTime',
-          dataType: 'date'
-        }]
+        pullMenuList = [
+          {
+            code: 'outStatus',
+            pullType: 'mSelect',
+            typeName: 'outStatus'
+          },
+          {
+            code: 'receiveStatus',
+            pullType: 'mSelect',
+            typeName: 'receiveStatus'
+          },
+          {
+            code: 'followCount',
+            dataType: 'number'
+          },
+          {
+            code: 'nextFollowTime',
+            dataType: 'date'
+          }]
 
         content = [
           {
@@ -550,7 +574,7 @@ Page({
           code: 'rpType',
           pullType: 'mSelect',
           typeName: 'rpType'
-        }, 
+        },
         {
           code: 'staffName',
         },

+ 2 - 1
package-business-analysis/pages/detail-report/detail-report.json

@@ -1,3 +1,4 @@
 {
-        "usingComponents": {}
+        "usingComponents": {},
+        "navigationStyle": "custom"
 }

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

@@ -1,8 +1,9 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <loading wx:if="{{loading}}"></loading>
 <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}}" bind:search="searchData" searchTextPlaceholder="{{placeholder}}">
+	<dk-dropdown-menu  model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{placeholder}}">
 	</dk-dropdown-menu>
 </van-sticky> 
 

+ 92 - 63
package-inventory/pages/cost-check/add/add.js

@@ -1,66 +1,95 @@
-// package-inventory/pages/cost-check/add/add.js
+const mixins = require('@/mixins/index.js')
 Page({
-
-    /**
-     * 页面的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
+  mixins: [mixins],
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tableData: [],
+    // 路由
+    routeObjName: 'inboundItem',
+    buttonSaveList: [
+      { code: 'add', title: mixins.$t('costCheck'), },
+    ],
+    // 内容一定
+    content: [
+      {
+        left: { tag: 'brandName', title: 'skuModel', type: 'title' },
+      },
+      {
+        left: { name: 'skuName', },
+      },
+      {
+        left: { name: 'priceInto', type: 'price' },
+        right: { name: 'costPrice', title: '入库核对单价', type: 'price' }
+      },
+      {
+        left: { name: 'nonStdCode', title: '色号:' },
+        right: { name: 'whName' },
+
+      },
+      {
+        left: { name: 'skuSpec', title: '规格:' },
+        right: { name: 'packBox', title: '箱片:' },
+      },
+      {
+        left: { name: 'intoQty', title: '入库数量:' },
+        right: { name: 'seriesName', title: '系列:' },
+      }
+    ],
+    
+  },
+  /**
+  * @desc : 入库单据输入事件
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  changeAmount(e) {
+    let index = e.detail.index
+    let key = e.detail.key
+    let value = e.detail.value
+    let tableData = this.data.tableData;
+    if (tableData && tableData[index]) {
+      tableData[index][key] = Number(value)
+      tableData[index].costAmt = (Number(tableData[index][key] * tableData[index].intoQty)).toFixed(2)
     }
+    this.setData({
+      tableData: tableData
+    })
+  },
+  /**
+   * @desc : 设置保存参数
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  setParams(params) {
+    params = []
+    params = this.data.tableData
+    return params
+  },
+
+  /**
+   * @desc : 保存数据服务
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  saveData() {
+    return this.excute(this.data.service, this.data.service.costCheckOk, this.data.params);
+  },
+  /**
+  * 生命周期函数--监听页面加载
+  */
+  loadInit() {
+    let that = this
+    const eventChannel = this.getOpenerEventChannel()
+    eventChannel.on('params', function (data) {
+      data.chooseList.forEach(it => {
+        it.costPrice = Number(0)
+        it.costAmt = Number(0)
+      })
+      that.setData({
+        tableData: data.chooseList
+      })
+    })
+  }
 })

+ 2 - 1
package-inventory/pages/cost-check/add/add.json

@@ -1,3 +1,4 @@
 {
-    "usingComponents": {}
+  "usingComponents": {},
+  "navigationBarTitleText":"成本核对"
 }

+ 5 - 2
package-inventory/pages/cost-check/add/add.wxml

@@ -1,2 +1,5 @@
-<!--package-inventory/pages/cost-check/add/add.wxml-->
-<text>package-inventory/pages/cost-check/add/add.wxml</text>
+<!-- 列表区 -->
+<dk-list list="{{tableData}}" detailReportFlag="{{true}}" titleImageFlag="{{false}}" flgPoint="{{false}}" chooseFlag="{{false}}" bind:choose="listChoose" title="intoNo" subTitle="intoDate" status="intoStatusName" buttonList="{{popbuttonList}}" content="{{content}}" bind:changeAmount="changeAmount" contentCol="{{contentCol}}" contentObj="{{contentObj}}"></dk-list>
+
+<!--  保存 -->
+<dk-save-button btnAutoWidthFlag="{{true}}" contentLineFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="save"></dk-save-button>

+ 271 - 52
package-inventory/pages/cost-check/cost-check.js

@@ -1,66 +1,285 @@
-// package-inventory/pages/cost-check/cost-check.js
+const mixins = require('@/mixins/index.js')
+const api = require('@/utils/api.js');
+const config = require('@/config/config.js');
+const Constants = require('@/utils/Constants');
+const util = require('@/utils/util.js')
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
-    data: {
-
+  mixins: [mixins],
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tableData: [],
+    showSearch: true,
+    initSearchFlag: false,
+    buttonSaveList: [
+      { code: 'add', title: mixins.$t('costCheck'), },
+    ],
+    contentSaveList: [{
+      code: 'flag',
+      title: mixins.$t("allChoose"),
+      type: 'checkbox'
+    },],
+    cardList: ['main'],
+    contentObj: {
+      main: [
+        { code: 'intoType', name: 'intoType', type: 'chooseAndStr', required: true, title: mixins.$t('intType'), urlKey: 'chooseIntType' },
+        { code: 'supName', type: 'str', required: false, title: mixins.$t('supplier') },
+        { code: 'enterWhDate', name: 'enterWhDate', type: 'dateDay', required: false },
+        { code: 'createTime', name: 'createTime', type: 'dateDay', required: false },
+        { code: 'staffId', name: 'staffName', type: 'choose', required: false, title: mixins.$t('staffId'), urlKey: 'chooseStaff' },
+        { code: 'orgId', name: 'orgName', type: 'choose', required: false, title: mixins.$t('orgTwo'), urlKey: 'chooseOrg' }
+      ]
     },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
+    // 查询条件
+    searchContent: [{
+      code: 'intoDate',
+      title: mixins.$t('pastThirthtyDays'),//近30天',
+      defaultValue: 5,
+      searchType: Constants.searchType.date
     },
+    {
+      code: 'choose',
+      title: mixins.$t('choose'),//'筛选',
+      searchType: Constants.searchType.pick
+    }],
+    // 查询条件-筛选
+    pullMenuList: [
+      {
+        code: 'intoStatus',
+        pullType: 'mSelect',
+        typeName: 'intoStatus'
+      },
+      {
+        code: 'staffName',
+      },
+      {
+        code: 'orgName',
+      },
+      {
+        code: 'supName',
+      },
+      {
+        code: 'intoDate',
+        dataType: 'date'
+      },
+      {
+        code: 'viewNoCostDocuments',
+        dataType: 'checkbox'
+      },
+    ],
+    statusImage: 'verified.png',
+    // 内容一定
+    content: [
+      {
+        left: { tag: 'brandName', title: 'skuModel', type: 'title' },
+      },
+      {
+        left: { name: 'skuName', },
+      },
+      {
+        left: { name: 'priceInto', type: 'price' },
+        right: { name: 'intoQty', type: 'qty' }
+      },
+      {
+        left: { name: 'nonStdCode', title: '色号:' },
+        right: { name: 'whName' },
 
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
+      },
+      {
+        left: { name: 'skuSpec', title: '规格:' },
+        right: { name: 'seriesName', title: '系列:' },
+      }
+    ],
+    contentObjList: {
+      '已核对':
+        [
+          {
+            left: { tag: 'brandName', title: 'skuModel', type: 'title' },
+          },
+          {
+            left: { name: 'skuName', },
+          },
+          {
+            left: { name: 'costPrice', type: 'price' },
+            right: { name: 'intoQty', type: 'qty' }
+          },
+          {
+            left: { name: 'nonStdCode', title: '色号:' },
+            right: { name: 'whName' },
 
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
+          },
+          {
+            left: { name: 'skuSpec', title: '规格:' },
+            right: { name: 'seriesName', title: '系列:' },
+          }
+        ],
+        '未核对':
+        [
+          {
+            left: { tag: 'brandName', title: 'skuModel', type: 'title' },
+          },
+          {
+            left: { name: 'skuName', },
+          },
+          {
+            left: { name: 'priceInto', type: 'price' },
+            right: { name: 'intoQty', type: 'qty' }
+          },
+          {
+            left: { name: 'nonStdCode', title: '色号:' },
+            right: { name: 'whName' },
 
+          },
+          {
+            left: { name: 'skuSpec', title: '规格:' },
+            right: { name: 'seriesName', title: '系列:' },
+          }
+        ]
     },
+    // 路由
+    routeObjName: 'inboundItem',
+  },
 
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
+  /**
+  * @desc : 全选
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  allChoose(e) {
+    let btnFormData = this.data.btnFormData ? JSON.parse(this.data.btnFormData) : ''
+    let tableData = this.data.tableData
+    tableData.forEach(res => {
+      res.checked = btnFormData.flag
+    })
+    this.setData({
+      tableData: tableData
+    })
+  },
+  /**
+  * @desc : 选择事件
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  listChoose(e) {
+    let tableData = this.data.tableData
+    tableData[e.detail.index].checked = e.detail.checked
+    this.setData({
+      tableData: tableData
+    })
+  },
+  /**
+  * @desc : 核对成本跳转
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  toAdd() {
+    let tableData = this.data.tableData
+    let chooseList = []
+    chooseList = tableData.filter(res => {
+      return res.checked
+    })
+    if (chooseList.length == 0) {
+      util.showToast('请选择一条数据');
+      return
+    }
+    wx.navigateTo({
+      url: this.data.route.add.url,
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', {
+          chooseList: chooseList
+        })
+      }
+    })
+  },
+  /**
+  * @desc : 选择数据源
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  chooseData(e) {
+    let formData = JSON.parse(this.data.formData)
+    let code = e.detail.code
+    let data = e.detail.data.data
+    if (code == "staffId") { //员工
+      formData.staffId = data.id
+      formData.staffName = data.name
+    }
+    if (code == "orgId") { //部门
+      formData.orgId = data.id
+      formData.orgName = data.name
+    }
+    if (code == "intoType") { //部门
+      formData.intoType = data.name
+    }
+    this.setData({
+      formData: JSON.stringify(formData)
+    })
+  },
+  /**
+    * @desc : 查询
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  doSearch() {
+    let formData = JSON.parse(this.data.formData)
+    if (!formData.intoType) {
+      util.showToast('请输入/选择入库类型');
+      return
+    }
+    this.setData({
+      btnFormData: JSON.stringify({ flag: false }),
+      showSearch: false
+    })
+    // 重新查询
+    this.searchData()
+  },
+  /**
+    * @desc : 重置
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  resetting() {
+    this.setData({
+      formData: null
+    })
+  },
 
-    },
+  /**
+    * @desc : 设置查询参数
+    * @date : 2024年3月8日
+    * @author : 于继渤
+    */
+  setSearchParams(params) {
+    let formData = JSON.parse(this.data.formData)
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    if (formData.createTime) {
+      delete formData['createTime']
+    }
+    if (formData.enterWhDate) {
+      delete formData['enterWhDate']
+    }
+    params.intoTypeName = formData.intoType
+    params.supName = formData.supName
+    params.intoDateStart = formData.enterWhDateStart ? formData.enterWhDateStart : params.intoDateStart
+    params.intoDateEnd = formData.enterWhDateEnd ? formData.enterWhDateEnd : params.intoDateEnd
+    params.createTimeStart = formData.createTimeStart
+    params.createTimeEnd = formData.createTimeEnd
+    params.staffId = formData.staffId
+    params.orgId = formData.orgId
+    return params;
+  },
+  /**
+   * @desc : 加载数据
+   * @author : 于继渤
+   * @date : 2024/1/23 9:16
+   */
+  getData(params) {
 
-    },
+    return this.excute(this.data.service, this.data.service.selectCostCheck, params);
+  },
 
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
 
-    }
 })

+ 2 - 1
package-inventory/pages/cost-check/cost-check.json

@@ -1,3 +1,4 @@
 {
-    "usingComponents": {}
+    "usingComponents": {},
+    "navigationBarTitleText":"成本核对"
 }

+ 53 - 2
package-inventory/pages/cost-check/cost-check.wxml

@@ -1,2 +1,53 @@
-<!--package-inventory/pages/cost-check/cost-check.wxml-->
-<text>package-inventory/pages/cost-check/cost-check.wxml</text>
+<!-- 前台导入wxmlUtil.wxs -->
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<loading wx:if="{{loading}}"></loading>
+<van-sticky wx:if="{{!showSearch}}" scroll-top="0">
+  <!-- 查询条件 -->
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['inOrderNo','skuName','skuCode'])}}">
+  </dk-dropdown-menu>
+</van-sticky>
+
+<!-- 暂无数据 -->
+<van-empty wx:if="{{!showSearch && tableData.length<=0}}" description="{{$t['nodata']}}" />
+
+<!-- 列表区 -->
+<dk-list wx:if="{{!showSearch}}" statusImageFlag="{{true}}" statusImageFlagValue="flgCostCheck" statusImage="{{statusImage}}" list="{{tableData}}" detailReportFlag="{{true}}" titleImageFlag="{{false}}" flgPoint="{{false}}" chooseFlag="{{true}}" bind:choose="listChoose" title="intoNo" subTitle="intoDate" status="intoStatusName" buttonList="{{popbuttonList}}" content="{{content}}" contentCol="flgCostCheckName" contentObj="{{contentObjList}}"></dk-list>
+
+
+
+
+<!-- 显示没用更多 -->
+<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
+
+<view style="position: fixed;bottom: 230rpx;right: 30rpx;">
+  <view bind:tap="export" class="btn-add-class">
+    <van-icon name="share" color="#FFFFFF" size="60rpx" />
+  </view>
+</view>
+
+
+<!--  保存 -->
+<dk-save-button wx:if="{{!showSearch}}" model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" contentLineFlag="{{true}}" btnRightFlag="{{true}}" bind:change="allChoose" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>
+
+<view wx:if="{{ showSearch }}" overlay="{{false}}" style="border: 1px solid #000000;border-radius: 16rpx;box-shadow: 0px 10px 20px 0px #E1E5EE99;background: #95A8CB1A;margin:20rpx;margin-top:35%;">
+  <view style="padding:10rpx;">
+    <dk-form id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" transparentStyle="{{true}}" class="" bind:chooseData="chooseData">
+    </dk-form>
+    <view style="display: flex;width: 90%;margin: 20rpx;">
+      <view style="width: 50%;"></view>
+      <view style="display: flex;width: 50%;justify-content: center;">
+        <view>
+          <van-button plain color="#00A7B5" block custom-style="border-radius: 20rpx;background: #95A8CB1A;width:160rpx;height:60rpx" bind:tap="resetting" type="info">重置</van-button>
+        </view>
+        <view style="margin-left: 15px;">
+          <van-button plain color="#00A7B5" block custom-style="border-radius: 20rpx;background: #95A8CB1A;width:160rpx;height:60rpx" bind:tap="doSearch" type="info">查询</van-button>
+        </view>
+      </view>
+    </view>
+
+
+
+  </view>
+
+
+</view>

+ 3 - 1
package-inventory/pages/cost-check/cost-check.wxss

@@ -1 +1,3 @@
-/* package-inventory/pages/cost-check/cost-check.wxss */
+.van-cell{
+  background: #F4F6FA !important;
+}

+ 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: {

+ 2 - 1
package-inventory/pages/ivt-detail-report/ivt-detail-report.json

@@ -1,4 +1,5 @@
 {
     "usingComponents": {},
-    "navigationBarTitleText":"库存查询"
+    "navigationBarTitleText":"库存查询",
+    "navigationStyle": "custom"
 }

+ 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" />
-
 <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 ;">

+ 2 - 5
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;
@@ -33,7 +29,8 @@
 .left-class {
 	color: #3E69F6 !important;
 	position: fixed;
-	top: 236rpx;
+	/* top: 236rpx; */
+  top: 387.86rpx;
 	width: 130rpx !important;
 	z-index: 1 !important;
 	border-radius: 16rpx !important;

+ 26 - 3
package-inventory/pages/ivt-sum-report/detail/detail.js

@@ -1,3 +1,12 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 
+ * 类的信息:
+ *		1.程序名称:收发存汇总-明细
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		姜永辉		 2024-1-23			1.00		    选品
+ *******************************************************************************/
 const mixins = require('@/mixins/index.js')
 const Constants = require('@/utils/Constants.js');
 const app = getApp()
@@ -11,8 +20,8 @@ Page({
     routeObjName: 'report',
     // 待入库 已入库的taglist
     tagList: [
-      { title: mixins.$t('inBoundOrder') },
-      { title: mixins.$t('outBoundOrder') }],
+      { title: mixins.$t('inBoundOrder') ,code:'inBound'},
+      { title: mixins.$t('outBoundOrder') ,code:'outBound'}],
     active: 0,
   },
 
@@ -97,7 +106,21 @@ Page({
       item: item
     })
   },
-
+  /**
+   * 跳转对应单据
+   */
+  toItem(param){
+    const code = this.data.tagList[this.data.active].code;
+    const data = param.currentTarget.dataset.value
+    const e = {
+      detail:{
+        name: code,
+        item: data
+      }
+    }
+    // 跳转问题待解决
+    this.open(e)
+  },
   /**
    * 生命周期函数--监听页面加载
    */

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

@@ -70,7 +70,7 @@
   <!-- 上半部分 -->
   <view class="main-foot" style="border-radius: 15rpx;background-size: 100% 172rpx;">
     <view class="table-content" data-item="{{item_}}">
-      <view class="table-content-row" style="padding: 30rpx ">
+      <view class="table-content-row" style="padding: 30rpx" bindtap="toItem" data-value="{{item_}}">
 
         <view style="display: flex;padding-top: 10rpx;">
           <view style="font-size: 30rpx;width: 55%;color:#1B365D;">{{active==0?item_.intoNo:item_.outNo}}</view>

+ 2 - 1
package-inventory/pages/ivt-sum-report/ivt-sum-report.json

@@ -1,4 +1,5 @@
 {
     "usingComponents": {},
-    "navigationBarTitleText": "收发存汇总表"
+    "navigationBarTitleText": "收发存汇总表",
+    "navigationStyle": "custom"
 }

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

@@ -2,8 +2,9 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <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}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel'])}}">
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" navBarHeight="{{navBarHeight}}" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel'])}}">
   </dk-dropdown-menu>
 </van-sticky>
 

+ 358 - 0
package-inventory/pages/ivt-warning-report/ivt-warning-report.js

@@ -0,0 +1,358 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:库存预警
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		刘尧		 2024-1-23			1.00		    选品
+ *******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const mixins = require('@/mixins/index.js')
+const config = require('@/config/config.js')
+const app = getApp()
+Page({
+  mixins: [mixins],
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    firstFlag: true,
+    orderBy: [
+      {
+        "text": mixins.$t('SellableQuantityAsc'),
+        "value": 1
+      },
+      {
+        "text": mixins.$t('SellableQuantityDesc'),
+        "value": 2
+      }
+    ],
+    orderByValue: null,
+    routeObjName: 'report',
+    // routeObjName: 'goodsSku',
+    dataItem: null,
+    choosedGoodsList: [],
+    commonService: app.globalData['commonService'],
+    inventoryService: app.globalData['inventoryService'],
+    typeList: [
+      {
+        brandName: mixins.$t('brandAllName')
+      }
+    ],
+    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'
+    }],
+
+    contentList: [],
+    item: Constants.billType.out,
+    form: {
+      whIds: [],
+      whNames: ''
+    }
+  },
+
+  /**
+   * @desc : 加载数据
+   * @date : 2024/6/12 10:12
+   * @author : 刘尧
+   */
+  loadInit() {
+    this.setData({
+      billType: this.data.item,
+      title: '库存预警表',
+      objectCode: Constants.menuCode.ivtDetailReport,
+      method: 'getIvtDetailReport',
+      exportCols: {
+        "skuCode": "商品编号",
+        "skuName": "商品名称",
+        "skuModel": "商品型号",
+        "nonStdCode": "色号",
+        "brandName": "商品品牌",
+        "categoryName": "种类名称",
+        "seriesName": "系列名称",
+        "skuSpec": "商品规格",
+        "whName": "仓库名称",
+        "invQty": "库存数量",
+        // "outingQty": "出库中数量",
+        "freezeQty": "冻结数量",
+        "usableQty": "可用数量",
+        "remarks": "备注",
+      },
+    })
+  },
+
+  /**
+  * @desc : 分类切换
+  * @date : 2024/6/12 10:12
+  * @author : 刘尧
+  */
+  changeSidebar(e) {
+    let index = e.detail
+    let typeList = this.data.typeList
+    this.setData({
+      brandId: typeList[index].brandId
+    })
+    this.searchData()
+  },
+
+  /**
+   * @desc : 跳转明细
+   * @author : 周兴
+   * @date : 2024/1/22
+   */
+  toDetail(e) {
+    console.log("toDetail", e);
+    if (e) {
+      let item = e.currentTarget.dataset.item;
+      e.detail.item = item
+      if (item) {
+        let button = {
+          formMode: Constants.formMode.edit
+        }
+        e.detail.item.button = button
+      }
+      // 如果name不传递,默认为edit
+      e.detail.name = 'editIvt'
+    }
+    this.open(e);
+  },
+
+
+  /**
+   * @desc : 设置查询参数
+   * @author : 刘尧
+   * @date : 2024/1/23 9:16
+   */
+  setSearchParams(params) {
+    params.brandId = this.data.brandId //品牌id 
+    //顶部的选择库区是否选择用户默认的库区
+    params.whIds = this.data.form.whIds //仓库  
+    //排序
+    params.desc = this.data.orderByValue
+    return params
+  },
+  /**
+  * @desc : 查询
+  * @date : 2024/6/12 10:12
+  * @author : 于继渤
+  */
+  doSearch() {
+    this.searchData()
+  },
+  /**
+   * @desc : 查询
+   * @date : 2024/6/12 10:12
+   * @author : 刘尧
+   */
+  getData(params) {
+    params.winning = true
+    if (this.data.item == Constants.billType.sale) {
+      return this.excute(this.data.commonService, this.data.commonService.getGoodsForOrderByPage, params);
+    } else if (this.data.item == Constants.billType.out || this.data.item == Constants.billType.purReturn) {
+      return this.excute(this.data.inventoryService, this.data.inventoryService.selectByCond, params);
+    } else {
+      return this.excute(this.data.service, this.data.service.selectByCond, params);
+    }
+  },
+
+  /**
+     * @desc :   处理接口返回数据
+     * @date : 2024/6/12 10:12
+     * @author : 刘尧
+     */
+  handleSearchData(tableData) {
+    tableData.forEach(item => {
+      let list = []
+      // 商品名称
+      list.push({
+        title: mixins.$t('skuName'),
+        value: item.skuName ? item.skuName : '',
+        copyValue: item.skuName ? item.skuName : '',
+      })
+      // 库区
+      list.push({
+        title: mixins.$t('reservoirArea'),
+        value: item.whName ? item.whName : '',
+        copyValue: item.whName ? item.whName : '',
+      })
+      // 规格
+      list.push({
+        title: mixins.$t('goodSpec'),
+        value: item.skuSpec ? item.skuSpec : '',
+        copyValue: item.skuSpec ? item.skuSpec : '',
+      })
+      // 色号
+      list.push({
+        title: mixins.$t('colorNumber'),
+        value: item.nonStdCode ? item.nonStdCode : '',
+        copyValue: item.nonStdCode ? item.nonStdCode : '',
+      })
+      // 库存量
+      list.push({
+        title: mixins.$t('storageNum'),
+        value: (item.invQty ? item.invQty : '0') + item.unitName,
+        copyValue: item.invQty ? item.invQty : '0',
+      })
+      // 可售包装 
+      if (item.flgSubUnit) {
+        item['box'] = parseInt(item.invQty / item.packBox) 
+        item['piece'] = parseFloat( Number(item.invQty % item.packBox)).toFixed(item.decimalPlaces)
+        item.packageBox = item['box'] + item.subUnitName + item['piece'] + item.unitName
+        list.push({
+          title: mixins.$t('packageIvtBox'),
+          value: item.packageBox,
+          copyValue: item.packageBox,
+        })
+      }
+      // 预警信息
+      if (item.warningMsg) {
+        list.push({
+          title: mixins.$t('warningMsg'),
+          value: item.warningMsg,
+          color: '#FF594E',
+          copyValue: item.warningMsg,
+        })
+      }
+      item.list = list
+      if (item.skuImages && item.skuImages.length > 0) {
+        item.skuImages.forEach(it => {
+          it.url = config.image_url + it.path
+        });
+        item.imagesUrl = item.skuImages[0].url
+      }
+    })
+    this.setData({
+      tableData: tableData
+    })
+  },
+  /**
+  * @desc : 获取品牌
+  * @date : 2024/6/12 10:12
+  * @author : 刘尧
+  */
+  getGoodsBrandNoPage() {
+    return this.excute(this.data.commonService, this.data.commonService.getGoodsBrandNoPage, {}).then(res => {
+      this.setData({
+        typeList: this.data.typeList.concat(res.data.data)
+      })
+    })
+  },
+
+  /**
+    * @desc : 查询库存
+    * @date : 2024/6/12 10:12
+    * @author : 刘尧
+    */
+  getInventory(params) {
+    return this.excute(this.data.commonService, this.data.commonService.getInventory, params);
+  },
+
+  /**
+   * @desc : 下拉多选事件
+   * @author : 刘尧
+   * @date : 2022/5/26 12:16
+   */
+  dropdowncommit(e) {
+    this.setData({
+      whFlag: true
+    })
+  },
+  /**
+   * @desc : 下拉多选确定
+   * @author : jyh
+   * @date : 2023年9月8日
+   */
+  mutiSearch(e) {
+    console.log("mutiSearch", e);
+    let id = e.target.id
+    let form = this.data.form || {}
+    if (id === 'warehouse') {
+      form.whId = e.detail.item.id
+      form.whName = e.detail.item.name
+      this.setData({
+        whFlag: false,
+        form: form
+      })
+      this.selectComponent("#statusItemWareHouse").toggle(false)
+      this.searchData()
+    }
+  },
+
+
+  /** 下拉多选关闭 */
+  muticloseAll(e) {
+    this.setData({
+      whFlag: false
+    })
+    this.selectComponent("#statusItemWareHouse").toggle()
+  },
+
+  /** 下拉多选确定 */
+  mutiSearchAll(e) {
+    let form = this.data.form || {}
+    form.whIds = e.detail.idList
+    form.whNames = e.detail.names
+    this.setData({
+      whFlag: false,
+      form: form
+    })
+    this.selectComponent("#statusItemWareHouse").toggle(false)
+    this.searchData()
+  },
+  /**
+  * @desc : 排序
+  * @date : 2024/6/12 10:12
+  * @author : 刘尧
+  */
+  onSwitchChange(e) {
+    console.log("onSwitchChange", e);
+    this.setData({
+      orderByValue: e.detail == 2 ? 'desc' : null
+    })
+    this.searchData()
+  },
+
+  muticlose() {
+    this.selectComponent("#statusItemWareHouse").toggle(true)
+  },
+  /**
+  * @desc : 初始化
+  * @date : 2024/6/12 10:12
+  * @author : 刘尧
+  */
+  onLoad() {
+    this.getGoodsBrandNoPage()
+    let _this = this;
+    wx.getSystemInfo({
+      success: function (res) {
+        _this.setData({
+          windowHeight: res.windowHeight,
+          windowWidth: res.windowWidth
+        })
+      }
+    })
+  },
+})

+ 5 - 0
package-inventory/pages/ivt-warning-report/ivt-warning-report.json

@@ -0,0 +1,5 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "库存预警",
+    "navigationStyle": "custom"
+}

+ 62 - 0
package-inventory/pages/ivt-warning-report/ivt-warning-report.wxml

@@ -0,0 +1,62 @@
+<wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<loading wx:if="{{loading}}"></loading>
+<van-dialog id="van-dialog" />
+<van-sticky offset-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,['skuName','skuModel','colorNumber'])}}">
+  </dk-dropdown-menu>
+</van-sticky>
+
+<view style="height:100%;background: #F8F9FD ;">
+  <!--出库商品 列表 走库存-->
+  <view style="height:calc({{windowHeight+'px'}} - 05rpx);overflow: scroll;">
+    <scroll-view scroll-y='{{true}}' bindscrolltolower='scrollToLower' lower-threshold='100'>
+      <view wx:for="{{tableData}}" wx:key="index" data-item="{{item}}" class="main-class" style="width: 75%;margin-left: 166rpx;">
+        <view class="main-foot" style="border-radius:15rpx;" data-item="{{item}}" catch:tap="toDetail">
+          <view>
+            <view class="table-content-row">
+              <view style="display:flex;width:100%;">
+                <view data-item="{{item}}" style="display:flex;font-size: 15px;">
+                  <dk-text style="font-size:30rpx;" fontWeight="nomal" value="{{item.skuModel }}"></dk-text>
+                </view>
+              </view>
+            </view>
+
+            <!-- 商品名称 及以下列 -->
+            <view class="table-row" wx:for="{{item.list}}" wx:for-item="item_" wx:for-index="index_">
+              <view class="table-content-row">
+                <view style="display: flex;">
+                  <view class="table-content-row-font">
+                    <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" copyValue="{{item.copyValue}}" value="{{item_.title}}"></dk-text>
+                  </view>
+                  <view class="table-content-class" style="color:{{item_.color? item_.color: '#000000'}};">
+                    {{item_.value}}
+                  </view>
+                </view>
+              </view>
+            </view>
+
+          </view>
+        </view>
+      </view>
+    </scroll-view>
+
+  </view>
+</view>
+
+<van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="{{active == 0 ? 'left-class' : 'right-class'}}">
+  <view wx:if="{{active != 1}}" class="{{controlFlags.choosewhFlag?'addsidebar':''}}" style=" height:calc({{windowHeight+'px'}} - {{active == 1 ? '299rpx' :'299rpx' }});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="{{typeList}}" />
+  </view>
+</van-sidebar>
+
+<!-- 仓库 -->
+<dk-muti-dropdown-item show="{{whFlag}}" content="{{form.whName}}" id='warehouse' typeName='warehouse' bind:commit='mutiSearchAll' bind:muticlose='mutiCloseAll'></dk-muti-dropdown-item>
+
+<view style="position: fixed;bottom: 230rpx;right: 30rpx;">
+  <view bind:tap="export" class="btn-add-class">
+    <van-icon name="share" color="#FFFFFF" size="60rpx" />
+  </view>
+</view>

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

@@ -0,0 +1,147 @@
+.main-good-class {
+	background-color: #FFFFFF;
+	border-radius: 0px 16px 0px 0px;
+}
+
+.search-class {
+	color: #ADB7C9;
+}
+
+
+.van-search__content {
+	background: #F8F9FD;
+	border: 1px solid #ffffff;
+	border-radius: 15rpx !important;
+}
+
+.van-tab-active-left {
+	background-color: #FFFFFF !important;
+	color: #002340 !important;
+	font-size: 28rpx;
+	border-radius: 8px;
+
+}
+
+.left-class {
+	color: #3E69F6 !important;
+	position: fixed;
+	/* top: 236rpx; */
+  top: 387.86rpx;
+	width: 130rpx !important;
+	z-index: 1 !important;
+	border-radius: 16rpx !important;
+}
+
+.van-sidebar-item--selected {
+	border-color: #3E69F6 !important;
+	color: #333333 !important;
+	font-weight: 600 !important;
+}
+
+.sidebar-item {
+	padding: 30rpx 25rpx 20rpx 35rpx !important;
+	font-size: 13px !important;
+	color: #666666 !important;
+	font-weight: 600;
+}
+
+.goods-class {
+	position: fixed;
+	left: 20rpx;
+	/* top: 324rpx; */
+	background-color: #fff;
+	border-radius: 0rpx 16rpx 0rpx 0rpx;
+	border-radius: 16px 0px 0px 0px;
+}
+
+.tags-class {
+	margin-top: 20rpx;
+}
+
+.cell-width {
+	width: 85%;
+	margin-right: 10rpx;
+}
+
+.goods-cell-class {
+	margin: 32rpx 32rpx 32rpx 32rpx;
+	padding: 20rpx;
+	box-shadow: 0px 10px 20px 0px #0000000D;
+	border-radius: 16rpx;
+}
+
+/**产品条目的图片**/
+.goods-item-image {
+	width: 170rpx;
+	height: 170rpx;
+	left: 6rpx;
+	top: calc((100% - 166rpx)/2);
+}
+
+/**产品条目的样式**/
+.goods-item-class {
+	display: flex;
+	text-align: left;
+	padding-top: 20rpx;
+}
+
+/* 图标 */
+.van-icon-class {
+	display: flex;
+	align-items: flex-end;
+}
+
+
+
+.selected-product {
+	color: #191919;
+	font-size: 28rpx;
+	padding: 18rpx 52rpx 18rpx 52rpx;
+	border-radius: 8px 8px 0px 0px;
+	width: 50%;
+	text-align: center;
+}
+
+.selected-product-color-01 {
+	background-color: #FFFFFF;
+}
+
+.selected-product-color-02 {
+	background-color: #FFFFFF4D;
+}
+
+.goods-selected-class {
+	/* padding-top: 98rpx; */
+	/* height: 100%; */
+	background-color: #fff;
+	border-radius: 0px 16px 0px 0px;
+}
+
+.scan-image {
+	width: 66rpx;
+	height: 66rpx;
+}
+
+.width-80 {
+	width: 100%;
+}
+
+.goods-cell-class {
+	padding: 0 20rpx 30rpx 20rpx !important;
+}
+
+.van-nav-bar__title {
+	color: #002340 !important;
+	font-size: 15px !important;
+}
+
+
+.btn-add-class {
+	background: #8091A9;
+	border-radius: 50%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	padding: 20rpx;
+	box-shadow: 0px 17px 22px 0px #1B365D33;
+  }

部分文件因为文件数量过多而无法显示