This commit is contained in:
Taric Xin
2021-12-16 19:40:21 +08:00
parent 0084570fd8
commit 75c541d74b
20 changed files with 567 additions and 197 deletions

View File

@ -21,7 +21,7 @@
<nz-card>
<!-- 数据列表 -->
<st #st multiSort [data]="tabType===1?service.$api_get_freight_list:service.$api_get_enterprise_admin_list"
<st #st multiSort [data]="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' } }"

View File

@ -32,7 +32,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
isActived: false
}
];
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService, private ar: ActivatedRoute) {}
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService) {}
/**
* 查询参数
@ -128,16 +128,18 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
this.tabType = item.type;
this.expandToggle(false);
this.sf?.reset();
// setTimeout(() => {
// this.st.load(1);
// }, 100);
this.st.data = this.tabType === 1 ? this.service.$api_get_freight_list : this.service.$api_get_enterprise_admin_list;
setTimeout(() => {
this.st.load(1);
}, 100);
}
private adminAuditUser(params: any, modal: any) {
this.service.request(this.service.$api_audit_enterprise_admin, params, 'POST', false).subscribe(res => {
this.service.request(this.service.$api_audit_enterprise_admin, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('审核成功');
modal.destroy();
this.st.load(1);
}
});
}
@ -204,7 +206,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
fixed: 'right',
width: '180px',
className: 'text-center',
buttons: [{ text: '审核', click: _record => this.ViewAdimin(_record) }]
buttons: [{ text: '审核', click: _record => this.ViewAdimin(_record), iif: (item: any) => item.approvalStatus === 10 }]
}
];
}

View File

@ -127,7 +127,7 @@
</sv>
<sv label="企业授权函" col="2">
<ng-container
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'adminPhoto'}">
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'creditPhotoWatermark',key2:'creditPhoto',hover:'adminPhoto'}">
</ng-container>
</sv>
</sv-container>

View File

@ -234,7 +234,6 @@ export class FreightComponentsListDetailComponent implements OnInit {
oftenUsedServices: dateil.oftenUsedServices,
operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'),
operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'),
passTime: this.datePipe.transform(dateil.passTime, 'yyyy-MM-dd'),
promotersTelephone: dateil.promotersTelephone,
registerAddress: dateil.registerAddress,
registerPhone: dateil.registerPhone,

View File

@ -1,11 +1,3 @@
<!--
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-11-29 20:14:00
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html
-->
<!-- 页头 -->
<page-header-wrapper [title]="'企业列表'"></page-header-wrapper>
<nz-card>
@ -32,7 +24,7 @@
<!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" -->
<st #st [bordered]="true" [columns]="columns" [data]='service.$api_get_freight_list'
<st #st [columns]="columns" [data]='service.$api_get_freight_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[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] }" [loadingDelay]="500"
@ -59,7 +51,7 @@
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="手机号">
<input nz-input [(ngModel)]="promotersTelephone" />
<input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required/>
</se>
</div>
</div>

View File

@ -16,7 +16,7 @@ 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 = '';
@ -199,6 +199,7 @@ export class FreightComponentsListComponent implements OnInit {
return false;
}
if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) {
this.service.msgSrv.error('手机格式错误');
return false;
}
this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => {

View File

@ -32,7 +32,7 @@
<!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" -->
<st #st [bordered]="true" [columns]="columns" [data]='service.$api_get_user_list'
<st #st [columns]="columns" [data]='service.$api_get_user_list'
[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] }" [loadingDelay]="500"
@ -46,9 +46,9 @@
</div>
</ng-template>
<ng-template st-row="promotersTelephone" let-item let-index="index">
<div style="color: #52c41a;cursor: pointer;" (click)="addPromoter(item)">
<a (click)="addPromoter(item)">
{{ item.promotersTelephone || '添加' }}
</div>
</a>
</ng-template>
</st>
@ -58,7 +58,7 @@
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="手机号">
<input nz-input [(ngModel)]="promotersTelephone" />
<input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required />
</se>
</div>
</div>

View File

@ -65,9 +65,10 @@ export class FreightComponentsUserComponent implements OnInit {
return false;
}
if (typeof this.promotersTelephone === 'string' && !/(^1\d{10}$)/.test(this.promotersTelephone)) {
this.service.msgSrv.error('手机格式错误');
return false;
}
this.service.request(this.service.$api_add_salesman, { ids: [item.id], salesmanMobile: this.promotersTelephone }).subscribe(res => {
this.service.request(this.service.$api_add_user_salesman, { userId: item.userId, mobile: this.promotersTelephone }).subscribe(res => {
if (res) {
this.service.msgSrv.success(item?.promotersTelephone ? '添加推广员成功' : '修改推广员成功');
}