Bladeren bron

导出核算数据,同一项目多个预算和核算的新增和查询

qyx 2 maanden geleden
bovenliggende
commit
549f09500d

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetOtherController.java Bestand weergeven

@@ -33,7 +33,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
33 33
  * @date 2025-05-09
34 34
  */
35 35
 @RestController
36
-@RequestMapping("/oa/other")
36
+@RequestMapping("/oa/budgetOther")
37 37
 public class CmcBudgetOtherController extends BaseController
38 38
 {
39 39
     @Autowired

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetSiteController.java Bestand weergeven

@@ -27,7 +27,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
27 27
  * @date 2025-05-09
28 28
  */
29 29
 @RestController
30
-@RequestMapping("/oa/site")
30
+@RequestMapping("/oa/budgetSite")
31 31
 public class CmcBudgetSiteController extends BaseController
32 32
 {
33 33
     @Autowired

+ 1
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetMapper.xml Bestand weergeven

@@ -99,6 +99,7 @@
99 99
     <select id="selectCmcBudgetList" parameterType="CmcBudget" resultMap="CmcBudgetResult">
100 100
         <include refid="selectCmcBudgetVo"/>
101 101
         <where>
102
+            <if test="budgetId != null  and budgetId != ''"> and b.budget_id = #{budgetId}</if>
102 103
             <if test="projectId != null  and projectId != ''"> and b.project_id = #{projectId}</if>
103 104
             <if test="staffCost != null "> and b.staff_cost = #{staffCost}</if>
104 105
             <if test="carCost != null "> and b.car_cost = #{carCost}</if>

+ 5
- 5
oa-ui/src/api/oa/budget/budgetOther.js Bestand weergeven

@@ -9,7 +9,7 @@ import request from '@/utils/request'
9 9
 // 查询cmc预算外开支列表
10 10
 export function listOther(query) {
11 11
   return request({
12
-    url: '/oa/other/list',
12
+    url: '/oa/budgetOther/list',
13 13
     method: 'get',
14 14
     params: query
15 15
   })
@@ -18,7 +18,7 @@ export function listOther(query) {
18 18
 // 查询cmc预算外开支详细
19 19
 export function getOther(expenseId) {
20 20
   return request({
21
-    url: '/oa/other/' + expenseId,
21
+    url: '/oa/budgetOther/' + expenseId,
22 22
     method: 'get'
23 23
   })
24 24
 }
@@ -26,7 +26,7 @@ export function getOther(expenseId) {
26 26
 // 新增cmc预算外开支
27 27
 export function addOther(data) {
28 28
   return request({
29
-    url: '/oa/other',
29
+    url: '/oa/budgetOther',
30 30
     method: 'post',
31 31
     data: data
32 32
   })
@@ -35,7 +35,7 @@ export function addOther(data) {
35 35
 // 修改cmc预算外开支
36 36
 export function updateOther(data) {
37 37
   return request({
38
-    url: '/oa/other',
38
+    url: '/oa/budgetOther',
39 39
     method: 'put',
40 40
     data: data
41 41
   })
@@ -44,7 +44,7 @@ export function updateOther(data) {
44 44
 // 删除cmc预算外开支
45 45
 export function delOther(expenseId) {
46 46
   return request({
47
-    url: '/oa/other/' + expenseId,
47
+    url: '/oa/budgetOther/' + expenseId,
48 48
     method: 'delete'
49 49
   })
50 50
 }

+ 5
- 5
oa-ui/src/api/oa/budget/budgetSite.js Bestand weergeven

@@ -9,7 +9,7 @@ import request from '@/utils/request'
9 9
 // 查询cmc现场开支列表
10 10
 export function listSite(query) {
11 11
   return request({
12
-    url: '/oa/site/list',
12
+    url: '/oa/budgetSite/list',
13 13
     method: 'get',
14 14
     params: query
15 15
   })
@@ -18,7 +18,7 @@ export function listSite(query) {
18 18
 // 查询cmc现场开支详细
19 19
 export function getSite(expenseId) {
20 20
   return request({
21
-    url: '/oa/site/' + expenseId,
21
+    url: '/oa/budgetSite/' + expenseId,
22 22
     method: 'get'
23 23
   })
24 24
 }
@@ -26,7 +26,7 @@ export function getSite(expenseId) {
26 26
 // 新增cmc现场开支
27 27
 export function addSite(data) {
28 28
   return request({
29
-    url: '/oa/site',
29
+    url: '/oa/budgetSite',
30 30
     method: 'post',
31 31
     data: data
32 32
   })
@@ -35,7 +35,7 @@ export function addSite(data) {
35 35
 // 修改cmc现场开支
36 36
 export function updateSite(data) {
37 37
   return request({
38
-    url: '/oa/site',
38
+    url: '/oa/budgetSite',
39 39
     method: 'put',
40 40
     data: data
41 41
   })
@@ -44,7 +44,7 @@ export function updateSite(data) {
44 44
 // 删除cmc现场开支
45 45
 export function delSite(expenseId) {
46 46
   return request({
47
-    url: '/oa/site/' + expenseId,
47
+    url: '/oa/budgetSite/' + expenseId,
48 48
     method: 'delete'
49 49
   })
50 50
 }

+ 63
- 12
oa-ui/src/views/flowable/form/budget/addBudget.vue Bestand weergeven

@@ -141,6 +141,21 @@
141 141
       <return-btn :taskForm="taskForm" :comment="commentByRole()" @goBack="$emit('goBack')" @saves=""
142 142
         @cancel="returnOpen = false"></return-btn>
143 143
     </el-dialog>
144
+    <!-- 选择修改有多个预算的项目中的预算 -->
145
+    <el-dialog title="选择要修改的预算" :visible.sync="updateData" :close-on-click-modal="false"
146
+      :close-on-press-escape="false" :show-close="false"  width="30%" append-to-body>
147
+        <el-select v-model="selectedBudget" placeholder="请选择" style="width:100%">
148
+          <el-option
149
+            v-for="item in budgets"
150
+            :key="item.budgetId"
151
+            :label="item.project.projectName +'_'+ item.createTime"
152
+            :value="item.budgetId">
153
+          </el-option>
154
+        </el-select>
155
+        <div style="text-align: center">
156
+          <el-button type="success" style=" margin-top: 10px;"  @click="getBudgeNeesUpdate()">确定</el-button>
157
+        </div>
158
+    </el-dialog>
144 159
   </div>
145 160
 </template>
146 161
 
@@ -165,6 +180,7 @@ import OtherTable from "./otherTable.vue";
165 180
 import SiteExpenses from "./siteExpenses.vue";
166 181
 import BudgetAdjust from "./adjust/budgetAdjust.vue";
167 182
 import NewBudgetInfo from './adjust/newBudgetInfo.vue';
183
+import { toStringHDMS } from 'ol/coordinate';
168 184
 
169 185
 export default {
170 186
   components: {
@@ -189,6 +205,7 @@ export default {
189 205
         fixCost: 0,
190 206
         directExpense: 0,
191 207
         totalBudget: 0,
208
+        procInstId: "",
192 209
       },
193 210
       flag: false,
194 211
       project: {},
@@ -197,6 +214,9 @@ export default {
197 214
       viewOpen: false,
198 215
       innerSettleLimit: 0, // 内业预算绩效合计限制
199 216
       outerUsers: [], // 存储外业人员
217
+      updateData:false,
218
+      selectedBudget:"",
219
+      budgets:{},
200 220
     };
201 221
   },
202 222
   props: {
@@ -227,19 +247,45 @@ export default {
227 247
     this.initBudgetForm();
228 248
   },
229 249
   methods: {
230
-    initBudgetForm() {
231
-      listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }).then(
232
-        res => {
233
-          if (res.rows[0] && res.rows[0].budgetId) {
250
+    async initBudgetForm() {
251
+      const params = { pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }
252
+      let res = await listBudget(params)
253
+      if (res.rows[0] && res.rows[0].budgetId){
254
+        // 如项目下已有预算,询问是新建预算还是修改原有预算
255
+        try{
256
+          await this.$confirm('该项目下已有预算,请选择修改已有预算还是创建新预算','系统提示',{
257
+                              distinguishCancelAndClose: true,confirmButtonText: '创建新预算',
258
+                              cancelButtonText: '修改已有预算',showClose: false, 
259
+                              closeOnClickModal: false, closeOnPressEscape: false});
260
+          this.flag = false;
261
+          this.budgetForm.projectId = this.taskForm.formId;
262
+          this.budgetForm.budgetId = new Snowflake(1n, 1n, 0n).nextId().toString();
263
+          this.budgetForm.procInstId = this.taskForm.procInsId;
264
+        }catch(action){
265
+          if (action === 'cancel') {
234 266
             this.flag = true;
235
-            this.budgetForm = res.rows[0];
236
-            this.budgetId = res.rows[0].budgetId;
237
-          } else {
238
-            this.flag = false;
239
-            this.budgetForm.projectId = this.taskForm.formId;
240
-          }
267
+            this.budgets = res.rows;
268
+            this.updateData = true;
269
+            // this.budgetForm = res.rows[0];
270
+            // this.budgetId = res.rows[0].budgetId;
241 271
         }
242
-      );
272
+      }}else {
273
+          this.flag = false;
274
+          this.budgetForm.projectId = this.taskForm.formId;
275
+          this.budgetForm.procInstId = this.taskForm.procInsId;
276
+      }
277
+      // listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }).then(
278
+      //   res => {
279
+      //     if (res.rows[0] && res.rows[0].budgetId) {
280
+      //       this.flag = true;
281
+      //       this.budgetForm = res.rows[0];
282
+      //       this.budgetId = res.rows[0].budgetId;
283
+      //     } else {
284
+      //       this.flag = false;
285
+      //       this.budgetForm.projectId = this.taskForm.formId;
286
+      //     }
287
+      //   }
288
+      // );
243 289
     },
244 290
     getProjectInfo() {
245 291
       getProject(this.taskForm.formId).then(response => {
@@ -436,7 +482,12 @@ export default {
436 482
       if (val == "") {
437 483
         this.budgetForm.document = ""
438 484
       }
439
-    }
485
+    },
486
+    getBudgeNeesUpdate(){
487
+      this.budgetForm = this.budgets.find(item => item.budgetId === this.selectedBudget);
488
+      this.budgetId = this.selectedBudget;
489
+      this.updateData =false;
490
+   }
440 491
   },
441 492
 };
442 493
 </script>

+ 1
- 0
oa-ui/src/views/flowable/form/budget/adjust/adjustIndex.vue Bestand weergeven

@@ -50,6 +50,7 @@
50 50
           </el-table-column>
51 51
           <el-table-column label="项目编号" align="center" prop="project.projectNumber" />
52 52
           <el-table-column label="项目名称" align="center" prop="project.projectName" />
53
+          <el-table-column label="提交时间" align="center" prop="createTime" />
53 54
           <el-table-column label="预算总额" align="center" prop="totalBudget" />
54 55
           <el-table-column label="编制人" align="center" prop="compiler">
55 56
             <template slot-scope="scope">

+ 2
- 1
oa-ui/src/views/flowable/form/budget/adjust/budgetAdjust.vue Bestand weergeven

@@ -460,6 +460,7 @@ export default {
460 460
     if (!this.row.projectId) {
461 461
       let res = await getCheck(this.taskForm.formId);
462 462
       this.row.projectId = res.data.projectId;
463
+      this.row.budgetId = res.data.budgetId;
463 464
     }
464 465
     this.initBudgetForm();
465 466
     this.initCheckForm();
@@ -469,7 +470,7 @@ export default {
469 470
   methods: {
470 471
     initBudgetForm() {
471 472
       this.loading = true;
472
-      listBudget({ pageNum: 1, pageSize: 20, projectId: this.row.projectId }).then(async res => {
473
+      listBudget({ pageNum: 1, pageSize: 20, projectId: this.row.projectId, budgetId:this.row.budgetId }).then(async res => {
473 474
         this.budgetForm = res.rows[0];
474 475
         if (this.budgetForm) {
475 476
           const budgetId = this.budgetForm.budgetId;

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/newBudgetInfo.vue Bestand weergeven

@@ -564,7 +564,7 @@ export default {
564 564
   methods: {
565 565
     initBudgetForm() {
566 566
       this.loading = true;
567
-      listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }).then(async res => {
567
+      listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId, procInstId:this.taskForm.procInsId }).then(async res => {
568 568
         this.budgetForm = res.rows[0];
569 569
         if (this.budgetForm) {
570 570
           this.budgetForm.outExpense = Number(this.budgetForm.outExpense).toFixed(2);

+ 53
- 1
oa-ui/src/views/oa/check/index.vue Bestand weergeven

@@ -47,6 +47,8 @@
47 47
         <template slot-scope="scope">
48 48
           <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
49 49
             v-hasPermi="['oa:check:query']">查看</el-button>
50
+          <el-button size="mini" type="text" icon="el-icon-download" @click="downloadInfo(scope.row)"
51
+          v-hasPermi="['oa:check:query']">下载</el-button>
50 52
         </template>
51 53
       </el-table-column>
52 54
     </el-table>
@@ -249,11 +251,61 @@ export default {
249 251
         this.$modal.msgSuccess("删除成功");
250 252
       }).catch(() => { });
251 253
     },
254
+    downloadInfo(row){
255
+      this.download('oa/budget/export', {
256
+        'budgetId': row.budgetId
257
+      }, `budget_${new Date().getTime()}.xlsx`);
258
+      this.download('oa/budgetCar/export', {
259
+        'budgetId': row.budgetId
260
+      }, `budget_Car_${new Date().getTime()}.xlsx`);
261
+      this.download('oa/budgetDevice/export', {
262
+        'budgetId': row.budgetId
263
+      }, `budget_Device_${new Date().getTime()}.xlsx`);
264
+      this.download('oa/budgetSettle/export', {
265
+        'budgetId': row.budgetId
266
+      }, `budget_Settle_${new Date().getTime()}.xlsx`);
267
+      this.download('oa/budgetStaff/export', {
268
+        'budgetId': row.budgetId
269
+      }, `budget_Staff${new Date().getTime()}.xlsx`);
270
+      this.download('oa/budgetOther/export', {
271
+        'budgetId': row.budgetId
272
+      }, `budget_Other${new Date().getTime()}.xlsx`);
273
+      this.download('oa/budgetSite/export', {
274
+        'budgetId': row.budgetId
275
+      }, `budget_Site${new Date().getTime()}.xlsx`);
276
+      this.download('oa/projectWork/export', {
277
+        'projectId': row.projectId
278
+      }, `project_Work${new Date().getTime()}.xlsx`)
279
+    },
252 280
     /** 导出按钮操作 */
253 281
     handleExport() {
254 282
       this.download('oa/check/export', {
255 283
         ...this.queryParams
256
-      }, `check_${new Date().getTime()}.xlsx`)
284
+      }, `check_${new Date().getTime()}.xlsx`);
285
+      this.download('oa/budget/export', {
286
+        ...this.queryParams
287
+      }, `budget_${new Date().getTime()}.xlsx`);
288
+      this.download('oa/budgetCar/export', {
289
+        ...this.queryParams
290
+      }, `budget_Car_${new Date().getTime()}.xlsx`);
291
+      this.download('oa/budgetDevice/export', {
292
+        ...this.queryParams
293
+      }, `budget_Device_${new Date().getTime()}.xlsx`);
294
+      this.download('oa/budgetSettle/export', {
295
+        ...this.queryParams
296
+      }, `budget_Settle_${new Date().getTime()}.xlsx`);
297
+      this.download('oa/budgetStaff/export', {
298
+        ...this.queryParams
299
+      }, `budget_Staff${new Date().getTime()}.xlsx`);
300
+      this.download('oa/budgetOther/export', {
301
+        ...this.queryParams
302
+      }, `budget_Other${new Date().getTime()}.xlsx`);
303
+      this.download('oa/budgetSite/export', {
304
+        ...this.queryParams
305
+      }, `budget_Site${new Date().getTime()}.xlsx`);
306
+      this.download('oa/projectWork/export', {
307
+        ...this.queryParams
308
+      }, `project_Work${new Date().getTime()}.xlsx`)
257 309
     }
258 310
   }
259 311
 };

Laden…
Annuleren
Opslaan