Browse Source

新增结算一键导入功能,修改合同线上评审签名出错的bug

余思翰 4 months ago
parent
commit
7e84911b22

+ 14
- 20
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcSettleController.java View File

6
 import java.math.BigDecimal;
6
 import java.math.BigDecimal;
7
 import java.text.ParseException;
7
 import java.text.ParseException;
8
 import java.text.SimpleDateFormat;
8
 import java.text.SimpleDateFormat;
9
-import java.util.ArrayList;
10
-import java.util.Calendar;
11
-import java.util.List;
12
-import java.util.Objects;
9
+import java.util.*;
13
 import javax.servlet.http.HttpServletResponse;
10
 import javax.servlet.http.HttpServletResponse;
14
 
11
 
15
 import com.alibaba.fastjson2.JSONArray;
12
 import com.alibaba.fastjson2.JSONArray;
16
 import com.alibaba.fastjson2.JSONObject;
13
 import com.alibaba.fastjson2.JSONObject;
17
-import com.ruoyi.common.utils.SnowFlake;
18
-import com.ruoyi.file.domain.FilesAchievement;
19
-import com.ruoyi.file.domain.FilesStorage;
20
 import com.ruoyi.oa.domain.CmcSettle;
14
 import com.ruoyi.oa.domain.CmcSettle;
21
-import com.ruoyi.oa.service.ICmcSettleSummaryService;
22
-import org.apache.poi.hssf.usermodel.HSSFSheet;
23
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
24
 import org.apache.poi.ss.usermodel.CellType;
15
 import org.apache.poi.ss.usermodel.CellType;
25
 import org.apache.poi.xssf.usermodel.XSSFCell;
16
 import org.apache.poi.xssf.usermodel.XSSFCell;
26
 import org.apache.poi.xssf.usermodel.XSSFSheet;
17
 import org.apache.poi.xssf.usermodel.XSSFSheet;
27
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
18
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
28
 import org.springframework.beans.factory.annotation.Autowired;
19
 import org.springframework.beans.factory.annotation.Autowired;
29
 import org.springframework.beans.factory.annotation.Value;
20
 import org.springframework.beans.factory.annotation.Value;
30
-import org.springframework.security.access.prepost.PreAuthorize;
31
 import org.springframework.web.bind.annotation.GetMapping;
21
 import org.springframework.web.bind.annotation.GetMapping;
32
 import org.springframework.web.bind.annotation.PostMapping;
22
 import org.springframework.web.bind.annotation.PostMapping;
33
 import org.springframework.web.bind.annotation.PutMapping;
23
 import org.springframework.web.bind.annotation.PutMapping;
92
             return AjaxResult.error("文件内容为空!");
82
             return AjaxResult.error("文件内容为空!");
93
         }
83
         }
94
         else {
84
         else {
95
-            File profilePath = new File(profile + "/upload/导入数据");
85
+            File profilePath = new File(profile + "/upload/项目结算/导入数据");
96
             if (!profilePath.exists())
86
             if (!profilePath.exists())
97
                 profilePath.mkdirs();
87
                 profilePath.mkdirs();
98
             File transferFile = new File( profilePath + "/" + file.getOriginalFilename());
88
             File transferFile = new File( profilePath + "/" + file.getOriginalFilename());
105
                 rowNumber = sheetAt.getPhysicalNumberOfRows();
95
                 rowNumber = sheetAt.getPhysicalNumberOfRows();
106
             }
96
             }
107
             JSONArray jsonArray = new JSONArray();
97
             JSONArray jsonArray = new JSONArray();
