Browse Source

修复BUG

test 8 months ago
parent
commit
60dc665f0b

+ 8 - 0
build/cool/temp/eps.d.ts

@@ -454,6 +454,10 @@ declare namespace Eps {
 		 * 通道编码
 		 */
 		code?: string;
+		/**
+		 * 货币单位
+		 */
+		currency?: string;
 		/**
 		 * 支付方式
 		 */
@@ -603,6 +607,10 @@ declare namespace Eps {
 		 * 通道编码
 		 */
 		code?: string;
+		/**
+		 * 货币单位
+		 */
+		currency?: string;
 		/**
 		 * 权重
 		 */

+ 10 - 2
src/modules/dj/views/channel.vue

@@ -80,6 +80,13 @@ const Upsert = useUpsert({
 			component: { name: "el-input" },
 			span: 12
 		},
+		{
+			prop: "currency",
+			label: "货币单位",
+			required: true,
+			component: { name: "el-input" },
+			span: 12
+		},
 		{
 			prop: "payType",
 			label: "支付方式",
@@ -161,8 +168,9 @@ const Table = useTable({
 		{ type: "selection" },
 		{ prop: "name", label: "通道名" },
 		{ prop: "code", label: "通道编码" },
+		{ prop: "currency", label: "货币单位" },
 		{ prop: "payType", label: "支付方式" },
-		{ prop: "service", label: "代码服务" },
+		// { prop: "service", label: "代码服务" },
 		{
 			prop: "rate",
 			label: "手续费",
@@ -180,7 +188,7 @@ const Table = useTable({
 			}
 		},
 		{ prop: "status", label: "状态", component: { name: "cl-switch" } },
-		{ prop: "remark", label: "备注", showOverflowTooltip: true },
+		// { prop: "remark", label: "备注", showOverflowTooltip: true },
 		// { prop: "createTime", label: "创建时间", sortable: "desc", width: 160 },
 		{ type: "op", buttons: ["edit", "delete"] }
 	]

+ 35 - 7
src/modules/dj/views/mchChannel.vue

@@ -100,8 +100,8 @@ const Upsert = useUpsert({
 							'code',
 							channels.value.filter((item: any) => item.payType === data).map((item: any) => {
 								return {
-									label: item.code,
-									value: item.code
+									label: item.code + '(' + item.currency + ')',
+									value: item.code + '_' + item.currency
 								}
 							})
 						);
@@ -119,15 +119,27 @@ const Upsert = useUpsert({
 				props: {
 					onChange(data) {
 						const channel: any = channels.value.find((item: any) => {
-							return item.code === data
+							return item.code + '_' + item.currency === data
 						})
 						if (channel) {
 							Upsert.value?.setForm('payType', channel.payType)
+							Upsert.value?.setForm('currency', channel.currency)
 						}
 					}
 				}
 			},
-			required: true
+			required: true,
+			span: 12
+		},
+		{
+			prop: "currency",
+			label: "货币单位",
+			required: true,
+			component: {
+				name: "el-input",
+				props: { readonly: true }
+			},
+			span: 12
 		},
 		{
 			prop: "weight",
@@ -167,12 +179,24 @@ const Upsert = useUpsert({
 			'code',
 			channels.value.map((item: any) => {
 				return {
-					label: item.code,
-					value: item.code
+					label: item.code + '(' + item.currency + ')',
+					value: item.code + '_' + item.currency
 				}
 			})
 		);
-	}
+		if (data.code) {
+			data.code = data.code + '_' + data.currency;
+		}
+	},
+	async onSubmit(data, { next }) {
+		const channel: any = channels.value.find((item: any) => {
+			return item.code + '_' + item.currency === data.code
+		})
+		if (channel) {
+			data.code = channel.code
+		}
+		next(data);
+	},
 });
 
 // cl-table
@@ -185,6 +209,10 @@ const Table = useTable({
 			prop: "code",
 			label: "通道编码",
 		},
+		{
+			prop: "currency",
+			label: "货币单位",
+		},
 		{ prop: "weight", label: "权重" },
 		{ prop: "status", label: "状态", component: { name: "cl-switch" } },
 		{ type: "op", buttons: ["edit", "delete"] }

+ 1 - 1
src/modules/dj/views/order.vue

@@ -332,7 +332,7 @@ const Table = useTable({
 			label: "手续费",
 			width: 90,
 			formatter(row) {
-				return (+row.amount).toFixed(2);
+				return (+row.charge).toFixed(2);
 			}
 		},
 		{

File diff suppressed because it is too large
+ 0 - 0
stats.html


Some files were not shown because too many files changed in this diff