diff --git a/src/app/routes/supply-management/components/add-drivers/add-drivers.component.html b/src/app/routes/supply-management/components/add-drivers/add-drivers.component.html index bb71bd4f..1b645ddd 100644 --- a/src/app/routes/supply-management/components/add-drivers/add-drivers.component.html +++ b/src/app/routes/supply-management/components/add-drivers/add-drivers.component.html @@ -1,29 +1,14 @@ - -
-
-
-
- -
- -
- -
-
-
- +
+
+
+ + +
- - -
- -
-
- - -
-
\ No newline at end of file +
+ + +
+ +
diff --git a/src/app/routes/supply-management/components/add-drivers/add-drivers.component.ts b/src/app/routes/supply-management/components/add-drivers/add-drivers.component.ts index cef91e31..da816bfe 100644 --- a/src/app/routes/supply-management/components/add-drivers/add-drivers.component.ts +++ b/src/app/routes/supply-management/components/add-drivers/add-drivers.component.ts @@ -1,7 +1,8 @@ import { Component, OnInit, ViewChild } from '@angular/core'; 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 { NzModalRef } from 'ng-zorro-antd/modal'; import { SupplyManagementService } from '../../services/supply-management.service'; @Component({ @@ -11,41 +12,29 @@ import { SupplyManagementService } from '../../services/supply-management.servic export class SupplyManagementAddDriversComponent implements OnInit { url = `/user?_allow_anonymous=true`; i: any; - searchSchema: SFSchema = { - properties: { - no: { - type: 'string', - title: '编号' - } - } - }; + searchSchema: SFSchema = {}; @ViewChild('st') private readonly st!: STComponent; - @ViewChild('selectedST') private readonly selectedST!: STComponent; - ui: SFUISchema = { - - } + @ViewChild('sf') sf!: SFComponent; + ui: SFUISchema = {} columns: STColumn[] = []; - selectedColumn: STColumn[] = []; isVisible = false; - addCarSchema: SFUISchema = { - properties: { - mobile: { - type: 'string', - title: '司机手机号', - ui: { - placeholder: '请输入' - } - }, - } - }; - - constructor(public service: SupplyManagementService, private modal: ModalHelper) { } + diverList: object[] = []; + dirvierInfo: any = {}; + constructor(public service: SupplyManagementService, private modal: NzModalRef) { } ngOnInit(): void { this.initSF(); this.initST(); } + /** +* 查询参数 +*/ + get reqParams() { + return { + ...this.sf?.value + }; + } /** * 初始化查询表单 */ @@ -54,16 +43,9 @@ export class SupplyManagementAddDriversComponent implements OnInit { properties: { mobile: { type: 'string', - title: '', + title: '车队长手机号', ui: { - placeholder: '请输入司机姓名/手机号' - } - }, - no: { - type: 'string', - title: '', - ui: { - placeholder: '请输入车牌号' + placeholder: '请输入' } }, }, @@ -78,23 +60,14 @@ export class SupplyManagementAddDriversComponent implements OnInit { initST() { this.columns = [ { - title: '司机姓名', + title: '司机头像', width: '100px', className: 'text-center', - render: 'goodsId' + index: 'avatar', + type: 'img', }, - { title: '手机号', render: 'externalSn', 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: '司机姓名', index: 'name', width: '120px', className: 'text-center' }, + { title: '实名认证状态', index: 'linkUrl', width: '120px', className: 'text-center' }, { title: '操作', fixed: 'right', @@ -102,51 +75,46 @@ export class SupplyManagementAddDriversComponent implements OnInit { className: 'text-center', buttons: [ { - text: '选择', - iif: (item: STData, btn: STColumnButton, column: STColumn) => item?.status > 0, - iifBehavior: 'disabled' - // 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), + text: '设置', + click: (_record) => this.addCaptain(_record) + // iif: (item: STData, btn: STColumnButton, column: STColumn) => item?.status > 0, }, ], }, ]; } + + + 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 { - this.isVisible = true; - } - - handleCancel() { - this.isVisible = false; - } - - handleOk() { - + addCaptain(item: any) { + this.modal.close(item); // 虚设置车队长 + // const { appUserId: carCaptain } = item; + // const { appUserId } = this.dirvierInfo; + // this.service.request(this.service.$api_add_car_caption, { carCaptain, appUserId }).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('设置成功'); + // this.modal.close(true); + // } + // }) } } diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index 6c167589..fca39472 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -137,12 +137,24 @@
-
+
+
+

+ + + {{(i?.totalAmount) | currency: '¥'}} + + (运费{{i?.totalFreight | currency: '¥'}}含附加运费 {{i?.totalSurcharge| currency: '¥' }}) +

+
收款人:曹济发 / 18211579566 / 621483****6368
+
+
+