Browse Source

熏蒸管理

mengy 3 years ago
parent
commit
412fe92904

+ 4 - 1
shanXiPlatform/src/views/home/daiBan/daiBanTabs.vue

@@ -79,7 +79,10 @@ export default {
79 79
     if (
80 80
       this.$route.name == "IniDetails" ||
81 81
       this.$route.name == "PenDetails" ||
82
-      this.$route.name == "ProDetails"
82
+      this.$route.name == "ProDetails" ||
83
+      this.$route.name == "XunzengDetails" ||
84
+      this.$route.name == "proXunzengDetails" ||
85
+      this.$route.name == "IniXunzengDetails"
83 86
     ) {
84 87
       this.isShow = false
85 88
     } else {

+ 87 - 39
shanXiPlatform/src/views/home/daiBan/initiated/index.vue

@@ -14,7 +14,7 @@
14 14
         <div class="middle">
15 15
           <div class="middle_flex" v-if="item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
16 16
             <div>仓号:</div>
17
-            <div>{{ item.houseName }}</div>
17
+            <div>{{ hourseDic[item.houseId] }}</div>
18 18
           </div>
19 19
           <div class="middle_flex">
20 20
             <div>申请人:</div>
@@ -145,7 +145,7 @@ export default {
145 145
   mounted() {
146 146
    
147 147
     console.log(this.$route)
148
-    if (this.$route.name == "IniDetails") {
148
+    if (this.$route.name == "IniDetails" || this.$route.name == "IniXunzengDetails") {
149 149
       this.isShow = false
150 150
     } else {
151 151
       this.isShow = true
@@ -174,44 +174,92 @@ export default {
174 174
       //  console.log(userInfo,"/////")
175 175
       //   let homeType = userInfo.homeType
176 176
       var homeType = this.userInfo.homeType
177
-      if (homeType == 1) {
178
-        this.$router.push({
179
-          path: "/dashboard/daiban/initiated/iniDetails",
180
-          query: {
181
-            processId: item.processId,
182
-            houseName: item.houseName,
183
-            applyName: item.applyName,
184
-            departmentName: item.departmentName,
185
-            companyName: item.companyName,
186
-            workName: item.workName,
187
-          },
188
-        })
189
-      } else if (homeType == 2) {
190
-        this.$router.push({
191
-          path: "/dashboard/daiban/initiated/iniDetails",
192
-          query: {
193
-            processId: item.processId,
194
-            houseName: item.houseName,
195
-            applyName: item.applyName,
196
-            departmentName: item.departmentName,
197
-            companyName: item.companyName,
198
-            workName: item.workName,
199
-          },
200
-        })
201
-      } else if (homeType == 3) {
202
-        this.$router.push({
203
-          path: "/home/daiban/initiated/iniDetails",
204
-          query: {
205
-            processId: item.processId,
206
-            houseName: item.houseName,
207
-            applyName: item.applyName,
208
-            departmentName: item.departmentName,
209
-            companyName: item.companyName,
210
-            workName: item.workName,
211
-          },
212
-        })
177
+      if(item.type == 'xzjh' || item.type == 'xzsq'){
178
+        if (homeType == 1) {
179
+          this.$router.push({
180
+            path: "/dashboard/daiban/initiated/inixunzengDetails",
181
+            query: {
182
+              processId: item.processId,
183
+              houseName: item.houseName,
184
+              applyName: item.applyName,
185
+              departmentName: item.departmentName,
186
+              companyName: item.companyName,
187
+              workName: item.workName,
188
+              ongoingStep: item.ongoingStep,
189
+              type: item.type
190
+            },
191
+          })
192
+        } else if (homeType == 2) {
193
+          this.$router.push({
194
+            path: "/dashboard/daiban/initiated/inixunzengDetails",
195
+            query: {
196
+              processId: item.processId,
197
+              houseName: item.houseName,
198
+              applyName: item.applyName,
199
+              departmentName: item.departmentName,
200
+              companyName: item.companyName,
201
+              workName: item.workName,
202
+              ongoingStep: item.ongoingStep,
203
+              type: item.type
204
+            },
205
+          })
206
+        } else if (homeType == 3) {
207
+          this.$router.push({
208
+            path: "/home/daiban/initiated/inixunzengDetails",
209
+            query: {
210
+              processId: item.processId,
211
+              houseName: item.houseName,
212
+              applyName: item.applyName,
213
+              departmentName: item.departmentName,
214
+              companyName: item.companyName,
215
+              workName: item.workName,
216
+              ongoingStep: item.ongoingStep,
217
+              type: item.type
218
+            },
219
+          })
220
+        }
221
+      }else{
222
+        if (homeType == 1) {
223
+          this.$router.push({
224
+            path: "/dashboard/daiban/initiated/iniDetails",
225
+            query: {
226
+              processId: item.processId,
227
+              houseName: item.houseName,
228
+              applyName: item.applyName,
229
+              departmentName: item.departmentName,
230
+              companyName: item.companyName,
231
+              workName: item.workName,
232
+              ongoingStep: item.ongoingStep
233
+            },
234
+          })
235
+        } else if (homeType == 2) {
236
+          this.$router.push({
237
+            path: "/dashboard/daiban/initiated/iniDetails",
238
+            query: {
239
+              processId: item.processId,
240
+              houseName: item.houseName,
241
+              applyName: item.applyName,
242
+              departmentName: item.departmentName,
243
+              companyName: item.companyName,
244
+              workName: item.workName,
245
+              ongoingStep: item.ongoingStep
246
+            },
247
+          })
248
+        } else if (homeType == 3) {
249
+          this.$router.push({
250
+            path: "/home/daiban/initiated/iniDetails",
251
+            query: {
252
+              processId: item.processId,
253
+              houseName: item.houseName,
254
+              applyName: item.applyName,
255
+              departmentName: item.departmentName,
256
+              companyName: item.companyName,
257
+              workName: item.workName,
258
+              ongoingStep: item.ongoingStep
259
+            },
260
+          })
261
+        }
213 262
       }
214
-     
215 263
     },
216 264
     //列表数据
217 265
     getInitiated() {

+ 17 - 10
shanXiPlatform/src/views/home/daiBan/initiated/xunzengDetails.vue

@@ -29,6 +29,7 @@
29 29
         <div style="margin-left: 20px">
30 30
           <span v-if="type == 'tf'">1.制定通风方案:</span>
31 31
           <span v-if="type == 'xzjh'">1.制定熏蒸计划:</span>
32
+          <span v-if="type == 'xzsq'">1.提交散气作业申请:</span>
32 33
           <span v-if="this.subData == 1">否</span>
33 34
           <span v-if="this.subData == 0">是</span>
34 35
         </div>
@@ -179,7 +180,8 @@ export default {
179 180
       subData: null,
180 181
       //审批数据
181 182
       applyData: [],
182
-      type: null
183
+      type: null,
184
+      ongoingStepNext: null
183 185
     }
184 186
   },
185 187
   methods: {
@@ -222,7 +224,7 @@ export default {
222 224
         id: this.row.id,
223 225
         auditState: this.auditState,
224 226
         // 进行到哪一步的主流程id
225
-        ongoingStep: this.ongoingStep,
227
+        ongoingStep: this.ongoingStepNext,
226 228
         auditTime: getNowFormatDate(),
227 229
       }
228 230
       Approval(data)
@@ -252,7 +254,7 @@ export default {
252 254
       var data = {
253 255
         id: this.row.id,
254 256
         auditState: this.auditState,
255
-        ongoingStep: this.ongoingStep,
257
+        ongoingStep: this.ongoingStepNext,
256 258
         auditTime: getNowFormatDate(),
257 259
       }
258 260
       yjcgApproval(data)
@@ -288,7 +290,7 @@ export default {
288 290
           this.auditState = 2
289 291
 
290 292
           // this.ongoingStep = 0
291
-           this.ongoingStep=this.ongoingStep
293
+           this.ongoingStepNext=this.ongoingStep
292 294
           this.process = []
293 295
           //this.getApproval()
294 296
           if (item.type == "yjcg" || item.type == "xzjh") {
@@ -315,15 +317,15 @@ export default {
315 317
        
316 318
       
317 319
         // this.ongoingStep = 1
318
-        this.ongoingStep=this.ongoingStep+1
319
-        console.log('审批后的ongoingStep'+this.ongoingStep)
320
+        this.ongoingStepNext=this.ongoingStep+1
321
+        console.log('审批后的ongoingStep'+this.ongoingStepNext)
320 322
       } else {
321 323
         this.auditState = 1
322 324
      
323 325
 
324 326
         // this.ongoingStep = 0
325
-         this.ongoingStep=this.ongoingStep
326
-         console.log('审批前的ongoingStep'+this.ongoingStep)
327
+         this.ongoingStepNext=this.ongoingStep
328
+         console.log('审批前的ongoingStep'+this.ongoingStepNext)
327 329
       }
328 330
 
329 331
       this.process = []
@@ -418,15 +420,20 @@ export default {
418 420
     this.row = this.$route.query
419 421
     console.log(this.row, "??????")
420 422
 
421
-    this.getCheckList()
422
-
423 423
     this.houseName = this.$route.query.houseName
424 424
     this.applyName = this.$route.query.applyName
425 425
     this.departmentName = this.$route.query.departmentName
426 426
     this.companyName = this.$route.query.companyName
427 427
     this.workName = this.$route.query.workName
428 428
     this.ongoingStep=parseInt(this.$route.query.ongoingStep)
429
+    if(this.$route.query.type == 'xzjh'){
430
+      this.ongoingStep = 0
431
+    }else if(this.$route.query.type == 'xzsq'){
432
+      this.ongoingStep = 3
433
+    }
429 434
     this.type = this.$route.query.type
435
+
436
+    this.getCheckList()
430 437
   },
431 438
 }
432 439
 </script>

+ 102 - 47
shanXiPlatform/src/views/home/daiBan/pending/index.vue

@@ -50,7 +50,7 @@
50 50
         <div class="middle">
51 51
           <div class="middle_flex"  v-if="item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
52 52
             <div>仓号:</div>
53
-            <div>{{ item.houseName }}</div>
53
+            <div>{{ hourseDic[item.houseId] }}</div>
54 54
           </div>
55 55
           <div class="middle_flex" v-if="item.type.indexOf('code') == -1">
56 56
             <div>申请人:</div>
@@ -188,7 +188,7 @@ export default {
188 188
   },
189 189
 
190 190
   mounted() {
191
-    if (this.$route.name == "PenDetails") {
191
+    if (this.$route.name == "PenDetails" || this.$route.name == "XunzengDetails") {
192 192
       this.isShow = false
193 193
     } else {
194 194
       this.isShow = true
@@ -221,51 +221,106 @@ export default {
221 221
 
222 222
       var homeType = this.userInfo.homeType
223 223
       if (item.type.indexOf('code') == -1) {
224
-        if (homeType == 1) {
225
-          this.$router.push({
226
-            path: "/dashboard/daiban/pending/penDetails",
227
-            query: {
228
-              processId: item.processId,
229
-              auditState: item.auditState,
230
-              id: item.id,
231
-              ongoingStep: item.ongoingStep,
232
-              houseName: item.houseName,
233
-              applyName: item.applyName,
234
-              departmentName: item.departmentName,
235
-              companyName: item.companyName,
236
-              workName: item.workName,
237
-            },
238
-          })
239
-        } else if (homeType == 2) {
240
-          this.$router.push({
241
-            path: "/dashboard/daiban/pending/penDetails",
242
-            query: {
243
-              processId: item.processId,
244
-              auditState: item.auditState,
245
-              id: item.id,
246
-              ongoingStep: item.ongoingStep,
247
-              houseName: item.houseName,
248
-              applyName: item.applyName,
249
-              departmentName: item.departmentName,
250
-              companyName: item.companyName,
251
-              workName: item.workName,
252
-            },
253
-          })
254
-        } else if (homeType == 3) {
255
-          this.$router.push({
256
-            path: "/home/daiban/pending/penDetails",
257
-            query: {
258
-              processId: item.processId,
259
-              auditState: item.auditState,
260
-              id: item.id,
261
-              ongoingStep: item.ongoingStep,
262
-              houseName: item.houseName,
263
-              applyName: item.applyName,
264
-              departmentName: item.departmentName,
265
-              companyName: item.companyName,
266
-              workName: item.workName,
267
-            },
268
-          })
224
+        if(item.type == 'xzjh' || item.type == 'xzsq'){
225
+          if (homeType == 1) {
226
+            this.$router.push({
227
+              name: "XunzengDetails",
228
+              query: {
229
+                processId: item.processId,
230
+                auditState: item.auditState,
231
+                id: item.id,
232
+                ongoingStep: item.ongoingStep,
233
+                houseName: item.houseName,
234
+                applyName: item.applyName,
235
+                departmentName: item.departmentName,
236
+                companyName: item.companyName,
237
+                workName: item.workName,
238
+                type: item.type,
239
+              },
240
+            })
241
+          } else if (homeType == 2) {
242
+            this.$router.push({
243
+              name: "XunzengDetails",
244
+              query: {
245
+                processId: item.processId,
246
+                auditState: item.auditState,
247
+                id: item.id,
248
+                ongoingStep: item.ongoingStep,
249
+                houseName: item.houseName,
250
+                applyName: item.applyName,
251
+                departmentName: item.departmentName,
252
+                companyName: item.companyName,
253
+                workName: item.workName,
254
+                type: item.type,
255
+              },
256
+            })
257
+          } else if (homeType == 3) {
258
+            this.$router.push({
259
+              name: "XunzengDetails",
260
+              query: {
261
+                processId: item.processId,
262
+                auditState: item.auditState,
263
+                id: item.id,
264
+                ongoingStep: item.ongoingStep,
265
+                houseName: item.houseName,
266
+                applyName: item.applyName,
267
+                departmentName: item.departmentName,
268
+                companyName: item.companyName,
269
+                workName: item.workName,
270
+                type: item.type,
271
+              },
272
+            })
273
+          }
274
+        }else{
275
+          if (homeType == 1) {
276
+            this.$router.push({
277
+              path: "/dashboard/daiban/pending/penDetails",
278
+              query: {
279
+                processId: item.processId,
280
+                auditState: item.auditState,
281
+                id: item.id,
282
+                ongoingStep: item.ongoingStep,
283
+                houseName: item.houseName,
284
+                applyName: item.applyName,
285
+                departmentName: item.departmentName,
286
+                companyName: item.companyName,
287
+                workName: item.workName,
288
+                type: item.type,
289
+              },
290
+            })
291
+          } else if (homeType == 2) {
292
+            this.$router.push({
293
+              path: "/dashboard/daiban/pending/penDetails",
294
+              query: {
295
+                processId: item.processId,
296
+                auditState: item.auditState,
297
+                id: item.id,
298
+                ongoingStep: item.ongoingStep,
299
+                houseName: item.houseName,
300
+                applyName: item.applyName,
301
+                departmentName: item.departmentName,
302
+                companyName: item.companyName,
303
+                workName: item.workName,
304
+                type: item.type,
305
+              },
306
+            })
307
+          } else if (homeType == 3) {
308
+            this.$router.push({
309
+              path: "/home/daiban/pending/penDetails",
310
+              query: {
311
+                processId: item.processId,
312
+                auditState: item.auditState,
313
+                id: item.id,
314
+                ongoingStep: item.ongoingStep,
315
+                houseName: item.houseName,
316
+                applyName: item.applyName,
317
+                departmentName: item.departmentName,
318
+                companyName: item.companyName,
319
+                workName: item.workName,
320
+                type: item.type,
321
+              },
322
+            })
323
+          }
269 324
         }
270 325
       }else if(item.type == 'code3' || item.type == 'code4'|| item.type == 'code9'|| item.type == 'code10'|| item.type == 'code11'|| item.type == 'code12') {
271 326
           this.$router.push({

+ 4 - 1
shanXiPlatform/src/views/home/daiBan/pending/penDetails.vue

@@ -27,7 +27,8 @@
27 27
       </div>
28 28
       <div class="table_middle">
29 29
         <div style="margin-left: 20px">
30
-          1.制定通风方案:
30
+          <span v-if="type == 'tf'">1.制定通风方案:</span>
31
+          <span v-if="type == 'xzjh'">1.制定熏蒸计划:</span>
31 32
           <span v-if="this.subData == 1">否</span>
32 33
           <span v-if="this.subData == 0">是</span>
33 34
         </div>
@@ -178,6 +179,7 @@ export default {
178 179
       subData: null,
179 180
       //审批数据
180 181
       applyData: [],
182
+      type: null
181 183
     }
182 184
   },
183 185
   methods: {
@@ -426,6 +428,7 @@ export default {
426 428
     this.companyName = this.$route.query.companyName
427 429
     this.workName = this.$route.query.workName
428 430
     this.ongoingStep=parseInt(this.$route.query.ongoingStep)
431
+    this.type = this.$route.query.type
429 432
   },
430 433
 }
431 434
 </script>

+ 15 - 25
shanXiPlatform/src/views/home/daiBan/pending/xunzengDetails.vue

@@ -29,6 +29,7 @@
29 29
         <div style="margin-left: 20px">
30 30
           <span v-if="type == 'tf'">1.制定通风方案:</span>
31 31
           <span v-if="type == 'xzjh'">1.制定熏蒸计划:</span>
32
+          <span v-if="type == 'xzsq'">1.提交散气作业申请:</span>
32 33
           <span v-if="this.subData == 1">否</span>
33 34
           <span v-if="this.subData == 0">是</span>
34 35
         </div>
@@ -179,7 +180,8 @@ export default {
179 180
       subData: null,
180 181
       //审批数据
181 182
       applyData: [],
182
-      type: null
183
+      type: null,
184
+      ongoingStepNext: null
183 185
     }
184 186
   },
185 187
   methods: {
@@ -190,8 +192,6 @@ export default {
190 192
         .then((res) => {
191 193
           console.log(res.data, "......")
192 194
           if (res.code == 200) {
193
-            
194
-
195 195
             let ongoingStep = this.ongoingStep
196 196
             this.subData = res.data.process[ongoingStep].list[0].subData  //方案状态
197 197
             this.tableData = res.data.process[ongoingStep]
@@ -222,7 +222,7 @@ export default {
222 222
         id: this.row.id,
223 223
         auditState: this.auditState,
224 224
         // 进行到哪一步的主流程id
225
-        ongoingStep: this.ongoingStep,
225
+        ongoingStep: this.ongoingStepNext,
226 226
         auditTime: getNowFormatDate(),
227 227
       }
228 228
       Approval(data)
@@ -237,10 +237,10 @@ export default {
237 237
 
238 238
           this.getCheckList()
239 239
           this.getPending()
240
-          this.$router.push({
241
-            path: "/dashboard/daiban/pending/xunzengDetails",
242
-            item: this.$route.query,
243
-          })
240
+          // this.$router.push({
241
+          //   path: "/dashboard/daiban/pending/xunzengDetails",
242
+          //   item: this.$route.query,
243
+          // })
244 244
         })
245 245
         .catch((err) => {
246 246
           console.log(err)
@@ -252,7 +252,7 @@ export default {
252 252
       var data = {
253 253
         id: this.row.id,
254 254
         auditState: this.auditState,
255
-        ongoingStep: this.ongoingStep,
255
+        ongoingStep: this.ongoingStepNext,
256 256
         auditTime: getNowFormatDate(),
257 257
       }
258 258
       yjcgApproval(data)
@@ -286,9 +286,7 @@ export default {
286 286
       })
287 287
         .then(() => {
288 288
           this.auditState = 2
289
-
290
-          // this.ongoingStep = 0
291
-           this.ongoingStep=this.ongoingStep
289
+          this.ongoingStepNext=this.ongoingStep
292 290
           this.process = []
293 291
           //this.getApproval()
294 292
           if (item.type == "yjcg" || item.type == "xzjh") {
@@ -303,8 +301,6 @@ export default {
303 301
 
304 302
     //审批通过
305 303
     agree(item, index) {
306
-      console.log(item, "??????????")
307
-      console.log(index, "index......")
308 304
       //最后一个人通过
309 305
       if (index == this.process.length - 1) {
310 306
         if(item.type == "yjcg"){
@@ -312,18 +308,13 @@ export default {
312 308
         }else{
313 309
            this.auditState = 3
314 310
         }
315
-       
316
-      
317
-        // this.ongoingStep = 1
318
-        this.ongoingStep=this.ongoingStep+1
319
-        console.log('审批后的ongoingStep'+this.ongoingStep)
311
+        this.ongoingStepNext=this.ongoingStep+1
312
+        console.log('审批后的ongoingStep'+this.ongoingStepNext)
320 313
       } else {
321 314
         this.auditState = 1
322
-        // this.ongoingStep = 0
323
-         this.ongoingStep=this.ongoingStep
324
-         console.log('审批前的ongoingStep'+this.ongoingStep)
315
+         this.ongoingStepNext=this.ongoingStep
316
+         console.log('审批前的ongoingStep'+this.ongoingStepNext)
325 317
       }
326
-
327 318
       this.process = []
328 319
       this.$message(
329 320
         {
@@ -416,8 +407,6 @@ export default {
416 407
     this.row = this.$route.query
417 408
     console.log(this.row, "??????")
418 409
 
419
-    this.getCheckList()
420
-
421 410
     this.houseName = this.$route.query.houseName
422 411
     this.applyName = this.$route.query.applyName
423 412
     this.departmentName = this.$route.query.departmentName
@@ -425,6 +414,7 @@ export default {
425 414
     this.workName = this.$route.query.workName
426 415
     this.ongoingStep=parseInt(this.$route.query.ongoingStep)
427 416
     this.type = this.$route.query.type
417
+    this.getCheckList()
428 418
   },
429 419
 }
430 420
 </script>

+ 88 - 38
shanXiPlatform/src/views/home/daiBan/processed/index.vue

@@ -24,7 +24,7 @@
24 24
         <div class="middle">
25 25
           <div class="middle_flex"  v-if="item.workName.indexOf('药剂') == -1 && item.type !== 'code1'">
26 26
             <div>仓号:</div>
27
-            <div>{{ item.houseName }}</div>
27
+            <div>{{ hourseDic[item.houseId] }}</div>
28 28
           </div>
29 29
           <div class="middle_flex" v-if="item.type.indexOf('code') == -1">
30 30
             <div>申请人:</div>
@@ -196,7 +196,7 @@ export default {
196 196
      this.proCount = this.$store.state.proCount;
197 197
      console.log(this.proCount,"this.proCount....")
198 198
     console.log(this.$route)
199
-    if (this.$route.name == "ProDetails") {
199
+    if (this.$route.name == "ProDetails" || this.$route.name == "proXunzengDetails") {
200 200
       this.isShow = false
201 201
     } else {
202 202
       this.isShow = true
@@ -227,43 +227,93 @@ export default {
227 227
       // let userInfo = JSON.parse(getUser())
228 228
       var homeType = this.userInfo.homeType
229 229
       if (item.type.indexOf('code') == -1) {
230
-        if (homeType == 1) {
231
-          this.$router.push({
232
-            path: "/dashboard/daiban/processed/proDetails",
233
-            query: {
234
-              processId: item.processId,
235
-              houseName: item.houseName,
236
-              applyName: item.applyName,
237
-              departmentName: item.departmentName,
238
-              companyName: item.companyName,
239
-              workName: item.workName,
240
-            },
241
-          })
242
-        } else if (homeType == 2) {
243
-          this.$router.push({
244
-            path: "/dashboard/daiban/processed/proDetails",
245
-            query: {
246
-              processId: item.processId,
247
-              houseName: item.houseName,
248
-              applyName: item.applyName,
249
-              departmentName: item.departmentName,
250
-              companyName: item.companyName,
251
-              workName: item.workName,
252
-            },
253
-          })
254
-        } else if (homeType == 3) {
255
-          this.$router.push({
256
-            path: "/home/daiban/processed/proDetails",
257
-            query: {
258
-              processId: item.processId,
259
-              houseName: item.houseName,
260
-              applyName: item.applyName,
261
-              departmentName: item.departmentName,
262
-              companyName: item.companyName,
263
-              workName: item.workName,
264
-            },
265
-          })
230
+        if(item.type == 'xzjh' || item.type == 'xzsq'){
231
+          if (homeType == 1) {
232
+            this.$router.push({
233
+              path: "/dashboard/daiban/processed/xunzengDetails",
234
+              query: {
235
+                processId: item.processId,
236
+                houseName: item.houseName,
237
+                applyName: item.applyName,
238
+                departmentName: item.departmentName,
239
+                companyName: item.companyName,
240
+                workName: item.workName,
241
+                type: item.type,
242
+                ongoingStep: item.ongoingStep
243
+              },
244
+            })
245
+          } else if (homeType == 2) {
246
+            this.$router.push({
247
+              path: "/dashboard/daiban/processed/xunzengDetails",
248
+              query: {
249
+                processId: item.processId,
250
+                houseName: item.houseName,
251
+                applyName: item.applyName,
252
+                departmentName: item.departmentName,
253
+                companyName: item.companyName,
254
+                workName: item.workName,
255
+                type: item.type,
256
+                ongoingStep: item.ongoingStep
257
+              },
258
+            })
259
+          } else if (homeType == 3) {
260
+            this.$router.push({
261
+              path: "/home/daiban/processed/xunzengDetails",
262
+              query: {
263
+                processId: item.processId,
264
+                houseName: item.houseName,
265
+                applyName: item.applyName,
266
+                departmentName: item.departmentName,
267
+                companyName: item.companyName,
268
+                workName: item.workName,
269
+                type: item.type,
270
+                ongoingStep: item.ongoingStep
271
+              },
272
+            })
273
+          }
274
+        }else{
275
+          if (homeType == 1) {
276
+            this.$router.push({
277
+              path: "/dashboard/daiban/processed/proDetails",
278
+              query: {
279
+                processId: item.processId,
280
+                houseName: item.houseName,
281
+                applyName: item.applyName,
282
+                departmentName: item.departmentName,
283
+                companyName: item.companyName,
284
+                workName: item.workName,
285
+                ongoingStep: item.ongoingStep
286
+              },
287
+            })
288
+          } else if (homeType == 2) {
289
+            this.$router.push({
290
+              path: "/dashboard/daiban/processed/proDetails",
291
+              query: {
292
+                processId: item.processId,
293
+                houseName: item.houseName,
294
+                applyName: item.applyName,
295
+                departmentName: item.departmentName,
296
+                companyName: item.companyName,
297
+                workName: item.workName,
298
+                ongoingStep: item.ongoingStep
299
+              },
300
+            })
301
+          } else if (homeType == 3) {
302
+            this.$router.push({
303
+              path: "/home/daiban/processed/proDetails",
304
+              query: {
305
+                processId: item.processId,
306
+                houseName: item.houseName,
307
+                applyName: item.applyName,
308
+                departmentName: item.departmentName,
309
+                companyName: item.companyName,
310
+                workName: item.workName,
311
+                ongoingStep: item.ongoingStep
312
+              },
313
+            })
314
+          }
266 315
         }
316
+        
267 317
       }else{
268 318
         console.log(item,"item....?????")
269 319
         this.$router.push({

+ 17 - 12
shanXiPlatform/src/views/home/daiBan/processed/xunzengDetails.vue

@@ -29,6 +29,7 @@
29 29
         <div style="margin-left: 20px">
30 30
           <span v-if="type == 'tf'">1.制定通风方案:</span>
31 31
           <span v-if="type == 'xzjh'">1.制定熏蒸计划:</span>
32
+          <span v-if="type == 'xzsq'">1.提交散气作业申请:</span>
32 33
           <span v-if="this.subData == 1">否</span>
33 34
           <span v-if="this.subData == 0">是</span>
34 35
         </div>
@@ -179,7 +180,8 @@ export default {
179 180
       subData: null,
180 181
       //审批数据
181 182
       applyData: [],
182
-      type: null
183
+      type: null,
184
+      ongoingStepNext: null
183 185
     }
184 186
   },
185 187
   methods: {
@@ -220,7 +222,7 @@ export default {
220 222
         id: this.row.id,
221 223
         auditState: this.auditState,
222 224
         // 进行到哪一步的主流程id
223
-        ongoingStep: this.ongoingStep,
225
+        ongoingStep: this.ongoingStepNext,
224 226
         auditTime: getNowFormatDate(),
225 227
       }
226 228
       Approval(data)
@@ -250,7 +252,7 @@ export default {
250 252
       var data = {
251 253
         id: this.row.id,
252 254
         auditState: this.auditState,
253
-        ongoingStep: this.ongoingStep,
255
+        ongoingStep: this.ongoingStepNext,
254 256
         auditTime: getNowFormatDate(),
255 257
       }
256 258
       yjcgApproval(data)
@@ -284,9 +286,7 @@ export default {
284 286
       })
285 287
         .then(() => {
286 288
           this.auditState = 2
287
-
288
-          // this.ongoingStep = 0
289
-           this.ongoingStep=this.ongoingStep
289
+           this.ongoingStepNext=this.ongoingStep
290 290
           this.process = []
291 291
           //this.getApproval()
292 292
           if (item.type == "yjcg" || item.type == "xzjh") {
@@ -313,15 +313,15 @@ export default {
313 313
        
314 314
       
315 315
         // this.ongoingStep = 1
316
-        this.ongoingStep=this.ongoingStep+1
317
-        console.log('审批后的ongoingStep'+this.ongoingStep)
316
+        this.ongoingStepNext=this.ongoingStep+1
317
+        console.log('审批后的ongoingStep'+this.ongoingStepNext)
318 318
       } else {
319 319
         this.auditState = 1
320 320
      
321 321
 
322 322
         // this.ongoingStep = 0
323
-         this.ongoingStep=this.ongoingStep
324
-         console.log('审批前的ongoingStep'+this.ongoingStep)
323
+         this.ongoingStepNext=this.ongoingStep
324
+         console.log('审批前的ongoingStep'+this.ongoingStepNext)
325 325
       }
326 326
 
327 327
       this.process = []
@@ -416,8 +416,6 @@ export default {
416 416
     this.row = this.$route.query
417 417
     console.log(this.row, "??????")
418 418
 
419
-    this.getCheckList()
420
-
421 419
     this.houseName = this.$route.query.houseName
422 420
     this.applyName = this.$route.query.applyName
423 421
     this.departmentName = this.$route.query.departmentName
@@ -425,6 +423,13 @@ export default {
425 423
     this.workName = this.$route.query.workName
426 424
     this.ongoingStep = parseInt(this.$route.query.ongoingStep)
427 425
     this.type = this.$route.query.type
426
+    if(this.$route.query.type == 'xzjh'){
427
+      this.ongoingStep = 0
428
+    }else if(this.$route.query.type == 'xzsq'){
429
+      this.ongoingStep = 3
430
+    }
431
+
432
+    this.getCheckList()
428 433
   },
429 434
 }
430 435
 </script>

+ 36 - 44
shanXiPlatform/src/views/reservesManagement/fumigationManagement/completed.vue

@@ -3,34 +3,19 @@
3 3
     <div class="mainContainer">
4 4
       <div class="steps">
5 5
         <el-steps :active="stepActive" align-center direction="horizontal">
6
-          <el-step
7
-          
8
-            style="color: black"
9
-            icon="iconfont iconrun-line"
10
-            v-for="(item, index) in tableData"
11
-              :title="item.step.title"
12
-            :key="index"
13
-            @click.native="stepClick(index)"
14
-          >
15
-            <template>
16
-              <i
17
-                slot="icon"
18
-                class="iconfont iconNotStarted"
19
-                v-if="stepActive < index"
20
-              />
21
-              <i
22
-                slot="icon"
23
-                class="iconfont iconcurrent"
24
-                v-if="stepActive == index"
25
-              />
26
-              <i
27
-                slot="icon"
28
-                class="iconfont iconfinished"
29
-                v-if="stepActive > index"
30
-              />
31
-            </template>
6
+          <el-step style="color: black"  icon="iconfont iconrun-line"  id="el_step"  v-for="(item, index) in tableData"  :title="item.step.title"  :key="index"  @click.native="stepClick(index)">
7
+            <svg-icon class='icon_wai'  slot="icon"  icon-class="NotStarted"  v-if="stepActive < index"/>
8
+            <svg-icon class='icon_wai'  slot="icon"  icon-class="current"  v-if="stepActive == index"/>
9
+            <svg-icon class='icon_wai'  slot="icon"  icon-class="finished"  v-if="stepActive > index"/>
32 10
           </el-step>
33 11
         </el-steps>
12
+        <!-- <el-steps :active="stepActive" align-center direction="horizontal">
13
+          <el-step  id="el_step"  :title="item.step.title"  v-for="(item, index) in totalData"  :key="index"  @click.native="stepClick(index)">
14
+            <svg-icon  class='icon_wai'  slot="icon"  icon-class="NotStarted"  v-if="stepActive < index"/>
15
+            <svg-icon class='icon_wai'  slot="icon"  icon-class="current"  v-if="stepActive == index"/>
16
+            <svg-icon class='icon_wai'  slot="icon"  icon-class="finished"  v-if="stepActive > index"/>
17
+          </el-step>
18
+        </el-steps> -->
34 19
       </div>
35 20
 
36 21
       <div id="step1">
@@ -56,9 +41,11 @@
56 41
                 style="height: 400px"
57 42
               >
58 43
                 <div class="tf_title">
59
-                  <i class="iconfont iconshu"></i>流程(机械通风审批)
44
+                  <i class="iconfont iconshu"></i>
45
+                    <span  v-if="scope.$index == 1">流程(熏蒸计划申请审批)</span> 
46
+                    <span  v-if="scope.$index == 12">流程(熏蒸散气申请审批)</span> 
60 47
                 </div>
61
-                <el-steps direction="vertical" :active="processActive">
48
+                <el-steps direction="vertical" :active="scope.row.process.length">
62 49
                   <el-step
63 50
                     v-for="(item, index) in scope.row.process"
64 51
                     :key="index"
@@ -180,7 +167,9 @@ export default {
180 167
       tableData: [],
181 168
       //审批流程
182 169
       process: [],
170
+      processNew: [],
183 171
       disabled: true,
172
+      processActive:0
184 173
     }
185 174
   },
186 175
   methods: {
@@ -199,23 +188,17 @@ export default {
199 188
               index++
200 189
             })
201 190
           })
202
-          // console.log(this.totalData,"totalData.......")
203
-          for (let i = 0; i < res.data.audit.length - 1; i++) {
204
-            var ele = res.data.audit[i]
205
-            if (ele.auditState != null) {
206
-              this.processActive = i
207
-            }
208
-            this.process.push(ele)
209
-            if (this.process[0].content == 0) {
210
-              this.process[0].content = this.userInfo.uid
211
-            } else {
212
-              this.process[0].content = res.data.audit[0].content
213
-            }
191
+          if (res.data.process[0].audit[0].content == 0) {
192
+            res.data.process[0].audit[0].content = this.userInfo.uid
193
+          }
194
+          if (res.data.process[3].audit[0].content == 0) {
195
+            res.data.process[3].audit[0].content = this.userInfo.uid
214 196
           }
215
-
216 197
           // this.totalData[1].process=this.process;
217 198
           this.totalData.splice(1, 0, { details: "是,否" })
218
-          this.$set(this.totalData[1], "process", this.process)
199
+          this.$set(this.totalData[1], "process", res.data.process[0].audit)
200
+          this.totalData.splice(12, 0, { details: "是,否" })
201
+          this.$set(this.totalData[12], "process", res.data.process[3].audit)
219 202
           console.log(this.totalData, "totalData.......")
220 203
         }
221 204
       })
@@ -227,11 +210,16 @@ export default {
227 210
           return [1, 4]
228 211
         }
229 212
       }
213
+      if (rowIndex === 12) {
214
+        if (columnIndex === 0) {
215
+          return [1, 4]
216
+        }
217
+      }
230 218
     },
231 219
 
232 220
     //点击返回按钮
233 221
     goBack() {
234
-      this.$router.push({ path: "/reservesManagement/mechanicalVentilation" })
222
+      this.$router.push({ path: "/reservesManagement/fumigationManagement" })
235 223
     },
236 224
   },
237 225
   mounted() {
@@ -239,7 +227,7 @@ export default {
239 227
     console.log(this.userInfo, "this.userInfo.....?????")
240 228
     this.processId = this.$route.query.processId
241 229
     console.log(this.processId, "//////")
242
-    this.stepActive = parseInt(this.$route.query.ongoingStep)
230
+    this.stepActive = parseInt(this.$route.query.ongoingStep) + 1
243 231
     this.getCheckList()
244 232
     //获取人员字典数据
245 233
     this.perList = JSON.parse(localStorage.getItem("perList"))
@@ -247,6 +235,10 @@ export default {
247 235
 }
248 236
 </script>
249 237
 <style lang="scss" scoped>
238
+.icon_wai{
239
+  width:3em;
240
+  height:3em;
241
+}
250 242
 .global {
251 243
   height: calc(100vh - 70px - 83px);
252 244
   min-height: 500px;

+ 7 - 9
shanXiPlatform/src/views/reservesManagement/fumigationManagement/index.vue

@@ -62,7 +62,7 @@
62 62
           </el-form>
63 63
           <div>
64 64
             <el-button
65
-              v-if="$tools.IsPermission(228)"
65
+              v-if="$tools.IsPermission(338)"
66 66
               type="success"
67 67
               icon="el-icon-circle-plus"
68 68
               plain
@@ -88,8 +88,10 @@
88 88
             width="50px"
89 89
           >
90 90
           </el-table-column>
91
-
92 91
           <el-table-column prop="type" label="类型" align="center">
92
+            <!-- <template slot-scope="scope"> -->
93
+              <span>熏蒸管理</span>
94
+            <!-- </template> -->
93 95
           </el-table-column>
94 96
           <el-table-column prop="applyTime" label="时间" align="center">
95 97
           </el-table-column>
@@ -111,7 +113,7 @@
111 113
           >
112 114
             <template slot-scope="scope">
113 115
               <el-button
114
-                v-if="$tools.IsPermission(230)"
116
+                v-if="$tools.IsPermission(340)"
115 117
                 size="mini"
116 118
                 type="detailbtn"
117 119
                 @click="handleCheck(3, scope.$index, scope.row)"
@@ -127,7 +129,7 @@
127 129
                   scope.row.auditState != 4 &&
128 130
                   scope.row.auditState != 1 &&
129 131
                   scope.row.auditState != 2 &&
130
-                  $tools.IsPermission(229)
132
+                  $tools.IsPermission(339)
131 133
                 "
132 134
                 >修改</el-button
133 135
               >
@@ -174,7 +176,7 @@ export default {
174 176
       //库编号
175 177
       depotId: this.$store.state.depotId,
176 178
       //类型
177
-      type: "tf",
179
+      type: "xz",
178 180
       value: "",
179 181
       query: {
180 182
         // startTime: "",
@@ -207,10 +209,7 @@ export default {
207 209
     },
208 210
     //查看
209 211
     handleCheck(type, index, row) {
210
-      console.log(row, "row")
211
-
212 212
       if (row.auditState == 4) {
213
-        console.log(4444444)
214 213
         this.$router.push({
215 214
           path: "/reservesManagement/fumigationManagement/completed",
216 215
           query: {
@@ -220,7 +219,6 @@ export default {
220 219
           },
221 220
         })
222 221
       } else {
223
-        console.log(row.auditState, "row.status....")
224 222
         this.$router.push({
225 223
           path: "/reservesManagement/fumigationManagement/steps",
226 224
           query: {

+ 179 - 314
shanXiPlatform/src/views/reservesManagement/fumigationManagement/steps.vue

@@ -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{