提交代码

master
胡锐 1 year ago
parent 3262442c29
commit 6195edd2ba
  1. 2
      src/app/admin/agent/agent-list/agent-list.component.html
  2. 22
      src/app/admin/agent/agent-list/agent-list.component.ts
  3. 7
      src/environments/environment.ts

@ -127,7 +127,7 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>平台类型</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired>平台类型</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select formControlName="platformType"> <nz-select formControlName="platformType" (ngModelChange)="platformTypeChange($event)">
<nz-option *ngFor="let data of platformTypeArray" nzLabel="{{data.codeName}}" nzValue="{{data.codeValue}}"></nz-option> <nz-option *ngFor="let data of platformTypeArray" nzLabel="{{data.codeName}}" nzValue="{{data.codeValue}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>

@ -28,6 +28,7 @@ export class AgentListComponent implements OnInit {
tradeTakeConfigMadel = false; tradeTakeConfigMadel = false;
platformTypeArray = []; platformTypeArray = [];
agentId: number;
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
private agentService: AgentService, private agentService: AgentService,
@ -48,7 +49,7 @@ export class AgentListComponent implements OnInit {
}); });
this.tradeTakeConfigForm = this.form.group({ this.tradeTakeConfigForm = this.form.group({
platformType: ['4', [Validators.required]], platformType: ['1', [Validators.required]],
receiverName: [null, [Validators.required]], receiverName: [null, [Validators.required]],
receiverAccount: [null, [Validators.required]], receiverAccount: [null, [Validators.required]],
receiverRatio: [100, [Validators.required]], receiverRatio: [100, [Validators.required]],
@ -57,6 +58,7 @@ export class AgentListComponent implements OnInit {
subReceiverAccount: [null, [Validators.required]], subReceiverAccount: [null, [Validators.required]],
subReceiverRatio: [{ value: 0, disabled: true }, [Validators.required]], subReceiverRatio: [{ value: 0, disabled: true }, [Validators.required]],
subReceiverObjectId: [null, [Validators.required]], subReceiverObjectId: [null, [Validators.required]],
agentId: [null],
}); });
this.searchForm = this.form.group({ this.searchForm = this.form.group({
@ -182,6 +184,7 @@ export class AgentListComponent implements OnInit {
* *
*/ */
showTradeTakeConfigMadel(agentId: number) { showTradeTakeConfigMadel(agentId: number) {
this.agentId = agentId;
this.tradeTakeConfigService.getAgentTradeTakeConfig(this.tradeTakeConfigForm.controls['platformType'].value, agentId, data => { this.tradeTakeConfigService.getAgentTradeTakeConfig(this.tradeTakeConfigForm.controls['platformType'].value, agentId, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
if (data['return_data'] != null) { if (data['return_data'] != null) {
@ -252,4 +255,21 @@ export class AgentListComponent implements OnInit {
this.tradeTakeConfigForm.controls['subReceiverRatio'].setValue(100 - ratio); this.tradeTakeConfigForm.controls['subReceiverRatio'].setValue(100 - ratio);
} }
platformTypeChange(number) {
if (number != null) {
this.tradeTakeConfigService.getAgentTradeTakeConfig(number, this.agentId, data => {
if (data['return_code'] === '000000') {
if (data['return_data'] != null) {
data['return_data']['platformType'] = String(data['return_data']['platformType']);
data['return_data']['receiverRatio'] = data['return_data']['receiverRatio'] * 100;
data['return_data']['subReceiverRatio'] = data['return_data']['subReceiverRatio'] * 100;
this.tradeTakeConfigForm.patchValue(data['return_data']);
} else {
this.tradeTakeConfigForm.controls['subReceiverObjectId'].setValue(this.agentId);
}
}
});
}
}
} }

@ -5,8 +5,11 @@
export const environment = { export const environment = {
production: false, production: false,
// baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://gratia-pay.dctpay.com/filesystem/', // imageUrl: 'https://gratia-pay.dctpay.com/filesystem/',
// obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com',
baseUrl: 'http://localhost:9602/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9602/filesystem/',
obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com', obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com',
}; };

Loading…
Cancel
Save