mengy 4 vuotta sitten
vanhempi
commit
6e074c5f18

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

@@ -1032,7 +1032,7 @@ export const constantRoutes = [
1032 1032
               path: 'deviceManagement',
1033 1033
               component: () => import('@/views/facilitiesEquipment/equipmentManagement/deviceManagement/index'),
1034 1034
               name: 'DeviceManagement',
1035
-
1035
+              resourceCode: 345,
1036 1036
               hidden: true,
1037 1037
               meta: { title: '设备管理', icon: 'dashboard', affix: false,relation: 'library', istable: true }
1038 1038
             },
@@ -1040,7 +1040,7 @@ export const constantRoutes = [
1040 1040
               path: 'deviceProcurement',
1041 1041
               component: () => import('@/views/facilitiesEquipment/equipmentManagement/deviceProcurement/index'),
1042 1042
               name: 'DeviceProcurement',
1043
-
1043
+              resourceCode: 346,
1044 1044
               hidden: true,
1045 1045
               meta: { title: '设备采购', icon: 'dashboard', affix: false,relation: 'library', istable: true }
1046 1046
             },
@@ -1068,6 +1068,24 @@ export const constantRoutes = [
1068 1068
           meta: { title: '设备管理纪录已完成', icon: 'dashboard', affix: false, noCache: true, relation: 'library', istable: false }
1069 1069
         },
1070 1070
 
1071
+        //  设备采购/新增
1072
+        {
1073
+          path: '/facilitiesEquipment/equipmentManagement/deviceProcurement/steps',
1074
+          component: () => import('@/views/facilitiesEquipment/equipmentManagement/deviceProcurement/steps'),
1075
+          name: 'deviceProcurementStep',
1076
+          hidden: true,
1077
+          meta: { title: '设备采购新增', icon: 'dashboard', affix: false, noCache: true, relation: 'library', istable: false }
1078
+        },
1079
+
1080
+        //  设备采购/已完成
1081
+        {
1082
+          path: '/facilitiesEquipment/equipmentManagement/deviceProcurement/completed',
1083
+          component: () => import('@/views/facilitiesEquipment/equipmentManagement/deviceProcurement/completed'),
1084
+          name: 'deviceProcurementCompleted',
1085
+          hidden: true,
1086
+          meta: { title: '设备采购已完成', icon: 'dashboard', affix: false, noCache: true, relation: 'library', istable: false }
1087
+        },
1088
+
1071 1089
       ]
1072 1090
 
1073 1091
 

+ 312 - 0
shanXiPlatform/src/views/facilitiesEquipment/equipmentManagement/deviceManagement/completed.vue

