Explorar o código

添加财务管理、添加积分互转明细管理

chengjunhui hai 1 semana
pai
achega
b668d13680

+ 100 - 0
renren-admin/src/main/resources/statics/js/modules/qyh/commissionDetails.js

@@ -0,0 +1,100 @@
+var i = getUrlParam("id");
+$(function () {
+    $("#jqGrid").jqGrid({
+        // url: baseURL + 'qmjz/scoreStu/page',
+        postData: { id: i },
+        datatype: "json",
+        colModel: [
+            { label: 'id', name: 'id', index: 'id', width: 50, key: true, hidden: true },
+            { label: '用户', name: 'stuId', index: 'stuId', sortable: false },
+            { label: '手机号', name: 'phone', index: 'phone', sortable: false},
+            { label: '金额', name: 'commission', index: 'commission', sortable: false },
+            {
+                label: '类型', name: 'scoreType', index: 'scoreType', formatter: function (cellvalue, options, rowdata) {
+                    // for (const item of vm.transferType) {
+                    //     if (cellvalue == item.value) {
+                    //         return item.code
+                    //     }
+                    // }
+                    return ''
+                }
+            },
+            { label: '时间', name: 'createTime', index: 'createTime', sortable: false }
+        ],
+        viewrecords: true,
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        height: h,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        multiselect: false,
+        pager: "#jqGridPager",
+        jsonReader: {
+            root: "list",
+            page: "currPage",
+            total: "totalPage",
+            records: "totalCount"
+        },
+        prmNames: {
+            page: "pageNum",
+            rows: "pageSize",
+            order: "order"
+        },
+        gridComplete: function () {
+            //隐藏grid底部滚动条
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x": "hidden" });
+        },
+        loadComplete: function (data) {
+            // vm.jpgrid = data.list;
+            // console.log(data)
+        }
+    });
+
+});
+
+var vm = new Vue({
+    el: '#rrapp',
+    data: {
+        workTagConnect: {},
+        dict: null,
+        showList: true,
+        q: {
+            scoreType: '',
+            phone: '',
+            scoreEvent: '',
+            stuId: '',
+        },
+        jpgrid: {},
+    },
+
+    methods: {
+        init: function () {
+            vm.q.scoreType = '';
+            vm.q.phone = '';
+            vm.q.scoreEvent = '';
+            vm.q.stuId = '';
+
+        },
+        query: function () {
+            vm.reload(1);
+        },
+        refresh: function () {
+            vm.init();
+            vm.reload(1);
+        },
+        reload: function (event) {
+            var page;
+            if (event == 1) {
+                page = 1;
+            } else {
+                page = $("#jqGrid").jqGrid('getGridParam', 'page');
+            }
+            $("#jqGrid").jqGrid('setGridParam', {
+                postData: { 'pid': i, 'stuId': vm.q.stuId, 'phone': vm.q.phone, 'scoreEvent': vm.q.scoreEvent, 'scoreType': vm.q.scoreType },
+                page: page
+            }).trigger("reloadGrid");
+        },
+
+    }
+});

+ 102 - 0
renren-admin/src/main/resources/statics/js/modules/qyh/mutualTransferFlow.js

