提价代理商

pull/1/head
袁野 3 years ago
parent f681f5d881
commit 641b2e0bf9
  1. 12
      src/app/admin/agent/agent-edit/agent-edit.component.html
  2. 2
      src/app/admin/agent/agent-edit/agent-edit.component.ts
  3. 14
      src/app/admin/agent/agent-list/agent-list.component.html
  4. 14
      src/app/admin/agent/agent-list/agent-list.component.ts
  5. 1
      src/environments/environment.prod.ts
  6. 1
      src/environments/environment.test.ts
  7. 1
      src/environments/environment.ts

@ -49,6 +49,18 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'agentName'" nzRequired>代理商类型</nz-form-label>
<nz-form-control nzErrorTip="请选择代理商类型!">
<nz-select nzShowSearch nzAllowClear formControlName="type" nzPlaceHolder="请选择代理商类型">
<nz-option nzLabel="卡券代理商" nzValue="1"></nz-option>
<nz-option nzLabel="汇联通代理商" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'agentAddress'" nzRequired>代理商地址</nz-form-label>

@ -43,7 +43,7 @@ export class AgentEditComponent implements OnInit {
loginName: [null, [Validators.required, ValidatorsService.maxLength(20)]],
password: [null, [Validators.required]],
agentName: [null, [Validators.required]],
type: [1],
type: [null, [Validators.required]],
agentUser: [null, [Validators.required, ValidatorsService.maxLength(50)]],
agentPhone: [null, [Validators.required, ValidatorsService.maxLength(50)]],
agentAddress: [null, [Validators.required, ValidatorsService.maxLength(80)]],

@ -34,6 +34,17 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">代理商类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="type" nzPlaceHolder="请选择代理商类型">
<nz-option nzLabel="卡券代理商" nzValue="1"></nz-option>
<nz-option nzLabel="汇联通代理商" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
@ -75,6 +86,7 @@
<th nzWidth="50px">编号</th>
<th nzWidth="80px">代理商名称</th>
<th nzWidth="80px">代理商地址</th>
<th nzWidth="80px">邀请链接</th>
<th nzWidth="80px">联系人</th>
<th nzWidth="70px">联系方式</th>
<th nzWidth="100px">创建时间</th>
@ -86,6 +98,7 @@
<td>{{i + 1}}</td>
<td>{{data.agentName}}</td>
<td>{{data.agentAddress}}</td>
<td nzBreakWord>{{inviteUrl + data.id}}</td>
<td>{{data.agentUser}}</td>
<td>{{data.agentPhone}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
@ -95,6 +108,7 @@
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li class="li-a" nz-menu-item><a (click)="getDistribution(data.id)">分发卡券</a></li>
<li class="li-a" nz-menu-item><a (click)="generateAgentQrCode(data.id)">生成二维码</a></li>
<li class="li-a" nz-menu-item><a (click)="getDiscount(data.id)">绑定优惠券</a></li>
<li class="li-a" nz-menu-item><a (click)="getDiscountList(data.id)">优惠券列表</a></li>
<li class="li-a" nz-menu-item><a (click)="getDistributionList(data.id)">分发列表</a></li>

@ -18,6 +18,8 @@ import {CouponService} from '../../../services/coupon.service';
export class AgentListComponent implements OnInit {
WEB_SERVE_URL = environment.imageUrl;
FILE_URL = environment.baseUrl;
inviteUrl = environment.inviteUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 搜索框
validateFormDistribute: FormGroup; // 搜索框
@ -70,7 +72,7 @@ export class AgentListComponent implements OnInit {
agentName: [null],
agentPhone: [null],
status: [null],
type: [1],
type: [null],
});
this.validateForm = this.form.group({
discountId: [null, [Validators.required]],
@ -306,5 +308,15 @@ export class AgentListComponent implements OnInit {
handleCancelListShow() {
this.isVisibleShow = false;
}
public generateAgentQrCode(id: number): void {
this.agent.generateRechargeAgentQrCode(id, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -3,4 +3,5 @@ export const environment = {
baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址)
imageUrl: 'https://hsg.dctpay.com/filesystem/',
key: 'https://hsg.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsg.dctpay.com/wx/?action=ic&id=',
};

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

@ -9,6 +9,7 @@ export const environment = {
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.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