钞小赢 лет назад: 4
Родитель
Сommit
0619bcbb08

+ 11 - 0
shanXiPlatform/src/api/facilitiesEquipment/deviceManagement.js

@@ -0,0 +1,11 @@
1
+import request from '@/utils/request'
2
+
3
+ //设备管理列表
4
+export function getList(data) {
5
+    return request({
6
+     
7
+      url: `/csc-szls-business/equipmentStroe/authority/getPage`,
8
+      method: 'post',
9
+      data
10
+    })
11
+  }

+ 211 - 131
shanXiPlatform/src/views/facilitiesEquipment/equipmentManagement/deviceManagement/index.vue

@@ -1,79 +1,137 @@
1
 <template>
1
 <template>
2
-  <div  id="container">
2
+  <div id="container">
3
     <div class="header_button">
3
     <div class="header_button">
4
       <el-form :inline="true">
4
       <el-form :inline="true">
5
-            <el-form-item label="设备类别">
6
-                <el-select v-model="query.title" placeholder="请选择">
7
-                    <el-option
8
-                    v-for="item in options1"
9
-                    :key="item.value"
10
-                    :label="item.label"
11
-                    :value="item.value">
12
-                    </el-option>
13
-                </el-select>
14
-            </el-form-item>
15
-            <el-form-item label="设备名称">
16
-                <el-select v-model="query.title" placeholder="请选择">
17
-                    <el-option
18
-                    v-for="item in options2"
19
-                    :key="item.value"
20
-                    :label="item.label"
21
-                    :value="item.value">
22
-                    </el-option>
23
-                </el-select>
24
-            </el-form-item>
25
-            <el-form-item label="设备状态">
26
-                <el-select v-model="query.title" placeholder="请选择">
27
-                    <el-option
28
-                    v-for="item in options3"
29
-                    :key="item.value"
30
-                    :label="item.label"
31
-                    :value="item.value">
32
-                    </el-option>
33
-                </el-select>
34
-            </el-form-item>
5
+        <el-form-item label="设备类别">
6
+          <el-select v-model="query.title" placeholder="请选择">
7
+            <el-option
8
+              v-for="item in options1"
9
+              :key="item.value"
10
+              :label="item.label"
11
+              :value="item.value"
12
+            >
13
+            </el-option>
14
+          </el-select>
15
+        </el-form-item>
16
+        <el-form-item label="设备名称">
17
+          <el-select v-model="query.title" placeholder="请选择">
18
+            <el-option
19
+              v-for="item in options2"
20
+              :key="item.value"
21
+              :label="item.label"
22
+              :value="item.value"
23
+            >
24
+            </el-option>
25
+          </el-select>
26
+        </el-form-item>
27
+        <el-form-item label="设备状态">
28
+          <el-select v-model="query.title" placeholder="请选择">
29
+            <el-option
30
+              v-for="item in options3"
31
+              :key="item.value"
32
+              :label="item.label"
33
+              :value="item.value"
34
+            >
35
+            </el-option>
36
+          </el-select>
37
+        </el-form-item>
35
 
38
 
36
-          <el-form-item>
37
-          <el-button type="info" class="iconfont iconclear" plain @click="clear">清空</el-button>
38
-          <el-button type="success" icon="el-icon-search" plain @click="search">查询</el-button>
39
-          </el-form-item>
40
-          <el-form-item  style="float:right">
41
-          <el-button type="success" icon="el-icon-circle-plus" v-if="$tools.IsPermission(263)" plain @click="addBtn()">新建公告</el-button>
42
-          </el-form-item>
39
+        <el-form-item>
40
+          <el-button type="info" class="iconfont iconclear" plain @click="clear"
41
+            >清空</el-button
42
+          >
43
+          <el-button type="success" icon="el-icon-search" plain @click="search"
44
+            >查询</el-button
45
+          >
46
+        </el-form-item>
47
+        <el-form-item style="float: right">
48
+          <el-button
49
+            type="success"
50
+            icon="el-icon-circle-plus"
51
+            v-if="$tools.IsPermission(263)"
52
+            plain
53
+            @click="addBtn()"
54
+            >新建公告</el-button
55
+          >
56
+        </el-form-item>
43
       </el-form>