108
-            JSONObject jsonObject = new JSONObject();
109
             for (int i = 1; i < rowNumber - 1;) {
98
             for (int i = 1; i < rowNumber - 1;) {
99
+                JSONObject jsonObject = new JSONObject();
110
                 i++;
100
                 i++;
111
-                jsonObject.put("priceId", getStringCellValue(sheetAt.getRow(i).getCell(0)));
112
-                jsonObject.put("content", getStringCellValue(sheetAt.getRow(i).getCell(1)));
113
-                jsonObject.put("workload", getStringCellValue(sheetAt.getRow(i).getCell(4)));
114
-                jsonObject.put("groundType", getStringCellValue(sheetAt.getRow(i).getCell(5)));
115
-                jsonObject.put("coefficient", getStringCellValue(sheetAt.getRow(i).getCell(6)));
116
-                jsonObject.put("remark", getStringCellValue(sheetAt.getRow(i).getCell(7)));
117
-                jsonArray.add(jsonObject);
101
+                String column0 = getStringCellValue(sheetAt.getRow(i).getCell(0));
102
+                if (column0 != null && !column0.equals("")) {
103
+                    jsonObject.put("priceId", column0);
104
+                    jsonObject.put("content", getStringCellValue(sheetAt.getRow(i).getCell(1)));
105
+                    jsonObject.put("workload", getStringCellValue(sheetAt.getRow(i).getCell(4)));
106
+                    jsonObject.put("groundType", getStringCellValue(sheetAt.getRow(i).getCell(5)));
107
+                    jsonObject.put("coefficient", getStringCellValue(sheetAt.getRow(i).getCell(7)));
108
+                    jsonObject.put("remark", getStringCellValue(sheetAt.getRow(i).getCell(8)));
109
+                    jsonArray.add(jsonObject);
110
+                }
118
             }
111
             }
112
+            in.close();
119
             return AjaxResult.success(jsonArray);
113
             return AjaxResult.success(jsonArray);
120
         }
114
         }
121
     }
115
     }

+ 1
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcPrice.java View File

17
     private static final long serialVersionUID = 1L;
17
     private static final long serialVersionUID = 1L;
18
 
18
 
19
     /** 结算单价id */
19
     /** 结算单价id */
20
+    @Excel(name = "编号")
20
     private Long id;
21
     private Long id;
21
 
22
 
22
     /** 工作类别 */
23
     /** 工作类别 */

+ 9
- 0
oa-ui/src/api/oa/settle/settle.js View File

50
     method: 'get',
50
     method: 'get',
51
     params: query
51
     params: query
52
   })
52
   })
53
+}
54
+
55
+// 导入结算
56
+export function uploadSettleSheet(data) {
57
+  return request({
58
+    url: '/oa/settle/uploadSheet',
59
+    method: 'post',
60
+    data: data
61
+  })
53
 }
62
 }

+ 6
- 8
oa-ui/src/views/flowable/form/business/contractForm.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-05-10 15:31:57
3
  * @Date: 2024-05-10 15:31:57
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-30 16:30:04
5
+ * @LastEditTime: 2025-01-09 14:54:11
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container">
8
   <div class="app-container">
135
             <el-col :span="6">
135
             <el-col :span="6">
136
               <el-form-item label="日期:" label-width="120px">
136
               <el-form-item label="日期:" label-width="120px">
137
                 <el-date-picker v-model="form.draftTime" :disabled="taskName != '合同拟稿'" type="date"
137
                 <el-date-picker v-model="form.draftTime" :disabled="taskName != '合同拟稿'" type="date"
138
-                  value-format="yyyy-MM-dd" placeholder="选择日期">
138
+                  value-format="yyyy-MM-dd" placeholder="选择日期" style="width:190px;">
139
                 </el-date-picker>
139
                 </el-date-picker>
140
               </el-form-item>
140
               </el-form-item>
141
             </el-col>
141
             </el-col>
177
                   </el-select>
177
                   </el-select>
178
                 </td>
178
                 </td>
179
                 <td>
179
                 <td>
180
-                  <el-input v-model="comment.comment" type="textarea" clearable :autosize="{ minRows: 4 }"
180
+                  <el-input v-model="comment.comment" type="textarea" clearable :autosize="{ minRows: 2 }"
181
                     :disabled="taskName != '线上会审' || (taskName == '线上会审' && comment.userId != userId)"></el-input>
