Browse Source

修改项目生产界面里的项目结算

余思翰 1 year ago
parent
commit
6b6aab38ff

+ 1136
- 772
oa-back/sql/cmc_oa(小余测试数据).sql
File diff suppressed because it is too large
View File


+ 29
- 9
oa-ui/src/views/flowable/form/inProgress/settleData.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-05-10 14:45:03
3
  * @Date: 2024-05-10 14:45:03
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-05-10 17:45:25
5
+ * @LastEditTime: 2024-05-27 19:02:03
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="mt20">
8
   <div class="mt20">
18
 
18
 
19
     <el-table :data="dataList" style="width: 100%">
19
     <el-table :data="dataList" style="width: 100%">
20
       <el-table-column type="index" label="序号" width="50" />
20
       <el-table-column type="index" label="序号" width="50" />
21
-      <el-table-column label="上报人">
22
-        <template slot-scope="scope">
23
-          {{ getReporter(scope.row) }}
24
-        </template>
25
-      </el-table-column>
21
+      <el-table-column label="上报人" prop="reporterName" />
26
       <el-table-column label="申请时间" prop="reportTime" />
22
       <el-table-column label="申请时间" prop="reportTime" />
27
       <el-table-column label="综合事务部意见" prop="zhComment" />
23
       <el-table-column label="综合事务部意见" prop="zhComment" />
28
       <el-table-column label="技术质量部意见" prop="jsComment" />
24
       <el-table-column label="技术质量部意见" prop="jsComment" />
37
         </template>
33
         </template>
38
       </el-table-column>
34
       </el-table-column>
39
     </el-table>
35
     </el-table>
36
+    <el-dialog title="结算明细" :visible.sync="open" append-to-body>
37
+      <el-table :data="summaryList" style="width: 100%">
38
+        <el-table-column type="index" label="序号" width="50" />
39
+        <el-table-column prop="content" label="内容" />
40
+        <el-table-column prop="amount" label="结算金额" />
41
+        <el-table-column prop="remark" label="备注" />
42
+      </el-table>
43
+    </el-dialog>
40
   </div>
44
   </div>
41
 </template>
45
 </template>
42
 
46
 
49
 import { MessageBox } from 'element-ui'
53
 import { MessageBox } from 'element-ui'
50
 import { getUser } from "@/api/system/user";
54
 import { getUser } from "@/api/system/user";
51
 import { Snowflake } from '@/utils/snowFlake.js'
55
 import { Snowflake } from '@/utils/snowFlake.js'
56
+import { listSettleSummary } from '@/api/oa/settle/settleSummary'
52
 export default {
57
 export default {
53
   props: {
58
   props: {
54
     taskForm: {
59
     taskForm: {
58
   },
63
   },
59
   data() {
64
   data() {
60
     return {
65
     return {
66
+      open: false,
61
       dataList: [],
67
       dataList: [],
62
       definitionList: [], //流程列表
68
       definitionList: [], //流程列表
69
+      summaryList:[]
63
     }
70
     }
64
   },
71
   },
65
   mounted() {
72
   mounted() {
71
       listSettle({ projectId: this.taskForm.formId }).then(res => {
78
       listSettle({ projectId: this.taskForm.formId }).then(res => {
72
         if (res.code == 200) {
79
         if (res.code == 200) {
73
           this.dataList = res.rows
80
           this.dataList = res.rows
81
+          for (let row of res.rows) {
82
+            this.getReporter(row);
83
+          }
74
         }
84
         }
75
       })
85
       })
76
     },
86
     },
77
     getReporter(row) {
87
     getReporter(row) {
88
+      console.log(row);
78
       getUser(row.reporter).then(res => {
89
       getUser(row.reporter).then(res => {
79
-        return res.data.nickName
90
+        this.$set(row, 'reporterName', res.data.nickName)
91
+      })
92
+    },
93
+    getSummaryList(settleId) {
94
+      listSettleSummary({ settleId }).then(res => {
95
+        if (res.rows) {
96
+          this.summaryList = res.rows
97
+        }
80
       })
98
       })
81
     },
99
     },
82
     listDefinition() {
100
     listDefinition() {
88
         this.definitionList = response.data.records;
106
         this.definitionList = response.data.records;
89
       });
107
       });
90
     },
108
     },
91
-    handleLook(row){
92
-
109
+    handleLook(row) {
110
+      console.log(row);
111
+      this.getSummaryList(row.settleId)
112
+      this.open = true
93
     },
113
     },
