diff --git a/src/components/index/topLeft.vue b/src/components/index/topLeft.vue index 9fe0e0d..aafc109 100644 --- a/src/components/index/topLeft.vue +++ b/src/components/index/topLeft.vue @@ -267,7 +267,8 @@ const storeData = reactive([]) const initStoreOption = (pageData, total) => { storeData.splice(0, storeData.length); 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({ name: item.street_name, num: item.merchant_count, diff --git a/src/view/finance.vue b/src/view/finance.vue index 0eb4364..328fbd4 100644 --- a/src/view/finance.vue +++ b/src/view/finance.vue @@ -147,9 +147,98 @@ const changeBill = (num) => { } 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", - text: "订单总金额收入", + text: "订单收入总金额", num: 1245 }, { @@ -184,7 +273,7 @@ const billList = reactive([ }, { icon: "YH", - text: "优惠券", + text: "优惠券金额", num: 1245 }, { @@ -216,22 +305,24 @@ const billList = reactive([ icon: "PT", text: "平台剩余手续费", 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) => { if (type == 0) { @@ -501,8 +592,6 @@ const hdClick3 = (e) => { }) } - - showPop.value = true } @@ -511,7 +600,7 @@ const hdClick3 = (e) => { onMounted(() => { - changeTable(0) + changeTable(2) addConfigHead() financial_recordApi({ ...areaStore.area, @@ -536,31 +625,30 @@ globalEventBus.on('header5-3-2', data => { changeBill(2) }) globalEventBus.on('header5-3-3', data => { - if (billType.value == 1) { - financial_record_detailApi( - { ...areaStore.area, date: data.time } - ).then(res => { + if (billType.value == 1) { + financial_record_detailApi( + { ...areaStore.area, date: data.time } + ).then(res => { - for (let key in res.data) { - detailData[key] = res.data[key] - } + for (let key in res.data) { + detailData[key] = res.data[key] + } - }) - } - if (billType.value == 2) { - financial_record_detailApi2( - { ...areaStore.area, date:data.time } - ).then(res => { + }) + } + if (billType.value == 2) { + financial_record_detailApi2( + { ...areaStore.area, date: data.time } + ).then(res => { - for (let key in res.data) { - detailData[key] = res.data[key] - } + for (let key in res.data) { + detailData[key] = res.data[key] + } - }) - } + }) + } - - showPop.value = true + showPop.value = true }) globalEventBus.on('header5-3-4', data => { showPop.value = false diff --git a/src/view/storeLogin.vue b/src/view/storeLogin.vue index 9298e4a..d93e936 100644 --- a/src/view/storeLogin.vue +++ b/src/view/storeLogin.vue @@ -127,15 +127,15 @@
- +
- +
- +
@@ -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 { areaObj } from "../store"; import { globalEventBus } from '@/common/eventBus' -import { merchantApi } from "@/api.js" const areaStore = areaObj() let query; let userInfo = JSON.parse(localStorage.getItem('TRADE_USER')); 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) { let { area_id, mer_id, street_id } = areaStore.userInfo.user?.merchant @@ -249,6 +251,10 @@ let total3 = '' const init = () => { + showConfig1.value=false + showConfig2.value=false + showConfig3.value=false + merchant_product_rankingApi( { ...query, start_date: areaStore.time[0], end_date: areaStore.time[1] } ).then(res => { @@ -290,13 +296,13 @@ const addData1 = (data) => { ] ) }) + showConfig1.value=true } const addData2 = (data) => { config2.data.splice(0, 99999999) - data.forEach((item, i) => { config2.data.push( [ @@ -311,11 +317,10 @@ const addData2 = (data) => { ) }) - + showConfig2.value=true } const addData3 = (data) => { - config3.data.splice(0, 99999999) data.forEach((item, i) => { config3.data.push( @@ -330,6 +335,8 @@ const addData3 = (data) => { ] ) }) + showConfig3.value=true + }