jufubao-base 1.0.239-beta2 → 1.0.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/JfbBaseFastLink/Attr.js +1 -12
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +0 -66
- package/src/components/JfbBaseHeader/Attr.js +0 -82
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +1 -47
- package/src/components/JfbBaseHeaderColumn/Attr.js +0 -82
- package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumn.vue +2 -48
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +13 -15
- package/src/components/JfbBaseNoticeDialog/Api.js +1 -1
- package/src/components/JfbBaseNoticeDialog/Attr.js +0 -26
- package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +9 -28
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +18 -174
- package/src/components/JfbBasePay/Attr.js +0 -52
- package/src/components/JfbBasePay/JfbBasePay.vue +6 -30
- package/src/components/JfbBasePay/Mock.js +9 -0
- package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +2 -1
- package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +19 -11
- package/src/components/JfbBasePoster/Attr.js +1 -1
- package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +2 -2
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +2 -7
- package/src/components/JfbBaseTfkSearch/ContentProduct.vue +22 -12
- package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +1 -12
- package/src/components/JfbBaseTfkSearch/Mock.js +3 -51
- package/src/components/JfbBaseTfkSearch/listMixins.js +1 -2
- package/src/components/JfbBaseUserInfo/Attr.js +11 -175
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +115 -337
- package/src/components/JfbBaseUserOrder/Attr.js +0 -16
- package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +2 -11
- package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +0 -10
- package/src/components/JfbBaseBalance/Api.js +0 -46
- package/src/components/JfbBaseBalance/Attr.js +0 -316
- package/src/components/JfbBaseBalance/JfbBaseBalance.vue +0 -334
- package/src/components/JfbBaseBalance/JfbBaseBalanceLess.less +0 -79
- package/src/components/JfbBaseBalance/JfbBaseBalanceMixin.js +0 -30
- package/src/components/JfbBaseBalance/Mock.js +0 -9
- package/src/components/JfbBaseCodeOpenVip/Api.js +0 -35
- package/src/components/JfbBaseCodeOpenVip/Attr.js +0 -281
- package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +0 -251
- package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipLess.less +0 -79
- package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipMixin.js +0 -30
- package/src/components/JfbBaseCodeOpenVip/Mock.js +0 -13
- package/src/components/JfbBaseConsumpCode/Api.js +0 -133
- package/src/components/JfbBaseConsumpCode/Attr.js +0 -61
- package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +0 -1048
- package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeLess.less +0 -79
- package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeMixin.js +0 -30
- package/src/components/JfbBaseConsumpCode/Mock.js +0 -22
- package/src/components/JfbBaseNoticeGroup/Api.js +0 -23
- package/src/components/JfbBaseNoticeGroup/Attr.js +0 -237
- package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroup.vue +0 -174
- package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupLess.less +0 -79
- package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupMixin.js +0 -30
- package/src/components/JfbBaseNoticeGroup/Mock.js +0 -13
- package/src/components/JfbBaseOpenVip/Api.js +0 -39
- package/src/components/JfbBaseOpenVip/Attr.js +0 -331
- package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +0 -457
- package/src/components/JfbBaseOpenVip/JfbBaseOpenVipLess.less +0 -79
- package/src/components/JfbBaseOpenVip/JfbBaseOpenVipMixin.js +0 -30
- package/src/components/JfbBaseOpenVip/Mock.js +0 -7
- package/src/components/JfbBaseOpenVip/XdVipList.vue +0 -131
- package/src/components/JfbBaseOpenVipCard/Api.js +0 -58
- package/src/components/JfbBaseOpenVipCard/Attr.js +0 -48
- package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCard.vue +0 -111
- package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardLess.less +0 -79
- package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardMixin.js +0 -30
- package/src/components/JfbBaseOpenVipCard/Mock.js +0 -13
- package/src/components/JfbBaseOpenVipDetail/Api.js +0 -35
- package/src/components/JfbBaseOpenVipDetail/Attr.js +0 -37
- package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +0 -234
- package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailLess.less +0 -79
- package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailMixin.js +0 -30
- package/src/components/JfbBaseOpenVipDetail/Mock.js +0 -15
- package/src/components/JfbBasePersonalData/Api.js +0 -26
- package/src/components/JfbBasePersonalData/Attr.js +0 -13
- package/src/components/JfbBasePersonalData/JfbBasePersonalData.vue +0 -200
- package/src/components/JfbBasePersonalData/JfbBasePersonalDataLess.less +0 -79
- package/src/components/JfbBasePersonalData/JfbBasePersonalDataMixin.js +0 -30
- package/src/components/JfbBasePersonalData/Mock.js +0 -13
- package/src/components/JfbBasePointsCard/Api.js +0 -18
- package/src/components/JfbBasePointsCard/Attr.js +0 -187
- package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +0 -212
- package/src/components/JfbBasePointsCard/JfbBasePointsCardLess.less +0 -79
- package/src/components/JfbBasePointsCard/JfbBasePointsCardMixin.js +0 -30
- package/src/components/JfbBasePointsCard/Mock.js +0 -5
- package/src/components/JfbBasePointsDetail/Api.js +0 -48
- package/src/components/JfbBasePointsDetail/Attr.js +0 -305
- package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +0 -267
- package/src/components/JfbBasePointsDetail/JfbBasePointsDetailLess.less +0 -79
- package/src/components/JfbBasePointsDetail/JfbBasePointsDetailMixin.js +0 -30
- package/src/components/JfbBasePointsDetail/Mock.js +0 -6
- package/src/components/JfbBasePosterGroup/Api.js +0 -22
- package/src/components/JfbBasePosterGroup/Attr.js +0 -156
- package/src/components/JfbBasePosterGroup/JfbBasePosterGroup.vue +0 -268
- package/src/components/JfbBasePosterGroup/JfbBasePosterGroupLess.less +0 -79
- package/src/components/JfbBasePosterGroup/JfbBasePosterGroupMixin.js +0 -30
- package/src/components/JfbBasePosterGroup/Mock.js +0 -13
- package/src/components/JfbBaseSavingDetail/Api.js +0 -41
- package/src/components/JfbBaseSavingDetail/Attr.js +0 -70
- package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +0 -710
- package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailLess.less +0 -79
- package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailMixin.js +0 -30
- package/src/components/JfbBaseSavingDetail/Mock.js +0 -10
- package/src/components/JfbBaseSavingDetail/components/echarts.min.js +0 -26
- package/src/components/JfbBaseSavingDetail/components/echarts.vue +0 -254
- package/src/components/JfbBaseSavingDetail/components/wx-canvas.js +0 -105
- package/src/components/JfbBaseShare/Api.js +0 -20
- package/src/components/JfbBaseShare/Attr.js +0 -59
- package/src/components/JfbBaseShare/JfbBaseShare.vue +0 -276
- package/src/components/JfbBaseShare/JfbBaseShareLess.less +0 -79
- package/src/components/JfbBaseShare/JfbBaseShareMixin.js +0 -30
- package/src/components/JfbBaseShare/Mock.js +0 -16
- package/src/components/JfbBaseWithDrawAgain/Api.js +0 -41
- package/src/components/JfbBaseWithDrawAgain/Attr.js +0 -92
- package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +0 -354
- package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +0 -79
- package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +0 -30
- package/src/components/JfbBaseWithDrawAgain/Mock.js +0 -10
- package/src/components/JfbBaseWithDrawRecord/Api.js +0 -19
- package/src/components/JfbBaseWithDrawRecord/Attr.js +0 -79
- package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +0 -233
- package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +0 -79
- package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +0 -30
- package/src/components/JfbBaseWithDrawRecord/Mock.js +0 -7
- package/src/components/JfbBaseWithdraw/Api.js +0 -48
- package/src/components/JfbBaseWithdraw/Attr.js +0 -328
- package/src/components/JfbBaseWithdraw/JfbBaseWithdraw.vue +0 -272
- package/src/components/JfbBaseWithdraw/JfbBaseWithdrawLess.less +0 -79
- package/src/components/JfbBaseWithdraw/JfbBaseWithdrawMixin.js +0 -30
- package/src/components/JfbBaseWithdraw/Mock.js +0 -7
|
@@ -1,710 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="jfb-base-saving-detail" @click="handleEditxSelect" :class="{ editx : isEditx && active }">
|
|
3
|
-
<!--#ifdef H5-->
|
|
4
|
-
<view class="jfb-base-saving-detail__edit" :class="{ editx : isEditx && active }" v-if="isEditx && active">
|
|
5
|
-
<view class="jfb-base-saving-detail__edit-icon" @click="delEdit">删除</view>
|
|
6
|
-
</view>
|
|
7
|
-
<!-- #endif -->
|
|
8
|
-
<view class="jfb-base-saving-detail__body">
|
|
9
|
-
<scroll-view scroll-x="true">
|
|
10
|
-
<view class="tab_list" :style="[tabStyleComp]">
|
|
11
|
-
<view class="tab_item" v-for="(tab, i) in tabs" :key="tab.value" :style="{
|
|
12
|
-
color: i === tabIndex? titleActColor : titleColor,
|
|
13
|
-
}" @click="switchTab(i)">
|
|
14
|
-
{{tab.label}}
|
|
15
|
-
<view v-if="i === tabIndex" class="check" :style="{background: titleActColor
|
|
16
|
-
}"></view>
|
|
17
|
-
<view class="check" v-else></view>
|
|
18
|
-
</view>
|
|
19
|
-
|
|
20
|
-
</view>
|
|
21
|
-
</scroll-view>
|
|
22
|
-
<view v-if="tab==='month'">
|
|
23
|
-
<view style="width: 710rpx;margin: 0 auto;borderRadius: 20rpx;background:#FFF">
|
|
24
|
-
<view class="jfb-base-saving-detail__body-month">
|
|
25
|
-
<view @click="handleLastMonth">上一月</view>
|
|
26
|
-
<view>{{monthDateRange}}</view>
|
|
27
|
-
<view class="monthDisabled" v-if="disabledMonth">下一月</view>
|
|
28
|
-
<view v-else @click="handleNextMonth">下一月</view>
|
|
29
|
-
</view>
|
|
30
|
-
<view style="width: 710rpx;height: 480rpx">
|
|
31
|
-
<echarts ref="monthEcharts" :option="option" canvasId="monthEcharts"></echarts>
|
|
32
|
-
</view>
|
|
33
|
-
<view class="jfb-base-saving-detail__body-block"></view>
|
|
34
|
-
</view>
|
|
35
|
-
</view>
|
|
36
|
-
<view v-if="tab==='year'">
|
|
37
|
-
<view style="width: 710rpx;margin: 0 auto;borderRadius: 20rpx;background:#FFF">
|
|
38
|
-
<view class="jfb-base-saving-detail__body-cycle">{{yearDateRange}}</view>
|
|
39
|
-
<view style="width: 710rpx;height: 480rpx">
|
|
40
|
-
<echarts ref="yearEcharts" :option="option" canvasId="yearEcharts"></echarts>
|
|
41
|
-
</view>
|
|
42
|
-
<view class="jfb-base-saving-detail__body-block"></view>
|
|
43
|
-
</view>
|
|
44
|
-
</view>
|
|
45
|
-
<view v-if="tab==='total'">
|
|
46
|
-
<view style="width: 710rpx;margin: 0 auto;borderRadius: 20rpx;background:#FFF">
|
|
47
|
-
<view class="jfb-base-saving-detail__body-cycle">{{totalDateRange}}</view>
|
|
48
|
-
<view style="width: 710rpx;height: 480rpx">
|
|
49
|
-
<echarts ref="totalEcharts" :option="option" canvasId="totalEcharts"></echarts>
|
|
50
|
-
</view>
|
|
51
|
-
<view class="jfb-base-saving-detail__body-block"></view>
|
|
52
|
-
</view>
|
|
53
|
-
</view>
|
|
54
|
-
<view class="jfb-base-saving-detail__body-product">
|
|
55
|
-
<view class="jfb-base-saving-detail__body-product-title">
|
|
56
|
-
<view> {{tab==='month'? `${getYearAndMonth(monthDateRange).month}月结算明细` :'购物'}}</view>
|
|
57
|
-
<view>已省:{{getAmout(saveAmount)}}</view>
|
|
58
|
-
</view>
|
|
59
|
-
<view v-if="productList.length>0">
|
|
60
|
-
<view v-for="(item,index) in productList" :key="index" class="jfb-base-saving-detail__body-product-item">
|
|
61
|
-
<image :src="item.product_image">
|
|
62
|
-
</image>
|
|
63
|
-
<view class="jfb-base-saving-detail__body-product-item-info">
|
|
64
|
-
<view class="jfb-base-saving-detail__body-product-item-info-name">{{item.product_name}}</view>
|
|
65
|
-
<view class="jfb-base-saving-detail__body-product-item-info-time">
|
|
66
|
-
<view>{{item.order_time}}</view>
|
|
67
|
-
<view>{{item.product_num}}件</view>
|
|
68
|
-
</view>
|
|
69
|
-
<view class="jfb-base-saving-detail__body-product-item-info-price">
|
|
70
|
-
<view>合计节省</view>
|
|
71
|
-
<view :style="{color:mainColor}">{{getAmout(item.saving_amount)}}</view>
|
|
72
|
-
</view>
|
|
73
|
-
</view>
|
|
74
|
-
</view>
|
|
75
|
-
</view>
|
|
76
|
-
<XdNoData v-else></XdNoData>
|
|
77
|
-
</view>
|
|
78
|
-
</view>
|
|
79
|
-
</view>
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<script>
|
|
83
|
-
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
84
|
-
import XdNoData from "@/components/XdNoData/XdNoData";
|
|
85
|
-
import { jfbRootExec } from "@/utils/xd.event";
|
|
86
|
-
import JfbBaseSavingDetailMixin from "./JfbBaseSavingDetailMixin";
|
|
87
|
-
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
88
|
-
import echarts from './components/echarts.vue'
|
|
89
|
-
import componentsMixins from "@/mixins/componentsMixins";
|
|
90
|
-
import extsMixins from "@/mixins/extsMixins";
|
|
91
|
-
import getServiceUrl from "@/common/getServiceUrl";
|
|
92
|
-
|
|
93
|
-
export default {
|
|
94
|
-
name: "JfbBaseSavingDetail",
|
|
95
|
-
components: {
|
|
96
|
-
XdFontIcon,
|
|
97
|
-
echarts,
|
|
98
|
-
XdNoData
|
|
99
|
-
},
|
|
100
|
-
mixins: [
|
|
101
|
-
componentsMixins, extsMixins, JfbBaseSavingDetailMixin
|
|
102
|
-
],
|
|
103
|
-
data() {
|
|
104
|
-
return {
|
|
105
|
-
tabs: [
|
|
106
|
-
{
|
|
107
|
-
label: '月度',
|
|
108
|
-
value: 'month'
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
label: '年度',
|
|
112
|
-
value: 'year'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: '累计',
|
|
116
|
-
value: 'total'
|
|
117
|
-
}
|
|
118
|
-
],
|
|
119
|
-
//标题
|
|
120
|
-
titleBgc: '',
|
|
121
|
-
titleColor: '',
|
|
122
|
-
titleActColor: '',
|
|
123
|
-
titlePadding: '',
|
|
124
|
-
tabPadding: '',
|
|
125
|
-
tabIndex: 0,
|
|
126
|
-
tab: 'month',
|
|
127
|
-
option: null,
|
|
128
|
-
monthDateRange: '',
|
|
129
|
-
yearDateRange: '',
|
|
130
|
-
totalDateRange: '',
|
|
131
|
-
saveAmount: 0, //节省金额
|
|
132
|
-
productList: [],
|
|
133
|
-
hasNext: true,
|
|
134
|
-
page_token: 1,
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
computed: {
|
|
138
|
-
tabStyleComp() {
|
|
139
|
-
return {
|
|
140
|
-
background: this.titleBgc,
|
|
141
|
-
marginBottom: this.titlePadding + 'rpx',
|
|
142
|
-
padding: this.getMarginAndPadding(this.tabPadding, { top: 40, right: 0, bottom: 40, left: 0 }),
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
disabledMonth(){
|
|
146
|
-
let month = new Date().getMonth() + 1
|
|
147
|
-
return this.getYearAndMonth(this.monthDateRange).month==month
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
watch: {
|
|
151
|
-
container(value, oldValue) {
|
|
152
|
-
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
153
|
-
if (this.$configProject['isPreview']) this.init(value)
|
|
154
|
-
},
|
|
155
|
-
tab(value, oldValue) {
|
|
156
|
-
//请求数据
|
|
157
|
-
if (value === 'month') {
|
|
158
|
-
this.getMonthData()
|
|
159
|
-
} else if (value === 'year') {
|
|
160
|
-
this.getYearData()
|
|
161
|
-
} else if (value === 'total') {
|
|
162
|
-
this.getTotalData()
|
|
163
|
-
}
|
|
164
|
-
this.hasNext = true;
|
|
165
|
-
this.page_token = 1
|
|
166
|
-
this.monthDateRange = ""
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
created() {
|
|
170
|
-
this.init(this.container);
|
|
171
|
-
},
|
|
172
|
-
methods: {
|
|
173
|
-
onJfbLoad(options) {
|
|
174
|
-
if (this.tab === 'month') {
|
|
175
|
-
this.getMonthData()
|
|
176
|
-
} else if (this.tab === 'year') {
|
|
177
|
-
this.getYearData()
|
|
178
|
-
} else if (this.tab === 'total') {
|
|
179
|
-
this.getTotalData()
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
getMonthData() {
|
|
183
|
-
let data = {}
|
|
184
|
-
if (this.monthDateRange) {
|
|
185
|
-
data.year = this.getYearAndMonth(this.monthDateRange).year
|
|
186
|
-
data.month = this.getYearAndMonth(this.monthDateRange).month
|
|
187
|
-
}
|
|
188
|
-
jfbRootExec('getMonthSavingDetail', {
|
|
189
|
-
vm: this,
|
|
190
|
-
data: data,
|
|
191
|
-
}).then(res => {
|
|
192
|
-
let list = res.list.map(item => {
|
|
193
|
-
item["order_time"] = this.$xdUniHelper.getDate(
|
|
194
|
-
item["order_time"] * 1000
|
|
195
|
-
).fullTime;
|
|
196
|
-
item.product_image = getServiceUrl(item.product_image)
|
|
197
|
-
return item;
|
|
198
|
-
})
|
|
199
|
-
const textColor = '#999'
|
|
200
|
-
const seriesData = res.record_months.map(item => {
|
|
201
|
-
return this.getAmout(item.value)
|
|
202
|
-
})
|
|
203
|
-
const xAxisList = res.record_months.map(item => {
|
|
204
|
-
return item.label
|
|
205
|
-
})
|
|
206
|
-
this.option = {
|
|
207
|
-
|
|
208
|
-
tooltip: {
|
|
209
|
-
trigger: 'axis'
|
|
210
|
-
},
|
|
211
|
-
grid: {
|
|
212
|
-
top: '15%',
|
|
213
|
-
left: '15%',
|
|
214
|
-
right: '15%',
|
|
215
|
-
bottom: '15%',
|
|
216
|
-
containLabel: false
|
|
217
|
-
},
|
|
218
|
-
xAxis: {
|
|
219
|
-
type: 'category',
|
|
220
|
-
data: xAxisList,
|
|
221
|
-
axisLabel: {
|
|
222
|
-
// 坐标轴字体颜色
|
|
223
|
-
color: textColor,
|
|
224
|
-
fontSize: 10,
|
|
225
|
-
},
|
|
226
|
-
axisLine: {
|
|
227
|
-
show: false
|
|
228
|
-
},
|
|
229
|
-
axisLine: {
|
|
230
|
-
show: false,
|
|
231
|
-
},
|
|
232
|
-
axisTick: { //y轴刻度线
|
|
233
|
-
show: false
|
|
234
|
-
},
|
|
235
|
-
splitLine: {
|
|
236
|
-
// 网格
|
|
237
|
-
show: false
|
|
238
|
-
},
|
|
239
|
-
boundaryGap: false
|
|
240
|
-
},
|
|
241
|
-
yAxis: {
|
|
242
|
-
type: 'value',
|
|
243
|
-
min: 0,
|
|
244
|
-
nameTextStyle: {
|
|
245
|
-
color: textColor,
|
|
246
|
-
fontSize: 10,
|
|
247
|
-
padding: [0, 0, 0, 80]
|
|
248
|
-
},
|
|
249
|
-
axisLabel: {
|
|
250
|
-
// 坐标轴字体颜色
|
|
251
|
-
color: textColor,
|
|
252
|
-
fontSize: 10
|
|
253
|
-
},
|
|
254
|
-
axisLine: {
|
|
255
|
-
show: false,
|
|
256
|
-
},
|
|
257
|
-
axisTick: { //y轴刻度线
|
|
258
|
-
show: false
|
|
259
|
-
},
|
|
260
|
-
splitLine: {
|
|
261
|
-
// 网格
|
|
262
|
-
show: true,
|
|
263
|
-
lineStyle: {
|
|
264
|
-
color: '#CCCCCC',
|
|
265
|
-
type: 'dashed'
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
|
|
270
|
-
series: [
|
|
271
|
-
{
|
|
272
|
-
name: '已省',
|
|
273
|
-
type: 'line',
|
|
274
|
-
symbol: 'circle',
|
|
275
|
-
symbolSize: 10,
|
|
276
|
-
smooth: true,
|
|
277
|
-
z: 1,
|
|
278
|
-
itemStyle: {
|
|
279
|
-
color: '#5487FF'
|
|
280
|
-
},
|
|
281
|
-
lineStyle: {
|
|
282
|
-
color: '#5487FF'
|
|
283
|
-
},
|
|
284
|
-
data: seriesData
|
|
285
|
-
}
|
|
286
|
-
]
|
|
287
|
-
};
|
|
288
|
-
this.monthDateRange = res.date_range
|
|
289
|
-
this.saveAmount = res.save_amount
|
|
290
|
-
this.hasNext = res.next_page_token !== "";
|
|
291
|
-
if (this.page_token === 1) {
|
|
292
|
-
this.productList = list
|
|
293
|
-
} else {
|
|
294
|
-
this.productList = this.productList.concat(list);
|
|
295
|
-
}
|
|
296
|
-
})
|
|
297
|
-
},
|
|
298
|
-
getYearData() {
|
|
299
|
-
jfbRootExec('getYearSavingDetail', {
|
|
300
|
-
vm: this,
|
|
301
|
-
data: {},
|
|
302
|
-
}).then(res => {
|
|
303
|
-
let list = res.list.map(item => {
|
|
304
|
-
item["order_time"] = this.$xdUniHelper.getDate(
|
|
305
|
-
item["order_time"] * 1000
|
|
306
|
-
).fullTime;
|
|
307
|
-
item.product_image = getServiceUrl(item.product_image)
|
|
308
|
-
return item;
|
|
309
|
-
})
|
|
310
|
-
// 最大值
|
|
311
|
-
let max = this.getAmout(res.total_amount);
|
|
312
|
-
// 数量
|
|
313
|
-
let value = this.getAmout(res.save_amount);
|
|
314
|
-
this.option = {
|
|
315
|
-
backgroundColor: '#fff', // 设置图表区域的背景颜色
|
|
316
|
-
borderRadius: 10, // 设置图表区域的圆角
|
|
317
|
-
title: [
|
|
318
|
-
{
|
|
319
|
-
text: '{a|周期已省}\n{b|' + value + '}', // 显示标题
|
|
320
|
-
show: true, // 是否显示
|
|
321
|
-
x: 'center', // x轴位置
|
|
322
|
-
y: 'center', // y轴位置
|
|
323
|
-
textStyle: { // 样式配置
|
|
324
|
-
rich: {
|
|
325
|
-
a: {
|
|
326
|
-
fontSize: 16,
|
|
327
|
-
fontWeight: 'normal',
|
|
328
|
-
color: '#666',
|
|
329
|
-
padding: [0, 0, 10, 0], // 边距
|
|
330
|
-
},
|
|
331
|
-
b: {
|
|
332
|
-
fontSize: 40,
|
|
333
|
-
fontWeight: 700,
|
|
334
|
-
color: '#000'
|
|
335
|
-
},
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
},
|
|
339
|
-
],
|
|
340
|
-
polar: {
|
|
341
|
-
center: ['50%', '50%'],
|
|
342
|
-
radius: ['60%', '75%'],
|
|
343
|
-
},
|
|
344
|
-
angleAxis: {
|
|
345
|
-
max: max,
|
|
346
|
-
startAngle: 90, // 开始的角度
|
|
347
|
-
show: false,
|
|
348
|
-
},
|
|
349
|
-
radiusAxis: {
|
|
350
|
-
type: 'category',
|
|
351
|
-
show: true,
|
|
352
|
-
axisLabel: {
|
|
353
|
-
show: false, // 是否显示标签
|
|
354
|
-
},
|
|
355
|
-
axisLine: {
|
|
356
|
-
show: false, // 是否显示轴线
|
|
357
|
-
},
|
|
358
|
-
axisTick: {
|
|
359
|
-
show: false, // 是否显示刻度
|
|
360
|
-
},
|
|
361
|
-
},
|
|
362
|
-
series: [
|
|
363
|
-
{
|
|
364
|
-
name: '',
|
|
365
|
-
type: 'bar',
|
|
366
|
-
roundCap: true,
|
|
367
|
-
showBackground: true,
|
|
368
|
-
backgroundStyle: {
|
|
369
|
-
color: '#f5f5f5',
|
|
370
|
-
},
|
|
371
|
-
data: [value],
|
|
372
|
-
coordinateSystem: 'polar',
|
|
373
|
-
itemStyle: {
|
|
374
|
-
normal: {
|
|
375
|
-
color: this.mainColor,
|
|
376
|
-
},
|
|
377
|
-
},
|
|
378
|
-
},
|
|
379
|
-
],
|
|
380
|
-
};
|
|
381
|
-
this.yearDateRange = res.date_range
|
|
382
|
-
this.saveAmount = res.save_amount
|
|
383
|
-
this.hasNext = res.next_page_token !== "";
|
|
384
|
-
if (this.page_token === 1) {
|
|
385
|
-
this.productList = list
|
|
386
|
-
} else {
|
|
387
|
-
this.productList = this.productList.concat(list);
|
|
388
|
-
}
|
|
389
|
-
})
|
|
390
|
-
},
|
|
391
|
-
getTotalData() {
|
|
392
|
-
jfbRootExec('getTotalSavingDetail', {
|
|
393
|
-
vm: this,
|
|
394
|
-
data: {},
|
|
395
|
-
}).then(res => {
|
|
396
|
-
let list = res.list.map(item => {
|
|
397
|
-
item["order_time"] = this.$xdUniHelper.getDate(
|
|
398
|
-
item["order_time"] * 1000
|
|
399
|
-
).fullTime;
|
|
400
|
-
item.product_image = getServiceUrl(item.product_image)
|
|
401
|
-
return item;
|
|
402
|
-
})
|
|
403
|
-
let max = this.getAmout(res.total_amount);
|
|
404
|
-
// 数量
|
|
405
|
-
let value = this.getAmout(res.save_amount);
|
|
406
|
-
this.option = {
|
|
407
|
-
backgroundColor: '#fff', // 设置图表区域的背景颜色
|
|
408
|
-
borderRadius: 10, // 设置图表区域的圆角
|
|
409
|
-
title: [
|
|
410
|
-
{
|
|
411
|
-
text: '{a|周期已省}\n{b|' + value + '}', // 显示标题
|
|
412
|
-
show: true, // 是否显示
|
|
413
|
-
x: 'center', // x轴位置
|
|
414
|
-
y: 'center', // y轴位置
|
|
415
|
-
textStyle: { // 样式配置
|
|
416
|
-
rich: {
|
|
417
|
-
a: {
|
|
418
|
-
fontSize: 16,
|
|
419
|
-
fontWeight: 'normal',
|
|
420
|
-
color: '#666',
|
|
421
|
-
padding: [0, 0, 10, 0], // 边距
|
|
422
|
-
},
|
|
423
|
-
b: {
|
|
424
|
-
fontSize: 40,
|
|
425
|
-
fontWeight: 700,
|
|
426
|
-
color: '#000'
|
|
427
|
-
},
|
|
428
|
-
},
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
|
-
],
|
|
432
|
-
polar: {
|
|
433
|
-
center: ['50%', '50%'],
|
|
434
|
-
radius: ['60%', '75%'],
|
|
435
|
-
},
|
|
436
|
-
angleAxis: {
|
|
437
|
-
max: max,
|
|
438
|
-
startAngle: 90, // 开始的角度
|
|
439
|
-
show: false,
|
|
440
|
-
},
|
|
441
|
-
radiusAxis: {
|
|
442
|
-
type: 'category',
|
|
443
|
-
show: true,
|
|
444
|
-
axisLabel: {
|
|
445
|
-
show: false, // 是否显示标签
|
|
446
|
-
},
|
|
447
|
-
axisLine: {
|
|
448
|
-
show: false, // 是否显示轴线
|
|
449
|
-
},
|
|
450
|
-
axisTick: {
|
|
451
|
-
show: false, // 是否显示刻度
|
|
452
|
-
},
|
|
453
|
-
},
|
|
454
|
-
series: [
|
|
455
|
-
{
|
|
456
|
-
name: '',
|
|
457
|
-
type: 'bar',
|
|
458
|
-
roundCap: true,
|
|
459
|
-
showBackground: true,
|
|
460
|
-
backgroundStyle: {
|
|
461
|
-
color: '#f5f5f5',
|
|
462
|
-
},
|
|
463
|
-
data: [value],
|
|
464
|
-
coordinateSystem: 'polar',
|
|
465
|
-
itemStyle: {
|
|
466
|
-
normal: {
|
|
467
|
-
color: this.mainColor,
|
|
468
|
-
},
|
|
469
|
-
},
|
|
470
|
-
},
|
|
471
|
-
],
|
|
472
|
-
};
|
|
473
|
-
this.totalDateRange = res.date_range
|
|
474
|
-
this.saveAmount = res.save_amount
|
|
475
|
-
this.hasNext = res.next_page_token !== "";
|
|
476
|
-
if (this.page_token === 1) {
|
|
477
|
-
this.productList = list
|
|
478
|
-
} else {
|
|
479
|
-
this.productList = this.productList.concat(list);
|
|
480
|
-
}
|
|
481
|
-
})
|
|
482
|
-
},
|
|
483
|
-
/**
|
|
484
|
-
* @description 监听事件变化
|
|
485
|
-
* @param container {object} 业务组件对象自己
|
|
486
|
-
*/
|
|
487
|
-
init(container) {
|
|
488
|
-
//标题
|
|
489
|
-
this.titleBgc = getContainerPropsValue(container, 'content.titleBgc', '#ffff');
|
|
490
|
-
this.titlePadding = getContainerPropsValue(container, 'content.titlePadding', 20);
|
|
491
|
-
this.tabPadding = getContainerPropsValue(container, 'content.tabPadding', { top: 40, right: 0, bottom: 40, left: 0 });
|
|
492
|
-
this.titleColor = getContainerPropsValue(container, 'content.titleColor', '#666');
|
|
493
|
-
this.titleActColor = getContainerPropsValue(container, 'content.titleActColor', this.mainColor);
|
|
494
|
-
},
|
|
495
|
-
switchTab(i) {
|
|
496
|
-
this.tab = this.tabs[i].value;
|
|
497
|
-
this.tabIndex = i;
|
|
498
|
-
},
|
|
499
|
-
getAmout(amount) {
|
|
500
|
-
return this.$xdUniHelper.divisionFloatNumber(amount, 100)||0
|
|
501
|
-
},
|
|
502
|
-
getYearAndMonth(dateStr) {
|
|
503
|
-
// 将输入的日期字符串转换为Date对象
|
|
504
|
-
const date = new Date(dateStr.replace("年", "-").replace("月", "-01"));
|
|
505
|
-
|
|
506
|
-
// 获取年份和月份
|
|
507
|
-
const year = date.getFullYear();
|
|
508
|
-
const month = String(date.getMonth() + 1);
|
|
509
|
-
|
|
510
|
-
return {
|
|
511
|
-
year: year,
|
|
512
|
-
month: month
|
|
513
|
-
};
|
|
514
|
-
},
|
|
515
|
-
formatDate(date) {
|
|
516
|
-
const year = date.getFullYear();
|
|
517
|
-
const month = String(date.getMonth() + 1);
|
|
518
|
-
return `${year}年${month}月`;
|
|
519
|
-
},
|
|
520
|
-
handleLastMonth() {
|
|
521
|
-
const dateRange = new Date(this.monthDateRange.replace("年", "-").replace("月", "-01"));
|
|
522
|
-
// 获取上一个月的日期范围
|
|
523
|
-
const previousMonth = new Date(dateRange);
|
|
524
|
-
previousMonth.setMonth(dateRange.getMonth() - 1);
|
|
525
|
-
const previousMonthStart = new Date(previousMonth.getFullYear(), previousMonth.getMonth(), 1);
|
|
526
|
-
const previousMonthEnd = new Date(previousMonth.getFullYear(), previousMonth.getMonth() + 1, 0);
|
|
527
|
-
this.monthDateRange = this.formatDate(previousMonthStart)
|
|
528
|
-
this.getMonthData()
|
|
529
|
-
},
|
|
530
|
-
handleNextMonth() {
|
|
531
|
-
const dateRange = new Date(this.monthDateRange.replace("年", "-").replace("月", "-01"));
|
|
532
|
-
// 获取下一个月的日期范围
|
|
533
|
-
const nextMonth = new Date(dateRange);
|
|
534
|
-
nextMonth.setMonth(dateRange.getMonth() + 1);
|
|
535
|
-
const nextMonthStart = new Date(nextMonth.getFullYear(), nextMonth.getMonth(), 1);
|
|
536
|
-
const nextMonthEnd = new Date(nextMonth.getFullYear(), nextMonth.getMonth() + 1, 0);
|
|
537
|
-
this.monthDateRange = this.formatDate(nextMonthEnd)
|
|
538
|
-
this.getMonthData()
|
|
539
|
-
},
|
|
540
|
-
onJfbScroll(options) {
|
|
541
|
-
console.log('event.onJfbScroll', options)
|
|
542
|
-
},
|
|
543
|
-
onJfbReachBottom(options) {
|
|
544
|
-
if (this.hasNext) {
|
|
545
|
-
this.page_token = this.next_page_token;
|
|
546
|
-
if (this.tab === 'month') {
|
|
547
|
-
this.getMonthData()
|
|
548
|
-
} else if (this.tab === 'year') {
|
|
549
|
-
this.getYearData()
|
|
550
|
-
} else if (this.tab === 'total') {
|
|
551
|
-
this.getTotalData()
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
},
|
|
555
|
-
onJfbShow(options) {
|
|
556
|
-
console.log('event.onJfbShow', options)
|
|
557
|
-
},
|
|
558
|
-
onJfbHide(options) {
|
|
559
|
-
console.log('event.onJfbHide', options)
|
|
560
|
-
},
|
|
561
|
-
onJfbBack(options) {
|
|
562
|
-
console.log('event.onJfbBack', options)
|
|
563
|
-
},
|
|
564
|
-
onJfbUpdate(...data) {
|
|
565
|
-
console.log('event.onJfbUpdate', data)
|
|
566
|
-
},
|
|
567
|
-
onJfbCustomEvent(options) {
|
|
568
|
-
console.log('event.onJfbReachBottom', options)
|
|
569
|
-
},
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
</script>
|
|
574
|
-
|
|
575
|
-
<style scoped lang="less">
|
|
576
|
-
@import "./JfbBaseSavingDetailLess.less";
|
|
577
|
-
|
|
578
|
-
.jfb-base-saving-detail {
|
|
579
|
-
&__body {
|
|
580
|
-
.tab_list {
|
|
581
|
-
display: flex;
|
|
582
|
-
justify-content: space-around;
|
|
583
|
-
align-items: center;
|
|
584
|
-
white-space: nowrap;
|
|
585
|
-
|
|
586
|
-
.tab_item {
|
|
587
|
-
flex: 1;
|
|
588
|
-
display: flex;
|
|
589
|
-
align-items: center;
|
|
590
|
-
justify-content: center;
|
|
591
|
-
flex-direction: column;
|
|
592
|
-
color: #666666;
|
|
593
|
-
font-size: unit(32, rpx);
|
|
594
|
-
white-space: nowrap;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
.check {
|
|
598
|
-
width: 60rpx;
|
|
599
|
-
height: 6rpx;
|
|
600
|
-
margin-top: 12rpx;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
&-cycle {
|
|
605
|
-
font-size: 32rpx;
|
|
606
|
-
color: #999;
|
|
607
|
-
text-align: center;
|
|
608
|
-
padding-top: 40rpx;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
&-block {
|
|
612
|
-
height: 40rpx;
|
|
613
|
-
width: 100%;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
&-month {
|
|
617
|
-
display: flex;
|
|
618
|
-
align-items: center;
|
|
619
|
-
justify-content: space-around;
|
|
620
|
-
padding: 40rpx 24rpx 20rpx 24rpx;
|
|
621
|
-
|
|
622
|
-
&>view:first-child,
|
|
623
|
-
&>view:last-child {
|
|
624
|
-
font-size: 28rpx;
|
|
625
|
-
color: #999999;
|
|
626
|
-
padding: 12rpx 60rpx;
|
|
627
|
-
background: #F5F5F5;
|
|
628
|
-
border-radius: 40rpx;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
&>view:nth-child(2) {
|
|
632
|
-
font-size: 32rpx;
|
|
633
|
-
color: #999;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
&-product {
|
|
638
|
-
border-radius: 20rpx;
|
|
639
|
-
background: #fff;
|
|
640
|
-
margin: 20rpx;
|
|
641
|
-
|
|
642
|
-
&-title {
|
|
643
|
-
font-size: 28rpx;
|
|
644
|
-
display: flex;
|
|
645
|
-
align-items: center;
|
|
646
|
-
justify-content: space-between;
|
|
647
|
-
padding: 24rpx;
|
|
648
|
-
border-bottom: 2rpx solid #eee;
|
|
649
|
-
|
|
650
|
-
&>view:first-child {
|
|
651
|
-
color: #333;
|
|
652
|
-
font-weight: 500;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
&>view:nth-child(2) {
|
|
656
|
-
color: #999999;
|
|
657
|
-
font-size: 24rpx;
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
&-item {
|
|
662
|
-
display: flex;
|
|
663
|
-
padding: 26rpx;
|
|
664
|
-
border-bottom: 2rpx solid #eee;
|
|
665
|
-
|
|
666
|
-
&>image {
|
|
667
|
-
width: 200rpx;
|
|
668
|
-
height: 200rpx;
|
|
669
|
-
margin-right: 32rpx;
|
|
670
|
-
flex-shrink: 0;
|
|
671
|
-
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
&-info {
|
|
675
|
-
flex: 1;
|
|
676
|
-
&-name {
|
|
677
|
-
font-size: 28rpx;
|
|
678
|
-
color: #333333;
|
|
679
|
-
.uni-max-cut(2, 80);
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
&-time {
|
|
683
|
-
display: flex;
|
|
684
|
-
align-items: center;
|
|
685
|
-
justify-content: space-between;
|
|
686
|
-
font-size: 24rpx;
|
|
687
|
-
color: #999999;
|
|
688
|
-
margin: 40rpx 0 12rpx 0;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
&-price {
|
|
692
|
-
display: flex;
|
|
693
|
-
align-items: center;
|
|
694
|
-
justify-content: space-between;
|
|
695
|
-
font-size: 24rpx;
|
|
696
|
-
|
|
697
|
-
&>view:nth-child(2) {
|
|
698
|
-
font-weight: 500;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
.monthDisabled{
|
|
705
|
-
background: #FCFCFC !important;
|
|
706
|
-
color: #EEEEEE !important;
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
</style>
|