|
@@ -2,7 +2,13 @@
|
2
|
2
|
* @Author: ysh
|
3
|
3
|
* @Date: 2024-03-25 15:05:59
|
4
|
4
|
* @LastEditors: Please set LastEditors
|
5
|
|
- * @LastEditTime: 2024-03-26 17:51:38
|
|
5
|
+ * @LastEditTime: 2024-03-27 17:39:21
|
|
6
|
+-->
|
|
7
|
+<!--
|
|
8
|
+ * @Author: ysh
|
|
9
|
+ * @Date: 2024-03-25 15:05:59
|
|
10
|
+ * @LastEditors: Please set LastEditors
|
|
11
|
+ * @LastEditTime: 2024-03-27 17:37:37
|
6
|
12
|
-->
|
7
|
13
|
<template>
|
8
|
14
|
<div>
|
|
@@ -19,43 +25,18 @@
|
19
|
25
|
</div>
|
20
|
26
|
<div class="add-main">
|
21
|
27
|
<el-steps :active="activeStep" align-center finish-status="success">
|
22
|
|
- <el-step
|
23
|
|
- title="选择项目"
|
24
|
|
- description="选择想要生成预算的项目"
|
25
|
|
- ></el-step>
|
26
|
|
- <el-step
|
27
|
|
- title="选择参与人员"
|
28
|
|
- description="选择参与的人员,得到人员预算"
|
29
|
|
- ></el-step>
|
30
|
|
- <el-step
|
31
|
|
- title="选择车辆和设备"
|
32
|
|
- description="选择车辆和设备,得到对应预算"
|
33
|
|
- ></el-step>
|
34
|
|
- <el-step
|
35
|
|
- title="其他预算开支项"
|
36
|
|
- description="包含绩效预算和其他预算"
|
37
|
|
- ></el-step>
|
38
|
|
- <el-step
|
39
|
|
- title="生成预算表"
|
40
|
|
- description="生成最终的项目预算表"
|
41
|
|
- ></el-step>
|
|
28
|
+ <el-step title="选择项目" description="选择想要生成预算的项目"></el-step>
|
|
29
|
+ <el-step title="选择人员、车辆和设备" description="选择参与的人员、车辆和设备,得到固定成本"></el-step>
|
|
30
|
+ <!-- <el-step title="选择车辆和设备" description="选择,得到对应预算"></el-step> -->
|
|
31
|
+ <el-step title="绩效和其他预算" description="包含绩效预算和其他预算"></el-step>
|
|
32
|
+ <el-step title="生成预算表" description="生成最终的项目预算表"></el-step>
|
42
|
33
|
</el-steps>
|
43
|
34
|
<!-- 选择项目 -->
|
44
|
35
|
<div class="project" v-if="activeStep == 0">
|
45
|
|
- <el-form
|
46
|
|
- ref="form1"
|
47
|
|
- :model="projectForm"
|
48
|
|
- :rules="projectRule"
|
49
|
|
- label-width="120px"
|
50
|
|
- >
|
|
36
|
+ <el-form ref="form1" :model="projectForm" :rules="projectRule" label-width="120px">
|
51
|
37
|
<el-form-item label="项目编号:" prop="projectNumber">
|
52
|
38
|
<div style="display: flex">
|
53
|
|
- <el-input
|
54
|
|
- v-model="projectForm.projectNumber"
|
55
|
|
- placeholder="请选择项目编号"
|
56
|
|
- disabled
|
57
|
|
- style="width: 300px"
|
58
|
|
- />
|
|
39
|
+ <el-input v-model="projectForm.projectNumber" placeholder="请选择项目编号" disabled style="width: 300px" />
|
59
|
40
|
<el-button @click="openProject = true">选择</el-button>
|
60
|
41
|
</div>
|
61
|
42
|
</el-form-item>
|
|
@@ -121,45 +102,33 @@
|
121
|
102
|
</el-form>
|
122
|
103
|
</div>
|
123
|
104
|
|
124
|
|
- <!-- 选择参与人员 -->
|
|
105
|
+ <!-- 选择参与人员、车辆和设备 -->
|
125
|
106
|
<div class="staff" v-if="activeStep == 1">
|
126
|
107
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
127
|
108
|
<el-breadcrumb-item>选择项目</el-breadcrumb-item>
|
128
|
|
- <el-breadcrumb-item>{{
|
129
|
|
- projectForm.projectNumber
|
130
|
|
- }}</el-breadcrumb-item>
|
|
109
|
+ <el-breadcrumb-item>{{ projectForm.projectNumber }}</el-breadcrumb-item>
|
131
|
110
|
<el-breadcrumb-item>{{ projectForm.projectName }}</el-breadcrumb-item>
|
132
|
|
- <el-breadcrumb-item>{{
|
133
|
|
- projectForm.projectLeader
|
134
|
|
- }}</el-breadcrumb-item>
|
|
111
|
+ <el-breadcrumb-item>{{ projectForm.projectLeader }}</el-breadcrumb-item>
|
135
|
112
|
</el-breadcrumb>
|
136
|
113
|
<el-form ref="form2" :model="peopleForm" style="padding: 20px 100px 0">
|
|
114
|
+ <!-- 选择人员 -->
|
137
|
115
|
<el-form-item label="选择人员:">
|
138
|
116
|
<span v-if="chooseUser.length != 0">
|
139
|
|
- <el-tag
|
140
|
|
- type="success"
|
141
|
|
- v-for="item in chooseUser"
|
142
|
|
- style="margin: 5px"
|
143
|
|
- >{{ item.nickName }}</el-tag
|
144
|
|
- >
|
|
117
|
+ <el-tag effect="plain" type="" v-for="item in chooseUser" style="margin: 5px;font-size:14px;"
|
|
118
|
+ :key="item.userId">
|
|
119
|
+ {{ item.nickName }}
|
|
120
|
+ </el-tag>
|
145
|
121
|
</span>
|
146
|
|
- <el-button
|
147
|
|
- type="primary"
|
148
|
|
- plain
|
149
|
|
- icon="el-icon-plus"
|
150
|
|
- @click="openPeople = true"
|
151
|
|
- size="mini"
|
152
|
|
- >选择</el-button
|
153
|
|
- >
|
|
122
|
+ <el-button type="primary" plain icon="el-icon-plus" @click="openPeople = true" size="mini">选择</el-button>
|
154
|
123
|
</el-form-item>
|
155
|
124
|
<el-form-item label="人员预算:" v-if="chooseUser.length != 0">
|
156
|
125
|
<table border="1">
|
157
|
126
|
<tr>
|
158
|
|
- <td>姓名</td>
|
159
|
|
- <td>岗位工资</td>
|
160
|
|
- <td>人员成本(天)</td>
|
161
|
|
- <td>进出场单价</td>
|
162
|
|
- <td>预算天数</td>
|
|
127
|
+ <td style="width:80px">姓名</td>
|
|
128
|
+ <td style="width:100px">岗位工资</td>
|
|
129
|
+ <td style="width:110px">人员成本(天)</td>
|
|
130
|
+ <td style="width:100px">进出场单价</td>
|
|
131
|
+ <td style="width:100px">预算天数</td>
|
163
|
132
|
<td style="width: 100px">总额</td>
|
164
|
133
|
<td></td>
|
165
|
134
|
</tr>
|
|
@@ -168,70 +137,154 @@
|
168
|
137
|
<td>{{ user.salary.salary }}</td>
|
169
|
138
|
<td>{{ parseFloat(user.salary.salary / 31).toFixed(2) }}</td>
|
170
|
139
|
<td>
|
171
|
|
- <el-input
|
172
|
|
- v-model="user.inOutPrice"
|
173
|
|
- placeholder="请输入进出场单价"
|
174
|
|
- ></el-input>
|
|
140
|
+ <el-input v-model="user.inOutPrice" placeholder="请输入进出场单价"></el-input>
|
175
|
141
|
</td>
|
176
|
142
|
<td>
|
177
|
|
- <el-input
|
178
|
|
- v-model="user.days"
|
179
|
|
- placeholder="请输入天数"
|
180
|
|
- ></el-input>
|
|
143
|
+ <el-input v-model="user.days" placeholder="请输入天数"></el-input>
|
181
|
144
|
</td>
|
182
|
145
|
<td class="staffCost">{{ user.staffCost }}</td>
|
183
|
146
|
<td>
|
184
|
|
- <el-button type="text" @click="calculateUserTotal(user)"
|
185
|
|
- >计算</el-button
|
186
|
|
- >
|
|
147
|
+ <el-button type="text" @click="calculateUserTotal(user)">计算</el-button>
|
187
|
148
|
</td>
|
188
|
149
|
</tr>
|
189
|
150
|
<tr>
|
190
|
151
|
<td colspan="5">合计</td>
|
191
|
152
|
<td>{{ budgetForm.staffCost }}</td>
|
192
|
153
|
<td>
|
193
|
|
- <el-button type="text" @click="calculateTotal"
|
194
|
|
- >计算</el-button
|
195
|
|
- >
|
|
154
|
+ <el-button type="text" @click="calculateTotal('staffCost')">计算</el-button>
|
|
155
|
+ </td>
|
|
156
|
+ </tr>
|
|
157
|
+ </table>
|
|
158
|
+ </el-form-item>
|
|
159
|
+ <!-- 选择车辆 -->
|
|
160
|
+ <el-form-item label="选择车辆:">
|
|
161
|
+ <span v-if="chooseCar.length != 0">
|
|
162
|
+ <el-tag effect="plain" type="" v-for="item in chooseCar" style="margin: 5px;font-size:14px;"
|
|
163
|
+ :key="item.licensePlate">
|
|
164
|
+ {{ item.licensePlate + item.brand }}
|
|
165
|
+ </el-tag>
|
|
166
|
+ </span>
|
|
167
|
+ <el-button type="primary" plain icon="el-icon-plus" @click="openCar = true" size="mini">选择</el-button>
|
|
168
|
+ </el-form-item>
|
|
169
|
+ <el-form-item label="车辆预算:" v-if="chooseCar.length != 0">
|
|
170
|
+ <table border="1">
|
|
171
|
+ <tr>
|
|
172
|
+ <td style="width:120px">车牌号</td>
|
|
173
|
+ <td style="width:100px">油耗</td>
|
|
174
|
+ <td style="width:100px">总里程</td>
|
|
175
|
+ <td style="width:110px">折旧成本(天)</td>
|
|
176
|
+ <td style="width:110px">预算天数</td>
|
|
177
|
+ <td style="width: 100px">总额</td>
|
|
178
|
+ <td></td>
|
|
179
|
+ </tr>
|
|
180
|
+ <tr v-for="car in chooseCar" :key="car.carId">
|
|
181
|
+ <td>{{ car.licensePlate }}</td>
|
|
182
|
+ <td>
|
|
183
|
+ <el-input v-model="car.mileage" placeholder="请输入油耗"></el-input>
|
|
184
|
+ </td>
|
|
185
|
+ <td>
|
|
186
|
+ <el-input v-model="car.distance" placeholder="请输入总里程"></el-input>
|
|
187
|
+ </td>
|
|
188
|
+ <td>
|
|
189
|
+ {{ car.dayCost }}
|
|
190
|
+ </td>
|
|
191
|
+ <td>
|
|
192
|
+ <el-input v-model="car.days" placeholder="请输入天数"></el-input>
|
|
193
|
+ </td>
|
|
194
|
+ <td class="carCost">{{ car.expense }}</td>
|
|
195
|
+ <td>
|
|
196
|
+ <el-button type="text" @click="calculateCarTotal(car)">计算</el-button>
|
|
197
|
+ </td>
|
|
198
|
+ </tr>
|
|
199
|
+ <tr>
|
|
200
|
+ <td colspan="5">合计</td>
|
|
201
|
+ <td>{{ budgetForm.carCost }}</td>
|
|
202
|
+ <td>
|
|
203
|
+ <el-button type="text" @click="calculateTotal('carCost')">计算</el-button>
|
|
204
|
+ </td>
|
|
205
|
+ </tr>
|
|
206
|
+ </table>
|
|
207
|
+ </el-form-item>
|
|
208
|
+ <!-- 选择设备 -->
|
|
209
|
+ <el-form-item label="选择设备:">
|
|
210
|
+ <span v-if="chooseDevice.length != 0">
|
|
211
|
+ <el-tag effect="plain" type="" v-for="item in chooseDevice" style="margin: 5px;font-size:14px;"
|
|
212
|
+ :key="item.code">
|
|
213
|
+ {{ item.name + '-' + item.series + '-' + item.brand }}
|
|
214
|
+ </el-tag>
|
|
215
|
+ </span>
|
|
216
|
+ <el-button type="primary" plain icon="el-icon-plus" @click="openDevice = true" size="mini">选择</el-button>
|
|
217
|
+ </el-form-item>
|
|
218
|
+ <el-form-item label="设备预算:" v-if="chooseDevice.length != 0">
|
|
219
|
+ <table border="1">
|
|
220
|
+ <tr>
|
|
221
|
+ <td style="width:120px">设备名称</td>
|
|
222
|
+ <td style="width:120px">规格型号</td>
|
|
223
|
+ <td style="width:120px">品牌</td>
|
|
224
|
+ <td>折旧成本(天)</td>
|
|
225
|
+ <td style="width:100px">预算天数</td>
|
|
226
|
+ <td style="width: 100px">总额</td>
|
|
227
|
+ <td></td>
|
|
228
|
+ </tr>
|
|
229
|
+ <tr v-for="device in chooseDevice" :key="device.deviceId">
|
|
230
|
+ <td>{{ device.name }}</td>
|
|
231
|
+ <td>{{ device.series }}</td>
|
|
232
|
+ <td>{{ device.brand }}</td>
|
|
233
|
+ <td>
|
|
234
|
+ {{ device.dayCost }}
|
|
235
|
+ </td>
|
|
236
|
+ <td>
|
|
237
|
+ <el-input v-model="device.days" placeholder="请输入天数"></el-input>
|
|
238
|
+ </td>
|
|
239
|
+ <td class="deviceCost">{{ device.depreciation }}</td>
|
|
240
|
+ <td>
|
|
241
|
+ <el-button type="text" @click="calculateDeviceTotal(device)">计算</el-button>
|
|
242
|
+ </td>
|
|
243
|
+ </tr>
|
|
244
|
+ <tr>
|
|
245
|
+ <td colspan="5">合计</td>
|
|
246
|
+ <td>{{ budgetForm.deviceCost }}</td>
|
|
247
|
+ <td>
|
|
248
|
+ <el-button type="text" @click="calculateTotal('deviceCost')">计算</el-button>
|
196
|
249
|
</td>
|
197
|
250
|
</tr>
|
198
|
251
|
</table>
|
199
|
252
|
</el-form-item>
|
|
253
|
+ <el-form-item label="固定成本小计:">
|
|
254
|
+ <el-tag type="danger" style="margin-right:20px;font-size:14px;">{{ budgetForm.fixCost }}</el-tag>
|
|
255
|
+ <el-button @click="getFixCost" type="success">计算</el-button>
|
|
256
|
+ </el-form-item>
|
200
|
257
|
</el-form>
|
201
|
|
- </div>
|
202
|
258
|
|
|
259
|
+ </div>
|
|
260
|
+ <!-- 绩效和其他预算 -->
|
|
261
|
+ <div class="other" v-if="activeStep == 2">
|
|
262
|
+ <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
263
|
+ <el-breadcrumb-item>选择项目</el-breadcrumb-item>
|
|
264
|
+ <el-breadcrumb-item>{{ projectForm.projectNumber }}</el-breadcrumb-item>
|
|
265
|
+ <el-breadcrumb-item>{{ projectForm.projectName }}</el-breadcrumb-item>
|
|
266
|
+ <el-breadcrumb-item>{{ projectForm.projectLeader }}</el-breadcrumb-item>
|
|
267
|
+ </el-breadcrumb>
|
|
268
|
+ <el-breadcrumb separator-class="el-icon-arrow-right" style="margin:15px 0">
|
|
269
|
+ <el-breadcrumb-item>固定成本小计</el-breadcrumb-item>
|
|
270
|
+ <el-breadcrumb-item>¥ {{ budgetForm.fixCost }}</el-breadcrumb-item>
|
|
271
|
+ </el-breadcrumb>
|
|
272
|
+ <choose-money :workList="workList"></choose-money>
|
|
273
|
+ </div>
|
203
|
274
|
<el-divider></el-divider>
|
204
|
275
|
<div class="btn">
|
205
|
|
- <el-button @click="activeStep -= 1" :disabled="activeStep == 0"
|
206
|
|
- >上一步</el-button
|
207
|
|
- >
|
208
|
|
- <el-button @click="confirmStep" type="primary" v-if="activeStep < 4"
|
209
|
|
- >下一步</el-button
|
210
|
|
- >
|
211
|
|
- <el-button
|
212
|
|
- @click="activeStep += 1"
|
213
|
|
- type="primary"
|
214
|
|
- v-if="activeStep == 4"
|
215
|
|
- >生成预算表</el-button
|
216
|
|
- >
|
|
276
|
+ <el-button @click="activeStep -= 1" :disabled="activeStep == 0">上一步</el-button>
|
|
277
|
+ <el-button @click="confirmStep" type="primary" v-if="activeStep < 4">下一步</el-button>
|
|
278
|
+ <el-button @click="activeStep += 1" type="primary" v-if="activeStep == 4">生成预算表</el-button>
|
217
|
279
|
</div>
|
218
|
280
|
</div>
|
219
|
281
|
|
220
|
282
|
<!-- 项目选择对话框 -->
|
221
|
|
- <el-dialog
|
222
|
|
- title="选择项目"
|
223
|
|
- :visible.sync="openProject"
|
224
|
|
- width="700px"
|
225
|
|
- append-to-body
|
226
|
|
- >
|
|
283
|
+ <el-dialog title="选择项目" :visible.sync="openProject" width="700px" append-to-body>
|
227
|
284
|
<el-form :inline="true">
|
228
|
285
|
<el-form-item label="项目编号" prop="projectNumber">
|
229
|
|
- <el-input
|
230
|
|
- v-model="queryParams.projectNumber"
|
231
|
|
- placeholder="请输入项目编号"
|
232
|
|
- clearable
|
233
|
|
- @keyup.enter.native="getProjectList"
|
234
|
|
- />
|
|
286
|
+ <el-input v-model="queryParams.projectNumber" placeholder="请输入项目编号" clearable
|
|
287
|
+ @keyup.enter.native="getProjectList" />
|
235
|
288
|
</el-form-item>
|
236
|
289
|
<el-form-item style="margin-bottom: 0; display: none">
|
237
|
290
|
<el-input></el-input>
|
|
@@ -245,77 +298,67 @@
|
245
|
298
|
<el-table-column type="index" width="50"> </el-table-column>
|
246
|
299
|
<el-table-column prop="isFinshed" label="状态" width="90px">
|
247
|
300
|
<template slot-scope="scope">
|
248
|
|
- <el-tag
|
249
|
|
- :type="scope.row.isFinished === '0' ? 'success' : 'warning'"
|
250
|
|
- disable-transitions
|
251
|
|
- >
|
|
301
|
+ <el-tag :type="scope.row.isFinished === '0' ? 'success' : 'warning'" disable-transitions>
|
252
|
302
|
{{ scope.row.isFinished == "0" ? "进行中" : "已结束" }}
|
253
|
303
|
</el-tag>
|
254
|
304
|
</template>
|
255
|
305
|
</el-table-column>
|
256
|
|
- <el-table-column
|
257
|
|
- label="项目编号"
|
258
|
|
- align="center"
|
259
|
|
- key="projectNumber"
|
260
|
|
- prop="projectNumber"
|
261
|
|
- />
|
262
|
|
- <el-table-column
|
263
|
|
- label="项目名称"
|
264
|
|
- align="center"
|
265
|
|
- key="projectName"
|
266
|
|
- prop="projectName"
|
267
|
|
- width="200px"
|
268
|
|
- />
|
269
|
|
- <el-table-column
|
270
|
|
- label="项目负责人"
|
271
|
|
- align="center"
|
272
|
|
- key="projectLeaderName"
|
273
|
|
- prop="projectLeaderName"
|
274
|
|
- />
|
|
306
|
+ <el-table-column label="项目编号" align="center" key="projectNumber" prop="projectNumber" />
|
|
307
|
+ <el-table-column label="项目名称" align="center" key="projectName" prop="projectName" width="200px" />
|
|
308
|
+ <el-table-column label="项目负责人" align="center" key="projectLeaderName" prop="projectLeaderName" />
|
275
|
309
|
<el-table-column align="center">
|
276
|
310
|
<template slot-scope="scope">
|
277
|
|
- <el-button size="mini" type="text" @click="chooseProject(scope.row)"
|
278
|
|
- >选择</el-button
|
279
|
|
- >
|
|
311
|
+ <el-button size="mini" type="text" @click="chooseProject(scope.row)">选择</el-button>
|
280
|
312
|
</template>
|
281
|
313
|
</el-table-column>
|
282
|
314
|
</el-table>
|
283
|
315
|
<div style="text-align: right">
|
284
|
|
- <el-pagination
|
285
|
|
- @current-change="getProjectList"
|
286
|
|
- :current-page.sync="queryParams.pageNum"
|
287
|
|
- :page-size="queryParams.pageSize"
|
288
|
|
- layout="total, prev, pager, next"
|
289
|
|
- :total="projectTotal"
|
290
|
|
- >
|
|
316
|
+ <el-pagination @current-change="getProjectList" :current-page.sync="queryParams.pageNum"
|
|
317
|
+ :page-size="queryParams.pageSize" layout="total, prev, pager, next" :total="projectTotal">
|
291
|
318
|
</el-pagination>
|
292
|
319
|
</div>
|
293
|
320
|
</el-dialog>
|
294
|
321
|
<!-- 选择人员对话框 -->
|
295
|
|
- <el-dialog
|
296
|
|
- title="选择人员"
|
297
|
|
- :visible.sync="openPeople"
|
298
|
|
- width="700px"
|
299
|
|
- append-to-body
|
300
|
|
- >
|
|
322
|
+ <el-dialog title="选择人员" :visible.sync="openPeople" width="700px" append-to-body>
|
301
|
323
|
<choosePeople @chooseUser="getChooseUser"></choosePeople>
|
302
|
324
|
</el-dialog>
|
|
325
|
+ <!-- 选择车辆对话框 -->
|
|
326
|
+ <el-dialog title="选择车辆" :visible.sync="openCar" width="700px" append-to-body>
|
|
327
|
+ <chooseCar @chooseList="getChooseCar"></chooseCar>
|
|
328
|
+ </el-dialog>
|
|
329
|
+ <!-- 选择设备对话框 -->
|
|
330
|
+ <el-dialog title="选择设备" :visible.sync="openDevice" width="700px" append-to-body>
|
|
331
|
+ <chooseDevice @chooseList="getChooseDevice"></chooseDevice>
|
|
332
|
+ </el-dialog>
|
303
|
333
|
</div>
|
304
|
334
|
</template>
|
305
|
335
|
|
306
|
336
|
<script>
|
307
|
337
|
import { listProject } from "@/api/oa/project/project";
|
308
|
|
-import choosePeople from "./components/choosePeople.vue";
|
309
|
338
|
import { getSalary } from "@/api/oa/staff/salary";
|
|
339
|
+import choosePeople from "./components/choosePeople.vue";
|
|
340
|
+import chooseCar from "./components/chooseCar.vue";
|
|
341
|
+import chooseDevice from "./components/chooseDevice.vue";
|
|
342
|
+import chooseMoney from "./components/chooseMoney.vue";
|
310
|
343
|
export default {
|
311
|
344
|
components: {
|
312
|
|
- choosePeople,
|
|
345
|
+ choosePeople, chooseCar, chooseDevice, chooseMoney
|
313
|
346
|
},
|
314
|
347
|
data() {
|
315
|
348
|
return {
|
316
|
349
|
activeStep: 0,
|
317
|
350
|
form: {},
|
318
|
|
- budgetForm: {}, // 预算表
|
|
351
|
+ budgetForm: {
|
|
352
|
+ fixCost: 0,
|
|
353
|
+ outExpense: 0,
|
|
354
|
+ businessExpense: 0,
|
|
355
|
+ rentExpense: 0,
|
|
356
|
+ otherExpense: 0,
|
|
357
|
+ directExpense: 0,
|
|
358
|
+ totalBudget: 0,
|
|
359
|
+ compiler: '',
|
|
360
|
+ auditor: ''
|
|
361
|
+ }, // 预算表
|
319
|
362
|
openProject: false,
|
320
|
363
|
projectList: [],
|
321
|
364
|
queryParams: {
|
|
@@ -337,15 +380,26 @@ export default {
|
337
|
380
|
deadline: "2024-01-31",
|
338
|
381
|
remark: "此为备注此为备注此为备注此为备注此为备注此为备注",
|
339
|
382
|
},
|
|
383
|
+ {
|
|
384
|
+ content: "XXXXXXXXXXXXXXXXXX",
|
|
385
|
+ scale: "1:500",
|
|
386
|
+ workload: "81",
|
|
387
|
+ unit: "km²",
|
|
388
|
+ deadline: "2024-01-31",
|
|
389
|
+ remark: "此为备注此为备注此为备注此为备注此为备注此为备注",
|
|
390
|
+ }
|
340
|
391
|
],
|
341
|
392
|
projectRule: {
|
342
|
|
- projectNumber: [
|
343
|
|
- { required: true, message: "请选择项目编号", trigger: "blur" },
|
344
|
|
- ],
|
|
393
|
+ projectNumber: [{ required: true, message: "请选择项目编号", trigger: "blur" }],
|
345
|
394
|
},
|
346
|
395
|
peopleForm: {},
|
347
|
396
|
openPeople: false,
|
348
|
397
|
chooseUser: [],
|
|
398
|
+ carDeviceForm: {},
|
|
399
|
+ openCar: false,
|
|
400
|
+ openDevice: false,
|
|
401
|
+ chooseCar: [],
|
|
402
|
+ chooseDevice: []
|
349
|
403
|
};
|
350
|
404
|
},
|
351
|
405
|
created() {
|
|
@@ -359,7 +413,7 @@ export default {
|
359
|
413
|
},
|
360
|
414
|
// 查询项目列表
|
361
|
415
|
getProjectList() {
|
362
|
|
- listProject(this.queryParams).then((response) => {
|
|
416
|
+ listProject(this.queryParams).then(response => {
|
363
|
417
|
this.projectList = response.rows;
|
364
|
418
|
this.projectTotal = response.total;
|
365
|
419
|
});
|
|
@@ -371,11 +425,14 @@ export default {
|
371
|
425
|
this.openProject = false;
|
372
|
426
|
},
|
373
|
427
|
confirmStep() {
|
374
|
|
- if (this.projectForm.projectNumber == undefined) {
|
375
|
|
- this.activeStep = 0;
|
376
|
|
- this.$message.error(`请选择项目编号!`);
|
377
|
|
- }
|
378
|
|
- if (this.projectForm.projectNumber) {
|
|
428
|
+ if (this.activeStep == 0) {
|
|
429
|
+ if (this.projectForm.projectNumber == undefined) {
|
|
430
|
+ this.activeStep = 0;
|
|
431
|
+ this.$message.error(`请选择项目编号!`);
|
|
432
|
+ } else {
|
|
433
|
+ this.activeStep += 1;
|
|
434
|
+ }
|
|
435
|
+ } else if (this.activeStep == 1) {
|
379
|
436
|
this.activeStep += 1;
|
380
|
437
|
}
|
381
|
438
|
},
|
|
@@ -383,37 +440,58 @@ export default {
|
383
|
440
|
this.chooseUser = val;
|
384
|
441
|
this.openPeople = false;
|
385
|
442
|
},
|
|
443
|
+ getChooseCar(val) {
|
|
444
|
+ this.chooseCar = val;
|
|
445
|
+ this.openCar = false;
|
|
446
|
+ },
|
|
447
|
+ getChooseDevice(val) {
|
|
448
|
+ this.chooseDevice = val;
|
|
449
|
+ this.openDevice = false;
|
|
450
|
+ },
|
386
|
451
|
getUserSalary(userId) {
|
387
|
|
- getSalary(userId).then((res) => {
|
388
|
|
- console.log(res);
|
|
452
|
+ getSalary(userId).then(res => {
|
389
|
453
|
return res.data.salary;
|
390
|
454
|
});
|
391
|
455
|
},
|
392
|
456
|
// 计算单个人员的成本
|
393
|
457
|
calculateUserTotal(user) {
|
394
|
|
- console.log(user);
|
|
458
|
+ debugger
|
395
|
459
|
if (user.inOutPrice == undefined) {
|
396
|
460
|
this.$message.error("请输入进出场单价");
|
397
|
461
|
return;
|
398
|
462
|
}
|
399
|
463
|
let total =
|
400
|
|
- (parseFloat(user.salary.salary / 30).toFixed(2) +
|
401
|
|
- Number(user.inOutPrice)) *
|
|
464
|
+ (parseFloat(user.salary.salary / 31).toFixed(2) + Number(user.inOutPrice)) *
|
402
|
465
|
Number(user.days);
|
403
|
466
|
this.$set(user, "staffCost", total.toFixed(2));
|
404
|
467
|
},
|
|
468
|
+ calculateCarTotal(car) {
|
|
469
|
+ let total1 = Number(car.mileage) * Number(car.distance)
|
|
470
|
+ let total2 = Number(car.dayCost) * Number(car.days)
|
|
471
|
+ let sum = (total1 + total2).toFixed(2);
|
|
472
|
+ this.$set(car, 'depreciation', total2);
|
|
473
|
+ this.$set(car, 'expense', sum);
|
|
474
|
+ },
|
|
475
|
+ calculateDeviceTotal(device) {
|
|
476
|
+ let total = Number(device.dayCost) * Number(device.days)
|
|
477
|
+ this.$set(device, 'depreciation', total);
|
|
478
|
+ },
|
405
|
479
|
// 合计
|
406
|
|
- calculateTotal() {
|
407
|
|
- const elements = document.querySelectorAll(".staffCost");
|
|
480
|
+ calculateTotal(val) {
|
|
481
|
+ debugger
|
|
482
|
+ const elements = document.querySelectorAll("." + val);
|
408
|
483
|
let sum = 0;
|
409
|
484
|
if (elements.length > 0) {
|
410
|
485
|
for (let e of elements) {
|
411
|
486
|
sum = sum + Number(e.innerHTML);
|
412
|
487
|
}
|
413
|
|
- console.log(sum);
|
414
|
|
- this.$set(this.budgetForm, "staffCost", sum.toFixed(2));
|
|
488
|
+ this.$set(this.budgetForm, val, sum.toFixed(2));
|
415
|
489
|
}
|
416
|
490
|
},
|
|
491
|
+ getFixCost() {
|
|
492
|
+ let total = Number(this.budgetForm.staffCost) + Number(this.budgetForm.carCost) + Number(this.budgetForm.deviceCost)
|
|
493
|
+ this.budgetForm.fixCost = total.toFixed(2)
|
|
494
|
+ }
|
417
|
495
|
},
|
418
|
496
|
};
|
419
|
497
|
</script>
|
|
@@ -457,7 +535,8 @@ export default {
|
457
|
535
|
margin: 0 auto;
|
458
|
536
|
}
|
459
|
537
|
|
460
|
|
- .staff {
|
|
538
|
+ .staff,
|
|
539
|
+ .other {
|
461
|
540
|
width: 1200px;
|
462
|
541
|
margin: 0 auto;
|
463
|
542
|
padding-top: 50px;
|