Merge remote-tracking branch 'yudao/dev' into dev
This commit is contained in:
commit
f25a4d7343
@ -75,7 +75,8 @@ const include = [
|
||||
'element-plus/es/components/dropdown-item/style/css',
|
||||
'element-plus/es/components/badge/style/css',
|
||||
'element-plus/es/components/breadcrumb/style/css',
|
||||
'element-plus/es/components/breadcrumb-item/style/css'
|
||||
'element-plus/es/components/breadcrumb-item/style/css',
|
||||
'element-plus/es/components/image/style/css'
|
||||
]
|
||||
|
||||
const exclude = ['@iconify/json']
|
||||
|
@ -63,7 +63,6 @@
|
||||
"steady-xml": "^0.1.0",
|
||||
"url": "^0.11.0",
|
||||
"video.js": "^8.0.4",
|
||||
"vite-plugin-vue-setup-extend-plus": "^0.1.0",
|
||||
"vue": "3.2.47",
|
||||
"vue-i18n": "9.2.2",
|
||||
"vue-router": "^4.1.6",
|
||||
|
@ -95,7 +95,7 @@ watch(
|
||||
return props.modelValue
|
||||
},
|
||||
() => {
|
||||
if (props.modelValue) {
|
||||
if (props.modelValue && props.modelValue.indexOf(':') >= 0) {
|
||||
currentActiveType.value = props.modelValue.substring(0, props.modelValue.indexOf(':') + 1)
|
||||
icon.value = props.modelValue.substring(props.modelValue.indexOf(':') + 1)
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export interface DictDataType {
|
||||
}
|
||||
|
||||
export const getDictOptions = (dictType: string) => {
|
||||
return dictStore.getDictByType(dictType)
|
||||
return dictStore.getDictByType(dictType) || []
|
||||
}
|
||||
|
||||
export const getIntDictOptions = (dictType: string) => {
|
||||
@ -117,6 +117,7 @@ export enum DICT_TYPE {
|
||||
INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status',
|
||||
INFRA_CONFIG_TYPE = 'infra_config_type',
|
||||
INFRA_CODEGEN_TEMPLATE_TYPE = 'infra_codegen_template_type',
|
||||
INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type',
|
||||
INFRA_CODEGEN_SCENE = 'infra_codegen_scene',
|
||||
INFRA_FILE_STORAGE = 'infra_file_storage',
|
||||
|
||||
|
@ -30,7 +30,7 @@ const { query } = useRoute() // 查询参数
|
||||
const { delView } = useTagsViewStore() // 视图操作
|
||||
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const activeName = ref('basicInfo') // Tag 激活的窗口
|
||||
const activeName = ref('colum') // Tag 激活的窗口
|
||||
const basicInfoRef = ref<ComponentRef<typeof BasicInfoForm>>()
|
||||
const columInfoRef = ref<ComponentRef<typeof ColumInfoForm>>()
|
||||
const generateInfoRef = ref<ComponentRef<typeof GenerateInfoForm>>()
|
||||
|
@ -15,7 +15,7 @@
|
||||
v-loading="loading"
|
||||
element-loading-text="生成文件目录中..."
|
||||
>
|
||||
<el-scrollbar height="calc(100vh - 88px - 40px - 50px)">
|
||||
<el-scrollbar height="calc(100vh - 88px - 40px)">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
|
@ -13,6 +13,19 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="frontType" label="前端类型">
|
||||
<el-select v-model="formData.frontType">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="scene" label="生成场景">
|
||||
<el-select v-model="formData.scene">
|
||||
@ -25,6 +38,26 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<span>
|
||||
上级菜单
|
||||
<el-tooltip content="分配到指定菜单下,例如 系统管理" placement="top">
|
||||
<Icon icon="ep:question-filled" />
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
<el-tree-select
|
||||
v-model="formData.parentMenuId"
|
||||
placeholder="请选择系统菜单"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
:data="menus"
|
||||
:props="menuTreeProps"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item prop="packageName">-->
|
||||
@ -115,27 +148,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<span>
|
||||
上级菜单
|
||||
<el-tooltip content="分配到指定菜单下,例如 系统管理" placement="top">
|
||||
<Icon icon="ep:question-filled" />
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
<el-tree-select
|
||||
v-model="formData.parentMenuId"
|
||||
placeholder="请选择系统菜单"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
:data="menus"
|
||||
:props="menuTreeProps"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-if="formData.genType === '1'">
|
||||
<el-form-item prop="genPath">
|
||||
<template #label>
|
||||
@ -297,6 +309,7 @@ const props = defineProps({
|
||||
const formRef = ref()
|
||||
const formData = ref({
|
||||
templateType: null,
|
||||
frontType: null,
|
||||
scene: null,
|
||||
moduleName: '',
|
||||
businessName: '',
|
||||
@ -315,6 +328,7 @@ const formData = ref({
|
||||
|
||||
const rules = reactive({
|
||||
templateType: [required],
|
||||
frontType: [required],
|
||||
scene: [required],
|
||||
moduleName: [required],
|
||||
businessName: [required],
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-option v-for="item in accountList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<!-- TODO @芋艿:WxMpSelect 改成 WxAccountSelect,然后挪到现有的 wx-account-select 包下 -->
|
||||
<script lang="ts" setup name="WxMpSelect">
|
||||
import * as MpAccountApi from '@/api/mp/account'
|
||||
|
||||
|
@ -102,5 +102,3 @@ const uploadError = () => {
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style></style>
|
||||
|
@ -252,7 +252,6 @@ import * as MpFreePublishApi from '@/api/mp/freePublish'
|
||||
import type { UploadFiles, UploadProps, UploadRawFile } from 'element-plus'
|
||||
// 可以用改本地数据模拟,避免API调用超限
|
||||
// import drafts from './mock'
|
||||
|
||||
const message = useMessage() // 消息
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
@ -362,7 +361,7 @@ const submitForm = async () => {
|
||||
} finally {
|
||||
dialogNewsVisible.value = false
|
||||
addMaterialLoading.value = false
|
||||
getList()
|
||||
await getList()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,14 +277,11 @@ const uploadRules: FormRules = {
|
||||
}
|
||||
|
||||
// 素材类型
|
||||
type MatertialType = 'image' | 'voice' | 'video'
|
||||
const type = ref<MatertialType>('image')
|
||||
// 遮罩层
|
||||
const loading = ref(false)
|
||||
// 总条数
|
||||
// 数据列表
|
||||
const list = ref<any[]>([])
|
||||
const total = ref(0)
|
||||
type MaterialType = 'image' | 'voice' | 'video'
|
||||
const type = ref<MaterialType>('image')
|
||||
const loading = ref(false) // 遮罩层
|
||||
const list = ref<any[]>([]) // 总条数
|
||||
const total = ref(0) // 数据列表
|
||||
// 查询参数
|
||||
interface QueryParams {
|
||||
pageNo: number
|
||||
@ -302,7 +299,7 @@ const queryParams: QueryParams = reactive({
|
||||
const fileList = ref<UploadUserFile[]>([])
|
||||
|
||||
interface UploadData {
|
||||
type: MatertialType
|
||||
type: MaterialType
|
||||
title: string
|
||||
introduction: string
|
||||
}
|
||||
@ -346,7 +343,7 @@ const handleQuery = () => {
|
||||
|
||||
const onTabChange = (tabName: TabPaneName) => {
|
||||
// 设置 type
|
||||
uploadData.type = tabName as MatertialType
|
||||
uploadData.type = tabName as MaterialType
|
||||
|
||||
// 提前情况数据,避免tab切换后显示垃圾数据
|
||||
list.value = []
|
||||
|
@ -71,11 +71,10 @@
|
||||
<TagForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
<script setup lang="ts" name="MpTag">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import * as MpTagApi from '@/api/mp/tag'
|
||||
import TagForm from './TagForm.vue'
|
||||
import WxMpSelect from '@/views/mp/components/WxMpSelect.vue'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
@ -93,7 +92,6 @@ const queryParams: QueryParams = reactive({
|
||||
pageSize: 10,
|
||||
accountId: undefined
|
||||
})
|
||||
|
||||
const formRef = ref<InstanceType<typeof TagForm> | null>(null)
|
||||
|
||||
/** 侦听公众号变化 **/
|
||||
|
@ -121,15 +121,8 @@ const queryParams: QueryParams = reactive({
|
||||
openid: null,
|
||||
nickname: null
|
||||
})
|
||||
|
||||
const tagList = ref<any[]>([]) // 公众号标签列表
|
||||
const queryFormRef = ref<FormInstance | null>(null) // 搜索的表单
|
||||
const formRef = ref<InstanceType<typeof UserForm> | null>(null)
|
||||
|
||||
/** 初始化 */
|
||||
onMounted(async () => {
|
||||
tagList.value = await MpTagApi.getSimpleTagList()
|
||||
})
|
||||
const tagList = ref<any[]>([]) // 公众号标签列表
|
||||
|
||||
/** 侦听公众号变化 **/
|
||||
const onAccountChanged = (id?: number) => {
|
||||
@ -165,6 +158,7 @@ const resetQuery = () => {
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref<InstanceType<typeof UserForm> | null>(null)
|
||||
const openForm = (id: number) => {
|
||||
formRef.value?.open(id)
|
||||
}
|
||||
@ -175,7 +169,12 @@ const handleSync = async () => {
|
||||
await message.confirm('是否确认同步粉丝?')
|
||||
await MpUserApi.syncUser(queryParams.accountId)
|
||||
message.success('开始从微信公众号同步粉丝信息,同步需要一段时间,建议稍后再查询')
|
||||
getList()
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 初始化 */
|
||||
onMounted(async () => {
|
||||
tagList.value = await MpTagApi.getSimpleTagList()
|
||||
})
|
||||
</script>
|
||||
|
@ -1,152 +0,0 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="50%">
|
||||
<el-descriptions :column="2" label-class-name="desc-label">
|
||||
<el-descriptions-item label="商户名称">{{ orderDetail.merchantName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="应用名称">{{ orderDetail.appName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品名称">{{ orderDetail.subject }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider />
|
||||
<el-descriptions :column="2" label-class-name="desc-label">
|
||||
<el-descriptions-item label="商户订单号">
|
||||
<el-tag size="small">{{ orderDetail.merchantOrderId }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="渠道订单号">
|
||||
<el-tag class="tag-purple" size="small">{{ orderDetail.channelOrderNo }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付订单号">
|
||||
<el-tag v-if="orderDetail.payOrderExtension.no !== ''" class="tag-pink" size="small">
|
||||
{{ orderDetail.payOrderExtension.no }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="金额">
|
||||
<el-tag type="success" size="small">{{ parseFloat(orderDetail.amount / 100, 2) }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手续费">
|
||||
<el-tag type="warning" size="small"
|
||||
>{{ parseFloat(orderDetail.channelFeeAmount / 100, 2) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="手续费比例">
|
||||
{{ parseFloat(orderDetail.channelFeeRate / 100, 2) }}%
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付状态">
|
||||
<dict-tag :type="DICT_TYPE.PAY_ORDER_STATUS" :value="orderDetail.status" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="回调状态">
|
||||
<dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="orderDetail.notifyStatus" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="回调地址">{{ orderDetail.notifyUrl }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间" :formatter="dateFormatter">
|
||||
{{ formatDate(orderDetail.createTime) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付时间" :formatter="dateFormatter">
|
||||
{{ formatDate(orderDetail.successTime) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="失效时间" :formatter="dateFormatter">
|
||||
{{ formatDate(orderDetail.expireTime) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="通知时间" :formatter="dateFormatter">
|
||||
{{ formatDate(orderDetail.notifyTime) }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider />
|
||||
<el-descriptions :column="2" label-class-name="desc-label">
|
||||
<el-descriptions-item label="支付渠道"
|
||||
>{{ orderDetail.channelCodeName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付IP">{{ orderDetail.userIp }}</el-descriptions-item>
|
||||
<el-descriptions-item label="退款状态">
|
||||
<dict-tag :type="DICT_TYPE.PAY_ORDER_REFUND_STATUS" :value="orderDetail.refundStatus" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="退款次数">{{ orderDetail.refundTimes }}</el-descriptions-item>
|
||||
<el-descriptions-item label="退款金额">
|
||||
<el-tag type="warning">
|
||||
{{ parseFloat(orderDetail.refundAmount / 100, 2) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider />
|
||||
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
|
||||
<el-descriptions-item label="商品描述">
|
||||
{{ orderDetail.body }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付通道异步回调内容">
|
||||
{{ orderDetail.payOrderExtension.channelNotifyData }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts" name="orderForm">
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import * as OrderApi from '@/api/pay/order'
|
||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
// const message = useMessage() // 消息弹窗
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('订单详情') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const defaultOrderDetail = {
|
||||
merchantName: '',
|
||||
appName: '',
|
||||
channelCodeName: '',
|
||||
subject: '',
|
||||
merchantOrderId: null,
|
||||
channelOrderNo: '',
|
||||
body: '',
|
||||
amount: null,
|
||||
channelFeeRate: null,
|
||||
channelFeeAmount: null,
|
||||
userIp: '',
|
||||
status: null,
|
||||
notifyUrl: '',
|
||||
notifyStatus: null,
|
||||
refundStatus: null,
|
||||
refundTimes: '',
|
||||
refundAmount: null,
|
||||
createTime: '',
|
||||
successTime: '',
|
||||
notifyTime: '',
|
||||
expireTime: '',
|
||||
payOrderExtension: {
|
||||
channelNotifyData: '',
|
||||
no: ''
|
||||
}
|
||||
}
|
||||
const orderDetail = ref(JSON.parse(JSON.stringify(defaultOrderDetail)))
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.preview')
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
orderDetail.value = await OrderApi.getOrderDetail(id)
|
||||
if (orderDetail.value.payOrderExtension === null) {
|
||||
orderDetail.value.payOrderExtension = Object.assign(
|
||||
defaultOrderDetail.payOrderExtension,
|
||||
{}
|
||||
)
|
||||
}
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
</script>
|
||||
<style>
|
||||
.tag-purple {
|
||||
color: #722ed1;
|
||||
background: #f9f0ff;
|
||||
border-color: #d3adf7;
|
||||
}
|
||||
|
||||
.tag-pink {
|
||||
color: #eb2f96;
|
||||
background: #fff0f6;
|
||||
border-color: #ffadd2;
|
||||
}
|
||||
</style>
|
@ -1,154 +0,0 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="50%">
|
||||
<el-descriptions :column="2" label-class-name="desc-label">
|
||||
<el-descriptions-item label="商户名称">{{ refundDetail.merchantName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="应用名称">{{ refundDetail.appName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品名称">{{ refundDetail.subject }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider />
|
||||
<el-descriptions :column="2" label-class-name="desc-label">
|
||||
<el-descriptions-item label="商户退款单号">
|
||||
<el-tag size="small">{{ refundDetail.merchantRefundNo }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="商户订单号"
|
||||
>{{ refundDetail.merchantOrderId }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交易订单号">{{ refundDetail.tradeNo }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider />
|
||||
<el-descriptions :column="2" label-class-name="desc-label">
|
||||
<el-descriptions-item label="支付金额">
|
||||
{{ parseFloat(refundDetail.payAmount / 100).toFixed(2) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="退款金额" size="small">
|
||||
<el-tag class="tag-purple" size="small">
|
||||
{{ parseFloat(refundDetail.refundAmount / 100).toFixed(2) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="退款类型">
|
||||
<dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_TYPE" :value="refundDetail.type" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="退款状态">
|
||||
<dict-tag :type="DICT_TYPE.PAY_REFUND_ORDER_STATUS" :value="refundDetail.status" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间"
|
||||
>{{ formatDate(refundDetail.createTime) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="退款成功时间"
|
||||
>{{ formatDate(refundDetail.successTime) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="退款失效时间"
|
||||
>{{ formatDate(refundDetail.expireTime) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间"
|
||||
>{{ formatDate(refundDetail.updateTime) }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider />
|
||||
<el-descriptions :column="2" label-class-name="desc-label">
|
||||
<el-descriptions-item label="支付渠道">
|
||||
{{ refundDetail.channelCodeName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付IP" size="small">
|
||||
{{ refundDetail.userIp }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="回调地址">{{ refundDetail.notifyUrl }}</el-descriptions-item>
|
||||
<el-descriptions-item label="回调状态">
|
||||
<dict-tag :type="DICT_TYPE.PAY_ORDER_NOTIFY_STATUS" :value="refundDetail.notifyStatus" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="回调时间"
|
||||
>{{ formatDate(refundDetail.notifyTime) }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider />
|
||||
<el-descriptions :column="2" label-class-name="desc-label">
|
||||
<el-descriptions-item label="渠道订单号"
|
||||
>{{ refundDetail.channelOrderNo }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="渠道退款单号"
|
||||
>{{ refundDetail.channelRefundNo }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="渠道错误码"
|
||||
>{{ refundDetail.channelErrorCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="渠道错误码描述"
|
||||
>{{ refundDetail.channelErrorMsg }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<br />
|
||||
<el-descriptions :column="1" label-class-name="desc-label" direction="vertical" border>
|
||||
<el-descriptions-item label="渠道额外参数"
|
||||
>{{ refundDetail.channelExtras }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="退款原因">{{ refundDetail.reason }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts" name="refundForm">
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import * as RefundApi from '@/api/pay/refund'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
// const message = useMessage() // 消息弹窗
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('退款订单详情') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const defaultrefundDetail = {
|
||||
id: null,
|
||||
appId: null,
|
||||
appName: '',
|
||||
channelCode: '',
|
||||
channelCodeName: '',
|
||||
channelErrorCode: '',
|
||||
channelErrorMsg: '',
|
||||
channelExtras: '',
|
||||
channelId: null,
|
||||
channelOrderNo: '',
|
||||
channelRefundNo: '',
|
||||
createTime: null,
|
||||
expireTime: null,
|
||||
merchantId: null,
|
||||
merchantName: '',
|
||||
merchantOrderId: '',
|
||||
merchantRefundNo: '',
|
||||
notifyStatus: null,
|
||||
notifyTime: null,
|
||||
notifyUrl: '',
|
||||
orderId: null,
|
||||
payAmount: null,
|
||||
reason: '',
|
||||
refundAmount: null,
|
||||
status: null,
|
||||
subject: '',
|
||||
successTime: null,
|
||||
tradeNo: '',
|
||||
type: null,
|
||||
userIp: ''
|
||||
}
|
||||
const refundDetail = ref(JSON.parse(JSON.stringify(defaultrefundDetail)))
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.preview')
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
refundDetail.value = await RefundApi.getRefundApi(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.tag-purple {
|
||||
color: #722ed1;
|
||||
background: #f9f0ff;
|
||||
border-color: #d3adf7;
|
||||
}
|
||||
</style>
|
@ -115,11 +115,12 @@ const colorTypeOptions = readonly([
|
||||
])
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
const open = async (type: string, id?: number, dictType?: string) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
formData.value.dictType = dictType
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
|
@ -167,7 +167,7 @@ const resetQuery = () => {
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
formRef.value.open(type, id, queryParams.dictType)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
|
@ -19,7 +19,7 @@ export const rules = reactive({
|
||||
sslEnable: [required]
|
||||
})
|
||||
|
||||
// CrudSchema:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
|
||||
// CrudSchema:https://doc.iocoder.cn/vue3/crud-schema/
|
||||
const crudSchemas = reactive<CrudSchema[]>([
|
||||
{
|
||||
label: '邮箱',
|
||||
|
@ -72,7 +72,7 @@ import MailAccountDetail from './MailAccountDetail.vue'
|
||||
|
||||
// tableObject:表格的属性对象,可获得分页大小、条数等属性
|
||||
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
|
||||
// 详细可见:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/components/table.html#usetable
|
||||
// 详细可见:https://doc.iocoder.cn/vue3/crud-schema/
|
||||
const { tableObject, tableMethods } = useTable({
|
||||
getListApi: MailAccountApi.getMailAccountPage, // 分页接口
|
||||
delListApi: MailAccountApi.deleteMailAccount // 删除接口
|
||||
|
@ -41,7 +41,7 @@ import MailLogDetail from './MailLogDetail.vue'
|
||||
|
||||
// tableObject:表格的属性对象,可获得分页大小、条数等属性
|
||||
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
|
||||
// 详细可见:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/components/table.html#usetable
|
||||
// 详细可见:https://doc.iocoder.cn/vue3/crud-schema/
|
||||
const { tableObject, tableMethods } = useTable({
|
||||
getListApi: MailLogApi.getMailLogPage // 分页接口
|
||||
})
|
||||
|
@ -5,7 +5,7 @@ import * as MailAccountApi from '@/api/system/mail/account'
|
||||
// 邮箱账号的列表
|
||||
const accountList = await MailAccountApi.getSimpleMailAccountList()
|
||||
|
||||
// CrudSchema:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
|
||||
// CrudSchema:https://doc.iocoder.cn/vue3/crud-schema/
|
||||
const crudSchemas = reactive<CrudSchema[]>([
|
||||
{
|
||||
label: '编号',
|
||||
|
@ -73,7 +73,7 @@ import MailTemplateSendForm from './MailTemplateSendForm.vue'
|
||||
|
||||
// tableObject:表格的属性对象,可获得分页大小、条数等属性
|
||||
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
|
||||
// 详细可见:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/components/table.html#usetable
|
||||
// 详细可见:https://doc.iocoder.cn/vue3/crud-schema/
|
||||
const { tableObject, tableMethods } = useTable({
|
||||
getListApi: MailTemplateApi.getMailTemplatePage, // 分页接口
|
||||
delListApi: MailTemplateApi.deleteMailTemplate // 删除接口
|
||||
|
@ -17,7 +17,7 @@ export const rules = reactive({
|
||||
status: [required]
|
||||
})
|
||||
|
||||
// CrudSchema:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
|
||||
// CrudSchema:https://doc.iocoder.cn/vue3/crud-schema/
|
||||
const crudSchemas = reactive<CrudSchema[]>([
|
||||
{
|
||||
label: '模板编码',
|
||||
|
Loading…
Reference in New Issue
Block a user