提交代码

master
胡锐 1 year ago
parent 34ab01e956
commit 6e6318a7a2
  1. 2
      src/app/admin/trade-checking/trade-checking-detail/trade-checking-detail.component.html
  2. 26
      src/app/admin/trade-checking/trade-checking-detail/trade-checking-detail.component.ts
  3. 2
      src/app/admin/trade-checking/trade-checking/trade-checking.component.html
  4. 27
      src/app/admin/trade-checking/trade-checking/trade-checking.component.ts

@ -10,7 +10,7 @@
<nz-form-item>
<nz-form-label [nzSpan]="8">商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear nzShowSearch formControlName="merNo" [nzDropdownMatchSelectWidth]="false">
<nz-select nzShowSearch formControlName="merNo" [nzDropdownMatchSelectWidth]="false">
<nz-option *ngFor="let item of merArray" nzLabel="({{item.merNo}}){{item.merName}}" nzValue="{{item.merNo}}"></nz-option>
</nz-select>
</nz-form-control>

@ -6,6 +6,8 @@ import {MerService} from '../../../services/mer.service';
import {TradeCheckingService} from '../../../services/trade-checking.service';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import {environment} from '../../../../environments/environment';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../services/local-storage.service';
@Component({
selector: 'app-trade-checking-detail',
@ -35,15 +37,19 @@ export class TradeCheckingDetailComponent implements OnInit {
};
dataDetailModal = false;
currentDate = new Date();
// 角色类型 0:超级管理员 1:公司 2:代理商 3:业务员 4:商户 5:门店
roleType: number;
constructor(private modal: NzModalService,
private message: NzMessageService,
private form: FormBuilder,
private platformService: PlatformService,
private localStorage: LocalStorageService,
private merService: MerService,
private tradeCheckingService: TradeCheckingService) {
}
ngOnInit(): void {
this.roleType = this.localStorage.get(ADMIN_INFO_OBJECT)['secRole'].roleType;
this.currentDate.setDate(this.currentDate.getDate() - 1);
this.searchForm = this.form.group({
merNo: [null],
@ -53,13 +59,19 @@ export class TradeCheckingDetailComponent implements OnInit {
settleTimeE: [ this.currentDate.getTime() ],
});
this.merService.getMerList({ merStatus: 1, pageNum: 1, pageSize: 9999}, data => {
this.merArray = data['return_data']['list'];
if (this.merArray.length > 0) {
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData(this.pageNum, this.pageSize);
}
});
if (this.roleType == 2) {
this.merService.getMerList({ merStatus: 1, pageNum: 1, pageSize: 9999}, data => {
this.merArray = data['return_data']['list'];
if (this.merArray.length > 0) {
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData(this.pageNum, this.pageSize);
}
});
} else if (this.roleType == 4) {
this.merArray.push(this.localStorage.get(ADMIN_INFO_OBJECT)['mer']);
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData(this.pageNum, this.pageSize);
}
}
/**

@ -10,7 +10,7 @@
<nz-form-item>
<nz-form-label [nzSpan]="8">商户号</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear nzShowSearch formControlName="merNo" [nzDropdownMatchSelectWidth]="false">
<nz-select nzShowSearch formControlName="merNo" [nzDropdownMatchSelectWidth]="false">
<nz-option *ngFor="let item of merArray" nzLabel="({{item.merNo}}){{item.merName}}" nzValue="{{item.merNo}}"></nz-option>
</nz-select>
</nz-form-control>

@ -6,6 +6,8 @@ import {TradeCheckingService} from '../../../services/trade-checking.service';
import {MerService} from '../../../services/mer.service';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import {environment} from '../../../../environments/environment';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../services/local-storage.service';
@Component({
selector: 'app-trade-checking',
templateUrl: './trade-checking.component.html',
@ -29,15 +31,20 @@ export class TradeCheckingComponent implements OnInit {
settleList: []
};
currentDate = new Date();
// 角色类型 0:超级管理员 1:公司 2:代理商 3:业务员 4:商户 5:门店
roleType: number;
constructor(private modal: NzModalService,
private message: NzMessageService,
private form: FormBuilder,
private platformService: PlatformService,
private localStorage: LocalStorageService,
private merService: MerService,
private tradeCheckingService: TradeCheckingService) {
}
ngOnInit(): void {
this.roleType = this.localStorage.get(ADMIN_INFO_OBJECT)['secRole'].roleType;
this.currentDate.setDate(this.currentDate.getDate() - 1);
this.searchForm = this.form.group({
merNo: [null],
@ -45,13 +52,19 @@ export class TradeCheckingComponent implements OnInit {
settleTimeE: [ this.currentDate.getTime() ],
});
this.merService.getMerList({ merStatus: 1, pageNum: 1, pageSize: 9999}, data => {
this.merArray = data['return_data']['list'];
if (this.merArray.length > 0) {
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData();
}
});
if (this.roleType == 2) {
this.merService.getMerList({ merStatus: 1, pageNum: 1, pageSize: 9999}, data => {
this.merArray = data['return_data']['list'];
if (this.merArray.length > 0) {
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData();
}
});
} else if (this.roleType == 4) {
this.merArray.push(this.localStorage.get(ADMIN_INFO_OBJECT)['mer']);
this.searchForm.controls['merNo'].setValue(this.merArray[0]['merNo']);
this.requestData();
}
}
/**

Loading…
Cancel
Save