Răsfoiți Sursa

中间计量修改

duy 1 an în urmă
părinte
comite
5218b04abd

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

@@ -291,7 +291,10 @@ if (containsField) {
 } else {
   isRelationData.value = false
   addTableData.value.forEach((ele)=>{
-    ele.upPayRatio = ele.oldupPayRatio || '0.00'
+    if (!ischangeByGetNode.value) {
+        ele.upPayRatio = ele.oldupPayRatio || '0.00'
+    }
+   
   })
 }
 nextTick(()=>{
@@ -355,6 +358,7 @@ const treeNodeTap = ({ data }) => {
     nodeId.value = data.id
     baseForm.value.contractUnitId = data.id
     baseForm.value.fileList = []
+    ischangeByGetNode.value = false
     getNodeDivide(data.id)
     getCurrentNodeAllFormData(data.id)
 }
@@ -372,7 +376,9 @@ const getNodeDivide = async (nodeId) => {
 }
 
 //获取变更令
+const ischangeByGetNode = ref(false)
 const getNodeToken = async () => {
+    ischangeByGetNode.value = true
     isLoading.value = true
     const { businessDate } = baseForm.value
     const { data } = await mainApi.getNodeToken({
@@ -671,6 +677,7 @@ const attachmentUpload = () => {
 }
 const attachmentUploadChange = (a, b, fileList) => {
     baseForm.value.fileList = getArrValue(fileList)
+    ischangeByGetNode.value = false
     selectId.value = arrToKey( baseForm.value.fileList, 'selectId', ',')
 }
 
@@ -709,6 +716,8 @@ const uploadFileSuccess = ({ echoParams, resData }) => {
         })
         uploadFileRef.value?.setModalShow(false)
     }
+    ischangeByGetNode.value = false
+
 }
 
 //保存
@@ -804,6 +813,7 @@ cancelcheck.forEach((ele)=>{
     })
 })
    selectId.value = arrToKey( baseForm.value.fileList, 'selectId', ',')
+   ischangeByGetNode.value = false
 
 }
 </script>