Skip to content

Commit 8863d1d

Browse files
committed
REVIEW 支付应用、支付订单
1 parent 0d96645 commit 8863d1d

File tree

11 files changed

+282
-363
lines changed

11 files changed

+282
-363
lines changed

src/api/pay/merchant/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export const getMerchant = (id: number) => {
3939
}
4040

4141
// 根据商户名称搜索商户列表
42-
export const getMerchantListByName = (name: string) => {
42+
export const getMerchantListByName = (name?: string) => {
4343
return request.get({
44-
url: '/pay/merchant/list-by-name?id=',
44+
url: '/pay/merchant/list-by-name',
4545
params: {
4646
name: name
4747
}

src/api/pay/order/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ export const getOrder = async (id: number) => {
8888
return await request.get({ url: '/pay/order/get?id=' + id })
8989
}
9090

91+
// 获得支付订单的明细
92+
export const getOrderDetail = async (id: number) => {
93+
return await request.get({ url: '/pay/order/get-detail?id=' + id })
94+
}
95+
9196
// 新增支付订单
9297
export const createOrder = async (data: OrderVO) => {
9398
return await request.post({ url: '/pay/order/create', data })

src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,21 @@
188188
<!-- <div id="js-properties-panel" class="panel"></div> -->
189189
<!-- <div class="my-process-designer__canvas" ref="bpmn-canvas"></div> -->
190190
</div>
191-
<XModal title="预览" width="80%" height="90%" v-model="previewModelVisible" destroy-on-close>
191+
<Dialog
192+
title="预览"
193+
v-model="previewModelVisible"
194+
width="80%"
195+
:scroll="true"
196+
max-height="600px"
197+
>
192198
<!-- append-to-body -->
193199
<div v-highlight>
194200
<code class="hljs">
195201
<!-- 高亮代码块 -->
196202
{{ previewResult }}
197203
</code>
198204
</div>
199-
<!-- <pre>
200-
<code class="hljs" v-html="highlightedCode(previewType, previewResult)"></code>
201-
</pre> -->
202-
</XModal>
205+
</Dialog>
203206
</div>
204207
</template>
205208

@@ -231,7 +234,7 @@ import activitiModdleExtension from './plugins/extension-moddle/activiti'
231234
import flowableModdleExtension from './plugins/extension-moddle/flowable'
232235
// 引入json转换与高亮
233236
// import xml2js from 'xml-js'
234-
import xml2js from 'fast-xml-parser'
237+
// import xml2js from 'fast-xml-parser'
235238
import { XmlNode, XmlNodeType, parseXmlString } from 'steady-xml'
236239
// 代码高亮插件
237240
// import hljs from 'highlight.js/lib/highlight'
@@ -626,15 +629,15 @@ const elementsAlign = (align) => {
626629
const previewProcessXML = () => {
627630
console.log(bpmnModeler.saveXML, 'bpmnModeler')
628631
bpmnModeler.saveXML({ format: true }).then(({ xml }) => {
629-
console.log(xml, 'xml111111')
632+
// console.log(xml, 'xml111111')
630633
previewResult.value = xml
631634
previewType.value = 'xml'
632635
previewModelVisible.value = true
633636
})
634637
}
635638
const previewProcessJson = () => {
636639
bpmnModeler.saveXML({ format: true }).then(({ xml }) => {
637-
console.log(xml, 'xml')
640+
// console.log(xml, 'xml')
638641
639642
// const rootNode = parseXmlString(xml)
640643
// console.log(rootNode, 'rootNoderootNode')
@@ -644,9 +647,9 @@ const previewProcessJson = () => {
644647
// console.log(JSON.stringify(rootNodes.parent.toJsObject()), 'rootNodes.toJSON()')
645648
// console.log(JSON.stringify(rootNodes.parent.toJSON()), 'rootNodes.toJSON()')
646649
647-
const parser = new xml2js.XMLParser()
648-
let jObj = parser.parse(xml)
649-
console.log(jObj, 'jObjjObjjObjjObjjObj')
650+
// const parser = new xml2js.XMLParser()
651+
// let jObj = parser.parse(xml)
652+
// console.log(jObj, 'jObjjObjjObjjObjjObj')
650653
// const builder = new xml2js.XMLBuilder(xml)
651654
// const xmlContent = builder
652655
// console.log(xmlContent, 'xmlContent')

src/types/auto-imports.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export {}
66
declare global {
77
const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE']
88
const EffectScope: typeof import('vue')['EffectScope']
9-
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
109
const computed: typeof import('vue')['computed']
1110
const createApp: typeof import('vue')['createApp']
1211
const customRef: typeof import('vue')['customRef']

src/views/bpm/oa/leave/detail.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="200">
2+
<Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="200">
33
<el-descriptions border :column="1">
44
<el-descriptions-item label="请假类型">
55
<dict-tag :type="DICT_TYPE.BPM_OA_LEAVE_TYPE" :value="detailData.type" />
@@ -21,13 +21,13 @@ import { DICT_TYPE } from '@/utils/dict'
2121
import { formatDate } from '@/utils/formatTime'
2222
import * as LeaveApi from '@/api/bpm/leave'
2323
24-
const modelVisible = ref(false) // 弹窗的是否展示
24+
const dialogVisible = ref(false) // 弹窗的是否展示
2525
const detailLoading = ref(false) // 表单的加载中
2626
const detailData = ref() // 详情数据
2727
2828
/** 打开弹窗 */
2929
const open = async (data: LeaveApi.LeaveVO) => {
30-
modelVisible.value = true
30+
dialogVisible.value = true
3131
// 设置数据
3232
detailLoading.value = true
3333
try {

src/views/pay/app/AppForm.vue

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Dialog :title="dialogTitle" v-model="dialogVisible" width="50%">
2+
<Dialog :title="dialogTitle" v-model="dialogVisible">
33
<el-form
44
ref="formRef"
55
:model="formData"
@@ -10,17 +10,8 @@
1010
<el-form-item label="应用名" prop="name">
1111
<el-input v-model="formData.name" placeholder="请输入应用名" />
1212
</el-form-item>
13-
1413
<el-form-item label="所属商户" prop="merchantId">
15-
<el-select
16-
v-model="formData.merchantId"
17-
filterable
18-
remote
19-
reserve-keyword
20-
placeholder="请选择所属商户"
21-
:remote-method="handleGetMerchantListByName"
22-
:loading="formLoading"
23-
>
14+
<el-select v-model="formData.merchantId" placeholder="请选择所属商户">
2415
<el-option
2516
v-for="item in merchantList"
2617
:key="item.id"
@@ -61,9 +52,9 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
6152
import * as AppApi from '@/api/pay/app'
6253
import * as MerchantApi from '@/api/pay/merchant'
6354
import { CommonStatusEnum } from '@/utils/constants'
64-
6555
const { t } = useI18n() // 国际化
6656
const message = useMessage() // 消息弹窗
57+
6758
const dialogVisible = ref(false) // 弹窗的是否展示
6859
const dialogTitle = ref('') // 弹窗的标题
6960
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
@@ -104,7 +95,8 @@ const open = async (type: string, id?: number) => {
10495
formLoading.value = false
10596
}
10697
}
107-
await handleGetMerchantListByName(null)
98+
// 加载商户列表
99+
merchantList.value = await MerchantApi.getMerchantListByName()
108100
}
109101
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
110102
@@ -134,14 +126,6 @@ const submitForm = async () => {
134126
}
135127
}
136128
137-
/**
138-
* 根据商户名称模糊匹配商户信息
139-
* @param name 商户名称
140-
*/
141-
const handleGetMerchantListByName = async (name) => {
142-
merchantList.value = await MerchantApi.getMerchantListByName(name)
143-
}
144-
145129
/** 重置表单 */
146130
const resetForm = () => {
147131
formData.value = {

0 commit comments

Comments
 (0)