Преглед изворни кода

Merge branch 'master' of http://101.36.160.140:21044/csc/csc-szls-vue

linyanfei пре 3 година
родитељ
комит
090d94e96e

+ 50 - 2
shanXiPlatform/src/router/index.js

@@ -232,6 +232,14 @@ export const constantRoutes = [
232 232
                   hidden: true,
233 233
                   meta: { title: '详情', icon: 'dashboard', affix: false }
234 234
                 },
235
+                { // 针对熏蒸
236
+                  path: 'inixunzengDetails',
237
+                  component: () => import('@/views/home/daiBan/initiated/xunzengDetails'),
238
+                  name: 'IniXunzengDetails',
239
+
240
+                  hidden: true,
241
+                  meta: { title: '详情', icon: 'dashboard', affix: false }
242
+                },
235 243
               ]
236 244
 
237 245
           },
@@ -254,6 +262,14 @@ export const constantRoutes = [
254 262
                   hidden: true,
255 263
                   meta: { title: '详情', icon: 'dashboard', affix: false }
256 264
                 },
265
+                { // 针对熏蒸
266
+                  path: 'xunzengDetails',
267
+                  component: () => import('@/views/home/daiBan/pending/xunzengDetails'),
268
+                  name: 'XunzengDetails',
269
+
270
+                  hidden: true,
271
+                  meta: { title: '详情', icon: 'dashboard', affix: false }
272
+                },
257 273
               ]
258 274
           },
259 275
           {
@@ -275,6 +291,14 @@ export const constantRoutes = [
275 291
                   hidden: true,
276 292
                   meta: { title: '详情', icon: 'dashboard', affix: false }
277 293
                 },
294
+                { // 针对熏蒸
295
+                  path: 'xunzengDetails',
296
+                  component: () => import('@/views/home/daiBan/processed/xunzengDetails'),
297
+                  name: 'proXunzengDetails',
298
+
299
+                  hidden: true,
300
+                  meta: { title: '详情', icon: 'dashboard', affix: false }
301
+                },
278 302
               ]
279 303
           },
280 304
 
@@ -487,6 +511,14 @@ export const constantRoutes = [
487 511
                   hidden: true,
488 512
                   meta: { title: '详情', icon: 'dashboard', affix: false, navigation: true }
489 513
                 },
514
+                { // 针对熏蒸
515
+                  path: 'inixunzengDetails',
516
+                  component: () => import('@/views/home/daiBan/initiated/xunzengDetails'),
517
+                  name: 'IniXunzengDetails',
518
+
519
+                  hidden: true,
520
+                  meta: { title: '详情', icon: 'dashboard', affix: false }
521
+                },
490 522
               ]
491 523
 
492 524
           },
@@ -511,6 +543,14 @@ export const constantRoutes = [
511 543
                   hidden: true,
512 544
                   meta: { title: '详情', icon: 'dashboard', affix: false, navigation: true }
513 545
                 },
546
+                { // 针对熏蒸
547
+                  path: 'xunzengDetails',
548
+                  component: () => import('@/views/home/daiBan/pending/xunzengDetails'),
549
+                  name: 'XunzengDetails',
550
+
551
+                  hidden: true,
552
+                  meta: { title: '详情', icon: 'dashboard', affix: false }
553
+                },
514 554
               ]
515 555
           },
516 556
           {
@@ -532,6 +572,14 @@ export const constantRoutes = [
532 572
                   hidden: true,
533 573
                   meta: { title: '详情', icon: 'dashboard', affix: false, navigation: true }
534 574
                 },
575
+                { // 针对熏蒸
576
+                  path: 'xunzengDetails',
577
+                  component: () => import('@/views/home/daiBan/processed/xunzengDetails'),
578
+                  name: 'proXunzengDetails',
579
+
580
+                  hidden: true,
581
+                  meta: { title: '详情', icon: 'dashboard', affix: false }
582
+                },
535 583
               ]
536 584
           },
537 585
 
@@ -787,7 +835,7 @@ export const constantRoutes = [
787 835
         component: () => import('@/views/reservesManagement/fumigationManagement/index'),
788 836
         name: 'FumigationManagement',
789 837
         meta: { title: '熏蒸管理', icon: 'tongfeng', affix: false, relation: 'house', istable: true },
790
-        resourceCode: 169
838
+        resourceCode: 337
791 839
       },
792 840
       //  储量管理/熏蒸管理/新增
793 841
       {
@@ -1558,7 +1606,7 @@ export const constantRoutes = [
1558 1606
         path: 'treeStructure',
1559 1607
         component: () => import('@/views/systemManagement/tree/treeStructure'),
1560 1608
         name: 'TreeStructure',
1561
-        hidden: true,
1609
+        // hidden: true,
1562 1610
         meta: { title: '组织树', icon: 'zuzhishu', affix: false, noCache: true, navigation: true },
1563 1611
         resourceCode:5,
1564 1612
         children: []

+ 1 - 1
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/facilitiesTabs.vue

@@ -10,7 +10,7 @@
10 10
           label="全部设施检查记录"
11 11
           name="AllFacilities"
12 12
         ></el-tab-pane>
13
-        <el-tab-pane label="设施维修改造" name="Maintenance"></el-tab-pane>
13
+        <!-- <el-tab-pane label="设施维修改造" name="Maintenance"></el-tab-pane> -->
14 14
       </el-tabs>
15 15
         <div id="main">
16 16
 

+ 519 - 0
shanXiPlatform/src/views/home/daiBan/initiated/xunzengDetails.vue

@@ -0,0 +1,519 @@
1
+<template>
2
+  <div id="penmainDetail">
3
+    <div class="pencontainDetail">
4
+      <div class="lc_top">
5
+        <div class="header" style="font-weight: 500">
6
+          <i class="iconfont iconshu"></i>
7
+          {{workName }}
8
+        </div>
9
+        <div class="middle">
10
+          <div class="middle_flex"  v-if="workName.indexOf('药剂') == -1">
11
+            <div>仓号:</div>
12
+            <div>{{houseName }}</div>
13
+          </div>
14
+          <div class="middle_flex">
15
+            <div>申请人:</div>
16
+            <div>{{applyName }}</div>
17
+          </div>
18
+          <div class="middle_flex">
19
+            <div>申请部门:</div>
20
+            <div>{{departmentName }}</div>
21
+          </div>
22
+          <div class="middle_flex">
23
+            <div>公司:</div>
24
+            <div>{{companyName }}</div>
25
+          </div>
26
+        </div>
27
+      </div>
28
+      <div class="table_middle">
29
+        <div style="margin-left: 20px">
30
+          <span v-if="type == 'tf'">1.制定通风方案:</span>
31
+          <span v-if="type == 'xzjh'">1.制定熏蒸计划:</span>
32
+          <span v-if="this.subData == 1">否</span>
33
+          <span v-if="this.subData == 0">是</span>
34
+        </div>
35
+      </div>
36
+      <div id="process">
37
+        <div class="process_title" style="font-weight: 500">
38
+          <i class="iconfont iconshu"></i>
39
+          流程({{workName}}审批)
40
+        </div>
41
+        <div class="process_step" style="margin-left: 20px">
42
+          <el-steps direction="vertical" :active="processActive">
43
+            <el-step
44
+              v-for="(item, index) in process"
45
+              :key="index"
46
+              icon="el-icon-edit"
47
+            >
48
+              <template>
49
+                <div slot="title" class="stepTitle">
50
+                  <div class="stepTitleFont">
51
+                    {{ item.title }}
52
+                  </div>
53
+
54
+                  <div style="width: 200px">
55
+                    <div
56
+                      style="font-weight: 500"
57
+                      :class="{
58
+                        active:
59
+                          index == 0 ||
60
+                          (item.auditState != null && item.auditState == 1),
61
+                        noActive: item.auditState == 2,
62
+                      }"
63
+                    >
64
+                      {{ perList[item.content] }}
65
+                    </div>
66
+                    <div v-if="item.auditState == 0">待审批</div>
67
+                    <div v-if="item.auditState == 1" class="stepTitleFont">
68
+                      审批通过
69
+                    </div>
70
+                    <div v-if="item.auditState == 2">审批不通过</div>
71
+                    <div class="stepTitleFont">{{ item.auditTime }}</div>
72
+
73
+                    <div style="width: 200px; display: flex">
74
+                      <!-- 状态为0且为当前登录人时按钮显示 -->
75
+                      <el-button
76
+                        type="danger"
77
+                        size="mini"
78
+                        v-if="
79
+                          item.content == userInfo.uid && item.auditState == 0
80
+                        "
81
+                        @click="noAgree(item, index)"
82
+                        >审批不通过</el-button
83
+                      >
84
+                      <el-button
85
+                        type="success"
86
+                        size="mini"
87
+                        v-if="
88
+                          item.content == userInfo.uid && item.auditState == 0
89
+                        "
90
+                        @click="agree(item, index)"
91
+                        >审批通过</el-button
92
+                      >
93
+                    </div>
94
+                  </div>
95
+                </div>
96
+              </template>
97
+            
98
+              <template>
99
+                <i
100
+                  slot="icon"
101
+                  class="iconfont iconstep_current"
102
+                  v-if="
103
+                    index != 0 &&
104
+                    (item.auditState == null || item.auditState == 0)
105
+                  "
106
+                >
107
+                </i>
108
+                <i
109
+                  slot="icon"
110
+                  style="color: red"
111
+                  class="iconfont iconstep_err"
112
+                  v-if="item.auditState == 2"
113
+                ></i>
114
+                <i
115
+                  slot="icon"
116
+                  style="color: green"
117
+                  class="iconfont iconstep_complete"
118
+                  v-if="item.auditState == 1 || index == 0"
119
+                ></i>
120
+              </template>
121
+            </el-step>
122
+          </el-steps>
123
+        </div>
124
+      </div>
125
+      <div class="btns">
126
+        <el-button class="backBtn" type="success" plain @click="goBack()"
127
+          >返回</el-button
128
+        >
129
+      </div>
130
+    </div>
131
+  </div>
132
+</template>
133
+<script>
134
+import { checkList } from "@/api/reservesManagement/mechanicalVentilation"
135
+import { Approval, yjcgApproval } from "@/api/daiBan/index"
136
+import { getNowFormatDate } from "@/utils"
137
+import { getUser } from "@/utils/auth"
138
+import { pending } from "@/api/daiBan/index"
139
+import { processed } from "@/api/daiBan/index"
140
+export default {
141
+  name: "Details",
142
+  data() {
143
+    return {
144
+      //类型
145
+      workName: "",
146
+      //仓房编码
147
+      houseName: null,
148
+      //申请人
149
+      applyName: null,
150
+      //部门
151
+      departmentName: null,
152
+      //公司
153
+      companyName: null,
154
+      //库字典数据
155
+      deportDic: {},
156
+      //仓房字典数据
157
+      hourseDic: {},
158
+      //部门字典数据
159
+      departDic: {},
160
+      //每条数据
161
+      row: {},
162
+
163
+      //当前登录人信息
164
+      userInfo: {},
165
+
166
+      //审批状态
167
+      auditState: null,
168
+      //审批流程高亮显示
169
+      processActive: 0,
170
+      //审批流程
171
+      process: [],
172
+      //用户字典列表
173
+      perList: {},
174
+      //
175
+      tableData: [],
176
+      //头部数据
177
+      headData: [],
178
+      //方案状态
179
+      subData: null,
180
+      //审批数据
181
+      applyData: [],
182
+      type: null
183
+    }
184
+  },
185
+  methods: {
186
+    //流程查看
187
+    getCheckList() {
188
+      var processId = this.row.processId
189
+      checkList(processId)
190
+        .then((res) => {
191
+          console.log(res.data, "......")
192
+          if (res.code == 200) {
193
+            
194
+
195
+            let ongoingStep = this.ongoingStep
196
+            this.subData = res.data.process[ongoingStep].list[0].subData  //方案状态
197
+            this.tableData = res.data.process[ongoingStep]
198
+
199
+            for (let i = 0; i < res.data.process[ongoingStep].audit.length; i++) {
200
+              var ele = res.data.process[ongoingStep].audit[i]
201
+              if (ele.auditState != null) {
202
+                this.processActive = i
203
+              }
204
+              this.process.push(ele)
205
+              if (this.process[0].content == 0) {
206
+                this.process[0].content = this.userInfo.uid
207
+              } else {
208
+                this.process[0].content = res.data.process[ongoingStep].audit[0].content
209
+              }
210
+            }
211
+            this.getProcessed()
212
+          }
213
+        })
214
+        .catch((err) => {
215
+          console.log(err)
216
+        })
217
+    },
218
+
219
+    //机械通风审批通过接口
220
+    getApproval() {
221
+      var data = {
222
+        id: this.row.id,
223
+        auditState: this.auditState,
224
+        // 进行到哪一步的主流程id
225
+        ongoingStep: this.ongoingStep,
226
+        auditTime: getNowFormatDate(),
227
+      }
228
+      Approval(data)
229
+        .then((res) => {
230
+          sessionStorage.setItem("store", JSON.stringify(this.$store.state))
231
+          // location.reload();
232
+
233
+          this.$store.commit({
234
+            type: "changependingCount",
235
+            pendingCount: this.$store.state.pendingCount,
236
+          })
237
+
238
+          this.getCheckList()
239
+          this.getPending()
240
+          this.$router.push({
241
+            path: "/dashboard/daiban/initiated/xunzengDetails",
242
+            item: this.$route.query,
243
+          })
244
+        })
245
+        .catch((err) => {
246
+          console.log(err)
247
+        })
248
+    },
249
+
250
+    //药剂采购审批通过接口
251
+    getyjcgApproval() {
252
+      var data = {
253
+        id: this.row.id,
254
+        auditState: this.auditState,
255
+        ongoingStep: this.ongoingStep,
256
+        auditTime: getNowFormatDate(),
257
+      }
258
+      yjcgApproval(data)
259
+        .then((res) => {
260
+          sessionStorage.setItem("store", JSON.stringify(this.$store.state))
261
+          // location.reload();
262
+
263
+          this.$store.commit({
264
+            type: "changependingCount",
265
+            pendingCount: this.$store.state.pendingCount,
266
+          })
267
+
268
+          this.getCheckList()
269
+          this.getPending()
270
+          this.$router.push({
271
+            path: "/dashboard/daiban/initiated/xunzengDetails",
272
+            item: this.$route.query,
273
+          })
274
+        }) 
275
+        .catch((err) => {
276
+          console.log(err)
277
+        })
278
+    },
279
+    //审批不通过
280
+
281
+    noAgree(item, index) {
282
+      this.$confirm("确定审批不通过?", "提示", {
283
+        confirmButtonText: "确定",
284
+        cancelButtonText: "返回",
285
+        type: "warning",
286
+      })
287
+        .then(() => {
288
+          this.auditState = 2
289
+
290
+          // this.ongoingStep = 0
291
+           this.ongoingStep=this.ongoingStep
292
+          this.process = []
293
+          //this.getApproval()
294
+          if (item.type == "yjcg" || item.type == "xzjh") {
295
+            this.getyjcgApproval()
296
+          } else {
297
+            this.getApproval()
298
+          }
299
+          item.auditState = 2
300
+        })
301
+        .catch(() => {})
302
+    },
303
+
304
+    //审批通过
305
+    agree(item, index) {
306
+      console.log(item, "??????????")
307
+      console.log(index, "index......")
308
+      //最后一个人通过
309
+      if (index == this.process.length - 1) {
310
+        if(item.type == "yjcg"){
311
+          this.auditState = 4
312
+        }else{
313
+           this.auditState = 3
314
+        }
315
+       
316
+      
317
+        // this.ongoingStep = 1
318
+        this.ongoingStep=this.ongoingStep+1
319
+        console.log('审批后的ongoingStep'+this.ongoingStep)
320
+      } else {
321
+        this.auditState = 1
322
+     
323
+
324
+        // this.ongoingStep = 0
325
+         this.ongoingStep=this.ongoingStep
326
+         console.log('审批前的ongoingStep'+this.ongoingStep)
327
+      }
328
+
329
+      this.process = []
330
+      this.$message(
331
+        {
332
+          message:"审批通过",
333
+          type: 'success'
334
+        })
335
+      if (item.type == "yjcg" || item.type == "xzjh") {
336
+        this.getyjcgApproval()
337
+      } else {
338
+        this.getApproval()
339
+      }
340
+    },
341
+    //点击返回按钮
342
+    goBack() {
343
+      this.$router.push({ path: "/home/daiban/initiated" })
344
+    },
345
+
346
+    //已处理列表数据
347
+    getProcessed() {
348
+      var condition = {
349
+        userId: this.userInfo.uid,
350
+      }
351
+      // console.log(condition, "condition.....")
352
+      condition = JSON.stringify(condition)
353
+      var data = {
354
+        pageIndex: 1,
355
+        pageSize: 10,
356
+        condition: condition,
357
+      }
358
+      processed(data).then((res) => {
359
+        if (res.code == 200) {
360
+          console.log(res)
361
+          this.processedList = res.data.records
362
+
363
+          this.$store.commit({
364
+            type: "changeproCount",
365
+            proCount: res.data.total,
366
+          })
367
+          console.log(this.$store.state.proCount, "aaaaaa.")
368
+          console.log(res.data.total, "res.data.total....")
369
+          // sessionStorage.setItem("store", JSON.stringify(this.$store.state))
370
+          // this.pagination.total = res.data.total
371
+        }
372
+      })
373
+    },
374
+
375
+    //待处理列表数据
376
+    getPending() {
377
+      var condition = {
378
+        userId: JSON.parse(getUser()).uid,
379
+      }
380
+      condition = JSON.stringify(condition)
381
+      var data = {
382
+        pageIndex: 1,
383
+        pageSize: 10,
384
+        condition: condition,
385
+      }
386
+
387
+      pending(data).then((res) => {
388
+        if (res.code == 200) {
389
+          this.$store.commit({
390
+            type: "changependingCount",
391
+            pendingCount: res.data.total,
392
+          })
393
+        }
394
+      })
395
+    },
396
+  },
397
+  mounted() {
398
+    //库字典数据
399
+    this.deportDic = JSON.parse(localStorage.getItem("deportDic"))
400
+    console.log(this.deportDic, " this.deportDic...")
401
+
402
+    //部门字典数据
403
+    this.departDic = JSON.parse(localStorage.getItem("departDic"))
404
+    console.log(this.departDic, " this.departDic...")
405
+
406
+    //仓房字典数据
407
+    this.hourseDic = JSON.parse(localStorage.getItem("hourseDic"))
408
+    console.log(this.hourseDic, " this.hourseDic...")
409
+    //获取当前缓存的用户信息
410
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
411
+    // console.log(this.userInfo, "this.userInfo.....")
412
+    this.userInfo = JSON.parse(getUser())
413
+    console.log(this.userInfo, "this.userInfo.....?????")
414
+    //用户字典
415
+    this.perList = JSON.parse(localStorage.getItem("perList"))
416
+    console.log(this.perList, "this.perList...")
417
+    //流程id
418
+    this.row = this.$route.query
419
+    console.log(this.row, "??????")
420
+
421
+    this.getCheckList()
422
+
423
+    this.houseName = this.$route.query.houseName
424
+    this.applyName = this.$route.query.applyName
425
+    this.departmentName = this.$route.query.departmentName
426
+    this.companyName = this.$route.query.companyName
427
+    this.workName = this.$route.query.workName
428
+    this.ongoingStep=parseInt(this.$route.query.ongoingStep)
429
+    this.type = this.$route.query.type
430
+  },
431
+}
432
+</script>
433
+
434
+<style lang="scss" scoped>
435
+.global {
436
+  padding-top: 0;
437
+}
438
+#penmainDetail {
439
+  height: 100%;
440
+  .pencontainDetail {
441
+    .lc_top {
442
+      height: 100px;
443
+      background: #fff;
444
+      border-radius: 6px;
445
+      padding: 10px;
446
+      .header {
447
+        font-size: 18px;
448
+        font-weight: 500;
449
+        height: 20%;
450
+        margin-bottom: 20px;
451
+        color: #037d41;
452
+      }
453
+      .middle {
454
+        margin-bottom: 20px;
455
+        width: 80%;
456
+        display: flex;
457
+        justify-content: space-between;
458
+        margin-left: 20px;
459
+        .middle_flex {
460
+          display: flex;
461
+          margin-bottom: 10px;
462
+        }
463
+      }
464
+    }
465
+
466
+    #process {
467
+      background: #fff;
468
+      border-radius: 6px;
469
+      margin-top: 10px;
470
+      padding: 10px;
471
+
472
+      border-radius: 4px;
473
+      .process_title {
474
+        color: #037d41;
475
+        font-size: 18px;
476
+        margin-bottom: 10px;
477
+      }
478
+      .process_step {
479
+        height: 400px;
480
+      }
481
+      .stepTitle {
482
+        display: flex;
483
+        justify-content: space-between;
484
+      }
485
+    }
486
+    .table_middle {
487
+      height: 70px;
488
+      line-height: 70px;
489
+      padding-left: 10px;
490
+      background: #fff;
491
+      border-radius: 6px;
492
+      margin-top: 10px;
493
+    }
494
+
495
+    .active {
496
+      color: #037d41;
497
+      // width: 500px;
498
+      // height: 40px;
499
+      // margin-top: 10px;
500
+    }
501
+    .noActive {
502
+      color: red;
503
+      // width: 500px;
504
+      // height: 40px;
505
+      // margin-top: 10px;
506
+    }
507
+  }
508
+
509
+  .stepTitle {
510
+    .stepTitleFont {
511
+      color: black;
512
+    }
513
+  }
514
+  .btns {
515
+    text-align: right;
516
+    margin-top: 20px;
517
+  }
518
+}
519
+</style>

