Merge branch 'feature/partner' of https://gitlab.eascs.com/tms-ui/tms-obc-web into feature/partner

This commit is contained in:
heqinghang
2022-03-23 13:48:47 +08:00
24 changed files with 565 additions and 776 deletions

View File

@ -6,22 +6,25 @@
</ng-template>
</page-header-wrapper>
<nz-card>
<sv-container layout="vertical" [noColon]="true" col="4">
<sv-container layout="vertical" [noColon]="true" col="5">
<sv [label]="labelTpl">
<b class="text-md ">{{accountInfo?.company}}</b>
<b class="text-md ">{{summaryObj?.company}}</b>
</sv>
<sv label="可用余额">
{{totalInfo?.balance |currency}}
<sv label="返佣总额">
{{summaryObj?.totalRebate |currency}}
</sv>
<sv label="收入金额">
{{totalInfo?.income |currency}}
<sv label="已入账金额">
{{summaryObj?.totalRebate |currency}}
</sv>
<sv label="支出金额">
{{totalInfo?.spending |currency}}
<sv label="代缴个税">
{{summaryObj?.taxPersonalSum |currency}}
</sv>
<sv label="待入账金额">
{{summaryObj?.waitRecordedAmount |currency}}
</sv>
</sv-container>
<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>
</nz-card>
<nz-card>
@ -29,7 +32,7 @@
<sf mode="search" #sf [schema]="schema" [ui]="ui" (formSubmit)="search()" (formReset)="resetSF()"></sf>
</div>
<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 }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [5,10, 20, 50, 100, 200, 500] }"
@ -40,11 +43,11 @@
</ng-template>
</st>
<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">{{
totalInfo?.income | currency
summaryObj?.income | currency
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{
totalInfo?.spending | currency }}</label>
summaryObj?.spending | currency }}</label>
</div>
</div>
</nz-card>
@ -52,8 +55,8 @@
<nz-modal [(nzVisible)]="showBillDetail" nzTitle="账户明细" [nzFooter]="null" (nzOnCancel)="handleCancel()" nzWidth="700px">
<div *nzModalContent>
<div class="mb-sm">
<span class="mr-xxl text-md font-weight-bold"><label>网络货运人:</label>{{accountInfo?.name}}</span>
<span class="text-md font-weight-bold"><label>返佣总额(元):</label>{{totalInfo?.spending |currency: ' '}}</span>
<span class="mr-xxl text-md font-weight-bold"><label>网络货运人:</label>{{detailRecord?.ltdName}}</span>
<span class="text-md font-weight-bold"><label>返佣总额(元):</label>{{detailRecord?.totalRebate |currency: ' '}}</span>
</div>
<st #st [data]="billDetailList " [columns]="billDetailColumns" [res]="{ reName: { list: 'data' } }"
[req]="{ method: 'POST', allInBody: true, params:billDetailReqParams}" [page]="{show:false}">

View File

@ -10,17 +10,16 @@ import { AccountManagemantService } from '../../services/account-managemant.serv
templateUrl: './recorded-detail.component.html',
})
export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
totalInfo: any = {
balance: 0,
income: 1500,
spending: 2400,
total: 186
summaryObj: any = {
waitRecordedAmount: 0,
totalRebate: 0,
taxPersonalSum: 0,
recordedAmount: 0,
ltdName: '',
taxno: ''
};
accountInfo = {
name: '张三',
phone: '13812345678',
company: '天津怡亚通物流科技有限公司(平安)'
}
detailRecord: any = {};
url = `/user`;
schema: SFSchema = {};
@ -37,11 +36,12 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
constructor(public service: AccountManagemantService, public router: Router, public ar: ActivatedRoute) {
this.roleId = this.ar.snapshot.params.id;
}
get reqParams() {
return { ...this.sf?.value, roleId: this.roleId };
return { ...this.sf?.value, partnerId: this.roleId };
}
get billDetailReqParams() {
@ -50,6 +50,7 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
ngOnInit(): void {
this.initSF();
this.initST();
this.getInvoiceSummary();
}
initSF() {
@ -74,13 +75,13 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
*/
initST() {
this.columns = [
{ title: '网络货运人', index: 'carNo', className: 'text-center', width: 200 },
{ title: '银行类型', render: 'carModelLabel', className: 'text-center', width: 150 },
{ title: '虚拟账户', render: 'carModelLabel', className: 'text-center', width: 200 },
{ title: '返佣总额(元)', render: 'carModelLabel', className: 'text-center', width: 120 },
{ title: '已入账金额(元)', index: 'remark', className: 'text-center', width: 180 },
{ title: '代缴个税(元)', render: 'approvalStatus1', className: 'text-center', width: 180 },
{ title: '待入账金额(元)', render: 'amount', className: 'text-right', width: 180 },
{ title: '网络货运人', index: 'ltdName', className: 'text-center', width: 200 },
{ title: '银行类型', render: 'bankTypeLabel', className: 'text-center', width: 150 },
{ title: '虚拟账户', render: 'fictitiousAccount', className: 'text-center', width: 200 },
{ title: '返佣总额(元)', index: 'totalRebate', className: 'text-center', width: 120, type: 'currency' },
{ title: '已入账金额(元)', index: 'recordedAmount', className: 'text-center', width: 180, type: 'currency' },
{ title: '代缴个税(元)', index: 'taxPersonalSum', className: 'text-center', width: 180, type: 'currency' },
{ title: '待入账金额(元)', index: 'waitRecordedAmount', className: 'text-right', width: 180, type: 'currency' },
{
title: '操作', className: 'text-center', width: 300,
buttons: [
@ -157,9 +158,16 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
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() {
this.showBillDetail = false;

View File

@ -13,6 +13,8 @@ export class AccountManagemantService extends BaseService {
$api_get_account_detail_footer_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerIncomeDetailByOperator`;// 账户明细脚部汇总
$api_get_account_detail_header_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerAmountByOperator`;// 账户明细头部汇总
$api_get_bill_detail = `/api/bpc/partnerIncomeDetail/findPartnerWaitIncomeByOperator`; // 查看账单明细
$api_get_invoice_summary = `/api/bpc/partnerInvoiceEntry/oprationEntrySummary`; // 入账明细汇总
$api_get_invoice_detail_page = `/api/bpc/partnerInvoiceEntry/oprationEntryDetail`; // 待入账明细列表
constructor(public injector: Injector) {
super(injector)

View File

@ -1,34 +0,0 @@
<div class="modal-header">
<div class="modal-title" *ngIf="i.flag === 'add'">车辆协助认证</div>
<div class="modal-title" *ngIf="i.flag !== 'add'">添加车辆</div>
</div>
<!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> -->
<div class="sfBox">
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="detailData">
<ng-template sf-template="tipsA" let-me let-ui="ui" let-schema="schema">
<div class="pr">
<dl class="tips">
<dt>行驶证首页</dt>
<dd>示例</dd>
</dl>
<div class="pa"><img width="190" src="/assets/images/driverfront.png" /></div>
</div>
</ng-template>
<ng-template sf-template="tipsB" let-me let-ui="ui" let-schema="schema">
<div class="pr">
<dl class="tips">
<dt>行驶证副页</dt>
<dd>示例</dd>
</dl>
<div class="pa"><img width="190" src="/assets/images/driverback.png" /></div>
</div>
</ng-template>
</sf>
<img class="drivercard" height="104" src="/assets/images/car.png" />
<img class="agreement" height="104" src="/assets/images/agreement.png" />
<img class="jopcard" height="104" src="/assets/images/road.png" />
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="submitForm()" [disabled]="!sf?.valid" [nzLoading]="checked">确定</button>
</div>

View File

@ -1,654 +0,0 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { apiConf } from '@conf/api.conf';
import { cacheConf } from '@conf/cache.conf';
import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EACacheService, EAEnvironmentService } from '@shared';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { ListService } from '../../services/list.service';
@Component({
selector: 'app-car-carauth',
templateUrl: './carauth.component.html',
styleUrls: ['./carauth.component.less']
})
export class CarCarauthComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any;
ui: SFUISchema = {};
schema: SFSchema = {};
showCardFlag = false;
showJopFlag = false;
companyData: any = {};
detailData: any = {};
carNo = ''
checked = false
constructor(
private modal: NzModalRef,
public service: ListService,
private envSrv: EAEnvironmentService,
private eaCacheSrv: EACacheService,
) { }
ngOnInit(): void {
this.initData()
this.initSF()
}
initData() {
if(this.i.id){
this.companyData = this.eaCacheSrv.get(cacheConf.env)
const params = {
id: this.i.id
}
this.service.request(this.service.$api_getShipperCar, params).subscribe(res => {
this.detailData = res
this.detailData.isSelf = res.isSelf ? 1 : 0
this.detailData.isTrailer = res.isTrailer ? 1 : 0
this.detailData.carFrontPhotoWatermark = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: this.detailData.carFrontPhotoWatermark,
response:this.detailData.carFrontPhotoWatermark,
},
];
this.detailData.carProtocalWatermark = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: this.detailData.carProtocalWatermark,
response: this.detailData.carProtocalWatermark,
},
];
this.detailData.certificatePhotoFrontWatermark = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: this.detailData.certificatePhotoFrontWatermark,
response: this.detailData.certificatePhotoFrontWatermark,
},
];
this.detailData.certificatePhotoBackWatermark = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: this.detailData.certificatePhotoBackWatermark,
response: this.detailData.certificatePhotoBackWatermark,
},
];
if(this.detailData.roadTransportPhotoWatermark !== null) {
this.detailData.roadTransportPhotoWatermark = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: this.detailData.roadTransportPhotoWatermark,
response: this.detailData.roadTransportPhotoWatermark,
},
];
}
})
}
}
initSF() {
this.schema = {
properties: {
carFrontPhotoWatermark: {
type: 'string',
title: '车头照照片',
ui: {
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '请上传车头照照片支持JPG、PNG格式文件小于5M。',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
this.detailData.carFrontPhoto = args.file.response.data.fullFilePath
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
},
},
carNo: {
title: '车牌号',
type: 'string',
maxLength: 9,
ui: {
placeholder: '请输入',
},
},
carNoColor: {
title: '车牌颜色',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'car:color' },
placeholder: '请选择车牌颜色',
containsAllLabel:false,
} as SFSelectWidgetSchema,
},
carModel: {
title: '车型',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'car:model' },
placeholder: '请选择车型',
containsAllLabel:false,
} as SFSelectWidgetSchema,
},
carLength: {
title: '车长',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'car:length' },
placeholder: '请选择车长',
containsAllLabel:false,
} as SFSelectWidgetSchema,
},
carLoad: {
title: '载重',
type: 'string',
ui: {
placeholder: '请输入',
change: (val: any) =>{
const value = val.replace(/\D/g,'')
this.sf.setValue('/carLoad', value)
},
}
},
isSelf: {
title: '是否挂靠',
type: 'string',
enum: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
],
ui: {
widget: 'select',
placeholder: '请选择',
}
},
isTrailer: {
title: '是否为挂车',
type: 'string',
enum: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
],
ui: {
widget: 'select',
placeholder: '请选择',
}
},
carProtocalWatermark: {
type: 'string',
title: '挂靠协议',
ui: {
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '请上传挂靠协议支持JPG、PNG格式文件小于5M。',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
},
},
titleA: {
title: '行驶证信息(必填)',
type: 'string',
ui: {
widget: 'textarea',
borderless:true,
},
default: '照片上传后会自动识别文字并填充下列内容栏',
},
tipsA: {
title: '',
type: 'string',
ui: {
widget: 'custom',
offsetControl: 6,
},
},
certificatePhotoFrontWatermark: {
type: 'string',
title: '行驶证首页照片',
ui: {
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '请上传行驶证首页照片支持JPG、PNG格式文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清都不会通过审核。',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
this.checkCarCard(args.file.response.data.fullFilePath, 'front');
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
},
},
},
tipsB: {
title: '',
type: 'string',
ui: {
widget: 'custom',
offsetControl: 6,
},
},
certificatePhotoBackWatermark: {
type: 'string',
title: '行驶证副页照片',
ui: {
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '请上传行驶证副业照片支持JPG、PNG格式文件小于5M。',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath
this.checkCarCard(args.file.response.data.fullFilePath, 'back');
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
},
},
driverLicenseRegisterTime: {
title: '行驶证注册日期',
type: 'string',
format: 'date',
ui: {
placeholder: '请输入',
},
},
driverLicenseGetTime: {
title: '行驶证发证日期',
type: 'string',
format: 'date',
ui: {
placeholder: '请输入',
},
},
driverLicenseEndTime: {
title: '行驶证到期日期',
type: 'string',
format: 'date',
maxLength: 30,
ui: {
placeholder: '请输入',
},
},
driverLicenseSigningOrg: {
title: '行驶证签发机关',
type: 'string',
maxLength: 30,
ui: {
placeholder: '请输入',
},
},
carDistinguishCode: {
title: '车辆识别代码',
type: 'string',
maxLength: 30,
ui: {
placeholder: '请输入',
},
},
useNature: {
title: '使用性质',
type: 'string',
maxLength: 30,
enum: [
{label: '非营运', value: 0},
{label: '营运', value: 1},
],
ui: {
widget: 'select',
placeholder: '请选择',
},
},
curbWeight: {
title: '整备质量',
type: 'string',
ui: {
placeholder: '请输入',
},
},
carOwner: {
title: '所有人',
type: 'string',
maxLength: 30,
ui: {
placeholder: '请输入',
},
},
titleB: {
title: '道运证(选填)',
type: 'string',
ui: {
widget: 'text',
},
default: '照片上传后会自动识别文字并填充下列内容栏',
},
roadTransportPhotoWatermark: {
type: 'string',
title: '道运证照片',
ui: {
action: apiConf.fileUpload,
accept: 'image/png,image/jpeg,image/jpg,image/gif',
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
descriptionI18n: '请上传道运证照片支持JPG、PNG格式文件小于5M。蓝牌绿牌车辆可不用传道运证',
data: {
appId: this.envSrv.env.appId,
},
name: 'multipartFile',
multiple: false,
listType: 'picture-card',
change: (args: any) => {
if (args.type === 'success') {
this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath
this.checkTransCard(args.file.response.data.fullFilePath);
} else {
this.detailData.roadTransportPhoto = ''
}
},
beforeUpload: (file: any, _fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
this.service.msgSrv.warning('图片大小超过5M!');
observer.complete();
return;
}
observer.next(isLt2M);
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
},
},
roadTransportNo: {
title: '道运证号码',
type: 'string',
maxLength: 30,
ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入',
},
},
roadTransportLicenceNo: {
title: '经营许可证号',
type: 'string',
maxLength: 30,
ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入',
},
},
roadTransportStartTime: {
title: '发证日期',
type: 'string',
format: 'date',
ui: {
placeholder: '请输入',
},
},
roadTransportEndTime: {
title: '有效期至',
type: 'string',
format: 'date',
ui: {
placeholder: '请输入',
},
},
remarks: {
title: '备注',
type: 'string',
ui: {
placeholder: '请输入',
},
},
},
required: [
'carFrontPhotoWatermark',
'carNo',
'carNoColor',
'carModel',
'carLength',
'carLoad',
'isSelf',
'isTrailer',
'certificatePhotoFrontWatermark',
'certificatePhotoBackWatermark',
'driverLicenseRegisterTime',
'driverLicenseGetTime',
'driverLicenseEndTime',
'driverLicenseSigningOrg',
'carDistinguishCode',
'useNature',
'carOwner'
],
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
},
$title1: {
spanLabelFixed: 0,
},
$title2: {
spanLabelFixed: 0,
},
$title3: {
spanLabelFixed: 0,
},
$enterpriseRegistrationTime: {
width: 680,
},
$operatingEndTime: {
grid: { span: 9 },
},
$dateType: {
grid: { span: 4 },
},
$validEndTime: {
grid: { span: 9 },
},
$dateType01: {
grid: { span: 4 },
},
$registrationCapital: {
grid: { span: 12 },
},
$unit: {
spanLabelFixed: 20,
grid: { span: 3 },
},
};
}
// 道路运输证识别
checkTransCard(imgurl: any) {
const params = {
transportationLicenseUrl: imgurl,
};
this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe((res) => {
if (res) {
this.sf.setValue('/roadTransportNo', res.number);
this.sf.setValue('/roadTransportLicenceNo', res.businessCertificate);
this.sf.setValue('/roadTransportStartTime', res.issueDate);
if(this.carNo === '') {
this.carNo = res.number
} else if(this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) {
this.service.msgSrv.warning('请上传同一认证车辆的相关证件')
}
}
});
}
// 行驶证识别
checkCarCard(imgurl: any, side: any) {
const params = {
vehicleLicenseUrl: imgurl,
side,
};
this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe((res) => {
if (res) {
if (side === 'front') { // 正面
this.sf.setValue('/driverLicenseRegisterTime', res.registerDate);
this.sf.setValue('/carNo', res.number);
this.sf.setValue('/driverLicenseGetTime', res.issueDate);
this.sf.setValue('/driverLicenseSigningOrg', res.issuingAuthority);
this.sf.setValue('/carDistinguishCode', res.vin);
this.sf.setValue('/carOwner', res.name);
this.sf.setValue('/useNature', res.useCharacter === '非营运' ? 0 : 1 );
} else {
this.sf.setValue('/curbWeight', res.unladenMass);
this.sf.setValue('/remarks', res.remarks);
}
if(this.carNo === '') {
this.carNo = res.number
} else if(this.carNo && this.carNo !== res.number) {
this.service.msgSrv.warning('请上传同一认证车辆的相关证件')
}
}
});
}
close(): void {
this.modal.close(true)
}
showExample() {
this.showCardFlag = !this.showCardFlag
}
showJopExample() {
this.showJopFlag = !this.showJopFlag
}
submitForm(){
const params:any = {
appUserId: this.i.appUserId,
...this.sf.value,
bindType: this.i.bindType
};
params.carFrontPhoto = this.detailData.carFrontPhoto
params.carProtocal = this.detailData.carProtocal
params.certificatePhotoFront = this.detailData.certificatePhotoFront
params.certificatePhotoBack = this.detailData.certificatePhotoBack
params.roadTransportPhoto = this.detailData.roadTransportPhoto
delete params.titleA
delete params.titleB
this.checked = true
this.service.request(this.service.$api_updateAssistCertification, params).subscribe(res => {
this.checked = false
if(res){
this.service.msgSrv.success('添加成功')
this.modal.close(true)
}
})
}
}

