xiaohaizhao 11 месяцев назад
Родитель
Сommit
0f7443cc35

+ 9 - 2
project.private.config.json

@@ -11,12 +11,19 @@
         "miniprogram": {
             "list": [
                 {
-                    "name": "销售漏斗",
-                    "pathName": "salesPanel/salesHourglass/index",
+                    "name": "salesPanel/dataOverview/index",
+                    "pathName": "salesPanel/dataOverview/index",
                     "query": "",
                     "scene": null,
                     "launchMode": "default"
                 },
+                {
+                    "name": "销售漏斗",
+                    "pathName": "salesPanel/salesHourglass/index",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
                 {
                     "name": "packageA/salesHourglass/index",
                     "pathName": "packageA/salesHourglass/index",

+ 1 - 4
salesPanel/AnalysisOfUninvoicedShipments/index.js

@@ -90,7 +90,6 @@ Component({
             })
         },
         initChart(data) {
-            console.log(123)
             let dividend = wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000;
             let option = {
                 tooltip: {
@@ -115,11 +114,9 @@ Component({
                     data: data.map(v => getApp().globalData.Language.getMapText(v.key)),
                     inverse: true,
                     animationDuration: 300,
-                    animationDurationUpdate: 300,
-                    max: 3 // only the largest 3 bars will be displayed
+                    animationDurationUpdate: 300
                 },
                 series: [{
-                    realtimeSort: true,
                     name: getApp().globalData.Language.getMapText('出货未开票金额') + '(' + getApp().globalData.Language.getMapText('万元') + ')',
                     type: 'bar',
                     data: data.map(v => (v.value / dividend).toFixed(2)),

+ 1 - 1
salesPanel/GoodsDispatchedButInvoiceNotIssued/index.js

@@ -138,7 +138,7 @@ Component({
                         name: getMapText(v.name),
                         type: 'line',
                         stack: 'Total',
-                        data: data.map(obj => obj[v.key]),
+                        data: data.map(obj => (obj[v.key] / dividend).toFixed(2)),
                         itemStyle: {
                             color: v.color
                         },

+ 3 - 3
salesPanel/customerBlance/index.js

@@ -63,7 +63,7 @@ Component({
                 this.setData({
                     accounts: accounts.data.map(v => {
                         if (Math.abs(v.balance) > dividend) {
-                            v.balance = CNY(v.balance / wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000)
+                            v.balance = CNY(v.balance / (wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000))
                             v.conversion = true;
                         } else {
                             v.balance = CNY(v.balance)
@@ -91,7 +91,7 @@ Component({
                 this.setData({
                     accounts: res.data.accountclass.map(v => {
                         if (Math.abs(v.balance) > dividend) {
-                            v.balance = CNY(v.balance / wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000)
+                            v.balance = CNY(v.balance / (wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000))
                             v.conversion = true;
                         } else {
                             v.balance = CNY(v.balance)
@@ -102,7 +102,7 @@ Component({
                         return v
                     })
                 })
-
+                console.log("accounts", accounts)
                 this.initChart(res.data)
             })
         },

+ 0 - 4
salesPanel/dataOverview/Client/YXKHWGJTSFX.js

@@ -104,10 +104,6 @@ Component({
           title: res.data,
           icon: "none"
         })
-        res.data = res.data.map(v => {
-          v.signamount_due = CNY(v.signamount_due)
-          return v
-        })
         this.setData({
           list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
           "content.pageNumber": res.pageNumber + 1,

+ 141 - 0
salesPanel/dataOverview/Project/XMSMZQFX.js

@@ -0,0 +1,141 @@
+const _Http = getApp().globalData.http,
+    currency = require("../../../utils/currency"),
+    CNY = (value, symbol = "¥", precision = 2) => currency(value, {
+        symbol,
+        precision
+    }).format();
+import * as echarts from '../../ec-canvas/echarts';
+Component({
+    options: {
+        addGlobalClass: true
+    },
+    lifetimes: {
+        attached: function () {
+            getApp().globalData.Language.getLanguagePackage(this)
+            this.setData({
+                "content.dataid": wx.getStorageSync('userMsg').userid,
+                "content.username": wx.getStorageSync('userMsg').name,
+            })
+        }
+    },
+    data: {
+        "content": {
+            dateType: "15-30天",
+            dataType: "",
+            where: {
+                dateType: "15-30天",
+                type: "",
+                tradingstatus: "",
+                grade: "",
+            },
+            pageNumber: 1,
+            pageSize: 20,
+            pageTotal: 1
+        },
+        types: [],
+        grades: [],
+        tradingstatus: [{
+            remarks: '全部',
+            value: ''
+        }, {
+            remarks: '未成交',
+            value: '未成交'
+        }, {
+            remarks: '已成交',
+            value: '已成交'
+        }, {
+            remarks: '多次成交',
+            value: '多次成交'
+        }],
+    },
+    methods: {
+        async getList() {
+            if (this.data.grades.length == 0) {
+                _Http.basic({
+                    "classname": "sysmanage.develop.optiontype.optiontype",
+                    "method": "optiontypeselect",
+                    "content": {
+                        "pageNumber": 1,
+                        "pageSize": 1000,
+                        "typename": "agentgrade",
+                        "parameter": {}
+                    },
+                }).then(res => {
+                    console.log("客户分类", res)
+                    if (res.code == 1) {
+                        res.data.unshift({
+                            remarks: '全部',
+                            value: ''
+                        })
+                        this.setData({
+                            grades: res.data
+                        })
+                    }
+
+                })
+            }
+
+            let content = this.data.content
+            const {
+                dataid,
+                type,
+                username,
+                isleave
+            } = getCurrentPages()[getCurrentPages().length - 1].data;
+            content.dataid = dataid;
+            content.type = type;
+            content.username = username;
+            content.where.isleave = isleave;
+            console.log(12312312)
+            _Http.basic({
+                "id": 20231023092304,
+                content
+            }).then(res => {
+                console.log("项目生命周期分析", res)
+                if (res.code != '1') return wx.showToast({
+                    title: res.data,
+                    icon: "none"
+                })
+                this.setData({
+                    list: res.data.map(v => {
+                        v.bgColor = {
+                            "报备": "#3874F6",
+                            "报价": "#00B32B",
+                            "合同": "#FFAE02",
+                            "订单": "#F53F3F",
+                        } [v.end]
+                        return v
+                    })
+                })
+                try {
+                    this.selectAllComponents("#Filtrate").forEach(v => v.onCancel())
+                } catch (error) {}
+            })
+        },
+        changeType1({
+            detail
+        }) {
+            console.log(detail)
+            this.setData({
+                "content.where.tradingstatus": detail,
+            })
+            this.getList(true)
+        },
+        changeType2({
+            detail
+        }) {
+            this.setData({
+                "content.where.type": detail,
+            })
+            this.getList(true)
+        },
+        changeType3({
+            detail
+        }) {
+            this.setData({
+                "content.where.grade": detail,
+            })
+            this.getList(true)
+        },
+    }
+})

+ 4 - 0
salesPanel/dataOverview/Project/XMSMZQFX.json

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

+ 9 - 0
salesPanel/dataOverview/Project/XMSMZQFX.scss

@@ -0,0 +1,9 @@
+.chart {
+    height: 964rpx;
+    display: flex;
+    flex-direction: column;
+
+    .item {
+        width: 200rpx;
+    }
+}

+ 8 - 0
salesPanel/dataOverview/Project/XMSMZQFX.wxml

@@ -0,0 +1,8 @@
+<filtrate id='Filtrate' iconName='icon-kehuleixing' wx:if='{{types.length}}' list='{{types}}' type="{{content.where.type}}" title='客户类型' bind:onChange='changeType2' />
+<filtrate id='Filtrate' iconName='icon-kehudengji' wx:if='{{grades.length}}' list='{{grades}}' type="{{content.where.grade}}" title='客户等级' bind:onChange='changeType3' />
+<filtrate id='Filtrate' iconName='icon-chengjiaozhuangtai' list='{{tradingstatus}}' type="{{content.where.tradingstatus}}" title='成交状态' bind:onChange='changeType1' />
+<view class="global-card chart">
+	<view class="item" wx:for="{{list}}" wx:key="end" style="background-color: {{item.bgColor}}; flex: {{item.avg}};"></view>
+</view>
+<My_empty wx:if="{{list.length==0}}" />
+<view style="height: 100rpx;" />

+ 4 - 1
salesPanel/dataOverview/list/Project.js

@@ -52,7 +52,10 @@ Component({
         }, {
             label: "有效项目未跟进天数分析",
             model: "#YXXMWGJTSFX"
-        }],
+        }, {
+            label: "项目生命周期分析",
+            model: "#XMSMZQFX"
+        }]
     },
     methods: {
         getList() {

+ 2 - 1
salesPanel/dataOverview/list/Project.json

@@ -7,6 +7,7 @@
         "NewAnalysisAdded": "../Clue/NewAnalysisAdded",
         "followUpAnalysis": "../Clue/followUpAnalysis",
         "SituationAnalysis": "../Project/situationAnalysis",
-        "YXXMWGJTSFX": "../Project/YXXMWGJTSFX"
+        "YXXMWGJTSFX": "../Project/YXXMWGJTSFX",
+        "XMSMZQFX": "../Project/XMSMZQFX"
     }
 }

+ 1 - 0
salesPanel/dataOverview/list/Project.wxml

@@ -12,4 +12,5 @@
     <SituationAnalysis slot='项目关联客户情况统计' idname='20231019085504' id='RelatedCustomer' />
     <SituationAnalysis slot='项目评估情况统计' idname='20231019085604' id='ProjecEvaluation' />
     <YXXMWGJTSFX slot='有效项目未跟进天数分析' id='YXXMWGJTSFX' />
+    <XMSMZQFX slot='项目生命周期分析' id='XMSMZQFX' />
 </Yl_FunTabs>

+ 1 - 1
salesPanel/top10/index.wxml

@@ -1,4 +1,4 @@
-<van-tabs color='#3874F6' active="{{ active }}" tab-class='tab-class' tab-active-class='tab-class' bind:change="tabsOnChange">
+<van-tabs color='#3874F6' wx:if="{{list.length}}" active="{{ active }}" tab-class='tab-class' tab-active-class='tab-class' bind:change="tabsOnChange">
 	<van-tab title="{{(language['客户销售']||'客户销售')+'TOP10'}}" name='20231010133804' />
 	<van-tab title="{{(language['业务员销售']||'业务员销售')+'TOP10'}}" name='20231011111504' />
 </van-tabs>