Browse Source

Merge remote-tracking branch 'origin/dev' into dev

qinbai 3 năm trước cách đây
mục cha
commit
d765c41208

+ 23 - 16
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -22,6 +22,7 @@
         type="primary"
         :disabled="disabled"
         @click="editCustomer"
+        :loading="subLoading"
         >{{ form.id ? "确认修改" : "确认新增" }}
       </el-button>
     </div>
@@ -668,7 +669,8 @@ export default {
       },
       olddata: [],
       oldorderFeesList: [],
-      reData: null
+      reData: null,
+      subLoading: false
     };
   },
   props: {
@@ -1014,26 +1016,31 @@ export default {
               return this.$message.error(`请正确输入第${i + 1}行的数量`);
             }
           }
+          this.subLoading = true;
           submit({
             ...this.form,
             orderItemsList: this.data,
             orderFeesList: orderFeesList
-          }).then(res => {
-            if (res.data.code == 200) {
-              this.$message.success(this.form.id ? "修改成功" : "提交成功");
-              this.form = res.data.data;
-              this.data = res.data.data.orderItemsList;
-              this.orderFeesList = res.data.data.orderFeesList;
-              this.oldform = res.data.data;
-              this.olddata = this.deepClone(res.data.data.orderItemsList);
-              this.oldorderFeesList = this.deepClone(
-                res.data.data.orderFeesList
-              );
-              if (status == "goBack") {
-                this.$emit("goBack");
+          })
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message.success(this.form.id ? "修改成功" : "提交成功");
+                this.form = res.data.data;
+                this.data = res.data.data.orderItemsList;
+                this.orderFeesList = res.data.data.orderFeesList;
+                this.oldform = res.data.data;
+                this.olddata = this.deepClone(res.data.data.orderItemsList);
+                this.oldorderFeesList = this.deepClone(
+                  res.data.data.orderFeesList
+                );
+                if (status == "goBack") {
+                  this.$emit("goBack");
+                }
               }
-            }
-          });
+            })
+            .finally(() => {
+              this.subLoading = false;
+            });
         } else {
           return false;
         }

+ 21 - 8
src/views/mallManagement/commodity/productList/detailsPageEdit.vue

@@ -54,6 +54,16 @@
             <el-button
                 size="small"
                 icon="el-icon-close"
+                v-if="row.goodsStatus == '2'"
+                @click="uALowerShelves(row,'upper')"
+                type="text">
+              上架
+            </el-button>
+            <el-button
+                size="small"
+                icon="el-icon-close"
+                v-if="row.goodsStatus == '1'"
+                @click="uALowerShelves(row,'lower')"
                 type="text">
               下架
             </el-button>
@@ -246,8 +256,7 @@ export default {
                 message: " ",
                 trigger: "blur"
               }
-            ],
-            slot: true
+            ]
           },
           {
             label: "排序",
@@ -259,8 +268,7 @@ export default {
                 message: " ",
                 trigger: "blur"
               }
-            ],
-            slot: true
+            ]
           },
           {
             label: "商品名称",
@@ -272,8 +280,7 @@ export default {
                 message: " ",
                 trigger: "blur"
               }
-            ],
-            slot: true
+            ]
           },
           {
             label: "推广词",
@@ -285,8 +292,7 @@ export default {
                 message: " ",
                 trigger: "blur"
               }
-            ],
-            slot: true
+            ]
           }
         ]
       },
@@ -323,6 +329,12 @@ export default {
         this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
       }
     },
+    //上下架
+    uALowerShelves(row,type){
+      if (type === 'upper') row.goodsStatus = 1
+      if (type === 'lower') row.goodsStatus = 2
+      this.editProductInfo()
+    },
     //费用查询
     onLoad(page, params = {}) {
       this.loading = true;
@@ -469,6 +481,7 @@ export default {
             if (res.data.success) {
               this.$message.success("操作成功!")
               this.query(this.form.id)
+              console.log(this.option);
             }
           })
         } else {