123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>客户账户-列表</title>
- <meta charset="utf-8">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <!-- 所有的 css & js 资源 -->
- <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/httpVueLoader.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- <script src="../../static/node_modules/crypto-js/crypto-js.js"></script>
- </head>
- <body>
- <div class="vue-box" style="display: none;" :style="'display: block;'">
- <div class="c-panel">
- <!-- ------------- 检索参数 ------------- -->
- <div class="c-title">检索参数</div>
- <el-form ref="form" :model='p' @submit.native.prevent>
- <sa-item type="text" name="企业名称" v-model="p.customerName"></sa-item>
- <sa-item type="daterange" name="期间">
- <el-date-picker v-model="p.createTime" type="daterange" align="right" unlink-panels
- value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </sa-item>
- <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
- <el-button type="primary" icon="el-icon-download" @click="exportExcel">导出</el-button>
- <el-button type="primary" @click="printFn">打印</el-button>
- <sa-item type="fast-btn" show="reset" style="display: inline;"></sa-item>
- </el-form>
- <el-table class="data-table" ref="data-table" :data="dataList">
- <sa-td type="index" name="序号"></sa-td>
- <sa-td name="企业名称" prop="customerName" width="260"></sa-td>
- <sa-td name="期初余额" prop="beginMoney" not="0"></sa-td>
- <sa-td name="本期充值" prop="chargeMoney" not="0"></sa-td>
- <sa-td name="本期扣除" prop="deuctionMoney" not="0"></sa-td>
- <sa-td name="本期余额退款" prop="balanceRefundMoney" not="0"></sa-td>
- <sa-td name="本期异常退款" prop="errorRefundMoney" not="0"></sa-td>
- <sa-td name="期末余额" prop="endMoney" not="0"></sa-td>
- </el-table>
- <!-- ------------- 分页 ------------- -->
- <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
- </sa-item>
- </div>
- </div>
- <script>
- </script>
- <script>
- var app = new Vue({
- components: {
- "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
- "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
- },
- el: '.vue-box',
- data: {
- p: { // 查询参数
- // accountNo: '', // 账户
- customerName: '',
- createTime: [],
- pageNo: 1, // 当前页
- pageSize: 10, // 页大小
- sortType: 0 // 排序方式
- },
- dataCount: 0,
- dataList: [], // 数据集合
- },
- methods: {
- exportExcel() {
- let p = this.p;
- let createTime = p.createTime;
- if (!createTime || createTime.length == 0) {
- sa.error('请选择导出期间')
- return;
- }
- sa.confirm('是否导出符合筛选条件的记录', function() {
- sa.ajax('/TbAccount/export', sa.removeNull(this.p),
- function(res) {
- window.location.href=res.data;
- }.bind(this))
- }.bind(this));
- },
- printFn() {
- let p = this.p;
- let createTime = p.createTime;
- if (!createTime || createTime.length == 0) {
- sa.error('请选择导出期间')
- return;
- }
- sa.showIframe('打印', 'balance-print.html?customerName='+this.p.customerName+'&bDay='+createTime[0]+'&eDay='+createTime[1], '1080px', '90%');
- },
- // 刷新
- f5: function() {
- let p = this.p;
- let createTime = p.createTime;
- if (!createTime || createTime.length == 0) {
- this.dataList = [];
- this.dataCount = 0;
- return;
- } else {
- p.beginTime = createTime[0];
- p.endTime = createTime[1];
- }
- sa.ajax('/TbAccount/getBalance', sa.removeNull(this.p), function(res) {
- this.dataList = res.data; // 数据
- this.dataCount = res.dataCount; // 数据总数
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this));
- },
- },
- created: function() {
- this.f5();
- sa.onInputEnter();
- }
- })
- </script>
- </body>
- </html>
|