diff --git a/package-lock.json b/package-lock.json index 64c94964..ddf3948b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2879,35 +2879,6 @@ "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", "dev": true }, - "@types/quill": { - "version": "2.0.9", - "resolved": "https://registry.npmmirror.com/@types/quill/-/quill-2.0.9.tgz", - "integrity": "sha512-/n40Ypp+jF3GDLqB/5z1P+Odq1K98txXbBgRDkG6Z90LGC1AwQPtZWNeOdDg0yUlgBSUASmpeDn3eBPUuPXtuw==", - "dev": true, - "requires": { - "parchment": "^1.1.2", - "quill-delta": "^4.0.1" - }, - "dependencies": { - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "quill-delta": { - "version": "4.2.2", - "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-4.2.2.tgz", - "integrity": "sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==", - "dev": true, - "requires": { - "fast-diff": "1.2.0", - "lodash.clonedeep": "^4.5.0", - "lodash.isequal": "^4.5.0" - } - } - } - }, "@types/selenium-webdriver": { "version": "3.0.19", "resolved": "https://registry.npmmirror.com/@types/selenium-webdriver/download/@types/selenium-webdriver-3.0.19.tgz", @@ -10165,24 +10136,12 @@ "resolved": "https://registry.nlark.com/lodash/download/lodash-4.17.21.tgz", "integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=" }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true - }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npm.taobao.org/lodash.debounce/download/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.nlark.com/lodash.memoize/download/lodash.memoize-4.1.2.tgz", diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index 5c3efc42..04aef8a0 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -49,9 +49,9 @@ export class StartupService { let data; if (this.coreSrv.loginStatus) { // 本地菜单 - data = this.loadMockData(); + // data = this.loadMockData(); // 远程菜单 - // data = this.loadRemoteData(); + data = this.loadRemoteData(); } else { data = this.loadMockData(); } @@ -134,12 +134,12 @@ export class StartupService { const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data)); // 菜单数据 - const menuData = this.httpClient - .post(this.coreSrv.$api_get_current_user_menus, { - appId: this.coreSrv.envSrv.getEnvironment().appId - }) - .pipe(map((res: any) => res.data)); - // const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu)); + // const menuData = this.httpClient + // .post(this.coreSrv.$api_get_current_user_menus, { + // appId: this.coreSrv.envSrv.getEnvironment().appId + // }) + // .pipe(map((res: any) => res.data)); + const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu)); return zip(appData, userData, menuData); } diff --git a/src/app/global-config.module.ts b/src/app/global-config.module.ts index 163c16c9..d92a7840 100644 --- a/src/app/global-config.module.ts +++ b/src/app/global-config.module.ts @@ -20,7 +20,14 @@ const alainConfig: AlainConfig = { sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } }, pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true }, auth: { login_url: '/passport/login' }, - acl: { guard_url: '/exception/403' } + acl: { guard_url: '/exception/403' }, + chart: { + // 以下是默认配置,如果项目无法外网访问,可以根据 `angular.json` 配置将依赖包直接使用 `./assets***` 路径 + libs: [ + 'https://gw.alipayobjects.com/os/lib/antv/g2/4.1.4/dist/g2.min.js', + 'https://gw.alipayobjects.com/os/lib/antv/data-set/0.11.7/dist/data-set.js' + ] + } }; const alainModules = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()]; 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/account-management/components/account-detail/account-detail.component.html b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html index 8669a08f..47e81e17 100644 --- a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html +++ b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html @@ -1,27 +1,27 @@ - + diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts index 9db2127b..6840cddd 100644 --- a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; import { STColumn, STComponent } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { _HttpClient } from '@delon/theme'; @@ -17,13 +18,16 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On @ViewChild('st') private readonly st!: STComponent; @ViewChild('sf') private readonly sf!: SFComponent; columns: STColumn[] = []; - id = ''; + roleId = ''; _$expand = false; + record = {}; - constructor(public shipperservice: ShipperBaseService, public amService: AccountManagemantService, private modalRef: NzModalRef) { } + constructor(public shipperservice: ShipperBaseService, public service: AccountManagemantService, + private modalRef: NzModalRef, public router: Router) { + } get reqParams() { - return { ...this.sf?.value }; + return { ...this.sf?.value, roleId: this.roleId }; } ngOnInit(): void { this.initSF(); @@ -36,21 +40,21 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On _$expand: { type: 'boolean', ui: { hidden: true } }, - abnormalCause: { + userName: { title: '合伙人名称', type: 'string', ui: { placeholder: '请输入', }, }, - abnormalCause1: { + phone: { title: '手机号', type: 'string', ui: { placeholder: '请输入', }, }, - abnormalCause2: { + ltdId: { title: '网络货运人', type: 'string', default: '', @@ -79,7 +83,7 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On }, }, }, - abnormalCause3: { + virtualAccount: { title: '虚拟账户', type: 'string', ui: { @@ -112,16 +116,15 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On */ initST() { this.columns = [ - { title: '合伙人', index: 'carNo', className: 'text-center', width: 200 }, - { title: '手机号', render: 'carModelLabel', className: 'text-center', width: 150 }, - { title: '网络货运人', render: 'carModelLabel', className: 'text-center', width: 200 }, - { title: '银行类型', render: 'carModelLabel', className: 'text-center', width: 120 }, - { title: '虚拟账户', render: 'carModelLabel', className: 'text-center', width: 180 }, - { title: '可用余额', render: 'approvalStatus1', className: 'text-right', width: 180 }, - { title: '账户总余额', render: 'approvalStatus2', className: 'text-right', width: 180 }, - { title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', width: 180 }, - { title: '创建时间', index: 'approvalStatus4', className: 'text-center', width: 200 }, - { title: '状态', index: 'approvalStatus4', className: 'text-center', width: 120 }, + { title: '合伙人', index: 'name', className: 'text-center', width: 200 }, + { title: '手机号', index: 'phone', className: 'text-center', width: 150 }, + { title: '网络货运人', index: 'ltdName', className: 'text-center', width: 200 }, + { title: '银行类型', index: 'bankTypeLabel', className: 'text-center', width: 120 }, + { title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 180 }, + { title: '可用余额', render: 'availableBalance', className: 'text-center', width: 180 }, + { title: '账户总余额', render: 'allBalance', className: 'text-center', width: 180 }, + { title: '创建时间', index: 'createTime', className: 'text-center', width: 200 }, + { title: '状态', index: 'stateDeletedLabel', className: 'text-center', width: 120 }, { title: '操作', width: 120, @@ -164,7 +167,14 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On * @param _record 当前行信息 */ viewDetail(_record: any) { - window.open(location.origin + `/#/partner/account-management/am/detail/${_record?.id}`); + // this.router.navigate([`/partner/account-management/am/detail/${_record?.roleId}`], { + // queryParams: { + // channelSource: _record?.accountType, + // bankType: _record?.bankType, + // ltdId: _record?.ltdId + // } + // }); + window.open(location.origin + `/#/partner/account-management/am/detail/${_record?.roleId}?ltdId=${_record?.ltdId}&channelSource=${_record?.accountType}&bankType=${_record?.bankType}`); } close() { diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.html b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.html index 449d3e1b..92dc20a4 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.html +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.html @@ -41,7 +41,7 @@ - diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts index 6a428518..4bb0a0d9 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts @@ -5,6 +5,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; import Big from 'src/app/shared/utils/deal-precision'; +import { AccountManagemantService } from '../../services/account-managemant.service'; @Component({ @@ -27,7 +28,7 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni refundStatus: any = ''; msg = ''; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { } + constructor(public service: FreightAccountService, public amService: AccountManagemantService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { } ngOnInit(): void { } @@ -280,13 +281,13 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni { title: '提现单号', index: 'refundApplyCode', width: 180, className: 'text-center' }, { title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' }, { title: '银行类型', index: 'bankTypeLabel', width: 100, className: 'text-center' }, - { title: '账户类型', index: 'bankTypeLabel', width: 100, className: 'text-center' }, + { title: '账户类型', index: 'accountTypeLabel', width: 100, className: 'text-center' }, { title: '账户名称', index: 'bankAccountName', width: 220, className: 'text-center' }, { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, { title: '提现金额', index: 'amount', - width: 150, + width: 200, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } diff --git a/src/app/routes/partner/account-management/services/account-managemant.service.ts b/src/app/routes/partner/account-management/services/account-managemant.service.ts index d88522a1..f7fa89b0 100644 --- a/src/app/routes/partner/account-management/services/account-managemant.service.ts +++ b/src/app/routes/partner/account-management/services/account-managemant.service.ts @@ -6,7 +6,16 @@ import { BaseService } from '@shared'; }) export class AccountManagemantService extends BaseService { - $api_get_account_management_page = `/api/fcc/ficoBrmH/list/page`; + $api_get_account_management_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceByOperator`; // 账户管理 + $api_get_virtual_detail_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceInfoByOperator`;//虚拟账户明细 + $api_get_withdraw_record_page = `/api/fcc/refundApplicationOBC/list/partnerPage`;// 提现记录 + $api_get_account_detail_page = `/api/bpc/accountBalancePartner/getAccountBalancePartnerByOperatorPage`;// 账户明细 + $api_get_account_detail_footer_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerIncomeDetailByOperator`;// 账户明细脚部汇总 + $api_get_account_detail_header_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerAmountByOperator`;// 账户明细头部汇总 + $api_get_bill_detail = `/api/bpc/partnerIncomeDetail/findPartnerWaitIncomeByOperator`; // 查看账单明细 + $api_get_invoice_summary = `/api/bpc/partnerInvoiceEntry/oprationEntrySummary`; // 入账明细汇总 + $api_get_invoice_detail_page = `/api/bpc/partnerInvoiceEntry/oprationEntryDetail`; // 待入账明细列表 + constructor(public injector: Injector) { super(injector) } diff --git a/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.html b/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.html new file mode 100644 index 00000000..a0469712 --- /dev/null +++ b/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.html @@ -0,0 +1,46 @@ + + + + + + +
+
+ +
+
+
深圳市XXXXXXX有限公司
+
91440300357887492H
+ + + + + + +
+
+
待审核
+
+ + +
+
+
+
+
+ +
+
+ + + + + + +
+
+
+ + \ No newline at end of file diff --git a/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.less b/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.less new file mode 100644 index 00000000..403e7692 --- /dev/null +++ b/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.less @@ -0,0 +1,29 @@ +:host { + .head-box { + img { + width : 80px; + height : 80px; + padding: 8px; + } + + .right-h { + font-size: 16px; + } + + .right-s { + color: #7f7f7f; + } + + .left-rt { + font-weight: bold; + font-size : 16px; + text-align : right; + } + + .left-rb { + display : flex; + justify-content: flex-end; + padding-top : 16px; + } + } +} \ No newline at end of file diff --git a/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.ts b/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.ts new file mode 100644 index 00000000..d7aa10db --- /dev/null +++ b/src/app/routes/partner/advice-feedback/components/feedback-detail/feedback-detail.component.ts @@ -0,0 +1,71 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn } from '@delon/abc/st'; +import { _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { ParterClaimAuditListChannelApproveComponent } from '../../../claim-audit/components/channel-approve/channel-approve.component'; +import { ParterClaimAuditListChannelRejectComponent } from '../../../claim-audit/components/channel-reject/channel-reject.component'; +import { AdviceFeedbackService } from '../../services/advice-feedback.service'; + +// import { ParterClaimAuditListChannelApproveComponent } from '../channel-approve/channel-approve.component'; +// import { ParterClaimAuditListChannelRejectComponent } from '../channel-reject/channel-reject.component'; + +@Component({ + selector: 'app-parter-feedback-detail-detail', + templateUrl: './feedback-detail.component.html', + styleUrls: ['./feedback-detail.component.less'] +}) +export class ParterAdviceFeedbackDetailComponent implements OnInit { + id = this.route.snapshot.queryParams.id; + i: any; + imges: any; + isVisible = false; + + constructor( + private route: ActivatedRoute, + private msgSrv: NzMessageService, + public service: AdviceFeedbackService, + private modalService: NzModalService, + private router: Router + ) {} + + ngOnInit(): void { + this.initData(); + } + + initData() { + // this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => { + // if (res) { + // this.i = res; + // + // } + // }); + } + + approve() { + const modalRef = this.modalService.create({ + nzTitle: '同意', + nzWidth: 700, + nzContent: ParterClaimAuditListChannelApproveComponent, + nzComponentParams: { + i: this.i + }, + nzFooter: null + }); + } + reject() { + const modalRef = this.modalService.create({ + nzTitle: '拒绝', + nzWidth: 700, + nzContent: ParterClaimAuditListChannelRejectComponent, + nzComponentParams: { + i: this.i + }, + nzFooter: null + }); + } + goBack() { + window.history.go(-1); + } +} diff --git a/src/app/routes/partner/advice-feedback/components/list/list.component.html b/src/app/routes/partner/advice-feedback/components/list/list.component.html new file mode 100644 index 00000000..ca389dea --- /dev/null +++ b/src/app/routes/partner/advice-feedback/components/list/list.component.html @@ -0,0 +1,47 @@ + + + +
+ +
+ +
+ + + +
+ +
+
+ + + +
+
+
+
+ + + + + diff --git a/src/app/routes/partner/advice-feedback/components/list/list.component.ts b/src/app/routes/partner/advice-feedback/components/list/list.component.ts new file mode 100644 index 00000000..80260b01 --- /dev/null +++ b/src/app/routes/partner/advice-feedback/components/list/list.component.ts @@ -0,0 +1,228 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { AdviceFeedbackService } from '../../services/advice-feedback.service'; + +@Component({ + selector: 'app-parter-advice-feedback', + templateUrl: './list.component.html' +}) +export class ParterAdviceFeedbackListComponent implements OnInit { + schema: SFSchema = {}; + columns1!: STColumn[]; + columns2!: STColumn[]; + @ViewChild('st1', { static: false }) + st1!: STComponent; + ui!: SFUISchema; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + _$expand = false; + selectedIndex = 0; + + data=[{name1:1111}] + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: AdviceFeedbackService, + private modalService: NzModalService + ) {} + + /** + * 查询参数 + */ + get reqParams() { + return { ...this.sf?.value }; + } + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + ngOnInit() { + this.initSF(); + this.initST1(); + this.initST2(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + name: { + type: 'string', + title: '提交人' + }, + name1: { + type: 'string', + title: '企业管理员' + }, + name2: { + type: 'string', + title: '角色' + }, + name3: { + type: 'string', + title: '问题类型', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, + name4: { + type: 'string', + title: '状态', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, + } + }; + this.ui = { + '*': { + grid: { span: 8, gutter: 4 } + } + }; + } + + initST1() { + this.columns1 = [ + { + title: '提交人', + index: 'name1' + }, + { + title: '企业管理员', + index: 'name1' + }, + { + title: '手机号', + index: 'name1' + }, + { + title: '角色', + index: 'name1' + }, + { + title: '问题类型', + index: 'name1' + }, + { + title: '描述或建议', + index: 'name1' + }, + { + title: '状态', + index: 'name1' + }, + { + title: '提交时间', + index: 'name1' + }, + { + title: '操作', + className: 'text-center', + buttons: [ + { + text: '详情', + click: (_record, _modal, _instance) => this.partnerView(_record), + }, + { + text: '处理', + click: (_record, _modal, _instance) => this.partnerView(_record), + }, + ] + } + ]; + } + + initST2() { + this.columns2 = [ + { + title: '提交人', + index: 'name1' + }, + { + title: '客户名称', + index: 'name1' + }, + { + title: '认领备注', + index: 'name1' + }, + { + title: 'CRM状态', + index: 'name1' + }, + { + title: '平台审核状态', + index: 'name1' + }, + { + title: '提交时间', + index: 'name1' + }, + { + title: '操作', + className: 'text-center', + buttons: [ + { + text: '详情', + click: (_record, _modal, _instance) => this.channelView(_record), + }, + { + text: '审核', + click: (_record, _modal, _instance) => this.channelView(_record), + }, + + ] + } + ]; + } + + partnerView(record: STData) { + this.router.navigate(['/partner/advice-feedback/detail'], { queryParams: {} }); + } + + channelView(record: STData) { + this.router.navigate(['/partner/advice-feedback/detail'], { queryParams: {} }); + } + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + } + search() { + // this.st1?.load(1); + } + + tabChange(index:any){ + console.log(index) + switch (index) { + case 0: + this.initST1(); + break; + case 1: + this.initST2(); + break; + default: + break; + } + } + +} diff --git a/src/app/routes/partner/advice-feedback/services/advice-feedback.service.ts b/src/app/routes/partner/advice-feedback/services/advice-feedback.service.ts new file mode 100644 index 00000000..1e94e786 --- /dev/null +++ b/src/app/routes/partner/advice-feedback/services/advice-feedback.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class AdviceFeedbackService extends BaseService { + + 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 5e5d6e85..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 @@ -1,6 +1,6 @@ import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { SFAutoCompleteWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; import { _HttpClient } from '@delon/theme'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { map } from 'rxjs/operators'; @@ -38,18 +38,37 @@ export class ParterChannelSalesEditComponent implements OnInit { title: '', ui: { hidden: true } }, - name1: { - title: '业务员选择', + name: { + title: '渠道销售姓名', type: 'string', - enum: [ - { label: '王武', value: '1'}, - ], + maxLength: 12, ui: { - widget: 'select', - placeholder:'请选择' - } as SFSelectWidgetSchema, + placeholder:'请输入' + } }, - name2: { + phoneNumber: { + title: '手机号', + type: 'string', + maxLength: 11, + ui: { + placeholder:'请输入' + } + }, + employeeVO: { + title: '关联OA员工', + type: 'string', + ui: { + widget: 'autocomplete', + placeholder:'请选择', + asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe( + map((res: any) => { + console.log('111',res) + return []; + }) + ) + } as SFAutoCompleteWidgetSchema, + }, + isAuthorization: { type: 'string', title: '授权登录运营后台', enum: [ @@ -59,21 +78,32 @@ export class ParterChannelSalesEditComponent implements OnInit { ui: { widget: 'radio', } as SFRadioWidgetSchema, - default: 'A', + default: '0', }, - name: { + roleIds: { title: '', type: 'string', - enum: [ - { label: '管理员', value: '1'}, - ], ui: { widget: 'select', - placeholder:'授权角色', - visibleIf: { name2: (value: string) => value === '1' } - } as SFSelectWidgetSchema, + placeholder: '授权角色', + mode: 'multiple', + maxMultipleCount: 5, + asyncData: () => { + + return this.service.request(this.service.$api_getAppRoleList).pipe( + map((res: any) => { + return res + .filter((role: any) => role.roleCode !== 'Administrator') + .map((item: any) => { + return { label: item.roleName, value: item.id }; + }); + }) + ); + }, + visibleIf: { isAuthorization: (value: string) => value === '1' } + }, }, - name3: { + remark: { type: 'string', title: '备注', maxLength: 50, @@ -84,15 +114,16 @@ export class ParterChannelSalesEditComponent implements OnInit { } as SFTextareaWidgetSchema, }, }, - required: ['name1', 'name2'] + required: ['name', 'phoneNumber', 'employeeVO', 'roleIds', 'remark'] }; this.ui = { '*': { spanLabelFixed: 150, grid: { span: 24 } }, - $name:{ spanLabelFixed: 10, grid: { span: 12 }}, - $name2:{ grid: { span: 12 }}, + $isAuthorization:{ grid: { span: 12 }}, + $roleIds:{ spanLabelFixed: 10, grid: { span: 12 }}, + }; } @@ -103,12 +134,12 @@ export class ParterChannelSalesEditComponent implements OnInit { save() { this.sf.validator({ emitError: true }); if(!this.sf.valid) return; - // this.service.request('', { ...this.sf.value }).subscribe(res => { - // if (res) { - // this.modalRef.destroy(true); - // } else { - // this.service.msgSrv.error(res.msg); - // } - // }); + this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => { + if (res) { + this.modalRef.destroy(true); + } else { + this.service.msgSrv.error(res.msg); + } + }); } } diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.html b/src/app/routes/partner/channel-sales/components/list/list.component.html index fd0078d8..589c32e9 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.html +++ b/src/app/routes/partner/channel-sales/components/list/list.component.html @@ -15,7 +15,7 @@ value === '1' } - } as SFSelectWidgetSchema, }, - name3: { + sortId: { + title: '排序', + type: 'string', + }, + remark: { type: 'string', title: '备注', maxLength: 50, @@ -61,7 +57,7 @@ export class ParterLevelConfigEditComponent implements OnInit { } as SFTextareaWidgetSchema, }, }, - required: ['name1', 'name2'] + required: ['gradeName', 'sortId', 'remark'] }; this.ui = { '*': { @@ -77,12 +73,13 @@ export class ParterLevelConfigEditComponent implements OnInit { save() { this.sf.validator({ emitError: true }); if(!this.sf.valid) return; - // this.service.request('', { ...this.sf.value }).subscribe(res => { - // if (res) { - // this.modalRef.destroy(true); - // } else { - // this.service.msgSrv.error(res.msg); - // } - // }); + 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.html b/src/app/routes/partner/level-config/components/list/list.component.html index fd0078d8..e6f50f99 100644 --- a/src/app/routes/partner/level-config/components/list/list.component.html +++ b/src/app/routes/partner/level-config/components/list/list.component.html @@ -15,7 +15,7 @@ { + return item.stateLocked ? '禁用':'启用' + } }, { title: '操作', @@ -93,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 } ] } @@ -141,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 6e7cb18c..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 @@ -5,6 +5,16 @@ import { BaseService } from '@shared'; providedIn: 'root', }) export class ChannelSalesService extends BaseService { + // 查询合伙人等级配置表 + $api_getList = '/api/mdc/partnerGradeConfig/list/page'; + // 获取合伙人等级配置表 + $api_getPartnerGradeConfig = '/api/mdc/partnerGradeConfig/get'; + // 保存合伙人等级配置表 + $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/add-etp-partner/add-etp-partner.component.html b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html index 60e444bd..4df4ab9b 100644 --- a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html @@ -15,17 +15,17 @@
万元
- - -
营业执照法人信息
+ + +
营业执照法人信息
- +
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
上传后系统会自动识别并填写
- +
正面照(人像面)
@@ -34,7 +34,7 @@
- +
背面照(国徽面)
@@ -45,8 +45,8 @@ - -
企业管理员信息
+ +
企业管理员信息
@@ -69,19 +69,17 @@ -
所属城市
+
所属城市
- - -
渠道销售
+ + +
渠道销售
- -
- +
+
- \ No newline at end of file + diff --git a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts index 00540e31..8ad008d2 100644 --- a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts @@ -1,19 +1,19 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; -import { Router } from '@angular/router'; +import { Component, ViewChild } from '@angular/core'; import { apiConf } from '@conf/api.conf'; import { SFUploadWidgetSchema, SFComponent, SFSchema, SFUISchema, - SFCascaderWidgetSchema, - SFTextareaWidgetSchema, SFDateWidgetSchema, SFCheckboxWidgetSchema, SFTreeSelectWidgetSchema } from '@delon/form'; +import { NzTreeNode } from 'ng-zorro-antd/tree'; import { NzUploadFile } from 'ng-zorro-antd/upload'; import { of } from 'rxjs'; +import { map } from 'rxjs/operators'; + import { PartnerListService } from '../../services/partner-list.service'; const IMAGECONFIG = { @@ -43,7 +43,7 @@ const DATECONFIG = { templateUrl: './add-etp-partner.component.html', styleUrls: ['./add-etp-partner.component.less'] }) -export class AddEtpPartnerComponent implements OnInit { +export class AddEtpPartnerComponent { @ViewChild('sf', { static: false }) sf!: SFComponent; schema: SFSchema = this.initBasicInfoSF(); @@ -64,66 +64,54 @@ export class AddEtpPartnerComponent implements OnInit { } }; - constructor(private router: Router, public service: PartnerListService) {} - ngOnInit() {} + constructor(public service: PartnerListService) {} submitForm() { - if (!this.sf.valid ) { + if (!this.sf.valid) { this.sf.validator({ emitError: true }); this.service.msgSrv.warning('请修改填写错误信息'); return; } - const enterpriseRegistrationTime = new Date(this.sf.value.enterpriseRegistrationTime); - const operatingStartTime = new Date(this.sf.value.operatingStartTime); - if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) { - this.service.msgSrv.warning('营业期限不能小于成立日期'); + if (this.sf.value.cityCodesList?.length > 3) { + this.sf.validator({ emitError: true }); + this.service.msgSrv.warning('所属城市不能超过3个'); return; } - if (this.sf.value.operatingEndTime) { - const operatingEndTime = new Date(this.sf.value.operatingEndTime); - if (operatingStartTime.getTime() > operatingEndTime.getTime()) { - this.service.msgSrv.warning('营业期限不能小于期限开始日期'); - return; - } + // 校验企业营业期限 + const operatingStartTime = new Date(this.sf.value.operatingStartTime); + const operatingEndTime = new Date(this.sf.value.operatingEndTime); + if (operatingStartTime.getTime() > operatingEndTime.getTime()) { + this.service.msgSrv.warning('营业截止日期不能小于开始日期'); + return; } - const validStartTime = new Date(this.sf.value.legalPersonIdentityDTO.validStartTime); - if (this.sf.value.legalPersonIdentityDTO.validEndTime) { - const validEndTime = new Date(this.sf.value.legalPersonIdentityDTO.validEndTime); + // 校验法人证件有效期限 + if (this.sf.value.legalPersonIdentity.validEndTime) { + const validStartTime = new Date(this.sf.value.legalPersonIdentity.validStartTime); + const validEndTime = new Date(this.sf.value.legalPersonIdentity.validEndTime); if (validStartTime.getTime() > validEndTime.getTime()) { - this.service.msgSrv.warning('法人证件有效截止日期小于开始日期'); + this.service.msgSrv.warning('法人证件有效截止日期不能小于开始日期'); return; } } - const sfVlaue = this.sf.value; - const params = {}; - Object.assign( - params, - { ...this.sf.value }, - { - enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2], - oftenUsedServices: sfVlaue.oftenUsedServices, - registerAddress: sfVlaue.registerAddress, - registerPhone: sfVlaue.registerPhone, - creditPhoto: sfVlaue.creditPhoto, - creditPhotoWatermark: sfVlaue.creditPhotoWatermark, - promotersTelephone: sfVlaue.promotersTelephone, - networkTransporter: sfVlaue.networkTransporter, - adminUserInfo: { - certificateNumber: sfVlaue.certificateNumber, - certificatePhotoBack: sfVlaue.certificatePhotoBack, - certificatePhotoBackWatermark: sfVlaue.certificatePhotoBackWatermark, - certificatePhotoFront: sfVlaue.certificatePhotoFront, - certificatePhotoFrontWatermark: sfVlaue.certificatePhotoFrontWatermark, - name: sfVlaue.name - } + // 校验管理员证件有效期限 + if (this.sf.value.adminUserInfo.validEndTime) { + const validStartTime = new Date(this.sf.value.adminUserInfo.validStartTime); + const validEndTime = new Date(this.sf.value.adminUserInfo.validEndTime); + if (validStartTime.getTime() > validEndTime.getTime()) { + this.service.msgSrv.warning('管理员证件有效截止日期小于开始日期'); + return; } - ); - // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('企业新增成功'); - // this.goBack(); - // } - // }); + } + const params = {}; + Object.assign(params, { ...this.sf.value, source: 2 }); + // console.log(params); + + this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('新增企业合伙人成功'); + this.goBack(); + } + }); } /* @@ -146,23 +134,23 @@ export class AddEtpPartnerComponent implements OnInit { if (isFront === 'front') { // 正面 if (res.name) { - this.sf.setValue('/legalPersonIdentityDTO/name', res.name); + this.sf.setValue('/legalPersonIdentity/name', res.name); } if (res.number) { - this.sf.setValue('/legalPersonIdentityDTO/certificateType', 0); - this.sf.setValue('/legalPersonIdentityDTO/certificateNumber', res.number); + this.sf.setValue('/legalPersonIdentity/certificateType', 0); + this.sf.setValue('/legalPersonIdentity/certificateNumber', res.number); } } if (isFront === 'back') { // 背面 if (res.validFrom) { - this.sf.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom); + this.sf.setValue('/legalPersonIdentity/validStartTime', res.validFrom); } if (res.validTo) { - this.sf.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo); - this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', false); + this.sf.setValue('/legalPersonIdentity/validEndTime', res.validTo); + this.sf.setValue('/legalPersonIdentity/_isLoingDate', false); } else { - this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', true); + this.sf.setValue('/legalPersonIdentity/_isLoingDate', true); } } } @@ -171,10 +159,22 @@ export class AddEtpPartnerComponent implements OnInit { if (isFront === 'front') { // 正面 if (res.name) { - this.sf.setValue('/name', res.name); + this.sf.setValue('/adminUserInfo/name', res.name); } if (res.number) { - this.sf.setValue('/certificateNumber', res.number); + this.sf.setValue('/adminUserInfo/certificateNumber', res.number); + } + } + if (isFront === 'back') { + // 背面 + if (res.validFrom) { + this.sf.setValue('/adminUserInfo/validStartTime', res.validFrom); + } + if (res.validTo) { + this.sf.setValue('/adminUserInfo/validEndTime', res.validTo); + this.sf.setValue('/adminUserInfo/_isLoingDate', false); + } else { + this.sf.setValue('/adminUserInfo/_isLoingDate', true); } } } @@ -192,29 +192,15 @@ export class AddEtpPartnerComponent implements OnInit { if (res.name) { this.sf.setValue('/enterpriseName', res.name); } - if (res.type) { - this.sf.setValue('/enterpriseType', res.type); - } - if (res.addressRegionCodes) { - this.sf.setValue('/enterpriseAddressCode', res.addressRegionCodes); - } - if (res.address) { - this.sf.setValue('/enterpriseAddress', res.address); - } - if (res.foundDate) { - this.sf.setValue('/enterpriseRegistrationTime', res.foundDate); - } if (res.businessTermStartDate) { this.sf.setValue('/operatingStartTime', res.businessTermStartDate); } if (res.businessTermEndDate) { this.sf.setValue('/operatingEndTime', res.businessTermEndDate); + this.sf.setValue('/_isLoingDate', false); } else { this.sf.setValue('/_isLoingDate', true); } - if (res.businessScope) { - this.sf.setValue('/businessScope', res.businessScope); - } } }); } @@ -308,7 +294,7 @@ export class AddEtpPartnerComponent implements OnInit { }, // 法人信息 - legalPersonIdentityDTO: { + legalPersonIdentity: { type: 'object', properties: { _legalPersontitle: { title: '', type: 'string', ui: { widget: 'custom' } }, @@ -322,7 +308,7 @@ export class AddEtpPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); + this.sf.setValue('/legalPersonIdentity/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1); } } @@ -339,7 +325,7 @@ export class AddEtpPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.sf.setValue('/legalPersonIdentity/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1); } } @@ -404,7 +390,7 @@ export class AddEtpPartnerComponent implements OnInit { required: '请选择截止日期' }, change: i => { - this.sf?.setValue('/legalPersonIdentityDTO/_isLoingDate', false); + this.sf?.setValue('/legalPersonIdentity/_isLoingDate', false); } } as SFDateWidgetSchema }, @@ -416,7 +402,7 @@ export class AddEtpPartnerComponent implements OnInit { grid: { span: 6 }, class: 'input-back', widget: 'checkbox', - change: i => this.sf?.setValue('/legalPersonIdentityDTO/validEndTime', null) + change: i => this.sf?.setValue('/legalPersonIdentity/validEndTime', null) } as SFCheckboxWidgetSchema } }, @@ -430,23 +416,23 @@ export class AddEtpPartnerComponent implements OnInit { 'validStartTime' ] }, + _adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, + adminMobile: { + title: ' 企业管理员手机号', + type: 'string', + minLength: 1, + format: 'mobile', + maxLength: 11, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入企业管理员手机号', + errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' } + } + }, // 企业管理员信息 adminUserInfo: { type: 'object', properties: { - _adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, - adminMobile: { - title: ' 企业管理员手机号', - type: 'string', - minLength: 1, - format: 'mobile', - maxLength: 11, - ui: { - grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, - placeholder: '请输入企业管理员手机号', - errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' } - } - }, _adminCertificatePhotoTipsA: { title: '企业管理员证件照', type: 'string', @@ -465,7 +451,7 @@ export class AddEtpPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); + this.sf.setValue('/adminUserInfo/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0); } } @@ -487,7 +473,8 @@ export class AddEtpPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.sf.setValue('/adminUserInfo/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 0); } } } as SFUploadWidgetSchema @@ -512,7 +499,7 @@ export class AddEtpPartnerComponent implements OnInit { placeholder: '请输入企业管理员身份证号' } }, - operatingStartTime: { + validStartTime: { title: '身份证有效开始日期', type: 'string', ui: { @@ -523,7 +510,7 @@ export class AddEtpPartnerComponent implements OnInit { } } as SFDateWidgetSchema }, - operatingEndTime: { + validEndTime: { title: '身份证有效截止日期', type: 'string', ui: { @@ -545,34 +532,38 @@ export class AddEtpPartnerComponent implements OnInit { grid: { span: 6 }, class: 'input-back', widget: 'checkbox', - change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null) + change: i => this.sf?.setValue('/adminUserInfo/validEndTime', null) } as SFCheckboxWidgetSchema } }, - required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber','operatingStartTime'] + required: ['_adminCertificatePhotoTipsA', 'name', 'certificateNumber', 'operatingStartTime'] }, // 所属城市 _addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, - status3: { + cityCodesList: { type: 'string', title: '所属城市', - default: ['WAIT_BUYER_PAY', 'TRADE_FINISHED'], ui: { widget: 'tree-select', grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请选择城市(最多3个)', checkable: true, + class: 'city-tree-select', asyncData: () => - of([ - { title: '待支付', key: 'WAIT_BUYER_PAY' }, - { title: '已支付', key: 'TRADE_SUCCESS' }, - { title: '交易完成', key: 'TRADE_FINISHED' } - ]) - } as SFTreeSelectWidgetSchema, + this.getRegionDetailByCode('').pipe( + map((res: any) => + res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, disabled: true, isDisableCheckbox: true })) + ) + ), + expandChange: ({ node }: { node: NzTreeNode }) => + this.getRegionDetailByCode(node.key).pipe( + map((res: any) => res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, isLeaf: true }))) + ) + } as SFTreeSelectWidgetSchema }, // 渠道销售 _channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, - channel: { + invitationCode: { title: '渠道销售邀请码', type: 'string', minLength: 1, @@ -586,7 +577,16 @@ export class AddEtpPartnerComponent implements OnInit { } } }, - required: ['_licenseTips', 'licensePhotoWatermark', 'unifiedSocialCreditCode', 'enterpriseName', 'operatingStartTime', 'status3','channel'] + required: [ + '_licenseTips', + 'licensePhotoWatermark', + 'unifiedSocialCreditCode', + 'enterpriseName', + 'operatingStartTime', + 'cityCodesList', + 'adminMobile', + 'invitationCode' + ] }; } } diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html index e476071d..cb94b51b 100644 --- a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html @@ -1,44 +1,42 @@ - - - -
合伙人信息
-
- -
-
-
正面照(人像面)
-
示例
-
-
-
-
- -
-
-
背面照(国徽面)
-
示例
-
-
-
-
+ + + +
合伙人信息
+
+ +
+
+
正面照(人像面)
+
示例
+
+
+
+
+ +
+
+
背面照(国徽面)
+
示例
+
+
+
+
- - -
所属城市
-
+ + +
所属城市
+
- - -
渠道销售
-
-
+ + +
渠道销售
+
+
- -
- - -
-
\ No newline at end of file +
+ + +
+ diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts index ed2eac4f..eca02366 100644 --- a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts @@ -1,9 +1,20 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { apiConf } from '@conf/api.conf'; -import { SFUploadWidgetSchema, SFComponent, SFSchema, SFUISchema, SFDateWidgetSchema, SFCheckboxWidgetSchema, SFTreeSelectWidgetSchema } from '@delon/form'; +import { + SFUploadWidgetSchema, + SFComponent, + SFSchema, + SFUISchema, + SFDateWidgetSchema, + SFCheckboxWidgetSchema, + SFTreeSelectWidgetSchema +} from '@delon/form'; +import { NzTreeNode } from 'ng-zorro-antd/tree'; import { NzUploadFile } from 'ng-zorro-antd/upload'; import { of } from 'rxjs'; +import { map } from 'rxjs/operators'; + import { PartnerListService } from '../../services/partner-list.service'; const IMAGECONFIG = { @@ -33,7 +44,7 @@ const DATECONFIG = { templateUrl: './add-personal-partner.component.html', styleUrls: ['./add-personal-partner.component.less'] }) -export class AddPersonalPartnerComponent implements OnInit { +export class AddPersonalPartnerComponent { @ViewChild('sf', { static: false }) sf!: SFComponent; schema: SFSchema = this.initBasicInfoSF(); @@ -55,7 +66,6 @@ export class AddPersonalPartnerComponent implements OnInit { }; constructor(private router: Router, public service: PartnerListService) {} - ngOnInit() {} submitForm() { if (!this.sf.valid) { @@ -63,57 +73,28 @@ export class AddPersonalPartnerComponent implements OnInit { this.service.msgSrv.warning('请修改填写错误信息'); return; } - const enterpriseRegistrationTime = new Date(this.sf.value.enterpriseRegistrationTime); - const operatingStartTime = new Date(this.sf.value.operatingStartTime); - if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) { - this.service.msgSrv.warning('营业期限不能小于成立日期'); + if (this.sf.value.cityCodesList?.length > 3) { + this.sf.validator({ emitError: true }); + this.service.msgSrv.warning('所属城市不能超过3个'); return; } - if (this.sf.value.operatingEndTime) { - const operatingEndTime = new Date(this.sf.value.operatingEndTime); - if (operatingStartTime.getTime() > operatingEndTime.getTime()) { - this.service.msgSrv.warning('营业期限不能小于期限开始日期'); - return; - } - } - const validStartTime = new Date(this.sf.value.legalPersonIdentityDTO.validStartTime); - if (this.sf.value.legalPersonIdentityDTO.validEndTime) { - const validEndTime = new Date(this.sf.value.legalPersonIdentityDTO.validEndTime); + if (this.sf.value.validEndTime) { + const validStartTime = new Date(this.sf.value.validStartTime); + const validEndTime = new Date(this.sf.value.validEndTime); if (validStartTime.getTime() > validEndTime.getTime()) { - this.service.msgSrv.warning('法人证件有效截止日期小于开始日期'); + this.service.msgSrv.warning('身份证有效截止日期不能小于开始日期'); return; } } - const sfVlaue = this.sf.value; const params = {}; - Object.assign( - params, - { ...this.sf.value }, - { - enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2], - oftenUsedServices: sfVlaue.oftenUsedServices, - registerAddress: sfVlaue.registerAddress, - registerPhone: sfVlaue.registerPhone, - creditPhoto: sfVlaue.creditPhoto, - creditPhotoWatermark: sfVlaue.creditPhotoWatermark, - promotersTelephone: sfVlaue.promotersTelephone, - networkTransporter: sfVlaue.networkTransporter, - adminUserInfo: { - certificateNumber: sfVlaue.certificateNumber, - certificatePhotoBack: sfVlaue.certificatePhotoBack, - certificatePhotoBackWatermark: sfVlaue.certificatePhotoBackWatermark, - certificatePhotoFront: sfVlaue.certificatePhotoFront, - certificatePhotoFrontWatermark: sfVlaue.certificatePhotoFrontWatermark, - name: sfVlaue.name - } + Object.assign(params, { ...this.sf.value, source: 2 }); + + this.service.request(this.service.$api_save_personal_partner, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('新增个人合伙人成功'); + this.goBack(); } - ); - // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('企业新增成功'); - // this.goBack(); - // } - // }); + }); } /* @@ -124,48 +105,34 @@ export class AddPersonalPartnerComponent implements OnInit { } // 识别身份证 参数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.sf.setValue('/legalPersonIdentityDTO/name', res.name); - } - if (res.number) { - this.sf.setValue('/legalPersonIdentityDTO/certificateType', 0); - this.sf.setValue('/legalPersonIdentityDTO/certificateNumber', res.number); - } + // 法定代表人证件照 + if (isFront === 'front') { + // 正面 + if (res.name) { + this.sf.setValue('/adminUserInfo/name', res.name); } - if (isFront === 'back') { - // 背面 - if (res.validFrom) { - this.sf.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom); - } - if (res.validTo) { - this.sf.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo); - this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', false); - } else { - this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', true); - } + if (res.number) { + this.sf.setValue('/adminUserInfo/certificateType', 0); + this.sf.setValue('/adminUserInfo/certificateNumber', res.number); } } - // 企业管理员证件照 - if (type === 0) { - if (isFront === 'front') { - // 正面 - if (res.name) { - this.sf.setValue('/name', res.name); - } - if (res.number) { - this.sf.setValue('/certificateNumber', res.number); - } + if (isFront === 'back') { + // 背面 + if (res.validFrom) { + this.sf.setValue('/adminUserInfo/validStartTime', res.validFrom); + } + if (res.validTo) { + this.sf.setValue('/adminUserInfo/validEndTime', res.validTo); + this.sf.setValue('/adminUserInfo/_isLoingDate', false); + } else { + this.sf.setValue('/adminUserInfo/_isLoingDate', true); } } } @@ -179,23 +146,23 @@ export class AddPersonalPartnerComponent implements OnInit { private initBasicInfoSF(): SFSchema { return { properties: { + _adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, + mobile: { + title: ' 手机号', + type: 'string', + minLength: 1, + format: 'mobile', + maxLength: 11, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入手机号', + errors: { required: '请输入手机号', format: '手机号格式错误' } + } + }, // 合伙人信息 adminUserInfo: { type: 'object', properties: { - _adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, - adminMobile: { - title: ' 手机号', - type: 'string', - minLength: 1, - format: 'mobile', - maxLength: 11, - ui: { - grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, - placeholder: '请输入手机号', - errors: { required: '请输入手机号', format: '手机号格式错误' } - } - }, _adminCertificatePhotoTipsA: { title: '证件照', type: 'string', @@ -206,6 +173,7 @@ export class AddPersonalPartnerComponent implements OnInit { }, certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, + certificateType: { title: '', type: 'string', ui: { hidden: true }, default: 0 }, certificatePhotoFrontWatermark: { type: 'string', title: '', @@ -214,8 +182,8 @@ export class AddPersonalPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); - this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0); + this.sf.setValue('/adminUserInfo/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front'); } } } as SFUploadWidgetSchema @@ -236,7 +204,8 @@ export class AddPersonalPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.sf.setValue('/adminUserInfo/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back'); } } } as SFUploadWidgetSchema @@ -261,7 +230,7 @@ export class AddPersonalPartnerComponent implements OnInit { placeholder: '请输入身份证号' } }, - operatingStartTime: { + validStartTime: { title: '身份证有效开始日期', type: 'string', ui: { @@ -272,7 +241,7 @@ export class AddPersonalPartnerComponent implements OnInit { } } as SFDateWidgetSchema }, - operatingEndTime: { + validEndTime: { title: '身份证有效截止日期', type: 'string', ui: { @@ -294,34 +263,38 @@ export class AddPersonalPartnerComponent implements OnInit { grid: { span: 6 }, class: 'input-back', widget: 'checkbox', - change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null) + change: i => this.sf?.setValue('/adminUserInfo/validEndTime', null) } as SFCheckboxWidgetSchema } }, - required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'operatingStartTime'] + required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'validStartTime'] }, // 所属城市 _addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, - status3: { + cityCodesList: { type: 'string', title: '所属城市', - default: ['WAIT_BUYER_PAY', 'TRADE_FINISHED'], ui: { widget: 'tree-select', grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请选择城市(最多3个)', checkable: true, + class: 'city-tree-select', asyncData: () => - of([ - { title: '待支付', key: 'WAIT_BUYER_PAY' }, - { title: '已支付', key: 'TRADE_SUCCESS' }, - { title: '交易完成', key: 'TRADE_FINISHED' } - ]) + this.getRegionDetailByCode('').pipe( + map((res: any) => + res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, disabled: true, isDisableCheckbox: true })) + ) + ), + expandChange: ({ node }: { node: NzTreeNode }) => + this.getRegionDetailByCode(node.key).pipe( + map((res: any) => res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, isLeaf: true }))) + ) } as SFTreeSelectWidgetSchema }, // 渠道销售 _channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, - channel: { + invitationCode: { title: '渠道销售邀请码', type: 'string', minLength: 1, @@ -335,10 +308,7 @@ export class AddPersonalPartnerComponent implements OnInit { } } }, - required: [ - 'status3', - 'channel' - ] + required: ['cityCodesList', 'invitationCode'] }; } } 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 1e4aa340..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 @@ -1,95 +1,87 @@ - - + -
-
- -
-
- - - -
+
+
+
+
+ + + +
+
-
- - -
+
+ + +
- - + +
-
-
- - 深圳某某有限公司 - - - - - - - -
+
+
+ {{selectItem?.enterpriseName}} + + + + +
-

说明:修改模板后,当月开始返佣收益将会按新模板计算

+
+

说明:修改模板后,当月开始返佣收益将会按新模板计算

-
-
- - 深圳某某有限公司 - - - 张三/13999999999 - - - - - - - - - - - -

已选(0)

- - - - - 客户名称 - - - - - - {{ data.name }} - - - -
- - - - - - -
+
+
+ 深圳某某有限公司 + 张三/13999999999 + + + + + + + + + + +

已选(0)

+ + + + + 客户名称 + + + + + + {{ data.name }} + + + +
+ + + + + +
-

客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,成为渠道销售的直客

+
+

客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,成为渠道销售的直客

\ No newline at end of file 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 219a9d6b..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 @@ -1,9 +1,10 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; + import { PartnerListService } from '../../services/partner-list.service'; import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component'; @@ -12,7 +13,7 @@ import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit templateUrl: './partner-list.component.html', styleUrls: ['../../../../commom/less/box.less'] }) -export class PartnerListComponent implements OnInit { +export class PartnerListComponent { @ViewChild('st', { static: true }) st!: STComponent; @ViewChild('sf', { static: false }) @@ -23,14 +24,22 @@ export class PartnerListComponent implements OnInit { @ViewChild('editTemplate', { static: true }) editTemplate: any; + templateId: any; + templates: any[] = []; @ViewChild('editCannel', { static: true }) editCannel: any; customers: any[] = []; - constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {} + selectItem: any = {}; - ngOnInit(): void {} + 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) { @@ -47,16 +56,21 @@ export class PartnerListComponent implements OnInit { const modal = this.nzModalService.create({ nzTitle: '审核', nzContent: PartnerAuditModalComponent, - nzComponentParams: { info: item }, + nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName } }, nzFooter: null }); } editTemplateAction(item: any) { + this.selectItem = item; const modal = this.nzModalService.create({ nzTitle: '修改返佣模板', nzContent: this.editTemplate, nzOnOk: () => { + if (!this.templateId) { + this.service.msgSrv.warning('请选择返佣模板'); + return false; + } this.confirmEditTemplate(); return false; } @@ -67,24 +81,36 @@ export class PartnerListComponent implements OnInit { const modal = this.nzModalService.confirm({ nzTitle: '确定要修改返佣模板吗?', nzOnOk: () => { - this.nzModalService.closeAll(); - } - }); - } - - editCannelAction(item: any) { - const modal = this.nzModalService.create({ - nzTitle: '修改返佣模板', - nzWidth: 650, - nzContent: this.editCannel, - nzOnOk: () => { - this.confirmEditCannel(); + this.service + .request(this.service.$api_update_partner_template, { + id: this.selectItem.id, + templateId: this.templateId + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('修改成功'); + this.nzModalService.closeAll(); + } + }); return false; } }); } - confirmEditCannel() { + editCannelAction(item: any) { + this.selectItem = item; + const modal = this.nzModalService.create({ + nzTitle: '修改渠道销售', + nzWidth: 650, + nzContent: this.editCannel, + nzOnOk: () => { + this.confirmEditCannel(item); + return false; + } + }); + } + + confirmEditCannel(item: any) { const modal = this.nzModalService.confirm({ nzTitle: '确定提交吗?', nzOnOk: () => { @@ -93,6 +119,29 @@ export class PartnerListComponent implements OnInit { }); } + /** + * 重新发起crm + * @param item + */ + reSendCRM(item: any) { + const modal = this.nzModalService.confirm({ + nzTitle: '是否确定重新发起CRM?', + nzOnOk: () => { + this.service + .request(this.service.$api_resend_crm, { + id: item.id + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('发起成功'); + } else { + this.service.msgSrv.warning('发起失败'); + } + }); + } + }); + } + routeTo(route: string) { this.router.navigate([route]); } @@ -122,19 +171,19 @@ export class PartnerListComponent implements OnInit { hidden: true } }, - paycode: { + enterpriseName: { type: 'string', title: '合伙人名称' }, - paycode2: { + contactName: { type: 'string', title: '企业管理员' }, - paycod3e: { + contactMobile: { type: 'string', title: '手机号' }, - paycod31e: { + channelId: { type: 'string', title: '渠道销售', ui: { @@ -144,32 +193,37 @@ export class PartnerListComponent implements OnInit { } } }, - orderS2n: { + partnerType: { type: 'string', title: '类型', + enum: [ + { value: '', label: '全部' }, + { value: 1, label: '企业' }, + { value: 2, label: '个人' } + ], ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'refund:apply:status' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } - } + }, + default: '' }, - paytype: { + approvalStatus: { type: 'string', title: '认证审核状态', ui: { widget: 'dict-select', containsAllLabel: true, + params: { dictKey: 'pay:mode' }, placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } } }, - paymode: { + signStatus: { type: 'string', title: '签约状态', ui: { @@ -182,7 +236,7 @@ export class PartnerListComponent implements OnInit { } } }, - paymo1de: { + crmStatus: { type: 'string', title: 'CRM状态', ui: { @@ -198,41 +252,47 @@ export class PartnerListComponent implements OnInit { paymo11de: { type: 'string', title: '注册渠道', + enum: [ + { value: '', label: '全部' }, + { value: 1, label: '合伙人注册' }, + { value: 2, label: '平台添加' } + ], ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'pay:mode' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } - } + }, + default: '' }, - paymo11d1e: { + templateId: { type: 'string', title: '返佣模板', ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'pay:mode' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } } }, - paymo11d11e: { + lockedStatus: { type: 'string', title: '合伙人状态', + enum: [ + { value: '', label: '全部' }, + { value: 0, label: '启用' }, + { value: 1, label: '冻结' } + ], ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'pay:mode' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } - } + }, + default: '' }, createTime: { title: '注册时间', @@ -251,20 +311,63 @@ export class PartnerListComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '合伙人名称', index: 'payCode', width: 180 }, - { title: '付款编码', index: 'ltdName', width: 160 }, - { title: '邀请码', index: 'payDate', className: 'text-center', width: 130 }, - { title: '企业管理员', index: 'payDate', width: 150 }, - { title: '手机号', index: 'payDate', className: 'text-center', width: 150 }, - { title: '类型', index: 'payDate', className: 'text-center', width: 130 }, - { title: '注册渠道', index: 'payDate', type: 'date', width: 130 }, - { title: '注册时间', index: 'payDate', className: 'text-center', width: 170 }, - { title: '渠道销售', index: 'payDate', width: 170 }, - { title: '返佣模板', index: 'payDate', width: 150 }, - { title: '认证审核状态', index: 'payDate', width: 150 }, - { title: '签约状态', index: 'payDate', width: 150 }, - { title: 'CRM状态', index: 'payDate', width: 150 }, - { title: '合伙人状态', index: 'payDate', className: 'text-center', width: 140 }, + { title: '合伙人名称', index: 'enterpriseName', width: 180, format: item => `${item.enterpriseName || item.contactName}` }, + { title: '付款编码', index: 'payCode', width: 160 }, + { title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 }, + { title: '企业管理员', index: 'contactName', width: 150 }, + { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, + { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, + { title: '注册渠道', index: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, width: 130 }, + { title: '注册时间', index: 'createTime', className: 'text-center', width: 170 }, + { title: '渠道销售', index: 'channelId', width: 170 }, + { title: '返佣模板', index: 'templateName', width: 150 }, + { + title: '认证审核状态', + index: 'approvalStatus', + width: 150, + type: 'badge', + badge: { + 0: { text: '草稿', color: 'default' }, + 10: { text: '待审核', color: 'processing' }, + 20: { text: '审核通过', color: 'success' }, + 30: { text: '驳回', color: 'error' } + } + }, + { + title: '签约状态', + index: 'signStatus', + width: 150, + type: 'badge', + badge: { + 10: { text: '待合伙人签约', color: 'default' }, + 15: { text: '签约中', color: 'processing' }, + 20: { text: '平台签约完成', color: 'success' }, + 30: { text: '驳回', color: 'error' } + } + }, + { + title: 'CRM状态', + index: 'crmStatus', + width: 150, + type: 'badge', + badge: { + 0: { text: '未发起', color: 'default' }, + 10: { text: '待审核', color: 'processing' }, + 20: { text: '审核通过', color: 'success' }, + 30: { text: '驳回', color: 'error' } + } + }, + { + title: '合伙人状态', + index: 'lockedStatus', + className: 'text-center', + width: 140, + type: 'badge', + badge: { + 0: { text: '启用', color: 'success' }, + 1: { text: '冻结', color: 'error' } + } + }, { title: '操作', fixed: 'right', @@ -272,8 +375,18 @@ export class PartnerListComponent implements OnInit { buttons: [ { type: 'divider' }, { - text: '详情
', - click: item => this.router.navigate(['/partner/partner-list/detail/' + item.id]) + text: '详情', + click: item => { + if (item.partnerType === 1) { + this.router.navigate([`/partner/partner-list/etp-detail/${item.id}`]); + } else { + this.router.navigate([`/partner/partner-list/personal-detail/${item.id}`]); + } + } + }, + { + text: '审核
', + click: item => this.auditPartner(item) }, { text: '修改返佣模板', @@ -283,13 +396,9 @@ export class PartnerListComponent implements OnInit { text: '修改渠道销售', click: item => this.editCannelAction(item) }, - { - text: '审核
', - click: item => this.auditPartner(item) - }, { text: '重发CRM流程', - click: item => this.router.navigate(['/partner/account-management/list/detail/' + item.id]) + click: item => this.reSendCRM(item) } ] } diff --git a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html index 8ea7c9f8..fc8043d6 100644 --- a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html +++ b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html @@ -3,5 +3,5 @@
\ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts index ab86de05..8c2586a8 100644 --- a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts +++ b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts @@ -34,7 +34,7 @@ export class PartnerAuditModalComponent implements OnInit { title: '合伙人名称', type: 'string', ui: { widget: 'text' }, - default: user.name + default: user.enterpriseName }, status: { title: '审核结果', @@ -50,7 +50,7 @@ export class PartnerAuditModalComponent implements OnInit { }, default: true }, - a: { + channelId: { title: '渠道销售', type: 'string', enum: [ @@ -70,7 +70,7 @@ export class PartnerAuditModalComponent implements OnInit { }, default: '' }, - b: { + approvalOpinion: { title: '备注', type: 'string', maxLength: 100, @@ -88,43 +88,41 @@ export class PartnerAuditModalComponent implements OnInit { } } }, - required: ['a', 'b'] + required: ['channelId', 'approvalOpinion'] }; } sure() { - this.nzModalService.confirm({ - nzTitle: `确定以“${this.info.userName}/${this.info.mobile}”的名义重新发起CRM《付款对象合同管理》吗?`, - nzOnOk: () => { - this.close(); - } - }); - // if (!this.sf.value.roleId || this.sf.value.roleId.length === 0) { - // this.service.msgSrv.error('员工角色不能为空!'); - // return; - // } - // if (this.i.userId === 0) { - // const params: any = { - // ...this.sf.value - // }; - // this.service.request(this.service.$api_add_staff, params).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('保存成功!'); - // this.modal.close(true); - // } - // }); - // } else { - // const params: any = { - // appUserId: this.i.appUserId, - // ...this.sf.value - // }; - // this.service.request(this.service.$api_edit_staff, params).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('编辑成功!'); - // this.modal.close(true); - // } - // }); - // } + if (this.info.isPass || this.sf.value.status) { + this.nzModalService.confirm({ + nzTitle: `确定以“${this.info.channelIdLabel}”的名义重新发起CRM《付款对象合同管理》吗?`, + nzOnOk: () => { + this.audit(); + } + }); + } else { + this.audit(); + } + } + + audit() { + const params: any = { + ...this.sf.value, + id: this.info.id, + auditStatusEnum: this.info.isPass || this.sf.value.status ? '20' : '30' + }; + this.service + .request(this.service.$api_audit_partner, { + auditStatusEnum: params.auditStatusEnum, + id: params.id, + approvalOpinion: params.approvalOpinion + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('审核成功!'); + this.close(); + } + }); } close() { 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 f242099c..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 @@ -1,328 +1,330 @@ - - - - - - -