181
                     :disabled="taskName != '线上会审' || (taskName == '线上会审' && comment.userId != userId)"></el-input>
182
                 </td>
182
                 </td>
183
                 <td @click="clickFile(comment)">
183
                 <td @click="clickFile(comment)">
290
               </tr>
290
               </tr>
291
             </table>
291
             </table>
292
           </el-form-item>
292
           </el-form-item>
293
-          <el-form-item label="">
294
-          </el-form-item>
295
           <el-divider></el-divider>
293
           <el-divider></el-divider>
296
           <el-form-item label="分管审批意见" prop="managerComment">
294
           <el-form-item label="分管审批意见" prop="managerComment">
297
             <el-input v-model="form.managerComment" type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入审批意见"
295
             <el-input v-model="form.managerComment" type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入审批意见"
307
               <el-form-item label="日期:" label-width="120px">
305
               <el-form-item label="日期:" label-width="120px">
308
                 <!-- <span> {{ form.managerTime ? form.managerTime : managerTime }} </span> -->
306
                 <!-- <span> {{ form.managerTime ? form.managerTime : managerTime }} </span> -->
309
                 <el-date-picker v-model="form.managerTime" :disabled="taskName != '分管审核'" type="date"
307
                 <el-date-picker v-model="form.managerTime" :disabled="taskName != '分管审核'" type="date"
310
-                  value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
308
+                  value-format="yyyy-MM-dd" placeholder="选择日期" style="width:190px;"></el-date-picker>
311
               </el-form-item>
309
               </el-form-item>
312
             </el-col>
310
             </el-col>
313
           </el-row>
311
           </el-row>
325
               <el-form-item label="日期:" label-width="120px">
323
               <el-form-item label="日期:" label-width="120px">
326
                 <!-- <span> {{ form.gmTime ? form.gmTime : gmTime }} </span> -->
324
                 <!-- <span> {{ form.gmTime ? form.gmTime : gmTime }} </span> -->
327
                 <el-date-picker v-model="form.gmTime" :disabled="taskName != '总经理审核'" type="date"
325
                 <el-date-picker v-model="form.gmTime" :disabled="taskName != '总经理审核'" type="date"
328
-                  value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
326
+                  value-format="yyyy-MM-dd" placeholder="选择日期" style="width:190px;"></el-date-picker>
329
               </el-form-item>
327
               </el-form-item>
330
             </el-col>
328
             </el-col>
331
           </el-row>
329
           </el-row>
659
                     comment.commentUser = undefined;
657
                     comment.commentUser = undefined;
660
                   }
658
                   }
661
                   else {
659
                   else {
662
-                    // comment.commentTime = parseTime(new Date(), '{y}-{m}-{d}');
660
+                    comment.commentTime = parseTime(new Date(), '{y}-{m}-{d}');
663
                   }
661
                   }
664
                 }
662
                 }
665
               }
663
               }

+ 3
- 3
oa-ui/src/views/flowable/form/business/subContract.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-05-10 15:31:57
3
  * @Date: 2024-05-10 15:31:57
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-30 16:30:28
5
+ * @LastEditTime: 2025-01-09 14:59:44
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container">
8
   <div class="app-container">
152
                   </el-select>
152
                   </el-select>
153
                 </td>
153
                 </td>
154
                 <td>
154
                 <td>
155
-                  <el-input v-model="comment.comment" type="textarea" clearable :autosize="{ minRows: 4 }"
155
+                  <el-input v-model="comment.comment" type="textarea" clearable :autosize="{ minRows: 2 }"
156
                     :disabled="taskName != '线上会审' || (taskName == '线上会审' && comment.userId != userId)"></el-input>
156
                     :disabled="taskName != '线上会审' || (taskName == '线上会审' && comment.userId != userId)"></el-input>
157
                 </td>
157
                 </td>
158
                 <!-- 线上会审附件 -->
158
                 <!-- 线上会审附件 -->
658
                     comment.commentUser = undefined;
658
                     comment.commentUser = undefined;
659
                   }
659
                   }
660
                   else {
660
                   else {
661
-                    // comment.commentTime = parseTime(new Date(), '{y}-{m}-{d}');
661
+                    comment.commentTime = parseTime(new Date(), '{y}-{m}-{d}');
662
                   }
662
                   }
663
                 }
663
                 }
664
               }
664
               }

+ 2
- 2
oa-ui/src/views/flowable/form/components/flowBtn/returnBtn.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-09-27 15:19:36
3
  * @Date: 2024-09-27 15:19:36
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-09 14:12:58
5
+ * @LastEditTime: 2025-01-09 09:51:00
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>
9
     <el-form ref="taskForm" :model="taskForm" :rules="rules" label-width="80px">
9
     <el-form ref="taskForm" :model="taskForm" :rules="rules" label-width="80px">
10
       <el-form-item label="退回节点" prop="targetKey">
10
       <el-form-item label="退回节点" prop="targetKey">
11
         <el-radio-group v-model="taskForm.targetKey">
11
         <el-radio-group v-model="taskForm.targetKey">
12
-          <el-radio-button v-for="item in returnTaskList" :key="item.id" :label="item.id">{{ item.name }}
12
+          <el-radio-button v-for="item in returnTaskList" :key="item.id" :label="item.id" v-if="item.name != '技术安排'">{{ item.name }} 
13
           </el-radio-button>
13
           </el-radio-button>
14
         </el-radio-group>
14
         </el-radio-group>
15
       </el-form-item>
15
       </el-form-item>

+ 37
- 10
oa-ui/src/views/flowable/form/settleForm.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-30 09:03:14
3
  * @Date: 2024-04-30 09:03:14
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-12-31 11:06:44
5
+ * @LastEditTime: 2025-01-09 11:43:24
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container" v-loading="loading">
8
   <div class="app-container" v-loading="loading">
76
               </el-form-item>
76
               </el-form-item>
77
             </el-col>
77
             </el-col>
78
           </el-row>
78
           </el-row>
79
-          <el-form-item label="原始上报数据" prop="">
79
+          <el-form-item label="附件上传" prop="">
80
             <FileUpload v-if="taskName == '结算发起'" :limit="1" :filePathName="'项目结算/原始数据'"
80
             <FileUpload v-if="taskName == '结算发起'" :limit="1" :filePathName="'项目结算/原始数据'"
81
               :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']" @input="setSettleDocument">
81
               :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']" @input="setSettleDocument">
82
             </FileUpload>
82
             </FileUpload>
90
               </el-link>
90
               </el-link>
91
             </div>
91
             </div>
92
           </el-form-item>
92
           </el-form-item>
93
-          <el-form-item label="经营发展部审核结算单" prop="">
93
+          <!-- <el-form-item label="经营发展部审核结算单" prop="">
94
             <FileUpload v-if="taskName == '经营发展部校核'" :limit="1" :filePathName="'项目结算/经营发展部审核结算单'"
94
             <FileUpload v-if="taskName == '经营发展部校核'" :limit="1" :filePathName="'项目结算/经营发展部审核结算单'"
95
               :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']" @input="setModifyDocument">
95
               :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf', 'rar', 'zip']" @input="setModifyDocument">
96
             </FileUpload>
96
             </FileUpload>
117
                 <span class="el-icon-download">下载文件</span>
117
                 <span class="el-icon-download">下载文件</span>
118
               </el-link>
118
               </el-link>
119
             </div>
119
             </div>
120
-          </el-form-item>
120
+          </el-form-item> -->
121
 
121
 
122
           <div class="headers" v-hasRole="['leader', 'business']">
122
           <div class="headers" v-hasRole="['leader', 'business']">
123
             合同信息
123
             合同信息
129
             <div class="line"></div>
129
             <div class="line"></div>
130
           </div>
130
           </div>
131
           <el-form-item label-width="60px">
131
           <el-form-item label-width="60px">
