curry il y a 7 mois
Parent
commit
2bf960ce2c
1 fichiers modifiés avec 11 ajouts et 3 suppressions
  1. 11 3
      web/src/view/finance/costManage/components/detailList.vue

+ 11 - 3
web/src/view/finance/costManage/components/detailList.vue

@@ -499,9 +499,15 @@ const deleteCostType = () => {
     }
   )
     .then(() => {
-      deleteFeeGenre(costTypeSelect.value).then(res => {
+      const deleteId = {
+        id: costTypeSelect.value
+      }
+      deleteFeeGenre(deleteId).then(res => {
         if (res.code === 0) {
           ElMessage.success('删除成功')
+          getCostTypeList()
+          changeCostValue.value = ''
+          costTypeSelect.value = ''
         }
       })
     })
@@ -518,7 +524,6 @@ const editCostType = () => {
     return
   }
   if (costTypeSelect.value === '') {
-    console.log('新增类型')
     const createCost = {
       name: changeCostValue.value
     }
@@ -526,10 +531,11 @@ const editCostType = () => {
       if (res.code === 0) {
         ElMessage.success('新增类型成功')
         getCostTypeList()
+        changeCostValue.value = ''
+        costTypeSelect.value = ''
       }
     })
   } else {
-    console.log('编辑类型')
     const updateCost = {
       id: costTypeSelect.value,
       name: changeCostValue.value
@@ -538,6 +544,8 @@ const editCostType = () => {
       if (res.code === 0) {
         ElMessage.success('修改类型成功')
         getCostTypeList()
+        changeCostValue.value = ''
+        costTypeSelect.value = ''
       }
     })
   }