@@ -0,0 +1,312 @@
1
+<template>
2
+  <div class="global">
3
+    <div class="mainContainer">
4
+      <div class="steps">
5
+        <el-steps :active="stepActive" align-center direction="horizontal">
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"/>
10
+          </el-step>
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> -->
19
+      </div>
20
+
21
+      <div id="step1">
22
+        <el-table
23
+          border
24
+          stripe
25
+          highlight-current-row
26
+          :data="totalData"
27
+          :span-method="arraySpanMethod"
28
+        >
29
+          <el-table-column
30
+            align="center"
31
+            label="序号"
32
+            width="100px"
33
+            type="index"
34
+          >
35
+            <template slot-scope="scope">
36
+              <div
37
+                v-if="
38
+                  scope.row.hasOwnProperty('process') &&
39
+                  scope.row.process.length != 0
40
+                "
41
+                style="height: 400px"
42
+              >
43
+                <div class="tf_title">
44
+                  <i class="iconfont iconshu"></i>
45
+                    <span  v-if="scope.$index == 1">流程(熏蒸计划申请审批)</span> 
46
+                    <span  v-if="scope.$index == 12">流程(熏蒸散气申请审批)</span> 
47
+                </div>
48
+                <el-steps direction="vertical" :active="scope.row.process.length">
49
+                  <el-step
50
+                    v-for="(item, index) in scope.row.process"
51
+                    :key="index"
52
+                    icon="el-icon-edit"
53
+                  >
54
+                    <template>
55
+                      <div slot="title" class="stepTitle">
56
+                        <div class="stepTitleFont">
57
+                          {{ item.title }}
58
+                        </div>
59
+
60
+                        <div style="display: flex; flex-direction: column">
61
+                          <div
62
+                            :class="{
63
+                              active:
64
+                                index == 0 ||
65
+                                (item.auditState != null &&
66
+                                  item.auditState == 1),
67
+                              noActive: item.auditState == 2,
68
+                            }"
69
+                          >
70
+                            {{ perList[item.content] }}
71
+                          </div>
72
+
73
+                          <div v-if="item.auditState == 0">待审批</div>
74
+                          <div
75
+                            v-if="item.auditState == 1"
76
+                            class="stepTitleFont"
77
+                          >
78
+                            审批通过
79
+                          </div>
80
+                          <div v-if="item.auditState == 2">审批不通过</div>
81
+                          <div class="stepTitleFont">{{ item.auditTime }}</div>
82
+                        </div>
83
+                      </div>
84
+                    </template>
85
+                    <template>
86
+                      <i
87
+                        slot="icon"
88
+                        class="iconfont iconstep_current"
89
+                        v-if="
90
+                          index != 0 &&
91
+                          (item.auditState == null || item.auditState == 0)
92
+                        "
93
+                      >
94
+                      </i>
95
+                      <i
96
+                        slot="icon"
97
+                        style="color: red"
98
+                        class="iconfont iconstep_err"
99
+                        v-if="item.auditState == 2"
100
+                      ></i>
101
+                      <i
102
+                        slot="icon"
103
+                        style="color: green"
104
+                        class="iconfont iconstep_complete"
105
+                        v-if="item.auditState == 1 || index == 0"
106
+                      ></i>
107
+                    </template>
108
+                  </el-step>
109
+                </el-steps>
110
+              </div>
111
+
112
+              <div v-else>{{ scope.row.index }}</div>
113
+            </template>
114
+          </el-table-column>
115
+          <el-table-column
116
+            label="时间"
117
+            prop="operationTime"
118
+            align="center"
119
+            width="300px"
120
+          >
121
+          </el-table-column>
122
+
123
+          <el-table-column prop="title" label="工作项" align="center" />
124
+          <el-table-column prop="option" label="选项" align="center">
125
+            <template slot-scope="scope">
126
+              <el-radio-group v-model="scope.row.subData">
127
+                <el-radio :label="0" :disabled="disabled">{{
128
+                  scope.row.details.split(",")[0]
129
+                }}</el-radio>
130
+                <el-radio :label="1" :disabled="disabled">{{
131
+                  scope.row.details.split(",")[1]
132
+                }}</el-radio>
133
+              </el-radio-group>
134
+            </template>
135
+          </el-table-column>
136
+        </el-table>
137
+        <div class="btns">
138
+          <el-button class="backBtn" type="cancel" plain @click="goBack()"
139
+            >返回</el-button
140
+          >
141
+        </div>
142
+      </div>
143
+    </div>
144
+  </div>
145
+</template>
146
+<script>
147
+//时间格式的转化
148
+import { getNowFormatDate } from "@/utils"
149
+import { checkList } from "@/api/reservesManagement/mechanicalVentilation"
150
+import { getUser } from "@/utils/auth"
151
+export default {
152
+  name: "AddMeVentilation",
153
+
154
+  data() {
155
+    return {
156
+      userInfo: {},
157
+      //人员字典数据
158
+      perList: {},
159
+      //流程id
160
+      processId: null,
161
+      //初始化点击的步骤
162
+      step: "",
163
+      //初始化步骤高亮显示到第几步
164
+      stepActive: null,
165
+      //表格数据
166
+      totalData: [],
167
+      tableData: [],
168
+      //审批流程
169
+      process: [],
170
+      processNew: [],
171
+      disabled: true,
172
+      processActive:0
173
+    }
174
+  },
175
+  methods: {
176
+    //查看接口
177
+    getCheckList() {
178
+      var processId = this.processId
179
+      checkList(processId).then((res) => {
180
+        console.log(res, ".......")
181
+        if (res.code == 200) {
182
+          var index = 1
183
+          this.tableData = res.data.process
184
+          this.tableData.forEach((item1) => {
185
+            item1.list.forEach((item) => {
186
+              item.index = index
187
+              this.totalData.push(item)
188
+              index++
189
+            })
190
+          })
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
196
+          }
197
+          // this.totalData[1].process=this.process;
198
+          this.totalData.splice(1, 0, { details: "是,否" })
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)
202
+          console.log(this.totalData, "totalData.......")
203
+        }
204
+      })
205
+    },
206
+    //合并列或行
207
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
208
+      if (rowIndex === 1) {
209
+        if (columnIndex === 0) {
210
+          return [1, 4]
211
+        }
212
+      }
213
+      if (rowIndex === 12) {
214
+        if (columnIndex === 0) {
215
+          return [1, 4]
216
+        }
217
+      }
218
+    },
219
+
220
+    //点击返回按钮
221
+    goBack() {
222
+      this.$router.push({ path: "/reservesManagement/fumigationManagement" })
223
+    },
224
+  },
225
+  mounted() {
226
+    this.userInfo = JSON.parse(getUser())
227
+    console.log(this.userInfo, "this.userInfo.....?????")
228
+    this.processId = this.$route.query.processId
229
+    console.log(this.processId, "//////")
230
+    this.stepActive = parseInt(this.$route.query.ongoingStep) + 1
231
+    this.getCheckList()
232
+    //获取人员字典数据
233
+    this.perList = JSON.parse(localStorage.getItem("perList"))
234
+  },
235
+}
236
+</script>
237
+<style lang="scss" scoped>
238
+.icon_wai{
239
+  width:3em;
240
+  height:3em;
241
+}
242
+.global {
243
+  height: calc(100vh - 70px - 83px);
244
+  min-height: 500px;
245
+  overflow-y: scroll;
246
+  .mainContainer {
247
+    background: #fff;
248
+    padding: 10px;
249
+    .steps {
250
+      height: 80px;
251
+      margin: 10px 0;
252
+
253
+      .iconfont {
254
+        font-size: 55px;
255
+      }
256
+    }
257
+    #step1,
258
+    #step2,
259
+    #step3,
260
+    #step4,
261
+    #process {
262
+      display: block;
263
+    }
264
+    #process {
265
+      margin-top: 20px;
266
+      padding: 20px;
267
+      background: rgb(235, 233, 233);
268
+      .process_title {
269
+        margin-bottom: 20px;
270
+      }
271
+      .stepTitle {
272
+        display: flex;
273
+        justify-content: space-between;
274
+      }
275
+    }
276
+    .stepTitle {
277
+      display: flex;
278
+      justify-content: space-between;
279
+    }
280
+    .btns {
281
+      text-align: right;
282
+      margin-top: 20px;
283
+    }
284
+    .active {
285
+      color: #037d41;
286
+    }
287
+    .noActive {
288
+      color: red;
289
+    }
290
+    .stepTitleFont {
291
+      color: black;
292
+    }
293
+    .tf_title {
294
+      margin-bottom: 20px;
295
+      font-weight: 500;
296
+      text-align: left;
297
+      color: #037d41;
298
+      font-size: 18px;
299
+    }
300
+  }
301
+}
302
+</style>
303
+<style scoped>
304
+/* .backBtn.is-plain {
305
+  color: #037d41;
306
+  background-color: #fff;
307
+  border-color: #037d41;
308
+} */
309
+.el-steps {
310
+  height: 350px !important;
311
+}
312
+</style>

