车辆对接
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-20 17:11:27
|
||||
* @LastEditTime: 2021-12-21 10:37:32
|
||||
* @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\vehicle\vehicle.component.html
|
||||
@ -38,10 +38,15 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<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)"
|
||||
[nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待发车('+tabs?.stayQuantity+')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'运输中('+tabs?.receivedQuantity+')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待签收('+tabs?.cancelQuantity+')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已完成'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已取消'"></nz-tab>
|
||||
</nz-tabset>
|
||||
<div style="margin-top: 15px;">
|
||||
<st
|
||||
#st
|
||||
|
||||
@ -38,6 +38,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
columnsFloat: STColumn[] = [];
|
||||
columnsFloatView: STColumn[] = [];
|
||||
demoValue: any;
|
||||
resourceStatus: any;
|
||||
datass: any = [
|
||||
{
|
||||
one: '1',
|
||||
@ -52,50 +53,46 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
id: 2
|
||||
},
|
||||
];
|
||||
tabs = [ {
|
||||
name: '全部',
|
||||
type: 5,
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
name: '待发车',
|
||||
type: 5,
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
name: '运输中',
|
||||
type: 5,
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
name: '代签收',
|
||||
type: 5,
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
name: '已完成',
|
||||
type: 5,
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
name: '已取消',
|
||||
type: 5,
|
||||
count: 0,
|
||||
},
|
||||
];
|
||||
tabs = {
|
||||
totalQuantity: 0,
|
||||
cancelQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
stayQuantity: 0
|
||||
};
|
||||
constructor(public service: OrderManagementService, private modal: NzModalService,public service2: ShipperBaseService) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
get reqParams() {
|
||||
const a:any = {};
|
||||
if(this.resourceStatus) {
|
||||
a.billStatus = this.resourceStatus
|
||||
}
|
||||
return {
|
||||
...a,
|
||||
...this.sf?.value,
|
||||
};
|
||||
}
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter((item) => item.checked) || [];
|
||||
}
|
||||
getGoodsSourceStatistical() {
|
||||
this.service.request(this.service.$api_statisticalStatus, { resourceType: 2 }).subscribe(res => {
|
||||
if (res) {
|
||||
console.log(res)
|
||||
this.tabs = res;
|
||||
}
|
||||
})
|
||||
}
|
||||
selectChange(e: number) {
|
||||
console.log(e);
|
||||
this.resourceStatus = e;
|
||||
this.initST();
|
||||
setTimeout(() => {
|
||||
this.st.load();
|
||||
}, 500);
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
@ -443,15 +440,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
text: '取消订单',
|
||||
click: (_record) => this.confirmReceipt(_record),
|
||||
},
|
||||
{
|
||||
text: '确认发车',
|
||||
click: (_record) => this.sureDepart(_record),
|
||||
},
|
||||
{
|
||||
text: '确认到车',
|
||||
click: (_record) => this.sureArrive(_record),
|
||||
click: (_record) => this.cancellation(_record),
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -548,9 +537,6 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
selectChange(e: number) {
|
||||
console.log(e);
|
||||
}
|
||||
/**
|
||||
* 导入货源
|
||||
*/
|
||||
@ -624,19 +610,6 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
nzTitle: '确认签收',
|
||||
nzWidth: '50%',
|
||||
nzContent: ConfirReceiptComponent,
|
||||
nzComponentParams: {
|
||||
i: item
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
// *确认发车
|
||||
|
||||
sureDepart(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '确认发车',
|
||||
nzWidth: '50%',
|
||||
nzContent: SureDepartComponent,
|
||||
nzComponentParams: {
|
||||
i: item,
|
||||
Status: 1
|
||||
@ -644,20 +617,35 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
// *确认到车
|
||||
|
||||
sureArrive(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '确认到车',
|
||||
nzWidth: '50%',
|
||||
nzContent: SureArriveComponent,
|
||||
nzComponentParams: {
|
||||
i: item
|
||||
},
|
||||
nzFooter: null
|
||||
userAction() {
|
||||
let params: any[] = [];
|
||||
this.selectedRows.forEach(item => {
|
||||
params.push(item.id);
|
||||
});
|
||||
console.log(this.selectedRows)
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_get_batchSignBulkOrder, params).subscribe(res => {
|
||||
if (res) {
|
||||
console.log(res);
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
userAction() {
|
||||
|
||||
}
|
||||
// 取消订单
|
||||
cancellation(item: any) {
|
||||
// api_get_cancelAnOrder
|
||||
this.modal.confirm({
|
||||
nzTitle: '<b>确定取消该订单吗?</b>',
|
||||
nzContent: `<b>取消后无法恢复,请确认</b>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_get_cancelAnOrder, {id: item.id}).subscribe((res) => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('操作成功!');
|
||||
this.st?.reload();
|
||||
this.initST();
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user