Commit 4df3466c by 胡悦

修改

1 parent 489435db
...@@ -60,28 +60,28 @@ export default { ...@@ -60,28 +60,28 @@ export default {
{ {
name: '总采购额', name: '总采购额',
valueName: 'amounttotal', valueName: 'amounttotal',
value: '2,280,708', value: '0',
bottomLabel: '本月采购额', bottomLabel: '本月采购额',
bottemName: 'amounttotalThismonth', bottemName: 'amounttotalThismonth',
bottomValue: '2,280,708', bottomValue: '0',
bottomType: 'money' bottomType: 'money'
}, },
{ {
name: '商城采购额', name: '商城采购额',
valueName: 'amountshop', valueName: 'amountshop',
value: '2,280,708', value: '0',
bottomLabel: '本月采购额', bottomLabel: '本月采购额',
bottemName: 'amountshopThismonth', bottemName: 'amountshopThismonth',
bottomValue: '2,280,708', bottomValue: '0',
bottomType: 'money' bottomType: 'money'
}, },
{ {
name: '自采采购额', name: '自采采购额',
valueName: 'amountself', valueName: 'amountself',
value: '2,280,708', value: '0',
bottomLabel: '本月采购额', bottomLabel: '本月采购额',
bottemName: 'amountselfThismonth', bottemName: 'amountselfThismonth',
bottomValue: '2,280,708', bottomValue: '0',
bottomType: 'money' bottomType: 'money'
} }
], ],
...@@ -129,23 +129,23 @@ export default { ...@@ -129,23 +129,23 @@ export default {
// 获取每个门店的 总采购额(总计、本月) 、商城采购额(总计、本月) 、自采采购额(总计、本月) // 获取每个门店的 总采购额(总计、本月) 、商城采购额(总计、本月) 、自采采购额(总计、本月)
getMerchantPurchase(merchantid) { getMerchantPurchase(merchantid) {
this.api.solar.getMerchantPurchase({ year: this.$store.state.app.solarYear, MerchantId: merchantid }).then(res => { this.api.solar.getMerchantPurchase({ year: this.$store.state.app.solarYear, MerchantId: merchantid }).then(res => {
console.log(res)
if (!res.code === '0') { if (!res.code === '0') {
this.openMessage('获取门店采购额趋势失败') this.openMessage('获取门店采购额趋势失败')
return return
} }
const _dataList = res.data.dataList[0] const _dataList = res.data.dataList[0]
if (_dataList) {
this.businessTime = _dataList.businessstarttime this.businessTime = _dataList.businessstarttime
this.solarDetailList.forEach(item => { this.solarDetailList.forEach(item => {
item.value = _dataList[item.valueName] item.value = _dataList[item.valueName]
item.bottomValue = _dataList[item.bottemName] item.bottomValue = _dataList[item.bottemName]
}) })
}
}) })
}, },
// 获取每个门店的商城采购额(占比)、自采采购额(占比) 趋势 // 获取每个门店的商城采购额(占比)、自采采购额(占比) 趋势
getMerchantPurchaseTrend(merchantid) { getMerchantPurchaseTrend(merchantid) {
this.api.solar.getMerchantPurchaseTrend({ year: this.$store.state.app.solarYear, MerchantId: merchantid }).then(res => { this.api.solar.getMerchantPurchaseTrend({ year: this.$store.state.app.solarYear, MerchantId: merchantid }).then(res => {
console.log(res)
if (!res.code === '0') { if (!res.code === '0') {
this.openMessage('获取门店商品采购占比失败') this.openMessage('获取门店商品采购占比失败')
return return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!