牛栏山防伪赋码系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
5.4 KiB

4 years ago
<template>
<div class="app-container">
<div>
<el-form :inline="true" :model="formSearch" ref="ruleForm" class="demo-form-inline">
<el-form-item label="时间:">
<el-date-picker
v-model="formSearch.time"
size="mini"
4 years ago
value-format="yyyy-MM-dd HH:mm:ss"
4 years ago
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="取码单号:">
<el-input v-model="formSearch.number" 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-item class="float-right">
<el-button type="danger" size="mini" icon="el-icon-circle-plus-outline" @click="addGetDialog">创建取码单</el-button>
</el-form-item>
</el-form>
</div>
<el-table :data="tableData" style="width: 100%" header-row-class-name="">
4 years ago
<el-table-column prop="fetchId" label="取码单号"></el-table-column>
<el-table-column prop="fetchTime" label="日期"></el-table-column>
<!-- <el-table-column prop="summary" label="摘要"></el-table-column> -->
<el-table-column prop="fetchCount" label="取码数"></el-table-column>
<el-table-column prop="status" label="取码单状态"></el-table-column>
<el-table-column prop="fileName" label="防伪码">
4 years ago
<template slot-scope="scope">
4 years ago
<a :href="scope.row.downloadUrl"><el-button type="text">{{scope.row.fileName}}</el-button></a>
4 years ago
</template>
</el-table-column>
4 years ago
<el-table-column label="操作" width="250">
4 years ago
<template slot-scope="scope">
4 years ago
<el-button type="text" size="small" @click="addGetDialog(scope.row.id)">编辑</el-button>
<el-button type="text" size="small" @click="confirm(scope.row.id)">生成防伪码印刷文件</el-button>
<el-button type="text" size="small" @click="showDetail">查看</el-button>
4 years ago
</template>
</el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
layout="total, prev, pager, next, sizes, jumper"
:total="total">
</el-pagination>
</div>
</template>
<script>
import {
4 years ago
getFetchList
} from "@/api/get"
4 years ago
export default {
name: "getGet",
data() {
return {
formSearch: {//模糊搜索
time: '',
number: '',
},
currentPage: 1, //当前页
pageSize: 10, //每页条数
total: 0, //总条数
tableData: [
], //表格数据
};
},
mounted() {
this.initData()
},
methods: {
//搜索查询
search() {
this.currentPage = 1
this.initData()
},
//获取用户列表
initData() {
const params = {
4 years ago
pageNo: this.currentPage,
4 years ago
pageSize: this.pageSize,
4 years ago
discardId: this.formSearch.number|| null,
startTime:this.formSearch.time[0] || null,
endTime:this.formSearch.time[1] || null
4 years ago
}
4 years ago
getFetchList(params).then(res => {
4 years ago
this.tableData = res.data.list
this.total = res.data.count
})
},
confirm(){
4 years ago
this.$confirm('此操作将生成防伪码印刷文件, 是否继续?', '提示', {
4 years ago
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
4 years ago
message: '操作成功!'
4 years ago
});
}).catch(() => {
this.$message({
type: 'info',
4 years ago
message: '已取消操作'
4 years ago
});
});
},
//防伪取码详情
showDetail(id) {
this.$router.push({name:'getGetDetail'})
},
//点击创建取码单
addGetDialog(id){
4 years ago
this.$router.push({name:'addGet',query:{id:id}})
4 years ago
},
//每页条数变化
handleSizeChange(val) {
this.pageSize = val
this.initData()
},
//当前页变化
handleCurrentChange(val) {
this.currentPage = val
this.initData()
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.input-with-select {
float: left;
top: 10px;
}
.el-input {
width: 230px;
}
</style>