This commit is contained in:
Lingzi
2022-03-23 13:40:42 +08:00
80 changed files with 3011 additions and 1496 deletions

41
package-lock.json generated
View File

@ -2879,35 +2879,6 @@
"integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=",
"dev": true "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": { "@types/selenium-webdriver": {
"version": "3.0.19", "version": "3.0.19",
"resolved": "https://registry.npmmirror.com/@types/selenium-webdriver/download/@types/selenium-webdriver-3.0.19.tgz", "resolved": "https://registry.npmmirror.com/@types/selenium-webdriver/download/@types/selenium-webdriver-3.0.19.tgz",
@ -10165,24 +10136,12 @@
"resolved": "https://registry.nlark.com/lodash/download/lodash-4.17.21.tgz", "resolved": "https://registry.nlark.com/lodash/download/lodash-4.17.21.tgz",
"integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=" "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": { "lodash.debounce": {
"version": "4.0.8", "version": "4.0.8",
"resolved": "https://registry.npm.taobao.org/lodash.debounce/download/lodash.debounce-4.0.8.tgz", "resolved": "https://registry.npm.taobao.org/lodash.debounce/download/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
"dev": true "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": { "lodash.memoize": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.nlark.com/lodash.memoize/download/lodash.memoize-4.1.2.tgz", "resolved": "https://registry.nlark.com/lodash.memoize/download/lodash.memoize-4.1.2.tgz",

View File

@ -49,9 +49,9 @@ export class StartupService {
let data; let data;
if (this.coreSrv.loginStatus) { if (this.coreSrv.loginStatus) {
// 本地菜单 // 本地菜单
data = this.loadMockData(); // data = this.loadMockData();
// 远程菜单 // 远程菜单
// data = this.loadRemoteData(); data = this.loadRemoteData();
} else { } else {
data = this.loadMockData(); 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 userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data));
// 菜单数据 // 菜单数据
const menuData = this.httpClient // const menuData = this.httpClient
.post(this.coreSrv.$api_get_current_user_menus, { // .post(this.coreSrv.$api_get_current_user_menus, {
appId: this.coreSrv.envSrv.getEnvironment().appId // appId: this.coreSrv.envSrv.getEnvironment().appId
}) // })
.pipe(map((res: any) => res.data)); // .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.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu));
return zip(appData, userData, menuData); return zip(appData, userData, menuData);
} }

View File

@ -20,7 +20,14 @@ const alainConfig: AlainConfig = {
sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } }, sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } },
pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true }, pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true },
auth: { login_url: '/passport/login' }, 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()]; const alainModules = [AlainThemeModule.forRoot(), DelonACLModule.forRoot()];

View File

@ -124,8 +124,8 @@ export class FreightAccountService extends ShipperBaseService {
// 根据预收款ID获取收款单明细 // 根据预收款ID获取收款单明细
$api_get_advance_collection_detail = '/api/fcc/ficoBrmYsk/getBrmYskByYskblaId'; $api_get_advance_collection_detail = '/api/fcc/ficoBrmYsk/getBrmYskByYskblaId';
constructor(public injector: Injector, public eaCacheSrv: EACacheService) { constructor(public injector: Injector) {
super(injector, eaCacheSrv); super(injector);
} }
getReceiptUrl(url: string, params: any) { getReceiptUrl(url: string, params: any) {

View File

@ -28,7 +28,7 @@ export class InsuranceManagementService extends ShipperBaseService {
// 保险费公司认证 // 保险费公司认证
$api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`; $api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`;
constructor(public injector: Injector, public eaCacheSrv: EACacheService) { constructor(public injector: Injector) {
super(injector, eaCacheSrv); super(injector);
} }
} }

View File

@ -190,7 +190,7 @@ export class OrderManagementService extends ShipperBaseService {
}) })
); );
} }
constructor(public injector: Injector, public eaCacheSrv: EACacheService) { constructor(public injector: Injector) {
super(injector, eaCacheSrv); super(injector);
} }
} }

View File

@ -1,27 +1,27 @@
<page-header-wrapper [title]="'合伙人账户明细'" [logo]="logo"> <page-header-wrapper [title]="'合伙人账户明细'" [logo]="logo">
<ng-template #logo> <ng-template #logo>
<button nz-button (click)="goBack()"> <!-- <button nz-button (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i> <i nz-icon nzType="left" nzTheme="outline"></i>
</button> </button> -->
</ng-template> </ng-template>
</page-header-wrapper> </page-header-wrapper>
<nz-card> <nz-card>
<sv-container layout="vertical" [noColon]="true" col="4"> <sv-container layout="vertical" [noColon]="true" col="4">
<sv [label]="labelTpl"> <sv [label]="labelTpl">
<b class="text-md ">{{accountInfo?.company}}</b> <b class="text-md ">{{headerTotalInfo?.ltdName}}</b>
</sv> </sv>
<sv label="可用余额"> <sv label="可用余额">
{{totalInfo?.balance |currency}} {{headerTotalInfo?.allAmount |currency}}
</sv> </sv>
<sv label="收入金额"> <sv label="收入金额">
{{totalInfo?.income |currency}} {{headerTotalInfo?.incomeAmount |currency}}
</sv> </sv>
<sv label="支出金额"> <sv label="支出金额">
{{totalInfo?.spending |currency}} {{headerTotalInfo?.payAmount |currency}}
</sv> </sv>
</sv-container> </sv-container>
<ng-template #labelTpl> <ng-template #labelTpl>
<b class="text-md" style="color: black;">{{accountInfo?.name}} {{accountInfo?.phone}}</b> <b class="text-md" style="color: black;">{{headerTotalInfo?.name}} &nbsp;&nbsp;{{headerTotalInfo?.phone}}</b>
</ng-template> </ng-template>
</nz-card> </nz-card>
<nz-card> <nz-card>
@ -40,22 +40,26 @@
</div> </div>
</div> </div>
<div class="table-content"> <div class="table-content">
<st #st [data]="service.$api_get_account_management_page " [columns]="columns" <st #st [data]="service.$api_get_account_detail_page " [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: {pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: {pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [5,10, 20, 50, 100, 200, 500] }" [page]="{ show: true, showSize: true, pageSizes: [5,10, 20, 50, 100, 200, 500] }"
[loading]="service.http.loading" [scroll]="{x:'1200px'}"> [loading]="service.http.loading" [scroll]="{x:'1200px'}">
<ng-template st-row="amount" let-item> <ng-template st-row="amount" let-item>
<div *ngIf="item.incomeType === '1'"> - {{item.amount | currency }}</div> <div *ngIf="item.incomeType === '1'" class="text-right"> - {{item.amount | currency:' ' }}</div>
<div *ngIf="item.incomeType === '2'"> + {{item.amount | currency }}</div> <div *ngIf="item.incomeType === '2'" class="text-right"> + {{item.amount | currency:' ' }}</div>
</ng-template> </ng-template>
<ng-template st-row="accountBalance" let-item>
<div class="text-right">{{item?.accountBalance |currency:' '}}</div>
</ng-template>
</st> </st>
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0 "> <div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
合计 <label class="text-red-dark">{{ totalInfo?.total }}</label> 项,收入 <label 合计 <label class="text-red-dark">{{ footerTotalInfo?.total }}</label> 项,收入 <label
class="text-red-dark font-weight-bold">{{ class="text-red-dark font-weight-bold">{{
totalInfo?.income | currency footerTotalInfo?.incomeAmount | currency
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{ }}</label>,支出 <label class="text-red-dark font-weight-bold">{{
totalInfo?.spending | currency }}</label> footerTotalInfo?.payAmount | currency }}</label>
</div> </div>
</div> </div>
</nz-card> </nz-card>

View File

@ -1,4 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
@ -10,17 +11,20 @@ import { AccountManagemantService } from '../../services/account-managemant.serv
styleUrls: ['./account-detail.component.less'] styleUrls: ['./account-detail.component.less']
}) })
export class PartnerAccountManagementAccountDetailComponent implements OnInit { export class PartnerAccountManagementAccountDetailComponent implements OnInit {
totalInfo: any = { headerTotalInfo: any = {
balance: 0, allAmount: 0,
income: 1500, incomeAmount: 0,
spending: 2400, payAmount: 0,
total: 186 name: '',
ltdName: '',
phone: ''
}; };
accountInfo = { footerTotalInfo: any = {
name: '张三', incomeAmount: 0,
phone: '13812345678', payAmount: 0,
company: '天津怡亚通物流科技有限公司(平安)' total: 0
} };
url = `/user`; url = `/user`;
schema: SFSchema = {}; schema: SFSchema = {};
@ -31,14 +35,27 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
columns: STColumn[] = []; columns: STColumn[] = [];
roleId = '';
bankType = '';
channelSource = '';
ltdId = '';
constructor(public service: AccountManagemantService, public ar: ActivatedRoute) {
constructor(public service: AccountManagemantService) { } this.roleId = this.ar.snapshot.params.id;
this.ar.queryParamMap.subscribe((res: any) => {
this.ltdId = res?.params?.ltdId;
this.channelSource = res?.params?.channelSource;
this.bankType = res?.params?.bankType;
})
}
get reqParams() { get reqParams() {
return { ...this.sf?.value }; return { ...this.sf?.value, roleId: this.roleId, ltdId: this.ltdId, channelSource: this.channelSource, bankType: this.bankType };
} }
ngOnInit(): void { ngOnInit(): void {
this.getHeaderSummary();
this.getFooterSummary();
this.initSF(); this.initSF();
this.initST(); this.initST();
} }
@ -59,21 +76,21 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
} as SFDateWidgetSchema, } as SFDateWidgetSchema,
}, },
abnormalCause: { transactionNumber: {
title: '流水号', title: '流水号',
type: 'string', type: 'string',
ui: { ui: {
placeholder: '请输入', placeholder: '请输入',
}, },
}, },
abnormalCause1: { businessNumber: {
title: '交易单号', title: '交易单号',
type: 'string', type: 'string',
ui: { ui: {
placeholder: '请输入', placeholder: '请输入',
}, },
}, },
bankType: { tradeType: {
type: 'string', type: 'string',
title: '交易类型', title: '交易类型',
default: '', default: '',
@ -90,7 +107,7 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
}, },
}, },
}, },
bankType1: { incomeType: {
type: 'string', type: 'string',
title: '收支类型', title: '收支类型',
default: '', default: '',
@ -118,16 +135,16 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
*/ */
initST() { initST() {
this.columns = [ this.columns = [
{ title: '交易时间', index: 'carNo', className: 'text-center', width: 200 }, { title: '交易时间', index: 'createTime', className: 'text-center', width: 200 },
{ title: '流水号', render: 'carModelLabel', className: 'text-center', width: 150 }, { title: '流水号', index: 'transactionNumber', className: 'text-center', width: 180 },
{ title: '交易类型', render: 'carModelLabel', className: 'text-center', width: 200 }, { title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 150 },
{ title: '交易单号', render: 'carModelLabel', className: 'text-center', width: 120 }, { title: '交易单号', index: 'businessNumber', className: 'text-center', width: 180 },
{ title: '备注', index: 'remark', className: 'text-center', width: 180 }, { title: '备注', index: 'tradeContent', className: 'text-center', width: 180 },
{ title: '收支类型', render: 'approvalStatus1', className: 'text-center', width: 180 }, { title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 180 },
{ title: '交易金额', render: 'amount', className: 'text-right', width: 180 }, { title: '交易金额', render: 'amount', className: 'text-center', width: 150 },
{ title: '账户余额', render: 'approvalStatus3', className: 'text-right', width: 180 }, { title: '账户余额', render: 'accountBalance', className: 'text-center', width: 150 },
{ title: '付款方', index: 'approvalStatus4', className: 'text-center', width: 200 }, { title: '付款方', index: 'payName', className: 'text-center', width: 200 },
{ title: '收款方', index: 'approvalStatus4', className: 'text-center', width: 120 }, { title: '收款方', index: 'payeeName', className: 'text-center', width: 200 },
]; ];
} }
resetSF() { resetSF() {
@ -145,6 +162,34 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
this._$expand = !this._$expand; this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand); this.sf?.setValue('/_$expand', this._$expand);
} }
/**
* 头部汇总
*/
getHeaderSummary() {
const params = {
roleId: this.roleId,
ltdId: this.ltdId,
channelSource: this.channelSource,
bankType: this.bankType
};
this.service.request(this.service.$api_get_account_detail_header_summary, { ...params }).subscribe(res => {
if (res) {
this.headerTotalInfo = res;
console.log(res);
}
})
}
/**
* 脚部汇总
*/
getFooterSummary() {
this.service.request(this.service.$api_get_account_detail_footer_summary, this.reqParams).subscribe(res => {
if (res) {
this.footerTotalInfo = res;
}
})
}
search() { search() {
this.st.load(1); this.st.load(1);
@ -154,4 +199,6 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
} }
} }

View File

@ -17,22 +17,19 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading"> [loading]="service.http.loading" multiSort>
<ng-template st-row="approvalStatus" let-item> <ng-template st-row="allBalance" let-item>
<a [routerLink]="'/partner/account-management/am/recorded/detail/'+item?.id">{{item.yskmoney}}</a> <div class="text-right">{{item.allBalance | currency:' '}}</div>
</ng-template> </ng-template>
<ng-template st-row="approvalStatus1" let-item> <ng-template st-row="unEntryAmount" let-item>
<div class="text-right">{{item.approvalStatus1 | currency:' '}}</div>
</ng-template>
<ng-template st-row="approvalStatus2" let-item>
<a class="text-right text-blue-dark" <a class="text-right text-blue-dark"
[routerLink]="'/partner/account-management/am/recorded/detail/'+item?.id">{{item.yskmoney | currency:' [routerLink]="'/partner/account-management/am/recorded/detail/'+item?.roleId">{{item.unEntryAmount | currency:'
'}}</a> '}}</a>
</ng-template> </ng-template>
<ng-template st-row="availableBalance" let-item>
<ng-template st-row="approvalStatus3" let-item> <div class="text-right">{{item.availableBalance | currency:' '}}</div>
<div class="text-right">{{item.yskmoney | currency:' '}}</div>
</ng-template> </ng-template>
</st> </st>
</nz-card> </nz-card>

View File

@ -36,14 +36,14 @@ export class PartnerAccountManagementListComponent implements OnInit {
initSF() { initSF() {
this.schema = { this.schema = {
properties: { properties: {
abnormalCause: { userName: {
title: '合伙人名称', title: '合伙人名称',
type: 'string', type: 'string',
ui: { ui: {
placeholder: '请输入', placeholder: '请输入',
}, },
}, },
abnormalCause1: { phone: {
title: '手机号', title: '手机号',
type: 'string', type: 'string',
ui: { ui: {
@ -59,14 +59,21 @@ export class PartnerAccountManagementListComponent implements OnInit {
*/ */
initST() { initST() {
this.columns = [ this.columns = [
{ title: '合伙人名称', index: 'carNo', className: 'text-center', width: 300 }, { title: '合伙人名称', index: 'userName', className: 'text-center', width: 250 },
{ title: '手机号', render: 'carModelLabel', className: 'text-center', width: 200 }, { title: '手机号', index: 'phone', 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: '账户总额(元)', index: 'allBalance', className: 'text-right', sort: true, width: 150, type: 'currency',
{ title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 250 }, },
{ title: '虚拟账户', index: 'approvalStatus4', className: 'text-center', width: 200 }, {
title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', width: 150,
},
{
title: '可用余额(元)', index: 'availableBalance', className: 'text-right', sort: true, width: 150, type: 'currency'
},
{ title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 220 },
{ {
title: '操作', title: '操作',
width: 150,
buttons: [ buttons: [
{ {
text: '虚拟账户明细', text: '虚拟账户明细',
@ -89,18 +96,17 @@ export class PartnerAccountManagementListComponent implements OnInit {
* @param _record 当前行信息 * @param _record 当前行信息
*/ */
viewVirtual(_record: any) { viewVirtual(_record: any) {
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '虚拟账户明细', nzTitle: '虚拟账户明细',
nzContent: PartnerAccountManagementVirtualAccountDetailComponent, nzContent: PartnerAccountManagementVirtualAccountDetailComponent,
nzComponentParams: { nzComponentParams: {
id: _record?.id roleId: _record?.roleId,
}, },
nzWidth: '85%', nzWidth: '85%',
nzFooter: null nzFooter: null
}); });
modalRef.afterClose.subscribe(result => { // modalRef.afterClose.subscribe(result => {
}); // });
} }
/** /**

View File

@ -6,22 +6,25 @@
</ng-template> </ng-template>
</page-header-wrapper> </page-header-wrapper>
<nz-card> <nz-card>
<sv-container layout="vertical" [noColon]="true" col="4"> <sv-container layout="vertical" [noColon]="true" col="5">
<sv [label]="labelTpl"> <sv [label]="labelTpl">
<b class="text-md ">{{accountInfo?.company}}</b> <b class="text-md ">{{summaryObj?.company}}</b>
</sv> </sv>
<sv label="可用余额"> <sv label="返佣总额">
{{totalInfo?.balance |currency}} {{summaryObj?.totalRebate |currency}}
</sv> </sv>
<sv label="收入金额"> <sv label="已入账金额">
{{totalInfo?.income |currency}} {{summaryObj?.totalRebate |currency}}
</sv> </sv>
<sv label="支出金额"> <sv label="代缴个税">
{{totalInfo?.spending |currency}} {{summaryObj?.taxPersonalSum |currency}}
</sv>
<sv label="待入账金额">
{{summaryObj?.waitRecordedAmount |currency}}
</sv> </sv>
</sv-container> </sv-container>
<ng-template #labelTpl> <ng-template #labelTpl>
<b class="text-md" style="color: black;">{{accountInfo?.name}} {{accountInfo?.phone}}</b> <b class="text-md" style="color: black;">{{summaryObj?.name}}</b>
</ng-template> </ng-template>
</nz-card> </nz-card>
<nz-card> <nz-card>
@ -29,7 +32,7 @@
<sf mode="search" #sf [schema]="schema" [ui]="ui" (formSubmit)="search()" (formReset)="resetSF()"></sf> <sf mode="search" #sf [schema]="schema" [ui]="ui" (formSubmit)="search()" (formReset)="resetSF()"></sf>
</div> </div>
<div class="table-content"> <div class="table-content">
<st #st [data]="service.$api_get_account_management_page " [columns]="columns" <st #st [data]="service.$api_get_invoice_detail_page " [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: {pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: {pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [5,10, 20, 50, 100, 200, 500] }" [page]="{ show: true, showSize: true, pageSizes: [5,10, 20, 50, 100, 200, 500] }"
@ -40,11 +43,11 @@
</ng-template> </ng-template>
</st> </st>
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0 "> <div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
合计 <label class="text-red-dark">{{ totalInfo?.total }}</label> 项,收入 <label 合计 <label class="text-red-dark">{{ summaryObj?.total }}</label> 项,收入 <label
class="text-red-dark font-weight-bold">{{ class="text-red-dark font-weight-bold">{{
totalInfo?.income | currency summaryObj?.income | currency
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{ }}</label>,支出 <label class="text-red-dark font-weight-bold">{{
totalInfo?.spending | currency }}</label> summaryObj?.spending | currency }}</label>
</div> </div>
</div> </div>
</nz-card> </nz-card>
@ -52,13 +55,19 @@
<nz-modal [(nzVisible)]="showBillDetail" nzTitle="账户明细" [nzFooter]="null" (nzOnCancel)="handleCancel()" nzWidth="700px"> <nz-modal [(nzVisible)]="showBillDetail" nzTitle="账户明细" [nzFooter]="null" (nzOnCancel)="handleCancel()" nzWidth="700px">
<div *nzModalContent> <div *nzModalContent>
<div class="mb-sm"> <div class="mb-sm">
<span class="mr-xxl text-md font-weight-bold"><label>网络货运人:</label>{{accountInfo?.name}}</span> <span class="mr-xxl text-md font-weight-bold"><label>网络货运人:</label>{{detailRecord?.ltdName}}</span>
<span class="text-md font-weight-bold"><label>返佣总额(元):</label>{{totalInfo?.spending |currency: ' '}}</span> <span class="text-md font-weight-bold"><label>返佣总额(元):</label>{{detailRecord?.totalRebate |currency: ' '}}</span>
</div> </div>
<st #st [data]="service.$api_get_account_management_page " [columns]="billDetailColumns" <st #st [data]="billDetailList " [columns]="billDetailColumns" [res]="{ reName: { list: 'data' } }"
[res]="{ reName: { list: 'data' } }" [req]="{ method: 'POST', allInBody: true, params:{}}" [page]="{show:false}"> [req]="{ method: 'POST', allInBody: true, params:billDetailReqParams}" [page]="{show:false}">
<ng-template st-row="amount" let-item> <ng-template st-row="month" let-item>
<div *ngIf="item.paAccount">{{item?.amount |currency :' '}}</div> <div>
<span>{{item?.year }}年</span>
<span>{{item?.month }}月</span>
</div>
</ng-template>
<ng-template st-row="profitAmountSum" let-item>
<div>{{item?.profitAmountSum |currency :' '}}</div>
</ng-template> </ng-template>
</st> </st>

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
@ -10,17 +10,16 @@ import { AccountManagemantService } from '../../services/account-managemant.serv
templateUrl: './recorded-detail.component.html', templateUrl: './recorded-detail.component.html',
}) })
export class PartnerAccountManagementRecordedDetailComponent implements OnInit { export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
totalInfo: any = { summaryObj: any = {
balance: 0, waitRecordedAmount: 0,
income: 1500, totalRebate: 0,
spending: 2400, taxPersonalSum: 0,
total: 186 recordedAmount: 0,
ltdName: '',
taxno: ''
}; };
accountInfo = {
name: '张三', detailRecord: any = {};
phone: '13812345678',
company: '天津怡亚通物流科技有限公司(平安)'
}
url = `/user`; url = `/user`;
schema: SFSchema = {}; schema: SFSchema = {};
@ -32,12 +31,17 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
columns: STColumn[] = []; columns: STColumn[] = [];
billDetailColumns: STColumn[] = []; billDetailColumns: STColumn[] = [];
showBillDetail = false; showBillDetail = false;
billDetailList = [];
roleId = '';
constructor(public service: AccountManagemantService, public router: Router) { } constructor(public service: AccountManagemantService, public router: Router, public ar: ActivatedRoute) {
this.roleId = this.ar.snapshot.params.id;
}
get reqParams() { get reqParams() {
return { ...this.sf?.value }; return { ...this.sf?.value, partnerId: this.roleId };
} }
get billDetailReqParams() { get billDetailReqParams() {
@ -46,7 +50,7 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.initSF();
this.initST(); this.initST();
this.initBillDetailST(); this.getInvoiceSummary();
} }
initSF() { initSF() {
@ -71,13 +75,13 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
*/ */
initST() { initST() {
this.columns = [ this.columns = [
{ title: '网络货运人', index: 'carNo', className: 'text-center', width: 200 }, { title: '网络货运人', index: 'ltdName', className: 'text-center', width: 200 },
{ title: '银行类型', render: 'carModelLabel', className: 'text-center', width: 150 }, { title: '银行类型', render: 'bankTypeLabel', className: 'text-center', width: 150 },
{ title: '虚拟账户', render: 'carModelLabel', className: 'text-center', width: 200 }, { title: '虚拟账户', render: 'fictitiousAccount', className: 'text-center', width: 200 },
{ title: '返佣总额(元)', render: 'carModelLabel', className: 'text-center', width: 120 }, { title: '返佣总额(元)', index: 'totalRebate', className: 'text-center', width: 120, type: 'currency' },
{ title: '已入账金额(元)', index: 'remark', className: 'text-center', width: 180 }, { title: '已入账金额(元)', index: 'recordedAmount', className: 'text-center', width: 180, type: 'currency' },
{ title: '代缴个税(元)', render: 'approvalStatus1', className: 'text-center', width: 180 }, { title: '代缴个税(元)', index: 'taxPersonalSum', className: 'text-center', width: 180, type: 'currency' },
{ title: '待入账金额(元)', render: 'amount', className: 'text-right', width: 180 }, { title: '待入账金额(元)', index: 'waitRecordedAmount', className: 'text-right', width: 180, type: 'currency' },
{ {
title: '操作', className: 'text-center', width: 300, title: '操作', className: 'text-center', width: 300,
buttons: [ buttons: [
@ -96,8 +100,8 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
initBillDetailST() { initBillDetailST() {
this.billDetailColumns = [ this.billDetailColumns = [
{ title: '账单月份', index: 'carNo', className: 'text-center', width: '40%' }, { title: '账单月份', render: 'month', className: 'text-center', width: '40%' },
{ title: '返佣金额(元)', render: 'amount', className: 'text-center', width: '40%' }, { title: '返佣金额(元)', render: 'profitAmountSum', className: 'text-center', width: '40%' },
{ {
title: '操作', className: 'text-center', width: '20%', buttons: [ title: '操作', className: 'text-center', width: '20%', buttons: [
{ {
@ -122,6 +126,19 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
search() { search() {
this.st.load(1); this.st.load(1);
} }
/**
* 获取账单明细
*/
getBillDetail(ltdId: string) {
this.service.request(this.service.$api_get_bill_detail, { ltdId }).subscribe(res => {
if (res) {
this.billDetailList = res;
}
})
}
export() { } export() { }
/** /**
@ -137,10 +154,23 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
* @param record 当前行 * @param record 当前行
*/ */
viewAccountDetail(record: any) { viewAccountDetail(record: any) {
this.billDetailColumns = [];
this.showBillDetail = true; this.showBillDetail = true;
this.initBillDetailST();
this.getBillDetail(record?.ltdId);
} }
getInvoiceSummary() {
this.service.request(this.service.$api_get_invoice_summary, { partnerId: this.roleId }).subscribe(res => {
if (res) {
this.summaryObj = res;
}
})
}
handleCancel() { handleCancel() {
this.showBillDetail = false; this.showBillDetail = false;
} }
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);

View File

@ -14,14 +14,25 @@
</div> </div>
</div> </div>
<div class="mt-sm"> <div class="mt-sm">
<st #st [data]="amService.$api_get_account_management_page" [columns]="columns" [columns]="columns" <st #st [data]="service. $api_get_virtual_detail_page" [columns]="columns" [columns]="columns"
[scroll]="{ x: '1200px' }" [scroll]="{ x: '1200px' }"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="amService.http.loading"></st> [loading]="service.http.loading">
<ng-template st-row="allBalance" let-item>
<div class="text-right">
{{item.allBalance}}
</div>
</ng-template>
<ng-template st-row="availableBalance" let-item>
<div class="text-right">
{{item.availableBalance}}
</div>
</ng-template>
</st>
</div> </div>
</nz-card> </nz-card>
<div class="modal-footer text-center"> <div class="modal-footer text-center">
<button nz-button type="button" nzType="primary" (click)="close()">确定</button> <button nz-button type="button" nzType="primary" (click)="close()"> </button>
</div> </div>

View File

@ -1,4 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
@ -17,13 +18,16 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf') private readonly sf!: SFComponent; @ViewChild('sf') private readonly sf!: SFComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
id = ''; roleId = '';
_$expand = false; _$expand = false;
record = {};
constructor(public shipperservice: ShipperBaseService, public amService: AccountManagemantService, private modalRef: NzModalRef) { } constructor(public shipperservice: ShipperBaseService, public service: AccountManagemantService,
private modalRef: NzModalRef, public router: Router) {
}
get reqParams() { get reqParams() {
return { ...this.sf?.value }; return { ...this.sf?.value, roleId: this.roleId };
} }
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.initSF();
@ -36,21 +40,21 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
_$expand: { _$expand: {
type: 'boolean', ui: { hidden: true } type: 'boolean', ui: { hidden: true }
}, },
abnormalCause: { userName: {
title: '合伙人名称', title: '合伙人名称',
type: 'string', type: 'string',
ui: { ui: {
placeholder: '请输入', placeholder: '请输入',
}, },
}, },
abnormalCause1: { phone: {
title: '手机号', title: '手机号',
type: 'string', type: 'string',
ui: { ui: {
placeholder: '请输入', placeholder: '请输入',
}, },
}, },
abnormalCause2: { ltdId: {
title: '网络货运人', title: '网络货运人',
type: 'string', type: 'string',
default: '', default: '',
@ -79,7 +83,7 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
}, },
}, },
}, },
abnormalCause3: { virtualAccount: {
title: '虚拟账户', title: '虚拟账户',
type: 'string', type: 'string',
ui: { ui: {
@ -112,16 +116,15 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
*/ */
initST() { initST() {
this.columns = [ this.columns = [
{ title: '合伙人', index: 'carNo', className: 'text-center', width: 200 }, { title: '合伙人', index: 'name', className: 'text-center', width: 200 },
{ title: '手机号', render: 'carModelLabel', className: 'text-center', width: 150 }, { title: '手机号', index: 'phone', className: 'text-center', width: 150 },
{ title: '网络货运人', render: 'carModelLabel', className: 'text-center', width: 200 }, { title: '网络货运人', index: 'ltdName', className: 'text-center', width: 200 },
{ title: '银行类型', render: 'carModelLabel', className: 'text-center', width: 120 }, { title: '银行类型', index: 'bankTypeLabel', className: 'text-center', width: 120 },
{ title: '虚拟账户', render: 'carModelLabel', className: 'text-center', width: 180 }, { title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 180 },
{ title: '可用余额', render: 'approvalStatus1', className: 'text-right', width: 180 }, { title: '可用余额', render: 'availableBalance', className: 'text-center', width: 180 },
{ title: '账户总余额', render: 'approvalStatus2', className: 'text-right', width: 180 }, { title: '账户总余额', render: 'allBalance', className: 'text-center', width: 180 },
{ title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', width: 180 }, { title: '创建时间', index: 'createTime', className: 'text-center', width: 200 },
{ title: '创建时间', index: 'approvalStatus4', className: 'text-center', width: 200 }, { title: '状态', index: 'stateDeletedLabel', className: 'text-center', width: 120 },
{ title: '状态', index: 'approvalStatus4', className: 'text-center', width: 120 },
{ {
title: '操作', title: '操作',
width: 120, width: 120,
@ -164,7 +167,14 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
* @param _record 当前行信息 * @param _record 当前行信息
*/ */
viewDetail(_record: any) { viewDetail(_record: any) {
window.open(location.origin + `/#/partner/account-management/am/detail/${_record?.id}`); // this.router.navigate([`/partner/account-management/am/detail/${_record?.roleId}`], {
// queryParams: {
// channelSource: _record?.accountType,
// bankType: _record?.bankType,
// ltdId: _record?.ltdId
// }
// });
window.open(location.origin + `/#/partner/account-management/am/detail/${_record?.roleId}?ltdId=${_record?.ltdId}&channelSource=${_record?.accountType}&bankType=${_record?.bankType}`);
} }
close() { close() {

View File

@ -41,7 +41,7 @@
</div> </div>
</ng-template> </ng-template>
<st #st [data]="service.$api_get_refund_page" [columns]="columns" [req]="{ process: beforeReq }" <st #st [data]="amService.$api_get_withdraw_record_page" [columns]="columns" [req]="{ process: beforeReq }"
[loading]="service.http.loading" [scroll]="{ x:'1200px' }" (change)="stChange($event)" [loading]="service.http.loading" [scroll]="{ x:'1200px' }" (change)="stChange($event)"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }" [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
[page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }"> [page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }">

View File

@ -5,6 +5,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
import Big from 'src/app/shared/utils/deal-precision'; import Big from 'src/app/shared/utils/deal-precision';
import { AccountManagemantService } from '../../services/account-managemant.service';
@Component({ @Component({
@ -27,7 +28,7 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni
refundStatus: any = ''; refundStatus: any = '';
msg = ''; 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 { } ngOnInit(): void { }
@ -280,13 +281,13 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni
{ title: '提现单号', index: 'refundApplyCode', width: 180, className: 'text-center' }, { title: '提现单号', index: 'refundApplyCode', width: 180, className: 'text-center' },
{ title: '网络货运人', index: 'ltdName', width: 220, 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: 'bankTypeLabel', width: 100, className: 'text-center' }, { title: '账户类型', index: 'accountTypeLabel', width: 100, className: 'text-center' },
{ title: '账户名称', index: 'bankAccountName', width: 220, className: 'text-center' }, { title: '账户名称', index: 'bankAccountName', width: 220, className: 'text-center' },
{ title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' },
{ {
title: '提现金额', title: '提现金额',
index: 'amount', index: 'amount',
width: 150, width: 200,
type: 'widget', type: 'widget',
className: 'text-right', className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) }

View File

@ -6,7 +6,16 @@ import { BaseService } from '@shared';
}) })
export class AccountManagemantService extends BaseService { export class AccountManagemantService extends BaseService {
$api_get_account_management_page = `/api/fcc/ficoBrmH/list/page`; $api_get_account_management_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceByOperator`; // 账户管理
$api_get_virtual_detail_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceInfoByOperator`;//虚拟账户明细
$api_get_withdraw_record_page = `/api/fcc/refundApplicationOBC/list/partnerPage`;// 提现记录
$api_get_account_detail_page = `/api/bpc/accountBalancePartner/getAccountBalancePartnerByOperatorPage`;// 账户明细
$api_get_account_detail_footer_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerIncomeDetailByOperator`;// 账户明细脚部汇总
$api_get_account_detail_header_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerAmountByOperator`;// 账户明细头部汇总
$api_get_bill_detail = `/api/bpc/partnerIncomeDetail/findPartnerWaitIncomeByOperator`; // 查看账单明细
$api_get_invoice_summary = `/api/bpc/partnerInvoiceEntry/oprationEntrySummary`; // 入账明细汇总
$api_get_invoice_detail_page = `/api/bpc/partnerInvoiceEntry/oprationEntryDetail`; // 待入账明细列表
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector) super(injector)
} }

View File

@ -0,0 +1,46 @@
<page-header-wrapper [title]="''" [logo]="logo" [content]="headerContent">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
<ng-template #headerContent>
<div nz-row class="head-box">
<div nz-col nzSpan="1">
<img src="./assets/images/usercenter/拉货车.png" alt="" />
</div>
<div nz-col nzSpan="11" class="pl-lg">
<div class="right-h">深圳市XXXXXXX有限公司</div>
<div class="right-s">91440300357887492H</div>
<sv-container col="2" >
<sv label="联系人"> </sv>
<sv label="注册时间"> </sv>
<sv label="合同有效期"> </sv>
<sv label="运营主体"> </sv>
</sv-container>
</div>
<div nz-col nzSpan="10">
<div class="left-rt">待审核</div>
<div class="left-rb">
<button nz-button (click) ="reject()">拒绝</button>
<button nz-button nzType="primary" (click) ="approve()">通过</button>
</div>
</div>
</div>
</ng-template>
</page-header-wrapper>
<nz-card nzTitle="建议反馈">
<div nz-row>
<div nz-col nzSpan="12">
<sv-container col="1" labelWidth="120">
<sv label="问题类型"> </sv>
<sv label="描述或内容建议"> </sv>
<sv label="图片"> </sv>
<sv label="提交时间"> </sv>
</sv-container>
</div>
</div>
</nz-card>

View File

@ -0,0 +1,29 @@
:host {
.head-box {
img {
width : 80px;
height : 80px;
padding: 8px;
}
.right-h {
font-size: 16px;
}
.right-s {
color: #7f7f7f;
}
.left-rt {
font-weight: bold;
font-size : 16px;
text-align : right;
}
.left-rb {
display : flex;
justify-content: flex-end;
padding-top : 16px;
}
}
}

View File

@ -0,0 +1,71 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ParterClaimAuditListChannelApproveComponent } from '../../../claim-audit/components/channel-approve/channel-approve.component';
import { ParterClaimAuditListChannelRejectComponent } from '../../../claim-audit/components/channel-reject/channel-reject.component';
import { AdviceFeedbackService } from '../../services/advice-feedback.service';
// import { ParterClaimAuditListChannelApproveComponent } from '../channel-approve/channel-approve.component';
// import { ParterClaimAuditListChannelRejectComponent } from '../channel-reject/channel-reject.component';
@Component({
selector: 'app-parter-feedback-detail-detail',
templateUrl: './feedback-detail.component.html',
styleUrls: ['./feedback-detail.component.less']
})
export class ParterAdviceFeedbackDetailComponent implements OnInit {
id = this.route.snapshot.queryParams.id;
i: any;
imges: any;
isVisible = false;
constructor(
private route: ActivatedRoute,
private msgSrv: NzMessageService,
public service: AdviceFeedbackService,
private modalService: NzModalService,
private router: Router
) {}
ngOnInit(): void {
this.initData();
}
initData() {
// this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
// if (res) {
// this.i = res;
//
// }
// });
}
approve() {
const modalRef = this.modalService.create({
nzTitle: '同意',
nzWidth: 700,
nzContent: ParterClaimAuditListChannelApproveComponent,
nzComponentParams: {
i: this.i
},
nzFooter: null
});
}
reject() {
const modalRef = this.modalService.create({
nzTitle: '拒绝',
nzWidth: 700,
nzContent: ParterClaimAuditListChannelRejectComponent,
nzComponentParams: {
i: this.i
},
nzFooter: null
});
}
goBack() {
window.history.go(-1);
}
}

View File

@ -0,0 +1,47 @@
<page-header-wrapper [title]="''"></page-header-wrapper>
<!-- 搜索表单 -->
<nz-card>
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf
#sf
[schema]="schema"
[ui]="ui"
[mode]="'search'"
[loading]="service.http.loading"
(formSubmit)="search()"
(formReset)="resetSF()"
></sf>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="search()" >查询</button>
<button nz-button (click)="resetSF()" >重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div>
</nz-card>
<nz-card>
<st
#st1
[data]="data"
[columns]="columns1"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loadingDelay]="500"
[loading]="service.http.loading"
>
</st>
</nz-card>

View File

@ -0,0 +1,228 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { processSingleSort } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { AdviceFeedbackService } from '../../services/advice-feedback.service';
@Component({
selector: 'app-parter-advice-feedback',
templateUrl: './list.component.html'
})
export class ParterAdviceFeedbackListComponent implements OnInit {
schema: SFSchema = {};
columns1!: STColumn[];
columns2!: STColumn[];
@ViewChild('st1', { static: false })
st1!: STComponent;
ui!: SFUISchema;
@ViewChild('sf', { static: false })
sf!: SFComponent;
_$expand = false;
selectedIndex = 0;
data=[{name1:1111}]
constructor(
public router: Router,
public ar: ActivatedRoute,
public service: AdviceFeedbackService,
private modalService: NzModalService
) {}
/**
* 查询参数
*/
get reqParams() {
return { ...this.sf?.value };
}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
ngOnInit() {
this.initSF();
this.initST1();
this.initST2();
}
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
name: {
type: 'string',
title: '提交人'
},
name1: {
type: 'string',
title: '企业管理员'
},
name2: {
type: 'string',
title: '角色'
},
name3: {
type: 'string',
title: '问题类型',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
name4: {
type: 'string',
title: '状态',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
}
};
this.ui = {
'*': {
grid: { span: 8, gutter: 4 }
}
};
}
initST1() {
this.columns1 = [
{
title: '提交人',
index: 'name1'
},
{
title: '企业管理员',
index: 'name1'
},
{
title: '手机号',
index: 'name1'
},
{
title: '角色',
index: 'name1'
},
{
title: '问题类型',
index: 'name1'
},
{
title: '描述或建议',
index: 'name1'
},
{
title: '状态',
index: 'name1'
},
{
title: '提交时间',
index: 'name1'
},
{
title: '操作',
className: 'text-center',
buttons: [
{
text: '详情',
click: (_record, _modal, _instance) => this.partnerView(_record),
},
{
text: '处理',
click: (_record, _modal, _instance) => this.partnerView(_record),
},
]
}
];
}
initST2() {
this.columns2 = [
{
title: '提交人',
index: 'name1'
},
{
title: '客户名称',
index: 'name1'
},
{
title: '认领备注',
index: 'name1'
},
{
title: 'CRM状态',
index: 'name1'
},
{
title: '平台审核状态',
index: 'name1'
},
{
title: '提交时间',
index: 'name1'
},
{
title: '操作',
className: 'text-center',
buttons: [
{
text: '详情',
click: (_record, _modal, _instance) => this.channelView(_record),
},
{
text: '审核',
click: (_record, _modal, _instance) => this.channelView(_record),
},
]
}
];
}
partnerView(record: STData) {
this.router.navigate(['/partner/advice-feedback/detail'], { queryParams: {} });
}
channelView(record: STData) {
this.router.navigate(['/partner/advice-feedback/detail'], { queryParams: {} });
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
}
search() {
// this.st1?.load(1);
}
tabChange(index:any){
console.log(index)
switch (index) {
case 0:
this.initST1();
break;
case 1:
this.initST2();
break;
default:
break;
}
}
}

View File

@ -0,0 +1,12 @@
import { Injectable, Injector } from '@angular/core';
import { BaseService } from '@shared';
@Injectable({
providedIn: 'root',
})
export class AdviceFeedbackService extends BaseService {
constructor(public injector: Injector) {
super(injector);
}
}

View File

@ -1,6 +1,6 @@
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; import { SFAutoCompleteWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
@ -38,18 +38,37 @@ export class ParterChannelSalesEditComponent implements OnInit {
title: '', title: '',
ui: { hidden: true } ui: { hidden: true }
}, },
name1: { name: {
title: '业务员选择', title: '渠道销售姓名',
type: 'string', type: 'string',
enum: [ maxLength: 12,
{ label: '王武', value: '1'},
],
ui: { ui: {
widget: 'select', placeholder:'请输入'
placeholder:'请选择' }
} as SFSelectWidgetSchema,
}, },
name2: { phoneNumber: {
title: '手机号',
type: 'string',
maxLength: 11,
ui: {
placeholder:'请输入'
}
},
employeeVO: {
title: '关联OA员工',
type: 'string',
ui: {
widget: 'autocomplete',
placeholder:'请选择',
asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe(
map((res: any) => {
console.log('111',res)
return [];
})
)
} as SFAutoCompleteWidgetSchema,
},
isAuthorization: {
type: 'string', type: 'string',
title: '授权登录运营后台', title: '授权登录运营后台',
enum: [ enum: [
@ -59,21 +78,32 @@ export class ParterChannelSalesEditComponent implements OnInit {
ui: { ui: {
widget: 'radio', widget: 'radio',
} as SFRadioWidgetSchema, } as SFRadioWidgetSchema,
default: 'A', default: '0',
}, },
name: { roleIds: {
title: '', title: '',
type: 'string', type: 'string',
enum: [
{ label: '管理员', value: '1'},
],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder:'授权角色', placeholder: '授权角色',
visibleIf: { name2: (value: string) => value === '1' } mode: 'multiple',
} as SFSelectWidgetSchema, maxMultipleCount: 5,
asyncData: () => {
return this.service.request(this.service.$api_getAppRoleList).pipe(
map((res: any) => {
return res
.filter((role: any) => role.roleCode !== 'Administrator')
.map((item: any) => {
return { label: item.roleName, value: item.id };
});
})
);
},
visibleIf: { isAuthorization: (value: string) => value === '1' }
},
}, },
name3: { remark: {
type: 'string', type: 'string',
title: '备注', title: '备注',
maxLength: 50, maxLength: 50,
@ -84,15 +114,16 @@ export class ParterChannelSalesEditComponent implements OnInit {
} as SFTextareaWidgetSchema, } as SFTextareaWidgetSchema,
}, },
}, },
required: ['name1', 'name2'] required: ['name', 'phoneNumber', 'employeeVO', 'roleIds', 'remark']
}; };
this.ui = { this.ui = {
'*': { '*': {
spanLabelFixed: 150, spanLabelFixed: 150,
grid: { span: 24 } grid: { span: 24 }
}, },
$name:{ spanLabelFixed: 10, grid: { span: 12 }}, $isAuthorization:{ grid: { span: 12 }},
$name2:{ grid: { span: 12 }}, $roleIds:{ spanLabelFixed: 10, grid: { span: 12 }},
}; };
} }
@ -103,12 +134,12 @@ export class ParterChannelSalesEditComponent implements OnInit {
save() { save() {
this.sf.validator({ emitError: true }); this.sf.validator({ emitError: true });
if(!this.sf.valid) return; if(!this.sf.valid) return;
// this.service.request('', { ...this.sf.value }).subscribe(res => { this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => {
// if (res) { if (res) {
// this.modalRef.destroy(true); this.modalRef.destroy(true);
// } else { } else {
// this.service.msgSrv.error(res.msg); this.service.msgSrv.error(res.msg);
// } }
// }); });
} }
} }

View File

@ -15,7 +15,7 @@
<!-- 数据列表 --> <!-- 数据列表 -->
<st <st
#st #st
[data]="data" [data]="service.$api_getPage"
[columns]="columns" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"

View File

@ -47,7 +47,7 @@ export class ParterChannelSalesListComponent implements OnInit {
type: 'string', type: 'string',
title: '销售渠道姓名' title: '销售渠道姓名'
}, },
phone: { telephone: {
type: 'string', type: 'string',
title: '手机号' title: '手机号'
}, },
@ -64,31 +64,31 @@ export class ParterChannelSalesListComponent implements OnInit {
this.columns = [ this.columns = [
{ {
title: '销售渠道姓名', title: '销售渠道姓名',
index: 'name1' index: 'name'
}, },
{ {
title: '手机号', title: '手机号',
index: 'name1' index: 'telephone'
}, },
{ {
title: '所属组织', title: '所属组织',
index: 'name1' index: 'organLable'
}, },
{ {
title: '职级', title: '职级',
index: 'name1' index: 'station'
}, },
{ {
title: '等级', title: '等级',
index: 'name1' index: 'postLevel'
}, },
{ {
title: '省市', title: '省市',
index: 'name1' index: 'residencePlace'
}, },
{ {
title: '邀请码', title: '邀请码',
index: 'name1' index: 'inviteCode'
}, },
{ {
title: '操作', title: '操作',

View File

@ -5,6 +5,17 @@ import { BaseService } from '@shared';
providedIn: 'root', providedIn: 'root',
}) })
export class ChannelSalesService extends BaseService { export class ChannelSalesService extends BaseService {
// 保存渠道销售管理
$api_save = '/api/mdc/channelSalesManagement/save';
// 查询渠道销售管理表
$api_getPage = '/api/mdc/channelSalesManagement/list/page';
// OA员工模糊查询
$api_fuzzyQuery = '/api/mdc/channelSalesManagement/fuzzyQuery';
// 获取角色列表
$api_getAppRoleList = '/api/mdc/cuc/roleInfo/getRoleList';
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector); super(injector);

View File

@ -20,7 +20,7 @@
.left-rb { .left-rb {
display: flex; display: flex;
justify-content: end; justify-content: flex-end;
padding-top: 16px; padding-top: 16px;
} }
} }

View File

@ -1,26 +1,29 @@
:host { :host {
.head-box { .head-box {
img { img {
width: 80px; width : 80px;
height: 80px; height : 80px;
padding: 8px; padding: 8px;
} }
.right-h{
.right-h {
font-size: 16px; font-size: 16px;
} }
.right-s{
.right-s {
color: #7f7f7f; color: #7f7f7f;
} }
.left-rt { .left-rt {
font-weight: bold; font-weight: bold;
font-size: 16px; font-size : 16px;
text-align: right; text-align : right;
} }
.left-rb { .left-rb {
display: flex; display : flex;
justify-content: end; justify-content: flex-end;
padding-top: 16px; padding-top : 16px;
} }
} }
} }

View File

@ -38,19 +38,15 @@ export class ParterLevelConfigEditComponent implements OnInit {
title: '', title: '',
ui: { hidden: true } ui: { hidden: true }
}, },
name: { gradeName: {
title: '合伙人等级', title: '等级名称',
type: 'string', type: 'string',
enum: [
{ label: '管理员', value: '1'},
],
ui: {
widget: 'select',
placeholder:'请选择',
visibleIf: { name2: (value: string) => value === '1' }
} as SFSelectWidgetSchema,
}, },
name3: { sortId: {
title: '排序',
type: 'string',
},
remark: {
type: 'string', type: 'string',
title: '备注', title: '备注',
maxLength: 50, maxLength: 50,
@ -61,7 +57,7 @@ export class ParterLevelConfigEditComponent implements OnInit {
} as SFTextareaWidgetSchema, } as SFTextareaWidgetSchema,
}, },
}, },
required: ['name1', 'name2'] required: ['gradeName', 'sortId', 'remark']
}; };
this.ui = { this.ui = {
'*': { '*': {
@ -77,12 +73,13 @@ export class ParterLevelConfigEditComponent implements OnInit {
save() { save() {
this.sf.validator({ emitError: true }); this.sf.validator({ emitError: true });
if(!this.sf.valid) return; if(!this.sf.valid) return;
// this.service.request('', { ...this.sf.value }).subscribe(res => { this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => {
// if (res) { if (res) {
// this.modalRef.destroy(true); this.service.msgSrv.success('保存成功!')
// } else { this.modalRef.destroy(true);
// this.service.msgSrv.error(res.msg); } else {
// } this.service.msgSrv.error(res.msg);
// }); }
});
} }
} }

View File

@ -15,7 +15,7 @@
<!-- 数据列表 --> <!-- 数据列表 -->
<st <st
#st #st
[data]="data" [data]="service.$api_getList"
[columns]="columns" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"

View File

@ -43,19 +43,24 @@ export class ParterLevelConfigListComponent implements OnInit {
initSF() { initSF() {
this.schema = { this.schema = {
properties: { properties: {
name: { gradeName: {
type: 'string', type: 'string',
title: '等级姓名' title: '等级姓名',
}, },
phone: { stateLocked: {
type: 'string', type: 'string',
title: '状态' title: '状态',
enum:[{label:'启用',value:'1'},{label:'禁用',value:'0'}],
ui:{
widget:'select',
}
}, },
} }
}; };
this.ui = { this.ui = {
'*': { '*': {
grid: { span: 8, gutter: 4 } width:300,
grid: { span: 12, gutter: 4 }
} }
}; };
} }
@ -64,23 +69,26 @@ export class ParterLevelConfigListComponent implements OnInit {
this.columns = [ this.columns = [
{ {
title: '等级姓名', title: '等级姓名',
index: 'name1' index: 'gradeName'
}, },
{ {
title: '备注', title: '备注',
index: 'name1' index: 'remark'
}, },
{ {
title: '创建时间', title: '创建时间',
index: 'name1' index: 'createTime'
}, },
{ {
title: '启用时间', title: '启用时间',
index: 'name1' index: 'enableTime'
}, },
{ {
title: '状态', title: '状态',
index: 'name1' index: 'stateLocked',
format: (item: any) => {
return item.stateLocked ? '禁用':'启用'
}
}, },
{ {
title: '操作', title: '操作',
@ -93,10 +101,12 @@ export class ParterLevelConfigListComponent implements OnInit {
{ {
text: '禁用', text: '禁用',
click: (_record, _modal, _instance) => this.stop(_record), click: (_record, _modal, _instance) => this.stop(_record),
iif:(item)=>!item.stateLocked
}, },
{ {
text: '启用', text: '启用',
click: (_record, _modal, _instance) => this.restart(_record), click: (_record, _modal, _instance) => this.restart(_record),
iif:(item)=>item.stateLocked
} }
] ]
} }
@ -141,30 +151,30 @@ export class ParterLevelConfigListComponent implements OnInit {
}); });
} }
restart(id: any) { restart(item: any) {
this.modalService.confirm({ this.modalService.confirm({
nzTitle: '<i>冻结确认</i>', nzTitle: '<i>冻结确认</i>',
nzContent: `<b>确定启用该账号吗?</br>`, nzContent: `<b>确定启用该账号吗?</br>`,
// nzOnOk: () => nzOnOk: () =>
// this.service.request('', '').subscribe(res => { this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => {
// if (res) { if (res) {
// this.service.msgSrv.success('冻结成功!'); this.service.msgSrv.success('启用成功!');
// this.st.reload(); this.st.reload();
// } }
// }) })
}); });
} }
stop(id: any) { stop(item: any) {
this.modalService.confirm({ this.modalService.confirm({
nzTitle: '<i>冻结确认</i>', nzTitle: '<i>冻结确认</i>',
nzContent: `<b>确定禁用该账号吗?</br>`, nzContent: `<b>确定禁用该账号吗?</br>`,
// nzOnOk: () => nzOnOk: () =>
// this.service.request('', '').subscribe(res => { this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => {
// if (res) { if (res) {
// this.service.msgSrv.success('冻结成功!'); this.service.msgSrv.success('冻结成功!');
// this.st.reload(); this.st.reload();
// } }
// }) })
}); });
} }

View File

@ -5,6 +5,16 @@ import { BaseService } from '@shared';
providedIn: 'root', providedIn: 'root',
}) })
export class ChannelSalesService extends BaseService { export class ChannelSalesService extends BaseService {
// 查询合伙人等级配置表
$api_getList = '/api/mdc/partnerGradeConfig/list/page';
// 获取合伙人等级配置表
$api_getPartnerGradeConfig = '/api/mdc/partnerGradeConfig/get';
// 保存合伙人等级配置表
$api_save = '/api/mdc/partnerGradeConfig/save';
// 删除合伙人等级配置表
$api_del = '/api/mdc/partnerGradeConfig/deletebatch';
// 启用/禁用等级配置
$api_updatePartnerGradeConfig = '/api/mdc/partnerGradeConfig/updatePartnerGradeConfig';
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector); super(injector);

View File

@ -15,17 +15,17 @@
<div class="pr">万元</div> <div class="pr">万元</div>
</ng-template> </ng-template>
<!-- 企业法人信息 --> <!-- 企业法人信息 -->
<ng-template sf-template="legalPersonIdentityDTO/_legalPersontitle" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="legalPersonIdentity/_legalPersontitle" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">营业执照法人信息</div> <div class="form-title" style="margin-top: 40px; margin-left: -180px">营业执照法人信息</div>
</ng-template> </ng-template>
<ng-template sf-template="legalPersonIdentityDTO/_certificatePhototips" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="legalPersonIdentity/_certificatePhototips" let-me let-ui="ui" let-schema="schema">
<div class="pr"> <div class="pr">
<div>请上传身份证原件的高清照片,若上传复印件,则需申请人签字;</div> <div>请上传身份证原件的高清照片,若上传复印件,则需申请人签字;</div>
<div>上传后系统会自动识别并填写</div> <div>上传后系统会自动识别并填写</div>
</div> </div>
</ng-template> </ng-template>
<ng-template sf-template="legalPersonIdentityDTO/_certificatePhotoExmplateA" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="legalPersonIdentity/_certificatePhotoExmplateA" let-me let-ui="ui" let-schema="schema">
<div class="pr"> <div class="pr">
<dl class="tips"> <dl class="tips">
<dt>正面照(人像面)</dt> <dt>正面照(人像面)</dt>
@ -34,7 +34,7 @@
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-front.png" /></div> <div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-front.png" /></div>
</div> </div>
</ng-template> </ng-template>
<ng-template sf-template="legalPersonIdentityDTO/_certificatePhotoExmplateB" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="legalPersonIdentity/_certificatePhotoExmplateB" let-me let-ui="ui" let-schema="schema">
<div class="pr"> <div class="pr">
<dl class="tips"> <dl class="tips">
<dt>背面照(国徽面)</dt> <dt>背面照(国徽面)</dt>
@ -45,8 +45,8 @@
</ng-template> </ng-template>
<!-- 企业管理员信息 --> <!-- 企业管理员信息 -->
<ng-template sf-template="adminUserInfo/_adminTitle" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="_adminTitle" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">企业管理员信息</div> <div class="form-title" style="margin-top: 40px; margin-left: -180px">企业管理员信息</div>
</ng-template> </ng-template>
<ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsA" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsA" let-me let-ui="ui" let-schema="schema">
<div class="pr"> <div class="pr">
@ -69,19 +69,17 @@
<!-- 所属城市 --> <!-- 所属城市 -->
<ng-template sf-template="_addressTitle" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="_addressTitle" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">所属城市</div> <div class="form-title" style="margin-top: 40px; margin-left: -180px">所属城市</div>
</ng-template> </ng-template>
<!-- 渠道销售 --> <!-- 渠道销售 -->
<ng-template sf-template="_channelTitle" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="_channelTitle" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">渠道销售</div> <div class="form-title" style="margin-top: 40px; margin-left: -180px">渠道销售</div>
</ng-template> </ng-template>
</sf> </sf>
<div style="display: flex; justify-content: center">
<div style="display: flex;justify-content: center;"> <button nz-button type="button" nzType="primary" (click)="submitForm()" [nzLoading]="service.http.loading">确认新增</button>
<button nz-button type="button" nzType="primary" (click)="submitForm()"
[nzLoading]="service.http.loading">确认新增</button>
<button nz-button (click)="goBack()">返回</button> <button nz-button (click)="goBack()">返回</button>
</div> </div>
</nz-card> </nz-card>

View File

@ -1,19 +1,19 @@
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 { apiConf } from '@conf/api.conf';
import { import {
SFUploadWidgetSchema, SFUploadWidgetSchema,
SFComponent, SFComponent,
SFSchema, SFSchema,
SFUISchema, SFUISchema,
SFCascaderWidgetSchema,
SFTextareaWidgetSchema,
SFDateWidgetSchema, SFDateWidgetSchema,
SFCheckboxWidgetSchema, SFCheckboxWidgetSchema,
SFTreeSelectWidgetSchema SFTreeSelectWidgetSchema
} from '@delon/form'; } from '@delon/form';
import { NzTreeNode } from 'ng-zorro-antd/tree';
import { NzUploadFile } from 'ng-zorro-antd/upload'; import { NzUploadFile } from 'ng-zorro-antd/upload';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { PartnerListService } from '../../services/partner-list.service'; import { PartnerListService } from '../../services/partner-list.service';
const IMAGECONFIG = { const IMAGECONFIG = {
@ -43,7 +43,7 @@ const DATECONFIG = {
templateUrl: './add-etp-partner.component.html', templateUrl: './add-etp-partner.component.html',
styleUrls: ['./add-etp-partner.component.less'] styleUrls: ['./add-etp-partner.component.less']
}) })
export class AddEtpPartnerComponent implements OnInit { export class AddEtpPartnerComponent {
@ViewChild('sf', { static: false }) @ViewChild('sf', { static: false })
sf!: SFComponent; sf!: SFComponent;
schema: SFSchema = this.initBasicInfoSF(); schema: SFSchema = this.initBasicInfoSF();
@ -64,66 +64,54 @@ export class AddEtpPartnerComponent implements OnInit {
} }
}; };
constructor(private router: Router, public service: PartnerListService) {} constructor(public service: PartnerListService) {}
ngOnInit() {}
submitForm() { submitForm() {
if (!this.sf.valid ) { if (!this.sf.valid) {
this.sf.validator({ emitError: true }); this.sf.validator({ emitError: true });
this.service.msgSrv.warning('请修改填写错误信息'); this.service.msgSrv.warning('请修改填写错误信息');
return; return;
} }
const enterpriseRegistrationTime = new Date(this.sf.value.enterpriseRegistrationTime); if (this.sf.value.cityCodesList?.length > 3) {
const operatingStartTime = new Date(this.sf.value.operatingStartTime); this.sf.validator({ emitError: true });
if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) { this.service.msgSrv.warning('所属城市不能超过3个');
this.service.msgSrv.warning('营业期限不能小于成立日期');
return; return;
} }
if (this.sf.value.operatingEndTime) { // 校验企业营业期限
const operatingEndTime = new Date(this.sf.value.operatingEndTime); const operatingStartTime = new Date(this.sf.value.operatingStartTime);
if (operatingStartTime.getTime() > operatingEndTime.getTime()) { const operatingEndTime = new Date(this.sf.value.operatingEndTime);
this.service.msgSrv.warning('营业期限不能小于期限开始日期'); if (operatingStartTime.getTime() > operatingEndTime.getTime()) {
return; this.service.msgSrv.warning('营业截止日期不能小于开始日期');
} return;
} }
const validStartTime = new Date(this.sf.value.legalPersonIdentityDTO.validStartTime); // 校验法人证件有效期限
if (this.sf.value.legalPersonIdentityDTO.validEndTime) { if (this.sf.value.legalPersonIdentity.validEndTime) {
const validEndTime = new Date(this.sf.value.legalPersonIdentityDTO.validEndTime); const validStartTime = new Date(this.sf.value.legalPersonIdentity.validStartTime);
const validEndTime = new Date(this.sf.value.legalPersonIdentity.validEndTime);
if (validStartTime.getTime() > validEndTime.getTime()) { if (validStartTime.getTime() > validEndTime.getTime()) {
this.service.msgSrv.warning('法人证件有效截止日期小于开始日期'); this.service.msgSrv.warning('法人证件有效截止日期不能小于开始日期');
return; return;
} }
} }
const sfVlaue = this.sf.value; // 校验管理员证件有效期限
const params = {}; if (this.sf.value.adminUserInfo.validEndTime) {
Object.assign( const validStartTime = new Date(this.sf.value.adminUserInfo.validStartTime);
params, const validEndTime = new Date(this.sf.value.adminUserInfo.validEndTime);
{ ...this.sf.value }, if (validStartTime.getTime() > validEndTime.getTime()) {
{ this.service.msgSrv.warning('管理员证件有效截止日期小于开始日期');
enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2], return;
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 => { const params = {};
// if (res) { Object.assign(params, { ...this.sf.value, source: 2 });
// this.service.msgSrv.success('企业新增成功'); // console.log(params);
// this.goBack();
// } this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => {
// }); if (res) {
this.service.msgSrv.success('新增企业合伙人成功');
this.goBack();
}
});
} }
/* /*
@ -146,23 +134,23 @@ export class AddEtpPartnerComponent implements OnInit {
if (isFront === 'front') { if (isFront === 'front') {
// 正面 // 正面
if (res.name) { if (res.name) {
this.sf.setValue('/legalPersonIdentityDTO/name', res.name); this.sf.setValue('/legalPersonIdentity/name', res.name);
} }
if (res.number) { if (res.number) {
this.sf.setValue('/legalPersonIdentityDTO/certificateType', 0); this.sf.setValue('/legalPersonIdentity/certificateType', 0);
this.sf.setValue('/legalPersonIdentityDTO/certificateNumber', res.number); this.sf.setValue('/legalPersonIdentity/certificateNumber', res.number);
} }
} }
if (isFront === 'back') { if (isFront === 'back') {
// 背面 // 背面
if (res.validFrom) { if (res.validFrom) {
this.sf.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom); this.sf.setValue('/legalPersonIdentity/validStartTime', res.validFrom);
} }
if (res.validTo) { if (res.validTo) {
this.sf.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo); this.sf.setValue('/legalPersonIdentity/validEndTime', res.validTo);
this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', false); this.sf.setValue('/legalPersonIdentity/_isLoingDate', false);
} else { } else {
this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', true); this.sf.setValue('/legalPersonIdentity/_isLoingDate', true);
} }
} }
} }
@ -171,10 +159,22 @@ export class AddEtpPartnerComponent implements OnInit {
if (isFront === 'front') { if (isFront === 'front') {
// 正面 // 正面
if (res.name) { if (res.name) {
this.sf.setValue('/name', res.name); this.sf.setValue('/adminUserInfo/name', res.name);
} }
if (res.number) { if (res.number) {
this.sf.setValue('/certificateNumber', res.number); this.sf.setValue('/adminUserInfo/certificateNumber', res.number);
}
}
if (isFront === 'back') {
// 背面
if (res.validFrom) {
this.sf.setValue('/adminUserInfo/validStartTime', res.validFrom);
}
if (res.validTo) {
this.sf.setValue('/adminUserInfo/validEndTime', res.validTo);
this.sf.setValue('/adminUserInfo/_isLoingDate', false);
} else {
this.sf.setValue('/adminUserInfo/_isLoingDate', true);
} }
} }
} }
@ -192,29 +192,15 @@ export class AddEtpPartnerComponent implements OnInit {
if (res.name) { if (res.name) {
this.sf.setValue('/enterpriseName', res.name); this.sf.setValue('/enterpriseName', res.name);
} }
if (res.type) {
this.sf.setValue('/enterpriseType', res.type);
}
if (res.addressRegionCodes) {
this.sf.setValue('/enterpriseAddressCode', res.addressRegionCodes);
}
if (res.address) {
this.sf.setValue('/enterpriseAddress', res.address);
}
if (res.foundDate) {
this.sf.setValue('/enterpriseRegistrationTime', res.foundDate);
}
if (res.businessTermStartDate) { if (res.businessTermStartDate) {
this.sf.setValue('/operatingStartTime', res.businessTermStartDate); this.sf.setValue('/operatingStartTime', res.businessTermStartDate);
} }
if (res.businessTermEndDate) { if (res.businessTermEndDate) {
this.sf.setValue('/operatingEndTime', res.businessTermEndDate); this.sf.setValue('/operatingEndTime', res.businessTermEndDate);
this.sf.setValue('/_isLoingDate', false);
} else { } else {
this.sf.setValue('/_isLoingDate', true); this.sf.setValue('/_isLoingDate', true);
} }
if (res.businessScope) {
this.sf.setValue('/businessScope', res.businessScope);
}
} }
}); });
} }
@ -308,7 +294,7 @@ export class AddEtpPartnerComponent implements OnInit {
}, },
// 法人信息 // 法人信息
legalPersonIdentityDTO: { legalPersonIdentity: {
type: 'object', type: 'object',
properties: { properties: {
_legalPersontitle: { title: '', type: 'string', ui: { widget: 'custom' } }, _legalPersontitle: { title: '', type: 'string', ui: { widget: 'custom' } },
@ -322,7 +308,7 @@ export class AddEtpPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/legalPersonIdentity/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1);
} }
} }
@ -339,7 +325,7 @@ export class AddEtpPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/legalPersonIdentity/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1);
} }
} }
@ -404,7 +390,7 @@ export class AddEtpPartnerComponent implements OnInit {
required: '请选择截止日期' required: '请选择截止日期'
}, },
change: i => { change: i => {
this.sf?.setValue('/legalPersonIdentityDTO/_isLoingDate', false); this.sf?.setValue('/legalPersonIdentity/_isLoingDate', false);
} }
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
@ -416,7 +402,7 @@ export class AddEtpPartnerComponent implements OnInit {
grid: { span: 6 }, grid: { span: 6 },
class: 'input-back', class: 'input-back',
widget: 'checkbox', widget: 'checkbox',
change: i => this.sf?.setValue('/legalPersonIdentityDTO/validEndTime', null) change: i => this.sf?.setValue('/legalPersonIdentity/validEndTime', null)
} as SFCheckboxWidgetSchema } as SFCheckboxWidgetSchema
} }
}, },
@ -430,23 +416,23 @@ export class AddEtpPartnerComponent implements OnInit {
'validStartTime' 'validStartTime'
] ]
}, },
_adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
adminMobile: {
title: ' 企业管理员手机号',
type: 'string',
minLength: 1,
format: 'mobile',
maxLength: 11,
ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入企业管理员手机号',
errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' }
}
},
// 企业管理员信息 // 企业管理员信息
adminUserInfo: { adminUserInfo: {
type: 'object', type: 'object',
properties: { 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: { _adminCertificatePhotoTipsA: {
title: '企业管理员证件照', title: '企业管理员证件照',
type: 'string', type: 'string',
@ -465,7 +451,7 @@ export class AddEtpPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/adminUserInfo/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0);
} }
} }
@ -487,7 +473,8 @@ export class AddEtpPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/adminUserInfo/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 0);
} }
} }
} as SFUploadWidgetSchema } as SFUploadWidgetSchema
@ -512,7 +499,7 @@ export class AddEtpPartnerComponent implements OnInit {
placeholder: '请输入企业管理员身份证号' placeholder: '请输入企业管理员身份证号'
} }
}, },
operatingStartTime: { validStartTime: {
title: '身份证有效开始日期', title: '身份证有效开始日期',
type: 'string', type: 'string',
ui: { ui: {
@ -523,7 +510,7 @@ export class AddEtpPartnerComponent implements OnInit {
} }
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
operatingEndTime: { validEndTime: {
title: '身份证有效截止日期', title: '身份证有效截止日期',
type: 'string', type: 'string',
ui: { ui: {
@ -545,34 +532,38 @@ export class AddEtpPartnerComponent implements OnInit {
grid: { span: 6 }, grid: { span: 6 },
class: 'input-back', class: 'input-back',
widget: 'checkbox', widget: 'checkbox',
change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null) change: i => this.sf?.setValue('/adminUserInfo/validEndTime', null)
} as SFCheckboxWidgetSchema } as SFCheckboxWidgetSchema
} }
}, },
required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber','operatingStartTime'] required: ['_adminCertificatePhotoTipsA', 'name', 'certificateNumber', 'operatingStartTime']
}, },
// 所属城市 // 所属城市
_addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, _addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
status3: { cityCodesList: {
type: 'string', type: 'string',
title: '所属城市', title: '所属城市',
default: ['WAIT_BUYER_PAY', 'TRADE_FINISHED'],
ui: { ui: {
widget: 'tree-select', widget: 'tree-select',
grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请选择城市(最多3个)', placeholder: '请选择城市(最多3个)',
checkable: true, checkable: true,
class: 'city-tree-select',
asyncData: () => asyncData: () =>
of([ this.getRegionDetailByCode('').pipe(
{ title: '待支付', key: 'WAIT_BUYER_PAY' }, map((res: any) =>
{ title: '已支付', key: 'TRADE_SUCCESS' }, res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, disabled: true, isDisableCheckbox: true }))
{ title: '交易完成', key: 'TRADE_FINISHED' } )
]) ),
} as SFTreeSelectWidgetSchema, expandChange: ({ node }: { node: NzTreeNode }) =>
this.getRegionDetailByCode(node.key).pipe(
map((res: any) => res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, isLeaf: true })))
)
} as SFTreeSelectWidgetSchema
}, },
// 渠道销售 // 渠道销售
_channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, _channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
channel: { invitationCode: {
title: '渠道销售邀请码', title: '渠道销售邀请码',
type: 'string', type: 'string',
minLength: 1, minLength: 1,
@ -586,7 +577,16 @@ export class AddEtpPartnerComponent implements OnInit {
} }
} }
}, },
required: ['_licenseTips', 'licensePhotoWatermark', 'unifiedSocialCreditCode', 'enterpriseName', 'operatingStartTime', 'status3','channel'] required: [
'_licenseTips',
'licensePhotoWatermark',
'unifiedSocialCreditCode',
'enterpriseName',
'operatingStartTime',
'cityCodesList',
'adminMobile',
'invitationCode'
]
}; };
} }
} }

View File

@ -1,44 +1,42 @@
<page-header-wrapper [title]="'新增个人合伙人'"></page-header-wrapper> <page-header-wrapper [title]="'新增个人合伙人'"></page-header-wrapper>
<nz-card> <nz-card>
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'"> <sf #sf [ui]="ui" [schema]="schema" [button]="'none'">
<!-- 合伙人信息 --> <!-- 合伙人信息 -->
<ng-template sf-template="adminUserInfo/_adminTitle" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="adminUserInfo/_adminTitle" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">合伙人信息</div> <div class="form-title" style="margin-top: 40px; margin-left: -180px">合伙人信息</div>
</ng-template> </ng-template>
<ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsA" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsA" let-me let-ui="ui" let-schema="schema">
<div class="pr"> <div class="pr">
<dl class="tips"> <dl class="tips">
<dt>正面照(人像面)</dt> <dt>正面照(人像面)</dt>
<dd>示例</dd> <dd>示例</dd>
</dl> </dl>
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-front.png" /></div> <div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-front.png" /></div>
</div> </div>
</ng-template> </ng-template>
<ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsB" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsB" let-me let-ui="ui" let-schema="schema">
<div class="pr"> <div class="pr">
<dl class="tips"> <dl class="tips">
<dt>背面照(国徽面)</dt> <dt>背面照(国徽面)</dt>
<dd>示例</dd> <dd>示例</dd>
</dl> </dl>
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-back.png" /></div> <div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-back.png" /></div>
</div> </div>
</ng-template> </ng-template>
<!-- 所属城市 --> <!-- 所属城市 -->
<ng-template sf-template="_addressTitle" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="_addressTitle" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">所属城市</div> <div class="form-title" style="margin-top: 40px; margin-left: -180px">所属城市</div>
</ng-template> </ng-template>
<!-- 渠道销售 --> <!-- 渠道销售 -->
<ng-template sf-template="_channelTitle" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="_channelTitle" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">渠道销售</div> <div class="form-title" style="margin-top: 40px; margin-left: -180px">渠道销售</div>
</ng-template> </ng-template>
</sf> </sf>
<div style="display: flex; justify-content: center">
<div style="display: flex;justify-content: center;"> <button nz-button type="button" nzType="primary" (click)="submitForm()" [nzLoading]="service.http.loading">确认新增</button>
<button nz-button type="button" nzType="primary" (click)="submitForm()" <button nz-button (click)="goBack()">返回</button>
[nzLoading]="service.http.loading">确认新增</button> </div>
<button nz-button (click)="goBack()">返回</button> </nz-card>
</div>
</nz-card>

View File

@ -1,9 +1,20 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { apiConf } from '@conf/api.conf'; 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 { NzUploadFile } from 'ng-zorro-antd/upload';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { PartnerListService } from '../../services/partner-list.service'; import { PartnerListService } from '../../services/partner-list.service';
const IMAGECONFIG = { const IMAGECONFIG = {
@ -33,7 +44,7 @@ const DATECONFIG = {
templateUrl: './add-personal-partner.component.html', templateUrl: './add-personal-partner.component.html',
styleUrls: ['./add-personal-partner.component.less'] styleUrls: ['./add-personal-partner.component.less']
}) })
export class AddPersonalPartnerComponent implements OnInit { export class AddPersonalPartnerComponent {
@ViewChild('sf', { static: false }) @ViewChild('sf', { static: false })
sf!: SFComponent; sf!: SFComponent;
schema: SFSchema = this.initBasicInfoSF(); schema: SFSchema = this.initBasicInfoSF();
@ -55,7 +66,6 @@ export class AddPersonalPartnerComponent implements OnInit {
}; };
constructor(private router: Router, public service: PartnerListService) {} constructor(private router: Router, public service: PartnerListService) {}
ngOnInit() {}
submitForm() { submitForm() {
if (!this.sf.valid) { if (!this.sf.valid) {
@ -63,57 +73,28 @@ export class AddPersonalPartnerComponent implements OnInit {
this.service.msgSrv.warning('请修改填写错误信息'); this.service.msgSrv.warning('请修改填写错误信息');
return; return;
} }
const enterpriseRegistrationTime = new Date(this.sf.value.enterpriseRegistrationTime); if (this.sf.value.cityCodesList?.length > 3) {
const operatingStartTime = new Date(this.sf.value.operatingStartTime); this.sf.validator({ emitError: true });
if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) { this.service.msgSrv.warning('所属城市不能超过3个');
this.service.msgSrv.warning('营业期限不能小于成立日期');
return; return;
} }
if (this.sf.value.operatingEndTime) { if (this.sf.value.validEndTime) {
const operatingEndTime = new Date(this.sf.value.operatingEndTime); const validStartTime = new Date(this.sf.value.validStartTime);
if (operatingStartTime.getTime() > operatingEndTime.getTime()) { const validEndTime = new Date(this.sf.value.validEndTime);
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()) { if (validStartTime.getTime() > validEndTime.getTime()) {
this.service.msgSrv.warning('法人证件有效截止日期小于开始日期'); this.service.msgSrv.warning('身份证有效截止日期不能小于开始日期');
return; return;
} }
} }
const sfVlaue = this.sf.value;
const params = {}; const params = {};
Object.assign( Object.assign(params, { ...this.sf.value, source: 2 });
params,
{ ...this.sf.value }, this.service.request(this.service.$api_save_personal_partner, params).subscribe(res => {
{ if (res) {
enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2], this.service.msgSrv.success('新增个人合伙人成功');
oftenUsedServices: sfVlaue.oftenUsedServices, this.goBack();
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();
// }
// });
} }
/* /*
@ -124,48 +105,34 @@ export class AddPersonalPartnerComponent implements OnInit {
} }
// 识别身份证 参数isFrontfront-正面、back-背面type0-申请人身份证1-法定代表人身份证 // 识别身份证 参数isFrontfront-正面、back-背面type0-申请人身份证1-法定代表人身份证
checkIdCard(imgurl: any, isFront: string, type: number) { checkIdCard(imgurl: any, isFront: string) {
const params = { const params = {
idCardUrl: imgurl, idCardUrl: imgurl,
side: isFront side: isFront
}; };
this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
if (res) { if (res) {
if (type === 1) { // 法定代表人证件照
// 法定代表人证件照 if (isFront === 'front') {
if (isFront === 'front') { // 正面
// 正面 if (res.name) {
if (res.name) { this.sf.setValue('/adminUserInfo/name', 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.number) {
// 背面 this.sf.setValue('/adminUserInfo/certificateType', 0);
if (res.validFrom) { this.sf.setValue('/adminUserInfo/certificateNumber', res.number);
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 (isFront === 'back') {
if (type === 0) { // 背面
if (isFront === 'front') { if (res.validFrom) {
// 正面 this.sf.setValue('/adminUserInfo/validStartTime', res.validFrom);
if (res.name) { }
this.sf.setValue('/name', res.name); if (res.validTo) {
} this.sf.setValue('/adminUserInfo/validEndTime', res.validTo);
if (res.number) { this.sf.setValue('/adminUserInfo/_isLoingDate', false);
this.sf.setValue('/certificateNumber', res.number); } else {
} this.sf.setValue('/adminUserInfo/_isLoingDate', true);
} }
} }
} }
@ -179,23 +146,23 @@ export class AddPersonalPartnerComponent implements OnInit {
private initBasicInfoSF(): SFSchema { private initBasicInfoSF(): SFSchema {
return { return {
properties: { properties: {
_adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
mobile: {
title: ' 手机号',
type: 'string',
minLength: 1,
format: 'mobile',
maxLength: 11,
ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入手机号',
errors: { required: '请输入手机号', format: '手机号格式错误' }
}
},
// 合伙人信息 // 合伙人信息
adminUserInfo: { adminUserInfo: {
type: 'object', type: 'object',
properties: { 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: { _adminCertificatePhotoTipsA: {
title: '证件照', title: '证件照',
type: 'string', type: 'string',
@ -206,6 +173,7 @@ export class AddPersonalPartnerComponent implements OnInit {
}, },
certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } },
certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } },
certificateType: { title: '', type: 'string', ui: { hidden: true }, default: 0 },
certificatePhotoFrontWatermark: { certificatePhotoFrontWatermark: {
type: 'string', type: 'string',
title: '', title: '',
@ -214,8 +182,8 @@ export class AddPersonalPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/adminUserInfo/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0); this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front');
} }
} }
} as SFUploadWidgetSchema } as SFUploadWidgetSchema
@ -236,7 +204,8 @@ export class AddPersonalPartnerComponent implements OnInit {
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
change: args => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath); this.sf.setValue('/adminUserInfo/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back');
} }
} }
} as SFUploadWidgetSchema } as SFUploadWidgetSchema
@ -261,7 +230,7 @@ export class AddPersonalPartnerComponent implements OnInit {
placeholder: '请输入身份证号' placeholder: '请输入身份证号'
} }
}, },
operatingStartTime: { validStartTime: {
title: '身份证有效开始日期', title: '身份证有效开始日期',
type: 'string', type: 'string',
ui: { ui: {
@ -272,7 +241,7 @@ export class AddPersonalPartnerComponent implements OnInit {
} }
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
operatingEndTime: { validEndTime: {
title: '身份证有效截止日期', title: '身份证有效截止日期',
type: 'string', type: 'string',
ui: { ui: {
@ -294,34 +263,38 @@ export class AddPersonalPartnerComponent implements OnInit {
grid: { span: 6 }, grid: { span: 6 },
class: 'input-back', class: 'input-back',
widget: 'checkbox', widget: 'checkbox',
change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null) change: i => this.sf?.setValue('/adminUserInfo/validEndTime', null)
} as SFCheckboxWidgetSchema } as SFCheckboxWidgetSchema
} }
}, },
required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'operatingStartTime'] required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'validStartTime']
}, },
// 所属城市 // 所属城市
_addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, _addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
status3: { cityCodesList: {
type: 'string', type: 'string',
title: '所属城市', title: '所属城市',
default: ['WAIT_BUYER_PAY', 'TRADE_FINISHED'],
ui: { ui: {
widget: 'tree-select', widget: 'tree-select',
grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请选择城市(最多3个)', placeholder: '请选择城市(最多3个)',
checkable: true, checkable: true,
class: 'city-tree-select',
asyncData: () => asyncData: () =>
of([ this.getRegionDetailByCode('').pipe(
{ title: '待支付', key: 'WAIT_BUYER_PAY' }, map((res: any) =>
{ title: '已支付', key: 'TRADE_SUCCESS' }, res.map((item: any) => ({ ...item, title: item.name, key: item.regionCode, disabled: true, isDisableCheckbox: true }))
{ title: '交易完成', key: 'TRADE_FINISHED' } )
]) ),
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 } as SFTreeSelectWidgetSchema
}, },
// 渠道销售 // 渠道销售
_channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } }, _channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
channel: { invitationCode: {
title: '渠道销售邀请码', title: '渠道销售邀请码',
type: 'string', type: 'string',
minLength: 1, minLength: 1,
@ -335,10 +308,7 @@ export class AddPersonalPartnerComponent implements OnInit {
} }
} }
}, },
required: [ required: ['cityCodesList', 'invitationCode']
'status3',
'channel'
]
}; };
} }
} }

View File

@ -1,95 +1,87 @@
<page-header-wrapper [title]="'合伙人列表'"> <page-header-wrapper [title]="'合伙人列表'"> </page-header-wrapper>
</page-header-wrapper>
<nz-card class="search-box" nzBordered> <nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 17" [nzLg]="24" [nzSm]="24" [nzXs]="24"> <div nz-col [nzXl]="_$expand ? 24 : 17" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema" <sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
[ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true" [compact]="true" [button]="'none'"></sf>
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 7" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div> </div>
<div nz-col [nzXl]="_$expand ? 24 : 7" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card> </nz-card>
<nz-card class="content-box" nzBordered> <nz-card class="content-box" nzBordered>
<div class="d-flex align-items-center mb-md mt-md"> <div class="d-flex align-items-center mb-md mt-md">
<button nz-button (click)="this.routeTo('/partner/partner-list/add-etp-partner')" nzType="primary">新增企业合伙人</button> <button nz-button (click)="this.routeTo('/partner/partner-list/add-etp-partner')" nzType="primary">新增企业合伙人</button>
<button nz-button (click)="this.routeTo('/partner/partner-list/add-personal-partner')" nzType="primary">新增个人合伙人</button> <button nz-button (click)="this.routeTo('/partner/partner-list/add-personal-partner')"
</div> nzType="primary">新增个人合伙人</button>
</div>
<st #st [data]="service.$mock_url" [columns]="columns" [req]="{ process: beforeReq }" <st #st [data]="service.$api_get_partner_page" [columns]="columns" [req]="{ process: beforeReq }"
[loading]="service.http.loading" [scroll]="{ x:'1200px' }"> [loading]="service.http.loading" [scroll]="{ x: '1200px' }" [page]="{}">
</st> </st>
</nz-card> </nz-card>
<ng-template #editTemplate> <ng-template #editTemplate>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="120"> <div nz-col nzSpan="24" se-container [labelWidth]="120">
<se [col]="1" label="合伙人名称"> <se [col]="1" label="合伙人名称"> {{selectItem?.enterpriseName}} </se>
深圳某某有限公司 <se [col]="1" label="返佣模板" required>
</se> <nz-select [(ngModel)]="templateId" style="width: 100%">
<se [col]="1" label="返佣模板" required> <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of customers"></nz-option>
<nz-select ngModel="lucy" style="width: 100%;"> </nz-select>
<nz-option nzValue="jack" nzLabel="Jack"></nz-option> </se>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
</nz-select>
</se>
</div>
</div> </div>
<p class="text-center mt-md">说明:修改模板后,当月开始返佣收益将会按新模板计算</p> </div>
<p class="text-center mt-md">说明:修改模板后,当月开始返佣收益将会按新模板计算</p>
</ng-template> </ng-template>
<ng-template #editCannel> <ng-template #editCannel>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="140" [col]="1"> <div nz-col nzSpan="24" se-container [labelWidth]="140" [col]="1">
<se label="合伙人名称"> <se label="合伙人名称"> 深圳某某有限公司 </se>
深圳某某有限公司 <se label="当前渠道销售"> 张三/13999999999 </se>
</se> <se label="渠道销售修改为" required>
<se label="当前渠道销售"> <nz-select ngModel="lucy" style="width: 100%">
张三/13999999999 <nz-option nzValue="jack" nzLabel="Jack"></nz-option>
</se> <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
<se label="渠道销售修改为" required> </nz-select>
<nz-select ngModel="lucy" style="width: 100%;"> </se>
<nz-option nzValue="jack" nzLabel="Jack"></nz-option> <se label="备注" required>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> <textarea rows="3" nz-input></textarea>
</nz-select> </se>
</se> <se label="一并转移的客户">
<se label="备注" required> <p style="margin-top: 8px">已选0</p>
<textarea rows="3" nz-input></textarea> <nz-table #rowSelectionTable [nzData]="customers" nzSize="small" nzBordered>
</se> <thead>
<se label="一并转移的客户"> <tr>
<p style="margin-top: 8px;">已选0</p> <th [nzChecked]="false"></th>
<nz-table #rowSelectionTable [nzData]="customers" nzSize="small" nzBordered> <th>客户名称</th>
<thead> </tr>
<tr> </thead>
<th [nzChecked]="false"></th> <tbody>
<th>客户名称</th> <tr *ngFor="let data of rowSelectionTable.data">
</tr> <td [nzChecked]="data.checked"></td>
</thead> <td>{{ data.name }}</td>
<tbody> </tr>
<tr *ngFor="let data of rowSelectionTable.data"> </tbody>
<td [nzChecked]="data.checked"></td> </nz-table>
<td>{{ data.name }}</td> </se>
</tr> <se label="生效节点" required>
</tbody> <nz-radio-group>
</nz-table> <label nz-radio nzValue="A">修改成功后立即生效</label>
</se> <label nz-radio nzValue="B">CRM流程审核通过后生</label>
<se label="生效节点" required> </nz-radio-group>
<nz-radio-group> </se>
<label nz-radio nzValue="A">修改成功后立即生效</label>
<label nz-radio nzValue="B">CRM流程审核通过后生</label>
</nz-radio-group>
</se>
</div>
</div> </div>
<p class="text-center mt-md">客户转移客户跟着上级合伙人转移一并到新渠道销售下会同步发起CRM《客户转移》流程不转移的客户会与上级合伙人解绑成为渠道销售的直客</p> </div>
<p class="text-center mt-md">客户转移客户跟着上级合伙人转移一并到新渠道销售下会同步发起CRM《客户转移》流程不转移的客户会与上级合伙人解绑成为渠道销售的直客</p>
</ng-template> </ng-template>

View File

@ -1,9 +1,10 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal'; 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 { 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 { PartnerListService } from '../../services/partner-list.service';
import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component'; 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', templateUrl: './partner-list.component.html',
styleUrls: ['../../../../commom/less/box.less'] styleUrls: ['../../../../commom/less/box.less']
}) })
export class PartnerListComponent implements OnInit { export class PartnerListComponent {
@ViewChild('st', { static: true }) @ViewChild('st', { static: true })
st!: STComponent; st!: STComponent;
@ViewChild('sf', { static: false }) @ViewChild('sf', { static: false })
@ -23,14 +24,22 @@ export class PartnerListComponent implements OnInit {
@ViewChild('editTemplate', { static: true }) @ViewChild('editTemplate', { static: true })
editTemplate: any; editTemplate: any;
templateId: any;
templates: any[] = [];
@ViewChild('editCannel', { static: true }) @ViewChild('editCannel', { static: true })
editCannel: any; editCannel: any;
customers: any[] = []; customers: any[] = [];
constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {} selectItem: any = {};
ngOnInit(): void {} constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) {
this.service.getRebateConfig().subscribe(res => {
if (res) {
this.customers = res;
}
});
}
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) { if (this.sf) {
@ -47,16 +56,21 @@ export class PartnerListComponent implements OnInit {
const modal = this.nzModalService.create({ const modal = this.nzModalService.create({
nzTitle: '审核', nzTitle: '审核',
nzContent: PartnerAuditModalComponent, nzContent: PartnerAuditModalComponent,
nzComponentParams: { info: item }, nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName } },
nzFooter: null nzFooter: null
}); });
} }
editTemplateAction(item: any) { editTemplateAction(item: any) {
this.selectItem = item;
const modal = this.nzModalService.create({ const modal = this.nzModalService.create({
nzTitle: '修改返佣模板', nzTitle: '修改返佣模板',
nzContent: this.editTemplate, nzContent: this.editTemplate,
nzOnOk: () => { nzOnOk: () => {
if (!this.templateId) {
this.service.msgSrv.warning('请选择返佣模板');
return false;
}
this.confirmEditTemplate(); this.confirmEditTemplate();
return false; return false;
} }
@ -67,24 +81,36 @@ export class PartnerListComponent implements OnInit {
const modal = this.nzModalService.confirm({ const modal = this.nzModalService.confirm({
nzTitle: '确定要修改返佣模板吗?', nzTitle: '确定要修改返佣模板吗?',
nzOnOk: () => { nzOnOk: () => {
this.nzModalService.closeAll(); this.service
} .request(this.service.$api_update_partner_template, {
}); id: this.selectItem.id,
} templateId: this.templateId
})
editCannelAction(item: any) { .subscribe(res => {
const modal = this.nzModalService.create({ if (res) {
nzTitle: '修改返佣模板', this.service.msgSrv.success('修改成功');
nzWidth: 650, this.nzModalService.closeAll();
nzContent: this.editCannel, }
nzOnOk: () => { });
this.confirmEditCannel();
return false; return false;
} }
}); });
} }
confirmEditCannel() { editCannelAction(item: any) {
this.selectItem = item;
const modal = this.nzModalService.create({
nzTitle: '修改渠道销售',
nzWidth: 650,
nzContent: this.editCannel,
nzOnOk: () => {
this.confirmEditCannel(item);
return false;
}
});
}
confirmEditCannel(item: any) {
const modal = this.nzModalService.confirm({ const modal = this.nzModalService.confirm({
nzTitle: '确定提交吗?', nzTitle: '确定提交吗?',
nzOnOk: () => { nzOnOk: () => {
@ -93,6 +119,29 @@ export class PartnerListComponent implements OnInit {
}); });
} }
/**
* 重新发起crm
* @param item
*/
reSendCRM(item: any) {
const modal = this.nzModalService.confirm({
nzTitle: '是否确定重新发起CRM',
nzOnOk: () => {
this.service
.request(this.service.$api_resend_crm, {
id: item.id
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('发起成功');
} else {
this.service.msgSrv.warning('发起失败');
}
});
}
});
}
routeTo(route: string) { routeTo(route: string) {
this.router.navigate([route]); this.router.navigate([route]);
} }
@ -122,19 +171,19 @@ export class PartnerListComponent implements OnInit {
hidden: true hidden: true
} }
}, },
paycode: { enterpriseName: {
type: 'string', type: 'string',
title: '合伙人名称' title: '合伙人名称'
}, },
paycode2: { contactName: {
type: 'string', type: 'string',
title: '企业管理员' title: '企业管理员'
}, },
paycod3e: { contactMobile: {
type: 'string', type: 'string',
title: '手机号' title: '手机号'
}, },
paycod31e: { channelId: {
type: 'string', type: 'string',
title: '渠道销售', title: '渠道销售',
ui: { ui: {
@ -144,32 +193,37 @@ export class PartnerListComponent implements OnInit {
} }
} }
}, },
orderS2n: { partnerType: {
type: 'string', type: 'string',
title: '类型', title: '类型',
enum: [
{ value: '', label: '全部' },
{ value: 1, label: '企业' },
{ value: 2, label: '个人' }
],
ui: { ui: {
widget: 'dict-select', widget: 'select',
containsAllLabel: true,
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} },
default: ''
}, },
paytype: { approvalStatus: {
type: 'string', type: 'string',
title: '认证审核状态', title: '认证审核状态',
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
containsAllLabel: true, containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} }
}, },
paymode: { signStatus: {
type: 'string', type: 'string',
title: '签约状态', title: '签约状态',
ui: { ui: {
@ -182,7 +236,7 @@ export class PartnerListComponent implements OnInit {
} }
} }
}, },
paymo1de: { crmStatus: {
type: 'string', type: 'string',
title: 'CRM状态', title: 'CRM状态',
ui: { ui: {
@ -198,41 +252,47 @@ export class PartnerListComponent implements OnInit {
paymo11de: { paymo11de: {
type: 'string', type: 'string',
title: '注册渠道', title: '注册渠道',
enum: [
{ value: '', label: '全部' },
{ value: 1, label: '合伙人注册' },
{ value: 2, label: '平台添加' }
],
ui: { ui: {
widget: 'dict-select', widget: 'select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} },
default: ''
}, },
paymo11d1e: { templateId: {
type: 'string', type: 'string',
title: '返佣模板', title: '返佣模板',
ui: { ui: {
widget: 'dict-select', widget: 'select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} }
}, },
paymo11d11e: { lockedStatus: {
type: 'string', type: 'string',
title: '合伙人状态', title: '合伙人状态',
enum: [
{ value: '', label: '全部' },
{ value: 0, label: '启用' },
{ value: 1, label: '冻结' }
],
ui: { ui: {
widget: 'dict-select', widget: 'select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} },
default: ''
}, },
createTime: { createTime: {
title: '注册时间', title: '注册时间',
@ -251,20 +311,63 @@ export class PartnerListComponent implements OnInit {
private initST(): STColumn[] { private initST(): STColumn[] {
return [ return [
{ title: '合伙人名称', index: 'payCode', width: 180 }, { title: '合伙人名称', index: 'enterpriseName', width: 180, format: item => `${item.enterpriseName || item.contactName}` },
{ title: '付款编码', index: 'ltdName', width: 160 }, { title: '付款编码', index: 'payCode', width: 160 },
{ title: '邀请码', index: 'payDate', className: 'text-center', width: 130 }, { title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 },
{ title: '企业管理员', index: 'payDate', width: 150 }, { title: '企业管理员', index: 'contactName', width: 150 },
{ title: '手机号', index: 'payDate', className: 'text-center', width: 150 }, { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 },
{ title: '类型', index: 'payDate', className: 'text-center', width: 130 }, { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } },
{ title: '注册渠道', index: 'payDate', type: 'date', width: 130 }, { title: '注册渠道', index: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, 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: 'channelId', width: 170 },
{ title: '返佣模板', index: 'payDate', width: 150 }, { title: '返佣模板', index: 'templateName', width: 150 },
{ title: '认证审核状态', index: 'payDate', width: 150 }, {
{ title: '签约状态', index: 'payDate', width: 150 }, title: '认证审核状态',
{ title: 'CRM状态', index: 'payDate', width: 150 }, index: 'approvalStatus',
{ title: '合伙人状态', index: 'payDate', className: 'text-center', width: 140 }, 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: '操作', title: '操作',
fixed: 'right', fixed: 'right',
@ -272,8 +375,18 @@ export class PartnerListComponent implements OnInit {
buttons: [ buttons: [
{ type: 'divider' }, { type: 'divider' },
{ {
text: '详情<br>', 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.id}`]);
} else {
this.router.navigate([`/partner/partner-list/personal-detail/${item.id}`]);
}
}
},
{
text: '审核<br>',
click: item => this.auditPartner(item)
}, },
{ {
text: '修改返佣模板', text: '修改返佣模板',
@ -283,13 +396,9 @@ export class PartnerListComponent implements OnInit {
text: '修改渠道销售', text: '修改渠道销售',
click: item => this.editCannelAction(item) click: item => this.editCannelAction(item)
}, },
{
text: '审核<br>',
click: item => this.auditPartner(item)
},
{ {
text: '重发CRM流程', text: '重发CRM流程',
click: item => this.router.navigate(['/partner/account-management/list/detail/' + item.id]) click: item => this.reSendCRM(item)
} }
] ]
} }

View File

@ -3,5 +3,5 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button nz-button type="button" (click)="close()">取消</button> <button nz-button type="button" (click)="close()">取消</button>
<button nz-button type="button" nzType="primary" (click)="sure()" [disabled]="!sf.valid">保存</button> <button nz-button type="button" nzType="primary" (click)="sure()" [disabled]="!sf.valid">确定</button>
</div> </div>

View File

@ -34,7 +34,7 @@ export class PartnerAuditModalComponent implements OnInit {
title: '合伙人名称', title: '合伙人名称',
type: 'string', type: 'string',
ui: { widget: 'text' }, ui: { widget: 'text' },
default: user.name default: user.enterpriseName
}, },
status: { status: {
title: '审核结果', title: '审核结果',
@ -50,7 +50,7 @@ export class PartnerAuditModalComponent implements OnInit {
}, },
default: true default: true
}, },
a: { channelId: {
title: '渠道销售', title: '渠道销售',
type: 'string', type: 'string',
enum: [ enum: [
@ -70,7 +70,7 @@ export class PartnerAuditModalComponent implements OnInit {
}, },
default: '' default: ''
}, },
b: { approvalOpinion: {
title: '备注', title: '备注',
type: 'string', type: 'string',
maxLength: 100, maxLength: 100,
@ -88,43 +88,41 @@ export class PartnerAuditModalComponent implements OnInit {
} }
} }
}, },
required: ['a', 'b'] required: ['channelId', 'approvalOpinion']
}; };
} }
sure() { sure() {
this.nzModalService.confirm({ if (this.info.isPass || this.sf.value.status) {
nzTitle: `确定以“${this.info.userName}/${this.info.mobile}”的名义重新发起CRM《付款对象合同管理》吗`, this.nzModalService.confirm({
nzOnOk: () => { nzTitle: `确定以“${this.info.channelIdLabel}”的名义重新发起CRM《付款对象合同管理》吗`,
this.close(); nzOnOk: () => {
} this.audit();
}); }
// if (!this.sf.value.roleId || this.sf.value.roleId.length === 0) { });
// this.service.msgSrv.error('员工角色不能为空!'); } else {
// return; this.audit();
// } }
// if (this.i.userId === 0) { }
// const params: any = {
// ...this.sf.value audit() {
// }; const params: any = {
// this.service.request(this.service.$api_add_staff, params).subscribe(res => { ...this.sf.value,
// if (res) { id: this.info.id,
// this.service.msgSrv.success('保存成功!'); auditStatusEnum: this.info.isPass || this.sf.value.status ? '20' : '30'
// this.modal.close(true); };
// } this.service
// }); .request(this.service.$api_audit_partner, {
// } else { auditStatusEnum: params.auditStatusEnum,
// const params: any = { id: params.id,
// appUserId: this.i.appUserId, approvalOpinion: params.approvalOpinion
// ...this.sf.value })
// }; .subscribe(res => {
// this.service.request(this.service.$api_edit_staff, params).subscribe(res => { if (res) {
// if (res) { this.service.msgSrv.success('审核成功!');
// this.service.msgSrv.success('编辑成功!'); this.close();
// this.modal.close(true); }
// } });
// });
// }
} }
close() { close() {

View File

@ -1,328 +1,330 @@
<!-- 页头 --> <!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content" [title]="'合伙人详情'" [ngClass]="{'affix': scrollTop>210}"> <page-header-wrapper [logo]="logo" [content]="content" [title]="'合伙人详情'" [ngClass]="{ affix: scrollTop > 210 }">
<ng-template #logo> <ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i> <i nz-icon nzType="left" nzTheme="outline"></i>
</button> </button>
</ng-template> </ng-template>
<ng-template #content> <ng-template #content>
<nz-skeleton [nzLoading]="false"> <nz-skeleton [nzLoading]="false">
<div class="user-info" nz-row> <div class="user-info" nz-row>
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex"> <div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex">
<img [src]="detailData?.enterpriseLogo" /> <img [src]="detailData?.enterpriseLogo" />
<div style="flex: 1;"> <div style="flex: 1">
<div nz-row> <div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24"> <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<p style="margin-bottom: 0;">{{ detailData?.enterpriseName }}</p> <p style="margin-bottom: 0">{{ detailData?.enterpriseName }}</p>
</div> </div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24"> <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<nz-badge nzStatus="success" nzText="正常" *ngIf="detailData?.stateLocked === 0"> <nz-badge nzStatus="success" nzText="正常" *ngIf="detailData?.stateLocked === 0"> </nz-badge>
</nz-badge> <nz-badge nzStatus="error" nzText="冻结" *ngIf="detailData?.stateLocked === 1"></nz-badge>
<nz-badge nzStatus="error" nzText="冻结" *ngIf="detailData?.stateLocked === 1"></nz-badge> </div>
</div>
</div>
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<p>{{ detailData?.unifiedSocialCreditCode }}</p>
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
企业合伙人
</div>
</div>
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
注册时间:{{detailData?.createTime}}
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
所属城市:{{detailData?.createTime}}
</div>
</div>
</div>
</div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm">
<ng-container *ngIf="isEdit;else editButton">
<button [disabled]="service.http.loading" nz-button (click)="reset()">
取消
</button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="save()">
保存
</button>
</ng-container>
<ng-template #editButton>
<ng-container>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner(true)">
通过
</button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner(false)">
驳回
</button>
</ng-container>
<ng-container *ngIf="detailData?.approvalStatus!=10">
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm
[nzPopconfirmTitle]="enable" (nzOnConfirm)="freezeOrResume(0)"
nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
启用
</button>
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm
[nzPopconfirmTitle]="frozen" (nzOnConfirm)="freezeOrResume(1)"
nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
冻结
</button>
</ng-container>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="ratify()">
修改
</button>
</ng-template>
</div>
</div> </div>
</nz-skeleton> <div nz-row>
</ng-template> <div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<p>{{ detailData?.unifiedSocialCreditCode }}</p>
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24"> 企业合伙人 </div>
</div>
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24"> 注册时间:{{ detailData?.createTime }} </div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
所属城市:{{enterpriseDefaultCityName}}
</div>
</div>
</div>
</div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm">
<ng-container *ngIf="isEdit; else editButton">
<button [disabled]="service.http.loading" nz-button (click)="reset()"> 取消 </button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="save()"> 保存 </button>
</ng-container>
<ng-template #editButton>
<ng-container>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner(true)"> 通过 </button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner(false)"> 驳回 </button>
</ng-container>
<ng-container *ngIf="detailData?.approvalStatus != 10">
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked"
acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
启用
</button>
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked"
acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
冻结
</button>
</ng-container>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="ratify()"> 修改 </button>
</ng-template>
</div>
</div>
</nz-skeleton>
</ng-template>
<ng-template #frozen> <ng-template #frozen>
<ng-container <ng-container *ngTemplateOutlet="
*ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定冻结该企业吗?',content:'停用后,该企业将被限制使用,不限于访问受限、无法发布货源等,请谨慎操作'}"> PopconfirmTempalte;
</ng-container> context: { title: '确定冻结该合伙人吗?', content: '停用后,该合伙人将被限制使用,不限于访问受限、邀请客户、佣金收益等,请谨慎操作' }
</ng-template> ">
<ng-template #enable> </ng-container>
<ng-container </ng-template>
*ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定启用该企业吗?',content:'启用后,该企业将恢复正常使用功能,请再次确认'}"> <ng-template #enable>
</ng-container> <ng-container *ngTemplateOutlet="
</ng-template> PopconfirmTempalte;
<ng-template #Payenable> context: { title: '确定启用该合伙人吗?', content: '启用后,该该合伙人将恢复正常使用功能,请再次确认' }
<ng-container ">
*ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定关闭该企业支付权限吗?',content:'停用后,该企业将被限制使用支付功能,请谨慎操作'}"> </ng-container>
</ng-container> </ng-template>
</ng-template>
<ng-template #Payfrozen>
<ng-container
*ngTemplateOutlet="PopconfirmTempalte;context:{title:'确定开通该企业支付权限吗?',content:'启用后,该企业将恢复正常支付功能,请再次确认'}">
</ng-container>
</ng-template>
</page-header-wrapper> </page-header-wrapper>
<nz-card [class]="isEdit?'edit-box':'readOnly-box'"> <nz-card [class]="isEdit ? 'edit-box' : 'readOnly-box'">
<sv-container col="3"> <sv-container col="3">
<sv-title>企业管理员信息</sv-title> <sv-title>企业管理员信息</sv-title>
<sv label="姓名"> <sv label="姓名">
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.name" [readonly]="!isEdit" <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.name" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" />
</sv> </sv>
<sv label="手机号"> <sv label="手机号">
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.mobile" [readonly]="!isEdit" <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.mobile" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" />
</sv> </sv>
<sv label="身份证号"> <sv label="身份证号">
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit" <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" />
</sv> </sv>
<sv label="身份证照" col="2"> <sv label="身份证照" col="2">
<div class="d-flex"> <div class="d-flex">
<ng-container <ng-container *ngTemplateOutlet="
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'certificateBackFront'}"> uploadTemplate;
</ng-container> context: {
<ng-container data: detailData?.adminUserInfo,
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.adminUserInfo,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'certificateBack'}"> status: isEdit,
</ng-container> key: 'certificatePhotoFrontWatermark',
</div> key2: 'certificatePhotoFront',
</sv> hover: 'certificateBackFront'
<sv label="身份证有效期" col="1"> }
<nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" " ">
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar"> </ng-container>
</nz-date-picker> <ng-container *ngTemplateOutlet="
- uploadTemplate;
<ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime"> context: {
<label style="padding-left: 11px;">长期</label> data: detailData?.adminUserInfo,
</ng-container> status: isEdit,
<nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" " key: 'certificatePhotoBackWatermark',
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar"> key2: 'certificatePhotoBack',
</nz-date-picker> hover: 'certificateBack'
<ng-container *ngIf="isEdit"> }
<label nz-checkbox [ngModel]="!!!detailData.operatingEndTime" ">
(ngModelChange)="$event?detailData.operatingEndTime='':''" class="ml-sm">长期</label> </ng-container>
</ng-container> </div>
</sv> </sv>
</sv-container> <sv label="身份证有效期" col="1">
<nz-date-picker [(ngModel)]="detailData.adminUserInfo.validStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar">
</nz-date-picker>
-
<ng-container *ngIf="!isEdit && !detailData?.adminUserInfo.validEndTime && detailData?.adminUserInfo.validStartTime">
<label style="padding-left: 11px">长期</label>
</ng-container>
<nz-date-picker [(ngModel)]="detailData.adminUserInfo.validEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar">
</nz-date-picker>
<ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.adminUserInfo.validEndTime"
(ngModelChange)="$event ? (detailData.adminUserInfo.validEndTime = '') : ''" class="ml-sm">长期</label>
</ng-container>
</sv>
</sv-container>
<nz-divider></nz-divider> <nz-divider></nz-divider>
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title> <sv-title>
<label class="mr-md">企业基本信息</label> <label class="mr-md">企业基本信息</label>
<label *ngIf="detailData?.approvalStatus===10" style="color: #1890ff;"><i nz-icon nzType="info-circle" <label *ngIf="detailData?.approvalStatus === 10" style="color: #1890ff"><i nz-icon nzType="info-circle"
nzTheme="fill" class="mr-xs"></i>待审核 nzTheme="fill" class="mr-xs"></i>待审核
</label> </label>
<label *ngIf="detailData?.approvalStatus===20" style="color: #52c41a;"><i nz-icon nzType="check-circle" <label *ngIf="detailData?.approvalStatus === 20" style="color: #52c41a"><i nz-icon nzType="check-circle"
nzTheme="fill" class="mr-xs"></i>审核通过 nzTheme="fill" class="mr-xs"></i>审核通过
</label> </label>
<label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle" <label *ngIf="detailData?.approvalStatus === 30" style="color: #ff4d4f"><i nz-icon nzType="close-circle"
nzTheme="fill" class="mr-xs"></i>驳回&nbsp;驳回原因:{{detailData?.approvalOpinion}} nzTheme="fill" class="mr-xs"></i>驳回&nbsp;驳回原因:{{ detailData?.approvalOpinion }}
</label> </label>
<p style="margin-bottom: 0;"> <p style="margin-bottom: 0">
四要素验证: 四要素验证:
<label *ngIf="detailData?.esignCheckStatus===0" style="color: #ff4d4f;"><i nz-icon nzType="info-circle" <label *ngIf="detailData?.esignCheckStatus === 0" style="color: #ff4d4f"><i nz-icon nzType="info-circle"
nzTheme="fill" class="mr-xs"></i>不通过&nbsp;&nbsp;驳回原因:{{detailData?.esignCheckMsg}} nzTheme="fill" class="mr-xs"></i>不通过&nbsp;&nbsp;驳回原因:{{ detailData?.esignCheckMsg }}
</label> </label>
<label *ngIf="detailData?.esignCheckStatus===1" style="color: #52c41a;"><i nz-icon nzType="check-circle" <label *ngIf="detailData?.esignCheckStatus === 1" style="color: #52c41a"><i nz-icon nzType="check-circle"
nzTheme="fill" class="mr-xs"></i>通过 nzTheme="fill" class="mr-xs"></i>通过
</label> </label>
<label *ngIf="detailData?.esignCheckStatus===2" style="color: #1890ff;"><i nz-icon <label *ngIf="detailData?.esignCheckStatus === 2" style="color: #1890ff"><i nz-icon nzType="close-circle"
nzType="close-circle" nzTheme="fill" class="mr-xs"></i>未认证 nzTheme="fill" class="mr-xs"></i>未认证
</label> </label>
</p> </p>
</sv-title> </sv-title>
<sv label="公司名称"> <sv label="公司名称">
<input nz-input type="text" [(ngModel)]="detailData.enterpriseName" [readonly]="!isEdit" <!-- <input nz-input type="text" [(ngModel)]="" [readonly]="!isEdit" [nzBorderless]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> [placeholder]="isEdit ? '' : '-'" /> -->
</sv> {{detailData.enterpriseName}}
<sv label="统一社会信用代码"> </sv>
<input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit" <sv label="统一社会信用代码">
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> <!-- <input nz-input type="text" [(ngModel)]="detailData.unifiedSocialCreditCode" [readonly]="!isEdit"
</sv> [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> -->
<sv label="营业执照" col="2"> {{detailData.unifiedSocialCreditCode}}
<ng-container </sv>
*ngTemplateOutlet="uploadTemplate;context:{data:detailData,status:isEdit,key:'licensePhotoWatermark',key2:'licensePhoto',hover:'detailPhoto'}"> <sv label="营业执照" col="2">
</ng-container> <ng-container *ngTemplateOutlet="
</sv> uploadTemplate;
context: { data: detailData, status: isEdit, key: 'licensePhotoWatermark', key2: 'licensePhoto', hover: 'detailPhoto' }
">
</ng-container>
</sv>
<sv label="营业期限" col="1"> <sv label="营业期限" col="1">
<nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" " <nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar"> [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar">
</nz-date-picker> </nz-date-picker>
- -
<ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime"> <ng-container *ngIf="!isEdit && !detailData?.operatingEndTime && detailData?.operatingStartTime">
<label style="padding-left: 11px;">长期</label> <label style="padding-left: 11px">长期</label>
</ng-container> </ng-container>
<nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" " <nz-date-picker [(ngModel)]="detailData.operatingEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar"> [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar">
</nz-date-picker> </nz-date-picker>
<ng-container *ngIf="isEdit"> <ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.operatingEndTime" <label nz-checkbox [ngModel]="!!!detailData.operatingEndTime"
(ngModelChange)="$event?detailData.operatingEndTime='':''" class="ml-sm">长期</label> (ngModelChange)="$event ? (detailData.operatingEndTime = '') : ''" class="ml-sm">长期</label>
</ng-container> </ng-container>
</sv> </sv>
</sv-container> </sv-container>
<nz-divider></nz-divider> <nz-divider></nz-divider>
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title>企业法人信息</sv-title> <sv-title>企业法人信息</sv-title>
<sv label="法定代表人"> <sv label="法定代表人">
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.name" [readonly]="!isEdit" <input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentity.name" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" />
</sv> </sv>
<sv label="身份证号码"> <sv label="身份证号码">
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber" <input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentity.certificateNumber" [readonly]="!isEdit"
[readonly]="!isEdit" [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'"> [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" />
</sv> </sv>
<sv label="身份证有效期" col="1"> <sv label="身份证有效期" col="1">
<nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validStartTime" [nzDisabled]="!isEdit" <nz-date-picker [(ngModel)]="detailData.legalPersonIdentity.validStartTime" [nzDisabled]="!isEdit"
nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px"
class="calendar"></nz-date-picker> class="calendar"></nz-date-picker>
- -
<ng-container <ng-container
*ngIf="!isEdit && !detailData?.legalPersonIdentityVO?.validEndTime && detailData.legalPersonIdentityVO.validStartTime"> *ngIf="!isEdit && !detailData?.legalPersonIdentity?.validEndTime && detailData.legalPersonIdentity.validStartTime">
<label style="padding-left: 11px;">长期</label> <label style="padding-left: 11px">长期</label>
</ng-container> </ng-container>
<nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validEndTime" [nzDisabled]="!isEdit" <nz-date-picker [(ngModel)]="detailData.legalPersonIdentity.validEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar">
class="calendar"></nz-date-picker> </nz-date-picker>
<ng-container *ngIf="isEdit"> <ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.legalPersonIdentityVO.validEndTime" <label nz-checkbox [ngModel]="!!!detailData.legalPersonIdentity.validEndTime"
(ngModelChange)="$event?detailData.legalPersonIdentityVO.validEndTime='':''" (ngModelChange)="$event ? (detailData.legalPersonIdentity.validEndTime = '') : ''" class="ml-sm">长期</label>
class="ml-sm">长期</label> </ng-container>
</ng-container> </sv>
</sv> <sv label="身份证照" col="1">
<sv label="身份证照" col="1"> <div class="d-flex">
<div class="d-flex"> <ng-container *ngTemplateOutlet="
<ng-container uploadTemplate;
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoFrontWatermark',key2:'certificatePhotoFront',hover:'legalFront'}"> context: {
</ng-container> data: detailData?.legalPersonIdentity,
<ng-container status: isEdit,
*ngTemplateOutlet="uploadTemplate;context:{data:detailData?.legalPersonIdentityVO,status:isEdit,key:'certificatePhotoBackWatermark',key2:'certificatePhotoBack',hover:'legalBack'}"> key: 'certificatePhotoFrontWatermark',
</ng-container> key2: 'certificatePhotoFront',
</div> hover: 'legalFront'
</sv> }
<sv label="所属城市"> ">
<ng-container *ngIf="isEdit; else cascaderelseTemplate"> </ng-container>
<nz-cascader [(ngModel)]="enterpriseAddressCode" [nzLoadData]="loadRegionData"> <ng-container *ngTemplateOutlet="
</nz-cascader> uploadTemplate;
</ng-container> context: {
<ng-template #cascaderelseTemplate> data: detailData?.legalPersonIdentity,
{{ detailData?.fullRegionVO?.provinceName }}{{ detailData?.fullRegionVO?.cityName }}{{ status: isEdit,
detailData?.fullRegionVO?.areaName }} key: 'certificatePhotoBackWatermark',
</ng-template> key2: 'certificatePhotoBack',
</sv> hover: 'legalBack'
</sv-container> }
<nz-divider></nz-divider> ">
<nz-divider></nz-divider> </ng-container>
<sv-container col="3" class="mt16"> </div>
<sv-title>渠道销售信息</sv-title> </sv>
<sv label="姓名"> <sv label="所属城市">
张学友 <ng-container *ngIf="isEdit; else cascaderelseTemplate">
</sv> <nz-tree-select #areaTreeSelect style="width: 350px" [(ngModel)]="enterpriseAddressCode"
<sv label="手机号"> [nzDropdownStyle]="{ 'max-height': '300px' }" [nzExpandedKeys]="enterpriseDefaultAddressCode"
13999999999 [nzNodes]="areaList" [nzAsyncData]="true" [nzCheckStrictly]="true" nzCheckable
</sv> (nzExpandChange)="onExpandChange($event.node)" nzDropdownClassName="area-tree-select">
<sv label="绑定时间"> </nz-tree-select>
2021-09-23 14:43:31 </ng-container>
</sv> <ng-template #cascaderelseTemplate>
</sv-container> {{ enterpriseDefaultCityName || '-' }}
</ng-template>
</sv>
</sv-container>
<nz-divider></nz-divider>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title>渠道销售信息</sv-title>
<sv label="姓名"> {{ detailData?.channelName }} </sv>
<sv label="手机号"> {{ detailData?.channelMobile }} </sv>
<sv label="绑定时间"> {{ detailData?.bindChannelTime }} </sv>
</sv-container>
</nz-card> </nz-card>
<nz-card> <nz-card>
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title>修改渠道销售记录</sv-title> <sv-title>修改渠道销售记录</sv-title>
<sv label=""> <sv label="">
<st #st [data]="service.$mock_url" [columns]="columns.logsColumn" [loading]="service.http.loading" bordered <st #st [data]="service.$api_get_personal_channel_list" [columns]="columns.logsColumn"
size="small" [page]="{show:false}" [scroll]="{ x:'1200px' }"> [loading]="service.http.loading" bordered size="small" [page]="{ show: false }" [scroll]="{ x: '1200px' }">
</st> </st>
</sv> </sv>
</sv-container> </sv-container>
</nz-card> </nz-card>
<ng-template #PopconfirmTempalte let-title="title" let-content="content"> <ng-template #PopconfirmTempalte let-title="title" let-content="content">
<div class="ant-popover-message"> <div class="ant-popover-message">
<i nz-icon nzType="info-circle" nzTheme="fill"></i> <i nz-icon nzType="info-circle" nzTheme="fill"></i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">{{title}} <div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">{{ title }}
</div>
<div class="ant-popover-message-title ng-star-inserted">
{{content}}
</div>
</div> </div>
<div class="ant-popover-message-title ng-star-inserted">
{{ content }}
</div>
</div>
</ng-template> </ng-template>
<ng-template #uploadTemplate let-data="data" let-status="status" let-key="key" let-key2="key2" let-hover="hover"> <ng-template #uploadTemplate let-data="data" let-status="status" let-key="key" let-key2="key2" let-hover="hover">
<nz-upload class="avatar-uploader" [nzAction]="uploadURl" nzName="multipartFile" nzListType="picture-card" <nz-upload class="avatar-uploader" [nzAction]="uploadURl" nzName="multipartFile" nzListType="picture-card"
[nzShowUploadList]="false" nzFileType="image/png,image/jpeg,image/jpg,image/gif" [nzShowUploadList]="false" nzFileType="image/png,image/jpeg,image/jpg,image/gif"
[nzDisabled]="!isEdit || disabledUpload" (nzChange)="changeUpload($event,data,key,key2,hover)"> [nzDisabled]="!isEdit || disabledUpload" (nzChange)="changeUpload($event, data, key, key2, hover)">
<ng-container *ngIf="!data[key] && isEdit"> <ng-container *ngIf="!data[key] && isEdit">
<i class="upload-icon" nz-icon [nzType]="service.http.loading ? 'loading' : 'plus'"></i> <i class="upload-icon" nz-icon [nzType]="service.http.loading ? 'loading' : 'plus'"></i>
<div class="ant-upload-text">上传</div> <div class="ant-upload-text">上传</div>
</ng-container> </ng-container>
<div *ngIf="data[key]" (mouseover)="detailData[hover]=true" (mouseleave)="detailData[hover]=false" <div *ngIf="data[key]" (mouseover)="detailData[hover] = true" (mouseleave)="detailData[hover] = false"
(click)="$event.cancelBubble=true" class="image-hover"> (click)="$event.cancelBubble = true" class="image-hover">
<img [src]="data[key]" style="width: 200px;height: 160px;" (click)="service.showImg(data[key])" /> <img nz-image [nzSrc]="data[key]" style="width: 200px; height: 160px" />
<div class="mask" *ngIf="detailData[hover] && isEdit"></div> <i nz-icon *ngIf="detailData[hover] && isEdit" nzType="close-circle" nzTheme="fill" class="delete-icon"
<div class="mask-over" *ngIf="detailData[hover] && isEdit"> (click)="deleteImg(data, key, key2)"></i>
<i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" </div>
(click)="deleteImg(data,key,key2)"></i> </nz-upload>
<div style="display: flex;align-items: center;">
<i nz-icon nzType="eye" nzTheme="fill" class="show-icon" (click)="service.showImg(data[key])"></i>
</div>
</div>
</div>
</nz-upload>
</ng-template> </ng-template>
<ng-template #logModal> <ng-template #logModal>
<h2>转移客户数10</h2> <h2>转移客户数10</h2>
<st #st [data]="service.$mock_url" [columns]="columns.changeColumn" [loading]="service.http.loading" bordered <st #st [data]="service.$mock_url" [columns]="columns.changeColumn" [loading]="service.http.loading" bordered
size="small" [page]="{show:false}" [scroll]="{ x:'750px' }"> size="small" [page]="{ show: false }" [scroll]="{ x: '750px' }">
</st> </st>
<h2>不转移客户数10</h2> <h2>不转移客户数10</h2>
<st #st [data]="service.$mock_url" [columns]="columns.beChangeColumn" [loading]="service.http.loading" bordered <st #st [data]="service.$mock_url" [columns]="columns.beChangeColumn" [loading]="service.http.loading" bordered
size="small" [page]="{show:false}" [scroll]="{ x:'750px' }"> size="small" [page]="{ show: false }" [scroll]="{ x: '750px' }">
</st> </st>
<p> <p>
客户转移客户跟着上级合伙人转移一并到新渠道销售下会同步发起CRM《客户转移》流程不转移的客户会与上级合伙人解绑修改成功后修改时间也是合伙人与客户的结算结束时间成为原来渠道销售的直客。 客户转移客户跟着上级合伙人转移一并到新渠道销售下会同步发起CRM《客户转移》流程不转移的客户会与上级合伙人解绑修改成功后修改时间也是合伙人与客户的结算结束时间成为原来渠道销售的直客。
</p> </p>
</ng-template> </ng-template>

View File

@ -27,4 +27,11 @@
z-index : 999 !important; z-index : 999 !important;
width : 100% !important; width : 100% !important;
} }
.image-hover .delete-icon {
top : unset !important;
right : unset !important;
margin-top : -15px;
margin-left: -15px;
}
} }

View File

@ -1,10 +1,13 @@
import { DatePipe } from '@angular/common'; import { DatePipe } from '@angular/common';
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { apiConf } from '@conf/api.conf'; import { apiConf } from '@conf/api.conf';
import { STColumn } from '@delon/abc/st'; import { STColumn } from '@delon/abc/st';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { NzFormatEmitEvent, NzTreeNode, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { NzTreeSelectComponent } from 'ng-zorro-antd/tree-select';
import { Subscription, fromEvent } from 'rxjs'; import { Subscription, fromEvent } from 'rxjs';
import { PartnerListService } from '../../services/partner-list.service'; import { PartnerListService } from '../../services/partner-list.service';
import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component'; import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component';
@ -14,21 +17,25 @@ import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit
styleUrls: ['./partner-detail.component.less'], styleUrls: ['./partner-detail.component.less'],
providers: [DatePipe] providers: [DatePipe]
}) })
export class PartnerDetailComponent implements OnInit { export class PartnerDetailComponent implements OnInit, OnDestroy {
@ViewChild('logModal') @ViewChild('logModal')
logModal: any; logModal: any;
@ViewChild('areaTreeSelect')
areaTreeSelect!: NzTreeSelectComponent;
columns: { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST(); columns: { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST();
detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentityVO: { name: '' } }; detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentity: { name: '' } };
tempalateData = { ...this.detailData }; tempalateData = { ...this.detailData };
isEdit = false; isEdit = false;
uploadURl = apiConf.waterFileUpload; uploadURl = apiConf.waterFileUpload;
disabledUpload = false; disabledUpload = false;
enterpriseAddressCode: any = []; enterpriseAddressCode: string[] = [];
ltdId: any = []; enterpriseDefaultAddressCode: string[] = [];
enterpriseDefaultCityName: string = '';
areaList = [];
esignCheckStatus: any = { esignCheckStatus: any = {
0: '不通过', 0: '不通过',
@ -50,35 +57,55 @@ export class PartnerDetailComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.initData(); this.initData();
this.loadltdId(); this.loadlAreaList();
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => { this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
this.scrollTop = document.documentElement.scrollTop; this.scrollTop = document.documentElement.scrollTop;
}); });
} }
loadltdId() {
// this.service.getNetworkFreightForwarder().subscribe(res => { loadlAreaList() {
// if (res) { this.service.request(this.service.$api_get_region_by_code, { regionCode: '' }).subscribe(res => {
// this.ltdId = res; if (res) {
// } this.areaList = res.map((item: any) => ({
// }); ...item,
isLeaf: false,
title: item.name,
key: item.regionCode.toString(),
disabled: true,
isDisableCheckbox: true
}));
}
});
} }
initData() { initData() {
// this.service this.service
// .request(this.service.$api_get_freight_detail, { .request(this.service.$api_get_ent_partner_detail, {
// id: this.route.snapshot.params.id id: this.route.snapshot.params.id
// }) })
// .subscribe(res => { .subscribe(res => {
// if (res) { if (res) {
// this.detailData = res; this.detailData = res;
// this.tempalateData = { ...this.detailData }; // 存储数据源
// this.enterpriseAddressCode = [ this.tempalateData = { ...this.detailData };
// Number(this.detailData.fullRegionVO?.provinceCode), // 拼接所属城市
// Number(this.detailData.fullRegionVO?.cityCode), if (this.detailData?.cityCodesList?.length > 0) {
// Number(this.detailData.fullRegionVO?.areaCode) this.enterpriseAddressCode = (this.detailData?.cityCodesList as any[]).map(city => city.cityCode);
// ]; this.enterpriseDefaultCityName = (this.detailData?.cityCodesList as any[]).map(city => city.cityName).join('、');
// } this.enterpriseDefaultAddressCode = [
// }); ...new Set<string>((this.detailData?.cityCodesList as any[]).map(city => city.provinceCode))
];
}
// 拼接渠道销售信息
if (this.detailData?.channelIdLabel) {
const channel = (this.detailData.channelIdLabel as string).split('/');
Object.assign(this.detailData, {
channelName: channel[0],
channelMobile: channel[1]
});
}
}
});
} }
goBack() { goBack() {
@ -88,23 +115,23 @@ export class PartnerDetailComponent implements OnInit {
* 冻结 * 冻结
*/ */
freezeOrResume(type: number) { freezeOrResume(type: number) {
// this.service.http this.service.http
// .post(this.service.$api_lock_freight, { .post(this.service.$api_lock_freight, {
// id: this.route.snapshot.params.id, id: this.route.snapshot.params.id,
// statedLocked: !!type statedLocked: !!type
// }) })
// .subscribe(res => { .subscribe(res => {
// if (res.data === true) { if (res.data === true) {
// if (type === 0) { if (type === 0) {
// this.service.msgSrv.success(`启用成功!`); this.service.msgSrv.success(`启用成功!`);
// } else { } else {
// this.service.msgSrv.success(`冻结成功!`); this.service.msgSrv.success(`冻结成功!`);
// } }
// this.initData(); this.initData();
// } else { } else {
// this.service.msgSrv.error(res.msg || '操作失败!'); this.service.msgSrv.error(res.msg || '操作失败!');
// } }
// }); });
} }
auditPartner(isPass: boolean) { auditPartner(isPass: boolean) {
@ -128,6 +155,18 @@ export class PartnerDetailComponent implements OnInit {
ratify() { ratify() {
this.isEdit = true; this.isEdit = true;
// 搜索展开省份并选中节点
setTimeout(() => {
if (this.enterpriseDefaultAddressCode?.length > 0 && this.areaTreeSelect) {
this.enterpriseDefaultAddressCode.forEach(code => {
const node = this.areaTreeSelect.getTreeNodeByKey(code);
if (node) {
node.setExpanded(true);
this.onExpandChange(node);
}
});
}
}, 500);
} }
deleteImg(data: any, key: string, key2: string) { deleteImg(data: any, key: string, key2: string) {
@ -159,25 +198,54 @@ export class PartnerDetailComponent implements OnInit {
} }
} }
onExpandChange(node: NzTreeNode | null | undefined): void {
if (node && node.getChildren().length === 0 && node.isExpanded) {
this.loadRegionData(node).then(data => {
node.addChildren(data);
// 更新选中数据
this.areaTreeSelect.updateSelectedNodes(true);
// 修改子节点选中状态
const children = node.getChildren();
if (children?.length > 0) {
children.forEach(childNode => {
if (this.enterpriseAddressCode.find(area => area === childNode.key)) {
childNode.setChecked(true);
}
});
}
});
}
}
/** /**
* 级联获取地区数据 * 级联获取地区数据
*
* @param node 节点 * @param node 节点
* @param index 层级 * @param index 层级
* @returns * @returns
*/ */
loadRegionData = (node: any, index: number) => { loadRegionData(node: NzTreeNode): Promise<NzTreeNodeOptions[]> {
let rs: any[] = [];
return new Promise(resolve => { return new Promise(resolve => {
this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.regionCode || '' }).subscribe( this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.origin.regionCode || '' }).subscribe(
res => { res => {
node.children = res.map((item: any) => ({ ...item, isLeaf: index === 1, value: item.regionCode, label: item.name })); rs = res.map((item: any) => ({
...item,
isLeaf: true,
title: item.name,
key: item.regionCode.toString(),
isSelectable: true,
isSelected: true,
isChecked: true
}));
}, },
_ => {}, _ => {},
() => { () => {
resolve(node); resolve(rs);
} }
); );
}); });
}; }
reset() { reset() {
this.detailData = { ...this.tempalateData }; this.detailData = { ...this.tempalateData };
@ -185,49 +253,35 @@ export class PartnerDetailComponent implements OnInit {
} }
save() { save() {
if (this.enterpriseAddressCode?.length > 3) {
this.service.msgSrv.warning('所属城市不能超过3个');
return;
}
const dateil = { ...this.detailData }; const dateil = { ...this.detailData };
Object.assign(dateil.legalPersonIdentityVO, { Object.assign(dateil.legalPersonIdentity, {
validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'), validStartTime: this.datePipe.transform(dateil.legalPersonIdentity.validStartTime, 'yyyy-MM-dd'),
validEndTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validEndTime, 'yyyy-MM-dd') validEndTime: this.datePipe.transform(dateil.legalPersonIdentity.validEndTime, 'yyyy-MM-dd')
});
Object.assign(dateil.adminUserInfo, {
validStartTime: this.datePipe.transform(dateil.adminUserInfo.validStartTime, 'yyyy-MM-dd'),
validEndTime: this.datePipe.transform(dateil.adminUserInfo.validEndTime, 'yyyy-MM-dd')
}); });
const params = {}; const params = {};
Object.assign(params, { Object.assign(params, {
adminMobile: dateil.adminMobile, ...dateil,
adminAppUserId: dateil.adminAppUserId, cityCodesList: this.enterpriseAddressCode,
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'), 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'), operatingEndTime: this.datePipe.transform(dateil.operatingEndTime, 'yyyy-MM-dd'),
operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd'), operatingStartTime: this.datePipe.transform(dateil.operatingStartTime, 'yyyy-MM-dd')
promotersTelephone: dateil.promotersTelephone, });
registerAddress: dateil.registerAddress,
registerPhone: dateil.registerPhone, this.service.request(this.service.$api_save_entp_partner, params).subscribe(res => {
registrationCapital: dateil.registrationCapital, if (res) {
taxAuthority: dateil.taxAuthority, this.service.msgSrv.success('企业合伙人修改成功');
unifiedSocialCreditCode: dateil.unifiedSocialCreditCode this.initData();
this.isEdit = false;
}
}); });
// this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
// if (res) {
// this.service.msgSrv.success('企业修改成功');
// this.initData();
// this.isEdit = false;
// }
// });
} }
// 识别身份证 参数isFrontfront-正面、back-背面type0-申请人身份证1-法定代表人身份证 // 识别身份证 参数isFrontfront-正面、back-背面type0-申请人身份证1-法定代表人身份证
@ -236,97 +290,89 @@ export class PartnerDetailComponent implements OnInit {
idCardUrl: imgurl, idCardUrl: imgurl,
side: isFront side: isFront
}; };
// this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
// if (res) { if (res) {
// if (type === 1) { if (type === 1) {
// // 法定代表人证件照 // 法定代表人证件照
// if (isFront === 'front') { if (isFront === 'front') {
// // 正面 // 正面
// if (res.name) { if (res.name) {
// this.detailData.legalPersonIdentityVO.name = res.name; this.detailData.legalPersonIdentity.name = res.name;
// } }
// if (res.number) { if (res.number) {
// this.detailData.legalPersonIdentityVO.certificateNumber = res.number; this.detailData.legalPersonIdentity.certificateType = 0;
// } this.detailData.legalPersonIdentity.certificateNumber = res.number;
// } }
// if (isFront === 'back') { }
// // 背面 if (isFront === 'back') {
// if (res.validFrom) { // 背面
// this.detailData.legalPersonIdentityVO.validStartTime = res.validFrom; if (res.validFrom) {
// } this.detailData.legalPersonIdentity.validStartTime = res.validFrom;
// if (res.validTo) { }
// this.detailData.legalPersonIdentityVO.validEndTime = res.validTo; if (res.validTo) {
// } else { this.detailData.legalPersonIdentity.validEndTime = res.validTo;
// this.detailData.legalPersonIdentityVO.validEndTime = null; } else {
// } this.detailData.legalPersonIdentity.validEndTime = null;
// } }
// } }
// // 企业管理员证件照 }
// if (type === 0) { // 企业管理员证件照
// if (isFront === 'front') { if (type === 0) {
// // 正面 if (isFront === 'front') {
// if (res.name) { // 正面
// this.detailData.adminUserInfo.name = res.name; if (res.name) {
// } this.detailData.adminUserInfo.name = res.name;
// if (res.number) { }
// this.detailData.adminUserInfo.certificateNumber = res.number; if (res.number) {
// } this.detailData.adminUserInfo.certificateNumber = res.number;
// } }
// } }
// } if (isFront === 'back') {
// }); // 背面
if (res.validFrom) {
this.detailData.adminUserInfo.validStartTime = res.validFrom;
}
if (res.validTo) {
this.detailData.adminUserInfo.validEndTime = res.validTo;
}
}
}
}
});
} }
// 识别营业执照 // 识别营业执照
checkBusinessLicense(imgurl: any) { checkBusinessLicense(imgurl: any) {
// this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => {
// if (res) { if (res) {
// if (res.registrationNumber) { // if (res.registrationNumber) {
// this.detailData.unifiedSocialCreditCode = res.registrationNumber; // this.detailData.unifiedSocialCreditCode = res.registrationNumber;
// } // }
// if (res.name) { // if (res.name) {
// this.detailData.enterpriseName = res.name; // this.detailData.enterpriseName = res.name;
// } // }
// if (res.type) { if (res.businessTermStartDate) {
// this.detailData.enterpriseType = res.type; this.detailData.operatingStartTime = res.businessTermStartDate;
// } }
// if (res.addressRegionCodes) { if (res.businessTermEndDate) {
// this.detailData.enterpriseAddressCode = res.addressRegionCodes; this.detailData.operatingEndTime = res.businessTermEndDate;
// } } else {
// if (res.address) { this.detailData.operatingEndTime = null;
// 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(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } { private initST(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } {
return { return {
logsColumn: [ logsColumn: [
{ title: '修改后渠道销售', index: 'payCode', width: 180 }, { title: '修改后渠道销售', index: 'newChannelName', width: 180 },
{ title: '修改前渠道销售', index: 'ltdName', width: 160 }, { title: '修改前渠道销售', index: 'originalChannelName', width: 160 },
{ title: '转移客户数', index: 'payDate', className: 'text-center', width: 130 }, { title: '转移客户数', index: 'quantity', className: 'text-center', width: 130 },
{ title: '生效节点', index: 'payDate', width: 150 }, { title: '生效节点', index: 'effectiveNode', width: 150, type: 'enum', enum: { 1: '立即生效', 2: 'CRM审核后生效' } },
{ title: '备注', index: 'payDate', className: 'text-center', width: 150 }, { title: '备注', index: 'remark', className: 'text-center', width: 150 },
{ title: '修改时间', index: 'payDate', className: 'text-center', width: 130 }, { title: '修改时间', index: 'effectiveTime', className: 'text-center', width: 130, type: 'date' },
{ title: '操作人', index: 'payDate', type: 'date', width: 130 }, { title: '操作人', index: 'modifyUserId', width: 130 },
{ {
title: '操作', title: '操作',
fixed: 'right', fixed: 'right',

View File

@ -0,0 +1,182 @@
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content" [title]="'合伙人详情'">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
<ng-template #content>
<nz-skeleton [nzLoading]="false">
<div class="user-info" nz-row>
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="d-flex">
<img [src]="detailData?.enterpriseLogo" />
<div style="flex: 1">
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<p style="margin-bottom: 0">{{ detailData?.adminUserInfo?.name }}</p>
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<nz-badge nzStatus="success" nzText="正常" *ngIf="detailData?.stateLocked === 0"> </nz-badge>
<nz-badge nzStatus="error" nzText="冻结" *ngIf="detailData?.stateLocked === 1"></nz-badge>
</div>
</div>
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
<p>{{ detailData?.adminUserInfo?.certificateNumber }}</p>
</div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24"> 个人合伙人 </div>
</div>
<div nz-row>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24"> 注册时间:{{ detailData?.createTime }} </div>
<div nz-col [nzLg]="12" [nzSm]="24" [nzXs]="24">
所属城市:{{enterpriseDefaultCityName}}
</div>
</div>
</div>
</div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right mt-sm">
<ng-container *ngIf="isEdit; else editButton">
<button [disabled]="service.http.loading" nz-button (click)="reset()"> 取消 </button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="save()"> 保存 </button>
</ng-container>
<ng-template #editButton>
<ng-container>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner(true)"> 通过 </button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPartner(false)"> 驳回 </button>
</ng-container>
<ng-container *ngIf="detailData?.approvalStatus != 10">
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked"
acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
启用
</button>
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked"
acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
冻结
</button>
</ng-container>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="ratify()"> 修改 </button>
</ng-template>
</div>
</div>
</nz-skeleton>
</ng-template>
<ng-template #frozen>
<ng-container *ngTemplateOutlet="
PopconfirmTempalte;
context: { title: '确定冻结该合伙人吗?', content: '停用后,该合伙人将被限制使用,不限于访问受限、邀请客户、佣金收益等,请谨慎操作' }
">
</ng-container>
</ng-template>
<ng-template #enable>
<ng-container *ngTemplateOutlet="
PopconfirmTempalte;
context: { title: '确定启用该合伙人吗?', content: '启用后,该该合伙人将恢复正常使用功能,请再次确认' }
">
</ng-container>
</ng-template>
</page-header-wrapper>
<nz-card [class]="isEdit ? 'edit-box' : 'readOnly-box'">
<sv-container col="3" class="mt16">
<sv-title>合伙人信息</sv-title>
<sv label="姓名">
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.name" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" />
</sv>
<sv label="手机号">
<!-- <input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> -->
{{detailData.adminUserInfo.mobile}}
</sv>
<sv label="身份证号">
<input nz-input type="text" [(ngModel)]="detailData.adminUserInfo.certificateNumber" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" />
</sv>
<sv label="身份证有效期" col="1">
<nz-date-picker [(ngModel)]="detailData.adminUserInfo.validStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar">
</nz-date-picker>
-
<ng-container
*ngIf="!isEdit && !detailData?.adminUserInfo?.validEndTime && detailData.adminUserInfo.validStartTime">
<label style="padding-left: 11px">长期</label>
</ng-container>
<nz-date-picker [(ngModel)]="detailData.adminUserInfo.validEndTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''" style="width: 100px" class="calendar">
</nz-date-picker>
<ng-container *ngIf="isEdit">
<label nz-checkbox [ngModel]="!!!detailData.adminUserInfo.validEndTime"
(ngModelChange)="$event ? (detailData.adminUserInfo.validEndTime = '') : ''" class="ml-sm">长期</label>
</ng-container>
</sv>
<sv label="身份证照" col="1">
<div class="d-flex">
<ng-container *ngTemplateOutlet="
uploadTemplate;
context: {
data: detailData?.adminUserInfo,
status: isEdit,
key: 'certificatePhotoFrontWatermark',
key2: 'certificatePhotoFront',
hover: 'legalFront'
}
">
</ng-container>
<ng-container *ngTemplateOutlet="
uploadTemplate;
context: {
data: detailData?.adminUserInfo,
status: isEdit,
key: 'certificatePhotoBackWatermark',
key2: 'certificatePhotoBack',
hover: 'legalBack'
}
">
</ng-container>
</div>
</sv>
<sv label="所属城市">
<ng-container *ngIf="isEdit; else cascaderelseTemplate">
<nz-tree-select #areaTreeSelect style="width: 350px" [(ngModel)]="enterpriseAddressCode"
[nzDropdownStyle]="{ 'max-height': '300px' }" [nzExpandedKeys]="enterpriseDefaultAddressCode"
[nzNodes]="areaList" [nzAsyncData]="true" [nzCheckStrictly]="true" nzCheckable
(nzExpandChange)="onExpandChange($event.node)" nzDropdownClassName="area-tree-select">
</nz-tree-select>
</ng-container>
<ng-template #cascaderelseTemplate>
{{ enterpriseDefaultCityName || '-' }}
</ng-template>
</sv>
</sv-container>
</nz-card>
<ng-template #PopconfirmTempalte let-title="title" let-content="content">
<div class="ant-popover-message">
<i nz-icon nzType="info-circle" nzTheme="fill"></i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">{{ title }}
</div>
<div class="ant-popover-message-title ng-star-inserted">
{{ content }}
</div>
</div>
</ng-template>
<ng-template #uploadTemplate let-data="data" let-status="status" let-key="key" let-key2="key2" let-hover="hover">
<nz-upload class="avatar-uploader" [nzAction]="uploadURl" nzName="multipartFile" nzListType="picture-card"
[nzShowUploadList]="false" nzFileType="image/png,image/jpeg,image/jpg,image/gif"
[nzDisabled]="!isEdit || disabledUpload" (nzChange)="changeUpload($event, data, key, key2, hover)">
<ng-container *ngIf="!data[key] && isEdit">
<i class="upload-icon" nz-icon [nzType]="service.http.loading ? 'loading' : 'plus'"></i>
<div class="ant-upload-text">上传</div>
</ng-container>
<div *ngIf="data[key]" (mouseover)="detailData[hover] = true" (mouseleave)="detailData[hover] = false"
(click)="$event.cancelBubble = true" class="image-hover">
<img nz-image [nzSrc]="data[key]" style="width: 200px; height: 160px" />
<i nz-icon *ngIf="detailData[hover] && isEdit" nzType="close-circle" nzTheme="fill" class="delete-icon"
(click)="deleteImg(data, key, key2)"></i>
</div>
</nz-upload>
</ng-template>

View File

@ -0,0 +1,37 @@
@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;
}
.image-hover .delete-icon {
top : unset !important;
right : unset !important;
margin-top : -15px;
margin-left: -15px;
}
}

View File

@ -0,0 +1,264 @@
import { DatePipe } from '@angular/common';
import { Component, OnDestroy, 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 { NzTreeNode, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { NzTreeSelectComponent } from 'ng-zorro-antd/tree-select';
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-personal-partner-detail',
templateUrl: './personal-partner-detail.component.html',
styleUrls: ['./personal-partner-detail.component.less'],
providers: [DatePipe]
})
export class PersonalPartnerDetailComponent implements OnInit {
@ViewChild('areaTreeSelect')
areaTreeSelect!: NzTreeSelectComponent;
detailData: any = { adminUserInfo: { name: '' }, legalPersonIdentity: { name: '' } };
tempalateData = { ...this.detailData };
isEdit = false;
uploadURl = apiConf.waterFileUpload;
disabledUpload = false;
enterpriseAddressCode: string[] = [];
enterpriseDefaultAddressCode: string[] = [];
enterpriseDefaultCityName: string = '';
areaList = [];
constructor(
public service: PartnerListService,
private route: ActivatedRoute,
private nzModalService: NzModalService,
private datePipe: DatePipe
) {}
ngOnInit() {
this.initData();
this.loadlAreaList();
}
loadlAreaList() {
this.service.request(this.service.$api_get_region_by_code, { regionCode: '' }).subscribe(res => {
if (res) {
this.areaList = res.map((item: any) => ({
...item,
isLeaf: false,
title: item.name,
key: item.regionCode.toString(),
disabled: true,
isDisableCheckbox: true
}));
}
});
}
initData() {
this.service
.request(this.service.$api_get_personal_partner_detail, {
id: this.route.snapshot.params.id
})
.subscribe(res => {
if (res) {
this.detailData = res;
console.log(this.detailData);
this.tempalateData = { ...this.detailData };
// 拼接所属城市
if (this.detailData?.cityCodesList?.length > 0) {
this.enterpriseAddressCode = (this.detailData?.cityCodesList as any[]).map(city => city.cityCode);
this.enterpriseDefaultCityName = (this.detailData?.cityCodesList as any[]).map(city => city.cityName).join('、');
this.enterpriseDefaultAddressCode = [
...new Set<string>((this.detailData?.cityCodesList as any[]).map(city => city.provinceCode))
];
}
}
});
}
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(isPass: boolean) {
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: PartnerAuditModalComponent,
nzComponentParams: { info: { ...this.detailData, isPass, enterpriseName: this.detailData.adminUserInfo?.name } },
nzFooter: null
});
}
ratify() {
this.isEdit = true;
// 搜索展开省份并选中节点
setTimeout(() => {
if (this.enterpriseDefaultAddressCode?.length > 0 && this.areaTreeSelect) {
this.enterpriseDefaultAddressCode.forEach(code => {
const node = this.areaTreeSelect.getTreeNodeByKey(code);
if (node) {
node.setExpanded(true);
this.onExpandChange(node);
}
});
}
}, 500);
}
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');
}
}
}
onExpandChange(node: NzTreeNode | null | undefined): void {
if (node && node.getChildren().length === 0 && node.isExpanded) {
this.loadRegionData(node).then(data => {
node.addChildren(data);
// 更新选中数据
this.areaTreeSelect.updateSelectedNodes(true);
// 修改子节点选中状态
const children = node.getChildren();
if (children?.length > 0) {
children.forEach(childNode => {
if (this.enterpriseAddressCode.find(area => area === childNode.key)) {
childNode.setChecked(true);
}
});
}
});
}
}
/**
* 级联获取地区数据
*
* @param node 节点
* @param index 层级
* @returns
*/
loadRegionData(node: NzTreeNode): Promise<NzTreeNodeOptions[]> {
let rs: any[] = [];
return new Promise(resolve => {
this.service.request(this.service.$api_get_region_by_code, { regionCode: node?.origin.regionCode || '' }).subscribe(
res => {
rs = res.map((item: any) => ({
...item,
isLeaf: true,
title: item.name,
key: item.regionCode.toString(),
isSelectable: true,
isSelected: true,
isChecked: true
}));
},
_ => {},
() => {
resolve(rs);
}
);
});
}
reset() {
this.detailData = { ...this.tempalateData };
this.isEdit = false;
}
save() {
if (this.enterpriseAddressCode?.length > 3) {
this.service.msgSrv.warning('所属城市不能超过3个');
return;
}
const dateil = { ...this.detailData, cityCodesList: this.enterpriseAddressCode };
Object.assign(dateil.adminUserInfo, {
validStartTime: this.datePipe.transform(dateil.adminUserInfo.validStartTime, 'yyyy-MM-dd'),
validEndTime: this.datePipe.transform(dateil.adminUserInfo.validEndTime, 'yyyy-MM-dd')
});
this.service.request(this.service.$api_save_personal_partner, dateil).subscribe(res => {
if (res) {
this.service.msgSrv.success('个人合伙人修改成功');
this.initData();
this.isEdit = false;
}
});
}
// 识别身份证 参数isFrontfront-正面、back-背面type0-申请人身份证1-法定代表人身份证
checkIdCard(imgurl: any, isFront: string) {
const params = {
idCardUrl: imgurl,
side: isFront
};
this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
if (res) {
// 企业管理员证件照
if (isFront === 'front') {
// 正面
if (res.name) {
this.detailData.adminUserInfo.name = res.name;
}
if (res.number) {
this.detailData.adminUserInfo.certificateNumber = res.number;
}
}
if (isFront === 'back') {
// 背面
if (res.validFrom) {
this.detailData.adminUserInfo.validStartTime = res.validFrom;
}
if (res.validTo) {
this.detailData.adminUserInfo.validEndTime = res.validTo;
}
}
}
});
}
}

View File

@ -1,12 +1,35 @@
import { Injectable, Injector } from '@angular/core'; import { Injectable, Injector } from '@angular/core';
import { BaseService, EACacheService } from '@shared'; import { BaseService, EACacheService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { ImageViewComponent } from 'src/app/shared/components/imagelist'; import { ImageViewComponent } from 'src/app/shared/components/imagelist';
@Injectable() @Injectable()
export class PartnerListService extends BaseService { export class PartnerListService extends ShipperBaseService {
$mock_url = '/rule?_allow_anonymous=true'; $mock_url = '/rule?_allow_anonymous=true';
// 查询合伙人信息-分页
$api_get_partner_page = '/api/mdc/partner/list/page';
// 新增/更新保存企业合伙人信息
$api_save_entp_partner = '/api/mdc/partner/saveEnterprise';
// 新增/更新个人合伙人信息
$api_save_personal_partner = '/api/mdc/partner/savePersonally';
// 获取企业合伙人信息
$api_get_ent_partner_detail = '/api/mdc/partner/getEnterprise';
// 获取合伙人信息
$api_get_personal_partner_detail = '/api/mdc/partner/getPersonally';
// 审核合伙人
$api_audit_partner = '/api/mdc/partner/audit';
// 修改返佣模板
$api_update_partner_template = '/api/mdc/partner/updateTemplate';
// 更新渠道销售
$api_update_partner_channel = '/api/mdc/partner/updateChannelSale';
// 重新发起CRM
$api_resend_crm = '/api/mdc/partner/reSendCrm';
// 查询合伙人修改渠道渠道销售记录
$api_get_personal_channel_list = '/api/mdc/partnerChannelRelLog/list/page';
// 冻结/启用企业业
$api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';
// 根据地区code查询列表 // 根据地区code查询列表
$api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode'; $api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode';
// 根据地区code查询地区详情 // 根据地区code查询地区详情

View File

@ -10,41 +10,45 @@
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
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';
import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component'; import { PartnerBusinessStatisticsIndexComponent } from './business-statistics/components/index/index.component';
import { PartnerPartnerCustomDetailComponent } from './business-statistics/components/partner-custom-detail/partner-custom-detail.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';
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';
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 { 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 { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component';
import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.component';
import { ParterClaimAuditListComponent } from './claim-audit/components/list/list.component'; import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component';
import { ParterChannelSalesEditComponent } from './channel-sales/components/edit/edit.component';
import { ParterChannelSalesListComponent } from './channel-sales/components/list/list.component';
import { ParterClaimAuditListChannelDetailComponent } from './claim-audit/components/channel-detail/channel-detail.component'; import { ParterClaimAuditListChannelDetailComponent } from './claim-audit/components/channel-detail/channel-detail.component';
import { ParterClaimAuditListComponent } from './claim-audit/components/list/list.component';
import { ParterClaimAuditListPartnerDetailComponent } from './claim-audit/components/partner-detail/partner-detail.component'; import { ParterClaimAuditListPartnerDetailComponent } from './claim-audit/components/partner-detail/partner-detail.component';
import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component';
import { ParterLevelConfigListComponent } from './level-config/components/list/list.component';
import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component';
import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/particulars/particulars.component';
import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; 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 { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component';
import { PartnerAccountManagementWithdralDetailComponent } 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 { PartnerRecordedRecordComponent } from './recorded/components/record/record.component'; import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component';
import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component';
import { ParterRebateManageMentSettingComponent } from './rebate-management/components/rebate-setting/rebate-setting.component'; import { ParterRebateManageMentSettingComponent } from './rebate-management/components/rebate-setting/rebate-setting.component';
import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component';
import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component';
import { AddEtpPartnerComponent } from './partner-list/components/add-etp-partner/add-etp-partner.component'; import { AddEtpPartnerComponent } from './partner-list/components/add-etp-partner/add-etp-partner.component';
import { AddPersonalPartnerComponent } from './partner-list/components/add-personal-partner/add-personal-partner.component'; 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 { 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'; import { PartnerKnowledgeClassificationListComponent } from './knowledge/classification/components/list/list.component';
import { ParterArticleManagementListComponent } from './article-management/components/list/list.component'; import { ParterArticleManagementListComponent } from './article-management/components/list/list.component';
import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component'; import { ParterArticleManagementEditComponent } from './article-management/components/edit/edit.component';
import { ScrollimgComponentsAddComponent } from './scrollimg/components/add/add.component';
import { ScrollImgComponentsListComponent } from './scrollimg/components/list/list.component'; import { ScrollImgComponentsListComponent } from './scrollimg/components/list/list.component';
import { BannerComponentsListComponent } from './knowledge/banner/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'; import { BannerComponentsAddComponent } from './knowledge/banner/components/add/add.component';
import { PersonalPartnerDetailComponent } from './partner-list/components/personal-partner-detail/personal-partner-detail.component';
import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/list/list.component';
import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component';
const routes: Routes = [ const routes: Routes = [
{ {
@ -81,7 +85,7 @@ const routes: Routes = [
{ path: 'particulars', component: ParterRebateManageMentParticularsComponent }, { path: 'particulars', component: ParterRebateManageMentParticularsComponent },
{ path: 'record', component: ParterRebateManageMentRecordComponent }, { path: 'record', component: ParterRebateManageMentRecordComponent },
{ path: 'setting', component: ParterRebateManageMentSettingComponent }, { path: 'setting', component: ParterRebateManageMentSettingComponent },
{ path: 'setting/add/:id', component: ParterRebateManageMentAddComponent }, { path: 'setting/add/:id', component: ParterRebateManageMentAddComponent }
] ]
}, },
{ {
@ -93,7 +97,7 @@ const routes: Routes = [
{ path: '', redirectTo: 'list' }, { path: '', redirectTo: 'list' },
{ path: 'list', component: PartnerAccountManagementListComponent }, { path: 'list', component: PartnerAccountManagementListComponent },
{ path: 'detail/:id', component: PartnerAccountManagementAccountDetailComponent }, { path: 'detail/:id', component: PartnerAccountManagementAccountDetailComponent },
{ path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent }, { path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent }
] ]
}, },
{ {
@ -104,16 +108,16 @@ const routes: Routes = [
{ path: 'detail/:id', component: PartnerAccountManagementWithdralDetailComponent } { path: 'detail/:id', component: PartnerAccountManagementWithdralDetailComponent }
] ]
} }
] ]
}, },
{ {
path: 'partner-list', path: 'partner-list',
children: [ children: [
{ path: '', component: PartnerListComponent }, { path: '', component: PartnerListComponent },
{ path: 'detail/:id', component: PartnerDetailComponent }, { path: 'etp-detail/:id', component: PartnerDetailComponent },
{ path: 'personal-detail/:id', component: PersonalPartnerDetailComponent },
{ path: 'add-etp-partner', component: AddEtpPartnerComponent }, { path: 'add-etp-partner', component: AddEtpPartnerComponent },
{ path: 'add-personal-partner', component: AddPersonalPartnerComponent }, { path: 'add-personal-partner', component: AddPersonalPartnerComponent }
] ]
}, },
{ {
@ -130,7 +134,15 @@ const routes: Routes = [
children: [ children: [
{ path: '', component: ScrollImgComponentsListComponent }, { path: '', component: ScrollImgComponentsListComponent },
{ path: 'list', component: ScrollImgComponentsListComponent }, { path: 'list', component: ScrollImgComponentsListComponent },
{ path: 'detail', component: ScrollimgComponentsAddComponent }, { path: 'detail', component: ScrollimgComponentsAddComponent }
]
},
{
path: 'advice-feedback',
children: [
{ path: '', component: ParterAdviceFeedbackListComponent },
{ path: 'list', component: ParterAdviceFeedbackListComponent },
{ path: 'detail', component: ParterAdviceFeedbackDetailComponent }
] ]
}, },
{ {
@ -147,13 +159,13 @@ const routes: Routes = [
{ path: 'article-management-list', component: ParterArticleManagementListComponent }, { path: 'article-management-list', component: ParterArticleManagementListComponent },
{ path: 'article-management-add', component: ParterArticleManagementEditComponent }, { path: 'article-management-add', component: ParterArticleManagementEditComponent },
{ path: 'article-management-edit', component: ParterArticleManagementEditComponent }, { path: 'article-management-edit', component: ParterArticleManagementEditComponent },
{ path: 'banner', component: BannerComponentsListComponent}, { path: 'banner', component: BannerComponentsListComponent },
{ path: 'banner/detail', component: BannerComponentsAddComponent }, { path: 'banner/detail', component: BannerComponentsAddComponent }
] ]
}, }
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forChild(routes)], imports: [RouterModule.forChild(routes)],
exports: [RouterModule] exports: [RouterModule]
}) })
export class PartnerRoutingModule { } export class PartnerRoutingModule {}

View File

@ -58,6 +58,9 @@ import { ScrollimgComponentsAddComponent } from './scrollimg/components/add/add.
import { ScrollImgComponentsListComponent } from './scrollimg/components/list/list.component'; import { ScrollImgComponentsListComponent } from './scrollimg/components/list/list.component';
import { BannerComponentsListComponent } from './knowledge/banner/components/list/list.component'; import { BannerComponentsListComponent } from './knowledge/banner/components/list/list.component';
import { BannerComponentsAddComponent } from './knowledge/banner/components/add/add.component'; import { BannerComponentsAddComponent } from './knowledge/banner/components/add/add.component';
import { PersonalPartnerDetailComponent } from './partner-list/components/personal-partner-detail/personal-partner-detail.component';
import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/list/list.component';
import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component';
const COMPONENTS: any[] = [ const COMPONENTS: any[] = [
PartnerBusinessStatisticsIndexComponent, PartnerBusinessStatisticsIndexComponent,
@ -105,7 +108,10 @@ const COMPONENTS: any[] = [
PartnerKnowledgeClassificationListComponent, PartnerKnowledgeClassificationListComponent,
PartnerEditComponent, PartnerEditComponent,
BannerComponentsListComponent, BannerComponentsListComponent,
BannerComponentsAddComponent BannerComponentsAddComponent,
PersonalPartnerDetailComponent,
ParterAdviceFeedbackListComponent,
ParterAdviceFeedbackDetailComponent
]; ];
@NgModule({ @NgModule({
@ -113,4 +119,4 @@ const COMPONENTS: any[] = [
imports: [CommonModule, PartnerRoutingModule, SharedModule], imports: [CommonModule, PartnerRoutingModule, SharedModule],
providers: [PartnerListService] providers: [PartnerListService]
}) })
export class PartnerModule { } export class PartnerModule {}

View File

@ -4,13 +4,51 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-02-24 20:09:49 * @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-11 15:25:00 * @LastEditTime : 2022-03-21 13:53:31
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <page-header-wrapper [title]="'新增'"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row>
<!-- 数据列表 --> <!-- 数据列表 -->
12121212 <sv-container col="1">
<app-rebate-table></app-rebate-table> &nbsp;&nbsp;<sv label="配置名称"> <input style="max-width: 400px;" nz-input placeholder="请输入" [(ngModel)]="setValue" /></sv>
<sv-title>固定结算费率配置</sv-title>
&nbsp;&nbsp;<sv label="固定结算费率"> <nz-input-number [(ngModel)]="toFixedValue" [nzPrecision]="precision" nzPlaceHolder="请输入"></nz-input-number>&nbsp;%</sv>
<sv-title>业务量和管理费比例配置</sv-title>
&nbsp;&nbsp;<sv label="选择配置类型">
<nz-radio-group [(ngModel)]="radioValue">
<label nz-radio nzValue="A">按全部等级配置</label>
<label nz-radio nzValue="B">按不同等级配置</label>
</nz-radio-group>
</sv>
<sv col="1">
&nbsp;&nbsp;<app-rebate-table></app-rebate-table>
</sv>
<sv-title>关联合伙人配置</sv-title>
&nbsp;&nbsp;<sv label="合伙人选择">
<nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;">
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
</nz-select>
&nbsp;&nbsp;<span >添加</span>
</sv>
&nbsp;&nbsp;<sv label="优先级" col="1">
<nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;">
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
</nz-select>
</sv>
&nbsp;&nbsp;<sv label="规则说明" col="1">
<sf #sf mode="edit" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 16 }} }"
button="none"> </sf>
</sv>
&nbsp;&nbsp;<sv label="规则说明" col="1">
<textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="inputValue"></textarea>
</sv>
</sv-container>
</div>
</nz-card> </nz-card>

View File

@ -0,0 +1,10 @@
:host {
::ng-deep {
.sv__label {
color: #000;
}
.sv__title {
font-weight: 700;
}
}
}

View File

@ -1,3 +1,13 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming
* @LastEditTime : 2022-03-21 13:44:34
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { ModalHelper } from '@delon/theme'; import { ModalHelper } from '@delon/theme';
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
@ -8,10 +18,17 @@ import { NzModalService } from 'ng-zorro-antd/modal';
import { RebateManagementService } from '../../../services/rebate-management.service'; import { RebateManagementService } from '../../../services/rebate-management.service';
@Component({ @Component({
selector: 'app-parter-channel-rebate-management-add', selector: 'app-parter-channel-rebate-management-add',
styleUrls: ['./add.component.less'],
templateUrl: './add.component.html' templateUrl: './add.component.html'
}) })
export class ParterRebateManageMentAddComponent implements OnInit { export class ParterRebateManageMentAddComponent implements OnInit {
setValue: string = '';
toFixedValue: Number = 2;
radioValue = 'A';
precision = 2;
inputValue= '';
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema1!: SFSchema;
constructor( constructor(
public router: Router, public router: Router,
public ar: ActivatedRoute, public ar: ActivatedRoute,
@ -19,7 +36,25 @@ export class ParterRebateManageMentAddComponent implements OnInit {
private modal: NzModalService, private modal: NzModalService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
) {} ) {}
initSF(data?: any) {
this.schema1 = {
properties: {
content: {
type: 'string',
title: '',
ui: {
widget: 'tinymce',
loadingTip: 'loading...',
config: {
height: 650
}
},
default: data?.agreementContent || ''
}
}
};
}
ngOnInit() { ngOnInit() {
this.initSF()
} }
} }

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-02-24 20:09:49 * @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-11 14:45:48 * @LastEditTime : 2022-03-22 14:42:27
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\rebate-setting.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\rebate-setting.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -39,7 +39,7 @@
</div> </div>
<st <st
#st #st
[data]="data" [data]="service.$api_get_rebateConfig"
[columns]="columns" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"

View File

@ -72,7 +72,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
title: '时间月份', title: '时间月份',
format: 'month', format: 'month',
}, },
phone: { partnerId: {
type: 'string', type: 'string',
title: '合伙人名称' title: '合伙人名称'
}, },
@ -94,31 +94,31 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
}, },
{ {
title: '配置类型', title: '配置类型',
index: 'name1' index: 'configType'
}, },
{ {
title: '备注', title: '备注',
index: 'name1' index: 'remark'
}, },
{ {
title: '关联合伙人范围', title: '关联合伙人范围',
index: 'name1' index: 'partnerType'
}, },
{ {
title: '创建时间', title: '创建时间',
index: 'name1' index: 'enableTime'
}, },
{ {
title: '启用时间', title: '启用时间',
index: 'name1' index: 'enableTime'
}, },
{ {
title: '优先级', title: '优先级',
index: 'name44' index: 'priority'
}, },
{ {
title: '状态', title: '状态',
index: 'name44' index: 'stateLocked'
}, },
{ {
title: '操作', title: '操作',

View File

@ -17,6 +17,8 @@ import { BaseService } from '@shared';
export class RebateManagementService extends BaseService { export class RebateManagementService extends BaseService {
// 查询规则抽查列表 // 查询规则抽查列表
public $api_get_listCompliancePage = '/api/sdc/billRiskOperate/listRiskPage'; public $api_get_listCompliancePage = '/api/sdc/billRiskOperate/listRiskPage';
// 查询返佣配置表
public $api_get_rebateConfig = '/api/mdc/rebateConfig/list/page';
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector); super(injector);
} }

View File

@ -16,11 +16,11 @@
</ng-template> </ng-template>
<ng-template #action> <ng-template #action>
<div class="mr-xl"> <div class="mr-xl">
<p class="text-lg mb-sm mt-xs">待审批</p> <p class="text-lg mb-sm mt-xs">{{formData?.stsLabel}}</p>
<div> <div *ngIf="formData?.sts === '0' || formData?.sts ==='1'">
<button nz-button [nzType]="'primary'" <button nz-button [nzType]="'primary'" (click)="auditAction(formData,formData?.refundStatus)">{{formData?.sts
(click)="auditAction(formData,formData?.refundStatus)">{{formData?.refundStatusLabel === ===
'1'?'审核':'复审'}}</button> '0' ?'审核':'复审'}}</button>
</div> </div>
</div> </div>
</ng-template> </ng-template>
@ -31,48 +31,49 @@
<nz-alert nzType="info" nzMessage="入账信息" class="mb-md"></nz-alert> <nz-alert nzType="info" nzMessage="入账信息" class="mb-md"></nz-alert>
<div se-container [labelWidth]="130"> <div se-container [labelWidth]="130">
<se label="账户名称"> <se label="账户名称">
{{formData?.ltdName}} {{formData?.accountName}}
</se> </se>
<se label="网络货运人"> <se label="网络货运人">
{{formData?.ltdName}} {{formData?.ltdName}}
</se> </se>
<se label="入账单号"> <se label="入账单号">
{{formData?.refundApplyCode}} {{formData?.entryNumber}}
</se> </se>
<se label="银行类型"> <se label="银行类型">
{{formData?.bankType==='1'?'平安银行':'浦发银行'}} {{formData?.bankName}}
</se> </se>
<se label="虚拟账户"> <se label="虚拟账户">
{{formData?.virtualAccount}} {{formData?.fictitiousAccount}}
</se> </se>
<se label="提交时间"> <se label="提交时间">
{{formData?.createTime}} {{formData?.submitTime}}
</se> </se>
<se label="开票金额"> <se label="开票金额">
{{formData?.amount | currency}} {{formData?.invoiceAmount | currency}}
</se> </se>
<se label="代缴个税"> <se label="代缴个税">
{{formData?.amount | currency}} {{formData?.taxPersonal | currency}}
</se> </se>
<se label="入账金额"> <se label="入账金额">
{{formData?.amount | currency}} {{formData?.recordedAmount | currency}}
</se> </se>
<se label="入账状态"> <se label="入账状态">
{{formData?.refundStatusLabel}} {{formData?.stsLabel}}
</se> </se>
<se label="发票图片"> <se label="发票图片">
<img nz-image width="200px" height="200px" <img *ngIf="formData?.invoiceUrl" nz-image width="100px" height="100px" [nzSrc]="formData?.invoiceUrl" alt="" />
nzSrc="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="" /> <span *ngIf="!formData?.invoiceUrl">-</span>
</se> </se>
<se label="快递单号"> <se label="快递单号">
{{formData?.bankCardNumber}} {{formData?.expressName}}
</se> </se>
<se label="纳税凭证"> <se label="纳税凭证">
<img nz-image width="200px" height="200px" <img *ngIf="formData?.taxVoucherUrl" nz-image width="100px" height="100px" [nzSrc]="formData?.taxVoucherUrl"
nzSrc="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="" /> alt="" />
<span *ngIf="!formData?.taxVoucherUrl">-</span>
</se> </se>
<se label="银行流水号"> <se label="银行流水号">
{{formData?.bankSerialNumber}} {{formData?.bankFlow}}
</se> </se>
</div> </div>

View File

@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
import { RecordedService } from '../../services/recorded.service';
@Component({ @Component({
@ -16,57 +17,57 @@ export class PartnerRecordedDetailComponent implements OnInit {
msg = ''; msg = '';
id = ''; 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.id = route.snapshot.params.id;
this.loadRefundDetail(this.id); this.getRecordedDetail(this.id);
} }
ngOnInit(): void { } ngOnInit(): void { }
loadRefundDetail(id: string) { getRecordedDetail(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) { if (res) {
this.formData = res; this.formData = res;
// 处理流程节点数据 // 处理流程节点数据
// 流程是否结束 // 流程是否结束
let isEnd = false; // let isEnd = false;
if (res.successTime) { // if (res.successTime) {
isEnd = true; // isEnd = true;
if (res.refundStatus === '3') { // if (res.refundStatus === '3') {
this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' }); // this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' });
} else { // } else {
this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' }); // this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' });
} // }
} // }
if (res.agreeTime && res.refundStatus !== '4') { // if (res.agreeTime && res.refundStatus !== '4') {
this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' }); // this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' });
} // }
if (res.agreeTime) { // if (res.agreeTime) {
if (res.refundStatus === '4') { // if (res.refundStatus === '4') {
isEnd = true; // isEnd = true;
this.timeLineData.push({ // this.timeLineData.push({
time: res.agreeTime, // time: res.agreeTime,
value: `拒绝提现<br/>操作人员:${res.handlerUserIdLabel}`, // value: `拒绝提现<br/>操作人员:${res.handlerUserIdLabel}`,
color: 'red' // color: 'red'
}); // });
} else { // } else {
this.timeLineData.push({ // this.timeLineData.push({
time: res.agreeTime, // time: res.agreeTime,
value: `审核通过<br/>操作人员:${res.handlerUserIdLabel}`, // value: `审核通过<br/>操作人员:${res.handlerUserIdLabel}`,
color: 'gray' // color: 'gray'
}); // });
} // }
} // }
if (res.createTime) { // if (res.createTime) {
this.timeLineData.push({ // this.timeLineData.push({
time: res.createTime, // time: res.createTime,
value: `提交提现申请<br/>提现${res.amount}元至${res.bankName}(${res.bankCardNumber})<br/>操作人员:${res.userIdLabel}`, // value: `提交提现申请<br/>提现${res.amount}元至${res.bankName}(${res.bankCardNumber})<br/>操作人员:${res.userIdLabel}`,
color: 'gray' // color: 'gray'
}); // });
} // }
if (this.timeLineData?.length > 0 && !isEnd) { // if (this.timeLineData?.length > 0 && !isEnd) {
this.timeLineData[0].color = 'green'; // this.timeLineData[0].color = 'green';
} // }
} }
}); });
} }
@ -85,48 +86,45 @@ export class PartnerRecordedDetailComponent implements OnInit {
onClick: () => { onClick: () => {
if (!this.msg || this.msg.trim().length === 0) { if (!this.msg || this.msg.trim().length === 0) {
this.service.msgSrv.warning('请填写拒绝原因 '); this.service.msgSrv.warning('请填写拒绝原因 ');
return false; return;
} }
this.service this.audit({ ids: params, rejectReason: this.msg, sts: '3' }, () => {
.request(this.service.$api_disagree_refund, { modal.destroy(true);
refundApplicationId: params, }, '审核拒绝成功');
msg: this.msg
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('审核拒绝成功');
modal.destroy(true);
}
});
return false;
} }
}, },
{ {
label: '通过', label: '通过',
type: 'primary', type: 'primary',
onClick: () => { onClick: () => {
this.service this.audit({ ids: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => {
.request(this.service.$api_agree_refund, { modal.destroy(true);
refundApplicationId: params, }, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`);
msg: this.msg
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('审核通过成功');
modal.destroy(true);
}
});
} }
} }
] ]
}); });
modal.afterClose.subscribe((res: any) => { modal.afterClose.subscribe((res: any) => {
if (res) { if (res) {
this.loadRefundDetail(this.id); this.getRecordedDetail(this.id);
} }
}); });
} }
goBack() { goBack() {
history.go(-1); 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();
}
});
}
} }

View File

@ -32,7 +32,7 @@
<div class="d-flex align-items-center "> <div class="d-flex align-items-center ">
<div class="mr-md"> <div class="mr-md">
已选择 已选择
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据&nbsp;&nbsp; 累计提现 <strong class="text-red">{{ <strong class="text-red">{{ selectedRows.length }}</strong> 条数据,累计入账 <strong class="text-red">{{
totalCallNo }}</strong> totalCallNo }}</strong>
<!-- <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> --> <!-- <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> -->
</div> </div>
@ -41,8 +41,9 @@
</ng-template> </ng-template>
<div class="table-content"> <div class="table-content">
<st #st [data]="service.$api_get_refund_page" [columns]="columns" [req]="{ process: beforeReq }" <st #st [data]="service.$api_get_recorded_page" [columns]="columns"
[loading]="service.http.loading" [scroll]="{ x:'1200px' }" (change)="stChange($event)" [req]="{ method: 'POST', allInBody: true,process: beforeReq}" [loading]="service.http.loading"
[scroll]="{ x:'1200px' }" (change)="stChange($event)"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }" [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
[page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }"> [page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }">
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column"> <ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">

View File

@ -2,9 +2,11 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st'; import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
import Big from 'src/app/shared/utils/deal-precision'; import Big from 'src/app/shared/utils/deal-precision';
import { RecordedService } from '../../services/recorded.service';
@Component({ @Component({
@ -39,7 +41,8 @@ export class PartnerRecordedRecordComponent implements OnInit {
accountName = ''; // 账户名称 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.accountName = this.ar.snapshot.queryParams?.userIdLabel || '';
this.ltdId = this.ar.snapshot.queryParams?.ltdId || ''; this.ltdId = this.ar.snapshot.queryParams?.ltdId || '';
@ -67,7 +70,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' })); // data = data.map(node => ({ ...node, disabled: node.sts !== '0' }));
return data; return data;
}; };
@ -101,7 +104,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
} }
let totalCallNo = 0; let totalCallNo = 0;
this.selectedRows.forEach((item => { this.selectedRows.forEach((item => {
totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse(); totalCallNo = new Big(this.totalCallNo).plus(item?.entryAmount).parse();
})); }));
this.totalCallNo = totalCallNo; this.totalCallNo = totalCallNo;
} else if (e.type === 'loaded') { } else if (e.type === 'loaded') {
@ -122,6 +125,10 @@ export class PartnerRecordedRecordComponent implements OnInit {
} }
auditAction(item?: any, type: string = '1') { auditAction(item?: any, type: string = '1') {
if (!item && this.selectedRows.length === 0) {
this.service.msgSrv.warning('请选择需要审核的记录');
return;
}
this.msg = ''; this.msg = '';
let params: Array<string> = []; let params: Array<string> = [];
if (item) { if (item) {
@ -139,39 +146,34 @@ export class PartnerRecordedRecordComponent implements OnInit {
onClick: () => { onClick: () => {
if (!this.msg || this.msg.trim().length === 0) { if (!this.msg || this.msg.trim().length === 0) {
this.service.msgSrv.warning('请填写拒绝原因 '); this.service.msgSrv.warning('请填写拒绝原因 ');
return false; return;
} }
this.service this.audit({ ids: params, rejectReason: this.msg, sts: '3' }, () => {
.request(this.service.$api_disagree_refund, { modal.destroy();
refundApplicationId: params, this.st.load(1);
msg: this.msg }, '审核拒绝成功');
}) // this.service
.subscribe(res => { // .request(this.service.$api_disagree_recorded, {
if (res) { // id: params,
this.service.msgSrv.success('审核拒绝成功'); // rejectReason: this.msg
modal.destroy(); // })
this.st.load(1); // .subscribe(res => {
} // if (res) {
}); // this.service.msgSrv.success('审核拒绝成功');
return false; // modal.destroy();
// this.st.load(1);
// }
// });
} }
}, },
{ {
label: '通过', label: '通过',
type: 'primary', type: 'primary',
onClick: () => { onClick: () => {
this.service this.audit({ ids: params, rejectReason: this.msg, sts: '1' }, () => {
.request(this.service.$api_agree_refund, { modal.destroy();
refundApplicationId: params, this.st.load(1);
msg: this.msg }, '审核通过成功');
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('审核通过成功');
modal.destroy();
this.st.load(1);
}
});
} }
} }
] ]
@ -230,12 +232,19 @@ export class PartnerRecordedRecordComponent implements OnInit {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
refundStatus: { sts: {
type: 'string', type: 'string',
title: '入账状态', title: '入账状态',
default: '',
enum: [
{ label: '全部', value: '' },
{ label: '待初审', value: '0' },
{ label: '待复核', value: '1' },
{ label: '已入账', value: '2' },
{ label: '已拒绝', value: '3' },
],
ui: { ui: {
widget: 'dict-select', widget: 'select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择' placeholder: '请选择'
} }
}, },
@ -247,10 +256,10 @@ export class PartnerRecordedRecordComponent implements OnInit {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(), asyncData: () => this.shipperSrv.getNetworkFreightForwarder({}, true),
} }
}, },
createTime: { submitTime: {
title: '提交时间', title: '提交时间',
type: 'string', type: 'string',
ui: { ui: {
@ -270,9 +279,9 @@ export class PartnerRecordedRecordComponent implements OnInit {
private initST(): STColumn[] { private initST(): STColumn[] {
return [ return [
{ title: '', index: 'key', type: 'checkbox', className: 'text-center' }, { title: '', index: 'key', type: 'checkbox', className: 'text-center' },
{ title: '账户名称', index: 'createTime', width: 180, className: 'text-center' }, { title: '账户名称', index: 'accountName', width: 180, className: 'text-center' },
{ title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, { title: '虚拟账户', index: 'fictitiousAccount', width: 180, className: 'text-center' },
{ title: '入账单号', index: 'refundApplyCode', width: 190, className: 'text-center' }, { title: '入账单号', index: 'entryNumber', width: 190, className: 'text-center' },
{ title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' }, { title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' },
{ {
title: '开票金额', title: '开票金额',
@ -284,7 +293,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
}, },
{ {
title: '代缴个税', title: '代缴个税',
index: 'amount', index: 'taxPersonal',
width: 150, width: 150,
type: 'widget', type: 'widget',
className: 'text-right', className: 'text-right',
@ -292,15 +301,15 @@ export class PartnerRecordedRecordComponent implements OnInit {
}, },
{ {
title: '入账金额', title: '入账金额',
index: 'amount', index: 'entryAmount',
width: 150, width: 150,
type: 'widget', type: 'widget',
className: 'text-right', className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) } widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) }
}, },
{ title: '提交时间', index: 'bankSerialNumber', width: 160, className: 'text-center' }, { title: '提交时间', index: 'submitTime', width: 160, className: 'text-center' },
{ title: '入账状态', index: 'refundStatusLabel', width: 100, className: 'text-center' }, { title: '入账状态', index: 'stsLabel', width: 120, className: 'text-center' },
{ {
title: '操作', title: '操作',
fixed: 'right', fixed: 'right',
@ -308,12 +317,12 @@ export class PartnerRecordedRecordComponent implements OnInit {
buttons: [ buttons: [
{ {
text: '审核', text: '审核',
iif: item => item.refundStatus === '1', iif: item => item.sts === '0',
click: item => this.auditAction(item) click: item => this.auditAction(item)
}, },
{ {
text: '复审', text: '复审',
iif: item => item.refundStatus === '2', iif: item => item.sts === '1',
click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar })
}, },
{ {
@ -324,4 +333,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();
}
});
}
} }

View File

@ -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/partnerInvoiceEntry/queryInvoiceEntrylist`; // 查询合伙人发票入账主表
$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);
}
}

View File

@ -0,0 +1,13 @@
<button nz-button (click)="refresh()" nzType="primary">Refresh</button>
<g2-pie
#pie
[hasLegend]="true"
title="销售额"
subTitle="销售额"
[total]="total"
[valueFormat]="format"
[data]="salesPieData"
height="294"
repaint="false"
(clickItem)="handleClick($event)"
></g2-pie>

View File

@ -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 = `&yen ${this.salesPieData.reduce((pre, now) => now.y + pre, 0).toFixed(2)}`;
if (this.pie) {
// 等待组件渲染
setTimeout(() => this.pie.changeData());
}
}
format(val: number): string {
return `&yen ${val.toFixed(2)}`;
}
handleClick(data: G2PieClickItem): void {
this.msg.info(`${data.item.x} - ${data.item.y}`);
}
}

View File

@ -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 {}

View File

@ -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 {}

View File

@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class RegulatoryDataService {
constructor() { }
}

View File

@ -15,6 +15,7 @@ import { RouterModule, Routes } from '@angular/router';
import { LayoutProComponent } from '@brand'; import { LayoutProComponent } from '@brand';
import { EATokenGuard } from '@core'; import { EATokenGuard } from '@core';
import { environment } from '@env/environment'; import { environment } from '@env/environment';
import { AuthGuard } from '../core/guards/auth.guard'; import { AuthGuard } from '../core/guards/auth.guard';
// dashboard pages // dashboard pages
@ -68,6 +69,7 @@ const routes: Routes = [
}, },
{ path: 'menu-management', loadChildren: () => import('./menu-manager/menu-manager.module').then(m => m.MenuManagerModule) }, { 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: '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', path: 'download',
loadChildren: () => import('./download/download.module').then(m => m.DownloadModule) loadChildren: () => import('./download/download.module').then(m => m.DownloadModule)
@ -92,4 +94,4 @@ const routes: Routes = [
], ],
exports: [RouterModule] exports: [RouterModule]
}) })
export class RouteRoutingModule { } export class RouteRoutingModule {}

View File

@ -99,8 +99,8 @@ export class TicketService extends ShipperBaseService {
// 查询快递轨迹 // 查询快递轨迹
$api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes'; $api_get_express_routes = '/api/fcc/ficoExpressH/searchRoutes';
constructor(public injector: Injector, public eaCacheSrv: EACacheService) { constructor(public injector: Injector) {
super(injector, eaCacheSrv); super(injector);
} }
reviewPDF(url: string) { reviewPDF(url: string) {

View File

@ -135,16 +135,14 @@ export class UsermanageService extends ShipperBaseService {
// 查询司机配置列表 // 查询司机配置列表
$api_configPage = '/api/mdc/cuc/driver/list/configPage'; $api_configPage = '/api/mdc/cuc/driver/list/configPage';
// 批量修改企业渠道 // 批量修改企业渠道
$api_batchUpdateEnterpriceChannel = '/api/mdc/enterpriceRelLog/batchUpdateEnterpriceChannel'; $api_batchUpdateEnterpriceChannel = '/api/mdc/enterpriceRelLog/batchUpdateEnterpriceChannel';
// 批量修改企业合伙人 // 批量修改企业合伙人
$api_batchUpdateEnterpricePartner = '/api/mdc/enterpriceRelLog/batchUpdateEnterpricePartner'; $api_batchUpdateEnterpricePartner = '/api/mdc/enterpriceRelLog/batchUpdateEnterpricePartner';
// 渠道销售修改详情 // 渠道销售修改详情
$api_partnerChannelUpdateDetaiList = '/api/mdc/enterpriceRelLog/partnerChannelUpdateDetaiList'; $api_partnerChannelUpdateDetaiList = '/api/mdc/enterpriceRelLog/partnerChannelUpdateDetaiList';
constructor(public injector: Injector, private nzModalService: NzModalService) {
constructor(public injector: Injector, public nzModalService: NzModalService, public eaCacheSrv: EACacheService) { super(injector);
super(injector, eaCacheSrv);
} }
showImg(url: any) { showImg(url: any) {

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-25 20:18:52 * @Date : 2022-01-25 20:18:52
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-11 15:12:01 * @LastEditTime : 2022-03-21 14:14:06
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -14,48 +14,52 @@
<button nz-button nzType="primary" (click)="add()">新增公里数</button> <button nz-button nzType="primary" (click)="add()">新增公里数</button>
<button class="ml-md" nz-button nzType="primary" (click)="save()">保存</button> <button class="ml-md" nz-button nzType="primary" (click)="save()">保存</button>
</div> --> </div> -->
<div>
<sf #sf [schema]="schema" [formData]="sfdata" [button]="'none'" [ui]="ui">
<ng-template sf-template="freightPrice" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate">
<nz-input-number [(ngModel)]="minrebatePrice" [nzMin]="0" ></nz-input-number>
</nz-input-group>
<ng-template #addOnAfterTemplate>
<span ></span>
</ng-template>
</ng-template>
</sf>
</div>
<nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false" <nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false"
[nzScroll]="{ x: '900px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1200px;"> [nzScroll]="{ x: '900px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1200px;">
<thead> <thead>
<tr> <tr>
<th rowspan="2" nzWidth="250px" nzAlign="center" nzLeft>险种</th> <th rowspan="2" nzWidth="250px" nzAlign="center" nzLeft>序号</th>
<th nzWidth="220px" nzAlign="center" >普货-基本险</th> <th nzWidth="220px" nzAlign="center" >合伙人等级</th>
<th nzWidth="220px" nzAlign="center" >普货-综合险</th> <th nzWidth="220px" nzAlign="center" >初始业务量(万/月)</th>
<th nzWidth="220px" nzAlign="center" >到达业务量(万/月)</th>
<th nzWidth="220px" nzAlign="center" >管理费比例%</th>
<th rowspan="2" nzWidth="60px" nzAlign="center" nzRight>操作</th> <th rowspan="2" nzWidth="60px" nzAlign="center" nzRight>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let item of groupingTable.data;let i = index"> <tr *ngFor="let item of groupingTable.data;let i = index">
<td nzWidth="250px" nzAlign="center" nzLeft> <td nzWidth="250px" nzAlign="center" nzLeft>
<div style="display: flex;align-items: center;justify-content: space-between;"> <div style="text-align: center;">
<div > <div>
公里数km {{i + 1}}
</div>
<div style="color:#f0f0f0;">|</div>
<div >
<label style="width: 65px;text-align: right;"> {{item.startKm}}</label>
<label>-</label>
<nz-input-number [ngModel]="item.endKm" (ngModelChange)="changeEndKm($event,i)" [nzMin]="0"
[nzFormatter]="formatterDollar" nzSize="small">
</nz-input-number>(含)
</div> </div>
</div> </div>
</td>
<td nzWidth="220px" nzAlign="center" >
<div >
<nz-select ngModel="lucy">
<nz-option nzValue="jack" nzLabel="Jack154654564654"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
</nz-select>
</div>
</td>
<td nzWidth="220px" nzAlign="center" >
<div style=" margin-left: 26%">
<nz-input-group nzPrefix="=">
<nz-input-number [(ngModel)]="item.baserebateRate" [nzMin]="0" nzSize="small"
>
</nz-input-number>
</nz-input-group>
</div>
</td>
<td nzWidth="220px" nzAlign="center" >
<div style=" margin-left: 26%">
<nz-input-group nzPrefix="">
<nz-input-number [(ngModel)]="item.blanketrebateRate" [nzMin]="0" nzSize="small" >
</nz-input-number>
</nz-input-group>
</div>
</td> </td>
<td nzWidth="220px" nzAlign="center" > <td nzWidth="220px" nzAlign="center" >
<div style=" margin-left: 26%"> <div style=" margin-left: 26%">
@ -69,19 +73,14 @@
</ng-template> </ng-template>
</div> </div>
</td> </td>
<td nzWidth="220px" nzAlign="center" >
<div style=" margin-left: 26%">
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate2">
<nz-input-number [(ngModel)]="item.blanketrebateRate" [nzMin]="0" nzSize="small" >
</nz-input-number>
</nz-input-group>
</div>
</td>
<td nzWidth="60px" nzAlign="center" nzRight> <td nzWidth="60px" nzAlign="center" nzRight>
<a nz-popconfirm
nzPopconfirmTitle="是否新增?" (nzOnConfirm)="add()"
>+</a>
<a *ngIf="i === groupingTable.data.length-1 && groupingTable.data.length>1" <a *ngIf="i === groupingTable.data.length-1 && groupingTable.data.length>1"
nz-popconfirm nz-popconfirm
nzPopconfirmTitle="是否确认删除?" (nzOnConfirm)="deleteRow(i)" nzPopconfirmTitle="是否确认删除?" (nzOnConfirm)="deleteRow(i)"
>删除</a> >-</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -12,26 +12,17 @@ import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
export class RebateTableComponent implements OnInit { export class RebateTableComponent implements OnInit {
data: any[] = []; data: any[] = [];
headers: any[] = []; headers: any[] = [];
sfdata: any; // 货源单设置回显
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
ui!: SFUISchema;
formatterDollar = (value: number): string => `${value}`; formatterDollar = (value: number): string => `${value}`;
minrebatePrice: number = 0;
changeSub = new Subject<string>(); changeSub = new Subject<string>();
constructor(public service: BaseService, private cdr: ChangeDetectorRef) {} constructor(public service: BaseService, private cdr: ChangeDetectorRef) {}
ngOnInit(): void { ngOnInit(): void {
this.loadData(); this.loadData();
this.initSF()
this.changeEndKmAction(); this.changeEndKmAction();
this.minrebatePrice = 1000
} }
loadData() { loadData() {
this.service.request('/api/mdc/cuc/rebateConfig/list').subscribe(res => { this.service.request('/api/mdc/cuc/insuranceConfig/list').subscribe(res => {
if (res) { if (res) {
console.log(res); console.log(res);
this.data = res; this.data = res;
@ -43,35 +34,10 @@ export class RebateTableComponent implements OnInit {
]).subscribe(res => { ]).subscribe(res => {
if (res) { if (res) {
console.log(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 event 车长
@ -145,12 +111,8 @@ export class RebateTableComponent implements OnInit {
} }
save() { save() {
if(!this.minrebatePrice) { console.log(this.data)
this.service.msgSrv.error('必填项为空!')
return
}
let params= { let params= {
minrebatePrice: this.minrebatePrice,
rebateConfigDTOS: this.data rebateConfigDTOS: this.data
} }
console.log(params); console.log(params);

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-25 20:23:54 * @Date : 2022-01-25 20:23:54
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-11 17:20:49 * @LastEditTime : 2022-03-21 14:11:56
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.module.ts * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -18,8 +18,9 @@ import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
import { NzInputModule } from 'ng-zorro-antd/input'; import { NzInputModule } from 'ng-zorro-antd/input';
import { DelonFormModule } from '@delon/form'; import { DelonFormModule } from '@delon/form';
import { NzButtonModule } from 'ng-zorro-antd/button'; import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzSelectModule } from 'ng-zorro-antd/select';
const COMPONENTS = [RebateTableComponent]; const COMPONENTS = [RebateTableComponent];
const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule]; const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule,NzSelectModule];
@NgModule({ @NgModule({
declarations: COMPONENTS, declarations: COMPONENTS,

View File

@ -33,4 +33,5 @@ export * from './shared.module';
export * from './shared-delon.module'; export * from './shared-delon.module';
export * from './shared-zorro.module'; export * from './shared-zorro.module';
export * from './shared-third.module'; export * from './shared-third.module';
export * from './shared-g2.module';
export * from './widget/st-widget.module'; export * from './widget/st-widget.module';

View File

@ -17,10 +17,10 @@ export class ShipperBaseService extends BaseService {
$api_get_network_freight_forwarder_one = `/api/mdc/cuc/networkTransporter/get`; // 获取网络货运人 $api_get_network_freight_forwarder_one = `/api/mdc/cuc/networkTransporter/get`; // 获取网络货运人
// 根据FullKey获取系统子配置(树) // 根据FullKey获取系统子配置(树)
$api_getSysConfigTreeByParentFullKey = `/api/mdc/pbc/sysConfig/getSysConfigTreeByParentFullKey`; $api_getSysConfigTreeByParentFullKey = `/api/mdc/pbc/sysConfig/getSysConfigTreeByParentFullKey`;
envCache: any; // 获取全部返佣配置
constructor(public injector: Injector, public eaCacheSrv: EACacheService) { $api_get_rebate_config = `/api/mdc/rebateConfig/list/listRebateConfig`;
constructor(public injector: Injector) {
super(injector); super(injector);
this.envCache = this.eaCacheSrv.get(cacheConf.env);
} }
/** /**
@ -44,22 +44,22 @@ export class ShipperBaseService extends BaseService {
* 获取所属项目 * 获取所属项目
* @returns * @returns
*/ */
getEnterpriseProject(params?: any) { getEnterpriseProject(params?: any) {
return this.request(this.$api_get_enterprise_project, params).pipe( return this.request(this.$api_get_enterprise_project, params).pipe(
map((res: any) => { map((res: any) => {
if (!res) { if (!res) {
return []; return [];
} }
const list = res.map(((item: any) => { const list = res.map((item: any) => {
return { return {
label: item.projectName, label: item.projectName,
value: item.id value: item.id
} };
})) });
const obj = [{ value: '', label: '全部' }]; const obj = [{ value: '', label: '全部' }];
return [...obj, ...list]; return [...obj, ...list];
}) })
) );
} }
/** /**
@ -204,4 +204,23 @@ export class ShipperBaseService extends BaseService {
}) })
); );
} }
/**
* 获取全部返佣配置
* @returns
*/
getRebateConfig() {
const params = {};
return this.request(this.$api_get_rebate_config, params, 'POST').pipe(
map(res => {
if (res) {
return res.map((m: any) => {
return { label: m.configName, value: m.id };
});
} else {
return [];
}
})
);
}
} }

View File

@ -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];

View File

@ -47,6 +47,7 @@ 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 { NzSwitchModule } from 'ng-zorro-antd/switch';
import { NzImageModule } from 'ng-zorro-antd/image'; import { NzImageModule } from 'ng-zorro-antd/image';
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
export const SHARED_ZORRO_MODULES = [ export const SHARED_ZORRO_MODULES = [
NzButtonModule, NzButtonModule,
@ -88,5 +89,6 @@ export const SHARED_ZORRO_MODULES = [
NzAffixModule, NzAffixModule,
NzTypographyModule, NzTypographyModule,
NzSwitchModule, NzSwitchModule,
NzImageModule NzImageModule,
NzTreeSelectModule
]; ];

View File

@ -1,5 +1,5 @@
/* /*
* @Description : * @Description :
* @Version : 1.0 * @Version : 1.0
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-13 10:36:49 * @Date : 2021-12-13 10:36:49
@ -37,4 +37,8 @@ export class DictSelectWidget extends ControlWidget implements OnInit {
if (this.ui.change) this.ui.change(value); if (this.ui.change) this.ui.change(value);
this.setValue(value); this.setValue(value);
} }
reset(value: any) {
this.setValue(value);
}
} }

View File

@ -596,6 +596,15 @@
"text": "轮播图管理", "text": "轮播图管理",
"link": "/partner/scroll-img/list" "link": "/partner/scroll-img/list"
}, },
{
"text": "建议反馈管理",
"link": "/partner/advice-feedback/list"
},
{
"text": "建议反馈管理详情",
"link": "/partner/advice-feedback/detail",
"hide": true
},
{ {
"text": "知识库管理", "text": "知识库管理",
"icon": "iconfont icon-yundan-copy", "icon": "iconfont icon-yundan-copy",
@ -630,6 +639,16 @@
} }
] ]
},
{
"text": "数据监管",
"icon": "iconfont icon-hetong-copy",
"group": true,
"children": [{
"text": "数据报表",
"link": "/regulatory-data/dashboard"
}
]
} }
] ]
}] }]

View File

@ -7,11 +7,11 @@
@import './styles/theme'; @import './styles/theme';
.icon { .icon {
width : 18px; width : 18px;
fill : currentColor; fill : currentColor;
overflow : hidden; overflow : hidden;
font-size: 18px !important; font-size : 18px !important;
color : #ffffff; color : #ffffff;
margin-right: 10px; margin-right: 10px;
} }
@ -47,4 +47,38 @@ input[type="number"] {
.break-word-all { .break-word-all {
word-break: break-all; word-break: break-all;
word-wrap : break-word; word-wrap : break-word;
}
.ant-select-tree .ant-select-tree-treenode-disabled {
.ant-select-tree-checkbox {
margin: 0;
.ant-select-tree-checkbox-inner {
width : 0px;
border-color: #ffffff !important;
}
}
.ant-select-tree-node-content-wrapper {
color : unset;
cursor: not-allowed;
}
}
.area-tree-select {
.ant-select-tree .ant-select-tree-treenode-disabled {
.ant-select-tree-checkbox {
margin: 0;
.ant-select-tree-checkbox-inner {
width : 0px;
border-color: #ffffff !important;
}
}
.ant-select-tree-node-content-wrapper {
color : unset;
cursor: not-allowed;
}
}
} }