货源修改
This commit is contained in:
@ -0,0 +1,98 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementAddDriversComponent } from '../add-drivers/add-drivers.component';
|
||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supply-management-bulk-detail',
|
||||
templateUrl: './bulk-detail.component.html',
|
||||
styleUrls: ['./bulk-detail.component.less']
|
||||
})
|
||||
export class SupplyManagementBulkDetailComponent implements OnInit {
|
||||
|
||||
id = this.route.snapshot.params.id;
|
||||
i: any;
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '内容', index: 'theme' },
|
||||
{ title: '操作人', index: 'operationUserPhone' },
|
||||
{ title: '操作时间', index: ' createTime' },
|
||||
];
|
||||
driverColums: STColumn[] = [
|
||||
{ title: '司机姓名', index: 'theme' },
|
||||
{ title: '手机号', index: 'operationUserPhone' },
|
||||
{ title: '车牌号', index: ' createTime' },
|
||||
{ title: '承运次数', index: 'operationUserPhone' },
|
||||
{ title: '承运数量', index: ' createTime' },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '200px',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '移除',
|
||||
click: (_record) => this.delDiver(_record),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
private service: SupplyManagementService,
|
||||
private modal: NzModalService
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.service.http.get(`/user/${this.id}?_allow_anonymous=true&_allow_badcode=true`).subscribe(res => {
|
||||
console.log(res);
|
||||
this.i = res
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除司机
|
||||
*/
|
||||
delDiver(item: any) {
|
||||
const { id } = item;
|
||||
this.modal.confirm({
|
||||
nzTitle: '<i>删除确认</i>',
|
||||
nzContent: `请仔细核对,避免误操作!<br>是否删除?</br>`,
|
||||
nzOnOk: () => {
|
||||
this.service.http.post(this.service.$api_del_driver, { id }).subscribe((res) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('数据删除成功!');
|
||||
// this.st1.reload();
|
||||
} else {
|
||||
this.service.msgSrv.error('删除失败!');
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 指派熟车
|
||||
*/
|
||||
assignedCar() {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '指派熟车',
|
||||
nzWidth: '90%',
|
||||
nzContent: SupplyManagementAddDriversComponent,
|
||||
nzComponentParams: {
|
||||
i: this.i,
|
||||
},
|
||||
nzFooter: null,
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user