瀏覽代碼

新增预算审核界面

余思翰 1 年之前
父節點
當前提交
f884ee7aef

+ 40
- 0
oa-ui/src/views/flowable/form/budget/budget.vue 查看文件

@@ -0,0 +1,40 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2024-04-08 16:08:33
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-04-08 16:35:39
6
+-->
7
+<template>
8
+  <div>
9
+    <add-budget :taskName="taskName" :taskForm="taskForm" @goBack="goBack" v-if="taskName == '预算编制'"></add-budget>
10
+    <budget-info :taskName="taskName" :taskForm="taskForm" @goBack="goBack" v-if="taskName == '预算审核'"></budget-info>
11
+  </div>
12
+</template>
13
+
14
+<script>
15
+import AddBudget from '@/views/oa/budget/addBudget.vue';
16
+import BudgetInfo from './budgetInfo.vue';
17
+export default {
18
+  props: {
19
+    taskName: {
20
+      type: String,
21
+      require: true
22
+    },
23
+    taskForm: {
24
+      type: Object,
25
+      require: true
26
+    }
27
+  },
28
+  components: {
29
+    AddBudget,
30
+    BudgetInfo
31
+  },
32
+  methods: {
33
+    goBack() {
34
+      this.$emit('goBack')
35
+    }
36
+  }
37
+}
38
+</script>
39
+
40
+<style lang="scss" scoped></style>

+ 182
- 0
oa-ui/src/views/flowable/form/budget/budgetInfo.vue 查看文件

@@ -0,0 +1,182 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2024-04-03 16:28:09
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-04-08 17:15:44
6
+-->
7
+<template>
8
+  <div>
9
+    <h2 style="text-align: center">项目直接生产成本预算表</h2>
10
+    <table border="1" class="table">
11
+      <tr>
12
+        <td class="head">项目名称</td>
13
+        <td colspan="3">{{ projectForm.projectName }}</td>
14
+        <td class="head">项目编号</td>
15
+        <td colspan="2">{{ projectForm.projectNumber }}</td>
16
+      </tr>
17
+      <tr>
18
+        <td :rowspan="userLen" class="head">人员</td>
19
+        <td class="head">姓名</td>
20
+        <td class="head">岗位工资</td>
21
+        <td class="head">人员成本(天)</td>
22
+        <td class="head">进出场单价</td>
23
+        <td class="head">预算天数</td>
24
+        <td class="head">金额</td>
25
+      </tr>
26
+      <tr v-for="user,index in chooseUser" :key="index">
27
+        <td>{{ user.nickName }}</td>
28
+        <td>{{ user.salary.salary }}</td>
29
+        <td>{{ parseFloat(user.salary.salary / 31).toFixed(2) }}</td>
30
+        <td>{{ user.inOutPrice }}</td>
31
+        <td>{{ user.days }}</td>
32
+        <td>{{ user.staffCost }}</td>
33
+      </tr>
34
+      <tr>
35
+        <td :rowspan="carLen" class="head">车辆</td>
36
+        <td class="head">车牌号</td>
37
+        <td class="head">油耗</td>
38
+        <td class="head">总里程</td>
39
+        <td class="head">折旧成天(天)</td>
40
+        <td class="head">预算天数</td>
41
+        <td class="head">金额</td>
42
+      </tr>
43
+      <tr v-for="car,index in chooseCar" :key="index">
44
+        <td>{{ car.licensePlate }}</td>
45
+        <td>{{ car.mileage }}</td>
46
+        <td>{{ car.distance }}</td>
47
+        <td>{{ car.dayCost }}</td>
48
+        <td>{{ car.days }}</td>
49
+        <td>{{ car.expense }}</td>
50
+      </tr>
51
+      <tr>
52
+        <td :rowspan="deviceLen" class="head">设备</td>
53
+        <td class="head">设备名称</td>
54
+        <td class="head">规格型号</td>
55
+        <td class="head">品牌</td>
56
+        <td class="head">折旧成本(天)</td>
57
+        <td class="head">预算天数</td>
58
+        <td class="head">金额</td>
59
+      </tr>
60
+      <tr v-for="device,index in chooseDevice" :key="index">
61
+        <td>{{ device.name }}</td>
62
+        <td>{{ device.series }}</td>
63
+        <td>{{ device.brand }}</td>
64
+        <td>{{ device.dayCost }}</td>
65
+        <td>{{ device.days }}</td>
66
+        <td>{{ device.depreciation }}</td>
67
+      </tr>
68
+      <tr>
69
+        <td colspan="6" class="head">固定成本小计</td>
70
+        <td>{{ budgetForm.fixCost }}</td>
71
+      </tr>
72
+      <tr>
73
+        <td :rowspan="workLen" class="head">预计结算金额</td>
74
+        <td class="head">工作内容</td>
75
+        <td class="head">比例尺</td>
76
+        <td class="head">总工作量</td>
77
+        <td class="head">单价</td>
78
+        <td class="head">系数</td>
79
+        <td class="head">金额</td>
80
+      </tr>
81
+      <tr v-for="(work, index) in workList" :key="'work' + index">
82
+        <td>{{ work.content }}</td>
83
+        <td>{{ work.scale }}</td>
84
+        <td>{{ work.workload }}</td>
85
+        <td>{{ work.price }}</td>
86
+        <td>{{ work.coefficient }}</td>
87
+        <td>{{ work.settle }}</td>
88
+      </tr>
89
+      <tr>
90
+        <td colspan="5" class="head">外协费用</td>
91
+        <td>{{ budgetForm.outExpense }}</td>
92
+      </tr>
93
+      <tr>
94
+        <td colspan="5" class="head">商务费用</td>
95
+        <td>{{ budgetForm.businessExpense }}</td>
96
+      </tr>
97
+      <tr>
98
+        <td colspan="5" class="head">车船租赁</td>
99
+        <td>{{ budgetForm.rentExpense }}</td>
100
+      </tr>
101
+      <tr>
102
+        <td colspan="5" class="head">其他费用</td>
103
+        <td>{{ budgetForm.otherExpense }}</td>
104
+      </tr>
105
+      <tr>
106
+        <td colspan="6" class="head">直接成本小计</td>
107
+        <td>{{ budgetForm.directExpense }}</td>
108
+      </tr>
109
+      <tr>
110
+        <td colspan="6" class="head">总成本=(固定成本+直接成本)*120%</td>
111
+        <td>{{ budgetForm.totalBudget }}</td>
112
+      </tr>
113
+      <!-- <tr>
114
+        <td class="head">编制人</td>
115
+        <td colspan="2">{{  }}</td>
116
+        <td class="head">审核人</td>
117
+        <td colspan="3"></td>
118
+      </tr> -->
119
+    </table>
120
+  </div>
121
+</template>
122
+
123
+<script>
124
+import { listBudget } from "@/api/oa/budget/budget";
125
+import { listBudgetCar, getBudgetCar } from "@/api/oa/budget/budgetCar";
126
+import { listBudgetDevice, getBudgetDevice } from "@/api/oa/budget/budgetDevice";
127
+import { listBudgetSettle, getBudgetSettle } from "@/api/oa/budget/budgetSettle";
128
+import { listBudgetStaff, getBudgetStaff } from "@/api/oa/budget/budgetStaff";
129
+export default {
130
+  props: {
131
+    taskForm: {
132
+      type: Object,
133
+      require: true
134
+    }
135
+  },
136
+  data() {
137
+    return {
138
+      projectId: '',
139
+      budgetForm: {},
140
+      projectForm: {},
141
+      userLen: 1,
142
+      carLen: 1,
143
+      deviceLen: 1,
144
+      workLen: 1,
145
+      totalBudget: 0,
146
+      chooseCar: [],
147
+      chooseDevice: [],
148
+      chooseUser: [],
149
+      workList: []
150
+    };
151
+  },
152
+  created() {
153
+    this.initBudgetForm();
154
+    this.userLen = this.chooseUser.length + 1;
155
+    this.carLen = this.chooseCar.length + 1;
156
+    this.deviceLen = this.chooseDevice.length + 1;
157
+    this.workLen = this.workList.length + 5;
158
+    this.totalBudget = (
159
+      (Number(this.budgetForm.directExpense) + Number(this.budgetForm.fixCost)) *
160
+      1.2
161
+    ).toFixed(2);
162
+  },
163
+  methods: {
164
+    initBudgetForm() {
165
+      listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }).then(res => {
166
+        console.log(res);
167
+        this.budgetForm = res.rows[0];
168
+        listBudgetDevice({ pageNum: 1, pageSize: 20, budgetId: this.budgetForm.budgetId }).then(res => {
169
+          console.log(res);
170
+          this.chooseDevice = res.rows;
171
+        })
172
+        listBudgetStaff({ pageNum: 1, pageSize: 20, budgetId: this.budgetForm.budgetId }).then(result => {
173
+          console.log(result);
174
+        })
175
+      });
176
+    },
177
+
178
+  },
179
+};
180
+</script>
181
+
182
+<style lang="scss" scoped></style>

