|
|
@@ -16,8 +16,8 @@ const _Http = getApp().globalData.http,
|
|
|
}
|
|
|
} else if (length <= 8) {
|
|
|
return { //万-千万
|
|
|
-
|
|
|
- show: CNY(currency(n).divide(wx.getStorageSync('languagecode')=='ZH' ? 10000 : 1000)).replace(regexp, '$1') + getApp().globalData.Language.getMapText('万元'),
|
|
|
+
|
|
|
+ show: CNY(currency(n).divide(wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000)).replace(regexp, '$1') + getApp().globalData.Language.getMapText('万元'),
|
|
|
value: CNY(n)
|
|
|
}
|
|
|
} else {
|
|
|
@@ -33,12 +33,14 @@ import {
|
|
|
createElement
|
|
|
} from '@antv/f2';
|
|
|
import Chart from './modules/chart';
|
|
|
+import barChart from './modules/barChart';
|
|
|
import {
|
|
|
jsx as _jsx
|
|
|
} from "@antv/f2/jsx-runtime";
|
|
|
Page({
|
|
|
data: {
|
|
|
onRenderChart: () => {},
|
|
|
+ onRenderBarChart: () => {},
|
|
|
showFiltrate: false,
|
|
|
"where": {
|
|
|
"begindate": "",
|
|
|
@@ -103,7 +105,13 @@ Page({
|
|
|
id: 4,
|
|
|
queryMonths: 3
|
|
|
}]
|
|
|
- }]
|
|
|
+ }],
|
|
|
+ firstTwelveMonths: {
|
|
|
+ dealaccuracyrate: '0%',
|
|
|
+ totaldealamount: 0,
|
|
|
+ totaldeviationamount: 0,
|
|
|
+ totalsignamount_due: 0
|
|
|
+ }
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
_Http.basic({
|
|
|
@@ -138,7 +146,7 @@ Page({
|
|
|
onReady() {
|
|
|
this.setChartData();
|
|
|
this.selectComponent("#organization").setData({
|
|
|
- isleave:1
|
|
|
+ isleave: 1
|
|
|
})
|
|
|
this.selectComponent("#organization").initDepAndUser();
|
|
|
// this.selectComponent("#Yl_Filtrate1").queryMonths(12)
|
|
|
@@ -160,7 +168,7 @@ Page({
|
|
|
}) {
|
|
|
if (detail.name == 'reset') {
|
|
|
this.selectComponent("#organization").setData({
|
|
|
- isleave:1
|
|
|
+ isleave: 1
|
|
|
})
|
|
|
this.selectComponent("#organization").initDepAndUser()
|
|
|
this.setData({
|
|
|
@@ -195,7 +203,8 @@ Page({
|
|
|
},
|
|
|
setChartData() {
|
|
|
this.setData({
|
|
|
- statistics: []
|
|
|
+ statistics: [],
|
|
|
+ comingYear: []
|
|
|
})
|
|
|
_Http.basic({
|
|
|
"id": 20230630151504,
|
|
|
@@ -232,10 +241,62 @@ Page({
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
+
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20241028162104,
|
|
|
+ "content": this.data.content
|
|
|
+ }).then(res => {
|
|
|
+ console.log("前12个月总数据", res)
|
|
|
+ if (res.code != '1') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ this.setData({
|
|
|
+ firstTwelveMonths: {
|
|
|
+ dealaccuracyrate: (res.data.dealaccuracyrate * 100).toFixed(2) + '%',
|
|
|
+ totaldealamount: (res.data.totaldealamount / (wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000)).toFixed(2),
|
|
|
+ totaldeviationamount: (res.data.totaldeviationamount / (wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000)).toFixed(2),
|
|
|
+ totalsignamount_due: (res.data.totalsignamount_due / (wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000)).toFixed(2),
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ //wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000)
|
|
|
+
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20241028162004,
|
|
|
+ "content": this.data.content
|
|
|
+ }).then(res => {
|
|
|
+ console.log("未来12月", res)
|
|
|
+ if (res.code != '1') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ this.setData({
|
|
|
+ comingYear: res.data.map(v => {
|
|
|
+ v.signamount_due = (v.signamount_due / (wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000)).toFixed(2) - 0
|
|
|
+ return v
|
|
|
+ }),
|
|
|
+ onRenderBarChart: res.data.length == 0 ? () => {} : () => {
|
|
|
+ return this.renderBarChart();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ console.log(this.data.comingYear)
|
|
|
+ })
|
|
|
},
|
|
|
renderChart() {
|
|
|
+ console.log("renderChart")
|
|
|
return createElement(Chart, {
|
|
|
data: this.data.statistics
|
|
|
});
|
|
|
+
|
|
|
+ },
|
|
|
+ renderBarChart() {
|
|
|
+ console.log("renderBarChart")
|
|
|
+ return createElement(barChart, {
|
|
|
+ data: this.data.comingYear
|
|
|
+ });
|
|
|
}
|
|
|
})
|