提交代码

master
胡锐 2 years ago
parent 24ed2cfc1f
commit a579a1be63
  1. 98
      src/app/admin/agent/agent-list/agent-list.component.html
  2. 17
      src/app/admin/agent/agent-list/agent-list.component.scss
  3. 101
      src/app/admin/agent/agent-list/agent-list.component.ts
  4. 70
      src/app/admin/company/company-list/company-list.component.html
  5. 7
      src/app/admin/company/company-list/company-list.component.scss
  6. 81
      src/app/admin/company/company-list/company-list.component.ts
  7. 2
      src/app/admin/device/device-list/device-list.component.html
  8. 4
      src/app/admin/device/device-list/device-list.component.ts
  9. 7
      src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.html
  10. 1
      src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.ts
  11. 1
      src/app/admin/store-discount-activity/store-discount-activity-list/store-discount-activity-list.component.html
  12. 11
      src/app/admin/trade-take-config/trade-take-config-routing.module.ts
  13. 14
      src/app/admin/trade-take-config/trade-take-config.module.ts
  14. 68
      src/app/services/trade-take-config.service.ts
  15. 6
      src/environments/environment.prod.ts
  16. 6
      src/environments/environment.ts

@ -87,7 +87,7 @@
<th nzWidth="200px">详细地址</th> <th nzWidth="200px">详细地址</th>
<th nzWidth="100px">状态</th> <th nzWidth="100px">状态</th>
<th nzWidth="160px">创建时间</th> <th nzWidth="160px">创建时间</th>
<th nzWidth="150px" nzRight="0px">操作</th> <th nzWidth="120px" nzRight="0px">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -101,13 +101,101 @@
<td>{{data.status | agentStatus}}</td> <td>{{data.status | agentStatus}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" class="table-td-operation"> <td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu">更多操作<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item><a [routerLink]="['/admin/agent/update']" [queryParams]="{agentId: data.id}">修改</a></li>
<li nz-menu-item><a *ngIf="data.status === 1" (click)="showDisableAgentConfirm(data.id, true)">停用</a></li>
<li nz-menu-item><a *ngIf="data.status === 2" (click)="showDisableAgentConfirm(data.id, false)">启用</a></li>
<li nz-menu-item><a (click)="showDeleteConfirm(data.id)">删除</a></li>
<li nz-menu-item><a (click)="showTradeTakeConfigMadel(data.id)">交易分账配置</a></li>
</ul>
</nz-dropdown-menu>
<!--<a [routerLink]="['/admin/agent/detail']" [queryParams]="{agentId: data.id}">详情</a>--> <!--<a [routerLink]="['/admin/agent/detail']" [queryParams]="{agentId: data.id}">详情</a>-->
<a [routerLink]="['/admin/agent/update']" [queryParams]="{agentId: data.id}">修改</a>
<a *ngIf="data.status === 1" (click)="showDisableAgentConfirm(data.id, true)">停用</a>
<a *ngIf="data.status === 2" (click)="showDisableAgentConfirm(data.id, false)">启用</a>
<a (click)="showDeleteConfirm(data.id)">删除</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
<nz-modal [(nzVisible)]="tradeTakeConfigMadel" nzTitle="交易分账配置" (nzOnCancel)="closeTradeTakeConfigMadel()" [nzFooter]="null">
<form nz-form [formGroup]="tradeTakeConfigForm">
<div nz-row>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>平台类型</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select formControlName="platformType">
<nz-option *ngFor="let data of platformTypeArray" nzLabel="{{data.codeName}}" nzValue="{{data.codeValue}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div class="title">公司入账配置</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>入账商户名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input type="text" formControlName="receiverName" placeholder="请填写平台的商户名称" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>平台入账商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input type="text" formControlName="receiverAccount" placeholder="请填写平台的商户号" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>分账比例(%)</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number formControlName="receiverRatio" [nzPrecision]="4" [nzMax]="100" [nzMin]="0" nzPlaceHolder="分账比例" (ngModelChange)="compute($event)"></nz-input-number>
</nz-form-control>
</nz-form-item>
</div>
<div class="title">代理商入账配置</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>入账商户名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input type="text" formControlName="subReceiverName" placeholder="请填写平台的商户名称" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>平台入账商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input type="text" formControlName="subReceiverAccount" placeholder="请填写平台的商户号" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>分账比例(%)</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number formControlName="subReceiverRatio" nzDisabled [nzPrecision]="4" [nzMax]="100" [nzMin]="0" nzPlaceHolder="分账比例"></nz-input-number>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-control [nzOffset]="7" [nzSpan]="12">
<button nz-button (click)="submitTradeTakeConfig()" nzType="primary" >确定</button>
<button nz-button (click)="closeTradeTakeConfigMadel()">取消</button>
</nz-form-control>
</nz-form-item>
</div>
</div>
</form>
</nz-modal>

@ -1,3 +1,20 @@
.table-td-operation a { .table-td-operation a {
padding: 0px 5px; padding: 0px 5px;
} }
.title {
width: 100%;
height: 46px;
line-height: 46px;
font-size: 16px;
text-align: center;
color: #1890ff;
background-color: #f3f9ff;
margin-bottom: 20px;
}
nz-input-number {
width: 100%;
}
button {
width: 100px;
margin-left: 8px;
}

@ -1,10 +1,12 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {NzMessageService, NzModalService} from 'ng-zorro-antd'; import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {AgentService} from '../../../services/agent.service'; import {AgentService} from '../../../services/agent.service';
import {FormBuilder, FormGroup} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {CompanyService} from '../../../services/company.service'; import {CompanyService} from '../../../services/company.service';
import {LocalStorageService} from '../../../services/local-storage.service'; import {LocalStorageService} from '../../../services/local-storage.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {TradeTakeConfigService} from '../../../services/trade-take-config.service';
import {CommonsService} from '../../../services/commons.service';
@Component({ @Component({
selector: 'app-agent-list', selector: 'app-agent-list',
@ -16,26 +18,46 @@ export class AgentListComponent implements OnInit {
dataObject: any = {}; dataObject: any = {};
tableLoading = true; tableLoading = true;
searchForm: FormGroup; searchForm: FormGroup;
tradeTakeConfigForm: FormGroup;
pageNum: number; pageNum: number;
whereObject: any = {}; whereObject: any = {};
userObjectType: number; userObjectType: number;
companyArray = []; companyArray = [];
tradeTakeConfigMadel = false;
platformTypeArray = [];
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
private agentService: AgentService, private agentService: AgentService,
private companyService: CompanyService, private companyService: CompanyService,
private commonsService: CommonsService,
private localStorageService: LocalStorageService, private localStorageService: LocalStorageService,
private tradeTakeConfigService: TradeTakeConfigService,
private form: FormBuilder) { private form: FormBuilder) {
this.userObjectType = Number(this.localStorageService.get(ADMIN_INFO_OBJECT)['secUser']['objectType']); this.userObjectType = Number(this.localStorageService.get(ADMIN_INFO_OBJECT)['secUser']['objectType']);
} }
ngOnInit(): void { ngOnInit(): void {
if (this.userObjectType != null && this.userObjectType === 0) { if (this.userObjectType != null && this.userObjectType === 0) {
this.getCompanyList(); this.getCompanyList();
} }
this.commonsService.getDictionary('PLATFORM_TYPE', data => {
this.platformTypeArray = data['return_data'];
});
this.tradeTakeConfigForm = this.form.group({
platformType: ['4', [Validators.required]],
receiverName: [null, [Validators.required]],
receiverAccount: [null, [Validators.required]],
receiverRatio: [100, [Validators.required]],
subReceiverName: [null, [Validators.required]],
subReceiverAccount: [null, [Validators.required]],
subReceiverRatio: [{ value: 0, disabled: true }, [Validators.required]],
subReceiverObjectId: [null, [Validators.required]],
});
this.searchForm = this.form.group({ this.searchForm = this.form.group({
companyId: [null], companyId: [null],
@ -155,4 +177,79 @@ export class AgentListComponent implements OnInit {
}); });
} }
/**
*
*/
showTradeTakeConfigMadel(agentId: number) {
this.tradeTakeConfigService.getAgentTradeTakeConfig(this.tradeTakeConfigForm.controls['platformType'].value, 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(agentId);
}
}
});
this.tradeTakeConfigMadel = true;
}
/**
*
*/
closeTradeTakeConfigMadel() {
this.tradeTakeConfigForm.reset();
this.tradeTakeConfigForm.controls['platformType'].setValue('4');
this.tradeTakeConfigForm.controls['receiverRatio'].setValue('100');
this.tradeTakeConfigForm.controls['subReceiverRatio'].setValue('0');
this.tradeTakeConfigMadel = false;
}
/**
*
*/
submitTradeTakeConfig() {
for (const i in this.tradeTakeConfigForm.controls) {
this.tradeTakeConfigForm.controls[i].markAsDirty();
this.tradeTakeConfigForm.controls[i].updateValueAndValidity();
}
if (this.tradeTakeConfigForm.status == null || this.tradeTakeConfigForm.status !== 'VALID') {
this.modal.warning({
nzTitle: '提示',
nzContent: '请规范填写所有的必填项信息',
});
return;
}
this.tradeTakeConfigForm.value['receiverRatio'] = this.tradeTakeConfigForm.controls['receiverRatio']['value'] / 100;
this.tradeTakeConfigForm.value['subReceiverRatio'] = this.tradeTakeConfigForm.controls['subReceiverRatio']['value'] / 100;
this.tradeTakeConfigService.editAgentConfig(this.tradeTakeConfigForm.value, data => {
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '添加成功',
nzOnOk: () => this.closeTradeTakeConfigMadel()
});
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
});
}
/**
*
* @param ratio
* @param subRatio
*/
compute(ratio: number) {
// console.log(parentRatio);
// this.tradeTakeConfigForm['receiverRatio'].value = parentRatio;
this.tradeTakeConfigForm.controls['subReceiverRatio'].setValue(100 - ratio);
}
} }

