From 0eb12cdf75713de6e0e9e09a0265f9b7de9401d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 24 Feb 2022 11:23:05 +0800 Subject: [PATCH 01/70] =?UTF-8?q?=E9=80=80=E6=AC=BE=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/core/startup/startup.service.ts | 4 +- .../components/index/index.component.html | 20 +- .../components/index/index.component.ts | 40 +- .../partner-statistics.component.html | 24 + .../partner-statistics.component.spec.ts | 24 + .../partner-statistics.component.ts | 79 ++ .../sale-statistics.component.html | 21 + .../sale-statistics.component.spec.ts | 24 + .../sale-statistics.component.ts | 62 + .../routes/partner/partner-routing.module.ts | 6 +- src/app/routes/partner/partner.module.ts | 6 +- .../shared/services/business/user.service.ts | 20 +- src/assets/mocks/menu-data.json | 1042 ++++++++--------- 13 files changed, 799 insertions(+), 573 deletions(-) create mode 100644 src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html create mode 100644 src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.spec.ts create mode 100644 src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts create mode 100644 src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.html create mode 100644 src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.spec.ts create mode 100644 src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.ts diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index b6c0d1dc..5c3efc42 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(); } diff --git a/src/app/routes/partner/business-statistics/components/index/index.component.html b/src/app/routes/partner/business-statistics/components/index/index.component.html index 482ccb06..fa15bb93 100644 --- a/src/app/routes/partner/business-statistics/components/index/index.component.html +++ b/src/app/routes/partner/business-statistics/components/index/index.component.html @@ -1,9 +1,11 @@ - - - - - - - - - + + + + + + + + + + + diff --git a/src/app/routes/partner/business-statistics/components/index/index.component.ts b/src/app/routes/partner/business-statistics/components/index/index.component.ts index 1b409e25..96ffd6d5 100644 --- a/src/app/routes/partner/business-statistics/components/index/index.component.ts +++ b/src/app/routes/partner/business-statistics/components/index/index.component.ts @@ -9,37 +9,31 @@ import { ModalHelper, _HttpClient } from '@delon/theme'; }) export class PartnerBusinessStatisticsIndexComponent implements OnInit { url = `/user`; - searchSchema: SFSchema = { - properties: { - no: { - type: 'string', - title: '编号' - } - } - }; + schema!: SFSchema; @ViewChild('st') private readonly st!: STComponent; - columns: STColumn[] = [ - { title: '编号', index: 'no' }, - { title: '调用次数', type: 'number', index: 'callNo' }, - { title: '头像', type: 'img', width: '50px', index: 'avatar' }, - { title: '时间', type: 'date', index: 'updatedAt' }, + columns: STColumn[] = []; + selectedIndex = 0; + tabs = [ { - title: '', - buttons: [ - // { text: '查看', click: (item: any) => `/form/${item.id}` }, - // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, - ] + name: '合伙人统计', + value: '0' + }, + { + name: '渠道销售统计', + value: '1' } - ]; + ] - constructor(private http: _HttpClient, private modal: ModalHelper) { } + constructor() { } + change(e: any) { + console.log(this.selectedIndex); + } ngOnInit(): void { } + + add(): void { - // this.modal - // .createStatic(FormEditComponent, { i: { id: 0 } }) - // .subscribe(() => this.st.reload()); } } diff --git a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html new file mode 100644 index 00000000..8dd7ef1a --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html @@ -0,0 +1,24 @@ + + + + + + + + {{item.approvalStatus}} + + +
{{item.approvalStatus1 | currency:' '}}
+
+ +
{{item.approvalStatus1 | currency:' '}}
+
+ + +
{{item.approvalStatus1 | currency:' '}}
+
+ +
{{item.approvalStatus1 | currency:' '}}
+
+
+
diff --git a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.spec.ts b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.spec.ts new file mode 100644 index 00000000..5396aaf2 --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerPartnerStatisticsComponent } from './partner-statistics.component'; + +describe('PartnerPartnerStatisticsComponent', () => { + let component: PartnerPartnerStatisticsComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PartnerPartnerStatisticsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerPartnerStatisticsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts new file mode 100644 index 00000000..ad508c7d --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts @@ -0,0 +1,79 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; + +@Component({ + selector: 'app-partner-partner-statistics', + templateUrl: './partner-statistics.component.html', +}) +export class PartnerPartnerStatisticsComponent implements OnInit { + url = `/user`; + schema!: SFSchema; + ui!: SFUISchema; + @ViewChild('st') private readonly st!: STComponent; + columns: STColumn[] = []; + + constructor(private http: _HttpClient, private modal: ModalHelper) { } + + ngOnInit(): void { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + abnormalCause: { + title: '合伙人名称', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '类型', + type: 'string', + default: '', + enum: [ + { + label: '全部', + value: '' + }, + { + label: '个人', + value: '1' + }, + { + label: '企业', + value: '2' + } + ], + ui: { + widget: 'select' + }, + }, + } + } + this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } }; + } + /** + * 初始化数据列表 + */ + initST() { + this.columns = [ + { title: '合伙人名称', index: 'carNo', className: 'text-center' }, + { title: '类型', render: 'carModelLabel', className: 'text-center' }, + { title: '注册时间', index: 'carNo', className: 'text-center' }, + { title: '本月新增客户', render: 'approvalStatus', className: 'text-center', sort: true }, + { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, + { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-center', sort: true }, + { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, + { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, + { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-center', sort: true }, + + ]; + } + + +} diff --git a/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.html b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.html new file mode 100644 index 00000000..7868ebf7 --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.html @@ -0,0 +1,21 @@ + + + + + + + + {{item.approvalStatus}} + + +
{{item.approvalStatus1 | currency:' '}}
+
+ +
{{item.approvalStatus1 | currency:' '}}
+
+ + +
{{item.approvalStatus1 | currency:' '}}
+
+
+
diff --git a/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.spec.ts b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.spec.ts new file mode 100644 index 00000000..bfa13cd2 --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerSaleStatisticsComponent } from './sale-statistics.component'; + +describe('PartnerSaleStatisticsComponent', () => { + let component: PartnerSaleStatisticsComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PartnerSaleStatisticsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerSaleStatisticsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.ts b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.ts new file mode 100644 index 00000000..247777db --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.ts @@ -0,0 +1,62 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; + +@Component({ + selector: 'app-partner-sale-statistics', + templateUrl: './sale-statistics.component.html', +}) +export class PartnerSaleStatisticsComponent implements OnInit { + url = `/user`; + schema!: SFSchema; + @ViewChild('st') private readonly st!: STComponent; + columns: STColumn[] = []; + ui!: SFUISchema; + + constructor(private http: _HttpClient, private modal: ModalHelper) { } + + ngOnInit(): void { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + abnormalCause: { + title: '渠道销售姓名', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '手机号', + type: 'string', + ui: { + placeholder: '请输入' + }, + }, + } + }; + this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 8 } } }; + } + /** + * 初始化数据列表 + */ + initST() { + this.columns = [ + { title: '姓名', index: 'carNo', className: 'text-center' }, + { title: '手机号', render: 'carModelLabel', className: 'text-center' }, + { title: '添加时间', index: 'carNo', className: 'text-center' }, + { title: '本月新增客户', render: 'approvalStatus', className: 'text-center', sort: true }, + { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, + { title: '本月新增合伙人', render: 'approvalStatus1', className: 'text-center', sort: true }, + { title: '合伙人总数', render: 'approvalStatus1', className: 'text-center', sort: true }, + { title: '本月已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, + { title: '累计已结算金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, + ]; + } + +} diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 9b76c2c4..5de586a3 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -1,9 +1,13 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; +import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component'; +import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; const routes: Routes = [ - { path: 'index', component: PartnerBusinessStatisticsIndexComponent }]; + { path: 'business-statistics/index', component: PartnerBusinessStatisticsIndexComponent }, + { path: 'partner-statistics', component: PartnerPartnerStatisticsComponent }, + { path: 'sale-statistics', component: PartnerSaleStatisticsComponent }]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index c1198f85..ec2a3f5c 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -3,9 +3,13 @@ import { CommonModule } from '@angular/common'; import { SharedModule } from '@shared'; import { PartnerRoutingModule } from './partner-routing.module'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; +import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component'; +import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; const COMPONENTS: any[] = [ - PartnerBusinessStatisticsIndexComponent]; + PartnerBusinessStatisticsIndexComponent, + PartnerPartnerStatisticsComponent, + PartnerSaleStatisticsComponent]; @NgModule({ declarations: [...COMPONENTS], imports: [CommonModule, PartnerRoutingModule, SharedModule] diff --git a/src/app/shared/services/business/user.service.ts b/src/app/shared/services/business/user.service.ts index caf9afe4..3fd685f9 100644 --- a/src/app/shared/services/business/user.service.ts +++ b/src/app/shared/services/business/user.service.ts @@ -152,22 +152,22 @@ export class EAUserService extends BaseService { * 加载用户菜单 */ async loadUserMenus() { - return this.asyncRequest(this.$api_get_user_menus, { - appId: this.envSrv.getEnvironment().appId - }).then(res => { - this.cacheSrv.set(cacheConf.menu, res); - this.menuService.add(res); - }); - // this.request('assets/mocks/menu-data.json', {}, 'GET').subscribe((res: any) => { - // this.cacheSrv.set(cacheConf.menu, res.menu); - // this.menuService.add(res.menu); + // return this.asyncRequest(this.$api_get_user_menus, { + // appId: this.envSrv.getEnvironment().appId + // }).then(res => { + // this.cacheSrv.set(cacheConf.menu, res); + // this.menuService.add(res); // }); + this.request('assets/mocks/menu-data.json', {}, 'GET').subscribe((res: any) => { + this.cacheSrv.set(cacheConf.menu, res.menu); + this.menuService.add(res.menu); + }); } /** * 加载用户角色 */ - loadUserRoles() {} + loadUserRoles() { } /** * 登出 diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 3ef4f890..28ac960c 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -1,531 +1,519 @@ { "success": true, "data": { - "menu": [ - { - "text": "主导航", - "hideInBreadcrumb": true, - "children": [ - { - "text": "用户中心", - "icon": "iconfont icon-yonghu-copy", - "group": true, - "children": [ - { - "text": "货主管理", - "children": [ - { - "text": "企业列表", - "link": "/usercenter/freight/list" - }, - { - "text": "道运证", - "hide": true, - "link": "/usercenter/freight/list/view/:id" - }, - { - "text": "货主详情", - "hide": true, - "link": "/usercenter/freight/list/detail/:id" - }, - { - "text": "企业认证", - "hide": true, - "link": "/usercenter/freight/new" - }, - { - "text": "企业审核列表", - "link": "/usercenter/freight/enterprise" - }, - { - "text": "企业审核列表详情", - "hide": true, - "link": "/usercenter/freight/enterprise/view/:id" - }, - { - "text": "货主员工列表", - "link": "/usercenter/freight/user" - }, - { - "text": "货主员工详情", - "hide": true, - "link": "/usercenter/freight/user/view/:id" - } - ] - }, - { - "text": "司机管理", - "link": "/demo/zorro", - "children": [ - { - "text": "司机列表", - "link": "/usercenter/driver" - }, - { - "text": "司机详情", - "hide": true, - "link": "/usercenter/driver/detail/:id" - }, - { - "text": "车队长列表", - "link": "/usercenter/driver/captain" - }, - { - "text": "司机配置", - "link": "/usercenter/driver/config" - } - ] - } - ] - }, - { - "text": "运力管理", - "icon": "iconfont icon-yunli-copy", - "group": true, - "children": [ - { - "text": "车辆列表", - "link": "/vehicle/list" - }, - { - "hide": true, - "text": "车辆列表详情", - "link": "/vehicle/list/detail/:id" - }, - { - "text": "车辆审核列表", - "link": "/vehicle/audit" - }, - { - "hide": true, - "text": "车辆审核列表详情", - "link": "/vehicle/audit/detail/:id" - } - ] - }, - { - "text": "货源管理", - "icon": "iconfont icon-huoyuan-copy", - "group": true, - "children": [ - { - "text": "货源管理", - "link": "/supply-management/index", - "reuse": true - }, - { - "text": "货源详情", - "link": "/supply-management/bulk-detail", - "hide": true - }, - { - "text": "修改货源", - "link": "/supply-management/vehicle-amend/:id", - "hide": true - }, - { - "text": "整车代发货源", - "link": "/supply-management/vehicle-release", - "hide": true - }, - { - "text": "大宗代发货源", - "link": "/supply-management/bulk-release", - "hide": true - }, - { - "text": "货源详情", - "link": "/supply-management/vehicle-detail/:id", - "hide": true - } - ] - }, - { - "text": "订单管理", - "icon": "iconfont icon-dingdan-copy", - "group": true, - "children": [ - { - "text": "整车订单", - "link": "/order-management/vehicle" - }, - { - "text": "大宗订单", - "link": "/order-management/bulk" - }, - { - "text": "风险单管理", - "link": "/order-management/risk" - }, - { - "text": "单据审核", - "link": "/order-management/receipts-audit" - }, - { - "text": "投诉管理", - "link": "/order-management/complaint" - }, - { - "text": "合规抽查", - "link": "/order-management/compliance-audit" - }, - { - "text": "整车订单详情", - "link": "/order-management/vehicle-detail/:id", - "hide": true - }, - { - "text": "大宗订单详情", - "link": "/order-management/bulk-detail/:id", - "hide": true - } - ] - }, - { - "text": "运单管理", - "icon": "iconfont icon-yundan-copy", - "group": true, - "children": [ - { - "text": "整车运单", - "link": "/waybill-management/vehicle" - }, - { - "hide": true, - "text": "整车运单详情", - "link": "/waybill-management/vehicle-detail/:id" - }, - { - "text": "大宗运单", - "link": "/waybill-management/bulk" - }, - { - "hide": true, - "text": "大宗运单详情", - "link": "/waybill-management/bulk-detail/:id" - }, - { - "text": "异常上报", - "link": "/waybill-management/abnormal-appear" - } - ] - }, - { - "text": "保险管理", - "icon": "iconfont icon-yundan-copy", - "group": true, - "children": [ - { - "text": "保险列表", - "link": "/insurance-management/list" - } - ] - }, - { - "text": "财务管理", - "icon": "iconfont icon-caiwu-copy", - "group": true, - "children": [ - { - "text": "费用管理", - "link": "/financial-management/cost-management" - }, - { - "text": "费用浏览", - "hide": true, - "link": "/financial-management/cost-management/detail/:id" - }, - { - "text": "凭证管理", - "link": "/financial-management/voucher-management" - }, - { - "text": "凭证汇总", - "link": "/financial-management/voucher-summary" - }, - { - "text": "应收费用单", - "hide": true, - "link": "/financial-management/cost-management/expenses-receivable/:id" - }, - { - "text": "应付费用单", - "hide": true, - "link": "/financial-management/cost-management/expenses-payable/:id" - }, - { - "text": "付款单", - "link": "/financial-management/payment-order" - }, - { - "text": "收款单", - "link": "/financial-management/receipt-order" - }, - { - "text": "应收核销", - "link": "/financial-management/receivable-order" - }, - { - "text": "应收核销详情", - "hide": true, - "link": "/financial-management/receivable-order/detail/:id" - }, - { - "text": "应付核销", - "link": "/financial-management/payable-order" - }, - { - "text": "应收核销详情", - "hide": true, - "link": "/financial-management/payable-order/detail/:id" - }, - { - "text": "货主账户", - "link": "/financial-management/freight-account" - }, - { - "text": "货主账户详情", - "hide": true, - "link": "/financial-management/freight-account/detail/:id" - }, - { - "text": "平台账户", - "link": "/financial-management/platform-account" - }, - { - "text": "司机账户", - "link": "/financial-management/driver-account" - }, - { - "text": "司机账户详情", - "hide": true, - "link": "/financial-management/driver-account/detail/:id" - }, - { - "text": "充值记录", - "link": "/financial-management/recharge-record" - }, - { - "text": "提现记录", - "link": "/financial-management/withdrawals-record" - }, - { - "text": "提现详情", - "hide": true, - "link": "/financial-management/withdrawals-record/detail/:id" - }, - { - "text": "异常入金", - "link": "/financial-management/abnormal-gold" - }, - { - "text": "支付记录", - "link": "/financial-management/payment-record" - }, - { - "text": "交易流水", - "link": "/financial-management/transaction-flow" - } - ] - }, - { - "text": "票务管理", - "icon": "iconfont icon-piaowu-copy", - "group": true, - "children": [ - { - "text": "销项发票", - "children": [ - { - "text": "开票申请", - "link": "/ticket/invoice-requested" - }, - { - "text": "开票订单明细", - "link": "/ticket/invoice-requested/detail/:id", - "hide": true - }, - { - "text": "销票处理", - "link": "/ticket/cancellation-invoice" - }, - { - "text": "销票订单明细", - "link": "/ticket/cancellation-invoice/detail/:id", - "hide": true - }, - { - "text": "已开发票", - "link": "/ticket/invoice-list" - }, - { - "text": "已开订单明细", - "link": "/ticket/invoice-list/detail/:id", - "hide": true - }, - { - "text": "快递信息", - "link": "/ticket/express-info" - } - ] - }, - { - "text": "ETC发票", - "children": [ - { - "text": "申请发票", - "link": "/ticket/etc-invoice-requested" - }, - { - "text": "开票记录", - "link": "/ticket/etc-invoice-list" - }, - { - "text": "已开发票", - "link": "/ticket/etc-invoiced-logs" - }, - { - "text": "ETC白名单", - "link": "/ticket/etc-blacklist" - } - ] - }, - { - "text": "进项发票", - "link": "/ticket/input-invoice" - }, - { - "text": "修改收票信息", - "link": "/ticket/input-invoice/detail/:id", - "hide": true - }, - { - "text": "进项发票", - "link": "/ticket/input-invoice/edit/:id", - "hide": true - } - ] - }, - { - "text": "合同管理", - "icon": "iconfont icon-hetong-copy", - "group": true, - "children": [ - { - "text": "保单管理", - "link": "/contract-management/policy" - }, - { - "text": "合同管理", - "link": "/contract-management/index" - }, - { - "text": "合同模板", - "link": "/contract-management/template" - } - ] - }, - { - "text": "系统设置", - "icon": "iconfont icon-shezhi-copy", - "group": true, - "children": [ - { - "text": "员工管理", - "group": true, - "children": [ - { - "text": "员工管理", - "link": "/system/staff-management" - }, - { - "text": "角色管理", - "link": "/system/role-management" - } - ] - }, - { - "text": "操作日志", - "group": true, - "children": [ - { - "text": "系统操作日志", - "link": "/logs/system-logs" - }, - { - "text": "货源操作日志", - "link": "/logs/system-supply-logs" - }, - { - "text": "订单操作日志", - "link": "/logs/system-waybill-logs" - }, - { - "text": "用户登录日志", - "link": "/logs/user-logs" - }, - { - "text": "版本发布记录", - "link": "/logs/version-logs" - } - ] - }, - { - "text": "CRM客户管理", - "link": "/system/crm-management" - }, - { - "text": "结算客户管理", - "link": "/system/close-account" - }, - { - "text": "网络货运人", - "link": "/system/network-freight" - }, - { - "text": "基础设置", - "link": "/system/basic-setting" - }, - { - "text": "保险配置", - "link": "/system/insurance-set" - }, - { - "text": "公告信息管理", - "link": "/system/announcement-message" - }, - { - "text": "车型车长配置", - "link": "/system/cart-config" - }, - { - "text": "基础配置", - "link": "/system/basic-config" - }, - { - "text": "协议配置", - "link": "/system/agreement-config" - }, - { - "text": "菜单管理", - "link": "/menu-management/index" - }, - { - "text": "接口权限", - "link": "/menu-management/auth" - }, - { - "text": "系统配置", - "link": "/system/system-config" - }, - { - "text": "货物名称配置", - "link": "/system/goods-name-config" - } - ] - } - ] - } - ] + "menu": [{ + "text": "主导航", + "hideInBreadcrumb": true, + "children": [{ + "text": "用户中心", + "icon": "iconfont icon-yonghu-copy", + "group": true, + "children": [{ + "text": "货主管理", + "children": [{ + "text": "企业列表", + "link": "/usercenter/freight/list" + }, + { + "text": "道运证", + "hide": true, + "link": "/usercenter/freight/list/view/:id" + }, + { + "text": "货主详情", + "hide": true, + "link": "/usercenter/freight/list/detail/:id" + }, + { + "text": "企业认证", + "hide": true, + "link": "/usercenter/freight/new" + }, + { + "text": "企业审核列表", + "link": "/usercenter/freight/enterprise" + }, + { + "text": "企业审核列表详情", + "hide": true, + "link": "/usercenter/freight/enterprise/view/:id" + }, + { + "text": "货主员工列表", + "link": "/usercenter/freight/user" + }, + { + "text": "货主员工详情", + "hide": true, + "link": "/usercenter/freight/user/view/:id" + } + ] + }, + { + "text": "司机管理", + "link": "/demo/zorro", + "children": [{ + "text": "司机列表", + "link": "/usercenter/driver" + }, + { + "text": "司机详情", + "hide": true, + "link": "/usercenter/driver/detail/:id" + }, + { + "text": "车队长列表", + "link": "/usercenter/driver/captain" + }, + { + "text": "司机配置", + "link": "/usercenter/driver/config" + } + ] + } + ] + }, + { + "text": "运力管理", + "icon": "iconfont icon-yunli-copy", + "group": true, + "children": [{ + "text": "车辆列表", + "link": "/vehicle/list" + }, + { + "hide": true, + "text": "车辆列表详情", + "link": "/vehicle/list/detail/:id" + }, + { + "text": "车辆审核列表", + "link": "/vehicle/audit" + }, + { + "hide": true, + "text": "车辆审核列表详情", + "link": "/vehicle/audit/detail/:id" + } + ] + }, + { + "text": "货源管理", + "icon": "iconfont icon-huoyuan-copy", + "group": true, + "children": [{ + "text": "货源管理", + "link": "/supply-management/index", + "reuse": true + }, + { + "text": "货源详情", + "link": "/supply-management/bulk-detail", + "hide": true + }, + { + "text": "修改货源", + "link": "/supply-management/vehicle-amend/:id", + "hide": true + }, + { + "text": "整车代发货源", + "link": "/supply-management/vehicle-release", + "hide": true + }, + { + "text": "大宗代发货源", + "link": "/supply-management/bulk-release", + "hide": true + }, + { + "text": "货源详情", + "link": "/supply-management/vehicle-detail/:id", + "hide": true + } + ] + }, + { + "text": "订单管理", + "icon": "iconfont icon-dingdan-copy", + "group": true, + "children": [{ + "text": "整车订单", + "link": "/order-management/vehicle" + }, + { + "text": "大宗订单", + "link": "/order-management/bulk" + }, + { + "text": "风险单管理", + "link": "/order-management/risk" + }, + { + "text": "单据审核", + "link": "/order-management/receipts-audit" + }, + { + "text": "投诉管理", + "link": "/order-management/complaint" + }, + { + "text": "合规抽查", + "link": "/order-management/compliance-audit" + }, + { + "text": "整车订单详情", + "link": "/order-management/vehicle-detail/:id", + "hide": true + }, + { + "text": "大宗订单详情", + "link": "/order-management/bulk-detail/:id", + "hide": true + } + ] + }, + { + "text": "运单管理", + "icon": "iconfont icon-yundan-copy", + "group": true, + "children": [{ + "text": "整车运单", + "link": "/waybill-management/vehicle" + }, + { + "hide": true, + "text": "整车运单详情", + "link": "/waybill-management/vehicle-detail/:id" + }, + { + "text": "大宗运单", + "link": "/waybill-management/bulk" + }, + { + "hide": true, + "text": "大宗运单详情", + "link": "/waybill-management/bulk-detail/:id" + }, + { + "text": "异常上报", + "link": "/waybill-management/abnormal-appear" + } + ] + }, + { + "text": "保险管理", + "icon": "iconfont icon-yundan-copy", + "group": true, + "children": [{ + "text": "保险列表", + "link": "/insurance-management/list" + }] + }, + { + "text": "财务管理", + "icon": "iconfont icon-caiwu-copy", + "group": true, + "children": [{ + "text": "费用管理", + "link": "/financial-management/cost-management" + }, + { + "text": "费用浏览", + "hide": true, + "link": "/financial-management/cost-management/detail/:id" + }, + { + "text": "凭证管理", + "link": "/financial-management/voucher-management" + }, + { + "text": "凭证汇总", + "link": "/financial-management/voucher-summary" + }, + { + "text": "应收费用单", + "hide": true, + "link": "/financial-management/cost-management/expenses-receivable/:id" + }, + { + "text": "应付费用单", + "hide": true, + "link": "/financial-management/cost-management/expenses-payable/:id" + }, + { + "text": "付款单", + "link": "/financial-management/payment-order" + }, + { + "text": "收款单", + "link": "/financial-management/receipt-order" + }, + { + "text": "应收核销", + "link": "/financial-management/receivable-order" + }, + { + "text": "应收核销详情", + "hide": true, + "link": "/financial-management/receivable-order/detail/:id" + }, + { + "text": "应付核销", + "link": "/financial-management/payable-order" + }, + { + "text": "应收核销详情", + "hide": true, + "link": "/financial-management/payable-order/detail/:id" + }, + { + "text": "货主账户", + "link": "/financial-management/freight-account" + }, + { + "text": "货主账户详情", + "hide": true, + "link": "/financial-management/freight-account/detail/:id" + }, + { + "text": "平台账户", + "link": "/financial-management/platform-account" + }, + { + "text": "司机账户", + "link": "/financial-management/driver-account" + }, + { + "text": "司机账户详情", + "hide": true, + "link": "/financial-management/driver-account/detail/:id" + }, + { + "text": "充值记录", + "link": "/financial-management/recharge-record" + }, + { + "text": "提现记录", + "link": "/financial-management/withdrawals-record" + }, + { + "text": "提现详情", + "hide": true, + "link": "/financial-management/withdrawals-record/detail/:id" + }, + { + "text": "异常入金", + "link": "/financial-management/abnormal-gold" + }, + { + "text": "支付记录", + "link": "/financial-management/payment-record" + }, + { + "text": "交易流水", + "link": "/financial-management/transaction-flow" + } + ] + }, + { + "text": "票务管理", + "icon": "iconfont icon-piaowu-copy", + "group": true, + "children": [{ + "text": "销项发票", + "children": [{ + "text": "开票申请", + "link": "/ticket/invoice-requested" + }, + { + "text": "开票订单明细", + "link": "/ticket/invoice-requested/detail/:id", + "hide": true + }, + { + "text": "销票处理", + "link": "/ticket/cancellation-invoice" + }, + { + "text": "销票订单明细", + "link": "/ticket/cancellation-invoice/detail/:id", + "hide": true + }, + { + "text": "已开发票", + "link": "/ticket/invoice-list" + }, + { + "text": "已开订单明细", + "link": "/ticket/invoice-list/detail/:id", + "hide": true + }, + { + "text": "快递信息", + "link": "/ticket/express-info" + } + ] + }, + { + "text": "ETC发票", + "children": [{ + "text": "申请发票", + "link": "/ticket/etc-invoice-requested" + }, + { + "text": "开票记录", + "link": "/ticket/etc-invoice-list" + }, + { + "text": "已开发票", + "link": "/ticket/etc-invoiced-logs" + }, + { + "text": "ETC白名单", + "link": "/ticket/etc-blacklist" + } + ] + }, + { + "text": "进项发票", + "link": "/ticket/input-invoice" + }, + { + "text": "修改收票信息", + "link": "/ticket/input-invoice/detail/:id", + "hide": true + }, + { + "text": "进项发票", + "link": "/ticket/input-invoice/edit/:id", + "hide": true + } + ] + }, + { + "text": "合同管理", + "icon": "iconfont icon-hetong-copy", + "group": true, + "children": [{ + "text": "保单管理", + "link": "/contract-management/policy" + }, + { + "text": "合同管理", + "link": "/contract-management/index" + }, + { + "text": "合同模板", + "link": "/contract-management/template" + } + ] + }, + { + "text": "系统设置", + "icon": "iconfont icon-shezhi-copy", + "group": true, + "children": [{ + "text": "员工管理", + "group": true, + "children": [{ + "text": "员工管理", + "link": "/system/staff-management" + }, + { + "text": "角色管理", + "link": "/system/role-management" + } + ] + }, + { + "text": "操作日志", + "group": true, + "children": [{ + "text": "系统操作日志", + "link": "/logs/system-logs" + }, + { + "text": "货源操作日志", + "link": "/logs/system-supply-logs" + }, + { + "text": "订单操作日志", + "link": "/logs/system-waybill-logs" + }, + { + "text": "用户登录日志", + "link": "/logs/user-logs" + }, + { + "text": "版本发布记录", + "link": "/logs/version-logs" + } + ] + }, + { + "text": "CRM客户管理", + "link": "/system/crm-management" + }, + { + "text": "结算客户管理", + "link": "/system/close-account" + }, + { + "text": "网络货运人", + "link": "/system/network-freight" + }, + { + "text": "基础设置", + "link": "/system/basic-setting" + }, + { + "text": "保险配置", + "link": "/system/insurance-set" + }, + { + "text": "公告信息管理", + "link": "/system/announcement-message" + }, + { + "text": "车型车长配置", + "link": "/system/cart-config" + }, + { + "text": "基础配置", + "link": "/system/basic-config" + }, + { + "text": "协议配置", + "link": "/system/agreement-config" + }, + { + "text": "菜单管理", + "link": "/menu-management/index" + }, + { + "text": "接口权限", + "link": "/menu-management/auth" + }, + { + "text": "系统配置", + "link": "/system/system-config" + }, + { + "text": "货物名称配置", + "link": "/system/goods-name-config" + } + ] + }, + { + "text": "合伙人管理", + "icon": "anticon anticon-dashboard", + "children": [{ + "text": "业务统计", + "link": "/partner/business-statistics/index" + }] + } + ] + }] } -} \ No newline at end of file +} From d198a69eefa262081d2e7e95cd2362faa605350c Mon Sep 17 00:00:00 2001 From: heqinghang Date: Thu, 24 Feb 2022 14:11:57 +0800 Subject: [PATCH 02/70] 666 --- .../components/edit/edit.component.html | 7 + .../components/edit/edit.component.ts | 114 +++++++++++ .../components/list/list.component.html | 28 +++ .../components/list/list.component.ts | 175 +++++++++++++++++ .../services/channel-sales.service.ts | 12 ++ .../components/edit/edit.component.html | 7 + .../components/edit/edit.component.ts | 88 +++++++++ .../components/list/list.component.html | 28 +++ .../components/list/list.component.ts | 180 ++++++++++++++++++ .../services/level-config.service.ts | 12 ++ .../routes/partner/partner-routing.module.ts | 20 +- src/app/routes/partner/partner.module.ts | 11 +- 12 files changed, 680 insertions(+), 2 deletions(-) create mode 100644 src/app/routes/partner/channel-sales/components/edit/edit.component.html create mode 100644 src/app/routes/partner/channel-sales/components/edit/edit.component.ts create mode 100644 src/app/routes/partner/channel-sales/components/list/list.component.html create mode 100644 src/app/routes/partner/channel-sales/components/list/list.component.ts create mode 100644 src/app/routes/partner/channel-sales/services/channel-sales.service.ts create mode 100644 src/app/routes/partner/level-config/components/edit/edit.component.html create mode 100644 src/app/routes/partner/level-config/components/edit/edit.component.ts create mode 100644 src/app/routes/partner/level-config/components/list/list.component.html create mode 100644 src/app/routes/partner/level-config/components/list/list.component.ts create mode 100644 src/app/routes/partner/level-config/services/level-config.service.ts diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.html b/src/app/routes/partner/channel-sales/components/edit/edit.component.html new file mode 100644 index 00000000..ba3e7981 --- /dev/null +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.html @@ -0,0 +1,7 @@ + + + +
+ + +
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 new file mode 100644 index 00000000..5e5d6e85 --- /dev/null +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -0,0 +1,114 @@ +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 { ChannelSalesService } from '../../services/channel-sales.service'; + +@Component({ + selector: 'app-parter-channel-sales-edit', + templateUrl: './edit.component.html' +}) +export class ParterChannelSalesEditComponent 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: ChannelSalesService, + private modalRef: NzModalRef + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name1: { + title: '业务员选择', + type: 'string', + enum: [ + { label: '王武', value: '1'}, + ], + ui: { + widget: 'select', + placeholder:'请选择' + } as SFSelectWidgetSchema, + }, + name2: { + type: 'string', + title: '授权登录运营后台', + enum: [ + { label: '否', value: '0' }, + { label: '是', value: '1' } + ], + ui: { + widget: 'radio', + } as SFRadioWidgetSchema, + default: 'A', + }, + name: { + title: '', + type: 'string', + enum: [ + { label: '管理员', value: '1'}, + ], + ui: { + widget: 'select', + placeholder:'授权角色', + visibleIf: { name2: (value: string) => value === '1' } + } as SFSelectWidgetSchema, + }, + name3: { + type: 'string', + title: '备注', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请输入50字符' + } as SFTextareaWidgetSchema, + }, + }, + required: ['name1', 'name2'] + }; + this.ui = { + '*': { + spanLabelFixed: 150, + grid: { span: 24 } + }, + $name:{ spanLabelFixed: 10, grid: { span: 12 }}, + $name2:{ grid: { span: 12 }}, + + }; + } + + 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/channel-sales/components/list/list.component.html b/src/app/routes/partner/channel-sales/components/list/list.component.html new file mode 100644 index 00000000..6cc8f619 --- /dev/null +++ b/src/app/routes/partner/channel-sales/components/list/list.component.html @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts new file mode 100644 index 00000000..2debda3f --- /dev/null +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -0,0 +1,175 @@ +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 { ParterChannelSalesEditComponent } from '../edit/edit.component'; + +@Component({ + selector: 'app-parter-channel-sales-list', + templateUrl: './list.component.html' +}) +export class ParterChannelSalesListComponent implements OnInit { + schema: SFSchema = {}; + columns!: STColumn[]; + ui!: SFUISchema; + @ViewChild('st', { static: false }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + spuStatus = '1'; + + data=[{name1:1111}] + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: ChannelSalesService, + private modalService: NzModalService + ) {} + + /** + * 查询参数 + */ + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + name: { + type: 'string', + title: '销售渠道姓名' + }, + phone: { + type: 'string', + title: '手机号' + }, + } + }; + 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.view(_record), + }, + { + text: '冻结', + click: (_record, _modal, _instance) => this.stop(_record.id), + } + ] + } + ]; + } + + add() { + const modalRef = this.modalService.create({ + nzWidth:600, + nzTitle: '新增', + nzContent: ParterChannelSalesEditComponent, + nzComponentParams: { type: this.spuStatus } + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.st.reload(); + } + }); + } + + // 编辑 + edit(record: STData) { + const modalRef = this.modalService.create({ + nzWidth:600, + nzTitle: '编辑', + nzContent: ParterChannelSalesEditComponent, + nzComponentParams: { i: record, type: this.spuStatus } + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.st.reload(); + } + }); + } + + // 编辑 + view(record: STData) { + const modalRef = this.modalService.create({ + nzTitle: '查看', + nzContent: ParterChannelSalesEditComponent, + nzComponentParams: { i: record } + }); + } + + stop(id: any) { + this.modalService.confirm({ + nzTitle: '冻结确认', + nzContent: `确定冻结该账号吗?
`, + // nzOnOk: () => + // this.service.request('', '').subscribe(res => { + // if (res) { + // this.service.msgSrv.success('冻结成功!'); + // this.st.reload(); + // } + // }) + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } + + +} diff --git a/src/app/routes/partner/channel-sales/services/channel-sales.service.ts b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts new file mode 100644 index 00000000..6e7cb18c --- /dev/null +++ b/src/app/routes/partner/channel-sales/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/level-config/components/edit/edit.component.html b/src/app/routes/partner/level-config/components/edit/edit.component.html new file mode 100644 index 00000000..ba3e7981 --- /dev/null +++ b/src/app/routes/partner/level-config/components/edit/edit.component.html @@ -0,0 +1,7 @@ + + + +
+ + +
diff --git a/src/app/routes/partner/level-config/components/edit/edit.component.ts b/src/app/routes/partner/level-config/components/edit/edit.component.ts new file mode 100644 index 00000000..35bc59a3 --- /dev/null +++ b/src/app/routes/partner/level-config/components/edit/edit.component.ts @@ -0,0 +1,88 @@ +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 { ChannelSalesService } from '../../services/level-config.service'; + +@Component({ + selector: 'app-parter-LevelConfig-edit', + templateUrl: './edit.component.html' +}) +export class ParterLevelConfigEditComponent 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: ChannelSalesService, + private modalRef: NzModalRef + ) {} + + ngOnInit(): void { + this.initSF(); + } + initSF() { + this.schema = { + properties: { + id: { + type: 'string', + title: '', + ui: { hidden: true } + }, + name: { + title: '合伙人等级', + type: 'string', + enum: [ + { label: '管理员', value: '1'}, + ], + ui: { + widget: 'select', + placeholder:'请选择', + visibleIf: { name2: (value: string) => value === '1' } + } as SFSelectWidgetSchema, + }, + name3: { + type: 'string', + title: '备注', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请输入50字符' + } as SFTextareaWidgetSchema, + }, + }, + required: ['name1', 'name2'] + }; + 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/level-config/components/list/list.component.html b/src/app/routes/partner/level-config/components/list/list.component.html new file mode 100644 index 00000000..6cc8f619 --- /dev/null +++ b/src/app/routes/partner/level-config/components/list/list.component.html @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/src/app/routes/partner/level-config/components/list/list.component.ts b/src/app/routes/partner/level-config/components/list/list.component.ts new file mode 100644 index 00000000..25e56d43 --- /dev/null +++ b/src/app/routes/partner/level-config/components/list/list.component.ts @@ -0,0 +1,180 @@ +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/level-config.service'; +import { ParterLevelConfigEditComponent } from '../edit/edit.component'; + +@Component({ + selector: 'app-parter-LevelConfig-list', + templateUrl: './list.component.html' +}) +export class ParterLevelConfigListComponent implements OnInit { + schema: SFSchema = {}; + columns!: STColumn[]; + ui!: SFUISchema; + @ViewChild('st', { static: false }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + spuStatus = '1'; + + data=[{name1:1111}] + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: ChannelSalesService, + private modalService: NzModalService + ) {} + + /** + * 查询参数 + */ + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + name: { + type: 'string', + title: '等级姓名' + }, + phone: { + type: 'string', + title: '状态' + }, + } + }; + 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: '操作', + 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.restart(_record), + } + ] + } + ]; + } + + add() { + const modalRef = this.modalService.create({ + nzWidth:500, + nzTitle: '新增', + nzContent: ParterLevelConfigEditComponent, + nzComponentParams: { type: this.spuStatus } + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.st.reload(); + } + }); + } + + // 编辑 + edit(record: STData) { + const modalRef = this.modalService.create({ + nzWidth:500, + nzTitle: '编辑', + nzContent: ParterLevelConfigEditComponent, + nzComponentParams: { i: record, type: this.spuStatus } + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.st.reload(); + } + }); + } + + // 编辑 + view(record: STData) { + const modalRef = this.modalService.create({ + nzTitle: '查看', + nzContent: ParterLevelConfigEditComponent, + nzComponentParams: { i: record } + }); + } + + restart(id: any) { + this.modalService.confirm({ + nzTitle: '冻结确认', + nzContent: `确定启用该账号吗?
`, + // nzOnOk: () => + // this.service.request('', '').subscribe(res => { + // if (res) { + // this.service.msgSrv.success('冻结成功!'); + // this.st.reload(); + // } + // }) + }); + } + stop(id: any) { + this.modalService.confirm({ + nzTitle: '冻结确认', + nzContent: `确定禁用该账号吗?
`, + // nzOnOk: () => + // this.service.request('', '').subscribe(res => { + // if (res) { + // this.service.msgSrv.success('冻结成功!'); + // this.st.reload(); + // } + // }) + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } + + +} 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 new file mode 100644 index 00000000..6e7cb18c --- /dev/null +++ b/src/app/routes/partner/level-config/services/level-config.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/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 9b76c2c4..95585b24 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -1,9 +1,27 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; +import { ParterChannelSalesEditComponent } from './channel-sales/components/edit/edit.component'; +import { ParterChannelSalesListComponent } from './channel-sales/components/list/list.component'; +import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component'; +import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; const routes: Routes = [ - { path: 'index', component: PartnerBusinessStatisticsIndexComponent }]; + { path: 'index', component: PartnerBusinessStatisticsIndexComponent }, + { path: 'channel-sales', + children:[ + {path: 'list', component: ParterChannelSalesListComponent}, + {path: 'edit', component: ParterChannelSalesEditComponent}, + ] + }, + { path: 'level-config', + children:[ + {path: 'list', component: ParterLevelConfigListComponent}, + {path: 'edit', component: ParterLevelConfigEditComponent}, + ] + }, + +]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index c1198f85..bb93e84d 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -3,9 +3,18 @@ import { CommonModule } from '@angular/common'; import { SharedModule } from '@shared'; import { PartnerRoutingModule } from './partner-routing.module'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; +import { ParterChannelSalesListComponent } from './channel-sales/components/list/list.component'; +import { ParterChannelSalesEditComponent } from './channel-sales/components/edit/edit.component'; +import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component'; +import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; const COMPONENTS: any[] = [ - PartnerBusinessStatisticsIndexComponent]; + PartnerBusinessStatisticsIndexComponent, + ParterChannelSalesListComponent, + ParterChannelSalesEditComponent, + ParterLevelConfigListComponent, + ParterLevelConfigEditComponent +]; @NgModule({ declarations: [...COMPONENTS], imports: [CommonModule, PartnerRoutingModule, SharedModule] From d6a5eab32069f2222a3a9bbd9b49798447c5def1 Mon Sep 17 00:00:00 2001 From: heqinghang Date: Thu, 24 Feb 2022 14:21:29 +0800 Subject: [PATCH 03/70] 666 --- src/app/routes/partner/partner-routing.module.ts | 2 ++ src/assets/mocks/menu-data.json | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 822197ac..f268d89d 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -14,12 +14,14 @@ const routes: Routes = [ { path: 'sale-statistics', component: PartnerSaleStatisticsComponent }, { path: 'channel-sales', children:[ + {path: '', component: ParterChannelSalesListComponent}, {path: 'list', component: ParterChannelSalesListComponent}, {path: 'edit', component: ParterChannelSalesEditComponent}, ] }, { path: 'level-config', children:[ + {path: '', component: ParterLevelConfigListComponent}, {path: 'list', component: ParterLevelConfigListComponent}, {path: 'edit', component: ParterLevelConfigEditComponent}, ] diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 28ac960c..0ee7956f 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -508,10 +508,20 @@ { "text": "合伙人管理", "icon": "anticon anticon-dashboard", - "children": [{ + "children": [ + { "text": "业务统计", "link": "/partner/business-statistics/index" - }] + }, + { + "text": "销售渠道管理", + "link": "/partner/channel-sales/list" + }, + { + "text": "等级配置", + "link": "/partner/level-config/list" + } + ] } ] }] From 2870adbe6e9a49336aaa7e8b1acef62f272a120c Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Feb 2022 15:36:43 +0800 Subject: [PATCH 04/70] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routes/partner/partner-routing.module.ts | 16 ++ src/app/routes/partner/partner.module.ts | 4 +- .../list/particulars.component.html | 27 +++ .../components/list/particulars.component.ts | 165 ++++++++++++++++++ .../services/rebate-management.service.ts | 12 ++ src/assets/mocks/menu-data.json | 18 ++ 6 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 src/app/routes/partner/rebate-management/components/list/particulars.component.html create mode 100644 src/app/routes/partner/rebate-management/components/list/particulars.component.ts create mode 100644 src/app/routes/partner/rebate-management/services/rebate-management.service.ts diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index f268d89d..c4ca409f 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -1,3 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-02-24 15:07:57 + * @LastEditors : Shiming + * @LastEditTime : 2022-02-24 15:23:48 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-routing.module.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; @@ -7,6 +17,7 @@ import { ParterLevelConfigEditComponent } from './level-config/components/edit/e import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component'; import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; +import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; const routes: Routes = [ { path: 'index', component: PartnerBusinessStatisticsIndexComponent }, @@ -26,6 +37,11 @@ const routes: Routes = [ {path: 'edit', component: ParterLevelConfigEditComponent}, ] }, + { path: 'rebate', + children:[ + {path: 'particulars', component: ParterRebateManageMentParticularsComponent}, + ] +}, ]; @NgModule({ diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index cb08d463..844832b6 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -9,6 +9,7 @@ import { ParterLevelConfigEditComponent } from './level-config/components/edit/e import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component'; import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; +import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -17,7 +18,8 @@ const COMPONENTS: any[] = [ ParterLevelConfigListComponent, ParterLevelConfigEditComponent, PartnerPartnerStatisticsComponent, - PartnerSaleStatisticsComponent + PartnerSaleStatisticsComponent, + ParterRebateManageMentParticularsComponent ]; @NgModule({ diff --git a/src/app/routes/partner/rebate-management/components/list/particulars.component.html b/src/app/routes/partner/rebate-management/components/list/particulars.component.html new file mode 100644 index 00000000..f252aa0e --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/list/particulars.component.html @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/src/app/routes/partner/rebate-management/components/list/particulars.component.ts b/src/app/routes/partner/rebate-management/components/list/particulars.component.ts new file mode 100644 index 00000000..5894e71d --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/list/particulars.component.ts @@ -0,0 +1,165 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort, ShipperBaseService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { RebateManagementService } from '../../services/rebate-management.service'; + +@Component({ + selector: 'app-parter-channel-rebate-management-particulars', + templateUrl: './particulars.component.html' +}) +export class ParterRebateManageMentParticularsComponent implements OnInit { + schema: SFSchema = {}; + columns!: STColumn[]; + ui!: SFUISchema; + @ViewChild('st', { static: false }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + spuStatus = '1'; + + data=[{name1:1111}] + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: RebateManagementService, + private modalService: NzModalService, + public shipperservice: ShipperBaseService + + ) {} + + /** + * 查询参数 + */ + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + name: { + type: 'string', + title: '订单号' + }, + phone: { + type: 'string', + title: '付款单号' + }, + phone2: { + type: 'string', + title: '下单客户' + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), + }, + }, + phone3: { + type: 'string', + title: '合伙人名称' + }, + deadlineTime: { + title: '时间范围', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + } as SFDateWidgetSchema, + }, + } + }; + 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: '合伙人名称', + index: 'name1' + }, + { + title: '网络货运人', + index: 'name1' + }, + { + title: '合伙人等级', + index: 'name1' + }, + { + title: '管理费比例', + index: 'name1' + }, + { + title: '固定结算费率', + index: 'name1' + }, + { + title: '返佣时间', + index: 'name1' + }, + + ]; + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } + + +} diff --git a/src/app/routes/partner/rebate-management/services/rebate-management.service.ts b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts new file mode 100644 index 00000000..5430876a --- /dev/null +++ b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class RebateManagementService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 0ee7956f..90c2212b 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -513,6 +513,24 @@ "text": "业务统计", "link": "/partner/business-statistics/index" }, + { + "text": "返佣管理", + "group": true, + "children": [ + { + "text": "返佣配置", + "link": "/partner/rebate/" + }, + { + "text": "返佣明细", + "link": "/partner/rebate/particulars" + }, + { + "text": "返佣记录", + "link": "/partner/rebate/" + } + ] + }, { "text": "销售渠道管理", "link": "/partner/channel-sales/list" From 984a9a85f0563ad676b66c9c77bf5487559718d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 24 Feb 2022 17:18:22 +0800 Subject: [PATCH 05/70] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partner-custom-detail.component.html | 42 ++++++ .../partner-custom-detail.component.less | 11 ++ .../partner-custom-detail.component.spec.ts | 24 ++++ .../partner-custom-detail.component.ts | 132 ++++++++++++++++++ .../partner-statistics.component.html | 12 +- .../partner-statistics.component.ts | 14 +- .../sale-custom-detail.component.html | 27 ++++ .../sale-custom-detail.component.spec.ts | 24 ++++ .../sale-custom-detail.component.ts | 53 +++++++ .../services/bussiness-statistics.service.ts | 13 ++ .../routes/partner/partner-routing.module.ts | 9 +- src/app/routes/partner/partner.module.ts | 7 +- .../enterprise-audit/view/view.component.html | 4 +- 13 files changed, 355 insertions(+), 17 deletions(-) create mode 100644 src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.html create mode 100644 src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.less create mode 100644 src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.spec.ts create mode 100644 src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.ts create mode 100644 src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.html create mode 100644 src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.spec.ts create mode 100644 src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.ts create mode 100644 src/app/routes/partner/business-statistics/services/bussiness-statistics.service.ts diff --git a/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.html b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.html new file mode 100644 index 00000000..df667e4f --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.html @@ -0,0 +1,42 @@ + + + + + + + +
+
+ +
+
+ + + +
+
+
+ + + + diff --git a/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.less b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.less new file mode 100644 index 00000000..7372f925 --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.less @@ -0,0 +1,11 @@ +:host { + .user-logo { + width: 90px; + } + + .letf-box { + width: 250px; + display: inline-block; + } + +} diff --git a/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.spec.ts b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.spec.ts new file mode 100644 index 00000000..4fddfb5d --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerPartnerCustomDetailComponent } from './partner-custom-detail.component'; + +describe('PartnerPartnerCustomDetailComponent', () => { + let component: PartnerPartnerCustomDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PartnerPartnerCustomDetailComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerPartnerCustomDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.ts b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.ts new file mode 100644 index 00000000..c48476d9 --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.ts @@ -0,0 +1,132 @@ +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 { BussinessStatisticsService } from '../../services/bussiness-statistics.service'; + +@Component({ + selector: 'app-partner-partner-custom-detail', + templateUrl: './partner-custom-detail.component.html', + styleUrls: ['./partner-custom-detail.component.less'] +}) +export class PartnerPartnerCustomDetailComponent implements OnInit { + schema: SFSchema = {}; + ui!: SFUISchema; + detailInfo: any = { + logo: './assets/images/user/logo.svg', + company: '张三', + code: '91440300357887492H', + proxy: '企业合伙人', + belongCity: '深圳、上海、北京', + createTime: '2021-09-23 14:43:31' + } + @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; + columns: STColumn[] = [ + { title: '编号', index: 'no' }, + { title: '调用次数', type: 'number', index: 'callNo' }, + { title: '头像', type: 'img', width: '50px', index: 'avatar' }, + { title: '时间', type: 'date', index: 'updatedAt' }, + { + title: '', + buttons: [ + // { text: '查看', click: (item: any) => `/form/${item.id}` }, + // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, + ] + } + ]; + _$expand = false; + + constructor(public service: BussinessStatisticsService) { + + } + + ngOnInit(): void { + this.initST(); + this.initSF(); + } + + resetSF() { + this._$expand = false; + this.sf.reset() + } + /** +* 伸缩查询条件 +*/ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + add(): void { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + search() { + this.st.load(1); + } + export() { + + } + + initSF() { + this.schema = { + properties: { + abnormalCause: { + title: '客户名称', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '客户状态', + type: 'string', + default: '', + enum: [ + { + label: '全部', + value: '' + }, + { + label: '个人', + value: '1' + }, + { + label: '企业', + value: '2' + } + ], + ui: { + widget: 'select' + }, + }, + } + } + this.ui = { + '*': { spanLabelFixed: 100, grid: { span: 11, gutter: 4 } }, + }; + } + /** + * 初始化数据列表 + */ + initST() { + this.columns = [ + { title: '合伙人名称', index: 'carNo', className: 'text-center' }, + { title: '类型', render: 'carModelLabel', className: 'text-center' }, + { title: '注册时间', index: 'carNo', className: 'text-center' }, + { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true }, + { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, + { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-center', sort: true }, + { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, + { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, + { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-center', sort: true }, + ]; + } + + goBack() { + window.history.go(-1); + } + +} diff --git a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html index 8dd7ef1a..d6240182 100644 --- a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html +++ b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html @@ -1,24 +1,24 @@ - + - + - {{item.approvalStatus}} + {{item.yskmoney}}
{{item.approvalStatus1 | currency:' '}}
-
{{item.approvalStatus1 | currency:' '}}
+ {{item.yskmoney | currency:' '}}
-
{{item.approvalStatus1 | currency:' '}}
+
{{item.yskmoney | currency:' '}}
-
{{item.approvalStatus1 | currency:' '}}
+
{{item.armoney | currency:' '}}
diff --git a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts index ad508c7d..db1de887 100644 --- a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts +++ b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts @@ -1,7 +1,8 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; -import { SFSchema, SFUISchema } from '@delon/form'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; +import { BussinessStatisticsService } from '../../services/bussiness-statistics.service'; @Component({ selector: 'app-partner-partner-statistics', @@ -12,9 +13,10 @@ export class PartnerPartnerStatisticsComponent implements OnInit { schema!: SFSchema; ui!: SFUISchema; @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; columns: STColumn[] = []; - constructor(private http: _HttpClient, private modal: ModalHelper) { } + constructor(public service: BussinessStatisticsService) { } ngOnInit(): void { this.initSF(); @@ -65,15 +67,19 @@ export class PartnerPartnerStatisticsComponent implements OnInit { { title: '合伙人名称', index: 'carNo', className: 'text-center' }, { title: '类型', render: 'carModelLabel', className: 'text-center' }, { title: '注册时间', index: 'carNo', className: 'text-center' }, - { title: '本月新增客户', render: 'approvalStatus', className: 'text-center', sort: true }, + { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true }, { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-center', sort: true }, { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-center', sort: true }, - ]; } + resetSF() { + this.sf.reset(); + this.st.reset(); + } + } diff --git a/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.html b/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.html new file mode 100644 index 00000000..b376f70a --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + diff --git a/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.spec.ts b/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.spec.ts new file mode 100644 index 00000000..d88e4632 --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerSaleCustomDetailComponent } from './sale-custom-detail.component'; + +describe('PartnerSaleCustomDetailComponent', () => { + let component: PartnerSaleCustomDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PartnerSaleCustomDetailComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerSaleCustomDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.ts b/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.ts new file mode 100644 index 00000000..c3a63716 --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/sale-custom-detail/sale-custom-detail.component.ts @@ -0,0 +1,53 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFSchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; + +@Component({ + selector: 'app-partner-sale-custom-detail', + templateUrl: './sale-custom-detail.component.html', +}) +export class PartnerSaleCustomDetailComponent implements OnInit { + url = `/user`; + searchSchema: SFSchema = { + properties: { + no: { + type: 'string', + title: '编号' + } + } + }; + detailInfo: any = { + logo: './assets/images/user/logo.svg', + name: '张三', + phone: '1399999999', + proxy: '城市代理', + level: '二级', + createTime: '添加时间' + } + @ViewChild('st') private readonly st!: STComponent; + columns: STColumn[] = [ + { title: '编号', index: 'no' }, + { title: '调用次数', type: 'number', index: 'callNo' }, + { title: '头像', type: 'img', width: '50px', index: 'avatar' }, + { title: '时间', type: 'date', index: 'updatedAt' }, + { + title: '', + buttons: [ + // { text: '查看', click: (item: any) => `/form/${item.id}` }, + // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, + ] + } + ]; + + constructor(private http: _HttpClient, private modal: ModalHelper) { } + + ngOnInit(): void { } + + add(): void { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + +} diff --git a/src/app/routes/partner/business-statistics/services/bussiness-statistics.service.ts b/src/app/routes/partner/business-statistics/services/bussiness-statistics.service.ts new file mode 100644 index 00000000..894da58b --- /dev/null +++ b/src/app/routes/partner/business-statistics/services/bussiness-statistics.service.ts @@ -0,0 +1,13 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root' +}) +export class BussinessStatisticsService extends BaseService { + + $api_get_partner_statistics_page = `/api/fcc/ficoBrmH/list/page`; + 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 5de586a3..37df1da1 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -1,13 +1,14 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; -import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component'; -import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; +import { PartnerPartnerCustomDetailComponent } from './business-statistics/components/partner-custom-detail/partner-custom-detail.component'; +import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.component'; const routes: Routes = [ { path: 'business-statistics/index', component: PartnerBusinessStatisticsIndexComponent }, - { path: 'partner-statistics', component: PartnerPartnerStatisticsComponent }, - { path: 'sale-statistics', component: PartnerSaleStatisticsComponent }]; + { path: 'sale-custom/detail/:id', component: PartnerSaleCustomDetailComponent }, + { path: 'partner-custom/detail/:id', component: PartnerPartnerCustomDetailComponent }, +]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index ec2a3f5c..d42eba8c 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -5,11 +5,16 @@ import { PartnerRoutingModule } from './partner-routing.module'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; import { PartnerPartnerStatisticsComponent } from './business-statistics/components/partner-statistics/partner-statistics.component'; import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; +import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.component'; +import { PartnerPartnerCustomDetailComponent } from './business-statistics/components/partner-custom-detail/partner-custom-detail.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, PartnerPartnerStatisticsComponent, - PartnerSaleStatisticsComponent]; + PartnerSaleStatisticsComponent, + PartnerPartnerCustomDetailComponent, + PartnerPartnerCustomDetailComponent, + PartnerSaleCustomDetailComponent]; @NgModule({ declarations: [...COMPONENTS], imports: [CommonModule, PartnerRoutingModule, SharedModule] diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.html b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.html index 017f5691..c88df339 100644 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.html +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/view/view.component.html @@ -8,7 +8,7 @@ @@ -29,8 +29,7 @@
- +
diff --git a/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.ts b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.ts index 57a8d4f4..f273d209 100644 --- a/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-detail.component.ts +++ b/src/app/routes/partner/business-statistics/components/partner-custom-detail/partner-custom-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, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; @@ -37,7 +38,7 @@ export class PartnerPartnerCustomDetailComponent implements OnInit { ]; _$expand = false; - constructor(public service: BussinessStatisticsService) { + constructor(public service: BussinessStatisticsService, public router: Router) { } @@ -52,7 +53,10 @@ export class PartnerPartnerCustomDetailComponent implements OnInit { resetSF() { this._$expand = false; - this.sf.reset() + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) } /** * 伸缩查询条件 @@ -145,8 +149,12 @@ export class PartnerPartnerCustomDetailComponent implements OnInit { ]; } + /** + * 查看订单明细 + * @param record 当前对象 + */ viewOrderDetail(record: any) { - + this.router.navigate([`/partner/business-statistics/partner/custom-order-detail/${record?.id}`]) } goBack() { window.history.go(-1); diff --git a/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.html b/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.html index 482ccb06..227ab356 100644 --- a/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.html +++ b/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.html @@ -1,9 +1,44 @@ - - - + + + - + - - + +
+
+ +
+
+ + + +
+
+
+ + + diff --git a/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.less b/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.less new file mode 100644 index 00000000..06c7da1f --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.less @@ -0,0 +1,11 @@ +:host { + .user-logo { + width: 90px; + } + + .letf-box { + display: inline-block; + width: 250px; + } + +} diff --git a/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.ts b/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.ts index 11ecb65c..71a30096 100644 --- a/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.ts +++ b/src/app/routes/partner/business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component.ts @@ -1,45 +1,162 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; -import { SFSchema } from '@delon/form'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; +import { BussinessStatisticsService } from '../../services/bussiness-statistics.service'; @Component({ selector: 'app-partner-partner-custom-order-detail', templateUrl: './partner-custom-order-detail.component.html', + styleUrls: ['./partner-custom-order-detail.component.less'] }) export class PartnerPartnerCustomOrderDetailComponent implements OnInit { - url = `/user`; - searchSchema: SFSchema = { - properties: { - no: { - type: 'string', - title: '编号' - } - } - }; + schema: SFSchema = {}; + ui!: SFUISchema; + detailInfo: any = { + logo: './assets/images/user/logo.svg', + company: '张三', + code: '91440300357887492H', + proxy: '企业合伙人', + belongCity: '深圳、上海、北京', + createTime: '2021-09-23 14:43:31' + } @ViewChild('st') private readonly st!: STComponent; - columns: STColumn[] = [ - { title: '编号', index: 'no' }, - { title: '调用次数', type: 'number', index: 'callNo' }, - { title: '头像', type: 'img', width: '50px', index: 'avatar' }, - { title: '时间', type: 'date', index: 'updatedAt' }, - { - title: '', - buttons: [ - // { text: '查看', click: (item: any) => `/form/${item.id}` }, - // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, - ] - } - ]; + @ViewChild('sf') private readonly sf!: SFComponent; + columns: STColumn[] = []; + _$expand = false; - constructor(private http: _HttpClient, private modal: ModalHelper) { } + constructor(public service: BussinessStatisticsService) { - ngOnInit(): void { } + } + + get reqParams() { + return { ...this.sf?.value }; + } + + ngOnInit(): void { + this.initST(); + this.initSF(); + } + + resetSF() { + this._$expand = false; + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } + /** +* 伸缩查询条件 +*/ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } add(): void { // this.modal // .createStatic(FormEditComponent, { i: { id: 0 } }) // .subscribe(() => this.st.reload()); } + search() { + this.st.load(1); + } + export() { + + } + + initSF() { + this.schema = { + properties: { + abnormalCause: { + title: '订单号', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '订单状态', + type: 'string', + default: '', + enum: [ + { + label: '全部', + value: '' + }, + { + label: '个人', + value: '1' + }, + { + label: '企业', + value: '2' + } + ], + ui: { + widget: 'select' + }, + }, + abnormalCause2: { + title: '开票状态', + type: 'string', + default: '', + enum: [ + { + label: '全部', + value: '' + }, + { + label: '个人', + value: '1' + }, + { + label: '企业', + value: '2' + } + ], + ui: { + widget: 'select' + }, + }, + } + } + this.ui = { + '*': { spanLabelFixed: 100, grid: { span: 7, gutter: 4 } }, + }; + } + /** + * 初始化数据列表 + */ + initST() { + this.columns = [ + { title: '订单号', index: 'carNo', className: 'text-center', width: 150 }, + { title: '订单状态', render: 'carModelLabel', className: 'text-center', width: 120 }, + { title: '订单金额(元)', index: 'carNo', className: 'text-center', width: 200 }, + { title: '实际付款金额(元)', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, + { title: '客户附加费率', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, + { title: '预估收益(元)', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 }, + { title: '开票状态', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 }, + { title: '开票金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 }, + { title: '下单时间', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 }, + { + title: '操作', + width: 150, + buttons: [ + { + text: '查看订单详情', + click: (_record) => this.viewOrderDetail(_record) + } + ] + }, + ]; + } + + viewOrderDetail(record: any) { + + } + goBack() { + window.history.go(-1); + } } diff --git a/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.html b/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.html new file mode 100644 index 00000000..6700912c --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.html @@ -0,0 +1,49 @@ + + + + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + diff --git a/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.less b/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.less new file mode 100644 index 00000000..06c7da1f --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.less @@ -0,0 +1,11 @@ +:host { + .user-logo { + width: 90px; + } + + .letf-box { + display: inline-block; + width: 250px; + } + +} diff --git a/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.spec.ts b/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.spec.ts new file mode 100644 index 00000000..a77b84eb --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerPartnerOrderDetailComponent } from './partner-order-detail.component'; + +describe('PartnerPartnerOrderDetailComponent', () => { + let component: PartnerPartnerOrderDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PartnerPartnerOrderDetailComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerPartnerOrderDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.ts b/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.ts new file mode 100644 index 00000000..bfda06d7 --- /dev/null +++ b/src/app/routes/partner/business-statistics/components/partner-order-detail/partner-order-detail.component.ts @@ -0,0 +1,174 @@ +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 { BussinessStatisticsService } from '../../services/bussiness-statistics.service'; + +@Component({ + selector: 'app-partner-partner-order-detail', + templateUrl: './partner-order-detail.component.html', + styleUrls: ['./partner-order-detail.component.less'] +}) +export class PartnerPartnerOrderDetailComponent implements OnInit { + schema: SFSchema = {}; + ui!: SFUISchema; + detailInfo: any = { + logo: './assets/images/user/logo.svg', + company: '张三', + code: '91440300357887492H', + proxy: '企业合伙人', + belongCity: '深圳、上海、北京', + createTime: '2021-09-23 14:43:31' + } + @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; + columns: STColumn[] = []; + _$expand = false; + + constructor(public service: BussinessStatisticsService) { + + } + + get reqParams() { + return { ...this.sf?.value }; + } + + ngOnInit(): void { + this.initST(); + this.initSF(); + } + + resetSF() { + this._$expand = false; + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } + /** +* 伸缩查询条件 +*/ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + add(): void { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + search() { + this.st.load(1); + } + export() { + + } + + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + abnormalCause: { + title: '订单号', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '订单状态', + type: 'string', + default: '', + enum: [ + { + label: '全部', + value: '' + }, + { + label: '个人', + value: '1' + }, + { + label: '企业', + value: '2' + } + ], + ui: { + widget: 'select' + }, + }, + abnormalCause2: { + title: '开票状态', + type: 'string', + default: '', + enum: [ + { + label: '全部', + value: '' + }, + { + label: '个人', + value: '1' + }, + { + label: '企业', + value: '2' + } + ], + ui: { + widget: 'select' + }, + }, + abnormalCause3: { + title: '客户名称', + type: 'string', + ui: { + placeholder: '请输入', + visibleIf: { + _$expand: (value: boolean) => value, + }, + }, + }, + } + } + this.ui = { + '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } }, + }; + } + /** + * 初始化数据列表 + */ + initST() { + this.columns = [ + { title: '订单号', index: 'carNo', className: 'text-center', width: 150 }, + { title: '订单状态', render: 'carModelLabel', className: 'text-center', width: 120 }, + { title: '订单金额(元)', index: 'carNo', className: 'text-center', width: 200 }, + { title: '实际付款金额(元)', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, + { title: '客户附加费率', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, + { title: '预估收益(元)', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 }, + { title: '开票状态', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 }, + { title: '开票金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 }, + { title: '下单时间', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 }, + { + title: '操作', + width: 150, + buttons: [ + { + text: '查看订单详情', + click: (_record) => this.viewOrderDetail(_record) + } + ] + }, + ]; + } + + viewOrderDetail(record: any) { + + } + goBack() { + window.history.go(-1); + } + + +} diff --git a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html index 70f3e8ba..eff67eb6 100644 --- a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html +++ b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.html @@ -1,17 +1,28 @@ - + + + + + - + - {{item.yskmoney}} + {{item.yskmoney}}
{{item.approvalStatus1 | currency:' '}}
- {{item.yskmoney | currency:' '}} + {{item.yskmoney | currency:' + '}} diff --git a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts index ffb9d09c..11bca202 100644 --- a/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts +++ b/src/app/routes/partner/business-statistics/components/partner-statistics/partner-statistics.component.ts @@ -17,6 +17,13 @@ export class PartnerPartnerStatisticsComponent implements OnInit { columns: STColumn[] = []; constructor(public service: BussinessStatisticsService) { } + /** + * 查询参数 + */ + get reqParams() { + const params = { ...this.sf?.value }; + return params + } ngOnInit(): void { this.initSF(); @@ -64,21 +71,27 @@ export class PartnerPartnerStatisticsComponent implements OnInit { */ initST() { this.columns = [ - { title: '合伙人名称', index: 'carNo', className: 'text-center' }, - { title: '类型', render: 'carModelLabel', className: 'text-center' }, - { title: '注册时间', index: 'carNo', className: 'text-center' }, - { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true }, - { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, - { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-center', sort: true }, - { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, - { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, - { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-center', sort: true }, + { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 }, + { title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 }, + { title: '注册时间', index: 'carNo', className: 'text-center', width: 150 }, + { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, + { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, + { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 }, + { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 }, + { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 }, + { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 }, ]; } resetSF() { this.sf.reset(); - this.st.reset(); + setTimeout(() => { + this.st.reset(); + }) + } + + export() { + } diff --git a/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.html b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.html index 7868ebf7..aa6f6c90 100644 --- a/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.html +++ b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.html @@ -1,11 +1,20 @@ - + + + + + - + - {{item.approvalStatus}} + {{item.yskmoney | currency:' ':false:'1.0-2'}}
{{item.approvalStatus1 | currency:' '}}
@@ -15,7 +24,7 @@
-
{{item.approvalStatus1 | currency:' '}}
+
{{item.yskmoney | currency:' '}}
diff --git a/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.ts b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.ts index 247777db..d9279bd2 100644 --- a/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.ts +++ b/src/app/routes/partner/business-statistics/components/sale-statistics/sale-statistics.component.ts @@ -1,7 +1,8 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; -import { SFSchema, SFUISchema } from '@delon/form'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; +import { BussinessStatisticsService } from '../../services/bussiness-statistics.service'; @Component({ selector: 'app-partner-sale-statistics', @@ -11,11 +12,19 @@ export class PartnerSaleStatisticsComponent implements OnInit { url = `/user`; schema!: SFSchema; @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; columns: STColumn[] = []; ui!: SFUISchema; - constructor(private http: _HttpClient, private modal: ModalHelper) { } + constructor(public service: BussinessStatisticsService) { } + /** + * 查询参数 + */ + get reqParams() { + const params = { ...this.sf?.value }; + return params + } ngOnInit(): void { this.initSF(); this.initST(); @@ -47,16 +56,24 @@ export class PartnerSaleStatisticsComponent implements OnInit { */ initST() { this.columns = [ - { title: '姓名', index: 'carNo', className: 'text-center' }, + { title: '联系人', index: 'carNo', className: 'text-center' }, { title: '手机号', render: 'carModelLabel', className: 'text-center' }, { title: '添加时间', index: 'carNo', className: 'text-center' }, { title: '本月新增客户', render: 'approvalStatus', className: 'text-center', sort: true }, { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, { title: '本月新增合伙人', render: 'approvalStatus1', className: 'text-center', sort: true }, { title: '合伙人总数', render: 'approvalStatus1', className: 'text-center', sort: true }, - { title: '本月已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, - { title: '累计已结算金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, + { title: '本月已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true }, + { title: '累计已结算金额(元)', render: 'approvalStatus3', className: 'text-right', sort: true }, ]; } + export() { + } + resetSF() { + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } } diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 017a9f27..91b30b99 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -20,6 +20,7 @@ import { ParterLevelConfigListComponent } from './level-config/components/list/l import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; +import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; const routes: Routes = [ { @@ -27,7 +28,7 @@ const routes: Routes = [ children: [ { path: '', redirectTo: 'index' }, { path: 'index', component: PartnerBusinessStatisticsIndexComponent }, - { path: 'partner/order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent }, + { path: 'partner/order-detail/:id', component: PartnerPartnerOrderDetailComponent }, { path: 'partner/custom-detail/:id', component: PartnerPartnerCustomDetailComponent }, { path: 'partner/custom-order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent }, { path: 'sale/custom-detail/:id', component: PartnerSaleCustomDetailComponent }, @@ -55,7 +56,8 @@ const routes: Routes = [ children: [ { path: 'particulars', component: ParterRebateManageMentParticularsComponent }, ] - }]; + }, +]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index ed9b3d2a..4932f777 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -14,6 +14,7 @@ import { PartnerPartnerCustomDetailComponent } from './business-statistics/compo import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; +import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -29,7 +30,8 @@ const COMPONENTS: any[] = [ ParterRebateManageMentParticularsComponent, PartnerSalePartnerDetailComponent, PartnerPartnerCustomOrderDetailComponent -]; +, + PartnerPartnerOrderDetailComponent]; @NgModule({ declarations: [...COMPONENTS], From 647d42690c78db1958fb3e94f62190b1f7eb6fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Wed, 9 Mar 2022 14:08:38 +0800 Subject: [PATCH 09/70] =?UTF-8?q?=E8=B4=A6=E6=88=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list/list.component.html | 9 ++++ .../components/list/list.component.spec.ts | 24 ++++++++++ .../components/list/list.component.ts | 45 +++++++++++++++++++ .../routes/partner/partner-routing.module.ts | 8 +++- src/app/routes/partner/partner.module.ts | 7 +-- src/app/routes/routes-routing.module.ts | 2 +- src/assets/mocks/menu-data.json | 26 ++++++----- 7 files changed, 106 insertions(+), 15 deletions(-) create mode 100644 src/app/routes/partner/account-management/components/list/list.component.html create mode 100644 src/app/routes/partner/account-management/components/list/list.component.spec.ts create mode 100644 src/app/routes/partner/account-management/components/list/list.component.ts 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 new file mode 100644 index 00000000..482ccb06 --- /dev/null +++ b/src/app/routes/partner/account-management/components/list/list.component.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/app/routes/partner/account-management/components/list/list.component.spec.ts b/src/app/routes/partner/account-management/components/list/list.component.spec.ts new file mode 100644 index 00000000..da38a52c --- /dev/null +++ b/src/app/routes/partner/account-management/components/list/list.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerAccountManagementListComponent } from './list.component'; + +describe('PartnerAccountManagementListComponent', () => { + let component: PartnerAccountManagementListComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [PartnerAccountManagementListComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerAccountManagementListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/account-management/components/list/list.component.ts b/src/app/routes/partner/account-management/components/list/list.component.ts new file mode 100644 index 00000000..f4133c97 --- /dev/null +++ b/src/app/routes/partner/account-management/components/list/list.component.ts @@ -0,0 +1,45 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFSchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; + +@Component({ + selector: 'app-partner-list', + templateUrl: './list.component.html', +}) +export class PartnerAccountManagementListComponent implements OnInit { + url = `/user`; + searchSchema: SFSchema = { + properties: { + no: { + type: 'string', + title: '编号' + } + } + }; + @ViewChild('st') private readonly st!: STComponent; + columns: STColumn[] = [ + { title: '编号', index: 'no' }, + { title: '调用次数', type: 'number', index: 'callNo' }, + { title: '头像', type: 'img', width: '50px', index: 'avatar' }, + { title: '时间', type: 'date', index: 'updatedAt' }, + { + title: '', + buttons: [ + // { text: '查看', click: (item: any) => `/form/${item.id}` }, + // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, + ] + } + ]; + + constructor(private http: _HttpClient, private modal: ModalHelper) { } + + ngOnInit(): void { } + + add(): void { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + +} diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 91b30b99..6cd0f164 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -21,6 +21,7 @@ import { ParterRebateManageMentParticularsComponent } from './rebate-management/ import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; +import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; const routes: Routes = [ { @@ -57,7 +58,12 @@ const routes: Routes = [ { path: 'particulars', component: ParterRebateManageMentParticularsComponent }, ] }, -]; + { + path: 'account-management', + children: [ + { path: 'list', component: PartnerAccountManagementListComponent }, + ] + }]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 4932f777..157b33d6 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -15,6 +15,7 @@ import { ParterRebateManageMentParticularsComponent } from './rebate-management/ import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; +import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -29,9 +30,9 @@ const COMPONENTS: any[] = [ PartnerSaleCustomDetailComponent, ParterRebateManageMentParticularsComponent, PartnerSalePartnerDetailComponent, - PartnerPartnerCustomOrderDetailComponent -, - PartnerPartnerOrderDetailComponent]; + PartnerPartnerCustomOrderDetailComponent, + PartnerPartnerOrderDetailComponent, + PartnerAccountManagementListComponent]; @NgModule({ declarations: [...COMPONENTS], diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index dc6d02c9..47be637f 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -72,7 +72,7 @@ const routes: Routes = [ path: 'download', loadChildren: () => import('./download/download.module').then(m => m.DownloadModule) } - ] + { path: 'account-management', loadChildren: () => import('./account-management/account-management.module').then((m) => m.AccountManagementModule) },] }, // passport { path: '', loadChildren: () => import('./passport/passport.module').then(m => m.PassportModule) }, diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 90c2212b..223b2212 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -508,16 +508,14 @@ { "text": "合伙人管理", "icon": "anticon anticon-dashboard", - "children": [ - { - "text": "业务统计", - "link": "/partner/business-statistics/index" + "children": [{ + "text": "业务统计", + "link": "/partner/business-statistics/index" }, { "text": "返佣管理", "group": true, - "children": [ - { + "children": [{ "text": "返佣配置", "link": "/partner/rebate/" }, @@ -532,12 +530,20 @@ ] }, { - "text": "销售渠道管理", - "link": "/partner/channel-sales/list" + "text": "销售渠道管理", + "link": "/partner/channel-sales/list" }, { - "text": "等级配置", - "link": "/partner/level-config/list" + "text": "等级配置", + "link": "/partner/level-config/list" + }, + { + "text": "账户管理", + "group": true, + "children": [{ + "text": "账户管理", + "link": "/partner/account-management/list" + }] } ] } From 957a66254fdf8ef46d5a610bdfc33ab219d37c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Wed, 9 Mar 2022 14:18:56 +0800 Subject: [PATCH 10/70] - --- .../components/list/list.component.html | 40 +++++-- .../components/list/list.component.ts | 106 +++++++++++++----- .../services/account-managemant.service.ts | 12 ++ src/app/routes/routes-routing.module.ts | 4 +- 4 files changed, 126 insertions(+), 36 deletions(-) create mode 100644 src/app/routes/partner/account-management/services/account-managemant.service.ts 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 482ccb06..eff67eb6 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 @@ -1,9 +1,35 @@ - - - - - - - + + + + + + + + + + + {{item.yskmoney}} + + +
{{item.approvalStatus1 | currency:' '}}
+
+ + {{item.yskmoney | currency:' + '}} + + + +
{{item.yskmoney | currency:' '}}
+
+ +
{{item.armoney | currency:' '}}
+
+
diff --git a/src/app/routes/partner/account-management/components/list/list.component.ts b/src/app/routes/partner/account-management/components/list/list.component.ts index f4133c97..e072fc3c 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.ts +++ b/src/app/routes/partner/account-management/components/list/list.component.ts @@ -1,7 +1,8 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; -import { SFSchema } from '@delon/form'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; +import { BussinessStatisticsService } from '../../../business-statistics/services/bussiness-statistics.service'; @Component({ selector: 'app-partner-list', @@ -9,37 +10,88 @@ import { ModalHelper, _HttpClient } from '@delon/theme'; }) export class PartnerAccountManagementListComponent implements OnInit { url = `/user`; - searchSchema: SFSchema = { - properties: { - no: { - type: 'string', - title: '编号' + schema!: SFSchema; + ui!: SFUISchema; + @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; + columns: STColumn[] = []; + + constructor(public service: BussinessStatisticsService) { } + /** + * 查询参数 + */ + get reqParams() { + const params = { ...this.sf?.value }; + return params + } + + ngOnInit(): void { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + abnormalCause: { + title: '合伙人名称', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '类型', + type: 'string', + default: '', + enum: [ + { + label: '全部', + value: '' + }, + { + label: '个人', + value: '1' + }, + { + label: '企业', + value: '2' + } + ], + ui: { + widget: 'select' + }, + }, } } - }; - @ViewChild('st') private readonly st!: STComponent; - columns: STColumn[] = [ - { title: '编号', index: 'no' }, - { title: '调用次数', type: 'number', index: 'callNo' }, - { title: '头像', type: 'img', width: '50px', index: 'avatar' }, - { title: '时间', type: 'date', index: 'updatedAt' }, - { - title: '', - buttons: [ - // { text: '查看', click: (item: any) => `/form/${item.id}` }, - // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, - ] - } - ]; + this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } }; + } + /** + * 初始化数据列表 + */ + initST() { + this.columns = [ + { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 }, + { title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 }, + { title: '注册时间', index: 'carNo', className: 'text-center', width: 150 }, + { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, + { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, + { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 }, + { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 }, + { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 }, + { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 }, + ]; + } - constructor(private http: _HttpClient, private modal: ModalHelper) { } + resetSF() { + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } - ngOnInit(): void { } + export() { - add(): void { - // this.modal - // .createStatic(FormEditComponent, { i: { id: 0 } }) - // .subscribe(() => this.st.reload()); } } 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 new file mode 100644 index 00000000..3ca08cb0 --- /dev/null +++ b/src/app/routes/partner/account-management/services/account-managemant.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root' +}) +export class AccountManagemantService extends BaseService { + + constructor(public injector: Injector) { + super(injector) + } +} diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index 47be637f..68b60fe7 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -72,7 +72,7 @@ const routes: Routes = [ path: 'download', loadChildren: () => import('./download/download.module').then(m => m.DownloadModule) } - { path: 'account-management', loadChildren: () => import('./account-management/account-management.module').then((m) => m.AccountManagementModule) },] + ] }, // passport { path: '', loadChildren: () => import('./passport/passport.module').then(m => m.PassportModule) }, @@ -92,4 +92,4 @@ const routes: Routes = [ ], exports: [RouterModule] }) -export class RouteRoutingModule {} +export class RouteRoutingModule { } From b848978d70bcacd6c0e21aaf6ac491660af70e51 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 9 Mar 2022 14:49:59 +0800 Subject: [PATCH 11/70] fix bug --- .../components/list/particulars.component.ts | 6 +- .../rebate-record.component.html | 60 ++++++ .../rebate-record/rebate-record.component.ts | 188 ++++++++++++++++++ 3 files changed, 251 insertions(+), 3 deletions(-) create mode 100644 src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html create mode 100644 src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts diff --git a/src/app/routes/partner/rebate-management/components/list/particulars.component.ts b/src/app/routes/partner/rebate-management/components/list/particulars.component.ts index 88bc6e8f..55ed5dd9 100644 --- a/src/app/routes/partner/rebate-management/components/list/particulars.component.ts +++ b/src/app/routes/partner/rebate-management/components/list/particulars.component.ts @@ -136,7 +136,7 @@ export class ParterRebateManageMentParticularsComponent implements OnInit { index: 'name1' }, { - title: '返佣金额(元)', + title: '预估返佣金额(元)', index: 'name1' }, { @@ -152,11 +152,11 @@ export class ParterRebateManageMentParticularsComponent implements OnInit { index: 'name1' }, { - title: '合伙人名称', + title: '销售渠道', index: 'name1' }, { - title: '网络货运人', + title: '合伙人名称', index: 'name1' }, { diff --git a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html new file mode 100644 index 00000000..0ebf82f0 --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html @@ -0,0 +1,60 @@ + + + +
+ +
+ +
+ + + +
+ +
+
+ + + + +
+
+
+
+ + + + + + diff --git a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts new file mode 100644 index 00000000..55ed5dd9 --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts @@ -0,0 +1,188 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort, ShipperBaseService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { RebateManagementService } from '../../services/rebate-management.service'; + +@Component({ + selector: 'app-parter-channel-rebate-management-particulars', + templateUrl: './particulars.component.html' +}) +export class ParterRebateManageMentParticularsComponent 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: RebateManagementService, + private modalService: NzModalService, + public shipperservice: ShipperBaseService + ) {} + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + /** + * 查询参数 + */ + get reqParams() { + const params: any = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + return { + ...params, + deadlineTime: { + start: this.sf?.value?.deadlineTime?.[0] || '', + end: this.sf?.value?.deadlineTime?.[1] || '', + }, + }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + name: { + type: 'string', + title: '订单号' + }, + phone: { + type: 'string', + title: '付款单号' + }, + phone2: { + type: 'string', + title: '下单客户' + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value + }, + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } + }, + phone3: { + type: 'string', + title: '合伙人名称', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + }, + } + }, + deadlineTime: { + title: '时间范围', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value + }, + allowClear: true + } as SFDateWidgetSchema + } + } + }; + this.ui = { + '*': { + spanLabelFixed: 140, + 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: '销售渠道', + index: 'name1' + }, + { + title: '合伙人名称', + index: 'name1' + }, + { + title: '合伙人等级', + index: 'name1' + }, + { + title: '管理费比例', + index: 'name1' + }, + { + title: '固定结算费率', + index: 'name1' + }, + { + title: '返佣时间', + index: 'name1' + } + ]; + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } +} From 737cfd55bba3fc6d9421518be01c80e3a45a9577 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 9 Mar 2022 15:16:10 +0800 Subject: [PATCH 12/70] fix bug --- .../routes/partner/partner-routing.module.ts | 4 +- src/app/routes/partner/partner.module.ts | 14 +- .../particulars.component.html | 0 .../particulars.component.ts | 0 .../rebate-record.component.html | 29 +-- .../rebate-record/rebate-record.component.ts | 113 ++++------- .../record-detail.component.html | 34 ++++ .../record-detail/record-detail.component.ts | 189 ++++++++++++++++++ .../supply-management.module.ts | 6 +- src/assets/mocks/menu-data.json | 2 +- 10 files changed, 289 insertions(+), 102 deletions(-) rename src/app/routes/partner/rebate-management/components/{list => particulars}/particulars.component.html (100%) rename src/app/routes/partner/rebate-management/components/{list => particulars}/particulars.component.ts (100%) create mode 100644 src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html create mode 100644 src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 6cd0f164..96ed5adc 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -17,11 +17,12 @@ import { ParterChannelSalesEditComponent } from './channel-sales/components/edit import { ParterChannelSalesListComponent } from './channel-sales/components/list/list.component'; import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component'; import { ParterLevelConfigListComponent } from './level-config/components/list/list.component'; -import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; +import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/particulars/particulars.component'; import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; +import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; const routes: Routes = [ { @@ -56,6 +57,7 @@ const routes: Routes = [ path: 'rebate', children: [ { path: 'particulars', component: ParterRebateManageMentParticularsComponent }, + { path: 'record', component: ParterRebateManageMentRecordComponent }, ] }, { diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 157b33d6..830876e7 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -1,3 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-03-09 14:34:55 + * @LastEditors : Shiming + * @LastEditTime : 2022-03-09 14:56:46 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner.module.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { SharedModule } from '@shared'; @@ -11,11 +21,12 @@ import { PartnerPartnerStatisticsComponent } from './business-statistics/compone import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component'; import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.component'; import { PartnerPartnerCustomDetailComponent } from './business-statistics/components/partner-custom-detail/partner-custom-detail.component'; -import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; +import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/particulars/particulars.component'; import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; +import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -29,6 +40,7 @@ const COMPONENTS: any[] = [ PartnerPartnerCustomDetailComponent, PartnerSaleCustomDetailComponent, ParterRebateManageMentParticularsComponent, + ParterRebateManageMentRecordComponent, PartnerSalePartnerDetailComponent, PartnerPartnerCustomOrderDetailComponent, PartnerPartnerOrderDetailComponent, diff --git a/src/app/routes/partner/rebate-management/components/list/particulars.component.html b/src/app/routes/partner/rebate-management/components/particulars/particulars.component.html similarity index 100% rename from src/app/routes/partner/rebate-management/components/list/particulars.component.html rename to src/app/routes/partner/rebate-management/components/particulars/particulars.component.html diff --git a/src/app/routes/partner/rebate-management/components/list/particulars.component.ts b/src/app/routes/partner/rebate-management/components/particulars/particulars.component.ts similarity index 100% rename from src/app/routes/partner/rebate-management/components/list/particulars.component.ts rename to src/app/routes/partner/rebate-management/components/particulars/particulars.component.ts diff --git a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html index 0ebf82f0..9ddc7ac3 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html @@ -4,15 +4,14 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 20:14:21 - * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\list\\particulars.component.html + * @LastEditTime : 2022-03-09 15:04:50 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-record\\rebate-record.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. -->
-
-
- - - -
- -
- - - - -
-
+ + + +
@@ -47,7 +33,6 @@ value - }, - allowClear: true, - asyncData: () => this.shipperservice.getNetworkFreightForwarder() - } - }, - phone3: { - type: 'string', - title: '合伙人名称', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - }, - } - }, - deadlineTime: { - title: '时间范围', - type: 'string', - ui: { - widget: 'date', - mode: 'range', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - }, - allowClear: true - } as SFDateWidgetSchema - } } }; this.ui = { @@ -124,35 +89,11 @@ export class ParterRebateManageMentParticularsComponent implements OnInit { initST() { this.columns = [ { - title: '订单号', + title: '月份', index: 'name1' }, { - title: '订单金额(元)', - index: 'name1' - }, - { - title: '付款金额(元)', - index: 'name1' - }, - { - title: '预估返佣金额(元)', - index: 'name1' - }, - { - title: '附加费率', - index: 'name1' - }, - { - title: '下单客户', - index: 'name1' - }, - { - title: '网络货运人', - index: 'name1' - }, - { - title: '销售渠道', + title: '返佣金额(元)', index: 'name1' }, { @@ -160,7 +101,7 @@ export class ParterRebateManageMentParticularsComponent implements OnInit { index: 'name1' }, { - title: '合伙人等级', + title: '实际等级', index: 'name1' }, { @@ -168,16 +109,38 @@ export class ParterRebateManageMentParticularsComponent implements OnInit { index: 'name1' }, { - title: '固定结算费率', + title: '返佣时间', index: 'name1' }, { - title: '返佣时间', + title: '异常反馈', index: 'name1' + }, + { + title: '操作', + fixed: 'right', + width: '90px', + className: 'text-left', + buttons: [ + { + text: '明细', + click: _record => this.viewEvaluate(_record), + } + ] } ]; } + /** + *查看详情 + */ + viewEvaluate(item: any) { + // this.modalService + this.modal.createStatic(ParterRebateManageMenRecordDetailComponent, {i:item}).subscribe((res: boolean)=> { + if(res) { + } + }) + } /** * 重置表单 */ diff --git a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html new file mode 100644 index 00000000..65099230 --- /dev/null +++ b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html @@ -0,0 +1,34 @@ + +
+ +
+ + + diff --git a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts new file mode 100644 index 00000000..b5c70083 --- /dev/null +++ b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts @@ -0,0 +1,189 @@ +import { ModalHelper } from '@delon/theme'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort, ShipperBaseService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { RebateManagementService } from '../../services/rebate-management.service'; + +@Component({ + selector: 'app-parter-channel-rebate-management-record-detail', + templateUrl: './record-detail.component.html' +}) +export class ParterRebateManageMenRecordDetailComponent 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: RebateManagementService, + private modalService: NzModalService, + public shipperservice: ShipperBaseService, + ) {} + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + /** + * 查询参数 + */ + get reqParams() { + const params: any = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + return { + ...params, + deadlineTime: { + start: this.sf?.value?.deadlineTime?.[0] || '', + end: this.sf?.value?.deadlineTime?.[1] || '', + }, + }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + name: { + type: 'string', + title: '订单号' + }, + phone: { + type: 'string', + title: '付款单号' + }, + phone2: { + type: 'string', + title: '下单客户' + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value + }, + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } + }, + phone3: { + type: 'string', + title: '合伙人名称', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + }, + } + }, + deadlineTime: { + title: '时间范围', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value + }, + allowClear: true + } as SFDateWidgetSchema + } + } + }; + this.ui = { + '*': { + spanLabelFixed: 140, + 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: '销售渠道', + index: 'name1' + }, + { + title: '合伙人名称', + index: 'name1' + }, + { + title: '合伙人等级', + index: 'name1' + }, + { + title: '管理费比例', + index: 'name1' + }, + { + title: '固定结算费率', + index: 'name1' + }, + { + title: '返佣时间', + index: 'name1' + } + ]; + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } +} diff --git a/src/app/routes/supply-management/supply-management.module.ts b/src/app/routes/supply-management/supply-management.module.ts index 7ab115ec..233c6ed7 100644 --- a/src/app/routes/supply-management/supply-management.module.ts +++ b/src/app/routes/supply-management/supply-management.module.ts @@ -4,13 +4,14 @@ * @Author : Shiming * @Date : 2021-12-20 10:13:02 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:26:40 + * @LastEditTime : 2022-03-09 14:53:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\supply-management.module.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ import { NgModule, Type } from '@angular/core'; import { SharedModule } from '@shared'; +import { ParterRebateManageMenRecordDetailComponent } from '../partner/rebate-management/model/record-detail/record-detail.component'; import { CarAddDriverComponent } from './components/add-driver/add-driver.component'; import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component'; import { CarAddmodalComponent } from './components/addmodal/addmodal.component'; @@ -61,7 +62,8 @@ const COMPONENTS: Type[] = [ SupplyManagementReleasePublishComponent, SupplyManagementBulkReleasePublishComponent, TranAgreementComponent, - SupplyManagementBulkAssignedCarComponent + SupplyManagementBulkAssignedCarComponent, + ParterRebateManageMenRecordDetailComponent ]; @NgModule({ diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 223b2212..ef1ba117 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -525,7 +525,7 @@ }, { "text": "返佣记录", - "link": "/partner/rebate/" + "link": "/partner/rebate/record" } ] }, From b0a7611ae4b7b1bb3a177ac9ebbe3598abcb031f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Wed, 9 Mar 2022 16:33:45 +0800 Subject: [PATCH 13/70] =?UTF-8?q?=E6=9B=BF=E6=8D=A2containsAllLable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-list/contract-list.component.ts | 136 +++--- .../contract-template.component.ts | 30 +- .../payment-order/payment-order.component.ts | 32 +- .../components/list/list.component.ts | 60 +-- .../components/bulk/bulk.component.ts | 76 +-- .../compliance-audit.component.ts | 214 ++++---- .../receipts-audit.component.ts | 34 +- .../components/risk/risk.component.ts | 62 +-- .../components/vehicle/vehicle.component.ts | 456 +++++++++--------- .../components/list/list.component.html | 14 +- .../components/list/list.component.ts | 72 +-- .../virtual-account-detail.component.html | 27 ++ .../virtual-account-detail.component.spec.ts | 24 + .../virtual-account-detail.component.ts | 174 +++++++ .../services/account-managemant.service.ts | 1 + .../routes/partner/partner-routing.module.ts | 4 +- src/app/routes/partner/partner.module.ts | 4 +- .../components/bulk/bulk.component.ts | 240 ++++----- .../release-publish.component.ts | 174 +++---- .../components/vehicle/vehicle.component.ts | 10 +- .../cancellation-invoice.component.ts | 12 +- .../components/audit/audit.component.ts | 36 +- .../vehicle/components/list/list.component.ts | 8 +- .../abnormal-appear.component.ts | 334 ++++++------- .../components/bulk/bulk.component.ts | 150 +++--- .../components/vehicle/vehicle.component.ts | 80 +-- .../dict-select/dict-select.component.ts | 4 +- .../dict-select/dict-select.widget.html | 2 +- 28 files changed, 1365 insertions(+), 1105 deletions(-) create mode 100644 src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html create mode 100644 src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.spec.ts create mode 100644 src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts diff --git a/src/app/routes/contract-management/components/contract-list/contract-list.component.ts b/src/app/routes/contract-management/components/contract-list/contract-list.component.ts index dd3947da..c9777ad6 100644 --- a/src/app/routes/contract-management/components/contract-list/contract-list.component.ts +++ b/src/app/routes/contract-management/components/contract-list/contract-list.component.ts @@ -27,17 +27,17 @@ export class ContractManagementContractListComponent implements OnInit { /** * 查询参数 */ - get reqParams() { + get reqParams() { const params = { ...this.sf?.value, } delete params.signTime; delete params._$expand; - if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { + if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { params.signTime = { start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), - } + } } return { ...params @@ -49,7 +49,7 @@ export class ContractManagementContractListComponent implements OnInit { private nzModalService: NzModalService, private router: Router, private datePipe: DatePipe, - ) {} + ) { } ngOnInit(): void { this.initST() @@ -58,7 +58,7 @@ export class ContractManagementContractListComponent implements OnInit { /** * 初始化数据列表 */ - initST() { + initST() { this.columns = [ { title: '合同编号', @@ -70,13 +70,13 @@ export class ContractManagementContractListComponent implements OnInit { title: '单据类型', width: '100px', className: 'text-center', - index:'documentType' + index: 'documentType' }, { title: '合同名称', width: '100px', className: 'text-center', - index:'contractName' + index: 'contractName' }, { title: '托运人', index: 'shipperName', width: '120px', className: 'text-center' }, { title: '承运人', index: 'carrierName', width: '120px', className: 'text-center' }, @@ -108,69 +108,69 @@ export class ContractManagementContractListComponent implements OnInit { '7': { text: '已拒签', color: 'warning' }, }, }, - + ]; } - /** - * 初始化查询表单 - */ - initSF() { - this.schema = { - properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, - contractCode: { - type: 'string', - title: '合同编号', - }, - businessCode: { - type: 'string', - title: '业务单号' - }, - shipperName: { - type: 'string', - title: '托运人' - }, - carrierName: { - type: 'string', - title: '承运人', - ui: { - visibleIf: { - _$expand: (value: boolean) => value, - }, - } - }, - documentType: { - title: '单据类型', - type: 'string', - default: '', - ui: { - widget: 'dict-select', - containsAllLable: true, - params: { dictKey: 'contract:document:type' }, - containAllLable:true, - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, - }, - signTime: { - title: '签署日期', - type: 'string', - ui: { - widget: 'custom', - visibleIf: { - _$expand: (value: boolean) => value, - }, - } - }, + /** +* 初始化查询表单 +*/ + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + contractCode: { + type: 'string', + title: '合同编号', }, - type: 'object', - }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; - } - /** - * 查询字段个数 - */ + businessCode: { + type: 'string', + title: '业务单号' + }, + shipperName: { + type: 'string', + title: '托运人' + }, + carrierName: { + type: 'string', + title: '承运人', + ui: { + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, + documentType: { + title: '单据类型', + type: 'string', + default: '', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'contract:document:type' }, + containAllLable: true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFSelectWidgetSchema, + }, + signTime: { + title: '签署日期', + type: 'string', + ui: { + widget: 'custom', + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, + }, + type: 'object', + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + /** +* 查询字段个数 +*/ get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; } @@ -239,7 +239,7 @@ export class ContractManagementContractListComponent implements OnInit { /** * 伸缩查询条件 */ - expandToggle(): void { + expandToggle(): void { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } diff --git a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts index 3a28c9f8..416936b7 100644 --- a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts +++ b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts @@ -26,23 +26,23 @@ export class ContractManagementTemplateComponent implements OnInit { columns: STColumn[] = []; datass: any = [ { - one: '1', - two: '1', - three: '1', - id: 1 - }, + one: '1', + two: '1', + three: '1', + id: 1 + }, { - one: '2', - two: '2', - three: '2', - id: 2 - }, -]; + one: '2', + two: '2', + three: '2', + id: 2 + }, + ]; constructor( public service: ContractManagementService, private modal: NzModalService, private router: Router - ) { } + ) { } /** * 查询参数 @@ -80,7 +80,7 @@ export class ContractManagementTemplateComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'contract:template:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -178,7 +178,7 @@ export class ContractManagementTemplateComponent implements OnInit { } edit(value: any) { - this.router.navigate(['/contract-management/template/detail/' + value.id],{ + this.router.navigate(['/contract-management/template/detail/' + value.id], { queryParams: { status: 2 } @@ -195,7 +195,7 @@ export class ContractManagementTemplateComponent implements OnInit { window.history.go(-1) } view(value: any) { - this.router.navigate(['/contract-management/template/detail/' + value.id],{ + this.router.navigate(['/contract-management/template/detail/' + value.id], { queryParams: { status: 3 } diff --git a/src/app/routes/financial-management/components/payment-order/payment-order.component.ts b/src/app/routes/financial-management/components/payment-order/payment-order.component.ts index 95454878..179783d9 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order.component.ts +++ b/src/app/routes/financial-management/components/payment-order/payment-order.component.ts @@ -23,26 +23,26 @@ export class PaymentOrderComponent implements OnInit { _$expand = false; selectedRows: any[] = []; - 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) { - let params = {...this.sf.value}; - if(params.payDate){ - const payDate = {start:this.sf?.value?.payDate?.[0],end:this.sf?.value?.payDate?.[1]} - params.payDate = payDate; + let params = { ...this.sf.value }; + if (params.payDate) { + const payDate = { start: this.sf?.value?.payDate?.[0], end: this.sf?.value?.payDate?.[1] } + params.payDate = payDate; } - if(params.payDate2){ - const payDate2 = {start:this.sf?.value?.payDate2?.[0],end:this.sf?.value?.payDate2?.[1]} - params.payDate2 = payDate2; + if (params.payDate2) { + const payDate2 = { start: this.sf?.value?.payDate2?.[0], end: this.sf?.value?.payDate2?.[1] } + params.payDate2 = payDate2; } - if(params.createTime){ - const createTime = {start:this.sf?.value?.createTime?.[0],end:this.sf?.value?.createTime?.[1]} - params.createTime = createTime; + if (params.createTime) { + const createTime = { start: this.sf?.value?.createTime?.[0], end: this.sf?.value?.createTime?.[1] } + params.createTime = createTime; } - Object.assign(requestOptions.body,params ); + Object.assign(requestOptions.body, params); } return requestOptions; }; @@ -113,7 +113,7 @@ export class PaymentOrderComponent implements OnInit { title: '付款状态', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'refund:apply:status' }, placeholder: '请选择' } @@ -123,7 +123,7 @@ export class PaymentOrderComponent implements OnInit { title: '付款类型', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'pay:type' }, placeholder: '请选择', visibleIf: { @@ -136,7 +136,7 @@ export class PaymentOrderComponent implements OnInit { title: '付款方式', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'pay:mode' }, placeholder: '请选择', visibleIf: { diff --git a/src/app/routes/insurance-management/components/list/list.component.ts b/src/app/routes/insurance-management/components/list/list.component.ts index 7cc54aaa..8f2522e5 100644 --- a/src/app/routes/insurance-management/components/list/list.component.ts +++ b/src/app/routes/insurance-management/components/list/list.component.ts @@ -64,7 +64,7 @@ export class insuranceManagementListComponent implements OnInit { public shipperservice: ShipperBaseService, private router: Router, private modale: ModalHelper, - ) {} + ) { } /** * 查询参数 @@ -176,7 +176,7 @@ export class insuranceManagementListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'insure:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -238,7 +238,7 @@ export class insuranceManagementListComponent implements OnInit { }, } as SFSelectWidgetSchema }, - + driverName: { title: '承运司机', type: 'string', @@ -263,7 +263,7 @@ export class insuranceManagementListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'insure:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -321,33 +321,33 @@ export class insuranceManagementListComponent implements OnInit { } } as SFDateWidgetSchema }, - + }, type: 'object' }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) - ) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); - } + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 初始化数据列表 */ @@ -501,7 +501,7 @@ export class insuranceManagementListComponent implements OnInit { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } - tabChange(item: any) {} + tabChange(item: any) { } /** * 重置表单 */ @@ -541,8 +541,8 @@ export class insuranceManagementListComponent implements OnInit { } }); } - // 保险配置 - changeOrder() { - this.router.navigate(['/insurance-management/list-set', 1]); - } + // 保险配置 + changeOrder() { + this.router.navigate(['/insurance-management/list-set', 1]); + } } diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index 734c6771..917aa662 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -72,7 +72,7 @@ export class OrderManagementBulkComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router - ) {} + ) { } /** * 查询参数 @@ -257,7 +257,7 @@ export class OrderManagementBulkComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -312,7 +312,7 @@ export class OrderManagementBulkComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -323,7 +323,7 @@ export class OrderManagementBulkComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, containAllLable: true, visibleIf: { @@ -372,27 +372,27 @@ export class OrderManagementBulkComponent implements OnInit { }; this.uiView = { '*': { spanLabelFixed: 80, grid: { span: 12, gutter: 4 } } }; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) - ) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); - } + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 初始化数据列表 */ @@ -510,7 +510,7 @@ export class OrderManagementBulkComponent implements OnInit { click: _record => this.cancellation(_record), iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1', - acl: { ability: ['ORDER-BULK-signBulkOrder'] }, + acl: { ability: ['ORDER-BULK-signBulkOrder'] }, }, { text: '申请退款 ', @@ -605,7 +605,7 @@ export class OrderManagementBulkComponent implements OnInit { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } - tabChange(item: any) {} + tabChange(item: any) { } /** * 重置表单 */ @@ -617,8 +617,8 @@ export class OrderManagementBulkComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} - audit(item: any) {} + importGoodsSource() { } + audit(item: any) { } /* * 审核关闭弹窗 @@ -639,7 +639,7 @@ export class OrderManagementBulkComponent implements OnInit { /** * 审核通过按钮 */ - handleOK() {} + handleOK() { } OpenPrice(item: any) { this.changeId = item.id; this.isVisible = true; @@ -692,10 +692,10 @@ export class OrderManagementBulkComponent implements OnInit { nzFooter: null }); modal.afterClose.subscribe((res: any) => { - if(res) { - this.st.reload(1); - this.getGoodsSourceStatistical(); - } + if (res) { + this.st.reload(1); + this.getGoodsSourceStatistical(); + } }); } }); @@ -772,10 +772,10 @@ export class OrderManagementBulkComponent implements OnInit { changeOrder(value: any) { this.router.navigate(['order-management/bulk-detailChange', value.id]); } - /** - *申请退款 - */ - applyRefund(item: any) { + /** +*申请退款 +*/ + applyRefund(item: any) { const modalRef = this.modal.create({ nzTitle: '申请退款', nzContent: OneCarOrderCancelConfirmComponent, @@ -786,7 +786,7 @@ export class OrderManagementBulkComponent implements OnInit { nzFooter: null }); modalRef.afterClose.subscribe((res: boolean) => { - if(res) { + if (res) { this.resetSF; this.st.load(); } diff --git a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts index d6e0fa51..d890942d 100644 --- a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts +++ b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts @@ -51,7 +51,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router - ) {} + ) { } /** * 查询参数 @@ -232,7 +232,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -258,7 +258,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -282,27 +282,27 @@ export class OrderManagementComplianceAuditComponent implements OnInit { }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) - ) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); - } + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 初始化数据列表 */ @@ -428,7 +428,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { className: 'text-center', index: 'applyUserName' }, - { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, + { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, { title: '操作', fixed: 'right', @@ -441,7 +441,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { { text: '撤销', click: (_record) => this.revoke(_record), - iif: item => item.handleStatus === '1' || item.handleStatus === 1, + iif: item => item.handleStatus === '1' || item.handleStatus === 1, }, ], }, @@ -462,16 +462,20 @@ export class OrderManagementComplianceAuditComponent implements OnInit { index: 'amountAfterChange', render: 'amountAfterChange' }, - { title: '变更值', + { + title: '变更值', index: 'amountchangeValue', render: 'amountchangeValue', width: '120px', - className: 'text-center' }, - { title: '变更后', + className: 'text-center' + }, + { + title: '变更后', index: 'amountBeforeChange', render: 'amountBeforeChange', width: '120px', - className: 'text-center' } + className: 'text-center' + } ]; } /** @@ -480,30 +484,30 @@ export class OrderManagementComplianceAuditComponent implements OnInit { get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; } - /** - * 浮动费用查看 - */ - FloatView(item: any) { - console.log(item) - this.changeViewId = item.id; - this.service.request(this.service.$api_getChangeRecordWholeDetail, {id: this.changeViewId}).subscribe((res) => { - this.ViewCause = res; + /** +* 浮动费用查看 +*/ + FloatView(item: any) { + console.log(item) + this.changeViewId = item.id; + this.service.request(this.service.$api_getChangeRecordWholeDetail, { id: this.changeViewId }).subscribe((res) => { + this.ViewCause = res; + }) + this.isVisibleView = true + } + revoke(item: any) { + this.modal.confirm({ + nzTitle: '是否确定立即撤销费用变更!', + nzOnOk: () => + this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe((res) => { + console.log(res) + if (res) { + this.service.msgSrv.success('撤销成功!') + this.stFloat.reload() + } }) - this.isVisibleView = true - } - revoke(item: any) { - this.modal.confirm({ - nzTitle: '是否确定立即撤销费用变更!', - nzOnOk: () => - this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id}).subscribe((res) => { - console.log(res) - if(res) { - this.service.msgSrv.success('撤销成功!') - this.stFloat.reload() - } - }) - }); - } + }); + } /** * 伸缩查询条件 */ @@ -511,7 +515,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } - tabChange(item: any) {} + tabChange(item: any) { } /** * 重置表单 */ @@ -523,7 +527,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} + importGoodsSource() { } OpenPrice(item: any) { this.changeId = item.id; this.isVisible = true; @@ -580,24 +584,24 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } }; } - /* - * 审核关闭弹窗 - */ - handleCancel(value?: string) { - if(value === '0') { - this.isVisible = false; - } else if(value === '1') { - this.isVisibleRE = false; - } else if(value === '2') { - this.isVisibleView = false; - } + /* + * 审核关闭弹窗 + */ + handleCancel(value?: string) { + if (value === '0') { + this.isVisible = false; + } else if (value === '1') { + this.isVisibleRE = false; + } else if (value === '2') { + this.isVisibleView = false; } - /** - * 审核通过按钮 - */ + } + /** +* 审核通过按钮 +*/ handleOK() { let idList: any[] = []; - if(this.selectedRows.length > 0) { + if (this.selectedRows.length > 0) { this.selectedRows.forEach(item => { idList.push(item.id); }); @@ -614,55 +618,55 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this.service.msgSrv.success('提交成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical() } }); } - /** - * 审核拒绝按钮 - */ - reject() { - if(!this.sfView.value.complianceRemark) { - this.service.msgSrv.error('备注不能为空!'); - return; - } - let idList: any[] = []; - if(this.selectedRows.length > 0) { - this.selectedRows.forEach(item => { - idList.push(item.id); - }); - } else { - idList.push(this.sfView.value.billCode) - } - const parms = { - ids: idList, - complianceRemark: this.sfView.value.complianceRemark, - complianceStatus: 2, - }; - this.service.request(this.service.$api_get_updateBillByCompliance, parms).subscribe(res => { - if (res) { - this.service.msgSrv.success('提交成功!'); - this.isVisibleRE = false; - this.st?.load(1); - this.getGoodsSourceStatistical() - } - }); + /** + * 审核拒绝按钮 + */ + reject() { + if (!this.sfView.value.complianceRemark) { + this.service.msgSrv.error('备注不能为空!'); + return; } - /** - *合规抽查 - */ + let idList: any[] = []; + if (this.selectedRows.length > 0) { + this.selectedRows.forEach(item => { + idList.push(item.id); + }); + } else { + idList.push(this.sfView.value.billCode) + } + const parms = { + ids: idList, + complianceRemark: this.sfView.value.complianceRemark, + complianceStatus: 2, + }; + this.service.request(this.service.$api_get_updateBillByCompliance, parms).subscribe(res => { + if (res) { + this.service.msgSrv.success('提交成功!'); + this.isVisibleRE = false; + this.st?.load(1); + this.getGoodsSourceStatistical() + } + }); + } + /** +*合规抽查 +*/ audit(item?: any) { if (item) { this.isVisibleRE = true; this.auditId = item.id; this.initSTAudit(1); } else { - if(this.selectedRows.length <= 0) { + if (this.selectedRows.length <= 0) { this.service.msgSrv.error('请选择订单!') return; } else { - this.isVisibleRE = true; - this.initSTAudit(2); + this.isVisibleRE = true; + this.initSTAudit(2); } } } diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index bdce2344..a32f28c6 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -41,7 +41,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router - ) {} + ) { } /** * 查询参数 @@ -207,7 +207,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -233,7 +233,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -244,7 +244,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, containAllLable: true, visibleIf: { @@ -347,7 +347,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { { text: '修改    ', click: _record => this.modification(_record), - iif: item => item.auditStatus == '1' , + iif: item => item.auditStatus == '1', acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, }, { @@ -373,7 +373,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } - tabChange(item: any) {} + tabChange(item: any) { } /** * 重置表单 */ @@ -385,13 +385,13 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} - audit(item: any) {} + importGoodsSource() { } + audit(item: any) { } /** * 审核通过按钮 */ - handleOK() {} + handleOK() { } OpenPrice(item: any) { this.isVisible = true; } @@ -410,12 +410,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { modalRef.afterClose.subscribe((result: any) => { this.st.load(1); this.getGoodsSourceStatistical() - }); + }); } // 生成电子单据 generate(item: any, sts?: number) { let text = '查看凭证'; - if(sts == 2) { + if (sts == 2) { text = '生成电子单据'; } const modalRef = this.modal.create({ @@ -431,23 +431,23 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { modalRef.afterClose.subscribe((result: any) => { this.st.load(1); this.getGoodsSourceStatistical() - }); + }); } // 通过 sign(item?: any) { let params: any = [] let text = ''; - if(item === '1') { - if(this.selectedRows.length <= 0) { + if (item === '1') { + if (this.selectedRows.length <= 0) { this.service.msgSrv.error('请选择订单!') return } this.selectedRows.forEach(ite => { params.push(ite.id); }); - text = `已选择${this.selectedRows.length}条订单,确认批量通过审核吗?` + text = `已选择${this.selectedRows.length}条订单,确认批量通过审核吗?` } else { - text = `确认通过审核吗?` + text = `确认通过审核吗?` params.push(item.id); } console.log(this.selectedRows) @@ -470,7 +470,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { } // 批量生成电子单据 sign1(item?: any) { - if(this.selectedRows.length <= 0) { + if (this.selectedRows.length <= 0) { this.service.msgSrv.error('请选择订单!') return } diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index 541c4424..b08f0a3d 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -40,34 +40,34 @@ export class OrderManagementRiskComponent implements OnInit { public shipperservice: ShipperBaseService, private modal: NzModalService, public router: Router - ) {} + ) { } /** * 查询参数 */ - get reqParams() { + get reqParams() { // const a:any = {}; // if(this.resourceStatus) { - // a.representationsStatus = this.resourceStatus + // a.representationsStatus = this.resourceStatus // } // return { // ...a, // ...this.sf?.value, // }; - const a:any = {}; - if(this.resourceStatus) { - a.representationsStatus = this.resourceStatus + const a: any = {}; + if (this.resourceStatus) { + a.representationsStatus = this.resourceStatus } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '', }, - }; + }; } search() { this.st?.load(1); @@ -84,17 +84,17 @@ export class OrderManagementRiskComponent implements OnInit { getGoodsSourceStatistical() { this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => { if (res) { - res.forEach((element: any) => { - if(element.representationsStatusLabel === '待申述') { - this.tabs.stayQuantity = element.quantity - } else if (element.representationsStatusLabel === '申诉失败') { - this.tabs.receivedQuantity = element.quantity - } else if (element.representationsStatusLabel === '申述成功') { - this.tabs.cancelQuantity = element.quantity - } else if (element.representationsStatusLabel === '申诉中') { - this.tabs.underwayQuantity = element.quantity - } - }); + res.forEach((element: any) => { + if (element.representationsStatusLabel === '待申述') { + this.tabs.stayQuantity = element.quantity + } else if (element.representationsStatusLabel === '申诉失败') { + this.tabs.receivedQuantity = element.quantity + } else if (element.representationsStatusLabel === '申述成功') { + this.tabs.cancelQuantity = element.quantity + } else if (element.representationsStatusLabel === '申诉中') { + this.tabs.underwayQuantity = element.quantity + } + }); } }) } @@ -168,7 +168,7 @@ export class OrderManagementRiskComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'freight:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -180,7 +180,7 @@ export class OrderManagementRiskComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'BulkFreightUnitPriceType' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -307,7 +307,7 @@ export class OrderManagementRiskComponent implements OnInit { { text: '审核', click: _record => this.audit(_record), - iif: item => item.representationsStatus == '1' || item.representationsStatus == '2' , + iif: item => item.representationsStatus == '1' || item.representationsStatus == '2', acl: { ability: ['ORDER-RISK-audit'] }, }, { @@ -405,7 +405,7 @@ export class OrderManagementRiskComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} + importGoodsSource() { } /* * 审核关闭弹窗 @@ -418,7 +418,7 @@ export class OrderManagementRiskComponent implements OnInit { */ handleOK() { let idList: any[] = []; - if(this.selectedRows.length > 0) { + if (this.selectedRows.length > 0) { this.selectedRows.forEach(item => { idList.push(item.id); }); @@ -435,7 +435,7 @@ export class OrderManagementRiskComponent implements OnInit { this.service.msgSrv.success('审核通过成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical() } }); } @@ -444,14 +444,14 @@ export class OrderManagementRiskComponent implements OnInit { */ reject() { let idList: any[] = []; - if(this.selectedRows.length > 0) { + if (this.selectedRows.length > 0) { this.selectedRows.forEach(item => { idList.push(item.id); }); } else { idList.push(this.sfView.value.billCode) } - if(!this.sfView.value.representationsCause) { + if (!this.sfView.value.representationsCause) { this.service.msgSrv.error('拒绝原因为空!'); return; } @@ -476,14 +476,14 @@ export class OrderManagementRiskComponent implements OnInit { if (item) { this.auditId = item.id; this.initSTAudit(1); - this.isVisibleRE = true; + this.isVisibleRE = true; } else { - if(this.selectedRows.length <= 0) { + if (this.selectedRows.length <= 0) { this.service.msgSrv.error('请选择订单!') return; } else { - this.initSTAudit(2); - this.isVisibleRE = true; + this.initSTAudit(2); + this.isVisibleRE = true; } } } diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 09e49f8c..b942ed34 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -43,34 +43,34 @@ export class OrderManagementVehicleComponent implements OnInit { columnsFloatView: STColumn[] = []; datass: any = [ { - one: '1', - two: '1', - three: '1', - id: 1 - }, + one: '1', + two: '1', + three: '1', + id: 1 + }, { - one: '2', - two: '2', - three: '2', - id: 2 - }, -]; -tabs = { - cancelQuantity: 0, - receivedQuantity: 0, - stayQuantity: 0, - signQuantity: 0, - compolatelQuantity: 0, - GoingQuantity: 0, - totalCount: 0 -}; -resourceStatus: any; + one: '2', + two: '2', + three: '2', + id: 2 + }, + ]; + tabs = { + cancelQuantity: 0, + receivedQuantity: 0, + stayQuantity: 0, + signQuantity: 0, + compolatelQuantity: 0, + GoingQuantity: 0, + totalCount: 0 + }; + resourceStatus: any; constructor( public service: OrderManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, public router: Router, - ) { } + ) { } /** * 查询参数 @@ -86,20 +86,20 @@ resourceStatus: any; }; } get reqParams() { - const a:any = {}; - if(this.resourceStatus) { + const a: any = {}; + if (this.resourceStatus) { a.billStatus = this.resourceStatus; - } + } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '', }, - }; + }; } get selectedRows() { return this.st?.list.filter((item) => item.checked) || []; @@ -112,8 +112,8 @@ resourceStatus: any; this.initSTFloatView(); } search() { - this.st?.load(1); - this.getGoodsSourceStatistical() + this.st?.load(1); + this.getGoodsSourceStatistical() } getGoodsSourceStatistical() { this.tabs = { @@ -127,26 +127,26 @@ resourceStatus: any; }; const params: any = Object.assign({}, this.reqParams || {}); delete params.billStatus - this.service.request(this.service.$api_statisticalStatus,params).subscribe(res => { + this.service.request(this.service.$api_statisticalStatus, params).subscribe(res => { if (res) { let totalCount = 0; - res.forEach((element: any) => { - if(element.billStatusLabel === '待发车') { - this.tabs.stayQuantity = element.quantity - } else if (element.billStatusLabel === '待接单') { - this.tabs.receivedQuantity = element.quantity - } else if (element.billStatusLabel === '运输中') { - this.tabs.GoingQuantity = element.quantity - } else if (element.billStatusLabel === '待签收') { - this.tabs.signQuantity = element.quantity - } else if (element.billStatusLabel === '已完成') { - this.tabs.compolatelQuantity = element.quantity - } else if (element.billStatusLabel === '已取消') { - this.tabs.cancelQuantity = element.quantity - } - totalCount += element.quantity - }); - this.tabs.totalCount = totalCount + res.forEach((element: any) => { + if (element.billStatusLabel === '待发车') { + this.tabs.stayQuantity = element.quantity + } else if (element.billStatusLabel === '待接单') { + this.tabs.receivedQuantity = element.quantity + } else if (element.billStatusLabel === '运输中') { + this.tabs.GoingQuantity = element.quantity + } else if (element.billStatusLabel === '待签收') { + this.tabs.signQuantity = element.quantity + } else if (element.billStatusLabel === '已完成') { + this.tabs.compolatelQuantity = element.quantity + } else if (element.billStatusLabel === '已取消') { + this.tabs.cancelQuantity = element.quantity + } + totalCount += element.quantity + }); + this.tabs.totalCount = totalCount } }) } @@ -154,14 +154,14 @@ resourceStatus: any; /** * 初始化查询表单 */ - initSF() { + initSF() { this.schema = { properties: { _$expand: { type: 'boolean', ui: { hidden: true } }, billCode: { type: 'string', title: '订单号' - + }, resourceCode: { type: 'string', @@ -179,7 +179,7 @@ resourceStatus: any; onSearch: (q: any) => { if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -247,14 +247,14 @@ resourceStatus: any; _$expand: (value: boolean) => value, }, } - }, + }, paymentStatus: { title: '支付状态', type: 'string', ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -328,7 +328,7 @@ resourceStatus: any; ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -345,7 +345,7 @@ resourceStatus: any; */ initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '订单号', width: '200px', @@ -411,11 +411,11 @@ resourceStatus: any; width: '120px', className: 'text-left', buttons: [ - + { text: '运费变更记录', click: (_record) => this.OpenPrice(_record), - iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6', + iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6', acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] }, }, { @@ -460,7 +460,7 @@ resourceStatus: any; iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', // acl: { ability: ['VEHICLE-LIST-view'] }, }, - + ], }, ]; @@ -482,7 +482,7 @@ resourceStatus: any; className: 'text-center', index: 'applyUserName' }, - { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, + { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, { title: '操作', fixed: 'right', @@ -495,7 +495,7 @@ resourceStatus: any; { text: '撤销', click: (_record) => this.revoke(_record), - iif: item => item.handleStatus === '1' || item.handleStatus === 1, + iif: item => item.handleStatus === '1' || item.handleStatus === 1, }, ], }, @@ -516,39 +516,43 @@ resourceStatus: any; index: 'amountAfterChange', render: 'amountAfterChange' }, - { title: '变更值', + { + title: '变更值', index: 'amountchangeValue', render: 'amountchangeValue', width: '120px', - className: 'text-center' }, - { title: '变更后', + className: 'text-center' + }, + { + title: '变更后', index: 'amountBeforeChange', render: 'amountBeforeChange', width: '120px', - className: 'text-center' } + className: 'text-center' + } ]; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) + ) ) - ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); -} + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 查询字段个数 */ @@ -588,19 +592,19 @@ resourceStatus: any; audit(item: any) { } - /* - * 审核关闭弹窗 - view: 1 - 浮动费用: 0 - 查看评价: 3 - */ + /* + * 审核关闭弹窗 + view: 1 + 浮动费用: 0 + 查看评价: 3 + */ handleCancel(type: string) { console.log(type) - if(type === '0') { + if (type === '0') { this.isVisible = false - } else if(type === '1') { + } else if (type === '1') { this.isVisibleView = false - } else if(type === '2') { + } else if (type === '2') { this.isVisibleEvaluate = false } } @@ -608,20 +612,20 @@ resourceStatus: any; this.changeId = value.id; this.isVisible = true } - /** - * 浮动费用查看 - */ + /** + * 浮动费用查看 + */ FloatView(item: any) { console.log(item) this.changeViewId = item.id; - this.service.request(this.service.$api_getChangeRecordWholeDetail, {id: this.changeViewId}).subscribe((res) => { + this.service.request(this.service.$api_getChangeRecordWholeDetail, { id: this.changeViewId }).subscribe((res) => { this.ViewCause = res; }) this.isVisibleView = true } - /** - *查看评价 - */ + /** + *查看评价 + */ viewEvaluate(item: any) { console.log(item) this.isVisibleEvaluate = true @@ -643,22 +647,22 @@ resourceStatus: any; this.diverList = res.evaluateInfos }); } - /** - *变更运费 - */ - updateFreight(item: any) { - console.log(item?.isFreightChangeApplication) + /** +*变更运费 +*/ + updateFreight(item: any) { + console.log(item?.isFreightChangeApplication) this.service.request(this.service.$api_get_getFreightChangeWholeDetail, { id: item.id }).subscribe(data => { if (data) { const modal = this.modal.create({ nzTitle: '变更运费', nzWidth: 580, nzContent: VehicleUpdateFreightComponent, - nzComponentParams: { data: { ...data, id: item.id,isFreightChangeApplication: item?.isFreightChangeApplication } }, + nzComponentParams: { data: { ...data, id: item.id, isFreightChangeApplication: item?.isFreightChangeApplication } }, nzFooter: null, }); - modal.afterClose.subscribe((res: Boolean) => { - if(res) { + modal.afterClose.subscribe((res: Boolean) => { + if (res) { this.st.load(); this.getGoodsSourceStatistical() } @@ -669,33 +673,33 @@ resourceStatus: any; /** *修改附加费率 */ - modifyRate() { + modifyRate() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); }); - if(params.length === 0) { + if (params.length === 0) { this.service.msgSrv.error('请先选择订单!') return } - const modal = this.modal.create({ - nzTitle: '修改附加费率', - nzWidth: 600, - nzContent: VehicleModifyRateComponent, - nzComponentParams: { data: { ids: params } }, - nzFooter: null, - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改附加费率', + nzWidth: 600, + nzContent: VehicleModifyRateComponent, + nzComponentParams: { data: { ids: params } }, + nzFooter: null, + }); + modal.afterClose.subscribe((result) => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical() + } + }); } - /** - *修改网络货运人 - */ - modifyFreightPeople() { + /** +*修改网络货运人 +*/ + modifyFreightPeople() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); @@ -704,73 +708,73 @@ resourceStatus: any; this.selectedRows.forEach(item => { params2.push(item.enterpriseInfoId); }); - if(params.length === 0) { + if (params.length === 0) { this.service.msgSrv.error('请先选择订单!') return } - const modal = this.modal.create({ - nzTitle: '修改网络货运人', - nzWidth: 600, - nzContent: VehicleFreightPeopleComponent, - nzComponentParams: { data: { ids: params, enterpriseInfoIds: params2, } }, - nzFooter: null, - // nzOnOk: sin => { - // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('变更运费成功'); - // modal.destroy(); - // this.st.reload(); - // } - // }); - // return false; - // } - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改网络货运人', + nzWidth: 600, + nzContent: VehicleFreightPeopleComponent, + nzComponentParams: { data: { ids: params, enterpriseInfoIds: params2, } }, + nzFooter: null, + // nzOnOk: sin => { + // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('变更运费成功'); + // modal.destroy(); + // this.st.reload(); + // } + // }); + // return false; + // } + }); + modal.afterClose.subscribe((result) => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical() + } + }); } - /** - *修改网络货运人 - */ - modifycaptain() { + /** +*修改网络货运人 +*/ + modifycaptain() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); }); - if(params.length === 0) { + if (params.length === 0) { this.service.msgSrv.error('请先选择订单!') return } - const modal = this.modal.create({ - nzTitle: '修改车队长', - nzWidth: 900, - nzContent: VehicleModifyCaptainComponent, - nzComponentParams: { data: { ids: params, } }, - nzFooter: null, - // nzOnOk: sin => { - // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('变更运费成功'); - // modal.destroy(); - // this.st.reload(); - // } - // }); - // return false; - // } - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改车队长', + nzWidth: 900, + nzContent: VehicleModifyCaptainComponent, + nzComponentParams: { data: { ids: params, } }, + nzFooter: null, + // nzOnOk: sin => { + // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('变更运费成功'); + // modal.destroy(); + // this.st.reload(); + // } + // }); + // return false; + // } + }); + modal.afterClose.subscribe((result) => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical() + } + }); } - + // *确认签收 - + confirmReceipt(item: any) { const modalRef = this.modal.create({ nzTitle: '确认签收', @@ -783,61 +787,61 @@ resourceStatus: any; nzFooter: null }); } - revoke(item: any) { - this.modal.confirm({ - nzTitle: '是否确定立即撤销费用变更!', - nzOnOk: () => - this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id}).subscribe((res) => { + revoke(item: any) { + this.modal.confirm({ + nzTitle: '是否确定立即撤销费用变更!', + nzOnOk: () => + this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe((res) => { console.log(res) - if(res) { + if (res) { this.service.msgSrv.success('撤销成功!') this.stFloat.reload() } }) - }); + }); + } + // 取消订单 + cancellation(item: any) { + // api_get_cancelAnOrder + this.modal.confirm({ + nzTitle: '确定取消该订单吗?', + nzContent: `取消后无法恢复,请确认`, + nzOnOk: () => + this.service.request(this.service.$api_get_cancelAnOrder, { id: item.id }).subscribe((res) => { + if (res === true) { + this.service.msgSrv.success('操作成功!'); + this.st.load(1); + this.getGoodsSourceStatistical() + this.initST(); + } + }), + }) + } + userAction() { + let params: any[] = []; + this.selectedRows.forEach(item => { + params.push(item.id); + }); + if (params.length === 0) { + this.service.msgSrv.error('请先选择订单!') + return } - // 取消订单 - cancellation(item: any) { - // api_get_cancelAnOrder - this.modal.confirm({ - nzTitle: '确定取消该订单吗?', - nzContent: `取消后无法恢复,请确认`, - nzOnOk: () => - this.service.request(this.service.$api_get_cancelAnOrder, {id: item.id}).subscribe((res) => { - if (res === true) { - this.service.msgSrv.success('操作成功!'); - this.st.load(1); - this.getGoodsSourceStatistical() - this.initST(); - } - }), - }) - } - userAction() { - let params: any[] = []; - this.selectedRows.forEach(item => { - params.push(item.id); - }); - if(params.length === 0) { - this.service.msgSrv.error('请先选择订单!') - return + this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => { + if (res) { + console.log(res); + this.st.load(1); + this.getGoodsSourceStatistical() } - this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => { - if (res) { - console.log(res); - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); - } - // 修改订单 + }); + } + // 修改订单 changeOrder(value: any) { this.router.navigate(['order-management/vehicle-detailChange', value.id]); } - /** - *申请退款 - */ - applyRefund(item: any) { + /** + *申请退款 + */ + applyRefund(item: any) { const modalRef = this.modal.create({ nzTitle: '申请退款', nzContent: OneCarOrderCancelConfirmComponent, @@ -848,7 +852,7 @@ resourceStatus: any; nzFooter: null }); modalRef.afterClose.subscribe((res: boolean) => { - if(res) { + if (res) { this.resetSF; this.st.load(); } 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 eff67eb6..a32db2ca 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 @@ -1,5 +1,11 @@ - + + @@ -8,7 +14,7 @@ -
{{item.yskmoney | currency:' '}}
- -
{{item.armoney | currency:' '}}
-
+
diff --git a/src/app/routes/partner/account-management/components/list/list.component.ts b/src/app/routes/partner/account-management/components/list/list.component.ts index e072fc3c..d49477c8 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.ts +++ b/src/app/routes/partner/account-management/components/list/list.component.ts @@ -2,7 +2,10 @@ 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 { BussinessStatisticsService } from '../../../business-statistics/services/bussiness-statistics.service'; +import { AccountManagemantService } from '../../services/account-managemant.service'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from '../virtual-account-detail/virtual-account-detail.component'; @Component({ selector: 'app-partner-list', @@ -16,7 +19,7 @@ export class PartnerAccountManagementListComponent implements OnInit { @ViewChild('sf') private readonly sf!: SFComponent; columns: STColumn[] = []; - constructor(public service: BussinessStatisticsService) { } + constructor(public service: AccountManagemantService, public modal: NzModalService) { } /** * 查询参数 */ @@ -41,45 +44,36 @@ export class PartnerAccountManagementListComponent implements OnInit { }, }, abnormalCause1: { - title: '类型', + title: '手机号', type: 'string', - default: '', - enum: [ - { - label: '全部', - value: '' - }, - { - label: '个人', - value: '1' - }, - { - label: '企业', - value: '2' - } - ], ui: { - widget: 'select' + placeholder: '请输入', }, }, } } - this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } }; + this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 12 } }, }; } /** * 初始化数据列表 */ initST() { this.columns = [ - { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 }, - { title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 }, - { title: '注册时间', index: 'carNo', className: 'text-center', width: 150 }, - { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, - { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, - { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 }, - { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 }, - { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 }, - { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 }, + { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 300 }, + { title: '手机号', render: 'carModelLabel', className: 'text-center', width: 200 }, + { title: '账户总额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 200 }, + { title: '待入账余额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 200 }, + { title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 250 }, + { title: '虚拟账户', index: 'approvalStatus4', className: 'text-center', width: 200 }, + { + title: '操作', + buttons: [ + { + text: '虚拟账户明细', + click: (_record) => this.viewVirtual(_record) + } + ] + } ]; } @@ -90,6 +84,28 @@ export class PartnerAccountManagementListComponent implements OnInit { }) } + /** + * + * @param _record 当前行信息 + */ + viewVirtual(_record: any) { + + const modalRef = this.modal.create({ + nzTitle: '虚拟账户明细', + nzContent: PartnerAccountManagementVirtualAccountDetailComponent, + nzComponentParams: { + id: _record?.id + }, + nzWidth: '85%', + nzFooter: null + }); + modalRef.afterClose.subscribe(result => { + }); + } + + /** + * + */ export() { } diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html new file mode 100644 index 00000000..649ddc1c --- /dev/null +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html @@ -0,0 +1,27 @@ + +
+
+ +
+
+ + + + +
+
+
+ +
+
+ diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.spec.ts b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.spec.ts new file mode 100644 index 00000000..9a7da573 --- /dev/null +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from './virtual-account-detail.component'; + +describe('PartnerAccountManagementVirtualAccountDetailComponent', () => { + let component: PartnerAccountManagementVirtualAccountDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [PartnerAccountManagementVirtualAccountDetailComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerAccountManagementVirtualAccountDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000..efd4933f --- /dev/null +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts @@ -0,0 +1,174 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { ShipperBaseService } from 'src/app/shared/services/business/shipper-base.service'; +import { AccountManagemantService } from '../../services/account-managemant.service'; + +@Component({ + selector: 'app-partner-virtual-account-detail', + templateUrl: './virtual-account-detail.component.html', +}) +export class PartnerAccountManagementVirtualAccountDetailComponent implements OnInit { + url = `/user`; + schema!: SFSchema; + ui!: SFUISchema; + @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; + columns: STColumn[] = []; + id = ''; + _$expand = false; + + constructor(public shipperservice: ShipperBaseService, public amService: AccountManagemantService, private modalRef: NzModalRef) { } + + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit(): void { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { + type: 'boolean', ui: { hidden: true } + }, + abnormalCause: { + title: '合伙人名称', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '手机号', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause2: { + title: '网络货运人', + type: 'string', + default: '', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder({}, true) + } + + }, + bankType: { + type: 'string', + title: '银行类型', + default: '', + ui: { + widget: 'dict-select', + params: { + dictKey: 'bankname:type' + }, + placeholder: '请选择', + allowClear: true, + containsAllLabel: true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + }, + }, + abnormalCause3: { + title: '虚拟账户', + type: 'string', + ui: { + placeholder: '请输入', + visibleIf: { + _$expand: (value: boolean) => value + }, + }, + }, + createTime: { + type: 'string', + title: '创建时间', + ui: { + widget: 'sl-from-to', + type: 'date', + autoComplete: 'off', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value + }, + } as SFDateWidgetSchema, + }, + } + } + this.ui = { '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } }, }; + } + + /** +* 初始化数据列表 +*/ + 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: '操作', + width: 120, + buttons: [ + { + text: '查看明细', + click: (_record) => this.viewDetail(_record) + } + ] + } + ]; + } + + resetSF() { + this._$expand = false; + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } + /** +* 伸缩查询条件 +*/ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + add(): void { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + search() { + this.st.load(1); + } + export() { } + /** + * + * @param _record 当前行信息 + */ + viewDetail(_record: any) { + + } + + close() { + this.modalRef.destroy(); + } + +} 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 3ca08cb0..d88522a1 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,6 +6,7 @@ import { BaseService } from '@shared'; }) export class AccountManagemantService extends BaseService { + $api_get_account_management_page = `/api/fcc/ficoBrmH/list/page`; 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 6cd0f164..8664f185 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -22,6 +22,7 @@ import { PartnerSalePartnerDetailComponent } from './business-statistics/compone import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component'; const routes: Routes = [ { @@ -63,7 +64,8 @@ const routes: Routes = [ children: [ { path: 'list', component: PartnerAccountManagementListComponent }, ] - }]; + }, +]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 157b33d6..bdd2ef14 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -16,6 +16,7 @@ import { PartnerSalePartnerDetailComponent } from './business-statistics/compone import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -32,7 +33,8 @@ const COMPONENTS: any[] = [ PartnerSalePartnerDetailComponent, PartnerPartnerCustomOrderDetailComponent, PartnerPartnerOrderDetailComponent, - PartnerAccountManagementListComponent]; + PartnerAccountManagementListComponent, + PartnerAccountManagementVirtualAccountDetailComponent]; @NgModule({ declarations: [...COMPONENTS], diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index f64e2a74..e79fa857 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -43,7 +43,7 @@ export class SupplyManagementBulkComponent implements OnInit { private modal: NzModalService, private router: Router, public shipperservice: ShipperBaseService - ) { } + ) { } ngOnInit(): void { this.initSF(); @@ -54,14 +54,14 @@ export class SupplyManagementBulkComponent implements OnInit { /** * 查询参数 */ - get reqParams() { - const a:any = {}; - if(this.resourceStatus) { - a.resourceStatus = this.resourceStatus + get reqParams() { + const a: any = {}; + if (this.resourceStatus) { + a.resourceStatus = this.resourceStatus } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, releaseTime: { @@ -72,7 +72,7 @@ export class SupplyManagementBulkComponent implements OnInit { start: this.sf?.value?.deadlineTime?.[0] || '', end: this.sf?.value?.deadlineTime?.[1] || '', }, - }; + }; } search() { this.st?.load(1); @@ -82,7 +82,7 @@ export class SupplyManagementBulkComponent implements OnInit { console.log(data) return data.map(item => ({ ...item, - disabled: item.auditStatus !== '1' + disabled: item.auditStatus !== '1' })); }; /** @@ -110,9 +110,9 @@ export class SupplyManagementBulkComponent implements OnInit { default: '', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'service:type' }, - containAllLable:true, + containAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -123,9 +123,9 @@ export class SupplyManagementBulkComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, - containAllLable:true, + containAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -186,7 +186,7 @@ export class SupplyManagementBulkComponent implements OnInit { console.log(q) if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -204,24 +204,24 @@ export class SupplyManagementBulkComponent implements OnInit { this.freightSchema = { properties: { remarks: { - title: '备注', - type: 'string', - maxLength: 50, - ui: { - placeholder: '请输入备注', - widget: 'textarea', + title: '备注', + type: 'string', + maxLength: 50, + ui: { + placeholder: '请输入备注', + widget: 'textarea', + }, }, - }, - } - }; - this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 16 } } }; + } + }; + this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 16 } } }; } /** * 初始化数据列表 */ initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '货源编号', width: '200px', @@ -236,12 +236,12 @@ export class SupplyManagementBulkComponent implements OnInit { { title: '装货地', className: 'text-left', - index: 'loadingAddressArr', + index: 'loadingAddressArr', width: '200px', }, { title: '卸货地', className: 'text-left', - index: 'unloadingAddressArr', + index: 'unloadingAddressArr', width: '200px', }, { @@ -306,7 +306,7 @@ export class SupplyManagementBulkComponent implements OnInit { iif: item => item.auditStatus === '1', acl: { ability: ['SUPPLY-INDEX-bulkBatchAudit'] }, }, - { + { text: '二维码 ', click: (_record) => this.assignedQrcode(_record), iif: item => item.resourceStatus == 1, @@ -314,7 +314,7 @@ export class SupplyManagementBulkComponent implements OnInit { { text: '修改单价', click: (_record) => this.modification(_record), - iif: item => item.resourceStatus == 1 , + iif: item => item.resourceStatus == 1, acl: { ability: ['SUPPLY-INDEX-modificationUnitPrice'] }, }, { @@ -389,86 +389,86 @@ export class SupplyManagementBulkComponent implements OnInit { tabChange(item: any) { console.log(item) } - /** - * 审核 - * status : 1 单个 2:批量 - * value : 单个单条数据 - */ - audit(value: any, status?: any) { - console.log(value) - console.log(status) - if(status === 2) { - if(this.selectedRows.length <= 0) { - this.service.msgSrv.error('未选择货源单!'); - return - } - let list: any[] = []; - this.selectedRows.forEach(item => { - list.push(item.id); - }); - this.auditID = list; - this.auditMany = true; - } else { - this.auditID = value.id - this.auditMany = false; + /** + * 审核 + * status : 1 单个 2:批量 + * value : 单个单条数据 + */ + audit(value: any, status?: any) { + console.log(value) + console.log(status) + if (status === 2) { + if (this.selectedRows.length <= 0) { + this.service.msgSrv.error('未选择货源单!'); + return } - this.isVisible = true; + let list: any[] = []; + this.selectedRows.forEach(item => { + list.push(item.id); + }); + this.auditID = list; + this.auditMany = true; + } else { + this.auditID = value.id + this.auditMany = false; } - /** - * 审核关闭弹窗 - */ + this.isVisible = true; + } + /** +* 审核关闭弹窗 +*/ handleCancel(type: any) { this.isVisible = false } - /** - * 代发货源 - */ - releaseGoods() { - this.router.navigate(['/supply-management/bulk-release']); - } + /** + * 代发货源 + */ + releaseGoods() { + this.router.navigate(['/supply-management/bulk-release']); + } /** * 审核通过按钮 */ handleOK(value: any) { - if(this.selectedRows.length <= 0) { - const params: any = { - id: this.auditID, - remarks: this.sfFre.value.remarks, - } - if(value == 1) { - params.auditStatus = 2 - } else { - params.auditStatus = 3 - } - console.log(params) - this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => { - if (res === true) { - this.service.msgSrv.success('审核成功!'); - this.isVisible = false; - this.st?.reload(); - this.getGoodsSourceStatistical(); + if (this.selectedRows.length <= 0) { + const params: any = { + id: this.auditID, + remarks: this.sfFre.value.remarks, } - }) - } else { - const params: any = { - ids: this.auditID, - remarks: this.sfFre.value.remarks, - } - if(value == 1) { - params.auditStatus = 2 - } else { - params.auditStatus = 3 - } - console.log(params) - this.service.request(this.service.$api_batchGoodsResourceAudit, params).subscribe(res => { - if (res === true) { - this.service.msgSrv.success('审核成功!'); - this.isVisible = false; - this.st?.reload(); - this.getGoodsSourceStatistical(); + if (value == 1) { + params.auditStatus = 2 + } else { + params.auditStatus = 3 } - }) - } + console.log(params) + this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => { + if (res === true) { + this.service.msgSrv.success('审核成功!'); + this.isVisible = false; + this.st?.reload(); + this.getGoodsSourceStatistical(); + } + }) + } else { + const params: any = { + ids: this.auditID, + remarks: this.sfFre.value.remarks, + } + if (value == 1) { + params.auditStatus = 2 + } else { + params.auditStatus = 3 + } + console.log(params) + this.service.request(this.service.$api_batchGoodsResourceAudit, params).subscribe(res => { + if (res === true) { + this.service.msgSrv.success('审核成功!'); + this.isVisible = false; + this.st?.reload(); + this.getGoodsSourceStatistical(); + } + }) + } } // 修改单价 modification(item: any) { @@ -509,34 +509,34 @@ export class SupplyManagementBulkComponent implements OnInit { nzTitle: '确定取消货源吗?', nzContent: `取消后不可恢复,谨慎操作`, nzOnOk: () => - this.service.request(this.service.$api_cancelSource, {id: item.id}).subscribe((res) => { - if(res) { + this.service.request(this.service.$api_cancelSource, { id: item.id }).subscribe((res) => { + if (res) { this.service.msgSrv.success('已取消货源!') this.st?.reload(); this.getGoodsSourceStatistical(); } }) }) - + + } + // 获取货源状态统计 + getGoodsSourceStatistical() { + this.tabs = { + totalQuantity: 0, + cancelQuantity: 0, + receivedQuantity: 0, + stayQuantity: 0 + }; + const params: any = Object.assign({}, this.reqParams || {}); + delete params.resourceStatus + this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...params }).subscribe(res => { + if (res) { + console.log(res) + this.tabs = res; + } + }) + } + userAction() { + } - // 获取货源状态统计 - getGoodsSourceStatistical() { - this.tabs = { - totalQuantity: 0, - cancelQuantity: 0, - receivedQuantity: 0, - stayQuantity: 0 - }; - const params: any = Object.assign({}, this.reqParams || {}); - delete params.resourceStatus - this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...params }).subscribe(res => { - if (res) { - console.log(res) - this.tabs = res; - } - }) - } - userAction() { - - } } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 214ed987..16d5ec3b 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -65,10 +65,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.validateForm1 = fb.group({ loadAddress0: [null, [Validators.required]], loadName0: [null, [Validators.required]], - loadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]], + loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], unloadAddress0: [null, [Validators.required]], unloadName0: [null, [Validators.required]], - unloadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]], + unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], loadingTime: [null, []], unloadingTime: [null, []] }); @@ -89,7 +89,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { @ViewChild('sf5', { static: false }) sf5!: SFComponent; schema5: SFSchema = {}; ui5!: SFUISchema; - + @ViewChild('sf55', { static: false }) sf55!: SFComponent; schema55: SFSchema = {}; ui55!: SFUISchema; @@ -101,15 +101,15 @@ export class SupplyManagementReleasePublishComponent implements OnInit { @ViewChild('sf7', { static: false }) sf7!: SFComponent; schema7: SFSchema = {}; ui7!: SFUISchema; - formatterRmb = (value: number): string =>{ - if(value){ - let value2 = Number(value).toLocaleString(undefined,{'minimumFractionDigits':2,'maximumFractionDigits':2}); + formatterRmb = (value: number): string => { + if (value) { + let value2 = Number(value).toLocaleString(undefined, { 'minimumFractionDigits': 2, 'maximumFractionDigits': 2 }); return `¥ ${value2}`; } return `¥ 0.00` - - } ; - parserRmb = (value: string): string => value.replace('¥ ', '').replace(',',''); + + }; + parserRmb = (value: string): string => value.replace('¥ ', '').replace(',', ''); // 页面初始化 ngOnInit(): void { this.initSF1(); @@ -221,7 +221,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } as SFSelectWidgetSchema } }, - required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName', ] + required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName',] }; this.ui1 = { '*': { @@ -343,13 +343,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select', mode: 'multiple', - maxMultipleCount:3, + maxMultipleCount: 3, placeholder: '请选择车型', errors: { required: '请选择车型' }, asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); + change: (tag: any, org: any) => { + if (tag.includes("999")) { + this.sf4.setValue('/carModel', ["999"]); } } } @@ -360,13 +360,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select', mode: 'multiple', - maxMultipleCount:3, + maxMultipleCount: 3, placeholder: '请选择车长', errors: { required: '请选择车长' }, asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); + change: (tag: any, org: any) => { + if (tag.includes("999")) { + this.sf4.setValue('/carModel', ["999"]); } } } @@ -443,29 +443,29 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select' }, - default:'0' + default: '0' }, type1: { type: 'string', title: '', - enum: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'], + enum: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'], readOnly: true, ui: { widget: 'checkbox', - visibleIf: {insuranceType: (value: string) => value ==='1'}, + visibleIf: { insuranceType: (value: string) => value === '1' }, } as SFCheckboxWidgetSchema, - default: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'], + default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'], }, type2: { type: 'string', title: '', - enum: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'], + enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'], readOnly: true, ui: { widget: 'checkbox', - visibleIf: {insuranceType: (value: string) => value ==='2'}, + visibleIf: { insuranceType: (value: string) => value === '2' }, } as SFCheckboxWidgetSchema, - default: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'], + default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'], } } }; @@ -501,7 +501,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'receipt:type' }, - containsAllLable: false, + containsAllLabel: false, placeholder: '请选择', errors: { required: '请选择' }, visibleIf: { @@ -573,7 +573,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } as SFTextareaWidgetSchema } }, - required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress'] + required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress'] }; this.ui6 = { '*': { @@ -589,19 +589,19 @@ export class SupplyManagementReleasePublishComponent implements OnInit { type: 'number', title: '预付', default: 0, - ui: {widget: 'custom'} + ui: { widget: 'custom' } }, toPay: { type: 'number', title: '到付', default: 0, - ui: { widget: 'custom'} + ui: { widget: 'custom' } }, receiptPay: { type: 'number', title: '回单付', default: 0, - ui: {widget: 'custom'} + ui: { widget: 'custom' } }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, @@ -651,12 +651,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit { const params = { shipperId: this.envCache?.enterpriseId, enterpriseInfoId: this.envCache?.networkTransporterId, - totalFreight:subtotal, - fuelCardAmount:oilCardPay, - resourcetype:'1' + totalFreight: subtotal, + fuelCardAmount: oilCardPay, + resourcetype: '1' } this.service - .request(this.service.$api_getCalculatedSurcharge,params) + .request(this.service.$api_getCalculatedSurcharge, params) .subscribe(res => { if (res) { this.sf7.setValue('/appendFee', res.surcharge); @@ -818,7 +818,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ...this.sf6.value, expenseDTOList: expenseList, paymentDays: this.sf7.value.paymentDays, - insuranceType:this.sf55.value.insuranceType, + insuranceType: this.sf55.value.insuranceType, }; let reqUrl = this.service.$api_consignWhole; @@ -977,63 +977,63 @@ export class SupplyManagementReleasePublishComponent implements OnInit { goBack() { window.history.go(-1); } - // 装卸货地址互换 - swapAddress(){ - this.startInfo.forEach((element:any, index:any) => { - this.validateForm1.removeControl(`loadAddress${index}`); - this.validateForm1.removeControl(`loadName${index}`); - this.validateForm1.removeControl(`loadPhone${index}`); - }); - this.endInfo.forEach((element:any, index:any) => { - this.validateForm1.removeControl(`unloadAddress${index}`); - this.validateForm1.removeControl(`unloadName${index}`); - this.validateForm1.removeControl(`unloadPhone${index}`); - }); - - let item = this.startInfo; - this.startInfo = this.endInfo; - this.endInfo = item; - - this.startInfo.forEach((element:any,index:any) => { - element.type = '1'; - this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); - }); - this.endInfo.forEach((element:any,index:any) => { - element.type = '2'; - this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); - }); - - // 计算里程,时间 - if (this.startInfo[0]?.area && this.endInfo[0]?.area) { + // 装卸货地址互换 + swapAddress() { + this.startInfo.forEach((element: any, index: any) => { + this.validateForm1.removeControl(`loadAddress${index}`); + this.validateForm1.removeControl(`loadName${index}`); + this.validateForm1.removeControl(`loadPhone${index}`); + }); + this.endInfo.forEach((element: any, index: any) => { + this.validateForm1.removeControl(`unloadAddress${index}`); + this.validateForm1.removeControl(`unloadName${index}`); + this.validateForm1.removeControl(`unloadPhone${index}`); + }); + + let item = this.startInfo; + this.startInfo = this.endInfo; + this.endInfo = item; + + this.startInfo.forEach((element: any, index: any) => { + element.type = '1'; + this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); + }); + this.endInfo.forEach((element: any, index: any) => { + element.type = '2'; + this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); + }); + + // 计算里程,时间 + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { this.totalDistance = res.distance; this.totalTime = res.time; }); } - } - goodsValuesChange(value: any) { - console.log(value); - console.log(this.totalDistance); - - if(value >= 50000 && this.totalDistance > 0){ - const params = { - goodsValue: value, - insuranceType: this.sf55.value.insuranceType, - km: this.totalDistance - }; - this.service - .request(this.service.$api_getWholeInsuranceInfo, params) - .subscribe(res => { - if (res) { - this.sf5.setValue('/insurancePremium',res.insurancePremium); - }else{ - this.sf5.setValue('/insurancePremium',null); - } + } + goodsValuesChange(value: any) { + console.log(value); + console.log(this.totalDistance); + + if (value >= 50000 && this.totalDistance > 0) { + const params = { + goodsValue: value, + insuranceType: this.sf55.value.insuranceType, + km: this.totalDistance + }; + this.service + .request(this.service.$api_getWholeInsuranceInfo, params) + .subscribe(res => { + if (res) { + this.sf5.setValue('/insurancePremium', res.insurancePremium); + } else { + this.sf5.setValue('/insurancePremium', null); + } }); - } } + } } diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index 1d192fa2..bfd8ca69 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -44,7 +44,7 @@ export class SupplyManagementVehicleComponent implements OnInit { private router: Router, private ar: ActivatedRoute, public shipperSrv: ShipperBaseService - ) {} + ) { } /** * 查询参数 @@ -147,7 +147,7 @@ export class SupplyManagementVehicleComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} + importGoodsSource() { } /** * 修改运费 @@ -382,7 +382,7 @@ export class SupplyManagementVehicleComponent implements OnInit { // _$expand: (value: boolean) => value // }, // allowClear: true, - // containsAllLable: true, + // containsAllLabel: true, // asyncData: () => this.shipperSrv.getEnterpriseProject(this.sf.value?.shipperAppUserId) // } as SFSelectWidgetSchema // }, @@ -402,7 +402,7 @@ export class SupplyManagementVehicleComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'service:type' }, visibleIf: { _$expand: (value: boolean) => value @@ -416,7 +416,7 @@ export class SupplyManagementVehicleComponent implements OnInit { ui: { widget: 'dict-select', allowClear: true, - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'goodresource:audit:status' }, visibleIf: { _$expand: (value: boolean) => value diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts index 8bc8f0f2..985007bc 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts @@ -30,9 +30,9 @@ export class CancellationInvoiceComponent implements OnInit { totalCallNo = 0; openInfo: any = { invoicedate: null, invoiceno: null }; - constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} + constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) { } - ngOnInit(): void {} + ngOnInit(): void { } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { @@ -113,7 +113,7 @@ export class CancellationInvoiceComponent implements OnInit { this.nzModalService.warning({ nzTitle: '确定将所选待处理开票申请推送开票?', nzContent: '推送开票后发票信息不可修改,待系统开票完成后会自动返回开票结果', - nzOnOk: () => {} + nzOnOk: () => { } }); } @@ -130,7 +130,7 @@ export class CancellationInvoiceComponent implements OnInit { this.nzModalService.warning({ nzTitle: '确定将所选待确认开票申请撤回?', nzContent: '提交税控后发票信息不可修改,待税控开票完成后返回开票结果', - nzOnOk: () => {} + nzOnOk: () => { } }); } @@ -147,7 +147,7 @@ export class CancellationInvoiceComponent implements OnInit { this.nzModalService.warning({ nzTitle: '确定将所选待确认开票申请撤回?', nzContent: '提交税控后发票信息不可修改,待税控开票完成后返回开票结果', - nzOnOk: () => {} + nzOnOk: () => { } }); } @@ -232,7 +232,7 @@ export class CancellationInvoiceComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'vatinv:status' }, containAllLable: true, visibleIf: { diff --git a/src/app/routes/vehicle/components/audit/audit.component.ts b/src/app/routes/vehicle/components/audit/audit.component.ts index 6a46ee14..dcf50b10 100644 --- a/src/app/routes/vehicle/components/audit/audit.component.ts +++ b/src/app/routes/vehicle/components/audit/audit.component.ts @@ -22,7 +22,7 @@ export class VehicleComponentsAuditComponent implements OnInit { @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper) {} + constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper) { } /** * 查询字段个数navigate */ @@ -34,14 +34,14 @@ export class VehicleComponentsAuditComponent implements OnInit { * 查询参数 */ get reqParams() { - const a:any = {}; - if(this.resourceStatus === 1) { + const a: any = {}; + if (this.resourceStatus === 1) { a.approvalStatus = 10 - } else if(this.resourceStatus === 2) { + } else if (this.resourceStatus === 2) { a.approvalStatus = 20 - } else if(this.resourceStatus === 3) { + } else if (this.resourceStatus === 3) { a.approvalStatus = 30 - } + } return { ...a, ...this.sf?.value, @@ -106,7 +106,7 @@ export class VehicleComponentsAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:color' }, - containsAllLable: true, + containsAllLabel: true, } }, isSelf: { @@ -157,17 +157,17 @@ export class VehicleComponentsAuditComponent implements OnInit { initST() { this.columns = [ // { title: '', type: 'checkbox', className: 'text-center' }, - { title: '车牌号', width:'180px', className: 'text-center', index: 'carNo' }, - { title: '车牌颜色', width:'180px', className: 'text-center', index: 'carNoColorLabel' }, - { title: '车型-车长-载重', width:'180px',className: 'text-center', render: 'carLength' }, - { title: '是否挂靠', width:'180px', className: 'text-center', render: 'isSelf' }, - { title: '所有人', width:'180px', className: 'text-center', index: 'carOwner' }, - { title: '录入人员', width:'180px', className: 'text-center', index: 'saveUser', }, + { title: '车牌号', width: '180px', className: 'text-center', index: 'carNo' }, + { title: '车牌颜色', width: '180px', className: 'text-center', index: 'carNoColorLabel' }, + { title: '车型-车长-载重', width: '180px', className: 'text-center', render: 'carLength' }, + { title: '是否挂靠', width: '180px', className: 'text-center', render: 'isSelf' }, + { title: '所有人', width: '180px', className: 'text-center', index: 'carOwner' }, + { title: '录入人员', width: '180px', className: 'text-center', index: 'saveUser', }, { title: '审核状态', className: 'text-center', index: 'approvalStatus', - width:'180px', + width: '180px', type: 'badge', badge: { '-1': { text: '未上传', color: 'default' }, @@ -179,7 +179,7 @@ export class VehicleComponentsAuditComponent implements OnInit { 40: { text: '证件过期', color: 'error' }, }, }, - { title: '申请时间', width:'180px', className: 'text-center', index: 'createTime' }, + { title: '申请时间', width: '180px', className: 'text-center', index: 'createTime' }, { title: '操作', fixed: 'right', @@ -190,7 +190,7 @@ export class VehicleComponentsAuditComponent implements OnInit { text: '查看', acl: { ability: ['VEHICLE-AUDIT-view'] }, click: (item) => { - this.router.navigate(['./detail', item.id], { relativeTo: this.ar,queryParams: { carId: item.carId } }); + this.router.navigate(['./detail', item.id], { relativeTo: this.ar, queryParams: { carId: item.carId } }); // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); }, }, @@ -224,13 +224,13 @@ export class VehicleComponentsAuditComponent implements OnInit { } // 导出 exportFire() { - this.service.downloadFile(this.service.$api_carLicenseAudit_export, this.reqParams ); + this.service.downloadFile(this.service.$api_carLicenseAudit_export, this.reqParams); } addModal() { const i = { appUserId: '', } - this.modalHelper.create(CarSettleCarauthComponent, {i}, { size: 900 }).subscribe((res) => { + this.modalHelper.create(CarSettleCarauthComponent, { i }, { size: 900 }).subscribe((res) => { this.st.load() }); } diff --git a/src/app/routes/vehicle/components/list/list.component.ts b/src/app/routes/vehicle/components/list/list.component.ts index 817881c3..4a7ca3bf 100644 --- a/src/app/routes/vehicle/components/list/list.component.ts +++ b/src/app/routes/vehicle/components/list/list.component.ts @@ -19,7 +19,7 @@ export class VehicleComponentsListComponent implements OnInit { @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} + constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) { } /** * 查询参数 @@ -87,7 +87,7 @@ export class VehicleComponentsListComponent implements OnInit { title: '车牌颜色', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'car:color' } } }, @@ -109,7 +109,7 @@ export class VehicleComponentsListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:model' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { expand: (value: boolean) => value } @@ -121,7 +121,7 @@ export class VehicleComponentsListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:length' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { expand: (value: boolean) => value } diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts index c2be082a..aa2ba3f9 100644 --- a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts @@ -24,55 +24,57 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { addSchema: SFSchema = {}; _$expand = false; editText = ''; - formData :any; + formData: any; isVisible = false; edit = false; editId = false; selectedIndex = 0; columns: STColumn[] = [ - { title: '异常编号', index: 'exceptionCode',width: '180px',className: 'text-left', }, - { title: '关联运单号', index: 'wayBillCode',width: '180px',className: 'text-left', }, - { title: '网络货运人', index: 'enterpriseInfoName',width: '220px',className: 'text-left', }, - { title: '货主', index: 'shipperAppUserName' ,width: '220px',className: 'text-left',}, - { title: '装货地', index: 'loadingAddressArr' ,width: '220px',className: 'text-left',}, - { title: '卸货地', index: 'unloadingAddressArr' ,width: '220px',className: 'text-left',}, - { title: '承运司机', index: 'driver' ,width: '250px',className: 'text-left',}, - { title: '异常信息', index: 'exceptionContent',width: '250px',className: 'text-left', }, - { title: '异常图片', render: 'exceptionCertificateFirstFilePath' ,width: '200px',className: 'text-left',}, - { title: '上报时间', index: 'createTime',width: '180px' ,className: 'text-left',}, + { title: '异常编号', index: 'exceptionCode', width: '180px', className: 'text-left', }, + { title: '关联运单号', index: 'wayBillCode', width: '180px', className: 'text-left', }, + { title: '网络货运人', index: 'enterpriseInfoName', width: '220px', className: 'text-left', }, + { title: '货主', index: 'shipperAppUserName', width: '220px', className: 'text-left', }, + { title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left', }, + { title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left', }, + { title: '承运司机', index: 'driver', width: '250px', className: 'text-left', }, + { title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left', }, + { title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '200px', className: 'text-left', }, + { title: '上报时间', index: 'createTime', width: '180px', className: 'text-left', }, ]; columns2: STColumn[] = [ - { title: '异常编号', index: 'exceptionCode',width: '180px',className: 'text-left' }, - { title: '关联运单号', index: 'wayBillCode',width: '180px' ,className: 'text-left'}, - { title: '网络货运人', index: 'enterpriseInfoName',width: '180px',className: 'text-left' }, - { title: '货主', index: 'shipperAppUserName' ,width: '180px',className: 'text-left'}, - { title: '装货地', index: 'loadingPlace' ,width: '180px',className: 'text-left'}, - { title: '卸货地', index: 'dischargePlace' ,width: '180px',className: 'text-left'}, - { title: '承运司机', index: 'driver' ,width: '90px',className: 'text-left'}, - { title: '异常信息', index: 'exceptionContent',width: '250px' ,className: 'text-left'}, - { title: '异常图片', render: 'exceptionCertificateFirstFilePath' ,width: '220px',className: 'text-left'}, - { title: '上报时间', index: 'reportingTime',width: '180px' ,className: 'text-left'}, - { title: '回复内容', index: 'replyContent',width: '180px' ,className: 'text-left'}, - { title: '回复人', index: 'replyAppUserName',width: '180px' ,className: 'text-left'}, - { title: '回复时间', index: 'replyTime',width: '180px' ,className: 'text-left'}, + { title: '异常编号', index: 'exceptionCode', width: '180px', className: 'text-left' }, + { title: '关联运单号', index: 'wayBillCode', width: '180px', className: 'text-left' }, + { title: '网络货运人', index: 'enterpriseInfoName', width: '180px', className: 'text-left' }, + { title: '货主', index: 'shipperAppUserName', width: '180px', className: 'text-left' }, + { title: '装货地', index: 'loadingPlace', width: '180px', className: 'text-left' }, + { title: '卸货地', index: 'dischargePlace', width: '180px', className: 'text-left' }, + { title: '承运司机', index: 'driver', width: '90px', className: 'text-left' }, + { title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' }, + { title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '220px', className: 'text-left' }, + { title: '上报时间', index: 'reportingTime', width: '180px', className: 'text-left' }, + { title: '回复内容', index: 'replyContent', width: '180px', className: 'text-left' }, + { title: '回复人', index: 'replyAppUserName', width: '180px', className: 'text-left' }, + { title: '回复时间', index: 'replyTime', width: '180px', className: 'text-left' }, ]; - get reqParams (){ + get reqParams() { return { - ...this.sf?.value, - }}; - get reqParams2 (){ + ...this.sf?.value, + } + }; + get reqParams2() { return { - ...this.sf?.value, - }}; + ...this.sf?.value, + } + }; constructor( public service: WaybillManagementServe, private nzModalService: NzModalService, public shipperSrv: ShipperBaseService - ) {} + ) { } ngOnInit(): void { this.initSF() @@ -82,131 +84,131 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { * 伸缩查询条件 */ expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); } - /** - * 查询字段个数 - */ + /** + * 查询字段个数 + */ get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; + return Object.keys(this.schema?.properties || {}).length; } - initSF(){ - this.schema = { - properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, - exceptionCode: { - type: 'string', - title: '异常编号', - ui: { placeholder: '请输入' } - }, - wayBillCode: { - type: 'string', - title: '运单号', - ui: { placeholder: '请输入' } - }, - exceptionType: { - title: '异常类型', - type: 'string', - ui: { - widget: 'dict-select', - containsAllLable: true, - params: { dictKey: 'exception:report:type' }, - } as SFSelectWidgetSchema - }, - shipperAppUserId: { - type: 'string', - title: '货主', - ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - allowClear: true, - onSearch: (q: any) => { - console.log(q) - if (!!q) { - return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) - .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + exceptionCode: { + type: 'string', + title: '异常编号', + ui: { placeholder: '请输入' } + }, + wayBillCode: { + type: 'string', + title: '运单号', + ui: { placeholder: '请输入' } + }, + exceptionType: { + title: '异常类型', + type: 'string', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'exception:report:type' }, + } as SFSelectWidgetSchema + }, + shipperAppUserId: { + type: 'string', + title: '货主', + ui: { + widget: 'select', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', + allowClear: true, + onSearch: (q: any) => { + console.log(q) + if (!!q) { + return this.service + .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) + .toPromise(); + } else { + return of([]); + } + }, + change: (q: any) => { + this.getRegionCode(q); + }, + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFSelectWidgetSchema, + }, + enterpriseProjectId: { + type: 'string', + title: '所属项目', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value + }, + } as SFSelectWidgetSchema + }, + driverName: { + title: '承运司机', + type: 'string', + ui: { + visibleIf: { + _$expand: (value: boolean) => value } - }, - change: (q: any) => { - this.getRegionCode(q); - }, - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, - }, - enterpriseProjectId: { - type: 'string', - title: '所属项目', - ui: { - widget: 'select', - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - }, - } as SFSelectWidgetSchema - }, - driverName: { - title: '承运司机', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value } + }, + carNo: { + title: '车牌号', + type: 'string', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, + reportingTime: { + title: '上报时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + asyncData: () => this.shipperSrv.getNetworkFreightForwarder(), + }, } - }, - carNo: { - title: '车牌号', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } - }, - reportingTime: { - title: '上报时间', - type: 'string', - ui: { - widget: 'date', - mode: 'range', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - } - } as SFDateWidgetSchema - }, - enterpriseInfoId: { - type: 'string', - title: '网络货运人', - ui: { - widget: 'select', - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value, - }, - allowClear: true, - asyncData: () => this.shipperSrv.getNetworkFreightForwarder(), - }, - } - } - }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } search() { console.log(this.selectedIndex) - if(this.selectedIndex === 0) { - this.st?.load(1) + if (this.selectedIndex === 0) { + this.st?.load(1) } else { - this.st2?.load(1) + this.st2?.load(1) } } /** @@ -215,25 +217,25 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { resetSF() { this.sf.reset(); } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) - ) - ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); - } + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) + ) + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } } diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.ts b/src/app/routes/waybill-management/components/bulk/bulk.component.ts index 26890393..0c1b2017 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -27,37 +27,37 @@ export class WaybillManagementBulkComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; columns: STColumn[] = []; resourceStatus: any; -tabs = { - signQuantity: 0, - cancelQuantity: 0, - receivedQuantity: 0, - totalQuantity: 0, - compolatelQuantity: 0, - deltQuantity: 0 -}; + tabs = { + signQuantity: 0, + cancelQuantity: 0, + receivedQuantity: 0, + totalQuantity: 0, + compolatelQuantity: 0, + deltQuantity: 0 + }; constructor( - public service: WaybillManagementServe, - private modal: NzModalService, + public service: WaybillManagementServe, + private modal: NzModalService, public shipperservice: ShipperBaseService) { } /** * 查询参数 */ get reqParams() { - const a:any = {}; - if(this.resourceStatus) { - a.wayBillStatus = this.resourceStatus + const a: any = {}; + if (this.resourceStatus) { + a.wayBillStatus = this.resourceStatus } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '', }, - }; + }; } get selectedRows() { return this.st?.list.filter((item) => item.checked) || []; @@ -98,14 +98,14 @@ tabs = { console.log(q) if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { return of([]); } }, - + } as SFSelectWidgetSchema, }, loadingPlace: { @@ -152,14 +152,14 @@ tabs = { _$expand: (value: boolean) => value, }, } - }, + }, paymentstatus: { title: '支付状态', type: 'string', ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -170,14 +170,14 @@ tabs = { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'service:type' }, visibleIf: { _$expand: (value: boolean) => value } } as SFSelectWidgetSchema }, - + riskStatus: { type: 'string', title: '是否风险单', @@ -230,9 +230,9 @@ tabs = { /** * 初始化数据列表 */ - initST() { + initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '运单号', width: '180px', @@ -257,7 +257,7 @@ tabs = { width: '220px', index: 'dischargePlace' }, - { + { title: '货物信息', className: 'text-left', width: '250px', @@ -315,13 +315,13 @@ tabs = { { text: '确认发车', click: (_record) => this.sureDepart(_record), - iif: item => item.wayBillStatus == '2' , + iif: item => item.wayBillStatus == '2', acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] }, }, { text: '确认到车', click: (_record) => this.sureArrive(_record), - iif: item => item.wayBillStatus == '3' , + iif: item => item.wayBillStatus == '3', acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] }, }, ], @@ -357,8 +357,8 @@ tabs = { } selectChange(e: number) { console.log(e); - if(e>=1) { - this.resourceStatus = e + 1; + if (e >= 1) { + this.resourceStatus = e + 1; } this.initST(); setTimeout(() => { @@ -374,15 +374,15 @@ tabs = { audit(item: any) { console.log(item) } - /** - * 审核通过按钮 - */ + /** +* 审核通过按钮 +*/ handleOK() { - + } - /** - *查看评价 - */ + /** + *查看评价 + */ viewEvaluate(item: any) { console.log(item) this.isVisibleEvaluate = true @@ -402,62 +402,62 @@ tabs = { if (res) { let totalCount = 0; res.forEach((ele: any) => { - switch(ele.wayBillStatus) { + switch (ele.wayBillStatus) { case '2': this.tabs.receivedQuantity = ele?.count; break; case '3': this.tabs.cancelQuantity = ele?.count; - break; + break; case '4': this.tabs.signQuantity = ele?.count; - break; + break; case '5': this.tabs.compolatelQuantity = ele?.count; - break; + break; case '6': this.tabs.deltQuantity = ele?.count; - break; + break; } totalCount += ele.count - }); - this.tabs.totalQuantity = totalCount + }); + this.tabs.totalQuantity = totalCount } }) } - // *确认发车 - - sureDepart(item: any) { - const modalRef = this.modal.create({ - nzTitle: '确认发车', - nzWidth: '50%', - nzContent: VehicleSureDepartComponent, - nzComponentParams: { - i: item, - Status: 2 - }, - nzFooter: null - }); - modalRef.afterClose.subscribe((result: any) => { - this.st.load(1); - this.getGoodsSourceStatistical() + // *确认发车 + + sureDepart(item: any) { + const modalRef = this.modal.create({ + nzTitle: '确认发车', + nzWidth: '50%', + nzContent: VehicleSureDepartComponent, + nzComponentParams: { + i: item, + Status: 2 + }, + nzFooter: null }); - } - // 确认到车 - sureArrive(item: any) { - const modalRef = this.modal.create({ - nzTitle: '确认到车', - nzWidth: '50%', - nzContent: VehicleSureArriveComponent, - nzComponentParams: { - i: item, - Status: 2 - }, - nzFooter: null - }); - modalRef.afterClose.subscribe((result: any) => { - this.st.load(1); - this.getGoodsSourceStatistical() + modalRef.afterClose.subscribe((result: any) => { + this.st.load(1); + this.getGoodsSourceStatistical() }); - } + } + // 确认到车 + sureArrive(item: any) { + const modalRef = this.modal.create({ + nzTitle: '确认到车', + nzWidth: '50%', + nzContent: VehicleSureArriveComponent, + nzComponentParams: { + i: item, + Status: 2 + }, + nzFooter: null + }); + modalRef.afterClose.subscribe((result: any) => { + this.st.load(1); + this.getGoodsSourceStatistical() + }); + } } diff --git a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts index fa427fd6..b70676e2 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -37,27 +37,27 @@ export class WaybillManagementVehicleComponent implements OnInit { }; constructor( public service: WaybillManagementServe, - private modal: NzModalService, - public shipperservice: ShipperBaseService) {} + private modal: NzModalService, + public shipperservice: ShipperBaseService) { } /** * 查询参数 */ get reqParams() { - const a:any = {}; + const a: any = {}; if (this.resourceStatus) { a.wayBillStatus = this.resourceStatus; } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '', }, - }; + }; } get selectedRows() { return this.st?.list.filter(item => item.checked) || []; @@ -96,7 +96,7 @@ export class WaybillManagementVehicleComponent implements OnInit { console.log(q) if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -137,7 +137,7 @@ export class WaybillManagementVehicleComponent implements OnInit { } } }, - + driverName: { title: '承运司机', type: 'string', @@ -164,14 +164,14 @@ export class WaybillManagementVehicleComponent implements OnInit { _$expand: (value: boolean) => value, }, } - }, + }, paymentstatus: { title: '支付状态', type: 'string', ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -182,14 +182,14 @@ export class WaybillManagementVehicleComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'service:type' }, visibleIf: { _$expand: (value: boolean) => value } } as SFSelectWidgetSchema }, - + riskStatus: { type: 'string', title: '是否风险单', @@ -238,34 +238,34 @@ export class WaybillManagementVehicleComponent implements OnInit { }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) + ) ) - ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); -} + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 初始化数据列表 */ initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '运单号', width: '180px', @@ -391,7 +391,7 @@ export class WaybillManagementVehicleComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} + importGoodsSource() { } /** *查看评价 */ @@ -428,16 +428,16 @@ export class WaybillManagementVehicleComponent implements OnInit { case '4': this.tabs.signQuantity = ele?.count; break; - case '5': - this.tabs.compolatelQuantity = ele?.count; + case '5': + this.tabs.compolatelQuantity = ele?.count; break; - case '6': - this.tabs.deltQuantity = ele?.count; + case '6': + this.tabs.deltQuantity = ele?.count; break; } totalCount += ele.count }); - this.tabs.totalQuantity = totalCount + this.tabs.totalQuantity = totalCount } }); } @@ -457,7 +457,7 @@ export class WaybillManagementVehicleComponent implements OnInit { modalRef.afterClose.subscribe((result: any) => { this.st.load(1); this.getGoodsSourceStatistical() - }); + }); } // 确认到车 sureArrive(item: any) { @@ -474,6 +474,6 @@ export class WaybillManagementVehicleComponent implements OnInit { modalRef.afterClose.subscribe((result: any) => { this.st.load(1); this.getGoodsSourceStatistical() - }); + }); } } diff --git a/src/app/shared/components/dict-select/dict-select.component.ts b/src/app/shared/components/dict-select/dict-select.component.ts index a1936ea9..661bce83 100644 --- a/src/app/shared/components/dict-select/dict-select.component.ts +++ b/src/app/shared/components/dict-select/dict-select.component.ts @@ -27,7 +27,7 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor { @Input() params = {};// 请求参数 dictList: any[] = []; - @Input() containsAllLable = true; // 是否包含全部这一选项 + @Input() containsAllLabel = true; // 是否包含全部这一选项 @Input() mode: 'multiple' | 'tags' | 'default' = 'default'; @@ -55,7 +55,7 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor { this.service.getDictList(this.url || this.defaultUrl, this.params).subscribe(res => { if (res) { this.dictList = res || []; - if (this.dictList.length > 0 && this.containsAllLable) { + if (this.dictList.length > 0 && this.containsAllLabel) { const obj = { label: '全部', value: '' }; this.dictList.unshift(obj); } diff --git a/src/app/shared/widget/dict-select/dict-select.widget.html b/src/app/shared/widget/dict-select/dict-select.widget.html index b54a3e88..c014b4fc 100644 --- a/src/app/shared/widget/dict-select/dict-select.widget.html +++ b/src/app/shared/widget/dict-select/dict-select.widget.html @@ -8,7 +8,7 @@ --> + [containsAllLabel]="ui?.containsAllLabel" [mode]="ui?.mode" name="sf.dict.select"> + + + + + + + + +
+ + {{formData?.ltdName}} + + + {{formData?.bankType==='1'?'平安银行':'浦发银行'}} + + + {{formData?.refundApplyCode}} + + + {{formData?.bankAccountName}} + + + {{formData?.createTime}} + + + {{formData?.virtualAccount}} + + + {{formData?.refundStatusLabel}} + + + {{formData?.amount}} + + + {{formData?.bankSerialNumber}} + + + {{formData?.bankId}} + + + + +
+ + +
+
+ +
+
+
\ No newline at end of file diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.less b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.less new file mode 100644 index 00000000..e299b7d1 --- /dev/null +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.less @@ -0,0 +1,17 @@ +:host::ng-deep { + + .ant-alert-info { + background-color: #f3f3f3; + border : 1px solid #dbdbdb; + + .ant-alert-message { + color: rgba(0, 0, 0, 0.85); + font-weight: 600; + font-size: 16px; + } + } + + .ant-form-item { + margin-bottom: 15px; + } +} \ No newline at end of file diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts new file mode 100644 index 00000000..74f5b1d4 --- /dev/null +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts @@ -0,0 +1,73 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; + +@Component({ + selector: 'app-partner-account-management-withdrawals-detail', + templateUrl: './withdrawals-detail.component.html', + styleUrls: ['./withdrawals-detail.component.less'] +}) +export class PartnerAccountManagementWithdrawalsDetailComponent implements OnInit { + formData: any = {}; + + timeLineData: any = []; + + constructor(public service: FreightAccountService, private route: ActivatedRoute) { + const id = route.snapshot.params.id; + this.loadRefundDetail(id); + } + + ngOnInit(): void { } + + loadRefundDetail(id: string) { + this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => { + if (res) { + this.formData = res; + // 处理流程节点数据 + // 流程是否结束 + let isEnd = false; + if (res.successTime) { + isEnd = true; + if (res.refundStatus === '3') { + this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' }); + } else { + this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' }); + } + } + if (res.agreeTime && res.refundStatus !== '4') { + this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' }); + } + if (res.agreeTime) { + if (res.refundStatus === '4') { + isEnd = true; + this.timeLineData.push({ + time: res.agreeTime, + value: `拒绝提现
操作人员:${res.handlerUserIdLabel}`, + color: 'red' + }); + } else { + this.timeLineData.push({ + time: res.agreeTime, + value: `审核通过
操作人员:${res.handlerUserIdLabel}`, + color: 'gray' + }); + } + } + if (res.createTime) { + this.timeLineData.push({ + time: res.createTime, + value: `提交提现申请
提现${res.amount}元至${res.bankName}(${res.bankCardNumber})
操作人员:${res.userIdLabel}`, + color: 'gray' + }); + } + if (this.timeLineData?.length > 0 && !isEnd) { + this.timeLineData[0].color = 'green'; + } + } + }); + } + + goBack() { + 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 new file mode 100644 index 00000000..f81ec9dc --- /dev/null +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.html @@ -0,0 +1,85 @@ + + + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + + + + + + + + + +
+
+ 已选择 + {{ selectedRows.length }} 条数据   累计提现 {{ + totalCallNo }} + 清空 +
+ +
+
+ + + + {{ item.bankName }}
{{ item.bankCardNumber }} +
+
+
+ + +
+
+ + + +
+
+
\ No newline at end of file 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 new file mode 100644 index 00000000..054a9b09 --- /dev/null +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts @@ -0,0 +1,294 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; +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'; + + +@Component({ + selector: 'app-partner-account-management-withdrawals-record', + templateUrl: './withdrawals-record.component.html', + styleUrls: ['../../../../commom/less/box.less', '../../../../commom/less/expend-but.less'] +}) +export class PartnerAccountManagementWithdrawalsRecordComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + @ViewChild('auditModal', { static: false }) + auditModal!: any; + columns: STColumn[] = this.initST(); + searchSchema: SFSchema = this.initSF(); + + _$expand = false; + + selectedRows: any[] = []; + totalCallNo = 0; + refundStatus: any = ''; + + msg = ''; + constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) { } + + ngOnInit(): void { } + + beforeReq = (requestOptions: STRequestOptions) => { + if (this.sf) { + Object.assign(requestOptions.body, { + ...this.sf.value, + createTime: { + start: this.sf.value.createTime?.[0] || '', + end: this.sf.value.createTime?.[1] || '' + }, + refundStatus: this.refundStatus || null + }); + } + return requestOptions; + }; + + afterRes = (data: any[], rawData?: any) => { + data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' })); + return data; + }; + + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.amount, 0).toFixed(2); + break; + } + } + + changeRefundStatus(status?: string) { + this.refundStatus = status || null; + this.st.load(1); + } + + auditAction(item?: any) { + this.msg = ''; + let params: Array = []; + if (item) { + params = [item.id]; + } else { + params = this.selectedRows.map(node => node.id); + } + const modal = this.nzModalService.create({ + nzTitle: '审核', + nzContent: this.auditModal, + nzFooter: [ + { + label: '拒绝', + type: 'default', + onClick: () => { + this.service + .request(this.service.$api_disagree_refund, { + refundApplicationId: params, + msg: this.msg + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('审核拒绝成功'); + modal.destroy(); + this.st.load(1); + } + }); + } + }, + { + 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(); + this.st.load(1); + } + }); + } + } + ] + }); + modal.afterClose.subscribe(res => { + this.st.load(); + }); + } + + showReason(item: any) { + const modal = this.nzModalService.create({ + nzTitle: '查看原因', + nzContent: '运单数据异常,暂时无法开票,请联系客服400-xxxx-xxxx', + nzFooter: [ + { + label: '关闭', + type: 'primary', + onClick: () => { + modal.destroy(); + } + } + ] + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + refundApplyCode: { + type: 'string', + title: '提现单号', + ui: { + placeholder: '请输入' + } + }, + refundStatus: { + type: 'string', + title: '提现状态', + ui: { + widget: 'dict-select', + params: { dictKey: 'refund:apply:status' }, + placeholder: '请选择' + } + }, + createTime: { + title: '提现时间', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + placeholder: '请选择', + nzShowTime: true + } as SFDateWidgetSchema + }, + bankAccountName: { + type: 'string', + title: '账户名称', + ui: { + placeholder: '请输入', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + accountType: { + type: 'string', + title: '账户类型', + ui: { + widget: 'dict-select', + params: { dictKey: 'bank:type' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + ltdId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + asyncData: () => this.service.getNetworkFreightForwarder(), + visibleIf: { + expand: (value: boolean) => value + } + } + }, + bankType: { + type: 'string', + title: '银行类型', + ui: { + widget: 'dict-select', + params: { dictKey: 'bankname:type' }, + placeholder: '请输入', + visibleIf: { + expand: (value: boolean) => value + } + } + } + } + }; + } + + private initST(): STColumn[] { + return [ + { title: '', index: 'key', type: 'checkbox' }, + { title: '提现时间', index: 'createTime', width: 180 }, + { title: '提现单号', index: 'refundApplyCode', width: 120 }, + { title: '网络货运人', index: 'ltdName', width: 140 }, + { title: '银行类型', index: 'bankTypeLabel', width: 100 }, + { title: '账户类型', index: 'bankTypeLabel', width: 100 }, + { title: '账户名称', index: 'bankAccountName', width: 140 }, + { title: '虚拟账户', index: 'virtualAccount', width: 100 }, + { + title: '提现金额', + index: 'amount', + width: 120, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } + }, + { title: '提现银行账户', render: 'bankCardNumber', width: 180 }, + { title: '提现状态', index: 'refundStatusLabel', width: 100 }, + { title: '银行流水号', index: 'bankSerialNumber', width: 120 }, + { title: '核心交易流水', index: 'coreSerNo', width: 120 }, + { title: '失败原因', index: 'rejectionCause', width: 150, format: item => item.failCause || item.rejectionCause }, + { + title: '操作', + fixed: 'right', + width: '110px', + buttons: [ + { + text: '查看回单', + iif: item => item.refundStatus === '3', + click: item => + this.service.getReceiptUrl(item.receiptUrl, { + bankType: item.bankType, + rmYll: item.userId, + snglFlgCd: item.coreSerNo, + bussType: '06', + ltdId: item.ltdId + }) + }, + { + text: '审核', + iif: item => item.refundStatus === '1', + click: item => this.auditAction(item) + }, + { + text: '详情', + click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/' + item.id]) + } + ] + } + ]; + } +} diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index f70fd812..9fef0745 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -25,6 +25,8 @@ import { PartnerAccountManagementListComponent } from './account-management/comp import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component'; import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; +import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; +import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; const routes: Routes = [ { @@ -67,7 +69,9 @@ const routes: Routes = [ children: [ { path: 'list', component: PartnerAccountManagementListComponent }, { path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent }, - { path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent } + { path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent }, + { path: 'withdraw-record', component: PartnerAccountManagementWithdrawalsRecordComponent }, + { path: 'withdraw-record/:id', component: PartnerAccountManagementWithdrawalsDetailComponent }, ] }, ]; diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 7e3d1570..66b8695d 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -30,6 +30,8 @@ import { PartnerAccountManagementVirtualAccountDetailComponent } from './account import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component'; import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; +import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; +import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -50,7 +52,10 @@ const COMPONENTS: any[] = [ PartnerAccountManagementListComponent, PartnerAccountManagementVirtualAccountDetailComponent, PartnerAccountManagementAccountDetailComponent, - PartnerAccountManagementRecordedDetailComponent]; + PartnerAccountManagementRecordedDetailComponent, + PartnerAccountManagementWithdrawalsRecordComponent, + PartnerAccountManagementWithdrawalsDetailComponent +]; @NgModule({ declarations: [...COMPONENTS], diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 3307c095..82b7732b 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -548,6 +548,16 @@ "text": "账户明细", "link": "/partner/account-management/account-detail", "hide": true + }, + { + "text": "提现记录", + "link": "/partner/account-management/withdraw-record", + "hide": true + }, + { + "text": "提现详情", + "link": "/partner/account-management/withdraw-record/:id", + "hide": true } ] } From 7ce80e8036d8e0fe6b913be0435bf48e8490a9df Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 10 Mar 2022 10:38:05 +0800 Subject: [PATCH 16/70] edit --- src/app/core/guards/auth.guard.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/core/guards/auth.guard.ts b/src/app/core/guards/auth.guard.ts index 89c471f8..da4d1331 100644 --- a/src/app/core/guards/auth.guard.ts +++ b/src/app/core/guards/auth.guard.ts @@ -30,7 +30,7 @@ export class AuthGuard extends ACLGuard { } canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - if (childRoute.routeConfig?.loadChildren) { + if (childRoute.routeConfig?.loadChildren || childRoute.routeConfig?.children) { return super.canActivateChild(childRoute, state); } else { return this.handle(childRoute, state, 2, this.settingRoute(childRoute.params, state.url)); @@ -38,6 +38,8 @@ export class AuthGuard extends ACLGuard { } private handle(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, type: 1 | 2, router?: string): Observable { + console.log(route, state); + if (!router) { return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state); } From 31cb7bd194081c9ce2c1c5d6fcd48b45384ad745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 10 Mar 2022 11:20:21 +0800 Subject: [PATCH 17/70] - --- .../withdrawals-record.component.html | 125 ++++------ .../withdrawals-record.component.ts | 94 +++++-- src/app/shared/utils/deal-precision.ts | 236 ++++++++++++++++++ src/assets/mocks/menu-data.json | 3 +- 4 files changed, 355 insertions(+), 103 deletions(-) create mode 100644 src/app/shared/utils/deal-precision.ts 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 f81ec9dc..14e2ff3e 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 @@ -1,85 +1,62 @@ - - - - - -
-
- -
-
- - - - -
+
+
+
+
+ + + + +
+
- - - - - - - - + + + + + + + + - -
-
- 已选择 - {{ selectedRows.length }} 条数据   累计提现 {{ - totalCallNo }} - 清空 -
- -
+ +
+
+ 已选择 + {{ selectedRows.length }} 条数据   累计提现 {{ + totalCallNo }} + +
+ +
+
+ + + + {{ item.bankName }}
{{ item.bankCardNumber }}
- - - - {{ item.bankName }}
{{ item.bankCardNumber }} -
-
+
-
-
- - - -
+
+
+ + +
- \ No newline at end of file +
+ 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 054a9b09..16738ce9 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 @@ -1,9 +1,10 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; -import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; +import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st'; 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'; @Component({ @@ -12,12 +13,10 @@ import { FreightAccountService } from 'src/app/routes/financial-management/servi styleUrls: ['../../../../commom/less/box.less', '../../../../commom/less/expend-but.less'] }) export class PartnerAccountManagementWithdrawalsRecordComponent implements OnInit { - @ViewChild('st', { static: true }) - st!: STComponent; - @ViewChild('sf', { static: false }) - sf!: SFComponent; - @ViewChild('auditModal', { static: false }) - auditModal!: any; + @ViewChild('st', { static: true }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('auditModal', { static: false }) auditModal!: any; + @ViewChild('viewReasonModal', { static: false }) viewReasonModal!: any; columns: STColumn[] = this.initST(); searchSchema: SFSchema = this.initSF(); @@ -52,11 +51,47 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni }; stChange(e: STChange): void { - switch (e.type) { - case 'checkbox': - this.selectedRows = e.checkbox!; - this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.amount, 0).toFixed(2); - break; + if (e.type === 'checkbox') { + const checkRows = (e.checkbox as STData[]) || []; + //判断当前页是否有选中的行 + if (checkRows.length === 0) { + // 当前页没有存在已勾选的行,移除之前所记录的当前页的行 + const stList = this.st.list; + stList.forEach(item => { + this.selectedRows = this.selectedRows.filter((e: any) => e.id !== item.id); + }) + } else { + //添加新增的行 + checkRows.forEach((item: any) => { + const newSelectedList = this.selectedRows.filter((r: any) => r.id === item.id); + if (newSelectedList.length === 0) { + this.selectedRows.push(item); + + } + }) + // 移除取消选中的行 + const stList = this.st.list; + stList.forEach(item => { + if (!item.checked) { + const index = this.selectedRows.findIndex(_item => item.id === _item.id); + if (index !== -1) this.selectedRows.splice(index, 1); + } + }) + } + let totalCallNo = 0; + this.selectedRows.forEach((item => { + totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse(); + })); + this.totalCallNo = totalCallNo; + } else if (e.type === 'loaded') { + // 页面加载时勾选 + (e?.loaded || []).forEach((r) => { + this.selectedRows.forEach((x) => { + if (x.id === r.id) { + r.checked = true; + } + }); + }); } } @@ -123,7 +158,7 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni showReason(item: any) { const modal = this.nzModalService.create({ nzTitle: '查看原因', - nzContent: '运单数据异常,暂时无法开票,请联系客服400-xxxx-xxxx', + nzContent: item?.rejectionCause || item?.failCause, nzFooter: [ { label: '关闭', @@ -240,27 +275,27 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni private initST(): STColumn[] { return [ - { title: '', index: 'key', type: 'checkbox' }, - { title: '提现时间', index: 'createTime', width: 180 }, - { title: '提现单号', index: 'refundApplyCode', width: 120 }, - { title: '网络货运人', index: 'ltdName', width: 140 }, - { title: '银行类型', index: 'bankTypeLabel', width: 100 }, - { title: '账户类型', index: 'bankTypeLabel', width: 100 }, - { title: '账户名称', index: 'bankAccountName', width: 140 }, - { title: '虚拟账户', index: 'virtualAccount', width: 100 }, + { title: '', index: 'key', type: 'checkbox', className: 'text-center' }, + { title: '提现时间', index: 'createTime', width: 180, className: 'text-center' }, + { 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: 'bankAccountName', width: 220, className: 'text-center' }, + { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, { title: '提现金额', index: 'amount', - width: 120, + width: 150, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } }, - { title: '提现银行账户', render: 'bankCardNumber', width: 180 }, - { title: '提现状态', index: 'refundStatusLabel', width: 100 }, - { title: '银行流水号', index: 'bankSerialNumber', width: 120 }, - { title: '核心交易流水', index: 'coreSerNo', width: 120 }, - { title: '失败原因', index: 'rejectionCause', width: 150, format: item => item.failCause || item.rejectionCause }, + { title: '提现银行账户', render: 'bankCardNumber', width: 200, className: 'text-center' }, + { title: '提现状态', index: 'refundStatusLabel', width: 100, className: 'text-center' }, + { title: '银行流水号', index: 'bankSerialNumber', width: 160, className: 'text-center' }, + { title: '核心交易流水', index: 'coreSerNo', width: 180, className: 'text-center' }, + { title: '失败原因', index: 'rejectionCause', width: 200, format: item => item.failCause, className: 'text-center' }, { title: '操作', fixed: 'right', @@ -278,6 +313,11 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni ltdId: item.ltdId }) }, + { + text: '查看原因', + iif: item => item.refundStatus === '4', + click: item => this.showReason(item) + }, { text: '审核', iif: item => item.refundStatus === '1', diff --git a/src/app/shared/utils/deal-precision.ts b/src/app/shared/utils/deal-precision.ts new file mode 100644 index 00000000..52a47ad4 --- /dev/null +++ b/src/app/shared/utils/deal-precision.ts @@ -0,0 +1,236 @@ +/** + * 操作符类型运算符 + * +:加法运算 + * -:减法运算 + * *:乘法运算 + * /:除法运算 + */ +type OperationType = '+' | '-' | '*' | '/'; + +class Big { + /** + * Big值 + */ + private v: number; + /** + * 构造函数 + * @param v 初始值 + */ + constructor(v: number) { + this.v = v; + } + /** + * 转换整数,返回倍数及整数值,比如 + * 100 >>> { times: 1, num: 100 } ===> 100 + * 3.14 >>> { times: 100, num: 3.14} ===> 314 + * @param n number + */ + private toInteger(n: number) { + const ret = { times: 1, num: 0 }; + if (Number.isInteger(n)) { + ret.num = n; + return ret; + } + ret.times = Math.pow(10, n.toString().split('.')[1].length); + ret.num = parseInt((n * ret.times + 0.5).toString(), 10); + return ret; + } + /** + * 执行运算 + * @param m 数值m + * @param n 数值n + * @param key 运算符 + */ + private operation(m: number = 0, n: number = 0, key: OperationType) { + const o1 = this.toInteger(m); + const o2 = this.toInteger(n); + + const n1 = o1.num; + const n2 = o2.num; + + const t1 = o1.times; + const t2 = o2.times; + + const max = Math.max(t1, t2); + let result = 0; + switch (key) { + case '+': + if (t1 === t2) { + // 两个小数位数相同 + result = n1 + n2; + } else if (t1 > t2) { + // o1 小数位 大于 o2 + result = n1 + n2 * (t1 / t2); + } else { + // o1 小数位 小于 o2 + result = n1 * (t2 / t1) + n2; + } + result /= max; + break; + case '-': + if (t1 === t2) { + result = n1 - n2; + } else if (t1 > t2) { + result = n1 - n2 * (t1 / t2); + } else { + result = n1 * (t2 / t1) - n2; + } + result /= max; + break; + case '*': + result = (n1 * n2) / (t1 * t2); + break; + case '/': + result = (n1 * t2) / (t1 * n2); + break; + default: + result = 0; + } + return new Big(result); + } + /** + * 数值化 + * @param n + */ + private numeric(n: number | Big) { + return n instanceof Big ? n.v : n; + } + + /** + * 加法运算 + * @param n + */ + public plus(n: number | Big) { + return this.operation(this.v, this.numeric(n), '+'); + } + /** + * 减法运算 + * @param n + */ + public minus(n: number | Big) { + return this.operation(this.v, this.numeric(n), '-'); + } + /** + * 乘法运算 + * @param n + */ + public multipliedBy(n: number | Big) { + return this.operation(this.v, this.numeric(n), '*'); + } + /** + * 除法运算 + * @param n + */ + public dividedBy(n: number | Big) { + return this.operation(this.v, this.numeric(n), '/'); + } + /** + * 解析结果 + */ + public parse() { + return this.v; + } + + /** + * 小数点后固定指定位数,比如固定小数点后5位数字,则有 + * 30 ==> 30.00000 + * 3.14 ===> 3.14000 + * @param n + */ + public static digits(v: number | Big, len: number = 2) { + if (Number.isInteger(v)) { + return `${v}.${Array(len).fill(0).join('')}`; + } else { + const [prefix, suffix] = v.toString().split('.'); + const sLen = suffix.length; + if (sLen > len) { + return `${prefix}.${suffix.slice(0, len)}`; + } else if (sLen < len) { + return `${prefix}.${suffix}${Array(len - sLen) + .fill(0) + .join('')}`; + } else { + return `${prefix}.${suffix}`; + } + } + } + public digits(len: number) { + return Big.digits(this.v, len); + } + + /** + * 人民币格式处理 + * - 非数字:返回0 + * - 整数:直接返回 + * - 小数:保留小数点后两位,超出两位则截取 + * @param v + */ + public static rmb(v: string | number) { + if (isNaN(Number(v))) { + return '0'; + } else { + const foo = v.toString(); + if (/^[0-9]+$/.test(foo)) { + return foo; + } else { + const [prefix, suffix] = foo.split('.'); + const sLen = suffix.length; + if (sLen > 2) { + return `${prefix}.${suffix.slice(0, 2)}`; + } else if (sLen < 2) { + return `${foo}0`; + } else { + return foo; + } + } + } + } + public rmb() { + return Big.rmb(this.v); + } + /** + * 切割数字 + * @param v + */ + public static split(v: string | number) { + if (isNaN(Number(v))) { + return []; + } else { + return v + .toString() + .split('.') + .map((item, i) => { + if (i === 1) { + return item && item.length < 2 ? `${item}0` : item; + } + return item; + }); + } + } + public split() { + return Big.split(this.v); + } + + /** + * 省略 --> 如果超过1万,则返回万制,转换后小数点后保留两位 + * 比如:12345 返回 1.23万 + * @param v + */ + public static ellipsis(v: string | number) { + // 如果不是数值类型并且转换之后不为数字,则直接返回传入值 + if (isNaN(Number(v))) { + return v.toString(); + } + // 如果传入数值小于1万则没必要转换,直接返回 + if (+v < 10000) { + return v.toString(); + } + // 超过1万,处理之后再返回 + return Big.rmb(+v / 10000) + '万'; + } + public ellipsis(v: string | number) { + return Big.ellipsis(this.v); + } +} + +export default Big; diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 82b7732b..55c6deb3 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -551,8 +551,7 @@ }, { "text": "提现记录", - "link": "/partner/account-management/withdraw-record", - "hide": true + "link": "/partner/account-management/withdraw-record" }, { "text": "提现详情", From 09a22bab297112a697e1c40e14fcdc388f0b0e45 Mon Sep 17 00:00:00 2001 From: heqinghang Date: Thu, 10 Mar 2022 11:22:26 +0800 Subject: [PATCH 18/70] =?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 19/70] 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 + } + ] } ] } From 5e93d5de64266d459b4621c3e9e1eef8d1e1b159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 10 Mar 2022 13:39:28 +0800 Subject: [PATCH 20/70] - --- .../withdrawals-detail.component.html | 10 +++++----- .../withdrawals-detail.component.ts | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html index 82f0ce06..f9b29185 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html @@ -16,9 +16,9 @@ - + -
+
{{formData?.ltdName}} @@ -41,16 +41,16 @@ {{formData?.refundStatusLabel}} - {{formData?.amount}} + {{formData?.amount | currency}} {{formData?.bankSerialNumber}} - {{formData?.bankId}} + {{formData?.bankCardNumber}} - + {{formData?.refundStatus==='3'?'下载回单':'暂无回单'}}
diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts index 74f5b1d4..2332fd75 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts @@ -2,8 +2,9 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; + @Component({ - selector: 'app-partner-account-management-withdrawals-detail', + selector: 'app-withdrawals-detail', templateUrl: './withdrawals-detail.component.html', styleUrls: ['./withdrawals-detail.component.less'] }) @@ -67,6 +68,19 @@ export class PartnerAccountManagementWithdrawalsDetailComponent implements OnIni }); } + 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 + }); + } + goBack() { history.go(-1); } From 1a353f4c93b4725035cdcdf5ea252c2e8fb21e67 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 10 Mar 2022 14:15:58 +0800 Subject: [PATCH 21/70] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../record-detail.component.html | 8 ++- .../record-detail.component.less | 6 ++ .../record-detail/record-detail.component.ts | 68 +++++++------------ .../services/rebate-management.service.ts | 13 +++- 4 files changed, 49 insertions(+), 46 deletions(-) create mode 100644 src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.less diff --git a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html index 65099230..4f7723fe 100644 --- a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html +++ b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-03-09 15:14:50 + * @LastEditTime : 2022-03-10 14:05:25 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\model\\record-detail\\record-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -23,7 +23,7 @@ +
合计:2999.00元
+
+ +
\ No newline at end of file diff --git a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.less b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.less new file mode 100644 index 00000000..52b47a0e --- /dev/null +++ b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.less @@ -0,0 +1,6 @@ +:host { + [nz-button] { + margin-right: 8px; + margin-bottom: 12px; + } +} \ No newline at end of file diff --git a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts index b5c70083..1efde6a2 100644 --- a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts +++ b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts @@ -2,10 +2,11 @@ import { ModalHelper } from '@delon/theme'; import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; -import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { processSingleSort, ShipperBaseService } from '@shared'; -import { NzModalService } from 'ng-zorro-antd/modal'; +import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal'; import { RebateManagementService } from '../../services/rebate-management.service'; +import { NzButtonSize } from 'ng-zorro-antd/button'; @Component({ selector: 'app-parter-channel-rebate-management-record-detail', @@ -20,6 +21,7 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; spuStatus = '1'; + size: NzButtonSize = 'large'; _$expand = false; data = [{ name1: 1111 }]; constructor( @@ -28,6 +30,7 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { public service: RebateManagementService, private modalService: NzModalService, public shipperservice: ShipperBaseService, + public modalRef: NzModalRef, ) {} /** * 查询字段个数 @@ -50,10 +53,6 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { delete params._$expand; return { ...params, - deadlineTime: { - start: this.sf?.value?.deadlineTime?.[0] || '', - end: this.sf?.value?.deadlineTime?.[1] || '', - }, }; } ngOnInit() { @@ -64,54 +63,33 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { initSF() { this.schema = { properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, - name: { - type: 'string', - title: '订单号' - }, - phone: { - type: 'string', - title: '付款单号' - }, - phone2: { - type: 'string', - title: '下单客户' - }, enterpriseInfoId: { type: 'string', title: '网络货运人', ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true, - asyncData: () => this.shipperservice.getNetworkFreightForwarder() + asyncData: () => this.shipperservice.getNetworkFreightForwarder(), + change: (value: any) => { + console.log(value) + this.st.reload() + } } }, - phone3: { + paymentStatus: { + title: '银行类型', type: 'string', - title: '合伙人名称', ui: { - visibleIf: { - _$expand: (value: boolean) => value - }, - } + widget: 'dict-select', + params: { dictKey: 'overall:payment:status' }, + containsAllLabel: true, + change: (value: any) => { + console.log(value) + this.st.reload() + } + } as SFSelectWidgetSchema }, - deadlineTime: { - title: '时间范围', - type: 'string', - ui: { - widget: 'date', - mode: 'range', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - }, - allowClear: true - } as SFDateWidgetSchema - } } }; this.ui = { @@ -126,7 +104,7 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { this.columns = [ { title: '订单号', - index: 'name1' + index: 'billCode' }, { title: '订单金额(元)', @@ -186,4 +164,8 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { this.sf.reset(); this.st.load(1); } + close() { + this.modalRef.destroy() + } } + diff --git a/src/app/routes/partner/rebate-management/services/rebate-management.service.ts b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts index 5430876a..d3a7a412 100644 --- a/src/app/routes/partner/rebate-management/services/rebate-management.service.ts +++ b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts @@ -1,3 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-03-10 11:19:00 + * @LastEditors : Shiming + * @LastEditTime : 2022-03-10 13:51:05 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\services\\rebate-management.service.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { Injectable, Injector } from '@angular/core'; import { BaseService } from '@shared'; @@ -5,7 +15,8 @@ import { BaseService } from '@shared'; providedIn: 'root', }) export class RebateManagementService extends BaseService { - + // 查询规则抽查列表 + public $api_get_listCompliancePage = '/api/sdc/billRiskOperate/listRiskPage'; constructor(public injector: Injector) { super(injector); } From 7406f1234aba58daa21be3f01c5d83f3ca17deb9 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 10 Mar 2022 14:36:27 +0800 Subject: [PATCH 22/70] fix bug --- .../model/record-detail/record-detail.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html index 4f7723fe..63f8290c 100644 --- a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html +++ b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-03-10 14:05:25 + * @LastEditTime : 2022-03-10 14:34:30 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\model\\record-detail\\record-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -34,5 +34,5 @@
合计:2999.00元
- +
\ No newline at end of file From 15937316dd9edf895254cc379507bdb6f86bff4b Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 10 Mar 2022 15:40:52 +0800 Subject: [PATCH 23/70] fix bug --- .../routes/partner/partner-routing.module.ts | 2 + src/app/routes/partner/partner.module.ts | 8 +- .../rebate-record.component.html | 5 +- .../rebate-record/rebate-record.component.ts | 39 +++- .../rebate-setting.component.html | 48 +++++ .../rebate-setting.component.ts | 172 ++++++++++++++++++ .../abnormal-feedback.component.html | 38 ++++ .../abnormal-feedback.component.less | 6 + .../abnormal-feedback.component.ts | 72 ++++++++ src/assets/mocks/menu-data.json | 2 +- 10 files changed, 379 insertions(+), 13 deletions(-) create mode 100644 src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html create mode 100644 src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts create mode 100644 src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.html create mode 100644 src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.less create mode 100644 src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.ts diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index b22dabab..9970f1d9 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -30,6 +30,7 @@ import { PartnerAccountManagementAccountDetailComponent } from './account-manage import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; +import { ParterRebateManageMentSettingComponent } from './rebate-management/components/rebate-setting/rebate-setting.component'; const routes: Routes = [ { @@ -65,6 +66,7 @@ const routes: Routes = [ children: [ { path: 'particulars', component: ParterRebateManageMentParticularsComponent }, { path: 'record', component: ParterRebateManageMentRecordComponent }, + { path: 'setting', component: ParterRebateManageMentSettingComponent }, ] }, { diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 0d94b9ef..bd2df357 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -40,6 +40,8 @@ import { PartnerAccountManagementRecordedDetailComponent } from './account-manag import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; +import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-management/model/abnormal-feedback/abnormal-feedback.component'; +import { ParterRebateManageMentSettingComponent } from './rebate-management/components/rebate-setting/rebate-setting.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -69,11 +71,13 @@ const COMPONENTS: any[] = [ PartnerAccountManagementAccountDetailComponent, PartnerAccountManagementRecordedDetailComponent, PartnerAccountManagementWithdrawalsRecordComponent, - PartnerAccountManagementWithdrawalsDetailComponent + PartnerAccountManagementWithdrawalsDetailComponent, + ParterRebateManageMenAbnormalFeedbackComponent, + ParterRebateManageMentSettingComponent ]; @NgModule({ declarations: [...COMPONENTS], imports: [CommonModule, PartnerRoutingModule, SharedModule] }) -export class PartnerModule { } +export class PartnerModule {} diff --git a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html index 9ddc7ac3..50b366ea 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-03-09 15:04:50 + * @LastEditTime : 2022-03-10 15:12:03 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-record\\rebate-record.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -41,5 +41,8 @@ [loadingDelay]="500" [loading]="service.http.loading" > + +
1223
+
diff --git a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts index 54e8e57b..1f98579d 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts @@ -7,6 +7,7 @@ import { processSingleSort, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { RebateManagementService } from '../../services/rebate-management.service'; import { ParterRebateManageMenRecordDetailComponent } from '../../model/record-detail/record-detail.component'; +import { ParterRebateManageMenAbnormalFeedbackComponent } from '../../model/abnormal-feedback/abnormal-feedback.component'; @Component({ selector: 'app-parter-channel-rebate-management-record', @@ -27,9 +28,8 @@ export class ParterRebateManageMentRecordComponent implements OnInit { public router: Router, public ar: ActivatedRoute, public service: RebateManagementService, - private modalService: NzModalService, + private modal: NzModalService, public shipperservice: ShipperBaseService, - private modal: ModalHelper ) {} /** * 查询字段个数 @@ -114,7 +114,7 @@ export class ParterRebateManageMentRecordComponent implements OnInit { }, { title: '异常反馈', - index: 'name1' + render: 'name44' }, { title: '操作', @@ -131,15 +131,36 @@ export class ParterRebateManageMentRecordComponent implements OnInit { ]; } /** - *查看详情 + *查看明细 */ viewEvaluate(item: any) { - // this.modalService - this.modal.createStatic(ParterRebateManageMenRecordDetailComponent, {i:item}).subscribe((res: boolean)=> { - if(res) { - + const modal = this.modal.create({ + nzTitle: '明细', + nzWidth: 1200, + nzContent: ParterRebateManageMenRecordDetailComponent, + nzComponentParams: { }, + nzFooter: null + }); + modal.afterClose.subscribe((res: any) => { + if (res) { } - }) + }); + } + /** + *异常反馈 + */ + feedback(item?: any) { + const modal = this.modal.create({ + nzTitle: '异常反馈', + nzWidth: 580, + nzContent: ParterRebateManageMenAbnormalFeedbackComponent, + nzComponentParams: { i: item }, + nzFooter: null + }); + modal.afterClose.subscribe((res: any) => { + if (res) { + } + }); } /** * 重置表单 diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html new file mode 100644 index 00000000..50b366ea --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html @@ -0,0 +1,48 @@ + + + +
+ + +
+ + + +
+
+
+ + + + + +
1223
+
+
+
diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts new file mode 100644 index 00000000..929b96d1 --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts @@ -0,0 +1,172 @@ +import { ModalHelper } from '@delon/theme'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort, ShipperBaseService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { RebateManagementService } from '../../services/rebate-management.service'; +import { ParterRebateManageMenRecordDetailComponent } from '../../model/record-detail/record-detail.component'; +import { ParterRebateManageMenAbnormalFeedbackComponent } from '../../model/abnormal-feedback/abnormal-feedback.component'; + +@Component({ + selector: 'app-parter-channel-rebate-management-setting', + templateUrl: './rebate-setting.component.html' +}) +export class ParterRebateManageMentSettingComponent 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: RebateManagementService, + private modal: NzModalService, + public shipperservice: ShipperBaseService, + ) {} + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + /** + * 查询参数 + */ + get reqParams() { + const params: any = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + return { + ...params, + deadlineTime: { + start: this.sf?.value?.deadlineTime?.[0] || '', + end: this.sf?.value?.deadlineTime?.[1] || '', + }, + }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + month: { + type: 'string', + title: '时间月份', + format: 'month', + }, + phone: { + type: 'string', + title: '合伙人名称' + }, + } + }; + this.ui = { + '*': { + spanLabelFixed: 140, + 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: '异常反馈', + render: 'name44' + }, + { + title: '操作', + fixed: 'right', + width: '90px', + className: 'text-left', + buttons: [ + { + text: '明细', + click: _record => this.viewEvaluate(_record), + } + ] + } + ]; + } + /** + *查看明细 + */ + viewEvaluate(item: any) { + const modal = this.modal.create({ + nzTitle: '明细', + nzWidth: 1200, + nzContent: ParterRebateManageMenRecordDetailComponent, + nzComponentParams: { }, + nzFooter: null + }); + modal.afterClose.subscribe((res: any) => { + if (res) { + } + }); + } + /** + *异常反馈 + */ + feedback(item?: any) { + const modal = this.modal.create({ + nzTitle: '异常反馈', + nzWidth: 580, + nzContent: ParterRebateManageMenAbnormalFeedbackComponent, + nzComponentParams: { i: item }, + nzFooter: null + }); + modal.afterClose.subscribe((res: any) => { + if (res) { + } + }); + } + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } +} diff --git a/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.html b/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.html new file mode 100644 index 00000000..cef84c44 --- /dev/null +++ b/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.html @@ -0,0 +1,38 @@ + + + +
有订单有异常请查看
+
2022-09-08 00:00:00
+
+ +
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.less b/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.less new file mode 100644 index 00000000..52b47a0e --- /dev/null +++ b/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.less @@ -0,0 +1,6 @@ +:host { + [nz-button] { + margin-right: 8px; + margin-bottom: 12px; + } +} \ No newline at end of file diff --git a/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.ts b/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.ts new file mode 100644 index 00000000..3d8c1fd4 --- /dev/null +++ b/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.ts @@ -0,0 +1,72 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-03-10 14:50:45 + * @LastEditors : Shiming + * @LastEditTime : 2022-03-10 15:09:51 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\model\\abnormal-feedback\\abnormal-feedback.component.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ +import { ModalHelper } from '@delon/theme'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { processSingleSort, ShipperBaseService } from '@shared'; +import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal'; +import { RebateManagementService } from '../../services/rebate-management.service'; +import { NzButtonSize } from 'ng-zorro-antd/button'; + +@Component({ + selector: 'app-parter-channel-rebate-management-abnormal-feedback', + templateUrl: './abnormal-feedback.component.html' +}) +export class ParterRebateManageMenAbnormalFeedbackComponent implements OnInit { + schema: SFSchema = {}; + ui!: SFUISchema; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + i!: any; + data = [{ name1: 1111 }]; + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: RebateManagementService, + private modalService: NzModalService, + public shipperservice: ShipperBaseService, + public modalRef: NzModalRef, + ) {} + + + ngOnInit() { + this.initSF(); + } + + initSF() { + this.schema = { + properties: { + name3: { + type: 'string', + title: '回复', + maxLength: 50, + ui: { + widget: 'textarea', + autosize: { minRows: 3, maxRows: 6 }, + placeholder:'请不要超过50个字' + } as SFTextareaWidgetSchema, + }, + } + }; + this.ui = { + '*': { + spanLabelFixed: 60, + grid: { span: 16 }, + } + }; + } + close() { + this.modalRef.destroy() + } +} + diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 473d4c2f..85b1c19b 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -517,7 +517,7 @@ "group": true, "children": [{ "text": "返佣配置", - "link": "/partner/rebate/" + "link": "/partner/rebate/setting" }, { "text": "返佣明细", From 8c06e1f9de9ccb70cf163b04fc9bb98e6efbdabc Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 10 Mar 2022 16:12:36 +0800 Subject: [PATCH 24/70] edit --- proxy.conf.js | 2 +- src/app/core/guards/auth.guard.ts | 2 - src/app/global-config.module.ts | 2 +- .../index/partner-list.component.html | 95 +++++ .../index/partner-list.component.less | 0 .../index/partner-list.component.ts | 298 +++++++++++++++ .../partner-audit-modal.component.html | 7 + .../partner-audit-modal.component.less | 0 .../partner-audit-modal.component.ts | 117 ++++++ .../partner-detail.component.html | 342 ++++++++++++++++++ .../partner-detail.component.less | 30 ++ .../partner-detail.component.ts | 337 +++++++++++++++++ .../services/partner-list.service.ts | 26 ++ .../routes/partner/partner-routing.module.ts | 21 +- src/app/routes/partner/partner.module.ts | 15 +- src/assets/mocks/menu-data.json | 7 +- 16 files changed, 1286 insertions(+), 15 deletions(-) create mode 100644 src/app/routes/partner/partner-list/components/index/partner-list.component.html create mode 100644 src/app/routes/partner/partner-list/components/index/partner-list.component.less create mode 100644 src/app/routes/partner/partner-list/components/index/partner-list.component.ts create mode 100644 src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html create mode 100644 src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.less create mode 100644 src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts create mode 100644 src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html create mode 100644 src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less create mode 100644 src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts create mode 100644 src/app/routes/partner/partner-list/services/partner-list.service.ts diff --git a/proxy.conf.js b/proxy.conf.js index 31995def..822b7622 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -20,7 +20,7 @@ module.exports = { // } '//api': { target: { - host: 'tms-api-test.eascs.com', + host: 'tms-api-dev.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/core/guards/auth.guard.ts b/src/app/core/guards/auth.guard.ts index da4d1331..b5a30a58 100644 --- a/src/app/core/guards/auth.guard.ts +++ b/src/app/core/guards/auth.guard.ts @@ -38,8 +38,6 @@ export class AuthGuard extends ACLGuard { } private handle(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, type: 1 | 2, router?: string): Observable { - console.log(route, state); - if (!router) { return type === 1 ? super.canActivate(route, state) : super.canActivateChild(route, state); } diff --git a/src/app/global-config.module.ts b/src/app/global-config.module.ts index ec62a552..163c16c9 100644 --- a/src/app/global-config.module.ts +++ b/src/app/global-config.module.ts @@ -17,7 +17,7 @@ const alainConfig: AlainConfig = { page: { show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }, modal: { size: 'lg' } }, - sf: { button: { search: '查询' } }, + sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } }, pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true }, auth: { login_url: '/passport/login' }, acl: { guard_url: '/exception/403' } 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 new file mode 100644 index 00000000..f1de5a81 --- /dev/null +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.html @@ -0,0 +1,95 @@ + + + + +
+
+ +
+
+ + + +
+
+
+ + +
+ + +
+ + + +
+ + +
+
+ + 深圳某某有限公司 + + + + + + + +
+
+

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

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

已选(0)

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

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

+
\ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.less b/src/app/routes/partner/partner-list/components/index/partner-list.component.less new file mode 100644 index 00000000..e69de29b 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 new file mode 100644 index 00000000..219a9d6b --- /dev/null +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts @@ -0,0 +1,298 @@ +import { Component, OnInit, 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'; + +@Component({ + selector: 'app-partner-list', + templateUrl: './partner-list.component.html', + styleUrls: ['../../../../commom/less/box.less'] +}) +export class PartnerListComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + columns: STColumn[] = this.initST(); + searchSchema: SFSchema = this.initSF(); + _$expand = false; + + @ViewChild('editTemplate', { static: true }) + editTemplate: any; + + @ViewChild('editCannel', { static: true }) + editCannel: any; + customers: any[] = []; + + constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {} + + ngOnInit(): void {} + + beforeReq = (requestOptions: STRequestOptions) => { + if (this.sf) { + let params = { ...this.sf.value }; + if (params.createTime) { + params.createTime = { start: this.sf?.value?.createTime?.[0], end: this.sf?.value?.createTime?.[1] }; + } + Object.assign(requestOptions.body, params); + } + return requestOptions; + }; + + auditPartner(item: any) { + const modal = this.nzModalService.create({ + nzTitle: '审核', + nzContent: PartnerAuditModalComponent, + nzComponentParams: { info: item }, + nzFooter: null + }); + } + + editTemplateAction(item: any) { + const modal = this.nzModalService.create({ + nzTitle: '修改返佣模板', + nzContent: this.editTemplate, + nzOnOk: () => { + this.confirmEditTemplate(); + return false; + } + }); + } + + confirmEditTemplate() { + 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(); + return false; + } + }); + } + + confirmEditCannel() { + const modal = this.nzModalService.confirm({ + nzTitle: '确定提交吗?', + nzOnOk: () => { + this.nzModalService.closeAll(); + } + }); + } + + routeTo(route: string) { + this.router.navigate([route]); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + paycode: { + type: 'string', + title: '合伙人名称' + }, + paycode2: { + type: 'string', + title: '企业管理员' + }, + paycod3e: { + type: 'string', + title: '手机号' + }, + paycod31e: { + type: 'string', + title: '渠道销售', + ui: { + placeholder: '请输入姓名或者手机号', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + orderS2n: { + type: 'string', + title: '类型', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'refund:apply:status' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + paytype: { + type: 'string', + title: '认证审核状态', + ui: { + widget: 'dict-select', + containsAllLabel: true, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + paymode: { + type: 'string', + title: '签约状态', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'pay:mode' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + paymo1de: { + type: 'string', + title: 'CRM状态', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'pay:mode' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + paymo11de: { + type: 'string', + title: '注册渠道', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'pay:mode' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + paymo11d1e: { + type: 'string', + title: '返佣模板', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'pay:mode' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + paymo11d11e: { + type: 'string', + title: '合伙人状态', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'pay:mode' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + createTime: { + title: '注册时间', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + } + } + }; + } + + 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: '操作', + fixed: 'right', + width: '140px', + buttons: [ + { type: 'divider' }, + { + text: '详情
', + click: item => this.router.navigate(['/partner/partner-list/detail/' + item.id]) + }, + { + text: '修改返佣模板', + click: item => this.editTemplateAction(item) + }, + { + 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]) + } + ] + } + ]; + } +} 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 new file mode 100644 index 00000000..8ea7c9f8 --- /dev/null +++ b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.html @@ -0,0 +1,7 @@ +
+ +
+ \ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.less b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.less new file mode 100644 index 00000000..e69de29b 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 new file mode 100644 index 00000000..eed7b8ac --- /dev/null +++ b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts @@ -0,0 +1,117 @@ +import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema } from '@delon/form'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { PartnerListService } from '../../services/partner-list.service'; + +@Component({ + selector: 'app-partner-audit-modal', + templateUrl: './partner-audit-modal.component.html', + styleUrls: ['./partner-audit-modal.component.less'] +}) +export class PartnerAuditModalComponent implements OnInit { + @ViewChild('sf', { static: false }) + sf!: SFComponent; + @Input() + info: any; + schema!: SFSchema; + constructor(private nzModalService: NzModalService, public service: PartnerListService) {} + + ngOnInit(): void { + this.initSF(this.info); + } + + initSF(user: any) { + this.schema = { + properties: { + staffName: { + title: '合伙人名称', + type: 'string', + ui: { widget: 'text' }, + default: user.name + }, + status: { + title: '审核结果', + type: 'string', + maxLength: 11, + enum: [ + { value: true, label: '通过' }, + { value: false, label: '驳回' } + ], + ui: { widget: 'radio' }, + default: true + }, + a: { + title: '渠道销售', + type: 'string', + enum: [ + { value: true, label: '通过' }, + { value: false, label: '驳回' } + ], + ui: { + widget: 'select', + placeholder: '请选择' + }, + default: '' + }, + b: { + title: '备注', + type: 'string', + maxLength: 100, + ui: { + widget: 'textarea', + placeholder: '请不要超过100个字', + autosize: { minRows: 3 } + } + } + }, + if: { + properties: { status: { enum: [true] } } + }, + then: { + required: ['a'] + }, + else: { + required: ['b'] + } + }; + } + + 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); + // } + // }); + // } + } + + close() { + this.nzModalService.closeAll(); + } +} 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 new file mode 100644 index 00000000..6dcdbb97 --- /dev/null +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 企业管理员信息 + + + + + {{detailData.adminUserInfo?.mobile}} + + + + + +
+ + + + +
+
+ + + + - + + + + + + + + + +
+ + + + + + + + +

+ 四要素验证: + + + +

+
+ + + + + + + + + + + + + + + - + + + + + + + + + +
+ + + 法人信息 + + + + + + + + + - + + + + + + + + + + +
+ + + + +
+
+
+ + + 所属城市 + + 深圳、上海、北京 + + + + + 渠道销售信息 + + 张学友 + + + 13999999999 + + + 2021-09-23 14:43:31 + + +
+ + + + 修改渠道销售记录 + + + + + + + + +
+ +
{{title}} +
+
+ {{content}} +
+
+
+ + +
+
+ + {{ detailData?.enterpriseName }} + + + + + + +
+
+
+ + +
+
+ + {{ detailData?.enterpriseName }} + + + + +
+
+
+ + + + + +
上传
+
+
+ +
+
+ +
+ +
+
+
+
+
\ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less new file mode 100644 index 00000000..eadc3a6a --- /dev/null +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.less @@ -0,0 +1,30 @@ +@import '../../../../usercenter/less/edit.less'; + + +.user-info { + font-size: 16px; + + .enterprise-name { + margin-right: 15px; + } + + img { + width : 64px; + height : 64px; + margin-right : 15px; + border-radius: 50%; + } + + .user-info-des { + margin-bottom: 5px; + } +} + +:host::ng-deep { + .affix { + position: fixed !important; + top : 20px !important; + z-index : 999 !important; + width : 100% !important; + } +} \ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts new file mode 100644 index 00000000..f0e81cf1 --- /dev/null +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts @@ -0,0 +1,337 @@ +import { DatePipe } from '@angular/common'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { apiConf } from '@conf/api.conf'; +import { STColumn } from '@delon/abc/st'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { Subscription, fromEvent } from 'rxjs'; +import { PartnerListService } from '../../services/partner-list.service'; +import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component'; + +@Component({ + selector: 'app-partner-detail', + templateUrl: './partner-detail.component.html', + styleUrls: ['./partner-detail.component.less'], + providers: [DatePipe] +}) +export class PartnerDetailComponent implements OnInit { + columns: STColumn[] = this.initST(); + + @ViewChild('approvedModal', { static: false }) + approvedModal!: any; + @ViewChild('redectModal', { static: false }) + redectModal!: any; + + detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentityVO: { name: '' } }; + tempalateData = { ...this.detailData }; + suppliersData: any = {}; + + isEdit = false; + + uploadURl = apiConf.waterFileUpload; + disabledUpload = false; + enterpriseAddressCode: any = []; + ltdId: any = []; + + approvalOpinion = ''; + networkTransporter = null; + + esignCheckStatus: any = { + 0: '不通过', + 1: '通过', + 2: '未认证' + }; + + scrollTop = 0; + subscribeScoll!: Subscription; + constructor( + public service: PartnerListService, + private route: ActivatedRoute, + private nzModalService: NzModalService, + private datePipe: DatePipe + ) {} + ngOnDestroy(): void { + this.subscribeScoll.unsubscribe(); + } + + ngOnInit() { + this.initData(); + this.loadltdId(); + this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => { + this.scrollTop = document.documentElement.scrollTop; + }); + } + loadltdId() { + // this.service.getNetworkFreightForwarder().subscribe(res => { + // if (res) { + // this.ltdId = res; + // } + // }); + } + + initData() { + // this.service + // .request(this.service.$api_get_freight_detail, { + // id: this.route.snapshot.params.id + // }) + // .subscribe(res => { + // if (res) { + // this.detailData = res; + // this.tempalateData = { ...this.detailData }; + // this.enterpriseAddressCode = [ + // Number(this.detailData.fullRegionVO?.provinceCode), + // Number(this.detailData.fullRegionVO?.cityCode), + // Number(this.detailData.fullRegionVO?.areaCode) + // ]; + // } + // }); + } + + goBack() { + window.history.go(-1); + } + /** + * 冻结 + */ + freezeOrResume(type: number) { + // this.service.http + // .post(this.service.$api_lock_freight, { + // id: this.route.snapshot.params.id, + // statedLocked: !!type + // }) + // .subscribe(res => { + // if (res.data === true) { + // if (type === 0) { + // this.service.msgSrv.success(`启用成功!`); + // } else { + // this.service.msgSrv.success(`冻结成功!`); + // } + // this.initData(); + // } else { + // this.service.msgSrv.error(res.msg || '操作失败!'); + // } + // }); + } + + auditPartner() { + const modal = this.nzModalService.create({ + nzTitle: '审核', + nzContent: PartnerAuditModalComponent, + nzComponentParams: { info: this.detailData }, + nzFooter: null + }); + } + + ratify() { + this.isEdit = true; + } + + deleteImg(data: any, key: string, key2: string) { + this.nzModalService.warning({ + nzTitle: '是否确认删除该图片', + nzOnOk: () => { + this.disabledUpload = true; + data[key] = ''; + data[key2] = ''; + setTimeout(() => { + this.disabledUpload = false; + }, 100); + } + }); + } + changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string, id: string) { + if (type === 'success') { + data[key] = file.response.data?.fullFileWatermarkPath; + data[key2] = file.response.data?.fullFilePath; + if (id === 'legalFront' || id === 'legalBack') { + this.checkIdCard(file.response.data?.fullFilePath, id === 'legalFront' ? 'front' : 'back', 1); + } + if (id === 'certificateBackFront' || id === 'certificateBack') { + this.checkIdCard(file.response.data?.fullFilePath, id === 'certificateBackFront' ? 'front' : 'back', 0); + } + if (id === 'detailPhoto') { + this.checkBusinessLicense(file.response.data?.fullFilePath); + } + } + } + + /** + * 级联获取地区数据 + * @param node 节点 + * @param index 层级 + * @returns + */ + loadRegionData = (node: any, index: number) => { + return new Promise(resolve => { + this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.regionCode || '' }).subscribe( + res => { + node.children = res.map((item: any) => ({ ...item, isLeaf: index === 1, value: item.regionCode, label: item.name })); + }, + _ => {}, + () => { + resolve(node); + } + ); + }); + }; + + reset() { + this.detailData = { ...this.tempalateData }; + this.isEdit = false; + } + + save() { + const dateil = { ...this.detailData }; + Object.assign(dateil.legalPersonIdentityVO, { + validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'), + validEndTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validEndTime, 'yyyy-MM-dd') + }); + const params = {}; + Object.assign(params, { + adminMobile: dateil.adminMobile, + adminAppUserId: dateil.adminAppUserId, + adminUserInfo: { ...dateil.adminUserInfo }, + bankAccount: dateil.bankAccount, + businessScope: dateil.businessScope, + createBank: dateil.createBank, + creditPhoto: dateil.creditPhoto, + creditPhotoWatermark: dateil.creditPhotoWatermark, + enterpriseAddress: dateil.enterpriseAddress, + enterpriseAddressCode: this.enterpriseAddressCode[2], + enterpriseLogo: dateil.enterpriseLogo, + enterpriseName: dateil.enterpriseName, + enterpriseRegistrationTime: this.datePipe.transform(dateil.enterpriseRegistrationTime, 'yyyy-MM-dd'), + enterpriseType: dateil.enterpriseType, + id: dateil.id, + legalPersonIdentityDTO: { ...dateil.legalPersonIdentityVO }, + licensePhoto: dateil.licensePhoto, + licensePhotoWatermark: dateil.licensePhotoWatermark, + networkTransporter: dateil.networkTransporter, + oftenUsedServices: dateil.oftenUsedServices, + operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'), + operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'), + promotersTelephone: dateil.promotersTelephone, + registerAddress: dateil.registerAddress, + registerPhone: dateil.registerPhone, + registrationCapital: dateil.registrationCapital, + taxAuthority: dateil.taxAuthority, + unifiedSocialCreditCode: dateil.unifiedSocialCreditCode + }); + // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('企业修改成功'); + // this.initData(); + // this.isEdit = false; + // } + // }); + } + + // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 + checkIdCard(imgurl: any, isFront: string, type: number) { + const params = { + idCardUrl: imgurl, + side: isFront + }; + // this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { + // if (res) { + // if (type === 1) { + // // 法定代表人证件照 + // if (isFront === 'front') { + // // 正面 + // if (res.name) { + // this.detailData.legalPersonIdentityVO.name = res.name; + // } + // if (res.number) { + // this.detailData.legalPersonIdentityVO.certificateNumber = res.number; + // } + // } + // if (isFront === 'back') { + // // 背面 + // if (res.validFrom) { + // this.detailData.legalPersonIdentityVO.validStartTime = res.validFrom; + // } + // if (res.validTo) { + // this.detailData.legalPersonIdentityVO.validEndTime = res.validTo; + // } else { + // this.detailData.legalPersonIdentityVO.validEndTime = null; + // } + // } + // } + // // 企业管理员证件照 + // if (type === 0) { + // if (isFront === 'front') { + // // 正面 + // if (res.name) { + // this.detailData.adminUserInfo.name = res.name; + // } + // if (res.number) { + // this.detailData.adminUserInfo.certificateNumber = res.number; + // } + // } + // } + // } + // }); + } + + // 识别营业执照 + checkBusinessLicense(imgurl: any) { + // this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { + // if (res) { + // if (res.registrationNumber) { + // this.detailData.unifiedSocialCreditCode = res.registrationNumber; + // } + // if (res.name) { + // this.detailData.enterpriseName = res.name; + // } + // if (res.type) { + // this.detailData.enterpriseType = res.type; + // } + // if (res.addressRegionCodes) { + // this.detailData.enterpriseAddressCode = res.addressRegionCodes; + // } + // if (res.address) { + // this.detailData.enterpriseAddress = res.address; + // } + // if (res.registeredCapital) { + // this.detailData.registrationCapital = res.registeredCapital; + // } + // if (res.foundDate) { + // this.detailData.enterpriseRegistrationTime = res.foundDate; + // } + // if (res.businessTermStartDate) { + // this.detailData.operatingStartTime = res.businessTermStartDate; + // } + // if (res.businessTermEndDate) { + // this.detailData.operatingEndTime = res.businessTermEndDate; + // } else { + // this.detailData.operatingEndTime = null; + // } + // if (res.businessScope) { + // this.detailData.businessScope = res.businessScope; + // } + // } + // }); + } + + 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: '操作', + fixed: 'right', + width: '140px', + buttons: [ + { + text: '详情' + } + ] + } + ]; + } +} diff --git a/src/app/routes/partner/partner-list/services/partner-list.service.ts b/src/app/routes/partner/partner-list/services/partner-list.service.ts new file mode 100644 index 00000000..7b07381f --- /dev/null +++ b/src/app/routes/partner/partner-list/services/partner-list.service.ts @@ -0,0 +1,26 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService, EACacheService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { ImageViewComponent } from 'src/app/shared/components/imagelist'; + +@Injectable() +export class PartnerListService extends BaseService { + $mock_url = '/rule?_allow_anonymous=true'; + + // 根据地区code查询列表 + $api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode'; + // 根据地区code查询地区详情 + $api_get_region_detail_by_code = '/api/mdc/pbc/region/getRegionDetailByCode'; + + constructor(public injector: Injector, private nzModalService: NzModalService) { + super(injector); + } + + showImg(url: any) { + const params = { + imgList: [url], + index: 0 + }; + this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } }); + } +} diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 9fef0745..5f131455 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -27,6 +27,8 @@ import { PartnerAccountManagementAccountDetailComponent } from './account-manage import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; +import { PartnerListComponent } from './partner-list/components/index/partner-list.component'; +import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component'; const routes: Routes = [ { @@ -38,7 +40,7 @@ const routes: Routes = [ { path: 'partner/custom-detail/:id', component: PartnerPartnerCustomDetailComponent }, { path: 'partner/custom-order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent }, { path: 'sale/custom-detail/:id', component: PartnerSaleCustomDetailComponent }, - { path: 'sale/partner-detail/:id', component: PartnerSalePartnerDetailComponent }, + { path: 'sale/partner-detail/:id', component: PartnerSalePartnerDetailComponent } ] }, { @@ -46,7 +48,7 @@ const routes: Routes = [ children: [ { path: '', component: ParterChannelSalesListComponent }, { path: 'list', component: ParterChannelSalesListComponent }, - { path: 'edit', component: ParterChannelSalesEditComponent }, + { path: 'edit', component: ParterChannelSalesEditComponent } ] }, { @@ -54,14 +56,14 @@ const routes: Routes = [ children: [ { path: '', component: ParterLevelConfigListComponent }, { path: 'list', component: ParterLevelConfigListComponent }, - { path: 'edit', component: ParterLevelConfigEditComponent }, + { path: 'edit', component: ParterLevelConfigEditComponent } ] }, { path: 'rebate', children: [ { path: 'particulars', component: ParterRebateManageMentParticularsComponent }, - { path: 'record', component: ParterRebateManageMentRecordComponent }, + { path: 'record', component: ParterRebateManageMentRecordComponent } ] }, { @@ -71,12 +73,19 @@ const routes: Routes = [ { path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent }, { path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent }, { path: 'withdraw-record', component: PartnerAccountManagementWithdrawalsRecordComponent }, - { path: 'withdraw-record/:id', component: PartnerAccountManagementWithdrawalsDetailComponent }, + { path: 'withdraw-record/:id', component: PartnerAccountManagementWithdrawalsDetailComponent } ] }, + { + path: 'partner-list', + children: [ + { path: '', component: PartnerListComponent }, + { path: 'detail/:id', component: PartnerDetailComponent } + ] + } ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) -export class PartnerRoutingModule { } +export class PartnerRoutingModule {} diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 66b8695d..49fe831a 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -32,6 +32,10 @@ import { PartnerAccountManagementAccountDetailComponent } from './account-manage import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; +import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component'; +import { PartnerListComponent } from './partner-list/components/index/partner-list.component'; +import { PartnerAuditModalComponent } from './partner-list/components/partner-audit-modal/partner-audit-modal.component'; +import { PartnerListService } from './partner-list/services/partner-list.service'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -54,11 +58,14 @@ const COMPONENTS: any[] = [ PartnerAccountManagementAccountDetailComponent, PartnerAccountManagementRecordedDetailComponent, PartnerAccountManagementWithdrawalsRecordComponent, - PartnerAccountManagementWithdrawalsDetailComponent + PartnerAccountManagementWithdrawalsDetailComponent, + PartnerListComponent, + PartnerDetailComponent ]; @NgModule({ - declarations: [...COMPONENTS], - imports: [CommonModule, PartnerRoutingModule, SharedModule] + declarations: [...COMPONENTS, PartnerAuditModalComponent], + imports: [CommonModule, PartnerRoutingModule, SharedModule], + providers: [PartnerListService] }) -export class PartnerModule { } +export class PartnerModule {} diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 82b7732b..45058d21 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -508,7 +508,12 @@ { "text": "合伙人管理", "icon": "anticon anticon-dashboard", - "children": [{ + "children": [ + { + "text": "合伙人列表", + "link": "/partner/partner-list" + }, + { "text": "业务统计", "link": "/partner/business-statistics/index" }, From ab385dea60a6718989fedd1f33e95026dbd68310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 10 Mar 2022 17:51:20 +0800 Subject: [PATCH 25/70] - --- .../account-detail.component.html | 1 + .../components/list/list.component.html | 5 +- .../recorded-detail.component.html | 1 + .../virtual-account-detail.component.ts | 2 +- .../withdrawals-detail.component.html | 99 ++++++++++--------- .../withdrawals-detail.component.ts | 2 +- .../withdrawals-record.component.html | 1 + .../withdrawals-record.component.ts | 6 +- .../routes/partner/partner-routing.module.ts | 25 +++-- src/app/routes/partner/partner.module.ts | 4 +- src/assets/mocks/menu-data.json | 31 +++--- 11 files changed, 100 insertions(+), 77 deletions(-) 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 e37a9ce3..7f949749 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,3 +1,4 @@ + 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 9992f0ab..e982c4e3 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 @@ -1,3 +1,4 @@ + - - - + + + - - -
- - {{formData?.ltdName}} - - - {{formData?.bankType==='1'?'平安银行':'浦发银行'}} - - - {{formData?.refundApplyCode}} - - - {{formData?.bankAccountName}} - - - {{formData?.createTime}} - - - {{formData?.virtualAccount}} - - - {{formData?.refundStatusLabel}} - - - {{formData?.amount | currency}} - - - {{formData?.bankSerialNumber}} - - - {{formData?.bankCardNumber}} - - - {{formData?.refundStatus==='3'?'下载回单':'暂无回单'}} - -
- -
-
- -
+ + +
+ + {{formData?.ltdName}} + + + {{formData?.bankType==='1'?'平安银行':'浦发银行'}} + + + {{formData?.refundApplyCode}} + + + {{formData?.bankAccountName}} + + + {{formData?.createTime}} + + + {{formData?.virtualAccount}} + + + {{formData?.refundStatusLabel}} + + + {{formData?.amount | currency}} + + + {{formData?.bankSerialNumber}} + + + {{formData?.bankCardNumber}} + + + {{formData?.refundStatus==='3'?'下载回单':'暂无回单'}} + +
+ + +
+
+
- \ No newline at end of file +
+
diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts index 2332fd75..9c6173a1 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts @@ -8,7 +8,7 @@ import { FreightAccountService } from 'src/app/routes/financial-management/servi templateUrl: './withdrawals-detail.component.html', styleUrls: ['./withdrawals-detail.component.less'] }) -export class PartnerAccountManagementWithdrawalsDetailComponent implements OnInit { +export class PartnerAccountManagementWithdralDetailComponent implements OnInit { formData: any = {}; timeLineData: any = []; 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 14e2ff3e..d7c20673 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 @@ -1,3 +1,4 @@ +
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 16738ce9..6b7b86f4 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 @@ -1,5 +1,5 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; @@ -27,7 +27,7 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni refundStatus: any = ''; msg = ''; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) { } + constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { } ngOnInit(): void { } @@ -325,7 +325,7 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni }, { text: '详情', - click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/' + item.id]) + click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) } ] } diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index b22dabab..a9bf5669 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -29,7 +29,7 @@ import { ParterRebateManageMentRecordComponent } from './rebate-management/compo import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component'; import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; -import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; +import { PartnerAccountManagementWithdralDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; const routes: Routes = [ { @@ -70,13 +70,26 @@ 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: PartnerAccountManagementWithdrawalsDetailComponent }, + { + 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 } + ] + }, ] }, + { path: 'claim-audit', children: [ diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 0d94b9ef..cbe18425 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -38,7 +38,7 @@ import { PartnerAccountManagementVirtualAccountDetailComponent } from './account import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component'; import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; -import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; +import { PartnerAccountManagementWithdralDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; const COMPONENTS: any[] = [ @@ -69,7 +69,7 @@ const COMPONENTS: any[] = [ PartnerAccountManagementAccountDetailComponent, PartnerAccountManagementRecordedDetailComponent, PartnerAccountManagementWithdrawalsRecordComponent, - PartnerAccountManagementWithdrawalsDetailComponent + PartnerAccountManagementWithdralDetailComponent ]; @NgModule({ diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 473d4c2f..3f8a56dc 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -542,11 +542,11 @@ "group": true, "children": [{ "text": "账户管理", - "link": "/partner/account-management/list" + "link": "/partner/account-management/am" }, { "text": "账户明细", - "link": "/partner/account-management/account-detail", + "link": "/partner/account-management/am/detail/:id", "hide": true }, { @@ -555,7 +555,12 @@ }, { "text": "提现详情", - "link": "/partner/account-management/withdraw-record/:id", + "link": "/partner/account-management/withdraw-record/detail/:id", + "hide": true + }, + { + "text": "待入账明细", + "link": "/partner/account-management/am/recorded/detail/:id", "hide": true } ] @@ -564,16 +569,16 @@ "text": "客户认领审核", "link": "/partner/claim-audit/list", "children": [{ - "text": "合伙人客户认领详情", - "link": "/partner/claim-audit/partner-detail", - "hide": true - }, - { - "text": "渠道销售客户认领详情", - "link": "/partner/claim-audit/channel-detail", - "hide": true - } - ] + "text": "合伙人客户认领详情", + "link": "/partner/claim-audit/partner-detail", + "hide": true + }, + { + "text": "渠道销售客户认领详情", + "link": "/partner/claim-audit/channel-detail", + "hide": true + } + ] } ] } From 28a20973d3da53acf594f5beb4d5ebfb35f86d86 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 10 Mar 2022 20:36:10 +0800 Subject: [PATCH 26/70] edit --- .../partner-audit-modal.component.ts | 42 +++++++--- .../partner-detail.component.html | 80 ++++++++---------- .../partner-detail.component.ts | 82 ++++++++++++------- .../freight/list/detail/detail.component.html | 1 - 4 files changed, 113 insertions(+), 92 deletions(-) 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 eed7b8ac..ab86de05 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 @@ -1,5 +1,5 @@ import { Component, Input, OnInit, ViewChild } from '@angular/core'; -import { SFComponent, SFSchema } from '@delon/form'; +import { SFComponent, SFSchema, SFValue } from '@delon/form'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { PartnerListService } from '../../services/partner-list.service'; @@ -23,6 +23,13 @@ export class PartnerAuditModalComponent implements OnInit { initSF(user: any) { this.schema = { properties: { + isPass: { + type: 'boolean', + ui: { + hidden: true + }, + default: this.info.isPass + }, staffName: { title: '合伙人名称', type: 'string', @@ -37,7 +44,10 @@ export class PartnerAuditModalComponent implements OnInit { { value: true, label: '通过' }, { value: false, label: '驳回' } ], - ui: { widget: 'radio' }, + ui: { + widget: 'radio', + hidden: this.info.isPass !== undefined + }, default: true }, a: { @@ -49,7 +59,14 @@ export class PartnerAuditModalComponent implements OnInit { ], ui: { widget: 'select', - placeholder: '请选择' + placeholder: '请选择', + hidden: this.info.isPass === false, + visibleIf: { + status: value => value + }, + errors: { + required: ' ' + } }, default: '' }, @@ -60,19 +77,18 @@ export class PartnerAuditModalComponent implements OnInit { ui: { widget: 'textarea', placeholder: '请不要超过100个字', - autosize: { minRows: 3 } + autosize: { minRows: 3 }, + hidden: this.info.isPass === true, + visibleIf: { + status: value => !value || this.info.isPass === false + }, + errors: { + required: ' ' + } } } }, - if: { - properties: { status: { enum: [true] } } - }, - then: { - required: ['a'] - }, - else: { - required: ['b'] - } + required: ['a', 'b'] }; } 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 6dcdbb97..f242099c 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 @@ -49,13 +49,11 @@ - - - @@ -73,8 +71,7 @@ 冻结 - @@ -113,7 +110,8 @@ [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> - {{detailData.adminUserInfo?.mobile}} + - 法人信息 + 企业法人信息 @@ -232,7 +230,6 @@ (ngModelChange)="$event?detailData.legalPersonIdentityVO.validEndTime='':''" class="ml-sm">长期 -
@@ -244,15 +241,19 @@
-
- - - 所属城市 - - 深圳、上海、北京 + + + + + + + {{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{ + detailData?.fullRegionVO?.areaName }} + + 渠道销售信息 @@ -271,8 +272,8 @@ 修改渠道销售记录 - + @@ -289,35 +290,6 @@
- -
-
- - {{ detailData?.enterpriseName }} - - - - - - -
-
-
- - -
-
- - {{ detailData?.enterpriseName }} - - - - -
-
-
-
+ + + +

转移客户数:10

+ + +

不转移客户数:10

+ + +

+ 客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,修改成功后,修改时间也是合伙人与客户的结算结束时间,成为原来渠道销售的直客。 +

\ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts index f0e81cf1..fdfd31a3 100644 --- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts @@ -15,16 +15,13 @@ import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit providers: [DatePipe] }) export class PartnerDetailComponent implements OnInit { - columns: STColumn[] = this.initST(); + @ViewChild('logModal') + logModal: any; - @ViewChild('approvedModal', { static: false }) - approvedModal!: any; - @ViewChild('redectModal', { static: false }) - redectModal!: any; + columns: { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST(); detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentityVO: { name: '' } }; tempalateData = { ...this.detailData }; - suppliersData: any = {}; isEdit = false; @@ -33,9 +30,6 @@ export class PartnerDetailComponent implements OnInit { enterpriseAddressCode: any = []; ltdId: any = []; - approvalOpinion = ''; - networkTransporter = null; - esignCheckStatus: any = { 0: '不通过', 1: '通过', @@ -113,11 +107,21 @@ export class PartnerDetailComponent implements OnInit { // }); } - auditPartner() { + auditPartner(isPass: boolean) { const modal = this.nzModalService.create({ nzTitle: '审核', nzContent: PartnerAuditModalComponent, - nzComponentParams: { info: this.detailData }, + nzComponentParams: { info: { ...this.detailData, isPass } }, + nzFooter: null + }); + } + + showChangeDetail() { + const modal = this.nzModalService.create({ + nzTitle: '详情', + nzContent: this.logModal, + nzNoAnimation: true, + nzWidth: 700, nzFooter: null }); } @@ -313,25 +317,41 @@ export class PartnerDetailComponent 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: '操作', - fixed: 'right', - width: '140px', - buttons: [ - { - text: '详情' - } - ] - } - ]; + private initST(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } { + return { + logsColumn: [ + { 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: '操作', + fixed: 'right', + width: '140px', + buttons: [ + { + text: '详情', + click: () => this.showChangeDetail() + } + ] + } + ], + changeColumn: [ + { title: '客户名称', index: 'payCode', width: 180 }, + { title: '合伙人', index: 'ltdName', width: 160 }, + { title: '渠道销售', index: 'payDate', className: 'text-center', width: 130 }, + { title: 'CRM审核状态', index: 'payDate', width: 150 }, + { title: '生效时间', index: 'payDate', className: 'text-center', width: 130 } + ], + beChangeColumn: [ + { title: '客户名称', index: 'payCode', width: 180 }, + { title: '合伙人', index: 'ltdName', width: 160 }, + { title: '渠道销售', index: 'payDate', className: 'text-center', width: 130 }, + { title: '生效时间', index: 'payDate', className: 'text-center', width: 130 } + ] + }; } } diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index 7a3798cf..33cb59e6 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -278,7 +278,6 @@ -
From 1db85b00b95f374feb6ed8259591604fa1d50473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Fri, 11 Mar 2022 10:36:49 +0800 Subject: [PATCH 27/70] =?UTF-8?q?=E5=85=A5=E8=B4=A6=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../withdrawals-detail.component.ts | 2 +- .../routes/partner/partner-routing.module.ts | 12 +- src/app/routes/partner/partner.module.ts | 7 +- .../components/detail/detail.component.html | 64 ++++ .../components/detail/detail.component.less | 17 + .../components/detail/detail.component.ts | 87 +++++ .../components/record/record.component.html | 62 ++++ .../components/record/record.component.ts | 334 ++++++++++++++++++ src/assets/mocks/menu-data.json | 9 + 9 files changed, 590 insertions(+), 4 deletions(-) create mode 100644 src/app/routes/partner/recorded/components/detail/detail.component.html create mode 100644 src/app/routes/partner/recorded/components/detail/detail.component.less create mode 100644 src/app/routes/partner/recorded/components/detail/detail.component.ts create mode 100644 src/app/routes/partner/recorded/components/record/record.component.html create mode 100644 src/app/routes/partner/recorded/components/record/record.component.ts diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts index 9c6173a1..95657e1e 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts @@ -4,7 +4,7 @@ import { FreightAccountService } from 'src/app/routes/financial-management/servi @Component({ - selector: 'app-withdrawals-detail', + selector: 'app-partner-account-management-withdrawals-detail', templateUrl: './withdrawals-detail.component.html', styleUrls: ['./withdrawals-detail.component.less'] }) diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index a9bf5669..1fa7f324 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -30,6 +30,8 @@ import { PartnerAccountManagementAccountDetailComponent } from './account-manage import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; import { PartnerAccountManagementWithdralDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; +import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; +import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component'; const routes: Routes = [ { @@ -79,7 +81,6 @@ const routes: Routes = [ { path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent }, ] }, - { path: 'withdraw-record', children: [ @@ -89,7 +90,6 @@ const routes: Routes = [ }, ] }, - { path: 'claim-audit', children: [ @@ -99,6 +99,14 @@ const routes: Routes = [ { path: 'partner-detail', component: ParterClaimAuditListPartnerDetailComponent }, ] }, + { + path: 'recorded', + children: [ + { path: 'record', component: PartnerRecordedRecordComponent }, + { path: 'record/detail/:id', component: PartnerRecordedDetailComponent } + ] + }, + ]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index cbe18425..deb047b2 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -40,6 +40,8 @@ import { PartnerAccountManagementRecordedDetailComponent } from './account-manag import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component'; import { PartnerAccountManagementWithdralDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component'; import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; +import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component'; +import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -69,7 +71,10 @@ const COMPONENTS: any[] = [ PartnerAccountManagementAccountDetailComponent, PartnerAccountManagementRecordedDetailComponent, PartnerAccountManagementWithdrawalsRecordComponent, - PartnerAccountManagementWithdralDetailComponent + PartnerAccountManagementWithdralDetailComponent, + PartnerRecordedRecordComponent, + PartnerRecordedDetailComponent + ]; @NgModule({ diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.html b/src/app/routes/partner/recorded/components/detail/detail.component.html new file mode 100644 index 00000000..ed894907 --- /dev/null +++ b/src/app/routes/partner/recorded/components/detail/detail.component.html @@ -0,0 +1,64 @@ + + + + + + + + + + +
+ + {{formData?.ltdName}} + + + {{formData?.bankType==='1'?'平安银行':'浦发银行'}} + + + {{formData?.refundApplyCode}} + + + {{formData?.bankAccountName}} + + + {{formData?.createTime}} + + + {{formData?.virtualAccount}} + + + {{formData?.refundStatusLabel}} + + + {{formData?.amount | currency}} + + + {{formData?.bankSerialNumber}} + + + {{formData?.bankCardNumber}} + + + {{formData?.refundStatus==='3'?'下载回单':'暂无回单'}} + +
+ + +
+
+ +
+
+
diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.less b/src/app/routes/partner/recorded/components/detail/detail.component.less new file mode 100644 index 00000000..e299b7d1 --- /dev/null +++ b/src/app/routes/partner/recorded/components/detail/detail.component.less @@ -0,0 +1,17 @@ +:host::ng-deep { + + .ant-alert-info { + background-color: #f3f3f3; + border : 1px solid #dbdbdb; + + .ant-alert-message { + color: rgba(0, 0, 0, 0.85); + font-weight: 600; + font-size: 16px; + } + } + + .ant-form-item { + margin-bottom: 15px; + } +} \ No newline at end of file diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.ts b/src/app/routes/partner/recorded/components/detail/detail.component.ts new file mode 100644 index 00000000..a4c4b5ba --- /dev/null +++ b/src/app/routes/partner/recorded/components/detail/detail.component.ts @@ -0,0 +1,87 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; + + +@Component({ + selector: 'app-partner-recored-detail', + templateUrl: './detail.component.html', + styleUrls: ['./detail.component.less'] +}) +export class PartnerRecordedDetailComponent implements OnInit { + formData: any = {}; + + timeLineData: any = []; + + constructor(public service: FreightAccountService, private route: ActivatedRoute) { + const id = route.snapshot.params.id; + this.loadRefundDetail(id); + } + + ngOnInit(): void { } + + loadRefundDetail(id: string) { + this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => { + if (res) { + this.formData = res; + // 处理流程节点数据 + // 流程是否结束 + let isEnd = false; + if (res.successTime) { + isEnd = true; + if (res.refundStatus === '3') { + this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' }); + } else { + this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' }); + } + } + if (res.agreeTime && res.refundStatus !== '4') { + this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' }); + } + if (res.agreeTime) { + if (res.refundStatus === '4') { + isEnd = true; + this.timeLineData.push({ + time: res.agreeTime, + value: `拒绝提现
操作人员:${res.handlerUserIdLabel}`, + color: 'red' + }); + } else { + this.timeLineData.push({ + time: res.agreeTime, + value: `审核通过
操作人员:${res.handlerUserIdLabel}`, + color: 'gray' + }); + } + } + if (res.createTime) { + this.timeLineData.push({ + time: res.createTime, + value: `提交提现申请
提现${res.amount}元至${res.bankName}(${res.bankCardNumber})
操作人员:${res.userIdLabel}`, + color: 'gray' + }); + } + if (this.timeLineData?.length > 0 && !isEnd) { + this.timeLineData[0].color = 'green'; + } + } + }); + } + + 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 + }); + } + + 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 new file mode 100644 index 00000000..50438e09 --- /dev/null +++ b/src/app/routes/partner/recorded/components/record/record.component.html @@ -0,0 +1,62 @@ + + +
+
+ +
+
+ + + + +
+
+
+ + + + + + + + + + + +
+
+ 已选择 + {{ selectedRows.length }} 条数据   累计提现 {{ + totalCallNo }} + +
+ +
+
+ + + + {{ item.bankName }}
{{ item.bankCardNumber }} +
+
+
+ + +
+
+ + + +
+
+
diff --git a/src/app/routes/partner/recorded/components/record/record.component.ts b/src/app/routes/partner/recorded/components/record/record.component.ts new file mode 100644 index 00000000..e15f2aaa --- /dev/null +++ b/src/app/routes/partner/recorded/components/record/record.component.ts @@ -0,0 +1,334 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st'; +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'; + + +@Component({ + selector: 'app-partner-recorded-record', + templateUrl: './record.component.html', + styleUrls: ['../../../../commom/less/box.less', '../../../../commom/less/expend-but.less'] +}) +export class PartnerRecordedRecordComponent implements OnInit { + @ViewChild('st', { static: true }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('auditModal', { static: false }) auditModal!: any; + @ViewChild('viewReasonModal', { static: false }) viewReasonModal!: any; + columns: STColumn[] = this.initST(); + searchSchema: SFSchema = this.initSF(); + + _$expand = false; + + selectedRows: any[] = []; + totalCallNo = 0; + refundStatus: any = ''; + + msg = ''; + constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { } + + ngOnInit(): void { } + + beforeReq = (requestOptions: STRequestOptions) => { + if (this.sf) { + Object.assign(requestOptions.body, { + ...this.sf.value, + createTime: { + start: this.sf.value.createTime?.[0] || '', + end: this.sf.value.createTime?.[1] || '' + }, + refundStatus: this.refundStatus || null + }); + } + return requestOptions; + }; + + afterRes = (data: any[], rawData?: any) => { + data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' })); + return data; + }; + + stChange(e: STChange): void { + if (e.type === 'checkbox') { + const checkRows = (e.checkbox as STData[]) || []; + //判断当前页是否有选中的行 + if (checkRows.length === 0) { + // 当前页没有存在已勾选的行,移除之前所记录的当前页的行 + const stList = this.st.list; + stList.forEach(item => { + this.selectedRows = this.selectedRows.filter((e: any) => e.id !== item.id); + }) + } else { + //添加新增的行 + checkRows.forEach((item: any) => { + const newSelectedList = this.selectedRows.filter((r: any) => r.id === item.id); + if (newSelectedList.length === 0) { + this.selectedRows.push(item); + + } + }) + // 移除取消选中的行 + const stList = this.st.list; + stList.forEach(item => { + if (!item.checked) { + const index = this.selectedRows.findIndex(_item => item.id === _item.id); + if (index !== -1) this.selectedRows.splice(index, 1); + } + }) + } + let totalCallNo = 0; + this.selectedRows.forEach((item => { + totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse(); + })); + this.totalCallNo = totalCallNo; + } else if (e.type === 'loaded') { + // 页面加载时勾选 + (e?.loaded || []).forEach((r) => { + this.selectedRows.forEach((x) => { + if (x.id === r.id) { + r.checked = true; + } + }); + }); + } + } + + changeRefundStatus(status?: string) { + this.refundStatus = status || null; + this.st.load(1); + } + + auditAction(item?: any) { + this.msg = ''; + let params: Array = []; + if (item) { + params = [item.id]; + } else { + params = this.selectedRows.map(node => node.id); + } + const modal = this.nzModalService.create({ + nzTitle: '审核', + nzContent: this.auditModal, + nzFooter: [ + { + label: '拒绝', + type: 'default', + onClick: () => { + this.service + .request(this.service.$api_disagree_refund, { + refundApplicationId: params, + msg: this.msg + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('审核拒绝成功'); + modal.destroy(); + this.st.load(1); + } + }); + } + }, + { + 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(); + this.st.load(1); + } + }); + } + } + ] + }); + modal.afterClose.subscribe(res => { + this.st.load(); + }); + } + + showReason(item: any) { + const modal = this.nzModalService.create({ + nzTitle: '查看原因', + nzContent: item?.rejectionCause || item?.failCause, + nzFooter: [ + { + label: '关闭', + type: 'primary', + onClick: () => { + modal.destroy(); + } + } + ] + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + refundApplyCode: { + type: 'string', + title: '提现单号', + ui: { + placeholder: '请输入' + } + }, + refundStatus: { + type: 'string', + title: '提现状态', + ui: { + widget: 'dict-select', + params: { dictKey: 'refund:apply:status' }, + placeholder: '请选择' + } + }, + createTime: { + title: '提现时间', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + placeholder: '请选择', + nzShowTime: true + } as SFDateWidgetSchema + }, + bankAccountName: { + type: 'string', + title: '账户名称', + ui: { + placeholder: '请输入', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + accountType: { + type: 'string', + title: '账户类型', + ui: { + widget: 'dict-select', + params: { dictKey: 'bank:type' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + ltdId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + asyncData: () => this.service.getNetworkFreightForwarder(), + visibleIf: { + expand: (value: boolean) => value + } + } + }, + bankType: { + type: 'string', + title: '银行类型', + ui: { + widget: 'dict-select', + params: { dictKey: 'bankname:type' }, + placeholder: '请输入', + visibleIf: { + expand: (value: boolean) => value + } + } + } + } + }; + } + + private initST(): STColumn[] { + return [ + { title: '', index: 'key', type: 'checkbox', className: 'text-center' }, + { title: '提现时间', index: 'createTime', width: 180, className: 'text-center' }, + { 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: 'bankAccountName', width: 220, className: 'text-center' }, + { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, + { + title: '提现金额', + index: 'amount', + width: 150, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } + }, + { title: '提现银行账户', render: 'bankCardNumber', width: 200, className: 'text-center' }, + { title: '提现状态', index: 'refundStatusLabel', width: 100, className: 'text-center' }, + { title: '银行流水号', index: 'bankSerialNumber', width: 160, className: 'text-center' }, + { title: '核心交易流水', index: 'coreSerNo', width: 180, className: 'text-center' }, + { title: '失败原因', index: 'rejectionCause', width: 200, format: item => item.failCause, className: 'text-center' }, + { + title: '操作', + fixed: 'right', + width: '110px', + buttons: [ + { + text: '查看回单', + iif: item => item.refundStatus === '3', + click: item => + this.service.getReceiptUrl(item.receiptUrl, { + bankType: item.bankType, + rmYll: item.userId, + snglFlgCd: item.coreSerNo, + bussType: '06', + ltdId: item.ltdId + }) + }, + { + text: '查看原因', + iif: item => item.refundStatus === '4', + click: item => this.showReason(item) + }, + { + text: '审核', + iif: item => item.refundStatus === '1', + click: item => this.auditAction(item) + }, + { + text: '详情', + click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) + } + ] + } + ]; + } +} diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 3f8a56dc..ea65b36a 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -579,6 +579,15 @@ "hide": true } ] + }, + { + "text": "入账记录", + "link": "/partner/recorded/record" + }, + { + "text": "入账详情", + "link": "/partner/recorded/record/:id", + "hide": true } ] } From efa9a6bbad214ad452f1648d91d1e78edae6cbdc Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Fri, 11 Mar 2022 10:50:53 +0800 Subject: [PATCH 28/70] e --- .../add-etp-partner.component.html | 95 +++ .../add-etp-partner.component.less | 68 +++ .../add-etp-partner.component.ts | 555 ++++++++++++++++++ .../add-personal-partner.component.html | 1 + .../add-personal-partner.component.less | 0 .../add-personal-partner.component.ts | 15 + .../index/partner-list.component.html | 4 +- .../services/partner-list.service.ts | 4 + .../routes/partner/partner-routing.module.ts | 6 +- src/app/routes/partner/partner.module.ts | 9 +- 10 files changed, 752 insertions(+), 5 deletions(-) create mode 100644 src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html create mode 100644 src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.less create mode 100644 src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts create mode 100644 src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html create mode 100644 src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.less create mode 100644 src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts 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 new file mode 100644 index 00000000..2cfb1621 --- /dev/null +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html @@ -0,0 +1,95 @@ + + + + +
企业基本信息
+
+ +
+ 请上传营业执照原件的高清照片,若上传复印件,则需加盖公司印章; +
上传后系统会自动识别并填写
+
+
+ +
万元
+
+ + +
营业执照法人信息
+
+ +
+
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
+
上传后系统会自动识别并填写
+
+
+ +
+
+
正面照(人像面)
+
示例
+
+
+
+
+ +
+
+
背面照(国徽面)
+
示例
+
+
+
+
+
+ + + +
企业开票信息
+
+ +
企业管理员信息
+
+ + +
+
请上传该企业授权您成为本系统企业管理员的文件的高清照片,需加盖公司印章
+
上传后系统会自动识别并填写
+
+
+
+
+ +
+
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
+
上传后系统会自动识别并填写
+
+
+ +
+
+
正面照(人像面)
+
示例
+
+
+
+
+ +
+
+
背面照(国徽面)
+
示例
+
+
+
+
+
+ +
+ + +
+
\ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.less b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.less new file mode 100644 index 00000000..6b70e074 --- /dev/null +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.less @@ -0,0 +1,68 @@ +:host { + ::ng-deep { + nz-card { + + .pr { + position: relative; + } + + .pa { + position: absolute; + top : 50px; + left : 150px; + } + + .tips { + display : flex; + margin-bottom: 0; + color : #333; + + dt { + width: 150px; + } + + dd { + width : 190px; + margin-bottom: 0; + text-align : center; + } + } + + .form-title { + margin-bottom: 10px; + padding-left : 8px; + color : #333; + font-weight : 700; + font-size : 18px; + line-height : 20px; + border-left : solid 3px #1890ff; + } + + } + + .ant-form-item { + margin-left: 180px; + } + + nz-date-picker, + nz-input-number { + width: 100% !important; + } + + .input-back { + nz-form-item { + margin-left: 0px; + + .ant-form-item-label { + flex: 0 !important; + } + + .ant-form-item-control { + max-width : 100% !important; + margin-left: 20px !important; + } + } + } + + } + } \ 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 new file mode 100644 index 00000000..580f9f3d --- /dev/null +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts @@ -0,0 +1,555 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { apiConf } from '@conf/api.conf'; +import { + SFUploadWidgetSchema, + SFComponent, + SFSchema, + SFUISchema, + SFCascaderWidgetSchema, + SFTextareaWidgetSchema, + SFDateWidgetSchema, + SFCheckboxWidgetSchema +} from '@delon/form'; +import { NzUploadFile } from 'ng-zorro-antd/upload'; +import { of } from 'rxjs'; +import { PartnerListService } from '../../services/partner-list.service'; + +const IMAGECONFIG = { + previewFile: (file: NzUploadFile) => of(file.url), + action: apiConf.waterFileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', + fileSize: 5120, + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + name: 'multipartFile', + multiple: false, + listType: 'picture-card' +} as SFUploadWidgetSchema; + +const DATECONFIG = { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'date', + format: 'yyyy-MM-dd', + placeholder: '请选择' +}; + +@Component({ + selector: 'app-add-etp-partner', + templateUrl: './add-etp-partner.component.html', + styleUrls: ['./add-etp-partner.component.less'] +}) +export class AddEtpPartnerComponent implements OnInit { + @ViewChild('sf', { static: false }) + sf!: SFComponent; + @ViewChild('sf1', { static: false }) + sf1!: SFComponent; + schema: SFSchema = this.initOthersSF(); + schema1: SFSchema = this.initBasicInfoSF(); + ui: SFUISchema = { + '*': { + spanLabelFixed: 180, + grid: { span: 24 } + }, + $_basicInfoTitle: { + spanLabelFixed: 0 + }, + $title99: { + spanLabelFixed: 0 + }, + $_legalPersontitle: { + spanLabelFixed: 0 + }, + $registrationCapital: { + spanLabelFixed: 180, + grid: { xxl: 13, xl: 18, lg: 22, md: 22 } + }, + $unit: { + grid: { xxl: 6, xl: 6, lg: 2, md: 2 } + }, + $_isLoingDate: { + spanLabelFixed: 100, + grid: { xxl: 6, xl: 6, lg: 4, md: 6 } + } + }; + + constructor(private router: Router, public service: PartnerListService) {} + ngOnInit() { + } + + submitForm() { + if (!this.sf1.valid || !this.sf.valid) { + this.sf.validator({ emitError: true }); + this.sf1.validator({ emitError: true }); + this.service.msgSrv.warning('请修改填写错误信息'); + return; + } + const enterpriseRegistrationTime = new Date(this.sf1.value.enterpriseRegistrationTime); + const operatingStartTime = new Date(this.sf1.value.operatingStartTime); + if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) { + this.service.msgSrv.warning('营业期限不能小于成立日期'); + return; + } + if (this.sf1.value.operatingEndTime) { + const operatingEndTime = new Date(this.sf1.value.operatingEndTime); + if (operatingStartTime.getTime() > operatingEndTime.getTime()) { + this.service.msgSrv.warning('营业期限不能小于期限开始日期'); + return; + } + } + const validStartTime = new Date(this.sf1.value.legalPersonIdentityDTO.validStartTime); + if (this.sf1.value.legalPersonIdentityDTO.validEndTime) { + const validEndTime = new Date(this.sf1.value.legalPersonIdentityDTO.validEndTime); + if (validStartTime.getTime() > validEndTime.getTime()) { + this.service.msgSrv.warning('法人证件有效截止日期小于开始日期'); + return; + } + } + const sfVlaue = this.sf.value; + const params = {}; + Object.assign( + params, + { ...this.sf1.value }, + { ...this.sf.value }, + { + enterpriseAddressCode: this.sf1.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 + } + } + ); + // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('企业新增成功'); + // this.goBack(); + // } + // }); + } + + /* + * 根据地区code查询地区列表 + */ + getRegionDetailByCode(regionCode: any) { + return this.service.request(this.service.$api_get_region_by_code, { regionCode }); + } + + // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 + checkIdCard(imgurl: any, isFront: string, type: number) { + 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.sf1.setValue('/legalPersonIdentityDTO/name', res.name); + } + if (res.number) { + this.sf1.setValue('/legalPersonIdentityDTO/certificateType', 0); + this.sf1.setValue('/legalPersonIdentityDTO/certificateNumber', res.number); + } + } + if (isFront === 'back') { + // 背面 + if (res.validFrom) { + this.sf1.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom); + } + if (res.validTo) { + this.sf1.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo); + this.sf1.setValue('/legalPersonIdentityDTO/_isLoingDate', false); + } else { + this.sf1.setValue('/legalPersonIdentityDTO/_isLoingDate', true); + } + } + } + // 企业管理员证件照 + if (type === 0) { + if (isFront === 'front') { + // 正面 + if (res.name) { + this.sf.setValue('/name', res.name); + } + if (res.number) { + this.sf.setValue('/certificateNumber', res.number); + } + } + } + } + }); + } + + // 识别营业执照 + checkBusinessLicense(imgurl: any) { + this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { + if (res) { + if (res.registrationNumber) { + this.sf1.setValue('/unifiedSocialCreditCode', res.registrationNumber); + } + if (res.name) { + this.sf1.setValue('/enterpriseName', res.name); + } + if (res.type) { + this.sf1.setValue('/enterpriseType', res.type); + } + if (res.addressRegionCodes) { + this.sf1.setValue('/enterpriseAddressCode', res.addressRegionCodes); + } + if (res.address) { + this.sf1.setValue('/enterpriseAddress', res.address); + } + if (res.registeredCapital) { + this.sf1.setValue('/registrationCapital', res.registeredCapital); + } + if (res.foundDate) { + this.sf1.setValue('/enterpriseRegistrationTime', res.foundDate); + } + if (res.businessTermStartDate) { + this.sf1.setValue('/operatingStartTime', res.businessTermStartDate); + } + if (res.businessTermEndDate) { + this.sf1.setValue('/operatingEndTime', res.businessTermEndDate); + } else { + this.sf1.setValue('/_isLoingDate', true); + } + if (res.businessScope) { + this.sf1.setValue('/businessScope', res.businessScope); + } + } + }); + } + + goBack() { + window.history.go(-1); + } + + private initBasicInfoSF(): SFSchema { + return { + properties: { + _basicInfoTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, + _licenseTips: { title: '营业执照', type: 'string', ui: { widget: 'custom' } }, + licensePhoto: { title: '', type: 'string', ui: { hidden: true } }, + licensePhotoWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + change: args => { + if (args.type === 'success') { + this.sf1.setValue('/licensePhoto', args.fileList[0].response.data.fullFilePath); + this.checkBusinessLicense(args.fileList[0].response.data.fullFilePath); + } + } + } as SFUploadWidgetSchema + }, + unifiedSocialCreditCode: { + title: '统一社会信用代码', + type: 'string', + minLength: 1, + maxLength: 30, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + optionalHelp: + '为了企业用户的使用体验,若公司代码即统一社会信用代码已在本应用其他关联平台注册,则此处填写的公司资料将同步更新至对应已注册的平台', + placeholder: '请输入营业执照上的统一社会信用代码', + errors: { + required: '请输入18位公司代码' + } + } + }, + enterpriseName: { + title: '公司名称', + type: 'string', + minLength: 1, + maxLength: 100, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入营业执照上的统一社会信用代码', + errors: { + required: '请输入公司名称' + } + } + }, + operatingStartTime: { + title: '营业期限', + type: 'string', + ui: { + ...DATECONFIG, + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + errors: { + required: '请选择开始日期' + } + } as SFDateWidgetSchema + }, + operatingEndTime: { + title: '', + type: 'string', + ui: { + ...DATECONFIG, + grid: { xxl: 13, xl: 18, lg: 20, md: 18 }, + errors: { + required: '请选择截止日期' + }, + change: i => { + this.sf1?.setValue('/_isLoingDate', false); + } + } as SFDateWidgetSchema + }, + _isLoingDate: { + title: '长期', + type: 'boolean', + ui: { + class: 'input-back', + widget: 'checkbox', + change: i => this.sf1?.setValue('/operatingEndTime', null) + } as SFCheckboxWidgetSchema + }, + + legalPersonIdentityDTO: { + type: 'object', + properties: { + _legalPersontitle: { title: '', type: 'string', ui: { widget: 'custom' } }, + _certificatePhototips: { title: '法定代表人证件照', type: 'string', ui: { widget: 'custom' } }, + _certificatePhotoExmplateA: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } }, + certificatePhotoFrontWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + change: args => { + if (args.type === 'success') { + this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1); + } + } + } as SFUploadWidgetSchema + }, + _certificatePhotoExmplateB: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } }, + certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoBackWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + change: args => { + if (args.type === 'success') { + this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1); + } + } + } as SFUploadWidgetSchema + }, + name: { + title: '法人代表姓名', + type: 'string', + maxLength: 8, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入营业执照上的法人姓名' + } + }, + certificateType: { + type: 'string', + title: '法人证件类型', + enum: [ + { label: '大陆身份证', value: 0 }, + { label: '港澳居民通行证', value: 1 }, + { label: '香港居民通行证', value: 2 } + ], + default: 0, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'select' + } + }, + certificateNumber: { + title: ' 法定代表人证件号', + type: 'string', + format: 'id-card', + minLength: 1, + maxLength: 18, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入法定代表人证件号' + } + }, + validStartTime: { + title: '法人证件有效开始日期', + type: 'string', + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'date', + format: 'yyyy-MM-dd', + placeholder: '请选择', + errors: { + required: '请选择开始日期' + } + } as SFDateWidgetSchema + }, + validEndTime: { + title: '法人证件有效截止日期', + type: 'string', + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'date', + format: 'yyyy-MM-dd', + placeholder: '请选择', + errors: { + required: '请选择截止日期' + }, + change: i => { + this.sf1?.setValue('/legalPersonIdentityDTO/_isLoingDate', false); + } + } as SFDateWidgetSchema + }, + _isLoingDate: { + title: '长期', + type: 'boolean', + ui: { + spanLabelFixed: 100, + grid: { span: 6 }, + class: 'input-back', + widget: 'checkbox', + change: i => this.sf1?.setValue('/legalPersonIdentityDTO/validEndTime', null) + } as SFCheckboxWidgetSchema + } + }, + required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber', 'validStartTime'] + } + }, + required: [ + 'licensePhotoWatermark', + 'unifiedSocialCreditCode', + 'enterpriseName', + 'enterpriseType', + 'enterpriseAddressCode', + 'enterpriseAddress', + 'registrationCapital', + 'enterpriseRegistrationTime', + 'operatingStartTime', + 'businessScope' + ] + }; + } + + private initOthersSF(): SFSchema { + return { + properties: { + title99: { 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: '手机号格式错误' } + } + }, + tipsA: { + title: '企业管理员证件照', + type: 'string', + ui: { + widget: 'custom' + } + }, + certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoFrontWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + 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); + } + } + } as SFUploadWidgetSchema + }, + tipsB: { + title: '', + type: 'string', + ui: { + widget: 'custom', + offsetControl: 6 + } + }, + certificatePhotoBackWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + change: args => { + if (args.type === 'success') { + this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + } + } + } as SFUploadWidgetSchema + }, + name: { + title: '企业管理员姓名', + type: 'string', + maxLength: 8, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入企业管理员姓名' + } + }, + certificateNumber: { + title: '企业管理员身份证号', + type: 'string', + format: 'id-card', + minLength: 1, + maxLength: 18, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入企业管理员身份证号' + } + }, + + title1: { title: '', type: 'string', ui: { widget: 'custom' } }, + createBank: { + title: '所属城市', + type: 'string', + ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入银行账号' } + }, + + title3: { title: '', type: 'string', ui: { widget: 'custom' } }, + bankAccount: { + title: '渠道销售邀请码', + type: 'string', + ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入银行账号' } + } + }, + required: ['createBank', 'bankAccount', 'adminMobile', 'name', 'certificateNumber', 'tipsD', 'creditPhoto'] + }; + } +} 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 new file mode 100644 index 00000000..8245d202 --- /dev/null +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html @@ -0,0 +1 @@ +

add-personal-partner works!

diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.less b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.less new file mode 100644 index 00000000..e69de29b 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 new file mode 100644 index 00000000..6d31529c --- /dev/null +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-add-personal-partner', + templateUrl: './add-personal-partner.component.html', + styleUrls: ['./add-personal-partner.component.less'] +}) +export class AddPersonalPartnerComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} 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 f1de5a81..1e4aa340 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 @@ -22,8 +22,8 @@
- - + +
Date: Fri, 11 Mar 2022 11:16:46 +0800 Subject: [PATCH 29/70] - --- .../components/record/record.component.html | 26 +++++--- .../components/record/record.component.ts | 61 ++++++++++--------- 2 files changed, 49 insertions(+), 38 deletions(-) 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 50438e09..1fd920b1 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.html +++ b/src/app/routes/partner/recorded/components/record/record.component.html @@ -40,14 +40,24 @@
- - - {{ item.bankName }}
{{ item.bankCardNumber }} -
-
+
+ + + {{ item.bankName }}
{{ item.bankCardNumber }} +
+
+
+ 合伙人数: + 入账笔数: + 开票金额: + 代缴个税: + 入账金额: +
+
diff --git a/src/app/routes/partner/recorded/components/record/record.component.ts b/src/app/routes/partner/recorded/components/record/record.component.ts index e15f2aaa..49b6b08f 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.ts +++ b/src/app/routes/partner/recorded/components/record/record.component.ts @@ -19,6 +19,13 @@ export class PartnerRecordedRecordComponent implements OnInit { @ViewChild('viewReasonModal', { static: false }) viewReasonModal!: any; columns: STColumn[] = this.initST(); searchSchema: SFSchema = this.initSF(); + totalInfo: any = { + partnerNum: 34, + count: 98, + invoiceAmount: 978239.98, + tax: 9878.00, + recorededAmount: 728698.98 + } _$expand = false; @@ -113,7 +120,7 @@ export class PartnerRecordedRecordComponent implements OnInit { nzContent: this.auditModal, nzFooter: [ { - label: '拒绝', + label: '备注', type: 'default', onClick: () => { this.service @@ -276,48 +283,42 @@ export class PartnerRecordedRecordComponent implements OnInit { private initST(): STColumn[] { return [ { title: '', index: 'key', type: 'checkbox', className: 'text-center' }, - { title: '提现时间', index: 'createTime', width: 180, className: 'text-center' }, - { 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: 'bankAccountName', width: 220, className: 'text-center' }, + { title: '账户名称', index: 'createTime', width: 180, className: 'text-center' }, { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, + { title: '入账单号', index: 'refundApplyCode', width: 180, className: 'text-center' }, + { title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' }, { - title: '提现金额', + title: '开票金额', index: 'amount', width: 150, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } }, - { title: '提现银行账户', render: 'bankCardNumber', width: 200, className: 'text-center' }, - { title: '提现状态', index: 'refundStatusLabel', width: 100, className: 'text-center' }, - { title: '银行流水号', index: 'bankSerialNumber', width: 160, className: 'text-center' }, - { title: '核心交易流水', index: 'coreSerNo', width: 180, className: 'text-center' }, - { title: '失败原因', index: 'rejectionCause', width: 200, format: item => item.failCause, className: 'text-center' }, + { + title: '代缴个税', + index: 'amount', + width: 150, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } + }, + { + title: '入账金额', + index: 'amount', + width: 150, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } + }, + + { title: '提交时间', index: 'bankSerialNumber', width: 160, className: 'text-center' }, + { title: '入账状态', index: 'refundStatusLabel', width: 100, className: 'text-center' }, { title: '操作', fixed: 'right', width: '110px', buttons: [ - { - text: '查看回单', - iif: item => item.refundStatus === '3', - click: item => - this.service.getReceiptUrl(item.receiptUrl, { - bankType: item.bankType, - rmYll: item.userId, - snglFlgCd: item.coreSerNo, - bussType: '06', - ltdId: item.ltdId - }) - }, - { - text: '查看原因', - iif: item => item.refundStatus === '4', - click: item => this.showReason(item) - }, { text: '审核', iif: item => item.refundStatus === '1', From 06cbff566ac0d18f544ce4ae1e4b31838a1281c1 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Fri, 11 Mar 2022 14:35:47 +0800 Subject: [PATCH 30/70] edit --- package-lock.json | 41 ++ .../add-etp-partner.component.html | 48 +-- .../add-etp-partner.component.ts | 355 ++++++++++-------- .../add-personal-partner.component.html | 45 ++- .../add-personal-partner.component.less | 68 ++++ .../add-personal-partner.component.ts | 335 ++++++++++++++++- 6 files changed, 701 insertions(+), 191 deletions(-) diff --git a/package-lock.json b/package-lock.json index ddf3948b..64c94964 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2879,6 +2879,35 @@ "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", @@ -10136,12 +10165,24 @@ "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/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 2cfb1621..60e444bd 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 @@ -1,6 +1,7 @@ - + +
企业基本信息
@@ -14,6 +15,7 @@
万元
+
营业执照法人信息
@@ -41,33 +43,12 @@
- - - -
企业开票信息
+ + +
企业管理员信息
- -
企业管理员信息
-
- - -
-
请上传该企业授权您成为本系统企业管理员的文件的高清照片,需加盖公司印章
-
上传后系统会自动识别并填写
-
-
-
-
- -
-
请上传身份证原件的高清照片,若上传复印件,则需申请人签字;
-
上传后系统会自动识别并填写
-
-
- +
正面照(人像面)
@@ -76,7 +57,7 @@
- +
背面照(国徽面)
@@ -85,9 +66,20 @@
+ + + +
所属城市
+
+ + + +
渠道销售
+
-
+ +
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 580f9f3d..00540e31 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 @@ -9,7 +9,8 @@ import { SFCascaderWidgetSchema, SFTextareaWidgetSchema, SFDateWidgetSchema, - SFCheckboxWidgetSchema + SFCheckboxWidgetSchema, + SFTreeSelectWidgetSchema } from '@delon/form'; import { NzUploadFile } from 'ng-zorro-antd/upload'; import { of } from 'rxjs'; @@ -45,10 +46,7 @@ const DATECONFIG = { export class AddEtpPartnerComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; - @ViewChild('sf1', { static: false }) - sf1!: SFComponent; - schema: SFSchema = this.initOthersSF(); - schema1: SFSchema = this.initBasicInfoSF(); + schema: SFSchema = this.initBasicInfoSF(); ui: SFUISchema = { '*': { spanLabelFixed: 180, @@ -57,19 +55,9 @@ export class AddEtpPartnerComponent implements OnInit { $_basicInfoTitle: { spanLabelFixed: 0 }, - $title99: { - spanLabelFixed: 0 - }, $_legalPersontitle: { spanLabelFixed: 0 }, - $registrationCapital: { - spanLabelFixed: 180, - grid: { xxl: 13, xl: 18, lg: 22, md: 22 } - }, - $unit: { - grid: { xxl: 6, xl: 6, lg: 2, md: 2 } - }, $_isLoingDate: { spanLabelFixed: 100, grid: { xxl: 6, xl: 6, lg: 4, md: 6 } @@ -77,32 +65,30 @@ export class AddEtpPartnerComponent implements OnInit { }; constructor(private router: Router, public service: PartnerListService) {} - ngOnInit() { - } + ngOnInit() {} submitForm() { - if (!this.sf1.valid || !this.sf.valid) { + if (!this.sf.valid ) { this.sf.validator({ emitError: true }); - this.sf1.validator({ emitError: true }); this.service.msgSrv.warning('请修改填写错误信息'); return; } - const enterpriseRegistrationTime = new Date(this.sf1.value.enterpriseRegistrationTime); - const operatingStartTime = new Date(this.sf1.value.operatingStartTime); + 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('营业期限不能小于成立日期'); return; } - if (this.sf1.value.operatingEndTime) { - const operatingEndTime = new Date(this.sf1.value.operatingEndTime); + 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.sf1.value.legalPersonIdentityDTO.validStartTime); - if (this.sf1.value.legalPersonIdentityDTO.validEndTime) { - const validEndTime = new Date(this.sf1.value.legalPersonIdentityDTO.validEndTime); + 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 (validStartTime.getTime() > validEndTime.getTime()) { this.service.msgSrv.warning('法人证件有效截止日期小于开始日期'); return; @@ -112,10 +98,9 @@ export class AddEtpPartnerComponent implements OnInit { const params = {}; Object.assign( params, - { ...this.sf1.value }, { ...this.sf.value }, { - enterpriseAddressCode: this.sf1.value.enterpriseAddressCode[2], + enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2], oftenUsedServices: sfVlaue.oftenUsedServices, registerAddress: sfVlaue.registerAddress, registerPhone: sfVlaue.registerPhone, @@ -161,23 +146,23 @@ export class AddEtpPartnerComponent implements OnInit { if (isFront === 'front') { // 正面 if (res.name) { - this.sf1.setValue('/legalPersonIdentityDTO/name', res.name); + this.sf.setValue('/legalPersonIdentityDTO/name', res.name); } if (res.number) { - this.sf1.setValue('/legalPersonIdentityDTO/certificateType', 0); - this.sf1.setValue('/legalPersonIdentityDTO/certificateNumber', res.number); + this.sf.setValue('/legalPersonIdentityDTO/certificateType', 0); + this.sf.setValue('/legalPersonIdentityDTO/certificateNumber', res.number); } } if (isFront === 'back') { // 背面 if (res.validFrom) { - this.sf1.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom); + this.sf.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom); } if (res.validTo) { - this.sf1.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo); - this.sf1.setValue('/legalPersonIdentityDTO/_isLoingDate', false); + this.sf.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo); + this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', false); } else { - this.sf1.setValue('/legalPersonIdentityDTO/_isLoingDate', true); + this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', true); } } } @@ -202,36 +187,33 @@ export class AddEtpPartnerComponent implements OnInit { this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { if (res) { if (res.registrationNumber) { - this.sf1.setValue('/unifiedSocialCreditCode', res.registrationNumber); + this.sf.setValue('/unifiedSocialCreditCode', res.registrationNumber); } if (res.name) { - this.sf1.setValue('/enterpriseName', res.name); + this.sf.setValue('/enterpriseName', res.name); } if (res.type) { - this.sf1.setValue('/enterpriseType', res.type); + this.sf.setValue('/enterpriseType', res.type); } if (res.addressRegionCodes) { - this.sf1.setValue('/enterpriseAddressCode', res.addressRegionCodes); + this.sf.setValue('/enterpriseAddressCode', res.addressRegionCodes); } if (res.address) { - this.sf1.setValue('/enterpriseAddress', res.address); - } - if (res.registeredCapital) { - this.sf1.setValue('/registrationCapital', res.registeredCapital); + this.sf.setValue('/enterpriseAddress', res.address); } if (res.foundDate) { - this.sf1.setValue('/enterpriseRegistrationTime', res.foundDate); + this.sf.setValue('/enterpriseRegistrationTime', res.foundDate); } if (res.businessTermStartDate) { - this.sf1.setValue('/operatingStartTime', res.businessTermStartDate); + this.sf.setValue('/operatingStartTime', res.businessTermStartDate); } if (res.businessTermEndDate) { - this.sf1.setValue('/operatingEndTime', res.businessTermEndDate); + this.sf.setValue('/operatingEndTime', res.businessTermEndDate); } else { - this.sf1.setValue('/_isLoingDate', true); + this.sf.setValue('/_isLoingDate', true); } if (res.businessScope) { - this.sf1.setValue('/businessScope', res.businessScope); + this.sf.setValue('/businessScope', res.businessScope); } } }); @@ -244,8 +226,9 @@ export class AddEtpPartnerComponent implements OnInit { private initBasicInfoSF(): SFSchema { return { properties: { + // 企业基本信息 _basicInfoTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, - _licenseTips: { title: '营业执照', type: 'string', ui: { widget: 'custom' } }, + _licenseTips: { title: '营业执照', type: 'string', ui: { widget: 'custom' }, default: true }, licensePhoto: { title: '', type: 'string', ui: { hidden: true } }, licensePhotoWatermark: { type: 'string', @@ -255,7 +238,7 @@ export class AddEtpPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf1.setValue('/licensePhoto', args.fileList[0].response.data.fullFilePath); + this.sf.setValue('/licensePhoto', args.fileList[0].response.data.fullFilePath); this.checkBusinessLicense(args.fileList[0].response.data.fullFilePath); } } @@ -310,7 +293,7 @@ export class AddEtpPartnerComponent implements OnInit { required: '请选择截止日期' }, change: i => { - this.sf1?.setValue('/_isLoingDate', false); + this.sf?.setValue('/_isLoingDate', false); } } as SFDateWidgetSchema }, @@ -320,15 +303,16 @@ export class AddEtpPartnerComponent implements OnInit { ui: { class: 'input-back', widget: 'checkbox', - change: i => this.sf1?.setValue('/operatingEndTime', null) + change: i => this.sf?.setValue('/operatingEndTime', null) } as SFCheckboxWidgetSchema }, + // 法人信息 legalPersonIdentityDTO: { type: 'object', properties: { _legalPersontitle: { title: '', type: 'string', ui: { widget: 'custom' } }, - _certificatePhototips: { title: '法定代表人证件照', type: 'string', ui: { widget: 'custom' } }, + _certificatePhototips: { title: '法定代表人证件照', type: 'string', ui: { widget: 'custom' }, default: true }, _certificatePhotoExmplateA: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } }, certificatePhotoFrontWatermark: { type: 'string', @@ -338,7 +322,7 @@ export class AddEtpPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); + this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1); } } @@ -355,7 +339,7 @@ export class AddEtpPartnerComponent implements OnInit { descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', change: args => { if (args.type === 'success') { - this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1); } } @@ -420,7 +404,7 @@ export class AddEtpPartnerComponent implements OnInit { required: '请选择截止日期' }, change: i => { - this.sf1?.setValue('/legalPersonIdentityDTO/_isLoingDate', false); + this.sf?.setValue('/legalPersonIdentityDTO/_isLoingDate', false); } } as SFDateWidgetSchema }, @@ -432,124 +416,177 @@ export class AddEtpPartnerComponent implements OnInit { grid: { span: 6 }, class: 'input-back', widget: 'checkbox', - change: i => this.sf1?.setValue('/legalPersonIdentityDTO/validEndTime', null) + change: i => this.sf?.setValue('/legalPersonIdentityDTO/validEndTime', null) } as SFCheckboxWidgetSchema } }, - required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber', 'validStartTime'] - } - }, - required: [ - 'licensePhotoWatermark', - 'unifiedSocialCreditCode', - 'enterpriseName', - 'enterpriseType', - 'enterpriseAddressCode', - 'enterpriseAddress', - 'registrationCapital', - 'enterpriseRegistrationTime', - 'operatingStartTime', - 'businessScope' - ] - }; - } - - private initOthersSF(): SFSchema { - return { - properties: { - title99: { 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: '手机号格式错误' } - } + required: [ + '_certificatePhototips', + 'certificatePhotoFront', + 'certificatePhotoBack', + 'name', + 'certificateType', + 'certificateNumber', + 'validStartTime' + ] }, - tipsA: { - title: '企业管理员证件照', - type: 'string', - ui: { - widget: 'custom' - } - }, - certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, - certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, - certificatePhotoFrontWatermark: { - type: 'string', - title: '', - ui: { - ...IMAGECONFIG, - 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); + // 企业管理员信息 + 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: '手机号格式错误' } } - } - } as SFUploadWidgetSchema - }, - tipsB: { - title: '', - type: 'string', - ui: { - widget: 'custom', - offsetControl: 6 - } - }, - certificatePhotoBackWatermark: { - type: 'string', - title: '', - ui: { - ...IMAGECONFIG, - descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', - change: args => { - if (args.type === 'success') { - this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + }, + _adminCertificatePhotoTipsA: { + title: '企业管理员证件照', + type: 'string', + ui: { + widget: 'custom' + }, + default: true + }, + certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoFrontWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + 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); + } + } + } as SFUploadWidgetSchema + }, + _adminCertificatePhotoTipsB: { + title: '', + type: 'string', + ui: { + widget: 'custom', + offsetControl: 6 } + }, + certificatePhotoBackWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + change: args => { + if (args.type === 'success') { + this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + } + } + } as SFUploadWidgetSchema + }, + name: { + title: '企业管理员姓名', + type: 'string', + maxLength: 8, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入企业管理员姓名' + } + }, + certificateNumber: { + title: '企业管理员身份证号', + type: 'string', + format: 'id-card', + minLength: 1, + maxLength: 18, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入企业管理员身份证号' + } + }, + operatingStartTime: { + title: '身份证有效开始日期', + type: 'string', + ui: { + ...DATECONFIG, + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + errors: { + required: '请选择开始日期' + } + } as SFDateWidgetSchema + }, + operatingEndTime: { + title: '身份证有效截止日期', + type: 'string', + ui: { + ...DATECONFIG, + grid: { xxl: 13, xl: 18, lg: 20, md: 18 }, + errors: { + required: '请选择截止日期' + }, + change: i => { + this.sf?.setValue('/adminUserInfo/_isLoingDate', false); + } + } as SFDateWidgetSchema + }, + _isLoingDate: { + title: '长期', + type: 'boolean', + ui: { + spanLabelFixed: 100, + grid: { span: 6 }, + class: 'input-back', + widget: 'checkbox', + change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null) + } as SFCheckboxWidgetSchema } - } as SFUploadWidgetSchema + }, + required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber','operatingStartTime'] }, - name: { - title: '企业管理员姓名', + // 所属城市 + _addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, + status3: { type: 'string', - maxLength: 8, - ui: { - grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, - placeholder: '请输入企业管理员姓名' - } - }, - certificateNumber: { - title: '企业管理员身份证号', - type: 'string', - format: 'id-card', - minLength: 1, - maxLength: 18, - ui: { - grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, - placeholder: '请输入企业管理员身份证号' - } - }, - - title1: { title: '', type: 'string', ui: { widget: 'custom' } }, - createBank: { title: '所属城市', - type: 'string', - ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入银行账号' } + default: ['WAIT_BUYER_PAY', 'TRADE_FINISHED'], + ui: { + widget: 'tree-select', + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请选择城市(最多3个)', + checkable: true, + asyncData: () => + of([ + { title: '待支付', key: 'WAIT_BUYER_PAY' }, + { title: '已支付', key: 'TRADE_SUCCESS' }, + { title: '交易完成', key: 'TRADE_FINISHED' } + ]) + } as SFTreeSelectWidgetSchema, }, - - title3: { title: '', type: 'string', ui: { widget: 'custom' } }, - bankAccount: { + // 渠道销售 + _channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, + channel: { title: '渠道销售邀请码', type: 'string', - ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入银行账号' } + minLength: 1, + maxLength: 100, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入渠道销售邀请码', + errors: { + required: '请输入渠道销售邀请码' + } + } } }, - required: ['createBank', 'bankAccount', 'adminMobile', 'name', 'certificateNumber', 'tipsD', 'creditPhoto'] + required: ['_licenseTips', 'licensePhotoWatermark', 'unifiedSocialCreditCode', 'enterpriseName', 'operatingStartTime', 'status3','channel'] }; } } 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 8245d202..e476071d 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 +1,44 @@ -

add-personal-partner works!

+ + + + + +
合伙人信息
+
+ +
+
+
正面照(人像面)
+
示例
+
+
+
+
+ +
+
+
背面照(国徽面)
+
示例
+
+
+
+
+ + + +
所属城市
+
+ + + +
渠道销售
+
+
+ + +
+ + +
+
\ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.less b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.less index e69de29b..6b70e074 100644 --- a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.less +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.less @@ -0,0 +1,68 @@ +:host { + ::ng-deep { + nz-card { + + .pr { + position: relative; + } + + .pa { + position: absolute; + top : 50px; + left : 150px; + } + + .tips { + display : flex; + margin-bottom: 0; + color : #333; + + dt { + width: 150px; + } + + dd { + width : 190px; + margin-bottom: 0; + text-align : center; + } + } + + .form-title { + margin-bottom: 10px; + padding-left : 8px; + color : #333; + font-weight : 700; + font-size : 18px; + line-height : 20px; + border-left : solid 3px #1890ff; + } + + } + + .ant-form-item { + margin-left: 180px; + } + + nz-date-picker, + nz-input-number { + width: 100% !important; + } + + .input-back { + nz-form-item { + margin-left: 0px; + + .ant-form-item-label { + flex: 0 !important; + } + + .ant-form-item-control { + max-width : 100% !important; + margin-left: 20px !important; + } + } + } + + } + } \ 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 6d31529c..ed2eac4f 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,4 +1,32 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, 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 { NzUploadFile } from 'ng-zorro-antd/upload'; +import { of } from 'rxjs'; +import { PartnerListService } from '../../services/partner-list.service'; + +const IMAGECONFIG = { + previewFile: (file: NzUploadFile) => of(file.url), + action: apiConf.waterFileUpload, + fileType: 'image/png,image/jpeg,image/jpg,image/gif', + fileSize: 5120, + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + name: 'multipartFile', + multiple: false, + listType: 'picture-card' +} as SFUploadWidgetSchema; + +const DATECONFIG = { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + widget: 'date', + format: 'yyyy-MM-dd', + placeholder: '请选择' +}; @Component({ selector: 'app-add-personal-partner', @@ -6,10 +34,311 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./add-personal-partner.component.less'] }) export class AddPersonalPartnerComponent implements OnInit { + @ViewChild('sf', { static: false }) + sf!: SFComponent; + schema: SFSchema = this.initBasicInfoSF(); + ui: SFUISchema = { + '*': { + spanLabelFixed: 180, + grid: { span: 24 } + }, + $_basicInfoTitle: { + spanLabelFixed: 0 + }, + $_legalPersontitle: { + spanLabelFixed: 0 + }, + $_isLoingDate: { + spanLabelFixed: 100, + grid: { xxl: 6, xl: 6, lg: 4, md: 6 } + } + }; - constructor() { } + constructor(private router: Router, public service: PartnerListService) {} + ngOnInit() {} - ngOnInit(): void { + submitForm() { + 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('营业期限不能小于成立日期'); + 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 (validStartTime.getTime() > validEndTime.getTime()) { + 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 + } + } + ); + // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('企业新增成功'); + // this.goBack(); + // } + // }); } + /* + * 根据地区code查询地区列表 + */ + getRegionDetailByCode(regionCode: any) { + return this.service.request(this.service.$api_get_region_by_code, { regionCode }); + } + + // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 + checkIdCard(imgurl: any, isFront: string, type: number) { + 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 === '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 (type === 0) { + if (isFront === 'front') { + // 正面 + if (res.name) { + this.sf.setValue('/name', res.name); + } + if (res.number) { + this.sf.setValue('/certificateNumber', res.number); + } + } + } + } + }); + } + + goBack() { + window.history.go(-1); + } + + private initBasicInfoSF(): SFSchema { + return { + properties: { + // 合伙人信息 + 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', + ui: { + widget: 'custom' + }, + default: true + }, + certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, + certificatePhotoFrontWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + 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); + } + } + } as SFUploadWidgetSchema + }, + _adminCertificatePhotoTipsB: { + title: '', + type: 'string', + ui: { + widget: 'custom', + offsetControl: 6 + } + }, + certificatePhotoBackWatermark: { + type: 'string', + title: '', + ui: { + ...IMAGECONFIG, + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', + change: args => { + if (args.type === 'success') { + this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); + } + } + } as SFUploadWidgetSchema + }, + name: { + title: '姓名', + type: 'string', + maxLength: 8, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入姓名' + } + }, + certificateNumber: { + title: '身份证号', + type: 'string', + format: 'id-card', + minLength: 1, + maxLength: 18, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入身份证号' + } + }, + operatingStartTime: { + title: '身份证有效开始日期', + type: 'string', + ui: { + ...DATECONFIG, + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + errors: { + required: '请选择开始日期' + } + } as SFDateWidgetSchema + }, + operatingEndTime: { + title: '身份证有效截止日期', + type: 'string', + ui: { + ...DATECONFIG, + grid: { xxl: 13, xl: 18, lg: 20, md: 18 }, + errors: { + required: '请选择截止日期' + }, + change: i => { + this.sf?.setValue('/adminUserInfo/_isLoingDate', false); + } + } as SFDateWidgetSchema + }, + _isLoingDate: { + title: '长期', + type: 'boolean', + ui: { + spanLabelFixed: 100, + grid: { span: 6 }, + class: 'input-back', + widget: 'checkbox', + change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null) + } as SFCheckboxWidgetSchema + } + }, + required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'operatingStartTime'] + }, + // 所属城市 + _addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, + status3: { + 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, + asyncData: () => + of([ + { title: '待支付', key: 'WAIT_BUYER_PAY' }, + { title: '已支付', key: 'TRADE_SUCCESS' }, + { title: '交易完成', key: 'TRADE_FINISHED' } + ]) + } as SFTreeSelectWidgetSchema + }, + // 渠道销售 + _channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, + channel: { + title: '渠道销售邀请码', + type: 'string', + minLength: 1, + maxLength: 100, + ui: { + grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, + placeholder: '请输入渠道销售邀请码', + errors: { + required: '请输入渠道销售邀请码' + } + } + } + }, + required: [ + 'status3', + 'channel' + ] + }; + } } From 3b976844f0774b4d03fb526c4d308e4a82a0132a Mon Sep 17 00:00:00 2001 From: Lingzi Date: Fri, 11 Mar 2022 14:36:29 +0800 Subject: [PATCH 31/70] fix bug --- .../components/freight/list/list.component.ts | 161 +++++++++++++++++- src/assets/mocks/menu-data.json | 14 ++ 2 files changed, 168 insertions(+), 7 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 625cffaf..8f071066 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STChange, STColumn, STColumnBadge, STComponent, STData, STRequestOptions } from '@delon/abc/st'; -import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { DynamicSettingModalComponent, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component'; @@ -116,7 +116,124 @@ export class FreightComponentsListComponent implements OnInit { showRequired: false } }, - + lockedStatus: { + type: 'string', + title: '企业类型', + enum: [ + { label: '全部', value: '' }, + { label: '物流企业', value: 0 } + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + lockedStatus8: { + type: 'string', + title: '公司所在地', + enum: [ + { label: '全部', value: '' }, + { label: '物流企业', value: 0 } + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + lockedStatus7: { + type: 'string', + title: '常用服务', + enum: [ + { label: '全部', value: '' }, + { label: '整车服务', value: 0 }, + { label: '大宗服务', value: 1 } + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + lockedStatus6: { + type: 'string', + title: '客户类型', + enum: [ + { label: '全部', value: '' }, + { label: '直客', value: 0 }, + { label: '渠道客户', value: 1 } + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + contactName5: { + title: '渠道销售', + type: 'string', + ui: { + placeholder: '请输入', + showRequired: false + } + }, + contactName4: { + title: '合伙人', + type: 'string', + ui: { + placeholder: '请输入', + showRequired: false + } + }, + contactName3: { + title: '客服人员', + type: 'string', + ui: { + placeholder: '请输入', + showRequired: false + } + }, + contactName2: { + title: '审核人', + type: 'string', + ui: { + placeholder: '请输入', + showRequired: false + } + }, + applyDate: { + type: 'string', + title: '申请时间', + ui: { + widget: 'sl-from-to', + type: 'date', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFDateWidgetSchema, + }, + applyDate1: { + type: 'string', + title: '审核时间', + ui: { + widget: 'sl-from-to', + type: 'date', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFDateWidgetSchema, + }, networkTransporter: { type: 'string', title: '网络货运人', @@ -138,6 +255,22 @@ export class FreightComponentsListComponent implements OnInit { } } }, + lockedStatus3: { + type: 'string', + title: '企业状态', + enum: [ + { label: '全部', value: '' }, + { label: '正常', value: 0 }, + { label: '冻结', value: 1 } + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, source: { type: 'string', title: '注册渠道', @@ -155,13 +288,13 @@ export class FreightComponentsListComponent implements OnInit { } } }, - lockedStatus: { + source2: { type: 'string', - title: '企业状态', + title: '证件是否过期', enum: [ { label: '全部', value: '' }, - { label: '正常', value: 0 }, - { label: '冻结', value: 1 } + { label: '是', value: 1 }, + { label: '否', value: 2 } ], default: '', ui: { @@ -170,7 +303,21 @@ export class FreightComponentsListComponent implements OnInit { expand: (value: boolean) => value } } - } + }, + source1: { + type: 'string', + title: '网络货运人', + enum: [ + { label: '全部', value: '' }, + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, } }; this.ui = { '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } }; diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 473d4c2f..0f0ab51a 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -574,6 +574,20 @@ "hide": true } ] + }, + { + "text": "轮播图管理", + "link": "/partner/scroll-img/list", + "hide": true + }, + { + "text": "知识库管理", + "icon": "iconfont icon-yundan-copy", + "group": true, + "children": [{ + "text": "banner管理", + "link": "/knowledge/banner" + }] } ] } From 05dfb81a20e750d1c7fd0930222d94d80af940e1 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 11 Mar 2022 14:50:43 +0800 Subject: [PATCH 32/70] fix bug --- .../rebate-setting.component.html | 10 +++- .../rebate-setting.component.ts | 50 +++++++++++-------- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html index 50b366ea..a4864e4d 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.html @@ -4,8 +4,8 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-03-10 15:12:03 - * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-record\\rebate-record.component.html + * @LastEditTime : 2022-03-11 14:45:48 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\rebate-setting.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -31,6 +31,12 @@ + +
+
+ +
+
this.viewEvaluate(_record), - } + }, + { + text: '禁用', + click: _record => this.viewEvaluate(_record), + }, ] } ]; } /** - *查看明细 + *禁用 */ viewEvaluate(item: any) { - const modal = this.modal.create({ - nzTitle: '明细', - nzWidth: 1200, - nzContent: ParterRebateManageMenRecordDetailComponent, - nzComponentParams: { }, - nzFooter: null - }); - modal.afterClose.subscribe((res: any) => { - if (res) { + this.modal.confirm({ + nzTitle: '是否禁用该配置?', + nzOnOk: () => { + } }); } /** - *异常反馈 + *查看 */ feedback(item?: any) { const modal = this.modal.create({ - nzTitle: '异常反馈', + nzTitle: '查看', nzWidth: 580, nzContent: ParterRebateManageMenAbnormalFeedbackComponent, nzComponentParams: { i: item }, @@ -161,6 +164,9 @@ export class ParterRebateManageMentSettingComponent implements OnInit { if (res) { } }); + } + configAction() { + } /** * 重置表单 From 79a1e172dd4d5ad943cf408ecc8fb12bb9065aa9 Mon Sep 17 00:00:00 2001 From: Lingzi Date: Fri, 11 Mar 2022 15:16:02 +0800 Subject: [PATCH 33/70] fix bug --- src/styles.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles.less b/src/styles.less index a25a53de..2464d9a8 100644 --- a/src/styles.less +++ b/src/styles.less @@ -47,4 +47,4 @@ input[type="number"] { .break-word-all { word-break: break-all; word-wrap : break-word; -} \ No newline at end of file +} From 2d4eb18350a597a1acec3851c6e439f2fae91a80 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 11 Mar 2022 15:28:41 +0800 Subject: [PATCH 34/70] fix bug --- .../routes/partner/partner-routing.module.ts | 6 +- src/app/routes/partner/partner.module.ts | 11 +- .../rebate-setting/add/add.component.html | 16 ++ .../rebate-setting/add/add.component.ts | 25 +++ .../rebate-setting.component.ts | 2 +- .../insurance-table/insurance-table.module.ts | 2 +- .../shared/components/rebate-table/index.ts | 13 ++ .../rebate-table/rebate-table.component.html | 92 +++++++++ .../rebate-table/rebate-table.component.less | 19 ++ .../rebate-table/rebate-table.component.ts | 195 ++++++++++++++++++ .../rebate-table/rebate-table.module.ts | 29 +++ .../rebate-table/rebate-table.service.ts | 18 ++ src/app/shared/index.ts | 3 +- 13 files changed, 422 insertions(+), 9 deletions(-) create mode 100644 src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html create mode 100644 src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts create mode 100644 src/app/shared/components/rebate-table/index.ts create mode 100644 src/app/shared/components/rebate-table/rebate-table.component.html create mode 100644 src/app/shared/components/rebate-table/rebate-table.component.less create mode 100644 src/app/shared/components/rebate-table/rebate-table.component.ts create mode 100644 src/app/shared/components/rebate-table/rebate-table.module.ts create mode 100644 src/app/shared/components/rebate-table/rebate-table.service.ts diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 5fcfa3a2..42af70fc 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 15:07:57 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 15:23:48 + * @LastEditTime : 2022-03-11 15:22:36 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-routing.module.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -37,6 +37,7 @@ import { AddEtpPartnerComponent } from './partner-list/components/add-etp-partne import { AddPersonalPartnerComponent } from './partner-list/components/add-personal-partner/add-personal-partner.component'; import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component'; import { PartnerListComponent } from './partner-list/components/index/partner-list.component'; +import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; const routes: Routes = [ { @@ -72,7 +73,8 @@ const routes: Routes = [ children: [ { path: 'particulars', component: ParterRebateManageMentParticularsComponent }, { path: 'record', component: ParterRebateManageMentRecordComponent }, - { path: 'setting', component: ParterRebateManageMentSettingComponent } + { path: 'setting', component: ParterRebateManageMentSettingComponent }, + { path: 'setting/add/:id', component: ParterRebateManageMentAddComponent }, ] }, { diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index ac40e6ac..6eadaab1 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -4,13 +4,13 @@ * @Author : Shiming * @Date : 2022-03-09 14:34:55 * @LastEditors : Shiming - * @LastEditTime : 2022-03-09 14:56:46 + * @LastEditTime : 2022-03-11 15:28:01 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner.module.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { SharedModule } from '@shared'; +import { rebateTableModule, 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'; @@ -49,6 +49,7 @@ import { AddPersonalPartnerComponent } from './partner-list/components/add-perso import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-management/model/abnormal-feedback/abnormal-feedback.component'; import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component'; import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; +import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -86,13 +87,15 @@ const COMPONENTS: any[] = [ ParterRebateManageMenAbnormalFeedbackComponent, ParterRebateManageMentSettingComponent, PartnerAuditModalComponent, + ParterRebateManageMentAddComponent, AddEtpPartnerComponent, - AddPersonalPartnerComponent + AddPersonalPartnerComponent, + ]; @NgModule({ declarations: [...COMPONENTS], - imports: [CommonModule, PartnerRoutingModule, SharedModule], + imports: [CommonModule, PartnerRoutingModule, SharedModule,rebateTableModule], providers: [PartnerListService] }) export class PartnerModule { } diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html new file mode 100644 index 00000000..b3c8f933 --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -0,0 +1,16 @@ + + + + + 12121212 + + diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts new file mode 100644 index 00000000..ebfe0bce --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -0,0 +1,25 @@ +import { ModalHelper } from '@delon/theme'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort, ShipperBaseService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { RebateManagementService } from '../../../services/rebate-management.service'; +@Component({ + selector: 'app-parter-channel-rebate-management-add', + templateUrl: './add.component.html' +}) +export class ParterRebateManageMentAddComponent implements OnInit { + + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: RebateManagementService, + private modal: NzModalService, + public shipperservice: ShipperBaseService, + ) {} + + ngOnInit() { + } +} diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts index b655f9a3..09f35ff9 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts @@ -166,7 +166,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit { }); } configAction() { - + this.router.navigate(['/partner/rebate/setting/add', '']) } /** * 重置表单 diff --git a/src/app/shared/components/insurance-table/insurance-table.module.ts b/src/app/shared/components/insurance-table/insurance-table.module.ts index ab85e526..28711efd 100644 --- a/src/app/shared/components/insurance-table/insurance-table.module.ts +++ b/src/app/shared/components/insurance-table/insurance-table.module.ts @@ -13,11 +13,11 @@ import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { NzInputNumberModule } from 'ng-zorro-antd/input-number'; import { NzTableModule } from 'ng-zorro-antd/table'; -import { InsuranceTableComponent } from './insurance-table.component'; import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'; import { NzInputModule } from 'ng-zorro-antd/input'; import { DelonFormModule } from '@delon/form'; import { NzButtonModule } from 'ng-zorro-antd/button'; +import { InsuranceTableComponent } from './insurance-table.component'; const COMPONENTS = [InsuranceTableComponent]; const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule]; diff --git a/src/app/shared/components/rebate-table/index.ts b/src/app/shared/components/rebate-table/index.ts new file mode 100644 index 00000000..9b459de3 --- /dev/null +++ b/src/app/shared/components/rebate-table/index.ts @@ -0,0 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-01-25 20:20:07 + * @LastEditors : Shiming + * @LastEditTime : 2022-01-26 11:05:44 + * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\index.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ +export * from './rebate-table.module' +export * from './rebate-table.service' +export * from './rebate-table.component' \ No newline at end of file diff --git a/src/app/shared/components/rebate-table/rebate-table.component.html b/src/app/shared/components/rebate-table/rebate-table.component.html new file mode 100644 index 00000000..a7ab6f02 --- /dev/null +++ b/src/app/shared/components/rebate-table/rebate-table.component.html @@ -0,0 +1,92 @@ + +
+
+ +
+ + + + + + + + + + + +
+ + + + 险种 + 普货-基本险 + 普货-综合险 + 操作 + + + + + +
+
+ 公里数(km) +
+
|
+
+ + + + + (含) + +
+
+ + + +
+ + + + + + % + +
+ + +
+ + + + +
+ + + 删除 + + + +
+ + +
+
\ No newline at end of file diff --git a/src/app/shared/components/rebate-table/rebate-table.component.less b/src/app/shared/components/rebate-table/rebate-table.component.less new file mode 100644 index 00000000..bebea5bf --- /dev/null +++ b/src/app/shared/components/rebate-table/rebate-table.component.less @@ -0,0 +1,19 @@ +:host::ng-deep { + nz-input-number { + width: 85px; + + input { + width : 100%; + margin: 0; + } + + .ant-input-number-handler-wrap { + display: none; + } + + } + .ant-input-group { + display: -webkit-inline-box !important; + } + +} \ No newline at end of file diff --git a/src/app/shared/components/rebate-table/rebate-table.component.ts b/src/app/shared/components/rebate-table/rebate-table.component.ts new file mode 100644 index 00000000..75b3768a --- /dev/null +++ b/src/app/shared/components/rebate-table/rebate-table.component.ts @@ -0,0 +1,195 @@ +import { debounceTime } from 'rxjs/operators'; +import { Subject } from 'rxjs'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; +import { BaseService } from '@shared'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; + +@Component({ + selector: 'app-rebate-table', + templateUrl: './rebate-table.component.html', + styleUrls: ['./rebate-table.component.less'] +}) +export class RebateTableComponent implements OnInit { + data: any[] = []; + headers: any[] = []; + sfdata: any; // 货源单设置回显 + + @ViewChild('sf', { static: false }) sf!: SFComponent; + schema: SFSchema = {}; + ui!: SFUISchema; + + formatterDollar = (value: number): string => `${value}`; + minrebatePrice: number = 0; + changeSub = new Subject(); + constructor(public service: BaseService, private cdr: ChangeDetectorRef) {} + + ngOnInit(): void { + this.loadData(); + this.initSF() + this.changeEndKmAction(); + this.minrebatePrice = 1000 + } + + loadData() { + this.service.request('/api/mdc/cuc/rebateConfig/list').subscribe(res => { + if (res) { + console.log(res); + this.data = res; + this.cdr.detectChanges(); + } + }); + this.service.request('/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys', [ + "rebate.config.minrebatePrice" + ]).subscribe(res => { + if (res) { + console.log(res); + this.minrebatePrice = Number(res[0].itemValue) + } + }); + } + initSF() { + this.schema = { + properties: { + freightPrice: { + type: 'string', + title: '单票投保最低保费', + ui: { + widget: 'custom', + placeholder: '请输入', + errors: { required: '请填写' } + } + }, + }, + required: ['freightPrice'] + }; + this.ui = { + '*': { + spanLabelFixed: 160, + grid: { span: 24 } + }, + $freightPrice: { + grid: { span: 8 } + }, + }; + } + /** + * 修改结束车长 + * @param event 车长 + * @param i 下标 + */ + changeEndLength(event: any, i: number) { + if (event <= this.headers[i].startLength) { + this.headers[i].endLength = this.headers[i].startLength + 1; + this.changeNextStartLength(event, i + 1); + return; + } + this.headers[i].endLength = event; + this.changeNextStartLength(event, i + 1); + } + + /** + * 修改结束公里数 + * @param event 车长 + * @param i 下标 + */ + changeEndKm(event: any, i: number) { + if (event) { + console.log(event); + + this.changeSub.next(`${event},${i}`); + } + } + changeEndKmAction() { + this.changeSub.pipe(debounceTime(500)).subscribe((res: string) => { + if (res) { + const paras = res.split(','); + const num = Number(paras[0]); + const i = Number(paras[1]); + + if (num <= this.data[i].startKm) { + this.data[i].endKm = null; + setTimeout(() => { + this.data[i].endKm = this.data[i].startKm + 1 ; + }, 0); + this.changeNextStartKm(this.data[i].startKm + 1, i + 1); + return; + } + this.data[i].endKm = num; + this.changeNextStartKm(num, i + 1); + } + }); + } + + add() { + console.log(this.data); + + const tem = this.data[this.data?.length - 1]; + if (tem && tem.endKm) { + this.data.push({ + endKm: '', + startKm: tem.endKm + }); + this.data = [...this.data]; + } else { + this.service.msgSrv.warning('请填写完整公里数'); + } + } + + deleteRow(index: number) { + console.log(index); + var newArr = this.data.concat(); + newArr.splice(this.data.length-1,1) + // this.data = this.data.pop() + console.log(newArr); + this.data = [...newArr]; + } + + save() { + if(!this.minrebatePrice) { + this.service.msgSrv.error('必填项为空!') + return + } + let params= { + minrebatePrice: this.minrebatePrice, + rebateConfigDTOS: this.data + } + console.log(params); + this.service.request('/api/mdc/cuc/rebateConfig/saveBatch', params).subscribe(res => { + if (res) { + console.log(res); + this.service.msgSrv.success('修改成功'); + this.loadData(); + } + }); + } + + /** + * 遍历同步后置位车长 + * @param event 车长 + * @param i 下标 + */ + private changeNextStartLength(event: number, i: number) { + if (this.headers[i]) { + this.headers[i].startLength = event; + if (this.headers[i].endLength <= event) { + this.headers[i].endLength = this.headers[i].startLength + 0.5; + this.changeNextStartLength(event + 0.5, i + 1); + } + } + } + + /** + * 遍历同步后置位公里数 + * @param event 车长 + * @param i 下标 + */ + private changeNextStartKm(event: number, i: number) { + if (this.data[i]) { + this.data[i].startKm = event; + if (this.data[i].endKm <= event) { + this.data[i].endKm = this.data[i].startKm + 1; + this.changeNextStartKm(event + 1, i + 1); + } + } + } +} diff --git a/src/app/shared/components/rebate-table/rebate-table.module.ts b/src/app/shared/components/rebate-table/rebate-table.module.ts new file mode 100644 index 00000000..6e65e35b --- /dev/null +++ b/src/app/shared/components/rebate-table/rebate-table.module.ts @@ -0,0 +1,29 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-01-25 20:23:54 + * @LastEditors : Shiming + * @LastEditTime : 2022-02-11 17:20:49 + * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.module.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { NzInputNumberModule } from 'ng-zorro-antd/input-number'; +import { NzTableModule } from 'ng-zorro-antd/table'; +import { RebateTableComponent } from './rebate-table.component'; +import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm'; +import { NzInputModule } from 'ng-zorro-antd/input'; +import { DelonFormModule } from '@delon/form'; +import { NzButtonModule } from 'ng-zorro-antd/button'; +const COMPONENTS = [RebateTableComponent]; +const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule]; + +@NgModule({ + declarations: COMPONENTS, + imports: [CommonModule, FormsModule, ...MODULES], + exports: COMPONENTS +}) +export class rebateTableModule {} diff --git a/src/app/shared/components/rebate-table/rebate-table.service.ts b/src/app/shared/components/rebate-table/rebate-table.service.ts new file mode 100644 index 00000000..ed67d9fb --- /dev/null +++ b/src/app/shared/components/rebate-table/rebate-table.service.ts @@ -0,0 +1,18 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-01-25 20:21:04 + * @LastEditors : Shiming + * @LastEditTime : 2022-01-25 20:35:52 + * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.service.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ +import { Injectable } from '@angular/core'; + + + +@Injectable({ providedIn: 'root' }) + +export class RebateService { +} diff --git a/src/app/shared/index.ts b/src/app/shared/index.ts index c61dfbdd..d8f2d2d9 100644 --- a/src/app/shared/index.ts +++ b/src/app/shared/index.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-11-29 10:04:12 - * @LastEditTime : 2022-02-11 14:31:22 + * @LastEditTime : 2022-03-11 15:12:20 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\shared\\index.ts @@ -21,6 +21,7 @@ export * from './components/dict-select/index'; export * from './components/dynamic-setting'; export * from './components/singlepage-setting'; export * from './components/insurance-table/index'; +export * from './components/rebate-table/index'; // Utils export * from './utils'; From e1732480cd07ff9801f06f09c8ec5c308022d6cb Mon Sep 17 00:00:00 2001 From: Lingzi Date: Fri, 11 Mar 2022 16:14:32 +0800 Subject: [PATCH 35/70] fix bug --- .../routes/partner/partner-routing.module.ts | 4 +- src/app/routes/partner/partner.module.ts | 3 +- .../scrollimglist.component.html | 9 ++++ .../scrollimglist.component.spec.ts | 24 ++++++++++ .../scrollimglist/scrollimglist.component.ts | 45 +++++++++++++++++++ src/styles.less | 2 +- 6 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.html create mode 100644 src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.spec.ts create mode 100644 src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.ts diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 42af70fc..1e743f92 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -38,6 +38,7 @@ import { AddPersonalPartnerComponent } from './partner-list/components/add-perso import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component'; import { PartnerListComponent } from './partner-list/components/index/partner-list.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; +import { PartnerScrollimglistComponent } from './scroll-img/scrollimglist/scrollimglist.component'; const routes: Routes = [ { @@ -128,8 +129,7 @@ const routes: Routes = [ { path: 'record/detail/:id', component: PartnerRecordedDetailComponent } ] }, - -]; + { path: 'scrollimglist', component: PartnerScrollimglistComponent }]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 6eadaab1..3adfcb58 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -50,6 +50,7 @@ import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-managem import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component'; import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; +import { PartnerScrollimglistComponent } from './scroll-img/scrollimglist/scrollimglist.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -90,7 +91,7 @@ const COMPONENTS: any[] = [ ParterRebateManageMentAddComponent, AddEtpPartnerComponent, AddPersonalPartnerComponent, - + PartnerScrollimglistComponent ]; @NgModule({ diff --git a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.html b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.html new file mode 100644 index 00000000..482ccb06 --- /dev/null +++ b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.spec.ts b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.spec.ts new file mode 100644 index 00000000..78d0192b --- /dev/null +++ b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerScrollimglistComponent } from './scrollimglist.component'; + +describe('PartnerScrollimglistComponent', () => { + let component: PartnerScrollimglistComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PartnerScrollimglistComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerScrollimglistComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.ts b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.ts new file mode 100644 index 00000000..3cd34b22 --- /dev/null +++ b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.ts @@ -0,0 +1,45 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFSchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; + +@Component({ + selector: 'app-partner-scrollimglist', + templateUrl: './scrollimglist.component.html', +}) +export class PartnerScrollimglistComponent implements OnInit { + url = `/user`; + searchSchema: SFSchema = { + properties: { + no: { + type: 'string', + title: '编号' + } + } + }; + @ViewChild('st') private readonly st!: STComponent; + columns: STColumn[] = [ + { title: '编号', index: 'no' }, + { title: '调用次数', type: 'number', index: 'callNo' }, + { title: '头像', type: 'img', width: '50px', index: 'avatar' }, + { title: '时间', type: 'date', index: 'updatedAt' }, + { + title: '', + buttons: [ + // { text: '查看', click: (item: any) => `/form/${item.id}` }, + // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, + ] + } + ]; + + constructor(private http: _HttpClient, private modal: ModalHelper) { } + + ngOnInit(): void { } + + add(): void { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + +} diff --git a/src/styles.less b/src/styles.less index 2464d9a8..a25a53de 100644 --- a/src/styles.less +++ b/src/styles.less @@ -47,4 +47,4 @@ input[type="number"] { .break-word-all { word-break: break-all; word-wrap : break-word; -} +} \ No newline at end of file From 867a975a920536ffff035b326d744fc2d7b4c7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Fri, 11 Mar 2022 16:16:15 +0800 Subject: [PATCH 36/70] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=A5=E8=B4=A6?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../withdrawals-record.component.ts | 10 +- .../account-detail.component.html | 2 +- .../recorded-detail.component.ts | 4 +- .../withdrawals-record.component.ts | 2 +- .../routes/partner/partner-routing.module.ts | 39 ++++---- .../components/detail/detail.component.html | 74 ++++++++++---- .../components/detail/detail.component.ts | 77 ++++++++++++--- .../components/record/record.component.ts | 98 +++++++++---------- src/assets/mocks/menu-data.json | 5 +- 9 files changed, 191 insertions(+), 120 deletions(-) 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..920a35e7 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,4 @@ - + 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..f773be63 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'; @@ -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}`); } /** 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 6b7b86f4..6a428518 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 @@ -325,7 +325,7 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni }, { text: '详情', - click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) + click: item => this.router.navigate(['./../detail/' + item.id], { relativeTo: this.ar }) } ] } diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 5fcfa3a2..79c6269f 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -78,11 +78,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 } + ] + } + ] }, { @@ -92,22 +105,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 } - ] - }, ] }, { 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.ts b/src/app/routes/partner/recorded/components/record/record.component.ts index 49b6b08f..4b97ba2c 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.ts +++ b/src/app/routes/partner/recorded/components/record/record.component.ts @@ -17,8 +17,8 @@ export class PartnerRecordedRecordComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('auditModal', { static: false }) auditModal!: any; @ViewChild('viewReasonModal', { static: false }) viewReasonModal!: any; - columns: STColumn[] = this.initST(); - searchSchema: SFSchema = this.initSF(); + columns!: STColumn[]; + searchSchema!: SFSchema; totalInfo: any = { partnerNum: 34, count: 98, @@ -34,9 +34,22 @@ export class PartnerRecordedRecordComponent implements OnInit { refundStatus: any = ''; msg = ''; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { } - ngOnInit(): void { } + ltdId = ''; // 网络货运人 + accountName = ''; // 账户名称 + + + constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { + + this.accountName = this.ar.snapshot.queryParams?.userIdLabel || ''; + this.ltdId = this.ar.snapshot.queryParams?.ltdId || ''; + + } + + ngOnInit(): void { + this.searchSchema = this.initSF(); + this.columns = this.initST(); + } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { @@ -49,6 +62,7 @@ export class PartnerRecordedRecordComponent implements OnInit { refundStatus: this.refundStatus || null }); } + delete requestOptions?.body?.expand; return requestOptions; }; @@ -107,7 +121,7 @@ export class PartnerRecordedRecordComponent implements OnInit { this.st.load(1); } - auditAction(item?: any) { + auditAction(item?: any, type: string = '1') { this.msg = ''; let params: Array = []; if (item) { @@ -116,13 +130,17 @@ export class PartnerRecordedRecordComponent implements OnInit { params = this.selectedRows.map(node => node.id); } const modal = this.nzModalService.create({ - nzTitle: '审核', + nzTitle: type === '1' ? '审核' : '复审', nzContent: this.auditModal, nzFooter: [ { - label: '备注', + 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, @@ -135,6 +153,7 @@ export class PartnerRecordedRecordComponent implements OnInit { this.st.load(1); } }); + return false; } }, { @@ -203,79 +222,47 @@ export class PartnerRecordedRecordComponent implements OnInit { hidden: true } }, - refundApplyCode: { + accountName: { type: 'string', - title: '提现单号', + title: '账户名称', + default: this.accountName, ui: { placeholder: '请输入' } }, refundStatus: { type: 'string', - title: '提现状态', + title: '入账状态', ui: { widget: 'dict-select', params: { dictKey: 'refund:apply:status' }, placeholder: '请选择' } }, - createTime: { - title: '提现时间', - type: 'string', - ui: { - widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', - placeholder: '请选择', - nzShowTime: true - } as SFDateWidgetSchema - }, - bankAccountName: { - type: 'string', - title: '账户名称', - ui: { - placeholder: '请输入', - visibleIf: { - expand: (value: boolean) => value - } - } - }, - accountType: { - type: 'string', - title: '账户类型', - ui: { - widget: 'dict-select', - params: { dictKey: 'bank:type' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => value - } - } - }, ltdId: { type: 'string', title: '网络货运人', + default: this.ltdId, ui: { widget: 'select', placeholder: '请选择', allowClear: true, asyncData: () => this.service.getNetworkFreightForwarder(), - visibleIf: { - expand: (value: boolean) => value - } } }, - bankType: { + createTime: { + title: '提交时间', type: 'string', - title: '银行类型', ui: { - widget: 'dict-select', - params: { dictKey: 'bankname:type' }, - placeholder: '请输入', + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + placeholder: '请选择', + nzShowTime: true, visibleIf: { expand: (value: boolean) => value } - } - } + } as SFDateWidgetSchema + }, } }; } @@ -285,7 +272,7 @@ export class PartnerRecordedRecordComponent implements OnInit { { title: '', index: 'key', type: 'checkbox', className: 'text-center' }, { title: '账户名称', index: 'createTime', width: 180, className: 'text-center' }, { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, - { title: '入账单号', index: 'refundApplyCode', width: 180, className: 'text-center' }, + { title: '入账单号', index: 'refundApplyCode', width: 190, className: 'text-center' }, { title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' }, { title: '开票金额', @@ -324,6 +311,11 @@ export class PartnerRecordedRecordComponent implements OnInit { iif: item => item.refundStatus === '1', click: item => this.auditAction(item) }, + { + text: '复审', + iif: item => item.refundStatus === '2', + click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) + }, { text: '详情', click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 6fce9bbf..1bc855f6 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -508,8 +508,7 @@ { "text": "合伙人管理", "icon": "anticon anticon-dashboard", - "children": [ - { + "children": [{ "text": "合伙人列表", "link": "/partner/partner-list" }, @@ -547,7 +546,7 @@ "group": true, "children": [{ "text": "账户管理", - "link": "/partner/account-management/am" + "link": "/partner/account-management/am/list" }, { "text": "账户明细", From 63ab601233205acd6e00784ae90ceb9cb917a524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Fri, 11 Mar 2022 16:24:17 +0800 Subject: [PATCH 37/70] - --- .../account-detail/account-detail.component.html | 8 +++++++- .../components/account-detail/account-detail.component.ts | 4 ++++ .../recorded-detail/recorded-detail.component.html | 8 +++++++- .../recorded-detail/recorded-detail.component.ts | 3 +++ 4 files changed, 21 insertions(+), 2 deletions(-) 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 920a35e7..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/recorded-detail/recorded-detail.component.html b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html index cdbf3b4e..5fbc2ce6 100644 --- a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html @@ -1,4 +1,10 @@ - + + + + + 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 f773be63..5ba0a4b9 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 @@ -142,5 +142,8 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit { handleCancel() { this.showBillDetail = false; } + goBack() { + window.history.go(-1); + } } From 98a709c3f18c66deac9f09abe4f902abde924bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Fri, 11 Mar 2022 17:35:13 +0800 Subject: [PATCH 38/70] - --- .../components/recorded-detail/recorded-detail.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5ba0a4b9..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 @@ -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}`) } ] }, From 95ed59c7d2f49cdaaf575c567db9e02a276ada68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Fri, 11 Mar 2022 17:41:28 +0800 Subject: [PATCH 39/70] - --- .../account-management/components/list/list.component.html | 6 ++---- .../withdrawals-record/withdrawals-record.component.html | 4 ++-- .../recorded/components/record/record.component.html | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) 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..465b42a3 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,10 +5,8 @@
--> - - + + 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/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..f90502b6 --- /dev/null +++ b/src/app/routes/partner/knowledge/classification/components/list/list.component.ts @@ -0,0 +1,45 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFSchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; + +@Component({ + selector: 'app-partner-list', + templateUrl: './list.component.html', +}) +export class PartnerKnowledgeClassificationListComponent implements OnInit { + url = `/user`; + searchSchema: SFSchema = { + properties: { + no: { + type: 'string', + title: '编号' + } + } + }; + @ViewChild('st') private readonly st!: STComponent; + columns: STColumn[] = [ + { title: '编号', index: 'no' }, + { title: '调用次数', type: 'number', index: 'callNo' }, + { title: '头像', type: 'img', width: '50px', index: 'avatar' }, + { title: '时间', type: 'date', index: 'updatedAt' }, + { + title: '', + buttons: [ + // { text: '查看', click: (item: any) => `/form/${item.id}` }, + // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, + ] + } + ]; + + constructor(private http: _HttpClient, private modal: ModalHelper) { } + + ngOnInit(): void { } + + add(): void { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + +} diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 2ceac3d8..10c6f422 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -38,6 +38,7 @@ import { AddPersonalPartnerComponent } from './partner-list/components/add-perso import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component'; import { PartnerListComponent } from './partner-list/components/index/partner-list.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; +import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component'; const routes: Routes = [ { @@ -125,7 +126,12 @@ const routes: Routes = [ { path: 'record/detail/:id', component: PartnerRecordedDetailComponent } ] }, - + { + path: 'knowledge', + children: [ + { path: 'classification', component: PartnerKnowledgeClassificationListComponent }, + ] + }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 6eadaab1..c38615d4 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'; @@ -50,6 +50,7 @@ import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-managem import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component'; import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; +import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -90,12 +91,12 @@ const COMPONENTS: any[] = [ ParterRebateManageMentAddComponent, AddEtpPartnerComponent, AddPersonalPartnerComponent, - + PartnerKnowledgeClassificationListComponent ]; @NgModule({ declarations: [...COMPONENTS], - imports: [CommonModule, PartnerRoutingModule, SharedModule,rebateTableModule], + imports: [CommonModule, PartnerRoutingModule, SharedModule], providers: [PartnerListService] }) export class PartnerModule { } diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 776c0210..51dd9bca 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -1,5 +1,5 @@ /* - * @Description : + * @Description : * @Version : 1.0 * @Author : Shiming * @Date : 2022-01-13 15:10:17 @@ -37,6 +37,7 @@ import { ImageListModule } from './components/imagelist'; import { DictSelectComponent } from './components/dict-select'; import { PipeModule } from './pipes'; import { AccountDetailComponent } from './components/account-detail/account-detail.component'; +import { rebateTableModule } from './components/rebate-table'; const MODULES = [ AddressModule, @@ -51,6 +52,7 @@ const MODULES = [ AmapModule, ImageListModule, PipeModule, + rebateTableModule, ...PRO_SHARED_MODULES ]; // #endregion @@ -88,4 +90,4 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou ], declarations: SHAREDCOMPONENTS }) -export class SharedModule {} +export class SharedModule { } diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 20178a6b..17638a16 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -604,6 +604,9 @@ "children": [{ "text": "banner管理", "link": "/knowledge/banner" + }, { + "text": "分类管理", + "link": "/partner/knowledge/classification" }] } ] From 22ca0b0fb1333ff52255c235dd5882f6b2359b9a Mon Sep 17 00:00:00 2001 From: heqinghang Date: Sat, 12 Mar 2022 15:22:03 +0800 Subject: [PATCH 42/70] 666 --- .../components/edit/edit.component.html | 17 ++ .../components/edit/edit.component.ts | 189 +++++++++++++++++ .../components/list/list.component.html | 49 +++++ .../components/list/list.component.ts | 200 ++++++++++++++++++ .../services/channel-sales.service.ts | 12 ++ .../routes/partner/partner-routing.module.ts | 11 + src/app/routes/partner/partner.module.ts | 5 +- src/assets/mocks/menu-data.json | 17 +- 8 files changed, 498 insertions(+), 2 deletions(-) create mode 100644 src/app/routes/partner/article-management/components/edit/edit.component.html create mode 100644 src/app/routes/partner/article-management/components/edit/edit.component.ts create mode 100644 src/app/routes/partner/article-management/components/list/list.component.html create mode 100644 src/app/routes/partner/article-management/components/list/list.component.ts create mode 100644 src/app/routes/partner/article-management/services/channel-sales.service.ts diff --git a/src/app/routes/partner/article-management/components/edit/edit.component.html b/src/app/routes/partner/article-management/components/edit/edit.component.html new file mode 100644 index 00000000..e8e4a5fc --- /dev/null +++ b/src/app/routes/partner/article-management/components/edit/edit.component.html @@ -0,0 +1,17 @@ + + + + + +
+ + +
+
+ +
+ + +
+
+ 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..61db7824 --- /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/article-management/add'], { queryParams: {} }); + } + + // 编辑 + edit(record: STData) { + this.router.navigate(['/partner/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/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 2ceac3d8..69c8c4da 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -38,6 +38,8 @@ import { AddPersonalPartnerComponent } from './partner-list/components/add-perso import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component'; import { PartnerListComponent } from './partner-list/components/index/partner-list.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; +import { ParterArticleManagementListComponent } from './article-management/components/list/list.component'; +import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component'; const routes: Routes = [ { @@ -125,6 +127,15 @@ const routes: Routes = [ { path: 'record/detail/:id', component: PartnerRecordedDetailComponent } ] }, + { + path: 'article-management', + children: [ + { path: '', component: ParterArticleManagementListComponent }, + { path: 'list', component: ParterArticleManagementListComponent}, + { path: 'add', component: ParterArticleManagementEditComponent}, + { path: 'edit', component: ParterArticleManagementEditComponent}, + ] + }, ]; @NgModule({ diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 6eadaab1..cb9f380b 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -50,6 +50,8 @@ import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-managem import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component'; import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; +import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component'; +import { ParterArticleManagementListComponent } from './article-management/components/list/list.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -90,7 +92,8 @@ const COMPONENTS: any[] = [ ParterRebateManageMentAddComponent, AddEtpPartnerComponent, AddPersonalPartnerComponent, - + ParterArticleManagementEditComponent, + ParterArticleManagementListComponent ]; @NgModule({ diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 20178a6b..64e38c54 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -604,7 +604,22 @@ "children": [{ "text": "banner管理", "link": "/knowledge/banner" - }] + }, + { + "text": "文章管理", + "link": "/partner/article-management/list" + }, + { + "text": "新增文章", + "link": "/partner/article-management/add", + "hide": true + }, + { + "text": "编辑文章", + "link": "/partner/article-management/edit", + "hide": true + } + ] } ] } From b605210b1186e2d0ac32d6cd9edb639197d228fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Sat, 12 Mar 2022 15:37:45 +0800 Subject: [PATCH 43/70] =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list/list.component.html | 2 +- .../components/edit/edit.component.html | 8 + .../components/edit/edit.component.spec.ts | 24 +++ .../components/edit/edit.component.ts | 111 +++++++++++ .../components/list/list.component.html | 33 +++- .../components/list/list.component.ts | 182 +++++++++++++++--- .../services/classification.service.ts | 12 ++ src/app/routes/partner/partner.module.ts | 4 +- src/app/shared/shared-zorro.module.ts | 7 +- 9 files changed, 345 insertions(+), 38 deletions(-) create mode 100644 src/app/routes/partner/knowledge/classification/components/edit/edit.component.html create mode 100644 src/app/routes/partner/knowledge/classification/components/edit/edit.component.spec.ts create mode 100644 src/app/routes/partner/knowledge/classification/components/edit/edit.component.ts create mode 100644 src/app/routes/partner/knowledge/classification/services/classification.service.ts 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 465b42a3..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 @@ -13,7 +13,7 @@ - + + + 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 index 482ccb06..2947e9a8 100644 --- a/src/app/routes/partner/knowledge/classification/components/list/list.component.html +++ b/src/app/routes/partner/knowledge/classification/components/list/list.component.html @@ -1,9 +1,28 @@ - - - - - + + - - +
+
+ +
+
+ + +
+
+
+ + +
+ +
+ + + + +
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 index f90502b6..db88bed4 100644 --- a/src/app/routes/partner/knowledge/classification/components/list/list.component.ts +++ b/src/app/routes/partner/knowledge/classification/components/list/list.component.ts @@ -1,7 +1,11 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; -import { SFSchema } from '@delon/form'; +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', @@ -9,37 +13,161 @@ import { ModalHelper, _HttpClient } from '@delon/theme'; }) export class PartnerKnowledgeClassificationListComponent implements OnInit { url = `/user`; - searchSchema: SFSchema = { - properties: { - no: { - type: 'string', - title: '编号' + 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: '', + }, } } - }; - @ViewChild('st') private readonly st!: STComponent; - columns: STColumn[] = [ - { title: '编号', index: 'no' }, - { title: '调用次数', type: 'number', index: 'callNo' }, - { title: '头像', type: 'img', width: '50px', index: 'avatar' }, - { title: '时间', type: 'date', index: 'updatedAt' }, - { - title: '', - buttons: [ - // { text: '查看', click: (item: any) => `/form/${item.id}` }, - // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, - ] - } - ]; + 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) + } + ] + } + ]; + } - constructor(private http: _HttpClient, private modal: ModalHelper) { } + resetSF() { + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } - ngOnInit(): void { } + /** + *新增 + * @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() { - add(): void { - // this.modal - // .createStatic(FormEditComponent, { i: { id: 0 } }) - // .subscribe(() => this.st.reload()); } } 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.module.ts b/src/app/routes/partner/partner.module.ts index c38615d4..1c3c0486 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -51,6 +51,7 @@ import { PartnerRecordedDetailComponent } from './recorded/components/detail/det import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component'; +import { PartnerEditComponent } from './knowledge/classification/components/edit/edit.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -92,7 +93,8 @@ const COMPONENTS: any[] = [ AddEtpPartnerComponent, AddPersonalPartnerComponent, PartnerKnowledgeClassificationListComponent -]; +, + PartnerEditComponent]; @NgModule({ declarations: [...COMPONENTS], diff --git a/src/app/shared/shared-zorro.module.ts b/src/app/shared/shared-zorro.module.ts index ab105080..bb75f8c0 100644 --- a/src/app/shared/shared-zorro.module.ts +++ b/src/app/shared/shared-zorro.module.ts @@ -44,8 +44,10 @@ import { NzUploadModule } from 'ng-zorro-antd/upload'; import { NzCascaderModule } from 'ng-zorro-antd/cascader'; import { NzAnchorModule } from 'ng-zorro-antd/anchor'; import { NzAffixModule } from 'ng-zorro-antd/affix'; -import { NzTypographyModule } from 'ng-zorro-antd/typography'; +import { NzTypographyModule } from 'ng-zorro-antd/typography'; import { NzSwitchModule } from 'ng-zorro-antd/switch'; +import { NzImageModule } from 'ng-zorro-antd/image'; + export const SHARED_ZORRO_MODULES = [ NzButtonModule, NzGridModule, @@ -85,5 +87,6 @@ export const SHARED_ZORRO_MODULES = [ NzAnchorModule, NzAffixModule, NzTypographyModule, - NzSwitchModule + NzSwitchModule, + NzImageModule ]; From 6e2b7d0b03a944a19df8b207200f1d03b5fe22ca Mon Sep 17 00:00:00 2001 From: Lingzi Date: Mon, 14 Mar 2022 13:22:37 +0800 Subject: [PATCH 44/70] fix bug --- .../ad/components/add/add.component.html | 24 ++ .../ad/components/add/add.component.spec.ts | 24 ++ .../ad/components/add/add.component.ts | 309 ++++++++++++++++++ .../routes/partner/ad/components/add/add.less | 119 +++++++ .../ad/components/list/list.component.html | 62 ++++ .../ad/components/list/list.component.less | 1 + .../ad/components/list/list.component.spec.ts | 24 ++ .../ad/components/list/list.component.ts | 281 ++++++++++++++++ .../partner/ad/components/list/list.less | 9 + .../partner/ad/services/scrollimg.service.ts | 12 + .../routes/partner/partner-routing.module.ts | 13 +- src/app/routes/partner/partner.module.ts | 6 +- .../scrollimglist.component.html | 9 - .../scrollimglist.component.spec.ts | 24 -- .../scrollimglist/scrollimglist.component.ts | 45 --- src/assets/mocks/menu-data.json | 3 +- 16 files changed, 881 insertions(+), 84 deletions(-) create mode 100644 src/app/routes/partner/ad/components/add/add.component.html create mode 100644 src/app/routes/partner/ad/components/add/add.component.spec.ts create mode 100644 src/app/routes/partner/ad/components/add/add.component.ts create mode 100644 src/app/routes/partner/ad/components/add/add.less create mode 100644 src/app/routes/partner/ad/components/list/list.component.html create mode 100644 src/app/routes/partner/ad/components/list/list.component.less create mode 100644 src/app/routes/partner/ad/components/list/list.component.spec.ts create mode 100644 src/app/routes/partner/ad/components/list/list.component.ts create mode 100644 src/app/routes/partner/ad/components/list/list.less create mode 100644 src/app/routes/partner/ad/services/scrollimg.service.ts delete mode 100644 src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.html delete mode 100644 src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.spec.ts delete mode 100644 src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.ts diff --git a/src/app/routes/partner/ad/components/add/add.component.html b/src/app/routes/partner/ad/components/add/add.component.html new file mode 100644 index 00000000..f6a39e94 --- /dev/null +++ b/src/app/routes/partner/ad/components/add/add.component.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/app/routes/partner/ad/components/add/add.component.spec.ts b/src/app/routes/partner/ad/components/add/add.component.spec.ts new file mode 100644 index 00000000..80b44d19 --- /dev/null +++ b/src/app/routes/partner/ad/components/add/add.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { AdComponentsAddComponent } from './add.component'; + +describe('AdComponentsAddComponent', () => { + let component: AdComponentsAddComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AdComponentsAddComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AdComponentsAddComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/ad/components/add/add.component.ts b/src/app/routes/partner/ad/components/add/add.component.ts new file mode 100644 index 00000000..f719a83a --- /dev/null +++ b/src/app/routes/partner/ad/components/add/add.component.ts @@ -0,0 +1,309 @@ +import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { EAEnvironmentService } from '@shared'; +import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; +import format from 'date-fns/format'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { NzUploadFile } from 'ng-zorro-antd/upload'; +import { Observable, Observer, of } from 'rxjs'; +import { ScrollImgService } from '../../services/scrollimg.service'; +import { apiConf } from '@conf/api.conf'; + +@Component({ + selector: 'app-ad-components-add', + templateUrl: './add.component.html', + styleUrls: ['./add.less'] +}) +export class ScrollimgComponentsAddComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + record: any = {}; + i: any; + schema: SFSchema = {}; + contentListData = []; + queryParams: any = {}; + oldTakeEffectTime = ''; + maxSort = 0; + isVisible = false; + validFalg = true; + detailData: any = { + advertisementContentDTOList: [] + }; + changeTimeFlag = false; + currentIndex = 0; + addFlag = true; + addId = 1; + inputPoint: any = { + lng: 0, + lat: 0 + }; + today = new Date(); + navData: any = []; + navigationName = ''; + ui: SFUISchema = { + '*': { + spanLabelFixed: 200, + grid: { span: 24 }, + }, + }; + constructor( + public msgSrv: NzMessageService, + public http: _HttpClient, + public service: ScrollImgService, + private route: ActivatedRoute, + private router: Router, + private modal: ModalHelper, + private modalSrv: NzModalService, + private cdr: ChangeDetectorRef, + private envSrv: EAEnvironmentService, + ) { } + + + ngOnInit(): void { + this.queryParams = this.route.snapshot.queryParams; + if (this.queryParams.type !== 'add') { + this.initDetailData(); + } + this.initSF(); + } + initDetailData() { + + } + initSF() { + this.schema = { + properties: { + name: { + type: 'string', + title: '轮播图名称', + maxLength: 10, + ui: { + showRequired: true, + placeholder: '请不要超过10个字', + } + }, + style: { + type: 'string', + title: '轮播图', + ui: { + showRequired: true, + widget: 'custom', + placeholder: '请选择轮播图', + } + }, + licensePhotoWatermark: { + type: 'string', + title: '轮播图', + ui: { + action: apiConf.fileUpload, + accept: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过4M', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + change: (args: any) => { + if (args.type === 'success') { + this.detailData.enterpriseBaseDTO.licensePhoto = args.file.response.data.fullFilePath + } + }, + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt4M = file.size / 1024 / 1024 < 4; + if (!isLt4M) { + this.service.msgSrv.warning('图片大小超过4M!'); + observer.complete(); + return; + } + observer.next(isLt4M); + observer.complete(); + }); + }, + previewFile: (file: NzUploadFile) => of(file.url), + }, + }, + takeEffectType: { + type: 'string', + title: '生效类型', + ui: { + showRequired: true, + widget: 'custom', + }, + default: 1 + }, + mainTitle: { + type: 'string', + title: '主标题', + maxLength: 20, + ui: { + visibleIf: { style: [1, 2, 3, 4, 5] }, + placeholder: '请输入主标题,不超过20个字', + change: (id: any) => { + this.validFalg = !this.sf?.valid; + } + } + }, + withTitle: { + type: 'string', + title: '副标题', + maxLength: 20, + ui: { + visibleIf: { style: [1, 2, 3, 4, 5] }, + placeholder: '请输入主标题,不超过20个字', + } + }, + sortId: { + type: 'string', + title: '显示顺序', + ui: { + showRequired: true, + widget: 'select', + serverSearch: true, + } as SFSelectWidgetSchema, + enum: [ + { label: 1, value: '1' }, + { label: 2, value: '2' }, + { label: 3, value: '3' }, + { label: 4, value: '4' }, + { label: 5, value: '5' }, + { label: 6, value: '6' }, + { label: 7, value: '7' }, + { label: 8, value: '8' }, + { label: 9, value: '9' }, + { label: 10, value: '10' }, + ] + }, + cooperationHotline: { + type: 'string', + title: '合作热线', + maxLength: 13, + ui: { + showRequired: true, + placeholder: '请输入电话号码', + visibleIf: { style: [6] }, + validator: val => { + const reg = /((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/g; + let isValid: any; + isValid = reg.test(val); + if (!isValid) { + return [{ keyword: 'required', message: '格式不正确' }]; + } + return []; + }, + }, + }, + companyAddress: { + type: 'string', + title: '公司选址', + ui: { + widget: 'custom', + showRequired: true, + visibleIf: { style: [6] }, + }, + }, + advertisementContentDTOList: { + type: 'string', + title: '内容设置', + ui: { + widget: 'custom', + showRequired: true, + visibleIf: { style: [1, 2, 3, 4, 5] }, + }, + } + }, + required: ['name', 'navigationId', 'style', 'takeEffectType', 'cooperationHotline', 'companyAddress', 'advertisementContentDTOList'], + }; + if (this.queryParams.type === 'add'){ + setTimeout(() => { + this.sf.setValue('/takeEffectType', 1); + this.sf.setValue('/style', 1); + }, 500); + } + } + get reqParams() { + return {}; + } + disabledDate = (current: Date): boolean => { + // Can not select days before today and today + return differenceInCalendarDays(current, this.today) < 0; + } + changeTime(){ + this.changeTimeFlag = true; + } + + + checkSort(){ + const params: any = { + navigationId: this.sf?.value.navigationId, + sortId: this.sf?.value.sortId, + takeEffectType: this.sf?.value.takeEffectType, + }; + if (this.queryParams.id !== '0'){ + params.advertisementId = this.queryParams.id; + } + if (this.sf.value.takeEffectType === 2){ + if (this.changeTimeFlag) { + params.takeEffectTime = format(this.detailData.takeEffectTime, 'yyyy-MM-dd HH:mm'); + } else { + params.takeEffectTime = this.detailData.takeEffectTime; + } + } + + } + save() { + const params: any = { + ...this.sf?.value, + latitude: this.inputPoint.lat, + longitude: this.inputPoint.lng, + id: this.queryParams.id + }; + this.detailData.advertisementContentDTOList.forEach((item: any) => { + delete item.addId; + }); + if (this.queryParams.type === 'add') { + delete params.id; + } + if (this.sf.value.takeEffectType === 2){ + if (this.changeTimeFlag) { + params.takeEffectTime = format(this.detailData.takeEffectTime, 'yyyy-MM-dd HH:mm'); + } else { + params.takeEffectTime = this.detailData.takeEffectTime; + } + } else { + delete params.takeEffectTime; + } + this.service.request(this.service.$api_add_one, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('保存成功'); + this.router.navigate(['../list'], {relativeTo: this.route}); + } + }); + } + + goBack() { + window.history.go(-1); + } + gotoMap() { + this.isVisible = true; + } + + handleOk(): void { + this.isVisible = false; + } + + handleCancel(): void { + this.isVisible = false; + } + outputPointAddress(data: any){ + this.sf.setValue('/companyAddress', data.address); + this.inputPoint = data.inputPoint; + } +} diff --git a/src/app/routes/partner/ad/components/add/add.less b/src/app/routes/partner/ad/components/add/add.less new file mode 100644 index 00000000..0a6adacb --- /dev/null +++ b/src/app/routes/partner/ad/components/add/add.less @@ -0,0 +1,119 @@ +:host { + .styleBox { + display: flex; + align-items: flex-end; + margin: 10px 0 0 0; + } + .imgBox { + position: relative; + width: 200px; + padding: 6px 0; + text-align: center; + border: solid 1px #eee; + .leftBox, + .rightBox { + position: absolute; + top: 50%; + transform: translate(0, -50%); + } + img { + width: 170px; + height: 40px; + } + .leftBox { + left: 3px; + } + .rightBox { + right: 3px; + } + } + .imgBox_two { + width: 200px; + padding: 6px; + text-align: center; + border: solid 1px #eee; + img { + width: 100%; + height: 40px; + } + } + .imgBox_three { + width: 200px; + padding: 6px 0; + text-align: center; + border: solid 1px #eee; + img { + width: 25%; + height: 40px; + margin: 0 6% 0 0; + &:first-child { + margin: 0 6%; + } + } + } + .imgBox_four { + width: 200px; + padding: 6px 0; + text-align: center; + border: solid 1px #eee; + img { + width: 22%; + height: 40px; + margin: 0 2% 0 0; + &:first-child { + margin: 0 2%; + } + } + } + .imgBox_one { + width: 60px; + padding: 6px; + text-align: center; + border: solid 1px #eee; + img { + width: 100%; + height: 40px; + } + } + .imgBox_info { + width: 200px; + padding: 6px; + overflow: hidden; + border: solid 1px #eee; + .title { + width: 100%; + line-height: 30px; + text-align: center; + } + .infoBox { + .name { + line-height: 28px; + } + .map { + width: 100%; + text-align: center; + img { + width: 90%; + } + } + } + } + .hint { + margin: 0 0 0 10px; + color: #f00; + } + .addBtn { + margin: 0 0 10px 0; + } + } + .overflowText { + display: -webkit-box; + max-width: 200px; + overflow: hidden; + text-align: left; + text-overflow: -o-ellipsis-lastline; + text-overflow: ellipsis; + -webkit-line-clamp: 1; + line-clamp: 1; + -webkit-box-orient: vertical; + } \ No newline at end of file diff --git a/src/app/routes/partner/ad/components/list/list.component.html b/src/app/routes/partner/ad/components/list/list.component.html new file mode 100644 index 00000000..caedd311 --- /dev/null +++ b/src/app/routes/partner/ad/components/list/list.component.html @@ -0,0 +1,62 @@ + + + + +
+ +
+ +
+ + + +
+ +
+
+ + + +
+
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + + +
diff --git a/src/app/routes/partner/ad/components/list/list.component.less b/src/app/routes/partner/ad/components/list/list.component.less new file mode 100644 index 00000000..0aae2779 --- /dev/null +++ b/src/app/routes/partner/ad/components/list/list.component.less @@ -0,0 +1 @@ +@import '~@delon/theme/index'; diff --git a/src/app/routes/partner/ad/components/list/list.component.spec.ts b/src/app/routes/partner/ad/components/list/list.component.spec.ts new file mode 100644 index 00000000..c8ac7672 --- /dev/null +++ b/src/app/routes/partner/ad/components/list/list.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { AdComponentsListComponent } from './list.component'; + +describe('AdComponentsListComponent', () => { + let component: AdComponentsListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AdComponentsListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AdComponentsListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/ad/components/list/list.component.ts b/src/app/routes/partner/ad/components/list/list.component.ts new file mode 100644 index 00000000..a1c34480 --- /dev/null +++ b/src/app/routes/partner/ad/components/list/list.component.ts @@ -0,0 +1,281 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { ModalHelper } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { ScrollImgService } from '../../services/scrollimg.service'; + +@Component({ + selector: 'app-scrollimg-components-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.less'] +}) + +export class ScrollImgComponentsListComponent implements OnInit { + schema: SFSchema = {}; + columns: STColumn[] = []; + ui: SFUISchema = {}; + appList: any[] = []; + _$expand = false; + selectApp = { + appName: '', + appId: '' + }; + + @ViewChild('st', { static: false }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + constructor(public service: ScrollImgService, private modal: ModalHelper, private msg: NzMessageService, private router: Router, private modalSrv: NzModalService, private ar: ActivatedRoute) { } + + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + + /** + * 查询参数 + */ + get reqParams() { + const params = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + if (params.status === '') { + delete params.status; + } + if (params.style === '') { + delete params.style; + } + if (params.navigationId === '') { + delete params.navigationId; + } + return { ...params}; + } + + /** + * 选中行 + */ + get selectedRows() { + return this.st?.list.filter((item) => item.checked) || []; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + selectAppFun(item: any) { + this.selectApp = item; + this.st.load(1); + } + dataProcess(data: STData[]): STData[] { + return data.map((i, index) => { + i.showSortFlag = false; + return i; + }); + } + initSF() { + this.schema = { + properties: { + _$expand: { + type: 'boolean', + ui: { + hidden: true, + }, + }, + name: { + type: 'string', + title: '轮播图名称', + maxLength: 10, + ui: { + widget: '', + placeholder: '请输入', + } + }, + status1: { + type: 'string', + title: '可见范围', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + } as SFSelectWidgetSchema, + enum: [ + { label: '全部', value: 1 }, + { label: '全部可见', value: 2 }, + { label: '渠道销售可见', value: 3 }, + { label: '合伙人可见', value: 4 }, + ] + }, + status: { + type: 'string', + title: '状态', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + } as SFSelectWidgetSchema, + enum: [ + { label: '全部', value: 1 }, + { label: '正常', value: 2 }, + { label: '禁用', value: 3 } + ] + }, + }, + }; + this.ui = { + '*': { + spanLabelFixed: 110, + grid: { span: 8 }, + }, + }; + } + + initST() { + this.columns = [ + { + title: '轮播图名称', // 位:px + index: 'name', + className: 'text-center' + }, + { + title: '轮播图', + index: 'navigationName', + className: 'text-center' + }, + { + title: '可见范围', + index: 'navigationName', + className: 'text-center' + }, + { + title: '排序', // 位 px + index: 'sortId', + className: 'text-center' + }, + { + title: '状态', // 位 px + index: 'style', + className: 'text-center', + type: 'enum', + enum: { + 1: '正常', + 2: '禁用', + } + }, + { + title: '最后修改时间', // 位 px + index: 'createTime', + className: 'text-center' + }, + { + title: '操作', + fixed: 'right', + className: 'text-center', + width: 280, + buttons: [ + { + text: '修改', + click: (item) => { + this.router.navigate(['../detail'], { queryParams: { id: item.id, type: 'edit' }, relativeTo: this.ar }); + } + }, + { + text: '禁用', + pop: { + title: `是否确认禁用?`, + okType: 'danger', + icon: 'alert', + }, + click: (item) => { + this.changeStatus(item.id); + }, + iif: (item) => item.status === 1 + }, + { + text: '启用', + pop: { + title: `是否确认启用?`, + okType: 'danger', + icon: 'alert', + }, + click: (item) => { + this.changeStatus(item); + }, + iif: (item) => item.status === 2 + }, + { + text: '查看', + click: (item) => { + this.router.navigate(['../view'], { queryParams: { id: item.id, type: 'view' }, relativeTo: this.ar }); + } + }, + { + text: '删除', + pop: { + title: `确定删除吗?`, + okType: 'danger', + icon: 'alert', + }, + click: (item) => { + this.del(item); + }, + iif: (item) => item.status === 2 + }, + { + text: '操作记录', + click: (item) => { + this.router.navigate(['../operatordata'], { queryParams: { id: item.id }, relativeTo: this.ar }); + } + }, + ], + }, + ]; + } + changeStatus(item: any) { + const params = { + status, + idList: [item.id] + }; + // this.service.request(this.service.$api_openOrClose, params).subscribe(res => { + // if (res) { + // this.st.reload(); + // } + // }); + } + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 新增单个实例 + */ + add() { + this.router.navigate(['../detail'], { queryParams: { id: 0, type: 'add' }, relativeTo: this.ar }); + } + + /** + * 删除单个实例 + */ + del(item: any) { + const ids = []; + ids.push(item.id); + this.service.request(this.service.$api_del_many, ids).subscribe(res => { + if (res) { + this.service.msgSrv.success('删除成功'); + this.st.reload(); + } + }); + } +} diff --git a/src/app/routes/partner/ad/components/list/list.less b/src/app/routes/partner/ad/components/list/list.less new file mode 100644 index 00000000..d9b6c73f --- /dev/null +++ b/src/app/routes/partner/ad/components/list/list.less @@ -0,0 +1,9 @@ +.selectApp { + display: flex; + .appTitle { + font-size: 14px; + } + } + .redfont{ + color: #f00; + } \ No newline at end of file diff --git a/src/app/routes/partner/ad/services/scrollimg.service.ts b/src/app/routes/partner/ad/services/scrollimg.service.ts new file mode 100644 index 00000000..0af4095c --- /dev/null +++ b/src/app/routes/partner/ad/services/scrollimg.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class ScrollImgService 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 1e743f92..c4eca158 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -38,7 +38,7 @@ import { AddPersonalPartnerComponent } from './partner-list/components/add-perso import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component'; import { PartnerListComponent } from './partner-list/components/index/partner-list.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; -import { PartnerScrollimglistComponent } from './scroll-img/scrollimglist/scrollimglist.component'; +import { ScrollImgComponentsListComponent } from './ad/components/list/list.component'; const routes: Routes = [ { @@ -129,7 +129,16 @@ const routes: Routes = [ { path: 'record/detail/:id', component: PartnerRecordedDetailComponent } ] }, - { path: 'scrollimglist', component: PartnerScrollimglistComponent }]; + { + path: 'scroll-img', + children: [ + { path: '', component: ScrollImgComponentsListComponent }, + { path: 'list', component: ScrollImgComponentsListComponent }, + { path: 'channel-detail', component: ParterClaimAuditListChannelDetailComponent }, + { path: 'partner-detail', component: ParterClaimAuditListPartnerDetailComponent } + ] + }, +]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 3adfcb58..e44dd6dd 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -50,7 +50,8 @@ import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-managem import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component'; import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component'; -import { PartnerScrollimglistComponent } from './scroll-img/scrollimglist/scrollimglist.component'; +import { ScrollImgComponentsListComponent } from './ad/components/list/list.component'; +import { ScrollimgComponentsAddComponent } from './ad/components/add/add.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -91,7 +92,8 @@ const COMPONENTS: any[] = [ ParterRebateManageMentAddComponent, AddEtpPartnerComponent, AddPersonalPartnerComponent, - PartnerScrollimglistComponent + ScrollImgComponentsListComponent, + ScrollimgComponentsAddComponent ]; @NgModule({ diff --git a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.html b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.html deleted file mode 100644 index 482ccb06..00000000 --- a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.spec.ts b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.spec.ts deleted file mode 100644 index 78d0192b..00000000 --- a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; -import { PartnerScrollimglistComponent } from './scrollimglist.component'; - -describe('PartnerScrollimglistComponent', () => { - let component: PartnerScrollimglistComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ PartnerScrollimglistComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PartnerScrollimglistComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.ts b/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.ts deleted file mode 100644 index 3cd34b22..00000000 --- a/src/app/routes/partner/scroll-img/scrollimglist/scrollimglist.component.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; -import { STColumn, STComponent } from '@delon/abc/st'; -import { SFSchema } from '@delon/form'; -import { ModalHelper, _HttpClient } from '@delon/theme'; - -@Component({ - selector: 'app-partner-scrollimglist', - templateUrl: './scrollimglist.component.html', -}) -export class PartnerScrollimglistComponent implements OnInit { - url = `/user`; - searchSchema: SFSchema = { - properties: { - no: { - type: 'string', - title: '编号' - } - } - }; - @ViewChild('st') private readonly st!: STComponent; - columns: STColumn[] = [ - { title: '编号', index: 'no' }, - { title: '调用次数', type: 'number', index: 'callNo' }, - { title: '头像', type: 'img', width: '50px', index: 'avatar' }, - { title: '时间', type: 'date', index: 'updatedAt' }, - { - title: '', - buttons: [ - // { text: '查看', click: (item: any) => `/form/${item.id}` }, - // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, - ] - } - ]; - - constructor(private http: _HttpClient, private modal: ModalHelper) { } - - ngOnInit(): void { } - - add(): void { - // this.modal - // .createStatic(FormEditComponent, { i: { id: 0 } }) - // .subscribe(() => this.st.reload()); - } - -} diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 2bcf0d4b..1bf2380e 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -596,8 +596,7 @@ }, { "text": "轮播图管理", - "link": "/partner/scroll-img/list", - "hide": true + "link": "/partner/scroll-img/list" }, { "text": "知识库管理", From 97a3aca60c3574665e61623c2b50e88e4fba55ac Mon Sep 17 00:00:00 2001 From: Lingzi Date: Mon, 14 Mar 2022 18:18:23 +0800 Subject: [PATCH 45/70] fix bug --- .../banner/components/add/add.component.html | 24 ++ .../components/add/add.component.spec.ts | 24 ++ .../banner}/components/add/add.component.ts | 132 +++------- .../banner}/components/add/add.less | 0 .../components/list/list.component.html | 62 +++++ .../components/list/list.component.less | 0 .../components/list/list.component.spec.ts | 24 ++ .../banner/components/list/list.component.ts | 237 +++++++++++++++++ .../banner}/components/list/list.less | 0 .../banner/services/banner.service.ts | 12 + .../routes/partner/partner-routing.module.ts | 21 +- src/app/routes/partner/partner.module.ts | 10 +- .../components/add/add.component.html | 0 .../components/add/add.component.spec.ts | 0 .../scrollimg/components/add/add.component.ts | 243 ++++++++++++++++++ .../partner/scrollimg/components/add/add.less | 119 +++++++++ .../components/list/list.component.html | 4 +- .../components/list/list.component.less | 1 + .../components/list/list.component.spec.ts | 0 .../components/list/list.component.ts | 0 .../scrollimg/components/list/list.less | 9 + .../services/scrollimg.service.ts | 0 .../components/freight/list/list.component.ts | 66 ++++- src/assets/mocks/menu-data.json | 6 +- 24 files changed, 882 insertions(+), 112 deletions(-) create mode 100644 src/app/routes/partner/knowledge/banner/components/add/add.component.html create mode 100644 src/app/routes/partner/knowledge/banner/components/add/add.component.spec.ts rename src/app/routes/partner/{ad => knowledge/banner}/components/add/add.component.ts (63%) rename src/app/routes/partner/{ad => knowledge/banner}/components/add/add.less (100%) create mode 100644 src/app/routes/partner/knowledge/banner/components/list/list.component.html rename src/app/routes/partner/{ad => knowledge/banner}/components/list/list.component.less (100%) create mode 100644 src/app/routes/partner/knowledge/banner/components/list/list.component.spec.ts create mode 100644 src/app/routes/partner/knowledge/banner/components/list/list.component.ts rename src/app/routes/partner/{ad => knowledge/banner}/components/list/list.less (100%) create mode 100644 src/app/routes/partner/knowledge/banner/services/banner.service.ts rename src/app/routes/partner/{ad => scrollimg}/components/add/add.component.html (100%) rename src/app/routes/partner/{ad => scrollimg}/components/add/add.component.spec.ts (100%) create mode 100644 src/app/routes/partner/scrollimg/components/add/add.component.ts create mode 100644 src/app/routes/partner/scrollimg/components/add/add.less rename src/app/routes/partner/{ad => scrollimg}/components/list/list.component.html (94%) create mode 100644 src/app/routes/partner/scrollimg/components/list/list.component.less rename src/app/routes/partner/{ad => scrollimg}/components/list/list.component.spec.ts (100%) rename src/app/routes/partner/{ad => scrollimg}/components/list/list.component.ts (100%) create mode 100644 src/app/routes/partner/scrollimg/components/list/list.less rename src/app/routes/partner/{ad => scrollimg}/services/scrollimg.service.ts (100%) diff --git a/src/app/routes/partner/knowledge/banner/components/add/add.component.html b/src/app/routes/partner/knowledge/banner/components/add/add.component.html new file mode 100644 index 00000000..6760c1a0 --- /dev/null +++ b/src/app/routes/partner/knowledge/banner/components/add/add.component.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/app/routes/partner/knowledge/banner/components/add/add.component.spec.ts b/src/app/routes/partner/knowledge/banner/components/add/add.component.spec.ts new file mode 100644 index 00000000..64562645 --- /dev/null +++ b/src/app/routes/partner/knowledge/banner/components/add/add.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { BannerComponentsAddComponent } from './add.component'; + +describe('BannerComponentsAddComponent', () => { + let component: BannerComponentsAddComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ BannerComponentsAddComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BannerComponentsAddComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/ad/components/add/add.component.ts b/src/app/routes/partner/knowledge/banner/components/add/add.component.ts similarity index 63% rename from src/app/routes/partner/ad/components/add/add.component.ts rename to src/app/routes/partner/knowledge/banner/components/add/add.component.ts index f719a83a..132e6bb2 100644 --- a/src/app/routes/partner/ad/components/add/add.component.ts +++ b/src/app/routes/partner/knowledge/banner/components/add/add.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; import { EAEnvironmentService } from '@shared'; import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; @@ -9,7 +9,7 @@ import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; import { NzUploadFile } from 'ng-zorro-antd/upload'; import { Observable, Observer, of } from 'rxjs'; -import { ScrollImgService } from '../../services/scrollimg.service'; +import { BannerService } from '../../services/banner.service'; import { apiConf } from '@conf/api.conf'; @Component({ @@ -17,7 +17,7 @@ import { apiConf } from '@conf/api.conf'; templateUrl: './add.component.html', styleUrls: ['./add.less'] }) -export class ScrollimgComponentsAddComponent implements OnInit { +export class BannerComponentsAddComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; record: any = {}; i: any; @@ -51,11 +51,9 @@ export class ScrollimgComponentsAddComponent implements OnInit { constructor( public msgSrv: NzMessageService, public http: _HttpClient, - public service: ScrollImgService, + public service: BannerService, private route: ActivatedRoute, private router: Router, - private modal: ModalHelper, - private modalSrv: NzModalService, private cdr: ChangeDetectorRef, private envSrv: EAEnvironmentService, ) { } @@ -76,25 +74,16 @@ export class ScrollimgComponentsAddComponent implements OnInit { properties: { name: { type: 'string', - title: '轮播图名称', + title: 'banner名称', maxLength: 10, ui: { showRequired: true, placeholder: '请不要超过10个字', } }, - style: { - type: 'string', - title: '轮播图', - ui: { - showRequired: true, - widget: 'custom', - placeholder: '请选择轮播图', - } - }, licensePhotoWatermark: { type: 'string', - title: '轮播图', + title: 'banner图', ui: { action: apiConf.fileUpload, accept: 'image/png,image/jpeg,image/jpg,image/gif', @@ -103,7 +92,7 @@ export class ScrollimgComponentsAddComponent implements OnInit { resReName: 'data.fullFileWatermarkPath', urlReName: 'data.fullFileWatermarkPath', widget: 'upload', - descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过4M', + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 700px * 286px)。', data: { appId: this.envSrv.env.appId, }, @@ -117,9 +106,9 @@ export class ScrollimgComponentsAddComponent implements OnInit { }, beforeUpload: (file: any, _fileList: any) => { return new Observable((observer: Observer) => { - const isLt4M = file.size / 1024 / 1024 < 4; + const isLt4M = file.size / 1024 / 1024 < 2; if (!isLt4M) { - this.service.msgSrv.warning('图片大小超过4M!'); + this.service.msgSrv.warning('图片大小超过2M!'); observer.complete(); return; } @@ -130,96 +119,43 @@ export class ScrollimgComponentsAddComponent implements OnInit { previewFile: (file: NzUploadFile) => of(file.url), }, }, - takeEffectType: { - type: 'string', - title: '生效类型', - ui: { - showRequired: true, - widget: 'custom', - }, - default: 1 - }, - mainTitle: { - type: 'string', - title: '主标题', - maxLength: 20, - ui: { - visibleIf: { style: [1, 2, 3, 4, 5] }, - placeholder: '请输入主标题,不超过20个字', - change: (id: any) => { - this.validFalg = !this.sf?.valid; - } - } - }, - withTitle: { - type: 'string', - title: '副标题', - maxLength: 20, - ui: { - visibleIf: { style: [1, 2, 3, 4, 5] }, - placeholder: '请输入主标题,不超过20个字', - } - }, sortId: { type: 'string', - title: '显示顺序', + title: '顺序', ui: { showRequired: true, - widget: 'select', + widget: '=', + placeholder: '请输入0~99,数字越大,排序越靠前', serverSearch: true, } as SFSelectWidgetSchema, + }, + linkType: { + type: 'string', + title: '跳转路径', + ui: { + widget: 'radio', + showRequired: true, + } as SFRadioWidgetSchema, enum: [ - { label: 1, value: '1' }, - { label: 2, value: '2' }, - { label: 3, value: '3' }, - { label: 4, value: '4' }, - { label: 5, value: '5' }, - { label: 6, value: '6' }, - { label: 7, value: '7' }, - { label: 8, value: '8' }, - { label: 9, value: '9' }, - { label: 10, value: '10' }, - ] + { label: '文章ID', value: 1 }, + { label: '分类ID', value: 2 }, + { label: '自编辑', value: 3 }, + ], }, - cooperationHotline: { + content: { type: 'string', - title: '合作热线', - maxLength: 13, + title: '内容', ui: { - showRequired: true, - placeholder: '请输入电话号码', - visibleIf: { style: [6] }, - validator: val => { - const reg = /((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/g; - let isValid: any; - isValid = reg.test(val); - if (!isValid) { - return [{ keyword: 'required', message: '格式不正确' }]; - } - return []; + widget: 'tinymce', + loadingTip: 'loading...', + config: { + height: 450 }, + visibleIf: { name5: (value: string) => value === '1' } }, }, - companyAddress: { - type: 'string', - title: '公司选址', - ui: { - widget: 'custom', - showRequired: true, - visibleIf: { style: [6] }, - }, - }, - advertisementContentDTOList: { - type: 'string', - title: '内容设置', - ui: { - widget: 'custom', - showRequired: true, - visibleIf: { style: [1, 2, 3, 4, 5] }, - }, - } }, - required: ['name', 'navigationId', 'style', 'takeEffectType', 'cooperationHotline', 'companyAddress', 'advertisementContentDTOList'], + required: [], }; if (this.queryParams.type === 'add'){ setTimeout(() => { @@ -302,8 +238,4 @@ export class ScrollimgComponentsAddComponent implements OnInit { handleCancel(): void { this.isVisible = false; } - outputPointAddress(data: any){ - this.sf.setValue('/companyAddress', data.address); - this.inputPoint = data.inputPoint; - } } diff --git a/src/app/routes/partner/ad/components/add/add.less b/src/app/routes/partner/knowledge/banner/components/add/add.less similarity index 100% rename from src/app/routes/partner/ad/components/add/add.less rename to src/app/routes/partner/knowledge/banner/components/add/add.less diff --git a/src/app/routes/partner/knowledge/banner/components/list/list.component.html b/src/app/routes/partner/knowledge/banner/components/list/list.component.html new file mode 100644 index 00000000..c8ac5ec4 --- /dev/null +++ b/src/app/routes/partner/knowledge/banner/components/list/list.component.html @@ -0,0 +1,62 @@ + + + + +
+ +
+ +
+ + + +
+ +
+
+ + + +
+
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + + +
diff --git a/src/app/routes/partner/ad/components/list/list.component.less b/src/app/routes/partner/knowledge/banner/components/list/list.component.less similarity index 100% rename from src/app/routes/partner/ad/components/list/list.component.less rename to src/app/routes/partner/knowledge/banner/components/list/list.component.less diff --git a/src/app/routes/partner/knowledge/banner/components/list/list.component.spec.ts b/src/app/routes/partner/knowledge/banner/components/list/list.component.spec.ts new file mode 100644 index 00000000..3bd8060c --- /dev/null +++ b/src/app/routes/partner/knowledge/banner/components/list/list.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { BannerComponentsListComponent } from './list.component'; + +describe('BannerComponentsListComponent', () => { + let component: BannerComponentsListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ BannerComponentsListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BannerComponentsListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/knowledge/banner/components/list/list.component.ts b/src/app/routes/partner/knowledge/banner/components/list/list.component.ts new file mode 100644 index 00000000..e1b86f66 --- /dev/null +++ b/src/app/routes/partner/knowledge/banner/components/list/list.component.ts @@ -0,0 +1,237 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { ModalHelper } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { BannerService } from '../../services/banner.service'; + +@Component({ + selector: 'app-banner-components-list', + templateUrl: './list.component.html', + styleUrls: ['./list.component.less'] +}) + +export class BannerComponentsListComponent implements OnInit { + schema: SFSchema = {}; + columns: STColumn[] = []; + ui: SFUISchema = {}; + appList: any[] = []; + _$expand = false; + selectApp = { + appName: '', + appId: '' + }; + + @ViewChild('st', { static: false }) st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + constructor(public service: BannerService, private modal: ModalHelper, private msg: NzMessageService, private router: Router, private modalSrv: NzModalService, private ar: ActivatedRoute) { } + + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + + /** + * 查询参数 + */ + get reqParams() { + const params = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + if (params.status === '') { + delete params.status; + } + if (params.style === '') { + delete params.style; + } + if (params.navigationId === '') { + delete params.navigationId; + } + return { ...params}; + } + + /** + * 选中行 + */ + get selectedRows() { + return this.st?.list.filter((item) => item.checked) || []; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + selectAppFun(item: any) { + this.selectApp = item; + this.st.load(1); + } + dataProcess(data: STData[]): STData[] { + return data.map((i, index) => { + i.showSortFlag = false; + return i; + }); + } + initSF() { + this.schema = { + properties: { + _$expand: { + type: 'boolean', + ui: { + hidden: true, + }, + }, + name: { + type: 'string', + title: 'banner名称', + maxLength: 10, + ui: { + widget: '', + placeholder: '请输入', + } + }, + status: { + type: 'string', + title: '状态', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + } as SFSelectWidgetSchema, + enum: [ + { label: '全部', value: 1 }, + { label: '正常', value: 2 }, + { label: '禁用', value: 3 } + ] + }, + }, + }; + this.ui = { + '*': { + spanLabelFixed: 110, + grid: { span: 8 }, + }, + }; + } + + initST() { + this.columns = [ + { + title: 'banner名称', // 位:px + index: 'name', + className: 'text-center' + }, + { + title: 'banner', + index: 'navigationName', + className: 'text-center' + }, + { + title: '排序', // 位 px + index: 'sortId', + className: 'text-center' + }, + { + title: '状态', // 位 px + index: 'style', + className: 'text-center', + type: 'enum', + enum: { + 1: '正常', + 2: '禁用', + } + }, + { + title: '最后修改时间', // 位 px + index: 'createTime', + className: 'text-center' + }, + { + title: '操作', + fixed: 'right', + className: 'text-center', + width: 280, + buttons: [ + { + text: '修改', + click: (item) => { + this.router.navigate(['../detail'], { queryParams: { id: item.id, type: 'edit' }, relativeTo: this.ar }); + } + }, + { + text: '禁用', + pop: { + title: `确定禁用此banner图吗??`, + okType: 'danger', + icon: 'alert', + }, + click: (item) => { + this.changeStatus(item.id); + }, + iif: (item) => item.status === 1 + }, + { + text: '启用', + pop: { + title: `确定启用此banner图吗?`, + okType: 'danger', + icon: 'success', + }, + click: (item) => { + this.changeStatus(item); + }, + iif: (item) => item.status === 2 + }, + ], + }, + ]; + } + changeStatus(item: any) { + const params = { + status, + idList: [item.id] + }; + // this.service.request(this.service.$api_openOrClose, params).subscribe(res => { + // if (res) { + // this.st.reload(); + // } + // }); + } + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 新增单个实例 + */ + add() { + this.router.navigate(['../banner/detail'], { queryParams: { id: 0, type: 'add' }, relativeTo: this.ar }); + } + + /** + * 删除单个实例 + */ + del(item: any) { + const ids = []; + ids.push(item.id); + this.service.request(this.service.$api_del_many, ids).subscribe(res => { + if (res) { + this.service.msgSrv.success('删除成功'); + this.st.reload(); + } + }); + } +} diff --git a/src/app/routes/partner/ad/components/list/list.less b/src/app/routes/partner/knowledge/banner/components/list/list.less similarity index 100% rename from src/app/routes/partner/ad/components/list/list.less rename to src/app/routes/partner/knowledge/banner/components/list/list.less diff --git a/src/app/routes/partner/knowledge/banner/services/banner.service.ts b/src/app/routes/partner/knowledge/banner/services/banner.service.ts new file mode 100644 index 00000000..6710ef04 --- /dev/null +++ b/src/app/routes/partner/knowledge/banner/services/banner.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class BannerService 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 2c25d6d6..6f0e0cc6 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -38,10 +38,13 @@ import { AddPersonalPartnerComponent } from './partner-list/components/add-perso import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component'; 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'; +import { ScrollImgComponentsListComponent } from './scrollimg/components/list/list.component'; +import { BannerComponentsListComponent } from './knowledge/banner/components/list/list.component'; +import { ScrollimgComponentsAddComponent } from './scrollimg/components/add/add.component'; +import { BannerComponentsAddComponent } from './knowledge/banner/components/add/add.component'; const routes: Routes = [ { @@ -122,6 +125,14 @@ const routes: Routes = [ { path: 'partner-detail', component: ParterClaimAuditListPartnerDetailComponent } ] }, + { + path: 'scroll-img', + children: [ + { path: '', component: ScrollImgComponentsListComponent }, + { path: 'list', component: ScrollImgComponentsListComponent }, + { path: 'detail', component: ScrollimgComponentsAddComponent }, + ] + }, { path: 'recorded', children: [ @@ -133,9 +144,11 @@ const routes: Routes = [ path: 'knowledge', children: [ { path: 'classification', component: PartnerKnowledgeClassificationListComponent }, - { path: 'article-management-list', component: ParterArticleManagementListComponent}, - { path: 'article-management-add', component: ParterArticleManagementEditComponent}, - { path: 'article-management-edit', component: ParterArticleManagementEditComponent}, + { path: 'article-management-list', component: ParterArticleManagementListComponent }, + { path: 'article-management-add', component: ParterArticleManagementEditComponent }, + { path: 'article-management-edit', component: ParterArticleManagementEditComponent }, + { path: 'banner', component: BannerComponentsListComponent}, + { path: 'banner/detail', component: BannerComponentsAddComponent }, ] }, ]; diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index aee0c691..3ce63eef 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -50,12 +50,14 @@ import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-managem import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component'; import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; 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'; +import { ScrollimgComponentsAddComponent } from './scrollimg/components/add/add.component'; +import { ScrollImgComponentsListComponent } from './scrollimg/components/list/list.component'; +import { BannerComponentsListComponent } from './knowledge/banner/components/list/list.component'; +import { BannerComponentsAddComponent } from './knowledge/banner/components/add/add.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -101,7 +103,9 @@ const COMPONENTS: any[] = [ ParterArticleManagementEditComponent, ParterArticleManagementListComponent, PartnerKnowledgeClassificationListComponent, - PartnerEditComponent + PartnerEditComponent, + BannerComponentsListComponent, + BannerComponentsAddComponent ]; @NgModule({ diff --git a/src/app/routes/partner/ad/components/add/add.component.html b/src/app/routes/partner/scrollimg/components/add/add.component.html similarity index 100% rename from src/app/routes/partner/ad/components/add/add.component.html rename to src/app/routes/partner/scrollimg/components/add/add.component.html diff --git a/src/app/routes/partner/ad/components/add/add.component.spec.ts b/src/app/routes/partner/scrollimg/components/add/add.component.spec.ts similarity index 100% rename from src/app/routes/partner/ad/components/add/add.component.spec.ts rename to src/app/routes/partner/scrollimg/components/add/add.component.spec.ts diff --git a/src/app/routes/partner/scrollimg/components/add/add.component.ts b/src/app/routes/partner/scrollimg/components/add/add.component.ts new file mode 100644 index 00000000..e8345d9e --- /dev/null +++ b/src/app/routes/partner/scrollimg/components/add/add.component.ts @@ -0,0 +1,243 @@ +import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { EAEnvironmentService } from '@shared'; +import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; +import format from 'date-fns/format'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzUploadFile } from 'ng-zorro-antd/upload'; +import { Observable, Observer, of } from 'rxjs'; +import { apiConf } from '@conf/api.conf'; +import { ScrollImgService } from '../../services/scrollimg.service'; + +@Component({ + selector: 'app-ad-components-add', + templateUrl: './add.component.html', + styleUrls: ['./add.less'] +}) +export class ScrollimgComponentsAddComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + record: any = {}; + i: any; + schema: SFSchema = {}; + contentListData = []; + queryParams: any = {}; + oldTakeEffectTime = ''; + maxSort = 0; + isVisible = false; + validFalg = true; + detailData: any = { + advertisementContentDTOList: [] + }; + changeTimeFlag = false; + currentIndex = 0; + addFlag = true; + addId = 1; + inputPoint: any = { + lng: 0, + lat: 0 + }; + today = new Date(); + navData: any = []; + navigationName = ''; + ui: SFUISchema = { + '*': { + spanLabelFixed: 200, + grid: { span: 24 }, + }, + }; + constructor( + public msgSrv: NzMessageService, + public http: _HttpClient, + public service: ScrollImgService, + private route: ActivatedRoute, + private router: Router, + private envSrv: EAEnvironmentService, + ) { } + + + ngOnInit(): void { + this.queryParams = this.route.snapshot.queryParams; + if (this.queryParams.type !== 'add') { + this.initDetailData(); + } + this.initSF(); + } + initDetailData() { + + } + initSF() { + this.schema = { + properties: { + name: { + type: 'string', + title: '轮播图名称', + maxLength: 10, + ui: { + showRequired: true, + placeholder: '请不要超过10个字', + } + }, + licensePhotoWatermark: { + type: 'string', + title: '轮播图', + ui: { + action: apiConf.fileUpload, + accept: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + descriptionI18n: '图片支持JPG、PNG格式,文件小于2M(建议尺寸 702px * 280px)', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + change: (args: any) => { + if (args.type === 'success') { + this.detailData.enterpriseBaseDTO.licensePhoto = args.file.response.data.fullFilePath + } + }, + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt4M = file.size / 1024 / 1024 < 2; + if (!isLt4M) { + this.service.msgSrv.warning('图片大小超过2M!'); + observer.complete(); + return; + } + observer.next(isLt4M); + observer.complete(); + }); + }, + previewFile: (file: NzUploadFile) => of(file.url), + }, + }, + linkType: { + type: 'string', + title: '可见范围', + ui: { + widget: 'radio', + showRequired: true, + } as SFRadioWidgetSchema, + enum: [ + { label: '全部可见', value: 1 }, + { label: '合伙人可见', value: 2 }, + { label: '销售渠道可见', value: 3 }, + ], + }, + sortId: { + type: 'string', + title: '顺序', + ui: { + showRequired: true, + widget: '=', + placeholder: '请输入0~99,数字越大,排序越靠前', + serverSearch: true, + } as SFSelectWidgetSchema, + }, + content: { + type: 'string', + title: '内容', + ui: { + widget: 'tinymce', + loadingTip: 'loading...', + config: { + height: 450 + }, + visibleIf: { name5: (value: string) => value === '1' } + }, + }, + }, + required: [], + }; + if (this.queryParams.type === 'add') { + setTimeout(() => { + this.sf.setValue('/takeEffectType', 1); + this.sf.setValue('/style', 1); + }, 500); + } + } + get reqParams() { + return {}; + } + disabledDate = (current: Date): boolean => { + // Can not select days before today and today + return differenceInCalendarDays(current, this.today) < 0; + } + changeTime() { + this.changeTimeFlag = true; + } + + + checkSort() { + const params: any = { + navigationId: this.sf?.value.navigationId, + sortId: this.sf?.value.sortId, + takeEffectType: this.sf?.value.takeEffectType, + }; + if (this.queryParams.id !== '0') { + params.advertisementId = this.queryParams.id; + } + if (this.sf.value.takeEffectType === 2) { + if (this.changeTimeFlag) { + params.takeEffectTime = format(this.detailData.takeEffectTime, 'yyyy-MM-dd HH:mm'); + } else { + params.takeEffectTime = this.detailData.takeEffectTime; + } + } + + } + save() { + const params: any = { + ...this.sf?.value, + latitude: this.inputPoint.lat, + longitude: this.inputPoint.lng, + id: this.queryParams.id + }; + this.detailData.advertisementContentDTOList.forEach((item: any) => { + delete item.addId; + }); + if (this.queryParams.type === 'add') { + delete params.id; + } + if (this.sf.value.takeEffectType === 2) { + if (this.changeTimeFlag) { + params.takeEffectTime = format(this.detailData.takeEffectTime, 'yyyy-MM-dd HH:mm'); + } else { + params.takeEffectTime = this.detailData.takeEffectTime; + } + } else { + delete params.takeEffectTime; + } + this.service.request(this.service.$api_add_one, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('保存成功'); + this.router.navigate(['../list'], { relativeTo: this.route }); + } + }); + } + + goBack() { + window.history.go(-1); + } + gotoMap() { + this.isVisible = true; + } + + handleOk(): void { + this.isVisible = false; + } + + handleCancel(): void { + this.isVisible = false; + } + outputPointAddress(data: any) { + this.sf.setValue('/companyAddress', data.address); + this.inputPoint = data.inputPoint; + } +} diff --git a/src/app/routes/partner/scrollimg/components/add/add.less b/src/app/routes/partner/scrollimg/components/add/add.less new file mode 100644 index 00000000..0a6adacb --- /dev/null +++ b/src/app/routes/partner/scrollimg/components/add/add.less @@ -0,0 +1,119 @@ +:host { + .styleBox { + display: flex; + align-items: flex-end; + margin: 10px 0 0 0; + } + .imgBox { + position: relative; + width: 200px; + padding: 6px 0; + text-align: center; + border: solid 1px #eee; + .leftBox, + .rightBox { + position: absolute; + top: 50%; + transform: translate(0, -50%); + } + img { + width: 170px; + height: 40px; + } + .leftBox { + left: 3px; + } + .rightBox { + right: 3px; + } + } + .imgBox_two { + width: 200px; + padding: 6px; + text-align: center; + border: solid 1px #eee; + img { + width: 100%; + height: 40px; + } + } + .imgBox_three { + width: 200px; + padding: 6px 0; + text-align: center; + border: solid 1px #eee; + img { + width: 25%; + height: 40px; + margin: 0 6% 0 0; + &:first-child { + margin: 0 6%; + } + } + } + .imgBox_four { + width: 200px; + padding: 6px 0; + text-align: center; + border: solid 1px #eee; + img { + width: 22%; + height: 40px; + margin: 0 2% 0 0; + &:first-child { + margin: 0 2%; + } + } + } + .imgBox_one { + width: 60px; + padding: 6px; + text-align: center; + border: solid 1px #eee; + img { + width: 100%; + height: 40px; + } + } + .imgBox_info { + width: 200px; + padding: 6px; + overflow: hidden; + border: solid 1px #eee; + .title { + width: 100%; + line-height: 30px; + text-align: center; + } + .infoBox { + .name { + line-height: 28px; + } + .map { + width: 100%; + text-align: center; + img { + width: 90%; + } + } + } + } + .hint { + margin: 0 0 0 10px; + color: #f00; + } + .addBtn { + margin: 0 0 10px 0; + } + } + .overflowText { + display: -webkit-box; + max-width: 200px; + overflow: hidden; + text-align: left; + text-overflow: -o-ellipsis-lastline; + text-overflow: ellipsis; + -webkit-line-clamp: 1; + line-clamp: 1; + -webkit-box-orient: vertical; + } \ No newline at end of file diff --git a/src/app/routes/partner/ad/components/list/list.component.html b/src/app/routes/partner/scrollimg/components/list/list.component.html similarity index 94% rename from src/app/routes/partner/ad/components/list/list.component.html rename to src/app/routes/partner/scrollimg/components/list/list.component.html index caedd311..216788b4 100644 --- a/src/app/routes/partner/ad/components/list/list.component.html +++ b/src/app/routes/partner/scrollimg/components/list/list.component.html @@ -5,7 +5,7 @@
- +
@@ -14,7 +14,7 @@
- + + +
\ No newline at end of file diff --git a/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.less b/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.less new file mode 100644 index 00000000..e3f1fc3f --- /dev/null +++ b/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.less @@ -0,0 +1,123 @@ +.sfBox { + position: relative; + .example { + position: absolute; + top: 215px; + right: 265px; + color: #1890ff; + cursor: pointer; + .popBox { + position: absolute; + top: -170px; + left: -125px; + width: 300px; + padding: 20px; + text-align: center; + background: #fff; + border: solid 1px #eee; + border-radius: 6px; + box-shadow: 0 1px 5px 1px #ececec; + &::before { + position: absolute; + bottom: -5px; + left: 50%; + width: 10px; + height: 10px; + margin-left: -5px; + background: #fff; + box-shadow: 0 1px 5px 1px #ececec; + transform: rotate(45deg); + content: ''; + } + &::after { + position: absolute; + bottom: 0; + left: 0; + z-index: 10; + width: 100%; + height: 10px; + background: #fff; + content: ''; + } + img { + max-width: 100%; + max-height: 200px; + } + } + } + .positionSet{ + top: 356px; + right: 235px; + } + .positionSet01{ + top: 500px; + right: 200px; + } + .positionSet02{ + top: 664px; + right: 265px; + } + .positionSet03{ + top: 808px; + right: 205px; + + } +} +.exaA{ + position: absolute; + top: 0; + left: 300px +} +.pr { + position: relative; +} + +.pa { + position: absolute; + top: 35px; + left: 150px; +} + +.tips { + display: flex; + margin-bottom: 0; + color: #333; + + dt { + width: 150px; + } + + dd { + width: 190px; + margin-bottom: 0; + text-align: center; + } +} +.drivercard{ + position: absolute; + top: 0; + left: 330px; + border: solid 1px #ebf0fb; +} +.jopcard{ + position: absolute; + top: 1356px; + left: 330px; + border: solid 1px #ebf0fb; +} +.agreement{ + position: absolute; + top: 425px; + left: 330px; + border: solid 1px #ebf0fb; +} +:host{ + ::ng-deep { + .ant-input-borderless{ + padding: 0; + padding-top: 4px; + color: black; + resize:none; + } + } + } \ No newline at end of file diff --git a/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.spec.ts b/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.spec.ts new file mode 100644 index 00000000..8be64dc5 --- /dev/null +++ b/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { CarCarauthComponent } from './carauth.component'; + +describe('CarCarauthComponent', () => { + let component: CarCarauthComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ CarCarauthComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CarCarauthComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.ts b/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.ts new file mode 100644 index 00000000..a43173ea --- /dev/null +++ b/src/app/routes/usercenter/components/freight/list/carauth/carauth.component.ts @@ -0,0 +1,654 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { apiConf } from '@conf/api.conf'; +import { cacheConf } from '@conf/cache.conf'; +import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { EACacheService, EAEnvironmentService } from '@shared'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { NzUploadFile } from 'ng-zorro-antd/upload'; +import { Observable, Observer, of } from 'rxjs'; +import { ListService } from '../../services/list.service'; + +@Component({ + selector: 'app-car-carauth', + templateUrl: './carauth.component.html', + styleUrls: ['./carauth.component.less'] +}) +export class CarCarauthComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + record: any = {}; + i: any; + ui: SFUISchema = {}; + schema: SFSchema = {}; + showCardFlag = false; + showJopFlag = false; + companyData: any = {}; + detailData: any = {}; + carNo = '' + checked = false + + constructor( + private modal: NzModalRef, + public service: ListService, + private envSrv: EAEnvironmentService, + private eaCacheSrv: EACacheService, + ) { } + + ngOnInit(): void { + this.initData() + this.initSF() + } + initData() { + if(this.i.id){ + this.companyData = this.eaCacheSrv.get(cacheConf.env) + const params = { + id: this.i.id + } + this.service.request(this.service.$api_getShipperCar, params).subscribe(res => { + this.detailData = res + this.detailData.isSelf = res.isSelf ? 1 : 0 + this.detailData.isTrailer = res.isTrailer ? 1 : 0 + this.detailData.carFrontPhotoWatermark = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: this.detailData.carFrontPhotoWatermark, + response:this.detailData.carFrontPhotoWatermark, + }, + ]; + this.detailData.carProtocalWatermark = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: this.detailData.carProtocalWatermark, + response: this.detailData.carProtocalWatermark, + }, + ]; + this.detailData.certificatePhotoFrontWatermark = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: this.detailData.certificatePhotoFrontWatermark, + response: this.detailData.certificatePhotoFrontWatermark, + }, + ]; + this.detailData.certificatePhotoBackWatermark = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: this.detailData.certificatePhotoBackWatermark, + response: this.detailData.certificatePhotoBackWatermark, + }, + ]; + if(this.detailData.roadTransportPhotoWatermark !== null) { + this.detailData.roadTransportPhotoWatermark = [ + { + uid: -1, + name: 'LOGO', + status: 'done', + url: this.detailData.roadTransportPhotoWatermark, + response: this.detailData.roadTransportPhotoWatermark, + }, + ]; + } + + }) + } + } + initSF() { + this.schema = { + properties: { + carFrontPhotoWatermark: { + type: 'string', + title: '车头照照片', + ui: { + action: apiConf.fileUpload, + accept: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + descriptionI18n: '请上传车头照照片,支持JPG、PNG格式,文件小于5M。', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + change: (args: any) => { + if (args.type === 'success') { + this.detailData.carFrontPhoto = args.file.response.data.fullFilePath + } + }, + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 5; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + }, + previewFile: (file: NzUploadFile) => of(file.url), + }, + }, + carNo: { + title: '车牌号', + type: 'string', + maxLength: 9, + ui: { + placeholder: '请输入', + }, + }, + carNoColor: { + title: '车牌颜色', + type: 'string', + ui: { + widget: 'dict-select', + params: { dictKey: 'car:color' }, + placeholder: '请选择车牌颜色', + containsAllLabel:false, + } as SFSelectWidgetSchema, + }, + carModel: { + title: '车型', + type: 'string', + ui: { + widget: 'dict-select', + params: { dictKey: 'car:model' }, + placeholder: '请选择车型', + containsAllLabel:false, + } as SFSelectWidgetSchema, + }, + carLength: { + title: '车长', + type: 'string', + ui: { + widget: 'dict-select', + params: { dictKey: 'car:length' }, + placeholder: '请选择车长', + containsAllLabel:false, + } as SFSelectWidgetSchema, + }, + carLoad: { + title: '载重', + type: 'string', + ui: { + placeholder: '请输入', + change: (val: any) =>{ + const value = val.replace(/\D/g,'') + this.sf.setValue('/carLoad', value) + }, + } + }, + isSelf: { + title: '是否挂靠', + type: 'string', + enum: [ + { label: '否', value: 0 }, + { label: '是', value: 1 }, + ], + ui: { + widget: 'select', + placeholder: '请选择', + } + }, + isTrailer: { + title: '是否为挂车', + type: 'string', + enum: [ + { label: '否', value: 0 }, + { label: '是', value: 1 }, + ], + ui: { + widget: 'select', + placeholder: '请选择', + } + }, + carProtocalWatermark: { + type: 'string', + title: '挂靠协议', + ui: { + action: apiConf.fileUpload, + accept: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + descriptionI18n: '请上传挂靠协议,支持JPG、PNG格式,文件小于5M。', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + change: (args: any) => { + if (args.type === 'success') { + this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath + } + }, + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 5; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + }, + previewFile: (file: NzUploadFile) => of(file.url), + }, + }, + titleA: { + title: '行驶证信息(必填)', + type: 'string', + ui: { + widget: 'textarea', + borderless:true, + }, + default: '照片上传后会自动识别文字并填充下列内容栏', + }, + tipsA: { + title: '', + type: 'string', + ui: { + widget: 'custom', + offsetControl: 6, + }, + }, + certificatePhotoFrontWatermark: { + type: 'string', + title: '行驶证首页照片', + ui: { + action: apiConf.fileUpload, + accept: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + descriptionI18n: '请上传行驶证首页照片,支持JPG、PNG格式,文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清,都不会通过审核。', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + change: (args: any) => { + if (args.type === 'success') { + this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath + this.checkCarCard(args.file.response.data.fullFilePath, 'front'); + } + }, + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 5; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + }, + }, + }, + tipsB: { + title: '', + type: 'string', + ui: { + widget: 'custom', + offsetControl: 6, + }, + }, + certificatePhotoBackWatermark: { + type: 'string', + title: '行驶证副页照片', + ui: { + action: apiConf.fileUpload, + accept: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + descriptionI18n: '请上传行驶证副业照片,支持JPG、PNG格式,文件小于5M。', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + change: (args: any) => { + if (args.type === 'success') { + this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath + this.checkCarCard(args.file.response.data.fullFilePath, 'back'); + } + }, + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 5; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + }, + previewFile: (file: NzUploadFile) => of(file.url), + }, + }, + driverLicenseRegisterTime: { + title: '行驶证注册日期', + type: 'string', + format: 'date', + ui: { + placeholder: '请输入', + }, + }, + driverLicenseGetTime: { + title: '行驶证发证日期', + type: 'string', + format: 'date', + ui: { + placeholder: '请输入', + }, + }, + driverLicenseEndTime: { + title: '行驶证到期日期', + type: 'string', + format: 'date', + maxLength: 30, + ui: { + placeholder: '请输入', + }, + }, + driverLicenseSigningOrg: { + title: '行驶证签发机关', + type: 'string', + maxLength: 30, + ui: { + placeholder: '请输入', + }, + }, + carDistinguishCode: { + title: '车辆识别代码', + type: 'string', + maxLength: 30, + ui: { + placeholder: '请输入', + }, + }, + useNature: { + title: '使用性质', + type: 'string', + maxLength: 30, + enum: [ + {label: '非营运', value: 0}, + {label: '营运', value: 1}, + ], + ui: { + widget: 'select', + placeholder: '请选择', + }, + }, + curbWeight: { + title: '整备质量', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + carOwner: { + title: '所有人', + type: 'string', + maxLength: 30, + ui: { + placeholder: '请输入', + }, + }, + titleB: { + title: '道运证(选填)', + type: 'string', + ui: { + widget: 'text', + }, + default: '照片上传后会自动识别文字并填充下列内容栏', + }, + roadTransportPhotoWatermark: { + type: 'string', + title: '道运证照片', + ui: { + action: apiConf.fileUpload, + accept: 'image/png,image/jpeg,image/jpg,image/gif', + limit: 1, + limitFileCount: 1, + resReName: 'data.fullFileWatermarkPath', + urlReName: 'data.fullFileWatermarkPath', + widget: 'upload', + descriptionI18n: '请上传道运证照片,支持JPG、PNG格式,文件小于5M。蓝牌绿牌车辆,可不用传道运证', + data: { + appId: this.envSrv.env.appId, + }, + name: 'multipartFile', + multiple: false, + listType: 'picture-card', + change: (args: any) => { + if (args.type === 'success') { + this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath + this.checkTransCard(args.file.response.data.fullFilePath); + } else { + this.detailData.roadTransportPhoto = '' + } + }, + beforeUpload: (file: any, _fileList: any) => { + return new Observable((observer: Observer) => { + const isLt2M = file.size / 1024 / 1024 < 5; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过5M!'); + observer.complete(); + return; + } + observer.next(isLt2M); + observer.complete(); + }); + }, + previewFile: (file: NzUploadFile) => of(file.url), + }, + }, + roadTransportNo: { + title: '道运证号码', + type: 'string', + maxLength: 30, + ui: { + // widget: this.detailData.commitFlag !== 0 ? 'text' : '', + placeholder: '请输入', + }, + }, + roadTransportLicenceNo: { + title: '经营许可证号', + type: 'string', + maxLength: 30, + ui: { + // widget: this.detailData.commitFlag !== 0 ? 'text' : '', + placeholder: '请输入', + }, + }, + roadTransportStartTime: { + title: '发证日期', + type: 'string', + format: 'date', + ui: { + placeholder: '请输入', + }, + }, + roadTransportEndTime: { + title: '有效期至', + type: 'string', + format: 'date', + ui: { + placeholder: '请输入', + }, + }, + remarks: { + title: '备注', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + }, + required: [ + 'carFrontPhotoWatermark', + 'carNo', + 'carNoColor', + 'carModel', + 'carLength', + 'carLoad', + 'isSelf', + 'isTrailer', + 'certificatePhotoFrontWatermark', + 'certificatePhotoBackWatermark', + 'driverLicenseRegisterTime', + 'driverLicenseGetTime', + 'driverLicenseEndTime', + 'driverLicenseSigningOrg', + 'carDistinguishCode', + 'useNature', + 'carOwner' + ], + }; + + this.ui = { + '*': { + spanLabelFixed: 180, + grid: { span: 18 }, + width: 600, + }, + $title1: { + spanLabelFixed: 0, + }, + $title2: { + spanLabelFixed: 0, + }, + $title3: { + spanLabelFixed: 0, + }, + $enterpriseRegistrationTime: { + width: 680, + }, + $operatingEndTime: { + grid: { span: 9 }, + }, + $dateType: { + grid: { span: 4 }, + }, + $validEndTime: { + grid: { span: 9 }, + }, + $dateType01: { + grid: { span: 4 }, + }, + $registrationCapital: { + grid: { span: 12 }, + }, + $unit: { + spanLabelFixed: 20, + grid: { span: 3 }, + }, +}; + } +// 道路运输证识别 +checkTransCard(imgurl: any) { + const params = { + transportationLicenseUrl: imgurl, + }; + this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe((res) => { + if (res) { + this.sf.setValue('/roadTransportNo', res.number); + this.sf.setValue('/roadTransportLicenceNo', res.businessCertificate); + this.sf.setValue('/roadTransportStartTime', res.issueDate); + if(this.carNo === '') { + this.carNo = res.number + } else if(this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) { + this.service.msgSrv.warning('请上传同一认证车辆的相关证件') + } + } + }); +} +// 行驶证识别 +checkCarCard(imgurl: any, side: any) { + const params = { + vehicleLicenseUrl: imgurl, + side, + }; + this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe((res) => { + if (res) { + if (side === 'front') { // 正面 + this.sf.setValue('/driverLicenseRegisterTime', res.registerDate); + this.sf.setValue('/carNo', res.number); + this.sf.setValue('/driverLicenseGetTime', res.issueDate); + this.sf.setValue('/driverLicenseSigningOrg', res.issuingAuthority); + this.sf.setValue('/carDistinguishCode', res.vin); + this.sf.setValue('/carOwner', res.name); + this.sf.setValue('/useNature', res.useCharacter === '非营运' ? 0 : 1 ); + } else { + this.sf.setValue('/curbWeight', res.unladenMass); + this.sf.setValue('/remarks', res.remarks); + } + if(this.carNo === '') { + this.carNo = res.number + } else if(this.carNo && this.carNo !== res.number) { + this.service.msgSrv.warning('请上传同一认证车辆的相关证件') + } + } + }); +} + +close(): void { + this.modal.close(true) +} +showExample() { + this.showCardFlag = !this.showCardFlag +} +showJopExample() { + this.showJopFlag = !this.showJopFlag +} +submitForm(){ + const params:any = { + appUserId: this.i.appUserId, + ...this.sf.value, + bindType: this.i.bindType + }; + params.carFrontPhoto = this.detailData.carFrontPhoto + params.carProtocal = this.detailData.carProtocal + params.certificatePhotoFront = this.detailData.certificatePhotoFront + params.certificatePhotoBack = this.detailData.certificatePhotoBack + params.roadTransportPhoto = this.detailData.roadTransportPhoto + delete params.titleA + delete params.titleB + this.checked = true + this.service.request(this.service.$api_updateAssistCertification, params).subscribe(res => { + this.checked = false + if(res){ + this.service.msgSrv.success('添加成功') + this.modal.close(true) + } + }) +} +} From 6ccb5ced18b477c9f2fe9df1a0fa92f1a30614ac Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Tue, 15 Mar 2022 17:02:13 +0800 Subject: [PATCH 47/70] e --- src/app/core/startup/startup.service.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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); } From 3539bd2a079e47e14a792aec1af4f90673ba9b30 Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Tue, 15 Mar 2022 17:32:24 +0800 Subject: [PATCH 48/70] edit --- src/app/global-config.module.ts | 9 ++- .../dashboard/dashboard.component.html | 13 ++++ .../dashboard/dashboard.component.less | 0 .../dashboard/dashboard.component.ts | 66 +++++++++++++++++++ .../regulatory-data-routing.module.ts | 12 ++++ .../regulatory-data/regulatory-data.module.ts | 14 ++++ .../services/regulatory-data.service.ts | 9 +++ src/app/routes/routes-routing.module.ts | 4 +- src/app/shared/index.ts | 1 + src/app/shared/shared-g2.module.ts | 6 ++ src/assets/mocks/menu-data.json | 10 +++ 11 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 src/app/routes/regulatory-data/components/dashboard/dashboard.component.html create mode 100644 src/app/routes/regulatory-data/components/dashboard/dashboard.component.less create mode 100644 src/app/routes/regulatory-data/components/dashboard/dashboard.component.ts create mode 100644 src/app/routes/regulatory-data/regulatory-data-routing.module.ts create mode 100644 src/app/routes/regulatory-data/regulatory-data.module.ts create mode 100644 src/app/routes/regulatory-data/services/regulatory-data.service.ts create mode 100644 src/app/shared/shared-g2.module.ts 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/regulatory-data/components/dashboard/dashboard.component.html b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.html new file mode 100644 index 00000000..06139f88 --- /dev/null +++ b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.html @@ -0,0 +1,13 @@ + + diff --git a/src/app/routes/regulatory-data/components/dashboard/dashboard.component.less b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/routes/regulatory-data/components/dashboard/dashboard.component.ts b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.ts new file mode 100644 index 00000000..d895eedc --- /dev/null +++ b/src/app/routes/regulatory-data/components/dashboard/dashboard.component.ts @@ -0,0 +1,66 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { G2PieClickItem, G2PieComponent, G2PieData } from '@delon/chart/pie'; +import { NzMessageService } from 'ng-zorro-antd/message'; + +@Component({ + selector: 'app-dashboard', + templateUrl: './dashboard.component.html', + styleUrls: ['./dashboard.component.less'] +}) +export class DashboardComponent implements OnInit { + @ViewChild('pie', { static: false }) readonly pie!: G2PieComponent; + salesPieData: G2PieData[] = []; + total = ''; + + constructor(private msg: NzMessageService) { + this.refresh(); + } + ngOnInit(): void { + throw new Error('Method not implemented.'); + } + + refresh(): void { + const rv = (min: number = 0, max: number = 5000) => Math.floor(Math.random() * (max - min + 1) + min); + this.salesPieData = [ + { + x: '家用电器', + y: rv() + }, + { + x: '食用酒水', + y: rv() + }, + { + x: '个护健康', + y: rv() + }, + { + x: '服饰箱包', + y: rv() + }, + { + x: '母婴产品', + y: rv() + } + ]; + if (Math.random() > 0.5) { + this.salesPieData.push({ + x: '其他', + y: rv() + }); + } + this.total = `¥ ${this.salesPieData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`; + if (this.pie) { + // 等待组件渲染 + setTimeout(() => this.pie.changeData()); + } + } + + format(val: number): string { + return `¥ ${val.toFixed(2)}`; + } + + handleClick(data: G2PieClickItem): void { + this.msg.info(`${data.item.x} - ${data.item.y}`); + } +} diff --git a/src/app/routes/regulatory-data/regulatory-data-routing.module.ts b/src/app/routes/regulatory-data/regulatory-data-routing.module.ts new file mode 100644 index 00000000..bb68bd97 --- /dev/null +++ b/src/app/routes/regulatory-data/regulatory-data-routing.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; + +import { DashboardComponent } from './components/dashboard/dashboard.component'; + +const routes: Routes = [{ path: 'dashboard', component: DashboardComponent }]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class RegulatoryDataRoutingModule {} diff --git a/src/app/routes/regulatory-data/regulatory-data.module.ts b/src/app/routes/regulatory-data/regulatory-data.module.ts new file mode 100644 index 00000000..c76d3521 --- /dev/null +++ b/src/app/routes/regulatory-data/regulatory-data.module.ts @@ -0,0 +1,14 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { SharedModule, SHARED_G2_MODULES } from '@shared'; + +import { DashboardComponent } from './components/dashboard/dashboard.component'; +import { RegulatoryDataRoutingModule } from './regulatory-data-routing.module'; + +const COMPONENTS: any = [DashboardComponent]; +const NOTROUTECOMPONENTS: any = []; +@NgModule({ + declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], + imports: [CommonModule, RegulatoryDataRoutingModule, SharedModule, SHARED_G2_MODULES] +}) +export class RegulatoryDataModule {} diff --git a/src/app/routes/regulatory-data/services/regulatory-data.service.ts b/src/app/routes/regulatory-data/services/regulatory-data.service.ts new file mode 100644 index 00000000..7206840f --- /dev/null +++ b/src/app/routes/regulatory-data/services/regulatory-data.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class RegulatoryDataService { + + constructor() { } +} diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts index 68b60fe7..712e39ec 100644 --- a/src/app/routes/routes-routing.module.ts +++ b/src/app/routes/routes-routing.module.ts @@ -15,6 +15,7 @@ import { RouterModule, Routes } from '@angular/router'; import { LayoutProComponent } from '@brand'; import { EATokenGuard } from '@core'; import { environment } from '@env/environment'; + import { AuthGuard } from '../core/guards/auth.guard'; // dashboard pages @@ -68,6 +69,7 @@ const routes: Routes = [ }, { path: 'menu-management', loadChildren: () => import('./menu-manager/menu-manager.module').then(m => m.MenuManagerModule) }, { path: 'partner', loadChildren: () => import('./partner/partner.module').then(m => m.PartnerModule) }, + { path: 'regulatory-data', loadChildren: () => import('./regulatory-data/regulatory-data.module').then(m => m.RegulatoryDataModule) }, { path: 'download', loadChildren: () => import('./download/download.module').then(m => m.DownloadModule) @@ -92,4 +94,4 @@ const routes: Routes = [ ], exports: [RouterModule] }) -export class RouteRoutingModule { } +export class RouteRoutingModule {} diff --git a/src/app/shared/index.ts b/src/app/shared/index.ts index d8f2d2d9..7ea8c70d 100644 --- a/src/app/shared/index.ts +++ b/src/app/shared/index.ts @@ -33,4 +33,5 @@ export * from './shared.module'; export * from './shared-delon.module'; export * from './shared-zorro.module'; export * from './shared-third.module'; +export * from './shared-g2.module'; export * from './widget/st-widget.module'; diff --git a/src/app/shared/shared-g2.module.ts b/src/app/shared/shared-g2.module.ts new file mode 100644 index 00000000..685f05bc --- /dev/null +++ b/src/app/shared/shared-g2.module.ts @@ -0,0 +1,6 @@ +import { G2BarModule } from '@delon/chart/bar'; +import { G2MiniAreaModule } from '@delon/chart/mini-area'; +import { G2PieModule } from '@delon/chart/pie'; +import { G2TimelineModule } from '@delon/chart/timeline'; + +export const SHARED_G2_MODULES = [G2BarModule, G2PieModule, G2TimelineModule, G2MiniAreaModule]; diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 82dcd221..22c0317b 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -630,6 +630,16 @@ } ] + }, + { + "text": "数据监管", + "icon": "iconfont icon-hetong-copy", + "group": true, + "children": [{ + "text": "数据报表", + "link": "/regulatory-data/dashboard" + } + ] } ] }] From 259effd5b5f0a93cd02a960f73f4174e6a0bc4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 17 Mar 2022 17:24:45 +0800 Subject: [PATCH 49/70] =?UTF-8?q?=E5=85=A5=E8=B4=A6=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/detail/detail.component.html | 37 ++--- .../components/detail/detail.component.ts | 126 +++++++++--------- .../components/record/record.component.html | 5 +- .../components/record/record.component.ts | 101 ++++++++------ .../recorded/services/recorded.service.ts | 17 +++ 5 files changed, 161 insertions(+), 125 deletions(-) create mode 100644 src/app/routes/partner/recorded/services/recorded.service.ts 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 f3d36121..714483bc 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.html +++ b/src/app/routes/partner/recorded/components/detail/detail.component.html @@ -18,9 +18,9 @@

待审批

- +
@@ -31,48 +31,49 @@
- {{formData?.ltdName}} + {{formData?.accountName}} {{formData?.ltdName}} - {{formData?.refundApplyCode}} + {{formData?.entryNumber}} - {{formData?.bankType==='1'?'平安银行':'浦发银行'}} + {{formData?.bankName}} - {{formData?.virtualAccount}} + {{formData?.fictitiousAccount}} - {{formData?.createTime}} + {{formData?.submitTime}} - {{formData?.amount | currency}} + {{formData?.invoiceAmount | currency}} - {{formData?.amount | currency}} + {{formData?.taxPersonal | currency}} - {{formData?.amount | currency}} + {{formData?.recordedAmount | currency}} - {{formData?.refundStatusLabel}} + {{formData?.stsLabel}} - + + - - {{formData?.bankCardNumber}} + {{formData?.expressName}} - + + - - {{formData?.bankSerialNumber}} + {{formData?.bankFlow}}
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 e1dc2eba..f2782ef5 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.ts +++ b/src/app/routes/partner/recorded/components/detail/detail.component.ts @@ -2,6 +2,7 @@ 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'; +import { RecordedService } from '../../services/recorded.service'; @Component({ @@ -16,7 +17,7 @@ export class PartnerRecordedDetailComponent implements OnInit { msg = ''; id = ''; - constructor(public service: FreightAccountService, private route: ActivatedRoute, private nzModalService: NzModalService) { + constructor(public service: RecordedService, private route: ActivatedRoute, private nzModalService: NzModalService) { this.id = route.snapshot.params.id; this.loadRefundDetail(this.id); } @@ -24,49 +25,49 @@ export class PartnerRecordedDetailComponent implements OnInit { ngOnInit(): void { } loadRefundDetail(id: string) { - this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => { + this.service.request(this.service.$api_get_recorded_record_detail, { id }).subscribe(res => { if (res) { this.formData = res; // 处理流程节点数据 // 流程是否结束 - let isEnd = false; - if (res.successTime) { - isEnd = true; - if (res.refundStatus === '3') { - this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' }); - } else { - this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' }); - } - } - if (res.agreeTime && res.refundStatus !== '4') { - this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' }); - } - if (res.agreeTime) { - if (res.refundStatus === '4') { - isEnd = true; - this.timeLineData.push({ - time: res.agreeTime, - value: `拒绝提现
操作人员:${res.handlerUserIdLabel}`, - color: 'red' - }); - } else { - this.timeLineData.push({ - time: res.agreeTime, - value: `审核通过
操作人员:${res.handlerUserIdLabel}`, - color: 'gray' - }); - } - } - if (res.createTime) { - this.timeLineData.push({ - time: res.createTime, - value: `提交提现申请
提现${res.amount}元至${res.bankName}(${res.bankCardNumber})
操作人员:${res.userIdLabel}`, - color: 'gray' - }); - } - if (this.timeLineData?.length > 0 && !isEnd) { - this.timeLineData[0].color = 'green'; - } + // let isEnd = false; + // if (res.successTime) { + // isEnd = true; + // if (res.refundStatus === '3') { + // this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' }); + // } else { + // this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' }); + // } + // } + // if (res.agreeTime && res.refundStatus !== '4') { + // this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' }); + // } + // if (res.agreeTime) { + // if (res.refundStatus === '4') { + // isEnd = true; + // this.timeLineData.push({ + // time: res.agreeTime, + // value: `拒绝提现
操作人员:${res.handlerUserIdLabel}`, + // color: 'red' + // }); + // } else { + // this.timeLineData.push({ + // time: res.agreeTime, + // value: `审核通过
操作人员:${res.handlerUserIdLabel}`, + // color: 'gray' + // }); + // } + // } + // if (res.createTime) { + // this.timeLineData.push({ + // time: res.createTime, + // value: `提交提现申请
提现${res.amount}元至${res.bankName}(${res.bankCardNumber})
操作人员:${res.userIdLabel}`, + // color: 'gray' + // }); + // } + // if (this.timeLineData?.length > 0 && !isEnd) { + // this.timeLineData[0].color = 'green'; + // } } }); } @@ -85,37 +86,20 @@ export class PartnerRecordedDetailComponent implements OnInit { onClick: () => { if (!this.msg || this.msg.trim().length === 0) { this.service.msgSrv.warning('请填写拒绝原因 '); - return false; + return; } - 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; + this.audit({ id: params, rejectReason: this.msg, sts: '3' }, () => { + modal.destroy(true); + }, '审核拒绝成功'); } }, { 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); - } - }); + this.audit({ id: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => { + modal.destroy(true); + }, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`); } } ] @@ -129,4 +113,18 @@ export class PartnerRecordedDetailComponent implements OnInit { goBack() { history.go(-1); } + + /** + * 审核 + */ + audit(params: any, callback: Function, msg = '成功') { + this.service + .request(this.service.$api_audit_recored, ...params) + .subscribe(res => { + if (res) { + this.service.msgSrv.success(msg); + callback(); + } + }); + } } 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 60aa8d08..e6233910 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.html +++ b/src/app/routes/partner/recorded/components/record/record.component.html @@ -41,8 +41,9 @@
- diff --git a/src/app/routes/partner/recorded/components/record/record.component.ts b/src/app/routes/partner/recorded/components/record/record.component.ts index 4b97ba2c..7e154473 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.ts +++ b/src/app/routes/partner/recorded/components/record/record.component.ts @@ -2,9 +2,11 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; 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 { RecordedService } from '../../services/recorded.service'; @Component({ @@ -39,7 +41,8 @@ export class PartnerRecordedRecordComponent implements OnInit { accountName = ''; // 账户名称 - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { + constructor(public service: RecordedService, private nzModalService: NzModalService, + private router: Router, public ar: ActivatedRoute, public shipperSrv: ShipperBaseService) { this.accountName = this.ar.snapshot.queryParams?.userIdLabel || ''; this.ltdId = this.ar.snapshot.queryParams?.ltdId || ''; @@ -139,39 +142,34 @@ export class PartnerRecordedRecordComponent implements OnInit { onClick: () => { if (!this.msg || this.msg.trim().length === 0) { this.service.msgSrv.warning('请填写拒绝原因 '); - return false; + return; } - this.service - .request(this.service.$api_disagree_refund, { - refundApplicationId: params, - msg: this.msg - }) - .subscribe(res => { - if (res) { - this.service.msgSrv.success('审核拒绝成功'); - modal.destroy(); - this.st.load(1); - } - }); - return false; + this.audit({ id: params, rejectReason: this.msg, sts: '3' }, () => { + modal.destroy(); + this.st.load(1); + }, '审核拒绝成功'); + // this.service + // .request(this.service.$api_disagree_recorded, { + // id: params, + // rejectReason: this.msg + // }) + // .subscribe(res => { + // if (res) { + // this.service.msgSrv.success('审核拒绝成功'); + // modal.destroy(); + // this.st.load(1); + // } + // }); } }, { 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(); - this.st.load(1); - } - }); + this.audit({ id: params, rejectReason: this.msg, sts: '1' }, () => { + modal.destroy(); + this.st.load(1); + }, '审核通过成功'); } } ] @@ -230,12 +228,19 @@ export class PartnerRecordedRecordComponent implements OnInit { placeholder: '请输入' } }, - refundStatus: { + sts: { type: 'string', title: '入账状态', + default: '', + enum: [ + { label: '全部', value: '' }, + { label: '待初审', value: 0 }, + { label: '待复核', value: 1 }, + { label: '已入账', value: 2 }, + { label: '已拒绝', value: 3 }, + ], ui: { - widget: 'dict-select', - params: { dictKey: 'refund:apply:status' }, + widget: 'select', placeholder: '请选择' } }, @@ -247,10 +252,10 @@ export class PartnerRecordedRecordComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - asyncData: () => this.service.getNetworkFreightForwarder(), + asyncData: () => this.shipperSrv.getNetworkFreightForwarder(), } }, - createTime: { + submitTime: { title: '提交时间', type: 'string', ui: { @@ -270,9 +275,9 @@ export class PartnerRecordedRecordComponent implements OnInit { private initST(): STColumn[] { return [ { title: '', index: 'key', type: 'checkbox', className: 'text-center' }, - { title: '账户名称', index: 'createTime', width: 180, className: 'text-center' }, - { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, - { title: '入账单号', index: 'refundApplyCode', width: 190, className: 'text-center' }, + { title: '账户名称', index: 'accountName', width: 180, className: 'text-center' }, + { title: '虚拟账户', index: 'fictitiousAccount', width: 180, className: 'text-center' }, + { title: '入账单号', index: 'entryNumber', width: 190, className: 'text-center' }, { title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' }, { title: '开票金额', @@ -284,7 +289,7 @@ export class PartnerRecordedRecordComponent implements OnInit { }, { title: '代缴个税', - index: 'amount', + index: 'taxPersonal', width: 150, type: 'widget', className: 'text-right', @@ -292,15 +297,15 @@ export class PartnerRecordedRecordComponent implements OnInit { }, { title: '入账金额', - index: 'amount', + index: 'entryAmount', width: 150, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } }, - { title: '提交时间', index: 'bankSerialNumber', width: 160, className: 'text-center' }, - { title: '入账状态', index: 'refundStatusLabel', width: 100, className: 'text-center' }, + { title: '提交时间', index: 'submitTime', width: 160, className: 'text-center' }, + { title: '入账状态', index: 'stsLabel', width: 100, className: 'text-center' }, { title: '操作', fixed: 'right', @@ -308,12 +313,12 @@ export class PartnerRecordedRecordComponent implements OnInit { buttons: [ { text: '审核', - iif: item => item.refundStatus === '1', + iif: item => item.refundStatus === '0', click: item => this.auditAction(item) }, { text: '复审', - iif: item => item.refundStatus === '2', + iif: item => item.sts === '1', click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) }, { @@ -324,4 +329,18 @@ export class PartnerRecordedRecordComponent implements OnInit { } ]; } + + /** + * 审核 + */ + audit(params: any, callback: Function, msg = '成功') { + this.service + .request(this.service.$api_audit_recored, ...params) + .subscribe(res => { + if (res) { + this.service.msgSrv.success(msg); + callback(); + } + }); + } } diff --git a/src/app/routes/partner/recorded/services/recorded.service.ts b/src/app/routes/partner/recorded/services/recorded.service.ts new file mode 100644 index 00000000..bb27a3dc --- /dev/null +++ b/src/app/routes/partner/recorded/services/recorded.service.ts @@ -0,0 +1,17 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root' +}) +export class RecordedService extends BaseService { + + $api_get_recorded_page = `/api/bpc/partnerInvoice/getDetail`; // 查询合伙人发票入账主表 + $api_get_recorded_record_detail = `api/bpc/partnerInvoice/getDetailByOpration`; // 入账记录详情 + $api_disagree_recorded = ``; // 拒绝审核 + $api_agree_recorded = ``; // 同意审核 + $api_audit_recored = `/api/bpc/partnerInvoiceEntry/oprationAudit`; // 审核单据 + constructor(public injector: Injector) { + super(injector); + } +} From 9c5fdabab97caae22b60550881def7cd433484c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Thu, 17 Mar 2022 19:35:35 +0800 Subject: [PATCH 50/70] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E3=80=81=E8=B4=A6=E6=88=B7=E6=98=8E=E7=BB=86=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list/list.component.html | 17 +++++----- .../components/list/list.component.ts | 19 ++++++------ .../virtual-account-detail.component.html | 15 +++++++-- .../virtual-account-detail.component.ts | 31 ++++++++++--------- .../withdrawals-record.component.html | 2 +- .../withdrawals-record.component.ts | 3 +- .../services/account-managemant.service.ts | 5 ++- 7 files changed, 53 insertions(+), 39 deletions(-) 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 d071efc2..e4e84339 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 @@ -18,21 +18,18 @@ [res]="{ reName: { list: 'data.records', total: 'data.total' } }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="service.http.loading"> - - {{item.yskmoney}} + +
{{item.allBalance | currency:' '}}
- -
{{item.approvalStatus1 | currency:' '}}
-
- + {{item.yskmoney | currency:' + [routerLink]="'/partner/account-management/am/recorded/detail/'+item?.id">{{item.unEntryAmount | currency:' '}} - - -
{{item.yskmoney | currency:' '}}
+ +
{{item.availableBalance | currency:' '}}
+
diff --git a/src/app/routes/partner/account-management/components/list/list.component.ts b/src/app/routes/partner/account-management/components/list/list.component.ts index 84e281a5..7e58f5e1 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.ts +++ b/src/app/routes/partner/account-management/components/list/list.component.ts @@ -36,14 +36,14 @@ export class PartnerAccountManagementListComponent implements OnInit { initSF() { this.schema = { properties: { - abnormalCause: { + userName: { title: '合伙人名称', type: 'string', ui: { placeholder: '请输入', }, }, - abnormalCause1: { + phone: { title: '手机号', type: 'string', ui: { @@ -59,14 +59,15 @@ export class PartnerAccountManagementListComponent implements OnInit { */ initST() { this.columns = [ - { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 300 }, - { title: '手机号', render: 'carModelLabel', className: 'text-center', width: 200 }, - { title: '账户总额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 200 }, - { title: '待入账余额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 200 }, - { title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 250 }, - { title: '虚拟账户', index: 'approvalStatus4', className: 'text-center', width: 200 }, + { title: '合伙人名称', index: 'userName', className: 'text-center', width: 250 }, + { title: '手机号', index: 'phone', className: 'text-center', width: 200 }, + { title: '账户总额(元)', render: 'allBalance', className: 'text-right', sort: true, width: 200 }, + { title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', sort: true, width: 200 }, + { title: '可用余额(元)', render: 'availableBalance', className: 'text-right', sort: true, width: 250 }, + { title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 200 }, { title: '操作', + width: 100, buttons: [ { text: '虚拟账户明细', @@ -94,7 +95,7 @@ export class PartnerAccountManagementListComponent implements OnInit { nzTitle: '虚拟账户明细', nzContent: PartnerAccountManagementVirtualAccountDetailComponent, nzComponentParams: { - id: _record?.id + roleId: _record?.roleId }, nzWidth: '85%', nzFooter: null diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html index 649ddc1c..ae98a690 100644 --- a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html @@ -14,12 +14,23 @@
- + [loading]="service.http.loading"> + +
+ {{item.allBalance}} +
+
+ +
+ {{item.availableBalance}} +
+
+
- 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..8abf556f 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 { } 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..8b9d9acb 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,10 @@ 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`;// 提现记录 + constructor(public injector: Injector) { super(injector) } From a6193fbddc54d7926430271b3f8313b2fe22302d Mon Sep 17 00:00:00 2001 From: TaricXin <583259872@qq.com> Date: Fri, 18 Mar 2022 14:56:14 +0800 Subject: [PATCH 51/70] edit --- .../add-etp-partner.component.ts | 26 +- .../add-personal-partner.component.ts | 39 +- .../index/partner-list.component.html | 165 ++-- .../index/partner-list.component.ts | 143 +++- .../partner-detail.component.html | 778 +++++++++++------- .../partner-detail.component.ts | 70 +- .../personal-partner-detail.component.html | 253 ++++++ .../personal-partner-detail.component.less | 30 + .../personal-partner-detail.component.ts | 240 ++++++ .../services/partner-list.service.ts | 13 + .../routes/partner/partner-routing.module.ts | 54 +- src/app/routes/partner/partner.module.ts | 6 +- src/styles.less | 26 +- 13 files changed, 1325 insertions(+), 518 deletions(-) create mode 100644 src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html create mode 100644 src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.less create mode 100644 src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts 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..38f07c5a 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,4 +1,4 @@ -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 { @@ -14,6 +14,7 @@ import { } from '@delon/form'; import { NzUploadFile } from 'ng-zorro-antd/upload'; import { of } from 'rxjs'; + import { PartnerListService } from '../../services/partner-list.service'; const IMAGECONFIG = { @@ -43,7 +44,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(); @@ -65,10 +66,9 @@ export class AddEtpPartnerComponent implements OnInit { }; constructor(private router: Router, public service: PartnerListService) {} - ngOnInit() {} submitForm() { - if (!this.sf.valid ) { + if (!this.sf.valid) { this.sf.validator({ emitError: true }); this.service.msgSrv.warning('请修改填写错误信息'); return; @@ -118,7 +118,9 @@ export class AddEtpPartnerComponent implements OnInit { } } ); - // this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { + console.log(params); + + // this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => { // if (res) { // this.service.msgSrv.success('企业新增成功'); // this.goBack(); @@ -549,7 +551,7 @@ export class AddEtpPartnerComponent implements OnInit { } as SFCheckboxWidgetSchema } }, - required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber','operatingStartTime'] + required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'operatingStartTime'] }, // 所属城市 _addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, @@ -568,7 +570,7 @@ export class AddEtpPartnerComponent implements OnInit { { title: '已支付', key: 'TRADE_SUCCESS' }, { title: '交易完成', key: 'TRADE_FINISHED' } ]) - } as SFTreeSelectWidgetSchema, + } as SFTreeSelectWidgetSchema }, // 渠道销售 _channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, @@ -586,7 +588,15 @@ export class AddEtpPartnerComponent implements OnInit { } } }, - required: ['_licenseTips', 'licensePhotoWatermark', 'unifiedSocialCreditCode', 'enterpriseName', 'operatingStartTime', 'status3','channel'] + required: [ + '_licenseTips', + 'licensePhotoWatermark', + 'unifiedSocialCreditCode', + 'enterpriseName', + 'operatingStartTime', + 'status3', + 'channel' + ] }; } } 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..4dffa7bf 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) { @@ -305,18 +315,22 @@ export class AddPersonalPartnerComponent implements OnInit { status3: { 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 }, // 渠道销售 @@ -335,10 +349,7 @@ export class AddPersonalPartnerComponent implements OnInit { } } }, - required: [ - 'status3', - 'channel' - ] + required: ['status3', 'channel'] }; } } 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..b5652c72 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,100 @@ - - + -
-
- -
-
- - - -
+
+
+
+
+ + + +
+
-
- - -
+
+ + +
- - + +
-
-
- - 深圳某某有限公司 - - - - - - - -
+
+
+ 深圳某某有限公司 + + + + + +
-

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

+
+

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

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

已选(0)

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

已选(0)

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

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

- \ No newline at end of file +
+

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

+ 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..4f415651 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 }) @@ -30,8 +31,6 @@ export class PartnerListComponent implements OnInit { constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {} - ngOnInit(): void {} - beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { let params = { ...this.sf.value }; @@ -122,19 +121,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 +143,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 +186,7 @@ export class PartnerListComponent implements OnInit { } } }, - paymo1de: { + crmStatus: { type: 'string', title: 'CRM状态', ui: { @@ -198,41 +202,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 +261,63 @@ export class PartnerListComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '合伙人名称', index: 'payCode', width: 180 }, + { title: '合伙人名称', index: 'enterpriseName', 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: '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: 'payDate', type: 'date', width: 130 }, - { title: '注册时间', index: 'payDate', className: 'text-center', width: 170 }, + { title: '注册时间', index: 'createTime', 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: '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', @@ -273,7 +326,13 @@ export class PartnerListComponent implements OnInit { { type: 'divider' }, { text: '详情
', - click: item => this.router.navigate(['/partner/partner-list/detail/' + item.id]) + click: item => { + if (item.partnerType === 1) { + this.router.navigate([`/partner/partner-list/etp-detail/${item.appUserId}`]); + } else { + this.router.navigate([`/partner/partner-list/personal-detail/${item.appUserId}`]); + } + } }, { text: '修改返佣模板', @@ -289,7 +348,7 @@ export class PartnerListComponent implements OnInit { }, { text: '重发CRM流程', - click: item => this.router.navigate(['/partner/account-management/list/detail/' + item.id]) + click: item => this.router.navigate([`/partner/account-management/list/detail/${item.id}`]) } ] } diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html index f242099c..e00cd880 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,492 @@ - - - - - - -