132
-            <el-table :data="budgetList">
132
+            <el-table :data="budgetList" v-if="budgetList.length > 0">
133
               <el-table-column prop="budgetSettleId" label="序号" />
133
               <el-table-column prop="budgetSettleId" label="序号" />
134
               <el-table-column prop="content" label="工作内容" />
134
               <el-table-column prop="content" label="工作内容" />
135
               <el-table-column label="具体内容" width="150px">
135
               <el-table-column label="具体内容" width="150px">
154
               <el-table-column prop="settle" label="金额" />
154
               <el-table-column prop="settle" label="金额" />
155
               <el-table-column prop="remark" label="备注" />
155
               <el-table-column prop="remark" label="备注" />
156
             </el-table>
156
             </el-table>
157
-            <p style="text-align: right;font-size:18px;padding-right:13%">
157
+            <p style="text-align: right;font-size:18px;padding-right:13%" v-if="budgetList.length > 0">
158
               <b>预算内项目结算总金额:{{ budgetSettle }}</b>
158
               <b>预算内项目结算总金额:{{ budgetSettle }}</b>
159
             </p>
159
             </p>
160
+            <el-tag type="danger" v-else>
161
+              未发起项目预算
162
+            </el-tag>
160
           </el-form-item>
163
           </el-form-item>
161
           <div class="headers">
164
           <div class="headers">
162
             项目完成工作量及经费计算
165
             项目完成工作量及经费计算
163
             <div class="line"></div>
166
             <div class="line"></div>
164
           </div>
167
           </div>
168
+          <div class="flex mb10" style="padding-left:80px;">
169
+            <div style="flex:1">
170
+              <el-link type="success" :href="`${baseUrl}${'/profile/upload/项目结算/cmc项目结算导入模板.xlsx'}`">
171
+                结算工作量导入模板下载<i class="el-icon-download"></i>
172
+              </el-link>
173
+            </div>
174
+            <div class="text-right" style="flex:1">
175
+              <el-button size="mini" type="warning" icon="el-icon-upload2" @click="importOpen = true">一键导入</el-button>
176
+            </div>
177
+          </div>
165
           <el-form-item label-width="60px">
178
           <el-form-item label-width="60px">
166
             <table border="1">
179
             <table border="1">
167
               <tr>
180
               <tr>
213
               </td>
226
               </td>
214
               <td>
227
               <td>
215
                 <div style="display: flex">
228
                 <div style="display: flex">
216
-                  <el-input-number :precision="2" style="width: 100px" v-model="work.coefficient" clearable
229
+                  <el-input-number :precision="3" style="width: 100px" v-model="work.coefficient" clearable
217
                     :disabled="isModify" @blur="calculateSettle(work)" :controls="false"></el-input-number>
230
                     :disabled="isModify" @blur="calculateSettle(work)" :controls="false"></el-input-number>
218
                   <el-popover placement="top-start" title="系数备注" width="200" trigger="click">
231
                   <el-popover placement="top-start" title="系数备注" width="200" trigger="click">
219
                     <div v-html="work.noteTip"></div>
232
                     <div v-html="work.noteTip"></div>
279
                   </el-input>
292
                   </el-input>
280
                 </td>
293
                 </td>
281
                 <td>
294
                 <td>
282
-                  <el-input-number :min="0" :precision="2" style="width: 200px" v-model="work.amount" clearable
295
+                  <el-input-number :min="0" :precision="3" style="width: 200px" v-model="work.amount" clearable
283
                     :disabled="isModify" :controls="false" @blur="calculateActualSumSettle()"></el-input-number>
296
                     :disabled="isModify" :controls="false" @blur="calculateActualSumSettle()"></el-input-number>
284
                   <!-- {{ work.amount }} -->
297
                   <!-- {{ work.amount }} -->
285
                 </td>
298
                 </td>
511
       <return-btn :taskForm="taskForm" :comment="commentByRole()" @goBack="$emit('goBack')" @saves=""
