Browse Source

Merge branch 'dev1.0' of http://192.168.0.200:3000/suf/front-end-BI into dev1.0

jiand 5 months ago
parent
commit
c33400cb01

+ 8 - 1
src/components/CyInput/AmountInput/index.vue

@@ -54,13 +54,20 @@
     }
 
     // 添加千分符
-    formattedValue = formattedValue.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
+    formattedValue = formatMoney(formattedValue)
 
     formattedAmount.value = formattedValue
 
     const rawAmount = formattedValue.replace(/,/g, '')
     emits('update:modelValue', rawAmount)
   }
+
+  const formatMoney = (number) => {
+    const parts = number.toString().split('.')
+    parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
+    return parts.join('.')
+  }
+
   watch(
     () => props.modelValue,
     (newV) => {

+ 4 - 4
src/views/dataSource/annualSetting/columns/goal/ROE.columns.tsx

@@ -13,7 +13,7 @@ export function useRoeColumns() {
       showOverflowTooltip: true,
       cellRenderer: ({ index, row }) => (
         <>
-          <cy-amount-input v-model={row.mTROE} disabled></cy-amount-input>
+          <cy-amount-input dot-parts-num={ 4 } v-model={row.mTROE} disabled></cy-amount-input>
         </>
       )
     },
@@ -22,7 +22,7 @@ export function useRoeColumns() {
       showOverflowTooltip: true,
       cellRenderer: ({ index, row }) => (
         <>
-          <cy-amount-input v-model={row.cTROE} disabled></cy-amount-input>
+          <cy-amount-input dot-parts-num={ 4 } v-model={row.cTROE} disabled></cy-amount-input>
         </>
       )
     },
@@ -31,7 +31,7 @@ export function useRoeColumns() {
       showOverflowTooltip: true,
       cellRenderer: ({ index, row }) => (
         <>
-          <cy-amount-input v-model={row.mCROE} disabled></cy-amount-input>
+          <cy-amount-input dot-parts-num={ 4 } v-model={row.mCROE} disabled></cy-amount-input>
         </>
       )
     },
@@ -40,7 +40,7 @@ export function useRoeColumns() {
       showOverflowTooltip: true,
       cellRenderer: ({ index, row }) => (
         <>
-          <cy-amount-input v-model={row.aCROE} disabled></cy-amount-input>
+          <cy-amount-input dot-parts-num={ 4 } v-model={row.aCROE} disabled></cy-amount-input>
         </>
       )
     }

+ 7 - 0
src/views/dataSource/annualSetting/components/AnnualGoalAddContent.vue

@@ -47,6 +47,7 @@
         </cy-info-title>
         <el-form-item label="股东要求ROE(SH_ROE)" prop="sHROE">
           <cy-amount-input
+            :dot-parts-num="4"
             v-model="ruleForm.sHROE"
             unit="%"
             placeholder="请输入股东要求"
@@ -55,6 +56,7 @@
         </el-form-item>
         <el-form-item label="年末平均净资产(ANA)" prop="aNA">
           <cy-amount-input
+            :dot-parts-num="4"
             v-model="ruleForm.aNA"
             unit="元"
             disabled
@@ -65,6 +67,7 @@
         </cy-info-title>
         <el-form-item label="NP目标值" prop="nPTargetValue">
           <cy-amount-input
+            :dot-parts-num="4"
             v-model="ruleForm.nPTargetValue"
             unit="元"
             disabled
@@ -72,6 +75,7 @@
         </el-form-item>
         <el-form-item label="NP完成值" prop="nPCompleteValue">
           <cy-amount-input
+            :dot-parts-num="4"
             v-model="ruleForm.nPCompleteValue"
             unit="元"
             disabled
@@ -79,6 +83,7 @@
         </el-form-item>
         <el-form-item label="NP完成率" prop="nPCompleteRate">
           <cy-amount-input
+            :dot-parts-num="4"
             v-model="ruleForm.nPCompleteRate"
             unit="%"
             disabled
@@ -86,6 +91,7 @@
         </el-form-item>
         <el-form-item label="当年每月目标净利润(M_TNP)" prop="mTNP">
           <cy-amount-input
+            :dot-parts-num="4"
             v-model="ruleForm.mTNP"
             unit="元"
             disabled
@@ -93,6 +99,7 @@
         </el-form-item>
         <el-form-item label="年度目标净利润(Y_TNP)" prop="yTNP">
           <cy-amount-input
+            :dot-parts-num="4"
             v-model="ruleForm.yTNP"
             unit="元"
             disabled