137 行
5.0 KiB
HTML
可执行文件
137 行
5.0 KiB
HTML
可执行文件
<!--[1.6.9]-->
|
|
<style>
|
|
|
|
th {
|
|
background-color: #f5f7fa !important;
|
|
}
|
|
|
|
.el-pagination {
|
|
padding: 8px;
|
|
}
|
|
|
|
.el-table__row > td:last-child > .cell {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.center-content {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.center-content > * {
|
|
margin-bottom: 10px;
|
|
margin-right: 8px;
|
|
}
|
|
</style>
|
|
<div class="purchaseBox" id="record" v-cloak>
|
|
<div class="center-content">
|
|
<el-date-picker
|
|
size="small"
|
|
v-model="add_time"
|
|
type="datetimerange"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
range-separator="至"
|
|
start-placeholder="开始日期"
|
|
end-placeholder="结束日期">
|
|
</el-date-picker>
|
|
<el-select v-model="type" placeholder="类型" size="small" clearable>
|
|
<el-option value="" label="所有类型"></el-option>
|
|
<el-option value="1" label="充值"></el-option>
|
|
<el-option value="2" label="消费"></el-option>
|
|
</el-select>
|
|
<el-button type="primary" plain @click="search" size="small">搜索</el-button>
|
|
</div>
|
|
<div style="max-width: calc(100vw - 208px);">
|
|
<el-table border :data="moneyList" style="width: calc(100vw - 208px);"
|
|
size="small"
|
|
max-height="500"
|
|
v-loading="loading"
|
|
element-loading-text="数据获取中"
|
|
element-loading-spinner="el-icon-loading">
|
|
<el-table-column type="index" align="center" label="序号" width="60px"></el-table-column>
|
|
<el-table-column prop="money" align="center" label="原价(元)" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="actualmoney" align="center" label="实付(元)" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="discount" align="center" label="折扣" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="type_name" align="center" label="类型" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="add_time" align="center" label="操作时间" show-overflow-tooltip></el-table-column>
|
|
</el-table>
|
|
<el-pagination
|
|
@size-change="handleSizeChange"
|
|
@current-change="handleCurrentChange"
|
|
:current-page="currentPage"
|
|
:page-sizes="[10, 15, 20, 25, 30, 35, 40, 45, 50]"
|
|
:page-size="100"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
:total="currentLen">
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var purchase = new Vue({
|
|
el: "#record",
|
|
data: function () {
|
|
return {
|
|
add_time: "",
|
|
type: "",
|
|
currentPage: 1,
|
|
currentLimit: 10,
|
|
currentLen: 0,
|
|
loading: false,
|
|
moneyList: [],
|
|
}
|
|
},
|
|
methods: {
|
|
//搜索
|
|
search: function () {
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
handleSizeChange: function (val) {
|
|
this.currentLimit = val;//切换每页数量
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
handleCurrentChange: function (val) {
|
|
this.currentPage = val;
|
|
this.getData();//切换页数
|
|
},
|
|
//查询
|
|
getData: function () {
|
|
var that = this;
|
|
that.loading = true;
|
|
$.ajax({
|
|
url: "{:U('recordList')}",
|
|
type: "post",
|
|
data: {
|
|
page: that.currentPage,
|
|
limit: that.currentLimit,
|
|
add_time: that.add_time,
|
|
type: that.type
|
|
},
|
|
success: function (res) {
|
|
that.moneyList = [];
|
|
that.moneyList = res.data.list;
|
|
that.loading = false;
|
|
that.$nextTick(function () {
|
|
that.currentLen = parseInt(res.data.count);
|
|
})
|
|
}
|
|
})
|
|
},
|
|
//导出
|
|
exportOperation: function () {
|
|
var that = this;
|
|
var order_number = that.order_number;
|
|
var supplier_id = that.supplier_id;
|
|
var warehouse_id = that.warehouse_id;
|
|
var add_time = that.add_time;
|
|
var type = that.type;
|
|
window.location.href = "{:U('export')}?order_number=" + order_number + "&supplier_id=" + supplier_id + "&warehouse_id=" + warehouse_id + "&add_time=" + add_time + "&type=" + type
|
|
}
|
|
},
|
|
created: function () {
|
|
this.getData();
|
|
}
|
|
})
|
|
</script> |