2 İşlemeler

Yazar SHA1 Mesaj Tarih
  余思翰 25645f7d2e Merge branch 'master' of http://oa.sccehui.com:6101/cmc-coding/cmc-oa 2 hafta önce
  余思翰 997e107aa8 完善核算流程,修改点击预算的预览表单 2 hafta önce

+ 7
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetOtherController.java Dosyayı Görüntüle

1
+/*
2
+ * @Author: ysh
3
+ * @Date: 2025-05-09 10:35:47
4
+ * @LastEditors: 
5
+ * @LastEditTime: 2025-05-16 11:23:17
6
+ */
1
 package com.ruoyi.web.controller.oa;
7
 package com.ruoyi.web.controller.oa;
2
 
8
 
3
 import java.util.List;
9
 import java.util.List;
89
      * 删除cmc预算外开支
95
      * 删除cmc预算外开支
90
      */
96
      */
91
     @Log(title = "cmc预算外开支", businessType = BusinessType.DELETE)
97
     @Log(title = "cmc预算外开支", businessType = BusinessType.DELETE)
92
-	@DeleteMapping("/{expenseIds}")
98
+	@DeleteMapping("/{budgetId}")
93
     public AjaxResult remove(@PathVariable String[] budgetId)
99
     public AjaxResult remove(@PathVariable String[] budgetId)
94
     {
100
     {
95
         return success(cmcBudgetOtherService.deleteCmcBudgetOtherByExpenseIds(budgetId));
101
         return success(cmcBudgetOtherService.deleteCmcBudgetOtherByExpenseIds(budgetId));

+ 3
- 4
oa-ui/src/views/flowable/form/budget/adjust/adjustIndex.vue Dosyayı Görüntüle

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-14 16:09:56
3
  * @Date: 2025-05-14 16:09:56
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-14 16:56:52
5
+ * @LastEditTime: 2025-05-19 10:47:29
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container">
8
   <div class="app-container">
58
           <el-button icon="el-icon-back" type="text" @click="handleBack">返回选择</el-button>
58
           <el-button icon="el-icon-back" type="text" @click="handleBack">返回选择</el-button>
59
           <h3>预算调整</h3>
59
           <h3>预算调整</h3>
60
         </div>
60
         </div>
61
-        <budget-adjust :taskForm="taskForm" :taskName="taskName" :row="selectedRows"
62
-          @preserve="preserve"></budget-adjust>
61
+        <budget-adjust :taskForm="taskForm" :taskName="taskName" :row="selectedRows" @preserve="preserve"
62
+          @goBack="$emit('goBack')"></budget-adjust>
63
       </div>
63
       </div>
64
     </transition>
64
     </transition>
65
   </div>
65
   </div>
175
     },
175
     },
176
     preserve() {
176
     preserve() {
177
       this.hideReturn = false;
177
       this.hideReturn = false;
178
-      console.log(1111);
179
     }
178
     }
180
   }
179
   }
181
 }
180
 }

+ 426
- 52
oa-ui/src/views/flowable/form/budget/adjust/budgetAdjust.vue Dosyayı Görüntüle

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-07 11:01:39
3
  * @Date: 2025-05-07 11:01:39
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-16 11:15:36
5
+ * @LastEditTime: 2025-05-19 17:49:04
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="main" v-loading="loading">
8
   <div class="main" v-loading="loading">
9
     <h2 class="text-center">项目直接生产成本预算—核算表</h2>
9
     <h2 class="text-center">项目直接生产成本预算—核算表</h2>
10
-    <p style="text-align: center">编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }}</p>
10
+    <p style="text-align: center">
11
+      编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }}
12
+      <span style="margin-left: 20px;">核算人:{{ checkForm.checker ? getUserName(checkForm.checker) : '' }}</span>
13
+    </p>
14
+    <div class="mt20 mb20" v-if="showAlter && taskName">
15
+      <el-alert title="任务被退回,请修改后重新提交" type="error" :closable="false">
16
+        <return-comment :taskForm="taskForm" @isReturn="isReturn"></return-comment>
17
+      </el-alert>
18
+    </div>
11
     <el-divider></el-divider>
19
     <el-divider></el-divider>
12
     <el-descriptions :column="3" border class="descriptions">
20
     <el-descriptions :column="3" border class="descriptions">
13
       <el-descriptions-item label="项目编号">
21
       <el-descriptions-item label="项目编号">
28
       <el-descriptions-item label="预算表单备注" :span="5">
36
       <el-descriptions-item label="预算表单备注" :span="5">
29
         {{ budgetForm.remark }}
37
         {{ budgetForm.remark }}
30
       </el-descriptions-item>
38
       </el-descriptions-item>
