diff --git a/src/api/pay/demo/index.ts b/src/api/pay/demo/index.ts
index c40ceeb7..9e3d1a3b 100644
--- a/src/api/pay/demo/index.ts
+++ b/src/api/pay/demo/index.ts
@@ -16,6 +16,6 @@ export function createDemoOrder(data) {
}
// 退款示例订单
-export function updateApp(id: number) {
+export function refundDemoOrder(id: number) {
return defHttp.put({ url: '/pay/demo-order/refund?id=' + id })
}
diff --git a/src/api/pay/order/index.ts b/src/api/pay/order/index.ts
index 140ac79c..929cc523 100644
--- a/src/api/pay/order/index.ts
+++ b/src/api/pay/order/index.ts
@@ -112,3 +112,8 @@ export function deleteOrder(id: number) {
export function exportOrder(params: OrderExportReqVO) {
return defHttp.download({ url: '/pay/order/export-excel', params }, '支付订单.xls')
}
+
+// 提交支付订单
+export function submitOrder(data) {
+ return defHttp.post({ url: '/pay/order/submit', data })
+}
diff --git a/src/assets/images/pay/icon/alipay_app.svg b/src/assets/images/pay/icon/alipay_app.svg
new file mode 100644
index 00000000..ebf11883
--- /dev/null
+++ b/src/assets/images/pay/icon/alipay_app.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/images/pay/icon/alipay_bar.svg b/src/assets/images/pay/icon/alipay_bar.svg
new file mode 100644
index 00000000..eb1e1e84
--- /dev/null
+++ b/src/assets/images/pay/icon/alipay_bar.svg
@@ -0,0 +1,2 @@
+
diff --git a/src/assets/images/pay/icon/alipay_pc.svg b/src/assets/images/pay/icon/alipay_pc.svg
new file mode 100644
index 00000000..2a752770
--- /dev/null
+++ b/src/assets/images/pay/icon/alipay_pc.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/images/pay/icon/alipay_qr.svg b/src/assets/images/pay/icon/alipay_qr.svg
new file mode 100644
index 00000000..48337508
--- /dev/null
+++ b/src/assets/images/pay/icon/alipay_qr.svg
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/src/assets/images/pay/icon/alipay_wap.svg b/src/assets/images/pay/icon/alipay_wap.svg
new file mode 100644
index 00000000..87075dbb
--- /dev/null
+++ b/src/assets/images/pay/icon/alipay_wap.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/images/pay/icon/mock.svg b/src/assets/images/pay/icon/mock.svg
new file mode 100644
index 00000000..27b09ead
--- /dev/null
+++ b/src/assets/images/pay/icon/mock.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/images/pay/icon/wx_app.svg b/src/assets/images/pay/icon/wx_app.svg
new file mode 100644
index 00000000..ad40b2a2
--- /dev/null
+++ b/src/assets/images/pay/icon/wx_app.svg
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/src/assets/images/pay/icon/wx_lite.svg b/src/assets/images/pay/icon/wx_lite.svg
new file mode 100644
index 00000000..0c925cf3
--- /dev/null
+++ b/src/assets/images/pay/icon/wx_lite.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/images/pay/icon/wx_pub.svg b/src/assets/images/pay/icon/wx_pub.svg
new file mode 100644
index 00000000..3a6d15b7
--- /dev/null
+++ b/src/assets/images/pay/icon/wx_pub.svg
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/src/components/CardList/src/CardList.vue b/src/components/CardList/src/CardList.vue
index 611a461a..ffc2ab09 100644
--- a/src/components/CardList/src/CardList.vue
+++ b/src/components/CardList/src/CardList.vue
@@ -6,8 +6,8 @@
-
+
+
每行显示数量
diff --git a/src/router/routes/index.ts b/src/router/routes/index.ts
index 95883fe0..db929ac4 100644
--- a/src/router/routes/index.ts
+++ b/src/router/routes/index.ts
@@ -124,6 +124,31 @@ export const JobLogRoute: AppRouteRecordRaw = {
]
}
+export const PayRoute: AppRouteRecordRaw = {
+ path: '/cashRegister',
+ component: LAYOUT,
+ name: 'cashRegister',
+ meta: {
+ title: '收银台',
+ hidden: true
+ },
+ children: [
+ {
+ path: 'submit',
+ component: () => import('@/views/pay/submit/index.vue'),
+ name: 'PayOrderSubmit',
+ meta: {
+ canTo: true,
+ hidden: true,
+ noTagsView: false,
+ icon: 'ep:edit',
+ title: '收银台',
+ activeMenu: 'pay/order/index'
+ }
+ }
+ ]
+}
+
// Basic routing without permission
// 未经许可的基本路由
-export const basicRoutes = [LoginRoute, RootRoute, ProfileRoute, CodegenRoute, JobLogRoute, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE]
+export const basicRoutes = [LoginRoute, RootRoute, ProfileRoute, CodegenRoute, JobLogRoute, PayRoute, REDIRECT_ROUTE, PAGE_NOT_FOUND_ROUTE]
diff --git a/src/views/pay/demo/DemoModal.vue b/src/views/pay/demo/DemoModal.vue
new file mode 100644
index 00000000..40ff1b3b
--- /dev/null
+++ b/src/views/pay/demo/DemoModal.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
diff --git a/src/views/pay/demo/demo.data.ts b/src/views/pay/demo/demo.data.ts
new file mode 100644
index 00000000..a183eca8
--- /dev/null
+++ b/src/views/pay/demo/demo.data.ts
@@ -0,0 +1,110 @@
+import { BasicColumn, FormSchema, useRender } from '@/components/Table'
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
+
+export const columns: BasicColumn[] = [
+ {
+ title: '订单编号',
+ dataIndex: 'id',
+ width: 100
+ },
+ {
+ title: '用户编号',
+ dataIndex: 'userId',
+ width: 100
+ },
+ {
+ title: '商品名字',
+ dataIndex: 'spuName',
+ width: 100
+ },
+ {
+ title: '支付价格',
+ dataIndex: 'price',
+ width: 100,
+ customRender: ({ text }) => {
+ return useRender.renderTag('¥' + (text / 100.0).toFixed(2))
+ }
+ },
+ {
+ title: '退款金额',
+ dataIndex: 'refundPrice',
+ width: 100,
+ customRender: ({ text }) => {
+ return useRender.renderTag('¥' + (text / 100.0).toFixed(2))
+ }
+ },
+ {
+ title: '支付单号',
+ dataIndex: 'payOrderId',
+ width: 100
+ },
+ {
+ title: '创建时间',
+ dataIndex: 'createTime',
+ width: 180,
+ customRender: ({ text }) => {
+ return useRender.renderDate(text)
+ }
+ },
+ {
+ title: '是否支付',
+ dataIndex: 'payed',
+ width: 100,
+ customRender: ({ text }) => {
+ return useRender.renderDict(text, DICT_TYPE.INFRA_BOOLEAN_STRING)
+ }
+ },
+ {
+ title: '支付时间',
+ dataIndex: 'payTime',
+ width: 180,
+ customRender: ({ text }) => {
+ return useRender.renderDate(text)
+ }
+ },
+ {
+ title: '退款时间',
+ dataIndex: 'refundTime',
+ width: 180,
+ customRender: ({ text }) => {
+ return useRender.renderDate(text)
+ }
+ }
+]
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '支付单号',
+ field: 'payOrderId',
+ component: 'Input',
+ colProps: { span: 8 }
+ },
+ {
+ label: '是否支付',
+ field: 'payed',
+ component: 'Select',
+ componentProps: {
+ options: getIntDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING)
+ },
+ colProps: { span: 8 }
+ }
+]
+
+export const formSchema: FormSchema[] = [
+ {
+ label: '商品',
+ field: 'spuId',
+ component: 'Select',
+ defaultValue: 0,
+ required: true,
+ componentProps: {
+ options: [
+ { value: 1, label: '华为手机', price: 1 },
+ { value: 2, label: '小米电视', price: 10 },
+ { value: 3, label: '苹果手表', price: 100 },
+ { value: 4, label: '华硕笔记本', price: 1000 },
+ { value: 5, label: '蔚来汽车', price: 200000 }
+ ]
+ }
+ }
+]
diff --git a/src/views/pay/demo/index.vue b/src/views/pay/demo/index.vue
index 3b64cfc4..a8e05c32 100644
--- a/src/views/pay/demo/index.vue
+++ b/src/views/pay/demo/index.vue
@@ -1,3 +1,74 @@
- 开发中
+
+
+
+ 发起订单
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pay/submit/index.vue b/src/views/pay/submit/index.vue
new file mode 100644
index 00000000..ad0ee01f
--- /dev/null
+++ b/src/views/pay/submit/index.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pay/submit/submit.data.ts b/src/views/pay/submit/submit.data.ts
new file mode 100644
index 00000000..64d97640
--- /dev/null
+++ b/src/views/pay/submit/submit.data.ts
@@ -0,0 +1,38 @@
+import { DescItem } from '@/components/Description'
+import { useRender } from '@/components/Table'
+
+export const descSchema: DescItem[] = [
+ {
+ label: '支付单号',
+ field: 'id'
+ },
+ {
+ label: '商品标题',
+ field: 'subject'
+ },
+ {
+ label: '商品内容',
+ field: 'body'
+ },
+ {
+ label: '支付金额',
+ field: 'amount',
+ render: (curVal) => {
+ return useRender.renderText('¥', parseFloat(curVal || 0 / 100).toFixed(2))
+ }
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ render: (curVal) => {
+ return useRender.renderDate(curVal)
+ }
+ },
+ {
+ label: '过期时间',
+ field: 'expireTime',
+ render: (curVal) => {
+ return useRender.renderDate(curVal)
+ }
+ }
+]