+ 2
- 2
oa-ui/src/views/flowable/form/projectProcess/addproject.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-27 14:49:15
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-04-08 11:36:23
5
+ * @LastEditTime: 2024-04-08 13:47:45
6 6
 -->
7 7
 
8 8
 <template>
@@ -175,7 +175,7 @@ export default {
175 175
       this.addForm.projectRegistrant = this.userId;
176 176
       this.addForm.projectRegistrantUser.nickName = this.name;
177 177
     }
178
-    this.getList();
178
+    // this.getList();
179 179
   },
180 180
   mounted() { },
181 181
   methods: {

+ 9
- 5
oa-ui/src/views/flowable/form/projectProcess/arrangeProject.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-19 09:24:06
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-04-08 11:36:16
5
+ * @LastEditTime: 2024-04-08 14:11:02
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -102,13 +102,17 @@ export default {
102 102
     }
103 103
   },
104 104
   created() {
105
-    this.initForm();
106
-    // this.form.projectId = this.taskForm.formId;
107
-    this.getDeptList();
108
-    this.getUserList();
105
+    debugger
106
+    if (this.$route.query.taskName != '项目登记') {
107
+      this.initForm();
108
+      // this.form.projectId = this.taskForm.formId;
109
+      this.getDeptList();
110
+      this.getUserList();
111
+    }
109 112
   },
