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 |  103 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 102 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 edd98d5..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"
@@ -34,24 +40,53 @@
           :underline="false" :size="size" @click="handleDetails(row)" v-hasPermi="['cwgl:fundFlow:edit']">
           璁ら鏄庣粏
         </el-link>
+          <el-button type="text" icon="View" @click="handleFlow(row)"
+          v-hasPermi="['cwgl:fundFlow:flow']">鏃ュ織</el-button>
         <!-- <el-button type="text" icon="View" @click="handleFlow(row)"
           v-hasPermi="['cwgl:invoiceManage:flow']">鏃ュ織</el-button> -->
 
       </template>
     </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";
+
 import { computed, reactive, ref, toRefs } from "vue";
 import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
 import { usePagePlus } from "@/hooks/usePagePlus";
 import { hasPermission } from "@/utils/permissionUtils";
 import { listFundFlowClaimDetail } from "@/api/cwgl/fundFlowClaimDetail";
+import OperationLogModal from '@/components/OperationLogModal/index.vue';
 
 import ClaimBillDialog from "../../../components/ClaimBillDialog/index.vue";
 
@@ -129,6 +164,13 @@
     },
     transactionAmount: {
       label: '浜ゆ槗閲戦',
+         rules: [
+        {
+          required: true,
+          message: "浜ゆ槗閲戦涓嶈兘涓虹┖",
+          trigger: "blur"
+        }
+      ],
     },
     currency: {
       label: '浜ゆ槗甯佺',
@@ -285,5 +327,64 @@
   })
 
 };
+
+const logModalRef = ref(null);
+const handleFlow = (row: any,) => {
+  // 杩欓噷鍙互浠� row 涓洿鎺ヨ幏鍙栨棩蹇楋紝鎴栬�呰皟鐢ㄥ悗绔帴鍙f煡璇�
+  listFundFlowLog({flowId:row.id}).then((res) => {
+    if (res.code == 200) {
+     logModalRef.value.open(res.rows,'payable');
+    }
+  });
+}
+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