duy 1 rok pred
rodič
commit
dde75c5f64

+ 17 - 10
src/views/debit-pay/material/book.vue

@@ -55,7 +55,7 @@ import { toPdfPage } from '~uti/btn-auth'
 const useAppState = useAppStore()
 const contractId = ref(useAppState.getContractId)
 const projectId = ref(useAppState.getProjectId)
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 defineOptions({
     name: 'DebitPayMaterialBook',
 })
@@ -162,16 +162,23 @@ const editRow = (row)=>{
     editType.value = 'edit'
     modalTitle.value = '材料预付款报表修改'
 }
-const delCilck = (row)=>{
-    delMessageV2(async (action, instance, done) => {
-            if (action === 'confirm') {
-                instance.confirmButtonLoading = true
-                removeProPay(row.id)
+const delCilck = async (row)=>{
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeProPay(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
                 instance.confirmButtonLoading = false
-                done()
-            } else {
-                done()
-            }
+            }, 300)
+        }, 300)
     })
 }
 //查看报表

+ 16 - 9
src/views/debit-pay/material/contract.vue

@@ -76,7 +76,7 @@ import { onActivated, onMounted, ref } from 'vue'
 import mainApi from '~api/debit-pay/material/contract.js'
 import { useAppStore } from '~src/store'
 import { deepClone, formValidate, getArrValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId)
 const contractId = ref(useAppState.getContractId)
@@ -193,15 +193,22 @@ const modalSave = async () => {
 
 }
 const delRowClick = async (row)=>{
-    delMessageV2(async (action, instance, done) => {
-            if (action === 'confirm') {
-                instance.confirmButtonLoading = true
-                removeCon(row.id)
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeCon(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
                 instance.confirmButtonLoading = false
-                done()
-            } else {
-                done()
-            }
+            }, 300)
+        }, 300)
     })
 }
 const removeCon = async (id) => {

+ 16 - 10
src/views/debit-pay/material/order.vue

@@ -111,9 +111,8 @@ import HcDataModal from './components/order/dataModal.vue'
 import mainApi from '~api/debit-pay/material/order.js'
 import periodApi from '~api/debit-pay/material/periods.js'
 import { getArrValue, getObjValue } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
 import { toPdfPage } from '~uti/btn-auth'
-
+import { HcDelMsg } from 'hc-vue3-ui'
 const useAppState = useAppStore()
 const contractId = ref(useAppState.getContractId)
 
@@ -243,15 +242,22 @@ const rowEditClick = (row) => {
 
 }
 const delRowClick = async (row)=>{
-    delMessageV2(async (action, instance, done) => {
-            if (action === 'confirm') {
-                instance.confirmButtonLoading = true
-                removeProPay(row.id)
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeProPay(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
                 instance.confirmButtonLoading = false
-                done()
-            } else {
-                done()
-            }
+            }, 300)
+        }, 300)
     })
 }
 const removeProPay = async (id) => {

+ 17 - 10
src/views/debit-pay/start-work/book.vue

@@ -54,7 +54,7 @@ import { formValidate, getArrValue, getObjValue } from 'js-fast-way'
 const useAppState = useAppStore()
 const contractId = ref(useAppState.getContractId)
 const projectId = ref(useAppState.getProjectId)
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 defineOptions({
     name: 'DebitPayMaterialBook',
@@ -166,16 +166,23 @@ const editRow = (row)=>{
     editType.value = 'edit'
     modalTitle.value = '开工预付款报表修改'
 }
-const delCilck = (row)=>{
-    delMessageV2(async (action, instance, done) => {
-            if (action === 'confirm') {
-                instance.confirmButtonLoading = true
-                removeProPay(row.id)
+const delCilck = async (row)=>{
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeProPay(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
                 instance.confirmButtonLoading = false
-                done()
-            } else {
-                done()
-            }
+            }, 300)
+        }, 300)
     })
 }
 

+ 16 - 9
src/views/debit-pay/start-work/order.vue

@@ -81,7 +81,7 @@ import HcDataModal from './components/order/dataModal.vue'
 import { getArrValue, getObjValue } from 'js-fast-way'
 import mainApi from '~api/debit-pay/start-work/order.js'
 import periodApi from '~api/debit-pay/material/periods.js'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 
 const useAppState = useAppStore()
@@ -209,15 +209,22 @@ const rowEditClick = (row) => {
     editId.value = row.id
 }
 const delRowClick = async (row)=>{
-    delMessageV2(async (action, instance, done) => {
-            if (action === 'confirm') {
-                instance.confirmButtonLoading = true
-                removeProPay(row.id)
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeProPay(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
                 instance.confirmButtonLoading = false
-                done()
-            } else {
-                done()
-            }
+            }, 300)
+        }, 300)
     })
 }
 const removeProPay = async (id) => {

+ 17 - 10
src/views/project/debit/contract/check-list.vue

@@ -313,7 +313,7 @@ import infoTable1 from './components/check-list/info-table1.vue'
 import { addNode, deleteNode, getDetail, getImportTemplate, getLazyFormTree, lockNode, sortForm, updateForm } from '~api/project/debit/contract/check-list.js'
 import { getDictionary } from '~api/other'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { isNumberReg } from '~uti/tools'
 import BigNumber from 'bignumber.js'
 import { toPdfPage } from '~uti/btn-auth'
@@ -553,16 +553,23 @@ const IchangeIsForm = (val)=>{
     }
 }
 //删除节点
