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

@ -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 ? '添加推广员成功' : '修改推广员成功');
}