Browse Source

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

# Conflicts:
#	web/src/view/projectManage/projectDetails/projectDetails.vue
xuwenhao 8 months ago
parent
commit
feadffc209

+ 1 - 1
web/src/pinia/collection/Collection.js

@@ -11,7 +11,7 @@ export const collectionOperate = defineStore('payment', () => {
       if (res.code === 0) {
         paymentList.length = 0
         paymentList.push(...res.data)
-        console.log(paymentList)
+        // console.log(paymentList)
       }
     })
   }

+ 83 - 10
web/src/view/finance/financeAnalysis/financeAnalysis.vue

@@ -2,28 +2,86 @@
   <div>
     <el-row
       class="bg-white"
-      style="height: 80px"
+      style="height: 90px"
       align="middle"
     >
-      <el-col :span="4" class="flex justify-center">
+      <el-col
+        :span="4"
+        class="flex justify-center"
+      >
         <span class="analysisTitle">收支分析</span>
       </el-col>
       <el-col :span="14">
         <el-row>
-          <el-col :span="6">
-            <el-row style="height: 40px">
-              <el-text></el-text>
+          <el-col :span="8">
+            <el-row
+              justify="center"
+              align="middle"
+            >
+              <el-text
+                style="font-size: 20px;color: #409eff;"
+                tag="b"
+                :line-clamp="1"
+              >
+                {{ projectMessage.name }}
+              </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"
+              >
+                {{ projectAmount }}
+              </el-text>
+            </el-row>
+            <el-row
+              justify="center"
+              align="middle"
+              style="margin-top: 8px"
+            >
+              <el-text>项目金额</el-text>
             </el-row>
-            <el-row style="height: 40px"></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"
+              >
+                {{ projectMessage.name }}
+              </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-col>
         </el-row>
       </el-col>
       <el-col
-          :span="2"
-          :offset="4">
+        :span="2"
+        :offset="4"
+      >
         <el-button
           text
           :icon="Menu"
@@ -98,11 +156,11 @@
       </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"
-        v-model:current-page="condition.pageInfo.page"
         @change="changePage"
       />
     </el-drawer>
@@ -131,6 +189,8 @@ const condition = reactive({
 })
 const listData = reactive([])
 const projectTotal = ref(0)
+const projectMessage = reactive({})
+
 // 计算属性
 const buttonType = computed(() => (state) => {
   const obj = {
@@ -142,6 +202,16 @@ const buttonType = computed(() => (state) => {
   }
   return obj[state]
 })
+
+const projectAmount = computed(() => {
+  // const price = ref(parseInt(projectMessage.price))
+  const price = ref(482000)
+  if (price.value < 10000) {
+    return price.value + '元'
+  } else {
+    return (price.value / 10000).toFixed(4) + '万元'
+  }
+})
 // 方法
 onMounted(() => {
   projectList(condition)
@@ -155,6 +225,9 @@ const projectList = (condition) => {
       listData.push(...list)
       payment.getPaymentList(list[0].code)
       getProjectMessage(list[0].code).then(res => {
+        if (res.code === 0) {
+          Object.assign(projectMessage, res.data)
+        }
       })
     }
   })