|
@@ -0,0 +1,374 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html xmlns:th="http://www.thymeleaf.org">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <title>退款申请</title>
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
+
|
|
|
+ <!--标准mui.css-->
|
|
|
+ <link href="style/jquery-weui.css" th:href="@{/static/style/jquery-weui.css(version=${#dates.format(#calendars.createNow(),'yyyyMMdd')})}" rel="stylesheet"/>
|
|
|
+ <script th:include="weixin/common/includeJS_CSS" th:remove="tag" ></script>
|
|
|
+ <link href="style/vipcard.css" th:href="@{/static/style/vipcard.css(version=2021042510)}" rel="stylesheet"/>
|
|
|
+ <script src="js/jquery-weui.js" th:src="@{/static/js/jquery-weui.js}"></script>
|
|
|
+ <!--App自定义的css-->
|
|
|
+ <!--<link rel="stylesheet" type="text/css" href="../css/app.css" />-->
|
|
|
+ <style>
|
|
|
+ .mui-card .mui-control-content {
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+ .mui-control-content {
|
|
|
+ height: 650px;
|
|
|
+ }
|
|
|
+ .mui-control-content .lineform .type{
|
|
|
+ margin-left: 18px;
|
|
|
+ }
|
|
|
+ .me-div-text{
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+<header class="mui-bar mui-bar-nav">
|
|
|
+ <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
|
+ <h1 class="mui-title">商户退款申请</h1>
|
|
|
+</header>
|
|
|
+<div class="mui-content">
|
|
|
+ <div style="padding: 10px 10px;" id="tabTop1">
|
|
|
+ <div id="segmentedControl" class="mui-segmented-control">
|
|
|
+ <a class="mui-control-item mui-active" href="#item1">选择退款学生</a>
|
|
|
+ <a class="mui-control-item" href="#item2">其他信息</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="itemNext1">
|
|
|
+ <div id="item1" class="mui-control-content mui-active">
|
|
|
+ <div id="pullrefresh" class="mui-scroll-wrapper">
|
|
|
+ <div class="mui-scroll">
|
|
|
+ <ul class="mui-table-view" id="studentPull">
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="item2" class="mui-control-content vipcard panel">
|
|
|
+ <div class="mui-card">
|
|
|
+ <div th:if="${orderNo ne '1'}">
|
|
|
+ <div class="lineform self">
|
|
|
+ <div class="dc_flex">
|
|
|
+ <div class="type">订单号(原路径退回)</div>
|
|
|
+ <div class="dc_hd">[[${orderNo}]]</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="lineform self">
|
|
|
+ <div class="dc_flex">
|
|
|
+ <div class="type">订单总金额</div>
|
|
|
+ <div class="dc_hd">[[${price}]]</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="lineform self">
|
|
|
+ <div class="dc_flex">
|
|
|
+ <div class="type">订单端口数</div>
|
|
|
+ <div class="dc_hd">[[${libService}]]</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="lineform self">
|
|
|
+ <div class="dc_flex">
|
|
|
+ <div class="type">退款总月数</div>
|
|
|
+ <div class="dc_hd">[[${backMonth}]]</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="lineform self">
|
|
|
+ <div class="dc_flex">
|
|
|
+ <div class="type">预计退款金额</div>
|
|
|
+ <div class="dc_hd" >
|
|
|
+ <input type="text" placeholder="实际退款金额以审核后的金额为准" id="showPrice" name="backPrice" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div th:if="${orderNo eq '1'}" class="mui-card">
|
|
|
+ <div class="lineform self">
|
|
|
+ <div class="dc_flex">
|
|
|
+ <div class="type">收款人姓名</div>
|
|
|
+ <div class="dc_hd"><input type="text" name="yourName" id="yourName" placeholder="填写收款人真实姓名"/></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="lineform self">
|
|
|
+ <div class="dc_flex">
|
|
|
+ <div class="type">开户行信息</div>
|
|
|
+ <div class="dc_hd"><input type="text" name="openBank" id="openBank" placeholder="填写开户行信息"/></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="lineform self" id="self">
|
|
|
+ <div class="dc_flex">
|
|
|
+ <div class="type">收款人银行账号</div>
|
|
|
+ <div class="dc_hd"><input type="text" name="bankAccount" id="bankAccount" placeholder="填写收款人银行账号"/></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--退费原因 -->
|
|
|
+ <div class="mui-card">
|
|
|
+ <div class="me-div-text">退费原因</div>
|
|
|
+ <form class="mui-input-group">
|
|
|
+ <div class="mui-input-row mui-checkbox mui-left">
|
|
|
+ <label>没效果</label>
|
|
|
+ <input name="checkbox" value="没效果" type="checkbox" >
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row mui-checkbox mui-left">
|
|
|
+ <label>体验不好</label>
|
|
|
+ <input name="checkbox" value="体验不好" type="checkbox" checked>
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row mui-checkbox mui-left">
|
|
|
+ <label>孩子不愿意使用</label>
|
|
|
+ <input name="checkbox" type="checkbox" value="孩子不愿意使用">
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row mui-checkbox mui-left">
|
|
|
+ <label>特殊安排不需要(出国、转学等)</label>
|
|
|
+ <input name="checkbox" type="checkbox" value="特殊安排不需要(出国、转学等)">
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row mui-checkbox mui-left">
|
|
|
+ <label>其他</label>
|
|
|
+ <input name="checkbox" type="checkbox" value="其他">
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row mui-left mui-hidden" id="otherDiv">
|
|
|
+ <input name="other" type="text" value="" id="otherValueId" placeholder="输入其他原因">
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="panelbttom">
|
|
|
+ <a href="javascript:save();" id="save" class="btn-blue">确定</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<script id="list_tpl" type="text/html">
|
|
|
+ {{# if(d.list!=null && d.list.length > 0){ }}
|
|
|
+ {{# for(var i = 0, len = d.list.length; i < len; i++){ }}
|
|
|
+ <li class="mui-table-view-cell mui-checkbox mui-left">
|
|
|
+ <input type="checkbox" name="childCheckbox" value="{{d.list[i].id}}" />孩子姓名:{{=d.list[i].childName}}
|
|
|
+ </li>
|
|
|
+ {{# } }}
|
|
|
+ {{# } }}
|
|
|
+</script>
|
|
|
+<script>
|
|
|
+ mui.init({
|
|
|
+ swipeBack: true, //启用右滑关闭功能
|
|
|
+ pullRefresh: {
|
|
|
+ container: '#pullrefresh',
|
|
|
+ up: {
|
|
|
+ contentrefresh: '正在加载...',
|
|
|
+ callback: pullupRefresh,
|
|
|
+ contentnomore:'没有更多数据了',//可选,请求完毕若没有更多数据时显示
|
|
|
+ auto:true //页面加载完就加载一次
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // (function($) {
|
|
|
+ // $('#scroll').scroll({
|
|
|
+ // indicators: true //是否显示滚动条
|
|
|
+ // });
|
|
|
+ // })(mui);
|
|
|
+
|
|
|
+
|
|
|
+ var pageVal = 0;
|
|
|
+ var totalPage = 1;
|
|
|
+ var countVal = 10;
|
|
|
+ var libId = '[[${libId}]]';
|
|
|
+ var unitPrice = '[[${unitPrice}]]';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 上拉加载具体业务实现
|
|
|
+ */
|
|
|
+ function pullupRefresh() {
|
|
|
+ setTimeout(function() {
|
|
|
+ mui('#pullrefresh').pullRefresh().endPullupToRefresh((pageVal++ > totalPage -1)); //参数为true代表没有更多数据了。
|
|
|
+
|
|
|
+
|
|
|
+ var paramVal = {pageNo:pageVal,pageSize:countVal,libId:libId};
|
|
|
+
|
|
|
+
|
|
|
+ loadData(paramVal);
|
|
|
+
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ // mui.ready(function() {
|
|
|
+ // mui('#studentPull').pullRefresh().pullupLoading();
|
|
|
+ // });
|
|
|
+
|
|
|
+ // mui.later(function(){
|
|
|
+ // mui('#studentPull').pullRefresh();
|
|
|
+ // console.log('定位到进入详情的页面');
|
|
|
+ // },500);
|
|
|
+
|
|
|
+ mui("body").on('tap','.list span',function(event){
|
|
|
+ this.click();
|
|
|
+ });
|
|
|
+ mui('.mui-content').on('tap','#save',function(){document.location.href=this.href;});
|
|
|
+
|
|
|
+ mui('#studentPull').on('change', 'input', function() {
|
|
|
+ var list = document.getElementById('studentPull');
|
|
|
+ var count = list.querySelectorAll('input[type="checkbox"]:checked').length;
|
|
|
+ $("#showPrice").val((Number(count)*Number(unitPrice)).toFixed(2));
|
|
|
+ });
|
|
|
+
|
|
|
+ mui('.mui-input-group').on('change', 'input', function() {
|
|
|
+ if(this.value == '其他'){
|
|
|
+ var done = document.getElementById("otherDiv");
|
|
|
+ if (this.checked) {
|
|
|
+ if (done.classList.contains("mui-hidden")) {
|
|
|
+ done.classList.remove("mui-hidden");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!done.classList.contains("mui-hidden")) {
|
|
|
+ done.classList.add("mui-hidden");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //加载数据
|
|
|
+ function loadData(params){
|
|
|
+ setTimeout(function () {
|
|
|
+ mui.ajax('[[@{/weixin/adminsale/getLibStudentList}]]',{
|
|
|
+ data:params,
|
|
|
+ dataType:'json',
|
|
|
+ type:'POST',
|
|
|
+ success:function(data){
|
|
|
+ if(data && data.code == 999){
|
|
|
+ if(data.data.totalSize > 0){
|
|
|
+ var table = document.getElementById("studentPull")
|
|
|
+ var listTpl = document.getElementById("list_tpl").innerHTML;
|
|
|
+
|
|
|
+ if(data.data.pageNo == 1){
|
|
|
+ laytpl(listTpl).render(data.data, function(html){
|
|
|
+ table.innerHTML = html;
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ laytpl(listTpl).render(data.data, function(html){
|
|
|
+ table.insertAdjacentHTML('beforeEnd', html);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ var rowCount = data.data.totalSize;
|
|
|
+
|
|
|
+ if ((rowCount % countVal) == 0) {
|
|
|
+ totalPage = rowCount / countVal;
|
|
|
+ } else {
|
|
|
+ totalPage = parseInt((rowCount / countVal)) + 1;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error : function() {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, 200);
|
|
|
+ }
|
|
|
+
|
|
|
+ function save(){
|
|
|
+ var orderNo = '[[${orderNo}]]';
|
|
|
+ if(orderNo == '1'){
|
|
|
+ //需要填写银行信息
|
|
|
+ var yourName = $('#yourName').val();
|
|
|
+ if(yourName == ''){
|
|
|
+ $.toast("填写收款人真实姓名","cancel");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var openBank = $('#openBank').val();
|
|
|
+ if(openBank == ''){
|
|
|
+ $.toast("填写开户行信息","cancel");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var bankAccount = $('#bankAccount').val();
|
|
|
+ if(bankAccount == ''){
|
|
|
+ $.toast("填写收款人银行账号","cancel");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var checkedValues = checkValue();
|
|
|
+ if(checkedValues.length==0){
|
|
|
+ $.toast("请选择需要退费的学生","cancel");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var otherValue = checkOtherValue();
|
|
|
+ var otherInput = $("#otherValueId").val();
|
|
|
+ if(otherValue.indexOf("其他")>0){
|
|
|
+ if(otherInput === ''){
|
|
|
+ $.toast("请输入其他原因","cancel");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $('#save').attr('href','javascript:void(0);');
|
|
|
+ var url ="[[${sysUrl}]]/weixin/adminsale/saveRefundInfo";
|
|
|
+ var params;
|
|
|
+ if(orderNo == '1'){
|
|
|
+ params ={
|
|
|
+ 'id' : '[[${id}]]',
|
|
|
+ 'orderNo' : '[[${orderNo}]]',
|
|
|
+ 'yourName' : yourName,
|
|
|
+ 'openBank' : openBank,
|
|
|
+ 'bankAccount' : bankAccount,
|
|
|
+ 'otherValue' : otherValue,
|
|
|
+ 'otherInput' : otherInput,
|
|
|
+ 'vipIds' : checkedValues,
|
|
|
+ };
|
|
|
+ }else{
|
|
|
+ params ={
|
|
|
+ 'id' : '[[${id}]]',
|
|
|
+ 'orderNo' : '[[${orderNo}]]',
|
|
|
+ 'otherValue' : otherValue,
|
|
|
+ 'otherInput' : otherInput,
|
|
|
+ 'vipIds' : checkedValues
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ $.post(url,params,function(data){
|
|
|
+ if (data.code == 999) {
|
|
|
+ $.toast(data.msg,"ok");
|
|
|
+ var jumpUrl ="[[${sysUrl}]]/weixin/adminsale/refundOrderIndex?libId="+libId;
|
|
|
+ location.replace(jumpUrl);
|
|
|
+ event.returnValue=false;
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ $.toast(data.msg,"cancel");
|
|
|
+ $('#save').attr('href','javascript:save();');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function checkValue() {
|
|
|
+ var list = document.getElementById('studentPull');
|
|
|
+ var checkboxArray = [].slice.call(list.querySelectorAll('input[type="checkbox"]'));
|
|
|
+ var checkedValues = [];
|
|
|
+ checkboxArray.forEach(function(box) {
|
|
|
+ if (box.checked) {
|
|
|
+ checkedValues.push(box.value);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return checkedValues;
|
|
|
+ }
|
|
|
+ function checkOtherValue() {
|
|
|
+ var list = document.getElementsByClassName("mui-input-group").item(0);
|
|
|
+ var checkboxArray = [].slice.call(list.querySelectorAll('input[type="checkbox"]'));
|
|
|
+ var checkedValues = [];
|
|
|
+ checkboxArray.forEach(function(box) {
|
|
|
+ if (box.checked) {
|
|
|
+ checkedValues.push(box.value);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return checkedValues;
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|