Преглед изворни кода

Merge remote-tracking branch 'origin/dev' into dev

xuwenhao пре 7 месеци
родитељ
комит
2bee563ec4

+ 11 - 9
web/src/view/finance/costManage/components/detailList.vue

@@ -464,13 +464,13 @@ const projectSelect = ref('')
 const editDrawerShow = ref(false)
 const editData = reactive({
   id: 0,
-  reimburser: 1,
-  departmentId: 1,
+  reimburser: 0,
+  departmentId: 0,
   expenditureAmount: 0,
   depositAmount: 0,
   feeTime: '',
-  genre: 1,
-  projectId: 1,
+  genre: 0,
+  projectId: 0,
   expenseDetail: '',
   remarks: '',
   thenBalance: 0
@@ -593,6 +593,7 @@ const getCostTypeList = () => {
   queryExpensesGenre().then(res => {
     if (res.code === 0) {
       costTypeList.length = 0
+      console.log('费用类型列表', res.data)
       costTypeList.push(...res.data)
     }
   })
@@ -602,6 +603,7 @@ const queryProjectList = () => {
   getAllProject().then(res => {
     if (res.code === 0) {
       projectList.length = 0
+      console.log('项目列表', res.data)
       projectList.push(...res.data)
     }
   })
@@ -632,7 +634,7 @@ const getCostList = (nameId, typeID, itemId) => {
   queryCostList(condition).then(res => {
     if (res.code === 0) {
       costList.length = 0
-      console.log(res.data)
+      console.log('费用列表', res.data)
       if (res.data.list !== null) {
         costList.push(...res.data.list)
       }
@@ -687,13 +689,13 @@ const costDelete = (row) => {
 const addDetailRecord = () => {
   const initialData = {
     id: 0,
-    reimburser: 1,
-    departmentId: 1,
+    reimburser: userList[0].ID,
+    departmentId: projectList[0].name,
     expenditureAmount: 0,
     depositAmount: 0,
     feeTime: '',
-    genre: 1,
-    projectId: 1,
+    genre: 0,
+    projectId: 0,
     expenseDetail: '',
     remarks: '',
     thenBalance: 0

+ 8 - 8
web/src/view/finance/costManage/costManage.vue

@@ -6,16 +6,16 @@
       @tab-click="handleClick"
     >
       <el-tab-pane
-        label="人员费用列表"
-        name="people"
+        label="详情费用列表"
+        name="detail"
       >
-        <PeopleList/>
+        <DetailList />
       </el-tab-pane>
       <el-tab-pane
-        label="详情费用列表"
-        name="detail"
+        label="人员费用列表"
+        name="people"
       >
-        <DetailList/>
+        <PeopleList />
       </el-tab-pane>
     </el-tabs>
   </div>
@@ -24,11 +24,11 @@
 <script setup>
 import { ref } from 'vue'
 import DetailList from '@/view/finance/costManage/components/detailList.vue'
-import PeopleList from '@/view/finance/costManage/components/peopleList.vue';
+import PeopleList from '@/view/finance/costManage/components/peopleList.vue'
 defineOptions({
   name: 'CostManage'
 })
-const activeName = ref('people')
+const activeName = ref('detail')
 const handleClick = () => {}
 </script>
 

+ 1 - 0
web/src/view/finance/financeAnalysis/components/payment.vue

@@ -359,6 +359,7 @@ const paymentAdd = () => {
       })
       addAmount.value = ''
       paymentAddData.collectionTime = ''
+      paymentAddData.remarks = ''
       pay.getPaymentList(reset)
       paymentAddShow.value = false
     }

+ 94 - 112
web/src/view/finance/financeAnalysis/financeAnalysis.vue

@@ -112,13 +112,13 @@
             label="实施工时"
             :name="1"
           >
-            <Hour ref="hourOut"/>
+            <Hour ref="hourOut" />
           </el-tab-pane>
           <el-tab-pane
             label="费用报销"
             :name="2"
           >
-            <Reimburse ref="reimburseOut"/>
+            <Reimburse ref="reimburseOut" />
           </el-tab-pane>
           <el-tab-pane
             label="项目收款"
@@ -129,122 +129,96 @@
         </el-tabs>
       </el-col>
       <el-col :span="8">
-        <div style="width: 97%;margin-left: 3%">
-          <el-row justify="space-between">
-            <el-col
-              :span="11"
-              class="bg-white"
-              style="height: 150px"
-            />
-            <el-col
-              :span="11"
-              class="bg-white"
-              style="height: 150px"
-            />
-          </el-row>
-          <el-row
-            justify="space-between"
-            style="margin-top: 20px"
-          >
-            <el-col
-              :span="11"
-              class="bg-white"
-              style="height: 150px"
-            />
-            <el-col
-              :span="11"
-              class="bg-white"
-              style="height: 150px"
-            />
-          </el-row>
-          <el-row
-            justify="space-between"
-            style="margin-top: 20px"
-          >
-            <el-col
-              :span="11"
-              class="bg-white"
-              style="height: 150px"
-            />
+        <div
+          style="width: 97%;margin-left: 3%;height: 680px"
+          class="bg-white"
+        >
+          <el-form @submit.prevent>
+            <el-row style="padding-top: 20px">
+              <el-col
+                :span="22"
+                :offset="1"
+              >
+                <el-form-item>
+                  <el-input
+                    v-model="condition.name"
+                    :suffix-icon="Search"
+                    placeholder="请输入项目名称"
+                    size="large"
+                    clearable
+                    @keyup.enter="nameSearch"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <div style="height: 500px">
+              <el-row
+                v-for="item in listData"
+                :key="item.ID"
+                style="height: 70px;margin-top: 12px"
+                align="middle"
+              >
+                <el-col
+                  :span="16"
+                  :offset="1"
+                >
+                  <el-row style="height: 40px">
+                    <el-text
+                      style="font-size: 18px"
+                      :line-clamp="1"
+                      tag="b"
+                    >{{ item.name }}</el-text>
+                  </el-row>
+                  <el-row style="height: 30px">
+                    <el-text
+                      :line-clamp="1"
+                      style="font-size: 12px;"
+                      type="info"
+                    >
+                      负责人:{{ item.principal }}
+                    </el-text>
+                  </el-row>
+                </el-col>
+                <el-col
+                  :span="6"
+                  class="flex justify-end"
+                >
+                  <el-button
+                    :type="buttonType(item.state)"
+                    round
+                    size="large"
+                    @click="incomeExpenses(item.code)"
+                  >收支信息</el-button>
+                </el-col>
+              </el-row>
+            </div>
+          </el-form>
+          <el-row style="margin-top: 10px;">
             <el-col
-              :span="11"
-              class="bg-white"
-              style="height: 150px"
-            />
+              :span="22"
+              :offset="1"
+              class="flex justify-end"
+            >
+              <el-pagination
+                v-show="projectTotal > 6"
+                v-model:current-page="condition.pageInfo.page"
+                background
+                layout="prev, pager, next"
+                :total="projectTotal"
+                :page-size="6"
+                @change="changePage"
+              />
+            </el-col>
           </el-row>
         </div>
       </el-col>
     </el-row>
-    <el-drawer
-      v-model="listShow"
-      direction="ltr"
-      title="项目列表"
-      size="25%"
-    >
-      <el-form @submit.prevent>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item>
-              <el-input
-                v-model="condition.name"
-                :suffix-icon="Search"
-                placeholder="请输入项目名称"
-                size="large"
-                clearable
-                @keyup.enter="nameSearch"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row
-          v-for="item in listData"
-          :key="item.ID"
-          style="height: 80px"
-          align="middle"
-        >
-          <el-col :span="17">
-            <el-row style="height: 45px">
-              <el-text
-                size="large"
-                :line-clamp="1"
-                tag="b"
-              >{{ item.name }}</el-text>
-            </el-row>
-            <el-row style="height: 35px">
-              <el-text :line-clamp="1">
-                负责人:{{ item.principal }}
-              </el-text>
-            </el-row>
-          </el-col>
-          <el-col
-            :span="7"
-            class="flex justify-center"
-          >
-            <el-button
-              :type="buttonType(item.state)"
-              round
-              size="large"
-              @click="incomeExpenses(item.code)"
-            >收支信息</el-button>
-          </el-col>
-        </el-row>
-      </el-form>
-      <el-pagination
-        v-show="projectTotal > 8"
-        v-model:current-page="condition.pageInfo.page"
-        background
-        layout="prev, pager, next"
-        :total="projectTotal"
-        :page-size="8"
-        @change="changePage"
-      />
-    </el-drawer>
   </div>
 </template>
 
 <script setup>
 import { Menu, Search } from '@element-plus/icons-vue'
-import { ref, onMounted, reactive, computed } from 'vue'
+import { computed, onMounted, reactive, ref } from 'vue'
 import { getProjectList, getProjectMessage, queryProjectExpense } from '@/api/project'
 // import iconCollection from '@/assets/Collection.png'
 // import iconAmount from '@/assets/amount.png'
@@ -271,7 +245,7 @@ const listShow = ref(false)
 const condition = reactive({
   pageInfo: {
     page: 1,
-    pageSize: 8
+    pageSize: 6
   },
   name: '',
   time: '',
@@ -335,9 +309,16 @@ const nameSearch = () => {
   projectList(condition)
 }
 const changePage = (page) => {
-  const search = condition
-  search.pageInfo.page = page
-  projectList(search)
+  condition.pageInfo.page = page
+  listData.length = 0
+  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)
+    }
+  })
 }
 
 const changeSort = () => {}
@@ -356,6 +337,7 @@ 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 => {