Commit d5b73a7f by LJM

筛选条件

parent d3c05351
<template> <template>
<div class="brandxk pagex"> <div class="brandxk pagex">
<div class="brand-con"> <div class="brand-con">
<el-form :inline="true" :model="formParam" class="demo-form-inline"> <el-form :inline="true" :model="formParam" class="demo-form-inline" ref="formParam">
<el-form-item label="品牌"> <el-form-item label="品牌" prop="brand_name">
<el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="submit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete> <el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="submit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="关键词"> <el-form-item label="关键词" prop="keyword">
<el-input v-model="formParam.keyword" placeholder="请输入关键词" @keyup.enter.native="submit" clearable></el-input> <el-input v-model="formParam.keyword" placeholder="请输入关键词" @keyup.enter.native="submit" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="submit">搜索</el-button> <el-button type="primary" @click="submit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
...@@ -186,6 +187,10 @@ export default { ...@@ -186,6 +187,10 @@ export default {
} }
}) })
}, },
resetForm(formName) {
this.formParam.date='';
this.$refs[formName].resetFields();
},
submit() { submit() {
if (this.formParam.keyword && this.formParam.keyword.length == 1) { if (this.formParam.keyword && this.formParam.keyword.length == 1) {
this.$message("关键词不能少于2个字符"); this.$message("关键词不能少于2个字符");
......
<template> <template>
<div class="goods pagex"> <div class="goods pagex">
<div class="goods-con"> <div class="goods-con">
<el-form :inline="true" :model="formParam" class="demo-form-inline"> <el-form :inline="true" :model="formParam" class="demo-form-inline" ref="formParam">
<el-form-item label="型号"> <el-form-item label="型号" prop="goods_name">
<el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete> <el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="品牌"> <el-form-item label="品牌" prop="brand_name">
<el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete> <el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="分类"> <el-form-item label="分类">
<el-cascader expand-trigger="hover" placeholder="试试搜索:分类" :options="options" filterable @change="handleChange"></el-cascader> <el-cascader clearable expand-trigger="hover" placeholder="试试搜索:分类" :options="options" filterable @change="handleChange"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="submit">搜索</el-button> <el-button type="primary" @click="submit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
...@@ -99,7 +100,7 @@ export default { ...@@ -99,7 +100,7 @@ export default {
page: 1, page: 1,
downHref: "", downHref: "",
formParam: { formParam: {
goods_name: 'ISL29035IROZ-T7', goods_name: '',
brand_name: '', brand_name: '',
keyword: '', keyword: '',
class_id2: '', class_id2: '',
...@@ -249,6 +250,9 @@ export default { ...@@ -249,6 +250,9 @@ export default {
} }
}) })
}, },
resetForm(formName) {
this.$refs[formName].resetFields();
},
submit() { submit() {
this.page = 1; this.page = 1;
this.getData(); this.getData();
......
<template> <template>
<section class="inquire pagex"> <section class="inquire pagex">
<div class="inquire-con"> <div class="inquire-con">
<el-form :inline="true" :model="formParam" class="demo-form-inline"> <el-form :inline="true" :model="formParam" class="demo-form-inline" ref="formParam">
<el-form-item label="型号"> <el-form-item label="型号" prop="goods_name">
<el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete> <el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="品牌"> <el-form-item label="品牌" prop="brand_name">
<el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete> <el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态" prop="i_status">
<el-select v-model="formParam.i_status" placeholder="请选择" clearable> <el-select v-model="formParam.i_status" placeholder="请选择" clearable>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="已关闭" value="-1"></el-option> <el-option label="已关闭" value="-1"></el-option>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">搜索</el-button> <el-button type="primary" @click="onSubmit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
...@@ -174,6 +175,10 @@ export default { ...@@ -174,6 +175,10 @@ export default {
} }
}) })
}, },
resetForm(formName) {
this.formParam.date='';
this.$refs[formName].resetFields();
},
onSubmit() { onSubmit() {
this.page = 1; this.page = 1;
this.getData(); this.getData();
......
<template> <template>
<section class="quote pagex"> <section class="quote pagex">
<div class="quote-con"> <div class="quote-con">
<el-form :inline="true" :model="formParam" class="demo-form-inline"> <el-form :inline="true" :model="formParam" class="demo-form-inline" ref="formParam">
<el-form-item label="报价型号"> <el-form-item label="报价型号" prop="goods_name">
<el-autocomplete clearable v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete> <el-autocomplete clearable v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="品牌"> <el-form-item label="品牌" prop="brand_name">
<el-autocomplete clearable v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete> <el-autocomplete clearable v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态" prop="status">
<el-select v-model="formParam.status" placeholder="请选择" clearable> <el-select v-model="formParam.status" placeholder="请选择" clearable>
<el-option label="确认中" value="1"></el-option> <el-option label="确认中" value="1"></el-option>
<el-option label="已选中" value="2"></el-option> <el-option label="已选中" value="2"></el-option>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">搜索</el-button> <el-button type="primary" @click="onSubmit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
...@@ -114,7 +115,7 @@ ...@@ -114,7 +115,7 @@
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import Menu from "@/components/menu.vue"; import Menu from "@/components/menu.vue";
import {Autocomplete, Button, DatePicker, Dialog, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tooltip,Tag} from 'element-ui' import {Autocomplete, Button, DatePicker, Dialog, Dropdown, DropdownItem, DropdownMenu, Form, FormItem, Input, Message, MessageBox, Option, Pagination, Popover, Select, Table, TableColumn, Tag, Tooltip} from 'element-ui'
import {NODE_ENVS} from "../../ajax"; import {NODE_ENVS} from "../../ajax";
import Tool from '../../tool' import Tool from '../../tool'
...@@ -230,6 +231,10 @@ export default { ...@@ -230,6 +231,10 @@ export default {
} }
}) })
}, },
resetForm(formName) {
this.formParam.date='';
this.$refs[formName].resetFields();
},
onSubmit() { onSubmit() {
this.page = 1; this.page = 1;
this.getData(); this.getData();
......
<template> <template>
<div class="enter pagex"> <div class="enter pagex">
<div class="enter-con"> <div class="enter-con">
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formParam" class="demo-form-inline" ref="formParam">
<el-form-item label="状态"> <el-form-item label="状态" prop="status">
<el-select v-model="formInline.status" placeholder="全部"> <el-select v-model="formParam.status" placeholder="全部">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="待处理" value="1"></el-option> <el-option label="待处理" value="1"></el-option>
<el-option label="处理中" value="2"></el-option> <el-option label="处理中" value="2"></el-option>
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="更新日期"> <el-form-item label="更新日期">
<el-date-picker v-model="formInline.date" value-format="yyyy-MM-dd" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker v-model="formParam.date" value-format="yyyy-MM-dd" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="submit">搜索</el-button> <el-button type="primary" @click="submit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
...@@ -78,7 +79,7 @@ export default { ...@@ -78,7 +79,7 @@ export default {
uploadUrl: NODE_ENVS + '/api/uploadSku/import', uploadUrl: NODE_ENVS + '/api/uploadSku/import',
fileData: {token: Tool.getCookie('token')}, fileData: {token: Tool.getCookie('token')},
downUrl: NODE_ENVS + '/api/uploadSku/downUploadCsv?token=' + Tool.getCookie('token'), downUrl: NODE_ENVS + '/api/uploadSku/downUploadCsv?token=' + Tool.getCookie('token'),
formInline: { formParam: {
status: '', status: '',
date: '' date: ''
}, },
...@@ -87,9 +88,9 @@ export default { ...@@ -87,9 +88,9 @@ export default {
}; };
}, },
watch: { watch: {
'formInline.date'(val) { 'formParam.date'(val) {
if (!val) { if (!val) {
this.formInline.date = [] this.formParam.date = []
} }
} }
}, },
...@@ -102,9 +103,9 @@ export default { ...@@ -102,9 +103,9 @@ export default {
this.$http('get', "/api/uploadSku/list", { this.$http('get', "/api/uploadSku/list", {
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
status: this.formInline.status, status: this.formParam.status,
action_time: this.formInline.date[0], action_time: this.formParam.date[0],
end_time: this.formInline.date[1] end_time: this.formParam.date[1]
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data.list || []; this.tableData = res.data.list || [];
...@@ -117,6 +118,10 @@ export default { ...@@ -117,6 +118,10 @@ export default {
} }
}) })
}, },
resetForm(formName) {
this.formParam.date='';
this.$refs[formName].resetFields();
},
submit() { submit() {
this.page = 1; this.page = 1;
this.getData(); this.getData();
......
<template> <template>
<section class="store pagex"> <section class="store pagex">
<div class="store-con"> <div class="store-con">
<el-form :inline="true" :model="formParam" class="demo-form-inline"> <el-form :inline="true" :model="formParam" class="demo-form-inline" ref="formParam">
<el-form-item label="型号"> <el-form-item label="型号" prop="goods_name">
<el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete> <el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="品牌"> <el-form-item label="品牌" prop="brand_name">
<el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete> <el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态" prop="join_inquiry">
<el-select v-model="formParam.join_inquiry" placeholder="全部" clearable> <el-select v-model="formParam.join_inquiry" placeholder="全部" clearable>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="参与询价" value="1"></el-option> <el-option label="参与询价" value="1"></el-option>
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">搜索</el-button> <el-button type="primary" @click="onSubmit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
...@@ -844,6 +845,10 @@ export default { ...@@ -844,6 +845,10 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
resetForm(formName) {
this.formParam.date='';
this.$refs[formName].resetFields();
},
onSubmit() { onSubmit() {
this.page = 1; this.page = 1;
this.getData(); this.getData();
......
<template> <template>
<div class="store pagex"> <div class="store pagex">
<div class="store-con"> <div class="store-con">
<el-form :inline="true" :model="formParam" class="demo-form-inline"> <el-form :inline="true" :model="formParam" class="demo-form-inline" ref="formParam">
<el-form-item label="型号"> <el-form-item label="型号" prop="goods_name">
<el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete> <el-autocomplete v-model="formParam.goods_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsync" placeholder="请输入型号" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="品牌"> <el-form-item label="品牌" prop="brand_name">
<el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete> <el-autocomplete v-model="formParam.brand_name" :trigger-on-focus="false" @keyup.enter.native="onSubmit" :fetch-suggestions="querySearchAsyncBrand" placeholder="请输入品牌" clearable></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态" prop="status">
<el-select v-model="formParam.status" placeholder="请选择"> <el-select v-model="formParam.status" placeholder="请选择">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="上架" value="1"></el-option> <el-option label="上架" value="1"></el-option>
<el-option label="下架" value="3"></el-option> <el-option label="下架" value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="更新日期"> <el-form-item label="更新日期" prop="date">
<el-date-picker v-model="formParam.date" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker v-model="formParam.date" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">搜索</el-button> <el-button type="primary" @click="onSubmit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn-nav clr"> <div class="btn-nav clr">
...@@ -164,7 +165,6 @@ ...@@ -164,7 +165,6 @@
</div> </div>
<Menu/> <Menu/>
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
...@@ -176,7 +176,6 @@ Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(D ...@@ -176,7 +176,6 @@ Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(D
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Popover) Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination).use(Popover)
export default { export default {
name: "list", name: "list",
data() { data() {
return { return {
total: 0, total: 0,
...@@ -321,6 +320,10 @@ export default { ...@@ -321,6 +320,10 @@ export default {
}) })
}, },
resetForm(formName) {
this.formParam.date='';
this.$refs[formName].resetFields();
},
onSubmit() { onSubmit() {
this.page = 1; this.page = 1;
this.getData(); this.getData();
...@@ -430,7 +433,6 @@ export default { ...@@ -430,7 +433,6 @@ export default {
} }
}) })
} }
}, },
components: { components: {
Menu Menu
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment