Przeglądaj źródła

修改小问题

余思翰 5 miesięcy temu
rodzic
commit
48a81f0a07

+ 10
- 3
oa-ui/src/api/oa/contract/contract.js Wyświetl plik

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-06-21 18:51:09
3
  * @Date: 2024-06-21 18:51:09
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-19 14:46:44
5
+ * @LastEditTime: 2024-12-20 09:37:59
6
  */
6
  */
7
 import request from '@/utils/request'
7
 import request from '@/utils/request'
8
 
8
 
48
     method: 'delete'
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
   return request({
62
   return request({
56
     url: '/oa/contract/statistic/' + contractId,
63
     url: '/oa/contract/statistic/' + contractId,
57
     method: 'get',
64
     method: 'get',

+ 1
- 3
oa-ui/src/views/contractStatistic/components/borrowStatistic.vue Wyświetl plik

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

+ 1
- 0
oa-ui/src/views/contractStatistic/components/budgetStatistic.vue Wyświetl plik

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

+ 7
- 3
oa-ui/src/views/contractStatistic/index.vue Wyświetl plik

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

+ 2
- 2
oa-ui/src/views/statistics/components/borrowStatistics.vue Wyświetl plik

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

+ 2
- 2
oa-ui/src/views/statistics/components/settleStatistics.vue Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz