Merge remote-tracking branch 'origin/2.0-dev' into 2.0-dev

pull/1/head
袁野 2 years ago
commit 3ac78dadd4
  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"> <div class="inner-content">
<span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span> <span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
<div class="operating-button"> <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> <button nz-button nzType="primary" class="right-btn" (click)="exportExcel()" ><i nz-icon nzType="export" nzTheme="outline"></i>导出Excel</button>
</div> </div>

@ -48,7 +48,7 @@ export class OrderCouponListComponent implements OnInit {
companyArray = []; companyArray = [];
REFUND_COUPON_BTN = false; REFUND_COUPON_BTN = false;
GZ_SINOPEC_STATUS = false;
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
private store: LocalStorageService, private store: LocalStorageService,
@ -103,6 +103,14 @@ export class OrderCouponListComponent implements OnInit {
this.couponSourceArray = data['return_data']; 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.REFUND_COUPON_BTN = this.commonsService.isBtnCompetence("BTN_REFUND_COUPON_BTN");
this.requestData(1); this.requestData(1);
@ -292,4 +300,17 @@ export class OrderCouponListComponent implements OnInit {
this.refundModal = false; 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; float: right;
} }
.operating-button button { .operating-button button {
margin-bottom: 15px; margin-bottom: 6px;
margin-left: 10px; margin-left: 10px;
} }
.table { .table {

Loading…
Cancel
Save