edit
This commit is contained in:
@ -88,6 +88,8 @@ export class SettingRoleEditComponent implements OnInit {
|
||||
// this.service.msgSrv.warning('请选择权限!');
|
||||
// return;
|
||||
// }
|
||||
console.log(this.params);
|
||||
|
||||
const auths = this.menu?.washTree();
|
||||
const params: any = {
|
||||
id: this.params.id,
|
||||
@ -98,13 +100,22 @@ export class SettingRoleEditComponent implements OnInit {
|
||||
if (this.params.id === 0) {
|
||||
delete params.id;
|
||||
}
|
||||
if (this.params?.type === 'freight') {
|
||||
Object.assign(params, { enterpriseId: 0, enterpriseProjectId: 0 });
|
||||
}
|
||||
if (this.params.id) {
|
||||
this.service.request(this.params.updateUrl, params).subscribe(res => {
|
||||
this.modal.close(true);
|
||||
if (res) {
|
||||
this.service.msgSrv.success('编辑成功');
|
||||
this.modal.close(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.service.request(this.params.addUrl, params).subscribe(res => {
|
||||
this.modal.close(true);
|
||||
if (res) {
|
||||
this.service.msgSrv.success('新增成功');
|
||||
this.modal.close(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ export class RoleManagementComponent implements OnInit {
|
||||
columns: STColumn[] = [
|
||||
{ title: '角色名称', index: 'roleName' },
|
||||
{ title: '角色描述', index: 'roleDescription' },
|
||||
{ title: '企业数量', index: 'roleDescription', iif: _ => this.type === 'freight' },
|
||||
{ title: '企业数量', index: 'userNumber', iif: _ => this.type === 'freight' },
|
||||
{ title: '创建人手机号', index: 'telephone' },
|
||||
{
|
||||
title: '创建时间',
|
||||
@ -46,13 +46,13 @@ export class RoleManagementComponent implements OnInit {
|
||||
text: '编辑',
|
||||
click: item => this.roleAction(item),
|
||||
iif: item => item.roleName !== '超级管理员',
|
||||
acl: { ability: ['SYSTEM-ROLE-edit'] },
|
||||
acl: { ability: ['SYSTEM-ROLE-edit'] }
|
||||
},
|
||||
{
|
||||
text: '删除',
|
||||
click: item => this.deleteAction(item),
|
||||
iif: item => item.roleName !== '超级管理员',
|
||||
acl: { ability: ['SYSTEM-ROLE-delete'] },
|
||||
acl: { ability: ['SYSTEM-ROLE-delete'] }
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -65,7 +65,8 @@ export class RoleManagementComponent implements OnInit {
|
||||
infoUrl: this.service.$api_getRoleInfo,
|
||||
addUrl: this.service.$api_save_role,
|
||||
updateUrl: this.service.$api_update_role,
|
||||
title:'角色管理'
|
||||
title: '角色管理',
|
||||
type: 'user'
|
||||
};
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService, private route: ActivatedRoute) {
|
||||
@ -74,13 +75,14 @@ export class RoleManagementComponent implements OnInit {
|
||||
this.type = type;
|
||||
if (type !== 'user') {
|
||||
this.params = {
|
||||
listUrl: this.service.$api_get_role_page,
|
||||
listUrl: this.service.$api_get_ent_role_page,
|
||||
deleteUrl: this.service.$api_dalete_role,
|
||||
infoUrl: this.service.$api_getRoleInfo,
|
||||
addUrl: this.service.$api_save_role,
|
||||
updateUrl: this.service.$api_update_role,
|
||||
appId: 'A48F72F0A304427F921794BAD86B3522',
|
||||
title:'企业角色管理'
|
||||
title: '企业角色管理',
|
||||
type: 'freight'
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -103,7 +105,7 @@ export class RoleManagementComponent implements OnInit {
|
||||
const modal = this.nzModalService.create({
|
||||
nzContent: SettingRoleEditComponent,
|
||||
nzWidth: 900,
|
||||
nzComponentParams: item ? { params: { ...item, ...this.params } } : { params: { id: 0 } },
|
||||
nzComponentParams: item ? { params: { ...item, ...this.params } } : { params: { id: 0, ...this.params } },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
|
||||
@ -31,6 +31,8 @@ export class SystemService extends BaseService {
|
||||
|
||||
// 分页获取应用角色列表
|
||||
$api_get_role_page = '/api/mdc/cuc/roleInfo/getAppRoleInfoList';
|
||||
// 分页获取配置角色列表
|
||||
$api_get_ent_role_page = '/api/mdc/cuc/roleInfo/getConfigurationRoleList';
|
||||
// 新增角色
|
||||
$api_save_role = '/api/mdc/cuc/roleInfo/saveRoleInfo';
|
||||
// 编辑角色
|
||||
|
||||
@ -111,38 +111,7 @@
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card [class]="isEdit?'edit-box':'readOnly-box'">
|
||||
<sv-container col="3">
|
||||
<sv-title>企业管理员信息</sv-title>
|
||||
<sv label="姓名">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.name" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="手机号">
|
||||
{{detailData.adminUserInfo?.mobile}}
|
||||
</sv>
|
||||
<sv label="身份证号">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="身份证照" col="2">
|
||||
<div class="d-flex">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'certificateBackFront'}">
|
||||
</ng-container>
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'certificateBack'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
</sv>
|
||||
<sv label="企业授权函" col="2">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'creditPhotoWatermark',key2:'creditPhoto',hover:'adminPhoto'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-container col="2" class="mt16">
|
||||
<sv-title>
|
||||
<label class="mr-md">企业基本信息</label>
|
||||
<label *ngIf="detailData?.approvalStatus===10" style="color: #1890ff;"><i nz-icon nzType="info-circle"
|
||||
@ -177,8 +146,13 @@
|
||||
</ng-template>
|
||||
</sv>
|
||||
<sv label="统一社会信用代码">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
<ng-container *ngIf="detailData?.approvalStatus===10; else unifiedSocialCreditCodeelseTemplate">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
</ng-container>
|
||||
<ng-template #unifiedSocialCreditCodeelseTemplate>
|
||||
{{detailData.unifiedSocialCreditCode}}
|
||||
</ng-template>
|
||||
</sv>
|
||||
<sv label="公司类型">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.enterpriseType" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
@ -186,7 +160,7 @@
|
||||
</sv>
|
||||
<sv label="注册资本">
|
||||
<ng-container *ngIf="isEdit; else registrationCapitalTemplate">
|
||||
<input nz-input type="number" [(ngModel)]="detailData.registrationCapital" [readonly]="!isEdit"
|
||||
<input nz-input type="text" [(ngModel)]="detailData.registrationCapital" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'" class="mr-sm">
|
||||
</ng-container>
|
||||
<ng-template #registrationCapitalTemplate>
|
||||
@ -198,24 +172,23 @@
|
||||
<nz-date-picker [(ngModel)]="detailData.enterpriseRegistrationTime" [nzDisabled]="!isEdit"
|
||||
[nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''"></nz-date-picker>
|
||||
</sv>
|
||||
|
||||
<sv label="营业期限" col="1">
|
||||
<sv label="营业期限">
|
||||
<nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
|
||||
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
|
||||
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 110px;" class="calendar">
|
||||
</nz-date-picker>
|
||||
-
|
||||
<ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime">
|
||||
<label style="padding-left: 11px;">长期</label>
|
||||
</ng-container>
|
||||
<nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
|
||||
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
|
||||
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 110px;" class="calendar">
|
||||
</nz-date-picker>
|
||||
<ng-container *ngIf="isEdit">
|
||||
<label nz-checkbox [ngModel]="!!!detailData.operatingEndTime"
|
||||
(ngModelChange)="$event?detailData.operatingEndTime='':''" class="ml-sm">长期</label>
|
||||
</ng-container>
|
||||
</sv>
|
||||
<sv label="常用服务" col="3">
|
||||
<sv label="常用服务">
|
||||
<ng-container *ngIf="isEdit; else oftenUsedServiceselseTemplate">
|
||||
<nz-select [(ngModel)]="detailData.oftenUsedServices">
|
||||
<nz-option [nzValue]="10" nzLabel="整车发货"></nz-option>
|
||||
@ -239,8 +212,13 @@
|
||||
</ng-template>
|
||||
</sv>
|
||||
<sv label="公司详细地址" col="2">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.enterpriseAddress" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
<ng-container *ngIf="isEdit; else enterpriseAddresselseTemplate">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.enterpriseAddress" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
</ng-container>
|
||||
<ng-template #enterpriseAddresselseTemplate>
|
||||
<span style="word-break:break-all ">{{detailData.enterpriseAddress}}</span>
|
||||
</ng-template>
|
||||
</sv>
|
||||
<sv label="经营范围" col="1">
|
||||
<ng-container *ngIf="isEdit; else businessScopeelseTemplate">
|
||||
@ -250,18 +228,21 @@
|
||||
<ng-template #businessScopeelseTemplate>
|
||||
<span style="word-break:break-all ">{{detailData.businessScope}}</span>
|
||||
</ng-template>
|
||||
|
||||
|
||||
</sv>
|
||||
<sv label="税务机关" col="2">
|
||||
<sv label="税务机关" col="3">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.taxAuthority" [readonly]="!isEdit" [nzBorderless]="!isEdit"
|
||||
[placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="营业执照" col="2">
|
||||
<sv label="营业执照" col="3">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'licensePhotoWatermark',key2:'licensePhoto',hover:'detailPhoto'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
<sv label="企业授权函" col="3">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'creditPhotoWatermark',key2:'creditPhoto',hover:'adminPhoto'}">
|
||||
</ng-container>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
@ -303,6 +284,32 @@
|
||||
</div>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3">
|
||||
<sv-title>企业管理员信息</sv-title>
|
||||
<sv label="姓名">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.name" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="手机号">
|
||||
{{detailData.adminUserInfo?.mobile}}
|
||||
</sv>
|
||||
<sv label="身份证号">
|
||||
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
|
||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||
</sv>
|
||||
<sv label="身份证照" col="2">
|
||||
<div class="d-flex">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'certificateBackFront'}">
|
||||
</ng-container>
|
||||
<ng-container
|
||||
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'certificateBack'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
<nz-divider></nz-divider>
|
||||
<sv-container col="3" class="mt16">
|
||||
<sv-title>企业开票信息</sv-title>
|
||||
|
||||
@ -20,20 +20,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host::ng-deep {
|
||||
|
||||
::ng-deep {
|
||||
|
||||
.affix {
|
||||
position: fixed;
|
||||
top : 20px !important;
|
||||
z-index : 999 !important;
|
||||
right : 25px;
|
||||
left : 250px;
|
||||
left : 25px;
|
||||
}
|
||||
|
||||
}
|
||||
::ng-deep{
|
||||
.aside-collapsed .alain-pro__main {
|
||||
.alain-pro__menu-side .alain-pro__main {
|
||||
.affix {
|
||||
position: fixed;
|
||||
top : 20px !important;
|
||||
z-index : 999 !important;
|
||||
right : 25px;
|
||||
left : 250px;
|
||||
}
|
||||
}
|
||||
|
||||
.aside-collapsed.alain-pro__menu-side .alain-pro__main {
|
||||
.affix {
|
||||
left: 106px;
|
||||
}
|
||||
|
||||
@ -18,9 +18,12 @@
|
||||
<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">
|
||||
<button nz-button nzType="primary" (click)="creat()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-save']">新增企业</button>
|
||||
<button nz-button nzType="primary" [disabled]="!loadingList && service.http.loading" [nzLoading]="loadingList" (click)="st?.load(1)" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-list']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-export']">导出</button>
|
||||
<button nz-button nzType="primary" (click)="creat()" acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-LIST-save']">新增企业</button>
|
||||
<button nz-button nzType="primary" [disabled]="!loadingList && service.http.loading" [nzLoading]="loadingList"
|
||||
(click)="st?.load(1)" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-list']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()" acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-LIST-export']">导出</button>
|
||||
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
@ -33,11 +36,8 @@
|
||||
<!-- 数据列表 -->
|
||||
<!-- [data]="service.$api_get_supplier_page" -->
|
||||
|
||||
<st #st [columns]="columns" [data]='service.$api_get_freight_list'
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="loadingList" >
|
||||
<st #st [columns]="columns" [data]='service.$api_get_freight_list' [req]="{ process: beforeReq }"
|
||||
[res]="{ process: dataProcess }" [scroll]="{ x: '1200px' }" [loading]="loadingList">
|
||||
<ng-template st-row="enterpriseName" let-item let-index="index">
|
||||
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName">
|
||||
<div
|
||||
@ -50,7 +50,8 @@
|
||||
{{ item.contacter }}/{{item.mobile}}
|
||||
</ng-template>
|
||||
<ng-template st-row="promotersTelephone" let-item let-index="index">
|
||||
<a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.promotersTelephone || '添加' }}</a>
|
||||
<a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.promotersTelephone
|
||||
|| '添加' }}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="stateCol" let-item let-index="index">
|
||||
<nz-tag *ngIf="item.stateLocked" nzColor="error">冻结</nz-tag>
|
||||
|
||||
@ -179,7 +179,8 @@ export class FreightComponentsListComponent implements OnInit {
|
||||
initST() {
|
||||
this.columns = [
|
||||
// { title: '', type: 'checkbox', className: 'text-center' },
|
||||
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' },
|
||||
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' , width: 350},
|
||||
{ title: '企业税号', className: 'text-center', index: 'unifiedSocialCreditCode', width: 180 },
|
||||
{ title: '管理员', className: 'text-center', render: 'contacter' },
|
||||
{ title: '审核人', className: 'text-center', index: 'approvalUserName' },
|
||||
|
||||
|
||||
@ -14,3 +14,4 @@
|
||||
}
|
||||
|
||||
@primary-color: #F5222D;
|
||||
@font-size-base: 15px;
|
||||
Reference in New Issue
Block a user