+ 517 - 0
shanXiPlatform/src/views/home/daiBan/pending/xunzengDetails.vue

@@ -0,0 +1,517 @@
1
+<template>
2
+  <div id="penmainDetail">
3
+    <div class="pencontainDetail">
4
+      <div class="lc_top">
5
+        <div class="header" style="font-weight: 500">
6
+          <i class="iconfont iconshu"></i>
7
+          {{workName }}
8
+        </div>
9
+        <div class="middle">
10
+          <div class="middle_flex"  v-if="workName.indexOf('药剂') == -1">
11
+            <div>仓号:</div>
12
+            <div>{{houseName }}</div>
13
+          </div>
14
+          <div class="middle_flex">
15
+            <div>申请人:</div>
16
+            <div>{{applyName }}</div>
17
+          </div>
18
+          <div class="middle_flex">
19
+            <div>申请部门:</div>
20
+            <div>{{departmentName }}</div>
21
+          </div>
22
+          <div class="middle_flex">
23
+            <div>公司:</div>
24
+            <div>{{companyName }}</div>
25
+          </div>
26
+        </div>
27
+      </div>
28
+      <div class="table_middle">
29
+        <div style="margin-left: 20px">
30
+          <span v-if="type == 'tf'">1.制定通风方案:</span>
31
+          <span v-if="type == 'xzjh'">1.制定熏蒸计划:</span>
32
+          <span v-if="this.subData == 1">否</span>
33
+          <span v-if="this.subData == 0">是</span>
34
+        </div>
35
+      </div>
36
+      <div id="process">
37
+        <div class="process_title" style="font-weight: 500">
38
+          <i class="iconfont iconshu"></i>
39
+          流程({{workName}}审批)
40
+        </div>
41
+        <div class="process_step" style="margin-left: 20px">
42
+          <el-steps direction="vertical" :active="processActive">
43
+            <el-step
44
+              v-for="(item, index) in process"
45
+              :key="index"
46
+              icon="el-icon-edit"
47
+            >
48
+              <template>
49
+                <div slot="title" class="stepTitle">
50
+                  <div class="stepTitleFont">
51
+                    {{ item.title }}
52
+                  </div>
53
+
54
+                  <div style="width: 200px">
55
+                    <div
56
+                      style="font-weight: 500"
57
+                      :class="{
58
+                        active:
59
+                          index == 0 ||
60
+                          (item.auditState != null && item.auditState == 1),
61
+                        noActive: item.auditState == 2,
62
+                      }"
63
+                    >
64
+                      {{ perList[item.content] }}
65
+                    </div>
66
+                    <div v-if="item.auditState == 0">待审批</div>
67
+                    <div v-if="item.auditState == 1" class="stepTitleFont">
68
+                      审批通过
69
+                    </div>
70
+                    <div v-if="item.auditState == 2">审批不通过</div>
71
+                    <div class="stepTitleFont">{{ item.auditTime }}</div>
72
+
73
+                    <div style="width: 200px; display: flex">
74
+                      <!-- 状态为0且为当前登录人时按钮显示 -->
75
+                      <el-button
76
+                        type="danger"
77
+                        size="mini"
78
+                        v-if="
79
+                          item.content == userInfo.uid && item.auditState == 0
80
+                        "
81
+                        @click="noAgree(item, index)"
82
+                        >审批不通过</el-button
83
+                      >
84
+                      <el-button
85
+                        type="success"
86
+                        size="mini"
87
+                        v-if="
88
+                          item.content == userInfo.uid && item.auditState == 0
89
+                        "
90
+                        @click="agree(item, index)"
91
+                        >审批通过</el-button
92
+                      >
93
+                    </div>
94
+                  </div>
95
+                </div>
96
+              </template>
97
+            
98
+              <template>
99
+                <i
100
+                  slot="icon"
101
+                  class="iconfont iconstep_current"
102
+                  v-if="
103
+                    index != 0 &&
104
+                    (item.auditState == null || item.auditState == 0)
105
+                  "
106
+                >
107
+                </i>
108
+                <i
109
+                  slot="icon"
110
+                  style="color: red"
111
+                  class="iconfont iconstep_err"
112
+                  v-if="item.auditState == 2"
113
+                ></i>
114
+                <i
115
+                  slot="icon"
116
+                  style="color: green"
117
+                  class="iconfont iconstep_complete"
118
+                  v-if="item.auditState == 1 || index == 0"
119
+                ></i>
120
+              </template>
121
+            </el-step>
122
+          </el-steps>
123
+        </div>
124
+      </div>
125
+      <div class="btns">
126
+        <el-button class="backBtn" type="success" plain @click="goBack()"
127
+          >返回</el-button
128
+        >
129
+      </div>
130
+    </div>
131
+  </div>
132
+</template>
133
+<script>
134
+import { checkList } from "@/api/reservesManagement/mechanicalVentilation"
135
+import { Approval, yjcgApproval } from "@/api/daiBan/index"
136
+import { getNowFormatDate } from "@/utils"
137
+import { getUser } from "@/utils/auth"
138
+import { pending } from "@/api/daiBan/index"
139
+import { processed } from "@/api/daiBan/index"
140
+export default {
141
+  name: "Details",
142
+  data() {
143
+    return {
144
+      //类型
145
+      workName: "",
146
+      //仓房编码
147
+      houseName: null,
148
+      //申请人
149
+      applyName: null,
150
+      //部门
151
+      departmentName: null,
152
+      //公司
153
+      companyName: null,
154
+      //库字典数据
155
+      deportDic: {},
156
+      //仓房字典数据
157
+      hourseDic: {},
158
+      //部门字典数据
159
+      departDic: {},
160
+      //每条数据
161
+      row: {},
162
+
163
+      //当前登录人信息
164
+      userInfo: {},
165
+
166
+      //审批状态
167
+      auditState: null,
168
+      //审批流程高亮显示
169
+      processActive: 0,
170
+      //审批流程
171
+      process: [],
172
+      //用户字典列表
173
+      perList: {},
174
+      //
175
+      tableData: [],
176
+      //头部数据
177
+      headData: [],
178
+      //方案状态
179
+      subData: null,
180
+      //审批数据
181
+      applyData: [],
182
+      type: null
183
+    }
184
+  },
185
+  methods: {
186
+    //流程查看
187
+    getCheckList() {
188
+      var processId = this.row.processId
189
+      checkList(processId)
190
+        .then((res) => {
191
+          console.log(res.data, "......")
192
+          if (res.code == 200) {
193
+            
194
+
195
+            let ongoingStep = this.ongoingStep
196
+            this.subData = res.data.process[ongoingStep].list[0].subData  //方案状态
197
+            this.tableData = res.data.process[ongoingStep]
198
+
199
+            for (let i = 0; i < res.data.process[ongoingStep].audit.length; i++) {
200
+              var ele = res.data.process[ongoingStep].audit[i]
201
+              if (ele.auditState != null) {
202
+                this.processActive = i
203
+              }
204
+              this.process.push(ele)
205
+              if (this.process[0].content == 0) {
206
+                this.process[0].content = this.userInfo.uid
207
+              } else {
208
+                this.process[0].content = res.data.process[ongoingStep].audit[0].content
209
+              }
210
+            }
211
+            this.getProcessed()
212
+          }
213
+        })
214
+        .catch((err) => {
215
+          console.log(err)
216
+        })
217
+    },
218
+
219
+    //机械通风审批通过接口
220
+    getApproval() {
221
+      var data = {
222
+        id: this.row.id,
223
+        auditState: this.auditState,
224
+        // 进行到哪一步的主流程id
225
+        ongoingStep: this.ongoingStep,
226
+        auditTime: getNowFormatDate(),
227
+      }
228
+      Approval(data)
229
+        .then((res) => {
230
+          sessionStorage.setItem("store", JSON.stringify(this.$store.state))
231
+          // location.reload();
232
+
233
+          this.$store.commit({
234
+            type: "changependingCount",
235
+            pendingCount: this.$store.state.pendingCount,
236
+          })
237
+
238
+          this.getCheckList()
239
+          this.getPending()
240
+          this.$router.push({
241
+            path: "/dashboard/daiban/pending/xunzengDetails",
242
+            item: this.$route.query,
243
+          })
244
+        })
245
+        .catch((err) => {
246
+          console.log(err)
247
+        })
248
+    },
249
+
250
+    //药剂采购审批通过接口
251
+    getyjcgApproval() {
252
+      var data = {
253
+        id: this.row.id,
254
+        auditState: this.auditState,
255
+        ongoingStep: this.ongoingStep,
256
+        auditTime: getNowFormatDate(),
257
+      }
258
+      yjcgApproval(data)
259
+        .then((res) => {
260
+          sessionStorage.setItem("store", JSON.stringify(this.$store.state))
261
+          // location.reload();
262
+
263
+          this.$store.commit({
264
+            type: "changependingCount",
265
+            pendingCount: this.$store.state.pendingCount,
266
+          })
267
+
268
+          this.getCheckList()
269
+          this.getPending()
270
+          this.$router.push({
271
+            path: "/dashboard/daiban/pending/xunzengDetails",
272
+            item: this.$route.query,
273
+          })
274
+        }) 
275
+        .catch((err) => {
276
+          console.log(err)
277
+        })
278
+    },
279
+    //审批不通过
280
+
281
+    noAgree(item, index) {
282
+      this.$confirm("确定审批不通过?", "提示", {
283
+        confirmButtonText: "确定",
284
+        cancelButtonText: "返回",
285
+        type: "warning",
286
+      })
287
+        .then(() => {
288
+          this.auditState = 2
289
+
290
+          // this.ongoingStep = 0
291
+           this.ongoingStep=this.ongoingStep
292
+          this.process = []
293
+          //this.getApproval()
294
+          if (item.type == "yjcg" || item.type == "xzjh") {
295
+            this.getyjcgApproval()
296
+          } else {
297
+            this.getApproval()
298
+          }
299
+          item.auditState = 2
300
+        })
301
+        .catch(() => {})
302
+    },
303
+
304
+    //审批通过
305
+    agree(item, index) {
306
+      console.log(item, "??????????")
307
+      console.log(index, "index......")
308
+      //最后一个人通过
309
+      if (index == this.process.length - 1) {
310
+        if(item.type == "yjcg"){
311
+          this.auditState = 4
312
+        }else{
313
+           this.auditState = 3
314
+        }
315
+       
316
+      
317
+        // this.ongoingStep = 1
318
+        this.ongoingStep=this.ongoingStep+1
319
+        console.log('审批后的ongoingStep'+this.ongoingStep)
320
+      } else {
321
+        this.auditState = 1
322
+        // this.ongoingStep = 0
323
+         this.ongoingStep=this.ongoingStep
324
+         console.log('审批前的ongoingStep'+this.ongoingStep)
325
+      }
326
+
327
+      this.process = []
328
+      this.$message(
329
+        {
330
+          message:"审批通过",
331
+          type: 'success'
332
+        })
333
+      if (item.type == "yjcg" || item.type == "xzjh") {
334
+        this.getyjcgApproval()
335
+      } else {
336
+        this.getApproval()
337
+      }
338
+    },
339
+    //点击返回按钮
340
+    goBack() {
341
+      this.$router.push({ path: "/home/daiban/pending" })
342
+    },
343
+
344
+    //已处理列表数据
345
+    getProcessed() {
346
+      var condition = {
347
+        userId: this.userInfo.uid,
348
+      }
349
+      // console.log(condition, "condition.....")
350
+      condition = JSON.stringify(condition)
351
+      var data = {
352
+        pageIndex: 1,
353
+        pageSize: 10,
354
+        condition: condition,
355
+      }
356
+      processed(data).then((res) => {
357
+        if (res.code == 200) {
358
+          console.log(res)
359
+          this.processedList = res.data.records
360
+
361
+          this.$store.commit({
362
+            type: "changeproCount",
363
+            proCount: res.data.total,
364
+          })
365
+          console.log(this.$store.state.proCount, "aaaaaa.")
366
+          console.log(res.data.total, "res.data.total....")
367
+          // sessionStorage.setItem("store", JSON.stringify(this.$store.state))
368
+          // this.pagination.total = res.data.total
369
+        }
370
+      })
371
+    },
372
+
373
+    //待处理列表数据
374
+    getPending() {
375
+      var condition = {
376
+        userId: JSON.parse(getUser()).uid,
377
+      }
378
+      condition = JSON.stringify(condition)
379
+      var data = {
380
+        pageIndex: 1,
381
+        pageSize: 10,
382
+        condition: condition,
383
+      }
384
+
385
+      pending(data).then((res) => {
386
+        if (res.code == 200) {
387
+          this.$store.commit({
388
+            type: "changependingCount",
389
+            pendingCount: res.data.total,
390
+          })
391
+        }
392
+      })
393
+    },
394
+  },
395
+  mounted() {
396
+    //库字典数据
397
+    this.deportDic = JSON.parse(localStorage.getItem("deportDic"))
398
+    console.log(this.deportDic, " this.deportDic...")
399
+
400
+    //部门字典数据
401
+    this.departDic = JSON.parse(localStorage.getItem("departDic"))
402
+    console.log(this.departDic, " this.departDic...")
403
+
404
+    //仓房字典数据
405
+    this.hourseDic = JSON.parse(localStorage.getItem("hourseDic"))
406
+    console.log(this.hourseDic, " this.hourseDic...")
407
+    //获取当前缓存的用户信息
408
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
409
+    // console.log(this.userInfo, "this.userInfo.....")
410
+    this.userInfo = JSON.parse(getUser())
411
+    console.log(this.userInfo, "this.userInfo.....?????")
412
+    //用户字典
413
+    this.perList = JSON.parse(localStorage.getItem("perList"))
414
+    console.log(this.perList, "this.perList...")
415
+    //流程id
416
+    this.row = this.$route.query
417
+    console.log(this.row, "??????")
418
+
419
+    this.getCheckList()
420
+
421
+    this.houseName = this.$route.query.houseName
422
+    this.applyName = this.$route.query.applyName
423
+    this.departmentName = this.$route.query.departmentName
424
+    this.companyName = this.$route.query.companyName
425
+    this.workName = this.$route.query.workName
426
+    this.ongoingStep=parseInt(this.$route.query.ongoingStep)
427
+    this.type = this.$route.query.type
428
+  },
429
+}
430
+</script>
431
+
432
+<style lang="scss" scoped>
433
+.global {
434
+  padding-top: 0;
435
+}
436
+#penmainDetail {
437
+  height: 100%;
438
+  .pencontainDetail {
439
+    .lc_top {
440
+      height: 100px;
441
+      background: #fff;
442
+      border-radius: 6px;
443
+      padding: 10px;
444
+      .header {
445
+        font-size: 18px;
446
+        font-weight: 500;
447
+        height: 20%;
448
+        margin-bottom: 20px;
449
+        color: #037d41;
450
+      }
451
+      .middle {
452
+        margin-bottom: 20px;
453
+        width: 80%;
454
+        display: flex;
455
+        justify-content: space-between;
456
+        margin-left: 20px;
457
+        .middle_flex {
458
+          display: flex;
459
+          margin-bottom: 10px;
460
+        }
461
+      }
462
+    }
463
+
464
+    #process {
465
+      background: #fff;
466
+      border-radius: 6px;
467
+      margin-top: 10px;
468
+      padding: 10px;
469
+
470
+      border-radius: 4px;
471
+      .process_title {
472
+        color: #037d41;
473
+        font-size: 18px;
474
+        margin-bottom: 10px;
475
+      }
476
+      .process_step {
477
+        height: 400px;
478
+      }
479
+      .stepTitle {
480
+        display: flex;
481
+        justify-content: space-between;
482
+      }
483
+    }
484
+    .table_middle {
485
+      height: 70px;
486
+      line-height: 70px;
487
+      padding-left: 10px;
488
+      background: #fff;
489
+      border-radius: 6px;
490
+      margin-top: 10px;
491
+    }
492
+
493
+    .active {
494
+      color: #037d41;
495
+      // width: 500px;
496
+      // height: 40px;
497
+      // margin-top: 10px;
498
+    }
499
+    .noActive {
500
+      color: red;
501
+      // width: 500px;
502
+      // height: 40px;
503
+      // margin-top: 10px;
504
+    }
505
+  }
506
+
507
+  .stepTitle {
508
+    .stepTitleFont {
509
+      color: black;
510
+    }
511
+  }
512
+  .btns {
513
+    text-align: right;
514
+    margin-top: 20px;
515
+  }
516
+}
517
+</style>

+ 517 - 0
shanXiPlatform/src/views/home/daiBan/processed/xunzengDetails.vue

@@ -0,0 +1,517 @@
1
+<template>
2
+  <div id="penmainDetail">
3
+    <div class="pencontainDetail">
4
+      <div class="lc_top">
5
+        <div class="header" style="font-weight: 500">
6
+          <i class="iconfont iconshu"></i>
7
+          {{workName }}
8
+        </div>
9
+        <div class="middle">
10
+          <div class="middle_flex"  v-if="workName.indexOf('药剂') == -1">
11
+            <div>仓号:</div>
12
+            <div>{{houseName }}</div>
13
+          </div>
14
+          <div class="middle_flex">
15
+            <div>申请人:</div>
16
+            <div>{{applyName }}</div>
17
+          </div>
18
+          <div class="middle_flex">
19
+            <div>申请部门:</div>
20
+            <div>{{departmentName }}</div>
21
+          </div>
22
+          <div class="middle_flex">
23
+            <div>公司:</div>
24
+            <div>{{companyName }}</div>
25
+          </div>
26
+        </div>
27
+      </div>
28
+      <div class="table_middle">
29
+        <div style="margin-left: 20px">
30
+          <span v-if="type == 'tf'">1.制定通风方案:</span>
31
+          <span v-if="type == 'xzjh'">1.制定熏蒸计划:</span>
32
+          <span v-if="this.subData == 1">否</span>
33
+          <span v-if="this.subData == 0">是</span>
34
+        </div>
35
+      </div>
36
+      <div id="process">
37
+        <div class="process_title" style="font-weight: 500">
38
+          <i class="iconfont iconshu"></i>
39
+          流程({{workName}}审批)
40
+        </div>
41
+        <div class="process_step" style="margin-left: 20px">
42
+          <el-steps direction="vertical" :active="processActive">
43
+            <el-step
44
+              v-for="(item, index) in process"
45
+              :key="index"
46
+              icon="el-icon-edit"
47
+            >
48
+              <template>
49
+                <div slot="title" class="stepTitle">
50
+                  <div class="stepTitleFont">
51
+                    {{ item.title }}
52
+                  </div>
53
+
54
+                  <div style="width: 200px">
55
+                    <div
56
+                      style="font-weight: 500"
57
+                      :class="{
58
+                        active:
59
+                          index == 0 ||
60
+                          (item.auditState != null && item.auditState == 1),
61
+                        noActive: item.auditState == 2,
62
+                      }"
63
+                    >
64
+                      {{ perList[item.content] }}
65
+                    </div>
66
+                    <div v-if="item.auditState == 0">待审批</div>
67
+                    <div v-if="item.auditState == 1" class="stepTitleFont">
68
+                      审批通过
69
+                    </div>
70
+                    <div v-if="item.auditState == 2">审批不通过</div>
71
+                    <div class="stepTitleFont">{{ item.auditTime }}</div>
72
+
73
+                    <div style="width: 200px; display: flex">
74
+                      <!-- 状态为0且为当前登录人时按钮显示 -->
75
+                      <el-button
76
+                        type="danger"
77
+                        size="mini"
78
+                        v-if="
79
+                          item.content == userInfo.uid && item.auditState == 0
80
+                        "
81
+                        @click="noAgree(item, index)"
82
+                        >审批不通过</el-button
83
+                      >
84
+                      <el-button
85
+                        type="success"
86
+                        size="mini"
87
+                        v-if="
88
+                          item.content == userInfo.uid && item.auditState == 0
89
+                        "
90
+                        @click="agree(item, index)"
91
+                        >审批通过</el-button
92
+                      >
93
+                    </div>
94
+                  </div>
95
+                </div>
96
+              </template>
97
+            
98
+              <template>
99
+                <i
100
+                  slot="icon"
101
+                  class="iconfont iconstep_current"
102
+                  v-if="
103
+                    index != 0 &&
104
+                    (item.auditState == null || item.auditState == 0)
105
+                  "
106
+                >
107
+                </i>
108
+                <i
109
+                  slot="icon"
110
+                  style="color: red"
111
+                  class="iconfont iconstep_err"
112
+                  v-if="item.auditState == 2"
113
+                ></i>
114
+                <i
115
+                  slot="icon"
116
+                  style="color: green"
117
+                  class="iconfont iconstep_complete"
118
+                  v-if="item.auditState == 1 || index == 0"
119
+                ></i>
120
+              </template>
121
+            </el-step>
122
+          </el-steps>
123
+        </div>
124
+      </div>
125
+      <div class="btns">
126
+        <el-button class="backBtn" type="success" plain @click="goBack()"
127
+          >返回</el-button
128
+        >
129
+      </div>
130
+    </div>
131
+  </div>
132
+</template>
133
+<script>
134
+import { checkList } from "@/api/reservesManagement/mechanicalVentilation"
135
+import { Approval, yjcgApproval } from "@/api/daiBan/index"
136
+import { getNowFormatDate } from "@/utils"
137
+import { getUser } from "@/utils/auth"
138
+import { pending } from "@/api/daiBan/index"
139
+import { processed } from "@/api/daiBan/index"
140
+export default {
141
+  name: "Details",
142
+  data() {
143
+    return {
144
+      //类型
145
+      workName: "",
146
+      //仓房编码
147
+      houseName: null,
148
+      //申请人
149
+      applyName: null,
150
+      //部门
151
+      departmentName: null,
152
+      //公司
153
+      companyName: null,
154
+      //库字典数据
155
+      deportDic: {},
156
+      //仓房字典数据
157
+      hourseDic: {},
158
+      //部门字典数据
159
+      departDic: {},
160
+      //每条数据
161
+      row: {},
162
+
163
+      //当前登录人信息
164
+      userInfo: {},
165
+
166
+      //审批状态
167
+      auditState: null,
168
+      //审批流程高亮显示
169
+      processActive: 0,
170
+      //审批流程
171
+      process: [],
172
+      //用户字典列表
173
+      perList: {},
174
+      //
175
+      tableData: [],
176
+      //头部数据
177
+      headData: [],
178
+      //方案状态
179
+      subData: null,
180
+      //审批数据
181
+      applyData: [],
182
+      type: null
183
+    }
184
+  },
185
+  methods: {
186
+    //流程查看
187
+    getCheckList() {
188
+      var processId = this.row.processId
189
+      checkList(processId)
190
+        .then((res) => {
191
+          console.log(res.data, "......")
192
+          if (res.code == 200) {
193
+            let ongoingStep = this.ongoingStep
194
+            this.subData = res.data.process[ongoingStep].list[0].subData  //方案状态
195
+            this.tableData = res.data.process[ongoingStep]
196
+
197
+            for (let i = 0; i < res.data.process[ongoingStep].audit.length; i++) {
198
+              var ele = res.data.process[ongoingStep].audit[i]
199
+              if (ele.auditState != null) {
200
+                this.processActive = i
201
+              }
202
+              this.process.push(ele)
203
+              if (this.process[0].content == 0) {
204
+                this.process[0].content = this.userInfo.uid
205
+              } else {
206
+                this.process[0].content = res.data.process[ongoingStep].audit[0].content
207
+              }
208
+            }
209
+            this.getProcessed()
210
+          }
211
+        })
212
+        .catch((err) => {
213
+          console.log(err)
214
+        })
215
+    },
216
+
217
+    //机械通风审批通过接口
218
+    getApproval() {
219
+      var data = {
220
+        id: this.row.id,
221
+        auditState: this.auditState,
222
+        // 进行到哪一步的主流程id
223
+        ongoingStep: this.ongoingStep,
224
+        auditTime: getNowFormatDate(),
225
+      }
226
+      Approval(data)
227
+        .then((res) => {
228
+          sessionStorage.setItem("store", JSON.stringify(this.$store.state))
229
+          // location.reload();
230
+
231
+          this.$store.commit({
232
+            type: "changependingCount",
233
+            pendingCount: this.$store.state.pendingCount,
234
+          })
235
+
236
+          this.getCheckList()
237
+          this.getPending()
238
+          this.$router.push({
239
+            path: "/dashboard/daiban/processed/xunzengDetails",
240
+            item: this.$route.query,
241
+          })
242
+        })
243
+        .catch((err) => {
244
+          console.log(err)
245
+        })
246
+    },
247
+
248
+    //药剂采购审批通过接口
249
+    getyjcgApproval() {
250
+      var data = {
251
+        id: this.row.id,
252
+        auditState: this.auditState,
253
+        ongoingStep: this.ongoingStep,
254
+        auditTime: getNowFormatDate(),
255
+      }
256
+      yjcgApproval(data)
257
+        .then((res) => {
258
+          sessionStorage.setItem("store", JSON.stringify(this.$store.state))
259
+          // location.reload();
260
+
261
+          this.$store.commit({
262
+            type: "changependingCount",
263
+            pendingCount: this.$store.state.pendingCount,
264
+          })
265
+
266
+          this.getCheckList()
267
+          this.getPending()
268
+          this.$router.push({
269
+            path: "/dashboard/daiban/processed/xunzengDetails",
270
+            item: this.$route.query,
271
+          })
272
+        }) 
273
+        .catch((err) => {
274
+          console.log(err)
275
+        })
276
+    },
277
+    //审批不通过
278
+
279
+    noAgree(item, index) {
280
+      this.$confirm("确定审批不通过?", "提示", {
281
+        confirmButtonText: "确定",
282
+        cancelButtonText: "返回",
283
+        type: "warning",
284
+      })
285
+        .then(() => {
286
+          this.auditState = 2
287
+
288
+          // this.ongoingStep = 0
289
+           this.ongoingStep=this.ongoingStep
290
+          this.process = []
291
+          //this.getApproval()
292
+          if (item.type == "yjcg" || item.type == "xzjh") {
293
+            this.getyjcgApproval()
294
+          } else {
295
+            this.getApproval()
296
+          }
297
+          item.auditState = 2
298
+        })
299
+        .catch(() => {})
300
+    },
301
+
302
+    //审批通过
303
+    agree(item, index) {
304
+      console.log(item, "??????????")
305
+      console.log(index, "index......")
306
+      //最后一个人通过
307
+      if (index == this.process.length - 1) {
308
+        if(item.type == "yjcg"){
309
+          this.auditState = 4
310
+        }else{
311
+           this.auditState = 3
312
+        }
313
+       
314
+      
315
+        // this.ongoingStep = 1
316
+        this.ongoingStep=this.ongoingStep+1
317
+        console.log('审批后的ongoingStep'+this.ongoingStep)
318
+      } else {
319
+        this.auditState = 1
320
+     
321
+
322
+        // this.ongoingStep = 0
323
+         this.ongoingStep=this.ongoingStep
324
+         console.log('审批前的ongoingStep'+this.ongoingStep)
325
+      }
326
+
327
+      this.process = []
328
+      this.$message(
329
+        {
330
+          message:"审批通过",
331
+          type: 'success'
332
+        })
333
+      if (item.type == "yjcg" || item.type == "xzjh") {
334
+        this.getyjcgApproval()
335
+      } else {
336
+        this.getApproval()
337
+      }
338
+    },
339
+    //点击返回按钮
340
+    goBack() {
341
+      this.$router.push({ path: "/home/daiban/processed" })
342
+    },
343
+
344
+    //已处理列表数据
345
+    getProcessed() {
346
+      var condition = {
347
+        userId: this.userInfo.uid,
348
+      }
349
+      // console.log(condition, "condition.....")
350
+      condition = JSON.stringify(condition)
351
+      var data = {
352
+        pageIndex: 1,
353
+        pageSize: 10,
354
+        condition: condition,
355
+      }
356
+      processed(data).then((res) => {
357
+        if (res.code == 200) {
358
+          console.log(res)
359
+          this.processedList = res.data.records
360
+
361
+          this.$store.commit({
362
+            type: "changeproCount",
363
+            proCount: res.data.total,
364
+          })
365
+          console.log(this.$store.state.proCount, "aaaaaa.")
366
+          console.log(res.data.total, "res.data.total....")
367
+          // sessionStorage.setItem("store", JSON.stringify(this.$store.state))
368
+          // this.pagination.total = res.data.total
369
+        }
370
+      })
371
+    },
372
+
373
+    //待处理列表数据
374
+    getPending() {
375
+      var condition = {
376
+        userId: JSON.parse(getUser()).uid,
377
+      }
378
+      condition = JSON.stringify(condition)
379
+      var data = {
380
+        pageIndex: 1,
381
+        pageSize: 10,
382
+        condition: condition,
383
+      }
384
+
385
+      pending(data).then((res) => {
386
+        if (res.code == 200) {
387
+          this.$store.commit({
388
+            type: "changependingCount",
389
+            pendingCount: res.data.total,
390
+          })
391
+        }
392
+      })
393
+    },
394
+  },
395
+  mounted() {
396
+    //库字典数据
397
+    this.deportDic = JSON.parse(localStorage.getItem("deportDic"))
398
+    console.log(this.deportDic, " this.deportDic...")
399
+
400
+    //部门字典数据
401
+    this.departDic = JSON.parse(localStorage.getItem("departDic"))
402
+    console.log(this.departDic, " this.departDic...")
403
+
404
+    //仓房字典数据
405
+    this.hourseDic = JSON.parse(localStorage.getItem("hourseDic"))
406
+    console.log(this.hourseDic, " this.hourseDic...")
407
+    //获取当前缓存的用户信息
408
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
409
+    // console.log(this.userInfo, "this.userInfo.....")
410
+    this.userInfo = JSON.parse(getUser())
411
+    console.log(this.userInfo, "this.userInfo.....?????")
412
+    //用户字典
413
+    this.perList = JSON.parse(localStorage.getItem("perList"))
414
+    console.log(this.perList, "this.perList...")
415
+    //流程id
416
+    this.row = this.$route.query
417
+    console.log(this.row, "??????")
418
+
419
+    this.getCheckList()
420
+
421
+    this.houseName = this.$route.query.houseName
422
+    this.applyName = this.$route.query.applyName
423
+    this.departmentName = this.$route.query.departmentName
424
+    this.companyName = this.$route.query.companyName
425
+    this.workName = this.$route.query.workName
426
+    this.ongoingStep = parseInt(this.$route.query.ongoingStep)
427
+    this.type = this.$route.query.type
428
+  },
429
+}
430
+</script>
431
+
432
+<style lang="scss" scoped>
433
+.global {
434
+  padding-top: 0;
435
+}
436
+#penmainDetail {
437
+  height: 100%;
438
+  .pencontainDetail {
439
+    .lc_top {
440
+      height: 100px;
441
+      background: #fff;
442
+      border-radius: 6px;
443
+      padding: 10px;
444
+      .header {
445
+        font-size: 18px;
446
+        font-weight: 500;
447
+        height: 20%;
448
+        margin-bottom: 20px;
449
+        color: #037d41;
450
+      }
451
+      .middle {
452
+        margin-bottom: 20px;
453
+        width: 80%;
454
+        display: flex;
455
+        justify-content: space-between;
456
+        margin-left: 20px;
457
+        .middle_flex {
458
+          display: flex;
459
+          margin-bottom: 10px;
460
+        }
461
+      }
462
+    }
463
+
464
+    #process {
465
+      background: #fff;
466
+      border-radius: 6px;
467
+      margin-top: 10px;
468
+      padding: 10px;
469
+
470
+      border-radius: 4px;
471
+      .process_title {
472
+        color: #037d41;
473
+        font-size: 18px;
474
+        margin-bottom: 10px;
475
+      }
476
+      .process_step {
477
+        height: 400px;
478
+      }
479
+      .stepTitle {
480
+        display: flex;
481
+        justify-content: space-between;
482
+      }
483
+    }
484
+    .table_middle {
485
+      height: 70px;
486
+      line-height: 70px;
487
+      padding-left: 10px;
488
+      background: #fff;
489
+      border-radius: 6px;
490
+      margin-top: 10px;
491
+    }
492
+
493
+    .active {
494
+      color: #037d41;
495
+      // width: 500px;
496
+      // height: 40px;
497
+      // margin-top: 10px;
498
+    }
499
+    .noActive {
500
+      color: red;
501
+      // width: 500px;
502
+      // height: 40px;
503
+      // margin-top: 10px;
504
+    }
505
+  }
506
+
507
+  .stepTitle {
508
+    .stepTitleFont {
509
+      color: black;
510
+    }
511
+  }
512
+  .btns {
513
+    text-align: right;
514
+    margin-top: 20px;
515
+  }
516
+}
517
+</style>

