上传值优化

This commit is contained in:
潘晓云
2022-04-29 15:20:22 +08:00
parent 11af021292
commit 0abc792e0f
8 changed files with 53 additions and 41 deletions

View File

@ -6,6 +6,11 @@
<ng-template st-row="checkStatus" let-item>
<span [ngClass]="{'text-red-dark':item?.checkStatus === 2}">{{filterCheckStatus(item?.checkStatus)}}</span>
</ng-template>
<ng-template st-row="fieldValue" let-item>
<ellipsis lines="3" tooltip>
<div>{{item?.fieldValue}}</div>
</ellipsis>
</ng-template>
</st>
</div>

View File

@ -55,7 +55,7 @@ export class DatatableReportingFundInfoComponent implements OnInit {
1: '是',
},
},
{ title: '上传值', index: 'fieldValue', className: 'text-center', width: '15%', },
{ title: '上传值', render: 'fieldValue', className: 'text-center', width: '15%', },
{
title: '本地校验',
render: 'checkStatus',

View File

@ -12,6 +12,11 @@
<ng-template st-row="checkStatus" let-item>
<span [ngClass]="{'text-red-dark':item?.checkStatus === 2}">{{filterCheckStatus(item?.checkStatus)}}</span>
</ng-template>
<ng-template st-row="fieldValue" let-item>
<ellipsis lines="3" tooltip>
<div>{{item?.fieldValue}}</div>
</ellipsis>
</ng-template>
</st>
</div>
</div>

View File

@ -62,7 +62,7 @@ export class DatatableReportingVerifyResultComponent implements OnInit {
1: '是'
}
},
{ title: '上传值', index: 'fieldValue', className: 'text-center', width: '150px', },
{ title: '上传值', render: 'fieldValue', className: 'text-center', width: '150px', },
{
title: '本地校验', render: 'checkStatus', className: 'text-center', width: '100px',
// type: 'enum',

View File

@ -17,9 +17,10 @@
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" (click)="search()" acl [acl-ability]="['TAX-ORDERREPORT-search']">查询</button>
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" (click)="search()"
acl [acl-ability]="['TAX-ORDERREPORT-search']">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="resetSF()" acl [acl-ability]="['TAX-ORDERREPORT-export']">导出</button>
<button nz-button (click)="resetSF()" acl [acl-ability]="['TAX-ORDERREPORT-export']">导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -43,7 +44,7 @@
<span *ngIf="item?.putStatus == '0'">待上传</span>
<span *ngIf="item?.putStatus == '1'">已上传</span>
<span *ngIf="item?.putStatus == '3'">上传中</span>
<span *ngIf="item?.putStatus == '2'" style="color: red;" (click)="unnormal(item)">上传异常</span>
<span *ngIf="item?.putStatus == '2'" style="color: red;" (click)="unnormal(item)">上传异常</span>
</ng-template>
<ng-template st-row="checkStatus" let-item let-index="index">
@ -51,11 +52,11 @@
<span *ngIf="item?.checkStatus == '0'">校验中</span>
<span *ngIf="item?.checkStatus == '1'">通过</span>
<!-- <span *ngIf="item?.checkStatus == '2'" style="color: red;" (click)="unnormal(item)">不通过</span> -->
<span *ngIf="item?.checkStatus == '2'" style="color: red;" (click)="viewResult(item)">不通过</span>
<a *ngIf="item?.checkStatus == '2'" style="color: red;" (click)="viewResult(item)">不通过</a>
</ng-template>
<ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }} </div>
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }} </div>
</ng-template>
<!-- <ng-template st-row="localValid" let-item let-index="index">
<a (click)="viewResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a>
@ -100,9 +101,11 @@
已选择
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据
</div>
<button nz-button nzType="primary" (click)="upload()" acl [acl-ability]="['TAX-ORDERREPORT-upload']">上传</button>
<button nz-button nzType="primary" (click)="recall() " acl [acl-ability]="['TAX-ORDERREPORT-recall']">撤回</button>
<button nz-button nzType="primary" (click)="resetData()" acl [acl-ability]="['TAX-ORDERREPORT-resetData']">更新数据</button>
<button nz-button nzType="primary" (click)="uploadSetting()" acl [acl-ability]="['TAX-ORDERREPORT-uploadSetting']">税务设置</button>
<button nz-button nzType="primary" (click)="upload()" acl [acl-ability]="['TAX-ORDERREPORT-upload']">上传</button>
<button nz-button nzType="primary" (click)="recall() " acl [acl-ability]="['TAX-ORDERREPORT-recall']">撤回</button>
<button nz-button nzType="primary" (click)="resetData()" acl
[acl-ability]="['TAX-ORDERREPORT-resetData']">更新数据</button>
<button nz-button nzType="primary" (click)="uploadSetting()" acl
[acl-ability]="['TAX-ORDERREPORT-uploadSetting']">税务设置</button>
</div>
</ng-template>

