فهرست منبع

订单搜索,商家订单翻页bug

panhui 6 سال پیش
والد
کامیت
81aa974e86
2فایلهای تغییر یافته به همراه21 افزوده شده و 11 حذف شده
  1. 13 4
      src/main/vue/src/pagesPre/ShopOrder.vue
  2. 8 7
      src/main/vue/src/pagesPre/UserOrder.vue

+ 13 - 4
src/main/vue/src/pagesPre/ShopOrder.vue

@@ -20,7 +20,7 @@
             <el-menu-item index="7">订单回收站</el-menu-item>
         </el-menu>
 
-        <el-input size="mini" placeholder="商品名称" v-model="searchKey" class="orderSearch">
+        <el-input size="mini" placeholder="商品名称/订单号/包名" v-model="searchKey" class="orderSearch">
             <el-button slot="append" icon="el-icon-search" @click="currentPageChange(1)"></el-button>
         </el-input>
 
@@ -70,7 +70,8 @@ export default {
             searchKey: '',
             orderList: [],
             currentPage: 1,
-            totalNumber: 0
+            totalNumber: 0,
+              chooseJson: {},
         }
     },
     computed: {
@@ -82,7 +83,7 @@ export default {
     methods: {
         currentPageChange(page) {
             this.currentPage = page;
-            this.getData({});
+            this.getData();
         },
         getOrder(key, keyPath) {
             this.activeIndex = key
@@ -131,6 +132,7 @@ export default {
                     jsonp.statusFlag = 8
                     break
             }
+            this.chooseJson=jsonp;
 
             this.getData(jsonp);
         },
@@ -168,11 +170,18 @@ export default {
         },
         getData(jsonp) {
             var data = jsonp
+
+            if(jsonp){
+                data=jsonp
+            }
+            else{
+                data=this.chooseJson
+            }
             data.storeId = this.myStoreInfo.id
             data.pageNumber = 3
             data.currentPage = this.currentPage
             if (this.searchKey) {
-                data.advancedQuery = 'AND_,product_name_,like_,' + this.searchKey
+                data.searchKey = this.searchKey
             }
             this.$http.get({
                 url: '/userOrder/storePage',

+ 8 - 7
src/main/vue/src/pagesPre/UserOrder.vue

@@ -20,7 +20,7 @@
             <el-menu-item index="7">订单回收站</el-menu-item>
         </el-menu>
 
-        <el-input size="mini" placeholder="商品名称" v-model="searchKey" class="orderSearch">
+        <el-input size="mini" placeholder="商品名称/订单号/包名" v-model="searchKey" class="orderSearch">
             <el-button slot="append" icon="el-icon-search" @click="currentPageChange(1)"></el-button>
         </el-input>
 
@@ -73,7 +73,8 @@ export default {
             orderList: [],
             currentPage: 1,
             totalNumber: 0,
-            chooseJson: {}
+            chooseJson: {},
+            filifterJson:{}
         }
     },
     computed: {
@@ -161,7 +162,7 @@ export default {
                     jsonp.statusFlag = 8
                     break
             }
-            this.chooseJson = jsonp
+            this.chooseJson = jsonp;
             this.getData(jsonp);
         },
         getTypeName(index, now) {
@@ -196,10 +197,10 @@ export default {
         search() {
             console.log('aaaa')
         },
-        getData(jsonp) {
+        getData(json) {
             var data = {}
-            if (jsonp) {
-                data = jsonp
+            if (json) {
+                data = json
             }
             else {
                 data = this.chooseJson
@@ -208,7 +209,7 @@ export default {
             data.pageNumber = 3
             data.currentPage = this.currentPage
             if (this.searchKey) {
-                data.advancedQuery = 'AND_,product_name_,like_,' + this.searchKey
+                data.searchKey =  this.searchKey
             }
             this.$http.get({
                 url: '/userOrder/userPage',