2545307760@qq.com 1 éve
szülő
commit
9d1ff5965d

BIN
web/src/assets/expenses.png


+ 14 - 15
web/src/view/finance/costManage/components/detailList.vue

@@ -206,9 +206,9 @@
           <template #default="scope">
             <el-popover
               placement="top"
-              :width="200"
+              :width="300"
               trigger="click"
-              :content="scope.row.remarks"
+              :content="scope.row.expenseDetail"
             >
               <template #reference>
                 <el-button
@@ -216,7 +216,7 @@
                   type="primary"
                   :icon="Notebook"
                 >
-                  备注
+                  明细
                 </el-button>
               </template>
             </el-popover>
@@ -288,17 +288,13 @@
           </el-select>
         </el-form-item>
         <el-form-item label="支入金额:">
-          <el-input
+          <el-input-number
             v-model="editData.depositAmount"
-            placeholder="请输入支入金额"
-            oninput="value=value.replace(/[^\d.]/g,'')"
           />
         </el-form-item>
         <el-form-item label="支出金额:">
-          <el-input
+          <el-input-number
             v-model="editData.expenditureAmount"
-            placeholder="请输入支出金额"
-            oninput="value=value.replace(/[^\d.]/g,'')"
           />
         </el-form-item>
         <el-form-item label="时间:">
@@ -345,14 +341,16 @@
         <el-form-item label="费用明细:">
           <el-input
             v-model="editData.expenseDetail"
+            type="textarea"
+            :rows="8"
+            :maxlength="400"
+            show-word-limit
             placeholder="请填写费用明细"
           />
         </el-form-item>
         <el-form-item label="余额:">
-          <el-input
+          <el-input-number
             v-model="editData.thenBalance"
-            placeholder="请填写余额(选填)"
-            oninput="value=value.replace(/[^\d.]/g,'')"
           />
         </el-form-item>
       </el-form>
