|
@@ -21,9 +21,9 @@
|
|
|
<u-line color="#EEEEEE" />
|
|
|
<view class="row1 mtb40">
|
|
|
<view class="left">
|
|
|
- 2022.06
|
|
|
+ {{ym1}}
|
|
|
</view>
|
|
|
- <view class="right">
|
|
|
+ <view class="right" v-if="index!=2">
|
|
|
<text class="text" :class="textIndex==1?'text-active':''" @click="accounting(1)">
|
|
|
按月
|
|
|
</text>
|
|
@@ -35,7 +35,7 @@
|
|
|
收入(元)
|
|
|
</view>
|
|
|
<view class="price">
|
|
|
- 73923475.30
|
|
|
+ {{sr}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="row3">
|
|
@@ -44,7 +44,7 @@
|
|
|
支出(元)
|
|
|
</view>
|
|
|
<view class="number">
|
|
|
- 676234.42
|
|
|
+ {{zc}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="center">
|
|
@@ -55,12 +55,13 @@
|
|
|
差额(元)
|
|
|
</view>
|
|
|
<view class="number">
|
|
|
- 676234.42
|
|
|
+ {{sr-zc}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="row4">
|
|
|
- <qiun-data-charts type="area" :opts="opts" :chartData="chartData" :ontouch="true" />
|
|
|
+ <qiun-data-charts type="area" :opts="opts" :chartData="chartData" :ontouch="true"
|
|
|
+ @getIndex="getIndex" />
|
|
|
</view>
|
|
|
</uni-transition>
|
|
|
|
|
@@ -104,17 +105,23 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="row5">
|
|
|
- <view class="left">
|
|
|
- <u-icon name="arrow-left" size="26" style="margin-right: 10rpx;" color="#969696"
|
|
|
- @click="yearClick('1')">
|
|
|
- </u-icon>
|
|
|
- <text @click="showYear=true">{{year}}</text>
|
|
|
- <u-icon name="arrow-right" size="26" style="margin-left: 10rpx;"
|
|
|
- :color="nowYear!=year?'#969696':'#DBDBDB'" @click="yearClick('2')" v-if="nowYear!=year">
|
|
|
- </u-icon>
|
|
|
- <u-icon name="arrow-right" size="26" style="margin-left: 10rpx;"
|
|
|
- :color="nowYear!=year?'#969696':'#DBDBDB'" v-if="nowYear==year">
|
|
|
- </u-icon>
|
|
|
+ <view class="left flex">
|
|
|
+ <view class="" v-if="index==1">
|
|
|
+ <u-icon name="arrow-left" size="26" style="margin-right: 10rpx;" color="#969696"
|
|
|
+ @click="yearClick('1')">
|
|
|
+ </u-icon>
|
|
|
+ <text @click="showYear=true">{{year}}</text>
|
|
|
+ <u-icon name="arrow-right" size="26" style="margin-left: 10rpx;"
|
|
|
+ :color="nowYear!=year?'#969696':'#DBDBDB'" @click="yearClick('2')" v-if="nowYear!=year">
|
|
|
+ </u-icon>
|
|
|
+ <u-icon name="arrow-right" size="26" style="margin-left: 10rpx;"
|
|
|
+ :color="nowYear!=year?'#969696':'#DBDBDB'" v-if="nowYear==year">
|
|
|
+ </u-icon>
|
|
|
+ </view>
|
|
|
+ <view class="" v-else>
|
|
|
+ 新季利润
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
单位:元
|
|
@@ -132,7 +139,7 @@
|
|
|
@click="foldClcik(['fade', 'slide-top'],3)">
|
|
|
</u-icon>
|
|
|
</view>
|
|
|
- <view @click='godetail(2)' class="right-btn">
|
|
|
+ <view @click='godetail(2)' class="right-btn">
|
|
|
库存明细
|
|
|
</view>
|
|
|
</view>
|
|
@@ -182,7 +189,7 @@
|
|
|
{{item.name}}
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- {{item.number}}
|
|
|
+ {{Number(item.result).toFixed(0)}}
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -217,7 +224,8 @@
|
|
|
<uni-transition ref="ani" custom-class="transition" :mode-class="modeClass" :styles="styles"
|
|
|
:show="isSHowContent5">
|
|
|
<view class="row1 days-nav">
|
|
|
- <view class="" v-for="(item, index) in dayList">
|
|
|
+ <view class="item" :class="carIndex==index?'item-active':''" v-for="(item, index) in dayList"
|
|
|
+ @click="clickNav(index)">
|
|
|
{{item}}
|
|
|
</view>
|
|
|
</view>
|
|
@@ -238,7 +246,7 @@
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
<text>合计:</text>
|
|
|
- <text style="color: #EC6666;">23444</text>
|
|
|
+ <text style="color: #EC6666;">{{appTotal}}</text>
|
|
|
<text>人</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -252,7 +260,7 @@
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
<text>合计:</text>
|
|
|
- <text style="color: #22C572;">23444</text>
|
|
|
+ <text style="color: #22C572;">{{lmTotal}}</text>
|
|
|
<text>人</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -266,13 +274,18 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import maoScroll from '@/components/mao-scroll/mao-scroll.vue';
|
|
|
export default {
|
|
|
- components: {
|
|
|
- maoScroll
|
|
|
- },
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
+ carIndex: 0,
|
|
|
+ appTotal: '',
|
|
|
+ lmTotal: '',
|
|
|
+ ym1: '',
|
|
|
+ sr: '',
|
|
|
+ zc: '',
|
|
|
+ seachYear: '',
|
|
|
+ seachMoth: '',
|
|
|
dayList: ['1天', '7天', '30天'],
|
|
|
averageCostList: [{
|
|
|
name: '玉米',
|
|
@@ -331,10 +344,10 @@
|
|
|
iconName6: 'arrow-up-fill',
|
|
|
styles: {},
|
|
|
modeClass: 'fade',
|
|
|
- isSHowContent1: false,
|
|
|
- isSHowContent2: false,
|
|
|
- isSHowContent3: false,
|
|
|
- isSHowContent4: false,
|
|
|
+ isSHowContent1: true,
|
|
|
+ isSHowContent2: true,
|
|
|
+ isSHowContent3: true,
|
|
|
+ isSHowContent4: true,
|
|
|
isSHowContent5: true,
|
|
|
isSHowContent6: true,
|
|
|
chartData: {},
|
|
@@ -378,7 +391,9 @@
|
|
|
opts2: {
|
|
|
color: ["#D2F3E2", "#22C572"],
|
|
|
padding: [15, 30, 0, 5],
|
|
|
- legend: {},
|
|
|
+ legend: {
|
|
|
+ fontSize: 12,
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
boundaryGap: "justify",
|
|
|
disableGrid: false,
|
|
@@ -432,6 +447,9 @@
|
|
|
}
|
|
|
},
|
|
|
opts4: {
|
|
|
+ color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
|
|
|
+ "#ea7ccc"
|
|
|
+ ],
|
|
|
padding: [15, 30, 0, 5],
|
|
|
legend: {
|
|
|
show: false,
|
|
@@ -545,11 +563,11 @@
|
|
|
}
|
|
|
},
|
|
|
opts8: {
|
|
|
- color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
|
|
|
- "#ea7ccc"
|
|
|
- ],
|
|
|
+ color: ["#EC6666"],
|
|
|
padding: [15, 15, 0, 15],
|
|
|
- legend: {},
|
|
|
+ legend: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
disableGrid: true
|
|
|
},
|
|
@@ -568,11 +586,11 @@
|
|
|
}
|
|
|
},
|
|
|
opts9: {
|
|
|
- color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
|
|
|
- "#ea7ccc"
|
|
|
- ],
|
|
|
+ color: ["#22C572"],
|
|
|
padding: [15, 15, 0, 15],
|
|
|
- legend: {},
|
|
|
+ legend: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
disableGrid: true
|
|
|
},
|
|
@@ -613,6 +631,25 @@
|
|
|
this.getServerData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ clickNav(index) {
|
|
|
+ this.carIndex = index
|
|
|
+ let _data = ""
|
|
|
+ if (index == 0) {
|
|
|
+ _data = 1
|
|
|
+ } else if (index == 1) {
|
|
|
+ _data = 7
|
|
|
+ } else {
|
|
|
+ _data = 30
|
|
|
+ }
|
|
|
+ this.$api.doRequest('get', '/biInfoController/getTranCountWai', {
|
|
|
+ seachMoth: _data,
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res.data)
|
|
|
+ this.selectMakeDate7(res.data.data[0])
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
yearClick(type) {
|
|
|
|
|
|
if (type == 1) {
|
|
@@ -620,25 +657,35 @@
|
|
|
} else {
|
|
|
this.year++
|
|
|
}
|
|
|
+ this.$api.doRequest('get', '/biInfoController/profitAccount', {
|
|
|
+ compId: uni.getStorageSync('pcUserInfo').compId,
|
|
|
+ seachYear: this.year,
|
|
|
+ // biViewInfoList: {weight:''}
|
|
|
+ }).then(res => {
|
|
|
+ console.log("例如切换", res)
|
|
|
+ this.makeDate3(res.data[0])
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
- godetail(status){
|
|
|
- var url=''
|
|
|
+ godetail(status) {
|
|
|
+ var url = ''
|
|
|
switch (status) {
|
|
|
case 0:
|
|
|
- url='/pages/dataReport/contractdetails/contractdetails'
|
|
|
+ url = '/pages/dataReport/contractdetails/contractdetails'
|
|
|
break;
|
|
|
case 1:
|
|
|
- url='/pages/dataReport/breakdownofprofit'
|
|
|
+ url = '/pages/dataReport/breakdownofprofit'
|
|
|
break;
|
|
|
case 2:
|
|
|
- url='/pages/dataReport/costbreakdown'
|
|
|
+ url = '/pages/dataReport/costbreakdown'
|
|
|
break;
|
|
|
case 3:
|
|
|
- url='/pages/dataReport/Inventoryentrydetails'
|
|
|
+ url = '/pages/dataReport/Inventoryentrydetails'
|
|
|
break;
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
- url:url
|
|
|
+ url: url
|
|
|
})
|
|
|
},
|
|
|
foldClcik(type, index) {
|
|
@@ -674,175 +721,454 @@
|
|
|
|
|
|
this.modeClass = type
|
|
|
},
|
|
|
+ getIndex(e) {
|
|
|
+ console.log(e)
|
|
|
+ // 点击图表
|
|
|
+ if (this.textIndex == 1) {
|
|
|
+ this.ym1 = this.chartList[0].biViewInfoList[e.currentIndex.index].name
|
|
|
+ this.sr = this.chartList[0].biViewInfoList[e.currentIndex.index].weight
|
|
|
+ this.zc = this.chartList[2].biViewInfoList[e.currentIndex.index].weight
|
|
|
+ } else {
|
|
|
+ this.ym1 = this.chartList[1].biViewInfoList[e.currentIndex.index].name
|
|
|
+ this.sr = this.chartList[1].biViewInfoList[e.currentIndex.index].weight
|
|
|
+ this.zc = this.chartList[3].biViewInfoList[e.currentIndex.index].weight
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ makeDate1(val) {
|
|
|
+ console.log("val", val)
|
|
|
+ // 按月1
|
|
|
+ let _categories = []
|
|
|
+ let _price1 = []
|
|
|
+ let _price2 = []
|
|
|
+ if (this.textIndex == 1) {
|
|
|
+ this.ym1 = val[0].biViewInfoList[val[0].biViewInfoList.length - 1].name
|
|
|
+ this.sr = val[0].biViewInfoList[val[0].biViewInfoList.length - 1].weight
|
|
|
+ this.zc = val[2].biViewInfoList[val[2].biViewInfoList.length - 1].weight
|
|
|
+
|
|
|
+ for (let i = 0; i < val[0].biViewInfoList.length; i++) {
|
|
|
+ _categories.push(val[0].biViewInfoList[i].name)
|
|
|
+ _price1.push(val[0].biViewInfoList[i].weight)
|
|
|
+ }
|
|
|
+ for (let i = 0; i < val[2].biViewInfoList.length; i++) {
|
|
|
+ _price2.push(val[2].biViewInfoList[i].weight)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.ym1 = val[1].biViewInfoList[val[1].biViewInfoList.length - 1].name
|
|
|
+ this.sr = val[1].biViewInfoList[val[1].biViewInfoList.length - 1].weight
|
|
|
+ this.zc = val[3].biViewInfoList[val[3].biViewInfoList.length - 1].weight
|
|
|
+ for (let i = 0; i < val[1].biViewInfoList.length; i++) {
|
|
|
+ _categories.push(val[1].biViewInfoList[i].name)
|
|
|
+ _price1.push(val[1].biViewInfoList[i].weight)
|
|
|
+ }
|
|
|
+ for (let i = 0; i < val[3].biViewInfoList.length; i++) {
|
|
|
+ _price2.push(val[3].biViewInfoList[i].weight)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ let res = {
|
|
|
+ categories: _categories,
|
|
|
+ series: [{
|
|
|
+ name: "收入",
|
|
|
+ data: _price1
|
|
|
+ }, {
|
|
|
+ name: "支出",
|
|
|
+ data: _price2
|
|
|
+ }
|
|
|
+
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ this.chartData = JSON.parse(JSON.stringify(res));
|
|
|
+ },
|
|
|
+ makeDate2(val) {
|
|
|
+ let _categories = []
|
|
|
+ let _count1 = []
|
|
|
+ let _count2 = []
|
|
|
+ for (let i = 0; i < val[4].biViewInfoList.length; i++) {
|
|
|
+ _categories.push(val[4].biViewInfoList[i].name)
|
|
|
+ _count1.push(val[4].biViewInfoList[i].weight)
|
|
|
+ _count2.push(val[4].biViewInfoList[i].count ? val[4].biViewInfoList[i].count : 0)
|
|
|
+ }
|
|
|
+ // for (let i = 0; i < val[5].biViewInfoList.length; i++) {
|
|
|
+ // _count2.push(val[5].biViewInfoList[i].weight)
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ let res1 = {
|
|
|
+ categories: _categories,
|
|
|
+ series: [{
|
|
|
+ name: this.index == 1 ? '过去12个月累计签订数量' : '本季累计签订合同数量',
|
|
|
+ data: _count1,
|
|
|
+ legendShape: "circle",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: this.index == 1 ? '当前执行中数量' : '本季执行中数量',
|
|
|
+ data: _count2,
|
|
|
+ legendShape: "circle"
|
|
|
+ }
|
|
|
+
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ this.chartData1 = JSON.parse(JSON.stringify(res1));
|
|
|
+ },
|
|
|
+ makeDate3(val) {
|
|
|
+ let _categorieslr = []
|
|
|
+ let _countlr = []
|
|
|
+ for (let i = 0; i < val[5].biViewInfoList.length; i++) {
|
|
|
+ _categorieslr.push(val[5].biViewInfoList[i].name)
|
|
|
+ _countlr.push(val[5].biViewInfoList[i].weight ? val[5].biViewInfoList[i].weight : 0)
|
|
|
+ }
|
|
|
+ //利润核算
|
|
|
+ let res3 = {
|
|
|
+ categories: _categorieslr,
|
|
|
+ series: [{
|
|
|
+ name: "利润金额",
|
|
|
+ data: _countlr
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ this.chartData3 = JSON.parse(JSON.stringify(res3));
|
|
|
+ },
|
|
|
+ makeDate4(val) {
|
|
|
+
|
|
|
+ let _categorieslr = []
|
|
|
+ let _countlr = []
|
|
|
+ for (let i = 0; i < val[8].biViewInfoList.length; i++) {
|
|
|
+ _categorieslr.push(val[8].biViewInfoList[i].name)
|
|
|
+ _countlr.push(Number(val[8].biViewInfoList[i].weight).toFixed(0) ? Number(val[8].biViewInfoList[i]
|
|
|
+ .weight).toFixed(0) : 0)
|
|
|
+ }
|
|
|
+ let res4 = {
|
|
|
+ categories: _categorieslr,
|
|
|
+ series: [{
|
|
|
+ name: '库存储量',
|
|
|
+ data: _countlr
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ this.chartData4 = JSON.parse(JSON.stringify(res4));
|
|
|
+ let _tc = Number(val[6].biViewInfoList[0].count) + Number(val[6].biViewInfoList[1].count) - Number(
|
|
|
+ val[6].biViewInfoList[2].count)
|
|
|
+ this.InventoryList = [{
|
|
|
+ name: '合计储量',
|
|
|
+ number: Number(val[6].biViewInfoList[0].count).toFixed(3),
|
|
|
+ src: '../../static/img/cl.png'
|
|
|
+ }, {
|
|
|
+ name: '采购待执行',
|
|
|
+ number: Number(val[6].biViewInfoList[1].count).toFixed(3),
|
|
|
+ src: '../../static/img/cg.png'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '销待执行售',
|
|
|
+ number: Number(val[6].biViewInfoList[2].count).toFixed(3),
|
|
|
+ src: '../../static/img/xs.png'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '头寸',
|
|
|
+ number: _tc,
|
|
|
+ src: '../../static/img/tc.png'
|
|
|
+ },
|
|
|
+
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ makeDate5(val) {
|
|
|
+ let _categorieslr = []
|
|
|
+ let _count = []
|
|
|
+ for (let i = 0; i < val[7].biViewInfoList.length; i++) {
|
|
|
+ _categorieslr.push(val[7].biViewInfoList[i].name)
|
|
|
+ _count.push(val[7].biViewInfoList[i].count ? val[7].biViewInfoList[i].count : 0)
|
|
|
+ }
|
|
|
+ let res5 = {
|
|
|
+ categories: _categorieslr,
|
|
|
+ series: [{
|
|
|
+ name: "利润金额",
|
|
|
+ data: _count
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ this.chartData5 = JSON.parse(JSON.stringify(res5));
|
|
|
+
|
|
|
+ this.averageCostList = val[9].biViewInfoList
|
|
|
+ },
|
|
|
+ makeDate6(val) {
|
|
|
+ let _data = []
|
|
|
+ for (let i = 0; i < val[10].biViewInfoList.length; i++) {
|
|
|
+ let _obj = {
|
|
|
+ name: val[10].biViewInfoList[i].name,
|
|
|
+ value: val[10].biViewInfoList[i].weight
|
|
|
+ }
|
|
|
+ _data.push(_obj)
|
|
|
+ }
|
|
|
+ let res6 = {
|
|
|
+ series: [{
|
|
|
+ data: _data
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ this.chartData6 = JSON.parse(JSON.stringify(res6));
|
|
|
+ },
|
|
|
+ selectMakeDate7(val) {
|
|
|
+ console.log(11)
|
|
|
+ console.log(val)
|
|
|
+ let _data = []
|
|
|
+ for (let i = 0; i < val.biViewInfoList.length; i++) {
|
|
|
+ let _obj = {
|
|
|
+ name: val.biViewInfoList[i].name,
|
|
|
+ value: Number(val.biViewInfoList[i].count)
|
|
|
+ }
|
|
|
+ _data.push(_obj)
|
|
|
+ }
|
|
|
+ console.log(_data)
|
|
|
+ let res7 = {
|
|
|
+ series: [{
|
|
|
+ data: _data
|
|
|
+ }]
|
|
|
+ };
|
|
|
+
|
|
|
+ this.$forceUpdate()
|
|
|
+ this.chartData7 = JSON.parse(JSON.stringify(res7));
|
|
|
+ },
|
|
|
+ makeDate7(val) {
|
|
|
+ let _data = []
|
|
|
+ for (let i = 0; i < val[11].biViewInfoList.length; i++) {
|
|
|
+ let _obj = {
|
|
|
+ name: val[11].biViewInfoList[i].name,
|
|
|
+ value: Number(val[11].biViewInfoList[i].count)
|
|
|
+ }
|
|
|
+ _data.push(_obj)
|
|
|
+ }
|
|
|
+ console.log(_data)
|
|
|
+ let res7 = {
|
|
|
+ series: [{
|
|
|
+ data: _data
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ this.chartData7 = JSON.parse(JSON.stringify(res7));
|
|
|
+ },
|
|
|
+ makeDate8(val) {
|
|
|
+ let _categories = []
|
|
|
+ let _data = []
|
|
|
+ let _categories1 = []
|
|
|
+ let _data1 = []
|
|
|
+ this.appTotal = val[12].count
|
|
|
+ this.lmTotal = val[13].count
|
|
|
+ for (let i = 0; i < val[12].biViewInfoList.length; i++) {
|
|
|
+ _categories.push(val[12].biViewInfoList[i].name)
|
|
|
+ _data.push(val[12].biViewInfoList[i].weight)
|
|
|
+ }
|
|
|
+ for (let i = 0; i < val[13].biViewInfoList.length; i++) {
|
|
|
+ _categories1.push(val[13].biViewInfoList[i].name)
|
|
|
+ _data1.push(val[12].biViewInfoList[i].weight)
|
|
|
+ }
|
|
|
+ let res8 = {
|
|
|
+ categories: _categories,
|
|
|
+ series: [{
|
|
|
+ name: "成交量A",
|
|
|
+ data: _data
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ let res9 = {
|
|
|
+ categories: _categories1,
|
|
|
+ series: [{
|
|
|
+ name: "成交量A",
|
|
|
+ data: _data1
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ this.chartData8 = JSON.parse(JSON.stringify(res8))
|
|
|
+ this.chartData9 = JSON.parse(JSON.stringify(res9))
|
|
|
+ },
|
|
|
getServerData() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
+ this.$api.doRequest('get', '/biInfoController/selectPhoneBiInfo?compId=' + uni.getStorageSync(
|
|
|
+ 'pcUserInfo')
|
|
|
+ .compId + '&seachMoth=' + this.seachMoth + '&seachYear=' + this.seachYear).then(
|
|
|
+ res => {
|
|
|
+ console.log("数据报表", res)
|
|
|
+
|
|
|
+ this.chartList = res.data.data
|
|
|
+ // 收支核算数据处理
|
|
|
+ this.makeDate1(res.data.data)
|
|
|
+ //合同数据
|
|
|
+ this.makeDate2(res.data.data)
|
|
|
+ //利润核算
|
|
|
+ this.makeDate3(res.data.data)
|
|
|
+ //库存储量
|
|
|
+ this.makeDate4(res.data.data)
|
|
|
+ //档期货值
|
|
|
+ this.makeDate5(res.data.data)
|
|
|
+ //今日入库
|
|
|
+ this.makeDate6(res.data.data)
|
|
|
+ //在途数据
|
|
|
+ this.makeDate7(res.data.data)
|
|
|
+ //APP注册
|
|
|
+ this.makeDate8(res.data.data)
|
|
|
+ uni.hideLoading()
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
//模拟从服务器获取数据时的延时
|
|
|
setTimeout(() => {
|
|
|
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
|
|
- let res = {
|
|
|
- categories: ["2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"],
|
|
|
- series: [{
|
|
|
- name: "收入",
|
|
|
- data: [70, 40, 65, 100, 44, 68, 90, 240]
|
|
|
- }, {
|
|
|
- name: "支出",
|
|
|
- data: [35, 8, 25, 37, 4, 20, 56, 30]
|
|
|
- }
|
|
|
-
|
|
|
- ]
|
|
|
- };
|
|
|
- this.chartData = JSON.parse(JSON.stringify(res));
|
|
|
- let res1 = {
|
|
|
- categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
|
|
|
- series: [{
|
|
|
- name: this.index == 1 ? '过去12个月累计签订数量' : '本季累计签订合同数量',
|
|
|
- data: [35, 36, 31, 33, 13, 34],
|
|
|
- legendShape: "circle",
|
|
|
- },
|
|
|
- {
|
|
|
- name: this.index == 1 ? '当前执行中数量' : '本季执行中数量',
|
|
|
- data: [18, 27, 21, 24, 6, 28],
|
|
|
- legendShape: "circle"
|
|
|
- }
|
|
|
-
|
|
|
- ]
|
|
|
- };
|
|
|
- this.chartData1 = JSON.parse(JSON.stringify(res1));
|
|
|
- let res3 = {
|
|
|
- categories: ["销售", "采购", "收购", "代收", "代储"],
|
|
|
- series: [{
|
|
|
- name: "利润金额",
|
|
|
- data: [35, 36, 31, 33, 13]
|
|
|
- }]
|
|
|
- };
|
|
|
- this.chartData3 = JSON.parse(JSON.stringify(res3));
|
|
|
- let res4 = {
|
|
|
- categories: ["小麦", "高粱(潮粮)", "高粱", "玉米(潮粮)", "玉米"],
|
|
|
- series: [{
|
|
|
- name: '库存储量',
|
|
|
- data: [{
|
|
|
- value: 35,
|
|
|
- color: "#FFBB6E"
|
|
|
- },
|
|
|
- {
|
|
|
- value: 36,
|
|
|
- color: "#8D9EE9"
|
|
|
- }, {
|
|
|
- value: 31,
|
|
|
- color: "#FF8B95"
|
|
|
- }, {
|
|
|
- value: 33,
|
|
|
- color: "#38CA80"
|
|
|
- },
|
|
|
- {
|
|
|
- value: 13,
|
|
|
- color: "#FFDD85"
|
|
|
- }
|
|
|
- ]
|
|
|
- }]
|
|
|
- };
|
|
|
- this.chartData4 = JSON.parse(JSON.stringify(res4));
|
|
|
- let res5 = {
|
|
|
- categories: ["小麦", "高粱(潮粮)", "高粱", "玉米(潮粮)", "玉米"],
|
|
|
- series: [{
|
|
|
- name: "利润金额",
|
|
|
- data: [{
|
|
|
- value: 35,
|
|
|
- color: "#FFBB6E"
|
|
|
- },
|
|
|
- {
|
|
|
- value: 36,
|
|
|
- color: "#8D9EE9"
|
|
|
- }, {
|
|
|
- value: 31,
|
|
|
- color: "#FF8B95"
|
|
|
- }, {
|
|
|
- value: 33,
|
|
|
- color: "#38CA80"
|
|
|
- },
|
|
|
- {
|
|
|
- value: 13,
|
|
|
- color: "#FFDD85"
|
|
|
- }
|
|
|
- ]
|
|
|
- }]
|
|
|
- };
|
|
|
- this.chartData5 = JSON.parse(JSON.stringify(res5));
|
|
|
- let res6 = {
|
|
|
- series: [{
|
|
|
- data: [{
|
|
|
- "name": "一班",
|
|
|
- "value": 50
|
|
|
- }, {
|
|
|
- "name": "二班",
|
|
|
- "value": 30
|
|
|
- }, {
|
|
|
- "name": "三班",
|
|
|
- "value": 20
|
|
|
- }, {
|
|
|
- "name": "四班",
|
|
|
- "value": 18
|
|
|
- }, {
|
|
|
- "name": "五班",
|
|
|
- "value": 8
|
|
|
- }]
|
|
|
- }]
|
|
|
- };
|
|
|
- this.chartData6 = JSON.parse(JSON.stringify(res6));
|
|
|
- let res7 = {
|
|
|
- series: [{
|
|
|
- data: [{
|
|
|
- "name": "一班",
|
|
|
- "value": 50
|
|
|
- }, {
|
|
|
- "name": "二班",
|
|
|
- "value": 30
|
|
|
- }, {
|
|
|
- "name": "三班",
|
|
|
- "value": 20
|
|
|
- }, {
|
|
|
- "name": "四班",
|
|
|
- "value": 18
|
|
|
- }, {
|
|
|
- "name": "五班",
|
|
|
- "value": 8
|
|
|
- }]
|
|
|
- }]
|
|
|
- };
|
|
|
- this.chartData7 = JSON.parse(JSON.stringify(res7));
|
|
|
- let res8 = {
|
|
|
- categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
|
|
|
- series: [{
|
|
|
- name: "成交量A",
|
|
|
- data: [35, 8, 25, 37, 4, 20]
|
|
|
- },
|
|
|
- {
|
|
|
- name: "成交量B",
|
|
|
- data: [70, 40, 65, 100, 44, 68]
|
|
|
- },
|
|
|
- {
|
|
|
- name: "成交量C",
|
|
|
- data: [100, 80, 95, 150, 112, 132]
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- this.chartData8 = JSON.parse(JSON.stringify(res8));
|
|
|
- let res9 = {
|
|
|
- categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
|
|
|
- series: [{
|
|
|
- name: "成交量A",
|
|
|
- data: [35, 8, 25, 37, 4, 20]
|
|
|
- },
|
|
|
- {
|
|
|
- name: "成交量B",
|
|
|
- data: [70, 40, 65, 100, 44, 68]
|
|
|
- },
|
|
|
- {
|
|
|
- name: "成交量C",
|
|
|
- data: [100, 80, 95, 150, 112, 132]
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- this.chartData9 = JSON.parse(JSON.stringify(res9));
|
|
|
+ // let res = {
|
|
|
+ // categories: ["2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"],
|
|
|
+ // series: [{
|
|
|
+ // name: "收入",
|
|
|
+ // data: [70, 40, 65, 100, 44, 68, 90, 240]
|
|
|
+ // }, {
|
|
|
+ // name: "支出",
|
|
|
+ // data: [35, 8, 25, 37, 4, 20, 56, 30]
|
|
|
+ // }
|
|
|
+
|
|
|
+ // ]
|
|
|
+ // };
|
|
|
+ // this.chartData = JSON.parse(JSON.stringify(res));
|
|
|
+ // let res1 = {
|
|
|
+ // categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
|
|
|
+ // series: [{
|
|
|
+ // name: this.index == 1 ? '过去12个月累计签订数量' : '本季累计签订合同数量',
|
|
|
+ // data: [35, 36, 31, 33, 13, 34],
|
|
|
+ // legendShape: "circle",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: this.index == 1 ? '当前执行中数量' : '本季执行中数量',
|
|
|
+ // data: [18, 27, 21, 24, 6, 28],
|
|
|
+ // legendShape: "circle"
|
|
|
+ // }
|
|
|
+
|
|
|
+ // ]
|
|
|
+ // };
|
|
|
+ // this.chartData1 = JSON.parse(JSON.stringify(res1));
|
|
|
+ // let res3 = {
|
|
|
+ // categories: ["销售", "采购", "收购", "代收", "代储"],
|
|
|
+ // series: [{
|
|
|
+ // name: "利润金额",
|
|
|
+ // data: [35, 36, 31, 33, 13]
|
|
|
+ // }]
|
|
|
+ // };
|
|
|
+ // this.chartData3 = JSON.parse(JSON.stringify(res3));
|
|
|
+ // let res4 = {
|
|
|
+ // categories: ["小麦", "高粱(潮粮)", "高粱", "玉米(潮粮)", "玉米"],
|
|
|
+ // series: [{
|
|
|
+ // name: '库存储量',
|
|
|
+ // data: [{
|
|
|
+ // value: 35,
|
|
|
+ // color: "#FFBB6E"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 36,
|
|
|
+ // color: "#8D9EE9"
|
|
|
+ // }, {
|
|
|
+ // value: 31,
|
|
|
+ // color: "#FF8B95"
|
|
|
+ // }, {
|
|
|
+ // value: 33,
|
|
|
+ // color: "#38CA80"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 13,
|
|
|
+ // color: "#FFDD85"
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // }]
|
|
|
+ // };
|
|
|
+ // this.chartData4 = JSON.parse(JSON.stringify(res4));
|
|
|
+ // let res5 = {
|
|
|
+ // categories: ["小麦", "高粱(潮粮)", "高粱", "玉米(潮粮)", "玉米"],
|
|
|
+ // series: [{
|
|
|
+ // name: "利润金额",
|
|
|
+ // data: [{
|
|
|
+ // value: 35,
|
|
|
+ // color: "#FFBB6E"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 36,
|
|
|
+ // color: "#8D9EE9"
|
|
|
+ // }, {
|
|
|
+ // value: 31,
|
|
|
+ // color: "#FF8B95"
|
|
|
+ // }, {
|
|
|
+ // value: 33,
|
|
|
+ // color: "#38CA80"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // value: 13,
|
|
|
+ // color: "#FFDD85"
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // }]
|
|
|
+ // };
|
|
|
+ // this.chartData5 = JSON.parse(JSON.stringify(res5));
|
|
|
+ // let res6 = {
|
|
|
+ // series: [{
|
|
|
+ // data: [{
|
|
|
+ // "name": "一班",
|
|
|
+ // "value": 50
|
|
|
+ // }, {
|
|
|
+ // "name": "二班",
|
|
|
+ // "value": 30
|
|
|
+ // }, {
|
|
|
+ // "name": "三班",
|
|
|
+ // "value": 20
|
|
|
+ // }, {
|
|
|
+ // "name": "四班",
|
|
|
+ // "value": 18
|
|
|
+ // }, {
|
|
|
+ // "name": "五班",
|
|
|
+ // "value": 8
|
|
|
+ // }]
|
|
|
+ // }]
|
|
|
+ // };
|
|
|
+ // this.chartData6 = JSON.parse(JSON.stringify(res6));
|
|
|
+ // let res7 = {
|
|
|
+ // series: [{
|
|
|
+ // data: [{
|
|
|
+ // "name": "一班",
|
|
|
+ // "value": 50
|
|
|
+ // }, {
|
|
|
+ // "name": "二班",
|
|
|
+ // "value": 30
|
|
|
+ // }, {
|
|
|
+ // "name": "三班",
|
|
|
+ // "value": 20
|
|
|
+ // }, {
|
|
|
+ // "name": "四班",
|
|
|
+ // "value": 18
|
|
|
+ // }, {
|
|
|
+ // "name": "五班",
|
|
|
+ // "value": 8
|
|
|
+ // }]
|
|
|
+ // }]
|
|
|
+ // };
|
|
|
+ // this.chartData7 = JSON.parse(JSON.stringify(res7));
|
|
|
+ // let res8 = {
|
|
|
+ // categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
|
|
|
+ // series: [{
|
|
|
+ // name: "成交量A",
|
|
|
+ // data: [35, 8, 25, 37, 4, 20]
|
|
|
+ // }
|
|
|
+
|
|
|
+ // ]
|
|
|
+ // };
|
|
|
+ // this.chartData8 = JSON.parse(JSON.stringify(res8));
|
|
|
+ // let res9 = {
|
|
|
+ // categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
|
|
|
+ // series: [{
|
|
|
+ // name: "成交量A",
|
|
|
+ // data: [35, 8, 25, 37, 4, 20]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: "成交量B",
|
|
|
+ // data: [70, 40, 65, 100, 44, 68]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: "成交量C",
|
|
|
+ // data: [100, 80, 95, 150, 112, 132]
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // };
|
|
|
+ // this.chartData9 = JSON.parse(JSON.stringify(res9));
|
|
|
},
|
|
|
500);
|
|
|
},
|
|
@@ -851,10 +1177,21 @@
|
|
|
},
|
|
|
navClick(val) {
|
|
|
this.index = val
|
|
|
+ if (val == 1) {
|
|
|
+ this.seachMoth = ''
|
|
|
+ } else {
|
|
|
+ this.seachMoth = '2022-10-10'
|
|
|
+ }
|
|
|
this.getServerData();
|
|
|
},
|
|
|
accounting(val) {
|
|
|
this.textIndex = val
|
|
|
+ if (val == 1) {
|
|
|
+ console.log("按月")
|
|
|
+ } else {
|
|
|
+ console.log("按年")
|
|
|
+ }
|
|
|
+ this.makeDate1(this.chartList)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1113,4 +1450,31 @@
|
|
|
justify-content: space-evenly;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .content6 {
|
|
|
+ .row1 {
|
|
|
+ margin: 20rpx 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .days-nav {
|
|
|
+ background: red;
|
|
|
+ margin: 20rpx;
|
|
|
+ background: #F5F6FA;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ padding: 4rpx 0;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ width: 33%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 6px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .item-active {
|
|
|
+ background: #fff;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|