+ 31 - 16
shanXiPlatform/src/views/reservesManagement/grainCheck/allGrain/index.vue

@@ -121,8 +121,15 @@
121 121
           width="100px"
122 122
         >
123 123
           <template slot-scope="scope">
124
-            <div class="yellow" v-if="scope.row.anomalousStatus === 1"></div>
125
-            <div class="green" v-if="scope.row.anomalousStatus !== 1"></div>
124
+
125
+            <div disable-transitions v-if="scope.row.anomalousStatus != '1'">
126
+              <!-- 无 -->
127
+              <span class="colorspano"></span>
128
+            </div>
129
+            <div disable-transitions v-if="scope.row.anomalousStatus == '1'">
130
+              <!-- 有 -->
131
+              <span class="colorspant"></span>
132
+            </div>
126 133
           </template>
127 134
         </el-table-column>
128 135
         <el-table-column prop="recordStatus" label="状态" align="center">
@@ -516,23 +523,31 @@ export default {
516 523
   font-size: 15px;
517 524
   font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
518 525
 }
519
-.yellow {
520
-  // width: 100px;
521
-  display: block;
522
-  height: 25px;
523
-  background-color: #e3a512;
524
-  color: azure;
526
+.colorspano {
527
+  width: 100px;
528
+  height: 30px;
529
+  background-color: #199856;
530
+  display: inline-block;
525 531
   border-radius: 5px;
526
-  // text-align: center;
527
-  font-size: 13px;
532
+  color: #fff;
533
+  line-height: 30px;
528 534
 }
529
-.green {
530
-  display: block;
531
-  // width: 80%;
532
-  height: 25px;
533
-  background-color: #037d41;
535
+.colorspant {
536
+  width: 100px;
537
+  height: 30px;
538
+  background-color: #ffff00;
539
+  display: inline-block;
540
+  border-radius: 5px;
534 541
   color: #fff;
542
+  line-height: 30px;
543
+}
544
+.colorspanr {
545
+  width: 100px;
546
+  height: 30px;
547
+  background-color: #ff9933;
548
+  display: inline-block;
535 549
   border-radius: 5px;
536
-  font-size: 13px;
537 550
 }
551
+
552
+
538 553
 </style>

+ 23 - 23
shanXiPlatform/src/views/reservesManagement/grainCheck/newGrain/index.vue

@@ -291,7 +291,7 @@ export default {
291 291
     // console.log(this.$route.query,'this.$route.query........')
292 292
     this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
293 293
 
294
-    console.log(this.userInfo.roleName, "this.userInfo.roleName00000000")
294
+    // console.log(this.userInfo.roleName, "this.userInfo.roleName00000000")
295 295
     this.data5.grainConditionRecord.checkPerson = this.userInfo.uid
296 296
     this.uid = this.userInfo.uid
297 297
     // 此处是从待办跳转到本页面时传递过来的参数,用data2收集保存
@@ -337,7 +337,7 @@ export default {
337 337
       const parentId = 18 //粮情检查类型parentId
338 338
       getGrainItems(parentId)
339 339
         .then(res => {
340
-          console.log(res, "res字典粮情检查类型")
340
+          // console.log(res, "res字典粮情检查类型")
341 341
           this.grainKind = res.data
342 342
         })
343 343
         .catch(err => {
@@ -347,9 +347,9 @@ export default {
347 347
        getGrainItems(19)
348 348
           .then(res => {
349 349
             if (res.code == 200) {
350
-              console.log(res, "保管员检查项字典")
350
+              // console.log(res, "保管员检查项字典")
351 351
               this.checkItems = res.data
352
-              console.log(this.checkItems, "checkItems.......")
352
+              // console.log(this.checkItems, "checkItems.......")
353 353
             }
354 354
           })
355 355
           .catch(err => {
@@ -381,10 +381,10 @@ export default {
381 381
             ? this.houseId
382 382
             : 94
383 383
       }
384
-      console.log(data, "data")
384
+      // console.log(data, "data")
385 385
       getNewGrainInfo(data)
386 386
         .then(res => {
387
-          console.log(res.data, "res000")
387
+          // console.log(res.data, "res000")
388 388
           this.data = res.data
389 389
           this.sort()
390 390
         })
@@ -398,28 +398,28 @@ export default {
398 398
       // 如果sortData是空的,使用splice进行排序,不准确
399 399
       // this.sortData = [0, 0, 0, 0]
400 400
 
401
-      console.log(this.sortData,'sortData.......')
401
+      // console.log(this.sortData,'sortData.......')
402 402
       if (sortdata.length !== 0) {
403 403
         for (let i = 0; i < sortdata.length; i++) {
404 404
           if (sortdata[i].enumId == 22) {
405
-            console.log(sortdata[i], "总经理 ")
405
+            // console.log(sortdata[i], "总经理 ")
406 406
             this.sortData.splice(0, 1, sortdata[i])
407 407
           }
408 408
           if (sortdata[i].enumId == 21) {
409
-            console.log(this.data[i], "分管副总")
409
+            // console.log(this.data[i], "分管副总")
410 410
             this.sortData.splice(1, 1, sortdata[i])
411 411
           }
412 412
           if (sortdata[i].enumId === 20) {
413
-            console.log(this.data[i], "主管科长")
413
+            // console.log(this.data[i], "主管科长")
414 414
             this.sortData.splice(2, 1, sortdata[i])
415 415
           }
416 416
           if (sortdata[i].enumId == 19) {
417
-            console.log(this.data[i], "保管员")
417
+            // console.log(this.data[i], "保管员")
418 418
             this.sortData.splice(3, 1, sortdata[i])
419 419
           }
420 420
         }
421 421
       }
422
-      console.log(this.sortData, "this.sortData.....")
422
+      // console.log(this.sortData, "this.sortData.....")
423 423
     },
424 424
     // 状态改成图标
425 425
     formatterColumn(row, column) {
@@ -435,16 +435,16 @@ export default {
435 435
     // 除保管员外弹窗
436 436
     open(val,index) {
437 437
       // console.log(this.$route.query, "保管员外的角色")
438
-      console.log(val, "val...")
439
-      console.log(index,'index')
438
+      // console.log(val, "val...")
439
+      // console.log(index,'index')
440 440
       this.data5.grainConditionRecord.depotId = this.depotId
441 441
       this.data5.grainConditionRecord.houseId = this.houseId
442 442
       this.data5.grainConditionRecord.enumId = val.enumId
443
-      console.log(val.enumId, "当前角色信息id")
444
-      console.log(this.grainKind, "角色类别字典")
443
+      // console.log(val.enumId, "当前角色信息id")
444
+      // console.log(this.grainKind, "角色类别字典")
445 445
       var item = this.grainKind.find(item => item.enumId == val.enumId)
446
-      console.log(item.enumName, "item")
447
-      console.log(item,'item数据')
446
+      // console.log(item.enumName, "item")
447
+      // console.log(item,'item数据')
448 448
 
449 449
       // console.log(this.data2,'this.data2..........')
450 450
       const h = this.$createElement
@@ -490,14 +490,14 @@ export default {
490 490
         console.log(this.data5, "this.data5...")
491 491
         addInfo(this.data5)
492 492
           .then(res => {
493
-            console.log(res, "res增")
493
+            // console.log(res, "res增")
494 494
             if (res.code == 200) {
495 495
               // this.sortData.operationTime = this.data5.grainConditionRecord.operationTime
496 496
 
497
-              console.log(this.houseId, "this.houseId")
498
-              console.log(this.data2.houseId, "this.data2.houseId")
497
+              // console.log(this.houseId, "this.houseId")
498
+              // console.log(this.data2.houseId, "this.data2.houseId")
499 499
               let auditState = 4 //4 是已完成
500
-              console.log(this.data2.houseId, "this.data2.houseId")
500
+              // console.log(this.data2.houseId, "this.data2.houseId")
501 501
               //判断是否切换仓房,或者仓房发生改变
502 502
               if (this.data2.houseId == this.houseId) {
503 503
                 haveDone(this.data2.id, auditState)
@@ -557,7 +557,7 @@ export default {
557 557
             query: { type: type, pid: row.id, data: row }
558 558
           })
559 559
         } else {
560
-          console.log(row, "科长,副总,总经理")
560
+          // console.log(row, "科长,副总,总经理")
561 561
           this.open(row,index)
562 562
         }
563 563
       } else if (Object.keys(this.data2).length !== 0) {