lxf 2 hónapja
szülő
commit
112200317f

+ 22 - 3
src/components/process/SendFunds.vue

@@ -123,9 +123,16 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column prop="zip" label="操作" width="100" align="center" v-if="formData.data.type !== '3'">
-            <template #default="{ $index }">
-              <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+          <el-table-column prop="zip" label="操作" width="160" align="center" v-if="formData.data.type !== '3'">
+            <template #default="{ row, $index }">
+              <div style="display: flex">
+                <el-form>
+                  <el-form-item>
+                    <el-button type="primary" link @click="handleAddFee(row)">添加部门费用</el-button>
+                  </el-form-item>
+                </el-form>
+                <el-button type="primary" link style="margin-left: 12px" @click="handleRemove($index)">删除</el-button>
+              </div>
             </template>
           </el-table-column>
         </el-table>
@@ -940,6 +947,18 @@ const generatePaymentRemarks = () => {
   }
   formData.data.paymentRemarks = proxy.deepClone(paymentRemarks);
 };
+const handleAddFee = (item) => {
+  let addData = {
+    deptId: "1508293745521586177",
+    currency: "CNY",
+    amount: item.amount * -1,
+    remarks: item.remarks,
+    status: 20,
+  };
+  proxy.post("accountDeptRunningWater/add", addData).then((res) => {
+    ElMessage({ message: "添加成功", type: "success" });
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 27 - 7
src/views/finance/fundManage/depExpenses/index.vue

@@ -1,7 +1,15 @@
 <template>
   <div class="tenant">
-    <!-- <Banner /> -->
     <div class="content">
+      <div style="margin-bottom: 20px; background-color: white; padding: 20px">
+        <el-button type="primary" @click="deriveExcel()">导出Excel</el-button>
+      </div>
+      <div style="margin-bottom: 20px; background-color: white; padding: 0 20px 20px 20px">
+        <div style="color: #000; font-size: 14px; font-weight: 700; height: 60px; line-height: 60px">统计</div>
+        <div style="background: #f5f3ff; padding: 20px">
+          <span style="color: #000; font-size: 14px; font-weight: bold">交易金额: {{ moneyTotal }}</span>
+        </div>
+      </div>
       <byTable
         :source="sourceList.data"
         :pagination="sourceList.pagination"
@@ -12,12 +20,6 @@
         :table-events="{
           select: select,
         }"
-        :action-list="[
-          {
-            text: '导出Excel',
-            action: () => deriveExcel(),
-          },
-        ]"
         @get-list="getList">
         <template #amount="{ item }">
           <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
@@ -28,6 +30,7 @@
         </template>
       </byTable>
     </div>
+
     <el-dialog title="拆分" v-if="dialogVisible" v-model="dialogVisible" width="800" v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #money>
@@ -200,6 +203,20 @@ const sourceList = ref({
     month: "",
   },
 });
+const moneyTotal = ref(0);
+const getTime = () => {
+  // 创建一个新的 Date 对象
+  const currentDate = new Date();
+  // 获取当前年份
+  const currentYear = currentDate.getFullYear();
+  // 获取当前月份(0-11)
+  const currentMonth = currentDate.getMonth() + 1; // 月份从0开始,所以需要加1
+  // 格式化月份,确保是个位数时前面加0
+  const formattedMonth = currentMonth < 10 ? `0${currentMonth}` : currentMonth;
+  sourceList.value.pagination.year = currentYear;
+  sourceList.value.pagination.month = formattedMonth;
+};
+getTime();
 let dialogVisible = ref(false);
 let modalType = ref("add");
 let rules = ref({
@@ -544,6 +561,9 @@ const getList = async (req) => {
       loading.value = false;
     }, 200);
   });
+  proxy.post("accountDeptRunningWater/totality", sourceList.value.pagination).then((res) => {
+    moneyTotal.value = res;
+  });
 };
 proxy.getDict(["account_currency"]).then((res) => {
   accountCurrency.value = res.account_currency.map((item) => {