Przeglądaj źródła

feat:添加提示

snow 10 miesięcy temu
rodzic
commit
81d4222cb9

+ 5 - 1
src/components/PageContent/src/actions/action-delete.tsx

@@ -2,6 +2,7 @@ import { defineComponent } from "vue";
 import { actionProps } from "../types";
 import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 import { useResponseHandle } from "/@/hooks/core/useAsync";
+import { ElMessage } from "element-plus";
 
 const ActionDelete = defineComponent({
   name: "ActionDelete",
@@ -31,7 +32,10 @@ const ActionDelete = defineComponent({
       responseHandle({
         code,
         message,
-        handler: () => emit("reload")
+        handler: () => {
+          ElMessage.success('删除成功!');
+          emit("reload")
+        }
       });
     }
 

+ 6 - 1
src/components/PageContent/src/actions/action-status.tsx

@@ -3,6 +3,8 @@ import { actionProps } from "../types";
 import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 import { useResponseHandle } from "/@/hooks/core/useAsync";
 
+import { ElMessage } from "element-plus";
+
 const ActionStatus = defineComponent({
   name: "ActionDelete",
   props: {
@@ -38,7 +40,10 @@ const ActionStatus = defineComponent({
       responseHandle({
         code,
         message,
-        handler: () => emit("reload")
+        handler: () => {
+          ElMessage.success(props.row.status === '1' ? '禁用成功!' : '启用成功')
+          emit("reload")
+        }
       });
     }
 

+ 3 - 1
src/components/PageContent/src/actions/action-tag.tsx

@@ -14,7 +14,8 @@ import {
   ElInputNumber,
   ElOption,
   ElSelect,
-  ElTooltip
+  ElTooltip,
+  ElMessage
 } from "element-plus";
 
 const defaultFormData = {
@@ -89,6 +90,7 @@ const ActionTag = defineComponent({
 
     const { run: addtagRun, loading: addtagLoading } = useAsync({
       success: () => {
+        ElMessage.success('标签添加成功!')
         visible.value = false;
         emit("reload");
       }

+ 4 - 2
src/components/PageContent/src/actions/action-un-tag.tsx

@@ -15,7 +15,8 @@ import {
   ElOption,
   ElPopconfirm,
   ElSelect,
-  ElTooltip
+  ElTooltip,
+  ElMessage
 } from "element-plus";
 
 const defaultFormData = {
@@ -70,6 +71,7 @@ const ActionUnTag = defineComponent({
 
     const { run: addtagRun, loading: addtagLoading } = useAsync({
       success: () => {
+        ElMessage.success('标签解除成功!')
         visible.value = false;
         emit("reload");
       }
@@ -110,7 +112,7 @@ const ActionUnTag = defineComponent({
                 link
                 class="reset-margin"
                 type="default"
-                onClick={() => (visible.value = true)}
+                onClick={onAddTagWithCode}
                 icon={useRenderIcon(
                   coinIconTypes.includes(props.tagProps.type) ? "coin" : "stamp"
                 )}

+ 4 - 1
src/views/purchase/orderRecord/index.vue

@@ -23,7 +23,10 @@ const { push } = useRouter();
 const contentRef = ref<any>(null);
 
 const { run: revoke } = useAsync({
-  success: () => contentRef.value.onSearch()
+  success: () => {
+    ElMessage.success("撤销对账成功");
+    contentRef.value.onSearch();
+  }
 });
 
 const { hasPermissionWithCode } = usePermission("orderRecord");

+ 6 - 3
src/views/supply/orderRecord/index.vue

@@ -36,7 +36,10 @@ const events: PageEvents = {
 
 const contentRef = ref<any>(null);
 const { run: revoke } = useAsync({
-  success: () => contentRef.value.onSearch()
+  success: () => {
+    ElMessage.success('撤销对账成功!');
+    contentRef.value.onSearch()
+  }
 });
 
 //导出模板
@@ -96,7 +99,7 @@ async function onDownloadPayInfo() {
   });
 }
 
-const handleRevoke = ({payNo, pay_tag_id}) => {
+const handleRevoke = (props) => {
   if('pay_tag_id' in props && Number(props.pay_tag_id) !== 0){
     ElMessage.warning('请先解除付款标签再撤销对账单')
     return;
@@ -104,7 +107,7 @@ const handleRevoke = ({payNo, pay_tag_id}) => {
 
   revoke(
     httpStatus({
-      payNo,
+      payNo:props.payNo,
       status: "4"
     })
   );