diff --git a/resources/frontend/src/views/goods/goods.vue b/resources/frontend/src/views/goods/goods.vue
index 9685931..b0e9084 100644
--- a/resources/frontend/src/views/goods/goods.vue
+++ b/resources/frontend/src/views/goods/goods.vue
@@ -64,7 +64,8 @@
上新
+ :before-upload="beforeInventory" :on-error="inventoryError"
+ style="display:inline-block;margin: 0 10px 0 10px;">
盘点导入
新建商品
@@ -491,6 +492,7 @@ export default {
publicId: "", //参考售价 预留量公用id
reference_price: "", //参考价格修改传参
reserve: "", //预留量修改传参
+ loadingModule: ""
};
},
methods: {
@@ -907,17 +909,27 @@ export default {
this.brand = res.data.data;
});
},
+ beforeInventory() {
+ this.loadingModule = this.$loading({
+ lock: true,
+ text: '盘点导入中...',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
+ },
inventorySuccess(response) {
this.$message({
message: response.message,
type: "success",
});
+ this.loadingModule.close();
},
inventoryError(err) {
this.$message({
- message: res.errorMessage,
+ message: err.errorMessage,
type: "error",
});
+ this.loadingModule.close();
}
},
diff --git a/resources/frontend/src/views/store/store.vue b/resources/frontend/src/views/store/store.vue
index 5935023..19451e2 100644
--- a/resources/frontend/src/views/store/store.vue
+++ b/resources/frontend/src/views/store/store.vue
@@ -17,7 +17,7 @@
{{
- scope.row.status
+ scope.row.status
}}
下载商品
@@ -30,9 +30,8 @@
{{
- scope.row.status
+ scope.row.status
}}
- 下载商品
@@ -148,8 +147,18 @@ export default {
// 下载商品
download(row) {
+ const loading = this.$loading({
+ lock: true,
+ text: row.name + ' 店铺商品下载中...',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
downloadGoods(row.id).then((res) => {
-
+ loading.close();
+ this.$message({
+ type: "success",
+ message: res.data.message,
+ });
});
},
},
@@ -161,6 +170,7 @@ a {
text-decoration: none;
color: white;
}
+
.block {
margin-top: 20px;
}