ZaiZai 1 рік тому
батько
коміт
d6c6f8ec4c

+ 4 - 1
src/views/debit-pay/admin/components/middlepay/addModal.vue

@@ -386,7 +386,10 @@ const containChangeTotalBlur = (row) => {
 
 //判断是否红色
 const addTableRowStyle = ({ row }) => {
-    if (row.allMeterTotal > row.changeTotal) {
+    let allMeterTotal = new BigNumber(row.allMeterTotal)
+    let changeTotal = new BigNumber(row.changeTotal)
+    const isCompared = allMeterTotal.comparedTo(changeTotal)
+    if (!isCompared || isCompared === 1) {
         return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
     }
 }