This commit is contained in:
Taric Xin
2022-02-11 10:52:44 +08:00
parent 079e222ca9
commit e2ef3366a9
11 changed files with 31 additions and 60 deletions

View File

@ -20,7 +20,7 @@ const alainConfig: AlainConfig = {
sf: { button: { search: '查询' } }, sf: { button: { search: '查询' } },
pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true }, pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true },
auth: { login_url: '/passport/login' }, auth: { login_url: '/passport/login' },
acl: { guard_url: '/' } acl: { guard_url: '/exception/403' }
}; };
const alainModules = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()]; const alainModules = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()];

View File

@ -37,6 +37,9 @@ export class SettingMenuComponent implements OnInit, OnChanges {
this.authority = this.isAuthorityIdDTOList || []; this.authority = this.isAuthorityIdDTOList || [];
} }
} }
if (changes.authorityAssistId) {
this.defaultCheckedKeys = [...this.authorityAssistId];
}
} }
ngOnInit() {} ngOnInit() {}
@ -51,7 +54,6 @@ export class SettingMenuComponent implements OnInit, OnChanges {
// } // }
this.functionList = res; this.functionList = res;
this.defaultCheckedKeys = this.authorityAssistId; this.defaultCheckedKeys = this.authorityAssistId;
this.cdr.detectChanges();
}); });
} }
addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) { addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) {
@ -166,6 +168,7 @@ export class SettingMenuComponent implements OnInit, OnChanges {
} }
this.checkTreeNode(node, origin); this.checkTreeNode(node, origin);
} }
checkTreeNode(node: any, origin: { id: any }) { checkTreeNode(node: any, origin: { id: any }) {
const checkedNode: any = this.nzTreeComponent.getCheckedNodeList(); const checkedNode: any = this.nzTreeComponent.getCheckedNodeList();
const allCheckedArr: any[] = []; const allCheckedArr: any[] = [];
@ -192,12 +195,7 @@ export class SettingMenuComponent implements OnInit, OnChanges {
}); });
this.defaultCheckedKeys = allCheckedArr; this.defaultCheckedKeys = allCheckedArr;
} }
addAuthorityAll(origin: any, node: { checked: any; buttonInfoList: any[] }) {
if (node.checked) {
node.buttonInfoList.forEach((item: any) => {});
} else {
}
}
overTree(children: any[], a: any[]) { overTree(children: any[], a: any[]) {
children.forEach(item => { children.forEach(item => {
a.push(item.key); a.push(item.key);
@ -209,16 +207,7 @@ export class SettingMenuComponent implements OnInit, OnChanges {
} }
}); });
} }
// 获取角色模板权限
getRoleTpl(id: any) {
const params = {
id
};
this.service.request(this.service.$api_getRoleTemplateInfo, params).subscribe(res => {
this.authority = res.authority;
this.defaultCheckedKeys = res.authorityAssistId;
});
}
addDisabledTree(arr: any[]) { addDisabledTree(arr: any[]) {
arr.forEach((item: any) => { arr.forEach((item: any) => {
item.disableCheckbox = true; item.disableCheckbox = true;
@ -294,6 +283,7 @@ export class SettingMenuComponent implements OnInit, OnChanges {
} }
}); });
} }
initButtonList(id: any, origin: any) { initButtonList(id: any, origin: any) {
const params = { const params = {
id id
@ -329,6 +319,7 @@ export class SettingMenuComponent implements OnInit, OnChanges {
} }
}); });
} }
initDictList(id: any, origin: any) { initDictList(id: any, origin: any) {
const params = { const params = {
id id

View File

@ -43,7 +43,7 @@
</ng-template> </ng-template>
<st #st [scroll]="{ x: '2000px',y:'400px' }" [data]="service.$api_ficoVatinvHList" [columns]="columns" <st #st [scroll]="{ x: '2000px' }" [data]="service.$api_ficoVatinvHList" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' },process:afterRes }" [res]="{ reName: { list: 'data.records', total: 'data.total' },process:afterRes }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"

View File

@ -35,5 +35,5 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st> [loading]="service.http.loading" (change)="stChange($event)"></st>
</nz-card> </nz-card>

View File

@ -26,7 +26,7 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '400px' }"> [loading]="service.http.loading" [scroll]="{ x:'1200px' }">
<ng-template st-row="call1No" let-item let-index="index" let-column="column"> <ng-template st-row="call1No" let-item let-index="index" let-column="column">
{{item.driverName}}<br>{{item.driverTelephone}} {{item.driverName}}<br>{{item.driverTelephone}}
</ng-template> </ng-template>

View File

@ -27,7 +27,7 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }"> [loading]="service.http.loading" [scroll]="{ x:'1200px' }">
<ng-template st-row="call3No" let-item let-index="index" let-column="column"> <ng-template st-row="call3No" let-item let-index="index" let-column="column">
{{item.driverName}}<br>{{item.driverCellphone}} {{item.driverName}}<br>{{item.driverCellphone}}
</ng-template> </ng-template>

View File

@ -36,7 +36,7 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }" (change)="stChange($event)"> [loading]="service.http.loading" [scroll]="{ x:'1200px' }" (change)="stChange($event)">
<ng-template st-row="call1No" let-item let-index="index" let-column="column"> <ng-template st-row="call1No" let-item let-index="index" let-column="column">
{{item.driverName}}<br>{{item.driverTelephone}} {{item.driverName}}<br>{{item.driverTelephone}}
</ng-template> </ng-template>

View File

@ -23,5 +23,5 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process:beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process:beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st> [loading]="service.http.loading" (change)="stChange($event)"></st>
</nz-card> </nz-card>

View File

@ -8,7 +8,8 @@
[ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true" [ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf> [button]="'none'"></sf>
</div> </div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right" [class.expend-options]="_$expand"> <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button> <button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button> <button nz-button> 导出</button>
@ -35,6 +36,6 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }" (change)="stChange($event)"> [loading]="service.http.loading" [scroll]="{ x:'1200px' }" (change)="stChange($event)">
</st> </st>
</nz-card> </nz-card>

View File

@ -14,13 +14,8 @@
<nz-card class="search-box" nzBordered> <nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24"> <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf <sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
#sf [compact]="true" [button]="'none'"></sf>
[schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 90, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
[compact]="true"
[button]="'none'"
></sf>
</div> </div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
@ -57,17 +52,11 @@
</div> </div>
</ng-template> </ng-template>
<st <st #st [data]="service.$api_get_invoice_requested_page" [columns]="columns"
#st
[data]="service.$api_get_invoice_requested_page"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }" [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [loading]="service.http.loading" [scroll]="{ x: '1200px' }" (change)="stChange($event)">
[scroll]="{ x: '1200px', y: '370px' }"
(change)="stChange($event)"
>
<ng-template st-row="vatappcode" let-item let-index="index" let-column="column"> <ng-template st-row="vatappcode" let-item let-index="index" let-column="column">
{{ item.vatappcode }} <br /> {{ item.vatappcode }} <br />
<label class="text-primary">{{item.stsLabel}}</label> <label class="text-primary">{{item.stsLabel}}</label>
@ -83,4 +72,4 @@
</se> </se>
</div> </div>
</div> </div>
</ng-template> </ng-template>

View File

@ -13,15 +13,11 @@
<nz-card class="search-box" nzBordered> <nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24"> <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf <sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
#sf [compact]="true" [button]="'none'"></sf>
[schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 90, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
[compact]="true"
[button]="'none'"
></sf>
</div> </div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand" class="text-right"> <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button> <button nz-button (click)="resetSF()">重置</button>
<!-- <button nz-button> 导出</button> --> <!-- <button nz-button> 导出</button> -->
@ -45,24 +41,18 @@
</div> --> </div> -->
</div> </div>
<st <st #st [data]="service.$api_get_invoice_page" [columns]="columns"
#st
[data]="service.$api_get_invoice_page"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [loading]="service.http.loading" [scroll]="{ x: '1200px' }" (change)="stChange($event)">
[scroll]="{ x: '1200px', y: '370px' }"
(change)="stChange($event)"
>
<ng-template st-row="no" let-item let-index="index"> <ng-template st-row="no" let-item let-index="index">
{{ item.no }} {{ item.no }}
<a>预览发票</a> <a>预览发票</a>
</ng-template> </ng-template>
<ng-template st-row="vatrate" let-item let-index="index"> <ng-template st-row="vatrate" let-item let-index="index">
0.09 0.09
</ng-template> </ng-template>
<ng-template st-row="expresscompany" let-item let-index="index" let-column="column"> <ng-template st-row="expresscompany" let-item let-index="index" let-column="column">
{{ item.expresscompany }} <br /> {{ item.expresscompany }} <br />
{{ item.expressno }} {{ item.expressno }}
@ -76,4 +66,4 @@
<nz-tag [nzColor]="'#2db7f5'" class="ml-md">已签收</nz-tag> <nz-tag [nzColor]="'#2db7f5'" class="ml-md">已签收</nz-tag>
</p> </p>
<app-logistics-time-line [data]="routesInfo?.routes"></app-logistics-time-line> <app-logistics-time-line [data]="routesInfo?.routes"></app-logistics-time-line>
</ng-template> </ng-template>