-
-
+
+
+
@@ -46,11 +46,21 @@
- {{ item.promotersTelephone }}
+ {{ item.promotersTelephone || '添加' }}
冻结
正常
-
\ No newline at end of file
+
+
+
+
+
\ No newline at end of file
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 1eb7e0a2..8cf1a2d3 100644
--- a/src/app/routes/usercenter/components/freight/list/list.component.ts
+++ b/src/app/routes/usercenter/components/freight/list/list.component.ts
@@ -16,7 +16,10 @@ export class FreightComponentsListComponent implements OnInit {
columns!: STColumn[];
@ViewChild('st', { static: false }) st!: STComponent;
@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) {}
/**
@@ -36,10 +39,6 @@ export class FreightComponentsListComponent implements OnInit {
return params;
}
- get selectedRows() {
- return this.st?.list.filter(item => item.checked) || [];
- }
-
ngOnInit() {
this.initSF();
this.initST();
@@ -189,6 +188,30 @@ export class FreightComponentsListComponent implements OnInit {
daoyun(item: any) {
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() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
@@ -196,11 +219,24 @@ export class FreightComponentsListComponent implements OnInit {
creat() {
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() {
this.sf.reset();
this._$expand = false;
+ this.st.reload();
}
}
diff --git a/src/app/routes/usercenter/components/freight/list/new/new.component.html b/src/app/routes/usercenter/components/freight/list/new/new.component.html
index fe0400fa..20fc3078 100644
--- a/src/app/routes/usercenter/components/freight/list/new/new.component.html
+++ b/src/app/routes/usercenter/components/freight/list/new/new.component.html
@@ -1,9 +1,9 @@
-
+
- 营业执照基本信息
+ 企业基本信息
营业执照法人信息
diff --git a/src/app/routes/usercenter/services/usercenter.service.ts b/src/app/routes/usercenter/services/usercenter.service.ts
index 69185380..ce9564f7 100644
--- a/src/app/routes/usercenter/services/usercenter.service.ts
+++ b/src/app/routes/usercenter/services/usercenter.service.ts
@@ -19,9 +19,18 @@ export class UsermanageService extends BaseService {
// 查询企业列表
$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_add_salesman = '/api/mdc/cuc/enterpriseInfo/operate/addSalesman';
+
+ // 冻结/启用企业业
+ $api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';
+
constructor(public injector: Injector) {
super(injector);
}