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