Commit c3b8e8bc by 匡雅琴

太阳膜详情接口联调

1 parent 713a9a9a
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div class="merchant-name">{{ firstTab[dataListObj.labelName] }}</div> <div class="merchant-name">{{ firstTab[dataListObj.labelName] }}</div>
<img class="arrow-down" src="@/assets/images/title-arrow.png" alt=""> <img class="arrow-down" src="@/assets/images/title-arrow.png" alt="">
</div> </div>
<SelectBox :isShow="isShow" :defaultValue="firstTab[dataListObj.valueName]" @clickOutside="clickOutside" :dataList="merchantList" :boxWidth="'23.33vw'" isObject @selectVal="selectVal" :labelName="dataListObj.labelName" :valueName="dataListObj.valueName"> <SelectBox :isShow="isShow" :defaultValue="firstTab[dataListObj.valueName]" @clickOutside="clickOutside" :dataList="dataList" :boxWidth="'23.33vw'" isObject @selectVal="selectVal" :labelName="dataListObj.labelName" :valueName="dataListObj.valueName">
<div slot="search" class="search"> <div slot="search" class="search">
<input type="text" class="search-input" v-model="search" @input="handleInput"> <input type="text" class="search-input" v-model="search" @input="handleInput">
<img class="icon-search" src="@/assets/images/icon-search.png" @click="searchMerchant" alt=""> <img class="icon-search" src="@/assets/images/icon-search.png" @click="searchMerchant" alt="">
......
...@@ -34,7 +34,8 @@ export default { ...@@ -34,7 +34,8 @@ export default {
name: 'goodsname' name: 'goodsname'
}, },
{ {
name: 'per' name: 'rate',
type: 'decimal'
}, },
{ {
name: 'purchaseamount', name: 'purchaseamount',
......
...@@ -142,7 +142,8 @@ export default { ...@@ -142,7 +142,8 @@ export default {
name: 'goodsname' name: 'goodsname'
}, },
{ {
name: 'per' name: 'rate',
type: 'decimal'
}, },
{ {
name: 'purchaseamount', name: 'purchaseamount',
...@@ -167,7 +168,8 @@ export default { ...@@ -167,7 +168,8 @@ export default {
name: 'goodsname' name: 'goodsname'
}, },
{ {
name: 'per' name: 'rate',
type: 'decimal'
}, },
{ {
name: 'purchaseamount', name: 'purchaseamount',
...@@ -181,33 +183,16 @@ export default { ...@@ -181,33 +183,16 @@ export default {
businessTime: '' businessTime: ''
} }
}, },
created() {
this.initData()
},
methods: { methods: {
async initData() { async init() {
console.log(this.$route.query, '999') console.log(this.$route.query, '999')
this.tabObject = this.$route.query
this.businessTime = this.$store.state.app.solarTime this.businessTime = this.$store.state.app.solarTime
this.businessYear = this.$store.state.app.solarYear this.businessYear = this.$store.state.app.solarYear
const { merchantid, purchaseType } = this.$route.query const { merchantid, purchaseType } = this.$route.query
let _merchantList = this.$store.state.app.merchantRankingList const _merchantList = await this.getAllRanking(purchaseType)
// 页面刷新导致门店数据置空,重新请求数据
// if (!_merchantList.length) {
// this.api.solar.getAllRanking({ year: 2023 }).then(res => {
// console.log(res, '000')
// if (!res.code === '0') {
// this.openMessage('获取商品采购额排名失败')
// return
// }
// const _data = res.data.dataList[0]
// _merchantList = _data[purchaseType]
// })
// }
// if (!_merchantList.length)
_merchantList = await this.getAllRanking(purchaseType)
this.merchantList = _merchantList this.merchantList = _merchantList
console.log(this.merchantList, 'this.merchantList') console.log(this.merchantList, 'this.merchantList')
this.tabObject = this.$route.query
this.getMerchantGoodsRatio(this.businessYear, merchantid) this.getMerchantGoodsRatio(this.businessYear, merchantid)
this.getMerchantPurchase(this.businessYear, merchantid) this.getMerchantPurchase(this.businessYear, merchantid)
this.getMerchantPurchaseTrend(this.businessYear, merchantid) this.getMerchantPurchaseTrend(this.businessYear, merchantid)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!