浏览代码

中间计量修改

duy 1 年之前
父节点
当前提交
ed52ede563
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/views/debit-pay/admin/components/middlepay/addModal.vue

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

@@ -291,13 +291,13 @@ if (containsField) {
 } else {
 } else {
   isRelationData.value = false
   isRelationData.value = false
   addTableData.value.forEach((ele)=>{
   addTableData.value.forEach((ele)=>{
-    ele.upPayRatio = ele.oldupPayRatio
+    ele.upPayRatio = ele.oldupPayRatio || 0
   })
   })
 }
 }
 // 判断数组中是否存在某个对象的 upPayRatio 字段值为 100
 // 判断数组中是否存在某个对象的 upPayRatio 字段值为 100
 const hasValue100 = addTableData.value.some(obj => obj.upPayRatio === 100)
 const hasValue100 = addTableData.value.some(obj => obj.upPayRatio === 100)
 nextTick(()=>{
 nextTick(()=>{
-    if (hasValue100 && (isComparedRaVal.value === 1 || isComparedRaVal.value === null)) {
+    if (hasValue100 && (isComparedRaVal.value === 1 )) {
         window.$message.warning('累计计量金额超出支付比列,如需计量100%,请完成关联对应的质保资料')
         window.$message.warning('累计计量金额超出支付比列,如需计量100%,请完成关联对应的质保资料')
     }
     }
 })
 })
@@ -501,7 +501,7 @@ const currentMeterTotalBlur = (row) => {
            console.log(isComparedRa, 'isCompared3333333')
            console.log(isComparedRa, 'isCompared3333333')
            isComparedRaVal.value = isComparedRa
            isComparedRaVal.value = isComparedRa
                // //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
                // //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
-        if (isComparedRa === 1 || isComparedRa === null) {
+        if (isComparedRa === 1 ) {
             isCanSave.value = true
             isCanSave.value = true
           
           
            window.$message.warning('累计计量金额超出支付比列,如需计量100%,请完成关联对应的质保资料')
            window.$message.warning('累计计量金额超出支付比列,如需计量100%,请完成关联对应的质保资料')
@@ -573,7 +573,7 @@ const unPayRatioBlur = (row)=>{
            console.log(payRatio, 'payRatio')
            console.log(payRatio, 'payRatio')
            console.log(isComparedRa, 'isComparedRa')
            console.log(isComparedRa, 'isComparedRa')
                // //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
                // //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
-        if (isComparedRa === 1 || isComparedRa === null) {
+        if (isComparedRa === 1 ) {
             isCanSave.value = true
             isCanSave.value = true
           
           
            window.$message.warning('累计计量金额超出支付比列,如需计量100%,请完成关联对应的质保资料')
            window.$message.warning('累计计量金额超出支付比列,如需计量100%,请完成关联对应的质保资料')
@@ -619,7 +619,7 @@ const addTableRowStyle = ({ row }) => {
            console.log(payRatio, 'payRatio')
            console.log(payRatio, 'payRatio')
            console.log(isComparedRa, 'isComparedRa333334444')
            console.log(isComparedRa, 'isComparedRa333334444')
                // //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
                // //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
-        if (isComparedRa === 1 || isComparedRa === null) {
+        if (isComparedRa === 1 ) {
             isCanSave.value = true
             isCanSave.value = true
           
           
             return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
             return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'