|
@@ -203,6 +203,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'
|
|
import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'
|
|
|
import { getSaleOrderSummary, getSaleOrderTrendSummary, getPadStockStreamStatistics, getPdaFindMaterialTrend, getMonthOutput, getYearOutput, getTendencyChart, getPurchaseOrderSummary, getPurchaseOrderTrendSummary } from '@/api/home/index'
|
|
import { getSaleOrderSummary, getSaleOrderTrendSummary, getPadStockStreamStatistics, getPdaFindMaterialTrend, getMonthOutput, getYearOutput, getTendencyChart, getPurchaseOrderSummary, getPurchaseOrderTrendSummary } from '@/api/home/index'
|
|
|
|
|
+import { yuanToWan } from '@/utils/utils.js'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
@@ -307,9 +308,9 @@ export default {
|
|
|
console.log('getPurchaseOrderSummary', res)
|
|
console.log('getPurchaseOrderSummary', res)
|
|
|
// res: { yearlySummary: { quantity, amount }, monthlySummary: { quantity, amount } }
|
|
// res: { yearlySummary: { quantity, amount }, monthlySummary: { quantity, amount } }
|
|
|
this.purchase.yearCount = res?.yearlySummary?.quantity || 0
|
|
this.purchase.yearCount = res?.yearlySummary?.quantity || 0
|
|
|
- this.purchase.yearAmount = +(res?.yearlySummary?.amount / 10000).toFixed(2) || 0
|
|
|
|
|
|
|
+ this.purchase.yearAmount = yuanToWan(res?.yearlySummary?.amount)
|
|
|
this.purchase.monthCount = res?.monthlySummary?.quantity || 0
|
|
this.purchase.monthCount = res?.monthlySummary?.quantity || 0
|
|
|
- this.purchase.monthAmount = +(res?.monthlySummary?.amount / 10000).toFixed(2) || 0
|
|
|
|
|
|
|
+ this.purchase.monthAmount = yuanToWan(res?.monthlySummary?.amount)
|
|
|
},
|
|
},
|
|
|
async getPurchaseOrderTrendSummary() {
|
|
async getPurchaseOrderTrendSummary() {
|
|
|
let res = await getPurchaseOrderTrendSummary({
|
|
let res = await getPurchaseOrderTrendSummary({
|
|
@@ -330,8 +331,8 @@ export default {
|
|
|
if (idx >= 0 && idx < 12) {
|
|
if (idx >= 0 && idx < 12) {
|
|
|
quantityArr[idx] = item.quantity || 0
|
|
quantityArr[idx] = item.quantity || 0
|
|
|
lastQuantityArr[idx] = item.lastQuantity || 0
|
|
lastQuantityArr[idx] = item.lastQuantity || 0
|
|
|
- amountArr[idx] = +((item.amount || 0) / 10000).toFixed(2)
|
|
|
|
|
- lastAmountArr[idx] = +((item.lastAmount || 0) / 10000).toFixed(2)
|
|
|
|
|
|
|
+ amountArr[idx] = yuanToWan(item.amount)
|
|
|
|
|
+ lastAmountArr[idx] = yuanToWan(item.lastAmount)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -522,8 +523,8 @@ export default {
|
|
|
if (idx >= 0 && idx < 12) {
|
|
if (idx >= 0 && idx < 12) {
|
|
|
quantityArr[idx] = item.quantity || 0
|
|
quantityArr[idx] = item.quantity || 0
|
|
|
lastQuantityArr[idx] = item.lastQuantity || 0
|
|
lastQuantityArr[idx] = item.lastQuantity || 0
|
|
|
- amountArr[idx] = +((item.amount || 0) / 10000).toFixed(2)
|
|
|
|
|
- lastAmountArr[idx] = +((item.lastAmount || 0) / 10000).toFixed(2)
|
|
|
|
|
|
|
+ amountArr[idx] = yuanToWan(item.amount)
|
|
|
|
|
+ lastAmountArr[idx] = yuanToWan(item.lastAmount)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -551,9 +552,9 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
this.marketing.yearOrderCount = res?.yearlySummary?.quantity || 0
|
|
this.marketing.yearOrderCount = res?.yearlySummary?.quantity || 0
|
|
|
- this.marketing.yearOrderAmount = (res?.yearlySummary?.amount / 10000).toFixed(2) || 0
|
|
|
|
|
|
|
+ this.marketing.yearOrderAmount = yuanToWan(res?.yearlySummary?.amount)
|
|
|
this.marketing.monthOrderCount = res?.monthlySummary?.quantity || 0
|
|
this.marketing.monthOrderCount = res?.monthlySummary?.quantity || 0
|
|
|
- this.marketing.monthOrderAmount = (res?.monthlySummary?.amount / 10000).toFixed(2) || 0
|
|
|
|
|
|
|
+ this.marketing.monthOrderAmount = yuanToWan(res?.monthlySummary?.amount)
|
|
|
console.log('getSaleOrderSummary', res)
|
|
console.log('getSaleOrderSummary', res)
|
|
|
},
|
|
},
|
|
|
toSaleOrderDetail(type) {
|
|
toSaleOrderDetail(type) {
|