View File

@ -0,0 +1,9 @@
<sf #sf [schema]="schema" [ui]="ui" [button]="'none'" [formData]="detailData"></sf>
<div class="info">
1.如果修改前后的合伙人不是在同一个渠道销售下修改后客户的渠道销售会随着修改后的合伙人绑定到新的渠道销售下系统也会同步发起CRM《客户转移》流程<br>
2.结算起算日:指给合伙人结算佣金的起算时间,如果是修改合伙人,该日期是当前合伙人的结算起算日,同时也是上一个合伙人的结算结束时间。
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="save()" [disabled]="!sf?.valid">确定</button>
</div>

View File

@ -0,0 +1,7 @@
.info{
width: 80%;
margin:0 auto;
color: #333;
font-size: 12px;
line-height: 24px;;
}

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EditPartnerComponentsAddComponent } from './editPartner.component';
describe('EditPartnerComponentsAddComponent', () => {
let component: EditPartnerComponentsAddComponent;
let fixture: ComponentFixture<EditPartnerComponentsAddComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EditPartnerComponentsAddComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EditPartnerComponentsAddComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,122 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EAEnvironmentService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { apiConf } from '@conf/api.conf';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-ad-components-partner',
templateUrl: './editPartner.component.html',
styleUrls: ['./editPartner.component.less']
})
export class EditPartnerComponentsAddComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any;
schema: SFSchema = {};
detailData: any = {}
ui: SFUISchema = {};
constructor(
public msgSrv: NzMessageService,
public http: _HttpClient,
private route: ActivatedRoute,
private router: Router,
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private modal: NzModalRef,
) { }
ngOnInit(): void {
this.initDetailData()
this.initSF();
}
initDetailData() {
const params = {
id: this.i.id
}
this.service.request(this.service.$api_partnerChannelUpdateDetaiList, params).subscribe(res => {
if(res) {
this.detailData = res
} else {
this.service.msgSrv.error(res.msg)
}
})
}
initSF() {
this.schema = {
properties: {
channelId: {
type: 'string',
title: '合伙人修改为',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '全部可见', value: 1 },
{ label: '合伙人可见', value: 2 },
{ label: '销售渠道可见', value: 3 },
],
},
remark: {
type: 'string',
title: '备注',
ui: {
widget: 'textarea',
placeholder: '请不要超过50个字',
maxLength: 50,
autosize: { minRows: 2, maxRows: 6 },
},
},
effectiveNode: {
type: 'string',
title: '生效节点',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核通过后生效', value: 2 }
],
},
},
required: ['channelId', 'remark', 'effectiveNode'],
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
}
};
}
get reqParams() {
return {};
}
close(): void {
this.modal.close(true)
}
save() {
const params = {
...this.sf.value
}
this.service.request(this.service.$api_batchUpdateEnterpricePartner, params).subscribe(res => {
if(res) {
this.service.msgSrv.success('修改成功')
} else {
this.service.msgSrv.error(res.msg)
}
})
}
}

