This commit is contained in:
wangshiming
2021-11-30 14:59:57 +08:00
parent 3c753a3b4f
commit 8cb0cb7865
2 changed files with 103 additions and 258 deletions

View File

@ -1,6 +1,6 @@
<ng-container >
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [action]="action" [content]="content">
<page-header-wrapper [logo]="logo" [content]="content">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
@ -30,117 +30,24 @@
</div>
</div>
</ng-template>
<ng-template #action> </ng-template>
<ng-template #frozen>
<div class="ant-popover-message">
<i nz-icon="" nztheme="fill" class="anticon anticon-exclamation-circle ng-star-inserted">
<svg
viewBox="64 64 896 896"
focusable="false"
fill="currentColor"
width="1em"
height="1em"
class="ng-tns-c358-1487"
data-icon="exclamation-circle"
aria-hidden="true"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
></path>
</svg>
</i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">确定冻结该企业吗?</div>
<div class="ant-popover-message-title ng-star-inserted">
停用后,该企业将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作
</div>
</div>
</ng-template>
<ng-template #enable>
<div class="ant-popover-message">
<i nz-icon="" nztheme="fill" class="anticon anticon-exclamation-circle ng-star-inserted">
<svg
viewBox="64 64 896 896"
focusable="false"
fill="currentColor"
width="1em"
height="1em"
class="ng-tns-c358-1487"
data-icon="exclamation-circle"
aria-hidden="true"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
></path>
</svg>
</i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">确定启用该企业吗?</div>
<div class="ant-popover-message-title ng-star-inserted">
启用后,该企业将恢复正常使用功能,请再次确认
</div>
</div>
</ng-template>
<ng-template #Payenable>
<div class="ant-popover-message">
<i nz-icon="" nztheme="fill" class="anticon anticon-exclamation-circle ng-star-inserted">
<svg
viewBox="64 64 896 896"
focusable="false"
fill="currentColor"
width="1em"
height="1em"
class="ng-tns-c358-1487"
data-icon="exclamation-circle"
aria-hidden="true"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
></path>
</svg>
</i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">确定关闭该企业支付权限吗?</div>
<div class="ant-popover-message-title ng-star-inserted">
停用后,该企业将被限制使用支付功能,请谨慎操作
</div>
</div>
</ng-template>
<ng-template #Payfrozen>
<div class="ant-popover-message">
<i nz-icon="" nztheme="fill" class="anticon anticon-exclamation-circle ng-star-inserted">
<svg
viewBox="64 64 896 896"
focusable="false"
fill="currentColor"
width="1em"
height="1em"
class="ng-tns-c358-1487"
data-icon="exclamation-circle"
aria-hidden="true"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
></path>
</svg>
</i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">确定开通该企业支付权限吗?</div>
<div class="ant-popover-message-title ng-star-inserted">
启用后,该企业将恢复正常支付功能,请再次确认
</div>
</div>
</ng-template>
</page-header-wrapper>
<nz-card>
<sv-container col="3">
<sv-title>联系信息</sv-title>
<sv label="联系人">
<sv-title>申请人信息</sv-title>
<sv label="申请人">
{{ detailData?.contactsName }}
</sv>
<sv label="联系人手机号">
<sv label="申请人手机号">
{{ detailData?.contactsPhone }}
</sv>
<sv label="联系人身份证号">
<sv label="身份证号">
{{ detailData?.contactsPhone }}
</sv>
</sv-container>
<sv-container col="2">
<sv label="身份证照">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
</sv>
<sv label="企业授权函">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
</sv>
@ -180,22 +87,6 @@
{{ detailData?.enterpriseAddress }}
</sv>
</sv-container>
<sv-container col="2" class="mt16">
<sv label="公司实际经营所在地" col="3">
{{ detailData?.enterpriseAddressCodeStr }}
</sv>
<sv label="公司实际经营详细地址">
{{ detailData?.enterpriseAddress }}
</sv>
</sv-container>
<sv-container col="2" class="mt16">
<sv label="公司电话" col="3">
{{ detailData?.enterpriseAddressCodeStr }}
</sv>
<sv label="公司邮箱">
{{ detailData?.enterpriseAddress }}
</sv>
</sv-container>
<sv-container col="1" class="mt16">
<sv label="经营范围">
{{ detailData?.businessScope }}
@ -221,25 +112,42 @@
<!-- <app-imagelist [imgList]="detailData?.certificatePhoto"></app-imagelist> -->
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>银行结算信息</sv-title>
<sv label="开户名称">
{{ detailData?.name }}
</sv>
<sv label="开户账户">
{{ detailData?.certificateNumber }}
</sv>
<sv label="开户支行">
{{ detailData?.validStartTime }}
</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" nzTitle="类型" (nzOnOk)="handleOK('suppliersType')">
<sf #sf1 [schema]="schema1" [ui]="ui" [compact]="false" [button]="'none'" [formData]="suppliersData"></sf>
<div *nzModalFooter>
<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('suppliersType')" [disabled]="!sf1.valid">确认</button>
</div>
<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>

