Ver código fonte

修改小问题

余思翰 4 meses atrás
pai
commit
48a81f0a07

+ 10
- 3
oa-ui/src/api/oa/contract/contract.js Ver arquivo

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:09
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-19 14:46:44
5
+ * @LastEditTime: 2024-12-20 09:37:59
6 6
  */
7 7
 import request from '@/utils/request'
8 8
 
@@ -48,10 +48,17 @@ export function delContract(contractId) {
48 48
     method: 'delete'
49 49
   })
50 50
 }
51
-
51
+// 合同统计
52
+export function getContractStatistic(query) {
53
+  return request({
54
+    url: '/oa/contract/statistic/',
55
+    method: 'get',
56
+    params: query
57
+  })
58
+}
52 59
 
53 60
 // 合同统计
54
-export function getContractStatistic(contractId) {
61
+export function getContractStatisticById(contractId) {
55 62
   return request({
56 63
     url: '/oa/contract/statistic/' + contractId,
57 64
     method: 'get',

+ 1
- 3
oa-ui/src/views/contractStatistic/components/borrowStatistic.vue Ver arquivo

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-12-16 17:29:35
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-19 14:29:55
5
+ * @LastEditTime: 2024-12-19 16:51:05
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -118,8 +118,6 @@ export default {
118 118
       this.loading = false
119 119
     },
120 120
     rowClickFn(row) {
121
-      console.log(row);
122
-
123 121
       this.taskForm.formId = row.borrowId
124 122
       this.infoOpen = true;
125 123
     }

+ 1
- 0
oa-ui/src/views/contractStatistic/components/budgetStatistic.vue Ver arquivo

@@ -4,6 +4,7 @@
4 4
       预算列表
5 5
     </div>
6 6
     <el-table v-loading="loading" :data="budgetList" height="350px">
7
+      <el-table-column label="序号" type="index"></el-table-column>
7 8
       <el-table-column label="项目编号" align="center" prop="project.projectNumber" />
8 9
       <el-table-column label="编制人" align="center" prop="compiler">
9 10
         <template slot-scope="scope">

+ 7
- 3
oa-ui/src/views/contractStatistic/index.vue Ver arquivo

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-12-16 10:25:17
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-19 16:16:51
5
+ * @LastEditTime: 2024-12-20 10:37:08
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -124,7 +124,7 @@
124 124
   </div>
125 125
 </template>
126 126
 <script>
127
-import { listContract, getContractStatisticSortByField, getContractStatistic } from "@/api/oa/contract/contract";
127
+import { listContract, getContractStatisticSortByField, getContractStatisticById } from "@/api/oa/contract/contract";
128 128
 import { listProjectContract } from "@/api/oa/contract/projectContract";
129 129
 import SubStatistic from './components/subStatistic.vue';
130 130
 import BorrowStatistic from "./components/borrowStatistic.vue";
@@ -179,6 +179,7 @@ export default {
179 179
         if (res.total != 0) {
180 180
           this.contract = this.contractList[0];
181 181
           this.getContractProject(this.contract.contractId);
182
+          this.getStatistic(this.contract.contractId);
182 183
         }
183 184
       })
184 185
     },
@@ -189,8 +190,11 @@ export default {
189 190
       this.loading = true
190 191
       this.status = 'sort'
191 192
       this.field = field
193
+      this.queryParams.pageNum = 1
194
+      this.queryInput = ''
192 195
       getContractStatisticSortByField({ field }).then(res => {
193 196
         let list = res.data.sort;
197
+        this.total = list.length;
194 198
         let a = list.slice((this.queryParams.pageNum - 1) * this.queryParams.pageSize, this.queryParams.pageNum * this.queryParams.pageSize);
195 199
         this.contractList = a;
196 200
         this.loading = false;
@@ -240,7 +244,7 @@ export default {
240 244
       }
241 245
     },
242 246
     getStatistic(contractId) {
243
-      getContractStatistic(contractId).then(res => {
247
+      getContractStatisticById(contractId).then(res => {
244 248
         this.subContractAmount = res.data.subAmount
245 249
         this.budgetSumAmount = res.data.budgetAmount
246 250
         this.borrowSumAmount = res.data.borrowAmount

+ 2
- 2
oa-ui/src/views/statistics/components/borrowStatistics.vue Ver arquivo

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-10-18 11:17:48
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-10-25 17:20:59
5
+ * @LastEditTime: 2024-12-20 10:00:35
6 6
 -->
7 7
 <template>
8 8
   <div style="width:100%;" v-loading="loading">
@@ -163,7 +163,7 @@ export default {
163 163
       let option = {
164 164
         title: {
165 165
           text: '各年借款金额',
166
-          subtext: '借款总额:' + Object.values(this.borrowAmount).reduce((accumulator, currentValue) => accumulator + currentValue, 0) + '元' +
166
+          subtext: '借款总额:' + (Object.values(this.borrowAmount).reduce((accumulator, currentValue) => { return accumulator + currentValue }, 0)).toFixed(2) + '元' +
167 167
             '(约' + this.sumBorrowAmount + '万元)'
168 168
         },
169 169
         grid: {

+ 2
- 2
oa-ui/src/views/statistics/components/settleStatistics.vue Ver arquivo

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-10-18 11:17:48
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-10-25 17:20:49
5
+ * @LastEditTime: 2024-12-20 10:11:56
6 6
 -->
7 7
 <template>
8 8
   <div style="width:100%;" v-loading="loading">
@@ -169,7 +169,7 @@ export default {
169 169
       let option = {
170 170
         title: {
171 171
           text: '各年结算金额',
172
-          subtext: '结算总额:' + Object.values(this.settleAmount).reduce((accumulator, currentValue) => accumulator + currentValue, 0) + '元' +
172
+          subtext: '结算总额:' + (Object.values(this.settleAmount).reduce((accumulator, currentValue) => {return accumulator + currentValue}, 0)).toFixed(2) + '元' +
173 173
             '(约' + this.sumSettleAmount + '万元)'
174 174
         },
175 175
         grid: {

Carregando…
Cancelar
Salvar