@ -48,7 +48,7 @@
<th nzWidth="150px">联系电话</th> <th nzWidth="150px">联系电话</th>
<th nzWidth="200px">详细地址</th> <th nzWidth="200px">详细地址</th>
<th nzWidth="160px">创建时间</th> <th nzWidth="160px">创建时间</th>
<th nzWidth="150px" nzRight="0px">操作</th> <th nzWidth="120px" nzRight="0px">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -60,10 +60,76 @@
<td>{{data.address?data.address:'未填写'}}</td> <td>{{data.address?data.address:'未填写'}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" class="table-td-operation"> <td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu">更多操作<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item><a [routerLink]="['/admin/company/update']" [queryParams]="{companyId: data.id}">修改</a></li>
<li nz-menu-item><a (click)="showTradeTakeConfigMadel(data.id)">交易分账配置</a></li>
</ul>
</nz-dropdown-menu>
<!--<a [routerLink]="['/admin/agent/detail']" [queryParams]="{agentId: data.id}">详情</a>--> <!--<a [routerLink]="['/admin/agent/detail']" [queryParams]="{agentId: data.id}">详情</a>-->
<a [routerLink]="['/admin/company/update']" [queryParams]="{companyId: data.id}">修改</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
<nz-modal [(nzVisible)]="tradeTakeConfigMadel" nzTitle="交易分账配置" (nzOnCancel)="closeTradeTakeConfigMadel()" [nzFooter]="null">
<form nz-form [formGroup]="tradeTakeConfigForm">
<div nz-row>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>交易平台类型</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select formControlName="platformType">
<nz-option *ngFor="let data of platformTypeArray" nzLabel="{{data.codeName}}" nzValue="{{data.codeValue}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>入账商户名称</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input type="text" formControlName="receiverName" placeholder="请填写平台的商户名称" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>入账商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input type="text" formControlName="receiverAccount" placeholder="请填写平台的商户号" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>抽成比例(%)</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number formControlName="receiverRatio" [nzPrecision]="4" [nzMax]="100" [nzMin]="0" nzPlaceHolder="分账比例" ></nz-input-number>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-control [nzOffset]="7" [nzSpan]="12">
<button nz-button (click)="submitTradeTakeConfig()" nzType="primary" >确定</button>
<button nz-button (click)="closeTradeTakeConfigMadel()">取消</button>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div class="btn-div">
<!--<button class="btn-post" nz-button nzType="primary" (click)="submitFrom()" [nzLoading]="btnLoading" nzBlock>保存</button>-->
</div>
</form>
</nz-modal>

@ -0,0 +1,7 @@
button {
width: 100px;
margin-left: 8px;
}
nz-input-number {
width: 100%;
}

@ -1,7 +1,9 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService, NzModalService} from 'ng-zorro-antd'; import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {CompanyService} from '../../../services/company.service'; import {CompanyService} from '../../../services/company.service';
import {CommonsService} from '../../../services/commons.service';
import {TradeTakeConfigService} from '../../../services/trade-take-config.service';
@Component({ @Component({
selector: 'app-company-list', selector: 'app-company-list',
@ -13,18 +15,34 @@ export class CompanyListComponent implements OnInit {
dataObject: any = {}; dataObject: any = {};
tableLoading = true; tableLoading = true;
searchForm: FormGroup; searchForm: FormGroup;
tradeTakeConfigForm: FormGroup;
pageNum: number; pageNum: number;
whereObject: any = {}; whereObject: any = {};
tradeTakeConfigMadel = false;
platformTypeArray = [];
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
private companyService: CompanyService, private companyService: CompanyService,
private commonsService: CommonsService,
private tradeTakeConfigService: TradeTakeConfigService,
private form: FormBuilder) { } private form: FormBuilder) { }
ngOnInit(): void { ngOnInit(): void {
this.searchForm = this.form.group({ this.searchForm = this.form.group({
name: [null], name: [null],
}); });
this.commonsService.getDictionary('PLATFORM_TYPE', data => {
this.platformTypeArray = data['return_data'];
});
this.tradeTakeConfigForm = this.form.group({
companyId: [null, [Validators.required]],
platformType: ['4', [Validators.required]],
receiverName: [null, [Validators.required]],
receiverAccount: [null, [Validators.required]],
receiverRatio: [0, [Validators.required]]
});
this.requestData(1); this.requestData(1);
} }
@ -61,4 +79,65 @@ export class CompanyListComponent implements OnInit {
this.searchForm.reset(); this.searchForm.reset();
} }
/**
*
*/
showTradeTakeConfigMadel(companyId: number) {
this.tradeTakeConfigService.getTradeTakeConfig(companyId, this.tradeTakeConfigForm.controls['platformType'].value, 1 , 2, null, 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;
this.tradeTakeConfigForm.patchValue(data['return_data']);
} else {
this.tradeTakeConfigForm.controls['companyId'].setValue(companyId);
}
}
});
this.tradeTakeConfigMadel = true;
}
/**
*
*/
closeTradeTakeConfigMadel() {
this.tradeTakeConfigForm.reset();
this.tradeTakeConfigForm.controls['platformType'].setValue('4');
this.tradeTakeConfigForm.controls['receiverRatio'].setValue(0);
this.tradeTakeConfigMadel = false;
}
/**
*
*/
submitTradeTakeConfig() {
for (const i in this.tradeTakeConfigForm.controls) {
this.tradeTakeConfigForm.controls[i].markAsDirty();
this.tradeTakeConfigForm.controls[i].updateValueAndValidity();
}
if (this.tradeTakeConfigForm.status == null || this.tradeTakeConfigForm.status !== 'VALID') {
this.modal.warning({
nzTitle: '提示',
nzContent: '请规范填写所有的必填项信息',
});
return;
}
this.tradeTakeConfigForm.value['receiverRatio'] = this.tradeTakeConfigForm.controls['receiverRatio']['value'] / 100;
this.tradeTakeConfigService.editParentCompanyConfig(this.tradeTakeConfigForm.value, data => {
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '保存成功',
nzOnOk: () => this.closeTradeTakeConfigMadel()
});
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
});
}
} }

@ -151,7 +151,7 @@
<li *ngIf="BTN_STORE_UNBIND && data.storeName != null" (click)="showUnbindStore(data.id)" nz-menu-item>门店解绑</li> <li *ngIf="BTN_STORE_UNBIND && data.storeName != null" (click)="showUnbindStore(data.id)" nz-menu-item>门店解绑</li>
<li *ngIf="BTN_DEVICE_DISABLE && data.status == 1" (click)="showDisable(data.id)" nz-menu-item>停用</li> <li *ngIf="BTN_DEVICE_DISABLE && data.status == 1" (click)="showDisable(data.id)" nz-menu-item>停用</li>
<li *ngIf="BTN_DEVICE_ENABLE && data.status == 2" (click)="showEnable(data.id)" nz-menu-item>启用</li> <li *ngIf="BTN_DEVICE_ENABLE && data.status == 2" (click)="showEnable(data.id)" nz-menu-item>启用</li>
<li *ngIf="BTN_DEVICE_DEL" (click)="showDeleteConfirm(data.id)" nz-menu-item>删除</li> <li *ngIf="BTN_DEVICE_DEL" (click)="showDeleteConfirm(data)" nz-menu-item>删除</li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
</td> </td>

@ -178,7 +178,7 @@ export class DeviceListComponent implements OnInit {
showDeleteConfirm(data: object): void { showDeleteConfirm(data: object): void {
this.modal.confirm({ this.modal.confirm({
nzTitle: '警告', nzTitle: '警告',
nzContent: '是否删除该设备?', nzContent: '设备编号:' + data['deviceNo'] + ',是否删除该设备?',
nzOkText: '是', nzOkText: '是',
nzCancelText: '否', nzCancelText: '否',
nzOkType: 'danger', nzOkType: 'danger',
@ -279,6 +279,7 @@ export class DeviceListComponent implements OnInit {
this.loadingObject.spinning = false; this.loadingObject.spinning = false;
return; return;
} }
this.importDeviceModal = false;
this.deviceService.importDevice(this.importDeviceForm.value, data => { this.deviceService.importDevice(this.importDeviceForm.value, data => {
this.loadingObject.spinning = false; this.loadingObject.spinning = false;
@ -298,6 +299,7 @@ export class DeviceListComponent implements OnInit {
}); });
} }
} else { } else {
this.importDeviceModal = true;
this.modal.error({ this.modal.error({
nzTitle: '提示', nzTitle: '提示',
nzContent: data['return_msg'], nzContent: data['return_msg'],

@ -53,6 +53,13 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" [nzFor]="'finalCostPrice'" nzRequired>{{dataForm.value.discountType === '3' ? '成本折扣' : '成本优惠'}}</nz-form-label>
<nz-form-control [nzSm]="6" [nzXs]="24" nzErrorTip="{{dataForm.value.discountType === '3' ? '请输入成本折扣' : '请输入成本优惠'}}">
<input nz-input [type]="'number'" placeholder="{{dataForm.value.discountType === '3' ? '请输入成本折扣' : '请输入成本优惠'}}" [formControlName]="'discountPrice'"/>
</nz-form-control>
</nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>活动结束时间</nz-form-label> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>活动结束时间</nz-form-label>
<nz-form-control [nzSm]="6" [nzXs]="24"> <nz-form-control [nzSm]="6" [nzXs]="24">

@ -34,6 +34,7 @@ export class StoreDiscountActivityEditComponent implements OnInit {
discountType: [1, [Validators.required]], discountType: [1, [Validators.required]],
discountCondition: [0, [Validators.required]], discountCondition: [0, [Validators.required]],
discountPrice: [0, [Validators.required]], discountPrice: [0, [Validators.required]],
finalCostPrice: [0, [Validators.required]],
endTime: [null, [Validators.required]], endTime: [null, [Validators.required]],
}); });

@ -102,6 +102,7 @@
<li nz-menu-item *ngIf="data.status == 1 && BTN_STORE_DISCOUNT_ACTIVITY_UPDATE"><a (click)="showUpOnlineConfirm(data.id)">上线</a></li> <li nz-menu-item *ngIf="data.status == 1 && BTN_STORE_DISCOUNT_ACTIVITY_UPDATE"><a (click)="showUpOnlineConfirm(data.id)">上线</a></li>
<li nz-menu-item *ngIf="data.status == 2 && BTN_STORE_DISCOUNT_ACTIVITY_UPDATE"><a (click)="showLowerOnlineConfirm(data.id)">下线</a></li> <li nz-menu-item *ngIf="data.status == 2 && BTN_STORE_DISCOUNT_ACTIVITY_UPDATE"><a (click)="showLowerOnlineConfirm(data.id)">下线</a></li>
<li nz-menu-item *ngIf="data.status == 1 && BTN_STORE_DISCOUNT_ACTIVITY_DEL"><a (click)="showDelConfirm(data.id)">删除</a></li> <li nz-menu-item *ngIf="data.status == 1 && BTN_STORE_DISCOUNT_ACTIVITY_DEL"><a (click)="showDelConfirm(data.id)">删除</a></li>
<li nz-menu-item nzDisabled>暂无其他操作</li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
</td> </td>

@ -0,0 +1,11 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class TradeTakeConfigRoutingModule { }

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TradeTakeConfigRoutingModule } from './trade-take-config-routing.module';
@NgModule({
declarations: [],
imports: [
CommonModule,
TradeTakeConfigRoutingModule
]
})
export class TradeTakeConfigModule { }

@ -0,0 +1,68 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class TradeTakeConfigService {
constructor(
private http: HttpClient,
private commonsService: CommonsService
) { }
/**
*
* @param paramObject
* @param callBack
*/
editParentCompanyConfig(paramObject: object, callBack) {
this.http.post(environment.baseUrl + 'tradeTakeConfig/editParentCompanyConfig', paramObject).subscribe(data => {
callBack(data);
});
}
/**
*
* @param paramObject
* @param callBack
*/
editAgentConfig(paramObject: object, callBack) {
this.http.post(environment.baseUrl + 'tradeTakeConfig/editAgentConfig', paramObject).subscribe(data => {
callBack(data);
});
}
/**
*
* @param paramObject
* @param callBack
*/
getTradeTakeConfig(companyId: number, platformType: number, profitSharingReceiverRole: number, receiverObjectId: number, subReceiverObjectId: number, callBack) {
const param = {
companyId: companyId,
platformType: platformType,
profitSharingReceiverRole: profitSharingReceiverRole,
receiverObjectId: receiverObjectId,
subReceiverObjectId: subReceiverObjectId,
};
this.http.get(environment.baseUrl + 'tradeTakeConfig/getTradeTakeConfig?' + this.commonsService.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param paramObject
* @param callBack
*/
getAgentTradeTakeConfig(platformType: number, agentId: number, callBack) {
this.http.get(environment.baseUrl + 'tradeTakeConfig/getAgentTradeTakeConfig?platformType=' + platformType + '&agentId=' + agentId).subscribe(data => {
callBack(data);
});
}
}

@ -1,6 +1,6 @@
export const environment = { export const environment = {
production: true, production: true,
baseUrl: 'https://pay.bxb.cn/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://pay.dctpay.com//brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://pay.bxb.cn/filesystem/', imageUrl: 'https://pay.dctpay.com/filesystem/',
obsUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com', obsUrl: 'https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com',
}; };

@ -5,9 +5,9 @@
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: 'http://localhost:9602/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://gratia-pay.dctpay.com/filesystem/', imageUrl: 'http://gratia-pay.dctpay.com/filesystem/',
obsUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com', obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com',
}; };
/* /*

Loading…
Cancel
Save