Browse Source

代码修复

dev
主管理员 6 months ago
parent
commit
8130f402f7
14 changed files with 572 additions and 29 deletions
  1. +1
    -1
      admin-hanhai-vue/.env.development
  2. +1
    -1
      admin-hanhai-vue/.env.production
  3. +22
    -9
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/controller/HanHaiWaterController.java
  4. +5
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/entity/HanHaiWater.java
  5. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/mapper/HanHaiWaterMapper.java
  6. +3
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/req/TransferBatchesRequest.java
  7. +30
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/resp/TransferBatchesResp.java
  8. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/service/IHanHaiWaterService.java
  9. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/service/impl/HanHaiWaterServiceImpl.java
  10. +224
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue/HanHaiWaterList.vue
  11. +129
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue/modules/HanHaiWaterForm.vue
  12. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue/modules/HanHaiWaterModal.Style#Drawer.vue
  13. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue/modules/HanHaiWaterModal.vue
  14. +10
    -10
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue3/HanHaiWater.data.ts

+ 1
- 1
admin-hanhai-vue/.env.development View File

@ -1,5 +1,5 @@
NODE_ENV=development NODE_ENV=development
VUE_APP_API_BASE_URL=https://admin.ytonggao.com/a-notice-api/
VUE_APP_API_BASE_URL=http://localhost:8000/a-notice-api/
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview


+ 1
- 1
admin-hanhai-vue/.env.production View File

@ -1,4 +1,4 @@
NODE_ENV=production NODE_ENV=production
VUE_APP_API_BASE_URL=https://admin.ytonggao.com/a-notice-api/
VUE_APP_API_BASE_URL=http://localhost:8000/a-notice-api/
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

+ 22
- 9
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/controller/HanHaiWaterController.java View File

@ -1,9 +1,6 @@
package org.jeecg.modules.hanHaiWater.controller; package org.jeecg.modules.hanHaiWater.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
@ -16,6 +13,7 @@ import java.security.cert.X509Certificate;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.wechat.pay.contrib.apache.httpclient.util.RsaCryptoUtil; import com.wechat.pay.contrib.apache.httpclient.util.RsaCryptoUtil;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
@ -167,26 +165,39 @@ public class HanHaiWaterController extends JeecgController<HanHaiWater, IHanHaiW
transferBatchesRequest.setTransferAmount(MoneyUtil.Yuan2Fen(hanHaiWater.getPrice().doubleValue())); transferBatchesRequest.setTransferAmount(MoneyUtil.Yuan2Fen(hanHaiWater.getPrice().doubleValue()));
List<TransferBatchesDetailsRequest> transferBatchesDetailsRequests = new ArrayList<>(); List<TransferBatchesDetailsRequest> transferBatchesDetailsRequests = new ArrayList<>();
TransferBatchesDetailsRequest transferBatchesDetailsRequest = new TransferBatchesDetailsRequest(); TransferBatchesDetailsRequest transferBatchesDetailsRequest = new TransferBatchesDetailsRequest();
transferBatchesDetailsRequest.setInfoType("1005-报酬");
transferBatchesDetailsRequest.setInfoContent("商品返利");
transferBatchesDetailsRequest.setInfoType("岗位类型");
transferBatchesDetailsRequest.setInfoContent("销售员");
TransferBatchesDetailsRequest transferBatchesDetailsRequest2 = new TransferBatchesDetailsRequest();
transferBatchesDetailsRequest2.setInfoType("报酬说明");
transferBatchesDetailsRequest2.setInfoContent("佣金报酬");
transferBatchesDetailsRequests.add(transferBatchesDetailsRequest); transferBatchesDetailsRequests.add(transferBatchesDetailsRequest);
transferBatchesDetailsRequests.add(transferBatchesDetailsRequest2);
transferBatchesRequest.setTransferDetailList(transferBatchesDetailsRequests); transferBatchesRequest.setTransferDetailList(transferBatchesDetailsRequests);
String jsonString = JSONObject.toJSONString(transferBatchesRequest); String jsonString = JSONObject.toJSONString(transferBatchesRequest);
log.info("请求参数:"+jsonString);
String postTransBatRequest = HttpRequestUtil.postTransBatRequest(transferBatchUrl, jsonString, serialNo, wxsSerialNo, mchId, pemPath); String postTransBatRequest = HttpRequestUtil.postTransBatRequest(transferBatchUrl, jsonString, serialNo, wxsSerialNo, mchId, pemPath);
log.error("返回结果1:" + postTransBatRequest); log.error("返回结果1:" + postTransBatRequest);
TransferBatchesResp transferBatchesResp = JSON.parseObject(postTransBatRequest, TransferBatchesResp.class); TransferBatchesResp transferBatchesResp = JSON.parseObject(postTransBatRequest, TransferBatchesResp.class);
log.error("返回结果2:" + transferBatchesResp); log.error("返回结果2:" + transferBatchesResp);
if (transferBatchesResp == null || org.apache.commons.lang3.StringUtils.isBlank(transferBatchesResp.getBatchId())) {
if (transferBatchesResp == null || org.apache.commons.lang3.StringUtils.isBlank(transferBatchesResp.getOutBillNo()) || transferBatchesResp.getState().equals("FAIL")) {
throw new JeecgBootException("打款失败"); throw new JeecgBootException("打款失败");
} }
//这里写自己的逻辑比如改变这条记录的状态变成提现成功 //这里写自己的逻辑比如改变这条记录的状态变成提现成功
HanHaiWater hanHaiWater1 = new HanHaiWater();
hanHaiWater1.setId(hanHaiWater.getId());
hanHaiWater1.setState(1);
hanHaiWater1.setSuccessTime(new Date());
hanHaiWater1.setPackageInfo(transferBatchesResp.getPackageInfo());
hanHaiWaterService.updateById(hanHaiWater1);
return Result.OK("提现成功"); return Result.OK("提现成功");
} }
@ -311,13 +322,15 @@ public class HanHaiWaterController extends JeecgController<HanHaiWater, IHanHaiW
log.error("返回结果1:" + postTransBatRequest); log.error("返回结果1:" + postTransBatRequest);
TransferBatchesResp transferBatchesResp = JSON.parseObject(postTransBatRequest, TransferBatchesResp.class); TransferBatchesResp transferBatchesResp = JSON.parseObject(postTransBatRequest, TransferBatchesResp.class);
log.error("返回结果2:" + transferBatchesResp); log.error("返回结果2:" + transferBatchesResp);
if (transferBatchesResp == null || org.apache.commons.lang3.StringUtils.isBlank(transferBatchesResp.getBatchId())) {
if (transferBatchesResp == null || org.apache.commons.lang3.StringUtils.isBlank(transferBatchesResp.getOutBillNo())|| StringUtils.equals(transferBatchesResp.getState(),"FAIL")) {
throw new JeecgBootException("打款失败"); throw new JeecgBootException("打款失败");
} }
//这里写自己的逻辑比如改变这条记录的状态变成提现成功 //这里写自己的逻辑比如改变这条记录的状态变成提现成功
return Result.OK("提现成功"); return Result.OK("提现成功");
} }


