From 09a22bab297112a697e1c40e14fcdc388f0b0e45 Mon Sep 17 00:00:00 2001 From: heqinghang Date: Thu, 10 Mar 2022 11:22:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=AE=A4=E9=A2=86?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=9D=99=E6=80=81=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list/list.component.html | 1 - .../channel-approve.component.html | 9 + .../channel-approve.component.ts | 98 ++++++++ .../channel-detail.component.html | 62 +++++ .../channel-detail.component.less | 27 ++ .../channel-detail.component.ts | 82 +++++++ .../channel-reject.component.html | 9 + .../channel-reject.component.ts | 98 ++++++++ .../components/list/list.component.html | 66 +++++ .../components/list/list.component.ts | 230 ++++++++++++++++++ .../partner-approve.component.html | 9 + .../partner-approve.component.ts | 98 ++++++++ .../partner-detail.component.html | 79 ++++++ .../partner-detail.component.less | 26 ++ .../partner-detail.component.ts | 82 +++++++ .../partner-reject.component.html | 9 + .../partner-reject.component.ts | 98 ++++++++ .../services/claim-audit.service.ts | 12 + .../components/list/list.component.html | 1 - .../routes/partner/partner-routing.module.ts | 17 +- src/app/routes/partner/partner.module.ts | 19 +- src/assets/mocks/menu-data.json | 4 + 22 files changed, 1131 insertions(+), 5 deletions(-) create mode 100644 src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.html create mode 100644 src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.ts create mode 100644 src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.html create mode 100644 src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.less create mode 100644 src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.ts create mode 100644 src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.html create mode 100644 src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.ts create mode 100644 src/app/routes/partner/claim-audit/components/list/list.component.html create mode 100644 src/app/routes/partner/claim-audit/components/list/list.component.ts create mode 100644 src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.html create mode 100644 src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.ts create mode 100644 src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.html create mode 100644 src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.less create mode 100644 src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.ts create mode 100644 src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.html create mode 100644 src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.ts create mode 100644 src/app/routes/partner/claim-audit/services/claim-audit.service.ts 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 6cc8f619..fd0078d8 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,6 @@ + +
+ 结算起算日:指给合伙人结算佣金的起算时间,更换合伙人,该日期是当前合伙人的结算起算日,原合伙人的结算结束时间则为此日期的前一天 +
+
+ + +
diff --git a/src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.ts b/src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.ts new file mode 100644 index 00000000..8856e337 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.ts @@ -0,0 +1,98 @@ +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 { _HttpClient } from '@delon/theme'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { map } from 'rxjs/operators'; +import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { ClaimAuditService } from '../../services/claim-audit.service'; + + +@Component({ + selector: 'app-parter-claim-audit-channel-approve', + templateUrl: './channel-approve.component.html' +}) +export class ParterClaimAuditListChannelApproveComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema!: SFSchema; + ui!: SFUISchema; + i: any; + type: any; + + constructor( + public http: _HttpClient, + private cdr: ChangeDetectorRef, + private route: ActivatedRoute, + private modalService: NzModalService, + public service: ClaimAuditService, + private modalRef: NzModalRef + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name1: { + title: '合伙人(认领人)', + type: 'string', + ui: { + widget: 'text', + } , + }, + name2: { + title: '认领客户名称', + type: 'string', + ui: { + widget: 'text', + } , + }, + data: { + title: '结算起算日期', + type: 'string', + format: 'date', + }, + name3: { + type: 'string', + title: '备注', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请不要超过50个字' + } as SFTextareaWidgetSchema, + }, + }, + required: ['name3'] + }; + this.ui = { + '*': { + spanLabelFixed: 120, + grid: { span: 24 } + }, + }; + } + + close() { + this.modalRef.destroy(); + } + 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); + // } + // }); + } + + +} diff --git a/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.html b/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.html new file mode 100644 index 00000000..08f52a77 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.html @@ -0,0 +1,62 @@ + + + + + + +
+
+ +
+
+
深圳市XXXXXXX有限公司
+
91440300357887492H
+ + + + + + +
+
+
待审核
+
+ + +
+
+
+
+
+ +
+
+ + 现渠道销售(提交人) + + + + + + +
+
+ +
+
+ + 原渠道销售 + + + + +
+
+
+ + + + + \ No newline at end of file diff --git a/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.less b/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.less new file mode 100644 index 00000000..e62642d0 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.less @@ -0,0 +1,27 @@ +: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: end; + padding-top: 16px; + } + } +} \ No newline at end of file diff --git a/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.ts b/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.ts new file mode 100644 index 00000000..c3eca870 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.ts @@ -0,0 +1,82 @@ + +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn } from '@delon/abc/st'; +import { _HttpClient } from '@delon/theme'; +import { NzCardComponent } from 'ng-zorro-antd/card'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import format from 'date-fns/format'; + +import { ClaimAuditService } from '../../services/claim-audit.service'; +import { ParterClaimAuditListChannelApproveComponent } from '../channel-approve/channel-approve.component'; +import { ParterClaimAuditListChannelRejectComponent } from '../channel-reject/channel-reject.component'; + +@Component({ + selector: 'app-parter-claim-audit-channel-detail', + templateUrl: './channel-detail.component.html', + styleUrls: ['./channel-detail.component.less'] +}) +export class ParterClaimAuditListChannelDetailComponent implements OnInit { + id = this.route.snapshot.queryParams.id; + i: any; + imges: any; + isVisible = false; + columns: STColumn[] = [ + { title: '操作时间', index: 'id', width: 120 }, + { title: '操作人', type: 'img', width: 120, }, + { title: '操作人手机号', index: 'email', width: 120 }, + { title: '操作页面', index: 'phone' }, + { title: '操作内容', index: 'registered' } + ]; + + data=[{id:11111}] + + constructor( + private route: ActivatedRoute, + private msgSrv: NzMessageService, + private service: ClaimAuditService, + 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/claim-audit/components/channel-reject/channel-reject.component.html b/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.html new file mode 100644 index 00000000..dc134ee2 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.html @@ -0,0 +1,9 @@ + + +
+ 结算起算日:指给合伙人结算佣金的起算时间,更换合伙人,该日期是当前合伙人的结算起算日,原合伙人的结算结束时间则为此日期的前一天 +
+
+ + +
diff --git a/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.ts b/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.ts new file mode 100644 index 00000000..27566f45 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.ts @@ -0,0 +1,98 @@ +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 { _HttpClient } from '@delon/theme'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { map } from 'rxjs/operators'; +import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { ClaimAuditService } from '../../services/claim-audit.service'; + + +@Component({ + selector: 'app-parter-claim-audit-channel-reject', + templateUrl: './channel-reject.component.html' +}) +export class ParterClaimAuditListChannelRejectComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema!: SFSchema; + ui!: SFUISchema; + i: any; + type: any; + + constructor( + public http: _HttpClient, + private cdr: ChangeDetectorRef, + private route: ActivatedRoute, + private modalService: NzModalService, + public service: ClaimAuditService, + private modalRef: NzModalRef + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name1: { + title: '合伙人(认领人)', + type: 'string', + ui: { + widget: 'text', + } , + }, + name2: { + title: '认领客户名称', + type: 'string', + ui: { + widget: 'text', + } , + }, + data: { + title: '结算起算日期', + type: 'string', + format: 'date', + }, + name3: { + type: 'string', + title: '备注', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请不要超过50个字' + } as SFTextareaWidgetSchema, + }, + }, + required: ['name3'] + }; + this.ui = { + '*': { + spanLabelFixed: 120, + grid: { span: 24 } + }, + }; + } + + close() { + this.modalRef.destroy(); + } + 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); + // } + // }); + } + + +} diff --git a/src/app/routes/partner/claim-audit/components/list/list.component.html b/src/app/routes/partner/claim-audit/components/list/list.component.html new file mode 100644 index 00000000..8e321e48 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/list/list.component.html @@ -0,0 +1,66 @@ + + + +
+ +
+ +
+ + + +
+ +
+
+ + + +
+
+
+
+ + + + + + + + + + + + + + + diff --git a/src/app/routes/partner/claim-audit/components/list/list.component.ts b/src/app/routes/partner/claim-audit/components/list/list.component.ts new file mode 100644 index 00000000..cf817568 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/list/list.component.ts @@ -0,0 +1,230 @@ +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 { ClaimAuditService } from '../../services/claim-audit.service'; + +@Component({ + selector: 'app-parter-claim-audit-list', + templateUrl: './list.component.html' +}) +export class ParterClaimAuditListComponent implements OnInit { + schema: SFSchema = {}; + columns1!: STColumn[]; + columns2!: STColumn[]; + @ViewChild('st1', { static: false }) + st1!: STComponent; + @ViewChild('st2', { static: false }) + st2!: 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: ClaimAuditService, + 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: 'CRM状态', + 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: 'CRM状态', + index: 'name1' + }, + { + title: '平台审核状态', + index: 'name1' + }, + { + title: 'CRM状态', + 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/claim-audit/partner-detail'], { queryParams: {} }); + } + + channelView(record: STData) { + this.router.navigate(['/partner/claim-audit/channel-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/claim-audit/components/partner-approve/partner-approve.component.html b/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.html new file mode 100644 index 00000000..dc134ee2 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.html @@ -0,0 +1,9 @@ + + +
+ 结算起算日:指给合伙人结算佣金的起算时间,更换合伙人,该日期是当前合伙人的结算起算日,原合伙人的结算结束时间则为此日期的前一天 +
+
+ + +
diff --git a/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.ts b/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.ts new file mode 100644 index 00000000..86f5e72d --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.ts @@ -0,0 +1,98 @@ +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 { _HttpClient } from '@delon/theme'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { map } from 'rxjs/operators'; +import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { ClaimAuditService } from '../../services/claim-audit.service'; + + +@Component({ + selector: 'app-parter-claim-audit-partner-approve', + templateUrl: './partner-approve.component.html' +}) +export class ParterClaimAuditListPartnerApproveComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema!: SFSchema; + ui!: SFUISchema; + i: any; + type: any; + + constructor( + public http: _HttpClient, + private cdr: ChangeDetectorRef, + private route: ActivatedRoute, + private modalService: NzModalService, + public service: ClaimAuditService, + private modalRef: NzModalRef + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name1: { + title: '合伙人(认领人)', + type: 'string', + ui: { + widget: 'text', + } , + }, + name2: { + title: '认领客户名称', + type: 'string', + ui: { + widget: 'text', + } , + }, + data: { + title: '结算起算日期', + type: 'string', + format: 'date', + }, + name3: { + type: 'string', + title: '备注', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请不要超过50个字' + } as SFTextareaWidgetSchema, + }, + }, + required: ['name3'] + }; + this.ui = { + '*': { + spanLabelFixed: 120, + grid: { span: 24 } + }, + }; + } + + close() { + this.modalRef.destroy(); + } + 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); + // } + // }); + } + + +} diff --git a/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.html b/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.html new file mode 100644 index 00000000..c6370656 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.html @@ -0,0 +1,79 @@ + + + + + + +
+
+ +
+
+
深圳市XXXXXXX有限公司
+
91440300357887492H
+ + + + + + +
+
+
待审核
+
+ + +
+
+
+
+
+ +
+
+ + 现合伙人(提交人) + + + + + + + +
+
+ + 现渠道销售 + + + + +
+
+ +
+
+ + 原合伙人 + + + + + +
+
+ + 原渠道销售 + + + + +
+
+
+ + + + diff --git a/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.less b/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.less new file mode 100644 index 00000000..06d8b068 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.less @@ -0,0 +1,26 @@ +: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: end; + padding-top: 16px; + } + } +} diff --git a/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.ts b/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.ts new file mode 100644 index 00000000..41f5558f --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.ts @@ -0,0 +1,82 @@ + +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn } from '@delon/abc/st'; +import { _HttpClient } from '@delon/theme'; +import { NzCardComponent } from 'ng-zorro-antd/card'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import format from 'date-fns/format'; +import { ClaimAuditService } from '../../services/claim-audit.service'; +import { ParterClaimAuditListPartnerRejectComponent } from '../partner-reject/partner-reject.component'; +import { ParterClaimAuditListPartnerApproveComponent } from '../partner-approve/partner-approve.component'; + +@Component({ + selector: 'app-parter-claim-audit-partner-detail', + templateUrl: './partner-detail.component.html', + styleUrls: ['./partner-detail.component.less'] +}) +export class ParterClaimAuditListPartnerDetailComponent implements OnInit { + id = this.route.snapshot.queryParams.id; + i: any; + imges: any; + isVisible = false; + columns: STColumn[] = [ + { title: '操作时间', index: 'id', width: 120 }, + { title: '操作人', type: 'img', width: 120, }, + { title: '操作人手机号', index: 'email', width: 120 }, + { title: '操作页面', index: 'phone' }, + { title: '操作内容', index: 'registered' } + ]; + + data=[{id:11111}] + + constructor( + private route: ActivatedRoute, + private msgSrv: NzMessageService, + private service: ClaimAuditService, + 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: ParterClaimAuditListPartnerApproveComponent, + nzComponentParams: { + i: this.i + }, + nzFooter: null + }); + } + reject() { + const modalRef = this.modalService.create({ + nzTitle: '拒绝', + nzWidth: 700, + nzContent: ParterClaimAuditListPartnerRejectComponent, + nzComponentParams: { + i: this.i + }, + nzFooter: null + }); + } + goBack() { + window.history.go(-1); + } + + +} diff --git a/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.html b/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.html new file mode 100644 index 00000000..dc134ee2 --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.html @@ -0,0 +1,9 @@ + + +
+ 结算起算日:指给合伙人结算佣金的起算时间,更换合伙人,该日期是当前合伙人的结算起算日,原合伙人的结算结束时间则为此日期的前一天 +
+
+ + +
diff --git a/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.ts b/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.ts new file mode 100644 index 00000000..09abe28f --- /dev/null +++ b/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.ts @@ -0,0 +1,98 @@ +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 { _HttpClient } from '@delon/theme'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { map } from 'rxjs/operators'; +import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { ClaimAuditService } from '../../services/claim-audit.service'; + + +@Component({ + selector: 'app-parter-claim-audit-partner-reject', + templateUrl: './partner-reject.component.html' +}) +export class ParterClaimAuditListPartnerRejectComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema!: SFSchema; + ui!: SFUISchema; + i: any; + type: any; + + constructor( + public http: _HttpClient, + private cdr: ChangeDetectorRef, + private route: ActivatedRoute, + private modalService: NzModalService, + public service: ClaimAuditService, + private modalRef: NzModalRef + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name1: { + title: '合伙人(认领人)', + type: 'string', + ui: { + widget: 'text', + } , + }, + name2: { + title: '认领客户名称', + type: 'string', + ui: { + widget: 'text', + } , + }, + data: { + title: '结算起算日期', + type: 'string', + format: 'date', + }, + name3: { + type: 'string', + title: '备注', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请不要超过50个字' + } as SFTextareaWidgetSchema, + }, + }, + required: ['name3'] + }; + this.ui = { + '*': { + spanLabelFixed: 120, + grid: { span: 24 } + }, + }; + } + + close() { + this.modalRef.destroy(); + } + 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); + // } + // }); + } + + +} diff --git a/src/app/routes/partner/claim-audit/services/claim-audit.service.ts b/src/app/routes/partner/claim-audit/services/claim-audit.service.ts new file mode 100644 index 00000000..a102b596 --- /dev/null +++ b/src/app/routes/partner/claim-audit/services/claim-audit.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class ClaimAuditService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} 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 6cc8f619..fd0078d8 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,6 @@ Date: Thu, 10 Mar 2022 13:22:30 +0800 Subject: [PATCH 2/2] 666 --- src/assets/mocks/menu-data.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 51557bbf..473d4c2f 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -562,7 +562,18 @@ }, { "text": "客户认领审核", - "link": "/partner/claim-audit/list" + "link": "/partner/claim-audit/list", + "children": [{ + "text": "合伙人客户认领详情", + "link": "/partner/claim-audit/partner-detail", + "hide": true + }, + { + "text": "渠道销售客户认领详情", + "link": "/partner/claim-audit/channel-detail", + "hide": true + } + ] } ] }