货主管理

This commit is contained in:
Taric Xin
2021-12-09 16:15:47 +08:00
parent b074f72593
commit 8091d8e274
28 changed files with 971 additions and 1263 deletions

View File

@ -1,51 +1,32 @@
<page-header-wrapper [title]="'企业审核列表'" [content]="content">
<nz-card>
<nz-card class="mb-md">
<!-- 搜索表单 -->
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf
#sf
[schema]="schema"
[ui]="ui"
[mode]="'search'"
[disabled]="!sf?.valid"
[loading]="service.http.loading"
(formSubmit)="st?.load(1)"
(formReset)="resetSF()"
></sf>
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button>
<button nz-button nzType="link" (click)="expandToggle(!_$expand)">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div>
</nz-card>
<div style="margin-bottom: 20px; text-align: right"></div>
<nz-card >
<nz-card>
<!-- 数据列表 -->
<st
#st
multiSort
[data]="datalist"
[columns]="columns"
<st #st multiSort [data]="tabType===1?service.$api_get_freight_list:service.$api_get_freight_list"
[columns]="tabType===1?enterColumns:adminColumns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading"
>
[loading]="service.http.loading">
</st>
</nz-card>
<ng-template #content>
@ -53,40 +34,4 @@
<nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="changeTab(tab)"> </nz-tab>
</nz-tabset>
</ng-template>
</page-header-wrapper>
<!-- <nz-modal
[(nzVisible)]="isVisible"
[nzTitle]="mdTitle"
[nzFooter]="modalFooter"
(nzOnCancel)="handleCancel()"
(nzOnOk)="handleOk()"
[nzWidth]="700"
>
<ng-container>
</ng-container>
<ng-template #modalFooter>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>
<button
nz-button
nzType="primary"
*ngIf="mdType === 2"
[disabled]="!sf1?.valid"
(click)="handleOk()"
[nzLoading]="service.http.loading"
>
确定
</button>
<button
nz-button
nzType="primary"
*ngIf="mdType === 3"
[disabled]="!sf1?.valid"
(click)="handleOk()"
[nzLoading]="service.http.loading"
>
重新提交
</button>
<button nz-button nzType="primary" *ngIf="mdType === 4" (click)="handleCancel()">确定</button>
</ng-template>
</nz-modal> -->
</page-header-wrapper>

View File

