mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 12:05:07 +08:00
mall + pay:简化 pay 的复杂度
1. 移除 merchant 表设计 2. 移除 app 和 channel 的导出
This commit is contained in:
@ -131,7 +131,6 @@ const defaultForm = {
|
||||
remark: '',
|
||||
feeRate: null,
|
||||
appId: '',
|
||||
merchantId: null,
|
||||
aliPayConfig: {
|
||||
appId: '',
|
||||
serverUrl: null,
|
||||
@ -161,13 +160,6 @@ export default {
|
||||
"appId": null,
|
||||
// 渠道编码
|
||||
"payCode": null,
|
||||
// 商户对象
|
||||
"payMerchant": {
|
||||
// 编号
|
||||
"id": null,
|
||||
// 名称
|
||||
"name": null
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -249,7 +241,6 @@ export default {
|
||||
if (newVal.aliPayOpen) {
|
||||
this.form.code = newVal.payCode;
|
||||
this.form.appId = newVal.appId;
|
||||
this.form.merchantId = newVal.payMerchant.id;
|
||||
// 只有在初次进来为编辑 并且为加载中的时候才回去请求数据
|
||||
if (newVal.edit === true && newVal.loading) {
|
||||
this.title = "编辑支付渠道";
|
||||
@ -264,7 +255,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
getChannel(this.transferParam.payMerchant.id, this.transferParam.appId, this.transferParam.payCode)
|
||||
getChannel(this.transferParam.appId, this.transferParam.payCode)
|
||||
.then(response => {
|
||||
this.form.id = response.data.id;
|
||||
this.form.feeRate = response.data.feeRate;
|
||||
|
@ -95,7 +95,6 @@ const defaultForm = {
|
||||
remark: '',
|
||||
feeRate: null,
|
||||
appId: '',
|
||||
merchantId: null,
|
||||
weChatConfig: {
|
||||
appId: '',
|
||||
mchId: '',
|
||||
@ -123,13 +122,6 @@ export default {
|
||||
"appId": null,
|
||||
// 渠道编码
|
||||
"payCode": null,
|
||||
// 商户对象
|
||||
"payMerchant": {
|
||||
// 编号
|
||||
"id": null,
|
||||
// 名称
|
||||
"name": null
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -200,7 +192,6 @@ export default {
|
||||
if (newVal.wechatOpen) {
|
||||
this.form.code = newVal.payCode;
|
||||
this.form.appId = newVal.appId;
|
||||
this.form.merchantId = newVal.payMerchant.id;
|
||||
// 只有在初次进来为编辑 并且为加载中的时候才回去请求数据
|
||||
if (newVal.edit && newVal.loading) {
|
||||
this.title = "编辑支付渠道";
|
||||
@ -214,7 +205,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
getChannel(this.transferParam.payMerchant.id, this.transferParam.appId, this.transferParam.payCode)
|
||||
getChannel(this.transferParam.appId, this.transferParam.payCode)
|
||||
.then(response => {
|
||||
this.form.id = response.data.id;
|
||||
this.form.feeRate = response.data.feeRate;
|
||||
|
@ -7,10 +7,6 @@
|
||||
<el-input v-model="queryParams.name" placeholder="请输入应用名" clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户名称" prop="merchantName">
|
||||
<el-input v-model="queryParams.merchantName" placeholder="请输入商户名称" clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开启状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择开启状态" clearable>
|
||||
<el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label"
|
||||
@ -34,11 +30,6 @@
|
||||
v-hasPermi="['pay:app:create']">新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['pay:app:export']">导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@ -174,23 +165,6 @@
|
||||
<el-form-item label="应用名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入应用名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属商户" prop="merchantId">
|
||||
<el-select
|
||||
v-model="form.merchantId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请选择所属商户"
|
||||
:remote-method="handleGetMerchantListByName"
|
||||
:loading="loading">
|
||||
<el-option
|
||||
v-for="item in merchantList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开启状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="parseInt(dict.value)">
|
||||
@ -221,10 +195,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {createApp, updateApp, changeAppStatus, deleteApp, getApp, getAppPage, exportAppExcel} from "@/api/pay/app";
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import {PayType, PayChannelEnum, CommonStatusEnum} from "@/utils/constants";
|
||||
import {getMerchantListByName} from "@/api/pay/merchant";
|
||||
import { createApp, updateApp, changeAppStatus, deleteApp, getApp, getAppPage } from "@/api/pay/app";
|
||||
import { DICT_TYPE, getDictDatas } from "@/utils/dict";
|
||||
import { PayType, PayChannelEnum, CommonStatusEnum } from "@/utils/constants";
|
||||
import wechatChannelForm from "@/views/pay/app/components/wechatChannelForm";
|
||||
import aliPayChannelForm from "@/views/pay/app/components/aliPayChannelForm";
|
||||
|
||||
@ -254,10 +227,6 @@ export default {
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
payNotifyUrl: null,
|
||||
refundNotifyUrl: null,
|
||||
merchantName: null,
|
||||
createTime: []
|
||||
},
|
||||
// 表单参数
|
||||
@ -268,7 +237,6 @@ export default {
|
||||
status: [{required: true, message: "开启状态不能为空", trigger: "blur"}],
|
||||
payNotifyUrl: [{required: true, message: "支付结果的回调地址不能为空", trigger: "blur"}],
|
||||
refundNotifyUrl: [{required: true, message: "退款结果的回调地址不能为空", trigger: "blur"}],
|
||||
merchantId: [{required: true, message: "商户编号不能为空", trigger: "blur"}],
|
||||
},
|
||||
// 数据字典
|
||||
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
|
||||
@ -277,8 +245,6 @@ export default {
|
||||
payChannelEnum: PayChannelEnum,
|
||||
// 支付类型
|
||||
payType: PayType,
|
||||
// 商户列表
|
||||
merchantList: [],
|
||||
// 是否显示支付窗口
|
||||
payOpen: false,
|
||||
// 微信组件传参参数
|
||||
@ -305,7 +271,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.handleGetMerchantListByName(null);
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
@ -332,7 +297,6 @@ export default {
|
||||
remark: undefined,
|
||||
payNotifyUrl: undefined,
|
||||
refundNotifyUrl: undefined,
|
||||
merchantId: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -411,28 +375,6 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
// 执行导出
|
||||
this.$modal.confirm('是否确认导出所有支付应用信息数据项?').then(function () {
|
||||
return exportAppExcel(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '支付应用信息.xls');
|
||||
}).catch(() => {});
|
||||
},
|
||||
/**
|
||||
* 根据商户名称模糊匹配商户信息
|
||||
* @param name 商户名称
|
||||
*/
|
||||
handleGetMerchantListByName(name) {
|
||||
getMerchantListByName(name).then(response => {
|
||||
this.merchantList = response.data;
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 修改支付渠道信息
|
||||
*/
|
||||
@ -440,7 +382,6 @@ export default {
|
||||
this.settingChannelParam(row, payCode, type)
|
||||
this.channelParam.edit = true;
|
||||
this.channelParam.loading = true;
|
||||
|
||||
},
|
||||
/**
|
||||
* 新增支付渠道信息
|
||||
@ -475,9 +416,6 @@ export default {
|
||||
*/
|
||||
judgeChannelExist(channels, channelCode) {
|
||||
return channels.indexOf(channelCode) !== -1;
|
||||
},
|
||||
refreshTable() {
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -79,7 +79,6 @@
|
||||
|
||||
<script>
|
||||
import {createDemoOrder, getDemoOrderPage, refundDemoOrder} from "@/api/pay/demo";
|
||||
import {deleteMerchant} from "@/api/pay/merchant";
|
||||
|
||||
export default {
|
||||
name: "PayDemoOrder",
|
||||
|
@ -1,282 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="商户号" prop="no">
|
||||
<el-input v-model="queryParams.no" placeholder="请输入商户号" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户全称" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入商户全称" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户简称" prop="shortName">
|
||||
<el-input v-model="queryParams.shortName" placeholder="请输入商户简称" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开启状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择开启状态" clearable>
|
||||
<el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
|
||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['pay:merchant:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport"
|
||||
v-hasPermi="['pay:merchant:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="商户编号" align="center" prop="id" />
|
||||
<el-table-column label="商户号" align="center" prop="no" />
|
||||
<el-table-column label="商户全称" align="center" prop="name" />
|
||||
<el-table-column label="商户简称" align="center" prop="shortName" />
|
||||
<el-table-column label="开启状态" align="center" prop="status" >
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['pay:merchant:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['pay:merchant:delete']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<!-- <el-form-item label="商户号" prop="no">-->
|
||||
<!-- <el-input v-model="form.no" placeholder="请输入商户号" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="商户全称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入商户全称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户简称" prop="shortName">
|
||||
<el-input v-model="form.shortName" placeholder="请输入商户简称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开启状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="parseInt(dict.value)">
|
||||
{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createMerchant,
|
||||
updateMerchant,
|
||||
changeMerchantStatus,
|
||||
deleteMerchant,
|
||||
getMerchant,
|
||||
getMerchantPage,
|
||||
exportMerchantExcel
|
||||
} from "@/api/pay/merchant";
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import {CommonStatusEnum} from "@/utils/constants";
|
||||
|
||||
export default {
|
||||
name: "PayMerchant",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 支付商户信息列表
|
||||
list: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
no: null,
|
||||
name: null,
|
||||
shortName: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
createTime: []
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
no: [{ required: true, message: "商户号不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "商户全称不能为空", trigger: "blur" }],
|
||||
shortName: [{ required: true, message: "商户简称不能为空", trigger: "blur" }],
|
||||
status: [{ required: true, message: "开启状态不能为空", trigger: "blur" }],
|
||||
},
|
||||
// 商户状态数据字典
|
||||
statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS)
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
getMerchantPage(this.queryParams).then(response => {
|
||||
console.log(response.data);
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
no: undefined,
|
||||
name: undefined,
|
||||
shortName: undefined,
|
||||
status: undefined,
|
||||
remark: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加支付商户信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
getMerchant(row.id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改支付商户信息";
|
||||
});
|
||||
},
|
||||
// 用户状态修改
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.name + '"商户吗?').then(function() {
|
||||
return changeMerchantStatus(row.id, row.status);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
|
||||
: CommonStatusEnum.ENABLE;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.form.id != null) {
|
||||
updateMerchant(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createMerchant(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal.confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?').then(function() {
|
||||
return deleteMerchant(id);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
// 执行导出
|
||||
this.$modal.confirm('是否确认导出所有支付商户信息数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportMerchantExcel(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '支付商户信息.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -3,13 +3,6 @@
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
|
||||
<el-form-item label="所属商户" prop="merchantId">
|
||||
<el-select v-model="queryParams.merchantId" clearable @clear="()=>{queryParams.merchantId = null}"
|
||||
filterable remote reserve-keyword placeholder="请选择所属商户" @change="handleGetAppListByMerchantId"
|
||||
:remote-method="handleGetMerchantListByName" :loading="merchantLoading">
|
||||
<el-option v-for="item in merchantList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用编号" prop="appId">
|
||||
<el-select clearable v-model="queryParams.appId" filterable placeholder="请选择应用信息">
|
||||
<el-option v-for="item in appList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
@ -70,12 +63,9 @@
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="订单编号" align="center" prop="id" width="80"/>
|
||||
<!-- <el-table-column label="商户名称" align="center" prop="merchantName" width="120"/>-->
|
||||
<!-- <el-table-column label="应用名称" align="center" prop="appName" width="120"/>-->
|
||||
<el-table-column label="支付渠道" align="center" width="130">
|
||||
<template v-slot="scope">
|
||||
<el-popover trigger="hover" placement="top">
|
||||
<p>商户名称: {{ scope.row.merchantName }}</p>
|
||||
<p>应用名称: {{ scope.row.appName }}</p>
|
||||
<p>渠道名称: {{ scope.row.channelCodeName }}</p>
|
||||
<div slot="reference" class="name-wrapper">
|
||||
@ -86,12 +76,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="支付订单" align="left" width="280">
|
||||
<template v-slot="scope">
|
||||
<p class="order-font"><el-tag size="mini">商户</el-tag> {{scope.row.merchantOrderId}}</p>
|
||||
<p class="order-font"><el-tag size="mini" type="warning">支付</el-tag> {{scope.row.channelOrderNo}}</p>
|
||||
<p class="order-font"><el-tag size="mini">商户单号</el-tag> {{scope.row.merchantOrderId}}</p>
|
||||
<p class="order-font"><el-tag size="mini" type="warning">支付单号</el-tag> {{scope.row.channelOrderNo}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="商户订单编号" align="center" prop="merchantOrderId" width="140"/>-->
|
||||
<!-- <el-table-column label="渠道订单号" align="center" prop="channelOrderNo" width="140"/>-->
|
||||
<el-table-column label="商品标题" align="center" prop="subject" width="180" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="支付金额" align="center" prop="amount" width="100">
|
||||
<template v-slot="scope">
|
||||
@ -149,7 +137,6 @@
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog title="订单详情" :visible.sync="open" 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>
|
||||
@ -215,14 +202,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrderDetail, getOrderPage, exportOrderExcel} from "@/api/pay/order";
|
||||
import {getMerchantListByName} from "@/api/pay/merchant";
|
||||
import {getAppListByMerchantId} from "@/api/pay/app";
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import { getOrderDetail, getOrderPage, exportOrderExcel } from "@/api/pay/order";
|
||||
import { DICT_TYPE, getDictDatas } from "@/utils/dict";
|
||||
import { getNowDateTime} from "@/utils/ruoyi";
|
||||
|
||||
const defaultOrderDetail = {
|
||||
merchantName: '',
|
||||
appName: '',
|
||||
channelCodeName: '',
|
||||
subject: '',
|
||||
@ -266,11 +250,10 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
// 查询参数 TODO 芋艿:多余字段的清理
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
merchantId: null,
|
||||
appId: null,
|
||||
channelId: null,
|
||||
channelCode: null,
|
||||
@ -386,32 +369,12 @@ export default {
|
||||
this.$download.excel(response, '支付订单.xls');
|
||||
}).catch(() => {});
|
||||
},
|
||||
/**
|
||||
* 根据商户名称模糊匹配商户信息
|
||||
* @param name 商户名称
|
||||
*/
|
||||
handleGetMerchantListByName(name) {
|
||||
getMerchantListByName(name).then(response => {
|
||||
this.merchantList = response.data;
|
||||
this.merchantLoading = false;
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 根据商户 ID 查询支付应用信息
|
||||
*/
|
||||
handleGetAppListByMerchantId() {
|
||||
this.queryParams.appId = null;
|
||||
getAppListByMerchantId(this.queryParams.merchantId).then(response => {
|
||||
this.appList = response.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.desc-label {
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.tag-purple {
|
||||
|
@ -2,13 +2,6 @@
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
|
||||
<el-form-item label="所属商户" prop="merchantId">
|
||||
<el-select v-model="queryParams.merchantId" clearable @clear="()=>{queryParams.merchantId = null}"
|
||||
filterable remote reserve-keyword placeholder="请选择所属商户" @change="handleGetAppListByMerchantId"
|
||||
:remote-method="handleGetMerchantListByName" :loading="merchantLoading">
|
||||
<el-option v-for="item in merchantList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用编号" prop="appId">
|
||||
<el-select clearable v-model="queryParams.appId" filterable placeholder="请选择应用信息">
|
||||
<el-option v-for="item in appList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
@ -65,12 +58,9 @@
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="编号" align="center" prop="id"/>
|
||||
<!-- <el-table-column label="商户名称" align="center" prop="merchantName" width="120"/>-->
|
||||
<!-- <el-table-column label="应用名称" align="center" prop="appName" width="120"/>-->
|
||||
<el-table-column label="支付渠道" align="center" width="130">
|
||||
<template v-slot="scope">
|
||||
<el-popover trigger="hover" placement="top">
|
||||
<p>商户名称: {{ scope.row.merchantName }}</p>
|
||||
<p>应用名称: {{ scope.row.appName }}</p>
|
||||
<p>渠道名称: {{ scope.row.channelCodeName }}</p>
|
||||
<div slot="reference" class="name-wrapper">
|
||||
@ -156,7 +146,6 @@
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog title="退款订单详情" :visible.sync="open" width="700px" append-to-body>
|
||||
<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>
|
||||
@ -221,14 +210,9 @@
|
||||
|
||||
<script>
|
||||
import {getRefundPage, exportRefundExcel, getRefund} from "@/api/pay/refund";
|
||||
import {getMerchantListByName} from "@/api/pay/merchant";
|
||||
import {getAppListByMerchantId} from "@/api/pay/app";
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import {
|
||||
PayOrderRefundStatusEnum,
|
||||
PayRefundStatusEnum
|
||||
} from "@/utils/constants";
|
||||
import {getNowDateTime} from "@/utils/ruoyi";
|
||||
import { DICT_TYPE, getDictDatas } from "@/utils/dict";
|
||||
import { PayOrderRefundStatusEnum, PayRefundStatusEnum } from "@/utils/constants";
|
||||
import { getNowDateTime } from "@/utils/ruoyi";
|
||||
|
||||
const defaultRefundDetail = {
|
||||
id: null,
|
||||
@ -244,8 +228,6 @@ const defaultRefundDetail = {
|
||||
channelRefundNo: '',
|
||||
createTime: null,
|
||||
expireTime: null,
|
||||
merchantId: null,
|
||||
merchantName: '',
|
||||
merchantOrderId: '',
|
||||
merchantRefundNo: '',
|
||||
notifyStatus: null,
|
||||
@ -284,7 +266,6 @@ export default {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
merchantId: null,
|
||||
appId: null,
|
||||
channelId: null,
|
||||
channelCode: null,
|
||||
@ -398,15 +379,6 @@ export default {
|
||||
this.merchantLoading = false;
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 根据商户 ID 查询支付应用信息
|
||||
*/
|
||||
handleGetAppListByMerchantId() {
|
||||
this.queryParams.appId = null;
|
||||
getAppListByMerchantId(this.queryParams.merchantId).then(response => {
|
||||
this.appList = response.data;
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 根据退款类别得到样式名称
|
||||
* @param refundType 退款类别
|
||||
|
Reference in New Issue
Block a user