Commit 5dccd3e5 by 匡雅琴

太阳膜接口联调

1 parent d82c2e5d
......@@ -65,6 +65,16 @@ const getMerchant = params => {
return window.$HTTP.get('solarfilm/getMerchant', params)
}
// 单店----获取每个门店的门店采购额和入库情况
const getMerchantMer = params => {
return window.$HTTP.get('solarfilm/getMerchantMer', params)
}
// 单店----获取每个门店的服务中心的采购额和入库情况
const getMerchantServiceCenter = params => {
return window.$HTTP.get('solarfilm/getMerchantServiceCenter', params)
}
export default {
getAllGoodsRatio,
getAllOpenBuyTrend,
......@@ -77,5 +87,7 @@ export default {
getUsedWarehousing,
getBugProgress,
getYears,
getMerchant
getMerchant,
getMerchantMer,
getMerchantServiceCenter
}
<template>
<div class="marketing-right">
<PullDownSelect ref="rightDownSelect" :selectList="selectList" @selectVal="selectVal"></PullDownSelect>
<inner-tab class="inner-tab" :list="tabList" :width="tabWidth" :itemPadding="0.5" @changeTab="changeTab"></inner-tab>
<inner-tab ref="innerTabRef" class="inner-tab" :list="tabList" :width="tabWidth" :itemPadding="0.5" @changeTab="changeTab"></inner-tab>
<!-- 1.3售后众筹显示占比和价格区间切换 -->
<div class="switch-box" v-if="switchShow">
<div class="text">收入占比:{{ ratio }}%</div>
......@@ -79,28 +79,43 @@ export default {
methods: {
selectVal(val) {
this.$refs.innerTabRef.tabActive = 0
console.log(val)
switch (val.val) {
case 'outputMerchantNum':
this.tabWidth = 7.3
this.tabList = ['门店数', '总金额']
this.valueName = 'outputMerchantNum'
this.downSelectNum = 0
this.$nextTick(() => {
this.$refs.merchantChartRef.drawBar(this.marketingDistributionList)
})
break
case 'orderMerchantNum':
this.tabList = ['门店数', '总订单数']
this.tabWidth = 8.1
this.valueName = 'orderMerchantNum'
this.downSelectNum = 1
this.$nextTick(() => {
this.$refs.merchantChartRef.drawBar(this.marketingDistributionList)
})
break
case 'crowdFundingMerDistr':
this.tabList = ['门店数', '订单数', '总金额']
this.tabWidth = 10.8
this.downSelectNum = 0
this.getMarketingCrowdFundingMerDistr('num')
break
case 'crowdFundingActivityDistr':
this.tabList = ['活动数', '订单数', '订单金额']
this.tabWidth = 11.6
this.downSelectNum = 1
this.getMarketingCrowdFundingActivityDistr('num')
break
case 'crowdFundingActivityMoneyDistr':
this.tabList = ['活动数', '订单数', '总订单金额']
this.tabWidth = 12.4
this.downSelectNum = 2
this.getMarketingCrowdFundingActivityMoneyDistr('num')
break
}
......@@ -121,6 +136,7 @@ export default {
case 1:
// 1.1精品升级
if (this.digitalMarketingTab === 0) {
console.log(this.downSelectNum);
this.valueName = this.downSelectNum === 0 ? 'outputMoney' : 'orderMoney'
} else {
// 1.3售后众筹
......@@ -135,7 +151,10 @@ export default {
this[_valList[this.downSelectNum]]('price')
break
}
this.$refs.merchantChartRef.drawBar(this.marketingDistributionList)
console.log(this.valueName);
this.$nextTick(() => {
this.$refs.merchantChartRef.drawBar(this.marketingDistributionList)
})
},
async getMarketingDistribution() {
const _data = await this.api.internal.getMarketingDistribution()
......
<template>
<div>
<div class="service-box">
<box-title title="服务中心-采购及入库情况"></box-title>
<PurchaseStorageTable class="main-table" id="serviceTable"></PurchaseStorageTable>
</div>
<div class="merchant-box">
<box-title title="门店-采购及入库情况"></box-title>
<PurchaseStorageTable class="main-table" id="merchantTable"></PurchaseStorageTable>
</div>
</div>
</template>
<script>
import PurchaseStorageTable from './PurchaseStorageTable.vue'
export default {
name: 'PerchaseStorageSituation',
components: {
PurchaseStorageTable
},
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.service-box,
.merchant-box {
width: 31.53vw;
height: 32.56vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
}
.merchant-box {
margin-top: 1.78vh;
}
.main-table {
padding: 1.11vh 1.39vw 2.44vh;
}
</style>
<template>
<div>
<el-table :id="id" :data="tableData" style="width: 100%" :header-cell-style="{ color: '#e8e8e8', fontSize: '11px', height: '3.11vh', background: '#0a214d' }" :row-class-name="tableRowClassName">
<el-table-column prop="merchantName" label="服务中心名称" width="200"></el-table-column>
<el-table-column prop="payPrice" label="采购额/元"></el-table-column>
<el-table-column prop="price" label="入库额/元"></el-table-column>
<el-table :id="id" :data="tableData" style="width: 100%" :header-cell-style="{ color: '#e8e8e8', fontSize: '11px', height: '3.11vh', background: '#0a214d' }">
<el-table-column prop="merchantname" :label="firstName" width="200"></el-table-column>
<el-table-column prop="amounttotal" label="采购额/元"></el-table-column>
<el-table-column prop="warehousing" label="入库额/元"></el-table-column>
<template slot="empty">
<div class="empty">
<Empty></Empty>
......@@ -21,7 +21,11 @@ export default {
type: Array,
default: () => []
},
id: Number
id: String,
firstName: {
type: String,
default: '服务中心名称'
}
},
data() {
return {}
......@@ -53,7 +57,7 @@ export default {
overflow-y: scroll;
}
.el-table tr {
background-color: transparent;
background-color: #061422;
}
.el-table .el-table__cell {
padding: 0 !important;
......@@ -71,7 +75,7 @@ export default {
}
.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
border-bottom: none;
border-bottom: 1px solid #161C5F;
}
.el-table--border::after,
.el-table--group::after,
......
......@@ -16,7 +16,14 @@
<MerchantsPropotion :shopmallData="shopmallData" :selfPickData="selfPickData"></MerchantsPropotion>
</div>
<div class="solar-detail-right">
<PerchaseStorageSituation></PerchaseStorageSituation>
<div class="service-box">
<box-title title="服务中心-采购及入库情况"></box-title>
<PurchaseStorageTable :tableData="merchantServiceDataList" class="main-table" id="serviceTable"></PurchaseStorageTable>
</div>
<div class="merchant-box">
<box-title title="门店-采购及入库情况"></box-title>
<PurchaseStorageTable firstName="门店名称名称" :tableData="merchantMerDataList" class="main-table" id="merchantTable"></PurchaseStorageTable>
</div>
</div>
</div>
</div>
......@@ -29,14 +36,14 @@
import { changeMixin } from '@/mixins'
import MerchantsPurchaseTrends from './MerchantsPurchaseTrends.vue'
import MerchantsPropotion from './MerchantsPropotion.vue'
import PerchaseStorageSituation from './PerchaseStorageSituation.vue'
import PurchaseStorageTable from './PurchaseStorageTable.vue'
export default {
name: 'SolarDetail',
mixins: [changeMixin],
components: {
MerchantsPropotion,
MerchantsPurchaseTrends,
PerchaseStorageSituation
PurchaseStorageTable
},
data() {
return {
......@@ -109,7 +116,9 @@ export default {
shopmallData: [],
// 自采采购数据
selfPickData: [],
businessTime: ''
businessTime: '',
merchantMerDataList: [],
merchantServiceDataList: []
}
},
created() {
......@@ -138,6 +147,8 @@ export default {
this.getMerchantPurchase(merchantid)
this.getMerchantPurchaseTrend(merchantid)
this.getYears(merchantid)
this.getMerchantMer(merchantid)
this.getMerchantServiceCenter(merchantid)
},
// 获取门店的商品采购占比(商城、自采)
getMerchantGoodsRatio(merchantid) {
......@@ -222,6 +233,28 @@ export default {
})
})
this.defaultYear = this.yearList[0].value
},
// 获取每个门店的门店采购额和入库情况
getMerchantMer(merchantid) {
this.api.solar.getMerchantMer({ year: this.$store.state.app.solarYear, MerchantId: merchantid }).then(res => {
if (!res.code === '0') {
this.openMessage('获取每个门店的门店采购额和入库情况失败')
return
}
const _dataList = res.data.dataList
this.merchantMerDataList = _dataList
})
},
// 获取每个门店的服务中心的采购额和入库情况
getMerchantServiceCenter(merchantid) {
this.api.solar.getMerchantServiceCenter({ year: this.$store.state.app.solarYear, merchantid: 44208147 }).then(res => {
if (!res.code === '0') {
this.openMessage('获取每个门店的服务中心的采购额和入库情况失败')
return
}
const _dataList = res.data.dataList
this.merchantServiceDataList = _dataList
})
}
}
}
......@@ -243,4 +276,17 @@ export default {
margin-top: 1.78vh;
}
}
.service-box,
.merchant-box {
width: 31.53vw;
height: 32.56vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
}
.merchant-box {
margin-top: 1.78vh;
}
.main-table {
padding: 1.11vh 1.39vw 2.44vh;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!