This commit is contained in:
wangshiming
2022-05-10 11:14:48 +08:00
parent 8b0d57b9ce
commit 22bd6cc960
4 changed files with 47 additions and 27 deletions

View File

@ -6,10 +6,10 @@ import { SFComponent, SFSchema, SFDateWidgetSchema, SFAutoCompleteWidgetSchema,
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { map, filter } from 'rxjs/operators';
import { PartnerListService } from '../../services/partner-list.service';
import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component';
import { map } from 'rxjs/operators';
@Component({
selector: 'app-partner-list',
@ -24,7 +24,7 @@ export class PartnerListComponent {
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
isLoading: boolean = false
isLoading: boolean = false;
@ViewChild('editTemplate', { static: true })
editTemplate: any;
templateId: any;
@ -55,7 +55,7 @@ export class PartnerListComponent {
};
loadSelectOptions() {
this.service.getRebateConfig({stateLocked: 1}).subscribe(res => {
this.service.getRebateConfig({ stateLocked: 1 }).subscribe(res => {
if (res) {
console.log(res);
@ -319,7 +319,7 @@ export class PartnerListComponent {
{ value: '', label: '全部' },
{ value: '0', label: '未同步' },
{ value: 10, label: '同步失败' },
{ value: 20, label: '同步成功' },
{ value: 20, label: '同步成功' }
],
ui: {
widget: 'select',
@ -355,19 +355,19 @@ export class PartnerListComponent {
asyncData: () =>
this.service.request(this.service.$api_get_rebate_config, {}, 'POST').pipe(
map(data => {
if(data) {
if (data) {
return data.map((m: any) => {
return { label: m.configName, value: m.id };
});
} else {
return [];
}
})
),
visibleIf: {
expand: (value: boolean) => value
} } as SFDateWidgetSchema
}
} as SFDateWidgetSchema
},
lockedStatus: {
type: 'string',
@ -406,7 +406,7 @@ export class PartnerListComponent {
{
title: '合伙人名称',
render: 'enterpriseName',
width: 180,
width: 180
},
{ title: '付款编码', index: 'payCode', width: 160 },
{ title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 },
@ -512,7 +512,27 @@ export class PartnerListComponent {
onSearch(value: string): void {
this.isLoading = true;
console.log(value);
let str = value.replace(/^\s+|\s+$/g, '');
let params: any = {};
if (str) {
console.log(+str);
if (+str) {
console.log('数字');
params.phoneNumber = str;
} else {
console.log('中文');
params.name = str;
}
this.service.request(this.service.$api_get_channel, params).subscribe(res => {
console.log(res);
let NewList: { label: string; value: any; }[] = [];
let List = res.filter((i: any) => {
NewList.push({ label: `${i.name}/${i.telephone}`, value: i.channelId }) ;
});
console.log(NewList);
});
// .pipe(map((res: any) => (res as any[]).map(i => ({ label: `${i.name}/${i.telephone}`, value: i.channelId })))
// this.searchChange$.next(value);
}
}
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-05-06 15:31:19
* @LastEditors : Shiming
* @LastEditTime : 2022-05-10 09:47:38
* @LastEditTime : 2022-05-10 11:13:28
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\etc-invoiced-logs\\etc-invoiced-logs.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -36,7 +36,7 @@
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exportList()" acl [acl-ability]="['TICKET-ETC-INVOICE-LOGS-export']">导出</button>
<button nz-button nzDanger (click)="batchInvoice()" acl [acl-ability]="['TICKET-ETC-INVOICE-LOGS-export']">批量</button>
<button nz-button nzDanger (click)="batchInvoice()" acl [acl-ability]="['TICKET-ETC-INVOICE-LOGS-BatchCreateFicoInpinv']">批量</button>
</div>
</div>
<st

View File

@ -197,8 +197,8 @@ export class ETCInvoicedLogsComponent extends BasicTableComponent {
className: 'text-center',
buttons: [
{
text: '票',
acl: { ability: ['TICKET-CANCELLATION-view'] },
text: '票',
acl: { ability: ['TICKET-ETC-INVOICE-LOGS-createFicoInpinv'] },
click: item => {
this.batchInvoice(item)
}
@ -226,7 +226,7 @@ export class ETCInvoicedLogsComponent extends BasicTableComponent {
this.service.request(this.service.$api_createFicoInpinv, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('票成功!')
this.service.msgSrv.success('票成功!')
this.st.load(1);
}
});

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-23 16:50:17
* @LastEditTime : 2022-04-28 13:54:14
* @LastEditTime : 2022-05-10 10:58:56
* @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\invoice-requested\\requested-invoice-modal\\requested-invoice-modal.component.ts