View File

@ -0,0 +1,8 @@
<sf #sf [schema]="schema" [ui]="ui" [button]="'none'" [formData]="detailData"></sf>
<div class="info">
修改渠道销售客户修改渠道销售后会跟原合伙人解绑成为新渠道销售的直客。同时系统会同步发起CRM《客户转移》流程。
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="save()" [disabled]="!sf?.valid">确定</button>
</div>

View File

@ -0,0 +1,7 @@
.info{
width: 80%;
margin:0 auto;
color: #333;
font-size: 12px;
line-height: 24px;;
}

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EditSaleComponentsAddComponent } from './editSale.component';
describe('EditSaleComponentsAddComponent', () => {
let component: EditSaleComponentsAddComponent;
let fixture: ComponentFixture<EditSaleComponentsAddComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EditSaleComponentsAddComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EditSaleComponentsAddComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,130 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EAEnvironmentService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { apiConf } from '@conf/api.conf';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-ad-components-Sale',
templateUrl: './editSale.component.html',
styleUrls: ['./editSale.component.less']
})
export class EditSaleComponentsAddComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any;
schema: SFSchema = {};
detailData: any = {}
ui: SFUISchema = {};
constructor(
public msgSrv: NzMessageService,
public http: _HttpClient,
private route: ActivatedRoute,
private router: Router,
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private modal: NzModalRef,
) { }
ngOnInit(): void {
this.initDetailData()
this.initSF();
}
initDetailData() {
const params = {
id: this.i.id
}
this.service.request(this.service.$api_partnerChannelUpdateDetaiList, params).subscribe(res => {
if(res) {
this.detailData = res
} else {
this.service.msgSrv.error(res.msg)
}
})
}
initSF() {
this.schema = {
properties: {
channelId: {
type: 'string',
title: '渠道销售修改为',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '全部可见', value: 1 },
{ label: '合伙人可见', value: 2 },
{ label: '销售渠道可见', value: 3 },
],
},
remark: {
type: 'string',
title: '备注',
ui: {
widget: 'textarea',
placeholder: '请不要超过50个字',
maxLength: 50,
autosize: { minRows: 2, maxRows: 6 },
},
},
effectiveNode: {
type: 'string',
title: '生效节点',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核通过后生效', value: 2 }
],
},
},
required: ['channelId', 'remark', 'effectiveNode'],
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
}
};
}
get reqParams() {
return {};
}
save() {
this.service.nzModalService.create({
nzTitle: '确定提交吗?',
nzClosable: false,
nzOnOk: () => {
const params = {
...this.sf.value
}
this.service.request(this.service.$api_batchUpdateEnterpriceChannel, params).subscribe(res => {
if(res) {
this.service.msgSrv.success('修改成功')
} else {
this.service.msgSrv.error(res.msg)
}
})
}
});
}
close(): void {
this.modal.close(true)
}
}

