pull/1/head
袁野 3 years ago
parent 20599242c2
commit 91aea05052
  1. 9
      src/app/admin/order/order-coupon/order-coupon.component.html
  2. 12
      src/app/admin/order/order-coupon/order-coupon.component.ts
  3. 6
      src/app/services/agent.service.ts
  4. 8
      src/environments/environment.ts

@ -3,6 +3,15 @@
<!-- end 面包屑 -->
<div class="inner-content">
<nz-form-item>
<nz-form-label [nzSm]="2" [nzXs]="24" >卡券类型</nz-form-label>
<nz-form-control [nzSm]="7" [nzXs]="24" >
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择类型" (ngModelChange)="getAgentCount($event)" [(ngModel)]="type">
<nz-option nzLabel="消核码" [nzValue]="1"></nz-option>
<nz-option nzLabel="兑换码" [nzValue]="2"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-card nzTitle="销售统计">
<div nz-card-grid [ngStyle]="gridStyle">销售总额: ¥{{countData['salesCountPrice']}}</div>
<div nz-card-grid [ngStyle]="gridStyle">剩余总额: ¥{{countData['surplusCountPrice']}}</div>

@ -27,7 +27,7 @@ export class OrderCouponComponent implements OnInit {
loading = true;
isVisible = false;
id;
type = 1;
countData = {};
constructor(
private form: FormBuilder,
@ -40,13 +40,17 @@ export class OrderCouponComponent implements OnInit {
}
ngOnInit(): void {
this.agent.getAgentCount(data => {
this.countData = data['return_data'];
});
this.searchForm = this.form.group({
status: [null],
salesCode: [null],
});
this.getAgentCount(this.type);
}
public getAgentCount(type) {
this.agent.getAgentCount(type , data => {
this.countData = data['return_data'];
});
}
// 查询列表

@ -170,10 +170,12 @@ export class AgentService {
/**
*
*
* @param type
* @param callBack
*/
public getAgentCount(callBack) {
this.http.get(environment.baseUrl + 'highCouponAgent/getAgentCount').subscribe(data => {
public getAgentCount(type , callBack) {
console.log(type);
this.http.get(environment.baseUrl + 'highCouponAgent/getAgentCount?type=' + type).subscribe(data => {
callBack(data);
});
}

@ -4,10 +4,10 @@
export const environment = {
production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/',
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
// baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'http://localhost:9302/filesystem/',
baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsg.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};

Loading…
Cancel
Save