edit
This commit is contained in:
@ -34,19 +34,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm">
|
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm">
|
||||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
|
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
|
||||||
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked === 1">
|
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked === 1">
|
||||||
启用
|
启用
|
||||||
</button>
|
</button>
|
||||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
|
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
|
||||||
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked === 0">
|
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked === 0">
|
||||||
冻结
|
冻结
|
||||||
</button>
|
</button>
|
||||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payfrozen"
|
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payfrozen"
|
||||||
(nzOnConfirm)="PayOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 0">
|
(nzOnConfirm)="PayOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 1">
|
||||||
开通支付权限
|
开通支付权限
|
||||||
</button>
|
</button>
|
||||||
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payenable"
|
<button [nzLoading]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payenable"
|
||||||
(nzOnConfirm)="PayOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 1">
|
(nzOnConfirm)="PayOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 0">
|
||||||
关闭支付权限
|
关闭支付权限
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -108,45 +108,41 @@ export class FreightComponentsListDetailComponent implements OnInit {
|
|||||||
* 冻结
|
* 冻结
|
||||||
*/
|
*/
|
||||||
freezeOrResume(type: number) {
|
freezeOrResume(type: number) {
|
||||||
console.log(type);
|
this.service.http
|
||||||
// this.service.http
|
.post(this.service.$api_lock_freight, {
|
||||||
// .post(this.service.$api_set_freezeOrResume, {
|
id: this.route.snapshot.params.id,
|
||||||
// tenantId: this.route.snapshot.params.id,
|
statedLocked: !!type
|
||||||
// // tenantId: this.route.snapshot.queryParams.tenantId,
|
})
|
||||||
// status: type,
|
.subscribe(res => {
|
||||||
// })
|
if (res.data === true) {
|
||||||
// .subscribe((res) => {
|
if (type === 1) {
|
||||||
// if (res.data === true) {
|
this.service.msgSrv.success(`启用成功!`);
|
||||||
// if (type === 0) {
|
} else {
|
||||||
// this.service.msgSrv.success(`启用成功!`);
|
this.service.msgSrv.success(`冻结成功!`);
|
||||||
// } else if (type === 1) {
|
}
|
||||||
// this.service.msgSrv.success(`冻结成功!`);
|
this.initData();
|
||||||
// }
|
} else {
|
||||||
// this.ngOnInit();
|
this.service.msgSrv.error(res.msg || '操作失败!');
|
||||||
// } else {
|
}
|
||||||
// this.service.msgSrv.error(res.msg || '操作失败!');
|
});
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
PayOrResume(type: number) {
|
PayOrResume(type: number) {
|
||||||
console.log(type);
|
this.service.http
|
||||||
// this.service.http
|
.post(this.service.$api_lock_freight, {
|
||||||
// .post(this.service.$api_set_freezeOrResume, {
|
id: this.route.snapshot.params.id,
|
||||||
// tenantId: this.route.snapshot.params.id,
|
statedLocked: !!type
|
||||||
// // tenantId: this.route.snapshot.queryParams.tenantId,
|
})
|
||||||
// status: type,
|
.subscribe(res => {
|
||||||
// })
|
if (res.data === true) {
|
||||||
// .subscribe((res) => {
|
if (type === 1) {
|
||||||
// if (res.data === true) {
|
this.service.msgSrv.success(`开启成功!`);
|
||||||
// if (type === 0) {
|
} else {
|
||||||
// this.service.msgSrv.success(`启用成功!`);
|
this.service.msgSrv.success(`关闭成功!`);
|
||||||
// } else if (type === 1) {
|
}
|
||||||
// this.service.msgSrv.success(`冻结成功!`);
|
this.initData();
|
||||||
// }
|
} else {
|
||||||
// this.ngOnInit();
|
this.service.msgSrv.error(res.msg || '操作失败!');
|
||||||
// } else {
|
}
|
||||||
// this.service.msgSrv.error(res.msg || '操作失败!');
|
});
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,12 +12,12 @@
|
|||||||
<!-- 搜索区 -->
|
<!-- 搜索区 -->
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
<div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="creat()">新建</button>
|
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="creat()">新增企业</button>
|
||||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button>
|
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="exportList()">导出</button>
|
||||||
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
|
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
|
||||||
(click)="st?.load(1)">查询</button>
|
(click)="st?.load(1)">查询</button>
|
||||||
<button nz-button (click)="resetSF()">重置</button>
|
<button nz-button (click)="resetSF()">重置</button>
|
||||||
@ -46,11 +46,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template st-row="promotersTelephone" let-item let-index="index">
|
<ng-template st-row="promotersTelephone" let-item let-index="index">
|
||||||
<a (click)="daoyun(item)">{{ item.promotersTelephone }}</a>
|
<a (click)="addPromoter(item)">{{ item.promotersTelephone || '添加' }}</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template st-row="stateCol" let-item let-index="index">
|
<ng-template st-row="stateCol" let-item let-index="index">
|
||||||
<nz-tag *ngIf="item.stateLocked" nzColor="error">冻结</nz-tag>
|
<nz-tag *ngIf="item.stateLocked" nzColor="error">冻结</nz-tag>
|
||||||
<nz-tag *elseBlock nzColor="success">正常</nz-tag>
|
<nz-tag *elseBlock nzColor="success">正常</nz-tag>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</st>
|
</st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
|
<ng-template #promoterModal>
|
||||||
|
<div nz-row nzGutter="8">
|
||||||
|
<div nz-col nzSpan="24" se-container [labelWidth]="80">
|
||||||
|
<se [col]="1" label="手机号">
|
||||||
|
<input nz-input [(ngModel)]="promotersTelephone" />
|
||||||
|
</se>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
@ -16,7 +16,10 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
columns!: STColumn[];
|
columns!: STColumn[];
|
||||||
@ViewChild('st', { static: false }) st!: STComponent;
|
@ViewChild('st', { static: false }) st!: STComponent;
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
@ViewChild('promoterModal', { static: false })
|
||||||
|
promoterModal!: any;
|
||||||
|
|
||||||
|
promotersTelephone = '';
|
||||||
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,10 +39,6 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
get selectedRows() {
|
|
||||||
return this.st?.list.filter(item => item.checked) || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
this.initST();
|
this.initST();
|
||||||
@ -189,6 +188,30 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
daoyun(item: any) {
|
daoyun(item: any) {
|
||||||
this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar });
|
this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addPromoter(item?: any) {
|
||||||
|
this.promotersTelephone = item?.promotersTelephone;
|
||||||
|
const modal = this.modal.create({
|
||||||
|
nzTitle: '推广业务员',
|
||||||
|
nzContent: this.promoterModal,
|
||||||
|
nzOnOk: () => {
|
||||||
|
if (!!!this.promotersTelephone) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功');
|
||||||
|
}
|
||||||
|
this.st.load();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
expandToggle() {
|
expandToggle() {
|
||||||
this._$expand = !this._$expand;
|
this._$expand = !this._$expand;
|
||||||
this.sf?.setValue('/expand', this._$expand);
|
this.sf?.setValue('/expand', this._$expand);
|
||||||
@ -196,11 +219,24 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
creat() {
|
creat() {
|
||||||
this.router.navigate(['./new'], { relativeTo: this.ar });
|
this.router.navigate(['./new'], { relativeTo: this.ar });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exportList() {
|
||||||
|
const params = this.reqParams;
|
||||||
|
this.service
|
||||||
|
.request(this.service.$api_export_freight_list, { ...params, pageSize: this.st.ps, pageIndex: this.st.pi })
|
||||||
|
.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('导出成功');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置表单
|
* 重置表单
|
||||||
*/
|
*/
|
||||||
resetSF() {
|
resetSF() {
|
||||||
this.sf.reset();
|
this.sf.reset();
|
||||||
this._$expand = false;
|
this._$expand = false;
|
||||||
|
this.st.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<page-header-wrapper [title]="'企业认证'"></page-header-wrapper>
|
<page-header-wrapper [title]="'新增企业'"></page-header-wrapper>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<sf #sf1 [compact]="true" [ui]="ui" [schema]="schema1" [button]="'none'" [formData]="infoData1">
|
<sf #sf1 [compact]="true" [ui]="ui" [schema]="schema1" [button]="'none'" [formData]="infoData1">
|
||||||
<ng-template sf-template="title1" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="title1" let-me let-ui="ui" let-schema="schema">
|
||||||
<div class="form-title">营业执照基本信息</div>
|
<div class="form-title">企业基本信息</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template sf-template="title2" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="title2" let-me let-ui="ui" let-schema="schema">
|
||||||
<div class="form-title" style="margin-top: 40px">营业执照法人信息</div>
|
<div class="form-title" style="margin-top: 40px">营业执照法人信息</div>
|
||||||
|
|||||||
@ -19,9 +19,18 @@ export class UsermanageService extends BaseService {
|
|||||||
// 查询企业列表
|
// 查询企业列表
|
||||||
$api_get_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/list/page';
|
$api_get_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/list/page';
|
||||||
|
|
||||||
|
// 导出企业列表
|
||||||
|
$api_export_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/export';
|
||||||
|
|
||||||
// 查询企业详情
|
// 查询企业详情
|
||||||
$api_get_freight_detail = '/api/mdc/cuc/enterpriseInfo/operate/detail';
|
$api_get_freight_detail = '/api/mdc/cuc/enterpriseInfo/operate/detail';
|
||||||
|
|
||||||
|
// 添加企业业务员
|
||||||
|
$api_add_salesman = '/api/mdc/cuc/enterpriseInfo/operate/addSalesman';
|
||||||
|
|
||||||
|
// 冻结/启用企业业
|
||||||
|
$api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';
|
||||||
|
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user