ZaiZai 1 rok temu
rodzic
commit
012f2b2848

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

@@ -153,7 +153,7 @@ import { nextTick, ref, watch } from 'vue'
 import { isNumberReg } from '~uti/tools'
 import HcBillBaseModal from './addBillBaseModal.vue'
 import qualityRleation from './qualityRleation.vue'
-import { arrDelKey, arrToId, arrToKey, deepClone, getArrValue, getObjValue, getRandom, getUUID, isArrIndex, isNullES } from 'js-fast-way'
+import { arrDelKey, arrToId, arrToKey, deepClone, getArrValue, getObjValue, getRandom, isArrIndex, isNullES } from 'js-fast-way'
 import BigNumber from 'bignumber.js'
 import { getHeader } from 'hc-vue3-ui'
 
@@ -273,11 +273,11 @@ const baseFormRules = {
     },
 }
 const isRelationData = ref(false)//是否管理质检资料
-const tableKey = ref(getUUID())
+const tableKey = ref(getRandom())
 //监听
 watch(() => baseForm.value.fileList, (list) => {
     console.log(list, 'list')
-    tableKey.value = getUUID()
+    tableKey.value = getRandom()
     // 验证数组中的对象是否包含名为 'selectId' 的字段
 const fieldName = 'selectId'
 
@@ -320,7 +320,7 @@ const getDataDetail = async () => {
     addTableData.value = getArrValue(res.formList)
     selectId.value = arrToKey(res.fileList, 'selectId', ',')
     addTableData.value.forEach((ele)=>{
-        ele.oldupPayRatio = ele.upPayRatio 
+        ele.oldupPayRatio = ele.upPayRatio
     })
 }
 
@@ -368,7 +368,7 @@ const getNodeDivide = async (nodeId) => {
  const getCurrentNodeAllFormData = async (nodeId) => {
     const { data } = await mainApi.getCurrentNodeAllForm({ contractId:  cid.value, contractPeriodId:baseForm.value.contractPeriodId, contractUnitId:nodeId })
  addTableData.value = getArrValue(data)
- 
+
 }
 
 //获取变更令
@@ -519,7 +519,7 @@ const compareRowUnpayRatio = (row, type)=>{
            let result = BigNumber(payRatio).plus(otherPayRatio)//本期支付比例+其他期支付比例
            const isComparedRa = result.comparedTo(upPayRatio)
            isComparedRaVal.value = isComparedRa
-          
+
             if (isComparedRa === 1 ) {
                 isCanSave.value = true
                 if (type === 1) {
@@ -527,10 +527,10 @@ const compareRowUnpayRatio = (row, type)=>{
                 } else if (type === 2) {
                     return isComparedRa
                 }
-        
+
         } else {
             isCanSave.value = false
-           
+
         }
 }
 const unPayRatioBlur = (row)=>{
@@ -545,7 +545,7 @@ const unPayRatioBlur = (row)=>{
          // 就去对比:本期支付比例+其他期支付比例
         //   是否大于最大支付比例
         compareRowUnpayRatio(row, 1)
-         
+
         //计算总计量金额
         let meterMoney = 0, table = addTableData.value
         for (let i = 0; i < table.length; i++) {
@@ -553,9 +553,9 @@ const unPayRatioBlur = (row)=>{
         }
         baseForm.value.meterMoney = meterMoney
 
-           
+
     })
-    
+
 }
 //判断是否红色
 const isCanSave = ref(false)
@@ -567,13 +567,13 @@ const addTableRowStyle = ({ row }) => {
       const isComparedRa = compareRowUnpayRatio(row, 2)
         if (isComparedRa === 1 ) {
             isCanSave.value = true
-          
+
             return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
-            
-        
+
+
         } else {
             isCanSave.value = false
-           
+
         }
     // 判断施工图数量是否大于合同数据
     //      大于:如果超计= 1并且 划分=1
@@ -640,7 +640,7 @@ const addBillBaseModalClick = () => {
     } else {
         window.$message.warning('请选择最底层节点')
     }
-    
+
     addBillBaseModalShow.value = true
     billBaseIds.value = arrToId(addTableData.value)
 }
@@ -764,7 +764,7 @@ const associateQual = ()=>{
     } else {
         window.$message.warning('请选择最底层节点')
     }
-    
+
 }
 const closeQual = ()=>{
     qualityMoadal.value = false
@@ -781,9 +781,9 @@ const finishModal = (rows, cancelcheck)=>{
             }
             fileList.push({
                 fileName:ele.dataName,
-                filePdfUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,	
+                filePdfUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,
                 fileType:1,
-                fileUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,	
+                fileUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,
                 selectId:ele.selectId,
             })
         }