diff --git a/src/app/routes/financial-management/services/freight-account.service.ts b/src/app/routes/financial-management/services/freight-account.service.ts index c347df62..a50288cd 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -124,8 +124,8 @@ export class FreightAccountService extends ShipperBaseService { // 根据预收款ID获取收款单明细 $api_get_advance_collection_detail = '/api/fcc/ficoBrmYsk/getBrmYskByYskblaId'; - constructor(public injector: Injector, public eaCacheSrv: EACacheService) { - super(injector, eaCacheSrv); + constructor(public injector: Injector) { + super(injector); } getReceiptUrl(url: string, params: any) { diff --git a/src/app/routes/insurance-management/services/insurance-management.service.ts b/src/app/routes/insurance-management/services/insurance-management.service.ts index deaea9a6..82020e8d 100644 --- a/src/app/routes/insurance-management/services/insurance-management.service.ts +++ b/src/app/routes/insurance-management/services/insurance-management.service.ts @@ -28,7 +28,7 @@ export class InsuranceManagementService extends ShipperBaseService { // 保险费公司认证 $api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`; - constructor(public injector: Injector, public eaCacheSrv: EACacheService) { - super(injector, eaCacheSrv); + constructor(public injector: Injector) { + super(injector); } } diff --git a/src/app/routes/order-management/services/order-management.service.ts b/src/app/routes/order-management/services/order-management.service.ts index ddb29aea..ddee0a7d 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -190,7 +190,7 @@ export class OrderManagementService extends ShipperBaseService { }) ); } - constructor(public injector: Injector, public eaCacheSrv: EACacheService) { - super(injector, eaCacheSrv); + constructor(public injector: Injector) { + super(injector); } } diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts index 3ba33a79..891e45e3 100644 --- a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -60,7 +60,7 @@ export class ParterChannelSalesEditComponent implements OnInit { ui: { widget: 'autocomplete', placeholder:'请选择', - asyncData: () => this.service.request(this.service.$api_fuzzyQuery).pipe( + asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe( map((res: any) => { console.log('111',res) return []; @@ -81,7 +81,7 @@ export class ParterChannelSalesEditComponent implements OnInit { default: '0', }, roleIds: { - title: '角色', + title: '', type: 'string', ui: { widget: 'select', @@ -89,6 +89,7 @@ export class ParterChannelSalesEditComponent implements OnInit { mode: 'multiple', maxMultipleCount: 5, asyncData: () => { + return this.service.request(this.service.$api_getAppRoleList).pipe( map((res: any) => { return res diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts index 635495a2..25cb97c5 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.ts +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -64,27 +64,27 @@ export class ParterChannelSalesListComponent implements OnInit { this.columns = [ { title: '销售渠道姓名', - index: 'name1' + index: 'name' }, { title: '手机号', - index: 'name1' + index: 'telephone' }, { title: '所属组织', - index: 'name1' + index: 'organLable' }, { title: '职级', - index: 'name1' + index: 'station' }, { title: '等级', - index: 'name1' + index: 'postLevel' }, { title: '省市', - index: 'name1' + index: 'residencePlace' }, { title: '邀请码', diff --git a/src/app/routes/partner/level-config/components/edit/edit.component.ts b/src/app/routes/partner/level-config/components/edit/edit.component.ts index c21bb292..029381d5 100644 --- a/src/app/routes/partner/level-config/components/edit/edit.component.ts +++ b/src/app/routes/partner/level-config/components/edit/edit.component.ts @@ -75,6 +75,7 @@ export class ParterLevelConfigEditComponent implements OnInit { if(!this.sf.valid) return; this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => { if (res) { + this.service.msgSrv.success('保存成功!') this.modalRef.destroy(true); } else { this.service.msgSrv.error(res.msg); diff --git a/src/app/routes/partner/level-config/components/list/list.component.ts b/src/app/routes/partner/level-config/components/list/list.component.ts index 5b79e7fd..59d8f88f 100644 --- a/src/app/routes/partner/level-config/components/list/list.component.ts +++ b/src/app/routes/partner/level-config/components/list/list.component.ts @@ -45,21 +45,22 @@ export class ParterLevelConfigListComponent implements OnInit { properties: { gradeName: { type: 'string', - title: '等级姓名' + title: '等级姓名', }, stateLocked: { type: 'string', title: '状态', - enum:[{label:'是',value:'1'},{label:'否',value:'2'}], + enum:[{label:'启用',value:'1'},{label:'禁用',value:'0'}], ui:{ - widget:'select' + widget:'select', } }, } }; this.ui = { '*': { - grid: { span: 8, gutter: 4 } + width:300, + grid: { span: 12, gutter: 4 } } }; } @@ -76,7 +77,7 @@ export class ParterLevelConfigListComponent implements OnInit { }, { title: '创建时间', - index: 'name1' + index: 'createTime' }, { title: '启用时间', @@ -84,7 +85,10 @@ export class ParterLevelConfigListComponent implements OnInit { }, { title: '状态', - index: 'name1' + index: 'stateLocked', + format: (item: any) => { + return item.stateLocked ? '禁用':'启用' + } }, { title: '操作', @@ -97,10 +101,12 @@ export class ParterLevelConfigListComponent implements OnInit { { text: '禁用', click: (_record, _modal, _instance) => this.stop(_record), + iif:(item)=>!item.stateLocked }, { text: '启用', click: (_record, _modal, _instance) => this.restart(_record), + iif:(item)=>item.stateLocked } ] } @@ -145,30 +151,30 @@ export class ParterLevelConfigListComponent implements OnInit { }); } - restart(id: any) { + restart(item: any) { this.modalService.confirm({ nzTitle: '冻结确认', nzContent: `确定启用该账号吗?
`, - // nzOnOk: () => - // this.service.request('', '').subscribe(res => { - // if (res) { - // this.service.msgSrv.success('冻结成功!'); - // this.st.reload(); - // } - // }) + nzOnOk: () => + this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => { + if (res) { + this.service.msgSrv.success('启用成功!'); + this.st.reload(); + } + }) }); } - stop(id: any) { + stop(item: any) { this.modalService.confirm({ nzTitle: '冻结确认', nzContent: `确定禁用该账号吗?
`, - // nzOnOk: () => - // this.service.request('', '').subscribe(res => { - // if (res) { - // this.service.msgSrv.success('冻结成功!'); - // this.st.reload(); - // } - // }) + nzOnOk: () => + this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => { + if (res) { + this.service.msgSrv.success('冻结成功!'); + this.st.reload(); + } + }) }); } diff --git a/src/app/routes/partner/level-config/services/level-config.service.ts b/src/app/routes/partner/level-config/services/level-config.service.ts index 3a78fd6c..df8e18b3 100644 --- a/src/app/routes/partner/level-config/services/level-config.service.ts +++ b/src/app/routes/partner/level-config/services/level-config.service.ts @@ -13,6 +13,8 @@ export class ChannelSalesService extends BaseService { $api_save = '/api/mdc/partnerGradeConfig/save'; // 删除合伙人等级配置表 $api_del = '/api/mdc/partnerGradeConfig/deletebatch'; + // 启用/禁用等级配置 + $api_updatePartnerGradeConfig = '/api/mdc/partnerGradeConfig/updatePartnerGradeConfig'; constructor(public injector: Injector) { super(injector); diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.html b/src/app/routes/partner/partner-list/components/index/partner-list.component.html index 5d4e7feb..f2f058ee 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.html +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.html @@ -36,8 +36,7 @@ {{selectItem?.enterpriseName}} - - + diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts index 64b10e7a..eaa21889 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts @@ -25,6 +25,7 @@ export class PartnerListComponent { @ViewChild('editTemplate', { static: true }) editTemplate: any; templateId: any; + templates: any[] = []; @ViewChild('editCannel', { static: true }) editCannel: any; @@ -32,7 +33,13 @@ export class PartnerListComponent { selectItem: any = {}; - constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {} + constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) { + this.service.getRebateConfig().subscribe(res => { + if (res) { + this.customers = res; + } + }); + } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { @@ -60,6 +67,10 @@ export class PartnerListComponent { nzTitle: '修改返佣模板', nzContent: this.editTemplate, nzOnOk: () => { + if (!this.templateId) { + this.service.msgSrv.warning('请选择返佣模板'); + return false; + } this.confirmEditTemplate(); return false; } @@ -367,9 +378,9 @@ export class PartnerListComponent { text: '详情', click: item => { if (item.partnerType === 1) { - this.router.navigate([`/partner/partner-list/etp-detail/${item.appUserId}`]); + this.router.navigate([`/partner/partner-list/etp-detail/${item.id}`]); } else { - this.router.navigate([`/partner/partner-list/personal-detail/${item.appUserId}`]); + this.router.navigate([`/partner/partner-list/personal-detail/${item.id}`]); } } }, diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html index 759de850..777d019f 100644 --- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html @@ -121,19 +121,19 @@ - - - + - - + @@ -165,12 +165,14 @@

- + + {{detailData.enterpriseName}} - + + {{detailData.unifiedSocialCreditCode}} - -
-
- -
- -
-
+ + diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less index eadc3a6a..be442cbc 100644 --- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less @@ -27,4 +27,11 @@ z-index : 999 !important; width : 100% !important; } + + .image-hover .delete-icon { + top : unset !important; + right : unset !important; + margin-top : -15px; + margin-left: -15px; + } } \ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts index eefd57bc..94b4c869 100644 --- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts @@ -253,49 +253,35 @@ export class PartnerDetailComponent implements OnInit, OnDestroy { } save() { + if (this.enterpriseAddressCode?.length > 3) { + this.service.msgSrv.warning('所属城市不能超过3个'); + return; + } const dateil = { ...this.detailData }; Object.assign(dateil.legalPersonIdentity, { validStartTime: this.datePipe.transform(dateil.legalPersonIdentity.validStartTime, 'yyyy-MM-dd'), validEndTime: this.datePipe.transform(dateil.legalPersonIdentity.validEndTime, 'yyyy-MM-dd') }); + Object.assign(dateil.adminUserInfo, { + validStartTime: this.datePipe.transform(dateil.adminUserInfo.validStartTime, 'yyyy-MM-dd'), + validEndTime: this.datePipe.transform(dateil.adminUserInfo.validEndTime, 'yyyy-MM-dd') + }); const params = {}; Object.assign(params, { - adminMobile: dateil.adminMobile, - adminAppUserId: dateil.adminAppUserId, - adminUserInfo: { ...dateil.adminUserInfo }, - bankAccount: dateil.bankAccount, - businessScope: dateil.businessScope, - createBank: dateil.createBank, - creditPhoto: dateil.creditPhoto, - creditPhotoWatermark: dateil.creditPhotoWatermark, - enterpriseAddress: dateil.enterpriseAddress, - enterpriseAddressCode: this.enterpriseAddressCode[2], - enterpriseLogo: dateil.enterpriseLogo, - enterpriseName: dateil.enterpriseName, + ...dateil, + cityCodesList: this.enterpriseAddressCode, enterpriseRegistrationTime: this.datePipe.transform(dateil.enterpriseRegistrationTime, 'yyyy-MM-dd'), - enterpriseType: dateil.enterpriseType, - id: dateil.id, - legalPersonIdentityDTO: { ...dateil.legalPersonIdentity }, - licensePhoto: dateil.licensePhoto, - licensePhotoWatermark: dateil.licensePhotoWatermark, - networkTransporter: dateil.networkTransporter, - oftenUsedServices: dateil.oftenUsedServices, operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'), - operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'), - promotersTelephone: dateil.promotersTelephone, - registerAddress: dateil.registerAddress, - registerPhone: dateil.registerPhone, - registrationCapital: dateil.registrationCapital, - taxAuthority: dateil.taxAuthority, - unifiedSocialCreditCode: dateil.unifiedSocialCreditCode + operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd') + }); + + this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('企业合伙人修改成功'); + this.initData(); + this.isEdit = false; + } }); - // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('企业修改成功'); - // this.initData(); - // this.isEdit = false; - // } - // }); } // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 @@ -304,85 +290,77 @@ export class PartnerDetailComponent implements OnInit, OnDestroy { idCardUrl: imgurl, side: isFront }; - // this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { - // if (res) { - // if (type === 1) { - // // 法定代表人证件照 - // if (isFront === 'front') { - // // 正面 - // if (res.name) { - // this.detailData.legalPersonIdentity.name = res.name; - // } - // if (res.number) { - // this.detailData.legalPersonIdentity.certificateNumber = res.number; - // } - // } - // if (isFront === 'back') { - // // 背面 - // if (res.validFrom) { - // this.detailData.legalPersonIdentity.validStartTime = res.validFrom; - // } - // if (res.validTo) { - // this.detailData.legalPersonIdentity.validEndTime = res.validTo; - // } else { - // this.detailData.legalPersonIdentity.validEndTime = null; - // } - // } - // } - // // 企业管理员证件照 - // if (type === 0) { - // if (isFront === 'front') { - // // 正面 - // if (res.name) { - // this.detailData.adminUserInfo.name = res.name; - // } - // if (res.number) { - // this.detailData.adminUserInfo.certificateNumber = res.number; - // } - // } - // } - // } - // }); + this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { + if (res) { + if (type === 1) { + // 法定代表人证件照 + if (isFront === 'front') { + // 正面 + if (res.name) { + this.detailData.legalPersonIdentity.name = res.name; + } + if (res.number) { + this.detailData.legalPersonIdentity.certificateType = 0; + this.detailData.legalPersonIdentity.certificateNumber = res.number; + } + } + if (isFront === 'back') { + // 背面 + if (res.validFrom) { + this.detailData.legalPersonIdentity.validStartTime = res.validFrom; + } + if (res.validTo) { + this.detailData.legalPersonIdentity.validEndTime = res.validTo; + } else { + this.detailData.legalPersonIdentity.validEndTime = null; + } + } + } + // 企业管理员证件照 + if (type === 0) { + if (isFront === 'front') { + // 正面 + if (res.name) { + this.detailData.adminUserInfo.name = res.name; + } + if (res.number) { + this.detailData.adminUserInfo.certificateNumber = res.number; + } + } + if (isFront === 'back') { + // 背面 + if (res.validFrom) { + this.detailData.adminUserInfo.validStartTime = res.validFrom; + } + if (res.validTo) { + this.detailData.adminUserInfo.validEndTime = res.validTo; + } + } + } + } + }); } // 识别营业执照 checkBusinessLicense(imgurl: any) { - // this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { - // if (res) { - // if (res.registrationNumber) { - // this.detailData.unifiedSocialCreditCode = res.registrationNumber; - // } - // if (res.name) { - // this.detailData.enterpriseName = res.name; - // } - // if (res.type) { - // this.detailData.enterpriseType = res.type; - // } - // if (res.addressRegionCodes) { - // this.detailData.enterpriseAddressCode = res.addressRegionCodes; - // } - // if (res.address) { - // this.detailData.enterpriseAddress = res.address; - // } - // if (res.registeredCapital) { - // this.detailData.registrationCapital = res.registeredCapital; - // } - // if (res.foundDate) { - // this.detailData.enterpriseRegistrationTime = res.foundDate; - // } - // if (res.businessTermStartDate) { - // this.detailData.operatingStartTime = res.businessTermStartDate; - // } - // if (res.businessTermEndDate) { - // this.detailData.operatingEndTime = res.businessTermEndDate; - // } else { - // this.detailData.operatingEndTime = null; - // } - // if (res.businessScope) { - // this.detailData.businessScope = res.businessScope; - // } - // } - // }); + this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { + if (res) { + // if (res.registrationNumber) { + // this.detailData.unifiedSocialCreditCode = res.registrationNumber; + // } + // if (res.name) { + // this.detailData.enterpriseName = res.name; + // } + if (res.businessTermStartDate) { + this.detailData.operatingStartTime = res.businessTermStartDate; + } + if (res.businessTermEndDate) { + this.detailData.operatingEndTime = res.businessTermEndDate; + } else { + this.detailData.operatingEndTime = null; + } + } + }); } private initST(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } { diff --git a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html index 143b4be1..aa2b1e32 100644 --- a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html +++ b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html @@ -87,8 +87,9 @@ [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" />
- + + {{detailData.adminUserInfo.mobile}}
- -
-
- -
- -
-
+ +
\ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less index eadc3a6a..be442cbc 100644 --- a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less +++ b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less @@ -27,4 +27,11 @@ z-index : 999 !important; width : 100% !important; } + + .image-hover .delete-icon { + top : unset !important; + right : unset !important; + margin-top : -15px; + margin-left: -15px; + } } \ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts index 218439d0..c6da1adc 100644 --- a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts +++ b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts @@ -152,10 +152,7 @@ export class PersonalPartnerDetailComponent implements OnInit { data[key] = file.response.data?.fullFileWatermarkPath; data[key2] = file.response.data?.fullFilePath; if (id === 'legalFront' || id === 'legalBack') { - this.checkIdCard(file.response.data?.fullFilePath, id === 'legalFront' ? 'front' : 'back', 1); - } - if (id === 'certificateBackFront' || id === 'certificateBack') { - this.checkIdCard(file.response.data?.fullFilePath, id === 'certificateBackFront' ? 'front' : 'back', 0); + this.checkIdCard(file.response.data?.fullFilePath, id === 'legalFront' ? 'front' : 'back'); } } } @@ -215,95 +212,53 @@ export class PersonalPartnerDetailComponent implements OnInit { } save() { - const dateil = { ...this.detailData }; - Object.assign(dateil.legalPersonIdentity, { - validStartTime: this.datePipe.transform(dateil.legalPersonIdentity.validStartTime, 'yyyy-MM-dd'), - validEndTime: this.datePipe.transform(dateil.legalPersonIdentity.validEndTime, 'yyyy-MM-dd') + if (this.enterpriseAddressCode?.length > 3) { + this.service.msgSrv.warning('所属城市不能超过3个'); + return; + } + const dateil = { ...this.detailData, cityCodesList: this.enterpriseAddressCode }; + Object.assign(dateil.adminUserInfo, { + validStartTime: this.datePipe.transform(dateil.adminUserInfo.validStartTime, 'yyyy-MM-dd'), + validEndTime: this.datePipe.transform(dateil.adminUserInfo.validEndTime, 'yyyy-MM-dd') }); - const params = {}; - Object.assign(params, { - adminMobile: dateil.adminMobile, - adminAppUserId: dateil.adminAppUserId, - adminUserInfo: { ...dateil.adminUserInfo }, - bankAccount: dateil.bankAccount, - businessScope: dateil.businessScope, - createBank: dateil.createBank, - creditPhoto: dateil.creditPhoto, - creditPhotoWatermark: dateil.creditPhotoWatermark, - enterpriseAddress: dateil.enterpriseAddress, - enterpriseAddressCode: this.enterpriseAddressCode[2], - enterpriseLogo: dateil.enterpriseLogo, - enterpriseName: dateil.enterpriseName, - enterpriseRegistrationTime: this.datePipe.transform(dateil.enterpriseRegistrationTime, 'yyyy-MM-dd'), - enterpriseType: dateil.enterpriseType, - id: dateil.id, - legalPersonIdentityDTO: { ...dateil.legalPersonIdentity }, - licensePhoto: dateil.licensePhoto, - licensePhotoWatermark: dateil.licensePhotoWatermark, - networkTransporter: dateil.networkTransporter, - oftenUsedServices: dateil.oftenUsedServices, - operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'), - operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'), - promotersTelephone: dateil.promotersTelephone, - registerAddress: dateil.registerAddress, - registerPhone: dateil.registerPhone, - registrationCapital: dateil.registrationCapital, - taxAuthority: dateil.taxAuthority, - unifiedSocialCreditCode: dateil.unifiedSocialCreditCode + + this.service.request(this.service.$api_save_personal_partner, dateil).subscribe(res => { + if (res) { + this.service.msgSrv.success('个人合伙人修改成功'); + this.initData(); + this.isEdit = false; + } }); - // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('企业修改成功'); - // this.initData(); - // this.isEdit = false; - // } - // }); } // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 - checkIdCard(imgurl: any, isFront: string, type: number) { + checkIdCard(imgurl: any, isFront: string) { const params = { idCardUrl: imgurl, side: isFront }; - // this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { - // if (res) { - // if (type === 1) { - // // 法定代表人证件照 - // if (isFront === 'front') { - // // 正面 - // if (res.name) { - // this.detailData.legalPersonIdentity.name = res.name; - // } - // if (res.number) { - // this.detailData.legalPersonIdentity.certificateNumber = res.number; - // } - // } - // if (isFront === 'back') { - // // 背面 - // if (res.validFrom) { - // this.detailData.legalPersonIdentity.validStartTime = res.validFrom; - // } - // if (res.validTo) { - // this.detailData.legalPersonIdentity.validEndTime = res.validTo; - // } else { - // this.detailData.legalPersonIdentity.validEndTime = null; - // } - // } - // } - // // 企业管理员证件照 - // if (type === 0) { - // if (isFront === 'front') { - // // 正面 - // if (res.name) { - // this.detailData.adminUserInfo.name = res.name; - // } - // if (res.number) { - // this.detailData.adminUserInfo.certificateNumber = res.number; - // } - // } - // } - // } - // }); + this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { + if (res) { + // 企业管理员证件照 + if (isFront === 'front') { + // 正面 + if (res.name) { + this.detailData.adminUserInfo.name = res.name; + } + if (res.number) { + this.detailData.adminUserInfo.certificateNumber = res.number; + } + } + if (isFront === 'back') { + // 背面 + if (res.validFrom) { + this.detailData.adminUserInfo.validStartTime = res.validFrom; + } + if (res.validTo) { + this.detailData.adminUserInfo.validEndTime = res.validTo; + } + } + } + }); } } diff --git a/src/app/routes/partner/partner-list/services/partner-list.service.ts b/src/app/routes/partner/partner-list/services/partner-list.service.ts index 9756c19f..b8d83d54 100644 --- a/src/app/routes/partner/partner-list/services/partner-list.service.ts +++ b/src/app/routes/partner/partner-list/services/partner-list.service.ts @@ -1,10 +1,10 @@ import { Injectable, Injector } from '@angular/core'; -import { BaseService, EACacheService } from '@shared'; +import { BaseService, EACacheService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { ImageViewComponent } from 'src/app/shared/components/imagelist'; @Injectable() -export class PartnerListService extends BaseService { +export class PartnerListService extends ShipperBaseService { $mock_url = '/rule?_allow_anonymous=true'; // 查询合伙人信息-分页 @@ -18,13 +18,13 @@ export class PartnerListService extends BaseService { // 获取合伙人信息 $api_get_personal_partner_detail = '/api/mdc/partner/getPersonally'; // 审核合伙人 - $api_audit_partner= '/api/mdc/partner/audit'; + $api_audit_partner = '/api/mdc/partner/audit'; // 修改返佣模板 - $api_update_partner_template= '/api/mdc/partner/updateTemplate'; + $api_update_partner_template = '/api/mdc/partner/updateTemplate'; // 更新渠道销售 - $api_update_partner_channel= '/api/mdc/partner/updateChannelSale'; + $api_update_partner_channel = '/api/mdc/partner/updateChannelSale'; // 重新发起CRM - $api_resend_crm= '/api/mdc/partner/reSendCrm'; + $api_resend_crm = '/api/mdc/partner/reSendCrm'; // 查询合伙人修改渠道渠道销售记录 $api_get_personal_channel_list = '/api/mdc/partnerChannelRelLog/list/page'; // 冻结/启用企业业 diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 14778143..52eaf537 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -99,8 +99,8 @@ export class TicketService extends ShipperBaseService { // 查询快递轨迹 $api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes'; - constructor(public injector: Injector, public eaCacheSrv: EACacheService) { - super(injector, eaCacheSrv); + constructor(public injector: Injector) { + super(injector); } reviewPDF(url: string) { diff --git a/src/app/routes/usercenter/services/usercenter.service.ts b/src/app/routes/usercenter/services/usercenter.service.ts index c42a9b3d..295e45f0 100644 --- a/src/app/routes/usercenter/services/usercenter.service.ts +++ b/src/app/routes/usercenter/services/usercenter.service.ts @@ -136,8 +136,8 @@ export class UsermanageService extends ShipperBaseService { // 查询司机配置列表 $api_configPage = '/api/mdc/cuc/driver/list/configPage'; - constructor(public injector: Injector, private nzModalService: NzModalService, public eaCacheSrv: EACacheService) { - super(injector, eaCacheSrv); + constructor(public injector: Injector, private nzModalService: NzModalService) { + super(injector); } showImg(url: any) { diff --git a/src/app/shared/services/business/shipper-base.service.ts b/src/app/shared/services/business/shipper-base.service.ts index 41c9fbf8..d3a4b2d1 100644 --- a/src/app/shared/services/business/shipper-base.service.ts +++ b/src/app/shared/services/business/shipper-base.service.ts @@ -17,10 +17,10 @@ export class ShipperBaseService extends BaseService { $api_get_network_freight_forwarder_one = `/api/mdc/cuc/networkTransporter/get`; // 获取网络货运人 // 根据FullKey获取系统子配置(树) $api_getSysConfigTreeByParentFullKey = `/api/mdc/pbc/sysConfig/getSysConfigTreeByParentFullKey`; - envCache: any; - constructor(public injector: Injector, public eaCacheSrv: EACacheService) { + // 获取全部返佣配置 + $api_get_rebate_config = `/api/mdc/rebateConfig/list/listRebateConfig`; + constructor(public injector: Injector) { super(injector); - this.envCache = this.eaCacheSrv.get(cacheConf.env); } /** @@ -44,22 +44,22 @@ export class ShipperBaseService extends BaseService { * 获取所属项目 * @returns */ - getEnterpriseProject(params?: any) { + getEnterpriseProject(params?: any) { return this.request(this.$api_get_enterprise_project, params).pipe( map((res: any) => { if (!res) { return []; } - const list = res.map(((item: any) => { + const list = res.map((item: any) => { return { label: item.projectName, value: item.id - } - })) + }; + }); const obj = [{ value: '', label: '全部' }]; return [...obj, ...list]; }) - ) + ); } /** @@ -204,4 +204,23 @@ export class ShipperBaseService extends BaseService { }) ); } + + /** + * 获取全部返佣配置 + * @returns + */ + getRebateConfig() { + const params = {}; + return this.request(this.$api_get_rebate_config, params, 'POST').pipe( + map(res => { + if (res) { + return res.map((m: any) => { + return { label: m.configName, value: m.id }; + }); + } else { + return []; + } + }) + ); + } }