Selaa lähdekoodia

耗材详情展示

seimin 3 vuotta sitten
vanhempi
commit
f204df09d5

+ 12 - 0
src/App.vue

@@ -125,4 +125,16 @@ i.iconfont {
125 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 140
 </style>

+ 36 - 1
src/views/againAssign.vue

@@ -137,10 +137,27 @@
137 137
                 <span class="fl">区域</span>
138 138
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
139 139
               </p>
140
-              <p>
140
+              <p class="boeder_B">
141 141
                 <span class="fl">地点</span>
142 142
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
143 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 161
           </div>
145 162
           <p class="info_hide">
146 163
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -269,6 +286,9 @@ export default {
269 286
       id: "",
270 287
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
271 288
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
289
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
290
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
291
+      hcsjList:[],//绑定的耗材列表,展示
272 292
       promptingConent: "",
273 293
       promptingStatus: "",
274 294
       item_hides: false,
@@ -290,6 +310,18 @@ export default {
290 310
     PrompTing
291 311
   },
292 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 326
     getParamsData() {
295 327
       var that = this;
@@ -492,6 +524,9 @@ export default {
492 524
     this.id = this.$route.params.data.id;
493 525
     this.getParamsData();
494 526
     this.getImgs();
527
+    if(this.incidentWithConsumable == 1){
528
+      this.getHcBySj();
529
+    }
495 530
     this.getHandlerUser();
496 531
     this.getCandidateGroups();
497 532
   }

+ 36 - 1
src/views/closed.vue

@@ -147,12 +147,29 @@
147 147
                 model.incident.place ? model.incident.place.area.area : "--"
148 148
               }}</span>
149 149
             </p>
150
-            <p>
150
+            <p class="boeder_B">
151 151
               <span class="fl">地点</span>
152 152
               <span class="fr">{{
153 153
                 model.incident.place ? model.incident.place.place : "--"
154 154
               }}</span>
155 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 173
           </div>
157 174
           <p class="info_hide">
158 175
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -302,6 +319,9 @@ export default {
302 319
       id: "",
303 320
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
304 321
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
322
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
323
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
324
+      hcsjList:[],//绑定的耗材列表,展示
305 325
       selected: 1,
306 326
       options: [
307 327
         {
@@ -328,6 +348,18 @@ export default {
328 348
     LoadIng
329 349
   },
330 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 364
     getParamsData() {
333 365
       var that = this;
@@ -449,6 +481,9 @@ export default {
449 481
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
450 482
     this.getParamsData();
451 483
     this.getImgs();
484
+    if(this.incidentWithConsumable == 1){
485
+      this.getHcBySj();
486
+    }
452 487
   }
453 488
 };
454 489
 </script>

+ 36 - 1
src/views/grabSheet.vue

@@ -103,10 +103,27 @@
103 103
                 <span class="fl">区域</span>
104 104
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
105 105
               </p>
106
-              <p>
106
+              <p class="boeder_B">
107 107
                 <span class="fl">地点</span>
108 108
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
109 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 127
             </div>
111 128
             <p class="info_hide">
112 129
               <span class="fl hide" @click="hides()" v-if="!item_hides">展开详情 >></span>
@@ -167,6 +184,9 @@ export default {
167 184
       id:'',
168 185
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
169 186
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
187
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
188
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
189
+      hcsjList:[],//绑定的耗材列表,展示
170 190
       selected: 1,
171 191
       options: [
172 192
         {
@@ -190,6 +210,18 @@ export default {
190 210
     };
191 211
   },
192 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 226
     getParamsData() {
195 227
       var that = this;
@@ -344,6 +376,9 @@ export default {
344 376
           this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
345 377
     this.getParamsData();
346 378
     this.getImgs();
379
+    if(this.incidentWithConsumable == 1){
380
+      this.getHcBySj();
381
+    }
347 382
   }
348 383
 };
349 384
 </script>

+ 1 - 0
src/views/indes.vue

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

+ 36 - 2
src/views/order.vue

@@ -113,10 +113,27 @@
113 113
                 <span class="fl">区域</span>
114 114
                 <span class="fr">{{model.incident.place?model.incident.place.area.area:'--'}}</span>
115 115
               </p>
116
-              <p>
116
+              <p class="boeder_B">
117 117
                 <span class="fl">地点</span>
118 118
                 <span class="fr">{{model.incident.place?model.incident.place.place:'--'}}</span>
119 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 137
               <!-- <p v-if="model.incident.synergeticReason">
121 138
                 <span class="fl" >协同原因</span>
122 139
                 <span class="fr">{{model.incident.synergeticReason}}</span>
@@ -203,6 +220,8 @@ export default {
203 220
     return {
204 221
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
205 222
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
223
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
224
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
206 225
       selected: 1,
207 226
       id:'',
208 227
       options: [
@@ -225,6 +244,7 @@ export default {
225 244
       imgs: [], //图片
226 245
       model: {}, //提交数据
227 246
       pro_hides:false,//展开/收起处理进度
247
+      hcsjList:[],//绑定的耗材列表,展示
228 248
     };
229 249
   },
230 250
   components: {
@@ -232,6 +252,18 @@ export default {
232 252
     PrompTing,
233 253
   },
234 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 268
     getParamsData() {
237 269
       var that = this;
@@ -398,8 +430,10 @@ export default {
398 430
           .processInstanceId;
399 431
           this.id=this.$route.params.data?this.$route.params.data.id:JSON.parse(localStorage.getItem("modelData")).incident.id;
400 432
     this.getParamsData();
401
-
402 433
     this.getImgs();
434
+    if(this.incidentWithConsumable == 1){
435
+      this.getHcBySj();
436
+    }
403 437
   }
404 438
 };
405 439
 </script>

+ 41 - 4
src/views/processing.vue

@@ -174,12 +174,29 @@
174 174
                   : "--"
175 175
               }}</span>
176 176
             </p>
177
-            <p>
177
+            <p class="boeder_B">
178 178
               <span class="fl">地点</span>
179 179
               <span class="fr">{{
180 180
                 modelData.incident.place ? modelData.incident.place.place : "--"
181 181
               }}</span>
182 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 201
             <!-- <p v-if="modelData.incident.synergeticReason">
185 202
                 <span class="fl" >协同原因</span>
@@ -285,7 +302,11 @@
285 302
                 @click="removeHc(item.id)"
286 303
               ></span>
287 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 310
               <i class="cubeic-add"></i>增加耗材
290 311
             </div>
291 312
             <!-- 添加耗材 end -->
@@ -559,8 +580,8 @@ export default {
559 580
   data() {
560 581
     return {
561 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 585
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
565 586
       id: "",
566 587
       resignComment: "", //重新指派原因
@@ -883,6 +904,7 @@ export default {
883 904
       hcList: [], //绑定的耗材列表
884 905
       idMock: 0, //自增id,mock
885 906
       hcs: [], //耗材列表
907
+      hcsjList:[],//绑定的耗材列表,展示
886 908
     };
887 909
   },
888 910
   watch: {
@@ -1803,6 +1825,18 @@ export default {
1803 1825
     fileSubmitted(files) {
1804 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 1841
   created() {
1808 1842
     this.processInstanceId = this.$route.params.data
@@ -1816,6 +1850,9 @@ export default {
1816 1850
     this.action.target += this.processInstanceId;
1817 1851
     this.getParamsData();
1818 1852
     this.getHcs();
1853
+    if(this.incidentWithConsumable == 1){
1854
+      this.getHcBySj();
1855
+    }
1819 1856
     this.getImgs();
1820 1857
     // 处理方式
1821 1858
     this.getHandleCategory();

+ 5 - 24
src/views/scanResult.vue

@@ -4,32 +4,12 @@
4 4
       <div class="conent">
5 5
         <div class="header">资产信息</div>
6 6
         <div>
7
-          <div class="label headtop" id="info">{{result[0]}}</div>
7
+          <div class="headtop" id="info"></div>
8 8
 
9 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 13
             </p>
34 14
           </div>
35 15
         </div>
@@ -168,6 +148,7 @@ i.iconfont.blue {
168 148
           line-height: 0.4rem;
169 149
           padding: 0.1rem 0.24rem;
170 150
           overflow: hidden;
151
+          border-bottom:0.01rem solid #e6e6e6;
171 152
           .overflowEllipsis2 {
172 153
             margin-left: 1.96rem;
173 154
           }

+ 36 - 1
src/views/solved.vue

@@ -147,12 +147,29 @@
147 147
                 model.incident.place ? model.incident.place.area.area : "--"
148 148
               }}</span>
149 149
             </p>
150
-            <p>
150
+            <p class="boeder_B">
151 151
               <span class="fl">地点</span>
152 152
               <span class="fr">{{
153 153
                 model.incident.place ? model.incident.place.place : "--"
154 154
               }}</span>
155 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 173
           </div>
157 174
           <p class="info_hide">
158 175
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -330,6 +347,9 @@ export default {
330 347
       id: "",
331 348
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
332 349
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
350
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
351
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
352
+      hcsjList:[],//绑定的耗材列表,展示
333 353
       selected: 1,
334 354
       isclose: "close", //是否已解决
335 355
       iscloseArr: [
@@ -362,6 +382,18 @@ export default {
362 382
     // HandlerLog
363 383
   },
364 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 398
     getParamsData() {
367 399
       var that = this;
@@ -579,6 +611,9 @@ export default {
579 611
     this.getParamsData();
580 612
 
581 613
     this.getImgs();
614
+    if(this.incidentWithConsumable == 1){
615
+      this.getHcBySj();
616
+    }
582 617
     this.getHandlerRes();
583 618
     this.getDegree();
584 619
   }