王英杰 1 год назад
Родитель
Сommit
d46ddeeeb1

+ 55 - 59
package-basic-data/pages/beginner-guide/beginner-guide.js

@@ -8,8 +8,7 @@ Page({
    */
   data: {
     stepsText: '录入商品信息是进行店铺管理的第一步,店铺信息的完善是精细化运营的必经之路',
-    steps: [
-      {
+    steps: [{
         no: 1,
         title: '录入资料',
         status: 1
@@ -25,68 +24,67 @@ Page({
         status: 0
       },
     ],
-    stepsItems: [ ],
+    stepsItems: [],
     stepsItems1: [ //录入资料
       {
         code: "goods",
         title: '添加商品',
-        label: '管理你的商品信息', 
+        label: '管理你的商品信息',
       },
       {
         code: "customer",
         title: '添加客户',
-        label: '维护你的客户资料', 
-      },  
+        label: '维护你的客户资料',
+      },
     ],
-    stepsItems2:  [ //开单记账
+    stepsItems2: [ //开单记账
       {
-        code:"order",
+        code: "order",
         title: '销售订单',
-        label: '卖一笔记一笔', 
-      }, 
+        label: '卖一笔记一笔',
+      },
       {
-        code:"cus-receipt",
+        code: "cus-receipt",
         title: '客户收款',
-        label: '不忘每笔应收款', 
+        label: '不忘每笔应收款',
       },
     ],
-    stepsItems2pro : [
-      {
-        code:"order",
+    stepsItems2pro: [{
+        code: "order",
         title: '销售订单',
-        label: '卖一笔记一笔', 
+        label: '卖一笔记一笔',
       },
       {
-        code:"undifind",
+        code: "undifind",
         title: '进货单',
-        label: '记录每次进货', 
+        label: '记录每次进货',
       },
       {
-        code:"undifind",
+        code: "undifind",
         title: '收款单',
-        label: '不忘每笔应收款', 
+        label: '不忘每笔应收款',
       },
       {
-        code:"undifind",
+        code: "undifind",
         title: '付款单',
-        label: '记录每笔应付款', 
+        label: '记录每笔应付款',
       },
     ],
     stepsItems3: [ //分析报表
       {
-        code:"business-overview",
+        code: "business-overview",
         title: '经营概况',
-        label: '查看店铺盈利情况', 
+        label: '查看店铺盈利情况',
       },
       {
-        code:"order-sum-report",
+        code: "order-sum-report",
         title: '销售汇总表',
-        label: '掌握商品销售排名', 
+        label: '掌握商品销售排名',
       },
       {
-        code:"ivt-detail-report",
+        code: "ivt-detail-report",
         title: '库存查询',
-        label: '库存清晰不错乱', 
+        label: '库存清晰不错乱',
       }
     ]
   },
@@ -106,19 +104,19 @@ Page({
     steps[index].status = 1
     if (steps[index].no == 1) {
       stepsText = '录入商品信息是进行店铺管理的第一步,店铺信息的完善是精细化运营的必经之路'
-      stepsItems =  this.data.stepsItems1 //录入资料
+      stepsItems = this.data.stepsItems1 //录入资料
 
     } else if (steps[index].no == 2) {
       stepsText = '记录单据让每笔交易有速可循,告别手工记录,数字化管理店铺'
       if (app.globalData.company.gradeCode == Constants.gradeCode.PRO) { //专业
-        stepsItems =  this.data.stepsItems2pro
-      }else{
-        stepsItems =  this.data.stepsItems2 //开单记账
+        stepsItems = this.data.stepsItems2pro
+      } else {
+        stepsItems = this.data.stepsItems2 //开单记账
       }
 
     } else if (steps[index].no == 3) {
       stepsText = '系统自动生成数据报表,数据辅助决策,助力生意增长'
-      stepsItems =  this.data.stepsItems3 //分析报表
+      stepsItems = this.data.stepsItems3 //分析报表
     }
 
     this.setData({
@@ -180,8 +178,7 @@ Page({
     wx.navigateTo({
       url: url,
       events: {
-        bandData: function (e) {
-        }
+        bandData: function (e) {}
       },
       success: function (res) {
         res.eventChannel.emit('params', {
@@ -212,8 +209,7 @@ Page({
     wx.navigateTo({
       url: '/package-basic-data/pages/beginner-guide/demo-tutorial/demo-tutorial',
       events: {
-        bandData: function (e) {
-        }
+        bandData: function (e) {}
       },
       success: function (res) {
         res.eventChannel.emit('params', {
@@ -227,42 +223,42 @@ Page({
       }
     })
   },
-    /**
+  /**
    * @desc : 从app.globalData.menus 取值GuideUrl 赋值到对应的stepsItems
    * @date : 2024/2/1 15:49
    * @author : 王英杰
    */
-  bindStepsItemsGuideUrl(stepsItems,menus){
+  bindStepsItemsGuideUrl(stepsItems, menus) {
     let stepsItems_ = stepsItems
     stepsItems_.forEach(element => {
-     let codeIndex =  menus.findIndex(t => t.objectCode == element.code)
-       if(codeIndex>=0){
-        element.url =  menus[codeIndex].guideUrl
-        if(element.url){
-          element.desc =  '演示教程'
-        } 
-       }
-     });
-   return stepsItems_
-  }, 
+      let codeIndex = menus.findIndex(t => t.objectCode == element.code)
+      if (codeIndex >= 0) {
+        element.url = menus[codeIndex].guideUrl
+        if (element.url) {
+          element.desc = '演示教程'
+        }
+      }
+    });
+    return stepsItems_
+  },
   /**
    * @desc : 初始化数据
    * @date : 2024/2/1 15:49
    * @author : 王英杰
    */
   loadInit() {
-    console.log('app.globalData',app.globalData); 
+    console.log('app.globalData', app.globalData);
     let menus = app.globalData.menus
-    let stepsItems1  = this.bindStepsItemsGuideUrl(this.data.stepsItems1,menus)
-    let stepsItems2pro  = this.bindStepsItemsGuideUrl(this.data.stepsItems2pro,menus)
-    let stepsItems2  = this.bindStepsItemsGuideUrl(this.data.stepsItems2,menus)
-    let stepsItems3  = this.bindStepsItemsGuideUrl(this.data.stepsItems3,menus)
+    let stepsItems1 = this.bindStepsItemsGuideUrl(this.data.stepsItems1, menus)
+    let stepsItems2pro = this.bindStepsItemsGuideUrl(this.data.stepsItems2pro, menus)
+    let stepsItems2 = this.bindStepsItemsGuideUrl(this.data.stepsItems2, menus)
+    let stepsItems3 = this.bindStepsItemsGuideUrl(this.data.stepsItems3, menus)
     this.setData({
-      stepsItems:stepsItems1,
-      stepsItems1:stepsItems1,
-      stepsItems2pro:stepsItems2pro,
-      stepsItems2:stepsItems2,
-      stepsItems3:stepsItems3,
+      stepsItems: stepsItems1, //默认的
+      stepsItems1: stepsItems1,
+      stepsItems2pro: stepsItems2pro,
+      stepsItems2: stepsItems2,
+      stepsItems3: stepsItems3,
     })
   },
 

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

@@ -84,6 +84,17 @@ Page({
     })
   },
   /**
+     * @desc   : 显示tip
+     * @author : 周兴
+     * @date   : 2024/4/25 11:46
+     */
+    showTip(e) {
+      let tip = e.currentTarget.dataset.tip
+      if (tip) {
+        util.showToast(tip);
+      }
+    },
+  /**
    * @desc : 收款单保存后重新刷新数据
    * @date : 2024/5/24 15:49
    * @author : 周兴

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

@@ -45,16 +45,18 @@
         <view class="order-summary">
           <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.orderAmount ? item.orderAmount : 0}}"></dk-cell>
         </view>
-        <view class="oreder-summary-detail">
-          订单({{item.orderQuantity}}单)
+        <view class="oreder-summary-detail"> 
+          <text style="margin-right: 4px;"> 订单({{item.orderQuantity}}单)</text>
+          <van-icon slot="label-icon" name="question-o" data-tip="数据来源:销售订单" catchtap="showTip" />
         </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 class="oreder-summary-detail"> 
+          <text style="margin-right: 4px;"> 退货({{item.outboundReturnQuantity}}单)</text>
+          <van-icon slot="label-icon" name="question-o" data-tip="数据来源:销售退货" catchtap="showTip" />
         </view>
       </view>
     </view>
@@ -63,8 +65,9 @@
         <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 class="oreder-summary-detail"> 
+          <text style="margin-right: 4px;"> 收款总额</text>
+          <van-icon slot="label-icon" name="question-o" data-tip="数据来源:客户付款\\退款\r\n计算公式:客户付款-退款" catchtap="showTip" />
         </view>
       </view>
 
@@ -82,8 +85,9 @@
           <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{((item.orderAmount?item.orderAmount:0) - (item.receiptResidue?item.receiptResidue:0) + (item.outboundReturnAmount ? item.outboundReturnAmount : 0 )  + (item.startAmount?item.startAmount:0) != 0) ? ((item.orderAmount?item.orderAmount:0) - (item.receiptResidue?item.receiptResidue:0) + (item.outboundReturnAmount ? item.outboundReturnAmount : 0 ) + (item.startAmount?item.startAmount:0)) : 0}}">
           </dk-cell>
         </view>
-        <view class="oreder-summary-detail">
-          客户欠款
+        <view class="oreder-summary-detail"> 
+          <text style="margin-right: 4px;"> 客户欠款</text>
+          <van-icon slot="label-icon" name="question-o" data-tip="计算公式:(销售订单-退货)-(客户付款-客户退款)" catchtap="showTip" />
         </view>
       </view>
     </view>

+ 8 - 0
package-basic-data/pages/customer-list/detail/detail.wxss

@@ -10,6 +10,14 @@ page {
   justify-content: center;
   padding: 2vw 6vw 1vw 6vw;
 }
+.oreder-summary-detail{
+  display: flex; 
+  align-items: center; 
+  justify-content: center; 
+  padding-top: 4px; 
+  font-size: 12px; 
+  color: #95A8CB;
+}
 .status-class {
   /* width: 40%; */
   height: 49rpx;

+ 63 - 36
package-purchase/pages/purchase-order/add/add.js

@@ -17,10 +17,12 @@ Page({
     }],
     minDate: new Date().getTime(),
     contentList: [{
-      code: 'need',
-      title: mixins.$t('totalAmount'), //'合集金额',
-      type: 'str'
+      code: 'goodsCount',
+      countName: mixins.$t('goodsQuantity'), //'商品数量',
+      type: 'count',
+      quantity: 0,  
     }, {
+      title: mixins.$t('totalAmount'), //'合计金额',
       code: 'amount',
       content: 0,
       type: 'number'
@@ -126,6 +128,9 @@ Page({
       if (card.code === 'amount') {
         card.content = 0
       }
+      if (card.code === 'goodsCount') {
+        card.quantity = 0
+      }
     })
     this.setData({
       cardList: cardList_,
@@ -201,6 +206,9 @@ Page({
       if (card.code === 'amount') {
         card.content = choooseItemList.sum("itemAmt")
       }
+      if (card.code === 'goodsCount') {
+        card.quantity = choooseItemList.sum("itemQty")
+      }
     })
 
     choooseItemList.forEach(element => {
@@ -240,6 +248,9 @@ Page({
         if (card.code === 'amount') {
           card.content = 0
         }
+        if (card.code === 'goodsCount') {
+          card.quantity = 0
+        }
       })
       cardList.forEach(card => {
         if (card.name === 'items') {
@@ -307,10 +318,12 @@ Page({
     if (!data.flgAutoHandle) {
       this.setData({
         contentList: [{
-          code: 'need',
-          title: mixins.$t('totalAmount'), //'合集金额',
-          type: 'str'
+          code: 'goodsCount',
+          countName: mixins.$t('goodsQuantity'), //'商品数量',
+          type: 'count',
+          quantity: 0, 
         }, {
+          title: mixins.$t('totalAmount'), //'合计金额',
           code: 'amount',
           content: 0,
           type: 'number'
@@ -320,10 +333,12 @@ Page({
       if (this.data.gradeCode == Constants.gradeCode.STD) {
         this.setData({
           contentList: [{
-            code: 'need',
-            title: mixins.$t('totalAmount'), //'合集金额',
-            type: 'str'
+            code: 'goodsCount',
+            countName: mixins.$t('goodsQuantity'), //'商品数量',
+            type: 'count',
+            quantity: 0, 
           }, {
+            title: mixins.$t('totalAmount'), //'合计金额',
             code: 'amount',
             content: 0,
             type: 'number'
@@ -337,10 +352,12 @@ Page({
               type: 'checkbox'
             },
             {
-              code: 'need',
-              title: mixins.$t('totalAmount'), //'合集金额',
-              type: 'str'
+              code: 'goodsCount',
+              countName: mixins.$t('goodsQuantity'), //'商品数量',
+              type: 'count',
+              quantity: 0, 
             }, {
+              title: mixins.$t('totalAmount'), //'合计金额',
               code: 'amount',
               content: 0,
               type: 'number'
@@ -387,8 +404,8 @@ Page({
       }
       element.sumPrice = element.pricePur * element.itemQty
       // 原仓库ID 240701
-      element.whIdPri = element.whId||''
-      element.nonStdCodePri = element.nonStdCode||''
+      element.whIdPri = element.whId || ''
+      element.nonStdCodePri = element.nonStdCode || ''
     });
     data.supName = data.supplierName
     let cardList_ = this.data.cardList
@@ -404,6 +421,9 @@ Page({
       if (card.code === 'amount') {
         card.content = data.goodsList.sum("itemAmt")
       }
+      if (card.code === 'goodsCount') {
+        card.quantity = data.goodsList.sum("itemQty")
+      }
     })
     let searchEditList = data.goodsList
     searchEditList.forEach(element => {
@@ -456,6 +476,9 @@ Page({
       if (card.code === 'amount') {
         card.content = totalAmout
       }
+      if (card.code === 'goodsCount') {
+        card.quantity = formData.goodsList.sum("itemQty")
+      }
     })
     // 明细的合计金额
     cardList.forEach(card => { //循环出商品总共价格
@@ -616,7 +639,7 @@ Page({
         pricePur: element.pricePur || '',
         skuSpec: element.skuSpec || '',
         nonStdCode: element.nonStdCode || '',
-        whId: element.whId || '', 
+        whId: element.whId || '',
       })
     });
     newList_.forEach(element => {
@@ -629,7 +652,7 @@ Page({
         pricePur: element.pricePur || '',
         skuSpec: element.skuSpec || '',
         nonStdCode: element.nonStdCode || '',
-        whId: element.whId || '', 
+        whId: element.whId || '',
       })
     });
     console.log('searchEditList', oldList);
@@ -836,10 +859,12 @@ Page({
       if (!that.data.flgAutoHandle) {
         this.setData({
           contentList: [{
-            code: 'need',
-            title: mixins.$t('totalAmount'), //'合集金额',
-            type: 'str'
+            code: 'goodsCount',
+            countName: mixins.$t('goodsQuantity'), //'商品数量',
+            type: 'count',
+            quantity: 0, 
           }, {
+            title: mixins.$t('totalAmount'), //'合计金额',
             code: 'amount',
             content: 0,
             type: 'number'
@@ -849,10 +874,12 @@ Page({
         if (this.data.gradeCode == Constants.gradeCode.STD) {
           this.setData({
             contentList: [{
-              code: 'need',
-              title: mixins.$t('totalAmount'), //'合集金额',
-              type: 'str'
+              code: 'goodsCount',
+              countName: mixins.$t('goodsQuantity'), //'商品数量',
+              type: 'count',
+              quantity: 0, 
             }, {
+              title: mixins.$t('totalAmount'), //'合计金额',
               code: 'amount',
               content: 0,
               type: 'number'
@@ -861,20 +888,20 @@ Page({
         } else {
           this.setData({
             contentList: [{
-                code: 'flag',
-                title: mixins.$t("purInBoundFlag"),
-                type: 'checkbox'
-              },
-              {
-                code: 'need',
-                title: mixins.$t('totalAmount'), //'合集金额',
-                type: 'str'
-              }, {
-                code: 'amount',
-                content: 0,
-                type: 'number'
-              }
-            ],
+              code: 'flag',
+              title: mixins.$t("purInBoundFlag"),
+              type: 'checkbox'
+            }, {
+              code: 'goodsCount',
+              countName: mixins.$t('goodsQuantity'), //'商品数量',
+              type: 'count',
+              quantity: 0, 
+            }, {
+              title: mixins.$t('totalAmount'), //'合计金额',
+              code: 'amount',
+              content: 0,
+              type: 'number'
+            }],
           })
         }
       }

+ 2 - 2
package-purchase/pages/purchase-order/add/add.wxml

@@ -6,10 +6,10 @@
 <!-- <dk-form id="{{formName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
 </dk-form> -->
 
-<dk-form-bill id="{{formName}}"  type="pur"  routeObjName="{{routeObjName}}" cardList="{{cardList}}"  titleTagCol="brandName"   titleCol="skuModel"   descCol="skuName" subCol="calculationFormula" priceCol="pricePur"  pupPriceCol="sumPrice"  quantityCol="itemQty" sumAmountCol="itemAmt" sumQuantityCol="itemQty" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" priceTitle="" bind:editItems="setGoods" bind:clear = "clear" table="{{table}}"  dataTime = "{{dataTime}}" iconCol="imagesUrl" bind:delItem="setGoods" bind:setGoods="setGoods"  minDate="{{minDate}}"validFlag="{{true}}">
+<dk-form-bill id="{{formName}}"  type="pur"  routeObjName="{{routeObjName}}" cardList="{{cardList}}"  titleTagCol="brandName"   titleCol="skuModel"   descCol="skuName" subCol="calculationFormula" priceCol="pricePur"  pupPriceCol="sumPrice"  quantityCol="itemQty" sumAmountCol="itemAmt" sumQuantityCol="itemQty" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" priceTitle="" bind:editItems="setGoods" bind:clear = "clear" table="{{table}}"  dataTime = "{{dataTime}}" iconCol="imagesUrl" bind:delItem="setGoods" bind:setGoods="setGoods"  minDate="{{minDate}}"validFlag="{{true}}"sumAmountColFlag="{{false}}">
 </dk-form-bill>
 
 <view style="height: 200rpx;"></view>
  
 <!-- 新建按钮 -->
-<dk-save-button   btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="save"></dk-save-button>
+<dk-save-button   btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="save" countName="商品数量" countEnd =""></dk-save-button>

+ 3 - 2
package-purchase/pages/supplier-list/detail/detail.wxml

@@ -77,8 +77,9 @@
           <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{((item.purchaseAmount ? item.purchaseAmount : 0) + (item.inboundReturnAmount ? item.inboundReturnAmount : 0) - (item.payment ? item.payment : 0)) != 0 ? ((item.purchaseAmount ? item.purchaseAmount : 0) + (item.inboundReturnAmount ? item.inboundReturnAmount : 0) - (item.payment ? item.payment : 0)) : 0 }}">
           </dk-cell>
         </view>
-        <view class="oreder-summary-detail">
-          欠款
+        <view class="oreder-summary-detail"> 
+          <text style="margin-right: 4px;"> 欠款</text>
+          <van-icon slot="label-icon" name="question-o" data-tip="计算公式:(采购订单-退货)-(供应商付款-供应商退款)" catchtap="showTip" />
         </view>
       </view>
     </view>