mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 22:43:25 +08:00
【新增】后台提现审核功能增加【企业付款到零钱】【企业付款到银行卡】
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
<script type="text/html" template lay-done="layui.data.done(d);">
|
||||
<table class="layui-table layui-form" lay-filter="LAY-app-CoreCmsUserTocash-detailsForm" id="LAY-app-CoreCmsUserTocash-detailsForm">
|
||||
<colgroup>
|
||||
<col width="100">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="id">id</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.id || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="userId">用户ID</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.userId || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="money">提现金额</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.money || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="bankName">银行名称</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.bankName || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="bankCode">银行缩写</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.bankCode || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="bankAreaId">账号地区ID</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.bankAreaId || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="accountBank">开户行</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.accountBank || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="accountName">账户名</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.accountName || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="cardNumber">卡号</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.cardNumber || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="withdrawals">提现服务费</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.withdrawals || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="status">提现状态</label>
|
||||
</td>
|
||||
<td>
|
||||
{{# layui.each(indexData.userTocashStatus, function(index, item){ }}
|
||||
{{# if (d.params.data.model.status===item.value) {}}
|
||||
{{ item.title }}
|
||||
{{# }}}
|
||||
{{# }); }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="createTime">创建时间</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.createTime || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="updateTime">更新时间</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.updateTime || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="type">提现方式</label>
|
||||
</td>
|
||||
<td>
|
||||
{{# layui.each(indexData.userTocashType, function(index, item){ }}
|
||||
{{# if (d.params.data.model.type===item.value) {}}
|
||||
{{ item.title }}
|
||||
{{# }}}
|
||||
{{# }); }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="message">反馈结果</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ d.params.data.model.message || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
<script>
|
||||
var debug = layui.setter.debug;
|
||||
layui.data.done = function (d) {
|
||||
//开启调试情况下获取接口赋值数据
|
||||
if (debug) { console.log(d.params.data); }
|
||||
|
||||
layui.use(['admin', 'form', 'coreHelper'], function () {
|
||||
var $ = layui.$
|
||||
, setter = layui.setter
|
||||
, admin = layui.admin
|
||||
, coreHelper = layui.coreHelper
|
||||
, form = layui.form;
|
||||
form.render(null, 'LAY-app-CoreCmsUserTocash-detailsForm');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,74 @@
|
||||
<script type="text/html" template lay-done="layui.data.sendParams(d);">
|
||||
<div class="layui-form coreshop-form layui-form-pane" lay-filter="LAY-app-CoreCmsUserTocash-editForm" id="LAY-app-CoreCmsUserTocash-editForm">
|
||||
<input type="hidden" name="id" value="{{d.params.data.model.id }}" />
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label for="type" class="layui-form-label layui-form-required">提现方式</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="type" lay-verify="required|number" lay-reqText="请选择提现方式" lay-filter="selectType">
|
||||
<option value="">请选择提现方式</option>
|
||||
{{# layui.each(indexData.userTocashType, function(index, item){ }}
|
||||
<option value="{{ item.value }}">{{ item.title }}</option>
|
||||
{{# }); }}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" id="selectStatusBox">
|
||||
<label for="type" class="layui-form-label layui-form-required">审核状态</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="status" lay-verify="required|number" lay-reqText="请选择审核状态">
|
||||
{{# layui.each(indexData.userTocashStatus, function(index, item){ }}
|
||||
<option value="{{ item.value }}" {{item.value===d.params.data.model.status?'selected="selected"':''}}>{{ item.title }}</option>
|
||||
{{# }); }}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-mid">
|
||||
注:<br />
|
||||
1、微信提现需微信支付商户开通了企业付款到零钱功能。<br />
|
||||
2、只有【提现方式】为【银行卡】,才可主动设置成功失败。<br />
|
||||
3、微信提现方式下,将依据请求微信api接口返回信息,进行状态处理。<br />
|
||||
4、【微信提现付款到零钱】【微信提现付款到银行卡】再有异常的情况下,都可继续进行新的处理,可能会存在网络,微信支付商户余额,用户填写的银行卡信息错误等。<br />
|
||||
5、【微信提现付款到银行卡】需要配置【RsaPublicKey】,请自行添加,不然会报异常。
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item text-right core-hidden">
|
||||
<input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-CoreCmsUserTocash-editForm-submit" id="LAY-app-CoreCmsUserTocash-editForm-submit" value="确认提现">
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
var debug = layui.setter.debug;
|
||||
layui.data.sendParams = function (d) {
|
||||
//开启调试情况下获取接口赋值数据
|
||||
if (debug) { console.log(d.params.data); }
|
||||
layui.use(['admin', 'form', 'laydate', 'upload', 'coreHelper', 'cropperImg'],
|
||||
function () {
|
||||
var $ = layui.$
|
||||
, form = layui.form
|
||||
, admin = layui.admin
|
||||
, laydate = layui.laydate
|
||||
, upload = layui.upload
|
||||
, cropperImg = layui.cropperImg
|
||||
, coreHelper = layui.coreHelper;
|
||||
|
||||
$('#selectStatusBox').hide();
|
||||
|
||||
form.on('select(selectType)', function (data) {
|
||||
console.log(data.value); //复选框value值,也可以通过data.elem.value得到
|
||||
if (data.value === '0') {
|
||||
$('#selectStatusBox').show();
|
||||
} else {
|
||||
$('#selectStatusBox').hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//重载form
|
||||
form.render(null, 'LAY-app-CoreCmsUserTocash-editForm');
|
||||
})
|
||||
};
|
||||
</script>
|
||||
@@ -31,9 +31,19 @@
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<select name="status" id="status" lay-filter="conditionCode">
|
||||
<select name="status">
|
||||
<option value="">请选择提现状态</option>
|
||||
{{# layui.each(indexData.userTocashTypes, function(index, item){ }}
|
||||
{{# layui.each(indexData.userTocashStatus, function(index, item){ }}
|
||||
<option value="{{ item.value }}">{{ item.title }}</option>
|
||||
{{# }); }}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<select name="type">
|
||||
<option value="">请选择提现方式</option>
|
||||
{{# layui.each(indexData.userTocashType, function(index, item){ }}
|
||||
<option value="{{ item.value }}">{{ item.title }}</option>
|
||||
{{# }); }}
|
||||
</select>
|
||||
@@ -58,6 +68,16 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/html" id="LAY-app-CoreCmsUserTocash-tableBox-bar">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
{{# if(d.status === 1 || d.status === 4) { }}
|
||||
<a class="layui-btn layui-btn-xs" lay-event="getTocash">处理</a>
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var indexData;
|
||||
var debug = layui.setter.debug;
|
||||
@@ -78,7 +98,7 @@
|
||||
, util = layui.util
|
||||
, view = layui.view;
|
||||
|
||||
|
||||
|
||||
//重载form
|
||||
form.render();
|
||||
var searchwhere;
|
||||
@@ -109,20 +129,20 @@
|
||||
{ type: "checkbox", fixed: "left" },
|
||||
{ field: 'id', title: 'ID号', width: 60, sort: false },
|
||||
{
|
||||
field: 'userNickName', title: '用户', sort: false, width: 105, templet: function (d) {
|
||||
field: 'userNickName', title: '用户', sort: false, width: 200, templet: function (d) {
|
||||
return d.userNickName + '(' + d.userId + ')';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'operating', title: '操作', width: 100, align: 'center', templet: function (data) {
|
||||
var html = '';
|
||||
if (data.status == 1) {
|
||||
html += '<a class="layui-btn layui-btn-xs option-yes" data-type="2" data-id="' + data.id + '">通过</a>';
|
||||
html += '<a class="layui-btn layui-btn-danger layui-btn-xs option-no" data-type="3" data-id="' + data.id + '" >驳回</a>';
|
||||
}
|
||||
return html;
|
||||
}
|
||||
},
|
||||
//{
|
||||
// field: 'operating', title: '操作', width: 100, align: 'center', templet: function (data) {
|
||||
// var html = '';
|
||||
// if (data.status == 1) {
|
||||
// html += '<a class="layui-btn layui-btn-xs option-yes" data-type="2" data-id="' + data.id + '">通过</a>';
|
||||
// html += '<a class="layui-btn layui-btn-danger layui-btn-xs option-no" data-type="3" data-id="' + data.id + '" >驳回</a>';
|
||||
// }
|
||||
// return html;
|
||||
// }
|
||||
//},
|
||||
{ field: 'money', title: '提现金额', sort: false, width: 80, templet: function (data) { return '¥' + data.money } },
|
||||
{ field: 'bankName', title: '银行名称', sort: false, width: 105 },
|
||||
{ field: 'bankCode', title: '银行缩写', sort: false, width: 65 },
|
||||
@@ -133,9 +153,9 @@
|
||||
{ field: 'withdrawals', title: '提现服务费', sort: false, width: 85 },
|
||||
{
|
||||
field: 'status', title: '提现状态', sort: false, width: 65, templet: function (data) {
|
||||
for (var i = 0; i < d.data.userTocashTypes.length; i++) {
|
||||
if (data.status == d.data.userTocashTypes[i].value) {
|
||||
return d.data.userTocashTypes[i].title;
|
||||
for (var i = 0; i < d.data.userTocashStatus.length; i++) {
|
||||
if (data.status == d.data.userTocashStatus[i].value) {
|
||||
return d.data.userTocashStatus[i].title;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
@@ -143,6 +163,8 @@
|
||||
},
|
||||
{ field: 'createTime', title: '创建时间', width: 130, sort: false },
|
||||
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
||||
{ width: 120, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsUserTocash-tableBox-bar' },
|
||||
{ field: 'message', title: '反馈信息', width: 130, sort: false },
|
||||
]
|
||||
]
|
||||
});
|
||||
@@ -173,8 +195,57 @@
|
||||
function (obj) {
|
||||
if (obj.event === 'detail') {
|
||||
doDetails(obj);
|
||||
} else if (obj.event === 'getTocash') {
|
||||
getTocash(obj)
|
||||
}
|
||||
});
|
||||
|
||||
//执行提现操作
|
||||
function getTocash(obj) {
|
||||
coreHelper.Post("Api/CoreCmsUserTocash/GetTocash", { id: obj.data.id }, function (e) {
|
||||
if (e.code === 0) {
|
||||
admin.popup({
|
||||
shadeClose: false,
|
||||
title: '提现操作',
|
||||
area: ['400px', '400px'],
|
||||
id: 'LAY-popup-CoreCmsUserTocash-edit',
|
||||
success: function (layero, index) {
|
||||
view(this.id).render('financial/usertocash/edit', { data: e.data }).done(function () {
|
||||
//监听提交
|
||||
form.on('submit(LAY-app-CoreCmsUserTocash-editForm-submit)',
|
||||
function (data) {
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
|
||||
|
||||
if (debug) { console.log(field); } //开启调试返回数据
|
||||
//提交 Ajax 成功后,关闭当前弹层并重载表格
|
||||
coreHelper.Post("Api/CoreCmsUserTocash/SetStatus", field, function (e) {
|
||||
console.log(e)
|
||||
if (e.code === 0) {
|
||||
layui.table.reloadData('LAY-app-CoreCmsUserTocash-tableBox'); //重载表格
|
||||
layer.close(index); //再执行关闭
|
||||
layer.msg(e.msg);
|
||||
} else {
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
// 禁止弹窗出现滚动条
|
||||
$(layero).children('.layui-layer-content').css('overflow', 'visible');
|
||||
}
|
||||
, btn: ['确定', '取消']
|
||||
, yes: function (index, layero) {
|
||||
layero.contents().find("#LAY-app-CoreCmsUserTocash-editForm-submit").click();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//执行预览操作
|
||||
function doDetails(obj) {
|
||||
coreHelper.Post("Api/CoreCmsUserTocash/GetDetails", { id: obj.data.id }, function (e) {
|
||||
@@ -182,10 +253,10 @@
|
||||
admin.popup({
|
||||
shadeClose: false,
|
||||
title: '查看详情',
|
||||
area: ['600px', '400px'],
|
||||
area: ['600px', '500px'],
|
||||
id: 'LAY-popup-CoreCmsUserTocash-details',
|
||||
success: function (layero, index) {
|
||||
view(this.id).render('base/CoreCmsUserTocash/details', { data: e.data }).done(function () {
|
||||
view(this.id).render('financial/usertocash/details', { data: e.data }).done(function () {
|
||||
form.render();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user