4 changed files with 120 additions and 3 deletions
@ -1,7 +1,7 @@ |
|||||
|
|
||||
config = { |
config = { |
||||
// API_URL: 'http://fw.niulanshan.com.cn:8081',
|
API_URL: 'http://fw.niulanshan.com.cn:8081', |
||||
API_URL: 'http://61.135.192.50:8082', |
// API_URL: 'http://172.119.51.150:8081',
|
||||
|
|
||||
} |
} |
||||
|
|
@ -0,0 +1,84 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<el-form :inline="true" :model="formSearch" ref="ruleForm" class="demo-form-inline"> |
||||
|
<el-form-item label="防伪码:"> |
||||
|
<el-input v-model="formSearch.code" size="mini" placeholder="请输入码号" clearable maxlength="50"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" size="mini" icon="el-icon-search" @click="search">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<el-table :data="tableData" style="width: 100%" header-row-class-name=""> |
||||
|
<el-table-column prop="code" label="防伪码"></el-table-column> |
||||
|
<el-table-column prop="send_time" label="发码日期"></el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
background |
||||
|
@size-change="handleSizeChange" |
||||
|
@current-change="handleCurrentChange" |
||||
|
:current-page="pageNo" |
||||
|
:page-size="pageSize" |
||||
|
layout="total,prev, next" |
||||
|
:total="total"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import {sendTotalList,sendTotalFetch} from "@/api/send" |
||||
|
export default { |
||||
|
name:"sendTotal", |
||||
|
data(){ |
||||
|
return { |
||||
|
pageNo: 1, //当前页 |
||||
|
pageSize: 10, //每页条数 |
||||
|
total: 0, //总条数 |
||||
|
tableData: [], |
||||
|
formSearch: {//模糊搜索 |
||||
|
code: '' |
||||
|
}, |
||||
|
} |
||||
|
}, |
||||
|
created(){ |
||||
|
this.initData() |
||||
|
}, |
||||
|
methods:{ |
||||
|
//搜索查询 |
||||
|
search() { |
||||
|
if(this.formSearch.code.trim() != '') |
||||
|
{ |
||||
|
sendTotalFetch({value:this.formSearch.code}).then(res => { |
||||
|
this.tableData = [res.data] |
||||
|
this.total = 1 |
||||
|
}) |
||||
|
} else { |
||||
|
this.pageNo = 1 |
||||
|
this.initData() |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
//获取用户列表 |
||||
|
initData() { |
||||
|
const params = { |
||||
|
pageNo: this.pageNo, |
||||
|
pageSize: this.pageSize |
||||
|
} |
||||
|
sendTotalList(params).then(res => { |
||||
|
this.tableData = res.data.list |
||||
|
this.total = res.data.total |
||||
|
}) |
||||
|
}, |
||||
|
//每页条数变化 |
||||
|
handleSizeChange(val) { |
||||
|
this.pageSize = val |
||||
|
this.initData() |
||||
|
}, |
||||
|
//当前页变化 |
||||
|
handleCurrentChange(val) { |
||||
|
this.pageNo = val |
||||
|
this.initData() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
Loading…
Reference in new issue