+ 27 - 41
shanXiPlatform/src/views/facilitiesEquipment/equipmentManagement/deviceProcurement/index.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2
-    <div class="contentContainer">
3
-      <div class="container">
2
+    <div>
3
+      <div>
4 4
         <div class="header">
5 5
           <el-form :inline="true" :model="query" class="demo-form-inline">
6 6
             <el-form-item label="检测时间">
@@ -33,17 +33,17 @@
33 33
                 >查询</el-button
34 34
               >
35 35
             </el-form-item>
36
-          </el-form>
37
-          <div>
38
-            <el-button
39
-              v-if="$tools.IsPermission(338)"
36
+            <el-form-item style="float:right">
37
+              <el-button
38
+              v-if="$tools.IsPermission(347)"
40 39
               type="success"
41 40
               icon="el-icon-circle-plus"
42 41
               plain
43 42
               @click="add(1)"
44
-              >新增</el-button
43
+              >新增采购</el-button
45 44
             >
46
-          </div>
45
+            </el-form-item>
46
+          </el-form>
47 47
         </div>
48 48
 
49 49
         <el-table
@@ -62,13 +62,14 @@
62 62
             width="50px"
63 63
           >
64 64
           </el-table-column>
65
-          <el-table-column prop="type" label="类型" align="center">
65
+          <el-table-column prop="applyTime" label="记录时间" align="center">
66
+          </el-table-column>
67
+          <el-table-column prop="type" label="记录结果" align="center">
66 68
             <!-- <template slot-scope="scope"> -->
67
-              <span>熏蒸管理</span>
69
+              <span>设备采购</span>
68 70
             <!-- </template> -->
69 71
           </el-table-column>
70
-          <el-table-column prop="applyTime" label="时间" align="center">
71
-          </el-table-column>
72
+          
72 73
           <el-table-column prop="auditState" label="状态" align="center">
73 74
             <template slot-scope="scope">
74 75
               <div v-if="scope.row.auditState == 0">待审批</div>
@@ -87,14 +88,14 @@
87 88
           >
88 89
             <template slot-scope="scope">
89 90
               <el-button
90
-                v-if="$tools.IsPermission(340)"
91
+                v-if="$tools.IsPermission(348)"
91 92
                 size="mini"
92 93
                 type="detailbtn"
93 94
                 @click="handleCheck(3, scope.$index, scope.row)"
94 95
                 >查看</el-button
95 96
               >
96 97
 
97
-              <el-button
98
+              <!-- <el-button
98 99
                 size="mini"
99 100
                 type="editbtn"
100 101
                 @click="handleEdit(2, scope.$index, scope.row)"
@@ -106,14 +107,15 @@
106 107
                   $tools.IsPermission(339)
107 108
                 "
108 109
                 >修改</el-button
109
-              >
110
-              <!-- <el-button
110
+              > -->
111
+              <el-button
112
+                v-if="$tools.IsPermission(349)"
111 113
                 size="mini"
112
-                type="danger"
114
+                type="dangerbtn"
113 115
                 plain
114 116
                 @click="handleDelete(scope.$index, scope.row)"
115 117
                 >删除</el-button
116
-              > -->
118
+              >
117 119
             </template>
118 120
           </el-table-column>
119 121
         </el-table>
@@ -126,6 +128,7 @@
126 128
           :page-size="pagination.pageSize"
127 129
           layout="total, sizes, prev, pager, next, jumper"
128 130
           :total="pagination.total"
131
+          style="float:right;margin:15px 15px 0 0"
129 132
         ></el-pagination>
130 133
       </div>
131 134
     </div>
