|
@@ -2,12 +2,20 @@
|
2
|
2
|
* @Author: ysh
|
3
|
3
|
* @Date: 2025-05-07 11:01:39
|
4
|
4
|
* @LastEditors: Please set LastEditors
|
5
|
|
- * @LastEditTime: 2025-05-16 11:15:36
|
|
5
|
+ * @LastEditTime: 2025-05-19 17:49:04
|
6
|
6
|
-->
|
7
|
7
|
<template>
|
8
|
8
|
<div class="main" v-loading="loading">
|
9
|
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
|
19
|
<el-divider></el-divider>
|
12
|
20
|
<el-descriptions :column="3" border class="descriptions">
|
13
|
21
|
<el-descriptions-item label="项目编号">
|
|
@@ -28,6 +36,15 @@
|
28
|
36
|
<el-descriptions-item label="预算表单备注" :span="5">
|
29
|
37
|
{{ budgetForm.remark }}
|
30
|
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
|
48
|
<el-descriptions-item label="项目计划工作量" :span="3">
|
32
|
49
|
<div>
|
33
|
50
|
<table border="1" style="width: 100%;">
|
|
@@ -91,43 +108,187 @@
|
91
|
108
|
</tr>
|
92
|
109
|
<tr style="color:#F56C6C">
|
93
|
110
|
<td :colspan="8" class="head">内业核算绩效额</td>
|
94
|
|
- <td :colspan="1" class="head">
|
|
111
|
+ <td :colspan="1" class="head" v-if="taskName == '核算编制'">
|
95
|
112
|
<el-input-number v-model="budgetForm.settleAdjust" :controls="false" style="width:100%"></el-input-number>
|
96
|
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
|
117
|
</tr>
|
98
|
118
|
</table>
|
99
|
119
|
</el-descriptions-item>
|
100
|
120
|
<el-descriptions-item label="内业人员成本" :span="3" v-if="innerStaffList.length > 0">
|
101
|
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
|
124
|
</el-descriptions-item>
|
104
|
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
|
127
|
@update:staffList="handleOuterStaffChange"></outer-staff-cost>
|
107
|
128
|
</el-descriptions-item>
|
108
|
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
|
131
|
</el-descriptions-item>
|
111
|
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
|
135
|
</el-descriptions-item>
|
114
|
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
|
138
|
</el-descriptions-item>
|
117
|
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
|
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
|
229
|
</el-descriptions-item>
|
123
|
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
|
281
|
</el-descriptions-item>
|
126
|
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
|
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
|
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
|
292
|
</div>
|
132
|
293
|
</template>
|
133
|
294
|
|
|
@@ -142,6 +303,8 @@ import { listOther, addOther, updateOther, delOther } from "@/api/oa/budget/budg
|
142
|
303
|
import { listProjectWork } from "@/api/oa/project/projectWork";
|
143
|
304
|
import { listSite, updateSite, delSite, addSite } from "@/api/oa/budget/budgetSite";
|
144
|
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
|
308
|
import InnerStaffCost from './components/InnerStaffCost.vue';
|
146
|
309
|
import OuterStaffCost from './components/OuterStaffCost.vue';
|
147
|
310
|
import CarCost from './components/CarCost.vue';
|
|
@@ -149,6 +312,8 @@ import DeviceCost from './components/DeviceCost.vue';
|
149
|
312
|
import SiteCost from '@/views/flowable/form/budget/adjust/components/SiteCost.vue';
|
150
|
313
|
import BusinessCost from '@/views/flowable/form/budget/adjust/components/businessCost.vue';
|
151
|
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
|
317
|
export default {
|
153
|
318
|
components: {
|
154
|
319
|
InnerStaffCost,
|
|
@@ -157,7 +322,9 @@ export default {
|
157
|
322
|
DeviceCost,
|
158
|
323
|
SiteCost,
|
159
|
324
|
BusinessCost,
|
160
|
|
- OtherCost
|
|
325
|
+ OtherCost,
|
|
326
|
+ ReturnComment,
|
|
327
|
+ ReturnBtn
|
161
|
328
|
},
|
162
|
329
|
props: {
|
163
|
330
|
taskForm: {
|
|
@@ -169,12 +336,34 @@ export default {
|
169
|
336
|
},
|
170
|
337
|
row: {
|
171
|
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
|
361
|
data() {
|
175
|
362
|
return {
|
|
363
|
+ baseUrl: process.env.VUE_APP_BASE_API,
|
176
|
364
|
loading: true,
|
177
|
365
|
budgetForm: {},
|
|
366
|
+ checkForm: {},
|
178
|
367
|
project: {},
|
179
|
368
|
workContentList: [],
|
180
|
369
|
workList: [],
|
|
@@ -183,11 +372,26 @@ export default {
|
183
|
372
|
carList: [],
|
184
|
373
|
deviceList: [],
|
185
|
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
|
393
|
this.initBudgetForm();
|
|
394
|
+ this.initCheckForm();
|
191
|
395
|
this.getProjectWorkList();
|
192
|
396
|
},
|
193
|
397
|
methods: {
|
|
@@ -197,12 +401,31 @@ export default {
|
197
|
401
|
this.budgetForm = res.rows[0];
|
198
|
402
|
if (this.budgetForm) {
|
199
|
403
|
const budgetId = this.budgetForm.budgetId;
|
|
404
|
+ // 经营相关
|
200
|
405
|
this.budgetForm.outExpense = Number(this.budgetForm.outExpense).toFixed(2);
|
201
|
406
|
this.budgetForm.letterExpense = Number(this.budgetForm.letterExpense).toFixed(2);
|
202
|
407
|
this.budgetForm.winExpense = Number(this.budgetForm.winExpense).toFixed(2);
|
203
|
408
|
this.budgetForm.taxExpense = Number(this.budgetForm.taxExpense).toFixed(2);
|
204
|
409
|
this.budgetForm.travelExpense = Number(this.budgetForm.travelExpense).toFixed(2);
|
205
|
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
|
430
|
let deviceRes = await listBudgetDevice({ pageSize: 100, budgetId });
|
208
|
431
|
this.deviceList = deviceRes.rows;
|
|
@@ -214,6 +437,8 @@ export default {
|
214
|
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
|
443
|
let carRes = await listBudgetCar({ pageSize: 100, budgetId });
|
219
|
444
|
this.carList = carRes.rows;
|
|
@@ -225,6 +450,7 @@ export default {
|
225
|
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
|
456
|
let innerStaffRes = await listBudgetStaff({ pageSize: 100, budgetId, type: '内业' });
|
|
@@ -241,6 +467,7 @@ export default {
|
241
|
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
|
473
|
let outerStaffRes = await listBudgetStaff({ pageSize: 100, budgetId, type: '外业' });
|
|
@@ -257,6 +484,8 @@ export default {
|
257
|
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
|
491
|
let settleRes = await listBudgetSettle({ pageSize: 100, budgetId });
|
|
@@ -290,6 +519,15 @@ export default {
|
290
|
519
|
// 获取现场开支
|
291
|
520
|
let siteRes = await listSite({ pageSize: 100, budgetId });
|
292
|
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
|
532
|
this.siteList = this.siteList.map(site => {
|
295
|
533
|
return {
|
|
@@ -309,12 +547,35 @@ export default {
|
309
|
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
|
554
|
this.loading = false;
|
314
|
555
|
}).catch(() => {
|
315
|
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
|
579
|
getProjectWorkList() {
|
319
|
580
|
getProject(this.row.projectId).then(res => {
|
320
|
581
|
this.project = res.data;
|
|
@@ -326,23 +587,33 @@ export default {
|
326
|
587
|
// 处理内业人员数据变化
|
327
|
588
|
handleInnerStaffChange(newList) {
|
328
|
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
|
595
|
handleOuterStaffChange(newList) {
|
333
|
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
|
601
|
handleCarChange(newList) {
|
337
|
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
|
607
|
handleDeviceChange(newList) {
|
341
|
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
|
613
|
handleSiteChange(newList) {
|
345
|
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
|
619
|
handleBusinessChange(newData) {
|
|
@@ -351,66 +622,128 @@ export default {
|
351
|
622
|
this.budgetForm.winAdjust = newData.winAdjust;
|
352
|
623
|
this.budgetForm.taxAdjust = newData.taxAdjust;
|
353
|
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
|
633
|
handleOtherChange(newList) {
|
357
|
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
|
647
|
async preserve() {
|
360
|
648
|
let obj = {
|
361
|
649
|
budgetId: this.row.budgetId,
|
362
|
650
|
projectId: this.row.projectId,
|
363
|
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
|
654
|
await addCheck(obj);
|
368
|
655
|
this.$emit('preserve');
|
|
656
|
+ } else {
|
|
657
|
+ await updateCheck(this.checkForm);
|
369
|
658
|
}
|
370
|
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
|
697
|
this.$message.success('保存成功');
|
405
|
698
|
},
|
406
|
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
|
742
|
</script>
|
412
|
743
|
|
413
|
744
|
<style lang="scss" scoped>
|
|
745
|
+@import "@/assets/styles/element-reset.scss";
|
|
746
|
+
|
414
|
747
|
.mylabel {
|
415
|
748
|
font-weight: bold;
|
416
|
749
|
}
|
|
@@ -438,6 +771,15 @@ table {
|
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
|
783
|
.adjust {
|
442
|
784
|
color: #F56C6C;
|
443
|
785
|
width: 120px;
|
|
@@ -450,5 +792,37 @@ table {
|
450
|
792
|
::v-deep .el-descriptions-item__label.is-bordered-label {
|
451
|
793
|
color: #434141;
|
452
|
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
|
828
|
</style>
|