修改优惠券绑定个问题

pull/1/head
袁野 4 years ago
parent 61d7d2f9b5
commit ecedf9c217
  1. 7
      src/app/admin/agent/agent-list/agent-list.component.html
  2. 5
      src/app/admin/agent/agent-list/agent-list.component.ts
  3. 2
      src/app/admin/discount/discount-edit/discount-edit.component.html
  4. 2
      src/app/admin/merchant/merchant-edit/merchant-edit.component.ts

@ -101,6 +101,7 @@
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="分配优惠券" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-spin [nzSpinning]="isSpinning">
<form nz-form [formGroup]="validateForm" class="login-form">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>优惠券</nz-form-label>
@ -117,6 +118,8 @@
</nz-form-control>
</nz-form-item>
</form>
</nz-spin>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleDiscount" nzWidth="1000" nzTitle="分配优惠券列表" (nzOnCancel)="handleCancelDiscount()" (nzOnOk)="handleCancelDiscount()">
@ -142,7 +145,6 @@
<th nzWidth="70px">有效天数</th>
<th nzWidth="100px">截止日期</th>
<th nzWidth="100px">库存数量</th>
<th nzRight nzWidth="100px">二维码</th>
</tr>
</thead>
<tbody>
@ -164,9 +166,6 @@
<td>{{data['highDiscount'].effectiveDay}}</td>
<td>{{data['highDiscount'].salesEndTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.stockCount}}</td>
<td nzRight>
<img class="head_img" src="{{WEB_SERVE_URL + 'agentQrCode/' + data.qrCode}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td>
</tbody>
</nz-table>
</nz-modal>

@ -28,7 +28,7 @@ export class AgentListComponent implements OnInit {
isVisible = false;
isVisibleDiscount = false;
id: number;
isSpinning = false;
requestDataDiscount = []; // 列表数据
totalDiscount: number; // 页码
pageNumDiscount = 1; // 页码
@ -143,14 +143,15 @@ export class AgentListComponent implements OnInit {
return;
}
}
this.isSpinning = true;
this.validateForm.value['agentId'] = this.id;
this.agent.insertDiscountAgent(this.validateForm.value , data => {
if (data['return_code'] === '000000') {
console.log(data);
this.isVisible = false;
} else {
this.message.error(data['return_msg']);
}
this.isSpinning = false;
});
}

@ -67,7 +67,7 @@
<nz-form-item>
<nz-form-label [nzFor]="'effectiveDay'" nzRequired>领取有效天数</nz-form-label>
<nz-form-control nzErrorTip="请输入领取有效天数!">
<nz-input-number [formControlName]="'effectiveDay'" [nzMin]="1" [nzMax]="100" [nzStep]="1"></nz-input-number>
<nz-input-number [formControlName]="'effectiveDay'" [nzMin]="1" [nzStep]="1"></nz-input-number>
</nz-form-control>
</nz-form-item>
</div>

@ -51,7 +51,7 @@ export class MerchantEditComponent implements OnInit {
this.validateForm = this.fb.group({
loginTelephone: [null, [Validators.required, ValidatorsService.mobile]],
password: [null, [Validators.required, ValidatorsService.minLength(6)]],
merchantName: [null, [Validators.required, ValidatorsService.pwdLength(2, 5)]],
merchantName: [null, [Validators.required]],
telephone: [null, [Validators.required]],
address: [null, [Validators.required]],
bankName: [null],

Loading…
Cancel
Save