提交代码

pull/1/head
胡锐 2 years ago
parent 33966d0f66
commit 42e1593dd9
  1. 4
      src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.html
  2. 23
      src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.ts
  3. 2
      src/styles.scss

@ -165,6 +165,10 @@
<div class="inner-content">
<span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="default" class="switch">
贵州中石化
<nz-switch [(ngModel)]="GZ_SINOPEC_STATUS" (ngModelChange)="updateGzSinopecStatus()" nzCheckedChildren="开启" nzUnCheckedChildren="关闭"></nz-switch>
</button>
<button nz-button nzType="primary" class="right-btn" (click)="exportExcel()" ><i nz-icon nzType="export" nzTheme="outline"></i>导出Excel</button>
</div>

@ -48,7 +48,7 @@ export class OrderCouponListComponent implements OnInit {
companyArray = [];
REFUND_COUPON_BTN = false;
GZ_SINOPEC_STATUS = false;
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
@ -103,6 +103,14 @@ export class OrderCouponListComponent implements OnInit {
this.couponSourceArray = data['return_data'];
});
this.commonsService.mappingSysNameOl("GZ_SINOPEC_STATUS", data => {
if (data['return_data']['codeValue'] === 'true') {
this.GZ_SINOPEC_STATUS = false;
} else {
this.GZ_SINOPEC_STATUS = true;
}
});
this.REFUND_COUPON_BTN = this.commonsService.isBtnCompetence("BTN_REFUND_COUPON_BTN");
this.requestData(1);
@ -292,4 +300,17 @@ export class OrderCouponListComponent implements OnInit {
this.refundModal = false;
}
updateGzSinopecStatus() {
this.commonsService.updateDictionary('GZ_SINOPEC_STATUS', this.GZ_SINOPEC_STATUS === false?'true':'false', data => {
if (data['return_code'] === '000000') {
this.GZ_SINOPEC_STATUS === false?'true':'false';
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
this.GZ_SINOPEC_STATUS === false?'false':'true';
}
});
}
}

@ -50,7 +50,7 @@
float: right;
}
.operating-button button {
margin-bottom: 15px;
margin-bottom: 6px;
margin-left: 10px;
}
.table {

Loading…
Cancel
Save