Commit 18ca01ad by LJM

msg

parent 1b771be9
Showing with 106 additions and 0 deletions
<template>
<section class="store pagex">
<div class="store-con">
<el-form :inline="true" :model="formParam" ref="formParam">
<el-form-item label="消息类型" prop="msgType">
<el-select v-model="formParam.msgType" placeholder="全部" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="已选中报价消息" value="1"></el-option>
<el-option label="已成单消息" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="创建时间" prop="time">
<el-date-picker v-model="formParam.time" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">搜索</el-button>
<el-button @click="resetForm('formParam')">重置</el-button>
</el-form-item>
</el-form>
<div class="data-box">
<el-table :data="list" border max-height="600">
<el-table-column prop="goods_name" label="消息编号" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="brand_name" label="消息类型" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="create_time" label="创建时间" width="160" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="操作" width="120" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="viewChange(scope.$index, scope.row)">查看内容</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 50, 100, 200]" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div>
</div>
<Menu/>
</section>
</template>
<script>
import Vue from '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, Tag, Tooltip} from 'element-ui'
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm;
Vue.use(Button).use(Form).use(Select).use(Option).use(Input).use(FormItem).use(Dialog).use(Tooltip).use(Autocomplete).use(Popover).use(Tag)
Vue.use(DatePicker).use(Dropdown).use(DropdownMenu).use(DropdownItem).use(TableColumn).use(Table).use(Pagination)
export default {
name: "news",
data() {
return {
total: 0,
page: 1,
limit: 10,
list: [],
formParam: {
msgType: '',
time: ''
}
};
},
created() {
this.getData()
},
methods: {
getData() {
var params = Object.assign({}, {page: this.page, limit: this.limit}, this.formParam);
this.$http('GET', "/api/bestgoods/getBestGoodsList", params).then(res => {
if (res.code === 0) {
this.list = res.data.list || [];
this.total = Number(res.data.count) || 0;
} else {
this.$message({
message: res.msg,
type: 'error'
});
}
})
},
viewChange(index, row) {
console.log(index, row);
},
onSubmit() {
this.page = 1;
this.getData();
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
handleSizeChange(val) {
this.limit = val;
this.getData();
},
handleCurrentChange(val) {
this.page = val;
this.getData();
}
},
components: {
Menu
}
};
</script>
<style scoped>
@import "../../assets/css/store/goodslist.min.css";
</style>
\ No newline at end of file
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