Browse Source

确认按钮

skyblued 2 years ago
parent
commit
c3620e052c
1 changed files with 13 additions and 2 deletions
  1. 13 2
      src/school/approval-manage/subsidy/index.tsx

+ 13 - 2
src/school/approval-manage/subsidy/index.tsx

@@ -4,7 +4,7 @@ import styles from '../index.module.less'
 import iconA from '../images/icon-photo.png'
 import request from '@/helpers/request'
 import { state } from '@/state'
-import { useRoute } from 'vue-router'
+import { useRoute, useRouter } from 'vue-router'
 import OFullRefresh from '@/components/o-full-refresh'
 import OHeader from '@/components/o-header'
 import OSticky from '@/components/o-sticky'
@@ -13,6 +13,7 @@ export default defineComponent({
   name: 'approval-manage-subsidy',
   setup() {
     const route = useRoute()
+    const router = useRouter()
     const dialog = ref(false)
     const refreshing = ref(false)
     const data = reactive({
@@ -39,6 +40,16 @@ export default defineComponent({
     onMounted(() => {
       getData()
     })
+    /**确认补助 */
+    const sendConfirm = () => {
+      request
+        .post(`${state.platformApi}/choolWeekSalaryRecord/manageConfirmed/${route.query.salaryId}`)
+        .then((res: any) => {
+          if (res?.code == 200) {
+            router.back()
+          }
+        })
+    }
     return () => (
       <div>
         <OSticky
@@ -271,7 +282,7 @@ export default defineComponent({
         </OFullRefresh>
         <div class={styles.confirmBtn}>
           <div class="van-safe-area-bottom">
-            <Button block type="primary" round>
+            <Button block type="primary" round onClick={sendConfirm}>
               确认无误
             </Button>
           </div>