소스 검색

商品排序

e 5 년 전
부모
커밋
19c8f0e50f
5개의 변경된 파일13개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 1
      src/views/goods/category.vue
  2. 3 1
      src/views/goods/list-commonly.vue
  3. 3 1
      src/views/goods/list-preferential.vue
  4. 3 1
      src/views/goods/list-preferred.vue
  5. 1 1
      src/views/order/list.vue

+ 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">