-const delModalClick = () => {
-    delMessageV2(async (action, instance, done) => {
-            if (action === 'confirm') {
-                instance.confirmButtonLoading = true
-                removeContractTreeNode()
+const delModalClick = async () => {
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeContractTreeNode()
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
                 instance.confirmButtonLoading = false
-                done()
-            } else {
-                done()
-            }
+            }, 300)
+        }, 300)
     })
 }
 const removeContractTreeNode = async () => {

+ 17 - 10
src/views/project/debit/contract/components/unit/row-data.vue

@@ -191,7 +191,7 @@ import AddCheckList from './addCheckList.vue'
 import unitApi from '~api/project/debit/contract/unit.js'
 import { getDictionary } from '~api/other'
 import { formValidate, getArrValue, getObjValue, isArrIndex, isNullES } from 'js-fast-way'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import BigNumber from 'bignumber.js'
 
 const props = defineProps({
@@ -443,15 +443,22 @@ const getTreeNodeDetail = async ({ id }) => {
 }
 //删除
 const delRow = async (row, index) => {
-    delMessageV2(async (action, instance, done) => {
-        if (action === 'confirm') {
-            instance.confirmButtonLoading = true
-            await removeCon(row.id, index)
-            instance.confirmButtonLoading = false
-            done()
-        } else {
-            done()
-        }
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeCon(row.id, index)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
+                instance.confirmButtonLoading = false
+            }, 300)
+        }, 300)
     })
 }
 

+ 34 - 20
src/views/project/debit/contract/pay.vue

@@ -88,7 +88,7 @@ import rowDataInfo from './components/pay/row-data.vue'
 import payApi from '~api/project/debit/contract/pay.js'
 import { arrToId, getArrValue, getObjValue } from 'js-fast-way'
 import { useAppStore } from '~src/store'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 
 const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId)
@@ -220,15 +220,22 @@ const finishEditRow = () => {
     getTableData()
 }
 const delRowClick = async (row) => {
-    delMessageV2(async (action, instance, done) => {
-        if (action === 'confirm') {
-            instance.confirmButtonLoading = true
-            removeProPay(row.id)
-            instance.confirmButtonLoading = false
-            done()
-        } else {
-            done()
-        }
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeProPay(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
+                instance.confirmButtonLoading = false
+            }, 300)
+        }, 300)
     })
 }
 const removeProPay = async (id) => {
@@ -268,16 +275,23 @@ const addColloect = () => {
     selectArr.value = []
 }
 //删除汇总项
-const delCollectRow = (row) => {
-    delMessageV2(async (action, instance, done) => {
-        if (action === 'confirm') {
-            instance.confirmButtonLoading = true
-            removeCollectPay(row.id)
-            instance.confirmButtonLoading = false
-            done()
-        } else {
-            done()
-        }
+const delCollectRow = async (row) => {
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeCollectPay(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
+                instance.confirmButtonLoading = false
+            }, 300)
+        }, 300)
     })
 }
 const removeCollectPay = async (id) => {

+ 18 - 11
src/views/project/debit/contract/unit.vue

@@ -191,7 +191,7 @@ import unitApi from '~api/project/debit/contract/unit.js'
 import linkData from './components/unit/link-data.vue'
 import { useAppStore } from '~src/store'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { getDictionary } from '~api/other'
 import BigNumber from 'bignumber.js'
 import { getHeader } from 'hc-vue3-ui'
@@ -424,16 +424,23 @@ const handleLockNode = async () => {
     }
 }
 //删除节点
