123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- <!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="结束日期" :picker-options="pickerOptions">
- </el-date-picker>
- </sa-item>
- <sa-item name="复核状态">
- <el-select v-model="p.reviewStatus" clearable placeholder="请选择">
- <el-option v-for="item in reviewStatusList" :key="item.id" :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </sa-item>
- <sa-item name="类型">
- <el-select v-model="p.type" clearable placeholder="请选择">
- <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- </sa-item>
- <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
- <sa-item type="fast-btn" show="reset" style="display: inline;"></sa-item>
- </el-form>
- <!-- ------------- 快捷按钮 ------------- -->
- <!-- <sa-item type="fast-btn" show="add,get,delete,export,reset"></sa-item>-->
- <!-- ------------- 数据列表 ------------- -->
- <el-table class="data-table" ref="data-table" :data="dataList">
- <sa-td type="index" name="序号"></sa-td>
- <sa-td name="客户名称" prop="customerName" width="220"></sa-td>
- <sa-td name="原金额(元)" prop="beforeMoney" not="0"></sa-td>
- <sa-td name="实际收款(元)" prop="totalTopupMoney" not="0" width="120"></sa-td>
- <sa-td name="优惠金额(元)" prop="discountMoney" not="0" width="120"></sa-td>
- <sa-td name="本次充值金额(元)" prop="preTopupMoney" not="0" width="140"></sa-td>
- <sa-td name="退款金额(元)" width="120">
- <template slot-scope="s">
- <span v-if="s.row.refundMoney==0">0</span>
- <span v-else style="color: blue;cursor: pointer;text-decoration: underline;" @click="getDetail(s.row)">{{s.row.refundMoney}}</span>
- </template>
- </sa-td>
- <sa-td name="余额(元)" prop="totalMoney" not="0"></sa-td>
- <sa-td name="类型" type="enum" prop="type" :jv="{1: '账户充值', 2: '余额退款',3:'异常单退款'}"></sa-td>
- <sa-td name="付款方式" prop="payingType" type="enum" :jv="payingTypeObj"></sa-td>
- <sa-td name="经办人" prop="chargePeople"></sa-td>
- <sa-td name="充值时间" prop="createTime" width="160"></sa-td>
- <sa-td name="复核人员" prop="reviewBy"></sa-td>
- <sa-td name="说明" prop="remark"></sa-td>
- <el-table-column label="操作" fixed="right" width="140px">
- <template slot-scope="s">
- <el-button class="c-btn" type="success" v-if="sa.isAuth('tb-charge-record-list-print')"
- @click="print(s.row)">打印单据</el-button>
- <el-button class="c-btn" type="primary"
- v-if="s.row.reviewStatus!=1 && sa.isAuth('tb-charge-record-list-review')"
- @click="toReview(s.row)">复审</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- ------------- 分页 ------------- -->
- <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
- </sa-item>
- </div>
- <el-dialog title="退款明细" :visible.sync="refund.visible" width="900">
-
- <el-table :data="refund.list" ref="refundTable" height="100">
- <el-table-column prop="customerName" label="企业名称" width=200>
- </el-table-column>
- <el-table-column prop="no" label="业务单号" width=160>
- </el-table-column>
- <sa-td name="类型" type="enum" prop="type" :jv="{1: '账户充值', 2: '余额退款',3:'异常单退款'}"></sa-td>
- <el-table-column prop="refundMoney" label="金额(元)">
- </el-table-column>
- <el-table-column prop="refundTime" width="140" label="退款时间">
- </el-table-column>
- <el-table-column prop="refundBy" label="退款人">
- </el-table-column>
- <el-table-column prop="remark" label="退款原因">
- </el-table-column>
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="refund.visible = false">关 闭</el-button>
- </span>
- </el-dialog>
- </div>
- <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: {
- refund:{
- visible:false,
- list:[],
- },
-
- typeList: [
- {
- id: 0,
- name: '全部'
- },
- {
- id: 1,
- name: '账户充值'
- }, {
- id: 2,
- name: '余额退款'
- } ,{
- id: 3,
- name: '异常单退款'
- }],
- p: { // 查询参数
- type: 0,
- id: '', // 主键
- accountId: '', // 客户账户id
- customerId: '', // 客户id
- customerName: '', // 客户名称
- money: '', // 充值金额
- payMoney: '', // 支付金额
- chargeChannel: '', // 充值渠道
- createTime: '', // 充值时间
- chargePeople: '', // 充值人
- no: '', // 订单号
- beforeBalance: '', // 充值前余额
- discountMoney: '', // 优惠金额
- totalMoney: '',
- payingType: '', // 付款方式
- remark: '', // 充值说明
- preTopupMoney: '',
- reviewBy: '',
- reviewTime: '', // 复核时间
- status: '', // 有效状态,0-无效已删除、1-有效
- reviewStatus: '',
- salt: '', // 盐
- pageNo: 1, // 当前页
- pageSize: 10, // 页大小
- sortType: 0 // 排序方式
- },
- pickerOptions: {
- shortcuts: [{
- text: '最近一周',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近一个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近三个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
- picker.$emit('pick', [start, end]);
- }
- }]
- },
- reviewStatusList: [{
- id: 2,
- name: '全部'
- },
- {
- id: 0,
- name: '未复核'
- },
- {
- id: 1,
- name: '已复核'
- }
- ],
- dataCount: 0,
- dataList: [], // 数据集合
- payingTypeObj: {
- 1: "对公转账",
- 2: "微信支付",
- 3: "支付宝支付",
- 4: "银联支付"
- },
- },
- methods: {
- getDetail(data){
- Object.assign(this.refund,{
- visible:true,
- list:[data]
- })
- },
- // 刷新
- f5: function() {
- sa.ajax('/TbChargeRecord/getList', sa.removeNull(this.p), function(res) {
- this.dataList = res.data; // 数据
- this.dataCount = res.dataCount; // 数据总数
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this));
- },
- // 新增
- add: function(data) {
- sa.showIframe('新增数据', 'tb-charge-record-add.html?id=-1', '1000px', '90%');
- },
- print(data) {
- sa.showIframe('打印充值单据', 'print-receipt.html?id=' + data.id, '1000px', '70%');
- },
- //复审
- toReview(data) {
- let ss = data.preTopupMoney ? ',充值金额:' + data.preTopupMoney + '元)' : ")";
- sa.confirm('您确认对(' + data.customerName + ss + '复审吗?', function() {
- sa.ajax('/TbChargeRecord/review?id=' + data.id, function(res) {
- sa.ok('复审成功');
- this.f5();
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this))
- }.bind(this));
- },
- // 删除
- del: function(data) {
- let ss = data.preTopupMoney ? ',充值金额:' + data.preTopupMoney + '元)' : ")";
- sa.confirm('是否删除(' + data.customerName + ss + ',此操作不可撤销', function() {
- sa.ajax('/TbChargeRecord/delete?id=' + data.id, function(res) {
- sa.arrayDelete(this.dataList, data);
- sa.ok('删除成功');
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this))
- }.bind(this));
- },
- decrypt(word, keyStr) {
- if (!word) {
- return;
- }
- keyStr = keyStr || 'h!f78tr#L3D$2Z0q';
- let base64 = CryptoJS.enc.Base64.parse(word);
- let src = CryptoJS.enc.Base64.stringify(base64);
- let key = CryptoJS.enc.Utf8.parse(keyStr);
- let decrypt = CryptoJS.AES.decrypt(src, key, {
- mode: CryptoJS.mode.ECB,
- padding: CryptoJS.pad.Pkcs7
- });
- // let decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
- return CryptoJS.enc.Utf8.stringify(decrypt).toString();
- },
- },
- created: function() {
- this.f5();
- sa.onInputEnter();
- }
- })
- </script>
- </body>
- </html>
|