From fea2d693c33fdbcb4c8304a96a4e584829cb437b Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期四, 29 一月 2026 17:25:30 +0800
Subject: [PATCH] 申请开票和开票记录,科目管理界面

---
 ui/admin-ui3/src/components/ClaimBillDialog/index.vue |   58 +++++++++++++++++++++++++++++++---------------------------
 1 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/ui/admin-ui3/src/components/ClaimBillDialog/index.vue b/ui/admin-ui3/src/components/ClaimBillDialog/index.vue
index aa0f5fe..744349a 100644
--- a/ui/admin-ui3/src/components/ClaimBillDialog/index.vue
+++ b/ui/admin-ui3/src/components/ClaimBillDialog/index.vue
@@ -36,12 +36,12 @@
         <el-descriptions-item label="寰呰棰嗛噾棰�">
           <span class="text-danger font-bold">{{ remainingAmountDr }}</span>
         </el-descriptions-item v-if="isViewMode">
-          <el-descriptions-item label="鍏宠仈璐﹀崟绫诲瀷">
-          <span  v-if="detail.incomeExpenseFlag == 0">
-            渚涘簲鍟�
-          </span>
-          <span  v-if="detail.incomeExpenseFlag == 1">
+        <el-descriptions-item label="鍏宠仈璐﹀崟绫诲瀷">
+          <span v-if="detail.incomeExpenseFlag == 0">
             瀹㈡埛
+          </span>
+          <span v-if="detail.incomeExpenseFlag == 1">
+            渚涘簲鍟�
           </span>
         </el-descriptions-item>
         <el-descriptions-item label="" :span="1"></el-descriptions-item>
@@ -158,6 +158,7 @@
 import { addFundFlowClaimDetailClaim } from "@/api/cwgl/fundFlow";
 import { delFundFlowClaimDetail, } from "@/api/cwgl/fundFlowClaimDetail";
 import { listFundFlowClaimDetail } from "@/api/cwgl/fundFlowClaimDetail";
+import { getFundFlow, } from "@/api/cwgl/fundFlow";
 
 const { proxy } = useCurrentInstance();
 const { sys_income_expenses } = proxy.useDict('sys_income_expenses');
@@ -260,7 +261,7 @@
 // --- 鏂板锛氳幏鍙栧垪琛ㄦ暟鎹殑鏂规硶 ---
 const getList = async () => {
   if (!detail.value.id) return;
-  
+
   loading.value = true;
   try {
     const res = await listFundFlowClaimDetail({
@@ -269,11 +270,11 @@
     });
     if (res.code === 200) {
       detail.value.claimDetails = res.rows;
-     detail.value.claimDetails.forEach((item: any) => {
-      if (item.$edit === undefined) {
-        item.$edit = false;
-      }
-    });
+      detail.value.claimDetails.forEach((item: any) => {
+        if (item.$edit === undefined) {
+          item.$edit = false;
+        }
+      });
       total.value = res.total;
     }
   } catch (error) {
@@ -282,8 +283,8 @@
     loading.value = false;
   }
 };
-const handleExport =()=>{
-  proxy.download("/cwgl/fundFlowClaimDetail/export",{...queryParams.value})
+const handleExport = () => {
+  proxy.download("/cwgl/fundFlowClaimDetail/export", { ...queryParams.value })
 }
 
 // 鎵撳紑寮圭獥
@@ -301,13 +302,6 @@
     // 鍙栧嚭绗竴鏉℃槑缁嗙殑鍏宠仈浼佷笟绫诲瀷
     const firstCompanyType = detail.value.claimDetails[0].relatedCompanyType;
 
-    if (firstCompanyType === '瀹㈡埛') {
-      billType.value = 'RECEIVABLE';
-    } else if (firstCompanyType === '渚涘簲鍟�') {
-      billType.value = 'PAYABLE';
-    }
-    // 濡傛灉鏈塈D锛屽垯璇锋眰鍚庣鏄庣粏鏁版嵁
-  
     // 纭繚宸叉湁鐨勬暟鎹涓嶄細鍙樻垚缂栬緫妯″紡
     getList()
   }
@@ -334,7 +328,7 @@
 // 淇敼鏂板琛岄�昏緫
 const handleAddRow = () => {
 
-  const defaultCompanyType = detail.value.incomeExpenseFlag == '0' ? '瀹㈡埛' : '渚涘簲鍟�';
+  const defaultCompanyType = detail.value.incomeExpenseFlag == 0 ? '瀹㈡埛' : '渚涘簲鍟�';
 
   // 鑾峰彇褰撳墠鏃堕棿鐨� YYYY-MM-DD HH:mm:ss 鏍煎紡
   const now = new Date();
@@ -390,7 +384,13 @@
   addFundFlowClaimDetailClaim(row, detail.value.id).then((response) => {
     if (response.code == 200) {
       proxy.$modal.msgSuccess("淇濆瓨鎴愬姛");
-      getList(); // 浣跨敤缁熶竴鐨� getList 鏂规硶
+      getFundFlow(detail.value.id).then((res) => {
+        if (res.code == 200) {
+          detail.value = res.data;
+          getList(); // 浣跨敤缁熶竴鐨� getList 鏂规硶
+
+        }
+      });
     }
   })
 };
@@ -400,8 +400,13 @@
     return delFundFlowClaimDetail(row.id);
   }).then((res) => {
     if (res.code == 200) {
-    proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-      getList(); // 浣跨敤缁熶竴鐨� getList 鏂规硶
+      getFundFlow(detail.value.id).then((res) => {
+        if (res.code == 200) {
+          detail.value = res.data;
+          getList(); // 浣跨敤缁熶竴鐨� getList 鏂规硶
+          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+        }
+      });
     }
 
 
@@ -424,7 +429,7 @@
 
 // 鍥炲~寮圭獥閫変腑鐨勬暟鎹�
 const receivablForm = (data: any) => {
-  const defaultCompanyType = billType.value === 'RECEIVABLE' ? '瀹㈡埛' : '渚涘簲鍟�';
+  const defaultCompanyType = detail.value.incomeExpenseFlag == 0 ? '瀹㈡埛' : '渚涘簲鍟�';
 
   if (currentRowIndex.value !== null && data) {
     const row = detail.value.claimDetails[currentRowIndex.value];
@@ -442,8 +447,7 @@
 };
 
 const accountsForm = (data: any) => {
-  const defaultCompanyType = billType.value === 'RECEIVABLE' ? '瀹㈡埛' : '渚涘簲鍟�';
-
+  const defaultCompanyType = detail.value.incomeExpenseFlag == 0 ? '瀹㈡埛' : '渚涘簲鍟�';
   if (currentRowIndex.value !== null && data) {
     const row = detail.value.claimDetails[currentRowIndex.value];
     row.billNo = data.systemNo

--
Gitblit v1.8.0