Forráskód Böngészése

合同计量单元修改

duy 1 éve
szülő
commit
5c4a697ab7

+ 4 - 3
src/views/project/debit/contract/components/unit/row-data.vue

@@ -131,7 +131,7 @@ import { isNumberReg } from '~uti/tools'
 import AddCheckList from './addCheckList.vue'
 import unitApi from '~api/project/debit/contract/unit.js'
 import { getDictionary } from '~api/other'
-import { getArrValue, isNullES } from 'js-fast-way'
+import { getArrValue, isArrIndex, isNullES } from 'js-fast-way'
 import { delMessageV2 } from '~com/message/index.js'
 import BigNumber from 'bignumber.js'
 
@@ -171,10 +171,10 @@ const tableRowStyle = ({ row }) => {
     //a 大于 b = 1,a 等于 b = 0,a 小于 b = -1, a 或 b 的值异常时 = null
     const isCompared = residueNum.comparedTo(contract)
     if (isCompared === -1 || isCompared === null) {
-        isCanSave.value = true
+        row.isCanSave = true
         return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
     } else {
-        isCanSave.value = false
+        row.isCanSave = false
     }
 }
 
@@ -306,6 +306,7 @@ const changeBuildPictureTotal = (row) => {
 }
 
 const modalSave = async () => {
+    isCanSave.value = isArrIndex(tableData.value, 'isCanSave', true)
     if (isCanSave.value) {
         window.$message.warning('累计分解量 > 合同变更后量,不允许修改')
         return