@@ -643,6 +641,7 @@ const getCostList = (nameId, typeID, itemId) => {
   })
 }
 const costEdit = (row) => {
+  console.log(row)
   editDrawerShow.value = true
   drawerType.value = 'edit'
   drawerTitle.value = '编辑费用'
@@ -653,10 +652,10 @@ const costEdit = (row) => {
   editData.depositAmount = row.depositAmount
   editData.feeTime = row.feeTime
   editData.genre = row.genre
-  editData.projectId = row.projectId
   editData.expenseDetail = row.expenseDetail
   editData.remarks = row.remarks
   editData.thenBalance = row.thenBalance
+  editData.projectId = row.project.ID
 }
 const costDelete = (row) => {
   ElMessageBox.confirm(
@@ -690,11 +689,11 @@ const addDetailRecord = () => {
   const initialData = {
     id: 0,
     reimburser: userList[0].ID,
-    departmentId: projectList[0].name,
+    departmentId: departmentList[0].ID,
     expenditureAmount: 0,
     depositAmount: 0,
     feeTime: '',
-    genre: 0,
+    genre: costTypeList[0].ID,
     projectId: 0,
     expenseDetail: '',
     remarks: '',

+ 89 - 40
web/src/view/finance/financeAnalysis/financeAnalysis.vue

@@ -4,16 +4,21 @@
       class="bg-white"
       style="height: 80px"
       align="middle"
+      justify="space-around"
     >
       <el-col
         :span="4"
-        class="flex justify-center"
+        class="flex align-center justify-around"
       >
-        <span class="analysisTitle">收支分析</span>
+        <el-image
+          :src="expense"
+          style="width: 50px;height: 50px"
+        />
+        <el-text style="font-size: 20px;font-weight: 550;color: #409eff">收支分析</el-text>
       </el-col>
-      <el-col :span="13">
+      <el-col :span="20">
         <el-row>
-          <el-col :span="10">
+          <el-col :span="6">
             <el-row
               justify="center"
               align="middle"
@@ -34,7 +39,7 @@
               <el-text>项目名称</el-text>
             </el-row>
           </el-col>
-          <el-col :span="7">
+          <el-col :span="4">
             <el-row
               justify="center"
               align="middle"
@@ -55,7 +60,7 @@
               <el-text>项目金额</el-text>
             </el-row>
           </el-col>
-          <el-col :span="7">
+          <el-col :span="4">
             <el-row
               justify="center"
               align="middle"
@@ -76,23 +81,50 @@
               <el-text>项目收款</el-text>
             </el-row>
           </el-col>
+<!--          <el-col :span="4">-->
+<!--            <el-row-->
+<!--              justify="center"-->
+<!--              align="middle"-->
+<!--            >-->
+<!--              <el-text-->
+<!--                style="font-size: 20px;color: #409eff;"-->
+<!--                tag="b"-->
+<!--                :line-clamp="1"-->
+<!--              >-->
+<!--                {{ collectionAmount }}-->
+<!--              </el-text>-->
+<!--            </el-row>-->
+<!--            <el-row-->
+<!--              justify="center"-->
+<!--              align="middle"-->
+<!--              style="margin-top: 8px"-->
+<!--            >-->
+<!--              <el-text>项目报销</el-text>-->
+<!--            </el-row>-->
+<!--          </el-col>-->
+<!--          <el-col :span="4">-->
+<!--            <el-row-->
+<!--              justify="center"-->
+<!--              align="middle"-->
+<!--            >-->
+<!--              <el-text-->
+<!--                style="font-size: 20px;color: #409eff;"-->
+<!--                tag="b"-->
+<!--                :line-clamp="1"-->
+<!--              >-->
+<!--                {{ collectionAmount }}-->
+<!--              </el-text>-->
+<!--            </el-row>-->
+<!--            <el-row-->
+<!--              justify="center"-->
+<!--              align="middle"-->
+<!--              style="margin-top: 8px"-->
+<!--            >-->
+<!--              <el-text>项目工时</el-text>-->
+<!--            </el-row>-->
+<!--          </el-col>-->
         </el-row>
       </el-col>
-      <el-col
-        :span="3"
-        :offset="4"
-        class="flex justify-center"
-      >
-        <el-button
-          text
-          :icon="Menu"
-          size="large"
-          style="font-size: 18px"
-          @click="listShow = true"
-        >
-          项目列表
-        </el-button>
-      </el-col>
     </el-row>
     <el-row
       class="mt-5"
@@ -114,12 +146,12 @@
           >
             <Hour ref="hourOut" />
           </el-tab-pane>
-          <el-tab-pane
-            label="费用报销"
-            :name="2"
-          >
-            <Reimburse ref="reimburseOut" />
-          </el-tab-pane>
+<!--          <el-tab-pane-->
+<!--            label="费用报销"-->
+<!--            :name="2"-->
+<!--          >-->
+<!--            <Reimburse ref="reimburseOut" />-->
+<!--          </el-tab-pane>-->
           <el-tab-pane
             label="项目收款"
             :name="3"
@@ -133,8 +165,9 @@
           style="width: 97%;margin-left: 3%;height: 680px"
           class="bg-white"
         >
+          <div style="height: 20px" />
           <el-form @submit.prevent>
-            <el-row style="padding-top: 20px">
+            <el-row style="height: 45px">
               <el-col
                 :span="22"
                 :offset="1"
@@ -193,11 +226,11 @@
               </el-row>
             </div>
           </el-form>
-          <el-row style="margin-top: 10px;">
+          <el-row>
             <el-col
               :span="22"
               :offset="1"
-              class="flex justify-end"
+              class="flex justify-end align-center"
             >
               <el-pagination
                 v-show="projectTotal > 6"
@@ -217,13 +250,14 @@
 </template>
 
 <script setup>
-import { Menu, Search } from '@element-plus/icons-vue'
+import { Search } from '@element-plus/icons-vue'
 import { computed, onMounted, reactive, ref } from 'vue'
 import { getProjectList, getProjectMessage, queryProjectExpense } from '@/api/project'
+import { peopleCost } from '@/api/cost'
 // import iconCollection from '@/assets/Collection.png'
 // import iconAmount from '@/assets/amount.png'
 import Hour from './components/hour.vue'
-import Reimburse from './components/reimburse.vue'
+// import Reimburse from './components/reimburse.vue'
 // 引入pinia
 import { collectionOperate } from '@/pinia/collection/Collection'
 import { codeOperate } from '@/pinia/code/code'
@@ -231,7 +265,7 @@ import { reimburseOperate } from '@/pinia/reimbursement/Reimbursement'
 import { hourOperate } from '@/pinia/hour/Hour'
 // eslint-disable-next-line no-unused-vars
 import Payment from '@/view/finance/financeAnalysis/components/payment.vue'
-
+import expense from '@/assets/expenses.png'
 defineOptions({
   name: 'FinanceAnalysis'
 })
@@ -240,8 +274,6 @@ const payment = collectionOperate()
 const symbol = codeOperate()
 const submit = reimburseOperate()
 const hour = hourOperate()
-
-const listShow = ref(false)
 const condition = reactive({
   pageInfo: {
     page: 1,
@@ -301,9 +333,28 @@ const projectList = (condition) => {
       listData.push(...list)
       symbol.changeCode(list[0].code)
       getMainMessage(list[0].code)
+      getReimburseList(list[0].ID)
     }
   })
 }
+
+const getReimburseList = (id) => {
+  const condition = {
+    pageInfo: {
+      page: 1,
+      pageSize: 8,
+    },
+    reimburser: 0,
+    projectId: id,
+    genre: 0,
+    dayTime: '',
+    monthTime: '',
+    yearTime: ''
+  }
+  peopleCost(condition).then(res => {
+    console.log(res)
+  })
+}
 const nameSearch = () => {
   condition.pageInfo.page = 1
   projectList(condition)
@@ -314,7 +365,6 @@ const changePage = (page) => {
   getProjectList(condition).then(res => {
     if (res.code === 0) {
       const list = res.data.list
-      console.log(res.data.total)
       projectTotal.value = res.data.total
       listData.push(...list)
     }
@@ -326,24 +376,23 @@ const changeSort = () => {}
 const incomeExpenses = (code) => {
   symbol.changeCode(code)
   getMainMessage(code)
-  listShow.value = false
 }
 
 const paymentOut = ref()
-const reimburseOut = ref()
+// const reimburseOut = ref()
 const hourOut = ref()
 
 const getMainMessage = (code) => {
   queryProjectExpense(code).then(res => {
     if (res.code === 0) {
       const summaryData = res.data
-      console.log(summaryData)
       const sumList = summaryData.collection
       let sum = 0
       sumList.forEach(item => {
         sum += parseFloat(item.collectionPrice)
       })
       projectSum.value = sum
+      // 收款
       payment.changePaymentList(summaryData.collection)
       payment.changePaymentTotal(summaryData.collectionTotal)
       submit.changeReimburseList(summaryData.reimbursement)
@@ -359,7 +408,7 @@ const getMainMessage = (code) => {
         people: 0
       })
       paymentOut.value.outsideChangePage()
-      reimburseOut.value.outsideChangePage()
+      // reimburseOut.value.outsideChangePage()
       hourOut.value.outsideChangePage()
     }
   })