门店钱包提现,审核

This commit is contained in:
19173159168
2025-08-24 15:09:12 +08:00
parent 2faf33fcde
commit 6bd15e4627
22 changed files with 470 additions and 68 deletions

View File

@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="changeType" column="change_type" />
<result property="changeStatus" column="change_status" />
<result property="payType" column="pay_type" />
<result property="changeTime" column="change_time" />
<result property="changeAmount" column="change_amount" />
@ -16,31 +17,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="userName" column="userName" />
<association property="companyStore" javaType="CompanyStore">
<result property="id" column="store_id" />
<result property="name" column="store_name" />
<result property="contactPerson" column="store_contact_person" />
<result property="phone" column="store_phone" />
<result property="operatingNature" column="store_operating_nature" />
<result property="zucheRatio" column="store_zuche_ratio" />
<result property="zudianRatio" column="store_zudian_ratio" />
<result property="daishouRatio" column="store_daishou_ratio" />
<result property="storeNumber" column="store_store_number" />
</association>
</resultMap>
<sql id="selectZcBaseWalletChangeVo">
select id, user_id, change_type, pay_type, change_time, change_amount, referral_order_no, del_flag, create_time, update_time from zc_base_wallet_change
select a.id, a.user_id, a.change_type, a.change_status, a.pay_type, a.change_time, a.change_amount, a.referral_order_no, a.del_flag, a.create_time, a.update_time,
s.id as store_id,
s.name as store_name,
s.contact_person as store_contact_person,
s.phone as store_phone,
s.operating_nature as store_operating_nature,
s.zuche_ratio as store_zuche_ratio,
s.zudian_ratio as store_zudian_ratio,
s.daishou_ratio as store_daishou_ratio,
s.store_number as store_store_number
from zc_base_wallet_change a
left join zc_company_store s on a.user_id = s.id
</sql>
<select id="selectZcBaseWalletChangeList" parameterType="ZcBaseWalletChange" resultMap="ZcBaseWalletChangeResult">
select a.id, a.user_id, a.change_type, a.pay_type, a.change_time, a.change_amount, a.referral_order_no, a.del_flag, a.create_time, a.update_time,
b.user_name as userName
from zc_base_wallet_change a
left join zc_base_user b on a.user_id = b.id
<include refid="selectZcBaseWalletChangeVo"/>
<where>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="changeType != null and changeType != ''"> and a.change_type = #{changeType}</if>
<if test="changeStatus != null and changeStatus != ''"> and a.change_status = #{changeStatus}</if>
<if test="payType != null and payType != ''"> and a.pay_type = #{payType}</if>
<if test="changeTime != null "> and a.change_time = #{changeTime}</if>
<if test="changeAmount != null "> and a.change_amount = #{changeAmount}</if>
<if test="referralOrderNo != null and referralOrderNo != ''"> and a.referral_order_no = #{referralOrderNo}</if>
<if test="userName != null and userName != ''"> and b.user_name = #{userName}</if>
<if test="userName != null and userName != ''"> and s.name = #{userName}</if>
</where>
order by a.update_time desc
</select>
<select id="selectZcBaseWalletChangeById" parameterType="Long" resultMap="ZcBaseWalletChangeResult">
<include refid="selectZcBaseWalletChangeVo"/>
where id = #{id}
where a.id = #{id}
</select>
<insert id="insertZcBaseWalletChange" parameterType="ZcBaseWalletChange" useGeneratedKeys="true" keyProperty="id">
@ -74,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="changeType != null and changeType != ''">change_type = #{changeType},</if>
<if test="changeStatus != null and changeStatus != ''">change_status = #{changeStatus},</if>
<if test="payType != null and payType != ''">pay_type = #{payType},</if>
<if test="changeTime != null">change_time = #{changeTime},</if>
<if test="changeAmount != null">change_amount = #{changeAmount},</if>
@ -84,6 +108,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</update>
<update id="review">
update zc_base_wallet_change
<set>
<if test="changeStatus != null and changeStatus != ''">change_status = #{changeStatus},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</set>
where id = #{id}
</update>
<delete id="deleteZcBaseWalletChangeById" parameterType="Long">
delete from zc_base_wallet_change where id = #{id}

View File

@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="sub_id" />
<result property="userId" column="sub_user_id" />
<result property="changeType" column="sub_change_type" />
<result property="changeStatus" column="sub_change_status" />
<result property="payType" column="sub_pay_type" />
<result property="changeTime" column="sub_change_time" />
<result property="changeAmount" column="sub_change_amount" />
@ -50,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectZcBaseWalletByUserId" parameterType="Long" resultMap="ZcBaseWalletZcBaseWalletChangeResult">
select a.user_id, a.user_name, a.phone_number, a.balance, a.available_amount, a.freeze_amount, a.del_flag, a.create_time, a.update_time,
b.id as sub_id, b.user_id as sub_user_id, b.change_type as sub_change_type, b.pay_type as sub_pay_type, b.change_time as sub_change_time, b.change_amount as sub_change_amount, b.referral_order_no as sub_referral_order_no, b.del_flag as sub_del_flag, b.create_time as sub_create_time, b.update_time as sub_update_time
b.id as sub_id, b.user_id as sub_user_id, b.change_type as sub_change_type, b.change_status as sub_change_status, b.pay_type as sub_pay_type, b.change_time as sub_change_time, b.change_amount as sub_change_amount, b.referral_order_no as sub_referral_order_no, b.del_flag as sub_del_flag, b.create_time as sub_create_time, b.update_time as sub_update_time
from zc_base_wallet a
left join zc_base_wallet_change b on b.user_id = a.user_id
where a.user_id = #{userId}
@ -124,4 +125,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</insert>
<!-- 减少钱包金额 -->
<update id="reduceWalletAmount">
UPDATE zc_base_wallet
SET
available_amount = available_amount - #{amount},
balance = balance - #{amount},
update_time = NOW()
WHERE user_id = #{userId}
AND available_amount >= #{amount}
AND balance >= #{amount}
</update>
</mapper>

View File

@ -46,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="operatorName" column="operator_name" />
<result property="storeName" column="store_name" />
<result property="licensePlate" column="license_plate" />
<result property="distribed" column="distribed" />
</resultMap>
<resultMap id="ZcOrderMainZcOrderSubResult" type="ZcOrderMain" extends="ZcOrderMainResult">
@ -87,11 +88,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectZcOrderMainVo">
select order_id, order_no, order_status, operator_id, store_id, vehicle_id, car_model_id, customer_id, customer_name, customer_phone, battery_type, rental_type, rental_days, rental_price, deposit_price, overdue_fee, overdue_type, is_deposit_free, is_auto_deduct, first_order_time, pick_car_time, start_rent_time, end_rent_time, req_end_rent_time, act_end_rent_time, overdue_days, renewal_times, charge_times, rent_car_rule_id, rent_battey_rule_id, damage_amount,damage_desc, order_amount, overdue_amount, end_order_time, del_flag, create_time, update_time from zc_order_main
select order_id, order_no, order_status, operator_id, store_id, vehicle_id, car_model_id, customer_id, customer_name, customer_phone, battery_type, rental_type, rental_days, rental_price, deposit_price, overdue_fee, overdue_type, is_deposit_free, is_auto_deduct, first_order_time, pick_car_time, start_rent_time, end_rent_time, req_end_rent_time, act_end_rent_time, overdue_days, renewal_times, charge_times, rent_car_rule_id, rent_battey_rule_id, damage_amount,damage_desc, order_amount, overdue_amount, end_order_time, distribed, del_flag, create_time, update_time from zc_order_main
</sql>
<select id="selectZcOrderMainList" parameterType="ZcOrderMain" resultMap="ZcOrderMainResult">
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc, a.order_amount, a.overdue_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc, a.order_amount, a.overdue_amount, a.end_order_time,a.distribed, a.del_flag, a.create_time, a.update_time,
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate
from zc_order_main a
left join zc_company c on c.id = a.operator_id
@ -133,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectZcOrderMainByOrderId" parameterType="Long" resultMap="ZcOrderMainZcOrderSubResult">
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc,a.order_amount, a.overdue_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc,a.order_amount, a.overdue_amount, a.end_order_time, a.distribed, a.del_flag, a.create_time, a.update_time,
b.suborder_id as sub_suborder_id, b.order_id as sub_order_id, b.suborder_no as sub_suborder_no, b.suborder_type as sub_suborder_type, b.amount as sub_amount, b.payment_method as sub_payment_method, b.vin_battery_no as sub_vin_battery_no, b.created_at as sub_created_at, b.payment_id as sub_payment_id, b.paid_at as sub_paid_at, b.pay_status as sub_pay_status,b.transaction_id as sub_transaction_id, b.remark as sub_remark, b.del_flag as sub_del_flag, b.create_time as sub_create_time, b.update_time as sub_update_time,
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate,
i.id as sub_id, i.order_id as sub_order_id, i.order_no as sub_order_no, i.img_type as sub_img_type, i.img_url as sub_img_url, i.create_time as sub_create_time, i.update_time as sub_update_time
@ -147,7 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectZcOrderMainImgByOrderId" parameterType="Long" resultMap="ZcOrderMainZcOrderCarImgResult">
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc,a.order_amount, a.overdue_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc,a.order_amount, a.overdue_amount, a.end_order_time, a.distribed, a.del_flag, a.create_time, a.update_time,
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate,
i.id as sub_id, i.order_id as sub_order_id, i.order_no as sub_order_no, i.img_type as sub_img_type, i.img_url as sub_img_url, i.create_time as sub_create_time, i.update_time as sub_update_time
from zc_order_main a

