This commit is contained in:
wangshiming
2021-12-13 20:42:59 +08:00
parent a77b5f8c01
commit 44a391667e
17 changed files with 1257 additions and 260 deletions

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-08 16:06:57
* @LastEditTime: 2021-12-13 14:51:27
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\bulk\bulk.component.html
@ -35,9 +35,15 @@
</div>
</nz-card>
<nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<!-- <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name + ' (' + tab.count + ') '" (nzClick)="tabChange(i)">
</nz-tab>
</nz-tabset> -->
<nz-tabset (nzSelectedIndexChange)="selectChange($event)">
<nz-tab [nzTitle]="'全部('+tabs?.totalQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'进行中('+tabs?.stayQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已完结('+tabs?.receivedQuantity+')'"></nz-tab>
<nz-tab [nzTitle]="'已取消('+tabs?.cancelQuantity+')'"></nz-tab>
</nz-tabset>
<div style="position: relative">
<nz-alert

View File

@ -26,33 +26,20 @@ export class SupplyManagementBulkComponent implements OnInit {
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
tabs = [ {
name: '全部',
type: 0,
count: 0,
},
{
name: '进行中',
type: 1,
count: 0,
},
{
name: '已完结',
type: 2,
count: 0,
},
{
name: '已取消',
type: 3,
count: 0,
},
];
tabs = {
totalQuantity: 0,
cancelQuantity: 0,
receivedQuantity: 0,
stayQuantity: 0
};
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router) { }
ngOnInit(): void {
this.initSF();
this.initST();
this.initSFFre();
this.getGoodsSourceStatistical()
}
/**
* 查询参数
@ -418,7 +405,7 @@ handleOK() {
}
// 修改货源
modification(item: any) {
this.router.navigate(['/supply-management/vehicle-amend', item.id], {
this.router.navigate(['/supply-management/bulk-amend', item.id], {
queryParams: {
sta: 3
},
@ -426,10 +413,19 @@ handleOK() {
}
// 再下一单
nextOrder(item: any) {
this.router.navigate(['/supply-management/vehicle-amend', item.id], {
this.router.navigate(['/supply-management/bulk-amend', item.id], {
queryParams: {
sta: 4
},
})
}
// 获取货源状态统计
getGoodsSourceStatistical() {
this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2 }).subscribe(res => {
if (res) {
console.log(res)
this.tabs = res;
}
})
}
}