gaoluyang
7 天以前 1c06a22fd79e05fbeaf01c0c2f27aef1b1f3febd
src/views/index.vue
@@ -287,7 +287,7 @@
   formatter: function (params) {
      // 动态生成提示信息,基于数据项的 name 属性
      const description = params.name === '本月回款金额' ? '本月回款金额' : '应收款金额';
      return `${description} ${formatNumber(params.value)}元 ${params.percent}%`;
      return `${description} ${formattedNumber(params.value)}元 ${params.percent}%`;
   },
   position: 'right'
})
@@ -365,6 +365,13 @@
      businessInfo.value = {...res.data}
   })
}
const formattedNumber = (row, column, cellValue) => {
   // 如果只传了一个参数,直接格式化该参数
   if (column === undefined && cellValue === undefined) {
      return parseFloat(row).toFixed(2)
   }
   return parseFloat(cellValue).toFixed(2)
};
// 合同金额
const analysisCustomer = () => {
   analysisCustomerContractAmounts().then((res) => {