diff --git a/src/app/admin/recharge-order/price-list/price-list.component.html b/src/app/admin/recharge-order/price-list/price-list.component.html
index 5039ea2..3d5e244 100644
--- a/src/app/admin/recharge-order/price-list/price-list.component.html
+++ b/src/app/admin/recharge-order/price-list/price-list.component.html
@@ -19,6 +19,18 @@
+
+
+ 展示区域
+
+
+
+
+
+
+
+
+
@@ -56,6 +68,7 @@
编号 |
金额类型 |
+ 展示区域 |
充值金额 |
@@ -68,6 +81,7 @@
{{i + 1}} |
{{data.type | rechargePrice}} |
+ {{data.showType | priceShow}} |
{{data.price}} |
@@ -94,6 +108,16 @@
+
+ 展示区域
+
+
+
+
+
+
+
+
商品排序
diff --git a/src/app/admin/recharge-order/price-list/price-list.component.ts b/src/app/admin/recharge-order/price-list/price-list.component.ts
index bbaaaaf..b1d4cb3 100644
--- a/src/app/admin/recharge-order/price-list/price-list.component.ts
+++ b/src/app/admin/recharge-order/price-list/price-list.component.ts
@@ -50,9 +50,11 @@ export class PriceListComponent implements OnInit {
public init(): void {
this.searchForm = this.form.group({
type: [null],
+ showType: [null],
});
this.validateForm = this.form.group({
type: [null, [Validators.required]],
+ showType: [null, [Validators.required]],
price: [null, [Validators.required]],
realPrice: [{value: null, disabled: true}, [Validators.required]],
// goodsId: [null, [Validators.required]],
@@ -126,6 +128,7 @@ export class PriceListComponent implements OnInit {
}
}
this.validateForm.value.realPrice = this.validateForm.value.price * this.validateForm.value.discount / 100;
+
if (this.edit) {
this.validateForm.value['id'] = this.id;
this.recharge.updatePrice(this.validateForm.value, data => {
diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts
index 24cc92b..a77b7d3 100644
--- a/src/app/app-common.module.ts
+++ b/src/app/app-common.module.ts
@@ -31,11 +31,13 @@ import {
StatusPipe,
RechargePayTypePipe,
RefundSourcePipe,
- RefundStatusPipe
+ RefundStatusPipe,
+ PreOrderStatusPipe,
+ ButtonPipe,
+ DiscountPackageStatusPipe,
+ PriceShowPipe
} from './pipes';
-import { PreOrderStatusPipe } from './pipes/order/pre-order-status.pipe';
-import { ButtonPipe } from './pipes/commons/button.pipe';
-import { DiscountPackageStatusPipe } from './pipes/discount-package-status.pipe';
+
@@ -66,6 +68,7 @@ const PIPES = [
PreOrderStatusPipe,
ButtonPipe,
DiscountPackageStatusPipe,
+ PriceShowPipe,
];
diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts
index 59570c6..cfd317a 100644
--- a/src/app/pipes/index.ts
+++ b/src/app/pipes/index.ts
@@ -23,3 +23,4 @@ export * from './audit/refund-status.pipe';
export * from './order/pre-order-status.pipe';
export * from './commons/button.pipe';
export * from './discount-package-status.pipe';
+export * from './price-show.pipe';
diff --git a/src/app/pipes/price-show.pipe.ts b/src/app/pipes/price-show.pipe.ts
new file mode 100644
index 0000000..0727094
--- /dev/null
+++ b/src/app/pipes/price-show.pipe.ts
@@ -0,0 +1,18 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'priceShow'
+})
+export class PriceShowPipe implements PipeTransform {
+
+ transform(value: number): string {
+ switch (value) {
+ case 1:
+ return '小程序';
+ case 2:
+ return 'H5';
+ case 3:
+ return '银联';
+ }
+ }
+}
\ No newline at end of file