View File

@ -0,0 +1,19 @@
:host{
::ng-deep{
.btnBox {
st-td{
// display: flex;
// align-items: center;
st-td>span{
display: inline-block;
width: 95px;
text-align: center;
margin: 0 10px;
}
}
.st__btn-text span{
white-space: nowrap;
}
}
}
}

View File

@ -6,6 +6,9 @@ import { DynamicSettingModalComponent, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
import { UsermanageService } from '../../../services/usercenter.service';
import { EditPartnerComponentsAddComponent } from './editPartner/editPartner.component';
import { EditSaleComponentsAddComponent } from './editSale/editSale.component';
import { ShowServiceComponent } from './showService/showservice.component';
@Component({
selector: 'app-Freight-components-list',
templateUrl: './list.component.html',
@ -93,7 +96,7 @@ export class FreightComponentsListComponent implements OnInit {
showService(record: any) {
const modalRef = this.modal.create({
nzTitle: '分配客服人员',
//nzContent: PartnerEditComponent,
nzContent: ShowServiceComponent,
nzWidth: 600,
nzComponentParams: {
i: record
@ -109,8 +112,8 @@ export class FreightComponentsListComponent implements OnInit {
editPartner(record: any) {
const modalRef = this.modal.create({
nzTitle: '修改合伙人',
//nzContent: PartnerEditComponent,
nzWidth: 600,
nzContent: EditPartnerComponentsAddComponent,
nzWidth: 800,
nzComponentParams: {
i: record
},
@ -125,8 +128,8 @@ export class FreightComponentsListComponent implements OnInit {
editSale(record: any) {
const modalRef = this.modal.create({
nzTitle: '修改渠道销售',
//nzContent: PartnerEditComponent,
nzWidth: 600,
nzContent: EditSaleComponentsAddComponent,
nzWidth: 800,
nzComponentParams: {
i: record
},
@ -193,7 +196,7 @@ export class FreightComponentsListComponent implements OnInit {
}
}
},
lockedStatus7: {
oftenUsedServices: {
type: 'string',
title: '常用服务',
enum: [
@ -209,13 +212,13 @@ export class FreightComponentsListComponent implements OnInit {
}
}
},
lockedStatus6: {
customerType: {
type: 'string',
title: '客户类型',
enum: [
{ label: '全部', value: '' },
{ label: '直客', value: 0 },
{ label: '渠道客户', value: 1 }
{ label: '直客', value: 1 },
{ label: '渠道客户', value: 20 }
],
default: '',
ui: {
@ -230,15 +233,21 @@ export class FreightComponentsListComponent implements OnInit {
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
contactName4: {
partnerName: {
title: '合伙人',
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
contactName3: {
@ -246,7 +255,10 @@ export class FreightComponentsListComponent implements OnInit {
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
contactName2: {
@ -254,7 +266,10 @@ export class FreightComponentsListComponent implements OnInit {
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
applyDate: {
@ -265,8 +280,8 @@ export class FreightComponentsListComponent implements OnInit {
type: 'date',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value,
},
expand: (value: boolean) => value
}
} as SFDateWidgetSchema,
},
applyDate1: {
@ -276,31 +291,10 @@ export class FreightComponentsListComponent implements OnInit {
widget: 'sl-from-to',
type: 'date',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFDateWidgetSchema,
},
networkTransporter: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}
},
promotersTelephone: {
title: '业务员',
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
} as SFDateWidgetSchema,
},
lockedStatus3: {
type: 'string',
@ -318,14 +312,37 @@ export class FreightComponentsListComponent implements OnInit {
}
}
},
networkTransporter: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
}
},
promotersTelephone: {
title: '业务员',
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false,
visibleIf: {
expand: (value: boolean) => value
}
}
},
source: {
type: 'string',
title: '注册渠道',
enum: [
{ label: '全部', value: '' },
{ label: '用户注册', value: 1 },
{ label: '货主添加', value: 2 },
{ label: '运营添加', value: 3 }
{ label: '货主注册', value: 1 },
{ label: '平台添加', value: 2 }
],
default: '',
ui: {
@ -393,8 +410,8 @@ export class FreightComponentsListComponent implements OnInit {
},
{
title: '操作',
width: '110px',
className: 'text-center',
width: '250px',
className: 'text-center btnBox',
buttons: [
{
text: '查看',
@ -415,17 +432,14 @@ export class FreightComponentsListComponent implements OnInit {
click: item => this.showAccountDetail(item)
},
{
acl: { ability: ['USERCENTER-FREIGHT-LIST-balance'] },
text: '分配客服人员',
click: item => this.showService(item)
},
{
acl: { ability: ['USERCENTER-FREIGHT-LIST-balance'] },
text: '修改合伙人',
click: item => this.editPartner(item)
},
{
acl: { ability: ['USERCENTER-FREIGHT-LIST-balance'] },
text: '修改渠道销售',
click: item => this.editSale(item)
}

View File

@ -0,0 +1,16 @@
<!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> -->
<div class="serviceBox">
<div class="left">客服人员</div>
<div class="right">
<nz-select ngModel="lucy" style="width: 250px;">
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
<nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option>
</nz-select>
</div>
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="submitForm()" [disabled]="!sf?.valid">确定</button>
</div>

View File

@ -121,3 +121,9 @@
}
}
}
.serviceBox{
display: flex;
align-items: center;
justify-content: space-between;
width: 350px;
}

View File

@ -0,0 +1,61 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { apiConf } from '@conf/api.conf';
import { cacheConf } from '@conf/cache.conf';
import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EACacheService, EAEnvironmentService } from '@shared';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
@Component({
selector: 'app-car-showService',
templateUrl: './showService.component.html',
styleUrls: ['./showService.component.less']
})
export class ShowServiceComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any;
constructor(
private modal: NzModalRef,
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private eaCacheSrv: EACacheService,
) { }
ngOnInit(): void {
}
close(): void {
this.modal.close(true)
}
submitForm(){
// const params:any = {
// appUserId: this.i.appUserId,
// ...this.sf.value,
// bindType: this.i.bindType
// };
// params.carFrontPhoto = this.detailData.carFrontPhoto
// params.carProtocal = this.detailData.carProtocal
// params.certificatePhotoFront = this.detailData.certificatePhotoFront
// params.certificatePhotoBack = this.detailData.certificatePhotoBack
// params.roadTransportPhoto = this.detailData.roadTransportPhoto
// delete params.titleA
// delete params.titleB
// this.checked = true
// this.service.request(this.service.$api_updateAssistCertification, params).subscribe(res => {
// this.checked = false
// if(res){
// this.service.msgSrv.success('添加成功')
// this.modal.close(true)
// }
// })
}
}

View File

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

View File

@ -25,7 +25,8 @@ import { FreightComponentsUserDetailComponent } from './components/freight/user/
import { FreightComponentsUserComponent } from './components/freight/user/user.component';
const routes: Routes = [
{ path: 'freight/list', component: FreightComponentsListComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-list'] } } },
{ path: 'freight/list', component: FreightComponentsListComponent, },
// data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-list'] } }
{ path: 'freight/list/view/:id', component: FreightComponentsListViewComponent },
{ path: 'freight/list/new', component: FreightComponentsListNewComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-NEW-save'] } } },
{

View File

@ -26,6 +26,9 @@ import { CarSettleAddDriverComponent } from './components/driver/add-driver/add-
import { CtcCaptatinAddComponent } from './components/driver/captain/add/add.component';
import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component';
import { UserCenterComponentsDriverConfigComponent } from './components/driver/driver-config/driver-config.component';
import { ShowServiceComponent } from './components/freight/list/showService/showservice.component';
import { EditPartnerComponentsAddComponent } from './components/freight/list/editPartner/editPartner.component';
import { EditSaleComponentsAddComponent } from './components/freight/list/editSale/editSale.component';
const COMPONENTS = [
FreightComponentsListComponent,
@ -46,9 +49,10 @@ const COMPONENTS = [
FreightConfigComponent,
UserCenterComponentsDriverConfigComponent
];
const COMPONENTS_NOROUNT = [ShowServiceComponent, EditPartnerComponentsAddComponent, EditSaleComponentsAddComponent];
@NgModule({
imports: [SharedModule, UsercenterRoutingModule, DynamicSettingModule],
declarations: [...COMPONENTS]
declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT]
})
export class UsercenterModule {}

View File

@ -37,4 +37,8 @@ export class DictSelectWidget extends ControlWidget implements OnInit {
if (this.ui.change) this.ui.change(value);
this.setValue(value);
}
reset(value: any) {
this.setValue(value);
}
}

View File

@ -14,3 +14,6 @@
}
@primary-color: #F5222D;
.page-header__title{
display: none;
}