Commit 99eb9318 authored by 罗超's avatar 罗超

修改

parent 63575108
This diff is collapsed.
...@@ -1524,7 +1524,7 @@ export default { ...@@ -1524,7 +1524,7 @@ export default {
text6: 'Revenue in the past six months', text6: 'Revenue in the past six months',
text7: 'Time selection', text7: 'Time selection',
text8: 'Select month', text8: 'Select month',
text9: 'Accumulated number of transactions this year', text9: 'Number of people this year',
text10: 'Accumulated revenue', text10: 'Accumulated revenue',
text11: 'Month Number', text11: 'Month Number',
text12: 'Activated, expected revenue', text12: 'Activated, expected revenue',
...@@ -1532,6 +1532,7 @@ export default { ...@@ -1532,6 +1532,7 @@ export default {
text14: 'Estimated Revenue', text14: 'Estimated Revenue',
text15: 'Monthly transaction amount has been reached', text15: 'Monthly transaction amount has been reached',
text16: 'Return', text16: 'Return',
text17: 'up',
}, },
col: { col: {
title1: 'Order', title1: 'Order',
......
...@@ -1522,14 +1522,15 @@ export default { ...@@ -1522,14 +1522,15 @@ export default {
text6: '半年近くの収益', text6: '半年近くの収益',
text7: '時間の選択', text7: '時間の選択',
text8: '選択月', text8: '選択月',
text9: '本年の累計取引総額です', text9: '本年の累計人数',
text10: '累積収益', text10: '累積収益',
text11: '当面の取引額', text11: '現在の人数',
text12: '活性化しています,収益見込み', text12: '活性化しています,収益見込み',
text13: 'まだまだ', text13: 'まだまだ',
text14: '収益予想', text14: '収益予想',
text15: '月の取引額はすでに達しました', text15: '月の取引額はすでに達しました',
text16: '返します', text16: '返します',
text17: '以下',
}, },
col:{ col:{
title1: '註文します', title1: '註文します',
......
...@@ -1525,14 +1525,15 @@ export default { ...@@ -1525,14 +1525,15 @@ export default {
text6: '近半年收益', text6: '近半年收益',
text7: '时间选择', text7: '时间选择',
text8: '选择月份', text8: '选择月份',
text9: '本年累计交易总额', text9: '本年累计人数',
text10: '累计收益', text10: '累计收益',
text11: '当前交易额', text11: '当前人数',
text12: '已激活,预计收益', text12: '已激活,预计收益',
text13: '还差', text13: '还差',
text14: '预计收益', text14: '预计收益',
text15: '月交易额已达', text15: '月交易额已达',
text16: '返', text16: '返',
text17: '以上',
}, },
col:{ col:{
title1: '订单', title1: '订单',
......
...@@ -1527,14 +1527,15 @@ export default { ...@@ -1527,14 +1527,15 @@ export default {
text6: '近半年收益', text6: '近半年收益',
text7: '時間選擇', text7: '時間選擇',
text8: '選擇月份', text8: '選擇月份',
text9: '本年累計交易總額', text9: '本年累計人數',
text10: '累計收益', text10: '累計收益',
text11: '當前交易額', text11: '當前人數',
text12: '已激活,預計收益', text12: '已激活,預計收益',
text13: '還差', text13: '還差',
text14: '預計收益', text14: '預計收益',
text15: '月交易額已達', text15: '月交易額已達',
text16: '返', text16: '返',
text17: '以上',
}, },
col:{ col:{
title1: '訂單', title1: '訂單',
......
<template> <template>
<div class="column items-center"> <div class="column items-center">
<div class="q-mt-sm q-mb-lg" <div class="q-mt-sm q-mb-lg" :class="[$q.platform.is.desktop ? 'passbook-form' : '']" :style="{ width: $q.platform.is.mobile ? '100%' : '' }">
:class="[$q.platform.is.desktop?'passbook-form':'']" <transition-group v-if="!isUseDetails" appear enter-active-class="animated fadeInRight" leave-active-class="animated fadeInLeft">
:style="{'width':$q.platform.is.mobile?'100%':''}"> <template v-if="MonthObj && datainfo">
<transition-group <passbookHead :dataNum="datainfo ? datainfo.Client_Balance : 0" />
v-if="!isUseDetails"
appear
enter-active-class="animated fadeInRight"
leave-active-class="animated fadeInLeft"
>
<template v-if="MonthObj&&datainfo">
<passbookHead :dataNum="datainfo?datainfo.Client_Balance:0"/>
<!-- <rebate/> --> <!-- <rebate/> -->
<redEnvelope :Obj="MonthObj" :info="datainfo"/> <redEnvelope :Obj="MonthObj" :info="datainfo" />
</template> </template>
</transition-group> </transition-group>
<transition <transition v-else appear enter-active-class="animated fadeInLeft" leave-active-class="animated fadeInRight">
v-else <useDetails />
appear
enter-active-class="animated fadeInLeft"
leave-active-class="animated fadeInRight"
>
<useDetails/>
</transition> </transition>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import useMetaModule from '../../module/meta/metaModule' import useMetaModule from '../../module/meta/metaModule'
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router'
import { defineComponent, ref, reactive, toRefs, provide, inject } from 'vue' import { defineComponent, ref, reactive, toRefs, provide, inject } from 'vue'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
import { ApiResult } from '../../@types/enumHelper' import { ApiResult } from '../../@types/enumHelper'
import message from '../../utils/message' import message from '../../utils/message'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import Store from '../../store' import Store from '../../store'
import { DirtionmaryHelper } from '../../config/dictionary' import { DirtionmaryHelper } from '../../config/dictionary'
import passbookHead from '../../components/passbook/passbookHead.vue' import passbookHead from '../../components/passbook/passbookHead.vue'
import rebate from '../../components/passbook/rebate.vue' import rebate from '../../components/passbook/rebate.vue'
import redEnvelope from '../../components/passbook/redEnvelope.vue' import redEnvelope from '../../components/passbook/redEnvelope.vue'
import useDetails from '../../components/passbook/useDetails.vue' import useDetails from '../../components/passbook/useDetails.vue'
import passbookService from '../../api/passbook' import passbookService from '../../api/passbook'
export default defineComponent({ export default defineComponent({
name: 'user-info', name: 'user-info',
components: { passbookHead,rebate,redEnvelope,useDetails }, components: { passbookHead, rebate, redEnvelope, useDetails },
props: {}, props: {},
setup() { setup() {
const $router = useRouter()
const $router = useRouter();
const $q = useQuasar() const $q = useQuasar()
const data=reactive({ const data = reactive({
datainfo:null as Object, datainfo: null as Object,
xMonth:[] as Array<any>, xMonth: [] as Array<any>,
yMoney1:[] as Array<any>, yMoney1: [] as Array<any>,
yMoney2:[] as Array<any>, yMoney2: [] as Array<any>,
MonthObj:null as Object MonthObj: null as Object
}) })
let { setTitle } = useMetaModule() let { setTitle } = useMetaModule()
...@@ -64,24 +51,24 @@ ...@@ -64,24 +51,24 @@
setTitle(pageTitle.value) setTitle(pageTitle.value)
const ratioListBase = ref([ const ratioListBase = ref([
{ {
Money:5, Money: 5,
Ratio:100000, Ratio: 100000
}, },
{ {
Money:11, Money: 11,
Ratio:150000, Ratio: 150000
}, },
{ {
Money:16, Money: 16,
Ratio:200000, Ratio: 200000
}, },
{ {
Money:21, Money: 21,
Ratio:250000, Ratio: 250000
}, }
]) ])
const isUseDetails = ref(false) const isUseDetails = ref(false)
provide(DirtionmaryHelper.PASSBOOK_DETAILS,isUseDetails) provide(DirtionmaryHelper.PASSBOOK_DETAILS, isUseDetails)
const methods = { const methods = {
GetBigRedEnvelope() { GetBigRedEnvelope() {
let CustomerId let CustomerId
...@@ -89,31 +76,32 @@ ...@@ -89,31 +76,32 @@
CustomerId = Store.state.user?.userDetail?.customerId CustomerId = Store.state.user?.userDetail?.customerId
} }
$q.loading.show() $q.loading.show()
passbookService.GetCustomerBigRedEnvelope(CustomerId) passbookService
.GetCustomerBigRedEnvelope(CustomerId)
.then(r => { .then(r => {
let arr1=['-', '-', '-','-']; let arr1 = ['-', '-', '-', '-']
let newarr=[]; let newarr = []
if (r.data.resultCode == ApiResult.SUCCESS) { if (r.data.resultCode == ApiResult.SUCCESS) {
data.datainfo=r.data.data; data.datainfo = r.data.data
data.datainfo.JQLRList.forEach((item,index)=>{ data.datainfo.JQLRList.forEach((item, index) => {
data.xMonth.push(item.Date) data.xMonth.push(item.Date)
if(index<5){ if (index < 5) {
data.yMoney1.push(item.Money) data.yMoney1.push(item.Money)
} }
if(index>3){ if (index > 3) {
newarr.push(item.Money); newarr.push(item.Money)
data.yMoney2=arr1.concat(newarr); data.yMoney2 = arr1.concat(newarr)
} }
}) })
data.datainfo.RatioList = ratioListBase.value data.datainfo.RatioList = ratioListBase.value
data.datainfo.RatioList.forEach(item=>{ data.datainfo.GuestNum = data.datainfo.GuestNum ? data.datainfo.GuestNum : 0
item.percent=data.datainfo.Amount/item.Money; data.datainfo.RatioList.forEach(item => {
item.width=(item.percent)*100; item.percent = data.datainfo.GuestNum / item.Money
item.width = item.percent * 100
}) })
console.log(data.datainfo.RatioList)
data.yMoney1=data.yMoney1.concat(["-"]); data.yMoney1 = data.yMoney1.concat(['-'])
data.MonthObj ={ data.MonthObj = {
xMonth: data.xMonth, xMonth: data.xMonth,
yMoney1: data.yMoney1, yMoney1: data.yMoney1,
yMoney2: data.yMoney2 yMoney2: data.yMoney2
...@@ -127,15 +115,15 @@ ...@@ -127,15 +115,15 @@
$q.loading.hide() $q.loading.hide()
message.errorMsg(r.message) message.errorMsg(r.message)
}) })
}, }
} }
methods.GetBigRedEnvelope() methods.GetBigRedEnvelope()
return {...toRefs(data),isUseDetails,...methods} return { ...toRefs(data), isUseDetails, ...methods }
} }
}) })
</script> </script>
<style> <style>
.passbook-form{ .passbook-form {
width: 963px; width: 963px;
/* min-width: 663px; */ /* min-width: 663px; */
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment