diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts index aef18902..5113c45c 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts @@ -27,9 +27,9 @@ export class WithdrawalsRecordComponent implements OnInit { refundStatus: any = ''; msg = ''; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} + constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) { } - ngOnInit(): void {} + ngOnInit(): void { } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { @@ -42,6 +42,7 @@ export class WithdrawalsRecordComponent implements OnInit { refundStatus: this.refundStatus || null }); } + delete requestOptions?.body?.expand; return requestOptions; }; @@ -80,6 +81,10 @@ export class WithdrawalsRecordComponent implements OnInit { label: '拒绝', type: 'default', onClick: () => { + if (!this.msg || this.msg.trim().length === 0) { + this.service.msgSrv.warning('请填写拒绝原因 '); + return false; + } this.service .request(this.service.$api_disagree_refund, { refundApplicationId: params, @@ -92,6 +97,7 @@ export class WithdrawalsRecordComponent implements OnInit { this.st.load(1); } }); + return false; } }, { 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 7f949749..8669a08f 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,4 +1,10 @@ - + + + + + diff --git a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.ts b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.ts index 9dd83dc6..860ea7c4 100644 --- a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.ts +++ b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.ts @@ -150,4 +150,8 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit { this.st.load(1); } export() { } + + goBack() { + window.history.go(-1); + } } diff --git a/src/app/routes/partner/account-management/components/list/list.component.html b/src/app/routes/partner/account-management/components/list/list.component.html index e982c4e3..d071efc2 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.html +++ b/src/app/routes/partner/account-management/components/list/list.component.html @@ -5,17 +5,15 @@ --> - - + + - + + + + + diff --git a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts index 4efdf3a2..a3dc1911 100644 --- a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts @@ -1,7 +1,7 @@ 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 { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; import { AccountManagemantService } from '../../services/account-managemant.service'; @@ -102,7 +102,7 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit { title: '操作', className: 'text-center', width: '20%', buttons: [ { text: '订单明细', - click: (_record) => this.router.navigate(['/']) + click: (_record) => window.open(location.origin + `#/partner/rebate/record?ltdId=${_record?.ltdId}`) } ] }, @@ -129,7 +129,7 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit { * @param record 当前行 */ viewBookedRecord(record: any) { - + window.open(location.origin + `#/partner/recorded/record?ltdId=${record?.ltdId}&userId=${record?.userId}&userIdLabel=${record?.banktypeLabel}`); } /** @@ -142,5 +142,8 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit { handleCancel() { this.showBillDetail = false; } + goBack() { + window.history.go(-1); + } } 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 d7c20673..449d3e1b 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 @@ -8,7 +8,7 @@
- + + +
+
+ +
+ + +
+
+ diff --git a/src/app/routes/partner/article-management/components/edit/edit.component.ts b/src/app/routes/partner/article-management/components/edit/edit.component.ts new file mode 100644 index 00000000..f65dea8f --- /dev/null +++ b/src/app/routes/partner/article-management/components/edit/edit.component.ts @@ -0,0 +1,189 @@ +import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { apiConf } from '@conf/api.conf'; +import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { Observable, Observer } from 'rxjs'; +import { map } from 'rxjs/operators'; +import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { ChannelSalesService } from '../../services/channel-sales.service'; + +@Component({ + selector: 'app-parter-article-management-edit', + templateUrl: './edit.component.html' +}) +export class ParterArticleManagementEditComponent 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, + public service: ChannelSalesService, + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name1: { + type: 'string', + title: '文章标题', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请输入50字符' + } as SFTextareaWidgetSchema, + }, + name2: { + type: 'string', + title: '文章简介', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请输入50字符' + } as SFTextareaWidgetSchema, + }, + name3: { + type: 'string', + title: '封面图', + ui: { + action: apiConf.fileUpload, + accept: 'image/png,image/jpeg,image/jpg', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFilePath', + urlReName: 'data.fullFilePath', + widget: 'upload', + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 280px * 180 px)', + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 2; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过2M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + } + } as SFUploadWidgetSchema + }, + name: { + title: '分类', + type: 'string', + enum: [ + { label: '管理员', value: '1'}, + ], + ui: { + widget: 'select', + } as SFSelectWidgetSchema, + }, + name4: { + type: 'number', + title: '排序', + minimum: 0, + maximum: 99, + ui: { + widgetWidth: 300 , + placeholder:'请输入0~99,数字越大,排序越靠前' + } + }, + name5: { + type: 'string', + title: '跳转路径', + enum: [ + { label: '图文', value: '1'}, + { label: '视频', value: '2'}, + ], + ui: { + widget: 'radio', + } as SFRadioWidgetSchema, + default: '1', + }, + content: { + type: 'string', + title: '正文', + ui: { + widget: 'tinymce', + loadingTip: 'loading...', + config: { + height: 450 + }, + visibleIf: { name5: (value: string) => value === '1' } + }, + }, + name6: { + type: 'string', + title: '视频', + ui: { + action: apiConf.fileUpload, + accept: 'video/mp4,video/avi,video/mkv,video/vob', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFilePath', + urlReName: 'data.fullFilePath', + widget: 'upload', + descriptionI18n: '支持MP4、AVI、DAT、MKV、FLV、VOB格式,文件小于20M。', + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 20; + if (!isLt2M) { + this.service.msgSrv.warning('视频大小超过20M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + }, + visibleIf: { name5: (value: string) => value === '2' } + } as SFUploadWidgetSchema + }, + }, + required: ['name1', 'name2'] + }; + this.ui = { + '*': { + spanLabelFixed: 150, + grid: { span: 20 } + }, + + }; + } + + close() { + + } + 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/article-management/components/list/list.component.html b/src/app/routes/partner/article-management/components/list/list.component.html new file mode 100644 index 00000000..721c85c0 --- /dev/null +++ b/src/app/routes/partner/article-management/components/list/list.component.html @@ -0,0 +1,49 @@ + + + +
+ +
+ +
+ + + +
+ +
+
+ + + +
+
+
+
+ + + + + + + diff --git a/src/app/routes/partner/article-management/components/list/list.component.ts b/src/app/routes/partner/article-management/components/list/list.component.ts new file mode 100644 index 00000000..89835f98 --- /dev/null +++ b/src/app/routes/partner/article-management/components/list/list.component.ts @@ -0,0 +1,200 @@ +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 { ChannelSalesService } from '../../services/channel-sales.service'; +import { ParterArticleManagementEditComponent } from '../edit/edit.component'; + +@Component({ + selector: 'app-parter-article-management-list', + templateUrl: './list.component.html' +}) +export class ParterArticleManagementListComponent implements OnInit { + schema: SFSchema = {}; + columns!: STColumn[]; + ui!: SFUISchema; + @ViewChild('st', { static: false }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + spuStatus = '1'; + _$expand = false; + + data=[{name1:1111}] + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: ChannelSalesService, + private modalService: NzModalService + ) {} + + /** + * 查询参数 + */ + get reqParams() { + return { ...this.sf?.value }; + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } + + search() { + // this.st1?.load(1); + } + + /** + * 查询字段个数 + */ + 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.initST(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + name: { + type: 'string', + title: '文章标题' + }, + phone: { + type: 'string', + title: '分类' + }, + phone1: { + type: 'string', + title: '状态' + }, + phone2: { + type: 'string', + title: '推荐到首页', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, + + } + }; + this.ui = { + '*': { + grid: { span: 8, gutter: 4 } + } + }; + } + + initST() { + this.columns = [ + { + 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.edit(_record), + }, + { + text: '禁用', + click: (_record, _modal, _instance) => this.stop(_record), + }, + { + text: '启用', + click: (_record, _modal, _instance) => this.start(_record.id), + }, + { + text: '推荐到首页', + click: (_record, _modal, _instance) => this.recommend(_record.id), + } + ] + } + ]; + } + // 新增 + add() { + this.router.navigate(['/partner/knowledge/article-management-add'], { queryParams: {} }); + } + + // 编辑 + edit(record: STData) { + this.router.navigate(['/partner/knowledge/article-management-edit'], { queryParams: {} }); + } + + + stop(record: STData) { + this.modalService.confirm({ + nzTitle: '禁用确认', + nzContent: `确定禁用此文章吗?
`, + // nzOnOk: () => + // this.service.request('', '').subscribe(res => { + // if (res) { + // this.service.msgSrv.success('冻结成功!'); + // this.st.reload(); + // } + // }) + }); + } + start(record: STData) { + this.modalService.confirm({ + nzTitle: '启用确认', + nzContent: `确定启用此文章吗?
`, + // nzOnOk: () => + // this.service.request('', '').subscribe(res => { + // if (res) { + // this.service.msgSrv.success('冻结成功!'); + // this.st.reload(); + // } + // }) + }); + } + recommend(record: STData) { + + } + +} diff --git a/src/app/routes/partner/article-management/services/channel-sales.service.ts b/src/app/routes/partner/article-management/services/channel-sales.service.ts new file mode 100644 index 00000000..6e7cb18c --- /dev/null +++ b/src/app/routes/partner/article-management/services/channel-sales.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class ChannelSalesService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} diff --git a/src/app/routes/partner/knowledge/classification/components/edit/edit.component.html b/src/app/routes/partner/knowledge/classification/components/edit/edit.component.html new file mode 100644 index 00000000..855ada53 --- /dev/null +++ b/src/app/routes/partner/knowledge/classification/components/edit/edit.component.html @@ -0,0 +1,8 @@ + + + + diff --git a/src/app/routes/partner/knowledge/classification/components/edit/edit.component.spec.ts b/src/app/routes/partner/knowledge/classification/components/edit/edit.component.spec.ts new file mode 100644 index 00000000..e31fd9c9 --- /dev/null +++ b/src/app/routes/partner/knowledge/classification/components/edit/edit.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerEditComponent } from './edit.component'; + +describe('PartnerEditComponent', () => { + let component: PartnerEditComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PartnerEditComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerEditComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/knowledge/classification/components/edit/edit.component.ts b/src/app/routes/partner/knowledge/classification/components/edit/edit.component.ts new file mode 100644 index 00000000..817ac254 --- /dev/null +++ b/src/app/routes/partner/knowledge/classification/components/edit/edit.component.ts @@ -0,0 +1,111 @@ +import { Component, OnInit } from '@angular/core'; +import { apiConf } from '@conf/api.conf'; +import { SFSchema, SFUISchema } from '@delon/form'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { Observable, Observer } from 'rxjs'; +import { ClassificationService } from '../../services/classification.service'; + +@Component({ + selector: 'app-partner-edit', + templateUrl: './edit.component.html', +}) +export class PartnerEditComponent implements OnInit { + record: any = {}; + i: any; + schema!: SFSchema; + ui!: SFUISchema; + status = 'add'; + + constructor( + private modal: NzModalRef, + public service: ClassificationService + ) { } + + ngOnInit(): void { + if (this.i) { + this.i.icon = [ + { + uid: -1, + name: 'xxx.png', + status: 'done', + url: this.i.url, + response: { + resource_id: 1, + }, + }, + ] + } + this.initSF(); + + } + initSF() { + this.schema = { + properties: { + abnormalCause: { + title: '分类名称', + type: 'string', + maxLength: 5, + ui: { + placeholder: '请输入', + }, + }, + icon: { + type: 'string', + title: '图标', + ui: { + action: apiConf.fileUpload, + fileType: 'image/png,image/jpeg,image/jpg', + limit: 1, + resReName: 'url', + urlReName: 'url', + widget: 'upload', + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 88px * 88px)', + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 2; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过2M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + } + } + }, + abnormalCause2: { + title: '排序', + type: 'number', + maximum: 99, + minimum: 0, + ui: { + placeholder: '请输入', + widgetWidth: 350 + } + }, + }, + required: ['abnormalCause', 'icon', 'abnormalCause2'] + + } + this.ui = { '*': { spanLabelFixed: 90, grid: { span: 20, gutter: 4 } }, }; + + } + + save(value: any): void { + this.service.request(`/user/${this.record.id}`, value).subscribe(res => { + if (res) { + this.service.msgSrv.success('保存成功'); + this.modal.close(true); + } + + }); + } + + close(): void { + this.modal.destroy(); + } +} diff --git a/src/app/routes/partner/knowledge/classification/components/list/list.component.html b/src/app/routes/partner/knowledge/classification/components/list/list.component.html new file mode 100644 index 00000000..2947e9a8 --- /dev/null +++ b/src/app/routes/partner/knowledge/classification/components/list/list.component.html @@ -0,0 +1,28 @@ + + + +
+
+ +
+
+ + +
+
+
+ + +
+ +
+ + + + + +
diff --git a/src/app/routes/partner/knowledge/classification/components/list/list.component.spec.ts b/src/app/routes/partner/knowledge/classification/components/list/list.component.spec.ts new file mode 100644 index 00000000..f63ab2ec --- /dev/null +++ b/src/app/routes/partner/knowledge/classification/components/list/list.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerListComponent } from './list.component'; + +describe('PartnerListComponent', () => { + let component: PartnerListComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PartnerListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/knowledge/classification/components/list/list.component.ts b/src/app/routes/partner/knowledge/classification/components/list/list.component.ts new file mode 100644 index 00000000..db88bed4 --- /dev/null +++ b/src/app/routes/partner/knowledge/classification/components/list/list.component.ts @@ -0,0 +1,173 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from 'src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component'; +import { AccountManagemantService } from 'src/app/routes/partner/account-management/services/account-managemant.service'; +import { PartnerEditComponent } from '../edit/edit.component'; + +@Component({ + selector: 'app-partner-list', + templateUrl: './list.component.html', +}) +export class PartnerKnowledgeClassificationListComponent implements OnInit { + url = `/user`; + schema!: SFSchema; + ui!: SFUISchema; + @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; + columns: STColumn[] = []; + + constructor(public service: AccountManagemantService, public modal: NzModalService) { } + /** + * 查询参数 + */ + get reqParams() { + const params = { ...this.sf?.value }; + return params + } + + ngOnInit(): void { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + abnormalCause: { + title: '分类ID', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '分类名称', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause2: { + title: '状态', + type: 'string', + enum: [ + { label: '全部', value: '' }, + { label: '正常', value: '1' }, + { label: '禁用', value: '2' } + ], + default: '', + }, + } + } + this.ui = { '*': { spanLabelFixed: 90, grid: { span: 8, gutter: 4 } }, }; + } + /** + * 初始化数据列表 + */ + initST() { + this.columns = [ + { title: '分类ID', index: 'carNo', className: 'text-center', width: 150 }, + { title: '分类名称', render: 'carModelLabel', className: 'text-center', width: 200 }, + { title: '图标', render: 'icon', className: 'text-center', width: 200 }, + { title: '文章数', render: 'approvalStatus2', className: 'text-center', width: 120 }, + { title: '排序', render: 'approvalStatus3', className: 'text-center', width: 120 }, + { title: '状态', index: 'approvalStatus4', className: 'text-center', width: 120 }, + { title: '最后修改时间', index: 'approvalStatus4', className: 'text-center', width: 180 }, + { + title: '操作', + width: 150, + buttons: [ + { + text: '修改', + click: (_record) => this.edit(_record) + }, + { + text: '启用', + click: (_record) => this.operate(_record, 1) + }, + { + text: '禁用', + click: (_record) => this.operate(_record, 2) + } + ] + } + ]; + } + + resetSF() { + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } + + /** + *新增 + * @param _record 当前行信息 + */ + add() { + const modalRef = this.modal.create({ + nzTitle: '新增分类', + nzContent: PartnerEditComponent, + nzWidth: 600, + nzComponentParams: { + i: null + }, + nzFooter: null + }); + modalRef.afterClose.subscribe((res: any) => { + if (res) { + this.st.load(1); + } + }); + } + + /** + *编辑 + * @param _record 当前行信息 + */ + edit(record: any) { + const modalRef = this.modal.create({ + nzTitle: '修改分类', + nzContent: PartnerEditComponent, + nzWidth: 600, + nzComponentParams: { + i: record + }, + nzFooter: null + }); + modalRef.afterClose.subscribe((res: any) => { + if (res) { + this.st.load(1); + } + }); + } + + /** + *禁用或者启动 + * @param _record 当前行信息 + */ + operate(record: any, type = 1) { + this.modal.confirm({ + nzTitle: `确定${type === 1 ? '启用' : '禁用'}此分类吗?`, + nzOnOk: () => + this.service.request(this.service.$api_edit_one, { id: record.id }).subscribe((res) => { + if (res) { + this.st.load(1); + this.service.msgSrv.success(`${type === 1 ? '启用' : '禁用'}成功!`); + } + }), + }); + } + + /** + * + */ + export() { + + } + +} diff --git a/src/app/routes/partner/knowledge/classification/services/classification.service.ts b/src/app/routes/partner/knowledge/classification/services/classification.service.ts new file mode 100644 index 00000000..034cdb74 --- /dev/null +++ b/src/app/routes/partner/knowledge/classification/services/classification.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root' +}) +export class ClassificationService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index c4eca158..2c25d6d6 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -39,6 +39,9 @@ import { PartnerDetailComponent } from './partner-list/components/partner-detail import { PartnerListComponent } from './partner-list/components/index/partner-list.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; import { ScrollImgComponentsListComponent } from './ad/components/list/list.component'; +import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component'; +import { ParterArticleManagementListComponent } from './article-management/components/list/list.component'; +import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component'; const routes: Routes = [ { @@ -81,11 +84,24 @@ const routes: Routes = [ { path: 'account-management', children: [ - { path: 'list', component: PartnerAccountManagementListComponent }, - { path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent }, - { path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent }, - { path: 'withdraw-record', component: PartnerAccountManagementWithdrawalsRecordComponent }, - { path: 'withdraw-record/:id', component: PartnerAccountManagementWithdralDetailComponent } + { + path: 'am', + children: [ + { path: '', redirectTo: 'list' }, + { path: 'list', component: PartnerAccountManagementListComponent }, + { path: 'detail/:id', component: PartnerAccountManagementAccountDetailComponent }, + { path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent }, + ] + }, + { + path: 'withdraw-record', + children: [ + { path: '', redirectTo: 'list' }, + { path: 'list', component: PartnerAccountManagementWithdrawalsRecordComponent }, + { path: 'detail/:id', component: PartnerAccountManagementWithdralDetailComponent } + ] + } + ] }, { @@ -95,22 +111,6 @@ const routes: Routes = [ { path: 'detail/:id', component: PartnerDetailComponent }, { path: 'add-etp-partner', component: AddEtpPartnerComponent }, { path: 'add-personal-partner', component: AddPersonalPartnerComponent }, - { - path: 'am', - children: [ - { path: '', redirectTo: 'list' }, - { path: '', component: PartnerAccountManagementListComponent }, - { path: 'detail/:id', component: PartnerAccountManagementAccountDetailComponent }, - { path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent }, - ] - }, - { - path: 'withdraw-record', - children: [ - { path: '', component: PartnerAccountManagementWithdrawalsRecordComponent }, - { path: 'detail/:id', component: PartnerAccountManagementWithdralDetailComponent } - ] - }, ] }, { @@ -130,12 +130,12 @@ const routes: Routes = [ ] }, { - path: 'scroll-img', + path: 'knowledge', children: [ - { path: '', component: ScrollImgComponentsListComponent }, - { path: 'list', component: ScrollImgComponentsListComponent }, - { path: 'channel-detail', component: ParterClaimAuditListChannelDetailComponent }, - { path: 'partner-detail', component: ParterClaimAuditListPartnerDetailComponent } + { path: 'classification', component: PartnerKnowledgeClassificationListComponent }, + { path: 'article-management-list', component: ParterArticleManagementListComponent}, + { path: 'article-management-add', component: ParterArticleManagementEditComponent}, + { path: 'article-management-edit', component: ParterArticleManagementEditComponent}, ] }, ]; diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index e44dd6dd..aee0c691 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -10,7 +10,7 @@ */ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { rebateTableModule, SharedModule } from '@shared'; +import { SharedModule } from '@shared'; import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component'; import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; @@ -52,6 +52,10 @@ import { PartnerRecordedRecordComponent } from './recorded/components/record/rec import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; import { ScrollImgComponentsListComponent } from './ad/components/list/list.component'; import { ScrollimgComponentsAddComponent } from './ad/components/add/add.component'; +import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component'; +import { ParterArticleManagementListComponent } from './article-management/components/list/list.component'; +import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component'; +import { PartnerEditComponent } from './knowledge/classification/components/edit/edit.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -93,12 +97,16 @@ const COMPONENTS: any[] = [ AddEtpPartnerComponent, AddPersonalPartnerComponent, ScrollImgComponentsListComponent, - ScrollimgComponentsAddComponent + ScrollimgComponentsAddComponent, + ParterArticleManagementEditComponent, + ParterArticleManagementListComponent, + PartnerKnowledgeClassificationListComponent, + PartnerEditComponent ]; @NgModule({ declarations: [...COMPONENTS], - imports: [CommonModule, PartnerRoutingModule, SharedModule,rebateTableModule], + imports: [CommonModule, PartnerRoutingModule, SharedModule], providers: [PartnerListService] }) export class PartnerModule { } diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.html b/src/app/routes/partner/recorded/components/detail/detail.component.html index ed894907..f3d36121 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.html +++ b/src/app/routes/partner/recorded/components/detail/detail.component.html @@ -8,57 +8,89 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\withdrawals-record\\withdrawals-detail\\withdrawals-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + + +
+

待审批

+
+ +
+
+
- +
+ + {{formData?.ltdName}} + {{formData?.ltdName}} + + {{formData?.refundApplyCode}} + {{formData?.bankType==='1'?'平安银行':'浦发银行'}} - - {{formData?.refundApplyCode}} - - - {{formData?.bankAccountName}} - - - {{formData?.createTime}} - {{formData?.virtualAccount}} - + + {{formData?.createTime}} + + + {{formData?.amount | currency}} + + + {{formData?.amount | currency}} + + + {{formData?.amount | currency}} + + {{formData?.refundStatusLabel}} - - {{formData?.amount | currency}} + + + + + {{formData?.bankCardNumber}} + + + {{formData?.bankSerialNumber}} - - {{formData?.bankCardNumber}} - - - {{formData?.refundStatus==='3'?'下载回单':'暂无回单'}} -
- +
+ + +
+
+ + + +
+
+
diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.ts b/src/app/routes/partner/recorded/components/detail/detail.component.ts index a4c4b5ba..e1dc2eba 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.ts +++ b/src/app/routes/partner/recorded/components/detail/detail.component.ts @@ -1,5 +1,6 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; +import { NzModalService } from 'ng-zorro-antd/modal'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; @@ -9,13 +10,15 @@ import { FreightAccountService } from 'src/app/routes/financial-management/servi styleUrls: ['./detail.component.less'] }) export class PartnerRecordedDetailComponent implements OnInit { + @ViewChild('auditModal', { static: false }) auditModal!: any; formData: any = {}; - timeLineData: any = []; + msg = ''; + id = ''; - constructor(public service: FreightAccountService, private route: ActivatedRoute) { - const id = route.snapshot.params.id; - this.loadRefundDetail(id); + constructor(public service: FreightAccountService, private route: ActivatedRoute, private nzModalService: NzModalService) { + this.id = route.snapshot.params.id; + this.loadRefundDetail(this.id); } ngOnInit(): void { } @@ -68,19 +71,61 @@ export class PartnerRecordedDetailComponent implements OnInit { }); } - downBack() { - if (this.formData?.refundStatus !== '3') { - return; - } - this.service.getReceiptUrl(this.formData.receiptUrl, { - bankType: this.formData.bankType, - rmYll: this.formData.userId, - snglFlgCd: this.formData.coreSerNo, - bussType: '06', - ltdId: this.formData.ltdId + auditAction(item?: any, type: string = '1') { + this.msg = ''; + let params: Array = []; + params = [item.id]; + const modal = this.nzModalService.create({ + nzTitle: type === '1' ? '审核' : '复审', + nzContent: this.auditModal, + nzFooter: [ + { + label: '拒绝', + type: 'default', + onClick: () => { + if (!this.msg || this.msg.trim().length === 0) { + this.service.msgSrv.warning('请填写拒绝原因 '); + return false; + } + this.service + .request(this.service.$api_disagree_refund, { + refundApplicationId: params, + msg: this.msg + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('审核拒绝成功'); + modal.destroy(true); + } + }); + return false; + } + }, + { + label: '通过', + type: 'primary', + onClick: () => { + this.service + .request(this.service.$api_agree_refund, { + refundApplicationId: params, + msg: this.msg + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('审核通过成功'); + modal.destroy(true); + } + }); + } + } + ] + }); + modal.afterClose.subscribe((res: any) => { + if (res) { + this.loadRefundDetail(this.id); + } }); } - goBack() { history.go(-1); } diff --git a/src/app/routes/partner/recorded/components/record/record.component.html b/src/app/routes/partner/recorded/components/record/record.component.html index 1fd920b1..60aa8d08 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.html +++ b/src/app/routes/partner/recorded/components/record/record.component.html @@ -8,7 +8,7 @@
- +