110 113
   methods: {
111 114
     initForm() {
115
+      debugger
112 116
       getProject(this.$route.query.formId).then(res => {
113 117
         this.form = res.data;
114 118
         if (this.form.undertakingDept != null && this.form.undertakingDept != "" && this.form.undertakingDept != undefined) {

+ 42
- 0
oa-ui/src/views/flowable/form/projectProcess/businessReview.vue 查看文件

@@ -0,0 +1,42 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2024-04-08 13:56:14
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-04-08 14:08:27
6
+-->
7
+<template>
8
+  <div class="app-container">
9
+    <el-form :model="form" :rules="rules" label-width="100px" :disabled="disabled">
10
+      
11
+    </el-form>
12
+  </div>
13
+</template>
14
+
15
+<script>
16
+export default {
17
+  props: {
18
+    disabled: {
19
+      type: Boolean,
20
+      require: true,
21
+    },
22
+    taskForm: {
23
+      type: Object,
24
+      required: true,
25
+    },
26
+  },
27
+  data() {
28
+    return {
29
+      form:{},
30
+      rules:{}
31
+    }
32
+  },
33
+  created() {
34
+
35
+  },
36
+  methods: {
37
+    
38
+  },
39
+}
40
+</script>
41
+
42
+<style lang="scss" scoped></style>

+ 6
- 6
oa-ui/src/views/flowable/form/projectProcess/index.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-27 14:49:15
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-04-08 11:45:07
5
+ * @LastEditTime: 2024-04-08 14:01:51
6 6
 -->
7 7
 
8 8
 <template>
@@ -15,6 +15,9 @@
15 15
           </el-tab-pane>
16 16
           <el-tab-pane label="项目安排" name="项目安排">
17 17
             <arrangeProject :taskForm="taskForm" :disabled="taskName != '项目安排'" @goBack="goBack"></arrangeProject>
18
+          </el-tab-pane>
19
+          <el-tab-pane label="项目预算" name="项目预算">
20
+            
18 21
           </el-tab-pane>
19 22
           <el-tab-pane label="经营审核" name="经营审核"></el-tab-pane>
20 23
           <el-tab-pane label="分管审核" name="分管审核"></el-tab-pane>
@@ -43,6 +46,7 @@ import { listDept } from '@/api/system/dept'
43 46
 import { listUser, getUser } from '@/api/system/user'
44 47
 import addproject from "./addproject.vue"
45 48
 import arrangeProject from "./arrangeProject.vue"
49
+import businessReview from "./businessReview.vue"
46 50
 import flow from '@/views/flowable/task/todo/detail/flow'
47 51
 import { flowXmlAndNode } from "@/api/flowable/definition";
48 52
 export default {
@@ -54,11 +58,7 @@ export default {
54 58
       type: Object,
55 59
     }
56 60
   },
57
-  components: {
58
-    addproject,
59
-    arrangeProject,
60
-    flow
61
-  },
61
+  components: { addproject, arrangeProject, businessReview, flow },
62 62
   data() {
63 63
     return {
64 64
       activeName: '项目登记',

+ 4
- 2
oa-ui/src/views/flowable/task/todo/detail/index.vue 查看文件

@@ -30,7 +30,7 @@
30 30
             @goBack="goBack"></device-form>
31 31
           <project-process :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目流转'"
32 32
             @goBack="goBack"></project-process>
33
-          <add-budget :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目预算'" @goBack="goBack"></add-budget>
33
+          <budget-index :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目预算'" @goBack="goBack"></budget-index>
34 34
           <borrow-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '借款审批'" @goBack="goBack"></borrow-form>
35 35
           <safe-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '安全交底'" @goBack="goBack"></safe-form>
36 36
           <el-row type="flex" justify="center" v-show="isShowApprove()">
@@ -183,6 +183,7 @@ import projectProcess from "@/views/flowable/form/projectProcess/index.vue"
183 183
 import AddBudget from '@/views/oa/budget/addBudget.vue';
184 184
 import borrowForm from '@/views/flowable/form/borrowForm.vue';
185 185
 import safeForm from '@/views/flowable/form/safeForm.vue';
186
+import budgetIndex from '../../../form/budget/budget.vue';
186 187
 
187 188
 export default {
188 189
   name: "Record",
@@ -202,7 +203,8 @@ export default {
202 203
     projectProcess,
203 204
     AddBudget,
204 205
     borrowForm,
205
-    safeForm
206
+    safeForm,
207
+    budgetIndex
206 208
   },
207 209
   props: {},
208 210
   data() {

+ 0
- 329
oa-ui/src/views/oa/budget/car.vue 查看文件

@@ -1,329 +0,0 @@
1
-<template>
2
-  <div class="app-container">
3
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
-      <el-form-item label="预算id" prop="budgetId">
5
-        <el-input
6
-          v-model="queryParams.budgetId"
7
-          placeholder="请输入预算id"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
11
-      </el-form-item>
12
-      <el-form-item label="车辆id" prop="carId">
13
-        <el-input
14
-          v-model="queryParams.carId"
15
-          placeholder="请输入车辆id"
16
-          clearable
17
-          @keyup.enter.native="handleQuery"
18
-        />
19
-      </el-form-item>
20
-      <el-form-item label="天数" prop="days">
21
-        <el-input
22
-          v-model="queryParams.days"
23
-          placeholder="请输入天数"
24
-          clearable
25
-          @keyup.enter.native="handleQuery"
26
-        />
27
-      </el-form-item>
28
-      <el-form-item label="折旧成本" prop="depreciation">
29
-        <el-input
30
-          v-model="queryParams.depreciation"
31
-          placeholder="请输入折旧成本"
32
-          clearable
33
-          @keyup.enter.native="handleQuery"
34
-        />
35
-      </el-form-item>
36
-      <el-form-item label="距离" prop="distance">
37
-        <el-input
38
-          v-model="queryParams.distance"
39
-          placeholder="请输入距离"
40
-          clearable
41
-          @keyup.enter.native="handleQuery"
42
-        />
43
-      </el-form-item>
44
-      <el-form-item label="油耗" prop="mileage">
45
-        <el-input
46
-          v-model="queryParams.mileage"
47
-          placeholder="请输入油耗"
48
-          clearable
49
-          @keyup.enter.native="handleQuery"
50
-        />
51
-      </el-form-item>
52
-      <el-form-item label="使用成本" prop="expense">
53
-        <el-input
54
-          v-model="queryParams.expense"
55
-          placeholder="请输入使用成本"
56
-          clearable
57
-          @keyup.enter.native="handleQuery"
58
-        />
59
-      </el-form-item>
60
-      <el-form-item>
61
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
62
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
63
-      </el-form-item>
64
-    </el-form>
65
-
66
-    <el-row :gutter="10" class="mb8">
67
-      <el-col :span="1.5">
68
-        <el-button
69
-          type="primary"
70
-          plain
71
-          icon="el-icon-plus"
72
-          size="mini"
73
-          @click="handleAdd"
74
-          v-hasPermi="['oa:budgetCar:add']"
75
-        >新增</el-button>
76
-      </el-col>
77
-      <el-col :span="1.5">
78
-        <el-button
79
-          type="success"
80
-          plain
81
-          icon="el-icon-edit"
82
-          size="mini"
83
-          :disabled="single"
84
-          @click="handleUpdate"
85
-          v-hasPermi="['oa:budgetCar:edit']"
86
-        >修改</el-button>
87
-      </el-col>
88
-      <el-col :span="1.5">
89
-        <el-button
90
-          type="danger"
91
-          plain
92
-          icon="el-icon-delete"
93
-          size="mini"
94
-          :disabled="multiple"
95
-          @click="handleDelete"
96
-          v-hasPermi="['oa:budgetCar:remove']"
97
-        >删除</el-button>
98
-      </el-col>
99
-      <el-col :span="1.5">
100
-        <el-button
101
-          type="warning"
102
-          plain
103
-          icon="el-icon-download"
104
-          size="mini"
105
-          @click="handleExport"
106
-          v-hasPermi="['oa:budgetCar:export']"
107
-        >导出</el-button>
108
-      </el-col>
109
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
110
-    </el-row>
111
-
112
-    <el-table v-loading="loading" :data="budgetCarList" @selection-change="handleSelectionChange">
113
-      <el-table-column type="selection" width="55" align="center" />
114
-      <el-table-column label="车辆预算id" align="center" prop="budgetCarId" />
115
-      <el-table-column label="预算id" align="center" prop="budgetId" />
116
-      <el-table-column label="车辆id" align="center" prop="carId" />
117
-      <el-table-column label="天数" align="center" prop="days" />
118
-      <el-table-column label="折旧成本" align="center" prop="depreciation" />
119
-      <el-table-column label="距离" align="center" prop="distance" />
120
-      <el-table-column label="油耗" align="center" prop="mileage" />
121
-      <el-table-column label="使用成本" align="center" prop="expense" />
122
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
123
-        <template slot-scope="scope">
124
-          <el-button
125
-            size="mini"
126
-            type="text"
127
-            icon="el-icon-edit"
128
-            @click="handleUpdate(scope.row)"
129
-            v-hasPermi="['oa:budgetCar:edit']"
130
-          >修改</el-button>
131
-          <el-button
132
-            size="mini"
133
-            type="text"
134
-            icon="el-icon-delete"
135
-            @click="handleDelete(scope.row)"
136
-            v-hasPermi="['oa:budgetCar:remove']"
137
-          >删除</el-button>
138
-        </template>
139
-      </el-table-column>
140
-    </el-table>
141
-    
142
-    <pagination
143
-      v-show="total>0"
144
-      :total="total"
145
-      :page.sync="queryParams.pageNum"
146
-      :limit.sync="queryParams.pageSize"
147
-      @pagination="getList"
148
-    />
149
-
150
-    <!-- 添加或修改cmc车辆预算对话框 -->
151
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
152
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
153
-        <el-form-item label="预算id" prop="budgetId">
154
-          <el-input v-model="form.budgetId" placeholder="请输入预算id" />
155
-        </el-form-item>
156
-        <el-form-item label="车辆id" prop="carId">
157
-          <el-input v-model="form.carId" placeholder="请输入车辆id" />
158
-        </el-form-item>
159
-        <el-form-item label="天数" prop="days">
160
-          <el-input v-model="form.days" placeholder="请输入天数" />
161
-        </el-form-item>
162
-        <el-form-item label="折旧成本" prop="depreciation">
163
-          <el-input v-model="form.depreciation" placeholder="请输入折旧成本" />
164
-        </el-form-item>
165
-        <el-form-item label="距离" prop="distance">
166
-          <el-input v-model="form.distance" placeholder="请输入距离" />
167
-        </el-form-item>
168
-        <el-form-item label="油耗" prop="mileage">
169
-          <el-input v-model="form.mileage" placeholder="请输入油耗" />
170
-        </el-form-item>
171
-        <el-form-item label="使用成本" prop="expense">
172
-          <el-input v-model="form.expense" placeholder="请输入使用成本" />
173
-        </el-form-item>
174
-      </el-form>
175
-      <div slot="footer" class="dialog-footer">
176
-        <el-button type="primary" @click="submitForm">确 定</el-button>
177
-        <el-button @click="cancel">取 消</el-button>
178
-      </div>
179
-    </el-dialog>
180
-  </div>
181
-</template>
182
-
183
-<script>
184
-import { listBudgetCar, getBudgetCar, delBudgetCar, addBudgetCar, updateBudgetCar } from "@/api/oa/budget/budgetCar";
185
-
186
-export default {
187
-  name: "BudgetCar",
188
-  data() {
189
-    return {
190
-      // 遮罩层
191
-      loading: true,
192
-      // 选中数组
193
-      ids: [],
194
-      // 非单个禁用
195
-      single: true,
196
-      // 非多个禁用
197
-      multiple: true,
198
-      // 显示搜索条件
199
-      showSearch: true,
200
-      // 总条数
201
-      total: 0,
202
-      // cmc车辆预算表格数据
203
-      budgetCarList: [],
204
-      // 弹出层标题
205
-      title: "",
206
-      // 是否显示弹出层
207
-      open: false,
208
-      // 查询参数
209
-      queryParams: {
210
-        pageNum: 1,
211
-        pageSize: 10,
212
-        budgetId: null,
213
-        carId: null,
214
-        days: null,
215
-        depreciation: null,
216
-        distance: null,
217
-        mileage: null,
218
-        expense: null
219
-      },
220
-      // 表单参数
221
-      form: {},
222
-      // 表单校验
223
-      rules: {
224
-      }
225
-    };
226
-  },
227
-  created() {
228
-    this.getList();
229
-  },
230
-  methods: {
231
-    /** 查询cmc车辆预算列表 */
232
-    getList() {
233
-      this.loading = true;
234
-      listBudgetCar(this.queryParams).then(response => {
235
-        this.budgetCarList = response.rows;
236
-        this.total = response.total;
237
-        this.loading = false;
238
-      });
239
-    },
240
-    // 取消按钮
241
-    cancel() {
242
-      this.open = false;
243
-      this.reset();
244
-    },
245
-    // 表单重置
246
-    reset() {
247
-      this.form = {
248
-        budgetCarId: null,
249
-        budgetId: null,
250
-        carId: null,
251
-        days: null,
252
-        depreciation: null,
253
-        distance: null,
254
-        mileage: null,
255
-        expense: null
256
-      };
257
-      this.resetForm("form");
258
-    },
259
-    /** 搜索按钮操作 */
260
-    handleQuery() {
261
-      this.queryParams.pageNum = 1;
262
-      this.getList();
263
-    },
264
-    /** 重置按钮操作 */
265
-    resetQuery() {
266
-      this.resetForm("queryForm");
267
-      this.handleQuery();
268
-    },
269
-    // 多选框选中数据
270
-    handleSelectionChange(selection) {
271
-      this.ids = selection.map(item => item.budgetCarId)
272
-      this.single = selection.length!==1
273
-      this.multiple = !selection.length
274
-    },
275
-    /** 新增按钮操作 */
276
-    handleAdd() {
277
-      this.reset();
278
-      this.open = true;
279
-      this.title = "添加cmc车辆预算";
280
-    },
281
-    /** 修改按钮操作 */
282
-    handleUpdate(row) {
283
-      this.reset();
284
-      const budgetCarId = row.budgetCarId || this.ids
285
-      getBudgetCar(budgetCarId).then(response => {
286
-        this.form = response.data;
287
-        this.open = true;
288
-        this.title = "修改cmc车辆预算";
289
-      });
290
-    },
291
-    /** 提交按钮 */
292
-    submitForm() {
293
-      this.$refs["form"].validate(valid => {
294
-        if (valid) {
295
-          if (this.form.budgetCarId != null) {
296
-            updateBudgetCar(this.form).then(response => {
297
-              this.$modal.msgSuccess("修改成功");
298
-              this.open = false;
299
-              this.getList();
300
-            });
301
-          } else {
302
-            addBudgetCar(this.form).then(response => {
303
-              this.$modal.msgSuccess("新增成功");
304
-              this.open = false;
305
-              this.getList();
306
-            });
307
-          }
308
-        }
309
-      });
310
-    },
311
-    /** 删除按钮操作 */
312
-    handleDelete(row) {
313
-      const budgetCarIds = row.budgetCarId || this.ids;
314
-      this.$modal.confirm('是否确认删除cmc车辆预算编号为"' + budgetCarIds + '"的数据项?').then(function() {
315
-        return delBudgetCar(budgetCarIds);
316
-      }).then(() => {
317
-        this.getList();
318
-        this.$modal.msgSuccess("删除成功");
319
-      }).catch(() => {});
320
-    },
321
-    /** 导出按钮操作 */
322
-    handleExport() {
323
-      this.download('oa/budgetCar/export', {
324
-        ...this.queryParams
325
-      }, `budgetCar_${new Date().getTime()}.xlsx`)
326
-    }
327
-  }
328
-};
329
-</script>

+ 4
- 3
oa-ui/src/views/oa/budget/components/budgetTable.vue 查看文件

@@ -8,7 +8,7 @@
8 8
         <td class="head">项目编号</td>
9 9
         <td colspan="2">{{ projectForm.projectNumber }}</td>
10 10
       </tr>
11
-      <tr>
11
+      <tr v-if="userLen != 1">
12 12
         <td :rowspan="userLen" class="head">人员</td>
13 13
         <td class="head">姓名</td>
14 14
         <td class="head">岗位工资</td>
@@ -25,7 +25,7 @@
25 25
         <td>{{ user.days }}</td>
26 26
         <td>{{ user.staffCost }}</td>
27 27
       </tr>
28
-      <tr>
28
+      <tr v-if="carLen != 1">
29 29
         <td :rowspan="carLen" class="head">车辆</td>
30 30
         <td class="head">车牌号</td>
31 31
         <td class="head">油耗</td>
@@ -42,7 +42,7 @@
42 42
         <td>{{ car.days }}</td>
43 43
         <td>{{ car.expense }}</td>
44 44
       </tr>
45
-      <tr>
45
+      <tr v-if="deviceLen != 1">
46 46
         <td :rowspan="deviceLen" class="head">设备</td>
47 47
         <td class="head">设备名称</td>
48 48
         <td class="head">规格型号</td>
@@ -171,5 +171,6 @@ export default {
171 171
   // background-color: var(--current-color);
172 172
   // opacity: 0.5;
173 173
   // color: #fff;
174
+  font-weight: bold;
174 175
 }
175 176
 </style>

+ 0
- 287
oa-ui/src/views/oa/budget/device.vue 查看文件

@@ -1,287 +0,0 @@
1
-<template>
2
-  <div class="app-container">
3
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
-      <el-form-item label="预算id" prop="budgetId">
5
-        <el-input
6
-          v-model="queryParams.budgetId"
7
-          placeholder="请输入预算id"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
11
-      </el-form-item>
12
-      <el-form-item label="设备id" prop="deviceId">
13
-        <el-input
14
-          v-model="queryParams.deviceId"
15
-          placeholder="请输入设备id"
16
-          clearable
17
-          @keyup.enter.native="handleQuery"
18
-        />
19
-      </el-form-item>
20
-      <el-form-item label="天数" prop="days">
21
-        <el-input
22
-          v-model="queryParams.days"
23
-          placeholder="请输入天数"
24
-          clearable
25
-          @keyup.enter.native="handleQuery"
26
-        />
27
-      </el-form-item>
28
-      <el-form-item label="折旧成本" prop="depreciation">
29
-        <el-input
30
-          v-model="queryParams.depreciation"
31
-          placeholder="请输入折旧成本"
32
-          clearable
33
-          @keyup.enter.native="handleQuery"
34
-        />
35
-      </el-form-item>
36
-      <el-form-item>
37
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
38
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
39
-      </el-form-item>
40
-    </el-form>
41
-
42
-    <el-row :gutter="10" class="mb8">
43
-      <el-col :span="1.5">
44
-        <el-button
45
-          type="primary"
46
-          plain
47
-          icon="el-icon-plus"
48
-          size="mini"
49
-          @click="handleAdd"
50
-          v-hasPermi="['oa:budgetDevice:add']"
51
-        >新增</el-button>
52
-      </el-col>
53
-      <el-col :span="1.5">
54
-        <el-button
55
-          type="success"
56
-          plain
57
-          icon="el-icon-edit"
58
-          size="mini"
59
-          :disabled="single"
60
-          @click="handleUpdate"
61
-          v-hasPermi="['oa:budgetDevice:edit']"
62
-        >修改</el-button>
63
-      </el-col>
64
-      <el-col :span="1.5">
65
-        <el-button
66
-          type="danger"
67
-          plain
68
-          icon="el-icon-delete"
69
-          size="mini"
70
-          :disabled="multiple"
71
-          @click="handleDelete"
72
-          v-hasPermi="['oa:budgetDevice:remove']"
73
-        >删除</el-button>
74
-      </el-col>
75
-      <el-col :span="1.5">
76
-        <el-button
77
-          type="warning"
78
-          plain
79
-          icon="el-icon-download"
80
-          size="mini"
81
-          @click="handleExport"
82
-          v-hasPermi="['oa:budgetDevice:export']"
83
-        >导出</el-button>
84
-      </el-col>
85
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
86
-    </el-row>
87
-
88
-    <el-table v-loading="loading" :data="budgetDeviceList" @selection-change="handleSelectionChange">
89
-      <el-table-column type="selection" width="55" align="center" />
90
-      <el-table-column label="设备预算id" align="center" prop="budgetDeviceId" />
91
-      <el-table-column label="预算id" align="center" prop="budgetId" />
92
-      <el-table-column label="设备id" align="center" prop="deviceId" />
93
-      <el-table-column label="天数" align="center" prop="days" />
94
-      <el-table-column label="折旧成本" align="center" prop="depreciation" />
95
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
96
-        <template slot-scope="scope">
97
-          <el-button
98
-            size="mini"
99
-            type="text"
100
-            icon="el-icon-edit"
101
-            @click="handleUpdate(scope.row)"
102
-            v-hasPermi="['oa:budgetDevice:edit']"
103
-          >修改</el-button>
104
-          <el-button
105
-            size="mini"
106
-            type="text"
107
-            icon="el-icon-delete"
108
-            @click="handleDelete(scope.row)"
109
-            v-hasPermi="['oa:budgetDevice:remove']"
110
-          >删除</el-button>
111
-        </template>
112
-      </el-table-column>
113
-    </el-table>
114
-    
115
-    <pagination
116
-      v-show="total>0"
117
-      :total="total"
118
-      :page.sync="queryParams.pageNum"
119
-      :limit.sync="queryParams.pageSize"
120
-      @pagination="getList"
121
-    />
122
-
123
-    <!-- 添加或修改cmc设备预算对话框 -->
124
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
125
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
126
-        <el-form-item label="预算id" prop="budgetId">
127
-          <el-input v-model="form.budgetId" placeholder="请输入预算id" />
128
-        </el-form-item>
129
-        <el-form-item label="设备id" prop="deviceId">
130
-          <el-input v-model="form.deviceId" placeholder="请输入设备id" />
131
-        </el-form-item>
132
-        <el-form-item label="天数" prop="days">
133
-          <el-input v-model="form.days" placeholder="请输入天数" />
134
-        </el-form-item>
135
-        <el-form-item label="折旧成本" prop="depreciation">
136
-          <el-input v-model="form.depreciation" placeholder="请输入折旧成本" />
137
-        </el-form-item>
138
-      </el-form>
139
-      <div slot="footer" class="dialog-footer">
140
-        <el-button type="primary" @click="submitForm">确 定</el-button>
141
-        <el-button @click="cancel">取 消</el-button>
142
-      </div>
143
-    </el-dialog>
144
-  </div>
145
-</template>
146
-
147
-<script>
148
-import { listBudgetDevice, getBudgetDevice, delBudgetDevice, addBudgetDevice, updateBudgetDevice } from "@/api/oa/budget/budgetDevice";
149
-
150
-export default {
151
-  name: "BudgetDevice",
152
-  data() {
153
-    return {
154
-      // 遮罩层
155
-      loading: true,
156
-      // 选中数组
157
-      ids: [],
158
-      // 非单个禁用
159
-      single: true,
160
-      // 非多个禁用
161
-      multiple: true,
162
-      // 显示搜索条件
163
-      showSearch: true,
164
-      // 总条数
165
-      total: 0,
166
-      // cmc设备预算表格数据
167
-      budgetDeviceList: [],
168
-      // 弹出层标题
169
-      title: "",
170
-      // 是否显示弹出层
171
-      open: false,
172
-      // 查询参数
173
-      queryParams: {
174
-        pageNum: 1,
175
-        pageSize: 10,
176
-        budgetId: null,
177
-        deviceId: null,
178
-        days: null,
179
-        depreciation: null
180
-      },
181
-      // 表单参数
182
-      form: {},
183
-      // 表单校验
184
-      rules: {
185
-      }
186
-    };
187
-  },
188
-  created() {
189
-    this.getList();
190
-  },
191
-  methods: {
192
-    /** 查询cmc设备预算列表 */
193
-    getList() {
194
-      this.loading = true;
195
-      listBudgetDevice(this.queryParams).then(response => {
196
-        this.budgetDeviceList = response.rows;
197
-        this.total = response.total;
198
-        this.loading = false;
199
-      });
200
-    },
201
-    // 取消按钮
202
-    cancel() {
203
-      this.open = false;
204
-      this.reset();
205
-    },
206
-    // 表单重置
207
-    reset() {
208
-      this.form = {
209
-        budgetDeviceId: null,
210
-        budgetId: null,
211
-        deviceId: null,
212
-        days: null,
213
-        depreciation: null
214
-      };
215
-      this.resetForm("form");
216
-    },
217
-    /** 搜索按钮操作 */
218
-    handleQuery() {
219
-      this.queryParams.pageNum = 1;
220
-      this.getList();
221
-    },
222
-    /** 重置按钮操作 */
223
-    resetQuery() {
224
-      this.resetForm("queryForm");
225
-      this.handleQuery();
226
-    },
227
-    // 多选框选中数据
228
-    handleSelectionChange(selection) {
229
-      this.ids = selection.map(item => item.budgetDeviceId)
230
-      this.single = selection.length!==1
231
-      this.multiple = !selection.length
232
-    },
233
-    /** 新增按钮操作 */
234
-    handleAdd() {
235
-      this.reset();
236
-      this.open = true;
237
-      this.title = "添加cmc设备预算";
238
-    },
239
-    /** 修改按钮操作 */
240
-    handleUpdate(row) {
241
-      this.reset();
242
-      const budgetDeviceId = row.budgetDeviceId || this.ids
243
-      getBudgetDevice(budgetDeviceId).then(response => {
244
-        this.form = response.data;
245
-        this.open = true;
246
-        this.title = "修改cmc设备预算";
247
-      });
248
-    },
249
-    /** 提交按钮 */
250
-    submitForm() {
251
-      this.$refs["form"].validate(valid => {
252
-        if (valid) {
253
-          if (this.form.budgetDeviceId != null) {
254
-            updateBudgetDevice(this.form).then(response => {
255
-              this.$modal.msgSuccess("修改成功");
256
-              this.open = false;
257
-              this.getList();
258
-            });
259
-          } else {
260
-            addBudgetDevice(this.form).then(response => {
261
-              this.$modal.msgSuccess("新增成功");
262
-              this.open = false;
263
-              this.getList();
264
-            });
265
-          }
266
-        }
267
-      });
268
-    },
269
-    /** 删除按钮操作 */
270
-    handleDelete(row) {
271
-      const budgetDeviceIds = row.budgetDeviceId || this.ids;
272
-      this.$modal.confirm('是否确认删除cmc设备预算编号为"' + budgetDeviceIds + '"的数据项?').then(function() {
273
-        return delBudgetDevice(budgetDeviceIds);
274
-      }).then(() => {
275
-        this.getList();
276
-        this.$modal.msgSuccess("删除成功");
277
-      }).catch(() => {});
278
-    },
279
-    /** 导出按钮操作 */
280
-    handleExport() {
281
-      this.download('oa/budgetDevice/export', {
282
-        ...this.queryParams
283
-      }, `budgetDevice_${new Date().getTime()}.xlsx`)
284
-    }
285
-  }
286
-};
287
-</script>

+ 0
- 301
oa-ui/src/views/oa/budget/settle.vue 查看文件

@@ -1,301 +0,0 @@
1
-<template>
2
-  <div class="app-container">
3
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
-      <el-form-item label="预算id" prop="budgetId">
5
-        <el-input
6
-          v-model="queryParams.budgetId"
7
-          placeholder="请输入预算id"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
11
-      </el-form-item>
12
-      <el-form-item label="结算单价id" prop="priceId">
13
-        <el-input
14
-          v-model="queryParams.priceId"
15
-          placeholder="请输入结算单价id"
16
-          clearable
17
-          @keyup.enter.native="handleQuery"
18
-        />
19
-      </el-form-item>
20
-      <el-form-item label="工作量" prop="workload">
21
-        <el-input
22
-          v-model="queryParams.workload"
23
-          placeholder="请输入工作量"
24
-          clearable
25
-          @keyup.enter.native="handleQuery"
26
-        />
27
-      </el-form-item>
28
-      <el-form-item label="系数" prop="coefficient">
29
-        <el-input
30
-          v-model="queryParams.coefficient"
31
-          placeholder="请输入系数"
32
-          clearable
33
-          @keyup.enter.native="handleQuery"
34
-        />
35
-      </el-form-item>
36
-      <el-form-item label="结算金额" prop="settle">
37
-        <el-input
38
-          v-model="queryParams.settle"
39
-          placeholder="请输入结算金额"
40
-          clearable
41
-          @keyup.enter.native="handleQuery"
42
-        />
43
-      </el-form-item>
44
-      <el-form-item>
45
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
46
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
47
-      </el-form-item>
48
-    </el-form>
49
-
50
-    <el-row :gutter="10" class="mb8">
51
-      <el-col :span="1.5">
52
-        <el-button
53
-          type="primary"
54
-          plain
55
-          icon="el-icon-plus"
56
-          size="mini"
57
-          @click="handleAdd"
58
-          v-hasPermi="['oa:budgetSettle:add']"
59
-        >新增</el-button>
60
-      </el-col>
61
-      <el-col :span="1.5">
62
-        <el-button
63
-          type="success"
64
-          plain
65
-          icon="el-icon-edit"
66
-          size="mini"
67
-          :disabled="single"
68
-          @click="handleUpdate"
69
-          v-hasPermi="['oa:budgetSettle:edit']"
70
-        >修改</el-button>
71
-      </el-col>
72
-      <el-col :span="1.5">
73
-        <el-button
74
-          type="danger"
75
-          plain
76
-          icon="el-icon-delete"
77
-          size="mini"
78
-          :disabled="multiple"
79
-          @click="handleDelete"
80
-          v-hasPermi="['oa:budgetSettle:remove']"
81
-        >删除</el-button>
82
-      </el-col>
83
-      <el-col :span="1.5">
84
-        <el-button
85
-          type="warning"
86
-          plain
87
-          icon="el-icon-download"
88
-          size="mini"
89
-          @click="handleExport"
90
-          v-hasPermi="['oa:budgetSettle:export']"
91
-        >导出</el-button>
92
-      </el-col>
93
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
94
-    </el-row>
95
-
96
-    <el-table v-loading="loading" :data="budgetSettleList" @selection-change="handleSelectionChange">
97
-      <el-table-column type="selection" width="55" align="center" />
98
-      <el-table-column label="预结算id" align="center" prop="budgetSettleId" />
99
-      <el-table-column label="预算id" align="center" prop="budgetId" />
100
-      <el-table-column label="结算单价id" align="center" prop="priceId" />
101
-      <el-table-column label="工作量" align="center" prop="workload" />
102
-      <el-table-column label="系数" align="center" prop="coefficient" />
103
-      <el-table-column label="结算金额" align="center" prop="settle" />
104
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
105
-        <template slot-scope="scope">
106
-          <el-button
107
-            size="mini"
108
-            type="text"
109
-            icon="el-icon-edit"
110
-            @click="handleUpdate(scope.row)"
111
-            v-hasPermi="['oa:budgetSettle:edit']"
112
-          >修改</el-button>
113
-          <el-button
114
-            size="mini"
115
-            type="text"
116
-            icon="el-icon-delete"
117
-            @click="handleDelete(scope.row)"
118
-            v-hasPermi="['oa:budgetSettle:remove']"
119
-          >删除</el-button>
120
-        </template>
121
-      </el-table-column>
122
-    </el-table>
123
-    
124
-    <pagination
125
-      v-show="total>0"
126
-      :total="total"
127
-      :page.sync="queryParams.pageNum"
128
-      :limit.sync="queryParams.pageSize"
129
-      @pagination="getList"
130
-    />
131
-
132
-    <!-- 添加或修改cmc预结算对话框 -->
133
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
134
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
135
-        <el-form-item label="预算id" prop="budgetId">
136
-          <el-input v-model="form.budgetId" placeholder="请输入预算id" />
137
-        </el-form-item>
138
-        <el-form-item label="结算单价id" prop="priceId">
139
-          <el-input v-model="form.priceId" placeholder="请输入结算单价id" />
140
-        </el-form-item>
141
-        <el-form-item label="工作量" prop="workload">
142
-          <el-input v-model="form.workload" placeholder="请输入工作量" />
143
-        </el-form-item>
144
-        <el-form-item label="系数" prop="coefficient">
145
-          <el-input v-model="form.coefficient" placeholder="请输入系数" />
146
-        </el-form-item>
147
-        <el-form-item label="结算金额" prop="settle">
148
-          <el-input v-model="form.settle" placeholder="请输入结算金额" />
149
-        </el-form-item>
150
-      </el-form>
151
-      <div slot="footer" class="dialog-footer">
152
-        <el-button type="primary" @click="submitForm">确 定</el-button>
153
-        <el-button @click="cancel">取 消</el-button>
154
-      </div>
155
-    </el-dialog>
156
-  </div>
157
-</template>
158
-
159
-<script>
160
-import { listBudgetSettle, getBudgetSettle, delBudgetSettle, addBudgetSettle, updateBudgetSettle } from "@/api/oa/budget/budgetSettle";
161
-
162
-export default {
163
-  name: "BudgetSettle",
164
-  data() {
165
-    return {
166
-      // 遮罩层
167
-      loading: true,
168
-      // 选中数组
169
-      ids: [],
170
-      // 非单个禁用
171
-      single: true,
172
-      // 非多个禁用
173
-      multiple: true,
174
-      // 显示搜索条件
175
-      showSearch: true,
176
-      // 总条数
177
-      total: 0,
178
-      // cmc预结算表格数据
179
-      budgetSettleList: [],
180
-      // 弹出层标题
181
-      title: "",
182
-      // 是否显示弹出层
183
-      open: false,
184
-      // 查询参数
185
-      queryParams: {
186
-        pageNum: 1,
187
-        pageSize: 10,
188
-        budgetId: null,
189
-        priceId: null,
190
-        workload: null,
191
-        coefficient: null,
192
-        settle: null
193
-      },
194
-      // 表单参数
195
-      form: {},
196
-      // 表单校验
197
-      rules: {
198
-      }
199
-    };
200
-  },
201
-  created() {
202
-    this.getList();
203
-  },
204
-  methods: {
205
-    /** 查询cmc预结算列表 */
206
-    getList() {
207
-      this.loading = true;
208
-      listBudgetSettle(this.queryParams).then(response => {
209
-        this.budgetSettleList = response.rows;
210
-        this.total = response.total;
211
-        this.loading = false;
212
-      });
213
-    },
214
-    // 取消按钮
215
-    cancel() {
216
-      this.open = false;
217
-      this.reset();
218
-    },
219
-    // 表单重置
220
-    reset() {
221
-      this.form = {
222
-        budgetSettleId: null,
223
-        budgetId: null,
224
-        priceId: null,
225
-        workload: null,
226
-        coefficient: null,
227
-        settle: null
228
-      };
229
-      this.resetForm("form");
230
-    },
231
-    /** 搜索按钮操作 */
232
-    handleQuery() {
233
-      this.queryParams.pageNum = 1;
234
-      this.getList();
235
-    },
236
-    /** 重置按钮操作 */
237
-    resetQuery() {
238
-      this.resetForm("queryForm");
239
-      this.handleQuery();
240
-    },
241
-    // 多选框选中数据
242
-    handleSelectionChange(selection) {
243
-      this.ids = selection.map(item => item.budgetSettleId)
244
-      this.single = selection.length!==1
245
-      this.multiple = !selection.length
246
-    },
247
-    /** 新增按钮操作 */
248
-    handleAdd() {
249
-      this.reset();
250
-      this.open = true;
251
-      this.title = "添加cmc预结算";
252
-    },
253
-    /** 修改按钮操作 */
254
-    handleUpdate(row) {
255
-      this.reset();
256
-      const budgetSettleId = row.budgetSettleId || this.ids
257
-      getBudgetSettle(budgetSettleId).then(response => {
258
-        this.form = response.data;
259
-        this.open = true;
260
-        this.title = "修改cmc预结算";
261
-      });
262
-    },
263
-    /** 提交按钮 */
264
-    submitForm() {
265
-      this.$refs["form"].validate(valid => {
266
-        if (valid) {
267
-          if (this.form.budgetSettleId != null) {
268
-            updateBudgetSettle(this.form).then(response => {
269
-              this.$modal.msgSuccess("修改成功");
270
-              this.open = false;
271
-              this.getList();
272
-            });
273
-          } else {
274
-            addBudgetSettle(this.form).then(response => {
275
-              this.$modal.msgSuccess("新增成功");
276
-              this.open = false;
277
-              this.getList();
278
-            });
279
-          }
280
-        }
281
-      });
282
-    },
283
-    /** 删除按钮操作 */
284
-    handleDelete(row) {
285
-      const budgetSettleIds = row.budgetSettleId || this.ids;
286
-      this.$modal.confirm('是否确认删除cmc预结算编号为"' + budgetSettleIds + '"的数据项?').then(function() {
287
-        return delBudgetSettle(budgetSettleIds);
288
-      }).then(() => {
289
-        this.getList();
290
-        this.$modal.msgSuccess("删除成功");
291
-      }).catch(() => {});
292
-    },
293
-    /** 导出按钮操作 */
294
-    handleExport() {
295
-      this.download('oa/budgetSettle/export', {
296
-        ...this.queryParams
297
-      }, `budgetSettle_${new Date().getTime()}.xlsx`)
298
-    }
299
-  }
300
-};
301
-</script>

+ 0
- 315
oa-ui/src/views/oa/budget/staff.vue 查看文件

@@ -1,315 +0,0 @@
1
-<template>
2
-  <div class="app-container">
3
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
-      <el-form-item label="预算id" prop="budgetId">
5
-        <el-input
6
-          v-model="queryParams.budgetId"
7
-          placeholder="请输入预算id"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
11
-      </el-form-item>
12
-      <el-form-item label="人员id" prop="userId">
13
-        <el-input
14
-          v-model="queryParams.userId"
15
-          placeholder="请输入人员id"
16
-          clearable
17
-          @keyup.enter.native="handleQuery"
18
-        />
19
-      </el-form-item>
20
-      <el-form-item label="天数" prop="days">
21
-        <el-input
22
-          v-model="queryParams.days"
23
-          placeholder="请输入天数"
24
-          clearable
25
-          @keyup.enter.native="handleQuery"
26
-        />
27
-      </el-form-item>
28
-      <el-form-item label="固定成本" prop="fixCost">
29
-        <el-input
30
-          v-model="queryParams.fixCost"
31
-          placeholder="请输入固定成本"
32
-          clearable
33
-          @keyup.enter.native="handleQuery"
34
-        />
35
-      </el-form-item>
36
-      <el-form-item label="进出场单价" prop="inOutPrice">
37
-        <el-input
38
-          v-model="queryParams.inOutPrice"
39
-          placeholder="请输入进出场单价"
40
-          clearable
41
-          @keyup.enter.native="handleQuery"
42
-        />
43
-      </el-form-item>
44
-      <el-form-item label="进出场费用" prop="inOutExpense">
45
-        <el-input
46
-          v-model="queryParams.inOutExpense"
47
-          placeholder="请输入进出场费用"
48
-          clearable
49
-          @keyup.enter.native="handleQuery"
50
-        />
51
-      </el-form-item>
52
-      <el-form-item>
53
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
54
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
55
-      </el-form-item>
56
-    </el-form>
57
-
58
-    <el-row :gutter="10" class="mb8">
59
-      <el-col :span="1.5">
60
-        <el-button
61
-          type="primary"
62
-          plain
63
-          icon="el-icon-plus"
64
-          size="mini"
65
-          @click="handleAdd"
66
-          v-hasPermi="['oa:budgetStaff:add']"
67
-        >新增</el-button>
68
-      </el-col>
69
-      <el-col :span="1.5">
70
-        <el-button
71
-          type="success"
72
-          plain
73
-          icon="el-icon-edit"
74
-          size="mini"
75
-          :disabled="single"
76
-          @click="handleUpdate"
77
-          v-hasPermi="['oa:budgetStaff:edit']"
78
-        >修改</el-button>
79
-      </el-col>
80
-      <el-col :span="1.5">
81
-        <el-button
82
-          type="danger"
83
-          plain
84
-          icon="el-icon-delete"
85
-          size="mini"
86
-          :disabled="multiple"
87
-          @click="handleDelete"
88
-          v-hasPermi="['oa:budgetStaff:remove']"
89
-        >删除</el-button>
90
-      </el-col>
91
-      <el-col :span="1.5">
92
-        <el-button
93
-          type="warning"
94
-          plain
95
-          icon="el-icon-download"
96
-          size="mini"
97
-          @click="handleExport"
98
-          v-hasPermi="['oa:budgetStaff:export']"
99
-        >导出</el-button>
100
-      </el-col>
101
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
102
-    </el-row>
103
-
104
-    <el-table v-loading="loading" :data="budgetStaffList" @selection-change="handleSelectionChange">
105
-      <el-table-column type="selection" width="55" align="center" />
106
-      <el-table-column label="人员预算id" align="center" prop="budgetStaffId" />
107
-      <el-table-column label="预算id" align="center" prop="budgetId" />
108
-      <el-table-column label="人员id" align="center" prop="userId" />
109
-      <el-table-column label="天数" align="center" prop="days" />
110
-      <el-table-column label="固定成本" align="center" prop="fixCost" />
111
-      <el-table-column label="进出场单价" align="center" prop="inOutPrice" />
112
-      <el-table-column label="进出场费用" align="center" prop="inOutExpense" />
113
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
114
-        <template slot-scope="scope">
115
-          <el-button
116
-            size="mini"
117
-            type="text"
118
-            icon="el-icon-edit"
119
-            @click="handleUpdate(scope.row)"
120
-            v-hasPermi="['oa:budgetStaff:edit']"
121
-          >修改</el-button>
122
-          <el-button
123
-            size="mini"
124
-            type="text"
125
-            icon="el-icon-delete"
126
-            @click="handleDelete(scope.row)"
127
-            v-hasPermi="['oa:budgetStaff:remove']"
128
-          >删除</el-button>
129
-        </template>
130
-      </el-table-column>
131
-    </el-table>
132
-    
133
-    <pagination
134
-      v-show="total>0"
135
-      :total="total"
136
-      :page.sync="queryParams.pageNum"
137
-      :limit.sync="queryParams.pageSize"
138
-      @pagination="getList"
139
-    />
140
-
141
-    <!-- 添加或修改cmc人员预算对话框 -->
142
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
143
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
144
-        <el-form-item label="预算id" prop="budgetId">
145
-          <el-input v-model="form.budgetId" placeholder="请输入预算id" />
146
-        </el-form-item>
147
-        <el-form-item label="人员id" prop="userId">
148
-          <el-input v-model="form.userId" placeholder="请输入人员id" />
149
-        </el-form-item>
150
-        <el-form-item label="天数" prop="days">
151
-          <el-input v-model="form.days" placeholder="请输入天数" />
152
-        </el-form-item>
153
-        <el-form-item label="固定成本" prop="fixCost">
154
-          <el-input v-model="form.fixCost" placeholder="请输入固定成本" />
155
-        </el-form-item>
156
-        <el-form-item label="进出场单价" prop="inOutPrice">
157
-          <el-input v-model="form.inOutPrice" placeholder="请输入进出场单价" />
158
-        </el-form-item>
159
-        <el-form-item label="进出场费用" prop="inOutExpense">
160
-          <el-input v-model="form.inOutExpense" placeholder="请输入进出场费用" />
161
-        </el-form-item>
162
-      </el-form>
163
-      <div slot="footer" class="dialog-footer">
164
-        <el-button type="primary" @click="submitForm">确 定</el-button>
165
-        <el-button @click="cancel">取 消</el-button>
166
-      </div>
167
-    </el-dialog>
168
-  </div>
169
-</template>
170
-
171
-<script>
172
-import { listBudgetStaff, getBudgetStaff, delBudgetStaff, addBudgetStaff, updateBudgetStaff } from "@/api/oa/budget/budgetStaff";
173
-
174
-export default {
175
-  name: "BudgetStaff",
176
-  data() {
177
-    return {
178
-      // 遮罩层
179
-      loading: true,
180
-      // 选中数组
181
-      ids: [],
182
-      // 非单个禁用
183
-      single: true,
184
-      // 非多个禁用
185
-      multiple: true,
186
-      // 显示搜索条件
187
-      showSearch: true,
188
-      // 总条数
189
-      total: 0,
190
-      // cmc人员预算表格数据
191
-      budgetStaffList: [],
192
-      // 弹出层标题
193
-      title: "",
194
-      // 是否显示弹出层
195
-      open: false,
196
-      // 查询参数
197
-      queryParams: {
198
-        pageNum: 1,
199
-        pageSize: 10,
200
-        budgetId: null,
201
-        userId: null,
202
-        days: null,
203
-        fixCost: null,
204
-        inOutPrice: null,
205
-        inOutExpense: null
206
-      },
207
-      // 表单参数
208
-      form: {},
209
-      // 表单校验
210
-      rules: {
211
-      }
212
-    };
213
-  },
214
-  created() {
215
-    this.getList();
216
-  },
217
-  methods: {
218
-    /** 查询cmc人员预算列表 */
219
-    getList() {
220
-      this.loading = true;
221
-      listBudgetStaff(this.queryParams).then(response => {
222
-        this.budgetStaffList = response.rows;
223
-        this.total = response.total;
224
-        this.loading = false;
225
-      });
226
-    },
227
-    // 取消按钮
228
-    cancel() {
229
-      this.open = false;
230
-      this.reset();
231
-    },
232
-    // 表单重置
233
-    reset() {
234
-      this.form = {
235
-        budgetStaffId: null,
236
-        budgetId: null,
237
-        userId: null,
238
-        days: null,
239
-        fixCost: null,
240
-        inOutPrice: null,
241
-        inOutExpense: null
242
-      };
243
-      this.resetForm("form");
244
-    },
245
-    /** 搜索按钮操作 */
246
-    handleQuery() {
247
-      this.queryParams.pageNum = 1;
248
-      this.getList();
249
-    },
250
-    /** 重置按钮操作 */
251
-    resetQuery() {
252
-      this.resetForm("queryForm");
253
-      this.handleQuery();
254
-    },
255
-    // 多选框选中数据
256
-    handleSelectionChange(selection) {
257
-      this.ids = selection.map(item => item.budgetStaffId)
258
-      this.single = selection.length!==1
259
-      this.multiple = !selection.length
260
-    },
261
-    /** 新增按钮操作 */
262
-    handleAdd() {
263
-      this.reset();
264
-      this.open = true;
265
-      this.title = "添加cmc人员预算";
266
-    },
267
-    /** 修改按钮操作 */
268
-    handleUpdate(row) {
269
-      this.reset();
270
-      const budgetStaffId = row.budgetStaffId || this.ids
271
-      getBudgetStaff(budgetStaffId).then(response => {
272
-        this.form = response.data;
273
-        this.open = true;
274
-        this.title = "修改cmc人员预算";
275
-      });
276
-    },
277
-    /** 提交按钮 */
278
-    submitForm() {
279
-      this.$refs["form"].validate(valid => {
280
-        if (valid) {
281
-          if (this.form.budgetStaffId != null) {
282
-            updateBudgetStaff(this.form).then(response => {
283
-              this.$modal.msgSuccess("修改成功");
284
-              this.open = false;
285
-              this.getList();
286
-            });
287
-          } else {
288
-            addBudgetStaff(this.form).then(response => {
289
-              this.$modal.msgSuccess("新增成功");
290
-              this.open = false;
291
-              this.getList();
292
-            });
293
-          }
294
-        }
295
-      });
296
-    },
297
-    /** 删除按钮操作 */
298
-    handleDelete(row) {
299
-      const budgetStaffIds = row.budgetStaffId || this.ids;
300
-      this.$modal.confirm('是否确认删除cmc人员预算编号为"' + budgetStaffIds + '"的数据项?').then(function() {
301
-        return delBudgetStaff(budgetStaffIds);
302
-      }).then(() => {
303
-        this.getList();
304
-        this.$modal.msgSuccess("删除成功");
305
-      }).catch(() => {});
306
-    },
307
-    /** 导出按钮操作 */
308
-    handleExport() {
309
-      this.download('oa/budgetStaff/export', {
310
-        ...this.queryParams
311
-      }, `budgetStaff_${new Date().getTime()}.xlsx`)
312
-    }
313
-  }
314
-};
315
-</script>

Loading…
取消
儲存