|
@@ -4,195 +4,84 @@
|
4
|
4
|
<div class="div_parent">
|
5
|
5
|
<div class="steps">
|
6
|
6
|
<el-steps :active="stepActive" align-center direction="horizontal">
|
7
|
|
- <el-step
|
8
|
|
- id="el_step"
|
9
|
|
- :title="item.step.title"
|
10
|
|
- v-for="(item, index) in totalData"
|
11
|
|
- :key="index"
|
12
|
|
- @click.native="stepClick(index)"
|
13
|
|
- >
|
14
|
|
- <svg-icon
|
15
|
|
- class='icon_wai'
|
16
|
|
- slot="icon"
|
17
|
|
- icon-class="NotStarted"
|
18
|
|
- v-if="stepActive < index"
|
19
|
|
- />
|
20
|
|
- <svg-icon
|
21
|
|
- class='icon_wai'
|
22
|
|
- slot="icon"
|
23
|
|
- icon-class="current"
|
24
|
|
- v-if="stepActive == index"
|
25
|
|
- />
|
26
|
|
- <svg-icon
|
27
|
|
- class='icon_wai'
|
28
|
|
- slot="icon"
|
29
|
|
- icon-class="finished"
|
30
|
|
- v-if="stepActive > index"
|
31
|
|
- />
|
32
|
|
-
|
33
|
|
- <!-- <template>
|
34
|
|
- <i
|
35
|
|
- slot="icon"
|
36
|
|
- class="iconfont iconNotStarted"
|
37
|
|
- v-if="stepActive < index"
|
38
|
|
- />
|
39
|
|
- <i
|
40
|
|
- slot="icon"
|
41
|
|
- class="iconfont iconcurrent"
|
42
|
|
- v-if="stepActive == index"
|
43
|
|
- />
|
44
|
|
- <i
|
45
|
|
- slot="icon"
|
46
|
|
- class="iconfont iconfinished"
|
47
|
|
- v-if="stepActive > index"
|
48
|
|
- />
|
49
|
|
- </template> -->
|
|
7
|
+ <el-step id="el_step" :title="item.step.title" v-for="(item, index) in totalData" :key="index" @click.native="stepClick(index)">
|
|
8
|
+ <svg-icon class='icon_wai' slot="icon" icon-class="NotStarted" v-if="stepActive < index"/>
|
|
9
|
+ <svg-icon class='icon_wai' slot="icon" icon-class="current" v-if="stepActive == index"/>
|
|
10
|
+ <svg-icon class='icon_wai' slot="icon" icon-class="finished" v-if="stepActive > index"/>
|
50
|
11
|
</el-step>
|
51
|
12
|
</el-steps>
|
52
|
13
|
</div>
|
53
|
|
-
|
54
|
14
|
<div id="step1">
|
55
|
|
- <el-table
|
56
|
|
- border
|
57
|
|
- stripe
|
58
|
|
- highlight-current-row
|
59
|
|
- :data="tableData"
|
60
|
|
- :span-method="arraySpanMethod"
|
61
|
|
- >
|
62
|
|
- <el-table-column
|
63
|
|
- label="序号"
|
64
|
|
- prop="step"
|
65
|
|
- align="center"
|
66
|
|
- width="100px"
|
67
|
|
- >
|
68
|
|
- <template slot-scope="scope">
|
69
|
|
- <div
|
70
|
|
- v-if="
|
71
|
|
- scope.row.hasOwnProperty('process') &&
|
72
|
|
- scope.row.process.length != 0
|
73
|
|
- "
|
74
|
|
- style="height: 400px"
|
75
|
|
- >
|
76
|
|
- <div class="tf_title">
|
77
|
|
- <i class="iconfont iconshu"></i>流程(熏蒸管理审批)
|
78
|
|
- </div>
|
79
|
|
- <el-steps direction="vertical" :active="1">
|
80
|
|
- <el-step
|
81
|
|
- v-for="(item, index) in scope.row.process"
|
82
|
|
- :key="index"
|
83
|
|
- icon="el-icon-edit"
|
84
|
|
- >
|
85
|
|
- <template>
|
86
|
|
- <div
|
87
|
|
- slot="title"
|
88
|
|
- class="stepTitle"
|
89
|
|
- style="display: flex; justify-content: space-between"
|
90
|
|
- >
|
91
|
|
- <div class="stepTitleFont">
|
92
|
|
- {{ item.title }}
|
93
|
|
- </div>
|
94
|
|
-
|
95
|
|
- <div style="width: 200px">
|
96
|
|
- <div
|
97
|
|
- :class="{
|
98
|
|
- active:
|
99
|
|
- (item.auditState == null &&
|
100
|
|
- processActive >= index) ||
|
101
|
|
- item.auditState == 1,
|
102
|
|
- noActive: item.auditState == 2,
|
103
|
|
- }"
|
104
|
|
- >
|
105
|
|
- {{ perList[item.content] }}
|
106
|
|
- </div>
|
107
|
|
- <div v-if="item.auditState == 0">待审批</div>
|
108
|
|
- <div v-if="item.auditState == 1">审批通过</div>
|
109
|
|
- <div v-if="item.auditState == 2">审批不通过</div>
|
110
|
|
- <div class="stepTitleFont">{{ item.auditTime }}</div>
|
111
|
|
-
|
112
|
|
- <div style="width: 200px; display: flex">
|
113
|
|
- <!-- <el-button
|
114
|
|
- type="danger"
|
115
|
|
- size="mini"
|
116
|
|
- v-if="
|
117
|
|
- item.content == userInfo.uid &&
|
118
|
|
- item.auditState == 0
|
119
|
|
- "
|
120
|
|
- @click="noAgree(item)"
|
121
|
|
- >审批不通过</el-button
|
122
|
|
- >
|
123
|
|
- <el-button
|
124
|
|
- type="success"
|
125
|
|
- size="mini"
|
126
|
|
- v-if="
|
127
|
|
- item.content == userInfo.uid &&
|
128
|
|
- item.auditState == 0
|
129
|
|
- "
|
130
|
|
- @click="agree(item)"
|
131
|
|
- >审批通过</el-button
|
132
|
|
- > -->
|
133
|
|
- </div>
|
134
|
|
- </div>
|
135
|
|
- </div>
|
136
|
|
- </template>
|
137
|
|
- <template>
|
138
|
|
- <i
|
139
|
|
- slot="icon"
|
140
|
|
- class="iconfont iconstep_current"
|
141
|
|
- v-if="item.auditState != 2 && processActive <= index"
|
142
|
|
- >
|
143
|
|
- </i>
|
144
|
|
- <i
|
145
|
|
- slot="icon"
|
146
|
|
- style="color: red"
|
147
|
|
- class="iconfont iconstep_err"
|
148
|
|
- v-if="item.auditState == 2"
|
149
|
|
- ></i>
|
150
|
|
- <i
|
151
|
|
- slot="icon"
|
152
|
|
- style="color: green"
|
153
|
|
- class="iconfont iconstep_complete"
|
154
|
|
- v-if="
|
155
|
|
- (processActive == index && item.auditState == 4) ||
|
156
|
|
- processActive > index
|
157
|
|
- "
|
158
|
|
- ></i>
|
159
|
|
- </template>
|
160
|
|
- </el-step>
|
161
|
|
- </el-steps>
|
162
|
|
- </div>
|
163
|
|
- <div v-else>{{ scope.row.step }}</div>
|
164
|
|
- </template>
|
|
15
|
+ <el-table border stripe highlight-current-row :data="tableData" :span-method="arraySpanMethod">
|
|
16
|
+ <el-table-column label="序号" prop="step" align="center" width="100px">
|
|
17
|
+ <!-- <template slot-scope="scope">
|
|
18
|
+ {{ scope.row.index + 1 }}
|
|
19
|
+ </template> -->
|
165
|
20
|
</el-table-column>
|
166
|
21
|
<el-table-column prop="operationTime" label="时间" align="center">
|
167
|
22
|
</el-table-column>
|
168
|
|
-
|
169
|
23
|
<el-table-column prop="title" label="工作项" align="center" />
|
170
|
24
|
<el-table-column prop="details" label="选项" align="center">
|
171
|
25
|
<template slot-scope="scope">
|
172
|
|
- <el-radio-group
|
173
|
|
- v-model="scope.row.subData"
|
174
|
|
- @change="radioChange(scope.row)"
|
175
|
|
- >
|
176
|
|
- <el-radio :label="0" :disabled="pageType == 3 || disabled">{{
|
177
|
|
- scope.row.details.split(",")[0]
|
178
|
|
- }}</el-radio>
|
179
|
|
- <el-radio :label="1" :disabled="pageType == 3 || disabled">{{
|
180
|
|
- scope.row.details.split(",")[1]
|
181
|
|
- }}</el-radio>
|
|
26
|
+ <el-radio-group v-model="scope.row.subData" @change="radioChange(scope.row)">
|
|
27
|
+ <el-radio :label="0" :disabled="disabled">{{ scope.row.details.split(",")[0] }}</el-radio>
|
|
28
|
+ <el-radio :label="1" :disabled="disabled">{{ scope.row.details.split(",")[1] }}</el-radio>
|
182
|
29
|
</el-radio-group>
|
183
|
30
|
</template>
|
184
|
31
|
</el-table-column>
|
185
|
32
|
</el-table>
|
186
|
|
-
|
187
|
|
- <div class="btns">
|
188
|
|
- <el-button type="cancel" @click="goBack()"
|
189
|
|
- >返回</el-button
|
190
|
|
- >
|
191
|
|
- <el-button class="saveBtn" v-show="isShow" type="savebtn" @click="save()" :loading="loading">{{
|
192
|
|
- this.button
|
193
|
|
- }}</el-button>
|
|
33
|
+ <div v-if="tableDataAudit && tableDataAudit.length" style="height: 400px">
|
|
34
|
+ <div class="tf_title">
|
|
35
|
+ <i class="iconfont iconshu"></i>
|
|
36
|
+ <span v-if="stepActive == 0 || step == 1">流程(熏蒸计划审批)</span>
|
|
37
|
+ <span v-if="stepActive == 3 || step == 4">流程(熏蒸散气申请审批)</span>
|
|
38
|
+ </div>
|
|
39
|
+ <el-steps direction="vertical" :active="processActive">
|
|
40
|
+ <el-step v-for="(item, index) in tableDataAudit" :key="index" icon="el-icon-edit">
|
|
41
|
+ <template>
|
|
42
|
+ <div slot="title" class="stepTitle" style="display: flex; justify-content: space-between">
|
|
43
|
+ <div class="stepTitleFont">
|
|
44
|
+ {{ item.title }}
|
|
45
|
+ </div>
|
|
46
|
+ <div style="width: 200px">
|
|
47
|
+ <div
|
|
48
|
+ :class="{
|
|
49
|
+ active:
|
|
50
|
+ (item.auditState == null &&
|
|
51
|
+ processActive >= index) ||
|
|
52
|
+ item.auditState == 1,
|
|
53
|
+ noActive: item.auditState == 2,
|
|
54
|
+ }"
|
|
55
|
+ >
|
|
56
|
+ {{ perList[item.content] }}
|
|
57
|
+ </div>
|
|
58
|
+ <div v-if="item.auditState == 0">待审批</div>
|
|
59
|
+ <div v-if="item.auditState == 1">审批通过</div>
|
|
60
|
+ <div v-if="item.auditState == 2">审批不通过</div>
|
|
61
|
+ <div class="stepTitleFont">{{ item.auditTime }}</div>
|
|
62
|
+ <div style="width: 200px; display: flex">
|
|
63
|
+ </div>
|
|
64
|
+ </div>
|
|
65
|
+ </div>
|
|
66
|
+ </template>
|
|
67
|
+ <template>
|
|
68
|
+ <i slot="icon" class="iconfont iconstep_current" v-if="item.auditState != 2 && processActive <= index"></i>
|
|
69
|
+ <i slot="icon" style="color: red" class="iconfont iconstep_err" v-if="item.auditState == 2"></i>
|
|
70
|
+ <i slot="icon" style="color: green" class="iconfont iconstep_complete"
|
|
71
|
+ v-if="
|
|
72
|
+ (processActive == index && item.auditState == 4) ||
|
|
73
|
+ processActive > index
|
|
74
|
+ "
|
|
75
|
+ ></i>
|
|
76
|
+ </template>
|
|
77
|
+ </el-step>
|
|
78
|
+ </el-steps>
|
194
|
79
|
</div>
|
195
|
80
|
</div>
|
|
81
|
+ <div class="btns">
|
|
82
|
+ <el-button type="cancel" @click="goBack()">返回</el-button>
|
|
83
|
+ <el-button class="saveBtn" v-show="isShow" type="savebtn" @click="save()" :loading="loading">{{ this.button }}</el-button>
|
|
84
|
+ </div>
|
196
|
85
|
</div>
|
197
|
86
|
</div>
|
198
|
87
|
</div>
|
|
@@ -221,8 +110,6 @@ export default {
|
221
|
110
|
isShow: true,
|
222
|
111
|
//初始化空对象
|
223
|
112
|
obj: {},
|
224
|
|
- pageType: 0,
|
225
|
|
-
|
226
|
113
|
//流程id
|
227
|
114
|
processId: "",
|
228
|
115
|
//当前登录人信息
|
|
@@ -270,6 +157,7 @@ export default {
|
270
|
157
|
//流程选项
|
271
|
158
|
|
272
|
159
|
subList: [],
|
|
160
|
+ tableDataAudit:[]
|
273
|
161
|
}
|
274
|
162
|
},
|
275
|
163
|
methods: {
|
|
@@ -287,12 +175,8 @@ export default {
|
287
|
175
|
|
288
|
176
|
// 用户字典列表
|
289
|
177
|
getUserList() {
|
290
|
|
- // var params = {
|
291
|
|
- // depotId: this.depotId,
|
292
|
|
- // }
|
293
|
178
|
userList().then((res) => {
|
294
|
179
|
if (res.code == 200) {
|
295
|
|
- console.log(res, "用户列表。。。。。")
|
296
|
180
|
this.perList = res.data
|
297
|
181
|
}
|
298
|
182
|
})
|
|
@@ -300,27 +184,27 @@ export default {
|
300
|
184
|
|
301
|
185
|
//获取流程数据
|
302
|
186
|
processList() {
|
303
|
|
- var type = "tf"
|
|
187
|
+ var type = null;
|
|
188
|
+ if(this.stepActive == 0 || this.stepActive == 1 || this.stepActive == 2){
|
|
189
|
+ type = "xzjh"
|
|
190
|
+ }else if(this.stepActive == 3 || this.stepActive == 4){
|
|
191
|
+ type = "xzsq"
|
|
192
|
+ }
|
304
|
193
|
var userId = this.userInfo.uid
|
305
|
194
|
var depotId = this.userInfo.depotId
|
306
|
195
|
getProcessList(type, userId, depotId).then((res) => {
|
307
|
196
|
if (res.code == 200) {
|
308
|
|
- for (let i = 0; i < res.data.length - 1; i++) {
|
|
197
|
+ for (let i = 0; i < res.data.length; i++) {
|
309
|
198
|
var ele = res.data[i]
|
310
|
199
|
if (ele.auditState != null) {
|
311
|
200
|
this.processActive = i
|
312
|
201
|
}
|
313
|
|
- console.log(ele, "ele.....")
|
314
|
|
-
|
315
|
202
|
this.process.push(ele)
|
316
|
203
|
}
|
317
|
|
- // this.process[0].uName = this.userInfo.uname;
|
318
|
|
- console.log(this.process, "this.process...")
|
319
|
|
-
|
320
|
204
|
if (this.process[0].content == 0) {
|
321
|
205
|
this.process[0].content = this.userInfo.uid
|
322
|
|
- console.log(this.process[0].content, "this.process[0].content....")
|
323
|
206
|
}
|
|
207
|
+ this.tableDataAudit = this.process
|
324
|
208
|
|
325
|
209
|
//申请人
|
326
|
210
|
this.applyPeople = this.process[0].content
|
|
@@ -345,12 +229,14 @@ export default {
|
345
|
229
|
this.tableData = this.totalData[2].list
|
346
|
230
|
} else if (this.stepActive == 3) {
|
347
|
231
|
this.tableData = this.totalData[3].list
|
|
232
|
+ this.mainId = this.totalData[3].step.id
|
|
233
|
+ } else if (this.stepActive == 4) {
|
|
234
|
+ this.tableData = this.totalData[4].list
|
348
|
235
|
}
|
349
|
236
|
// this.tableData = this.totalData[this.stepActive].list
|
350
|
237
|
},
|
351
|
238
|
//radio选项改变是
|
352
|
239
|
radioChange(row) {
|
353
|
|
- console.log(getNowFormatDate())
|
354
|
240
|
row.operationTime = getNowFormatDate()
|
355
|
241
|
this.changeBtn(this.tableData)
|
356
|
242
|
},
|
|
@@ -367,9 +253,9 @@ export default {
|
367
|
253
|
}
|
368
|
254
|
|
369
|
255
|
if (finish) {
|
370
|
|
- if (this.stepActive == 0) {
|
|
256
|
+ if (this.stepActive == 0 || this.stepActive == 3) {
|
371
|
257
|
this.button = "保存并提交"
|
372
|
|
- } else if (this.stepActive != 3 || this.step != 4) {
|
|
258
|
+ } else if (this.stepActive == 1 || this.stepActive == 2) {
|
373
|
259
|
this.button = "保存"
|
374
|
260
|
} else {
|
375
|
261
|
this.button = "完成"
|
|
@@ -386,64 +272,64 @@ export default {
|
386
|
272
|
stepClick(index) {
|
387
|
273
|
//this.step = index + 1
|
388
|
274
|
console.log(this.step, this.stepActive + 1)
|
|
275
|
+
|
389
|
276
|
if (index > this.stepActive) {
|
390
|
277
|
return
|
391
|
278
|
}
|
392
|
|
- this.step = index + 1
|
393
|
|
-
|
394
|
|
- if (this.pageType == 2) {
|
395
|
|
- this.isShow = true
|
396
|
|
- } else {
|
|
279
|
+ if(index != this.stepActive){
|
|
280
|
+ this.disabled = true
|
397
|
281
|
this.isShow = false
|
|
282
|
+ }else if(index == this.stepActive){
|
|
283
|
+ this.disabled = false
|
|
284
|
+ this.isShow = true
|
398
|
285
|
}
|
|
286
|
+ this.step = index + 1
|
399
|
287
|
|
400
|
288
|
console.log("step:" + this.step);
|
401
|
289
|
|
402
|
290
|
if (this.step == 1) {
|
|
291
|
+ console.log(this.totalData)
|
403
|
292
|
this.tableData = this.totalData[0].list
|
404
|
|
-
|
405
|
|
- this.button = "保存并提交"
|
406
|
|
- //2修改 3查看
|
407
|
|
-
|
408
|
|
- // if (this.pageType == 2||this.pageType ==3) {
|
409
|
|
- // //保存按钮隐藏
|
410
|
|
- // this.isShow = false
|
411
|
|
- // // this.disabled=true
|
412
|
|
- // console.log(this.disabled,"this.disabled...")
|
413
|
|
-
|
414
|
|
- // }else{
|
415
|
|
- // this.isShow = true
|
416
|
|
- // }
|
417
|
|
-
|
418
|
|
- // if(this.pageType !=3){
|
419
|
|
- // this.disabled=false
|
420
|
|
- // }else{
|
421
|
|
- // this.disabled = true
|
422
|
|
- // }
|
423
|
|
- if (this.pageType == 1) {
|
424
|
|
- this.disabled = false
|
425
|
|
- this.isShow = true
|
426
|
|
- } else if (this.pageType == 2) {
|
427
|
|
- this.disabled = true;
|
428
|
|
- this.isShow = false
|
429
|
|
- } else {
|
430
|
|
- this.disabled = true
|
431
|
|
- this.isShow = false
|
|
293
|
+ console.log(this.tableData)
|
|
294
|
+ this.tableDataAudit = this.totalData[0].audit
|
|
295
|
+ for (let i = 0; i < this.tableDataAudit.length; i++) {
|
|
296
|
+ var ele = this.tableDataAudit[i]
|
|
297
|
+ if (ele.auditState == 0) {
|
|
298
|
+ this.processActive = i
|
|
299
|
+ }else{
|
|
300
|
+ this.processActive = this.tableDataAudit.length
|
|
301
|
+ }
|
432
|
302
|
}
|
|
303
|
+ this.button = "保存并提交"
|
433
|
304
|
} else if (this.step == 2) {
|
434
|
305
|
// this.isShow = true
|
435
|
306
|
this.tableData = this.totalData[1].list
|
|
307
|
+ this.tableDataAudit = []
|
436
|
308
|
console.log(this.tableData, "第二步")
|
437
|
309
|
this.button = "暂存"
|
438
|
|
- this.disabled = false
|
439
|
310
|
} else if (this.step == 3) {
|
440
|
311
|
// this.isShow = true
|
441
|
312
|
this.tableData = this.totalData[2].list
|
|
313
|
+ this.tableDataAudit = []
|
442
|
314
|
this.button = "暂存"
|
443
|
|
- this.disabled = false
|
444
|
315
|
} else if (this.step == 4) {
|
445
|
|
- // this.isShow = true
|
|
316
|
+ console.log(this.totalData)
|
446
|
317
|
this.tableData = this.totalData[3].list
|
|
318
|
+ console.log(this.tableData)
|
|
319
|
+ this.tableDataAudit = this.totalData[3].audit
|
|
320
|
+ for (let i = 0; i < this.tableDataAudit.length; i++) {
|
|
321
|
+ var ele = this.tableDataAudit[i]
|
|
322
|
+ if (ele.auditState == 0) {
|
|
323
|
+ this.processActive = i
|
|
324
|
+ }else{
|
|
325
|
+ this.processActive = this.tableDataAudit.length
|
|
326
|
+ }
|
|
327
|
+ }
|
|
328
|
+ this.button = "保存并提交"
|
|
329
|
+ } else if (this.step == 5) {
|
|
330
|
+ // this.isShow = true
|
|
331
|
+ this.tableData = this.totalData[4].list
|
|
332
|
+ this.tableDataAudit = []
|
447
|
333
|
this.button = "暂存"
|
448
|
334
|
this.disabled = false
|
449
|
335
|
}
|
|
@@ -457,18 +343,16 @@ export default {
|
457
|
343
|
},
|
458
|
344
|
//新增时初始化页面
|
459
|
345
|
processFirst() {
|
460
|
|
- var type = "tf"
|
|
346
|
+ var type = "xz"
|
461
|
347
|
getAddList(type)
|
462
|
348
|
.then((res) => {
|
463
|
349
|
if (res.code == 200) {
|
464
|
350
|
this.totalData = res.data
|
465
|
351
|
|
466
|
|
- this.totalData[0].list.splice(1, 0, {
|
467
|
|
- details: "是,否",
|
468
|
|
- process: this.process,
|
469
|
|
- })
|
470
|
|
-
|
471
|
|
- // this.$set(this.totalData[0].list, "process", this.process)
|
|
352
|
+ // this.totalData[0].list.splice(1, 0, {
|
|
353
|
+ // details: "是,否",
|
|
354
|
+ // process: this.process,
|
|
355
|
+ // })
|
472
|
356
|
this.main_id = this.totalData[0].step.id
|
473
|
357
|
console.log(this.totalData, "this.totalData..")
|
474
|
358
|
this.tableShow()
|
|
@@ -482,9 +366,15 @@ export default {
|
482
|
366
|
//流程新增
|
483
|
367
|
tfAdd() {
|
484
|
368
|
this.loading=true;
|
|
369
|
+ let type = null;
|
|
370
|
+ if(this.stepActive == 0 || this.stepActive == 1 || this.stepActive == 2){
|
|
371
|
+ type = "xzjh"
|
|
372
|
+ }else if(this.stepActive == 3 || this.stepActive == 4){
|
|
373
|
+ type = "xzsq"
|
|
374
|
+ }
|
485
|
375
|
var data = {
|
486
|
376
|
//流程类型
|
487
|
|
- type: "tf",
|
|
377
|
+ type: type,
|
488
|
378
|
//主流程id
|
489
|
379
|
mainId: this.mainId,
|
490
|
380
|
//主流程索引
|
|
@@ -492,7 +382,7 @@ export default {
|
492
|
382
|
|
493
|
383
|
subList: this.subList,
|
494
|
384
|
//仓房id
|
495
|
|
- houseId: this.$store.state.houseId,
|
|
385
|
+ houseId: Number(this.$store.state.houseId),
|
496
|
386
|
//库id
|
497
|
387
|
depotId: this.$store.state.depotId,
|
498
|
388
|
//发起人
|
|
@@ -510,20 +400,25 @@ export default {
|
510
|
400
|
console.log(res.data)
|
511
|
401
|
if (res.code == 200) {
|
512
|
402
|
this.loading=true;
|
|
403
|
+ this.$message.success(res.msg);
|
513
|
404
|
this.$router.push({
|
514
|
405
|
path: "/reservesManagement/fumigationManagement",
|
515
|
406
|
})
|
|
407
|
+ }else{
|
|
408
|
+ this.$message.error(res.msg);
|
|
409
|
+ this.loading=false;
|
516
|
410
|
}
|
517
|
411
|
})
|
518
|
412
|
.catch((err) => {
|
|
413
|
+ this.$message.error(res.msg);
|
|
414
|
+ this.loading=false;
|
519
|
415
|
console.log(err)
|
520
|
416
|
})
|
521
|
417
|
},
|
522
|
418
|
|
523
|
419
|
//点击保存并提交按钮时
|
524
|
420
|
save() {
|
525
|
|
- console.log(this.tableData,"this.tableData...>>>>>")
|
526
|
|
- if( this.totalData[0].list[0].subData == 1){
|
|
421
|
+ if( this.totalData[this.stepActive].list[0].subData == 1){
|
527
|
422
|
this.$message("只有选择是才能发起申请");
|
528
|
423
|
return;
|
529
|
424
|
}
|
|
@@ -534,24 +429,19 @@ export default {
|
534
|
429
|
obj.subId = ele.id
|
535
|
430
|
obj.mainId = ele.zid
|
536
|
431
|
obj.operationTime = ele.operationTime
|
537
|
|
- console.log(obj, "obj.....")
|
|
432
|
+ obj.processId = ''
|
|
433
|
+ if(this.$route.query && this.$route.query.processId){
|
|
434
|
+ obj.processId = this.$route.query.processId
|
|
435
|
+ }
|
538
|
436
|
if (obj.subData != null) {
|
539
|
437
|
this.subList.push(obj)
|
540
|
438
|
}
|
541
|
439
|
})
|
542
|
|
- console.log(this.subList, "??????")
|
543
|
|
-
|
544
|
440
|
if (this.button == "保存并提交") {
|
545
|
|
- console.log(this.totalData, "......")
|
546
|
|
- console.log(this.process, "process....s")
|
547
|
|
- if (this.totalData[0].list[0].subData == null) {
|
|
441
|
+ if (this.totalData[this.stepActive].list[0].subData == null) {
|
548
|
442
|
this.$message("请先选择选项");
|
549
|
|
-
|
550
|
|
-
|
551
|
443
|
return;
|
552
|
|
-
|
553
|
444
|
}
|
554
|
|
-
|
555
|
445
|
//判断是否选择了审批人
|
556
|
446
|
var flag = true
|
557
|
447
|
this.process.forEach((item) => {
|
|
@@ -561,43 +451,24 @@ export default {
|
561
|
451
|
return
|
562
|
452
|
}
|
563
|
453
|
})
|
564
|
|
-
|
565
|
454
|
if (flag) {
|
566
|
|
- // if(this.totalData[0].list[0].subData == 1){
|
567
|
|
-
|
568
|
|
- // this.$message("只有选择是才能发起申请");
|
569
|
|
-
|
570
|
|
- // return;
|
571
|
|
- // }
|
572
|
455
|
this.tfAdd()
|
573
|
|
-
|
574
|
|
-
|
575
|
456
|
}
|
576
|
457
|
} else {
|
577
|
|
- //this.getUpdateList()
|
578
|
458
|
if (this.button == "暂存") {
|
579
|
459
|
this.auditState = 3
|
580
|
460
|
this.ongoingStep = this.stepActive
|
581
|
461
|
this.getUpdateList()
|
582
|
462
|
} else if (this.button == "保存" || this.button == "完成") {
|
583
|
463
|
console.log("保存。。")
|
584
|
|
- if (this.stepActive + 1 == this.step) {
|
585
|
|
- this.stepActive = this.stepActive + 1
|
586
|
|
- }
|
|
464
|
+ // if (this.stepActive + 1 == this.step) {
|
|
465
|
+ // this.stepActive = this.stepActive + 1
|
|
466
|
+ // }
|
587
|
467
|
if (this.button == "保存") {
|
588
|
468
|
this.auditState = 3
|
589
|
469
|
} else {
|
590
|
470
|
this.auditState = 4
|
591
|
471
|
}
|
592
|
|
-
|
593
|
|
- // if (this.stepActive < this.tableData.length - 1) {
|
594
|
|
- // this.auditState = 3
|
595
|
|
- // this.stepActive = this.stepActive + 1
|
596
|
|
- // } else {
|
597
|
|
- // this.auditState = 4
|
598
|
|
- // this.stepActive = this.stepActive + 1
|
599
|
|
- // }
|
600
|
|
-
|
601
|
472
|
this.getUpdateList()
|
602
|
473
|
}
|
603
|
474
|
}
|
|
@@ -609,29 +480,30 @@ export default {
|
609
|
480
|
checkList(processId).then((res) => {
|
610
|
481
|
console.log(res.data, "查看数据")
|
611
|
482
|
if (res.code == 200) {
|
612
|
|
- this.tableData = res.data.process
|
613
|
|
- this.totalData = this.tableData
|
614
|
|
-
|
615
|
|
- for (let i = 0; i < res.data.audit.length - 1; i++) {
|
616
|
|
- var ele = res.data.audit[i]
|
617
|
|
- if (ele.auditState != null) {
|
618
|
|
- this.processActive = i
|
619
|
|
- }
|
620
|
|
- this.process.push(ele)
|
621
|
|
- if (this.process[0].content == 0) {
|
622
|
|
- this.process[0].content = this.userInfo.uid
|
623
|
|
- } else {
|
624
|
|
- this.process[0].content = res.data.audit[0].content
|
|
483
|
+ this.totalData = res.data.process
|
|
484
|
+ let ongoingStep = this.stepActive
|
|
485
|
+ this.tableData = res.data.process[ongoingStep].list
|
|
486
|
+ if(res.data.process[ongoingStep].audit){
|
|
487
|
+ // this.tableDataAudit = res.data.process[ongoingStep].audit
|
|
488
|
+ for (let i = 0; i < res.data.process[ongoingStep].audit.length; i++) {
|
|
489
|
+ var ele = res.data.process[ongoingStep].audit[i]
|
|
490
|
+ if (ele.auditState == 0) {
|
|
491
|
+ this.processActive = i
|
|
492
|
+ }
|
|
493
|
+ // this.process.push(ele)
|
|
494
|
+ // if (this.process[0].content == 0) {
|
|
495
|
+ // this.process[0].content = this.userInfo.uid
|
|
496
|
+ // } else {
|
|
497
|
+ // this.process[0].content = res.data.process[ongoingStep].audit[0].content
|
|
498
|
+ // }
|
625
|
499
|
}
|
|
500
|
+ this.processList()
|
|
501
|
+ this.tableShow()
|
626
|
502
|
}
|
627
|
|
- console.log(this.process, " this.process.....")
|
628
|
|
- console.log(this.stepActive, "this.stepActive...")
|
629
|
|
- this.tableData = res.data.process[this.stepActive].list
|
630
|
|
- console.log(this.tableData, "tableData.......??????")
|
631
|
|
- this.totalData[0].list.splice(1, 0, {
|
632
|
|
- details: "是,否",
|
633
|
|
- process: this.process,
|
634
|
|
- })
|
|
503
|
+ // this.totalData[0].list.splice(1, 0, {
|
|
504
|
+ // details: "是,否",
|
|
505
|
+ // process: this.process,
|
|
506
|
+ // })
|
635
|
507
|
}
|
636
|
508
|
})
|
637
|
509
|
},
|
|
@@ -639,11 +511,23 @@ export default {
|
639
|
511
|
//每步新增/修改
|
640
|
512
|
getUpdateList() {
|
641
|
513
|
this.loading=true;
|
|
514
|
+ let type = null;
|
|
515
|
+ if(this.stepActive == 0 || this.stepActive == 1 || this.stepActive == 2){
|
|
516
|
+ type = "xzjh"
|
|
517
|
+ }else if(this.stepActive == 3 || this.stepActive == 4){
|
|
518
|
+ type = "xzsq"
|
|
519
|
+ }
|
|
520
|
+ let ongoingStepNum = null
|
|
521
|
+ if(this.stepActive < 4){
|
|
522
|
+ ongoingStepNum = this.stepActive + 1
|
|
523
|
+ }else{
|
|
524
|
+ ongoingStepNum = this.stepActive
|
|
525
|
+ }
|
642
|
526
|
var data = {
|
643
|
527
|
processId: this.processId,
|
644
|
|
- type: "tf",
|
|
528
|
+ type: type,
|
645
|
529
|
auditState: this.auditState,
|
646
|
|
- ongoingStep: this.stepActive,
|
|
530
|
+ ongoingStep: ongoingStepNum,
|
647
|
531
|
subList: this.subList,
|
648
|
532
|
}
|
649
|
533
|
updateList(data).then((res) => {
|
|
@@ -659,21 +543,9 @@ export default {
|
659
|
543
|
|
660
|
544
|
mounted() {
|
661
|
545
|
//获取当前缓存的用户信息
|
662
|
|
- // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
|
663
|
|
- // console.log(this.userInfo, "this.userInfo.....")
|
664
|
546
|
this.userInfo = JSON.parse(getUser())
|
665
|
|
- console.log(this.userInfo, "this.userInfo.....?????")
|
666
|
|
-
|
667
|
|
- console.log(this.$route.query, "route...")
|
668
|
|
- this.pageType = this.$route.query.type
|
669
|
|
- console.log(this.pageType, "pageType......")
|
670
|
547
|
this.step = this.stepActive + 1
|
671
|
|
- console.log(this.stepActive, "stepActive.....")
|
672
|
|
-
|
673
|
548
|
this.getUserList()
|
674
|
|
- // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
|
675
|
|
- // console.log(this.userInfo, "this.userInfo.....")
|
676
|
|
-
|
677
|
549
|
if (this.$route.query.type == 1) {
|
678
|
550
|
this.isShow = true
|
679
|
551
|
this.disabled = false
|
|
@@ -683,27 +555,20 @@ export default {
|
683
|
555
|
this.isShow = true
|
684
|
556
|
this.disabled = false
|
685
|
557
|
this.stepActive = parseInt(this.$route.query.ongoingStep)
|
686
|
|
- console.log(this.stepActive, "修改this.stepActive....")
|
687
|
558
|
this.processId = this.$route.query.processId
|
688
|
|
- // this.pageType = this.$route.query.type
|
689
|
559
|
this.step = this.stepActive + 1
|
690
|
|
-
|
691
|
560
|
this.getCheckList()
|
692
|
561
|
} else if (this.$route.query.type == 3) {
|
693
|
562
|
this.isShow = false
|
694
|
563
|
this.disabled = true
|
695
|
|
- console.log(this.$route.query.processId, "this.$route.query....")
|
696
|
|
- //返回按钮
|
697
|
|
- // this.pageType = this.$route.query.type
|
698
|
564
|
this.processId = this.$route.query.processId
|
699
|
565
|
//高亮显示
|
700
|
566
|
this.stepActive = parseInt(this.$route.query.ongoingStep)
|
701
|
567
|
this.step = this.stepActive + 1
|
702
|
|
- console.log(this.processId, "this.processId...")
|
703
|
568
|
this.getCheckList()
|
704
|
569
|
}
|
705
|
570
|
|
706
|
|
- if (this.stepActive == 0) {
|
|
571
|
+ if (this.stepActive == 0 || this.stepActive == 3) {
|
707
|
572
|
this.button = "保存并提交"
|
708
|
573
|
} else {
|
709
|
574
|
this.button = "暂存"
|
|
@@ -749,7 +614,7 @@ export default {
|
749
|
614
|
}
|
750
|
615
|
.btns {
|
751
|
616
|
text-align: right;
|
752
|
|
- margin: 20px 10px 0 0;
|
|
617
|
+ margin: 40px 10px 0 0;
|
753
|
618
|
}
|
754
|
619
|
// .saveBtn{
|
755
|
620
|
// width:120px;
|
|
@@ -771,7 +636,7 @@ export default {
|
771
|
636
|
font-size: 18px;
|
772
|
637
|
}
|
773
|
638
|
.el-steps {
|
774
|
|
- height: 330px !important;
|
|
639
|
+ // height: 330px !important;
|
775
|
640
|
}
|
776
|
641
|
|
777
|
642
|
.icon_wai{
|