|
|
@@ -33,7 +33,7 @@
|
|
33
|
33
|
</el-col>
|
|
34
|
34
|
<el-col :span="6">
|
|
35
|
35
|
<el-form-item style="margin-left:50px;">
|
|
36
|
|
- <el-button type="primary" size="medium">查询</el-button>
|
|
|
36
|
+ <el-button type="primary" size="medium" @click="getListTask">查询</el-button>
|
|
37
|
37
|
</el-form-item>
|
|
38
|
38
|
</el-col>
|
|
39
|
39
|
</el-row>
|
|
|
@@ -48,13 +48,36 @@
|
|
48
|
48
|
<el-table-column prop="F_WorkOrderCode" label="编号" align="center" />
|
|
49
|
49
|
<el-table-column prop="F_Content" label="报修内容" align="center" min-width />
|
|
50
|
50
|
<el-table-column prop="F_Phone" label="电话号码" align="center" min-width />
|
|
51
|
|
- <el-table-column prop="T_Wowocodetypename" label="申请科室" align="center" min-width />
|
|
|
51
|
+ <el-table-column :formatter="formtDept" prop="F_ApplicationDept" label="申请科室" align="center" min-width />
|
|
52
|
52
|
<el-table-column prop="F_PlaceOfRepair" label="报修地点" align="center" min-width />
|
|
53
|
|
- <el-table-column prop="T_Woscore" label="工单状态" align="center" min-width />
|
|
54
|
|
- <el-table-column prop="T_Wowocodetypename" label="协作" align="center" min-width />
|
|
55
|
|
- <el-table-column prop="tousercodeusername" label="维修人" align="center" min-width />
|
|
56
|
|
- <el-table-column prop="T_Woscore" label="超时时限" align="center" min-width />
|
|
|
53
|
+ <el-table-column prop="StateName" label="工单状态" align="center" min-width />
|
|
|
54
|
+ <el-table-column label="协作" align="center" min-width >
|
|
|
55
|
+ <template slot-scope="scope">
|
|
|
56
|
+ {{ scope.row.AssistanceState ? scope.row.AssistanceState: '-' }}
|
|
|
57
|
+ </template>
|
|
|
58
|
+ </el-table-column>
|
|
|
59
|
+ <el-table-column label="维修人" align="center" min-width >
|
|
|
60
|
+ <template slot-scope="scope">
|
|
|
61
|
+ {{ scope.row.F_Maintenancer ? scope.row.F_Maintenancer: '-' }}
|
|
|
62
|
+ </template>
|
|
|
63
|
+ </el-table-column>
|
|
|
64
|
+ <el-table-column prop="GapTime" label="超时时限" align="center" min-width />
|
|
57
|
65
|
<el-table-column prop="F_CreateTime" label="创建时间" align="center" min-width />
|
|
|
66
|
+ <el-table-column
|
|
|
67
|
+ label="操作"
|
|
|
68
|
+ width="160"
|
|
|
69
|
+ align="center"
|
|
|
70
|
+ class-name="oparate_btn"
|
|
|
71
|
+ fixed="right"
|
|
|
72
|
+ >
|
|
|
73
|
+ <template slot-scope="scope">
|
|
|
74
|
+ <el-button type="text" v-if="isShowButton(scope.row, '接单')" @click="takeOrders(scope.row.F_WorkOrderCode)">接单</el-button>
|
|
|
75
|
+ <el-button type="text" v-if="isShowButton(scope.row, '退回')" @click="backOrder(scope.row.F_WorkOrderCode)">退回</el-button>
|
|
|
76
|
+ <el-button type="text" v-if="isShowButton(scope.row, '协作')" @click="cooperation(scope.row.F_WorkOrderCode)">协作</el-button>
|
|
|
77
|
+ <el-button type="text" v-if="isShowButton(scope.row, '转派')" @click="redeploy(scope.row.F_WorkOrderCode)">转派</el-button>
|
|
|
78
|
+ <el-button type="text" v-if="isShowButton(scope.row, '完成')" @click="doneWorkOrder(scope.row.F_WorkOrderCode)">完成</el-button>
|
|
|
79
|
+ </template>
|
|
|
80
|
+ </el-table-column>
|
|
58
|
81
|
</el-table>
|
|
59
|
82
|
<pagination
|
|
60
|
83
|
v-show="pageParams.total > 0"
|
|
|
@@ -64,20 +87,141 @@
|
|
64
|
87
|
class="pagination"
|
|
65
|
88
|
@pagination="getListTask"
|
|
66
|
89
|
/>
|
|
|
90
|
+
|
|
|
91
|
+ <el-dialog title="退回" :visible.sync="dialogBackOrder">
|
|
|
92
|
+ <el-form :model="backOrderForm">
|
|
|
93
|
+
|
|
|
94
|
+ <el-form-item label="退回原因">
|
|
|
95
|
+ <el-input type="textarea" v-model="backOrderForm.BackReason"></el-input>
|
|
|
96
|
+ </el-form-item>
|
|
|
97
|
+ </el-form>
|
|
|
98
|
+ <div slot="footer" class="dialog-footer">
|
|
|
99
|
+ <el-button @click="dialogBackOrder = false">取 消</el-button>
|
|
|
100
|
+ <el-button type="primary" @click="postBackOrder">确 定</el-button>
|
|
|
101
|
+ </div>
|
|
|
102
|
+ </el-dialog>
|
|
|
103
|
+ <el-dialog title="协作" :visible.sync="dialogCooperation">
|
|
|
104
|
+ <el-form :model="cooperationForm" :rules="rules" label-width="100px">
|
|
|
105
|
+ <el-form-item label="协作方式" prop="type">
|
|
|
106
|
+ <el-radio-group v-model="cooperationForm.type">
|
|
|
107
|
+ <el-radio label="0">内部协作</el-radio>
|
|
|
108
|
+ <el-radio label="1">外部协作</el-radio>
|
|
|
109
|
+ </el-radio-group>
|
|
|
110
|
+ </el-form-item>
|
|
|
111
|
+ <el-form-item label="工单类别" prop="workOrderCategory" v-model="cooperationForm.workOrderCategory">
|
|
|
112
|
+ <select-order-typeTwo :second-order-type="secondOrderType" @post-second-order-type="getSecondOOrderType"/>
|
|
|
113
|
+ </el-form-item>
|
|
|
114
|
+ <el-form-item label="说明信息">
|
|
|
115
|
+ <el-input v-model="cooperationForm.content" :autosize="{ minRows: 4, maxRows: 8}" show-word-limit maxlength="100" type="textarea" placeholder="请输入说明信息"/>
|
|
|
116
|
+ </el-form-item>
|
|
|
117
|
+ <el-form-item label="协作人" prop="maintenancer" v-show="cooperationForm.type == '0'">
|
|
|
118
|
+ <el-select v-model="cooperationForm.maintenancer" placeholder="请选择协作人">
|
|
|
119
|
+ <el-option v-for="item in deptUsers" :key="item.usercode"
|
|
|
120
|
+ :label="item.username"
|
|
|
121
|
+ :value="item.usercode"></el-option>
|
|
|
122
|
+
|
|
|
123
|
+ </el-select>
|
|
|
124
|
+ </el-form-item>
|
|
|
125
|
+ </el-form>
|
|
|
126
|
+ <div slot="footer" class="dialog-footer">
|
|
|
127
|
+ <el-button @click="dialogCooperation = false">取 消</el-button>
|
|
|
128
|
+ <el-button type="primary" @click="postCooperationOrder">确 定</el-button>
|
|
|
129
|
+ </div>
|
|
|
130
|
+ </el-dialog>
|
|
|
131
|
+
|
|
|
132
|
+ <el-dialog title="转派" :visible.sync="dialogredeploy">
|
|
|
133
|
+ <el-form :model="redeployForm" :rules="rules" label-width="100px">
|
|
|
134
|
+
|
|
|
135
|
+ <el-form-item label="维修员信息" prop="maintenancer">
|
|
|
136
|
+ <el-select v-model="redeployForm.toUserCode" placeholder="请选择维修员信息">
|
|
|
137
|
+ <el-option v-for="item in deptUsers" :key="item.usercode"
|
|
|
138
|
+ :label="item.username"
|
|
|
139
|
+ :value="item.usercode"></el-option>
|
|
|
140
|
+
|
|
|
141
|
+ </el-select>
|
|
|
142
|
+ </el-form-item>
|
|
|
143
|
+ </el-form>
|
|
|
144
|
+ <div slot="footer" class="dialog-footer">
|
|
|
145
|
+ <el-button @click="dialogredeploy = false">取 消</el-button>
|
|
|
146
|
+ <el-button type="primary" @click="postRedeployOrder">确 定</el-button>
|
|
|
147
|
+ </div>
|
|
|
148
|
+ </el-dialog>
|
|
|
149
|
+
|
|
|
150
|
+ <el-dialog title="完工" :visible.sync="dialogDone">
|
|
|
151
|
+ <el-form :model="doneForm" :rules="rules" label-width="100px">
|
|
|
152
|
+ <el-form-item label="完成情况" prop="type">
|
|
|
153
|
+ <el-radio-group v-model="doneForm.type">
|
|
|
154
|
+ <el-radio label="0">正常完成</el-radio>
|
|
|
155
|
+ <el-radio label="1">异常完成</el-radio>
|
|
|
156
|
+ </el-radio-group>
|
|
|
157
|
+ </el-form-item>
|
|
|
158
|
+ <el-form-item label="完成说明">
|
|
|
159
|
+ <el-input v-model="doneForm.result" :autosize="{ minRows: 4, maxRows: 8}" show-word-limit maxlength="100" type="textarea" placeholder="请输入完成说明"/>
|
|
|
160
|
+ </el-form-item>
|
|
|
161
|
+ </el-form>
|
|
|
162
|
+ <div slot="footer" class="dialog-footer">
|
|
|
163
|
+ <el-button @click="dialogDone = false">取 消</el-button>
|
|
|
164
|
+ <el-button type="primary" @click="postDoneOrder">确 定</el-button>
|
|
|
165
|
+ </div>
|
|
|
166
|
+ </el-dialog>
|
|
67
|
167
|
</div>
|
|
|
168
|
+
|
|
|
169
|
+
|
|
68
|
170
|
</template>
|
|
69
|
171
|
|
|
70
|
172
|
<script>
|
|
71
|
173
|
import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
|
|
72
|
|
-import { getMaintenancerList } from '@/api/faultRepairManagement/faultRepair'
|
|
|
174
|
+import { GetPerson } from '@/api/commonAPI'
|
|
|
175
|
+import selectOrderTypeTwo from '@/components/context/commonSelect/selectOrderTypeTwo.vue'
|
|
|
176
|
+import { getMaintenancerList, postTaskOrders, postBackWorkOrder, postAssistWorkOrder, postTransfer, postDealWorkOrder } from '@/api/faultRepairManagement/faultRepair'
|
|
73
|
177
|
export default {
|
|
74
|
178
|
name: 'RepairList',
|
|
75
|
179
|
components: {
|
|
76
|
|
- Pagination
|
|
|
180
|
+ Pagination,
|
|
|
181
|
+ selectOrderTypeTwo
|
|
77
|
182
|
},
|
|
78
|
183
|
data() {
|
|
79
|
184
|
return {
|
|
|
185
|
+ secondOrderType: {
|
|
|
186
|
+ typeid: 2,
|
|
|
187
|
+ pid: 3000
|
|
|
188
|
+ },
|
|
80
|
189
|
state: 0,
|
|
|
190
|
+ dialogDone: false,
|
|
|
191
|
+ doneForm: {
|
|
|
192
|
+ workordercode: '',
|
|
|
193
|
+ type: 0,
|
|
|
194
|
+ result: '',
|
|
|
195
|
+ },
|
|
|
196
|
+ dialogredeploy: false,
|
|
|
197
|
+ redeployForm: {
|
|
|
198
|
+ workordercode: '',
|
|
|
199
|
+ toUserCode: '',
|
|
|
200
|
+ },
|
|
|
201
|
+ rules: {
|
|
|
202
|
+ type: [
|
|
|
203
|
+ { required: true, message: '请选择活动资源', trigger: 'change' }
|
|
|
204
|
+ ],
|
|
|
205
|
+ workOrderCategory: [
|
|
|
206
|
+ { required: true, message: '请选择工单类别', trigger: 'change' }
|
|
|
207
|
+ ],
|
|
|
208
|
+ maintenancer: [
|
|
|
209
|
+ { required: true, message: '请选择协作人', trigger: 'change' }
|
|
|
210
|
+ ],
|
|
|
211
|
+ },
|
|
|
212
|
+ dialogCooperation: false,
|
|
|
213
|
+ cooperationForm: {
|
|
|
214
|
+ workordercode: '',
|
|
|
215
|
+ workOrderCategory: 0,
|
|
|
216
|
+ type: '0',
|
|
|
217
|
+ content: '',
|
|
|
218
|
+ maintenancer: ''
|
|
|
219
|
+ },
|
|
|
220
|
+ dialogBackOrder: false,
|
|
|
221
|
+ backOrderForm: {
|
|
|
222
|
+ workordercode: '',
|
|
|
223
|
+ BackReason: '',
|
|
|
224
|
+ },
|
|
81
|
225
|
activeName: '0',
|
|
82
|
226
|
repairman: '', // 姓名
|
|
83
|
227
|
rpairmanphone: '', // 电话
|
|
|
@@ -88,20 +232,187 @@ export default {
|
|
88
|
232
|
pageindex: 1, // 当前第几页
|
|
89
|
233
|
pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
|
|
90
|
234
|
total: 0 // 总共多少数据
|
|
91
|
|
- }
|
|
|
235
|
+ },
|
|
|
236
|
+ deptUsers:[],
|
|
|
237
|
+ deptments: [],
|
|
92
|
238
|
}
|
|
93
|
239
|
},
|
|
94
|
240
|
computed: {},
|
|
95
|
241
|
created() {
|
|
96
|
242
|
this.getListTask()
|
|
|
243
|
+
|
|
97
|
244
|
},
|
|
98
|
245
|
mounted() {
|
|
99
|
246
|
},
|
|
100
|
247
|
methods: {
|
|
|
248
|
+ formtDept(row, column) {
|
|
|
249
|
+ return this.$store.getters.deptmap[row[column.property].trim()]
|
|
|
250
|
+ },
|
|
|
251
|
+ isShowButton(row, name) { // 显示按钮
|
|
|
252
|
+ var show = false
|
|
|
253
|
+ if (row.Buttons && row.Buttons.length >0 && row.Buttons.findIndex((o)=> {return o.text === name}) >=0) {
|
|
|
254
|
+ show = true
|
|
|
255
|
+ }
|
|
|
256
|
+
|
|
|
257
|
+ return show
|
|
|
258
|
+ },
|
|
|
259
|
+ doneWorkOrder(code) {
|
|
|
260
|
+ this.dialogDone = true
|
|
|
261
|
+ this.doneForm.workordercode = code
|
|
|
262
|
+ },
|
|
|
263
|
+ postDoneOrder() { // 完工
|
|
|
264
|
+ new Promise((resolve) => {
|
|
|
265
|
+ const params = this.doneForm
|
|
|
266
|
+ postDealWorkOrder(params).then((response) => {
|
|
|
267
|
+ if (response.state === 'success') {
|
|
|
268
|
+ this.$message({
|
|
|
269
|
+ type: 'success',
|
|
|
270
|
+ message: '操作成功!'
|
|
|
271
|
+ });
|
|
|
272
|
+ this.dialogDone = false;
|
|
|
273
|
+ } else {
|
|
|
274
|
+ this.$message({
|
|
|
275
|
+ type: 'info',
|
|
|
276
|
+ message: response.message
|
|
|
277
|
+ });
|
|
|
278
|
+ }
|
|
|
279
|
+ })
|
|
|
280
|
+ resolve()
|
|
|
281
|
+ })
|
|
|
282
|
+ },
|
|
|
283
|
+ redeploy(code) {
|
|
|
284
|
+ this.getRepairman()
|
|
|
285
|
+ this.dialogredeploy = true
|
|
|
286
|
+ this.redeployForm.workordercode = code
|
|
|
287
|
+
|
|
|
288
|
+ },
|
|
|
289
|
+ postRedeployOrder() { // 转派
|
|
|
290
|
+ new Promise((resolve) => {
|
|
|
291
|
+ const params = this.redeployForm
|
|
|
292
|
+ postTransfer(params).then((response) => {
|
|
|
293
|
+ if (response.state === 'success') {
|
|
|
294
|
+ this.$message({
|
|
|
295
|
+ type: 'success',
|
|
|
296
|
+ message: '操作成功!'
|
|
|
297
|
+ });
|
|
|
298
|
+ this.dialogredeploy = false;
|
|
|
299
|
+ } else {
|
|
|
300
|
+ this.$message({
|
|
|
301
|
+ type: 'info',
|
|
|
302
|
+ message: response.message
|
|
|
303
|
+ });
|
|
|
304
|
+ }
|
|
|
305
|
+ })
|
|
|
306
|
+ resolve()
|
|
|
307
|
+ })
|
|
|
308
|
+ },
|
|
|
309
|
+ postCooperationOrder() { // 协作
|
|
|
310
|
+ new Promise((resolve) => {
|
|
|
311
|
+ const params = this.cooperationForm
|
|
|
312
|
+ postAssistWorkOrder(params).then((response) => {
|
|
|
313
|
+ if (response.state === 'success') {
|
|
|
314
|
+ this.$message({
|
|
|
315
|
+ type: 'success',
|
|
|
316
|
+ message: '操作成功!'
|
|
|
317
|
+ });
|
|
|
318
|
+ this.dialogCooperation = false;
|
|
|
319
|
+ } else {
|
|
|
320
|
+ this.$message({
|
|
|
321
|
+ type: 'info',
|
|
|
322
|
+ message: response.message
|
|
|
323
|
+ });
|
|
|
324
|
+ }
|
|
|
325
|
+ })
|
|
|
326
|
+ resolve()
|
|
|
327
|
+ })
|
|
|
328
|
+ },
|
|
|
329
|
+ // 获取申请人数据
|
|
|
330
|
+ getRepairman() {
|
|
|
331
|
+ const deptid = this.$store.getters.teamId
|
|
|
332
|
+ return new Promise((resolve) => {
|
|
|
333
|
+ const params = {
|
|
|
334
|
+ deptid,
|
|
|
335
|
+ }
|
|
|
336
|
+ GetPerson(params).then((res) => {
|
|
|
337
|
+ if (res.state === 'success') {
|
|
|
338
|
+ this.deptUsers = res.rows
|
|
|
339
|
+ }
|
|
|
340
|
+ })
|
|
|
341
|
+ resolve()
|
|
|
342
|
+ })
|
|
|
343
|
+ },
|
|
|
344
|
+ getSecondOOrderType(data) {
|
|
|
345
|
+ this.cooperationForm.workOrderCategory = data.value
|
|
|
346
|
+ },
|
|
101
|
347
|
handleClick(res) {
|
|
102
|
|
- this.state = Number(res.index)
|
|
|
348
|
+ this.state = Number(res.name)
|
|
|
349
|
+ this.getListTask()
|
|
|
350
|
+ },
|
|
|
351
|
+ cooperation(code) {
|
|
|
352
|
+ this.dialogCooperation = true;
|
|
|
353
|
+ this.cooperationForm.workordercode = code
|
|
|
354
|
+ this.getRepairman()
|
|
|
355
|
+ },
|
|
|
356
|
+ postBackOrder() { // 退回
|
|
|
357
|
+ new Promise((resolve) => {
|
|
|
358
|
+ const params = this.backOrderForm
|
|
|
359
|
+ postBackWorkOrder(params).then((response) => {
|
|
|
360
|
+ if (response.state === 'success') {
|
|
|
361
|
+ this.$message({
|
|
|
362
|
+ type: 'success',
|
|
|
363
|
+ message: '操作成功!'
|
|
|
364
|
+ });
|
|
|
365
|
+ this.dialogBackOrder = false;
|
|
|
366
|
+ } else {
|
|
|
367
|
+ this.$message({
|
|
|
368
|
+ type: 'info',
|
|
|
369
|
+ message: response.message
|
|
|
370
|
+ });
|
|
|
371
|
+ }
|
|
|
372
|
+ })
|
|
|
373
|
+ resolve()
|
|
|
374
|
+ })
|
|
|
375
|
+ },
|
|
|
376
|
+ backOrder(code) { // 退回弹框
|
|
|
377
|
+ this.dialogBackOrder = true
|
|
|
378
|
+ this.backOrderForm.workordercode = code
|
|
|
379
|
+ },
|
|
|
380
|
+ takeOrders(code) { // 接单
|
|
|
381
|
+ this.$confirm('确认接受该工单吗?', '提示', {
|
|
|
382
|
+ confirmButtonText: '确定',
|
|
|
383
|
+ cancelButtonText: '取消',
|
|
|
384
|
+ type: 'warning'
|
|
|
385
|
+ }).then(() => {
|
|
|
386
|
+
|
|
|
387
|
+ new Promise((resolve) => {
|
|
|
388
|
+ const params = {
|
|
|
389
|
+ workordercode: code,
|
|
|
390
|
+ }
|
|
|
391
|
+ postTaskOrders(params).then((response) => {
|
|
|
392
|
+ if (response.state === 'success') {
|
|
|
393
|
+ this.$message({
|
|
|
394
|
+ type: 'success',
|
|
|
395
|
+ message: '删除成功!'
|
|
|
396
|
+ });
|
|
|
397
|
+ } else {
|
|
|
398
|
+ this.$message({
|
|
|
399
|
+ type: 'info',
|
|
|
400
|
+ message: response.message
|
|
|
401
|
+ });
|
|
|
402
|
+ }
|
|
|
403
|
+
|
|
|
404
|
+ })
|
|
|
405
|
+ resolve()
|
|
|
406
|
+ })
|
|
|
407
|
+ }).catch(() => {
|
|
|
408
|
+ this.$message({
|
|
|
409
|
+ type: 'info',
|
|
|
410
|
+ message: '已取消删除'
|
|
|
411
|
+ });
|
|
|
412
|
+ });
|
|
103
|
413
|
},
|
|
104
|
414
|
getListTask() {
|
|
|
415
|
+ this.taskDataLists = []
|
|
105
|
416
|
return new Promise((resolve) => {
|
|
106
|
417
|
const params = {
|
|
107
|
418
|
page: this.pageParams.pageindex, // 第几页
|
|
|
@@ -114,9 +425,11 @@ export default {
|
|
114
|
425
|
workordercode: this.workOrderId
|
|
115
|
426
|
}
|
|
116
|
427
|
getMaintenancerList(params).then((response) => {
|
|
|
428
|
+ this.pageParams.total = response.total
|
|
117
|
429
|
if (response.rows.length > 0) {
|
|
118
|
430
|
this.taskDataLists = response.rows
|
|
119
|
431
|
}
|
|
|
432
|
+
|
|
120
|
433
|
})
|
|
121
|
434
|
resolve()
|
|
122
|
435
|
})
|
|
|
@@ -125,8 +438,8 @@ export default {
|
|
125
|
438
|
}
|
|
126
|
439
|
</script>
|
|
127
|
440
|
|
|
128
|
|
-<style scoped>
|
|
129
|
|
-.el-tabs__item {
|
|
|
441
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
442
|
+/deep/.el-tabs__item {
|
|
130
|
443
|
width: 185px !important;
|
|
131
|
444
|
text-align: center;
|
|
132
|
445
|
font-size: 16px !important;
|