Quellcode durchsuchen

添加营销费用字段显示

xiaohaizhao vor 1 Jahr
Ursprung
Commit
22590e00fa

+ 7 - 1
packageA/contacts/detail.js

@@ -1,4 +1,9 @@
-const _Http = getApp().globalData.http;
+const _Http = getApp().globalData.http,
+    currency = require("../../utils/currency"),
+    CNY = (value, symbol = "¥", precision = 2) => currency(value, {
+        symbol,
+        precision
+    }).format();
 
 Page({
     data: {
@@ -60,6 +65,7 @@ Page({
                 title: res.msg,
                 icon: "none"
             })
+            res.data.showSalesfeesamount = CNY(res.data.salesfeesamount);
             this.setData({
                 detail: res.data
             })

+ 1 - 0
packageA/contacts/detail.wxml

@@ -14,6 +14,7 @@
     <view class="exp">分级:{{detail.grade||'--'}}</view>
     <view class="exp">群组:{{detail.groupname||'--'}}</view>
     <view class="exp">最近跟进时间:{{detail.followupdate||'--'}}</view>
+    <view class="exp">营销费用:{{detail.showSalesfeesamount||'--'}}</view>
     <Yl-group id='Group' wx:if="{{auth.isdatateam}}" slot='bottom' add='{{true}}' ownertable='sys_phonebook' ownerid='{{detail.sys_phonebookid}}' />
 </view>
 

+ 3 - 0
packageA/project/detail.js

@@ -214,6 +214,9 @@ Page({
             }, {
                 label: "状态",
                 value: data.status
+            }, {
+                label: '营销费用',
+                value: CNY(data.salesfeesamount || '0')
             }],
             list1,
             list2: [{

+ 9 - 1
packageA/publicCustomer/detail.js

@@ -1,4 +1,9 @@
-const _Http = getApp().globalData.http;
+const _Http = getApp().globalData.http,
+    currency = require("../../utils/currency"),
+    CNY = value => currency(value, {
+        symbol: "¥",
+        precision: 2
+    }).format();
 Page({
     data: {
         tabsActive: 0, //tabs 选中项
@@ -290,6 +295,9 @@ Page({
         }, {
             label: "上级企业",
             value: res.data.superiorenterprisename
+        }, {
+            label: '营销费用',
+            value: CNY(res.data.salesfeesamount || '0')
         }];
         /* 基本信息 */
         let list1 = [{

+ 3 - 0
packageA/saleClue/detail.js

@@ -177,6 +177,9 @@ Page({
                 }, {
                     label: '跟进次数',
                     value: res.data.followcount || '0'
+                }, {
+                    label: '营销费用',
+                    value: CNY(res.data.salesfeesamount || '0')
                 }],
                 list1,
                 list2: [{

+ 9 - 1
packageA/setclient/detail.js

@@ -1,4 +1,9 @@
-const _Http = getApp().globalData.http;
+const _Http = getApp().globalData.http,
+    currency = require("../../utils/currency"),
+    CNY = value => currency(value, {
+        symbol: "¥",
+        precision: 2
+    }).format();
 Page({
     data: {
         loading: true,
@@ -440,6 +445,9 @@ Page({
         }, {
             label: "归属经销商",
             value: res.data.agentname
+        }, {
+            label: '营销费用',
+            value: CNY(res.data.salesfeesamount || '0')
         }];
         /* 基本信息 */
         let list1 = [{