+ 5
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/entity/HanHaiWater.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/** /**
* @Description: 流水信息表 * @Description: 流水信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-01-19
* @Date: 2025-01-20
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@ -72,4 +72,8 @@ public class HanHaiWater implements Serializable {
@Excel(name = "类型", width = 15) @Excel(name = "类型", width = 15)
@ApiModelProperty(value = "类型") @ApiModelProperty(value = "类型")
private java.lang.Integer type; private java.lang.Integer type;
/**回调*/
@Excel(name = "回调", width = 15)
@ApiModelProperty(value = "回调")
private java.lang.String packageInfo;
} }

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/mapper/HanHaiWaterMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* @Description: 流水信息表 * @Description: 流水信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-01-19
* @Date: 2025-01-20
* @Version: V1.0 * @Version: V1.0
*/ */
public interface HanHaiWaterMapper extends BaseMapper<HanHaiWater> { public interface HanHaiWaterMapper extends BaseMapper<HanHaiWater> {


+ 3
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/req/TransferBatchesRequest.java View File

@ -36,6 +36,9 @@ public class TransferBatchesRequest {
/**真实姓名*/ /**真实姓名*/
@JSONField(name = "user_name") @JSONField(name = "user_name")
private String userName; private String userName;
/**回调地址*/
@JSONField(name = "notify_url")
private String notifyUrl;
/**发起批量转账的明细列表,最多三千笔*/ /**发起批量转账的明细列表,最多三千笔*/
@JSONField(name = "transfer_scene_report_infos") @JSONField(name = "transfer_scene_report_infos")
private List<TransferBatchesDetailsRequest> transferDetailList; private List<TransferBatchesDetailsRequest> transferDetailList;


+ 30
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/resp/TransferBatchesResp.java View File

@ -15,13 +15,39 @@ import lombok.Data;
public class TransferBatchesResp { public class TransferBatchesResp {
/**微信批次单号*/ /**微信批次单号*/
@JSONField(name = "batch_id")
private String batchId;
@JSONField(name = "out_bill_no")
private String outBillNo;
/**商家批次单号*/ /**商家批次单号*/
@JSONField(name = "out_batch_no")
private String outBatchNo;
@JSONField(name = "transfer_bill_no")
private String transferBillNo;
/**批次创建时间*/ /**批次创建时间*/
@JSONField(name = "create_time") @JSONField(name = "create_time")
private String createTime; private String createTime;
/**商家转账订单状态
* ACCEPTED: 转账已受理
*
* PROCESSING: 转账处理中转账结果尚未明确如一直处于此状态建议检查账户余额是否足够
*
* WAIT_USER_CONFIRM: 待收款用户确认可拉起微信收款确认页面进行收款确认
*
* TRANSFERING: 转账结果尚未明确可拉起微信收款确认页面再次重试确认收款
*
* SUCCESS: 转账成功
*
* FAIL: 转账失败
*
* CANCELING: 商户撤销请求受理成功该笔转账正在撤销中
*
* CANCELLED: 转账撤销完成
* */
@JSONField(name = "state")
private String state;
/**失败原因*/
@JSONField(name = "fail_reason")
private String failReason;
/**跳转领取页面的package信息*/
@JSONField(name = "package_info")
private String packageInfo;
} }

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/service/IHanHaiWaterService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* @Description: 流水信息表 * @Description: 流水信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-01-19
* @Date: 2025-01-20
* @Version: V1.0 * @Version: V1.0
*/ */
public interface IHanHaiWaterService extends IService<HanHaiWater> { public interface IHanHaiWaterService extends IService<HanHaiWater> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/service/impl/HanHaiWaterServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** /**
* @Description: 流水信息表 * @Description: 流水信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2025-01-19
* @Date: 2025-01-20
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service


+ 224
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue/HanHaiWaterList.vue View File

@ -0,0 +1,224 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户标识">
<j-search-select-tag placeholder="请选择用户标识" v-model="queryParam.userId" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('流水信息表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<han-hai-water-modal ref="modalForm" @ok="modalFormOk"></han-hai-water-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HanHaiWaterModal from './modules/HanHaiWaterModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'HanHaiWaterList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HanHaiWaterModal
},
data () {
return {
description: '流水信息表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建日期',
align:"center",
sorter: true,
dataIndex: 'createTime'
},
{
title:'用户标识',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'金额',
align:"center",
dataIndex: 'price'
},
{
title:'状态',
align:"center",
dataIndex: 'state'
},
{
title:'到账时间',
align:"center",
dataIndex: 'successTime'
},
{
title:'类型',
align:"center",
dataIndex: 'type'
},
{
title:'回调',
align:"center",
dataIndex: 'packageInfo'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hanHaiWater/hanHaiWater/list",
delete: "/hanHaiWater/hanHaiWater/delete",
deleteBatch: "/hanHaiWater/hanHaiWater/deleteBatch",
exportXlsUrl: "/hanHaiWater/hanHaiWater/exportXls",
importExcelUrl: "hanHaiWater/hanHaiWater/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'sel_search',value:'userId',text:'用户标识',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'BigDecimal',value:'price',text:'金额',dictCode:''})
fieldList.push({type:'int',value:'state',text:'状态',dictCode:'pay_type'})
fieldList.push({type:'datetime',value:'successTime',text:'到账时间'})
fieldList.push({type:'int',value:'type',text:'类型',dictCode:'pay_state'})
fieldList.push({type:'Text',value:'packageInfo',text:'回调',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 129
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue/modules/HanHaiWaterForm.vue View File

@ -0,0 +1,129 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<a-input-number v-model="model.state" placeholder="请输入状态" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="到账时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="successTime">
<j-date placeholder="请选择到账时间" v-model="model.successTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input-number v-model="model.type" placeholder="请输入类型" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="回调" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="packageInfo">
<a-input v-model="model.packageInfo" placeholder="请输入回调" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HanHaiWaterForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/hanHaiWater/hanHaiWater/add",
edit: "/hanHaiWater/hanHaiWater/edit",
queryById: "/hanHaiWater/hanHaiWater/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue/modules/HanHaiWaterModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<han-hai-water-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></han-hai-water-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HanHaiWaterForm from './HanHaiWaterForm'
export default {
name: 'HanHaiWaterModal',
components: {
HanHaiWaterForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue/modules/HanHaiWaterModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<han-hai-water-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></han-hai-water-form>
</j-modal>
</template>
<script>
import HanHaiWaterForm from './HanHaiWaterForm'
export default {
name: 'HanHaiWaterModal',
components: {
HanHaiWaterForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 10
- 10
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiWater/vue3/HanHaiWater.data.ts View File

@ -15,11 +15,6 @@ export const columns: BasicColumn[] = [
align:"center", align:"center",
dataIndex: 'userId_dictText' dataIndex: 'userId_dictText'
}, },
{
title: '提现姓名',
align:"center",
dataIndex: 'name'
},
{ {
title: '金额', title: '金额',
align:"center", align:"center",
@ -40,6 +35,11 @@ export const columns: BasicColumn[] = [
align:"center", align:"center",
dataIndex: 'type' dataIndex: 'type'
}, },
{
title: '回调',
align:"center",
dataIndex: 'packageInfo'
},
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
@ -63,11 +63,6 @@ export const formSchema: FormSchema[] = [
dict:"han_hai_member,nick_name,id" dict:"han_hai_member,nick_name,id"
}, },
}, },
{
label: '提现姓名',
field: 'name',
component: 'Input',
},
{ {
label: '金额', label: '金额',
field: 'price', field: 'price',
@ -88,4 +83,9 @@ export const formSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'InputNumber', component: 'InputNumber',
}, },
{
label: '回调',
field: 'packageInfo',
component: 'Input',
},
]; ];

Loading…
Cancel
Save