浏览代码

05151346lhj

liuhj 1 年之前
父节点
当前提交
225278549b
共有 2 个文件被更改,包括 83 次插入2 次删除
  1. 26 2
      src/components/Finance/Cost.vue
  2. 57 0
      src/components/Resource/HotelData.vue

+ 26 - 2
src/components/Finance/Cost.vue

@@ -311,8 +311,21 @@
                                 </el-row>
                             </div>
                             <div v-else-if="item.width == 100">
-                                <el-input type="textarea" :rows="6" placeholder="请输入内容" v-model="scope.row[item.prop]">
-                                </el-input>
+                                <div v-if="item.label == 'ITIN'">
+                                    <el-input type="textarea" @input="capslk(scope.row[item.prop],scope.$index,)" :rows="6" placeholder="请输入内容" v-model="scope.row[item.prop]"></el-input>
+                                </div>
+                                <div v-else-if="item.label == 'ACCO N'">
+                                    <el-input style="position: relative;" type="textarea" :rows="6" placeholder="请输入内容" v-model="scope.row[item.prop]"></el-input>
+                                    <!-- <div class="accon-ul">
+                                        <div class="accon-li">asas</div>
+                                        <div class="accon-li">asas</div>
+                                        <div class="accon-li">asas</div>
+                                        <div class="accon-li">asas</div>
+                                    </div> -->
+                                </div>
+                                <div v-else>
+                                    <el-input type="textarea" :rows="6" placeholder="请输入内容" v-model="scope.row[item.prop]"></el-input>
+                                </div>
                             </div>
                             <div v-else-if="item.prop == 'b' || item.prop == 'l' || item.prop == 'd'">
                                 <el-popover placement="top-start" title="餐食报批费用:" width="200" trigger="hover">
@@ -2665,6 +2678,9 @@ export default {
 
     },
     methods: {
+        capslk(val,index){
+            this.tableData[index].itin=val.toUpperCase()
+        },
         getSummaries(param) {
             var that = this;
             //console.log(param)
@@ -5744,4 +5760,12 @@ export default {
     cursor: pointer;
     color: #000;
 }
+.accon-ul{
+    position: absolute;
+    box-shadow: #0005 0 0 10px;
+    width: 200px;
+    z-index: 444;
+    background-color: #fff;
+    border-radius: 5px;
+}
 </style>

+ 57 - 0
src/components/Resource/HotelData.vue

@@ -52,6 +52,12 @@
 </template>
 <script>
 export default {
+    beforeRouteLeave(to, from, next) {
+        if(to.name!='HotelDataOperation'){
+            localStorage.removeItem('jdzlval');
+        }
+        next()
+    },
     data() {
         return {
             loading: false,
@@ -105,6 +111,25 @@ export default {
                             that.currentPage = that.currentPage - 1;
                         }
                     }
+                    if(JSON.parse(localStorage.getItem('jdzlval'))){
+                        that.currentPage=JSON.parse(localStorage.getItem('jdzlval')).currentPage;
+                        that.input=JSON.parse(localStorage.getItem('jdzlval')).input;
+                        var newarr = [];
+                        if (that.input == "") {
+                            newarr = that.tableData;
+                        } else {
+                            for (var i = 0; i < that.tableData.length; i++) {
+                                if (that.tableData[i].city.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].name.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                } else if (that.tableData[i].contact.indexOf(that.input) != -1) {
+                                    newarr.push(that.tableData[i]);
+                                }
+                            }
+                        }
+                        that.tableDatas = newarr;
+                    }
                 }
                 that.loading = false
             }).catch(function (error) {
@@ -135,6 +160,11 @@ export default {
         },
 
         upDate(index, row) {
+            var jdzlval={
+                currentPage:this.currentPage,
+                input:this.input,
+            }
+            localStorage.setItem('jdzlval', JSON.stringify(jdzlval));
             this.$router.push({
                 path: "/home/HotelDataOperation",
                 query: { id: row.id }
@@ -175,10 +205,37 @@ export default {
             });
         }
     },
+    created(){
+        // if(JSON.parse(localStorage.getItem('jdzlval'))){
+        //     this.currentPage=JSON.parse(localStorage.getItem('jdzlval')).currentPage;
+        //     this.input=JSON.parse(localStorage.getItem('jdzlval')).input;
+        //     var newarr = [];
+        //     console.log(this.input);
+        //     if (this.input == "") {
+        //         console.log(1);
+        //         newarr = this.tableData;
+        //     } else {
+        //         console.log(2);
+
+        //         for (var i = 0; i < this.tableData.length; i++) {
+        //             if (this.tableData[i].city.indexOf(this.input) != -1) {
+        //                 newarr.push(this.tableData[i]);
+        //             } else if (this.tableData[i].name.indexOf(this.input) != -1) {
+        //                 newarr.push(this.tableData[i]);
+        //             } else if (this.tableData[i].contact.indexOf(this.input) != -1) {
+        //                 newarr.push(this.tableData[i]);
+        //             }
+        //         }
+        //     }
+
+        //     this.tableDatas = newarr;
+        // }
+    },
     mounted() {
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.HotelData();
+        
     }
 }
 </script>