😎1、调整全局大小与vxetable联动 2、代码清理
This commit is contained in:
parent
a437211418
commit
57b2f884f5
@ -35,7 +35,7 @@ public class SysWechatRefund : EntityBase
|
||||
[Required]
|
||||
public string OutRefundNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 退款原因,示例:商品已售完
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "退款原因", Length = 80)]
|
||||
@ -62,7 +62,7 @@ public class SysWechatRefund : EntityBase
|
||||
/// <summary>
|
||||
/// 退款资金来源, 可不传,默认使用未结算资金退款(仅对老资金流商户适用)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "退款资金来源", Length = 32)]
|
||||
[SugarColumn(ColumnDescription = "退款资金来源", Length = 32)]
|
||||
public string FundsAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -111,11 +111,11 @@ public class SysWechatRefund : EntityBase
|
||||
/// 附加数据
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "附加数据")]
|
||||
public string? Attachment { get; set; }
|
||||
public string? Attachment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "备注")]
|
||||
public string? Remark { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
@ -104,7 +104,7 @@ public class SysCommonService : IDynamicApiController, ITransient
|
||||
|
||||
// 接口信息
|
||||
var apiController = apiOuput.Children.FirstOrDefault(u => u.Name.Equals(controllerName));
|
||||
var displayName = controllerActionDescriptor.MethodInfo.GetCustomAttribute<DisplayNameAttribute>(true)?.DisplayName;
|
||||
var displayName = controllerActionDescriptor.MethodInfo.GetCustomAttribute<DisplayNameAttribute>(true)?.DisplayName;
|
||||
apiController.Children.Add(new ApiOutput
|
||||
{
|
||||
Name = displayName,
|
||||
|
||||
@ -41,7 +41,7 @@ public class MessageInput
|
||||
/// <summary>
|
||||
/// 发送者Id
|
||||
/// </summary>
|
||||
public string SendUserId{ get; set; }
|
||||
public string SendUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发送者名称
|
||||
|
||||
@ -8,7 +8,6 @@ using AlibabaCloud.SDK.Dysmsapi20170525.Models;
|
||||
using TencentCloud.Common;
|
||||
using TencentCloud.Common.Profile;
|
||||
using TencentCloud.Sms.V20190711;
|
||||
using static SKIT.FlurlHttpClient.Wechat.Api.Models.ComponentTCBBatchCreateContainerServiceVersionRequest.Types;
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
|
||||
@ -52,13 +52,13 @@ public class WechatPayParaInput
|
||||
public string PrepayId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class RefundRequestInput // : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 商户订单号(原支付交易对应的付款单号)
|
||||
/// </summary>
|
||||
public string OutTradeNumber { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 退款单号
|
||||
///// </summary>
|
||||
@ -67,46 +67,57 @@ public class RefundRequestInput // : WechatTenpayRequest
|
||||
/// 原订单金额(分)
|
||||
/// </summary>
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 退款金额(分)
|
||||
/// </summary>
|
||||
public int Refund { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 退款原因
|
||||
/// </summary>
|
||||
public string Reason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户订单号
|
||||
/// </summary>
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户订单状态(或者为第几次支付,有些订单涉及多次支付,比如先付预付款,后补尾款)
|
||||
/// </summary>
|
||||
public int OrderStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户商品编码
|
||||
/// </summary>
|
||||
public string MerchantGoodsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户商品名称
|
||||
/// </summary>
|
||||
public string GoodsName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户商品单价
|
||||
/// </summary>
|
||||
public int UnitPrice { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户商品退款金额
|
||||
/// </summary>
|
||||
public int RefundAmount { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户商品退货数量
|
||||
/// </summary>
|
||||
public int RefundQuantity { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 附加数据
|
||||
/// </summary>
|
||||
public string Attachment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
@ -120,6 +131,7 @@ public class PageSysWechatPayInput : BasePageInput
|
||||
/// </summary>
|
||||
/// <example></example>
|
||||
public long? OrderId { get; set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// order_status
|
||||
/// </summary>
|
||||
@ -131,11 +143,13 @@ public class PageSysWechatPayInput : BasePageInput
|
||||
/// </summary>
|
||||
/// <example></example>
|
||||
public string OutTradeNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// success_time范围
|
||||
/// </summary>
|
||||
/// <example></example>
|
||||
public List<DateTime?> SuccessTimeRange { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// expire_time范围
|
||||
/// </summary>
|
||||
|
||||
@ -12,38 +12,47 @@ public class WechatPayOutput
|
||||
/// OpenId
|
||||
/// </summary>
|
||||
public string OpenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户(支付交易)单号,微信唯一
|
||||
/// </summary>
|
||||
public string OutTradeNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户(商品交易)订单号
|
||||
/// </summary>
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的商户订单状态(或者为第几次支付,有些订单涉及多次支付,比如先付预付款,后补尾款)
|
||||
/// </summary>
|
||||
public int OrderStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单金额
|
||||
/// </summary>
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 附加数据
|
||||
/// </summary>
|
||||
public string Attachment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 优惠标记
|
||||
/// </summary>
|
||||
public string GoodsTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付发起时间
|
||||
/// </summary>
|
||||
public DateTimeOffset CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付完成时间
|
||||
/// </summary>
|
||||
public DateTimeOffset SuccessTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易状态(支付成功后,微信返回)
|
||||
/// </summary>
|
||||
@ -59,4 +68,4 @@ public class CreatePayTransactionOutput
|
||||
{
|
||||
public string PrepayId { get; set; }
|
||||
public string OutTradeNumber { get; set; }
|
||||
}
|
||||
}
|
||||
@ -411,7 +411,7 @@ public class SysWechatPayService : IDynamicApiController, ITransient
|
||||
wechatPay.BankType = response.BankType; // 付款银行类型
|
||||
wechatPay.Total = response.Amount.Total; // 订单总金额
|
||||
wechatPay.PayerTotal = response.Amount.PayerTotal; // 用户支付金额
|
||||
wechatPay.SuccessTime = response.SuccessTime; // 支付完成时间
|
||||
wechatPay.SuccessTime = response.SuccessTime; // 支付完成时间
|
||||
await _sysWechatPayRep.AsUpdateable(wechatPay).IgnoreColumns(true).ExecuteCommandAsync();
|
||||
return wechatPay.Adapt<WechatPayOutput>();
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-popover placement="bottom" width="280" trigger="hover">
|
||||
<el-popover placement="bottom" width="300" trigger="hover">
|
||||
<template #reference>
|
||||
<el-text type="primary" class="cursor-default">
|
||||
<el-icon><ele-InfoFilled /></el-icon>详情
|
||||
|
||||
@ -6,17 +6,19 @@ import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx';
|
||||
// import 'vxe-table/lib/style.css'; // 已在theme/vxe.scss引入
|
||||
import 'vxe-table-plugin-element/dist/style.css';
|
||||
// Vxe UI 组件库
|
||||
import VxeUI from 'vxe-pc-ui';
|
||||
import VxeUI, { VxeComponentSizeType } from 'vxe-pc-ui';
|
||||
import ExcelJS from 'exceljs';
|
||||
import { Local } from '../utils/storage';
|
||||
|
||||
export const setupVXETable = (app: App) => {
|
||||
let vxeSize = getVxeTableSize();
|
||||
// 加载插件
|
||||
VxeUITable.use(VXETablePluginElement);
|
||||
VxeUITable.use(VXETablePluginExportXLSX, { ExcelJS: ExcelJS });
|
||||
// VXETable全局配置https://vxetable.cn/v4.7/#/table/start/global
|
||||
VxeUITable.setConfig({
|
||||
theme: 'light', // 主题颜色
|
||||
size: 'mini', // 全局尺寸
|
||||
size: vxeSize, // 全局尺寸mini、small、medium/default
|
||||
// i18n: (key, args) => i18n.global.t(key, args),
|
||||
// zIndex: 999, // 全局 zIndex 起始值,如果项目的的 z-index 样式值过大时就需要跟随设置更大,避免被遮挡
|
||||
// version: 0, // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
|
||||
@ -26,7 +28,7 @@ export const setupVXETable = (app: App) => {
|
||||
stripe: true, // 是否带有斑马纹
|
||||
// keepSource: false,// 保持原始值的状态,被某些功能所依赖,比如编辑状态、还原数据等(开启后影响性能,具体取决于数据量)
|
||||
showOverflow: true, // 设置所有内容过长时显示为省略号(如果是固定列建议设置该值,提升渲染速度)
|
||||
size: 'mini', // 表格的尺寸[medium, small, mini]
|
||||
size: vxeSize, // 表格的尺寸[medium, small, mini]
|
||||
autoResize: true, // 自动监听父元素的变化去重新计算表格(对于父元素可能存在动态变化、显示隐藏的容器中、列宽异常等场景中的可能会用到)
|
||||
round: false, // 是否为圆角边框
|
||||
emptyText: '暂无数据', //
|
||||
@ -80,15 +82,15 @@ export const setupVXETable = (app: App) => {
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
size: 'mini',
|
||||
size: vxeSize,
|
||||
toolbarConfig: {
|
||||
size: 'mini', // 尺寸 medium, small, mini
|
||||
size: vxeSize, // 尺寸 medium, small, mini
|
||||
perfect: false, // 配套的样式
|
||||
},
|
||||
zoomConfig: { escRestore: true }, // 是否允许通过按下 ESC 键还原
|
||||
},
|
||||
pager: {
|
||||
size: 'mini',
|
||||
size: vxeSize,
|
||||
background: true, // 带背景颜色
|
||||
perfect: false, // 配套的样式
|
||||
autoHidden: false, // 当只有一页时自动隐藏
|
||||
@ -107,3 +109,17 @@ export const setupVXETable = (app: App) => {
|
||||
// app.config.globalProperties.$XSaveFile = VxeUI.saveFile
|
||||
// app.config.globalProperties.$XReadFile = VxeUI.readFile
|
||||
};
|
||||
|
||||
// 从全局主题里面获取组件大小模式
|
||||
function getVxeTableSize() {
|
||||
let themeConfig = Local.get('themeConfig');
|
||||
let size = themeConfig.globalComponentSize;
|
||||
|
||||
// 匹配vxetable大小模式
|
||||
let vxeSize: VxeComponentSizeType = 'mini';
|
||||
if (size == 'large') vxeSize = 'medium';
|
||||
else if (size == 'default') vxeSize = 'small';
|
||||
else if (size == 'small') vxeSize = 'mini';
|
||||
|
||||
return vxeSize;
|
||||
}
|
||||
|
||||
@ -95,13 +95,13 @@ import { useThemeConfig } from '/@/stores/themeConfig';
|
||||
import other from '/@/utils/other';
|
||||
import mittBus from '/@/utils/mitt';
|
||||
import { Local } from '/@/utils/storage';
|
||||
|
||||
import { clearAccessTokens, getAPI } from '/@/utils/axios-utils';
|
||||
import { SysAuthApi, SysNoticeApi } from '/@/api-services/api';
|
||||
import Push from 'push.js';
|
||||
import { signalR } from '/@/views/system/onlineUser/signalR';
|
||||
import { Avatar, Guide } from '@element-plus/icons-vue';
|
||||
|
||||
import { clearAccessTokens, getAPI } from '/@/utils/axios-utils';
|
||||
import { SysAuthApi, SysNoticeApi } from '/@/api-services/api';
|
||||
|
||||
// 引入组件
|
||||
const UserNews = defineAsyncComponent(() => import('/@/layout/navBars/topBar/userNews.vue'));
|
||||
const Search = defineAsyncComponent(() => import('/@/layout/navBars/topBar/search.vue'));
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
@import 'vxe-table/styles/all.scss';
|
||||
@import 'vxe-pc-ui/styles/all.scss';
|
||||
|
||||
// 全局变量参考地址 https://github.com/x-extends/vxe-table/blob/master/styles/theme/base.scss
|
||||
:root {
|
||||
--vxe-ui-font-family: var(--el-font-family);
|
||||
// --vxe-ui-font-color: var(--el-text-color-primary); // 原:#606266;
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="sysInfoSetting">
|
||||
import { nextTick, reactive } from 'vue';
|
||||
import { nextTick, onMounted, reactive } from 'vue';
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysConfigApi } from '/@/api-services';
|
||||
import { ElMessage } from 'element-plus';
|
||||
@ -68,6 +68,37 @@ const state = reactive({
|
||||
},
|
||||
});
|
||||
|
||||
// 页面初始化
|
||||
onMounted(async () => {
|
||||
loadData();
|
||||
});
|
||||
|
||||
// 加载数据
|
||||
const loadData = async () => {
|
||||
try {
|
||||
state.isLoading = true;
|
||||
const res = await getAPI(SysConfigApi).apiSysConfigSysInfoGet();
|
||||
if (res.data!.type !== 'success') return;
|
||||
|
||||
const result = res.data.result;
|
||||
state.formData = {
|
||||
sysLogoBlob: undefined,
|
||||
sysLogo: result.sysLogo,
|
||||
sysTitle: result.sysTitle,
|
||||
sysViceTitle: result.sysViceTitle,
|
||||
sysViceDesc: result.sysViceDesc,
|
||||
sysWatermark: result.sysWatermark,
|
||||
sysCopyright: result.sysCopyright,
|
||||
sysIcp: result.sysIcp,
|
||||
sysIcpUrl: result.sysIcpUrl,
|
||||
};
|
||||
} finally {
|
||||
nextTick(() => {
|
||||
state.isLoading = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 通过onChange方法获得文件列表
|
||||
const handleUploadChange = (file: any) => {
|
||||
state.file = file;
|
||||
@ -101,40 +132,15 @@ const onSave = async () => {
|
||||
state.file = undefined;
|
||||
await loadData();
|
||||
ElMessage.success('保存成功');
|
||||
|
||||
// 重新加载
|
||||
window.location.reload();
|
||||
} finally {
|
||||
nextTick(() => {
|
||||
state.isLoading = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 加载数据
|
||||
const loadData = async () => {
|
||||
try {
|
||||
state.isLoading = true;
|
||||
const res = await getAPI(SysConfigApi).apiSysConfigSysInfoGet();
|
||||
if (res.data!.type !== 'success') return;
|
||||
|
||||
const result = res.data.result;
|
||||
state.formData = {
|
||||
sysLogoBlob: undefined,
|
||||
sysLogo: result.sysLogo,
|
||||
sysTitle: result.sysTitle,
|
||||
sysViceTitle: result.sysViceTitle,
|
||||
sysViceDesc: result.sysViceDesc,
|
||||
sysWatermark: result.sysWatermark,
|
||||
sysCopyright: result.sysCopyright,
|
||||
sysIcp: result.sysIcp,
|
||||
sysIcpUrl: result.sysIcpUrl,
|
||||
};
|
||||
} finally {
|
||||
nextTick(() => {
|
||||
state.isLoading = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
loadData();
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user