Browse Source

商品排序

e 5 years ago
parent
commit
19c8f0e50f

+ 3 - 1
src/views/goods/category.vue

@@ -112,7 +112,9 @@ export default {
     batchSaveSort() {
       const sorts = []
       this.list.map(item => {
-        sorts.push(item.id + '-' + item.sort)
+        if (item.sort) {
+          sorts.push(item.id + '-' + item.sort)
+        }
       })
       saveCategorySort({ newProducSorttList: sorts.join(',') }).then(() => {
         this.getList()

+ 3 - 1
src/views/goods/list-commonly.vue

@@ -131,7 +131,9 @@ export default {
     batchSaveSort() {
       const sorts = []
       this.list.map(item => {
-        sorts.push(item.id + '-' + item.commonlyProductSort)
+        if (item.preferentialProductSort) {
+          sorts.push(item.id + '-' + item.preferentialProductSort)
+        }
       })
       saveGoodsSort({ newProducSorttList: sorts.join(','), modules: this.activeIndex }).then(response => {
         this.$notify({

+ 3 - 1
src/views/goods/list-preferential.vue

@@ -131,7 +131,9 @@ export default {
     batchSaveSort() {
       const sorts = []
       this.list.map(item => {
-        sorts.push(item.id + '-' + item.preferentialProductSort)
+        if (item.preferentialProductSort) {
+          sorts.push(item.id + '-' + item.preferentialProductSort)
+        }
       })
       saveGoodsSort({ newProducSorttList: sorts.join(','), modules: this.activeIndex }).then(response => {
         this.$notify({

+ 3 - 1
src/views/goods/list-preferred.vue

@@ -131,7 +131,9 @@ export default {
     batchSaveSort() {
       const sorts = []
       this.list.map(item => {
-        sorts.push(item.id + '-' + item.preferredProductSort)
+        if (item.preferentialProductSort) {
+          sorts.push(item.id + '-' + item.preferentialProductSort)
+        }
       })
       saveGoodsSort({ newProducSorttList: sorts.join(','), modules: this.activeIndex }).then(response => {
         this.$notify({

+ 1 - 1
src/views/order/list.vue

@@ -140,7 +140,7 @@
         <template slot-scope="{row}">
           <router-link :to="'/order/detail/' + row.orderID "><el-button type="primary" size="small">查看详情</el-button></router-link>
           <el-dropdown>
-            <el-button type="primary" size="small" style="margin-top:5px;">
+            <el-button type="success" size="small" style="margin-top:5px;">
               功能<i class="el-icon-arrow-down el-icon--right" />
             </el-button>
             <el-dropdown-menu slot="dropdown">