mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 08:55:52 +08:00
Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui
This commit is contained in:
@@ -199,6 +199,7 @@
|
||||
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
||||
<h2>选择或拖拽文件上传</h2>
|
||||
</div>
|
||||
<Spin fix v-if="spinShow"></Spin>
|
||||
</Upload>
|
||||
<Button @click="exportGoods" type="text" style="color: red">下载导入模板</Button>
|
||||
</div>
|
||||
@@ -222,13 +223,14 @@ import {
|
||||
} from "@/api/goods";
|
||||
import { baseUrl } from "@/libs/axios.js";
|
||||
import * as API_Shop from "@/api/shops";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
import {uploadGoodsExcel} from "../../../api/goods";
|
||||
|
||||
export default {
|
||||
name: "goods",
|
||||
data() {
|
||||
return {
|
||||
spinShow:false,
|
||||
accessToken: {}, // 验证token
|
||||
importModal: false,
|
||||
action: baseUrl + "/goods/import/import", // 上传接口
|
||||
@@ -546,15 +548,11 @@ export default {
|
||||
async upload() {
|
||||
let fd = new FormData();
|
||||
fd.append("files", this.file);
|
||||
this.spinShow = false
|
||||
let res = await uploadGoodsExcel(fd);
|
||||
if (res.success) {
|
||||
this.stepList.map((item) => {
|
||||
item.checked = false;
|
||||
this.$Message.success("导入成功")
|
||||
this.importModal = false
|
||||
});
|
||||
|
||||
this.stepList[2].checked = true;
|
||||
this.spinShow = true
|
||||
this.$Message.success("导入成功")
|
||||
}
|
||||
},
|
||||
openImportGoods(){
|
||||
|
||||
@@ -277,9 +277,14 @@ export default {
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.searchForm = {};
|
||||
this.searchForm = {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
};
|
||||
this.selectDate = "";
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
|
||||
@@ -168,9 +168,13 @@ export default {
|
||||
// 重置
|
||||
handleReset () {
|
||||
this.selectDate = "";
|
||||
this.searchForm = {};
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm = {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
};
|
||||
this.getDataList();
|
||||
},
|
||||
// 编辑
|
||||
|
||||
@@ -205,10 +205,15 @@ export default {
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchForm = {};
|
||||
this.searchForm = {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 0, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime",
|
||||
order: "desc", // 默认排序方式
|
||||
};
|
||||
this.selectDate = "";
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageSize = 10;
|
||||
|
||||
this.getDataList();
|
||||
},
|
||||
// 时间段分别赋值
|
||||
|
||||
@@ -145,10 +145,14 @@ export default {
|
||||
},
|
||||
// 重置
|
||||
handleReset () {
|
||||
this.searchForm = {};
|
||||
this.searchForm = {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime",
|
||||
order: "desc", // 默认排序方式
|
||||
};
|
||||
this.selectDate = "";
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 管理
|
||||
|
||||
Reference in New Issue
Block a user