@ -1,10 +1,23 @@
:host {
::ng-deep {
.tabs-wrap > .ant-tabs-nav {
.tabs-wrap>.ant-tabs-nav {
margin-bottom: 0;
}
.myForm .ant-upload.ant-upload-select-picture-card > .ant-upload {
.myForm .ant-upload.ant-upload-select-picture-card>.ant-upload {
flex-direction: column !important;
}
}
}
.expend-options {
margin-top: 0px;
}
@media (min-width: 1200px) {
.expend-options {
margin-top: -40px;
}
}

View File

@ -1,23 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CmcComponentsTagsComponent } from './tags.component';
describe('CmcComponentsTagsComponent', () => {
let component: CmcComponentsTagsComponent;
let fixture: ComponentFixture<CmcComponentsTagsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [CmcComponentsTagsComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CmcComponentsTagsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -8,13 +8,14 @@ import { UsermanageService } from '../../../services/usercenter.service';
@Component({
selector: 'app-Freight-components-enterprise-audit',
templateUrl: './enterprise-audit.component.html',
styleUrls: ['./enterprise-audit.component.less'],
styleUrls: ['./enterprise-audit.component.less']
})
export class FreightComponentsEnterpriseAuditComponent implements OnInit {
_$expand = false;
ui!: SFUISchema;
schema!: SFSchema;
columns!: STColumn[];
ui: SFUISchema = { '*': { spanLabelFixed: 90, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } };
schema: SFSchema = this.initSF();
enterColumns: STColumn[] = this.initEnterST();
adminColumns: STColumn[] = this.initAdminST();
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
tabType = 1;
@ -22,80 +23,32 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
{
name: '企业审核',
type: 1,
isActived: false,
isActived: false
},
{
name: '企业管理员审核',
type: 2,
isActived: false,
},
isActived: false
}
];
datalist = [
{
storeName: '企业名称',
contactsName: '152746565',
enterpriseName: '湖南',
unifiedSocialCreditCode: '45454',
contactsPhone: '*97889461561',
effectiveDateStr: '废弃eww',
enStatusStr2: '已驳回',
enStatusStr3: '正常',
unifiedSocialCreditCode3: '常用服务',
unifiedSocialCreditCode2: '正常',
tenantId: 1,
id: 1
},
{
storeName: '企业名称',
contactsName: '152746565',
enterpriseName: '湖南',
unifiedSocialCreditCode: '45454',
contactsPhone: '*97889461561',
effectiveDateStr: '废弃eww',
enStatusStr2: '待审核',
enStatusStr3: '正常',
unifiedSocialCreditCode3: '常用服务',
unifiedSocialCreditCode2: '正常',
tenantId: 2,
id: 2
},
]
isVisible = false;
mdType!: any;
cateData = [];
// stApi = this.service.$api_get_labelList;
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService,private ar: ActivatedRoute) {}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService, private ar: ActivatedRoute) {}
/**
* 查询参数
*/
get reqParams() {
const params = Object.assign({}, this.sf?.value || {}, {
flag: this.tabType,
flag: this.tabType
});
delete params._$expand;
return { ...params };
}
/**
* 选中行
*/
get selectedRows() {
return this.st?.list.filter((item) => item.checked) || [];
return { ...params, listSource: 1 };
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
expandToggle(status: boolean) {
this._$expand = status;
this.sf?.setValue('/expand', this._$expand);
}
@ -109,90 +62,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
/**
* 程序初始化入口
*/
ngOnInit() {
this.initSF();
this.initST();
}
/**
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
expand: { type: 'boolean', ui: { hidden: true } },
name: { title: '企业名称', type: 'string' },
contactsName: {
title: '联系人',
type: 'string',
ui: {
showRequired: false,
},
},
phone: {
title: '手机号',
type: 'string',
format: 'mobile',
maxLength: 11,
ui: {
placeholder: '请输入手机号',
},
},
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: 100, grid: { span: 8, gutter: 4 } } };
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ 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: 'enStatusStr2',
type: 'badge',
badge: {
: { text: '待审核', color: 'success' },
: { text: '已驳回', color: 'warning' },
},
},
{ title: '常用服务', className: 'text-center', index: 'unifiedSocialCreditCode3' },
{ title: '推广业务员', className: 'text-center', index: 'unifiedSocialCreditCode2' },
{
title: '操作',
fixed: 'right',
width: '180px',
className: 'text-center',
buttons: [
{ text: '查看', click: (_record) => this.View(_record) },
],
},
];
}
ngOnInit() {}
/**
* 数据列表状态变化事件
@ -202,109 +72,151 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
}
/**
* 新增实例
* 查看详情
*/
View(record: any) {
console.log(record)
// this.router.navigate(['../add'], { relativeTo: this.ar });
this.router.navigate(['./view', record.tenantId], {
relativeTo: this.ar
this.router.navigate(['./view', record.id], {
relativeTo: this.ar
});
}
/**
* 编辑单个实例
* @param record 记录实例
*/
editOne(record: STData) {
// this.router.navigate(['../edit', record.uuid], { relativeTo: this.ar });
}
/**
* 删除单个实例
* @param record 记录实例
*/
delOne(record: STData) {
// let delApi = this.service.$api_label_deletebatch;
// if (this.tabType === 3) {
// delApi = this.service.$api_business_label_delete;
// } else {
// delApi = this.service.$api_label_deletebatch;
// }
this.modal.confirm({
nzTitle: '<i>删除确认</i>',
nzContent: `<b>即将删除 当前行数据,请仔细核对,避免误操作!<br>是否删除?</br>`,
nzOnOk: () =>
console.log('1')
// this.service.http.post(delApi, [record.id]).subscribe((res) => {
// console.log(res, 'del');
// if (res === true || res.data === true) {
// this.service.msgSrv.success('删除成功!');
// setTimeout(() => {
// this.st?.reload();
// }, 500);
// } else {
// this.service.msgSrv.error('删除失败!');
// }
// }),
});
}
/**
* 删除多个实例
*/
delMany(record: STData) {
this.modal.confirm({
nzTitle: '<i>删除确认</i>',
nzContent: `<b>即将删除 当前行数据,请仔细核对,避免误操作!<br>是否删除?</br>`,
nzOnOk: () =>
console.log('')
// this.service.http.post(this.service.$api_label_deletebatch, [record.id]).subscribe((res) => {
// if (res === true) {
// this.service.msgSrv.success('删除成功!');
// this.st?.reload();
// }
// }),
});
/*
const delData = this.st.list.filter((item) => item.checked).map((item) => item.id);
if (delData.length > 0) {
this.modal.confirm({
nzTitle: '<i>删除确认</i>',
nzContent: `<b>即将删除 <i>${delData.length}</i> 条数据,请仔细核对,避免误操作!<br>是否删除?</br>`,
nzOnOk: () =>
this.service.delMany(delData).subscribe((res) => {
if (res === true) {
this.service.msgSrv.success('数据删除成功!');
this.st?.reload();
}
}),
});
}
*/
}
// 切换Tab
changeTab(item: any) {
this.tabType = item.type;
console.log(item)
this.expandToggle(false);
this.sf?.reset();
// if (item.type === 3) {
// this.stApi = this.service.$api_get_business_labelList;
// } else {
// this.stApi = this.service.$api_get_labelList;
// }
// setTimeout(() => {
// this.tabs.forEach((i) => (i.isActived = false));
// item.isActived = !item.isActived;
// this.st.load(1);
// this.st.resetColumns();
// }, 500);
setTimeout(() => {
this.st.load(1);
}, 100);
}
// checkType(): boolean {
// return this.mdType === 2 ? true : false;
// }
/**
* 初始化数据列表
*/
initEnterST(): STColumn[] {
return [
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' },
{ title: '联系人', className: 'text-center', index: 'contacter' },
{ title: '手机号', className: 'text-center', render: 'mobile' },
{ title: '申请时间', className: 'text-center', index: 'createTime' },
{
title: '审核状态',
className: 'text-center',
index: 'approvalStatus',
type: 'badge',
badge: {
10: { text: '待审核', color: 'processing' },
20: { text: '已成功', color: 'success' },
30: { text: '审核失败', color: 'warning' }
}
},
{
title: '常用服务',
className: 'text-center',
index: 'oftenUsedServices',
type: 'enum',
enum: { 10: '整车发货', 20: '大宗发货' }
},
{ title: '推广业务员', className: 'text-center', index: 'promotersTelephone' },
{
title: '操作',
fixed: 'right',
width: '180px',
className: 'text-center',
buttons: [{ text: '查看', click: _record => this.View(_record) }]
}
];
}
initAdminST(): STColumn[] {
return [
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' },
{ title: '当前管理员', className: 'text-center', index: 'contacter' },
{ title: '当前管理员手机号', className: 'text-center', render: 'mobile' },
{ title: '转授对象', className: 'text-center', index: 'promotersTelephone' },
{ title: '转授对象手机号', className: 'text-center', index: 'promotersTelephone' },
{ title: '申请时间', className: 'text-center', index: 'createTime' },
{
title: '状态',
className: 'text-center',
index: 'approvalStatus',
type: 'badge',
badge: {
10: { text: '待审核', color: 'processing' },
20: { text: '已成功', color: 'success' },
30: { text: '审核失败', color: 'warning' }
}
},
{
title: '操作',
fixed: 'right',
width: '180px',
className: 'text-center',
buttons: [{ text: '审核', click: _record => this.View(_record) }]
}
];
}
/**
* 初始化查询表单
*/
initSF(): SFSchema {
return {
properties: {
expand: { type: 'boolean', ui: { hidden: true } },
enterpriseName: {
title: '企业名称',
type: 'string',
ui: {
placeholder: '请输入'
}
},
contactName: {
title: '联系人',
type: 'string',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => this.tabType === 1
}
}
},
contactName2: {
title: '管理员',
type: 'string',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => this.tabType !== 1
}
}
},
mobile: {
title: '手机号',
type: 'string',
format: 'mobile',
maxLength: 11,
ui: {
placeholder: '请输入'
}
},
lockedStatus: {
type: 'string',
title: '状态',
enum: [
{ label: '全部', value: '' },
{ label: '正常', value: 0 },
{ label: '冻结', value: 1 }
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
}
}
}
};
}
}