View File

@ -20,7 +20,7 @@
<h4 class="form-header h4">钱包信息</h4>
<input name="userId" th:field="*{userId}" type="hidden">
<div class="form-group">
<label class="col-sm-2 control-label is-required">用户名</label>
<label class="col-sm-2 control-label is-required">门店名称</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{userName}"></div>
</div>
@ -60,7 +60,7 @@
<script th:inline="javascript">
var prefix = ctx + "baseUser/wallet";
var changeTypeDatas = [[${@dict.getType('key_wallet_change_type')}]];
var payTypeDatas = [[${@dict.getType('key_wallet_pay_type')}]];
var changeStatusDatas = [[${@dict.getType('key_wallet_change_status')}]];
$("#form-wallet-edit").validate({
focusCleanup: true
});
@ -100,16 +100,6 @@
return $.table.selectDictLabel(changeTypeDatas, value);
}
},
{
field: 'payType',
align: 'center',
title: '支付类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(payTypeDatas, value);
}
},
{
field: 'changeTime',
align: 'center',
@ -128,9 +118,11 @@
title: '引荐订单'
},
{
field: 'createTime',
align: 'center',
title: '操作时间'
field: 'changeStatus',
title: '申请状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(changeStatusDatas, value);
}
},
{

View File

@ -11,7 +11,7 @@
<div class="select-list">
<ul>
<li>
<label>用户名</label>
<label>门店名称</label>
<input type="text" name="userName"/>
</li>
<li>

View File

@ -8,33 +8,27 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-walletChange-edit" th:object="${zcBaseWalletChange}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户id</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">变更时间:</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">提现门店</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="changeTime" th:value="${#dates.format(zcBaseWalletChange.changeTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<div class="form-control-static" th:text="*{companyStore.name}"></div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">变更金额(元)</label>
<div class="col-sm-8">
<input name="changeAmount" th:field="*{changeAmount}" class="form-control" type="text" required>
<div class="form-control-static" th:text="*{changeAmount}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">引荐订单</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">密码确认</label>
<div class="col-sm-8">
<input name="referralOrderNo" th:field="*{referralOrderNo}" class="form-control" type="text">
<input id="password" name="password" class="form-control" type="password" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />

View File

@ -10,10 +10,18 @@
<form id="formId">
<div class="select-list">
<ul>
<input type="hidden" name="changeType" th:field="*{zcBaseWalletChange.changeType}"/>
<li>
<label>用户</label>
<label>门店名称</label>
<input type="text" name="userName"/>
</li>
<li>
<label>申请状态:</label>
<select name="changeStatus" th:with="type=${@dict.getType('key_wallet_change_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -47,7 +55,10 @@
var editFlag = [[${@permission.hasPermi('baseUser:walletChange:edit')}]];
var removeFlag = [[${@permission.hasPermi('baseUser:walletChange:remove')}]];
var changeTypeDatas = [[${@dict.getType('key_wallet_change_type')}]];
var payTypeDatas = [[${@dict.getType('key_wallet_pay_type')}]];
var changeStatusDatas = [[${@dict.getType('key_wallet_change_status')}]];
var labelDatas = [[${@dict.getType('key_store_level')}]];
var operatingNatureDatas = [[${@dict.getType('key_store_operating_nature')}]];
var prefix = ctx + "baseUser/walletChange";
$(function() {
@ -57,7 +68,7 @@
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "钱包变更记录",
modalName: "钱包变更",
columns: [{
checkbox: true
},
@ -67,48 +78,222 @@
visible: false
},
{
field: 'userName',
title: '用户'
field: 'companyStore.storeNumber',
title: '门店编码'
},
{
field: 'companyStore.name',
title: '门店名称'
},
{
field: 'companyStore.operatingNature',
title: '运营性质',
formatter: function(value, row, index) {
return $.table.selectDictLabel(operatingNatureDatas, value);
}
},
{
field: 'companyStore.contactPerson',
title: '联系人'
},
{
field: 'companyStore.phone',
title: '联系电话'
},
{
field: 'companyStore.zucheRatio',
title: '租车分成比例',
formatter: function(value, row, index) {
return value +"%";
}
},
{
field: 'changeType',
title: '变更类型',
title: '申请类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(changeTypeDatas, value);
}
},
{
field: 'payType',
title: '支付类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(payTypeDatas, value);
}
field: 'changeAmount',
title: '申请提现金额(元)'
},
{
field: 'changeTime',
title: '变更时间'
title: '申请时间'
},
{
field: 'changeAmount',
title: '变更金额(元)'
},
{
field: 'referralOrderNo',
title: '引荐订单'
field: 'changeStatus',
title: '申请状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(changeStatusDatas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>修改</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
if (row.changeStatus == 'UNREVIEWED') {
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="review(\'' + row.id + '\')"><i class="fa fa-edit"></i>提现审核</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
function review(id){
var index = layer.open({
type: 2, // iframe模式
title: '确认是否通过此门店的提现申请?',
area: ['900px', '320px'],
content: prefix + "/edit/" + id,
btn: ['<i class="fa fa-check"></i> 通过提现申请', '<i class="fa fa-close"></i> 关闭', '<i class="fa fa-close"></i> 审核不通过'],
yes: function(index, layero){
// 通过提现申请
passWithdrawal(index, layero);
return false;
},
btn2: function(index, layero){
// 关闭
layer.close(index);
return false;
},
btn3: function(index, layero){
// 不通过
rejectWithdrawal(index, layero);
return false;
}
});
}
// 通过提现申请的方法
function passWithdrawal(index, layero) {
// 获取iframe中的表单数据包括密码
var iframeWin = layero.find('iframe')[0].contentWindow;
var password = iframeWin.$('#password').val(); // 获取密码字段的值
if (!password) {
layer.msg('请输入登录密码进行验证', {icon: 5});
return;
}
// 发送 AJAX 请求验证密码
$.ajax({
url: prefix + "/verifyPassword",
type: "POST",
data: {
password: password
},
success: function(result) {
if (result.code == 0) { // 密码验证通过
// 执行提现审核通过操作
executePassWithdrawal(index, iframeWin);
} else {
layer.msg('密码验证失败: ' + result.msg, {icon: 5});
}
},
error: function() {
layer.msg('密码验证请求失败', {icon: 5});
}
});
}
// 执行提现审核通过的具体操作
function executePassWithdrawal(layerIndex, iframeWin) {
// 获取审核ID等必要信息
var id = iframeWin.$('#id').val(); // 假设有隐藏字段存储ID
// 发送审核通过的请求
$.ajax({
url: prefix + "/passWithdrawal",
type: "POST",
data: {
id: id
},
success: function(result) {
if (result.code == 0) {
layer.msg('审核通过成功', {icon: 1});
// 关闭弹窗
layer.close(layerIndex);
// 刷新表格数据
$.table.refresh();
} else {
layer.msg('审核失败: ' + result.msg, {icon: 2});
}
},
error: function() {
layer.msg('审核请求失败', {icon: 2});
}
});
}
// 不通过提现申请的方法
function rejectWithdrawal(index, layero) {
// 获取iframe中的表单数据包括密码
var iframeWin = layero.find('iframe')[0].contentWindow;
var password = iframeWin.$('#password').val(); // 获取密码字段的值
if (!password) {
layer.msg('请输入登录密码进行验证', {icon: 5});
return;
}
// 发送 AJAX 请求验证密码
$.ajax({
url: prefix + "/verifyPassword",
type: "POST",
data: {
password: password
},
success: function(result) {
if (result.code == 0) { // 密码验证通过
// 执行提现审核不通过操作
executeRejectWithdrawal(index, iframeWin);
} else {
layer.msg('密码验证失败: ' + result.msg, {icon: 5});
}
},
error: function() {
layer.msg('密码验证请求失败', {icon: 5});
}
});
}
// 执行提现审核不通过的具体操作
function executeRejectWithdrawal(layerIndex, iframeWin) {
// 获取审核ID等必要信息
var id = iframeWin.$('#id').val(); // 假设有隐藏字段存储ID
// 发送审核不通过的请求
$.ajax({
url: prefix + "/rejectWithdrawal",
type: "POST",
data: {
id: id
},
success: function(result) {
if (result.code == 0) {
layer.msg('审核不通过操作成功', {icon: 1});
// 关闭弹窗
layer.close(layerIndex);
// 刷新表格数据
$.table.refresh();
} else {
layer.msg('审核操作失败: ' + result.msg, {icon: 2});
}
},
error: function() {
layer.msg('审核请求失败', {icon: 2});
}
});
}
</script>
</body>
</html>

View File

@ -48,7 +48,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属运营商:</label>
<div class="col-sm-8">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b" required>
<option value="">请选择所属运营商</option>
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}"></option>
</select>

View File

@ -49,7 +49,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属运营商:</label>
<div class="col-sm-8">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b" required>
<option value="">请选择所属运营商</option>
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}" th:field="*{operatingCompanyId}" ></option>
</select>