524
       <return-btn :taskForm="taskForm" :comment="commentByRole()" @goBack="$emit('goBack')" @saves=""
512
         @cancel="returnOpen = false"></return-btn>
525
         @cancel="returnOpen = false"></return-btn>
513
     </el-dialog>
526
     </el-dialog>
527
+
528
+    <el-dialog title="导入结算工作量" :visible.sync="importOpen" width="400px" append-to-body>
529
+      <settle-import @getDataList="getImportSettleList" @cancel="importOpen = false" ></settle-import>
530
+    </el-dialog>
514
   </div>
531
   </div>
515
 </template>
532
 </template>
516
 
533
 
540
 import projectContractInfo from "./projectContractInfo.vue";
557
 import projectContractInfo from "./projectContractInfo.vue";
541
 import ReturnComment from '@/views/flowable/form/components/flowBtn/returnComment.vue';
558
 import ReturnComment from '@/views/flowable/form/components/flowBtn/returnComment.vue';
542
 import ReturnBtn from '@/views/flowable/form/components/flowBtn/returnBtn.vue';
559
 import ReturnBtn from '@/views/flowable/form/components/flowBtn/returnBtn.vue';
560
+import SettleImport from "./settleImport.vue";
543
 export default {
561
 export default {
544
   components: {
562
   components: {
545
     flow,
563
     flow,
548
     ChooseProject,
566
     ChooseProject,
549
     projectContractInfo,
567
     projectContractInfo,
550
     ReturnComment,
568
     ReturnComment,
551
-    ReturnBtn
569
+    ReturnBtn,
570
+    SettleImport
552
   },
571
   },
553
   props: {
572
   props: {
554
     taskName: {
573
     taskName: {
644
       projectId: '',
663
       projectId: '',
645
       showAlter: true,
664
       showAlter: true,
646
       returnOpen: false,
665
       returnOpen: false,
666
+      importOpen:false,
647
     };
667
     };
648
   },
668
   },
649
   created() {
669
   created() {
1205
       } else if (this.taskName == '董事长批准') {
1225
       } else if (this.taskName == '董事长批准') {
1206
         return this.form.dszComment
1226
         return this.form.dszComment
1207
       }
1227
       }
1228
+    },
1229
+    getImportSettleList(val){
1230
+      this.settleWorkList = val;
1231
+      for(let work of this.settleWorkList){
1232
+        this.calculateSettle(work)
1233
+      }
1234
+      this.importOpen = false;
1208
     }
1235
     }
1209
   },
1236
   },
1210
 };
1237
 };
1218
   font-weight: bold;
1245
   font-weight: bold;
1219
   font-size: 18px;
1246
   font-size: 18px;
1220
   padding-left: 40px;
1247
   padding-left: 40px;
1221
-  padding-bottom: 40px;
1248
+  padding-bottom: 20px;
1222
 
1249
 
