This commit is contained in:
wangshiming
2022-02-10 16:33:30 +08:00
parent 22228e623a
commit 00872adf10
5 changed files with 750 additions and 70 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-02-10 14:39:20
* @LastEditTime : 2022-02-10 16:32:01
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -71,27 +71,29 @@
[data]="service.$api_get_bulkPage_list"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[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] }"
[loading]="service.http.loading"
>
<!--运费单价 -->
<ng-template st-row="freightPrice" let-item let-index="index">
<div class="mr-xs">{{ item.freightPrice | currency }} </div>
<div class="mr-xs">{{ item?.freightPrice | currency }} </div>
</ng-template>
<!--货源编号 -->
<ng-template st-row="resourceCode" let-item let-index="index">
<a [routerLink]="'bulk-detail/' + item.id">{{ item?.resourceCode }}</a>
<a [routerLink]="'bulk-detail/' + item?.id">{{ item?.resourceCode }}</a>
<div>{{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel }}</div>
<div>{{ item?.resourceStatusLabel }}</div>
</ng-template>
<!-- 服务类型 -->
<ng-template st-row="serviceType" let-item let-index="index">
<div *ngIf="item.serviceType === 1">抢单</div>
<div *ngIf="item.serviceType === 2">指派</div>
<div *ngIf="item?.serviceType === 1">抢单</div>
<div *ngIf="item?.serviceType === 2">指派</div>
</ng-template>
<!-- 关联订单 -->
<ng-template st-row="orderSn" let-item let-index="index">
<div *ngFor="let item of item?.wayBillClassifiedStatisticsVOList">
<label>{{ item.wayBillStatusLabel }}</label>
<label>{{ item?.wayBillStatusLabel }}</label>
(<span [ngStyle]="{ color: item?.count > 0 ? '#1890FF' : '' }">{{ item?.count }}</span
>)
</div>
@ -104,8 +106,8 @@
</ng-template>
<!-- 用车需求 -->
<ng-template st-row="useCarDemand" let-item let-index="index">
<div>车型: {{ item.carModelLabel }}</div>
<div class="error">车长: {{ item.carLenghtLabel }} 米</div>
<div>车型: {{ item?.carModelLabel }}</div>
<div class="error">车长: {{ item?.carLenghtLabel }} 米</div>
</ng-template>
</st>
</div>

View File

@ -78,6 +78,13 @@ export class SupplyManagementBulkComponent implements OnInit {
this.st?.load(1);
this.getGoodsSourceStatistical()
}
afterRes = (data: any[], rawData?: any) => {
console.log(data)
return data.map(item => ({
...item,
disabled: item.auditStatus !== '1'
}));
};
/**
* 初始化查询表单
*/
@ -222,7 +229,6 @@ export class SupplyManagementBulkComponent implements OnInit {
className: 'text-left',
render: 'resourceCode'
},
{ title: '服务类型', index: 'serviceTypeLabel', width: '150px', className: 'text-left' },
{ title: '货主', index: 'shipperAppUserName', width: '220px', className: 'text-left' },
{ title: '项目名称', index: 'enterpriseProjectName', width: '220px', className: 'text-left' },
{ title: '关联订单', render: 'orderSn', width: '200px', className: 'text-left' },

View File

@ -57,24 +57,25 @@
[data]="service.$api_get_wholePage_list"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[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] }"
[loading]="service.http.loading"
[scroll]="{ x: '1200px', y: '500px' }"
>
<ng-template st-row="resourceCode" let-item let-index="index">
<a [routerLink]="'vehicle-detail/' + item.id">{{ item.resourceCode }}</a>
<p>{{ item.resourceTypeLabel }}{{ item.serviceTypeLabel }}</p>
<a [routerLink]="'vehicle-detail/' + item?.id">{{ item?.resourceCode }}</a>
<p>{{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel }}</p>
<p>{{ item?.resourceStatusLabel }}</p>
</ng-template>
<ng-template st-row="totalAmount" let-item let-index="index">
<div class="mr-xs">{{ item.totalAmount | currency }} </div>
<div class="mr-xs">{{ item?.totalAmount | currency }} </div>
</ng-template>
<ng-template st-row="surcharge" let-item let-index="index">
<div class="mr-xs">{{ item.surcharge | currency }} </div>
<div class="mr-xs">{{ item?.surcharge | currency }} </div>
</ng-template>
<ng-template st-row="useCarDemand" let-item let-index="index">
<div>车型: {{ item.carModelLabel }}</div>
<div class="error">车长: {{ item.expand }} 米</div>
<div>车型: {{ item?.carModelLabel }}</div>
<div class="error">车长: {{ item?.expand }} 米</div>
</ng-template>
<ng-template #contentTemplate>
<div>

View File

@ -61,6 +61,13 @@ export class SupplyManagementVehicleComponent implements OnInit {
...a
};
}
afterRes = (data: any[], rawData?: any) => {
console.log(data)
return data.map(item => ({
...item,
disabled: item.auditStatus !== '1'
}));
};
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}