diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.html b/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.html deleted file mode 100644 index f005db7c..00000000 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.html +++ /dev/null @@ -1,24 +0,0 @@ -
- -
- -
- - - - - - -
-
-
-
diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.less b/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.less deleted file mode 100644 index f3529c7f..00000000 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.less +++ /dev/null @@ -1,6 +0,0 @@ -:host { - .myForm { - width: 600px; - margin: 3rem 0; - } -} diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.spec.ts b/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.spec.ts deleted file mode 100644 index 87adeeae..00000000 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { CmcComponentsTagsAddComponent } from './edit-info.component'; - -describe('CmcComponentsTagsAddComponent', () => { - let component: CmcComponentsTagsAddComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [CmcComponentsTagsAddComponent], - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(CmcComponentsTagsAddComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.ts b/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.ts deleted file mode 100644 index 7158c64e..00000000 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/add/add.component.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; -import { ModalHelper } from '@delon/theme'; -import { GoodsService } from 'src/app/routes/cmc/services/goods.service'; - -@Component({ - selector: 'app-cmc-components-add', - templateUrl: './add.component.html', - styleUrls: ['./add.component.less'], -}) -export class CmcComponentsTagsAddComponent implements OnInit { - @ViewChild('sf', { static: false }) - sf!: SFComponent; - i: any; - schema!: SFSchema; - ui!: SFUISchema; - cateData: any = []; - formTitle: any = '新增标签'; - formData: any = { - // avatar:[ - // { - // uid: -1, - // name: 'LOGO', - // status: 'done', - // url: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png', - // response: { - // url: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png', - // }, - // }, - // ], - // name:'西四' - }; - - constructor(public service: GoodsService, private modal: ModalHelper, private route: ActivatedRoute) { - const { flag, type, id } = route.snapshot?.queryParams; - Object.assign(this.formData, { flag, type, id }); - } - - ngOnInit() { - this.initSF(); - if (this.formData.flag !== '3') { - this.getCates(); - } else { - this.getBusinessCates(); - } - // console.log(this.formData, 'this.formData'); - if (this.formData.type === 'edit') { - this.formTitle = '编辑标签'; - } - if (this.formData.type === 'view') { - this.formTitle = '查看标签'; - } - if (this.formData.type !== 'add') { - if (this.formData.flag !== '3') { - this.getInfo(); - } else { - this.getBusinessInfo(); - } - } - } - initSF() { - this.schema = { - properties: { - name: { - title: '标签名称', - type: 'string', - maxLength: 8, - }, - categoryId: { - title: '关联分类', - type: 'string', - default: this.formData?.categoryId || [], - enum: this.cateData, - ui: { - widget: 'tree-select', - checkable: true, // 节点前添加 Checkbox 复选框 - allowClear: true, // 支持清除 - virtualHeight: '480px', - // checkStrictly: true, // checkable 状态下节点选择完全受控(父子节点选中状态不再关联) - // defaultExpandAll: false, // 默认展开所有树节点 - // expandedKeys: this.formData?.categoryId || [], // 默认展开指定的树节点 - change: (e) => { - console.log(e); - }, - // valueProperty: 'key', - // labelProperty: 'title', - // asyncData: () => - // this.service.request(this.service.$api_get_labelCategorys).pipe( - // map((data: any) => { - // return data.map((m: any) => { - // return { title: m.name, key: m.id }; - // }); - // }), - // ), - } as SFSelectWidgetSchema, - }, - remark: { - title: '标签介绍', - type: 'string', - maxLength: 50, - ui: { - widget: 'textarea', - placeholder: '请输入标签介绍', - autosize: { minRows: 3, maxRows: 6 }, - errors: { - required: '请输入标签介绍', - }, - }, - }, - }, - required: ['name', 'categoryId', 'remark'], - }; - this.ui = { - '*': { - spanLabel: 5, - grid: { span: 24 }, - }, - }; - } - getCates() { - const params = { - flag: this.formData.flag, - }; - const cateApi = this.service.$api_get_category_treeList; - this.service.request(cateApi, params).subscribe((res) => { - // res.map((i: any) => { - // i.key = i.id; - // i.title = i.name; - // if (i.children) { - // i.children.map((j: any) => { - // j.key = j.id; - // j.title = j.name; - // if (j.children) { - // j.children.map((k: any) => { - // k.key = k.id; - // k.title = k.name; - // }); - // } - // }); - // } - // }); - this.cateData = res; - this.initSF(); - }); - } - getBusinessCates() { - const params = { - flag: this.formData.flag, - }; - const cateApi = this.service.$api_get_business_cateList; - this.service.request(cateApi, params).subscribe((res) => { - // res.map((i: any) => { - // i.key = i.id; - // i.title = i.name; - // if (i.children) { - // i.children.map((j: any) => { - // j.key = j.id; - // j.title = j.name; - // if (j.children) { - // j.children.map((k: any) => { - // k.key = k.id; - // k.title = k.name; - // }); - // } - // }); - // } - // }); - this.cateData = res; - this.initSF(); - }); - } - getInfo() { - const params = { - labelId: this.formData.id, - }; - this.service.http.post(this.service.$api_get_labelDetail, params).subscribe((res) => { - const resData = res.data; - if (res.data?.categoryIds) { - resData.categoryId = res.data?.categoryIds.split(','); - } - delete resData.categoryIds; - Object.assign(this.formData, resData); - // console.log(this.formData, 'this.formData'); - this.initSF(); - }); - } - getBusinessInfo() { - const params = { - id: this.formData.id, - }; - this.service.http.post(this.service.$api_get_business_labelDetail, params).subscribe((res) => { - const resData = res.data; - if (res.data?.categoryIdList) { - resData.categoryId = res.data?.categoryIdList; - } - delete resData.categoryIdList; - Object.assign(this.formData, resData); - this.initSF(); - }); - } - formSubmit() { - const cateIds: any[] = []; - let saveApi = this.service.$api_label_save; - if (this.formData.flag !== '3') { - this.sf.value.categoryId.map((i: any) => { - this.cateData.map((j: any) => { - if (j.children) { - if (i === j.key) { - j.children.map((k: any) => { - if (k.children) { - k.children.map((m: any) => { - cateIds.push(m.key); - }); - } else { - cateIds.push(k.key); - } - }); - } else if (i !== j.key) { - j.children.map((k: any) => { - if (i === k.key && k.children) { - k.children.map((m: any) => { - cateIds.push(m.key); - }); - } else { - cateIds.push(i); - } - }); - } - } else { - if (i === j.key) { - cateIds.push(i); - } - } - }); - }); - } - const params: any = { - ...this.sf.value, - }; - if (this.formData.flag !== '3') { - const uniqueArr = [...new Set(cateIds)]; - params.categoryId = uniqueArr.toString(); - saveApi = this.service.$api_label_save; - } else { - saveApi = this.service.$api_business_label_save; - params.categoryIdList = this.sf.value.categoryId; - delete params.categoryId; - } - this.service.http.post(saveApi, params).subscribe((res) => { - if (res.data) { - this.service.msgSrv.success('提交成功'); - this.goBack(); - } - }); - } - goBack() { - history.go(-1); - } -} diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.html b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.html index 23a73fad..9cd39253 100644 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.html +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.html @@ -34,7 +34,7 @@
- + this.addOne('view', _record) }, + { text: '查看', click: (_record) => this.View(_record) }, ], }, ]; @@ -202,14 +204,11 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { /** * 新增实例 */ - addOne(type: any, record: any) { + View(record: any) { + console.log(record) // this.router.navigate(['../add'], { relativeTo: this.ar }); - this.router.navigate(['/cmc/tags/add'], { - queryParams: { - id: record.id, - type, - flag: this.tabType, - }, + this.router.navigate(['./view', record.tenantId], { + relativeTo: this.ar }); } @@ -289,6 +288,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { // 切换Tab changeTab(item: any) { this.tabType = item.type; + console.log(item) this.sf?.reset(); // if (item.type === 3) { // this.stApi = this.service.$api_get_business_labelList; diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.html b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.html new file mode 100644 index 00000000..2ee03ca9 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.html @@ -0,0 +1,245 @@ + + + + + + + + + + + + +
+ + + +
确定冻结该企业吗?
+
+ 停用后,该企业将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作 +
+
+
+ +
+ + + +
确定启用该企业吗?
+
+ 启用后,该企业将恢复正常使用功能,请再次确认 +
+
+
+ +
+ + + +
确定关闭该企业支付权限吗?
+
+ 停用后,该企业将被限制使用支付功能,请谨慎操作 +
+
+
+ +
+ + + +
确定开通该企业支付权限吗?
+
+ 启用后,该企业将恢复正常支付功能,请再次确认 +
+
+
+
+ + + 联系信息人 + + {{ detailData?.contactsName }} + + + {{ detailData?.contactsPhone }} + + + {{ detailData?.contactsPhone }} + + + + + + + + 公司基本信息 + + {{ 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/usercenter/components/freight/enterprise-audit/view/view.component.less b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.less new file mode 100644 index 00000000..48f605d9 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.less @@ -0,0 +1,46 @@ +@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; + } + img { + width: 64px; + height: 64px; + margin-right: 15px; + border-radius: 50%; + } + .user-info-des { + margin-bottom: 5px; + } + } +} diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.spec.ts b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.spec.ts new file mode 100644 index 00000000..a14af7b4 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.spec.ts @@ -0,0 +1,31 @@ +/* + * @Author: your name + * @Date: 2021-11-30 10:25:50 + * @LastEditTime: 2021-11-30 10:26:29 + * @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\enterprise-audit\view\view.component.spec.ts + */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { FreightComponentsEnterpriseAuditViewComponent } from './view.component'; + +describe('FreightComponentsEnterpriseAuditViewComponent', () => { + let component: FreightComponentsEnterpriseAuditViewComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [FreightComponentsEnterpriseAuditViewComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FreightComponentsEnterpriseAuditViewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.ts b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.ts new file mode 100644 index 00000000..ad86a70b --- /dev/null +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.ts @@ -0,0 +1,255 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { UsermanageService } from '../../../../services/usercenter.service'; +import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; +import { Observable, Observer } from 'rxjs'; +@Component({ + selector: 'app-Freight-components-EnterpriseAudit-view', + templateUrl: './view.component.html', + styleUrls: ['./view.component.less'], +}) +export class FreightComponentsEnterpriseAuditViewComponent 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; + 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/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 0adbc64c..bbb18f3c 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -48,7 +48,7 @@ export class FreightComponentsListComponent implements OnInit { constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} /** - * 查询字段个数 + * 查询字段个数navigate */ get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; diff --git a/src/app/routes/usercenter/usercenter-routing.module.ts b/src/app/routes/usercenter/usercenter-routing.module.ts index f0fda8c3..83e2ef69 100644 --- a/src/app/routes/usercenter/usercenter-routing.module.ts +++ b/src/app/routes/usercenter/usercenter-routing.module.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-11-29 15:22:34 - * @LastEditTime: 2021-11-30 09:56:44 + * @LastEditTime: 2021-11-30 10:29:19 * @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 @@ -9,6 +9,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component'; +import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component'; import { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component'; import { FreightComponentsListComponent } from './components/freight/list/list.component'; @@ -23,6 +24,7 @@ const routes: Routes = [ { path: 'freight/list/new', component: FreightComponentsListNewComponent }, { path: 'freight/list/detail/:id', component: FreightComponentsListDetailComponent }, { path: 'freight/enterprise', component: FreightComponentsEnterpriseAuditComponent }, + { path: 'freight/enterprise/view/:id', component: FreightComponentsEnterpriseAuditViewComponent }, ]; @NgModule({ diff --git a/src/app/routes/usercenter/usercenter.module.ts b/src/app/routes/usercenter/usercenter.module.ts index ca291e1b..3dac1057 100644 --- a/src/app/routes/usercenter/usercenter.module.ts +++ b/src/app/routes/usercenter/usercenter.module.ts @@ -9,6 +9,7 @@ import { NgModule } from '@angular/core'; import { SharedModule } from '@shared'; import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component'; +import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component'; import { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component'; import { FreightComponentsListComponent } from './components/freight/list/list.component'; import { FreightComponentsListNewComponent } from './components/freight/list/new/new.component'; @@ -20,7 +21,8 @@ const COMPONENTS = [ FreightComponentsListViewComponent, FreightComponentsListNewComponent, FreightComponentsListDetailComponent, - FreightComponentsEnterpriseAuditComponent + FreightComponentsEnterpriseAuditComponent, + FreightComponentsEnterpriseAuditViewComponent ]; @NgModule({ diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 091314a1..66bf37ae 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -63,6 +63,12 @@ "text": "企业审核列表", "icon": "anticon anticon-dashboard", "link": "/usercenter/freight/enterprise" + }, + { + "text": "企业审核列表详情", + "hide": true, + "icon": "anticon anticon-dashboard", + "link": "/usercenter/freight/enterprise/view/:id" } ] }