duy 1 жил өмнө
parent
commit
ce4ee1fb82

+ 4 - 8
src/views/debit-pay/material/book.vue

@@ -169,16 +169,12 @@ const delCilck = async (row)=>{
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeProPay(row.id)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeProPay(row.id)
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 //查看报表

+ 4 - 8
src/views/debit-pay/material/contract.vue

@@ -199,16 +199,12 @@ const delRowClick = async (row)=>{
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeCon(row.id)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeCon(row.id)
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 const removeCon = async (id) => {

+ 4 - 8
src/views/debit-pay/material/order.vue

@@ -248,16 +248,12 @@ const delRowClick = async (row)=>{
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeProPay(row.id)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeProPay(row.id)
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 const removeProPay = async (id) => {

+ 4 - 8
src/views/debit-pay/start-work/book.vue

@@ -173,16 +173,12 @@ const delCilck = async (row)=>{
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeProPay(row.id)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeProPay(row.id)
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 

+ 5 - 8
src/views/debit-pay/start-work/order.vue

@@ -215,17 +215,14 @@ const delRowClick = async (row)=>{
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeProPay(row.id)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeProPay(row.id)
+         instance.confirmButtonLoading = false
+         resolve()
     })
+    
 }
 const removeProPay = async (id) => {
     const { error, code, msg } = await mainApi.remove({

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

@@ -449,16 +449,12 @@ const delRow = async (row, index) => {
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeCon(row.id, index)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeCon(row.id, index)
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 

+ 8 - 16
src/views/project/debit/contract/pay.vue

@@ -226,16 +226,12 @@ const delRowClick = async (row) => {
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeProPay(row.id)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeProPay(row.id)
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 const removeProPay = async (id) => {
@@ -282,16 +278,12 @@ const delCollectRow = async (row) => {
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeCollectPay(row.id)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeCollectPay(row.id)
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 const removeCollectPay = async (id) => {

+ 4 - 8
src/views/project/debit/contract/unit.vue

@@ -431,16 +431,12 @@ const delModalClick = async () => {
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeContractTreeNode()
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeContractTreeNode()
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 const removeContractTreeNode = async () => {

+ 4 - 9
src/views/project/debit/project/pay.vue

@@ -301,23 +301,18 @@ const addColloect = () => {
 }
 //删除汇总项
 const delCollectRow = async (row) => {
-
     await HcDelMsg({
         type: 'delete',
         title: '确认删除提醒',
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeCollectPay(row.id)
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeCollectPay(row.id)
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 const removeCollectPay = async (id) => {

+ 4 - 8
src/views/project/debit/project/unit.vue

@@ -362,16 +362,12 @@ const delModalClick = async () => {
         text: '请谨慎考虑后,确认是否需要删除?',
         confirmText: '确认删除',
         cancelText: '取消操作',
-    }, (instance, resolve) => {
+    }, async (instance, resolve) => {
         instance.confirmButtonLoading = true
         instance.confirmButtonText = 'Loading...'
-        removeContractTreeNode()
-        setTimeout(() => {
-            resolve() //关闭弹窗的回调
-            setTimeout(() => {
-                instance.confirmButtonLoading = false
-            }, 300)
-        }, 300)
+         await removeContractTreeNode()
+         instance.confirmButtonLoading = false
+         resolve()
     })
 }
 const removeContractTreeNode = async () => {