瀏覽代碼

收款记录

2545307760@qq.com 1 年之前
父節點
當前提交
5fe10051cb

+ 4 - 4
web/src/api/reimbursement.js

@@ -1,6 +1,6 @@
 import service from '@/utils/request'
 // 查询报销记录
-export const queryReimbursement = (code) => {
+export const queryReimburse = (code) => {
   return service({
     url: '/project/queryReimbursement',
     method: 'get',
@@ -10,7 +10,7 @@ export const queryReimbursement = (code) => {
   })
 }
 // 新增报销记录
-export const createReimbursement = (data) => {
+export const createReimburse = (data) => {
   return service({
     url: '/project/queryReimbursement',
     method: 'get',
@@ -18,7 +18,7 @@ export const createReimbursement = (data) => {
   })
 }
 // 修改报销记录
-export const updateReimbursement = (data) => {
+export const updateReimburse = (data) => {
   return service({
     url: '/project/updateReimbursement',
     method: 'put',
@@ -26,7 +26,7 @@ export const updateReimbursement = (data) => {
   })
 }
 // 删除报销记录
-export const deleteReimbursement = (data) => {
+export const deleteReimburse = (data) => {
   return service({
     url: '/project/deleteReimbursement',
     method: 'delete',

+ 46 - 0
web/src/pinia/collection/Collection.js

@@ -0,0 +1,46 @@
+import { defineStore } from 'pinia'
+import { reactive } from 'vue'
+import { createCollection, deleteCollection, queryCollection, updateCollection } from '@/api/collection'
+
+export const collectionOperate = defineStore('payment', () => {
+  // 定义数据
+  const paymentList = reactive([])
+  // 定义修改数据的方法
+  const getPaymentList = (code) => {
+    queryCollection(code).then(res => {
+      if (res.code === 0) {
+        paymentList.length = 0
+        paymentList.push(...res.data)
+        console.log(paymentList)
+      }
+    })
+  }
+  const postCollection = (data) => {
+    createCollection(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  const putCollection = (data) => {
+    updateCollection(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  const delCollection = (data) => {
+    deleteCollection(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  return {
+    paymentList,
+    getPaymentList,
+    postCollection,
+    putCollection,
+    delCollection
+  }
+})

+ 46 - 0
web/src/pinia/hour/Hour.js

@@ -0,0 +1,46 @@
+import { defineStore } from 'pinia'
+import { queryHour, createHour, updateHour, deleteHour } from '@/api/hour'
+import { reactive } from 'vue'
+
+export const hourOperate = defineStore('time', () => {
+  // 定义数据
+  const timeList = reactive([])
+  // 定义修改数据的方法
+  const getTimeList = (code) => {
+    queryHour(code).then(res => {
+      if (res.code === 0) {
+        timeList.length = 0
+        timeList.push(...res.data)
+        console.log(timeList)
+      }
+    })
+  }
+  const postTime = (data) => {
+    createHour(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  const putTime = (data) => {
+    updateHour(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  const delTime = (data) => {
+    deleteHour(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  return {
+    timeList,
+    getTimeList,
+    postTime,
+    putTime,
+    delTime
+  }
+})

+ 46 - 0
web/src/pinia/reimbursement/Reimbursement.js

@@ -0,0 +1,46 @@
+import { defineStore } from 'pinia'
+import { queryReimburse, createReimburse, updateReimburse, deleteReimburse } from '@/api/reimbursement'
+import { reactive } from 'vue'
+
+export const reimburseOperate = defineStore('account', () => {
+  // 定义数据
+  const reimburseList = reactive([])
+  // 定义修改数据的方法
+  const getReimburseList = (code) => {
+    queryReimburse(code).then(res => {
+      if (res.code === 0) {
+        reimburseList.length = 0
+        reimburseList.push(...res.data)
+        console.log(reimburseList)
+      }
+    })
+  }
+  const postReimburse = (data) => {
+    createReimburse(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  const putReimburse = (data) => {
+    updateReimburse(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  const delReimburse = (data) => {
+    deleteReimburse(data).then(res => {
+      if (res.code === 0) {
+        console.log(res.data)
+      }
+    })
+  }
+  return {
+    reimburseList,
+    getReimburseList,
+    postReimburse,
+    putReimburse,
+    delReimburse
+  }
+})

+ 8 - 4
web/src/view/finance/financeAnalysis/financeAnalysis.vue

@@ -16,7 +16,8 @@
             </el-row>
             <el-row style="height: 40px"></el-row>
           </el-col>
-          <el-col :span="4"></el-col>
+          <el-col :span="4">
+          </el-col>
           <el-col :span="4"></el-col>
         </el-row>
       </el-col>
@@ -112,10 +113,12 @@
 import { Menu, Search } from '@element-plus/icons-vue'
 import { ref, onMounted, reactive, computed } from 'vue'
 import { getProjectList, getProjectMessage } from '@/api/project'
+import { collectionOperate } from '@/pinia/collection/Collection'
 defineOptions({
   name: 'FinanceAnalysis'
 })
 // 数据
+const payment = collectionOperate()
 const listShow = ref(false)
 const condition = reactive({
   pageInfo: {
@@ -150,7 +153,9 @@ const projectList = (condition) => {
       const list = res.data.list
       projectTotal.value = res.data.total
       listData.push(...list)
-      console.log(list[0].code)
+      payment.getPaymentList(list[0].code)
+      getProjectMessage(list[0].code).then(res => {
+      })
     }
   })
 }
@@ -166,8 +171,7 @@ const changePage = (page) => {
   projectList(search)
 }
 
-const incomeExpenses = (code) => {
-}
+const incomeExpenses = (code) => {}
 </script>
 
 <style lang="scss" scoped>

+ 1 - 0
web/src/view/projectManage/projectDetails/projectDetails.vue

@@ -695,6 +695,7 @@ const headSelect = () => {
 
 //
 const changeUrgency = () => {
+  console.log(editData.level)
 }
 
 const changeFilePage = (value) => {