@@ -0,0 +1,102 @@
+var i = getUrlParam("id");
+$(function () {
+    $("#jqGrid").jqGrid({
+        // url: baseURL + 'qmjz/scoreStu/page',
+        postData: { id: i },
+        datatype: "json",
+        colModel: [
+            { label: 'id', name: 'id', index: 'id', width: 50, key: true, hidden: true },
+            { label: '用户ID', name: 'stuId', index: 'stuId', width: 80, sortable: false },
+            { label: '手机号', name: 'phone', index: 'phone', width: 80 },
+            {
+                label: '转换类型', name: 'scoreType', index: 'scoreType', width: 80, formatter: function (cellvalue, options, rowdata) {
+                    // for (const item of vm.transferType) {
+                    //     if (cellvalue == item.value) {
+                    //         return item.code
+                    //     }
+                    // }
+                    return ''
+                }
+            },
+            { label: '变动积分', name: 'scoreEvent', index: 'scoreEvent', width: 80, sortable: false },
+            { label: '变动前', name: 'beforeScoreValue', index: 'beforeScoreValue', width: 80, sortable: false },
+            { label: '变动后', name: 'afterScoreValue', index: 'afterScoreValue', width: 80, sortable: false },
+            { label: '时间', name: 'createTime', index: 'createTime', width: 80, sortable: false }
+        ],
+        viewrecords: true,
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        height: h,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        multiselect: false,
+        pager: "#jqGridPager",
+        jsonReader: {
+            root: "list",
+            page: "currPage",
+            total: "totalPage",
+            records: "totalCount"
+        },
+        prmNames: {
+            page: "pageNum",
+            rows: "pageSize",
+            order: "order"
+        },
+        gridComplete: function () {
+            //隐藏grid底部滚动条
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x": "hidden" });
+        },
+        loadComplete: function (data) {
+            // vm.jpgrid = data.list;
+            // console.log(data)
+        }
+    });
+
+});
+
+var vm = new Vue({
+    el: '#rrapp',
+    data: {
+        workTagConnect: {},
+        dict: null,
+        showList: true,
+        q: {
+            scoreType: '',
+            phone: '',
+            scoreEvent: '',
+            stuId: '',
+        },
+        jpgrid: {},
+    },
+
+    methods: {
+        init: function () {
+            vm.q.scoreType = '';
+            vm.q.phone = '';
+            vm.q.scoreEvent = '';
+            vm.q.stuId = '';
+
+        },
+        query: function () {
+            vm.reload(1);
+        },
+        refresh: function () {
+            vm.init();
+            vm.reload(1);
+        },
+        reload: function (event) {
+            var page;
+            if (event == 1) {
+                page = 1;
+            } else {
+                page = $("#jqGrid").jqGrid('getGridParam', 'page');
+            }
+            $("#jqGrid").jqGrid('setGridParam', {
+                postData: { 'pid': i, 'stuId': vm.q.stuId, 'phone': vm.q.phone, 'scoreEvent': vm.q.scoreEvent, 'scoreType': vm.q.scoreType },
+                page: page
+            }).trigger("reloadGrid");
+        },
+
+    }
+});

+ 56 - 0
renren-admin/src/main/resources/statics/js/modules/qyh/withdrawalConfig.js

@@ -0,0 +1,56 @@
+
+let vm = new Vue({
+    el:'#rrapp',
+    data:{
+        showList: false,
+        title: null,
+        wgFillInfo: {},
+        fillType:{}
+    },
+    methods: {
+        update: function () {
+            vm.showList = false;
+            vm.title = "修改";
+            var id='1';
+            vm.getInfo(id)
+        },
+        saveOrUpdate: function (event) {
+            let url = "qmgj/wgfillinfo/update";
+
+            //vm.wgFillInfo.hint = ue.getContent();
+            console.log(vm.wgFillInfo);
+            return
+
+            if ($('#imgUrl1').val() != ''){
+                vm.wgFillInfo.workFlowImg = $('#imgUrl1').val();
+            }
+            $.ajax({
+                type: "POST",
+                url: baseURL + url,
+                contentType: "application/json",
+                data: JSON.stringify(vm.wgFillInfo),
+                success: function(r){
+                    if(r.code === 0){
+                        layer.msg("操作成功", {icon: 1});
+                        vm.reload();
+                        $('#btnSaveOrUpdate').button('reset');
+                        $('#btnSaveOrUpdate').dequeue();
+                    }else{
+                        layer.alert(r.msg);
+                        $('#btnSaveOrUpdate').button('reset');
+                        $('#btnSaveOrUpdate').dequeue();
+                    }
+                }
+            });
+        },
+        getInfo: function(id){
+            $.get(baseURL + "qmgj/wgfillinfo/info/"+id, function(r){
+                vm.wgFillInfo = r.wgFillInfo;
+            });
+        },
+        reload: function (event) {
+            clearImg();
+            vm.update();
+        }
+    }
+});

