diff --git a/.env.development b/.env.development index 671ee0c..726b6ea 100644 --- a/.env.development +++ b/.env.development @@ -12,14 +12,14 @@ ENV = 'development' # VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期 # VITE_ADMIN_PROXY_PATH = http://localhost:9999/ VITE_ADMIN_PROXY_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地 -# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境线上 +# VITE_ADMIN_PROXY_PATH = https://stgl.pj.gov.cn/api # 正式环境线上 # 图片访问基础地址 # VITE_IMAGE_BASE_PATH = http://123.157.250.162:8089/api/ # 测试线上 # VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期 # VITE_IMAGE_BASE_PATH = http://localhost:9999 VITE_IMAGE_BASE_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地 -# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上 +# VITE_IMAGE_BASE_PATH = https://stgl.pj.gov.cn/api/ # 正式环境线上 # 代码生成服务地址 VITE_GEN_PROXY_PATH = http://192.168.110.156:5003 diff --git a/src/api/thirdparty/third-pay-order.ts b/src/api/thirdparty/third-pay-order.ts index a0f007e..ad4dcbe 100644 --- a/src/api/thirdparty/third-pay-order.ts +++ b/src/api/thirdparty/third-pay-order.ts @@ -8,6 +8,15 @@ export function fetchList(query?: Object) { }) } +// 小程序退款 +export function miniRefund(data?: any) { + return request({ + url: "/third/third-mini-app-pay/refund", + method: "post", + data: data, + }) +} + export function addObj(obj?: Object) { return request({ url: "/third/third-pay-order", diff --git a/src/views/thirdparty/third-pay-order/index.vue b/src/views/thirdparty/third-pay-order/index.vue index ba1533a..fa1c1a3 100644 --- a/src/views/thirdparty/third-pay-order/index.vue +++ b/src/views/thirdparty/third-pay-order/index.vue @@ -2,6 +2,9 @@
+ + + @@ -65,16 +68,57 @@ - + - + + + + @@ -108,6 +152,7 @@ const selectObjs = ref([]) as any const multiple = ref(true) const state: BasicTableProps = reactive({ + createdIsNeed: false, queryForm: {}, pageList: thirdPayOrderApi.fetchList }) @@ -122,6 +167,14 @@ const { tableStyle } = useTable(state) +onMounted(() => { + const { query } = useRoute() + if (query.payNo) { + state.queryForm.payNo = query.payNo + } + getDataList() +}) + // 清空搜索条件 const resetQuery = () => { // 清空搜索条件 @@ -131,6 +184,24 @@ const resetQuery = () => { getDataList() } +const refund = async (row: any) => { + try { + await useMessageBox().confirm(`此操作将退款${row.price}元`) + } catch { + return + } + try { + await thirdPayOrderApi.miniRefund({ + payNo: row.payNo, + refundPrice: '' + }) + getDataList() + useMessage().success("退款成功") + } catch (err: any) { + useMessage().error(err.msg) + } +} + // 导出excel const exportExcel = () => { downBlobFile('/third/third-pay-order/export', Object.assign(state.queryForm, { ids: selectObjs }), 'thirdPayOrder.xlsx') diff --git a/src/views/wallet/components/transaction-list.vue b/src/views/wallet/components/transaction-list.vue index bee9e92..3e25643 100644 --- a/src/views/wallet/components/transaction-list.vue +++ b/src/views/wallet/components/transaction-list.vue @@ -1,17 +1,26 @@