From 741912c630877065d5b4a0cbbeeeffd5af27efef Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 1 Dec 2021 10:51:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E9=98=9F=E9=95=BF=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/routes/routes-routing.module.ts | 5 +- .../components/carload/carload.component.html | 183 ++++++++ .../components/carload/carload.component.less | 128 ++++++ .../carload/carload.component.spec.ts | 31 ++ .../components/carload/carload.component.ts | 398 ++++++++++++++++++ .../components/list/list.component.html | 19 + .../components/list/list.component.spec.ts | 31 ++ .../components/list/list.component.ts | 22 + .../services/supply-goods.service.ts | 23 + .../supply-goods-routing.module.ts | 22 + .../supply-goods/supply-goods.module.ts | 24 ++ .../driver/captain/captain.component.html | 4 +- .../driver/captain/captain.component.ts | 89 +--- src/assets/mocks/menu-data.json | 11 + 14 files changed, 907 insertions(+), 83 deletions(-) create mode 100644 src/app/routes/supply-goods/components/carload/carload.component.html create mode 100644 src/app/routes/supply-goods/components/carload/carload.component.less create mode 100644 src/app/routes/supply-goods/components/carload/carload.component.spec.ts create mode 100644 src/app/routes/supply-goods/components/carload/carload.component.ts create mode 100644 src/app/routes/supply-goods/components/list/list.component.html create mode 100644 src/app/routes/supply-goods/components/list/list.component.spec.ts create mode 100644 src/app/routes/supply-goods/components/list/list.component.ts create mode 100644 src/app/routes/supply-goods/services/supply-goods.service.ts create mode 100644 src/app/routes/supply-goods/supply-goods-routing.module.ts create mode 100644 src/app/routes/supply-goods/supply-goods.module.ts diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index ee9104a3..2b964c24 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-11-29 10:20:33 - * @LastEditTime: 2021-11-29 15:38:35 + * @LastEditTime: 2021-12-01 09:53:56 * @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\routes-routing.module.ts @@ -31,7 +31,8 @@ const routes: Routes = [ path: 'usercenter', loadChildren: () => import('./usercenter/usercenter.module').then(m => m.UsercenterModule) }, - { path: 'system', loadChildren: () => import('./sys-setting/sys-setting.module').then(m => m.SysSettingModule) } + { path: 'system', loadChildren: () => import('./sys-setting/sys-setting.module').then(m => m.SysSettingModule) }, + { path: 'supplygoods', loadChildren: () => import('./supply-goods/supply-goods.module').then(m => m.SupplyGoodsModule) } ] }, // passport diff --git a/src/app/routes/supply-goods/components/carload/carload.component.html b/src/app/routes/supply-goods/components/carload/carload.component.html new file mode 100644 index 00000000..7eeedbcc --- /dev/null +++ b/src/app/routes/supply-goods/components/carload/carload.component.html @@ -0,0 +1,183 @@ + + + + +
+ +
+ + +
+ + + + +
+ +
+
+ + + + +
+
+
+
+ +
+ + +
+ + + + 共 {{ total }} 条 + + + 商品 + 订单金额 + 收件人 + 下单商家 + 状态 + 操作 + + + + + +
+
+ 订单号:{{ data.orderSn }}        下单时间:{{ + data.createTime + }}         订单类型:{{ + data.supplierType == 1 ? '普通订单' : 'GD订单' + }} +         支付方式:{{ data.payType === 1 ? '一次性付款,先货后款' : '-' + }}{{ data.payType === 2 ? '分批付款,先货后款' : '' }}         配送方式:{{ + data.deliveryTypeDesc + }} +
+
+ + + +
+
+ +
+
+

+ {{ item.goodsName }}
+ + {{ items.specName }}:{{ items.specValueName }} + +
+

数量:{{ item.goodsQuantity }}

+

+
+
+ {{ item.sendType === 1 ? '已发货' : item.sendType === 2 ? '部分发货' : '' }}
+ {{ item.returnStatusName }} +
+
+ + + + + ¥{{ data.payAmount.toFixed(2) }} + + {{ data.receiveName }}
+ {{ data.receiveMobile }} + + + {{ data.tenantName }} + + + {{ data.orderStatusStr }}{{ + data.orderStatusDesc + }}
{{ + data.payStatusDesc + }}
+ + +
+ + + + 付款审核 + + + 审核
+
+ + 修改价格 + + + 立即发货 +
+ + 立即发货 +
+ 查看详情 +
+ +
+
+ +
+ +
+
+
+
+ + + + + + + {{ item }} + + + + diff --git a/src/app/routes/supply-goods/components/carload/carload.component.less b/src/app/routes/supply-goods/components/carload/carload.component.less new file mode 100644 index 00000000..c98cff00 --- /dev/null +++ b/src/app/routes/supply-goods/components/carload/carload.component.less @@ -0,0 +1,128 @@ +.order-goods { + display: flex; + text-align: left; + .order-goods-img { + width: 80px; + height: 80px; + margin-right: 10px; + overflow: hidden; + img { + width: 100%; + } + } + .order-goods-info { + flex: 1; + } + .order-goods-state { + width: 70px; + margin-left: 10px; + line-height: 28px; + text-align: right; + } +} +h2 { + font-size: 16px; +} +p { + font-size: 14px; +} +.form, +.table { + background-color: #fff; +} +.form { + padding: 20px; +} +.select-item { + width: 180px; +} +.ant-form-item { + margin-bottom: 16px; +} +.order-line { + display: flex; + justify-content: space-between; +} + +.order-receiving { + .order-receiving-remark { + line-height: 26px; + span { + color: #1890ff; + } + input { + width: 130px; + margin-right: 6px; + padding: 0; + overflow: hidden; + color: #1890ff; + white-space: nowrap; + text-overflow: ellipsis; + background: none; + border: none; + &.have-edit { + color: #000000a6; + border: 1px solid #d9d9d9; + } + } + } +} +.order-operation { + div { + color: #1890ff; + cursor: pointer; + } + p { + margin-bottom: 10px; + } +} +.timeline { + span { + display: inline-block; + margin: 0 4px; + padding: 5px 6px; + color: #999; + background-color: #f2f2f2; + border-radius: 2px; + cursor: pointer; + } +} +.ant-table-tbody > tr.ant-table-row:hover > td { + background: #fff; +} + +.btnBox { + margin: 0 0 10px 0; +} +.searchAreaWrap { + display: flex; +} +.sfExpand { + display: block; +} +.actionBox { + margin: 0 0 0 10px; +} +.sfBox { + width: 60%; +} +.expandsfBox { + width: 100%; +} +.expandAcitonBox { + margin: 10px 0 20px 0; + text-align: right; +} +.actionAreaWrap { + margin: 0 0 20px 0; +} +.overflowText { + display: -webkit-box; + overflow: hidden; + text-align: left; + text-overflow: -o-ellipsis-lastline; + text-overflow: ellipsis; + -webkit-line-clamp: 2; + line-clamp: 2; + -webkit-box-orient: vertical; +} diff --git a/src/app/routes/supply-goods/components/carload/carload.component.spec.ts b/src/app/routes/supply-goods/components/carload/carload.component.spec.ts new file mode 100644 index 00000000..00b3e821 --- /dev/null +++ b/src/app/routes/supply-goods/components/carload/carload.component.spec.ts @@ -0,0 +1,31 @@ +/* + * @Description: + * @Author: wsm + * @Date: 2021-07-08 15:46:29 + * @LastEditTime: 2021-12-01 10:02:07 + * @LastEditors: Please set LastEditors + * @Reference: + */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { SupplyGoodsComponentListCarloadComponent } from './carload.component'; + +describe('SupplyGoodsComponentListCarloadComponent', () => { + let component: SupplyGoodsComponentListCarloadComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SupplyGoodsComponentListCarloadComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SupplyGoodsComponentListCarloadComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/supply-goods/components/carload/carload.component.ts b/src/app/routes/supply-goods/components/carload/carload.component.ts new file mode 100644 index 00000000..1145ae70 --- /dev/null +++ b/src/app/routes/supply-goods/components/carload/carload.component.ts @@ -0,0 +1,398 @@ +/* + * @Description: + * @Author: wsm + * @Date: 2021-07-15 09:42:57 + * @LastEditTime: 2021-12-01 10:36:54 + * @LastEditors: Please set LastEditors + * @Reference: + */ +import { AfterViewInit, Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; +import { STComponent } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { ModalHelper } from '@delon/theme'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { filter } from 'rxjs/operators'; + + +@Component({ + selector: 'app-supply-goods-components-list-carload', + templateUrl: './carload.component.html', + styleUrls: ['./carload.component.less'], +}) +export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterViewInit { + @ViewChild('st', { static: true }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + validateForm!: FormGroup; + @ViewChild('exportTemplate') + exportTemplate!: TemplateRef; + ui: SFUISchema = {}; + mode: any = 'search'; + tabs = ['全部', '待审核', '待支付', '待发货', '待收货', '已完成']; + exportFieldList = [ + '订单号', + '下单时间', + '支付方式', + '订单金额', + '订单状态', + '下单商家', + 'SKU信息(SKUID,商品名称+规格名称,数量)', + '配送方式', + '收件人', + '收件人电话', + '收件人地址', + ]; + listData: any; + orderStatus: any = '0'; // 订单状态, 10为已提交待付款, 20为已付款待发,30为已发货待收货,50取消订单,40 已完成 + nzSelectedIndex = 0; + total = 1; + loading = false; + pageSize = 20; + pageIndex = 1; + toSendCount = 0; + addTimeStart = ''; + addTimeEnd = ''; + sfExpand = false; + _$expand = false; + + schema!: SFSchema; + payStatus: any; + constructor( + private fb: FormBuilder, + private modal: NzModalService, + private router: Router, + private ar: ActivatedRoute, + private modalHelper: ModalHelper, + ) {} + + ngOnInit(): void { + this.getList(); + this.initSF(); + this.initUI(); + } + + ngAfterViewInit() { + // this.router.events.pipe(filter((evt) => evt instanceof NavigationEnd)).subscribe(() => { + // + // }); + } + + initSF() { + this.schema = { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true, + }, + }, + storeName: { title: '企业名称', type: 'string', ui: { showRequired: false } }, + contactsName: { + title: '联系人', + type: 'string', + ui: { + showRequired: false, + }, + }, + unifiedSocialCreditCode: { + title: '税源地', + type: 'string', + ui: { + showRequired: false, + }, + }, + enStatus: { + type: 'string', + title: '货主状态', + enum: [ + { label: '全部', value: '' }, + { label: '正常', value: 0 }, + { label: '冻结', value: 1 }, + { label: '废弃', value: 2 }, + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value, + }, + }, + }, + enStatus2: { + type: 'string', + title: 'CRM审核状态', + enum: [ + { label: '全部', value: '' }, + { label: '正常', value: 0 }, + { label: '冻结', value: 1 }, + { label: '废弃', value: 2 }, + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value, + }, + }, + }, + }, + }; + this.ui = { '*': { spanLabelFixed: 90, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; + } + initUI() { + this.ui = { + '*': { + spanLabelFixed: 90, + grid: { span: 8 }, + }, + }; + } + tabChange(i: number) { + this.changeIndex(i); + this.getList(); + } + changeIndex(i: number) { + if (i === 0) { + this.orderStatus = '0'; + this.payStatus = null; + } else if (i === 1) { + this.orderStatus = '5'; + this.payStatus = null; + } else if (i === 2) { + this.orderStatus = null; + this.payStatus = '10'; + } else if (i === 3) { + this.orderStatus = '20'; + this.payStatus = null; + } else if (i === 4) { + this.orderStatus = '30'; + this.payStatus = null; + } else if (i === 5) { + this.orderStatus = '40'; + this.payStatus = null; + } + this.pageIndex = 1; + } + getList(type?: string) { + // this.loading = true; + const params: any = { + pageSize: this.pageSize, + pageIndex: this.pageIndex, + ...this.sf?.value, + orderStatus: this.orderStatus, + payStatus: this.payStatus, + createTime: this.sf?.value.createTime || [], + time: {}, + }; + if (this.sf?.value?.createTime) { + delete params.createTime; + params.time.start = this.sf?.value?.createTime[0]; + params.time.end = this.sf?.value?.createTime[1]; + } + delete params.expand; + if (type === 'search') { + params.pageIndex = 1; + } + // this.service.request(this.service.$api_get_page, params).subscribe((res) => { + // this.loading = false; + // this.listData = res.orderPage.records; + // this.toSendCount = res.toSendCount; + // this.listData.forEach((element: { goodsList: { goodsSpecJson: string }[] }) => { + // element.goodsList.forEach((item: { goodsSpecJson: string }) => { + // if (item.goodsSpecJson) { + // item.goodsSpecJson = JSON.parse(item.goodsSpecJson); + // } + // }); + // }); + // this.total = res.orderPage.total; + // }); + } + + orderExport() { + // this.service.exportStart(params, this.service.$api_export); + this.modal.create({ + nzTitle: '订单导出', + nzContent: this.exportTemplate, + // nzContent: `待导出订单总数:${this.pageInfo.total}条,确定要导出吗?`, + nzOnOk: () => { + const params: any = { + pageSize: this.pageSize, + pageIndex: this.pageIndex, + ...this.sf?.value, + orderStatus: this.orderStatus, + // createTime: this.sf?.value.createTime || [], + }; + delete params.expand; + }, + }); + } + + goDetail(data: any) { + this.router.navigate(['../order-detail', data.orderSn], { relativeTo: this.ar }); + } + + // 批量发货 + deliverBelivery() { + this.router.navigate(['../order-batch-delivery'], { relativeTo: this.ar }); + } + changePageIndex(pageIndex: number) { + this.pageIndex = pageIndex; + this.getList(); + } + changePageSize(value: number) { + this.pageSize = value; + this.getList(); + } + expandToggle() { + this.sfExpand = !this.sfExpand; + this.sf?.setValue('/expand', this.sfExpand); + } + + // 修改运单 + updateLogistics(data: any) { + // 如果是多个运单 + if (data.deliveryList.length > 1) { + this.updateLogisticsList(data); + } else { + data.deliveryAddrId = data.deliveryList[0].deliveryAddrId; + data.deliveryCorpSn = data.deliveryList[0].deliveryCorpSn; + data.deliverySn = data.deliveryList[0].deliverySn; // 原物流单号 + data.expressName = data.deliveryList[0].expressName; // 原物流公司 + data.sendName = data.deliveryList[0].sendName; + data.sendMobile = data.deliveryList[0].sendMobile; + data.sendAddr = data.deliveryList[0].sendAddr; + data.orderExpressItemVOList = data.deliveryList[0].orderExpressItemVOList; // 运单对应的发货商品信息 + this.updateLogisticsPop(data); + } + } + + // 修改运单中间页List + updateLogisticsList(data: any) { + const modalRef = this.modal.create({ + nzTitle: '运单信息', + nzWidth: 1200, + // nzContent: OrderComponentsOrderLogisticsmessageComponent, + nzComponentParams: { + listData: data, + }, + nzFooter: null, + }); + modalRef.afterClose.subscribe((result) => { + if (result === true) { + this.getList(); + } + }); + } + + // 修改运单弹窗 + updateLogisticsPop(data: any) { + const modalRef = this.modal.create({ + nzTitle: '已发货商品', + nzWidth: 1200, + // nzContent: OrderComponentsOrderDeliverGoodsUpdateComponent, + nzComponentParams: { + listData: data, + }, + nzFooter: null, + }); + modalRef.afterClose.subscribe((result) => { + if (result === true) { + this.getList(); + } + }); + } + + // 立即发货 + deliverGoods(data: any) { + // const modalRef = this.modal.create({ + // nzTitle: '订单发货', + // nzWidth: 1200, + // nzContent: OrderComponentsOrderDelivergoodsComponent, + // nzComponentParams: { + // listData: data, + // }, + // nzFooter: null, + // }); + // modalRef.afterOpen.subscribe(() => {}); + // modalRef.afterClose.subscribe((result) => { + // if (result === true) { + // this.getList(); + // } + // }); + this.router.navigate(['../order-deliver-goods'], { relativeTo: this.ar }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.sfExpand = false; + } + /** + * 立即确认 + */ + deliversure(val: any) { + const modalRef = this.modal.create({ + nzTitle: '订单确认', + nzWidth: 700, + // nzContent: OrderComponentsOrderOrderlistOrderSureComponent, + nzComponentParams: { + record: val, + }, + nzFooter: null, + }); + modalRef.afterOpen.subscribe(() => {}); + modalRef.afterClose.subscribe((result) => { + if (result === true) { + this.getList(); + } + }); + } + /** + * 付款审核 + */ + paymentReview(data: any) { + const dialogData = { + ...data, + }; + // this.modalHelper.create(OrderComponentsOrderOrderlistPaymentReviewComponent, { dialogData }, { size: 900 }).subscribe((res) => { + // if (res === '2') { + // this.getList(); + // } + // }); + } + /** + * 修改价格 + */ + modifyPrice(data: any) { + const dialogData = { + ...data, + }; + // this.modalHelper.create(OrderComponentsOrderOrderlistModifyPriceComponent, { dialogData }, { size: 900 }).subscribe((res) => { + // if (res === '2') { + // this.getList(); + // } + // }); + } + /** + * 审核 + */ + orderReview(data: any) { + const dialogData = { + ...data, + }; + // this.modalHelper.create(OrderReviewComponent, { dialogData }, { size: 900 }).subscribe((res) => { + // if (res === '2') { + // this.getList(); + // } + // }); + } + /** + * 查询字段个数navigate + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } +} diff --git a/src/app/routes/supply-goods/components/list/list.component.html b/src/app/routes/supply-goods/components/list/list.component.html new file mode 100644 index 00000000..97942916 --- /dev/null +++ b/src/app/routes/supply-goods/components/list/list.component.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/src/app/routes/supply-goods/components/list/list.component.spec.ts b/src/app/routes/supply-goods/components/list/list.component.spec.ts new file mode 100644 index 00000000..35a8977b --- /dev/null +++ b/src/app/routes/supply-goods/components/list/list.component.spec.ts @@ -0,0 +1,31 @@ +/* + * @Author: your name + * @Date: 2021-12-01 09:25:32 + * @LastEditTime: 2021-12-01 09:55:39 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\supply-goods\components\list\list.component.spec.ts + */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { SupplyGoodsComponentListComponent } from './list.component'; + +describe('SupplyGoodsComponentListComponent', () => { + let component: SupplyGoodsComponentListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SupplyGoodsComponentListComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SupplyGoodsComponentListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/supply-goods/components/list/list.component.ts b/src/app/routes/supply-goods/components/list/list.component.ts new file mode 100644 index 00000000..b950cec9 --- /dev/null +++ b/src/app/routes/supply-goods/components/list/list.component.ts @@ -0,0 +1,22 @@ +/* + * @Author: your name + * @Date: 2021-12-01 09:25:32 + * @LastEditTime: 2021-12-01 09:49:32 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\supply-goods\components\list\list.component.ts + */ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +@Component({ + selector: 'app-supply-goods-components-list', + templateUrl: './list.component.html', +}) +export class SupplyGoodsComponentListComponent implements OnInit { + constructor(private ar: ActivatedRoute) {} + nzSelectedIndex = 0; + ngOnInit(): void { + this.nzSelectedIndex = this.ar.snapshot.queryParams.nzSelectedIndex; + } +} diff --git a/src/app/routes/supply-goods/services/supply-goods.service.ts b/src/app/routes/supply-goods/services/supply-goods.service.ts new file mode 100644 index 00000000..1eea08f1 --- /dev/null +++ b/src/app/routes/supply-goods/services/supply-goods.service.ts @@ -0,0 +1,23 @@ +/* + * @Author: your name + * @Date: 2021-11-29 15:22:34 + * @LastEditTime: 2021-12-01 10:33:33 + * @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\usercenter\services\usercenter.service.ts + */ +import { Injectable, Injector } from '@angular/core'; +import { _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { BaseService } from 'src/app/shared/services/core/base.service'; +import { EAFileUtil } from 'src/app/shared/utils/file.util'; + +@Injectable({ + providedIn: 'root', +}) +export class SupplyGoodsService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} diff --git a/src/app/routes/supply-goods/supply-goods-routing.module.ts b/src/app/routes/supply-goods/supply-goods-routing.module.ts new file mode 100644 index 00000000..4543b370 --- /dev/null +++ b/src/app/routes/supply-goods/supply-goods-routing.module.ts @@ -0,0 +1,22 @@ +/* + * @Author: your name + * @Date: 2021-11-29 15:22:34 + * @LastEditTime: 2021-12-01 09:52:45 + * @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\usercenter\usercenter-routing.module.ts + */ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { SupplyGoodsComponentListComponent } from './components/list/list.component'; + + +const routes: Routes = [ + { path: 'list', component: SupplyGoodsComponentListComponent} +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class SupplyGoodsRoutingModule {} diff --git a/src/app/routes/supply-goods/supply-goods.module.ts b/src/app/routes/supply-goods/supply-goods.module.ts new file mode 100644 index 00000000..399a3c44 --- /dev/null +++ b/src/app/routes/supply-goods/supply-goods.module.ts @@ -0,0 +1,24 @@ +/* + * @Author: your name + * @Date: 2021-11-29 15:22:34 + * @LastEditTime: 2021-12-01 10:03:01 + * @LastEditors: Please set LastEditors + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ +import { NgModule } from '@angular/core'; +import { SharedModule } from '@shared'; +import { SupplyGoodsComponentListCarloadComponent } from './components/carload/carload.component'; +import { SupplyGoodsComponentListComponent } from './components/list/list.component'; + +import { SupplyGoodsRoutingModule } from './supply-goods-routing.module'; + +const COMPONENTS = [ + SupplyGoodsComponentListComponent, + SupplyGoodsComponentListCarloadComponent +]; + +@NgModule({ + imports: [SharedModule, SupplyGoodsRoutingModule], + declarations: [...COMPONENTS], +}) +export class SupplyGoodsModule {} diff --git a/src/app/routes/usercenter/components/driver/captain/captain.component.html b/src/app/routes/usercenter/components/driver/captain/captain.component.html index 76715051..bcc09f33 100644 --- a/src/app/routes/usercenter/components/driver/captain/captain.component.html +++ b/src/app/routes/usercenter/components/driver/captain/captain.component.html @@ -1,13 +1,13 @@ - + diff --git a/src/app/routes/usercenter/components/driver/captain/captain.component.ts b/src/app/routes/usercenter/components/driver/captain/captain.component.ts index b1fc9c7a..f3f2f016 100644 --- a/src/app/routes/usercenter/components/driver/captain/captain.component.ts +++ b/src/app/routes/usercenter/components/driver/captain/captain.component.ts @@ -106,57 +106,14 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { placeholder: '请输入手机号', }, }, - enStatus: { + phon747e: { + title: '银行卡号', type: 'string', - title: '实名状态', - enum: [ - { label: '全部', value: '' }, - { label: '正常', value: 0 }, - { label: '冻结', value: 1 }, - { label: '废弃', value: 2 }, - ], - default: '', ui: { - widget: 'select', - visibleIf: { - expand: (value: boolean) => value, - }, - }, - }, - enStatus2: { - type: 'string', - title: '驾驶证状态', - enum: [ - { label: '全部', value: '' }, - { label: '正常', value: 0 }, - { label: '冻结', value: 1 }, - { label: '废弃', value: 2 }, - ], - default: '', - ui: { - widget: 'select', - visibleIf: { - expand: (value: boolean) => value, - }, - }, - }, - enStatus23: { - type: 'string', - title: '从业资格证状态', - enum: [ - { label: '全部', value: '' }, - { label: '正常', value: 0 }, - { label: '冻结', value: 1 }, - { label: '废弃', value: 2 }, - ], - default: '', - ui: { - widget: 'select', - visibleIf: { - expand: (value: boolean) => value, - }, + placeholder: '请输入银行卡号', }, }, + phone2: { title: '业务员手机号', type: 'string', @@ -164,12 +121,15 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { maxLength: 11, ui: { placeholder: '请输入手机号', + visibleIf: { + expand: (value: boolean) => value + } }, }, }, }; - this.ui = { '*': { spanLabelFixed: 180, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; } initST() { @@ -179,36 +139,7 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { { title: '手机号', className: 'text-center', index: 'contactsName' }, { title: '承运总单量', className: 'text-center', render: 'enterpriseName' }, { title: '当前车辆', className: 'text-center', index: 'unifiedSocialCreditCode' }, - { title: '实名认证状态', className: 'text-center', index: 'effectiveDateStr', - type: 'badge', - badge: { - 正常: { text: '正常', color: 'success' }, - 冻结: { text: '冻结', color: 'warning' }, - 废弃: { text: '废弃', color: 'default' }, - }, - }, - { - title: '驾驶证状态', - className: 'text-center', - index: 'enStatusStr2', - type: 'badge', - badge: { - 正常: { text: '正常', color: 'success' }, - 冻结: { text: '冻结', color: 'warning' }, - 废弃: { text: '废弃', color: 'default' }, - }, - }, - { - title: '从业资格证状态', - className: 'text-center', - index: 'enStatusStr3', - type: 'badge', - badge: { - 正常: { text: '正常', color: 'success' }, - 冻结: { text: '冻结', color: 'warning' }, - 废弃: { text: '废弃', color: 'default' }, - }, - }, + { title: '银行卡号', className: 'text-center', index: 'unifiedSocialCreditCode' }, { title: '推广业务员', className: 'text-center', index: 'unifiedSocialCreditCode2' }, { title: '注册时间', className: 'text-center', index: 'unifiedSocialCreditCode3' }, { @@ -219,7 +150,7 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { { text: '查看', click: (item) => { - this.router.navigate(['./detail', item.tenantId], { relativeTo: this.ar }); + this.router.navigate(['/usercenter/driver/detail', item.tenantId], { relativeTo: this.ar }); // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); }, }, diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index e556252b..eabd0818 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -101,6 +101,17 @@ ] }] }, + { + "text": "货源管理", + "icon": "anticon anticon-dashboard", + "group": true, + "children": [ + { + "text": "货源管理", + "link": "/supplygoods/list" + } + ] + }, { "text": "系统设置", "icon": "anticon anticon-dashboard",