商家端保存商品列表筛选条件

This commit is contained in:
mabo
2021-05-14 17:28:01 +08:00
parent b6b45926f9
commit f2c2734b15
20 changed files with 132 additions and 105 deletions

View File

@@ -35,6 +35,7 @@
</Select>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
</Form>
</Row>
<Row class="padding-row">
@@ -279,6 +280,12 @@
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.searchForm = {}
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
@@ -346,7 +353,7 @@
});
},
},
mounted() {
activated() {
this.init();
},
};

View File

@@ -45,6 +45,7 @@
></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
</Form>
</Row>
<Row class="padding-row">
@@ -263,6 +264,13 @@
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.searchForm = {};
this.selectDate = ''
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
@@ -307,7 +315,7 @@
},
},
mounted() {
activated () {
this.init();
},
};

View File

@@ -45,6 +45,7 @@
></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
</Form>
</Row>
<Row class="padding-row">
@@ -258,6 +259,13 @@
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.selectDate = ''
this.searchForm = {}
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
@@ -301,7 +309,7 @@
},
},
mounted() {
activated() {
this.init();
},
};

View File

@@ -38,7 +38,7 @@
<DatePicker
v-model="selectDate"
type="datetimerange"
format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
clearable
@on-change="selectDateRange"
placeholder="选择起始时间"
@@ -46,6 +46,7 @@
></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
</Form>
</Row>
@@ -83,12 +84,8 @@
<script>
import * as API_Order from "@/api/order";
export default {
name: "orderList",
components: {
},
data() {
return {
loading: true, // 表单加载状态
@@ -245,7 +242,7 @@
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm = {};
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.selectDate = null;
@@ -284,8 +281,6 @@
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
detail(v) {
@@ -297,7 +292,7 @@
},
},
mounted() {
activated () {
this.init();
},
};

View File

@@ -45,7 +45,7 @@
</Select>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
</Form>
</Row>
<Row class="padding-row">
@@ -256,6 +256,12 @@
this.searchForm.pageSize = 10;
this.getData();
},
handleReset() {
this.searchForm = {}
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getData();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
@@ -309,7 +315,7 @@
});
},
},
mounted() {
activated() {
this.init();
},
};