@@ -149,7 +152,7 @@ export default {
149 152
       //库编号
150 153
       depotId: this.$store.state.depotId,
151 154
       //类型
152
-      type: "xz",
155
+      type: "sbcg",
153 156
       value: "",
154 157
       query: {
155 158
         // startTime: "",
@@ -174,7 +177,7 @@ export default {
174 177
     //新增
175 178
     add(type) {
176 179
       this.$router.push({
177
-        path: "/facilitiesEquipment/facilitiesManagement/maintenance/steps",
180
+        path: "/facilitiesEquipment/equipmentManagement/deviceProcurement/steps",
178 181
         query: {
179 182
           type: type,
180 183
         },
@@ -182,32 +185,21 @@ export default {
182 185
     },
183 186
     //查看
184 187
     handleCheck(type, index, row) {
185
-      if (row.auditState == 4) {
186
-        this.$router.push({
187
-          path: "/facilitiesEquipment/facilitiesManagement/maintenance/completed",
188
-          query: {
189
-            type: type,
190
-            processId: row.processId,
191
-            ongoingStep: row.ongoingStep,
192
-          },
193
-        })
194
-      } else {
195
-        this.$router.push({
196
-          path: "/facilitiesEquipment/facilitiesManagement/maintenance/steps",
188
+      this.$router.push({
189
+          path: "/facilitiesEquipment/equipmentManagement/deviceProcurement/steps",
197 190
           query: {
198 191
             type: type,
199 192
             processId: row.processId,
200 193
             ongoingStep: row.ongoingStep,
201 194
           },
202 195
         })
203
-      }
204 196
     },
205 197
 
206 198
     //修改
207 199
     handleEdit(type, index, row) {
208 200
       console.log(row, "修改row...")
209 201
       this.$router.push({
210
-        path: "/facilitiesEquipment/facilitiesManagement/maintenance/steps",
202
+        path: "/facilitiesEquipment/equipmentManagement/deviceProcurement/steps",
211 203
         query: {
212 204
           type: type,
213 205
           processId: row.processId,
@@ -258,7 +250,7 @@ export default {
258 250
     //获取列表
259 251
     tfList() {
260 252
       var condition = {
261
-        houseId: this.houseId,
253
+        // houseId: this.houseId,
262 254
         depotId: this.depotId,
263 255
         type: this.type,
264 256
         startTime: this.query.value1[0],
@@ -277,12 +269,6 @@ export default {
277 269
           if (res.code == 200) {
278 270
             // this.tfData = res.data.list;
279 271
             this.tfData = res.data.records
280
-            this.tfData.forEach((item) => {
281
-              if (item.type == "tf") {
282
-                item.type = "熏蒸管理"
283
-              }
284
-            })
285
-
286 272
             this.pagination.pageSize = res.data.size
287 273
             this.pagination.total = res.data.total
288 274
           }

+ 44 - 145
shanXiPlatform/src/views/facilitiesEquipment/equipmentManagement/deviceProcurement/steps.vue

@@ -2,15 +2,6 @@
2 2
   <div class="global">
3 3
     <div class="mainContainer">
4 4
       <div class="div_parent">
5
-      <div class="steps">
6
-        <el-steps :active="stepActive" align-center direction="horizontal">
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"/>
11
-          </el-step>
12
-        </el-steps>
13
-      </div>
14 5
       <div id="step1">
15 6
         <el-table  border  stripe  highlight-current-row  :data="tableData"  :span-method="arraySpanMethod">
16 7
           <el-table-column  label="序号"  prop="step"  align="center"  width="100px">
@@ -30,11 +21,10 @@
30 21
             </template>
31 22
           </el-table-column>
32 23
         </el-table>
33
-        <div  v-if="tableDataAudit && tableDataAudit.length"  style="height: 400px">
24
+        <div  v-if="tableDataAudit && tableDataAudit.length"  style="height: 400px;margin-top:15px">
34 25
           <div class="tf_title">
35 26
             <i class="iconfont iconshu"></i>
36
-            <span v-if="stepActive == 0 || step == 1">流程(熏蒸计划审批)</span>
37
-            <span v-if="stepActive == 3 || step == 4">流程(熏蒸散气申请审批)</span> 
27
+            <span>流程(设备采购审批)</span>
38 28
           </div>
39 29
           <el-steps direction="vertical" :active="processActive">
40 30
             <el-step  v-for="(item, index) in tableDataAudit"  :key="index"  icon="el-icon-edit">
@@ -163,14 +153,14 @@ export default {
163 153
   methods: {
164 154
     //合并列或行
165 155
     arraySpanMethod({ row, column, rowIndex, columnIndex }) {
166
-      if (this.step != 1) {
167
-        return
168
-      }
169
-      if (rowIndex === 1) {
170
-        if (columnIndex === 0) {
171
-          return [1, 4]
172
-        }
173
-      }
156
+      // if (this.step != 1) {
157
+      //   return
158
+      // }
159
+      // if (rowIndex === 1) {
160
+      //   if (columnIndex === 0) {
161
+      //     return [1, 4]
162
+      //   }
163
+      // }
174 164
     },
175 165
 
176 166
     // 用户字典列表
@@ -185,10 +175,8 @@ export default {
185 175
     //获取流程数据
186 176
     processList() {
187 177
       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"
178
+      if(this.stepActive == 0){
179
+        type = "sbcg"
192 180
       }
193 181
       var userId = this.userInfo.uid
194 182
       var depotId = this.userInfo.depotId
@@ -217,10 +205,8 @@ export default {
217 205
     },
218 206
     detailProcessList() {
219 207
       var type =  null;
220
-      if(this.stepActive == 0 || this.stepActive == 1 || this.stepActive == 2){
221
-        type = "xzjh"
222
-      }else if(this.stepActive == 3 || this.stepActive == 4){
223
-        type = "xzsq"
208
+      if(this.stepActive == 0){
209
+        type = "sbcg"
224 210
       }
225 211
       var userId = this.userInfo.uid
226 212
       var depotId = this.userInfo.depotId
@@ -251,22 +237,7 @@ export default {
251 237
 
252 238
     //初始化应该显示第几步的表格、
253 239
     tableShow() {
254
-      if (this.stepActive == 0) {
255
-        this.tableData = this.totalData[0].list
256
-        // this.subList = this.tableData
257
-        //主流程ID
258
-        this.mainId = this.totalData[0].step.id
259
-      } else if (this.stepActive == 1) {
260
-        this.tableData = this.totalData[1].list
261
-      } else if (this.stepActive == 2) {
262
-        this.tableData = this.totalData[2].list
263
-      } else if (this.stepActive == 3) {
264
-        this.tableData = this.totalData[3].list
265
-        this.mainId = this.totalData[3].step.id
266
-      } else if (this.stepActive == 4) {
267
-        this.tableData = this.totalData[4].list
268
-      }
269
-      // this.tableData = this.totalData[this.stepActive].list
240
+      this.tableData = this.totalData[0].list
270 241
     },
271 242
     //radio选项改变是
272 243
     radioChange(row) {
@@ -286,12 +257,8 @@ export default {
286 257
       }
287 258
 
288 259
       if (finish) {
289
-        if (this.stepActive == 0 || this.stepActive == 3) {
260
+        if (this.stepActive == 0) {
290 261
           this.button = "保存并提交"
291
-        } else if (this.stepActive == 1 || this.stepActive == 2) {
292
-          this.button = "保存"
293
-        } else {
294
-          this.button = "完成"
295 262
         }
296 263
       } else {
297 264
         if (this.step == 1) {
@@ -301,93 +268,18 @@ export default {
301 268
         }
302 269
       }
303 270
     },
304
-    //点击每步时
305
-    stepClick(index) {
306
-      //this.step = index + 1
307
-      console.log(this.step, this.stepActive + 1)
308
-
309
-      if (index > this.stepActive) {
310
-        return
311
-      }
312
-      if(index != this.stepActive){
313
-        this.disabled = true
314
-        this.isShow = false
315
-      }else if(index == this.stepActive){
316
-        this.disabled = false
317
-        this.isShow = true
318
-      }
319
-      this.step = index + 1
320
-
321
-      console.log("step:" + this.step);
322
-
323
-      if (this.step == 1) {
324
-        console.log(this.totalData)
325
-        this.tableData = this.totalData[0].list
326
-        console.log(this.tableData)
327
-        this.tableDataAudit = this.totalData[0].audit
328
-        for (let i = 0; i < this.tableDataAudit.length; i++) {
329
-          var ele = this.tableDataAudit[i]
330
-          if (ele.auditState == 0) {
331
-            this.processActive = i
332
-          }else{
333
-            this.processActive = this.tableDataAudit.length
334
-          }
335
-        }
336
-        this.button = "保存并提交"
337
-      } else if (this.step == 2) {
338
-        // this.isShow = true
339
-        this.tableData = this.totalData[1].list
340
-        this.tableDataAudit = []
341
-        console.log(this.tableData, "第二步")
342
-        this.button = "暂存"
343
-      } else if (this.step == 3) {
344
-        // this.isShow = true
345
-        this.tableData = this.totalData[2].list
346
-        this.tableDataAudit = []
347
-        this.button = "暂存"
348
-      } else if (this.step == 4) {
349
-        console.log(this.totalData)
350
-        this.tableData = this.totalData[3].list
351
-        console.log(this.tableData)
352
-        this.tableDataAudit = this.totalData[3].audit
353
-        for (let i = 0; i < this.tableDataAudit.length; i++) {
354
-          var ele = this.tableDataAudit[i]
355
-          if (ele.auditState == 0) {
356
-            this.processActive = i
357
-          }else{
358
-            this.processActive = this.tableDataAudit.length
359
-          }
360
-        }
361
-        this.button = "保存并提交"
362
-      } else if (this.step == 5) {
363
-        // this.isShow = true
364
-        this.tableData = this.totalData[4].list
365
-        this.tableDataAudit = []
366
-        this.button = "暂存"
367
-        this.disabled = false
368
-      }
369
-      console.log(this.tableData, "???")
370
-      this.changeBtn(this.tableData)
371
-    },
372 271
 
373 272
     //点击返回按钮
374 273
     goBack() {
375
-      this.$router.push({ path: "/reservesManagement/fumigationManagement" })
274
+      this.$router.push({ path: "/facilitiesEquipment/equipmentManagement/deviceProcurement" })
376 275
     },
377 276
     //新增时初始化页面
378 277
     processFirst() {
379
-      var type = "xz"
278
+      var type = "sbcg"
380 279
       getAddList(type)
381 280
         .then((res) => {
382 281
           if (res.code == 200) {
383 282
             this.totalData = res.data
384
-
385
-            // this.totalData[0].list.splice(1, 0, {
386
-            //   details: "是,否",
387
-            //   process: this.process,
388
-            // })
389
-            this.main_id = this.totalData[0].step.id
390
-            console.log(this.totalData, "this.totalData..")
391 283
             this.tableShow()
392 284
           }
393 285
         })
@@ -400,22 +292,20 @@ export default {
400 292
     tfAdd() {
401 293
       this.loading=true;
402 294
       let type = null;
403
-      if(this.stepActive == 0 || this.stepActive == 1 || this.stepActive == 2){
404
-        type = "xzjh"
405
-      }else if(this.stepActive == 3 || this.stepActive == 4){
406
-        type = "xzsq"
295
+      if(this.stepActive == 0){
296
+        type = "sbcg"
407 297
       }
408 298
       var data = {
409 299
         //流程类型
410 300
         type: type,
411 301
         //主流程id
412
-        mainId: this.mainId,
302
+        // mainId: this.mainId,
413 303
         //主流程索引
414 304
         ongoingStep: this.stepActive,
415 305
 
416 306
         subList: this.subList,
417 307
         //仓房id
418
-        houseId: Number(this.$store.state.houseId),
308
+        // houseId: Number(this.$store.state.houseId),
419 309
         //库id
420 310
         depotId: this.$store.state.depotId,
421 311
         //发起人
@@ -435,7 +325,7 @@ export default {
435 325
             this.loading=true;
436 326
             this.$message.success(res.msg);
437 327
             this.$router.push({
438
-              path: "/reservesManagement/fumigationManagement",
328
+              path: "/facilitiesEquipment/equipmentManagement/deviceProcurement",
439 329
             })
440 330
           }else{
441 331
             this.$message.error(res.msg);
@@ -451,16 +341,23 @@ export default {
451 341
 
452 342
     //点击保存并提交按钮时
453 343
     save() {
454
-      if( this.totalData[this.stepActive].list[0].subData == 1){
455
-         this.$message("只有选择是才能发起申请");
456
-        return;
344
+      let status = 0
345
+      if(this.stepActive == 0){
346
+        this.totalData[this.stepActive].list.forEach(item => {
347
+          if( item.subData == 1){
348
+            this.$message("只有选择是才能发起申请");
349
+            status = 1
350
+            throw new Error("EndIterative");
351
+          }
352
+        })
457 353
       }
354
+      if(status == 0){
458 355
       this.tableData.forEach((ele) => {
459 356
         var obj = {}
460 357
         console.log(ele)
461 358
         obj.subData = ele.subData
462 359
         obj.subId = ele.id
463
-        obj.mainId = ele.zid
360
+        // obj.mainId = ele.zid
464 361
         obj.operationTime = ele.operationTime
465 362
         obj.processId = ''
466 363
         if(this.$route.query && this.$route.query.processId){
@@ -505,6 +402,7 @@ export default {
505 402
           this.getUpdateList()
506 403
         }
507 404
       }
405
+      }
508 406
     },
509 407
 
510 408
     //查看接口
@@ -546,10 +444,8 @@ export default {
546 444
     getUpdateList() {
547 445
       this.loading=true;
548 446
       let type = null;
549
-      if(this.stepActive == 0 || this.stepActive == 1 || this.stepActive == 2){
550
-        type = "xzjh"
551
-      }else if(this.stepActive == 3 || this.stepActive == 4){
552
-        type = "xzsq"
447
+      if(this.stepActive == 0){
448
+        type = "sbcg"
553 449
       }
554 450
       let ongoingStepNum = null
555 451
       if(this.stepActive < 4 && this.button !== "暂存"){
@@ -578,11 +474,11 @@ export default {
578 474
             this.getCheckList()
579 475
           }else{
580 476
             this.$router.push({
581
-              path: "/reservesManagement/fumigationManagement",
477
+              path: "/facilitiesEquipment/equipmentManagement/deviceProcurement",
582 478
             })
583 479
           }
584 480
           // this.$router.push({
585
-          //     path: "/reservesManagement/fumigationManagement",
481
+          //     path: "/facilitiesEquipment/equipmentManagement/deviceProcurement",
586 482
           //   })
587 483
         }
588 484
       })
@@ -602,7 +498,7 @@ export default {
602 498
     } else if (this.$route.query.type == 2) {
603 499
       this.isShow = true
604 500
       this.disabled = false
605
-      this.stepActive = parseInt(this.$route.query.ongoingStep)
501
+      this.stepActive = 0
606 502
       this.processId = this.$route.query.processId
607 503
       this.step = this.stepActive + 1
608 504
       this.getCheckList()
@@ -611,9 +507,12 @@ export default {
611 507
       this.disabled = true
612 508
       this.processId = this.$route.query.processId
613 509
       //高亮显示
614
-      this.stepActive = parseInt(this.$route.query.ongoingStep)
510
+      this.stepActive = 0
615 511
       this.step = this.stepActive + 1
616 512
       this.getCheckList()
513
+      if(parseInt(this.$route.query.ongoingStep) == 1){
514
+        this.processActive = 5
515
+      }
617 516
     }
618 517
 
619 518
     if (this.stepActive == 0 || this.stepActive == 3) {

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

@@ -174,7 +174,7 @@ export default {
174 174
       //  console.log(userInfo,"/////")
175 175
       //   let homeType = userInfo.homeType
176 176
       var homeType = this.userInfo.homeType
177
-      if(item.type == 'xzjh' || item.type == 'xzsq' || item.type == 'sswxjh' || item.type == 'sswxys'){
177
+      if(item.type == 'xzjh' || item.type == 'xzsq' || item.type == 'sswxjh' || item.type == 'sswxys' || item.type == 'sbcg'){
178 178
         if (homeType == 1) {
179 179
           this.$router.push({
180 180
             path: "/dashboard/daiban/initiated/inixunzengDetails",

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

@@ -33,7 +33,7 @@
33 33
           <span v-if="this.subData == 1">否</span>
34 34
           <span v-if="this.subData == 0">是</span>
35 35
         </div>
36
-        <div style="margin-left: 20px" v-if="type == 'sswxjh' || type == 'sswxys'">
36
+        <div style="margin-left: 20px" v-if="type == 'sswxjh' || type == 'sswxys' || type == 'sbcg'">
37 37
           <div v-for="(item,index) in tableData.list" :key="index">
38 38
             <span>{{index+1}}.{{item.title}}:</span>
39 39
             <span v-if="item.subData == 1">否</span>
@@ -203,7 +203,11 @@ export default {
203 203
             let ongoingStep = this.ongoingStep
204 204
             this.subData = res.data.process[ongoingStep].list[0].subData  //方案状态
205 205
             this.tableData = res.data.process[ongoingStep]
206
-            this.isAudit = res.data.process[ongoingStep].step.isAudit
206
+            if(res.data.process[ongoingStep].step){
207
+              this.isAudit = res.data.process[ongoingStep].step.isAudit
208
+            }else{
209
+              this.isAudit = null
210
+            }
207 211
             if(!this.isAudit && this.isAudit != 0){
208 212
               this.isAudit = 1
209 213
             }
@@ -308,7 +312,7 @@ export default {
308 312
            this.ongoingStepNext=this.ongoingStep
309 313
           this.process = []
310 314
           //this.getApproval()
311
-          if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1)) {
315
+          if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1) || item.type == "sbcg") {
312 316
             this.getyjcgApproval()
313 317
           } else {
314 318
             this.getApproval()
@@ -324,7 +328,7 @@ export default {
324 328
       console.log(index, "index......")
325 329
       //最后一个人通过
326 330
       if (index == this.process.length - 1) {
327
-        if(item.type == "yjcg"){
331
+        if(item.type == "yjcg" || item.type == "sbcg"){
328 332
           this.auditState = 4
329 333
         }else{
330 334
            this.auditState = 3
@@ -349,7 +353,7 @@ export default {
349 353
           message:"审批通过",
350 354
           type: 'success'
351 355
         })
352
-      if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1)) {
356
+      if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1) || item.type == "sbcg") {
353 357
         this.getyjcgApproval()
354 358
       } else {
355 359
         this.getApproval()
@@ -510,7 +514,7 @@ export default {
510 514
       }
511 515
     }
512 516
     .table_middle {
513
-      height: 70px;
517
+      // height: 70px;
514 518
       line-height: 70px;
515 519
       padding-left: 10px;
516 520
       background: #fff;

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

@@ -221,7 +221,7 @@ export default {
221 221
 
222 222
       var homeType = this.userInfo.homeType
223 223
       if (item.type.indexOf('code') == -1) {
224
-        if(item.type == 'xzjh' || item.type == 'xzsq' || item.type == 'sswxjh' || item.type == 'sswxys'){
224
+        if(item.type == 'xzjh' || item.type == 'xzsq' || item.type == 'sswxjh' || item.type == 'sswxys' || item.type == 'sbcg'){
225 225
           if (homeType == 1) {
226 226
             this.$router.push({
227 227
               name: "XunzengDetails",

+ 9 - 5
shanXiPlatform/src/views/home/daiBan/pending/xunzengDetails.vue

@@ -33,7 +33,7 @@
33 33
           <span v-if="this.subData == 1">否</span>
34 34
           <span v-if="this.subData == 0">是</span>
35 35
         </div>
36
-        <div style="margin-left: 20px" v-if="type == 'sswxjh' || type == 'sswxys'">
36
+        <div style="margin-left: 20px" v-if="type == 'sswxjh' || type == 'sswxys' || type == 'sbcg'">
37 37
           <div v-for="(item,index) in tableData.list" :key="index">
38 38
             <span>{{index+1}}.{{item.title}}:</span>
39 39
             <span v-if="item.subData == 1">否</span>
@@ -203,7 +203,11 @@ export default {
203 203
             let ongoingStep = this.ongoingStep
204 204
             this.subData = res.data.process[ongoingStep].list[0].subData  //方案状态
205 205
             this.tableData = res.data.process[ongoingStep]
206
-            this.isAudit = res.data.process[ongoingStep].step.isAudit
206
+            if(res.data.process[ongoingStep].step){
207
+              this.isAudit = res.data.process[ongoingStep].step.isAudit
208
+            }else{
209
+              this.isAudit = null
210
+            }
207 211
             if(!this.isAudit && this.isAudit != 0){
208 212
               this.isAudit = 1
209 213
             }
@@ -311,7 +315,7 @@ export default {
311 315
           this.ongoingStepNext=this.ongoingStep
312 316
           this.process = []
313 317
           //this.getApproval()
314
-          if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1)) {
318
+          if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1) || item.type == "sbcg") {
315 319
             this.getyjcgApproval()
316 320
           } else {
317 321
             this.getApproval()
@@ -325,7 +329,7 @@ export default {
325 329
     agree(item, index) {
326 330
       //最后一个人通过
327 331
       if (index == this.process.length - 1) {
328
-        if(item.type == "yjcg"){
332
+        if(item.type == "yjcg" || item.type == "sbcg"){
329 333
           this.auditState = 4
330 334
         }else{
331 335
            this.auditState = 3
@@ -343,7 +347,7 @@ export default {
343 347
           message:"审批通过",
344 348
           type: 'success'
345 349
         })
346
-      if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1)) {
350
+      if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1) || item.type == "sbcg") {
347 351
         this.getyjcgApproval()
348 352
       } else {
349 353
         this.getApproval()

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

@@ -227,7 +227,7 @@ 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(item.type == 'xzjh' || item.type == 'xzsq' || item.type == 'sswxjh' || item.type == 'sswxys'){
230
+        if(item.type == 'xzjh' || item.type == 'xzsq' || item.type == 'sswxjh' || item.type == 'sswxys' || item.type == 'sbcg'){
231 231
           if (homeType == 1) {
232 232
             this.$router.push({
233 233
               path: "/dashboard/daiban/processed/xunzengDetails",

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

@@ -33,7 +33,7 @@
33 33
           <span v-if="this.subData == 1">否</span>
34 34
           <span v-if="this.subData == 0">是</span>
35 35
         </div>
36
-        <div style="margin-left: 20px" v-if="type == 'sswxjh' || type == 'sswxys'">
36
+        <div style="margin-left: 20px" v-if="type == 'sswxjh' || type == 'sswxys' || type == 'sbcg'">
37 37
           <div v-for="(item,index) in tableData.list" :key="index">
38 38
             <span>{{index+1}}.{{item.title}}:</span>
39 39
             <span v-if="item.subData == 1">否</span>
@@ -203,7 +203,11 @@ export default {
203 203
             let ongoingStep = this.ongoingStep
204 204
             this.subData = res.data.process[ongoingStep].list[0].subData  //方案状态
205 205
             this.tableData = res.data.process[ongoingStep]
206
-            this.isAudit = res.data.process[ongoingStep].step.isAudit
206
+            if(res.data.process[ongoingStep].step){
207
+              this.isAudit = res.data.process[ongoingStep].step.isAudit
208
+            }else{
209
+              this.isAudit = null
210
+            }
207 211
             if(!this.isAudit && this.isAudit != 0){
208 212
               this.isAudit = 1
209 213
             }
@@ -306,7 +310,7 @@ export default {
306 310
            this.ongoingStepNext=this.ongoingStep
307 311
           this.process = []
308 312
           //this.getApproval()
309
-          if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1)) {
313
+          if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1) || item.type == "sbcg") {
310 314
             this.getyjcgApproval()
311 315
           } else {
312 316
             this.getApproval()
@@ -322,7 +326,7 @@ export default {
322 326
       console.log(index, "index......")
323 327
       //最后一个人通过
324 328
       if (index == this.process.length - 1) {
325
-        if(item.type == "yjcg"){
329
+        if(item.type == "yjcg" || item.type == "sbcg"){
326 330
           this.auditState = 4
327 331
         }else{
328 332
            this.auditState = 3
@@ -347,7 +351,7 @@ export default {
347 351
           message:"审批通过",
348 352
           type: 'success'
349 353
         })
350
-      if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1)) {
354
+      if (item.type == "yjcg" || item.type == "xzjh"  || ((item.type == "sswxjh" || item.type == "sswxys") && this.isAudit == 1) || item.type == "sbcg") {
351 355
         this.getyjcgApproval()
352 356
       } else {
353 357
         this.getApproval()
@@ -449,6 +453,8 @@ export default {
449 453
       this.ongoingStep = 0
450 454
     }else if(this.$route.query.type == 'sswxys'){
451 455
       this.ongoingStep = 1
456
+    }else if(this.$route.query.type == 'sbcg'){
457
+      this.ongoingStep = 0
452 458
     }
453 459
 
454 460
     this.getCheckList()
@@ -509,7 +515,7 @@ export default {
509 515
       }
510 516
     }
511 517
     .table_middle {
512
-      height: 70px;
518
+      // height: 70px;
513 519
       line-height: 70px;
514 520
       padding-left: 10px;
515 521
       background: #fff;

+ 6 - 6
shanXiPlatform/src/views/systemManagement/userManagement/approverManagement/index.vue

@@ -91,10 +91,10 @@ export default {
91 91
                     label: "药剂领用",
92 92
                     type: "yjly"
93 93
                 },
94
-                // {
95
-                //   label: "设备采购",
96
-                //   type: "sbcg",
97
-                // },
94
+                {
95
+                  label: "设备采购",
96
+                  type: "sbcg",
97
+                },
98 98
                 // {
99 99
                 //   label: "设备领用归还",
100 100
                 //   type: "sblygh",
@@ -549,7 +549,7 @@ export default {
549 549
                 .catch(err => {
550 550
                     console.log(err)
551 551
                 })
552
-            if(this.type == 'xzjh' || this.type == 'yjcg' || this.type == 'sswxjh' || this.type == 'sswxys'){
552
+            if(this.type == 'xzjh' || this.type == 'yjcg' || this.type == 'sswxjh' || this.type == 'sswxys' || this.type == 'sbcg'){
553 553
                 let paramsNew = {
554 554
                     depotId: 1,
555 555
                     roleIds: 37
@@ -560,7 +560,7 @@ export default {
560 560
                             this.tableData.forEach(item => {
561 561
                                 if ( (this.type == 'xzjh' || this.type == 'yjcg') && item.title.indexOf("分公司主管处室") != -1 ) {
562 562
                                     this.$set(item, "approverSelect", res.data[37])
563
-                                }else if((this.type == 'sswxjh' || this.type == 'sswxys') && item.title.indexOf("分公司") != -1){
563
+                                }else if((this.type == 'sswxjh' || this.type == 'sswxys' || this.type == 'sbcg') && item.title.indexOf("分公司") != -1){
564 564
                                     this.$set(item, "approverSelect", res.data[37])
565 565
                                 }
566 566
                             })