Browse Source

优化通道页面

test 7 months ago
parent
commit
083ca03dfd
4 changed files with 31 additions and 10 deletions
  1. 5 1
      build/cool/temp/eps.d.ts
  2. 3 1
      src/modules/dj/views/channel.vue
  3. 23 8
      src/modules/dj/views/mchChannel.vue
  4. 0 0
      stats.html

+ 5 - 1
build/cool/temp/eps.d.ts

@@ -698,6 +698,10 @@ declare namespace Eps {
 		 * KYC_ID
 		 */
 		customerId?: string;
+		/**
+		 * email
+		 */
+		email?: string;
 		/**
 		 * country
 		 */
@@ -1257,7 +1261,7 @@ declare namespace Eps {
 		 */
 		service?: string;
 		/**
-		 * 
+		 * ���
 		 */
 		currency?: string;
 		/**

+ 3 - 1
src/modules/dj/views/channel.vue

@@ -166,7 +166,9 @@ const Table = useTable({
 	autoHeight: false,
 	columns: [
 		{ type: "selection" },
-		{ prop: "name", label: "通道名" },
+		{
+			prop: "name", label: "通道名", width: 160
+		},
 		{ prop: "code", label: "通道编码" },
 		{ prop: "currency", label: "货币单位" },
 		{ prop: "payType", label: "支付方式" },

+ 23 - 8
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 + '(' + item.currency + ')',
-									value: item.code + '_' + item.currency
+									label: item.name,
+									value: item.name
 								}
 							})
 						);
@@ -119,7 +119,7 @@ const Upsert = useUpsert({
 				props: {
 					onChange(data) {
 						const channel: any = channels.value.find((item: any) => {
-							return item.code + '_' + item.currency === data
+							return item.name === data
 						})
 						if (channel) {
 							Upsert.value?.setForm('payType', channel.payType)
@@ -174,23 +174,25 @@ const Upsert = useUpsert({
 				}
 			})
 		);
-		channels.value = await service.dj.comm.getChannels();
 		Upsert.value?.setOptions(
 			'code',
 			channels.value.map((item: any) => {
 				return {
-					label: item.code + '(' + item.currency + ')',
-					value: item.code + '_' + item.currency
+					label: item.name,
+					value: item.name
 				}
 			})
 		);
 		if (data.code) {
-			data.code = data.code + '_' + data.currency;
+			const find: any = channels.value.find((item: any) => {
+				return item.payType === data.payType && item.code === data.code
+			})
+			data.code = find?.name
 		}
 	},
 	async onSubmit(data, { next }) {
 		const channel: any = channels.value.find((item: any) => {
-			return item.code + '_' + item.currency === data.code
+			return item.name === data.code
 		})
 		if (channel) {
 			data.code = channel.code
@@ -204,6 +206,14 @@ const Table = useTable({
 	autoHeight: false,
 	columns: [
 		{ prop: "mchId", label: "商户号" },
+		{
+			prop: "channelName", label: "通道名", formatter: (row) => {
+				const find: any = channels.value.find((item: any) => {
+					return item.payType === row.payType && item.code === row.code;
+				})
+				return find?.name;
+			}
+		},
 		{ prop: "payType", label: "支付方式" },
 		{
 			prop: "code",
@@ -219,6 +229,10 @@ const Table = useTable({
 	]
 });
 
+async function initChannles() {
+	channels.value = await service.dj.comm.getChannels();
+}
+
 // cl-crud
 const Crud = useCrud(
 	{
@@ -226,6 +240,7 @@ const Crud = useCrud(
 	},
 	(app) => {
 		app.refresh();
+		initChannles();
 	}
 );
 </script>

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