提交修改、

pull/1/head
袁野 4 years ago
parent dd70fae0d6
commit 62939f2e4f
  1. 22
      src/app/admin/coupon/coupon-edit/coupon-edit.component.html
  2. 4
      src/app/admin/coupon/coupon-edit/coupon-edit.component.ts

@ -31,6 +31,28 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'displayArea'" nzRequired>展示区域</nz-form-label>
<nz-form-control nzErrorTip="请选择展示区域!">
<nz-select nzPlaceHolder="请选择展示区域" [formControlName]="'displayArea'">
<nz-option nzValue="1" nzLabel="赠券专区"></nz-option>
<nz-option nzValue="2" nzLabel="金币专区"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'payType'" nzRequired>支付类型</nz-form-label>
<nz-form-control nzErrorTip="请选择支付类型!">
<nz-select nzPlaceHolder="请选择支付类型" [formControlName]="'payType'">
<nz-option nzValue="1" nzLabel="微信支付"></nz-option>
<nz-option nzValue="2" nzLabel="金币支付"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'couponPrice'" nzRequired>卡券面值</nz-form-label>

@ -79,6 +79,8 @@ export class CouponEditComponent implements OnInit {
discountPrice: [null, [Validators.required]],
merchantId: [null, [Validators.required]],
isPresent: [false, [Validators.required]],
payType: [false, [Validators.required]],
displayArea: [false, [Validators.required]],
handselCouponId: [null],
status: [null],
couponKey: [null],
@ -255,6 +257,8 @@ export class CouponEditComponent implements OnInit {
this.coupon.getCouponById(id, data => {
if (data['return_code'] === '000000') {
data['return_data']['couponType'] = String(data['return_data']['couponType']);
data['return_data']['displayArea'] = String(data['return_data']['displayArea']);
data['return_data']['payType'] = String(data['return_data']['payType']);
this.content = data['return_data']['couponDesc'];
if (data['return_data']['couponImg'] != null && data['return_data']['couponImg'] !== '') {
const couponImg = String(data['return_data']['couponImg']);

Loading…
Cancel
Save