View File

@ -1,4 +1,4 @@
<ng-container >
<ng-container>
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content">
<ng-template #logo>
@ -7,54 +7,82 @@
</button>
</ng-template>
<ng-template #content>
<div class="user-info">
<div style="flex: 1">
<div style="display: flex;">
<p style="padding-right: 80px; width: 400px;">申请编号54545454{{ detailData?.shoppFeignVO?.publicity }}</p>
</div>
<div style="display: flex;">
<p style="padding-right: 80px; width: 400px;">申请时间:{{ detailData?.shoppFeignVO?.introduction }}</p>
<p >申请人:黄龙真人</p>
</div>
<div>
申请人手机号156565656565
</div>
<div style="position: relative;top: -65%;
left: 75%;">
<span>状态</span>
<br />
<span>待审核</span>
<span >审核中</span>
<span>已审核</span>
</div>
<nz-skeleton [nzLoading]="service.http.loading">
<div class="user-info" nz-row>
<div nz-col nzSpan="24" class="d-flex">
<img [src]="detailData?.enterpriseLogo" />
<div style="flex: 1;">
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<p style="margin-bottom: 0;">{{ detailData?.enterpriseName }}</p>
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24" class="text-right mb-sm">
<label style="font-size: 18px;font-weight: 600;">{{statusE[detailData?.approvalStatus] }}</label>
</div>
</div>
<div nz-row>
<div nz-col [nzLg]="8" [nzSm]="24" [nzXs]="24">
<p>{{ detailData?.unifiedSocialCreditCode }}</p>
</div>
<div nz-col [nzLg]="8" [nzSm]="24" [nzXs]="24">
申请时间:{{detailData?.createTime}}
</div>
<div nz-col [nzXl]="8" [nzLg]="8" [nzSm]="24" [nzXs]="24" class="d-flex"
style="justify-content: flex-end;">
<button [nzLoading]="service.http.loading" nz-button nzDanger (click)="auditPass()">
通过
</button>
<button [nzLoading]="service.http.loading" nz-button nzDanger (click)="auditNo()">
驳回
</button>
<button [nzLoading]="service.http.loading" nz-button nzDanger (click)="ratify()">
修改
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</nz-skeleton>
</ng-template>
</page-header-wrapper>
<nz-card>
<nz-card [nzLoading]="service.http.loading">
<sv-container col="3">
<sv-title>申请人信息</sv-title>
<sv label="申请人">
{{ detailData?.contactsName }}
<sv-title>企业管理员信息</sv-title>
<sv label="姓名">
{{ detailData?.adminUserInfo?.name }}
</sv>
<sv label="申请人手机号">
{{ detailData?.contactsPhone }}
<sv label="手机号">
{{ detailData?.adminUserInfo?.mobile }}
</sv>
<sv label="身份证号">
{{ detailData?.contactsPhone }}
<sv label="身份证号">
{{ detailData?.contactadminUserInfo?.certificateNumber }}
</sv>
</sv-container>
<sv-container col="2">
<sv label="身份证照">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
<app-imagelist
[imgList]="[detailData?.adminUserInfo?.certificatePhotoFrontWatermark,detailData?.adminUserInfo?.certificatePhotoBackWatermark]">
</app-imagelist>
</sv>
<sv label="企业授权函">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
<app-imagelist [imgList]="[detailData?.adminUserInfo?.certificatePhotoBackWatermark]"></app-imagelist>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>公司基本信息</sv-title>
<sv-title>
<label class="mr-md">企业基本信息</label>
<label *ngIf="detailData?.approvalStatus===10" style="color: #1890ff;"><i nz-icon nzType="info-circle"
nzTheme="fill" class="mr-xs"></i>待审核
</label>
<label *ngIf="detailData?.approvalStatus===20" style="color: #52c41a;"><i nz-icon nzType="check-circle"
nzTheme="fill" class="mr-xs"></i>审核通过
</label>
<label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle"
nzTheme="fill" class="mr-xs"></i>驳回
</label>
</sv-title>
<sv label="公司名称">
{{ detailData?.enterpriseName }}
</sv>
@ -76,12 +104,14 @@
{{ detailData?.operatingStartTime }} 至 {{ detailData?.operatingEndTime }}
</div>
<div *ngIf="!detailData?.operatingStartTime && !detailData?.operatingEndTime">长期</div>
<div *ngIf="!!detailData?.operatingStartTime && !detailData?.operatingEndTime">{{ detailData?.operatingStartTime }} 至 长期</div>
<div *ngIf="!!detailData?.operatingStartTime && !detailData?.operatingEndTime">{{ detailData?.operatingStartTime
}} 至 长期</div>
</sv>
</sv-container>
<sv-container col="2" class="mt16">
<sv label="公司所在地" col="3">
{{ detailData?.enterpriseAddressCodeStr }}
{{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{
detailData?.fullRegionVO?.areaName }}
</sv>
<sv label="公司详细地址">
{{ detailData?.enterpriseAddress }}
@ -91,63 +121,78 @@
<sv label="经营范围">
{{ detailData?.businessScope }}
</sv>
</sv-container>
<sv-container col="2" class="mt16">
<sv label="税务机关">
{{ detailData?.taxAuthority }}
</sv>
<sv label="营业执照">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
<app-imagelist [imgList]="[detailData?.licensePhotoWatermark]"></app-imagelist>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>法人信息</sv-title>
<sv-title>企业法人信息</sv-title>
<sv label="法定代表人">
{{ detailData?.name }}
{{ detailData?.legalPersonIdentityVO?.name }}
</sv>
<sv label="身份证号">
{{ detailData?.certificateNumber }}
<sv label="身份证号">
{{ detailData?.legalPersonIdentityVO?.certificateNumber }}
</sv>
<sv label="身份证有效期">
{{ detailData?.validStartTime }} -
{{ detailData?.validEndTime ? detailData?.validEndTime : '长期' }}
{{ detailData?.legalPersonIdentityVO?.validStartTime }} -
{{ detailData?.legalPersonIdentityVO?.validEndTime || '长期' }}
</sv>
<sv label="身份证照" col="1">
<!-- <app-imagelist [imgList]="detailData?.certificatePhoto"></app-imagelist> -->
<app-imagelist
[imgList]="[detailData?.legalPersonIdentityVO?.certificatePhotoFrontWatermark,detailData?.legalPersonIdentityVO?.certificatePhotoBackWatermark]">
</app-imagelist>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>企业开票信息</sv-title>
<sv label="开户银行">
{{ detailData?.createBank }}
</sv>
<sv label="银行账户">
{{ detailData?.bankAccount }}
</sv>
<sv label="注册电话">
{{ detailData?.registerPhone }}
</sv>
<sv label="注册地址">
{{ detailData?.registerAddress }}
</sv>
</sv-container>
<div>
<div
style="
position: sticky;
bottom: 0;
margin-top: 0.5rem;
padding-top: 0.5rem;
text-align: right;
background-color: #fff;
border-top: 1px solid #eee;
"
>
<button nz-button nzType="default" nzDanger (click)="auditPass()">审核通过</button>
<button nz-button nzType="default" nzDanger (click)="auditNo()">驳回审核</button>
<button nz-button nzType="default" nzDanger (click)="ratify()">修改</button>
</div>
</div>
</nz-card>
</ng-container>
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="审核通过" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('suppliersType')">
<ng-container *nzModalContent>
<sf #sf [schema]="schema" [ui]="ui" [compact]="false" [button]="'none'" [formData]="suppliersData"></sf>
</ng-container>
<ng-template #nzModalFooter>
<button nz-button nzType="default" (click)="handleCancel('suppliersType')">取消</button>
<button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认</button>
</ng-template>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleNo" [nzFooter]="nzModalFooter2" nzTitle="审核驳回" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('suppliersTypeNo')">
<ng-container *nzModalContent>
<sf #sf2 [schema]="schema2" [ui]="ui2" [compact]="false" [button]="'none'" [formData]="suppliersData"></sf>
</ng-container>
<ng-template #nzModalFooter2>
<button nz-button nzType="default" (click)="handleCancel('suppliersTypeNo')">取消</button>
<button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认</button>
</ng-template>
</nz-modal>
<ng-template #approvedModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="公司名称">
{{ detailData?.enterpriseName }}
</se>
<se [col]="1" label="网络货运人" required >
<nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter">
<nz-option [nzValue]="1" nzLabel="Jack"></nz-option>
<nz-option [nzValue]="2" nzLabel="Lucy"></nz-option>
</nz-select>
</se>
</div>
</div>
</ng-template>
<ng-template #redectModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="公司名称">
{{ detailData?.enterpriseName }}
</se>
<se [col]="1" label="备注" required >
<textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" [(ngModel)]="approvalOpinion"></textarea>
</se>
</div>
</div>
</ng-template>

View File

@ -1,31 +0,0 @@
/*
* @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<FreightComponentsEnterpriseAuditViewComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [FreightComponentsEnterpriseAuditViewComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FreightComponentsEnterpriseAuditViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -4,113 +4,59 @@ 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, SFSelectWidgetSchema, SFTextWidgetSchema, SFTagWidgetSchema } from '@delon/form';
import {
SFComponent,
SFSchema,
SFDateWidgetSchema,
SFUISchema,
SFUploadWidgetSchema,
SFSelectWidgetSchema,
SFTextWidgetSchema,
SFTagWidgetSchema
} from '@delon/form';
import { Observable, Observer } from 'rxjs';
import { NzModalService } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-Freight-components-EnterpriseAudit-view',
templateUrl: './view.component.html',
styleUrls: ['./view.component.less'],
styleUrls: ['./view.component.less']
})
export class FreightComponentsEnterpriseAuditViewComponent implements OnInit {
i: any;
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: false }) st!: STComponent;
detailData: any;
isVisible = false;
isVisibleNo = false;
modalTitle = '有效期';
modalName = '';
ui!: SFUISchema;
ui2!: SFUISchema;
schema!: SFSchema;
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema2!: SFSchema;
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
validData: any = ['suppliersType'];
suppliersData: any = {};
@ViewChild('approvedModal', { static: false })
approvedModal!: any;
@ViewChild('redectModal', { static: false })
redectModal!: any;
constructor(
private http: _HttpClient,
private modal: ModalHelper,
public service: UsermanageService,
private route: ActivatedRoute,
private modalHelper: ModalHelper,
private msgSrv: NzMessageService,
) {}
approvalOpinion = '';
networkTransporter = null;
detailData: any;
statusE: any = {
10: '待审核',
20: '审核通过',
30: '审核失败'
};
isEdit = false;
constructor(private nzModalService: NzModalService, public service: UsermanageService, private route: ActivatedRoute) {}
ngOnInit() {
console.log(this.route.snapshot);
// this.initData();
this.initSF();
this.initSFNo();
this.initData();
// this.launchSign();
}
/**
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
'公司名称': { type: 'number', ui: { widget: 'text', defaultText: '深圳市星链供应链云科技有限公' } as SFTextWidgetSchema },
status: {
type: 'string',
title: '税源地',
enum: [
{ label: '待支付', value: 'WAIT_BUYER_PAY', otherData: 1 },
{ label: '已支付', value: 'TRADE_SUCCESS' },
{ label: '交易完成', value: 'TRADE_FINISHED' },
],
default: 'WAIT_BUYER_PAY',
ui: {
widget: 'select',
change: (value, orgData) => console.log(value, orgData),
} as SFSelectWidgetSchema,
},
},
required: ['status'],
};
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
}
initSFNo() {
this.schema2 = {
properties: {
'公司名称': { type: 'number', ui: { widget: 'text', defaultText: '深圳市星链供应链云科技有限公' } as SFTextWidgetSchema },
roleDescription: {
title: '地址',
type: 'string',
maxLength: 30,
ui: {
placeholder: '请输入地址',
widget: 'textarea',
},
},
like: {
type: 'number',
title: '兴趣',
enum: [
{ value: 1, label: '电影' },
{ value: 2, label: '书' },
{ value: 3, label: '旅行' },
],
ui: {
widget: 'tag',
} as SFTagWidgetSchema,
default: [1, 2],
},
},
required: ['roleDescription'],
};
this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
}
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_one, params);
initData() {
this.service
.request(this.service.$api_get_freight_detail, {
id: this.route.snapshot.params.id
})
.subscribe(res => {
if (res) {
this.detailData = res;
}
});
// // 商品资质
// if (res.enterpriseBusinessJson) {
// res.enterpriseBusinessJson.aptitudes = res.enterpriseBusinessJson?.aptitudes ? res.enterpriseBusinessJson.aptitudes.split(',') : [];
@ -122,24 +68,24 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit {
// // res.applyUserJson.imagelist.push(res.applyUserJson.handCertificate);
// 法人身份证证件
const imagelist = [];
imagelist.push(res?.certificatePhotoFront);
imagelist.push(res?.certificatePhotoBack);
res.certificatePhoto = imagelist;
// const imagelist = [];
// imagelist.push(res?.certificatePhotoFront);
// imagelist.push(res?.certificatePhotoBack);
// res.certificatePhoto = imagelist;
// 营业执照
res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate
? res.enterpriseQualificationCertificate.split(',')
: [];
// // 营业执照
// res.enterpriseQualificationCertificate = res.enterpriseQualificationCertificate
// ? res.enterpriseQualificationCertificate.split(',')
// : [];
// 返回所在地
res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode);
// // 返回所在地
// res.enterpriseAddressCodeStr = await this.getRegionFullName(res.enterpriseAddressCode);
this.detailData = res;
this.suppliersData = {
suppliersType: res?.suppliersType,
externalSuppliersId: res?.externalSuppliersId,
};
// this.detailData = res;
// this.suppliersData = {
// suppliersType: res?.suppliersType,
// externalSuppliersId: res?.externalSuppliersId
// };
}
/**
@ -148,7 +94,7 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit {
*/
async getRegionFullName(code: any) {
const params = {
regionCode: code,
regionCode: code
};
const res = await this.service.asyncRequest(this.service.$api_get_one, params, 'POST', true);
// if (res && res.regionFullName) {
@ -157,36 +103,57 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit {
// }
return res && res.regionFullName;
}
auditPass() {
this.networkTransporter = null;
this.nzModalService.create({
nzTitle: '审核通过',
nzContent: this.approvedModal,
nzOnOk: () => {
if (!this.networkTransporter) {
return false;
}
this.auditEnterprise(20);
return;
}
});
}
auditNo() {
this.approvalOpinion = '';
this.nzModalService.create({
nzTitle: '审核驳回',
nzContent: this.redectModal,
nzOnOk: () => {
if (!this.approvalOpinion) {
return false;
}
this.auditEnterprise(30);
return;
}
});
}
private auditEnterprise(status: number) {
this.service
.request(this.service.$api_audit_freight, {
approvalStatus: status,
id: this.detailData.id,
approvalOpinion: this.approvalOpinion,
networkTransporter: this.networkTransporter
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success(status === 20 ? '审核通过' : '驳回成功');
}
this.initData();
});
}
ratify() {
this.isEdit = true;
}
goBack() {
window.history.go(-1);
}
handleCancel(name: any) {
if (name === 'suppliersTypeNo') {
this.isVisibleNo = false;
} else {
this.isVisible = false;
}
}
handleOK() {
const params: any = {
tenantId: this.route.snapshot.params.id,
// tenantId: this.route.snapshot.queryParams.tenantId,
};
console.log(this.sf.value)
// this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => {
// });
}
auditPass() {
this.isVisible = true
}
auditNo() {
this.isVisibleNo = true
}
ratify() {
}
}