Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -20,7 +20,7 @@ module.exports = {
|
||||
// }
|
||||
'//api': {
|
||||
target: {
|
||||
host: 'tms-api-test.eascs.com',
|
||||
host: 'tms-api-dev.eascs.com',
|
||||
protocol: 'https:',
|
||||
port: 443
|
||||
},
|
||||
|
||||
@ -47,15 +47,15 @@
|
||||
<ng-template #editCannel>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="140" [col]="1">
|
||||
<se label="合伙人名称"> 深圳某某有限公司 </se>
|
||||
<se label="当前渠道销售"> 张三/13999999999 </se>
|
||||
<se label="合伙人名称"> {{selectItem?.enterpriseName || selectItem?.contactName}} </se>
|
||||
<se label="当前渠道销售"> {{selectItem?.channelId}} </se>
|
||||
<se label="渠道销售修改为" required>
|
||||
<nz-select ngModel="lucy" style="width: 100%">
|
||||
<nz-select [(ngModel)]="cannelItem.channelId" style="width: 100%">
|
||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of cannels"></nz-option>
|
||||
</nz-select>
|
||||
</se>
|
||||
<se label="备注" required>
|
||||
<textarea rows="3" nz-input></textarea>
|
||||
<textarea rows="3" nz-input [(ngModel)]="cannelItem.remark"></textarea>
|
||||
</se>
|
||||
<se label="一并转移的客户">
|
||||
<p style="margin-top: 8px">已选(0)</p>
|
||||
@ -63,13 +63,13 @@
|
||||
{ title: '', index: 'key', type: 'checkbox' },
|
||||
{ title: '客户名称', index: 'enterpriceName' }
|
||||
]" [req]="{ process: beforeReq,params:{effectiveStatus:2 ,newPartnerId:selectItem.id} }"
|
||||
[loading]="service.http.loading" [page]="{show:false}">
|
||||
[loading]="service.http.loading" [page]="{show:false}" (change)="stChange($event)">
|
||||
</st>
|
||||
</se>
|
||||
<se label="生效节点" required>
|
||||
<nz-radio-group>
|
||||
<label nz-radio nzValue="A">修改成功后立即生效</label>
|
||||
<label nz-radio nzValue="B">CRM流程审核通过后生</label>
|
||||
<nz-radio-group [(ngModel)]="cannelItem.effectiveNode">
|
||||
<label nz-radio [nzValue]="1">修改成功后立即生效</label>
|
||||
<label nz-radio [nzValue]="2">CRM流程审核通过后生</label>
|
||||
</nz-radio-group>
|
||||
</se>
|
||||
</div>
|
||||
|
||||
@ -31,6 +31,8 @@ export class PartnerListComponent {
|
||||
editCannel: any;
|
||||
customers: any[] = [];
|
||||
cannels: any[] = [];
|
||||
selectedRows: any[] = [];
|
||||
cannelItem: any = { channelId: null, effectiveNode: 1, enterpriseIdList: [], remark: '' };
|
||||
|
||||
selectItem: any = {};
|
||||
|
||||
@ -66,7 +68,7 @@ export class PartnerListComponent {
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '审核',
|
||||
nzContent: PartnerAuditModalComponent,
|
||||
nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName },sourcePage:'合伙人审核列表' },
|
||||
nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName }, sourcePage: '合伙人审核列表' },
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
@ -108,32 +110,62 @@ export class PartnerListComponent {
|
||||
});
|
||||
}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
editCannelAction(item: any) {
|
||||
this.selectItem = item;
|
||||
this.cannelItem = { channelId: null, effectiveNode: 1, enterpriseIdList: [], remark: '' };
|
||||
this.selectedRows = [];
|
||||
// 校验合伙人是否可修改渠道销售 true:可以修改 false:不可以修改
|
||||
this.service.request(this.service.$api_check_partenr_change_channel,{id:item.id}).subscribe(res=>{
|
||||
if(res){
|
||||
this.service.request(this.service.$api_check_partenr_change_channel, { id: item.id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.selectItem = item;
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '修改渠道销售',
|
||||
nzWidth: 650,
|
||||
nzContent: this.editCannel,
|
||||
nzOnOk: () => {
|
||||
if (!this.cannelItem.channelId) {
|
||||
this.service.msgSrv.warning('请选择渠道销售');
|
||||
return false;
|
||||
}
|
||||
if (!this.cannelItem.remark) {
|
||||
this.service.msgSrv.warning('请填写备注');
|
||||
return false;
|
||||
}
|
||||
this.confirmEditCannel(item);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
confirmEditCannel(item: any) {
|
||||
const modal = this.nzModalService.confirm({
|
||||
nzTitle: '确定提交吗?',
|
||||
nzOnOk: () => {
|
||||
this.cannelItem.enterpriseIdList = this.selectedRows.map(row => row.id);
|
||||
this.service
|
||||
.request(this.service.$api_update_partner_channel_by_id, {
|
||||
...this.cannelItem,
|
||||
id: item.id
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('修改成功');
|
||||
this.nzModalService.closeAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新发起crm
|
||||
|
||||
@ -23,6 +23,8 @@ export class PartnerListService extends ShipperBaseService {
|
||||
$api_update_partner_template = '/api/mdc/partner/updateTemplate';
|
||||
// 更新渠道销售
|
||||
$api_update_partner_channel = '/api/mdc/partner/updateChannelSale';
|
||||
// 更新渠道销售
|
||||
$api_update_partner_channel_by_id = '/api/mdc/partner/updateChannelSaleByID';
|
||||
// 重新发起CRM
|
||||
$api_resend_crm = '/api/mdc/partner/reSendCrm';
|
||||
// 查询合伙人修改渠道渠道销售记录
|
||||
|
||||
Reference in New Issue
Block a user