View File

@ -4,7 +4,7 @@ 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 { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema, SFUploadWidgetSchema, SFSelectWidgetSchema, SFTextWidgetSchema, SFTagWidgetSchema } from '@delon/form';
import { Observable, Observer } from 'rxjs';
@Component({
selector: 'app-Freight-components-EnterpriseAudit-view',
@ -16,15 +16,16 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit {
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: false }) st!: STComponent;
detailData: any;
isShow = false;
isVisible = false;
isVisibleNo = false;
modalTitle = '有效期';
modalName = '';
ui!: SFUISchema;
ui2!: SFUISchema;
schema!: SFSchema;
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema1!: SFSchema;
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
schema2!: SFSchema;
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
validData: any = ['suppliersType'];
suppliersData: any = {};
@ -41,7 +42,7 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit {
console.log(this.route.snapshot);
// this.initData();
this.initSF();
this.initSF1();
this.initSFNo();
// this.launchSign();
}
/**
@ -50,68 +51,58 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit {
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
effectiveDate: {
title: '有效期',
'公司名称': { 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: 'date',
format: 'yyyy-MM-dd 00:00:00',
// hidden: this.modalName === 'effectiveDate' ? false : true,
} as SFDateWidgetSchema,
widget: 'select',
change: (value, orgData) => console.log(value, orgData),
} as SFSelectWidgetSchema,
},
},
required: ['effectiveDate'],
required: ['status'],
};
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
}
initSF1() {
this.schema1 = {
initSFNo() {
this.schema2 = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
suppliersType: {
'公司名称': { type: 'number', ui: { widget: 'text', defaultText: '深圳市星链供应链云科技有限公' } as SFTextWidgetSchema },
roleDescription: {
title: '地址',
type: 'string',
title: '类型',
enum: [
{ label: '非外部供应商', value: 0 },
{ label: '外部供应商', value: 1 },
],
default: '',
maxLength: 30,
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();
},
placeholder: '请输入地址',
widget: 'textarea',
},
},
externalSuppliersId: {
title: '外部供应商id',
type: 'string',
default: '',
like: {
type: 'number',
title: '兴趣',
enum: [
{ value: 1, label: '电影' },
{ value: 2, label: '书' },
{ value: 3, label: '旅行' },
],
ui: {
visibleIf: { suppliersType: (value: any) => value === 1 },
},
widget: 'tag',
} as SFTagWidgetSchema,
default: [1, 2],
},
},
required: this.validData,
required: ['roleDescription'],
};
this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
}
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');
@ -166,90 +157,36 @@ export class FreightComponentsEnterpriseAuditViewComponent implements OnInit {
// }
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;
if (name === 'suppliersTypeNo') {
this.isVisibleNo = false;
} else {
this.isVisible = false;
}
}
handleOK(name: any) {
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() {
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;
}
});
}
}