1223
   .line {
1250
   .line {
1224
     position: absolute;
1251
     position: absolute;

+ 73
- 0
oa-ui/src/views/flowable/form/settleImport.vue View File

1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2025-01-08 15:53:45
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2025-01-09 13:58:07
6
+-->
7
+<template>
8
+  <div>
9
+    <el-upload ref="uploadSettleRef" :action="uploadFileUrl" class="upload-demo" drag :limit="1" :headers="headers"
10
+      :auto-upload="false" :on-success="handleSuccess">
11
+      <i class="el-icon-upload"></i>
12
+      <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
13
+      <div class="el-upload__tip" slot="tip">
14
+        <div class="el-upload__tip text-center">
15
+          <span>批量导入项目完成工作量,若无模板,请先</span>
16
+          <el-link style="font-size:12px;;vertical-align: baseline;" type="primary" @click="downTemplate">下载模板</el-link>
17
+        </div>
18
+      </div>
19
+    </el-upload>
20
+    <div class="text-center mt20">
21
+      <el-button type="primary" @click="submitUpload">确 定</el-button>
22
+      <el-button @click="$emit('cancel')">取 消</el-button>
23
+    </div>
24
+  </div>
25
+</template>
26
+
27
+<script>
28
+import { uploadSettleSheet } from "@/api/oa/settle/settle"
29
+import { getPrice, getPriceRemarkByWorkType } from "@/api/oa/price/price";
30
+import { getToken } from "@/utils/auth";
31
+
32
+export default {
33
+  data() {
34
+    return {
35
+      baseUrl: process.env.VUE_APP_BASE_API,
36
+      uploadFileUrl: process.env.VUE_APP_BASE_API + "/oa/settle/uploadSheet", // 上传文件服务器地址
37
+      headers: {
38
+        Authorization: "Bearer " + getToken(),
39
+      },
40
+    }
41
+  },
42
+  methods: {
43
+    async handleSuccess(response) {
44
+      if (response.code == 200) {
45
+        let list = response.data
46
+        const traList = list.map(item => ({
47
+          ...item,
48
+          coefficient: Number(item.coefficient),
49
+          groundType: item.groundType == '一般地类' ? '0' : '1',
50
+          priceId: Number(item.priceId),
51
+          workload: Number(item.workload),
52
+        }));
53
+        for (let i of traList) {
54
+          let res = await getPrice(i.priceId);
55
+          i.scale = res.data.scaleGrade;
56
+          i.unit = res.data.unit;
57
+          i.price = i.groundType == '1' ? res.data.commonPrice : res.data.complexPrice;
58
+          
59
+        }
60
+        this.$emit('getDataList', traList)
61
+      }
62
+    },
63
+    submitUpload() {
64
+      this.$refs['uploadSettleRef'].submit();
65
+    },
66
+    downTemplate(){
67
+      window.location.href = `${this.baseUrl}${'/profile/upload/项目结算/cmc项目结算导入模板.xlsx'}`
68
+    }
69
+  },
70
+}
71
+</script>
72
+
73
+<style lang="scss" scoped></style>

+ 21
- 3
oa-ui/src/views/flowable/form/technicalPlan.vue View File

2
   <div class="app-container">
2
   <div class="app-container">
3
     <el-row :gutter="20">
3
     <el-row :gutter="20">
4
       <el-col :span="18" :xs="24">
4
       <el-col :span="18" :xs="24">
5
+        <div class="mb20" v-if="showAlter">
6
+          <el-alert title="任务被退回,请修改后重新提交" type="error" :closable="false">
7
+            <return-comment :taskForm="taskForm" @isReturn="isReturn"></return-comment>
8
+          </el-alert>
9
+        </div>
5
         <el-form ref="form" :model="form" :rules="rules" label-width="130px">
10
         <el-form ref="form" :model="form" :rules="rules" label-width="130px">
6
           <el-form-item label="项目编号:" prop="projectId" v-if="taskForm.procDefName == '技术方案'">
11
           <el-form-item label="项目编号:" prop="projectId" v-if="taskForm.procDefName == '技术方案'">
7
             <el-input v-model="chooseProject.projectNumber" placeholder="请输入项目编号" disabled style="width: 300px" />
12
             <el-input v-model="chooseProject.projectNumber" placeholder="请输入项目编号" disabled style="width: 300px" />
76
               :underline="false" target="_blank">
81
               :underline="false" target="_blank">
77
               <span class="el-icon-document"> {{ getFileName(form.technicalDocument) }} </span>
82
               <span class="el-icon-document"> {{ getFileName(form.technicalDocument) }} </span>
78
             </el-link> -->
83
             </el-link> -->
79
-            <div v-if="form.technicalDocument && taskName != '方案上传'">
84
+            <div v-if="form.technicalDocument">
80
               <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + form.technicalDocument}`)">
85
               <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + form.technicalDocument}`)">
81
                 {{ getFileName(form.technicalDocument) }}
86
                 {{ getFileName(form.technicalDocument) }}
82
               </el-link>
87
               </el-link>
201
           </el-row>
206
           </el-row>
202
         </el-form>
207
         </el-form>
203
         <div style="text-align: center;" v-if="taskName">
208
         <div style="text-align: center;" v-if="taskName">
209
+          <el-button type="danger" @click="returnOpen = true" v-show="taskName != '技术安排' && taskName != '方案上传'">退 回</el-button>
204
           <el-button type="primary" @click="submitForm">提 交</el-button>
210
           <el-button type="primary" @click="submitForm">提 交</el-button>
205
         </div>
211
         </div>
206
       </el-col>
212
       </el-col>
239
         <el-button type="primary" @click="confirmExamine">确 定</el-button>
245
         <el-button type="primary" @click="confirmExamine">确 定</el-button>
240
       </span>
246
       </span>
241
     </el-dialog>
247
     </el-dialog>
248
+    <el-dialog title="退回" :visible.sync="returnOpen" width="40%" append-to-body>
249
+      <return-btn :taskForm="taskForm" @goBack="$emit('goBack')" @saves="" @cancel="returnOpen = false"></return-btn>
250
+    </el-dialog>
242
   </div>
251
   </div>
243
 </template>
252
 </template>
244
 
253
 
252
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
261
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
253
 import { flowXmlAndNode } from "@/api/flowable/definition";
262
 import { flowXmlAndNode } from "@/api/flowable/definition";
254
 import { getUsersManageLeaderByDept, getUsersDeptLeaderByDept, getUserByPost } from '@/api/system/post'
263
 import { getUsersManageLeaderByDept, getUsersDeptLeaderByDept, getUserByPost } from '@/api/system/post'
264
+import ReturnBtn from './components/flowBtn/returnBtn.vue';
265
+import ReturnComment from './components/flowBtn/returnComment.vue';
255
 
266
 
256
 export default {
267
 export default {
257
   components: {
268
   components: {
258
     FlowUser,
269
     FlowUser,
259
-    flow
270
+    flow,
271
+    ReturnBtn,
272
+    ReturnComment,
260
   },
273
   },
261
   name: "Technical",
274
   name: "Technical",
262
   props: {
275
   props: {
340
       isDocumentValid: true,
353
       isDocumentValid: true,
341
       commentOpen: false,
354
       commentOpen: false,
342
       common: '0',
355
       common: '0',
343
-      examineLabel: ''
356
+      examineLabel: '',
357
+      showAlter:true,
358
+      returnOpen:false,
344
     };
359
     };
345
   },
360
   },
346
   created() {
361
   created() {
615
         isShow = (this.taskName == '总工审核' || this.taskName == '');
630
         isShow = (this.taskName == '总工审核' || this.taskName == '');
616
       return isShow;
631
       return isShow;
617
     },
632
     },
633
+    isReturn(val) {
634
+      this.showAlter = val
635
+    }
618
   }
636
   }
619
 };
637
 };
620
 </script>
638
 </script>

+ 5
- 1
oa-ui/src/views/oa/declare/index.vue View File

2
  * @Author: wrh
2
  * @Author: wrh
3
  * @Date: 2024-08-14 14:24:11
3
  * @Date: 2024-08-14 14:24:11
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-01-03 09:28:39
5
+ * @LastEditTime: 2025-01-09 09:26:23
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container">
8
   <div class="app-container">
246
       if (this.$store.getters.roles.includes('dept')) {
246
       if (this.$store.getters.roles.includes('dept')) {
247
         this.queryParams.projectLeader = null
247
         this.queryParams.projectLeader = null
248
       }
248
       }
249
+      if (this.$store.getters.userId == 1 ) {
250
+        this.queryParams.deptId = null
251
+        this.queryParams.projectLeader = null
252
+      }
249
       listDeclare(this.queryParams).then(response => {
253
       listDeclare(this.queryParams).then(response => {
250
         this.declareList = response.rows;
254
         this.declareList = response.rows;
251
         this.total = response.total;
255
         this.total = response.total;

Loading…
Cancel
Save