57
       </el-form>
44
     </div>
58
     </div>
45
     <div class="table">
59
     <div class="table">
46
-      <el-table border stripe :data="tableList" highlight-current-row  :header-cell-style="{background:'#f8f8f8'}">
47
-        <el-table-column type="index" align="center" label="序号" width="50px" />
48
-        <el-table-column prop="title" label="设备类别" align="center" />
49
-        <el-table-column prop="publishUserName" label="设备名称" align="center" />
50
-        <el-table-column prop="publishOrgName" label="资产编号" align="center" />
51
-        <el-table-column prop="recvDetailsInfo" label="设备状态" align="center" />
52
-        <el-table-column prop="operation" label="查看" align="center" width="200px" fixed="right">
60
+      <el-table
61
+        border
62
+        stripe
63
+        :data="tableList"
64
+        highlight-current-row
65
+        :header-cell-style="{ background: '#f8f8f8' }"
66
+      >
67
+        <el-table-column
68
+          type="index"
69
+          align="center"
70
+          label="序号"
71
+          width="50px"
72
+        />
73
+        <el-table-column
74
+          prop="equipmentCategory"
75
+          label="设备类别"
76
+          align="center"
77
+        />
78
+        <el-table-column prop="equipmentName" label="设备名称" align="center" />
79
+        <el-table-column
80
+          prop="equipmentNumber"
81
+          label="设备编号"
82
+          align="center"
83
+        />
84
+        <el-table-column prop="assetNumber" label="资产编号" align="center" />
85
+
86
+        <el-table-column prop="state" label="设备状态" align="center">
87
+          <template slot-scope="scope">
88
+            <div v-if="scope.row.state == 0">正常使用</div>
89
+            <div v-if="scope.row.state == 1">维修</div>
90
+            <div v-if="scope.row.state == 2">报废</div>
91
+          </template>
92
+        </el-table-column>
93
+
94
+        <el-table-column
95
+          prop="operation"
96
+          label="查看"
97
+          align="center"
98
+          width="200px"
99
+          fixed="right"
100
+        >
53
           <template slot-scope="scope">
101
           <template slot-scope="scope">
54
-            <span class="buttonSpan"  @click="handleDetail(scope.row)">管理记录》</span>
102
+            <span class="buttonSpan" @click="handleDetail(scope.row)"
103
+              >管理记录》</span
104
+            >
55
           </template>
105
           </template>
56
         </el-table-column>
106
         </el-table-column>
57
       </el-table>
107
       </el-table>
58
       <div class="pagination-container">
108
       <div class="pagination-container">
59
-          <el-pagination
60
-            class="right"
61
-            background
62
-            :current-page.sync="listQuery.page"
63
-            :page-size="listQuery.limit"
64
-            :page-sizes="[10,20,30,40]"
65
-            :total="total"
66
-            @size-change="sizeChange"
67
-            @current-change="pageChange"
68
-            layout="total, sizes, prev, pager, next, jumper"
69
-          ></el-pagination>
70
-        </div>
109
+        <el-pagination
110
+          class="right"
111
+          background
112
+          :current-page.sync="listQuery.page"
113
+          :page-size="listQuery.limit"
114
+          :page-sizes="[10, 20, 30, 40]"
115
+          :total="total"
116
+          @size-change="sizeChange"
117
+          @current-change="pageChange"
118
+          layout="total, sizes, prev, pager, next, jumper"
119
+        ></el-pagination>
120
+      </div>
71
     </div>
121
     </div>
72
   </div>
122
   </div>
73
 </template>
123
 </template>
74
 <script>
124
 <script>
75
-import { getList,deleteFun,enableWarn,stopWarn,getAllRole,getDepotAll,getDepotById } from '@/api/system/notice'
76
-import { getUser } from '@/utils/auth'
125
+import {
126
+  getList,
127
+  deleteFun,
128
+  enableWarn,
129
+  stopWarn,
130
+  getAllRole,
131
+  getDepotAll,
132
+  getDepotById,
133
+} from "@/api/facilitiesEquipment/deviceManagement"
134
+import { getUser } from "@/utils/auth"
77
 export default {
135
 export default {
78
   name: "NewNotice",
136
   name: "NewNotice",
79
   data() {
137
   data() {
@@ -81,9 +139,9 @@ export default {
81
       // 列表数据
139
       // 列表数据
82
       tableList: [{}],
140
       tableList: [{}],
83
       query: {
141
       query: {
84
-        publishTime:[],
85
-        title:'',
86
-        annoType:''
142
+        publishTime: [],
143
+        title: "",
144
+        annoType: "",
87
       },
145
       },
88
       // 分页
146
       // 分页
89
       total: 0,
147
       total: 0,
@@ -92,95 +150,100 @@ export default {
92
         page: 1,
150
         page: 1,
93
         limit: 10,
151
         limit: 10,
94
       },
152
       },
95
-      options1:[],
96
-      options2:[],
97
-      options3:[],
153
+      options1: [],
154
+      options2: [],
155
+      options3: [],
98
     }
156
     }
99
   },
157
   },
100
   created() {
158
   created() {
101
     // this.getList()
159
     // this.getList()
102
   },
160
   },
103
   methods: {
161
   methods: {
104
-    getList() {
105
-      console.log(this.query.publishTime)
162
+    getDeviceList() {
106
       let condition = {
163
       let condition = {
107
-        publishTimeStart:'',
108
-        publishTimeEnd:'',
109
-        title: this.query.title,
110
-        annoType: this.query.annoType
111
-      }
112
-      if(this.query.publishTime && this.query.publishTime.length>0){
113
-        condition.publishTimeStart = this.query.publishTime[0]
114
-        condition.publishTimeEnd = this.query.publishTime[1]
164
+        equipmentCategory: "",
165
+        equipmentName: "",
166
+        state: "",
115
       }
167
       }
168
+      // if(this.query.publishTime && this.query.publishTime.length>0){
169
+      //   condition.publishTimeStart = this.query.publishTime[0]
170
+      //   condition.publishTimeEnd = this.query.publishTime[1]
171
+      // }
116
       let data = {
172
       let data = {
117
         pageIndex: this.listQuery.page,
173
         pageIndex: this.listQuery.page,
118
         pageSize: this.listQuery.limit,
174
         pageSize: this.listQuery.limit,
119
-        condition: JSON.stringify(condition)
175
+        condition: JSON.stringify(condition),
120
       }
176
       }
121
-      getList(data).then((res) => {
177
+      getList(data)
178
+        .then((res) => {
122
           if (res.code == 200) {
179
           if (res.code == 200) {
123
             this.tableList = res.data.records
180
             this.tableList = res.data.records
124
             this.listQuery.limit = res.data.size
181
             this.listQuery.limit = res.data.size
125
             this.total = res.data.total
182
             this.total = res.data.total
126
-          }else{
183
+          } else {
127
             this.$message({
184
             this.$message({
128
-              type: 'error',
129
-              message: res.msg
185
+              type: "error",
186
+              message: res.msg,
130
             })
187
             })
131
           }
188
           }
132
-      }).catch((err) => {
189
+        })
190
+        .catch((err) => {
133
           console.log(err)
191
           console.log(err)
134
         })
192
         })
135
     },
193
     },
136
     changeRecvDetailsName(list) {
194
     changeRecvDetailsName(list) {
137
-      list.forEach(item => {
138
-        if(item.recvType == '20'){
195
+      list.forEach((item) => {
196
+        if (item.recvType == "20") {
139
           let recvDetailsNew = item.recvDetails
197
           let recvDetailsNew = item.recvDetails
140
-          let recvDetailsarrNew = recvDetailsNew.split(',')
198
+          let recvDetailsarrNew = recvDetailsNew.split(",")
141
           let recvDetailsNameNew = []
199
           let recvDetailsNameNew = []
142
-          recvDetailsarrNew.forEach(itemId => {
143
-            getDepotById(itemId).then(response => {
200
+          recvDetailsarrNew.forEach((itemId) => {
201
+            getDepotById(itemId).then((response) => {
144
               recvDetailsNameNew.push(response.data.depot.dname)
202
               recvDetailsNameNew.push(response.data.depot.dname)
145
-              item.recvDetailsName = recvDetailsNameNew.join(',');
203
+              item.recvDetailsName = recvDetailsNameNew.join(",")
146
             })
204
             })
147
           })
205
           })
148
-        }else{
149
-          item.recvDetailsName = ''
206
+        } else {
207
+          item.recvDetailsName = ""
150
         }
208
         }
151
       })
209
       })
152
     },
210
     },
153
     search() {
211
     search() {
154
-      this.getList()
212
+      this.getDeviceList()
155
     },
213
     },
156
     clear() {
214
     clear() {
157
       this.query = {
215
       this.query = {
158
-        publishTime:[],
159
-        title:'',
160
-        annoType:''
216
+        publishTime: [],
217
+        title: "",
218
+        annoType: "",
161
       }
219
       }
162
-      this.getList()
220
+      this.getDeviceList()
163
     },
221
     },
164
     sizeChange(v) {
222
     sizeChange(v) {
165
-      this.listQuery.limit = v;
166
-      this.getList();
223
+      this.listQuery.limit = v
224
+      this.getDeviceList()
167
     },
225
     },
168
     pageChange(v) {
226
     pageChange(v) {
169
-      this.listQuery.page = v;
170
-      this.getList();
227
+      this.listQuery.page = v
228
+      this.getDeviceList()
171
     },
229
     },
172
     // 新增按钮
230
     // 新增按钮
173
     addBtn() {
231
     addBtn() {
174
-      if(JSON.parse(getUser()).depotId == '1'){
175
-        this.$router.push({ name: "Addnotice",query: { state: 'add',orgType: '1' } })
176
-      }else{
177
-        this.$router.push({ name: "Addnotice",query: { state: 'add',orgType: '2' } })
178
-      } 
232
+      if (JSON.parse(getUser()).depotId == "1") {
233
+        this.$router.push({
234
+          name: "Addnotice",
235
+          query: { state: "add", orgType: "1" },
236
+        })
237
+      } else {
238
+        this.$router.push({
239
+          name: "Addnotice",
240
+          query: { state: "add", orgType: "2" },
241
+        })
242
+      }
179
     },
243
     },
180
-    // 查看   
244
+    // 查看
181
     handleDetail(row) {
245
     handleDetail(row) {
182
-      this.$router.push({ name: "DeviceManagementDlist",query: { }})
183
-      
246
+      this.$router.push({ name: "DeviceManagementDlist", query: {} })
184
     },
247
     },
185
     // // 编辑
248
     // // 编辑
186
     // handleEdit(row) {
249
     // handleEdit(row) {
@@ -188,42 +251,59 @@ export default {
188
     // },
251
     // },
189
     // 删除
252
     // 删除
190
     handleDelete(row) {
253
     handleDelete(row) {
191
-      this.$confirm('确定删除该项记录?', '提示', {
192
-        confirmButtonText: '确定',
193
-        cancelButtonText: '取消',
194
-        type: 'warning'
254
+      this.$confirm("确定删除该项记录?", "提示", {
255
+        confirmButtonText: "确定",
256
+        cancelButtonText: "取消",
257
+        type: "warning",
195
       }).then(() => {
258
       }).then(() => {
196
-          deleteFun(row.id).then((res) => {
259
+        deleteFun(row.id)
260
+          .then((res) => {
197
             if (res.code == 200) {
261
             if (res.code == 200) {
198
               this.getList()
262
               this.getList()
199
               this.$message({
263
               this.$message({
200
-                type: 'success',
201
-                message: '删除成功!'
264
+                type: "success",
265
+                message: "删除成功!",
202
               })
266
               })
203
             }
267
             }
204
           })
268
           })
205
           .catch(() => {
269
           .catch(() => {
206
             this.$message({
270
             this.$message({
207
-              type: 'info',
208
-              message: '已取消删除'
271
+              type: "info",
272
+              message: "已取消删除",
209
             })
273
             })
210
           })
274
           })
211
-        })
275
+      })
212
     },
276
     },
213
     dateFormatValue(timedate) {
277
     dateFormatValue(timedate) {
214
       if (timedate === null || timedate === undefined) {
278
       if (timedate === null || timedate === undefined) {
215
         return ""
279
         return ""
216
       } else {
280
       } else {
217
-        let year = timedate.slice(0,4)
218
-        let month = timedate.slice(5,7)
219
-        let day = timedate.slice(8,10)
220
-        let hours = timedate.slice(11,13)
221
-        let minutes = timedate.slice(14,16)
222
-        let seconds = timedate.slice(17,19)
223
-        return (year + '年' + month + '月' + day + '日' + hours + '时' + minutes + '分' + seconds + '秒')
281
+        let year = timedate.slice(0, 4)
282
+        let month = timedate.slice(5, 7)
283
+        let day = timedate.slice(8, 10)
284
+        let hours = timedate.slice(11, 13)
285
+        let minutes = timedate.slice(14, 16)
286
+        let seconds = timedate.slice(17, 19)
287
+        return (
288
+          year +
289
+          "年" +
290
+          month +
291
+          "月" +
292
+          day +
293
+          "日" +
294
+          hours +
295
+          "时" +
296
+          minutes +
297
+          "分" +
298
+          seconds +
299
+          "秒"
300
+        )
224
       }
301
       }
225
     },
302
     },
226
-  }
303
+  },
304
+  mounted() {
305
+    this.getDeviceList()
306
+  },
227
 }
307
 }
228
 </script>
308
 </script>
229
 <style scoped>
309
 <style scoped>
@@ -231,14 +311,14 @@ export default {
231
   margin-bottom: 5px;
311
   margin-bottom: 5px;
232
 }
312
 }
233
 .pagination-container {
313
 .pagination-container {
234
-  margin-top:10px;
235
-  margin-right:20px;
314
+  margin-top: 10px;
315
+  margin-right: 20px;
236
   text-align: right;
316
   text-align: right;
237
 }
317
 }
238
-.buttonSpan{
239
-    color: green;
318
+.buttonSpan {
319
+  color: green;
240
 }
320
 }
241
-.buttonSpan:hover{
242
-    cursor: pointer;
321
+.buttonSpan:hover {
322
+  cursor: pointer;
243
 }
323
 }
244
 </style>
324
 </style>

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

@@ -95,18 +95,22 @@ export default {
95
                   label: "设备采购",
95
                   label: "设备采购",
96
                   type: "sbcg",
96
                   type: "sbcg",
97
                 },
97
                 },
98
-                // {
99
-                //   label: "设备领用归还",
100
-                //   type: "sblygh",
101
-                // },
102
-                // {
103
-                //   label: "设备维修",
104
-                //   type: "sbwx",
105
-                // },
106
-                // {
107
-                //   label: "设备报废",
108
-                //   type: "sbbf",
109
-                // },
98
+                {
99
+                  label: "设备领用",
100
+                  type: "sbly",
101
+                },
102
+                  {
103
+                  label: "设备归还",
104
+                  type: "sbgh",
105
+                },
106
+                 {
107
+                  label: "设备维修",
108
+                  type: "sbwx",
109
+                },
110
+                {
111
+                  label: "设备报废",
112
+                  type: "sbbf",
113
+                },
110
                 {
114
                 {
111
                   label: "设施维修计划",
115
                   label: "设施维修计划",
112
                   type: "sswxjh",
116
                   type: "sswxjh",
@@ -312,17 +316,40 @@ export default {
312
                 }
316
                 }
313
             ],
317
             ],
314
 
318
 
315
-            // 设备领用归还
316
-            deviceCollectReturn: [
319
+            // 设备领用
320
+            deviceCollect: [
317
                 {
321
                 {
318
                     step: "1",
322
                     step: "1",
323
+                    type: "container",
324
+                    title: "制定领用申请",
325
+                    content: ""
326
+                },
327
+                {
328
+                    step: "2",
319
                     type: "select",
329
                     type: "select",
320
                     title: "主管科长审批",
330
                     title: "主管科长审批",
321
                     content: ""
331
                     content: ""
332
+                }
333
+            ],
334
+
335
+
336
+            // 设备归还
337
+            devicetReturn: [
338
+                {
339
+                    step: "1",
340
+                    type: "container",
341
+                    title: "制定资产转移申请",
342
+                    content: ""
322
                 },
343
                 },
323
                 {
344
                 {
324
                     step: "2",
345
                     step: "2",
325
                     type: "select",
346
                     type: "select",
347
+                    title: "主管科长审批",
348
+                    content: ""
349
+                },
350
+                 {
351
+                    step: "3",
352
+                    type: "select",
326
                     title: "分管副总经理审批",
353
                     title: "分管副总经理审批",
327
                     content: ""
354
                     content: ""
328
                 }
355
                 }
@@ -340,6 +367,7 @@ export default {
340
                     step: "2",
367
                     step: "2",
341
                     type: "select",
368
                     type: "select",
342
                     title: "主管科长审核",
369
                     title: "主管科长审核",
370
+                     
343
                     content: ""
371
                     content: ""
344
                 },
372
                 },
345
                 {
373
                 {
@@ -549,7 +577,7 @@ export default {
549
                 .catch(err => {
577
                 .catch(err => {
550
                     console.log(err)
578
                     console.log(err)
551
                 })
579
                 })
552
-            if(this.type == 'xzjh' || this.type == 'yjcg' || this.type == 'sswxjh' || this.type == 'sswxys' || this.type == 'sbcg'){
580
+            if(this.type == 'xzjh' || this.type == 'yjcg' || this.type == 'sswxjh' || this.type == 'sswxys' || this.type == 'sbcg' ||this.type == 'sbwx'){
553
                 let paramsNew = {
581
                 let paramsNew = {
554
                     depotId: 1,
582
                     depotId: 1,
555
                     roleIds: 37
583
                     roleIds: 37
@@ -560,7 +588,7 @@ export default {
560
                             this.tableData.forEach(item => {
588
                             this.tableData.forEach(item => {
561
                                 if ( (this.type == 'xzjh' || this.type == 'yjcg') && item.title.indexOf("分公司主管处室") != -1 ) {
589
                                 if ( (this.type == 'xzjh' || this.type == 'yjcg') && item.title.indexOf("分公司主管处室") != -1 ) {
562
                                     this.$set(item, "approverSelect", res.data[37])
590
                                     this.$set(item, "approverSelect", res.data[37])
563
-                                }else if((this.type == 'sswxjh' || this.type == 'sswxys' || this.type == 'sbcg') && item.title.indexOf("分公司") != -1){
591
+                                }else if((this.type == 'sswxjh' || this.type == 'sswxys' || this.type == 'sbcg' ||this.type == 'sbwx') && item.title.indexOf("分公司") != -1){
564
                                     this.$set(item, "approverSelect", res.data[37])
592
                                     this.$set(item, "approverSelect", res.data[37])
565
                                 }
593
                                 }
566
                             })
594
                             })
@@ -591,9 +619,11 @@ export default {
591
                 this.tableData = this.drugCollect
619
                 this.tableData = this.drugCollect
592
             } else if (this.type == "sbcg") {
620
             } else if (this.type == "sbcg") {
593
                 this.tableData = this.devicePurchase
621
                 this.tableData = this.devicePurchase
594
-            } else if (this.type == "sblygh") {
595
-                this.tableData = this.deviceCollectReturn
596
-            } else if (this.type == "sbwx") {
622
+            } else if (this.type == "sbly") {
623
+                this.tableData = this.deviceCollect
624
+            } else if(this.type == "sbgh"){
625
+                 this.tableData = this.deviceReturn
626
+            }else if (this.type == "sbwx") {
597
                 this.tableData = this.deviceRepair
627
                 this.tableData = this.deviceRepair
598
             } else if (this.type == "sbbf") {
628
             } else if (this.type == "sbbf") {
599
                 // 设备报废
629
                 // 设备报废