+ 39 - 0
renren-admin/src/main/resources/templates/modules/qyh/commissionDetails.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<head>
+    <title>佣金明细</title>
+    <#include "/header.html">
+</head>
+<body>
+<div id="rrapp" v-cloak>
+    <div v-show="showList">
+        <div class="grid-btn">
+            <div>
+                <div class="form-group col-sm-12 div-Gay">
+                    <input type="text" class="form-control" v-model.number="q.stuId" @keyup.enter="query" placeholder="用户" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
+                    <input type="text" class="form-control" v-model="q.phone" @keyup.enter="query" placeholder="手机号" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
+                    <select id="qsex" class="form-control" v-model="q.scoreType"    @keyup.enter="query">
+                        <option  value="" hidden disabled>--转换类型--</option>
+                        <option name="type" :value="1">佣金提现</option>
+                        <option name="type" :value="2">返佣</option>
+                    </select>
+
+                    <a class="btn btn-query" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
+                    <a class="btn btn-success" @click="refresh"><i class="fa fa-refresh"></i>&nbsp;刷新</a>
+
+                </div>
+
+            </div>
+            <br>
+            <div style="height: 25px" class="wg-div-btn">
+
+    </div>
+    </div>
+    <table id="jqGrid"></table>
+    <div id="jqGridPager"></div>
+</div>
+
+</div>
+
+<script src="${request.contextPath}/statics/js/modules/qyh/commissionDetails.js?_${.now?long}"></script>
+</body>
+</html>

+ 39 - 0
renren-admin/src/main/resources/templates/modules/qyh/mutualTransferFlow.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<head>
+    <title>积分互转流水</title>
+    <#include "/header.html">
+</head>
+<body>
+<div id="rrapp" v-cloak>
+    <div v-show="showList">
+        <div class="grid-btn">
+            <div>
+                <div class="form-group col-sm-12 div-Gay">
+                    <input type="text" class="form-control" v-model.number="q.stuId" @keyup.enter="query" placeholder="用户ID" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
+                    <input type="text" class="form-control" v-model="q.phone" @keyup.enter="query" placeholder="手机号" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
+                    <select id="qsex" class="form-control" v-model="q.scoreType"    @keyup.enter="query">
+                        <option  value="" hidden disabled>--转换类型--</option>
+                        <option name="type" :value="1">赠出</option>
+                        <option name="type" :value="2">赠入</option>
+                    </select>
+
+                    <a class="btn btn-query" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
+                    <a class="btn btn-success" @click="refresh"><i class="fa fa-refresh"></i>&nbsp;刷新</a>
+
+                </div>
+
+            </div>
+            <br>
+            <div style="height: 25px" class="wg-div-btn">
+
+    </div>
+    </div>
+    <table id="jqGrid"></table>
+    <div id="jqGridPager"></div>
+</div>
+
+</div>
+
+<script src="${request.contextPath}/statics/js/modules/qyh/mutualTransferFlow.js?_${.now?long}"></script>
+</body>
+</html>

+ 36 - 0
renren-admin/src/main/resources/templates/modules/qyh/withdrawalConfig.html

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>提现配置</title>
+		<#include "/header.html">
+</head>
+<body>
+<div id="rrapp" v-cloak>
+    <div v-show="!showList" class="panel panel-default">
+        <div class="panel-heading">分润与提现配置</div>
+        <form class="form-horizontal" style="width: 80%">
+            <div class="form-group">
+                <div class="col-sm-2 control-label">直推分润比例 (%)</div>
+                <div class="col-sm-4">
+                    <input type="text" class="form-control" v-model="wgFillInfo.perYearPrice" placeholder="请输入直推分润比例" oninput="num(this)"/>
+                </div>
+            </div>
+            <div class="form-group">
+                <div class="col-sm-2 control-label">单笔最低提现金额 (¥)</div>
+                <div class="col-sm-4">
+                    <input type="text" class="form-control" v-model="wgFillInfo.lifelongPrice" placeholder="请输入单笔最低提现金额" oninput="num(this)"/>
+                </div>
+            </div>
+            <div class="form-group">
+                <div class="col-sm-2 control-label"></div>
+                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..."
+                       @click="saveOrUpdate" value="确定"/>
+                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="刷新"/>
+            </div>
+        </form>
+    </div>
+</div>
+
+<script src="${request.contextPath}/statics/js/modules/qyh/withdrawalConfig.js?_${.now?long}"></script>
+</body>
+</html>