39
+      <el-descriptions-item label="预算附件" :span="3" v-if="budgetForm.document">
40
+        <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + budgetForm.document}`)">
41
+          {{ getFileName(budgetForm.document) }}
42
+        </el-link>
43
+        <el-link class="ml20" type="warning" :href="`${baseUrl}${'/profile/upload' + budgetForm.document}`"
44
+          :underline="false" target="_blank">
45
+          <span class="el-icon-download">下载文件</span>
46
+        </el-link>
47
+      </el-descriptions-item>
31
       <el-descriptions-item label="项目计划工作量" :span="3">
48
       <el-descriptions-item label="项目计划工作量" :span="3">
32
         <div>
49
         <div>
33
           <table border="1" style="width: 100%;">
50
           <table border="1" style="width: 100%;">
91
           </tr>
108
           </tr>
92
           <tr style="color:#F56C6C">
109
           <tr style="color:#F56C6C">
93
             <td :colspan="8" class="head">内业核算绩效额</td>
110
             <td :colspan="8" class="head">内业核算绩效额</td>
94
-            <td :colspan="1" class="head">
111
+            <td :colspan="1" class="head" v-if="taskName == '核算编制'">
95
               <el-input-number v-model="budgetForm.settleAdjust" :controls="false" style="width:100%"></el-input-number>
112
               <el-input-number v-model="budgetForm.settleAdjust" :controls="false" style="width:100%"></el-input-number>
96
             </td>
113
             </td>
114
+            <td style="text-align:right;font-weight:bold;" :colspan="1" class="head" v-else>
115
+              {{ budgetForm.settleAdjust ? budgetForm.settleAdjust.toFixed(2) : '0.00' }}
116
+            </td>
97
           </tr>
117
           </tr>
98
         </table>
118
         </table>
99
       </el-descriptions-item>
119
       </el-descriptions-item>
100
       <el-descriptions-item label="内业人员成本" :span="3" v-if="innerStaffList.length > 0">
120
       <el-descriptions-item label="内业人员成本" :span="3" v-if="innerStaffList.length > 0">
101
         <inner-staff-cost :staffList.sync="innerStaffList" :settleExpense="budgetForm.settleExpense"
121
         <inner-staff-cost :staffList.sync="innerStaffList" :settleExpense="budgetForm.settleExpense"
102
-          :settleAdjust="budgetForm.settleAdjust" @update:staffList="handleInnerStaffChange"></inner-staff-cost>
122
+          :settleAdjust="budgetForm.settleAdjust" :taskName="taskName"
123
+          @update:staffList="handleInnerStaffChange"></inner-staff-cost>
103
       </el-descriptions-item>
124
       </el-descriptions-item>
104
       <el-descriptions-item label="外业人员成本" :span="3" v-if="outerStaffList.length > 0">
125
       <el-descriptions-item label="外业人员成本" :span="3" v-if="outerStaffList.length > 0">
105
-        <outer-staff-cost :staffList.sync="outerStaffList"
126
+        <outer-staff-cost :staffList.sync="outerStaffList" :taskName="taskName"
106
           @update:staffList="handleOuterStaffChange"></outer-staff-cost>
127
           @update:staffList="handleOuterStaffChange"></outer-staff-cost>
107
       </el-descriptions-item>
128
       </el-descriptions-item>
108
       <el-descriptions-item label="车辆成本" :span="3" v-if="carList.length > 0">
129
       <el-descriptions-item label="车辆成本" :span="3" v-if="carList.length > 0">
109
-        <car-cost :carList.sync="carList" @update:carList="handleCarChange"></car-cost>
130
+        <car-cost :carList.sync="carList" :taskName="taskName" @update:carList="handleCarChange"></car-cost>
110
       </el-descriptions-item>
131
       </el-descriptions-item>
111
       <el-descriptions-item label="设备成本" :span="3" v-if="deviceList.length > 0">
132
       <el-descriptions-item label="设备成本" :span="3" v-if="deviceList.length > 0">
112
-        <device-cost :deviceList.sync="deviceList" @update:deviceList="handleDeviceChange"></device-cost>
133
+        <device-cost :deviceList.sync="deviceList" :taskName="taskName"
134
+          @update:deviceList="handleDeviceChange"></device-cost>
113
       </el-descriptions-item>
135
       </el-descriptions-item>
114
       <el-descriptions-item label="现场开支" :span="3">
136
       <el-descriptions-item label="现场开支" :span="3">
115
-        <site-cost :siteList.sync="siteList" @update:siteList="handleSiteChange"></site-cost>
137
+        <site-cost :siteList.sync="siteList" :taskName="taskName" @update:siteList="handleSiteChange"></site-cost>
116
       </el-descriptions-item>
138
       </el-descriptions-item>
117
       <el-descriptions-item label="经营相关" :span="3">
139
       <el-descriptions-item label="经营相关" :span="3">
118
-        <business-cost :budgetForm.sync="budgetForm" @update:budgetForm="handleBusinessChange"></business-cost>
140
+        <business-cost :budgetForm.sync="budgetForm" :taskName="taskName"
141
+          @update:budgetForm="handleBusinessChange"></business-cost>
142
+      </el-descriptions-item>
143
+      <el-descriptions-item label="现场外开销" :span="3">
144
+        <other-cost :otherList.sync="otherList" :taskName="taskName" @update:otherList="handleOtherChange"></other-cost>
119
       </el-descriptions-item>
145
       </el-descriptions-item>
120
-      <el-descriptions-item label="预算外开销" :span="3">
121
-        <other-cost :otherList.sync="otherList" @update:otherList="handleOtherChange"></other-cost>
146
+      <el-descriptions-item label="统计" :span="3">
147
+        <table border="1" style="width:100%;" class="budget-summary">
148
+          <tr class="header">
149
+            <td><b>名称</b></td>
150
+            <td><b>预算金额</b></td>
151
+            <td><b>核算金额</b></td>
152
+            <td><b>(核算-预算)差值</b></td>
153
+          </tr>
154
+          <tr>
155
+            <td>人员成本</td>
156
+            <td style="text-align:right;">{{ isNaN(budgetForm.staffCost) ? 0 : Number(budgetForm.staffCost).toFixed(2)
157
+            }}</td>
158
+            <td style="text-align:right;">{{ isNaN(checkStaffCost) ? 0 : Number(checkStaffCost).toFixed(2) }}</td>
159
+            <td style="text-align:right;">{{ (Number(checkStaffCost) - Number(budgetForm.staffCost)).toFixed(2) }}</td>
160
+          </tr>
161
+          <tr>
162
+            <td>车辆成本</td>
163
+            <td style="text-align:right;">{{ isNaN(budgetForm.carCost) ? 0 : Number(budgetForm.carCost).toFixed(2) }}
164
+            </td>
165
+            <td style="text-align:right;">{{ isNaN(checkCarCost) ? 0 : Number(checkCarCost).toFixed(2) }}</td>
166
+            <td style="text-align:right;">{{ (Number(checkCarCost) - Number(budgetForm.carCost)).toFixed(2) }}</td>
167
+          </tr>
168
+          <tr>
169
+            <td>设备成本</td>
170
+            <td style="text-align:right;">{{ isNaN(budgetForm.deviceCost) ? 0 : Number(budgetForm.deviceCost).toFixed(2)
171
+            }}</td>
172
+            <td style="text-align:right;">{{ isNaN(checkDeviceCost) ? 0 : Number(checkDeviceCost).toFixed(2) }}</td>
173
+            <td style="text-align:right;">{{ (Number(checkDeviceCost) - Number(budgetForm.deviceCost)).toFixed(2) }}
174
+            </td>
175
+          </tr>
176
+          <tr>
177
+            <td>现场开支成本</td>
178
+            <td style="text-align:right;">{{ isNaN(budgetForm.siteSum) ? 0 : Number(budgetForm.siteSum).toFixed(2) }}
179
+            </td>
180
+            <td style="text-align:right;">{{ isNaN(checkSiteCost) ? 0 : Number(checkSiteCost).toFixed(2) }}</td>
181
+            <td style="text-align:right;">{{ (Number(checkSiteCost) - Number(budgetForm.siteSum)).toFixed(2) }}</td>
182
+          </tr>
183
+          <tr>
184
+            <td>经营相关成本</td>
185
+            <td style="text-align:right;">{{ isNaN(totalJYAmount) ? 0 : Number(totalJYAmount).toFixed(2) }}</td>
186
+            <td style="text-align:right;">{{ isNaN(checkJYAmount) ? 0 : Number(checkJYAmount).toFixed(2) }}</td>
187
+            <td style="text-align:right;">{{ (Number(checkJYAmount) - Number(totalJYAmount)).toFixed(2) }}</td>
188
+          </tr>
189
+          <tr>
190
+            <td>现场外开销</td>
191
+            <td style="text-align:right;">0.00</td>
192
+            <td style="text-align:right;">{{ isNaN(checkOtherCost) ? 0 : Number(checkOtherCost).toFixed(2) }}</td>
193
+            <td style="text-align:right;">{{ (Number(checkOtherCost) - 0).toFixed(2) }}</td>
194
+          </tr>
195
+          <tr class="total-budget">
196
+            <td><b>总计</b></td>
197
+            <td style="text-align:right;"><b>{{ isNaN(budgetForm.totalBudget) ? 0 : budgetForm.totalBudget }}</b></td>
198
+            <td style="text-align:right;"><b>{{ isNaN(totalBudgetAdjust) ? 0 : totalBudgetAdjust }}</b></td>
199
+            <td style="text-align:right;"><b>{{ (Number(totalBudgetAdjust) - Number(budgetForm.totalBudget)).toFixed(2)
200
+            }}</b></td>
201
+          </tr>
202
+        </table>
203
+      </el-descriptions-item>
204
+      <el-descriptions-item label="核算说明" :span="3">
205
+        <div v-if="taskName == '核算编制' && !checkForm.checkComment" class="alert alert-warning"
206
+          style="padding: 10px; border: 1px solid #f0ad4e; background-color: #fcf8e3; color: #8a6d3b;">
207
+          请填写以下内容
208
+        </div>
209
+        <el-input :class="{ 'business-section': taskName == '核算编制' }" type="textarea" :autosize="{ minRows: 4 }"
210
+          v-model="checkForm.checkComment" :disabled="taskName != '核算编制'" />
211
+        <div class="sign mt10" v-if="checkForm.checkComment">
212
+          <div class="mr20">签名:<span class="auditor">{{ getUserName(checkForm.checker) }}</span>
213
+          </div>
214
+          <div class="ml20"><span>核算时间:{{ checkForm.checkTime }}</span></div>
215
+        </div>
216
+      </el-descriptions-item>
217
+      <el-descriptions-item label="财务审核意见" :span="3">
218
+        <div v-if="taskName == '财务审核' && !checkForm.cwComment" class="alert alert-warning"
219
+          style="padding: 10px; border: 1px solid #f0ad4e; background-color: #fcf8e3; color: #8a6d3b;">
220
+          请填写以下内容
221
+        </div>
222
+        <el-input :class="{ 'business-section': taskName == '财务审核' }" type="textarea" :autosize="{ minRows: 4 }"
223
+          v-model="checkForm.cwComment" :disabled="taskName != '财务审核'" />
224
+        <div class="sign mt10" v-if="checkForm.cwComment">
225
+          <div class="mr20">签名:<span class="auditor">{{ getUserName(checkForm.cwUserId) }}</span>
226
+          </div>
227
+          <div class="ml20"><span>审核时间:{{ checkForm.cwTime }}</span></div>
228
+        </div>
122
       </el-descriptions-item>
229
       </el-descriptions-item>
123
       <el-descriptions-item label="分管审核意见" :span="3">
230
       <el-descriptions-item label="分管审核意见" :span="3">
124
-
231
+        <table border="1" style="width:100%; text-align:left;">
232
+          <tr style="background-color:#f8f8f9;">
233
+            <td style="width:50%;">预算分管审核意见</td>
234
+            <td style="width:50%;">核算分管审核意见</td>
235
+          </tr>
236
+          <tr>
237
+            <td>
238
+              <el-input type="textarea" :autosize="{ minRows: 4 }" v-model="budgetForm.managerComment" disabled />
239
+              <div class="sign mt10" v-if="budgetForm.manager">
240
+                <div class="mr20">签名:<span class="auditor">{{ getUserName(budgetForm.manager) }}</span></div>
241
+                <div class="ml20"><span>审核时间:{{ budgetForm.managerTime }}</span></div>
242
+              </div>
243
+            </td>
244
+            <td>
245
+              <el-input type="textarea" :autosize="{ minRows: 4 }" v-model="checkForm.managerComment"
246
+                :disabled="taskName != '分管审核'" />
247
+              <div class="sign mt10" v-if="checkForm.managerUserId">
248
+                <div class="mr20">签名:<span class="auditor">{{ getUserName(checkForm.managerUserId) }}</span></div>
249
+                <div class="ml20"><span>审核时间:{{ checkForm.managerTime }}</span></div>
250
+              </div>
251
+            </td>
252
+          </tr>
253
+        </table>
254
+      </el-descriptions-item>
255
+      <el-descriptions-item label="总经理审批意见" :span="3">
256
+        <table border="1" style="width:100%; text-align:left;">
257
+          <tr style="background-color:#f8f8f9;">
258
+            <td style="width:50%;">预算总经理审核意见</td>
259
+            <td style="width:50%;">核算总经理审核意见</td>
260
+          </tr>
261
+          <tr>
262
+            <td>
263
+              <el-input type="textarea" :autosize="{ minRows: 4 }" v-model="budgetForm.zjlComment" disabled />
264
+              <div class="sign mt10" v-if="budgetForm.zjlComment">
265
+                <div class="mr20">签名:<span class="auditor">{{ getUserName(budgetForm.auditor) }}</span>
266
+                </div>
267
+                <div class="ml20"><span>审核时间:{{ budgetForm.zjlTime }}</span></div>
268
+              </div>
269
+            </td>
270
+            <td>
271
+              <el-input type="textarea" :autosize="{ minRows: 4 }" v-model="checkForm.zjlComment"
272
+                :disabled="taskName != '总经理审核'" />
273
+              <div class="sign mt10" v-if="checkForm.zjlComment">
274
+                <div class="mr20">签名:<span class="auditor">{{ getUserName(checkForm.zjlUserId) }}</span>
275
+                </div>
276
+                <div class="ml20"><span>审核时间:{{ checkForm.zjlTime }}</span></div>
277
+              </div>
278
+            </td>
279
+          </tr>
280
+        </table>
125
       </el-descriptions-item>
281
       </el-descriptions-item>
126
     </el-descriptions>
282
     </el-descriptions>
127
-    <div class="text-center mt20 mb20">
283
+    <div class="text-center mt20 mb20" v-if="taskName">
284
+      <el-button type="danger" @click="returnOpen = true">退 回</el-button>
128
       <el-button type="warning" @click="preserve()">保 存</el-button>
285
       <el-button type="warning" @click="preserve()">保 存</el-button>
129
-      <el-button type="success" @click="confirmSucess()">提交下一个流程</el-button>
286
+      <el-button type="success" @click="confirmSucess()">{{ taskName == '总经理审核' ? '结束流程' : '提交下一个流程' }}</el-button>
130
     </div>
287
     </div>
288
+    <el-dialog title="退回" :visible.sync="returnOpen" width="40%" append-to-body>
289
+      <return-btn :taskForm="taskForm" :comment="commentByRole()" @goBack="$emit('goBack')"
290
+        @cancel="returnOpen = false"></return-btn>
291
+    </el-dialog>
131
   </div>
292
   </div>
132
 </template>
293
 </template>
133
 
294
 
142
 import { listProjectWork } from "@/api/oa/project/projectWork";
303
 import { listProjectWork } from "@/api/oa/project/projectWork";
143
 import { listSite, updateSite, delSite, addSite } from "@/api/oa/budget/budgetSite";
304
 import { listSite, updateSite, delSite, addSite } from "@/api/oa/budget/budgetSite";
144
 import { getProject } from "@/api/oa/project/project";
305
 import { getProject } from "@/api/oa/project/project";
306
+import { complete, getNextFlowNode } from "@/api/flowable/todo";
307
+import { getUsersManageLeader, getUserByPost, getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByDept } from "@/api/system/post";
145
 import InnerStaffCost from './components/InnerStaffCost.vue';
308
 import InnerStaffCost from './components/InnerStaffCost.vue';
146
 import OuterStaffCost from './components/OuterStaffCost.vue';
309
 import OuterStaffCost from './components/OuterStaffCost.vue';
147
 import CarCost from './components/CarCost.vue';
310
 import CarCost from './components/CarCost.vue';
149
 import SiteCost from '@/views/flowable/form/budget/adjust/components/SiteCost.vue';
312
 import SiteCost from '@/views/flowable/form/budget/adjust/components/SiteCost.vue';
150
 import BusinessCost from '@/views/flowable/form/budget/adjust/components/businessCost.vue';
313
 import BusinessCost from '@/views/flowable/form/budget/adjust/components/businessCost.vue';
151
 import OtherCost from '@/views/flowable/form/budget/adjust/components/otherCost.vue';
314
 import OtherCost from '@/views/flowable/form/budget/adjust/components/otherCost.vue';
315
+import ReturnComment from '@/views/flowable/form/components/flowBtn/returnComment.vue';
316
+import ReturnBtn from '@/views/flowable/form/components/flowBtn/returnBtn.vue';
152
 export default {
317
 export default {
153
   components: {
318
   components: {
154
     InnerStaffCost,
319
     InnerStaffCost,
157
     DeviceCost,
322
     DeviceCost,
158
     SiteCost,
323
     SiteCost,
159
     BusinessCost,
324
     BusinessCost,
160
-    OtherCost
325
+    OtherCost,
326
+    ReturnComment,
327
+    ReturnBtn
161
   },
328
   },
162
   props: {
329
   props: {
163
     taskForm: {
330
     taskForm: {
169
     },
336
     },
170
     row: {
337
     row: {
171
       type: Object,
338
       type: Object,
339
+      default: () => {
340
+        return {}
341
+      }
342
+    }
343
+  },
344
+  watch: {
345
+    'taskForm.formId'() {
346
+      if (!this.row.projectId) {
347
+        getCheck(this.taskForm.formId).then(res => {
348
+          this.row.projectId = res.data.projectId;
349
+          this.initBudgetForm();
350
+          this.initCheckForm();
351
+          this.getProjectWorkList();
352
+        });
353
+      } else {
354
+        this.initBudgetForm();
355
+        this.initCheckForm();
356
+        this.getProjectWorkList();
357
+      }
358
+
172
     }
359
     }
173
   },
360
   },
174
   data() {
361
   data() {
175
     return {
362
     return {
363
+      baseUrl: process.env.VUE_APP_BASE_API,
176
       loading: true,
364
       loading: true,
177
       budgetForm: {},
365
       budgetForm: {},
366
+      checkForm: {},
178
       project: {},
367
       project: {},
179
       workContentList: [],
368
       workContentList: [],
180
       workList: [],
369
       workList: [],
183
       carList: [],
372
       carList: [],
184
       deviceList: [],
373
       deviceList: [],
185
       siteList: [],
374
       siteList: [],
186
-      otherList: []
375
+      otherList: [],
376
+      returnOpen: false,
377
+      showAlter: true,
378
+      totalJYAmount: 0,
379
+      checkStaffCost: 0,
380
+      checkCarCost: 0,
381
+      checkDeviceCost: 0,
382
+      checkSiteCost: 0,
383
+      checkOtherCost: 0,
384
+      checkJYAmount: 0,
385
+      totalBudgetAdjust: 0,
187
     }
386
     }
188
   },
387
   },
189
-  created() {
388
+  async created() {
389
+    if (!this.row.projectId) {
390
+      let res = await getCheck(this.taskForm.formId);
391
+      this.row.projectId = res.data.projectId;
392
+    }
190
     this.initBudgetForm();
393
     this.initBudgetForm();
394
+    this.initCheckForm();
191
     this.getProjectWorkList();
395
     this.getProjectWorkList();
192
   },
396
   },
193
   methods: {
397
   methods: {
197
         this.budgetForm = res.rows[0];
401
         this.budgetForm = res.rows[0];
198
         if (this.budgetForm) {
402
         if (this.budgetForm) {
199
           const budgetId = this.budgetForm.budgetId;
403
           const budgetId = this.budgetForm.budgetId;
404
+          // 经营相关
200
           this.budgetForm.outExpense = Number(this.budgetForm.outExpense).toFixed(2);
405
           this.budgetForm.outExpense = Number(this.budgetForm.outExpense).toFixed(2);
201
           this.budgetForm.letterExpense = Number(this.budgetForm.letterExpense).toFixed(2);
406
           this.budgetForm.letterExpense = Number(this.budgetForm.letterExpense).toFixed(2);
202
           this.budgetForm.winExpense = Number(this.budgetForm.winExpense).toFixed(2);
407
           this.budgetForm.winExpense = Number(this.budgetForm.winExpense).toFixed(2);
203
           this.budgetForm.taxExpense = Number(this.budgetForm.taxExpense).toFixed(2);
408
           this.budgetForm.taxExpense = Number(this.budgetForm.taxExpense).toFixed(2);
204
           this.budgetForm.travelExpense = Number(this.budgetForm.travelExpense).toFixed(2);
409
           this.budgetForm.travelExpense = Number(this.budgetForm.travelExpense).toFixed(2);
205
           this.budgetForm.totalBudget = Number(this.budgetForm.totalBudget).toFixed(2);
410
           this.budgetForm.totalBudget = Number(this.budgetForm.totalBudget).toFixed(2);
411
+          this.totalJYAmount = Number(this.budgetForm.outExpense || 0) +
412
+            Number(this.budgetForm.letterExpense || 0) +
413
+            Number(this.budgetForm.winExpense || 0) +
414
+            Number(this.budgetForm.taxExpense || 0) +
415
+            Number(this.budgetForm.travelExpense || 0);
416
+
417
+          this.budgetForm.outAdjust = Number(this.budgetForm.outAdjust).toFixed(2);
418
+          this.budgetForm.letterAdjust = Number(this.budgetForm.letterAdjust).toFixed(2);
419
+          this.budgetForm.winAdjust = Number(this.budgetForm.winAdjust).toFixed(2);
420
+          this.budgetForm.taxAdjust = Number(this.budgetForm.taxAdjust).toFixed(2);
421
+          this.budgetForm.travelAdjust = Number(this.budgetForm.travelAdjust).toFixed(2);
422
+          this.checkJYAmount = Number(this.budgetForm.outAdjust || 0) +
423
+            Number(this.budgetForm.letterAdjust || 0) +
424
+            Number(this.budgetForm.winAdjust || 0) +
425
+            Number(this.budgetForm.taxAdjust || 0) +
426
+            Number(this.budgetForm.travelAdjust || 0);
427
+
428
+
206
           // 获取设备数据
429
           // 获取设备数据
207
           let deviceRes = await listBudgetDevice({ pageSize: 100, budgetId });
430
           let deviceRes = await listBudgetDevice({ pageSize: 100, budgetId });
208
           this.deviceList = deviceRes.rows;
431
           this.deviceList = deviceRes.rows;
214
               amountAdjust: device.amountAdjust ? Number(device.amountAdjust).toFixed(2) : 0
437
               amountAdjust: device.amountAdjust ? Number(device.amountAdjust).toFixed(2) : 0
215
             };
438
             };
216
           });
439
           });
440
+          this.checkDeviceCost = this.deviceList.reduce((sum, device) => sum + Number(device.amountAdjust || 0), 0).toFixed(2);
441
+
217
           // 获取车辆数据
442
           // 获取车辆数据
218
           let carRes = await listBudgetCar({ pageSize: 100, budgetId });
443
           let carRes = await listBudgetCar({ pageSize: 100, budgetId });
219
           this.carList = carRes.rows;
444
           this.carList = carRes.rows;
225
               amountAdjust: car.amountAdjust ? Number(car.amountAdjust).toFixed(2) : 0
450
               amountAdjust: car.amountAdjust ? Number(car.amountAdjust).toFixed(2) : 0
226
             };
451
             };
227
           });
452
           });
453
+          this.checkCarCost = this.carList.reduce((sum, car) => sum + (Number(car.amountAdjust) || 0).toFixed(2), 0);
228
 
454
 
229
           // 获取内业人员数据
455
           // 获取内业人员数据
230
           let innerStaffRes = await listBudgetStaff({ pageSize: 100, budgetId, type: '内业' });
456
           let innerStaffRes = await listBudgetStaff({ pageSize: 100, budgetId, type: '内业' });
241
               amountAdjust: staff.amountAdjust ? Number(staff.amountAdjust).toFixed(2) : 0
467
               amountAdjust: staff.amountAdjust ? Number(staff.amountAdjust).toFixed(2) : 0
242
             };
468
             };
243
           });
469
           });
470
+          let innerCheckCost = this.innerStaffList.reduce((sum, staff) => sum + Number(staff.amountAdjust || 0), 0);
244
 
471
 
245
           // 获取外业人员数据
472
           // 获取外业人员数据
246
           let outerStaffRes = await listBudgetStaff({ pageSize: 100, budgetId, type: '外业' });
473
           let outerStaffRes = await listBudgetStaff({ pageSize: 100, budgetId, type: '外业' });
257
               amountAdjust: staff.amountAdjust ? Number(staff.amountAdjust).toFixed(2) : 0
484
               amountAdjust: staff.amountAdjust ? Number(staff.amountAdjust).toFixed(2) : 0
258
             };
485
             };
259
           });
486
           });
487
+          let outerCheckCost = this.outerStaffList.reduce((sum, staff) => sum + Number(staff.amountAdjust || 0), 0);
488
+          this.checkStaffCost = (innerCheckCost + outerCheckCost).toFixed(2);
260
 
489
 
261
           // 获取内业绩效额数据
490
           // 获取内业绩效额数据
262
           let settleRes = await listBudgetSettle({ pageSize: 100, budgetId });
491
           let settleRes = await listBudgetSettle({ pageSize: 100, budgetId });
290
           // 获取现场开支
519
           // 获取现场开支
291
           let siteRes = await listSite({ pageSize: 100, budgetId });
520
           let siteRes = await listSite({ pageSize: 100, budgetId });
292
           this.siteList = siteRes.rows;
521
           this.siteList = siteRes.rows;
522
+          this.siteList = this.siteList.map(site => {
523
+            return {
524
+              ...site,
525
+              amount: Number(site.amount).toFixed(2),
526
+              amountAdjust: site.amountAdjust ? Number(site.amountAdjust).toFixed(2) : 0
527
+            };
528
+          });
529
+          this.budgetForm.siteSum = this.siteList.reduce((sum, site) => sum + Number(site.amount || 0), 0).toFixed(2);
530
+          this.checkSiteCost = this.siteList.reduce((sum, site) => sum + Number(site.amountAdjust || 0), 0).toFixed(2);
293
 
531
 
294
           this.siteList = this.siteList.map(site => {
532
           this.siteList = this.siteList.map(site => {
295
             return {
533
             return {
309
               amountAdjust: other.amountAdjust ? Number(other.amountAdjust).toFixed(2) : 0
547
               amountAdjust: other.amountAdjust ? Number(other.amountAdjust).toFixed(2) : 0
310
             };
548
             };
311
           });
549
           });
550
+          this.checkOtherCost = this.otherList.reduce((sum, other) => sum + Number(other.amountAdjust || 0), 0).toFixed(2);
551
+          this.totalBudgetAdjust = (Number(this.checkStaffCost) + Number(this.checkCarCost) + Number(this.checkDeviceCost)
552
+            + Number(this.checkSiteCost) + Number(this.checkJYAmount) + Number(this.checkOtherCost)).toFixed(2);
312
         }
553
         }
313
         this.loading = false;
554
         this.loading = false;
314
       }).catch(() => {
555
       }).catch(() => {
315
         this.loading = false;
556
         this.loading = false;
316
       });
557
       });
317
     },
558
     },
559
+    initCheckForm() {
560
+      getCheck(this.taskForm.formId).then(res => {
561
+        if (res.data) {
562
+          this.checkForm = res.data;
563
+        }
564
+        if (this.taskName == '核算编制') {
565
+          this.checkForm.checker = this.$store.getters.userId;
566
+          this.checkForm.checkTime = this.parseTime(new Date(), '{y}-{m}-{d}');
567
+        } else if (this.taskName == '财务审核') {
568
+          this.checkForm.cwUserId = this.$store.getters.userId;
569
+          this.checkForm.cwTime = this.parseTime(new Date(), '{y}-{m}-{d}');
570
+        } else if (this.taskName == '分管审核') {
571
+          this.checkForm.managerUserId = this.$store.getters.userId;
572
+          this.checkForm.managerTime = this.parseTime(new Date(), '{y}-{m}-{d}');
573
+        } else if (this.taskName == '总经理审核') {
574
+          this.checkForm.zjlUserId = this.$store.getters.userId;
575
+          this.checkForm.zjlTime = this.parseTime(new Date(), '{y}-{m}-{d}');
576
+        }
577
+      })
578
+    },
318
     getProjectWorkList() {
579
     getProjectWorkList() {
319
       getProject(this.row.projectId).then(res => {
580
       getProject(this.row.projectId).then(res => {
320
         this.project = res.data;
581
         this.project = res.data;
326
     // 处理内业人员数据变化
587
     // 处理内业人员数据变化
327
     handleInnerStaffChange(newList) {
588
     handleInnerStaffChange(newList) {
328
       this.innerStaffList = newList;
589
       this.innerStaffList = newList;
590
+      this.checkStaffCost = this.innerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0).toFixed(2);
591
+      this.getTotalBudgetAdjust();
329
     },
592
     },
330
 
593
 
331
     // 处理外业人员数据变化
594
     // 处理外业人员数据变化
332
     handleOuterStaffChange(newList) {
595
     handleOuterStaffChange(newList) {
333
       this.outerStaffList = newList;
596
       this.outerStaffList = newList;
597
+      this.checkStaffCost = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0).toFixed(2);
598
+      this.getTotalBudgetAdjust();
334
     },
599
     },
335
     // 处理车辆数据变化
600
     // 处理车辆数据变化
336
     handleCarChange(newList) {
601
     handleCarChange(newList) {
337
       this.carList = newList;
602
       this.carList = newList;
603
+      this.checkCarCost = this.carList.reduce((sum, car) => sum + (Number(car.amountAdjust) || 0), 0).toFixed(2);
604
+      this.getTotalBudgetAdjust();
338
     },
605
     },
339
     // 处理设备数据变化
606
     // 处理设备数据变化
340
     handleDeviceChange(newList) {
607
     handleDeviceChange(newList) {
341
       this.deviceList = newList;
608
       this.deviceList = newList;
609
+      this.checkDeviceCost = this.deviceList.reduce((sum, device) => sum + (Number(device.amountAdjust) || 0), 0).toFixed(2);
610
+      this.getTotalBudgetAdjust();
342
     },
611
     },
343
     // 处理现场开支数据变化
612
     // 处理现场开支数据变化
344
     handleSiteChange(newList) {
613
     handleSiteChange(newList) {
345
       this.siteList = newList;
614
       this.siteList = newList;
615
+      this.checkSiteCost = this.siteList.reduce((sum, site) => sum + (Number(site.amountAdjust) || 0), 0).toFixed(2);
616
+      this.getTotalBudgetAdjust();
346
     },
617
     },
347
     // 处理经营相关数据变化
618
     // 处理经营相关数据变化
348
     handleBusinessChange(newData) {
619
     handleBusinessChange(newData) {
351
       this.budgetForm.winAdjust = newData.winAdjust;
622
       this.budgetForm.winAdjust = newData.winAdjust;
352
       this.budgetForm.taxAdjust = newData.taxAdjust;
623
       this.budgetForm.taxAdjust = newData.taxAdjust;
353
       this.budgetForm.travelAdjust = newData.travelAdjust;
624
       this.budgetForm.travelAdjust = newData.travelAdjust;
625
+      this.checkJYAmount = Number(newData.outAdjust || 0) +
626
+        Number(newData.letterAdjust || 0) +
627
+        Number(newData.winAdjust || 0) +
628
+        Number(newData.taxAdjust || 0) +
629
+        Number(newData.travelAdjust || 0);
630
+      this.getTotalBudgetAdjust();
354
     },
631
     },
355
     // 处理预算外开销数据变化
632
     // 处理预算外开销数据变化
356
     handleOtherChange(newList) {
633
     handleOtherChange(newList) {
357
       this.otherList = newList;
634
       this.otherList = newList;
635
+      this.checkOtherCost = this.otherList.reduce((sum, other) => sum + (Number(other.amountAdjust) || 0), 0).toFixed(2);
636
+      this.getTotalBudgetAdjust();
637
+    },
638
+    getTotalBudgetAdjust() {
639
+      this.totalBudgetAdjust = (Number(this.checkStaffCost) +
640
+        Number(this.checkCarCost) +
641
+        Number(this.checkDeviceCost) +
642
+        Number(this.checkSiteCost) +
643
+        Number(this.checkJYAmount) +
644
+        Number(this.checkOtherCost)).toFixed(2);
358
     },
645
     },
646
+    // 保存
359
     async preserve() {
647
     async preserve() {
360
       let obj = {
648
       let obj = {
361
         budgetId: this.row.budgetId,
649
         budgetId: this.row.budgetId,
362
         projectId: this.row.projectId,
650
         projectId: this.row.projectId,
363
         checkId: this.taskForm.formId
651
         checkId: this.taskForm.formId
364
       }
652
       }
365
-      let checkRes = await getCheck(this.taskForm.formId);
366
-      if (!checkRes.data) {
653
+      if (!this.checkForm.checkId) {
367
         await addCheck(obj);
654
         await addCheck(obj);
368
         this.$emit('preserve');
655
         this.$emit('preserve');
656
+      } else {
657
+        await updateCheck(this.checkForm);
369
       }
658
       }
370
       await updateBudget(this.budgetForm);
659
       await updateBudget(this.budgetForm);
371
-      let staffList = this.innerStaffList.concat(this.outerStaffList);
372
-      // 更新人员
373
-      delBudgetStaff(this.row.budgetId).then(async res => {
374
-        for (let staff of staffList) {
375
-          staff.budgetId = this.row.budgetId;
376
-          await addBudgetStaff(staff);
377
-        }
378
-      })
379
-      // 更新车辆
380
-      delBudgetCar(this.row.budgetId).then(async res => {
381
-        for (let car of this.carList) {
382
-          car.budgetId = this.row.budgetId;
383
-          await addBudgetCar(car);
384
-        }
385
-      })
386
-      // 更新设备
387
-      delBudgetDevice(this.row.budgetId).then(async res => {
388
-        for (let device of this.deviceList) {
389
-          device.budgetId = this.row.budgetId;
390
-          await addBudgetDevice(device);
660
+
661
+      if (this.taskName == '核算编制') {
662
+        // 更新人员
663
+        let staffList = this.innerStaffList.concat(this.outerStaffList);
664
+        delBudgetStaff(this.row.budgetId).then(async res => {
665
+          for (let staff of staffList) {
666
+            staff.budgetId = this.row.budgetId;
667
+            await addBudgetStaff(staff);
668
+          }
669
+        })
670
+        // 更新车辆
671
+        delBudgetCar(this.row.budgetId).then(async res => {
672
+          for (let car of this.carList) {
673
+            car.budgetId = this.row.budgetId;
674
+            await addBudgetCar(car);
675
+          }
676
+        })
677
+        // 更新设备
678
+        delBudgetDevice(this.row.budgetId).then(async res => {
679
+          for (let device of this.deviceList) {
680
+            device.budgetId = this.row.budgetId;
681
+            await addBudgetDevice(device);
682
+          }
683
+        })
684
+        // 更新现场开支
685
+        for (let site of this.siteList) {
686
+          await updateSite(site);
391
         }
687
         }
392
-      })
393
-      // 更新现场开支
394
-      for (let site of this.siteList) {
395
-        await updateSite(site);
688
+        // 更新预算外开销
689
+        delOther(this.row.budgetId).then(async res => {
690
+          for (let other of this.otherList) {
691
+            other.budgetId = this.row.budgetId;
692
+            await addOther(other);
693
+          }
694
+        })
396
       }
695
       }
397
-      // 更新预算外开销
398
-      delOther(this.row.budgetId).then(async res => {
399
-        for (let other of this.otherList) {
400
-          other.budgetId = this.row.budgetId;
401
-          await addOther(other);
402
-        }
403
-      })
696
+
404
       this.$message.success('保存成功');
697
       this.$message.success('保存成功');
405
     },
698
     },
406
     confirmSucess() {
699
     confirmSucess() {
407
-
408
-    }
700
+      this.preserve();
701
+      let msg = this.taskName == '总经理审核' ? '是否结束流程?' : '是否提交到下一个流程?';
702
+      this.$modal.confirm(msg).then(async () => {
703
+        if (this.taskName == '核算编制') {
704
+          let cwRes = await getUsersViceDeptLeaderByDept({ deptId: 106 });
705
+          let cwUserId = cwRes.data.userId;
706
+          this.$set(this.taskForm.variables, 'approvalList', [cwUserId]);
707
+        } else if (this.taskName == '财务审核') {
708
+          let managerLeaderRes = await getUsersManageLeader({ userId: this.budgetForm.compiler });
709
+          let managerLeader = managerLeaderRes.data;
710
+          let managerList = managerLeader.map(item => item.userId);
711
+          this.$set(this.taskForm.variables, 'approvalList', managerList);
712
+        } else if (this.taskName == '分管审核') {
713
+          let zjlRes = await getUserByPost({ postName: '总经理' });
714
+          let zjlUserId = zjlRes.data[0].userId;
715
+          this.$set(this.taskForm.variables, 'approval', zjlUserId);
716
+        }
717
+        // 提交到下一个流程
718
+        getNextFlowNode({ taskId: this.taskForm.taskId }).then(res => {
719
+          complete(this.taskForm).then(response => {
720
+            this.$modal.msgSuccess(response.msg);
721
+            this.$emit("goBack");
722
+          });
723
+        })
724
+      })
725
+    },
726
+    commentByRole() {
727
+      if (this.taskName == '核算编制') {
728
+        return this.checkForm.checkComment
729
+      } else if (this.taskName == '财务审核') {
730
+        return this.checkForm.cwComment
731
+      } else if (this.taskName == '分管审核') {
732
+        return this.checkForm.managerComment
733
+      } else if (this.taskName == '总经理审核') {
734
+        return this.checkForm.zjlComment
735
+      }
736
+    },
737
+    isReturn(val) {
738
+      this.showAlter = val;
739
+    },
409
   },
740
   },
410
 }
741
 }
411
 </script>
742
 </script>
412
 
743
 
413
 <style lang="scss" scoped>
744
 <style lang="scss" scoped>
745
+@import "@/assets/styles/element-reset.scss";
746
+
414
 .mylabel {
747
 .mylabel {
415
   font-weight: bold;
748
   font-weight: bold;
416
 }
749
 }
438
   }
771
   }
439
 }
772
 }
440
 
773
 
774
+.sign {
775
+  display: flex;
776
+  justify-content: flex-end;
777
+  align-items: center;
778
+  padding-right: 80px;
779
+  line-height: 30px;
780
+  /* 如果需要垂直居中 */
781
+}
782
+
441
 .adjust {
783
 .adjust {
442
   color: #F56C6C;
784
   color: #F56C6C;
443
   width: 120px;
785
   width: 120px;
450
 ::v-deep .el-descriptions-item__label.is-bordered-label {
792
 ::v-deep .el-descriptions-item__label.is-bordered-label {
451
   color: #434141;
793
   color: #434141;
452
   background: #eaeaea;
794
   background: #eaeaea;
795
+  width: 120px;
796
+}
797
+
798
+.business-section {
799
+  border: 2px solid #E6A23C !important;
800
+  box-shadow: 0 0 10px rgba(64, 158, 255, 0.2);
801
+
802
+  tr {
803
+    background-color: #f0f7ff;
804
+
805
+    &:hover {
806
+      background-color: #e6f1ff;
807
+    }
808
+  }
809
+
810
+  .el-input-number {
811
+    .el-input__inner {
812
+      background-color: #fff;
813
+      border: 1px solid #E6A23C;
814
+
815
+      &:focus {
816
+        border-color: #e2af62;
817
+        box-shadow: 0 0 5px rgba(64, 158, 255, 0.3);
818
+      }
819
+    }
820
+  }
821
+
822
+  .head.amount {
823
+    background-color: #ecf5ff;
824
+    color: #E6A23C;
825
+    font-weight: bold;
826
+  }
453
 }
827
 }
454
 </style>
828
 </style>

+ 15
- 6
oa-ui/src/views/flowable/form/budget/adjust/components/CarCost.vue Dosyayı Görüntüle

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-08 14:18:15
3
  * @Date: 2025-05-08 14:18:15
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-15 14:55:55
5
+ * @LastEditTime: 2025-05-19 16:25:04
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="car-cost">
8
   <div class="car-cost">
9
     <table border="1" style="width:100%;">
9
     <table border="1" style="width:100%;">
10
       <tr style="background-color:#f8f8f9">
10
       <tr style="background-color:#f8f8f9">
11
         <td></td>
11
         <td></td>
12
+        <td>序号</td>
12
         <td>车牌号</td>
13
         <td>车牌号</td>
13
         <td>折旧成本(天)</td>
14
         <td>折旧成本(天)</td>
14
         <td>预算天数</td>
15
         <td>预算天数</td>
18
       </tr>
19
       </tr>
19
       <tr v-for="car, index in carList" :key="'car' + car.carId">
20
       <tr v-for="car, index in carList" :key="'car' + car.carId">
20
         <td>
21
         <td>
21
-          <div class="delete-btn" @click="removeCar(car, index)"><i class="el-icon-remove-outline"
22
+          <div class="delete-btn" v-if="car.days == 0" @click="removeCar(car, index)"><i class="el-icon-remove-outline"
22
               style="color:#F56C6C"></i>
23
               style="color:#F56C6C"></i>
23
           </div>
24
           </div>
24
         </td>
25
         </td>
26
+        <td>{{ index + 1 }}</td>
25
         <td>{{ car.car ? car.car.licensePlate : '' }}</td>
27
         <td>{{ car.car ? car.car.licensePlate : '' }}</td>
26
         <td style="text-align:right;">{{ car.car ? car.car.dayCost : '' }}</td>
28
         <td style="text-align:right;">{{ car.car ? car.car.dayCost : '' }}</td>
27
         <td style="text-align:right;">{{ car.days }}</td>
29
         <td style="text-align:right;">{{ car.days }}</td>
28
         <td style="text-align:right;">{{ car.amount }}</td>
30
         <td style="text-align:right;">{{ car.amount }}</td>
29
         <td style="text-align:right;">
31
         <td style="text-align:right;">
30
-          <el-input-number :controls="false" style="width:100%;" v-model="car.daysAdjust"
31
-            @change="handleChange(car)"></el-input-number>
32
+          <template v-if="taskName === '核算编制'">
33
+            <el-input-number :controls="false" style="width:100%;" v-model="car.daysAdjust"
34
+              @change="handleChange(car)"></el-input-number>
35
+          </template>
36
+          <span v-else>{{ car.daysAdjust }}</span>
32
         </td>
37
         </td>
33
         <td style="text-align:right;">
38
         <td style="text-align:right;">
34
           {{ car.amountAdjust }}
39
           {{ car.amountAdjust }}
35
         </td>
40
         </td>
36
       </tr>
41
       </tr>
37
       <tr>
42
       <tr>
38
-        <td colspan="2" class="amount">车辆成本合计</td>
43
+        <td colspan="3" class="amount">车辆成本合计</td>
39
         <td class="amount" style="text-align:right;">{{carList.reduce((sum, car) => sum +
44
         <td class="amount" style="text-align:right;">{{carList.reduce((sum, car) => sum +
40
           (Number(car.depreciation) || 0), 0).toFixed(2)}}</td>
45
           (Number(car.depreciation) || 0), 0).toFixed(2)}}</td>
41
         <td class="amount" style="text-align:right;">{{carList.reduce((sum, car) => sum +
46
         <td class="amount" style="text-align:right;">{{carList.reduce((sum, car) => sum +
48
           (Number(car.amountAdjust) || 0), 0).toFixed(2)}}</td>
53
           (Number(car.amountAdjust) || 0), 0).toFixed(2)}}</td>
49
       </tr>
54
       </tr>
50
     </table>
55
     </table>
51
-    <div class="mt10">
56
+    <div class="mt10" v-if="taskName === '核算编制'">
52
       <el-button type="success" plain icon="el-icon-plus" @click="openCar" size="mini">新增车辆</el-button>
57
       <el-button type="success" plain icon="el-icon-plus" @click="openCar" size="mini">新增车辆</el-button>
53
     </div>
58
     </div>
54
     <!-- 选择车辆对话框 -->
59
     <!-- 选择车辆对话框 -->
70
     carList: {
75
     carList: {
71
       type: Array,
76
       type: Array,
72
       default: () => []
77
       default: () => []
78
+    },
79
+    taskName: {
80
+      type: String,
81
+      default: ''
73
     }
82
     }
74
   },
83
   },
75
   data() {
84
   data() {

+ 14
- 5
oa-ui/src/views/flowable/form/budget/adjust/components/DeviceCost.vue Dosyayı Görüntüle

3
     <table border="1" style="width:100%;">
3
     <table border="1" style="width:100%;">
4
       <tr style="background-color:#f8f8f9">
4
       <tr style="background-color:#f8f8f9">
5
         <td></td>
5
         <td></td>
6
+        <td>序号</td>
6
         <td>设备名称</td>
7
         <td>设备名称</td>
7
         <td>出厂编号</td>
8
         <td>出厂编号</td>
8
         <td>规格型号</td>
9
         <td>规格型号</td>
15
       </tr>
16
       </tr>
16
       <tr v-for="device, index in deviceList" :key="'device' + device.deviceId">
17
       <tr v-for="device, index in deviceList" :key="'device' + device.deviceId">
17
         <td>
18
         <td>
18
-          <div class="delete-btn" @click="removeDevice(device, index)">
19
+          <div class="delete-btn" v-if="device.days == 0 && taskName == '核算编制'" @click="removeDevice(device, index)">
19
             <i class="el-icon-remove-outline" style="color:#F56C6C"></i>
20
             <i class="el-icon-remove-outline" style="color:#F56C6C"></i>
20
           </div>
21
           </div>
21
         </td>
22
         </td>
23
+        <td>{{ index + 1 }}</td>
22
         <td>{{ device.device ? device.device.name : '' }}</td>
24
         <td>{{ device.device ? device.device.name : '' }}</td>
23
         <td>{{ device.device ? device.device.code : '' }}</td>
25
         <td>{{ device.device ? device.device.code : '' }}</td>
24
         <td>{{ device.device ? device.device.series : '' }}</td>
26
         <td>{{ device.device ? device.device.series : '' }}</td>
27
         <td style="text-align:right;">{{ device.days }}</td>
29
         <td style="text-align:right;">{{ device.days }}</td>
28
         <td style="text-align:right;">{{ device.amount }}</td>
30
         <td style="text-align:right;">{{ device.amount }}</td>
29
         <td style="text-align:right;">
31
         <td style="text-align:right;">
30
-          <el-input-number :controls="false" style="width:100%;" v-model="device.daysAdjust"
31
-            @change="handleChange(device)"></el-input-number>
32
+          <template v-if="taskName === '核算编制'">
33
+            <el-input-number :controls="false" style="width:100%;" v-model="device.daysAdjust"
34
+              @change="handleChange(device)"></el-input-number>
35
+          </template>
36
+          <span v-else>{{ device.daysAdjust }}</span>
32
         </td>
37
         </td>
33
         <td style="text-align:right;">
38
         <td style="text-align:right;">
34
           {{ device.amountAdjust }}
39
           {{ device.amountAdjust }}
35
         </td>
40
         </td>
36
       </tr>
41
       </tr>
37
       <tr>
42
       <tr>
38
-        <td colspan="5" class="amount">设备成本合计</td>
43
+        <td colspan="6" class="amount">设备成本合计</td>
39
         <td class="amount" style="text-align:right;">{{deviceList.reduce((sum, device) => sum + (Number(device.device ?
44
         <td class="amount" style="text-align:right;">{{deviceList.reduce((sum, device) => sum + (Number(device.device ?
40
           device.device.dayCost : 0) || 0), 0).toFixed(2)}}</td>
45
           device.device.dayCost : 0) || 0), 0).toFixed(2)}}</td>
41
         <td class="amount" style="text-align:right;">{{deviceList.reduce((sum, device) => sum + (Number(device.days) ||
46
         <td class="amount" style="text-align:right;">{{deviceList.reduce((sum, device) => sum + (Number(device.days) ||
48
           (Number(device.amountAdjust) || 0), 0).toFixed(2)}}</td>
53
           (Number(device.amountAdjust) || 0), 0).toFixed(2)}}</td>
49
       </tr>
54
       </tr>
50
     </table>
55
     </table>
51
-    <div class="mt10">
56
+    <div class="mt10" v-if="taskName === '核算编制'">
52
       <el-button type="success" plain icon="el-icon-plus" @click="openDevice" size="mini">新增设备</el-button>
57
       <el-button type="success" plain icon="el-icon-plus" @click="openDevice" size="mini">新增设备</el-button>
53
     </div>
58
     </div>
54
     <!-- 选择设备对话框 -->
59
     <!-- 选择设备对话框 -->
70
     deviceList: {
75
     deviceList: {
71
       type: Array,
76
       type: Array,
72
       default: () => []
77
       default: () => []
78
+    },
79
+    taskName: {
80
+      type: String,
81
+      default: ''
73
     }
82
     }
74
   },
83
   },
75
   data() {
84
   data() {

+ 17
- 14
oa-ui/src/views/flowable/form/budget/adjust/components/InnerStaffCost.vue Dosyayı Görüntüle

18
       <tr v-for="staff, index in staffList" :key="'user' + index">
18
       <tr v-for="staff, index in staffList" :key="'user' + index">
19
         <td>
19
         <td>
20
           <!-- <el-button type="danger" icon="el-icon-minus" circle plain></el-button> -->
20
           <!-- <el-button type="danger" icon="el-icon-minus" circle plain></el-button> -->
21
-          <div class="delete-btn" @click="removeStaff(staff, index)"><i class="el-icon-remove-outline"
22
-              style="color:#F56C6C"></i>
21
+          <div class="delete-btn" v-if="staff.days == 0 && taskName == '核算编制'" @click="removeStaff(staff, index)"><i
22
+              class="el-icon-remove-outline" style="color:#F56C6C"></i>
23
           </div>
23
           </div>
24
         </td>
24
         </td>
25
         <td>{{ index + 1 }}</td>
25
         <td>{{ index + 1 }}</td>
31
         <td style="text-align:right;">{{ staff.amount }}</td>
31
         <td style="text-align:right;">{{ staff.amount }}</td>
32
         <td style="text-align:right;">{{ (staff.dayCost * staff.daysAdjust).toFixed(2) }}</td>
32
         <td style="text-align:right;">{{ (staff.dayCost * staff.daysAdjust).toFixed(2) }}</td>
33
         <td style="text-align:right;">
33
         <td style="text-align:right;">
34
-          <el-input-number :controls="false" style="width:100%;" v-model="staff.daysAdjust"
34
+          <el-input-number v-if="taskName === '核算编制'" :controls="false" style="width:100%;" v-model="staff.daysAdjust"
35
             @change="handleChange(staff)"></el-input-number>
35
             @change="handleChange(staff)"></el-input-number>
36
+          <span v-else>{{ staff.daysAdjust }}</span>
36
         </td>
37
         </td>
37
         <td style="text-align:right;">
38
         <td style="text-align:right;">
38
-          <el-input-number :controls="false" style="width:100%;" v-model="staff.performanceAdjust"
39
-            @change="handleChange(staff)"></el-input-number>
39
+          <el-input-number v-if="taskName === '核算编制'" :controls="false" style="width:100%;"
40
+            v-model="staff.performanceAdjust" @change="handleChange(staff)"></el-input-number>
41
+          <span v-else>{{ staff.performanceAdjust }}</span>
40
         </td>
42
         </td>
41
         <td style="text-align:right;">
43
         <td style="text-align:right;">
42
           {{ staff.amountAdjust }}
44
           {{ staff.amountAdjust }}
46
         <td colspan="5" class="head amount">内业人员成本合计</td>
48
         <td colspan="5" class="head amount">内业人员成本合计</td>
47
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
49
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
48
           (Number(staff.staffCost) || 0), 0).toFixed(2)}}</td>
50
           (Number(staff.staffCost) || 0), 0).toFixed(2)}}</td>
49
-        <td class="head amount"  :class="{ 'performance-error': isPerformanceExceeded() }" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
50
-          (Number(staff.performance) || 0), 0).toFixed(2)}}</td>
51
+        <td class="head amount" :class="{ 'performance-error': isPerformanceExceeded() }" style="text-align:right;">
52
+          {{staffList.reduce((sum, staff) => sum +
53
+            (Number(staff.performance) || 0), 0).toFixed(2)}}</td>
51
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum + (Number(staff.amount)
54
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum + (Number(staff.amount)
52
           || 0), 0).toFixed(2)}}</td>
55
           || 0), 0).toFixed(2)}}</td>
53
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
56
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
54
           ((staff.dayCost * staff.daysAdjust)), 0).toFixed(2)}}</td>
57
           ((staff.dayCost * staff.daysAdjust)), 0).toFixed(2)}}</td>
55
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
58
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
56
           (Number(staff.daysAdjust) || 0), 0).toFixed(2)}}</td>
59
           (Number(staff.daysAdjust) || 0), 0).toFixed(2)}}</td>
57
-        <td class="head amount" :class="{ 'performance-error': isPerformanceAdjustExceeded() }" style="text-align:right;">
60
+        <td class="head amount" :class="{ 'performance-error': isPerformanceAdjustExceeded() }"
61
+          style="text-align:right;">
58
           {{staffList.reduce((sum, staff) => sum + (Number(staff.performanceAdjust) || 0), 0).toFixed(2)}}</td>
62
           {{staffList.reduce((sum, staff) => sum + (Number(staff.performanceAdjust) || 0), 0).toFixed(2)}}</td>
59
         <td class="head amount" style="text-align:right;">
63
         <td class="head amount" style="text-align:right;">
60
           {{staffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0).toFixed(2)}}</td>
64
           {{staffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0).toFixed(2)}}</td>
61
       </tr>
65
       </tr>
62
     </table>
66
     </table>
63
-    <div class="add-staff mt10">
67
+    <div class="add-staff mt10" v-if="taskName === '核算编制'">
64
       <el-button type="success" plain icon="el-icon-plus" @click="openPeople" size="mini">新增人员</el-button>
68
       <el-button type="success" plain icon="el-icon-plus" @click="openPeople" size="mini">新增人员</el-button>
65
     </div>
69
     </div>
66
     <!-- 选择人员对话框 -->
70
     <!-- 选择人员对话框 -->
90
     settleAdjust: {
94
     settleAdjust: {
91
       type: Number,
95
       type: Number,
92
       default: 0
96
       default: 0
97
+    },
98
+    taskName: {
99
+      type: String,
100
+      default: ''
93
     }
101
     }
94
   },
102
   },
95
   data() {
103
   data() {
97
       isOpenPeople: false,
105
       isOpenPeople: false,
98
     }
106
     }
99
   },
107
   },
100
-  watch: {
101
-
102
-  },
103
-  mounted() {
104
-  },
105
   methods: {
108
   methods: {
106
     handleChange(staff) {
109
     handleChange(staff) {
107
       staff.amountAdjust = ((Number(staff.dayCost || 0) * Number(staff.daysAdjust || 0)) + Number(staff.performanceAdjust || 0)).toFixed(2)
110
       staff.amountAdjust = ((Number(staff.dayCost || 0) * Number(staff.daysAdjust || 0)) + Number(staff.performanceAdjust || 0)).toFixed(2)

+ 14
- 8
oa-ui/src/views/flowable/form/budget/adjust/components/OuterStaffCost.vue Dosyayı Görüntüle

11
         <td style="min-width:100px;">固定成本合计</td>
11
         <td style="min-width:100px;">固定成本合计</td>
12
         <td style="min-width:100px;">绩效成本合计</td>
12
         <td style="min-width:100px;">绩效成本合计</td>
13
         <td style="width:120px;min-width:80px;">预算金额</td>
13
         <td style="width:120px;min-width:80px;">预算金额</td>
14
-        <td class="adjust" style="width:120px;min-width:80px;">核算固定成本</td>
15
         <td class="adjust" style="width:120px;min-width:80px;">核算天数</td>
14
         <td class="adjust" style="width:120px;min-width:80px;">核算天数</td>
16
         <td class="adjust" style="width:120px;min-width:80px;">核算系数</td>
15
         <td class="adjust" style="width:120px;min-width:80px;">核算系数</td>
16
+        <td class="adjust" style="width:120px;min-width:80px;">核算固定成本</td>
17
         <td class="adjust" style="width:120px;min-width:80px;">核算绩效</td>
17
         <td class="adjust" style="width:120px;min-width:80px;">核算绩效</td>
18
         <td class="adjust" style="width:120px;min-width:80px;">核算金额</td>
18
         <td class="adjust" style="width:120px;min-width:80px;">核算金额</td>
19
       </tr>
19
       </tr>
20
       <tr v-for="staff, index in staffList" :key="'user' + staff.userId">
20
       <tr v-for="staff, index in staffList" :key="'user' + staff.userId">
21
         <td>
21
         <td>
22
-          <div class="delete-btn" @click="removeStaff(staff, index)">
22
+          <div class="delete-btn" v-if="staff.days == 0" @click="removeStaff(staff, index)">
23
             <i class="el-icon-remove-outline" style="color:#F56C6C"></i>
23
             <i class="el-icon-remove-outline" style="color:#F56C6C"></i>
24
           </div>
24
           </div>
25
         </td>
25
         </td>
31
         <td style="text-align:right;">{{ staff.staffCost }}</td>
31
         <td style="text-align:right;">{{ staff.staffCost }}</td>
32
         <td style="text-align:right;">{{ staff.performance }}</td>
32
         <td style="text-align:right;">{{ staff.performance }}</td>
33
         <td style="text-align:right;">{{ staff.amount }}</td>
33
         <td style="text-align:right;">{{ staff.amount }}</td>
34
-        <td style="text-align:right;">{{ (staff.dayCost * staff.daysAdjust).toFixed(2) }}</td>
35
         <td style="text-align:right;">
34
         <td style="text-align:right;">
36
-          <el-input-number :controls="false" style="width:100%;" v-model="staff.daysAdjust"
35
+          <el-input-number v-if="taskName === '核算编制'" :controls="false" style="width:100%;" v-model="staff.daysAdjust"
37
             @change="handleChange(staff)"></el-input-number>
36
             @change="handleChange(staff)"></el-input-number>
37
+          <span v-else>{{ staff.daysAdjust }}</span>
38
         </td>
38
         </td>
39
         <td style="text-align:right;">
39
         <td style="text-align:right;">
40
-          <el-input-number :controls="false" style="width:100%;" v-model="staff.coefficientAdjust"
40
+          <el-input-number v-if="taskName === '核算编制'" :controls="false" style="width:100%;" v-model="staff.coefficientAdjust"
41
             @change="handleChange(staff)"></el-input-number>
41
             @change="handleChange(staff)"></el-input-number>
42
+          <span v-else>{{ staff.coefficientAdjust }}</span>
42
         </td>
43
         </td>
44
+        <td style="text-align:right;">{{ (staff.dayCost * staff.daysAdjust).toFixed(2) }}</td>
43
         <td style="text-align:right;">
45
         <td style="text-align:right;">
44
           {{ staff.performanceAdjust }}
46
           {{ staff.performanceAdjust }}
45
         </td>
47
         </td>
58
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
60
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
59
           (Number(staff.amount) || 0),
61
           (Number(staff.amount) || 0),
60
           0).toFixed(2)}}</td>
62
           0).toFixed(2)}}</td>
61
-        <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
62
-          ((staff.dayCost * staff.daysAdjust)), 0).toFixed(2)}}</td>
63
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
63
         <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
64
           (Number(staff.daysAdjust) || 0), 0).toFixed(2)}}</td>
64
           (Number(staff.daysAdjust) || 0), 0).toFixed(2)}}</td>
65
         <td class="head amount">
65
         <td class="head amount">
66
           ——
66
           ——
67
         </td>
67
         </td>
68
+        <td class="head amount" style="text-align:right;">{{staffList.reduce((sum, staff) => sum +
69
+          ((staff.dayCost * staff.daysAdjust)), 0).toFixed(2)}}</td>
68
         <td class="head amount" style="text-align:right;">
70
         <td class="head amount" style="text-align:right;">
69
           {{staffList.reduce((sum, staff) => sum + (Number(staff.performanceAdjust) || 0), 0).toFixed(2)}}
71
           {{staffList.reduce((sum, staff) => sum + (Number(staff.performanceAdjust) || 0), 0).toFixed(2)}}
70
         </td>
72
         </td>
72
           {{staffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0).toFixed(2)}}</td>
74
           {{staffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0).toFixed(2)}}</td>
73
       </tr>
75
       </tr>
74
     </table>
76
     </table>
75
-    <div class="add-staff mt10">
77
+    <div class="add-staff mt10" v-if="taskName === '核算编制'">
76
       <el-button type="success" plain icon="el-icon-plus" @click="openPeople" size="mini">新增人员</el-button>
78
       <el-button type="success" plain icon="el-icon-plus" @click="openPeople" size="mini">新增人员</el-button>
77
     </div>
79
     </div>
78
     <!-- 选择人员对话框 -->
80
     <!-- 选择人员对话框 -->
94
     staffList: {
96
     staffList: {
95
       type: Array,
97
       type: Array,
96
       default: () => []
98
       default: () => []
99
+    },
100
+    taskName: {
101
+      type: String,
102
+      default: ''
97
     }
103
     }
98
   },
104
   },
99
   data() {
105
   data() {

+ 8
- 3
oa-ui/src/views/flowable/form/budget/adjust/components/SiteCost.vue Dosyayı Görüntüle

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-15 15:30:09
3
  * @Date: 2025-05-15 15:30:09
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-16 09:59:30
5
+ * @LastEditTime: 2025-05-19 11:24:43
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="site-cost">
8
   <div class="site-cost">
18
         <td>{{ index + 1 }}</td>
18
         <td>{{ index + 1 }}</td>
19
         <td>{{ site.name }}</td>
19
         <td>{{ site.name }}</td>
20
         <td style="text-align: right;">{{ site.amount }}</td>
20
         <td style="text-align: right;">{{ site.amount }}</td>
21
-        <td>
22
-          <el-input-number :controls="false" v-model="site.amountAdjust" placeholder="请输入核算金额"
21
+        <td style="text-align: right;">
22
+          <el-input-number v-if="taskName === '核算编制'" :controls="false" v-model="site.amountAdjust" placeholder="请输入核算金额"
23
             @change="handleSiteChange(site)" />
23
             @change="handleSiteChange(site)" />
24
+          <span v-else>{{ site.amountAdjust }}</span>
24
         </td>
25
         </td>
25
         <td style="text-align: left;">{{ site.remark }}</td>
26
         <td style="text-align: left;">{{ site.remark }}</td>
26
       </tr>
27
       </tr>
41
     siteList: {
42
     siteList: {
42
       type: Array,
43
       type: Array,
43
       default: () => []
44
       default: () => []
45
+    },
46
+    taskName: {
47
+      type: String,
48
+      default: ''
44
     }
49
     }
45
   },
50
   },
46
   methods: {
51
   methods: {

+ 32
- 11
oa-ui/src/views/flowable/form/budget/adjust/components/businessCost.vue Dosyayı Görüntüle

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-15 18:24:27
3
  * @Date: 2025-05-15 18:24:27
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-16 10:33:48
5
+ * @LastEditTime: 2025-05-19 15:26:20
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="business-cost">
8
   <div class="business-cost">
21
           {{ budgetForm.outExpense }}
21
           {{ budgetForm.outExpense }}
22
         </td>
22
         </td>
23
         <td style="text-align:right;">
23
         <td style="text-align:right;">
24
-          <el-input-number :controls="false" v-model="budgetForm.outAdjust" :min="0" :step="0.01"
25
-            @change="updateTotalJYAmount"></el-input-number>
24
+          <template v-if="taskName === '核算编制'">
25
+            <el-input-number :controls="false" v-model="budgetForm.outAdjust" :min="0" :step="0.01"
26
+              @change="updateTotalJYAmount"></el-input-number>
27
+          </template>
28
+          <span v-else>{{ budgetForm.outAdjust }}</span>
26
         </td>
29
         </td>
27
         <td class="remark-cell">{{ budgetForm.outRemark }}</td>
30
         <td class="remark-cell">{{ budgetForm.outRemark }}</td>
28
       </tr>
31
       </tr>
33
           {{ budgetForm.letterExpense }}
36
           {{ budgetForm.letterExpense }}
34
         </td>
37
         </td>
35
         <td style="text-align:right;">
38
         <td style="text-align:right;">
36
-          <el-input-number :controls="false" v-model="budgetForm.letterAdjust" :min="0" :step="0.01"
37
-            @change="updateTotalJYAmount"></el-input-number>
39
+          <template v-if="taskName === '核算编制'">
40
+            <el-input-number :controls="false" v-model="budgetForm.letterAdjust" :min="0" :step="0.01"
41
+              @change="updateTotalJYAmount"></el-input-number>
42
+          </template>
43
+          <span v-else>{{ budgetForm.letterAdjust }}</span>
38
         </td>
44
         </td>
39
         <td class="remark-cell">{{ budgetForm.letterRemark }}</td>
45
         <td class="remark-cell">{{ budgetForm.letterRemark }}</td>
40
       </tr>
46
       </tr>
45
           {{ budgetForm.winExpense }}
51
           {{ budgetForm.winExpense }}
46
         </td>
52
         </td>
47
         <td style="text-align:right;">
53
         <td style="text-align:right;">
48
-          <el-input-number :controls="false" v-model="budgetForm.winAdjust" :min="0" :step="0.01"
49
-            @change="updateTotalJYAmount"></el-input-number>
54
+          <template v-if="taskName === '核算编制'">
55
+            <el-input-number :controls="false" v-model="budgetForm.winAdjust" :min="0" :step="0.01"
56
+              @change="updateTotalJYAmount"></el-input-number>
57
+          </template>
58
+          <span v-else>{{ budgetForm.winAdjust }}</span>
50
         </td>
59
         </td>
51
         <td class="remark-cell">{{ budgetForm.winRemark }}</td>
60
         <td class="remark-cell">{{ budgetForm.winRemark }}</td>
52
       </tr>
61
       </tr>
57
           {{ budgetForm.taxExpense }}
66
           {{ budgetForm.taxExpense }}
58
         </td>
67
         </td>
59
         <td style="text-align:right;">
68
         <td style="text-align:right;">
60
-          <el-input-number :controls="false" v-model="budgetForm.taxAdjust" :min="0" :step="0.01"
61
-            @change="updateTotalJYAmount"></el-input-number>
69
+          <template v-if="taskName === '核算编制'">
70
+            <el-input-number :controls="false" v-model="budgetForm.taxAdjust" :min="0" :step="0.01"
71
+              @change="updateTotalJYAmount"></el-input-number>
72
+          </template>
73
+          <span v-else>{{ budgetForm.taxAdjust }}</span>
62
         </td>
74
         </td>
63
         <td class="remark-cell">{{ budgetForm.taxRemark }}</td>
75
         <td class="remark-cell">{{ budgetForm.taxRemark }}</td>
64
       </tr>
76
       </tr>
69
           {{ budgetForm.travelExpense }}
81
           {{ budgetForm.travelExpense }}
70
         </td>
82
         </td>
71
         <td style="text-align:right;">
83
         <td style="text-align:right;">
72
-          <el-input-number :controls="false" v-model="budgetForm.travelAdjust" :min="0" :step="0.01"
73
-            @change="updateTotalJYAmount"></el-input-number>
84
+          <template v-if="taskName === '核算编制'">
85
+            <el-input-number :controls="false" v-model="budgetForm.travelAdjust" :min="0" :step="0.01"
86
+              @change="updateTotalJYAmount"></el-input-number>
87
+          </template>
88
+          <span v-else>{{ budgetForm.travelAdjust }}</span>
74
         </td>
89
         </td>
75
         <td class="remark-cell">{{ budgetForm.travelRemark }}</td>
90
         <td class="remark-cell">{{ budgetForm.travelRemark }}</td>
76
       </tr>
91
       </tr>
93
     budgetForm: {
108
     budgetForm: {
94
       type: Object,
109
       type: Object,
95
       required: true
110
       required: true
111
+    },
112
+    taskName: {
113
+      type: String,
114
+      default: ''
96
     }
115
     }
97
   },
116
   },
98
   data() {
117
   data() {
108
   methods: {
127
   methods: {
109
     initTotalJYAmount() {
128
     initTotalJYAmount() {
110
       this.totalJYAmount = ((Number(this.budgetForm.outExpense) || 0) + (Number(this.budgetForm.letterExpense) || 0) + (Number(this.budgetForm.winExpense) || 0) + (Number(this.budgetForm.taxExpense) || 0) + (Number(this.budgetForm.travelExpense) || 0)).toFixed(2)
129
       this.totalJYAmount = ((Number(this.budgetForm.outExpense) || 0) + (Number(this.budgetForm.letterExpense) || 0) + (Number(this.budgetForm.winExpense) || 0) + (Number(this.budgetForm.taxExpense) || 0) + (Number(this.budgetForm.travelExpense) || 0)).toFixed(2)
130
+
111
     },
131
     },
112
     updateTotalJYAmount() {
132
     updateTotalJYAmount() {
113
       this.totalJYAmountAdjust = ((Number(this.budgetForm.outAdjust) || 0) + (Number(this.budgetForm.letterAdjust) || 0) + (Number(this.budgetForm.winAdjust) || 0) + (Number(this.budgetForm.taxAdjust) || 0) + (Number(this.budgetForm.travelAdjust) || 0)).toFixed(2)
133
       this.totalJYAmountAdjust = ((Number(this.budgetForm.outAdjust) || 0) + (Number(this.budgetForm.letterAdjust) || 0) + (Number(this.budgetForm.winAdjust) || 0) + (Number(this.budgetForm.taxAdjust) || 0) + (Number(this.budgetForm.travelAdjust) || 0)).toFixed(2)
134
+      this.$emit('update:budgetForm', this.budgetForm);
114
     }
135
     }
115
   }
136
   }
116
 }
137
 }

+ 18
- 10
oa-ui/src/views/flowable/form/budget/adjust/components/otherCost.vue Dosyayı Görüntüle

16
       </tr>
16
       </tr>
17
       <tr v-for="other, index in otherList" :key="other.id">
17
       <tr v-for="other, index in otherList" :key="other.id">
18
         <td>
18
         <td>
19
-          <div class="delete-btn" @click="removeOther(other, index)"><i class="el-icon-remove-outline"
20
-              style="color:#F56C6C"></i>
19
+          <div class="delete-btn" v-if="taskName == '核算编制'" @click="removeOther(other, index)"><i
20
+              class="el-icon-remove-outline" style="color:#F56C6C"></i>
21
           </div>
21
           </div>
22
         </td>
22
         </td>
23
         <td>{{ index + 1 }}</td>
23
         <td>{{ index + 1 }}</td>
24
         <td>
24
         <td>
25
-          <el-input v-model="other.name" placeholder="请输入名称" />
25
+          <el-input v-if="taskName === '核算编制'" v-model="other.name" placeholder="请输入名称" />
26
+          <span v-else>{{ other.name }}</span>
26
         </td>
27
         </td>
27
-        <td>
28
-          <el-input-number :controls="false" v-model="other.amountAdjust" placeholder="请输入核算金额"
29
-            @change="handleOtherChange(other)" />
28
+        <td style="text-align: right;">
29
+          <el-input-number v-if="taskName === '核算编制'" :controls="false" v-model="other.amountAdjust"
30
+            placeholder="请输入核算金额" @change="handleOtherChange(other)" />
31
+          <span v-else>{{ other.amountAdjust }}</span>
30
         </td>
32
         </td>
31
-        <td>
32
-          <el-input type="textarea" :rows="2" v-model="other.remark" placeholder="请输入备注" />
33
+        <td style="text-align: left;">
34
+          <el-input v-if="taskName === '核算编制'" type="textarea" :rows="2" v-model="other.remark" placeholder="请输入备注" />
35
+          <span v-else>{{ other.remark }}</span>
33
         </td>
36
         </td>
34
       </tr>
37
       </tr>
35
       <tr>
38
       <tr>
36
         <td colspan="3" class="amount">预算外开支合计</td>
39
         <td colspan="3" class="amount">预算外开支合计</td>
37
-        <td class="amount" style="text-align: right;">{{otherList.reduce((sum, other) => sum + (Number(other.amountAdjust) || 0), 0).toFixed(2)}}</td>
40
+        <td class="amount" style="text-align: right;">{{otherList.reduce((sum, other) => sum +
41
+          (Number(other.amountAdjust) || 0), 0).toFixed(2)}}</td>
38
       </tr>
42
       </tr>
39
     </table>
43
     </table>
40
-    <div class="add-staff mt10">
44
+    <div class="add-staff mt10" v-if="taskName === '核算编制'">
41
       <el-button type="success" plain icon="el-icon-plus" @click="addOther" size="mini">新增项</el-button>
45
       <el-button type="success" plain icon="el-icon-plus" @click="addOther" size="mini">新增项</el-button>
42
     </div>
46
     </div>
43
   </div>
47
   </div>
54
         amountAdjust: null,
58
         amountAdjust: null,
55
         remark: ''
59
         remark: ''
56
       }]
60
       }]
61
+    },
62
+    taskName: {
63
+      type: String,
64
+      default: ''
57
     }
65
     }
58
   },
66
   },
59
   watch: {
67
   watch: {

+ 11
- 4
oa-ui/src/views/flowable/form/budget/adjust/newBudgetInfo.vue Dosyayı Görüntüle

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-07 11:01:39
3
  * @Date: 2025-05-07 11:01:39
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-15 17:40:52
5
+ * @LastEditTime: 2025-05-19 17:03:41
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="main" v-loading="loading">
8
   <div class="main" v-loading="loading">
9
     <h2 class="text-center">项目直接生产成本预算表</h2>
9
     <h2 class="text-center">项目直接生产成本预算表</h2>
10
     <p style="text-align: center">编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }}</p>
10
     <p style="text-align: center">编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }}</p>
11
     <el-divider></el-divider>
11
     <el-divider></el-divider>
12
-    <div class="mt20 mb20" v-if="showAlter">
12
+    <div class="mt20 mb20" v-if="showAlter && taskName">
13
       <el-alert title="任务被退回,请修改后重新提交" type="error" :closable="false">
13
       <el-alert title="任务被退回,请修改后重新提交" type="error" :closable="false">
14
         <return-comment :taskForm="taskForm" @isReturn="isReturn"></return-comment>
14
         <return-comment :taskForm="taskForm" @isReturn="isReturn"></return-comment>
15
       </el-alert>
15
       </el-alert>
259
           </tr>
259
           </tr>
260
         </table>
260
         </table>
261
       </el-descriptions-item>
261
       </el-descriptions-item>
262
-      <el-descriptions-item label="现场开支" :span="3">
262
+      <el-descriptions-item label="现场开支" :span="3" v-if="siteList.length > 0">
263
         <table border="1" style="width:100%;">
263
         <table border="1" style="width:100%;">
264
           <tr style="background-color:#f8f8f9">
264
           <tr style="background-color:#f8f8f9">
265
             <td>序号</td>
265
             <td>序号</td>
437
         </div>
437
         </div>
438
       </el-descriptions-item>
438
       </el-descriptions-item>
439
     </el-descriptions>
439
     </el-descriptions>
440
-    <div class="text-center mt20 mb20">
440
+    <div class="text-center mt20 mb20" v-if="taskName">
441
       <el-button type="danger" @click="returnOpen = true">退 回</el-button>
441
       <el-button type="danger" @click="returnOpen = true">退 回</el-button>
442
       <el-button type="warning" @click="preserve()">保 存</el-button>
442
       <el-button type="warning" @click="preserve()">保 存</el-button>
443
       <el-button type="success" @click="confirmSucess()">提交下一个流程</el-button>
443
       <el-button type="success" @click="confirmSucess()">提交下一个流程</el-button>
487
       type: String,
487
       type: String,
488
     }
488
     }
489
   },
489
   },
490
+  watch: {
491
+    'taskForm.formId'() {
492
+      this.initBudgetForm();
493
+      this.getProjectWorkList();
494
+      this.getContractInfo();
495
+    }
496
+  },
490
   data() {
497
   data() {
491
     return {
498
     return {
492
       loading: true,
499
       loading: true,

+ 2
- 2
oa-ui/src/views/flowable/form/budget/budgetInfo.vue Dosyayı Görüntüle

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-03 16:28:09
3
  * @Date: 2024-04-03 16:28:09
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-04-24 10:55:22
5
+ * @LastEditTime: 2025-05-19 17:08:57
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="main">
8
   <div class="main">
9
     <div v-loading="loading">
9
     <div v-loading="loading">
10
-      <h2 class="text-center">项目直接生产成本预算表</h2>
10
+      <h2 class="text-center">项目直接生产成本预算表(旧版)</h2>
11
       <p style="text-align: center;">编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }}</p>
11
       <p style="text-align: center;">编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }}</p>
12
       <el-descriptions :column="3" border class="descriptions">
12
       <el-descriptions :column="3" border class="descriptions">
13
         <el-descriptions-item label="项目编号">
13
         <el-descriptions-item label="项目编号">

+ 6
- 2
oa-ui/src/views/flowable/form/components/conditionDisplay.vue Dosyayı Görüntüle

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-23 17:08:16
3
  * @Date: 2024-04-23 17:08:16
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-04 14:12:25
5
+ * @LastEditTime: 2025-05-19 16:30:37
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>
60
       v-else-if="taskForm.procDefName == '绩效审批'"></performance-form>
60
       v-else-if="taskForm.procDefName == '绩效审批'"></performance-form>
61
     <study-form :key="'study' + taskForm.taskId" :taskForm="taskForm" :taskName="''" :isFlow="true"
61
     <study-form :key="'study' + taskForm.taskId" :taskForm="taskForm" :taskName="''" :isFlow="true"
62
       v-else-if="taskForm.procDefName == '参培审核'"></study-form>
62
       v-else-if="taskForm.procDefName == '参培审核'"></study-form>
63
+    <budget-adjust :key="'budgetAdjust' + taskForm.taskId" :taskForm="taskForm" :taskName="''" :isFlow="true"
64
+      v-else-if="taskForm.procDefName == '项目核算'"></budget-adjust>
63
   </div>
65
   </div>
64
 </template>
66
 </template>
65
 
67
 
93
 import outsourceForm from '@/views/flowable/form/outsource/outsourceForm.vue';
95
 import outsourceForm from '@/views/flowable/form/outsource/outsourceForm.vue';
94
 import performanceForm from '@/views/flowable/form/performance/performanceForm.vue';
96
 import performanceForm from '@/views/flowable/form/performance/performanceForm.vue';
95
 import StudyForm from "@/views/flowable/form//oa/studyForm.vue";
97
 import StudyForm from "@/views/flowable/form//oa/studyForm.vue";
98
+import BudgetAdjust from '@/views/flowable/form/budget/adjust/budgetAdjust.vue';
96
 export default {
99
 export default {
97
   props: {
100
   props: {
98
     passingParam: {
101
     passingParam: {
132
     procureForm,
135
     procureForm,
133
     outsourceForm,
136
     outsourceForm,
134
     performanceForm,
137
     performanceForm,
135
-    StudyForm
138
+    StudyForm,
139
+    BudgetAdjust
136
   },
140
   },
137
   data() {
141
   data() {
138
     return {
142
     return {

+ 35
- 7
oa-ui/src/views/oa/budget/index.vue Dosyayı Görüntüle

88
     </el-dialog>
88
     </el-dialog>
89
 
89
 
90
     <el-dialog :title="title" :visible.sync="infoOpen" width="70%" append-to-body>
90
     <el-dialog :title="title" :visible.sync="infoOpen" width="70%" append-to-body>
91
-      <budget-info :taskForm="taskForm"  :taskName="''"></budget-info>
91
+      <budget-adjust :taskForm="taskForm" :taskName="''" :row="clickRow" v-if="isAdjust"></budget-adjust>
92
+      <div v-else>
93
+        <budget-info v-if="isOld" :taskForm="taskForm" :taskName="''"></budget-info>
94
+        <new-budget-info v-if="!isOld" :taskForm="taskForm" :taskName="''"></new-budget-info>
95
+      </div>
92
     </el-dialog>
96
     </el-dialog>
93
   </div>
97
   </div>
94
 </template>
98
 </template>
95
 
99
 
96
 <script>
100
 <script>
97
 import { listBudget, getBudget, delBudget, addBudget, updateBudget } from "@/api/oa/budget/budget";
101
 import { listBudget, getBudget, delBudget, addBudget, updateBudget } from "@/api/oa/budget/budget";
102
+import { listCheck, getCheck, delCheck, addCheck, updateCheck } from "@/api/oa/budget/check";
98
 import { listProject } from '@/api/oa/project/project';
103
 import { listProject } from '@/api/oa/project/project';
99
 import budgetInfo from '../../flowable/form/budget/budgetInfo.vue';
104
 import budgetInfo from '../../flowable/form/budget/budgetInfo.vue';
105
+import newBudgetInfo from '../../flowable/form/budget/adjust/newBudgetInfo.vue';
106
+import budgetAdjust from '../../flowable/form/budget/adjust/budgetAdjust.vue';
100
 import FormData from './formData.vue';
107
 import FormData from './formData.vue';
101
-import { checkPermi } from '@/utils/permission';
102
 export default {
108
 export default {
103
   name: "Budget",
109
   name: "Budget",
104
-  components: { budgetInfo, FormData, },
110
+  components: { budgetInfo, FormData, newBudgetInfo, budgetAdjust },
105
   data() {
111
   data() {
106
     return {
112
     return {
107
       // 遮罩层
113
       // 遮罩层
154
       rules: {
160
       rules: {
155
       },
161
       },
156
       taskForm: {
162
       taskForm: {
157
-        formId:''
163
+        formId: ''
158
       },
164
       },
159
       projectList: [],
165
       projectList: [],
160
       queryType: '1',
166
       queryType: '1',
167
+      isOld: false,
168
+      clickRow: {},
169
+      isAdjust: false
161
     };
170
     };
162
   },
171
   },
163
   created() {
172
   created() {
172
         this.total = response.total;
181
         this.total = response.total;
173
         this.loading = false;
182
         this.loading = false;
174
       });
183
       });
175
-    }, 
184
+    },
176
     remoteMethod(val) {
185
     remoteMethod(val) {
177
       let params1 = {
186
       let params1 = {
178
         pageNum: 1,
187
         pageNum: 1,
249
       this.open = true;
258
       this.open = true;
250
       this.title = "添加预算";
259
       this.title = "添加预算";
251
     },
260
     },
252
-    handleView(row) {
253
-      this.taskForm.formId = row.projectId;
261
+    async handleView(row) {
262
+      this.isAdjust = this.$store.getters.roles.includes('leader') || this.$store.getters.roles.includes('finance')
263
+        || this.$store.getters.roles.includes('nfinance') || this.$store.getters.roles.includes('admin');
264
+      if (this.isAdjust) {
265
+        let res = await listCheck({ budgetId: row.budgetId });
266
+        if (res.rows.length > 0) {
267
+          this.taskForm.formId = res.rows[0].checkId;
268
+        } else {
269
+          this.taskForm.formId = row.projectId;
270
+          this.isAdjust = false;
271
+        }
272
+      } else {
273
+        this.taskForm.formId = row.projectId;
274
+      }
275
+      this.clickRow = row;
276
+      let old = Number(row.project.projectNumber.substring(0, 4));
277
+      if (old >= 2025) {
278
+        this.isOld = false;
279
+      } else {
280
+        this.isOld = true;
281
+      }
254
       this.infoOpen = true;
282
       this.infoOpen = true;
255
     },
283
     },
256
     /** 修改按钮操作 */
284
     /** 修改按钮操作 */

Loading…
İptal
Kaydet