duy 1 год назад
Родитель
Сommit
918905ae65

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

@@ -150,7 +150,7 @@ import { getStoreValue } from '~src/utils/storage'
 import { isNumberReg } from '~uti/tools'
 import HcBillBaseModal from './addBillBaseModal.vue'
 import qualityRleation from './qualityRleation.vue'
-import { arrToId, arrToKey, deepClone, getArrValue, getObjValue, getRandom, 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'
 
@@ -532,7 +532,7 @@ const addBillBaseModalClick = () => {
         return
     }
     if ( isLastChild.value) {
-        qualityMoadal.value = true
+        addBillBaseModalShow.value = true
     } else {
         window.$message.warning('请选择最底层节点')
     }
@@ -664,6 +664,7 @@ const closeQual = ()=>{
     qualityMoadal.value = false
 }
 const finishModal = (rows)=>{
+    console.log(rows, 'rows')
     let fileList = []
     rows.forEach(ele => {
         const isPush = isArrIndex( baseForm.value.fileList, 'selectId', ele.selectId)
@@ -683,6 +684,15 @@ const finishModal = (rows)=>{
     baseForm.value.fileList.push(ele)
    })
 
+if (rows.length < baseForm.value.fileList.length) {
+    baseForm.value.fileList.forEach((ele)=>{
+        const isDel = isArrIndex( rows, 'selectId', ele.selectId)
+        if (!isDel && ele.selectId !== null) {
+            baseForm.value.fileList = arrDelKey( baseForm.value.fileList, 'selectId', ele.selectId) 
+        }
+    })
+}
+
    selectId.value = arrToKey( baseForm.value.fileList, 'selectId', ',')
 }
 </script>

+ 2 - 0
src/views/debit-pay/admin/components/middlepay/qualityRleation.vue

@@ -209,6 +209,8 @@ const saveQualModal = ()=>{
         emit('finish', tableKeys.value)
     } else {
         window.$message.warning('请先选择你要关联的质检资料')
+        emit('close')
+        emit('finish', tableKeys.value)
     }
     
 }