瀏覽代碼

耗材详情展示

seimin 3 年之前
父節點
當前提交
f204df09d5
共有 9 個文件被更改,包括 239 次插入34 次删除
  1. 12 0
      src/App.vue
  2. 36 1
      src/views/againAssign.vue
  3. 36 1
      src/views/closed.vue
  4. 36 1
      src/views/grabSheet.vue
  5. 1 0
      src/views/indes.vue
  6. 36 2
      src/views/order.vue
  7. 41 4
      src/views/processing.vue
  8. 5 24
      src/views/scanResult.vue
  9. 36 1
      src/views/solved.vue

+ 12 - 0
src/App.vue

@@ -125,4 +125,16 @@ i.iconfont {
125
     color: #056a00;
125
     color: #056a00;
126
   }
126
   }
127
 }
127
 }
128
+.hcTable {
129
+  padding: 0.1rem 0.24rem;
130
+  table {
131
+    border-collapse: collapse;
132
+    border: 0.01rem solid #ccc;
133
+    width: 100%;
134
+    td {
135
+      border: 0.01rem solid #ccc;
136
+      text-align: center;
137
+    }
138
+  }
139
+}
128
 </style>
140
 </style>

+ 36 - 1
src/views/againAssign.vue

@@ -137,10 +137,27 @@
137
                 <span class="fl">区域</span>
137
                 <span class="fl">区域</span>
138
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
138
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
139
               </p>
139
               </p>
140
-              <p>
140
+              <p class="boeder_B">
141
                 <span class="fl">地点</span>
141
                 <span class="fl">地点</span>
142
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
142
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
143
               </p>
143
               </p>
144
+              <div v-if="hcsjList.length">
145
+                <p>耗材</p>
146
+                <div class="hcTable">
147
+                  <table>
148
+                    <tr>
149
+                      <td>耗材名称</td>
150
+                      <td>价格</td>
151
+                      <td>数量</td>
152
+                    </tr>
153
+                    <tr v-for="(item,i) in hcsjList" :key="i">
154
+                      <td>{{item.consumable.name}}</td>
155
+                      <td>{{item.extra1}}</td>
156
+                      <td>{{item.consumablesSum}}</td>
157
+                    </tr>
158
+                  </table>
159
+                </div>
160
+              </div>
144
           </div>
161
           </div>
145
           <p class="info_hide">
162
           <p class="info_hide">
146
             <span class="fl hide" @click="hides()" v-if="!item_hides"
163
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -269,6 +286,9 @@ export default {
269
       id: "",
286
       id: "",
270
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
287
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
271
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
288
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
289
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
290
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
291
+      hcsjList:[],//绑定的耗材列表,展示
272
       promptingConent: "",
292
       promptingConent: "",
273
       promptingStatus: "",
293
       promptingStatus: "",
274
       item_hides: false,
294
       item_hides: false,
@@ -290,6 +310,18 @@ export default {
290
     PrompTing
310
     PrompTing
291
   },
311
   },
292
   methods: {
312
   methods: {
313
+    // 获取事件上绑定的耗材
314
+    getHcBySj() {
315
+      this.$http
316
+        .post("service/cmdb/storeList", {
317
+          data: { type: 2, source: "1627", sourceId: this.id },
318
+        })
319
+        .then((result) => {
320
+          if(result.data.status == 200){
321
+            this.hcsjList = result.data.data;
322
+          }
323
+        });
324
+    },
293
     //   获取事件数据
325
     //   获取事件数据
294
     getParamsData() {
326
     getParamsData() {
295
       var that = this;
327
       var that = this;
@@ -492,6 +524,9 @@ export default {
492
     this.id = this.$route.params.data.id;
524
     this.id = this.$route.params.data.id;
493
     this.getParamsData();
525
     this.getParamsData();
494
     this.getImgs();
526
     this.getImgs();
527
+    if(this.incidentWithConsumable == 1){
528
+      this.getHcBySj();
529
+    }
495
     this.getHandlerUser();
530
     this.getHandlerUser();
496
     this.getCandidateGroups();
531
     this.getCandidateGroups();
497
   }
532
   }

+ 36 - 1
src/views/closed.vue

@@ -147,12 +147,29 @@
147
                 model.incident.place ? model.incident.place.area.area : "--"
147
                 model.incident.place ? model.incident.place.area.area : "--"
148
               }}</span>
148
               }}</span>
149
             </p>
149
             </p>
150
-            <p>
150
+            <p class="boeder_B">
151
               <span class="fl">地点</span>
151
               <span class="fl">地点</span>
152
               <span class="fr">{{
152
               <span class="fr">{{
153
                 model.incident.place ? model.incident.place.place : "--"
153
                 model.incident.place ? model.incident.place.place : "--"
154
               }}</span>
154
               }}</span>
155
             </p>
155
             </p>
156
+            <div v-if="hcsjList.length">
157
+                <p>耗材</p>
158
+                <div class="hcTable">
159
+                  <table>
160
+                    <tr>
161
+                      <td>耗材名称</td>
162
+                      <td>价格</td>
163
+                      <td>数量</td>
164
+                    </tr>
165
+                    <tr v-for="(item,i) in hcsjList" :key="i">
166
+                      <td>{{item.consumable.name}}</td>
167
+                      <td>{{item.extra1}}</td>
168
+                      <td>{{item.consumablesSum}}</td>
169
+                    </tr>
170
+                  </table>
171
+                </div>
172
+              </div>
156
           </div>
173
           </div>
157
           <p class="info_hide">
174
           <p class="info_hide">
158
             <span class="fl hide" @click="hides()" v-if="!item_hides"
175
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -302,6 +319,9 @@ export default {
302
       id: "",
319
       id: "",
303
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
320
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
304
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
321
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
322
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
323
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
324
+      hcsjList:[],//绑定的耗材列表,展示
305
       selected: 1,
325
       selected: 1,
306
       options: [
326
       options: [
307
         {
327
         {
@@ -328,6 +348,18 @@ export default {
328
     LoadIng
348
     LoadIng
329
   },
349
   },
330
   methods: {
350
   methods: {
351
+    // 获取事件上绑定的耗材
352
+    getHcBySj() {
353
+      this.$http
354
+        .post("service/cmdb/storeList", {
355
+          data: { type: 2, source: "1627", sourceId: this.id },
356
+        })
357
+        .then((result) => {
358
+          if(result.data.status == 200){
359
+            this.hcsjList = result.data.data;
360
+          }
361
+        });
362
+    },
331
     //   获取事件数据
363
     //   获取事件数据
332
     getParamsData() {
364
     getParamsData() {
333
       var that = this;
365
       var that = this;
@@ -449,6 +481,9 @@ export default {
449
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
481
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
450
     this.getParamsData();
482
     this.getParamsData();
451
     this.getImgs();
483
     this.getImgs();
484
+    if(this.incidentWithConsumable == 1){
485
+      this.getHcBySj();
486
+    }
452
   }
487
   }
453
 };
488
 };
454
 </script>
489
 </script>

+ 36 - 1
src/views/grabSheet.vue

@@ -103,10 +103,27 @@
103
                 <span class="fl">区域</span>
103
                 <span class="fl">区域</span>
104
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
104
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
105
               </p>
105
               </p>
106
-              <p>
106
+              <p class="boeder_B">
107
                 <span class="fl">地点</span>
107
                 <span class="fl">地点</span>
108
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
108
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
109
               </p>
109
               </p>
110
+              <div v-if="hcsjList.length">
111
+                <p>耗材</p>
112
+                <div class="hcTable">
113
+                  <table>
114
+                    <tr>
115
+                      <td>耗材名称</td>
116
+                      <td>价格</td>
117
+                      <td>数量</td>
118
+                    </tr>
119
+                    <tr v-for="(item,i) in hcsjList" :key="i">
120
+                      <td>{{item.consumable.name}}</td>
121
+                      <td>{{item.extra1}}</td>
122
+                      <td>{{item.consumablesSum}}</td>
123
+                    </tr>
124
+                  </table>
125
+                </div>
126
+              </div>
110
             </div>
127
             </div>
111
             <p class="info_hide">
128
             <p class="info_hide">
112
               <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
129
               <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
@@ -167,6 +184,9 @@ export default {
167
       id:'',
184
       id:'',
168
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
185
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
169
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
186
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
187
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
188
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
189
+      hcsjList:[],//绑定的耗材列表,展示
170
       selected: 1,
190
       selected: 1,
171
       options: [
191
       options: [
172
         {
192
         {
@@ -190,6 +210,18 @@ export default {
190
     };
210
     };
191
   },
211
   },
192
   methods: {
212
   methods: {
213
+    // 获取事件上绑定的耗材
214
+    getHcBySj() {
215
+      this.$http
216
+        .post("service/cmdb/storeList", {
217
+          data: { type: 2, source: "1627", sourceId: this.id },
218
+        })
219
+        .then((result) => {
220
+          if(result.data.status == 200){
221
+            this.hcsjList = result.data.data;
222
+          }
223
+        });
224
+    },
193
     //   获取事件数据
225
     //   获取事件数据
194
     getParamsData() {
226
     getParamsData() {
195
       var that = this;
227
       var that = this;
@@ -344,6 +376,9 @@ export default {
344
           this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
376
           this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
345
     this.getParamsData();
377
     this.getParamsData();
346
     this.getImgs();
378
     this.getImgs();
379
+    if(this.incidentWithConsumable == 1){
380
+      this.getHcBySj();
381
+    }
347
   }
382
   }
348
 };
383
 };
349
 </script>
384
 </script>

+ 1 - 0
src/views/indes.vue

@@ -246,6 +246,7 @@ export default {
246
   },
246
   },
247
   methods: {
247
   methods: {
248
     scan(){
248
     scan(){
249
+      // this.$router.push({name:'ScanResult',params:{data:'[{"name":"资产名称","value":"哈哈哈"},{"name":"数量","value":"12"}]'}});
249
       SM(this).then((ress1) => {
250
       SM(this).then((ress1) => {
250
         this.$router.push({name:'ScanResult',params:{data:ress1}});
251
         this.$router.push({name:'ScanResult',params:{data:ress1}});
251
       })
252
       })

+ 36 - 2
src/views/order.vue

@@ -113,10 +113,27 @@
113
                 <span class="fl">区域</span>
113
                 <span class="fl">区域</span>
114
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
114
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
115
               </p>
115
               </p>
116
-              <p>
116
+              <p class="boeder_B">
117
                 <span class="fl">地点</span>
117
                 <span class="fl">地点</span>
118
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
118
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
119
               </p>
119
               </p>
120
+              <div v-if="hcsjList.length">
121
+                <p>耗材</p>
122
+                <div class="hcTable">
123
+                  <table>
124
+                    <tr>
125
+                      <td>耗材名称</td>
126
+                      <td>价格</td>
127
+                      <td>数量</td>
128
+                    </tr>
129
+                    <tr v-for="(item,i) in hcsjList" :key="i">
130
+                      <td>{{item.consumable.name}}</td>
131
+                      <td>{{item.extra1}}</td>
132
+                      <td>{{item.consumablesSum}}</td>
133
+                    </tr>
134
+                  </table>
135
+                </div>
136
+              </div>
120
               <!-- <p v-if="model.incident.synergeticReason">
137
               <!-- <p v-if="model.incident.synergeticReason">
121
                 <span class="fl" >协同原因</span>
138
                 <span class="fl" >协同原因</span>
122
                 <span class="fr">{{model.incident.synergeticReason}}</span>
139
                 <span class="fr">{{model.incident.synergeticReason}}</span>
@@ -203,6 +220,8 @@ export default {
203
     return {
220
     return {
204
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
221
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
205
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
222
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
223
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
224
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
206
       selected: 1,
225
       selected: 1,
207
       id:'',
226
       id:'',
208
       options: [
227
       options: [
@@ -225,6 +244,7 @@ export default {
225
       imgs: [], //图片
244
       imgs: [], //图片
226
       model: {}, //提交数据
245
       model: {}, //提交数据
227
       pro_hides:false,//展开/收起处理进度
246
       pro_hides:false,//展开/收起处理进度
247
+      hcsjList:[],//绑定的耗材列表,展示
228
     };
248
     };
229
   },
249
   },
230
   components: {
250
   components: {
@@ -232,6 +252,18 @@ export default {
232
     PrompTing,
252
     PrompTing,
233
   },
253
   },
234
   methods: {
254
   methods: {
255
+    // 获取事件上绑定的耗材
256
+    getHcBySj() {
257
+      this.$http
258
+        .post("service/cmdb/storeList", {
259
+          data: { type: 2, source: "1627", sourceId: this.id },
260
+        })
261
+        .then((result) => {
262
+          if(result.data.status == 200){
263
+            this.hcsjList = result.data.data;
264
+          }
265
+        });
266
+    },
235
     //   获取事件数据
267
     //   获取事件数据
236
     getParamsData() {
268
     getParamsData() {
237
       var that = this;
269
       var that = this;
@@ -398,8 +430,10 @@ export default {
398
           .processInstanceId;
430
           .processInstanceId;
399
           this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
431
           this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
400
     this.getParamsData();
432
     this.getParamsData();
401
-
402
     this.getImgs();
433
     this.getImgs();
434
+    if(this.incidentWithConsumable == 1){
435
+      this.getHcBySj();
436
+    }
403
   }
437
   }
404
 };
438
 };
405
 </script>
439
 </script>

+ 41 - 4
src/views/processing.vue

@@ -174,12 +174,29 @@
174
                   : "--"
174
                   : "--"
175
               }}</span>
175
               }}</span>
176
             </p>
176
             </p>
177
-            <p>
177
+            <p class="boeder_B">
178
               <span class="fl">地点</span>
178
               <span class="fl">地点</span>
179
               <span class="fr">{{
179
               <span class="fr">{{
180
                 modelData.incident.place ? modelData.incident.place.place : "--"
180
                 modelData.incident.place ? modelData.incident.place.place : "--"
181
               }}</span>
181
               }}</span>
182
             </p>
182
             </p>
183
+            <div v-if="hcsjList.length">
184
+              <p>耗材</p>
185
+              <div class="hcTable">
186
+                <table>
187
+                  <tr>
188
+                    <td>耗材名称</td>
189
+                    <td>价格</td>
190
+                    <td>数量</td>
191
+                  </tr>
192
+                  <tr v-for="(item,i) in hcsjList" :key="i">
193
+                    <td>{{item.consumable.name}}</td>
194
+                    <td>{{item.extra1}}</td>
195
+                    <td>{{item.consumablesSum}}</td>
196
+                  </tr>
197
+                </table>
198
+              </div>
199
+            </div>
183
 
200
 
184
             <!-- <p v-if="modelData.incident.synergeticReason">
201
             <!-- <p v-if="modelData.incident.synergeticReason">
185
                 <span class="fl" >协同原因</span>
202
                 <span class="fl" >协同原因</span>
@@ -285,7 +302,11 @@
285
                 @click="removeHc(item.id)"
302
                 @click="removeHc(item.id)"
286
               ></span>
303
               ></span>
287
             </div>
304
             </div>
288
-            <div class="addHc" @click="addHc()" v-if="incidentWithConsumable == 1">
305
+            <div
306
+              class="addHc"
307
+              @click="addHc()"
308
+              v-if="incidentWithConsumable == 1"
309
+            >
289
               <i class="cubeic-add"></i>增加耗材
310
               <i class="cubeic-add"></i>增加耗材
290
             </div>
311
             </div>
291
             <!-- 添加耗材 end -->
312
             <!-- 添加耗材 end -->
@@ -559,8 +580,8 @@ export default {
559
   data() {
580
   data() {
560
     return {
581
     return {
561
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
582
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
562
-      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"),//是否绑定耗材
563
-      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"),//是否绑定资产
583
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
584
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
564
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
585
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
565
       id: "",
586
       id: "",
566
       resignComment: "", //重新指派原因
587
       resignComment: "", //重新指派原因
@@ -883,6 +904,7 @@ export default {
883
       hcList: [], //绑定的耗材列表
904
       hcList: [], //绑定的耗材列表
884
       idMock: 0, //自增id,mock
905
       idMock: 0, //自增id,mock
885
       hcs: [], //耗材列表
906
       hcs: [], //耗材列表
907
+      hcsjList:[],//绑定的耗材列表,展示
886
     };
908
     };
887
   },
909
   },
888
   watch: {
910
   watch: {
@@ -1803,6 +1825,18 @@ export default {
1803
     fileSubmitted(files) {
1825
     fileSubmitted(files) {
1804
       this.action.data = { fileName: files.name };
1826
       this.action.data = { fileName: files.name };
1805
     },
1827
     },
1828
+    // 获取事件上绑定的耗材
1829
+    getHcBySj() {
1830
+      this.$http
1831
+        .post("service/cmdb/storeList", {
1832
+          data: { type: 2, source: "1627", sourceId: this.id },
1833
+        })
1834
+        .then((result) => {
1835
+          if(result.data.status == 200){
1836
+            this.hcsjList = result.data.data;
1837
+          }
1838
+        });
1839
+    },
1806
   },
1840
   },
1807
   created() {
1841
   created() {
1808
     this.processInstanceId = this.$route.params.data
1842
     this.processInstanceId = this.$route.params.data
@@ -1816,6 +1850,9 @@ export default {
1816
     this.action.target += this.processInstanceId;
1850
     this.action.target += this.processInstanceId;
1817
     this.getParamsData();
1851
     this.getParamsData();
1818
     this.getHcs();
1852
     this.getHcs();
1853
+    if(this.incidentWithConsumable == 1){
1854
+      this.getHcBySj();
1855
+    }
1819
     this.getImgs();
1856
     this.getImgs();
1820
     // 处理方式
1857
     // 处理方式
1821
     this.getHandleCategory();
1858
     this.getHandleCategory();

+ 5 - 24
src/views/scanResult.vue

@@ -4,32 +4,12 @@
4
       <div class="conent">
4
       <div class="conent">
5
         <div class="header">资产信息</div>
5
         <div class="header">资产信息</div>
6
         <div>
6
         <div>
7
-          <div class="label headtop" id="info">{{result[0]}}</div>
7
+          <div class="headtop" id="info"></div>
8
 
8
 
9
           <div class="info">
9
           <div class="info">
10
-            <p>
11
-              <span class="fl">编码:</span>
12
-              <span class="fr">{{result[1]}}</span>
13
-            </p>
14
-            <p>
15
-              <span class="fl">型号:</span>
16
-              <span class="fr">{{result[2]}}</span>
17
-            </p>
18
-            <p>
19
-              <span class="fl">序列号:</span>
20
-              <span class="fr">{{result[3]}}</span>
21
-            </p>
22
-            <p>
23
-              <span class="fl">用途:</span>
24
-              <span class="fr">{{result[4]}}</span>
25
-            </p>
26
-            <p>
27
-              <span class="fl">IP:</span>
28
-              <span class="fr">{{result[5]}}</span>
29
-            </p>
30
-            <p>
31
-              <span class="fl">位置:</span>
32
-              <span class="fr">{{result[6]}}</span>
10
+            <p v-for="(item,i) in result" :key="i">
11
+              <span class="fl">{{item.name}}:</span>
12
+              <span class="fr">{{item.value}}</span>
33
             </p>
13
             </p>
34
           </div>
14
           </div>
35
         </div>
15
         </div>
@@ -168,6 +148,7 @@ i.iconfont.blue {
168
           line-height: 0.4rem;
148
           line-height: 0.4rem;
169
           padding: 0.1rem 0.24rem;
149
           padding: 0.1rem 0.24rem;
170
           overflow: hidden;
150
           overflow: hidden;
151
+          border-bottom:0.01rem solid #e6e6e6;
171
           .overflowEllipsis2 {
152
           .overflowEllipsis2 {
172
             margin-left: 1.96rem;
153
             margin-left: 1.96rem;
173
           }
154
           }

+ 36 - 1
src/views/solved.vue

@@ -147,12 +147,29 @@
147
                 model.incident.place ? model.incident.place.area.area : "--"
147
                 model.incident.place ? model.incident.place.area.area : "--"
148
               }}</span>
148
               }}</span>
149
             </p>
149
             </p>
150
-            <p>
150
+            <p class="boeder_B">
151
               <span class="fl">地点</span>
151
               <span class="fl">地点</span>
152
               <span class="fr">{{
152
               <span class="fr">{{
153
                 model.incident.place ? model.incident.place.place : "--"
153
                 model.incident.place ? model.incident.place.place : "--"
154
               }}</span>
154
               }}</span>
155
             </p>
155
             </p>
156
+            <div v-if="hcsjList.length">
157
+                <p>耗材</p>
158
+                <div class="hcTable">
159
+                  <table>
160
+                    <tr>
161
+                      <td>耗材名称</td>
162
+                      <td>价格</td>
163
+                      <td>数量</td>
164
+                    </tr>
165
+                    <tr v-for="(item,i) in hcsjList" :key="i">
166
+                      <td>{{item.consumable.name}}</td>
167
+                      <td>{{item.extra1}}</td>
168
+                      <td>{{item.consumablesSum}}</td>
169
+                    </tr>
170
+                  </table>
171
+                </div>
172
+              </div>
156
           </div>
173
           </div>
157
           <p class="info_hide">
174
           <p class="info_hide">
158
             <span class="fl hide" @click="hides()" v-if="!item_hides"
175
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -330,6 +347,9 @@ export default {
330
       id: "",
347
       id: "",
331
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
348
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
332
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
349
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
350
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
351
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
352
+      hcsjList:[],//绑定的耗材列表,展示
333
       selected: 1,
353
       selected: 1,
334
       isclose: "close", //是否已解决
354
       isclose: "close", //是否已解决
335
       iscloseArr: [
355
       iscloseArr: [
@@ -362,6 +382,18 @@ export default {
362
     // HandlerLog
382
     // HandlerLog
363
   },
383
   },
364
   methods: {
384
   methods: {
385
+    // 获取事件上绑定的耗材
386
+    getHcBySj() {
387
+      this.$http
388
+        .post("service/cmdb/storeList", {
389
+          data: { type: 2, source: "1627", sourceId: this.id },
390
+        })
391
+        .then((result) => {
392
+          if(result.data.status == 200){
393
+            this.hcsjList = result.data.data;
394
+          }
395
+        });
396
+    },
365
     //   获取事件数据
397
     //   获取事件数据
366
     getParamsData() {
398
     getParamsData() {
367
       var that = this;
399
       var that = this;
@@ -579,6 +611,9 @@ export default {
579
     this.getParamsData();
611
     this.getParamsData();
580
 
612
 
581
     this.getImgs();
613
     this.getImgs();
614
+    if(this.incidentWithConsumable == 1){
615
+      this.getHcBySj();
616
+    }
582
     this.getHandlerRes();
617
     this.getHandlerRes();
583
     this.getDegree();
618
     this.getDegree();
584
   }
619
   }