View File

@ -15,22 +15,19 @@
</nz-tabset>
</div>
<div style="width: 90%">
<st
#st
[scroll]="{ x: '1000px', y: '600px' }"
[data]="service.$api_get_getTaxFieldCheckList"
[columns]="columns"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data', total: 'data' } , process: afterRes}"
[page]="{ show: false }"
[loading]="false"
[bordered]="true"
>
<st #st [scroll]="{ x: '1000px', y: '600px' }" [data]="service.$api_get_getTaxFieldCheckList" [columns]="columns"
[req]="{ process: beforeReq }" [res]="{ reName: { list: 'data', total: 'data' } , process: afterRes}"
[page]="{ show: false }" [loading]="false" [bordered]="true">
<ng-template st-row="freightDetails" let-item>
<div *ngFor="let item of item.freightDetails">
<div>{{ item.expenseName }}:{{ item.price | currency }} </div>
</div>
</ng-template>
<ng-template st-row="fieldValue" let-item>
<ellipsis lines="3" tooltip>
<div>{{item?.fieldValue}}</div>
</ellipsis>
</ng-template>
</st>
</div>
</div>

View File

@ -48,25 +48,26 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit {
// }
// return params;
// }
beforeReq = (requestOptions: STRequestOptions) => {let a: string = '';
beforeReq = (requestOptions: STRequestOptions) => {
let a: string = '';
switch (this.subjectType) {
case '0':
a = this.record?.networkTransporterId;
break
a = this.record?.networkTransporterId;
break
case '1':
a = this.record?.shipperId;
break
a = this.record?.shipperId;
break
case '2':
a = this.record?.driverId;
break
a = this.record?.driverId;
break
case '3':
a = this.record?.wayBillId;
break
a = this.record?.wayBillId;
break
}
Object.assign(requestOptions.body, {
subjectId: a ,
subjectType: this.subjectType,
});
Object.assign(requestOptions.body, {
subjectId: a,
subjectType: this.subjectType,
});
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
@ -102,7 +103,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit {
1: '是'
}
},
{ title: '上传值', index: 'fieldValue', className: 'text-center', width: '150px', },
{ title: '上传值', render: 'fieldValue', className: 'text-center', width: '150px', },
{
title: '本地校验', index: 'checkStatus', className: 'text-center', width: '100px',
type: 'enum',

View File

@ -4,5 +4,6 @@ import { STModule } from '@delon/abc/st';
import { SVModule } from '@delon/abc/sv';
import { DelonFormModule } from '@delon/form';
import { QRModule } from '@delon/abc/qr';
import { EllipsisModule } from '@delon/abc/ellipsis';
export const SHARED_DELON_MODULES = [PageHeaderModule, STModule, SVModule, SEModule, DelonFormModule, QRModule];
export const SHARED_DELON_MODULES = [PageHeaderModule, STModule, SVModule, SEModule, DelonFormModule, QRModule, EllipsisModule];