94
     addSettleFlow() {
114
     addSettleFlow() {
95
       let row = this.definitionList[0];
115
       let row = this.definitionList[0];

+ 33
- 11
oa-ui/src/views/flowable/form/settleForm.vue View File

1
 <!--
1
 <!--
2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-30 09:03:14
3
  * @Date: 2024-04-30 09:03:14
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-05-22 17:02:59
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-05-27 17:25:35
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container" v-loading="loading">
8
   <div class="app-container" v-loading="loading">
9
     <el-button type="warning" icon="el-icon-printer" @click="printOpen = true">打印</el-button>
9
     <el-button type="warning" icon="el-icon-printer" @click="printOpen = true">打印</el-button>
10
     <el-dialog title="结算表格预览" :visible.sync="printOpen" width="65%" append-to-body>
10
     <el-dialog title="结算表格预览" :visible.sync="printOpen" width="65%" append-to-body>
11
-      <settle-print :form="form" :chooseProject="chooseProject" :workList="settleWorkList" :settleList="oldSettleSumList"
12
-        @cancel="printOpen = false"></settle-print>
11
+      <settle-print :form="form" :chooseProject="chooseProject" :workList="settleWorkList"
12
+        :settleList="oldSettleSumList" @cancel="printOpen = false"></settle-print>
13
     </el-dialog>
13
     </el-dialog>
14
     <el-row :gutter="20">
14
     <el-row :gutter="20">
15
       <el-col :span="19" :xs="24">
15
       <el-col :span="19" :xs="24">
84
             </el-col>
84
             </el-col>
85
           </el-row>
85
           </el-row>
86
           <el-form-item label="原始上报数据" prop="">
86
           <el-form-item label="原始上报数据" prop="">
87
-            <el-upload class="upload-demo" ref="upload" :file-list="fileList" :auto-upload="false" action="">
88
-              <el-button slot="trigger" size="mini" type="primary" icon="el-icon-upload"
89
-                :disabled="taskName != '结算发起'">选取文件</el-button>
90
-              <div slot="tip" class="el-upload__tip">
91
-                只能上传docx/doc文件,且不超过500kb
92
-              </div>
93
-            </el-upload>
87
+            <FileUpload v-if="taskName == '结算发起'" ref="jssh" :limit="1" :filePathName="'项目结算'"
88
+              :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf']" @input="getYuanShi"></FileUpload>
89
+            <el-link v-if="taskName != '结算发起'" :href="`${baseUrl}${'/profile/upload' + form.modifyDocument}`"
90
+              :underline="false" target="_blank">
91
+              <span class="el-icon-document"> {{ getFileName(form.modifyDocument) }} </span>
92
+            </el-link>
94
           </el-form-item>
93
           </el-form-item>
95
           <el-form-item label="项目管理部审核结算单" prop="">
94
           <el-form-item label="项目管理部审核结算单" prop="">
96
             <el-upload class="upload-demo" ref="upload" :file-list="fileList" action="" :auto-upload="false">
95
             <el-upload class="upload-demo" ref="upload" :file-list="fileList" action="" :auto-upload="false">
545
     }
544
     }
546
   },
545
   },
547
   methods: {
546
   methods: {
547
+    // 初始化表单
548
     initForm() {
548
     initForm() {
549
       listSettle({ settleId: this.taskForm.formId }).then(res => {
549
       listSettle({ settleId: this.taskForm.formId }).then(res => {
550
         if (res.total == 1) {
550
         if (res.total == 1) {
574
 
574
 
575
       });
575
       });
576
     },
576
     },
577
+    // 获取当前处理人
577
     getCurrentUser() {
578
     getCurrentUser() {
578
       if (this.taskName == '综合事务部处理') {
579
       if (this.taskName == '综合事务部处理') {
579
         this.form.zhUserName = this.$store.state.user.name;
580
         this.form.zhUserName = this.$store.state.user.name;
606
       }
607
       }
607
       this.getReviewerName();
608
       this.getReviewerName();
608
     },
609
     },
610
+    // 获取审核人
609
     getReviewerName() {
611
     getReviewerName() {
610
       if (this.form.zhUserId) {
612
       if (this.form.zhUserId) {
611
         getUser(this.form.zhUserId).then(res => {
613
         getUser(this.form.zhUserId).then(res => {
683
         }
685
         }
684
       })
686
       })
685
     },
687
     },
688
+    // 获取下一个节点  (下一个用户id,部门id,是否为会签)
686
     getNextFlowNodeFn(userId, deptId, isList) {
689
     getNextFlowNodeFn(userId, deptId, isList) {
687
       const params = { taskId: this.taskForm.taskId };
690
       const params = { taskId: this.taskForm.taskId };
688
       getNextFlowNode(params).then(res => {
691
       getNextFlowNode(params).then(res => {
764
       }
767
       }
765
       return true;
768
       return true;
766
     },
769
     },
770
+    // 获取合同
767
     getContractDataList() {
771
     getContractDataList() {
768
       listProjectContract({ projectId: this.taskForm.formId }).then(res => {
772
       listProjectContract({ projectId: this.taskForm.formId }).then(res => {
769
         if (res.rows) {
773
         if (res.rows) {
969
         this.addSettleSummaryFn(this.taskForm.formId)
973
         this.addSettleSummaryFn(this.taskForm.formId)
970
       })
974
       })
971
     },
975
     },
976
+    getFileName(name) {
977
+      if (name) {
978
+        let arr = name.split('/')
979
+        return arr[arr.length - 1];
980
+      }
981
+    },
982
+    getYuanShi(val) {
983
+      this.getDoc()
984
+    },
985
+    getDoc(val, name) {
986
+      if (val) {
987
+        let arr = val.split('/upload')
988
+        this.form[name] = arr[1]
989
+        if (val == "") {
990
+          this.form[name] = ""
991
+        }
992
+      }
993
+    },
972
   },
994
   },
973
 };
995
 };
974
 </script>
996
 </script>

Loading…
Cancel
Save