新疆马铃薯
1.系统架构图修改
2.首页销售数据、采购数据卡片展示修改
| | |
| | | monthSaleHaveMoney: 0, |
| | | monthSaleMoney: 0, |
| | | todayInventoryNum: 0, |
| | | lastMonthSaleMoney: 0, |
| | | lastMonthPurchaseMoney: 0, |
| | | }); |
| | | |
| | | const qualityStatisticsObject = ref({ |
| | |
| | | }); |
| | | }); |
| | | |
| | | // 计算环比增长率 |
| | | const calculateGrowthRate = (current, last) => { |
| | | const currentVal = parseFloat(current) || 0; |
| | | const lastVal = parseFloat(last) || 0; |
| | | if (lastVal === 0) return currentVal > 0 ? 100 : 0; |
| | | return ((currentVal - lastVal) / lastVal * 100).toFixed(1); |
| | | }; |
| | | |
| | | const dashboardCards = computed(() => [ |
| | | { |
| | | key: "sales", |
| | | title: "销售数据", |
| | | desc: "本月销售额(元)", |
| | | value: formatNumber(businessInfo.value.monthSaleMoney), |
| | | subLabel: "未开票金额", |
| | | subValue: formatNumber(businessInfo.value.monthSaleHaveMoney), |
| | | trend: `占比 ${ratioText(businessInfo.value.monthSaleHaveMoney, businessInfo.value.monthSaleMoney)}`, |
| | | subLabel: "上月销售", |
| | | subValue: formatNumber(businessInfo.value.lastMonthSaleMoney), |
| | | trend: (() => { |
| | | const rate = calculateGrowthRate(businessInfo.value.monthSaleMoney, businessInfo.value.lastMonthSaleMoney); |
| | | const num = parseFloat(rate); |
| | | if (num > 0) return `环比 ↑ ${rate}%`; |
| | | if (num < 0) return `环比 ↓ ${Math.abs(num)}%`; |
| | | return "环比持平"; |
| | | })(), |
| | | icon: DataLine, |
| | | visible: visibleModules.value.sales, |
| | | }, |
| | |
| | | title: "采购数据", |
| | | desc: "本月采购额(元)", |
| | | value: formatNumber(businessInfo.value.monthPurchaseMoney), |
| | | subLabel: "待付款金额", |
| | | subValue: formatNumber(businessInfo.value.monthPurchaseHaveMoney), |
| | | trend: `占比 ${ratioText( |
| | | businessInfo.value.monthPurchaseHaveMoney, |
| | | businessInfo.value.monthPurchaseMoney |
| | | )}`, |
| | | subLabel: "上月采购", |
| | | subValue: formatNumber(businessInfo.value.lastMonthPurchaseMoney), |
| | | trend: (() => { |
| | | const rate = calculateGrowthRate(businessInfo.value.monthPurchaseMoney, businessInfo.value.lastMonthPurchaseMoney); |
| | | const num = parseFloat(rate); |
| | | if (num > 0) return `环比 ↑ ${rate}%`; |
| | | if (num < 0) return `环比 ↓ ${Math.abs(num)}%`; |
| | | return "环比持平"; |
| | | })(), |
| | | icon: ShoppingCartFull, |
| | | visible: visibleModules.value.procurement, |
| | | }, |
| | |
| | | prop: "checkName", |
| | | }, |
| | | { |
| | | label: "采购合同号", |
| | | prop: "purchaseContractNo", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "产品名称", |
| | | prop: "productName", |
| | | }, |
| | |
| | | </div> |
| | | </section> |
| | | |
| | | <!-- 生产模块已隐藏 |
| | | <section class="section-card section-card--bottom"> |
| | | <article class="module-title module-title--produce"> |
| | | <div class="module-title__icon"> |
| | |
| | | </template> |
| | | </div> |
| | | </section> |
| | | --> |
| | | |
| | | <section class="section-card section-card--bottom"> |
| | | <article class="module-title module-title--store"> |