From d14994e10797ce5bc0d29668d358f7c5274dcc5b Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 15 四月 2026 15:46:17 +0800
Subject: [PATCH] 新增调用外部接口api

---
 ui/admin-ui3/src/views/cwgl/fundFlow/index.vue |   80 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 79 insertions(+), 1 deletions(-)

diff --git a/ui/admin-ui3/src/views/cwgl/fundFlow/index.vue b/ui/admin-ui3/src/views/cwgl/fundFlow/index.vue
index 6825e38..462f371 100644
--- a/ui/admin-ui3/src/views/cwgl/fundFlow/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/fundFlow/index.vue
@@ -14,6 +14,12 @@
         </el-button> -->
         <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['cwgl:fundFlow:export']">瀵煎嚭
         </el-button>
+          <el-button type="warning" plain icon="Upload" @click="handleImport"
+          v-hasPermi="['cwgl:fundFlow:import']">瀵煎叆
+        </el-button>
+        <el-button type="primary" plain icon="Refresh" @click="handleSync"
+          v-hasPermi="['cwgl:fundFlow:sync']">鍚屾閾惰娴佹按
+        </el-button>
       </template>
       <template #menu="{ size, row, index }">
         <el-link v-if="row.status == '0'" class="link-btn" type="primary" icon="Edit" :underline="false" :size="size"
@@ -43,12 +49,35 @@
     </avue-crud>
   </basicContainer>
   <OperationLogModal ref="logModalRef" />
+ <XlsFileImport title="璧勯噾娴佹按瀵煎叆" uploadUrl="/cwgl/fundFlow/importData" templateUrl="/cwgl/fundFlow/importTemplate"
+    :open="pageF.importOpen" @submit="importSubmit" @cancel="pageF.importOpen = false" />
 
   <ClaimBillDialog ref="claimDialogRef" @submit="handleClaimSubmit" />
+
+  <!-- 鍚屾閾惰娴佹按瀵硅瘽妗� -->
+  <el-dialog title="鍚屾閾惰娴佹按" v-model="syncDialogVisible" width="500px" append-to-body>
+    <el-form ref="syncFormRef" :model="syncForm" :rules="syncRules" label-width="100px">
+      <el-form-item label="璐﹀彿" prop="acctNum">
+        <el-input v-model="syncForm.acctNum" placeholder="璇疯緭鍏ラ摱琛岃处鍙�" clearable />
+      </el-form-item>
+      <el-form-item label="寮�濮嬫棩鏈�" prop="startDate">
+        <el-date-picker v-model="syncForm.startDate" type="date" value-format="YYYY-MM-DD"
+          placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" style="width: 100%" />
+      </el-form-item>
+      <el-form-item label="缁撴潫鏃ユ湡" prop="endDate">
+        <el-date-picker v-model="syncForm.endDate" type="date" value-format="YYYY-MM-DD"
+          placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" style="width: 100%" />
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <el-button @click="syncDialogVisible = false">鍙� 娑�</el-button>
+      <el-button type="primary" @click="handleSyncSubmit" :loading="syncLoading">纭� 瀹�</el-button>
+    </template>
+  </el-dialog>
 </template>
 
 <script setup name="fundFlow" lang="ts">
-import { FundFlowI, addFundFlow, delFundFlow, addFundFlowClaimDetailClaim, exportFundFlow, confirmFundFlow, getFundFlow, listFundFlow, updateFundFlow } from "@/api/cwgl/fundFlow";
+import { FundFlowI, addFundFlow, delFundFlow, addFundFlowClaimDetailClaim, exportFundFlow, confirmFundFlow, getFundFlow, listFundFlow, updateFundFlow, syncFromCmbs } from "@/api/cwgl/fundFlow";
 import useCurrentInstance from "@/utils/useCurrentInstance";
   import { listFundFlowLog} from "@/api/cwgl/fundFlowLog";
 
@@ -308,5 +337,54 @@
     }
   });
 }
+const handleImport = () => {
+  pageF.importOpen = true;
+}
+const importSubmit = () => {
+  pageF.importOpen = false;
+  onLoad(page.value);
+};
+
+// 鍚屾閾惰娴佹按
+const syncDialogVisible = ref(false);
+const syncLoading = ref(false);
+const syncFormRef = ref();
+const syncForm = reactive({
+  acctNum: '',
+  startDate: '',
+  endDate: ''
+});
+const syncRules = {
+  acctNum: [{ required: true, message: '璇疯緭鍏ラ摱琛岃处鍙�', trigger: 'blur' }],
+  startDate: [{ required: true, message: '璇烽�夋嫨寮�濮嬫棩鏈�', trigger: 'change' }],
+  endDate: [{ required: true, message: '璇烽�夋嫨缁撴潫鏃ユ湡', trigger: 'change' }]
+};
+
+const handleSync = () => {
+  syncForm.acctNum = '';
+  syncForm.startDate = '';
+  syncForm.endDate = '';
+  syncDialogVisible.value = true;
+};
+
+const handleSyncSubmit = () => {
+  syncFormRef.value?.validate((valid: boolean) => {
+    if (!valid) return;
+    syncLoading.value = true;
+    syncFromCmbs(syncForm).then((response: any) => {
+      syncLoading.value = false;
+      if (response.code === 200) {
+        proxy.$modal.msgSuccess(response.msg || '鍚屾鎴愬姛');
+        syncDialogVisible.value = false;
+        onLoad(page.value);
+      } else {
+        proxy.$modal.msgError(response.msg || '鍚屾澶辫触');
+      }
+    }).catch((err) => {
+      syncLoading.value = false;
+      proxy.$modal.msgError('鍚屾澶辫触: ' + (err.msg || err.message || ''));
+    });
+  });
+};
 /* listFundFlowClaimDetail */
 </script>

--
Gitblit v1.8.0