Browse Source

增加房间号

seimin 2 years ago
parent
commit
9e1c934d35
2 changed files with 33 additions and 8 deletions
  1. 4 1
      src/views/Login.vue
  2. 29 7
      src/views/repair.vue

+ 4 - 1
src/views/Login.vue

@@ -122,7 +122,7 @@ export default {
122
                   localStorage.setItem("wxIncidentWithCmdb", v.valueconfig);
122
                   localStorage.setItem("wxIncidentWithCmdb", v.valueconfig);
123
                   break;
123
                   break;
124
                 case "reqHasCategory": //获取是否自动建单
124
                 case "reqHasCategory": //获取是否自动建单
125
-                  localStorage.setItem("reqHasCategory", v);
125
+                  localStorage.setItem("reqHasCategory", JSON.stringify(v));
126
                   break;
126
                   break;
127
                 case "wxBxQuestions": //微信报修常见问题链接
127
                 case "wxBxQuestions": //微信报修常见问题链接
128
                   localStorage.setItem("wxBxQuestions", v.valueconfig);
128
                   localStorage.setItem("wxBxQuestions", v.valueconfig);
@@ -130,6 +130,9 @@ export default {
130
                 case "wxGuide": //微信报修服务指南链接
130
                 case "wxGuide": //微信报修服务指南链接
131
                   localStorage.setItem("wxGuide", v.valueconfig);
131
                   localStorage.setItem("wxGuide", v.valueconfig);
132
                   break;
132
                   break;
133
+                case "ifRoom": //是否增加房间号选择
134
+                  localStorage.setItem("ifRoom", v.valueconfig);
135
+                  break;
133
               }
136
               }
134
             });
137
             });
135
             this.$router.push({ path: "/main" });
138
             this.$router.push({ path: "/main" });

+ 29 - 7
src/views/repair.vue

@@ -27,6 +27,7 @@
27
           :field="fields[2]"
27
           :field="fields[2]"
28
           class="btn_plcaeholde"
28
           class="btn_plcaeholde"
29
         ></cube-form-item>
29
         ></cube-form-item>
30
+        <cube-form-item :field="fields[8]" v-if="ifRoom == 1"></cube-form-item>
30
         <cube-form-item :field="fields[3]"></cube-form-item>
31
         <cube-form-item :field="fields[3]"></cube-form-item>
31
         <!-- <cube-form-item :field="fields[3]">
32
         <!-- <cube-form-item :field="fields[3]">
32
           <cube-input
33
           <cube-input
@@ -186,10 +187,18 @@ const delay = (function() {
186
   };
187
   };
187
 })();
188
 })();
188
 export default {
189
 export default {
190
+  watch: {
191
+    "model.uuu": {
192
+      handler(newV, oldV) {
193
+        this.model.address = newV;
194
+      }
195
+    }
196
+  },
189
   data() {
197
   data() {
190
     return {
198
     return {
191
       incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
199
       incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
192
       wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
200
       wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
201
+      ifRoom: localStorage.getItem("ifRoom"), //是否增加房间号选择
193
       loginUser: null,
202
       loginUser: null,
194
       // 故障地点下拉数据
203
       // 故障地点下拉数据
195
       // addressData: [],
204
       // addressData: [],
@@ -231,7 +240,8 @@ export default {
231
         bxcode: "",
240
         bxcode: "",
232
         deptId: "",
241
         deptId: "",
233
         contacts: "",
242
         contacts: "",
234
-        assetId:'',
243
+        assetId: "",
244
+        uuu: ""
235
       },
245
       },
236
       // showPrompting:false,
246
       // showPrompting:false,
237
       promptingConent: "",
247
       promptingConent: "",
@@ -325,21 +335,33 @@ export default {
325
           label: "资产:",
335
           label: "资产:",
326
           props: {
336
           props: {
327
             placeholder: "右侧扫一扫资产",
337
             placeholder: "右侧扫一扫资产",
328
-            disabled:true
338
+            disabled: true
329
           },
339
           },
330
           rules: {
340
           rules: {
331
             required: false
341
             required: false
332
-          },
342
+          }
333
         },
343
         },
344
+        {
345
+          type: "select",
346
+          modelKey: "uuu",
347
+          label: "房间号",
348
+          props: {
349
+            placeholder: "请选择房间号",
350
+            options: ['2015', '2016', '2017', '2018', '2019', '2020']
351
+          },
352
+          rules: {
353
+            required: true
354
+          }
355
+        }
334
       ]
356
       ]
335
     };
357
     };
336
   },
358
   },
337
   methods: {
359
   methods: {
338
     //扫资产
360
     //扫资产
339
-    scan(){
340
-      SM(this).then((ress1) => {
361
+    scan() {
362
+      SM(this).then(ress1 => {
341
         this.model.assetId = ress1;
363
         this.model.assetId = ress1;
342
-      })
364
+      });
343
     },
365
     },
344
     // -----------故障地点-----
366
     // -----------故障地点-----
345
     showAddressPicker() {
367
     showAddressPicker() {
@@ -588,7 +610,7 @@ export default {
588
   created() {
610
   created() {
589
     this.repairMain = JSON.parse(localStorage.getItem("repairMain"));
611
     this.repairMain = JSON.parse(localStorage.getItem("repairMain"));
590
     this.reqHasCategory = JSON.parse(localStorage.getItem("reqHasCategory"));
612
     this.reqHasCategory = JSON.parse(localStorage.getItem("reqHasCategory"));
591
-    if(this.$route.params.data){
613
+    if (this.$route.params.data) {
592
       this.model.assetId = this.$route.params.data;
614
       this.model.assetId = this.$route.params.data;
593
     }
615
     }
594
     this.fields.forEach(item => {
616
     this.fields.forEach(item => {