提及修改赠券

pull/1/head
袁野 3 years ago
parent ee77471f6d
commit 0eaf435888
  1. 1
      src/app/admin/activate/activate-edit/activate-edit.component.ts
  2. 11
      src/app/admin/discount/discount-edit/discount-edit.component.html
  3. 12
      src/app/admin/discount/discount-edit/discount-edit.component.ts

@ -246,7 +246,6 @@ export class ActivateEditComponent implements OnInit {
}
// 新增
addField(i): void {
if (

@ -32,7 +32,16 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'usingRange'" nzRequired>优惠券使用范围</nz-form-label>
<nz-form-control nzErrorTip="请选择优惠券使用范围!">
<nz-select formControlName="usingRange" nzAllowClear nzPlaceHolder="请选择优惠券使用范围">
<nz-option *ngFor="let item of usingRange" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8" *ngIf="validateForm.value.discountType === '1'">
<nz-form-item>
<nz-form-label [nzFor]="'discountCondition'" nzRequired>满减条件价格</nz-form-label>

@ -28,6 +28,7 @@ export class DiscountEditComponent implements OnInit {
editFlag = false;
id: number;
discountImg = [];
usingRange = [];
WEB_SERVE_URL = environment.baseUrl;
previewImage: string | undefined = '';
previewVisible = false;
@ -36,6 +37,7 @@ export class DiscountEditComponent implements OnInit {
private fb: FormBuilder,
private discount: DiscountService,
private common: CommonsService,
private commonsService: CommonsService,
private message: NzMessageService, // 信息提示
private activatedRoute: ActivatedRoute,
) {
@ -55,11 +57,16 @@ export class DiscountEditComponent implements OnInit {
discountType: [null, [Validators.required]],
discountPrice: [null, [Validators.required]],
salesEndTime: [null, [Validators.required]],
usingRange: [null, [Validators.required]],
effectiveDay: [1, [Validators.required]],
status: [null],
createTime: [null],
secUser: {},
});
this.commonsService.getDictionary('USING_RANGE', data => {
this.usingRange = data['return_data'];
});
}
@ -93,9 +100,10 @@ export class DiscountEditComponent implements OnInit {
this.validateForm.value.discountImg = this.discountImg[0].name;
}
} else {
this.message.error('请上传卡券图片');
return;
// this.message.error('请上传卡券图片');
// return;
}
this.validateForm.value.discountImg = 'img';
if (this.editFlag) {
this.common.showConfirm('是否确定修改,确定将下架', dataR => {

Loading…
Cancel
Save