Ver código fonte

增加房间号

seimin 2 anos atrás
pai
commit
9e1c934d35
2 arquivos alterados com 33 adições e 8 exclusões
  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 122
                   localStorage.setItem("wxIncidentWithCmdb", v.valueconfig);
123 123
                   break;
124 124
                 case "reqHasCategory": //获取是否自动建单
125
-                  localStorage.setItem("reqHasCategory", v);
125
+                  localStorage.setItem("reqHasCategory", JSON.stringify(v));
126 126
                   break;
127 127
                 case "wxBxQuestions": //微信报修常见问题链接
128 128
                   localStorage.setItem("wxBxQuestions", v.valueconfig);
@@ -130,6 +130,9 @@ export default {
130 130
                 case "wxGuide": //微信报修服务指南链接
131 131
                   localStorage.setItem("wxGuide", v.valueconfig);
132 132
                   break;
133
+                case "ifRoom": //是否增加房间号选择
134
+                  localStorage.setItem("ifRoom", v.valueconfig);
135
+                  break;
133 136
               }
134 137
             });
135 138
             this.$router.push({ path: "/main" });

+ 29 - 7
src/views/repair.vue

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