add
This commit is contained in:
parent
b15e2eb7ba
commit
164220a37f
|
@ -267,7 +267,8 @@ const storeData = reactive([])
|
||||||
const initStoreOption = (pageData, total) => {
|
const initStoreOption = (pageData, total) => {
|
||||||
storeData.splice(0, storeData.length);
|
storeData.splice(0, storeData.length);
|
||||||
pageData.forEach((item,index) => {
|
pageData.forEach((item,index) => {
|
||||||
let range = ((item.merchant_count / total).toFixed(2) * 100)
|
let range = ((item.merchant_count / total) * 100).toFixed(2)
|
||||||
|
console.log(range,'rean=g')
|
||||||
storeData.push({
|
storeData.push({
|
||||||
name: item.street_name,
|
name: item.street_name,
|
||||||
num: item.merchant_count,
|
num: item.merchant_count,
|
||||||
|
|
|
@ -147,9 +147,98 @@ const changeBill = (num) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const billList = reactive([
|
const billList = reactive([
|
||||||
|
// {
|
||||||
|
// icon: "DD",
|
||||||
|
// text: "订单总金额收入",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "CZ",
|
||||||
|
// text: "退款支出金额",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "YJ",
|
||||||
|
// text: "佣金支出金额",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "PT",
|
||||||
|
// text: "平台手续费",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "CZ",
|
||||||
|
// text: "充值金额",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "CZXF",
|
||||||
|
// text: "充值消费金额",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "CS",
|
||||||
|
// text: "产生交易的商户数",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "YH",
|
||||||
|
// text: "优惠券",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "CS",
|
||||||
|
// text: "入口商户金额",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "YC",
|
||||||
|
// text: "云仓库佣金",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "XZ",
|
||||||
|
// text: "小组服务佣金",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "CY",
|
||||||
|
// text: "村佣金",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "ZY",
|
||||||
|
// text: "镇佣金",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// icon: "PT",
|
||||||
|
// text: "平台剩余手续费",
|
||||||
|
// num: 1245
|
||||||
|
// },
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
financial_record_titleApi(
|
||||||
{
|
{
|
||||||
|
...areaStore.area
|
||||||
|
}
|
||||||
|
|
||||||
|
).then(res => {
|
||||||
|
res.data.stat.forEach((item, i) => {
|
||||||
|
billList.push({
|
||||||
|
icon: foundIcon(item.name),
|
||||||
|
text: item.name,
|
||||||
|
num: item.count
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
let lists = [{
|
||||||
icon: "DD",
|
icon: "DD",
|
||||||
text: "订单总金额收入",
|
text: "订单收入总金额",
|
||||||
num: 1245
|
num: 1245
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -184,7 +273,7 @@ const billList = reactive([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "YH",
|
icon: "YH",
|
||||||
text: "优惠券",
|
text: "优惠券金额",
|
||||||
num: 1245
|
num: 1245
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -216,22 +305,24 @@ const billList = reactive([
|
||||||
icon: "PT",
|
icon: "PT",
|
||||||
text: "平台剩余手续费",
|
text: "平台剩余手续费",
|
||||||
num: 1245
|
num: 1245
|
||||||
},
|
},]
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
financial_record_titleApi(
|
|
||||||
{
|
|
||||||
...areaStore.area
|
|
||||||
}
|
|
||||||
|
|
||||||
).then(res => {
|
|
||||||
res.data.stat.forEach((item, i) => {
|
|
||||||
billList[i].num = item.count
|
|
||||||
|
|
||||||
|
|
||||||
|
const foundIcon = (te) => {
|
||||||
|
let icons = ''
|
||||||
|
lists.forEach(item => {
|
||||||
|
item.text==te?icons=item.icon:icons='YJ'
|
||||||
})
|
})
|
||||||
})
|
return icons
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// console.log(foundIcon('订单收入总金额'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const changeTable = (type, num) => {
|
const changeTable = (type, num) => {
|
||||||
|
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
|
@ -501,8 +592,6 @@ const hdClick3 = (e) => {
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
showPop.value = true
|
showPop.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,7 +600,7 @@ const hdClick3 = (e) => {
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
changeTable(0)
|
changeTable(2)
|
||||||
addConfigHead()
|
addConfigHead()
|
||||||
financial_recordApi({
|
financial_recordApi({
|
||||||
...areaStore.area,
|
...areaStore.area,
|
||||||
|
@ -536,31 +625,30 @@ globalEventBus.on('header5-3-2', data => {
|
||||||
changeBill(2)
|
changeBill(2)
|
||||||
})
|
})
|
||||||
globalEventBus.on('header5-3-3', data => {
|
globalEventBus.on('header5-3-3', data => {
|
||||||
if (billType.value == 1) {
|
if (billType.value == 1) {
|
||||||
financial_record_detailApi(
|
financial_record_detailApi(
|
||||||
{ ...areaStore.area, date: data.time }
|
{ ...areaStore.area, date: data.time }
|
||||||
).then(res => {
|
).then(res => {
|
||||||
|
|
||||||
for (let key in res.data) {
|
for (let key in res.data) {
|
||||||
detailData[key] = res.data[key]
|
detailData[key] = res.data[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (billType.value == 2) {
|
if (billType.value == 2) {
|
||||||
financial_record_detailApi2(
|
financial_record_detailApi2(
|
||||||
{ ...areaStore.area, date:data.time }
|
{ ...areaStore.area, date: data.time }
|
||||||
).then(res => {
|
).then(res => {
|
||||||
|
|
||||||
for (let key in res.data) {
|
for (let key in res.data) {
|
||||||
detailData[key] = res.data[key]
|
detailData[key] = res.data[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showPop.value = true
|
||||||
showPop.value = true
|
|
||||||
})
|
})
|
||||||
globalEventBus.on('header5-3-4', data => {
|
globalEventBus.on('header5-3-4', data => {
|
||||||
showPop.value = false
|
showPop.value = false
|
||||||
|
|
|
@ -127,15 +127,15 @@
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="ranking">
|
<div class="ranking">
|
||||||
<img src="/static/storeLogin/SPXSPH.png" class="img-cls" alt="">
|
<img src="/static/storeLogin/SPXSPH.png" class="img-cls" alt="">
|
||||||
<dv-scroll-board :config="config1" v-if="config1.data.length" class="list" />
|
<dv-scroll-board :config="config1" v-if="showConfig1" class="list" />
|
||||||
</div>
|
</div>
|
||||||
<div class="ranking">
|
<div class="ranking">
|
||||||
<img src="/static/storeLogin/SPFKPH.png" class="img-cls" alt="">
|
<img src="/static/storeLogin/SPFKPH.png" class="img-cls" alt="">
|
||||||
<dv-scroll-board :config="config2" v-if="config2.data.length" class="list" />
|
<dv-scroll-board :config="config2" v-if="showConfig2" class="list" />
|
||||||
</div>
|
</div>
|
||||||
<div class="ranking">
|
<div class="ranking">
|
||||||
<img src="/static/storeLogin/SPJGPH.png" class="img-cls" alt="">
|
<img src="/static/storeLogin/SPJGPH.png" class="img-cls" alt="">
|
||||||
<dv-scroll-board :config="config3" v-if="config3.data.length" class="list" />
|
<dv-scroll-board :config="config3" v-if="showConfig3" class="list" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -146,12 +146,14 @@ import { ref, reactive, onMounted, watch } from "vue"
|
||||||
import { merchant_count_mainApi, merchant_product_rankingApi, merchant_product_visitApi, merchant_product_cartApi, } from "@/api.js"
|
import { merchant_count_mainApi, merchant_product_rankingApi, merchant_product_visitApi, merchant_product_cartApi, } from "@/api.js"
|
||||||
import { areaObj } from "../store";
|
import { areaObj } from "../store";
|
||||||
import { globalEventBus } from '@/common/eventBus'
|
import { globalEventBus } from '@/common/eventBus'
|
||||||
import { merchantApi } from "@/api.js"
|
|
||||||
|
|
||||||
const areaStore = areaObj()
|
const areaStore = areaObj()
|
||||||
let query;
|
let query;
|
||||||
let userInfo = JSON.parse(localStorage.getItem('TRADE_USER'));
|
let userInfo = JSON.parse(localStorage.getItem('TRADE_USER'));
|
||||||
let storeLogin = JSON.parse(localStorage.getItem('TRAD_STORE_INFO'))
|
let storeLogin = JSON.parse(localStorage.getItem('TRAD_STORE_INFO'))
|
||||||
|
const showConfig1=ref(false)
|
||||||
|
const showConfig2=ref(false)
|
||||||
|
const showConfig3=ref(false)
|
||||||
|
|
||||||
if (areaStore.userInfo.user?.merchant) {
|
if (areaStore.userInfo.user?.merchant) {
|
||||||
let { area_id, mer_id, street_id } = areaStore.userInfo.user?.merchant
|
let { area_id, mer_id, street_id } = areaStore.userInfo.user?.merchant
|
||||||
|
@ -249,6 +251,10 @@ let total3 = ''
|
||||||
|
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
|
showConfig1.value=false
|
||||||
|
showConfig2.value=false
|
||||||
|
showConfig3.value=false
|
||||||
|
|
||||||
merchant_product_rankingApi(
|
merchant_product_rankingApi(
|
||||||
{ ...query, start_date: areaStore.time[0], end_date: areaStore.time[1] }
|
{ ...query, start_date: areaStore.time[0], end_date: areaStore.time[1] }
|
||||||
).then(res => {
|
).then(res => {
|
||||||
|
@ -290,13 +296,13 @@ const addData1 = (data) => {
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
showConfig1.value=true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const addData2 = (data) => {
|
const addData2 = (data) => {
|
||||||
config2.data.splice(0, 99999999)
|
config2.data.splice(0, 99999999)
|
||||||
|
|
||||||
data.forEach((item, i) => {
|
data.forEach((item, i) => {
|
||||||
config2.data.push(
|
config2.data.push(
|
||||||
[
|
[
|
||||||
|
@ -311,11 +317,10 @@ const addData2 = (data) => {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
showConfig2.value=true
|
||||||
|
|
||||||
}
|
}
|
||||||
const addData3 = (data) => {
|
const addData3 = (data) => {
|
||||||
|
|
||||||
config3.data.splice(0, 99999999)
|
config3.data.splice(0, 99999999)
|
||||||
data.forEach((item, i) => {
|
data.forEach((item, i) => {
|
||||||
config3.data.push(
|
config3.data.push(
|
||||||
|
@ -330,6 +335,8 @@ const addData3 = (data) => {
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
showConfig3.value=true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue