diff --git a/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts b/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts index c76be624..5353245f 100644 --- a/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/freight/user/detail/detail.component.ts @@ -15,6 +15,7 @@ export class FreightComponentsUserDetailComponent implements OnInit { i: any; url = `/rule?_allow_anonymous=true`; @ViewChild('st', { static: false }) st!: STComponent; + detailData: any = { goodsList: [ { diff --git a/src/app/routes/vehicle/components/audit/audit.component.html b/src/app/routes/vehicle/components/audit/audit.component.html new file mode 100644 index 00000000..3d688f79 --- /dev/null +++ b/src/app/routes/vehicle/components/audit/audit.component.html @@ -0,0 +1,83 @@ + + + + + + +
+ +
+ + +
+ + + + +
+ +
+
+ + + + +
+
+
+
+ + + + + + +
+
+ {{ item.enterpriseName }} +
+
+
+ +
+ {{ item.contactsPhone }} +
+
+ + 冻结 + 正常 + +
+
diff --git a/src/app/routes/vehicle/components/audit/audit.component.spec.ts b/src/app/routes/vehicle/components/audit/audit.component.spec.ts new file mode 100644 index 00000000..e815b19d --- /dev/null +++ b/src/app/routes/vehicle/components/audit/audit.component.spec.ts @@ -0,0 +1,31 @@ +/* + * @Author: your name + * @Date: 2021-12-01 20:05:59 + * @LastEditTime: 2021-12-01 20:35:33 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\vehicle\components\list\list.component.spec.ts + */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { VehicleComponentsListComponent } from './list.component'; + +describe('VehicleComponentsListComponent', () => { + let component: VehicleComponentsListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [VehicleComponentsListComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(VehicleComponentsListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/vehicle/components/audit/audit.component.ts b/src/app/routes/vehicle/components/audit/audit.component.ts new file mode 100644 index 00000000..cf8a5236 --- /dev/null +++ b/src/app/routes/vehicle/components/audit/audit.component.ts @@ -0,0 +1,231 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { UsermanageService } from '../../../vehicle/services/vehicle.service'; +@Component({ + selector: 'app-Freight-components-list', + templateUrl: './list.component.html', +}) +export class VehicleComponentsListComponent implements OnInit { + _$expand = false; + url = `/rule?_allow_anonymous=true`; + + ui!: SFUISchema; + schema!: SFSchema; + columns!: STColumn[]; + datalist = [ + { + storeName: '企业名称', + contactsName: '152746565', + enterpriseName: '湖南', + unifiedSocialCreditCode: '45454', + contactsPhone: '*97889461561', + effectiveDateStr: '废弃eww', + enStatusStr2: '正常', + enStatusStr3: '正常', + unifiedSocialCreditCode3: '常用服务', + unifiedSocialCreditCode2: '正常', + tenantId: 1 + }, + { + storeName: '企业名称', + contactsName: '152746565', + enterpriseName: '湖南', + unifiedSocialCreditCode: '45454', + contactsPhone: '*97889461561', + effectiveDateStr: '废弃eww', + enStatusStr2: '正常', + enStatusStr3: '正常', + unifiedSocialCreditCode3: '常用服务', + unifiedSocialCreditCode2: '正常', + tenantId: 2 + }, + ] + @ViewChild('st', { static: false }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + + constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} + /** + * 查询字段个数navigate + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + + /** + * 查询参数 + */ + get reqParams() { + const params: any = { + ...(this.sf && this.sf.value), + }; + if (this.sf?.value.effectiveDate) { + params.effectiveDateStart = this.sf?.value.effectiveDate[0]; + params.effectiveDateEnd = this.sf?.value.effectiveDate[1]; + } + delete params.effectiveDate; + delete params.expand; + return params; + } + + get selectedRows() { + return this.st?.list.filter((item) => item.checked) || []; + } + + ngOnInit() { + this.initSF(); + this.initST(); + this.ar.url.subscribe((params) => { + this.st?.load(1); + }); + } + dataProcess(data: STData[]): STData[] { + return data.map((i, index) => { + i.showSortFlag = false; + return i; + }); + } + initSF() { + this.schema = { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true, + }, + }, + storeName: { title: '车牌号', type: 'string', ui: { showRequired: false } }, + contactsName: { + 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', + }, + }, + enStatus12: { + 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, + }, + }, + }, + }, + }; + this.ui = { '*': { spanLabelFixed: 90, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; + } + + initST() { + this.columns = [ + // { title: '', type: 'checkbox', className: 'text-center' }, + { title: '车牌号', className: 'text-center', index: 'storeName' }, + { 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: '操作', + width: '170px', + className: 'text-center', + buttons: [ + { + text: '查看', + click: (item) => { + this.router.navigate(['./detail', item.tenantId], { relativeTo: this.ar }); + // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); + }, + }, + ], + }, + ]; + } + daoyun(item: any) { + this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar }); + } + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + creat() { + this.router.navigate(['./new',], { relativeTo: this.ar }); + } + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } +} diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.html b/src/app/routes/vehicle/components/audit/detail/detail.component.html new file mode 100644 index 00000000..714ae589 --- /dev/null +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.html @@ -0,0 +1,121 @@ + + + + + + + + + + + + + 行驶证信息 + + {{ detailData?.contactsName }} + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + + {{ detailData?.contactsName }} + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + + {{ detailData?.contactsName }} + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + {{ detailData?.contactsName }} + + + + + + + + 道路运输证信息 + + {{ detailData?.enterpriseName }} + + + {{ detailData?.unifiedSocialCreditCode }} + + + {{ detailData?.enterpriseType }} + + + + + + + + 其他信息 + + {{ detailData?.name }} + + + + + + + + + + + diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.less b/src/app/routes/vehicle/components/audit/detail/detail.component.less new file mode 100644 index 00000000..c77bde67 --- /dev/null +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.less @@ -0,0 +1,40 @@ +@import '~@delon/theme/index'; +:host { + ::ng-deep { + .ant-steps-dot { + .ant-steps-item-content { + width: 200px; + } + .ant-steps-item-icon { + margin-left: 96px; + } + .ant-steps-item-tail::after { + margin-left: 40px; + } + } + .success { + color: @success-color; + } + + .warning { + color: @warning-color; + } + + .error { + color: @error-color; + } + } + .mt16 { + margin-top: 16px; + } + .user-info { + display: flex; + font-size: 16px; + .enterprise-name { + margin-right: 15px; + } + .user-info-des { + margin-bottom: 5px; + } + } +} diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.spec.ts b/src/app/routes/vehicle/components/audit/detail/detail.component.spec.ts new file mode 100644 index 00000000..00666a0b --- /dev/null +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.spec.ts @@ -0,0 +1,31 @@ +/* + * @Author: your name + * @Date: 2021-11-29 20:19:08 + * @LastEditTime: 2021-11-29 20:31:00 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\detail\detail.component.spec.ts + */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { FreightComponentsListDetailComponent } from './detail.component'; + +describe('FreightComponentsListDetailComponent', () => { + let component: FreightComponentsListDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [FreightComponentsListDetailComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FreightComponentsListDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.ts b/src/app/routes/vehicle/components/audit/detail/detail.component.ts new file mode 100644 index 00000000..447fe5a6 --- /dev/null +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.ts @@ -0,0 +1,273 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { UsermanageService } from '../../../services/vehicle.service'; + +@Component({ + selector: 'app-supplier-components-list-view', + templateUrl: './detail.component.html', + styleUrls: ['./detail.component.less'], +}) +export class VehicleComponentsListDetailComponent implements OnInit { + i: any; + url = `/rule?_allow_anonymous=true`; + @ViewChild('st', { static: false }) st!: STComponent; + isShow = false; + isVisible = false; + modalTitle = '有效期'; + modalName = ''; + ui!: SFUISchema; + columns: STColumn[] = [ + { title: '认证司机', index: 'perPrice', width: 300, className: 'text-center' }, + { title: '司机手机号', index: 'goodsQuantity', width: 300, className: 'text-center' }, + { title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' }, + ]; + detailData: any = { + goodsList: [ + { + perPrice: '22323', + goodsQuantity: '项目名称', + totalPrice: '角色', + }, + { + perPrice: '2259595', + goodsQuantity: '项目名称2', + totalPrice: '角色', + }, + ] + }; + schema!: SFSchema; + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema1!: SFSchema; + @ViewChild('sf1', { static: false }) sf1!: SFComponent; + validData: any = ['suppliersType']; + suppliersData: any = {}; + + constructor( + private http: _HttpClient, + private modal: ModalHelper, + public service: UsermanageService, + private route: ActivatedRoute, + private modalHelper: ModalHelper, + private msgSrv: NzMessageService, + ) {} + + ngOnInit() { + console.log(this.route.snapshot); + // this.initData(); + this.initSF(); + this.initSF1(); + // this.launchSign(); + } + /** + * 初始化查询表单 + */ + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + effectiveDate: { + title: '有效期', + type: 'string', + ui: { + widget: 'date', + format: 'yyyy-MM-dd 00:00:00', + // hidden: this.modalName === 'effectiveDate' ? false : true, + } as SFDateWidgetSchema, + }, + }, + required: ['effectiveDate'], + }; + this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; + } + initSF1() { + this.schema1 = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + suppliersType: { + type: 'string', + title: '类型', + enum: [ + { label: '非外部供应商', value: 0 }, + { label: '外部供应商', value: 1 }, + ], + default: '', + ui: { + widget: 'select', + change: (args: any) => { + console.log(args, 'args'); + this.suppliersData.suppliersType = args; + if (args === 1) { + this.validData = ['suppliersType', 'externalSuppliersId']; + } else { + this.validData = ['suppliersType']; + this.suppliersData.externalSuppliersId = ''; + } + this.initSF1(); + }, + }, + }, + externalSuppliersId: { + title: '外部供应商id', + type: 'string', + default: '', + ui: { + visibleIf: { suppliersType: (value: any) => value === 1 }, + }, + }, + }, + required: this.validData, + }; + } + showModal(name: any) { + this.modalName = name; + if (name === 'effectiveDate') { + this.isShow = true; + } else { + this.isVisible = true; + } + } + async initData() { + console.log(this.route.snapshot, 'this.route.snapshot'); + + const params = { + tenantId: this.route.snapshot.params.id, + // tenantId: this.route.snapshot.queryParams.tenantId, + }; + const res = await this.service.asyncRequest(this.service.$api_get_supplier_info, params); + // // 商品资质 + // if (res.enterpriseBusinessJson) { + // res.enterpriseBusinessJson.aptitudes = res.enterpriseBusinessJson?.aptitudes ? res.enterpriseBusinessJson.aptitudes.split(',') : []; + // } + // // // 申请人身份证证件 + // // res.applyUserJson.imagelist = []; + // // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoFront); + // // res.applyUserJson.imagelist.push(res.applyUserJson.certificatePhotoBack); + // // res.applyUserJson.imagelist.push(res.applyUserJson.handCertificate); + + // 法人身份证证件 + const imagelist = []; + imagelist.push(res?.certificatePhotoFront); + imagelist.push(res?.certificatePhotoBack); + res.certificatePhoto = imagelist; + + // 营业执照 + res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate + ? res.enterpriseQualificationCertificate.split(',') + : []; + + // 返回所在地 + res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode); + + this.detailData = res; + this.suppliersData = { + suppliersType: res?.suppliersType, + externalSuppliersId: res?.externalSuppliersId, + }; + } + + /** + * 根据地区code查询地区详情 + * @param code 地区代码 + */ + async getRegionFullName(code: any) { + const params = { + regionCode: code, + }; + const res = await this.service.asyncRequest(this.service.$api_get_region_detailByCode, params, 'POST', true); + // if (res && res.regionFullName) { + // const arr = res.regionFullName.split(','); + // res.regionFullName = arr.reverse().join('-'); + // } + return res && res.regionFullName; + } + add() { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + goBack() { + window.history.go(-1); + } + /** + * 冻结 + */ + freezeOrResume(type: number) { + console.log(type) + // this.service.http + // .post(this.service.$api_set_freezeOrResume, { + // tenantId: this.route.snapshot.params.id, + // // tenantId: this.route.snapshot.queryParams.tenantId, + // status: type, + // }) + // .subscribe((res) => { + // if (res.data === true) { + // if (type === 0) { + // this.service.msgSrv.success(`启用成功!`); + // } else if (type === 1) { + // this.service.msgSrv.success(`冻结成功!`); + // } + // this.ngOnInit(); + // } else { + // this.service.msgSrv.error(res.msg || '操作失败!'); + // } + // }); + } + PayOrResume(type: number) { + console.log(type) + // this.service.http + // .post(this.service.$api_set_freezeOrResume, { + // tenantId: this.route.snapshot.params.id, + // // tenantId: this.route.snapshot.queryParams.tenantId, + // status: type, + // }) + // .subscribe((res) => { + // if (res.data === true) { + // if (type === 0) { + // this.service.msgSrv.success(`启用成功!`); + // } else if (type === 1) { + // this.service.msgSrv.success(`冻结成功!`); + // } + // this.ngOnInit(); + // } else { + // this.service.msgSrv.error(res.msg || '操作失败!'); + // } + // }); + } + + handleCancel(name: any) { + if (name === 'effectiveDate') { + this.isShow = false; + } else { + this.isVisible = false; + } + } + handleOK(name: any) { + const params: any = { + tenantId: this.route.snapshot.params.id, + // tenantId: this.route.snapshot.queryParams.tenantId, + }; + + if (name === 'effectiveDate') { + params.effectiveDate = this.sf?.value?.effectiveDate; + } else { + Object.assign(params, this.sf1?.value); + } + this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => { + if (res.data === true) { + this.service.msgSrv.success(`编辑成功!`); + this.ngOnInit(); + } else { + this.service.msgSrv.error(res.msg || '编辑失败!'); + } + if (name === 'effectiveDate') { + this.isShow = false; + } else { + this.isVisible = false; + } + }); + } +} diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.html b/src/app/routes/vehicle/components/list/detail/detail.component.html index 4aafe892..714ae589 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.html +++ b/src/app/routes/vehicle/components/list/detail/detail.component.html @@ -1,6 +1,6 @@ - + - - - - - - - - - - -
- - - -
确定冻结该企业吗?
-
- 停用后,该企业将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作 -
-
-
- -
- - - -
确定启用该企业吗?
-
- 启用后,该企业将恢复正常使用功能,请再次确认 -
-
-
- -
- - - -
确定关闭该企业支付权限吗?
-
- 停用后,该企业将被限制使用支付功能,请谨慎操作 -
-
-
- -
- - - -
确定开通该企业支付权限吗?
-
- 启用后,该企业将恢复正常支付功能,请再次确认 +
- 联系信息人 - + 行驶证信息 + {{ detailData?.contactsName }} - + {{ detailData?.contactsPhone }} - + {{ detailData?.contactsPhone }} - + + + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + + {{ detailData?.contactsName }} + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + + {{ detailData?.contactsName }} + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + {{ detailData?.contactsName }} + + - 公司基本信息 - + 道路运输证信息 + {{ detailData?.enterpriseName }} - + {{ detailData?.unifiedSocialCreditCode }} - + {{ detailData?.enterpriseType }} - - {{ detailData?.registrationCapital }} - 万元 - - - {{ detailData?.enterpriseRegistrationTime }} - - -
- {{ detailData?.operatingStartTime }} 至 {{ detailData?.operatingEndTime }} -
-
长期
-
{{ detailData?.operatingStartTime }} 至 长期
-
-
- - - {{ detailData?.enterpriseAddressCodeStr }} - - - {{ detailData?.enterpriseAddress }} - - - - - {{ detailData?.enterpriseAddressCodeStr }} - - - {{ detailData?.enterpriseAddress }} - - - - - {{ detailData?.enterpriseAddressCodeStr }} - - - {{ detailData?.enterpriseAddress }} - - - - - {{ detailData?.businessScope }} - - - 法人信息 - + + 其他信息 + {{ detailData?.name }} - - {{ detailData?.certificateNumber }} - - - {{ detailData?.validStartTime }} - - {{ detailData?.validEndTime ? detailData?.validEndTime : '长期' }} - - + - - 银行结算信息 - - {{ detailData?.name }} - - - {{ detailData?.certificateNumber }} - - - {{ detailData?.validStartTime }} - - + +
- - -
- - -
-
+ diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.less b/src/app/routes/vehicle/components/list/detail/detail.component.less index 48f605d9..c77bde67 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.less +++ b/src/app/routes/vehicle/components/list/detail/detail.component.less @@ -33,12 +33,6 @@ .enterprise-name { margin-right: 15px; } - img { - width: 64px; - height: 64px; - margin-right: 15px; - border-radius: 50%; - } .user-info-des { margin-bottom: 5px; } diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.ts b/src/app/routes/vehicle/components/list/detail/detail.component.ts index 809f567f..447fe5a6 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/list/detail/detail.component.ts @@ -4,23 +4,41 @@ import { STColumn, STComponent } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; import { NzMessageService } from 'ng-zorro-antd/message'; -import { UsermanageService } from '../../../../services/usercenter.service'; +import { UsermanageService } from '../../../services/vehicle.service'; @Component({ selector: 'app-supplier-components-list-view', templateUrl: './detail.component.html', styleUrls: ['./detail.component.less'], }) -export class FreightComponentsListDetailComponent implements OnInit { +export class VehicleComponentsListDetailComponent implements OnInit { i: any; url = `/rule?_allow_anonymous=true`; @ViewChild('st', { static: false }) st!: STComponent; - detailData: any; isShow = false; isVisible = false; modalTitle = '有效期'; modalName = ''; ui!: SFUISchema; + columns: STColumn[] = [ + { title: '认证司机', index: 'perPrice', width: 300, className: 'text-center' }, + { title: '司机手机号', index: 'goodsQuantity', width: 300, className: 'text-center' }, + { title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' }, + ]; + detailData: any = { + goodsList: [ + { + perPrice: '22323', + goodsQuantity: '项目名称', + totalPrice: '角色', + }, + { + perPrice: '2259595', + goodsQuantity: '项目名称2', + totalPrice: '角色', + }, + ] + }; schema!: SFSchema; @ViewChild('sf', { static: false }) sf!: SFComponent; schema1!: SFSchema; diff --git a/src/app/routes/vehicle/components/list/list.component.html b/src/app/routes/vehicle/components/list/list.component.html index b0d2de52..3d688f79 100644 --- a/src/app/routes/vehicle/components/list/list.component.html +++ b/src/app/routes/vehicle/components/list/list.component.html @@ -1,13 +1,13 @@ - + @@ -33,7 +33,6 @@
- diff --git a/src/app/routes/vehicle/components/list/list.component.ts b/src/app/routes/vehicle/components/list/list.component.ts index 227549e8..cf8a5236 100644 --- a/src/app/routes/vehicle/components/list/list.component.ts +++ b/src/app/routes/vehicle/components/list/list.component.ts @@ -96,24 +96,32 @@ export class VehicleComponentsListComponent implements OnInit { hidden: true, }, }, - storeName: { title: '企业名称', type: 'string', ui: { showRequired: false } }, + storeName: { title: '车牌号', type: 'string', ui: { showRequired: false } }, contactsName: { - title: '联系人', - type: 'string', - ui: { - showRequired: false, - }, - }, - unifiedSocialCreditCode: { - title: '税源地', + title: '车型车长载重', type: 'string', ui: { showRequired: false, }, }, + enStatus: { type: 'string', - title: '货主状态', + title: '运营状态', + enum: [ + { label: '全部', value: '' }, + { label: '正常', value: 0 }, + { label: '冻结', value: 1 }, + { label: '废弃', value: 2 }, + ], + default: '', + ui: { + widget: 'select', + }, + }, + enStatus12: { + type: 'string', + title: '车牌颜色', enum: [ { label: '全部', value: '' }, { label: '正常', value: 0 }, @@ -130,7 +138,7 @@ export class VehicleComponentsListComponent implements OnInit { }, enStatus2: { type: 'string', - title: 'CRM审核状态', + title: '到期状态', enum: [ { label: '全部', value: '' }, { label: '正常', value: 0 }, @@ -153,23 +161,20 @@ export class VehicleComponentsListComponent implements OnInit { initST() { this.columns = [ // { title: '', type: 'checkbox', className: 'text-center' }, - { title: '企业名称', className: 'text-center', index: 'storeName' }, - { title: '联系人', className: 'text-center', index: 'contactsName' }, - { title: '税源地', className: 'text-center', render: 'enterpriseName' }, - { title: '累计运单金额', className: 'text-center', index: 'unifiedSocialCreditCode' }, - { title: '道运证', className: 'text-center', index: 'contactsPhone', - render: 'contactsPhone' - }, - { title: '企业状态', className: 'text-center', index: 'effectiveDateStr', + { title: '车牌号', className: 'text-center', index: 'storeName' }, + { 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: 'success' }, + 冻结: { text: '运输中', color: 'warning' }, 废弃: { text: '废弃', color: 'default' }, }, }, { - title: 'CRM审核状态', + title: '行驶证到期状态', className: 'text-center', index: 'enStatusStr2', type: 'badge', @@ -180,7 +185,7 @@ export class VehicleComponentsListComponent implements OnInit { }, }, { - title: '代收权限', + title: '道运证到期状态', className: 'text-center', index: 'enStatusStr3', type: 'badge', @@ -190,8 +195,6 @@ export class VehicleComponentsListComponent implements OnInit { 废弃: { text: '废弃', color: 'default' }, }, }, - { title: '常用服务', className: 'text-center', index: 'unifiedSocialCreditCode3' }, - { title: '推广业务员', className: 'text-center', index: 'unifiedSocialCreditCode2' }, { title: '操作', width: '170px', diff --git a/src/app/routes/vehicle/vehicle-routing.module.ts b/src/app/routes/vehicle/vehicle-routing.module.ts index 983d9e64..87a78b97 100644 --- a/src/app/routes/vehicle/vehicle-routing.module.ts +++ b/src/app/routes/vehicle/vehicle-routing.module.ts @@ -1,13 +1,14 @@ /* * @Author: your name * @Date: 2021-11-29 15:22:34 - * @LastEditTime: 2021-12-01 20:38:01 + * @LastEditTime: 2021-12-02 11:11:39 * @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 { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component'; import { VehicleComponentsListComponent } from './components/list/list.component'; @@ -15,6 +16,7 @@ import { VehicleComponentsListComponent } from './components/list/list.component const routes: Routes = [ { path: 'list', component: VehicleComponentsListComponent }, + { path: 'list/detail/:id', component: VehicleComponentsListDetailComponent }, ]; @NgModule({ diff --git a/src/app/routes/vehicle/vehicle.module.ts b/src/app/routes/vehicle/vehicle.module.ts index bcf9b1f7..19165da6 100644 --- a/src/app/routes/vehicle/vehicle.module.ts +++ b/src/app/routes/vehicle/vehicle.module.ts @@ -8,12 +8,14 @@ */ import { NgModule } from '@angular/core'; import { SharedModule } from '@shared'; +import { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component'; import { VehicleComponentsListComponent } from './components/list/list.component'; import { VehicleRoutingModule } from './vehicle-routing.module'; const COMPONENTS = [ - VehicleComponentsListComponent + VehicleComponentsListComponent, + VehicleComponentsListDetailComponent ]; @NgModule({ diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 51e65ba8..2328b7fd 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -120,6 +120,11 @@ { "text": "车辆列表", "link": "/vehicle/list" + }, + { + "hide": true, + "text": "车辆详情", + "link": "/vehicle/list/detail/:id" } ] },