-const delModalClick = () => {
-    delMessageV2(async (action, instance, done) => {
-        if (action === 'confirm') {
-            instance.confirmButtonLoading = true
-            removeContractTreeNode()
-            instance.confirmButtonLoading = false
-            done()
-        } else {
-            done()
-        }
+const delModalClick = async () => {
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeContractTreeNode()
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
+                instance.confirmButtonLoading = false
+            }, 300)
+        }, 300)
     })
 }
 const removeContractTreeNode = async () => {

+ 35 - 20
src/views/project/debit/project/pay.vue

@@ -88,7 +88,7 @@ import rowDataInfo from './components/pay/row-data.vue'
 import payApi from '~api/project/debit/project/pay.js'
 import { arrToId, getArrValue, getObjValue } from 'js-fast-way'
 import { useAppStore } from '~src/store'
-import { delMessageV2 } from '~com/message/index.js'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { getDictionary } from '~api/other'
 
 const useAppState = useAppStore()
@@ -245,15 +245,22 @@ const finishEditRow = () => {
     getTableData()
 }
 const delRowClick = async (row) => {
-    delMessageV2(async (action, instance, done) => {
-        if (action === 'confirm') {
-            instance.confirmButtonLoading = true
-            removeProPay(row.id)
-            instance.confirmButtonLoading = false
-            done()
-        } else {
-            done()
-        }
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeProPay(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
+                instance.confirmButtonLoading = false
+            }, 300)
+        }, 300)
     })
 }
 const removeProPay = async (id) => {
@@ -293,16 +300,24 @@ const addColloect = () => {
     selectArr.value = []
 }
 //删除汇总项
-const delCollectRow = (row) => {
-    delMessageV2(async (action, instance, done) => {
-        if (action === 'confirm') {
-            instance.confirmButtonLoading = true
-            removeCollectPay(row.id)
-            instance.confirmButtonLoading = false
-            done()
-        } else {
-            done()
-        }
+const delCollectRow = async (row) => {
+
+    await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeCollectPay(row.id)
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
+                instance.confirmButtonLoading = false
+            }, 300)
+        }, 300)
     })
 }
 const removeCollectPay = async (id) => {

+ 18 - 10
src/views/project/debit/project/unit.vue

@@ -88,7 +88,8 @@ import unitApi from '~api/project/debit/project/unit.js'
 import { useAppStore } from '~src/store'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import { getDictionary } from '~api/other'
-import { delMessageV2 } from '~com/message/index.js'
+
+import { HcDelMsg } from 'hc-vue3-ui'
 const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId || '')
 //监听
@@ -354,16 +355,23 @@ const getTreeNodeDetail = async (node)=>{
     }
 }
 //删除节点
-const delModalClick = () => {
-    delMessageV2(async (action, instance, done) => {
-            if (action === 'confirm') {
-                instance.confirmButtonLoading = true
-                removeContractTreeNode()
+const delModalClick = async () => {
+        await HcDelMsg({
+        type: 'delete',
+        title: '确认删除提醒',
+        text: '请谨慎考虑后,确认是否需要删除?',
+        confirmText: '确认删除',
+        cancelText: '取消操作',
+    }, (instance, resolve) => {
+        instance.confirmButtonLoading = true
+        instance.confirmButtonText = 'Loading...'
+        removeContractTreeNode()
+        setTimeout(() => {
+            resolve() //关闭弹窗的回调
+            setTimeout(() => {
                 instance.confirmButtonLoading = false
-                done()
-            } else {
-                done()
-            }
+            }, 300)
+        }, 300)
     })
 }
 const removeContractTreeNode = async () => {