车辆对接
This commit is contained in:
@ -1,29 +1,14 @@
|
|||||||
<nz-card>
|
<div nz-row nzGutter="20">
|
||||||
<div nz-row nzGutter="20">
|
<div nz-col nzSpan="13">
|
||||||
<div nz-col nzSpan="13">
|
<div class="mb-sm">
|
||||||
<div style="height: 120px;">
|
<sf mode="search" [schema]="searchSchema" [button]="null" #sf>
|
||||||
<div class="mb-md" nz-row>
|
<button nzType="primary" nz-button (click)="search()" [nzLoading]="service.http.loading">搜索</button>
|
||||||
<button nzType="primary" (click)="add()" nz-button>
|
</sf>
|
||||||
<i nz-icon nzType="plus"></i>
|
|
||||||
添加熟车
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
|
|
||||||
</div>
|
|
||||||
<st #st [data]="url" [columns]="columns"></st>
|
|
||||||
</div>
|
|
||||||
<div nz-col nzSpan="11">
|
|
||||||
<div style="height: 120px;"></div>
|
|
||||||
<st #selectedST [data]="url" [columns]="selectedColumn"></st>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</div>
|
||||||
<nz-modal [(nzVisible)]="isVisible" nzTitle="添加司机" (nzOnCancel)="handleCancel()" nzMaskClosable="false">
|
<nz-spin *ngIf="service.http.loading">
|
||||||
<div *nzModalContent>
|
</nz-spin>
|
||||||
<sf [schema]="addCarSchema" [button]="'none'"></sf>
|
<div>
|
||||||
</div>
|
<st #st [data]="diverList" [columns]="columns" [req]="{params: reqParams}"></st>
|
||||||
<div *nzModalFooter>
|
</div>
|
||||||
<button nz-button nzType="default" (click)="handleCancel()">取消</button>
|
|
||||||
<button nz-button nzType="primary" (click)="handleOk()" [nzLoading]="service.http.loading">确定</button>
|
|
||||||
</div>
|
|
||||||
</nz-modal>
|
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { STColumn, STColumnButton, STComponent, STData } from '@delon/abc/st';
|
import { STColumn, STColumnButton, STComponent, STData } from '@delon/abc/st';
|
||||||
import { SFSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -11,41 +12,29 @@ import { SupplyManagementService } from '../../services/supply-management.servic
|
|||||||
export class SupplyManagementAddDriversComponent implements OnInit {
|
export class SupplyManagementAddDriversComponent implements OnInit {
|
||||||
url = `/user?_allow_anonymous=true`;
|
url = `/user?_allow_anonymous=true`;
|
||||||
i: any;
|
i: any;
|
||||||
searchSchema: SFSchema = {
|
searchSchema: SFSchema = {};
|
||||||
properties: {
|
|
||||||
no: {
|
|
||||||
type: 'string',
|
|
||||||
title: '编号'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@ViewChild('st') private readonly st!: STComponent;
|
@ViewChild('st') private readonly st!: STComponent;
|
||||||
@ViewChild('selectedST') private readonly selectedST!: STComponent;
|
@ViewChild('sf') sf!: SFComponent;
|
||||||
ui: SFUISchema = {
|
ui: SFUISchema = {}
|
||||||
|
|
||||||
}
|
|
||||||
columns: STColumn[] = [];
|
columns: STColumn[] = [];
|
||||||
selectedColumn: STColumn[] = [];
|
|
||||||
isVisible = false;
|
isVisible = false;
|
||||||
addCarSchema: SFUISchema = {
|
diverList: object[] = [];
|
||||||
properties: {
|
dirvierInfo: any = {};
|
||||||
mobile: {
|
constructor(public service: SupplyManagementService, private modal: NzModalRef) { }
|
||||||
type: 'string',
|
|
||||||
title: '司机手机号',
|
|
||||||
ui: {
|
|
||||||
placeholder: '请输入'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(public service: SupplyManagementService, private modal: ModalHelper) { }
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
this.initST();
|
this.initST();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询参数
|
||||||
|
*/
|
||||||
|
get reqParams() {
|
||||||
|
return {
|
||||||
|
...this.sf?.value
|
||||||
|
};
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化查询表单
|
* 初始化查询表单
|
||||||
*/
|
*/
|
||||||
@ -54,16 +43,9 @@ export class SupplyManagementAddDriversComponent implements OnInit {
|
|||||||
properties: {
|
properties: {
|
||||||
mobile: {
|
mobile: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '车队长手机号',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入司机姓名/手机号'
|
placeholder: '请输入'
|
||||||
}
|
|
||||||
},
|
|
||||||
no: {
|
|
||||||
type: 'string',
|
|
||||||
title: '',
|
|
||||||
ui: {
|
|
||||||
placeholder: '请输入车牌号'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -78,23 +60,14 @@ export class SupplyManagementAddDriversComponent implements OnInit {
|
|||||||
initST() {
|
initST() {
|
||||||
this.columns = [
|
this.columns = [
|
||||||
{
|
{
|
||||||
title: '司机姓名',
|
title: '司机头像',
|
||||||
width: '100px',
|
width: '100px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
render: 'goodsId'
|
index: 'avatar',
|
||||||
|
type: 'img',
|
||||||
},
|
},
|
||||||
{ title: '手机号', render: 'externalSn', width: '120px', className: 'text-center' },
|
{ title: '司机姓名', index: 'name', width: '120px', className: 'text-center' },
|
||||||
{ title: '货源类型', index: 'linkUrl', width: '120px', className: 'text-center' },
|
{ title: '实名认证状态', index: 'linkUrl', width: '120px', className: 'text-center' },
|
||||||
{
|
|
||||||
title: '车牌号',
|
|
||||||
className: 'text-center',
|
|
||||||
width: '120px',
|
|
||||||
}, {
|
|
||||||
title: '状态',
|
|
||||||
className: 'text-center',
|
|
||||||
width: '120px',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
@ -102,51 +75,46 @@ export class SupplyManagementAddDriversComponent implements OnInit {
|
|||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '选择',
|
text: '设置',
|
||||||
iif: (item: STData, btn: STColumnButton, column: STColumn) => item?.status > 0,
|
click: (_record) => this.addCaptain(_record)
|
||||||
iifBehavior: 'disabled'
|
// iif: (item: STData, btn: STColumnButton, column: STColumn) => item?.status > 0,
|
||||||
// click: (_record) => this.editOne(_record),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
this.selectedColumn = [
|
|
||||||
{
|
|
||||||
title: '司机姓名',
|
|
||||||
width: '100px',
|
|
||||||
className: 'text-center',
|
|
||||||
render: 'goodsId'
|
|
||||||
},
|
|
||||||
{ title: '手机号', render: 'externalSn', width: '120px', className: 'text-center' },
|
|
||||||
{ title: '车牌号', index: 'linkUrl', width: '120px', className: 'text-center' },
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
fixed: 'right',
|
|
||||||
width: '200px',
|
|
||||||
className: 'text-center',
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
text: '移除',
|
|
||||||
// click: (_record) => this.editOne(_record),
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
search() {
|
||||||
|
this.getDriverList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getDriverList() {
|
||||||
|
this.service.request(this.service.$api_get_car_captain_by_mobile, { ...this.sf?.value }).subscribe((res: any) => {
|
||||||
|
this.diverList = [];
|
||||||
|
if (res.userId) {
|
||||||
|
this.diverList.push(res);
|
||||||
|
}
|
||||||
|
// this.st.reload();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加熟车
|
*
|
||||||
*/
|
*/
|
||||||
add(): void {
|
addCaptain(item: any) {
|
||||||
this.isVisible = true;
|
this.modal.close(item); // 虚设置车队长
|
||||||
}
|
// const { appUserId: carCaptain } = item;
|
||||||
|
// const { appUserId } = this.dirvierInfo;
|
||||||
handleCancel() {
|
// this.service.request(this.service.$api_add_car_caption, { carCaptain, appUserId }).subscribe(res => {
|
||||||
this.isVisible = false;
|
// if (res) {
|
||||||
}
|
// this.service.msgSrv.success('设置成功');
|
||||||
|
// this.modal.close(true);
|
||||||
handleOk() {
|
// }
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,12 +137,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</st>
|
</st>
|
||||||
<div>
|
<div class="freight-info-box mt-md" nz-row>
|
||||||
|
<div nz-col nzSpan="24">
|
||||||
|
<h3>
|
||||||
|
<label>总计 :</label>
|
||||||
|
<span class="text-error-dark text-xl">
|
||||||
|
{{(i?.totalAmount) | currency: '¥'}}
|
||||||
|
</span>
|
||||||
|
<span>(运费{{i?.totalFreight | currency: '¥'}}含附加运费 {{i?.totalSurcharge| currency: '¥' }})</span>
|
||||||
|
</h3>
|
||||||
|
<div>收款人:曹济发 / 18211579566 / 621483****6368</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div>
|
||||||
总计:<span style="color: #da001b; font-size: 18px">{{ totalObj?.price | currency: '¥' }}</span> (运费¥{{
|
总计:<span style="color: #da001b; font-size: 18px">{{ totalObj?.price | currency: '¥' }}</span> (运费¥{{
|
||||||
totalObj?.price - attObj?.price
|
totalObj?.price - attObj?.price
|
||||||
}},附加运费¥{{ attObj?.price }},附加费率{{ (attObj?.price / totalObj?.price) * 100 | number: '0.2-2' }}%)
|
}},附加运费¥{{ attObj?.price }},附加费率{{ (attObj?.price / totalObj?.price) * 100 | number: '0.2-2' }}%)
|
||||||
</div>
|
</div>
|
||||||
<div>收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}</div>
|
<div>收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}</div> -->
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card nzTitle="补充信息">
|
<nz-card nzTitle="补充信息">
|
||||||
<sv-container>
|
<sv-container>
|
||||||
|
|||||||
Reference in New Issue
Block a user