merge partner
This commit is contained in:
@ -20,7 +20,7 @@ module.exports = {
|
||||
// }
|
||||
'//api': {
|
||||
target: {
|
||||
host: 'tms-api-test.eascs.com',
|
||||
host: 'tms-api-dev.eascs.com',
|
||||
protocol: 'https:',
|
||||
port: 443
|
||||
},
|
||||
|
||||
@ -30,7 +30,7 @@ export class AuthGuard extends ACLGuard {
|
||||
}
|
||||
|
||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
|
||||
if (childRoute.routeConfig?.loadChildren) {
|
||||
if (childRoute.routeConfig?.loadChildren || childRoute.routeConfig?.children) {
|
||||
return super.canActivateChild(childRoute, state);
|
||||
} else {
|
||||
return this.handle(childRoute, state, 2, this.settingRoute(childRoute.params, state.url));
|
||||
|
||||
@ -137,12 +137,12 @@ export class StartupService {
|
||||
const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data));
|
||||
|
||||
// 菜单数据
|
||||
const menuData = this.httpClient
|
||||
.post(this.coreSrv.$api_get_current_user_menus, {
|
||||
appId: this.coreSrv.envSrv.getEnvironment().appId
|
||||
})
|
||||
.pipe(map((res: any) => res.data));
|
||||
// const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu));
|
||||
// const menuData = this.httpClient
|
||||
// .post(this.coreSrv.$api_get_current_user_menus, {
|
||||
// appId: this.coreSrv.envSrv.getEnvironment().appId
|
||||
// })
|
||||
// .pipe(map((res: any) => res.data));
|
||||
const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu));
|
||||
|
||||
return zip(appData, userData, menuData);
|
||||
}
|
||||
|
||||
@ -17,10 +17,17 @@ const alainConfig: AlainConfig = {
|
||||
page: { show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000], toTop: false },
|
||||
modal: { size: 'lg' }
|
||||
},
|
||||
sf: { button: { search: '查询' } },
|
||||
sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } },
|
||||
pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true },
|
||||
auth: { login_url: '/passport/login' },
|
||||
acl: { guard_url: '/exception/403' }
|
||||
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()];
|
||||
|
||||
@ -34,7 +34,7 @@ export class ContractManagementContractListComponent implements OnInit {
|
||||
}
|
||||
delete params.signTime;
|
||||
delete params._$expand;
|
||||
if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
||||
if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
|
||||
params.signTime = {
|
||||
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
|
||||
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
|
||||
@ -51,7 +51,7 @@ export class ContractManagementContractListComponent implements OnInit {
|
||||
public shipperservice: ShipperBaseService,
|
||||
private router: Router,
|
||||
private datePipe: DatePipe,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initST()
|
||||
@ -72,27 +72,13 @@ export class ContractManagementContractListComponent implements OnInit {
|
||||
title: '签约对象',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index:'signingObject'
|
||||
index: 'documentType'
|
||||
},
|
||||
{
|
||||
title: '合同类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index:'contractType'
|
||||
},
|
||||
{
|
||||
title: '货源类型',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
index:'resourceType'
|
||||
},
|
||||
{ title: '合同名称', index: 'contractName', width: '120px', className: 'text-center' },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
|
||||
{
|
||||
title: '合同对象',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'contractObjectName'
|
||||
index: 'contractName'
|
||||
},
|
||||
{
|
||||
title: '业务单号',
|
||||
@ -126,8 +112,8 @@ export class ContractManagementContractListComponent implements OnInit {
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 初始化查询表单
|
||||
*/
|
||||
* 初始化查询表单
|
||||
*/
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
@ -140,69 +126,33 @@ export class ContractManagementContractListComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '业务单号'
|
||||
},
|
||||
signingObject: {
|
||||
shipperName: {
|
||||
type: 'string',
|
||||
title: '签约对象',
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '货主', value: 1 },
|
||||
{ label: '司机', value: 2 },
|
||||
],
|
||||
title: '托运人'
|
||||
},
|
||||
carrierName: {
|
||||
type: 'string',
|
||||
title: '承运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
}
|
||||
},
|
||||
contractType: {
|
||||
title: '合同类型',
|
||||
documentType: {
|
||||
title: '单据类型',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'contract:type' },
|
||||
containAllLable:true,
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'contract:document:type' },
|
||||
containAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
resourceType: {
|
||||
title: '货源类型',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'goodresource:type' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
enterpriseInfoId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||
}
|
||||
},
|
||||
contractObjectName: {
|
||||
type: 'string',
|
||||
title: '合同对象',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
}
|
||||
},
|
||||
signTime: {
|
||||
title: '签署日期',
|
||||
type: 'string',
|
||||
@ -213,28 +163,14 @@ export class ContractManagementContractListComponent implements OnInit {
|
||||
},
|
||||
}
|
||||
},
|
||||
esignFlowStatus: {
|
||||
title: '状态',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'esign:flow:status' },
|
||||
containAllLable:true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
},
|
||||
type: 'object',
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
/**
|
||||
* 查询字段个数
|
||||
*/
|
||||
* 查询字段个数
|
||||
*/
|
||||
get queryFieldCount(): number {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
|
||||
three: '2',
|
||||
id: 2
|
||||
},
|
||||
];
|
||||
];
|
||||
constructor(
|
||||
public service: ContractManagementService,
|
||||
private modal: NzModalService,
|
||||
|
||||
@ -23,26 +23,26 @@ export class PaymentOrderComponent implements OnInit {
|
||||
_$expand = false;
|
||||
|
||||
selectedRows: any[] = [];
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) { }
|
||||
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void { }
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
let params = {...this.sf.value};
|
||||
if(params.payDate){
|
||||
const payDate = {start:this.sf?.value?.payDate?.[0],end:this.sf?.value?.payDate?.[1]}
|
||||
let params = { ...this.sf.value };
|
||||
if (params.payDate) {
|
||||
const payDate = { start: this.sf?.value?.payDate?.[0], end: this.sf?.value?.payDate?.[1] }
|
||||
params.payDate = payDate;
|
||||
}
|
||||
if(params.payDate2){
|
||||
const payDate2 = {start:this.sf?.value?.payDate2?.[0],end:this.sf?.value?.payDate2?.[1]}
|
||||
if (params.payDate2) {
|
||||
const payDate2 = { start: this.sf?.value?.payDate2?.[0], end: this.sf?.value?.payDate2?.[1] }
|
||||
params.payDate2 = payDate2;
|
||||
}
|
||||
if(params.createTime){
|
||||
const createTime = {start:this.sf?.value?.createTime?.[0],end:this.sf?.value?.createTime?.[1]}
|
||||
if (params.createTime) {
|
||||
const createTime = { start: this.sf?.value?.createTime?.[0], end: this.sf?.value?.createTime?.[1] }
|
||||
params.createTime = createTime;
|
||||
}
|
||||
Object.assign(requestOptions.body,params );
|
||||
Object.assign(requestOptions.body, params);
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
@ -123,7 +123,7 @@ export class PaymentOrderComponent implements OnInit {
|
||||
title: '付款类型',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'pay:type' },
|
||||
placeholder: '请选择',
|
||||
}
|
||||
@ -133,7 +133,7 @@ export class PaymentOrderComponent implements OnInit {
|
||||
title: '付款方式',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'pay:mode' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
|
||||
@ -28,8 +28,9 @@ export class WithdrawalsRecordComponent {
|
||||
refundStatus: any = '';
|
||||
|
||||
msg = '';
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) { }
|
||||
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
ngOnInit(): void { }
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
@ -42,6 +43,7 @@ export class WithdrawalsRecordComponent {
|
||||
refundStatus: this.refundStatus || null
|
||||
});
|
||||
}
|
||||
delete requestOptions?.body?.expand;
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
@ -81,7 +83,7 @@ export class WithdrawalsRecordComponent {
|
||||
disabled: () => this.service.http.loading,
|
||||
type: 'default',
|
||||
onClick: () => {
|
||||
if (!this.msg) {
|
||||
if (!this.msg || this.msg.trim().length === 0) {
|
||||
this.service.msgSrv.warning('请填写拒绝原因 ');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -128,8 +128,8 @@ export class FreightAccountService extends ShipperBaseService {
|
||||
// 根据预收款ID获取核销信息明细
|
||||
$api_get_advance_collection_hrxiao = '/api/fcc/ficoAhxH/getAhxHByYskblaId';
|
||||
|
||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
getReceiptUrl(url: string, params: any) {
|
||||
|
||||
@ -64,7 +64,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
public shipperservice: ShipperBaseService,
|
||||
private router: Router,
|
||||
private modale: ModalHelper,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -176,7 +176,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'insure:type' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -264,7 +264,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'insure:status' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -517,7 +517,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
tabChange(item: any) {}
|
||||
tabChange(item: any) { }
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
|
||||
@ -30,7 +30,7 @@ export class InsuranceManagementService extends ShipperBaseService {
|
||||
// 退保费
|
||||
$api_get_addINPBillRefundApplication = `/billRefundApplication/addINPBillRefundApplication`;
|
||||
|
||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'overall:payment:status' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -332,7 +332,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'service:type' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -343,7 +343,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'goodresource:settlement:type' },
|
||||
containAllLable: true,
|
||||
visibleIf: {
|
||||
@ -553,7 +553,8 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
{
|
||||
text: '取消订单',
|
||||
click: _record => this.cancellation(_record),
|
||||
iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2',
|
||||
iif: item =>
|
||||
item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1',
|
||||
acl: { ability: ['ORDER-BULK-signBulkOrder'] },
|
||||
},
|
||||
{
|
||||
@ -649,7 +650,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
tabChange(item: any) {}
|
||||
tabChange(item: any) { }
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
@ -661,8 +662,8 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
/**
|
||||
* 导入货源
|
||||
*/
|
||||
importGoodsSource() {}
|
||||
audit(item: any) {}
|
||||
importGoodsSource() { }
|
||||
audit(item: any) { }
|
||||
|
||||
/*
|
||||
* 审核关闭弹窗
|
||||
@ -683,7 +684,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK() {}
|
||||
handleOK() { }
|
||||
OpenPrice(item: any) {
|
||||
this.changeId = item.id;
|
||||
this.isVisible = true;
|
||||
@ -736,7 +737,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe((res: any) => {
|
||||
if(res) {
|
||||
if (res) {
|
||||
this.st.reload(1);
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
@ -817,8 +818,8 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
this.router.navigate(['order-management/bulk-detailChange', value.id]);
|
||||
}
|
||||
/**
|
||||
*申请退款
|
||||
*/
|
||||
*申请退款
|
||||
*/
|
||||
applyRefund(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '申请退款',
|
||||
@ -830,7 +831,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe((res: boolean) => {
|
||||
if(res) {
|
||||
if (res) {
|
||||
this.resetSF;
|
||||
this.st.load();
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
private router: Router
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -236,7 +236,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'overall:payment:status' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -262,7 +262,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'service:type' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -466,16 +466,20 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
index: 'amountAfterChange',
|
||||
render: 'amountAfterChange'
|
||||
},
|
||||
{ title: '变更值',
|
||||
{
|
||||
title: '变更值',
|
||||
index: 'amountchangeValue',
|
||||
render: 'amountchangeValue',
|
||||
width: '120px',
|
||||
className: 'text-center' },
|
||||
{ title: '变更后',
|
||||
className: 'text-center'
|
||||
},
|
||||
{
|
||||
title: '变更后',
|
||||
index: 'amountBeforeChange',
|
||||
render: 'amountBeforeChange',
|
||||
width: '120px',
|
||||
className: 'text-center' }
|
||||
className: 'text-center'
|
||||
}
|
||||
];
|
||||
}
|
||||
/**
|
||||
@ -485,12 +489,12 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
/**
|
||||
* 浮动费用查看
|
||||
*/
|
||||
* 浮动费用查看
|
||||
*/
|
||||
FloatView(item: any) {
|
||||
console.log(item)
|
||||
this.changeViewId = item.id;
|
||||
this.service.request(this.service.$api_getChangeRecordWholeDetail, {id: this.changeViewId}).subscribe((res) => {
|
||||
this.service.request(this.service.$api_getChangeRecordWholeDetail, { id: this.changeViewId }).subscribe((res) => {
|
||||
this.ViewCause = res;
|
||||
})
|
||||
this.isVisibleView = true
|
||||
@ -499,9 +503,9 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
this.modal.confirm({
|
||||
nzTitle: '是否确定立即撤销费用变更!</i>',
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id}).subscribe((res) => {
|
||||
this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe((res) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('撤销成功!')
|
||||
this.stFloat.reload()
|
||||
}
|
||||
@ -515,7 +519,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
tabChange(item: any) {}
|
||||
tabChange(item: any) { }
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
@ -527,7 +531,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
/**
|
||||
* 导入货源
|
||||
*/
|
||||
importGoodsSource() {}
|
||||
importGoodsSource() { }
|
||||
OpenPrice(item: any) {
|
||||
this.changeId = item.id;
|
||||
this.isVisible = true;
|
||||
@ -588,20 +592,20 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
* 审核关闭弹窗
|
||||
*/
|
||||
handleCancel(value?: string) {
|
||||
if(value === '0') {
|
||||
if (value === '0') {
|
||||
this.isVisible = false;
|
||||
} else if(value === '1') {
|
||||
} else if (value === '1') {
|
||||
this.isVisibleRE = false;
|
||||
} else if(value === '2') {
|
||||
} else if (value === '2') {
|
||||
this.isVisibleView = false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK() {
|
||||
let idList: any[] = [];
|
||||
if(this.selectedRows.length > 0) {
|
||||
if (this.selectedRows.length > 0) {
|
||||
this.selectedRows.forEach(item => {
|
||||
idList.push(item.id);
|
||||
});
|
||||
@ -626,12 +630,12 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
* 审核拒绝按钮
|
||||
*/
|
||||
reject() {
|
||||
if(!this.sfView.value.complianceRemark) {
|
||||
if (!this.sfView.value.complianceRemark) {
|
||||
this.service.msgSrv.error('备注不能为空!');
|
||||
return;
|
||||
}
|
||||
let idList: any[] = [];
|
||||
if(this.selectedRows.length > 0) {
|
||||
if (this.selectedRows.length > 0) {
|
||||
this.selectedRows.forEach(item => {
|
||||
idList.push(item.id);
|
||||
});
|
||||
@ -653,15 +657,15 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
/**
|
||||
*合规抽查
|
||||
*/
|
||||
*合规抽查
|
||||
*/
|
||||
audit(item?: any) {
|
||||
if (item) {
|
||||
this.isVisibleRE = true;
|
||||
this.auditId = item.id;
|
||||
this.initSTAudit(1);
|
||||
} else {
|
||||
if(this.selectedRows.length <= 0) {
|
||||
if (this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('请选择订单!')
|
||||
return;
|
||||
} else {
|
||||
|
||||
@ -41,7 +41,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
private router: Router
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -211,7 +211,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'overall:payment:status' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -237,7 +237,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'service:type' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -248,7 +248,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'goodresource:settlement:type' },
|
||||
containAllLable: true,
|
||||
visibleIf: {
|
||||
@ -351,7 +351,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
{
|
||||
text: '修改',
|
||||
click: _record => this.modification(_record),
|
||||
iif: item => item.auditStatus == '1' ,
|
||||
iif: item => item.auditStatus == '1',
|
||||
acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] },
|
||||
},
|
||||
{
|
||||
@ -377,7 +377,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
tabChange(item: any) {}
|
||||
tabChange(item: any) { }
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
@ -389,13 +389,13 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
/**
|
||||
* 导入货源
|
||||
*/
|
||||
importGoodsSource() {}
|
||||
audit(item: any) {}
|
||||
importGoodsSource() { }
|
||||
audit(item: any) { }
|
||||
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK() {}
|
||||
handleOK() { }
|
||||
OpenPrice(item: any) {
|
||||
this.isVisible = true;
|
||||
}
|
||||
@ -419,7 +419,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
// 生成电子单据
|
||||
generate(item: any, sts?: number) {
|
||||
let text = '查看凭证';
|
||||
if(sts == 2) {
|
||||
if (sts == 2) {
|
||||
text = '生成电子单据';
|
||||
}
|
||||
const modalRef = this.modal.create({
|
||||
@ -441,8 +441,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
sign(item?: any) {
|
||||
let params: any = []
|
||||
let text = '';
|
||||
if(item === '1') {
|
||||
if(this.selectedRows.length <= 0) {
|
||||
if (item === '1') {
|
||||
if (this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('请选择订单!')
|
||||
return
|
||||
}
|
||||
@ -474,7 +474,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
||||
}
|
||||
// 批量生成电子单据
|
||||
sign1(item?: any) {
|
||||
if(this.selectedRows.length <= 0) {
|
||||
if (this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('请选择订单!')
|
||||
return
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
public shipperservice: ShipperBaseService,
|
||||
private modal: NzModalService,
|
||||
public router: Router
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -54,8 +54,8 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
// ...a,
|
||||
// ...this.sf?.value,
|
||||
// };
|
||||
const a:any = {};
|
||||
if(this.resourceStatus) {
|
||||
const a: any = {};
|
||||
if (this.resourceStatus) {
|
||||
a.representationsStatus = this.resourceStatus
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || {});
|
||||
@ -173,7 +173,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'freight:type' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -185,7 +185,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'BulkFreightUnitPriceType' },
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
@ -312,7 +312,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
{
|
||||
text: '审核',
|
||||
click: _record => this.audit(_record),
|
||||
iif: item => item.representationsStatus == '1' || item.representationsStatus == '2' ,
|
||||
iif: item => item.representationsStatus == '1' || item.representationsStatus == '2',
|
||||
acl: { ability: ['ORDER-RISK-audit'] },
|
||||
},
|
||||
{
|
||||
@ -410,7 +410,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
/**
|
||||
* 导入货源
|
||||
*/
|
||||
importGoodsSource() {}
|
||||
importGoodsSource() { }
|
||||
|
||||
/*
|
||||
* 审核关闭弹窗
|
||||
@ -423,7 +423,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
*/
|
||||
handleOK() {
|
||||
let idList: any[] = [];
|
||||
if(this.selectedRows.length > 0) {
|
||||
if (this.selectedRows.length > 0) {
|
||||
this.selectedRows.forEach(item => {
|
||||
idList.push(item.id);
|
||||
});
|
||||
@ -449,14 +449,14 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
*/
|
||||
reject() {
|
||||
let idList: any[] = [];
|
||||
if(this.selectedRows.length > 0) {
|
||||
if (this.selectedRows.length > 0) {
|
||||
this.selectedRows.forEach(item => {
|
||||
idList.push(item.id);
|
||||
});
|
||||
} else {
|
||||
idList.push(this.sfView.value.billCode)
|
||||
}
|
||||
if(!this.sfView.value.representationsCause) {
|
||||
if (!this.sfView.value.representationsCause) {
|
||||
this.service.msgSrv.error('拒绝原因为空!');
|
||||
return;
|
||||
}
|
||||
@ -483,7 +483,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
this.initSTAudit(1);
|
||||
this.isVisibleRE = true;
|
||||
} else {
|
||||
if(this.selectedRows.length <= 0) {
|
||||
if (this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('请选择订单!')
|
||||
return;
|
||||
} else {
|
||||
|
||||
@ -55,7 +55,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
two: '2',
|
||||
three: '2',
|
||||
id: 2
|
||||
}
|
||||
},
|
||||
];
|
||||
tabs = {
|
||||
cancelQuantity: 0,
|
||||
@ -732,10 +732,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
|
||||
nzComponentParams: { data: { ids: params } },
|
||||
nzFooter: null
|
||||
// nzOnOk: sin => {
|
||||
// this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('变更运费成功');
|
||||
// modal.destroy();
|
||||
// this.st.reload();
|
||||
// }
|
||||
// });
|
||||
|
||||
@ -211,7 +211,7 @@ export class OrderManagementService extends ShipperBaseService {
|
||||
})
|
||||
);
|
||||
}
|
||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
<page-header-wrapper [title]="'合伙人账户明细'" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<!-- <button nz-button (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button> -->
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<sv-container layout="vertical" [noColon]="true" col="4">
|
||||
<sv [label]="labelTpl">
|
||||
<b class="text-md ">{{headerTotalInfo?.ltdName}}</b>
|
||||
</sv>
|
||||
<sv label="可用余额">
|
||||
{{headerTotalInfo?.allAmount |currency}}
|
||||
</sv>
|
||||
<sv label="收入金额">
|
||||
{{headerTotalInfo?.incomeAmount |currency}}
|
||||
</sv>
|
||||
<sv label="支出金额">
|
||||
{{headerTotalInfo?.payAmount |currency}}
|
||||
</sv>
|
||||
</sv-container>
|
||||
<ng-template #labelTpl>
|
||||
<b class="text-md" style="color: black;">{{headerTotalInfo?.name}} {{headerTotalInfo?.phone}}</b>
|
||||
</ng-template>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<div nz-row>
|
||||
<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">
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-content">
|
||||
<st #st [data]="service.$api_get_account_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] }"
|
||||
[loading]="service.http.loading" [scroll]="{x:'1200px'}">
|
||||
<ng-template st-row="amount" let-item>
|
||||
<div *ngIf="item.incomeType === '1'" class="text-right"> - {{item.amount | currency:' ' }}</div>
|
||||
<div *ngIf="item.incomeType === '2'" class="text-right"> + {{item.amount | currency:' ' }}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="accountBalance" let-item>
|
||||
<div class="text-right">{{item?.accountBalance |currency:' '}}</div>
|
||||
</ng-template>
|
||||
|
||||
</st>
|
||||
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
|
||||
合计 <label class="text-red-dark">{{ footerTotalInfo?.total }}</label> 项,收入 <label
|
||||
class="text-red-dark font-weight-bold">{{
|
||||
footerTotalInfo?.incomeAmount | currency
|
||||
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{
|
||||
footerTotalInfo?.payAmount | currency }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -0,0 +1,21 @@
|
||||
:host {
|
||||
::ng-deep {
|
||||
.search-header {
|
||||
nz-range-picker {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-content {
|
||||
position: relative;
|
||||
|
||||
.total-footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
height: 32px;
|
||||
margin: 16px 0;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerAccountManagementAccountDetailComponent } from './account-detail.component';
|
||||
|
||||
describe('PartnerAccountManagementAccountDetailComponent', () => {
|
||||
let component: PartnerAccountManagementAccountDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerAccountManagementAccountDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PartnerAccountManagementAccountDetailComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerAccountManagementAccountDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,204 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { AccountManagemantService } from '../../services/account-managemant.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-account-management-account-detail',
|
||||
templateUrl: './account-detail.component.html',
|
||||
styleUrls: ['./account-detail.component.less']
|
||||
})
|
||||
export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
headerTotalInfo: any = {
|
||||
allAmount: 0,
|
||||
incomeAmount: 0,
|
||||
payAmount: 0,
|
||||
name: '',
|
||||
ltdName: '',
|
||||
phone: ''
|
||||
};
|
||||
footerTotalInfo: any = {
|
||||
incomeAmount: 0,
|
||||
payAmount: 0,
|
||||
total: 0
|
||||
};
|
||||
|
||||
|
||||
url = `/user`;
|
||||
schema: SFSchema = {};
|
||||
ui!: SFUISchema;
|
||||
_$expand = false;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
|
||||
|
||||
columns: STColumn[] = [];
|
||||
roleId = '';
|
||||
bankType = '';
|
||||
channelSource = '';
|
||||
ltdId = '';
|
||||
constructor(public service: AccountManagemantService, public ar: ActivatedRoute) {
|
||||
|
||||
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() {
|
||||
return { ...this.sf?.value, roleId: this.roleId, ltdId: this.ltdId, channelSource: this.channelSource, bankType: this.bankType };
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.getHeaderSummary();
|
||||
this.getFooterSummary();
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: {
|
||||
type: 'boolean', ui: { hidden: true }
|
||||
},
|
||||
createTime: {
|
||||
type: 'string',
|
||||
title: '交易时间',
|
||||
ui: {
|
||||
widget: 'sl-from-to',
|
||||
type: 'date',
|
||||
autoComplete: 'off',
|
||||
format: 'yyyy-MM-dd',
|
||||
} as SFDateWidgetSchema,
|
||||
},
|
||||
transactionNumber: {
|
||||
title: '流水号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
businessNumber: {
|
||||
title: '交易单号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
tradeType: {
|
||||
type: 'string',
|
||||
title: '交易类型',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: {
|
||||
dictKey: 'trade:type'
|
||||
},
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
},
|
||||
},
|
||||
incomeType: {
|
||||
type: 'string',
|
||||
title: '收支类型',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: {
|
||||
dictKey: 'income:type'
|
||||
},
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } }, };
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '交易时间', index: 'createTime', className: 'text-center', width: 200 },
|
||||
{ title: '流水号', index: 'transactionNumber', className: 'text-center', width: 180 },
|
||||
{ title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 150 },
|
||||
{ title: '交易单号', index: 'businessNumber', className: 'text-center', width: 180 },
|
||||
{ title: '备注', index: 'tradeContent', className: 'text-center', width: 180 },
|
||||
{ title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 180 },
|
||||
{ title: '交易金额', render: 'amount', className: 'text-center', width: 150 },
|
||||
{ title: '账户余额', render: 'accountBalance', className: 'text-center', width: 150 },
|
||||
{ title: '付款方', index: 'payName', className: 'text-center', width: 200 },
|
||||
{ title: '收款方', index: 'payeeName', className: 'text-center', width: 200 },
|
||||
];
|
||||
}
|
||||
resetSF() {
|
||||
this._$expand = false;
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$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() {
|
||||
this.st.load(1);
|
||||
}
|
||||
export() { }
|
||||
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
<page-header-wrapper [title]="''"></page-header-wrapper>
|
||||
<nz-card>
|
||||
<!-- <div nz-row>
|
||||
<div [nzSpan]="" nz-col>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<sf [schema]="schema" [mode]="'search'" [ui]="ui" [button]="'none'" #sf>
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
</sf>
|
||||
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<st #st [data]="service.$api_get_account_management_page" [columns]="columns" [scroll]="{ x: '1200px' }"
|
||||
[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] }"
|
||||
[loading]="service.http.loading" multiSort>
|
||||
<ng-template st-row="allBalance" let-item>
|
||||
<div class="text-right">{{item.allBalance | currency:' '}}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="unEntryAmount" let-item>
|
||||
<a class="text-right text-blue-dark"
|
||||
[routerLink]="'/partner/account-management/am/recorded/detail/'+item?.roleId">{{item.unEntryAmount | currency:'
|
||||
'}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="availableBalance" let-item>
|
||||
<div class="text-right">{{item.availableBalance | currency:' '}}</div>
|
||||
</ng-template>
|
||||
|
||||
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerAccountManagementListComponent } from './list.component';
|
||||
|
||||
describe('PartnerAccountManagementListComponent', () => {
|
||||
let component: PartnerAccountManagementListComponent;
|
||||
let fixture: ComponentFixture<PartnerAccountManagementListComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PartnerAccountManagementListComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerAccountManagementListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,119 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { BussinessStatisticsService } from '../../../business-statistics/services/bussiness-statistics.service';
|
||||
import { AccountManagemantService } from '../../services/account-managemant.service';
|
||||
import { PartnerAccountManagementVirtualAccountDetailComponent } from '../virtual-account-detail/virtual-account-detail.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-account-management-list',
|
||||
templateUrl: './list.component.html',
|
||||
})
|
||||
export class PartnerAccountManagementListComponent implements OnInit {
|
||||
url = `/user`;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
|
||||
constructor(public service: AccountManagemantService, public modal: NzModalService) { }
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
const params = { ...this.sf?.value };
|
||||
return params
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
userName: {
|
||||
title: '合伙人名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
phone: {
|
||||
title: '手机号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 12 } }, };
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '合伙人名称', index: 'userName', className: 'text-center', width: 250 },
|
||||
{ title: '手机号', index: 'phone', className: 'text-center', width: 200 },
|
||||
{
|
||||
title: '账户总额(元)', index: 'allBalance', className: 'text-right', sort: true, width: 150, type: 'currency',
|
||||
},
|
||||
{
|
||||
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: '操作',
|
||||
width: 150,
|
||||
buttons: [
|
||||
{
|
||||
text: '虚拟账户明细',
|
||||
click: (_record) => this.viewVirtual(_record)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param _record 当前行信息
|
||||
*/
|
||||
viewVirtual(_record: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '虚拟账户明细',
|
||||
nzContent: PartnerAccountManagementVirtualAccountDetailComponent,
|
||||
nzComponentParams: {
|
||||
roleId: _record?.roleId,
|
||||
},
|
||||
nzWidth: '85%',
|
||||
nzFooter: null
|
||||
});
|
||||
// modalRef.afterClose.subscribe(result => {
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
<page-header-wrapper [title]="'待入账明细'" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<sv-container layout="vertical" [noColon]="true" col="5">
|
||||
<sv [label]="labelTpl">
|
||||
<b class="text-md ">{{summaryObj?.company}}</b>
|
||||
</sv>
|
||||
<sv label="返佣总额">
|
||||
{{summaryObj?.totalRebate |currency}}
|
||||
</sv>
|
||||
<sv label="已入账金额">
|
||||
{{summaryObj?.totalRebate |currency}}
|
||||
</sv>
|
||||
<sv label="代缴个税">
|
||||
{{summaryObj?.taxPersonalSum |currency}}
|
||||
</sv>
|
||||
<sv label="待入账金额">
|
||||
{{summaryObj?.waitRecordedAmount |currency}}
|
||||
</sv>
|
||||
</sv-container>
|
||||
<ng-template #labelTpl>
|
||||
<b class="text-md" style="color: black;">{{summaryObj?.name}}</b>
|
||||
</ng-template>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<div>
|
||||
<sf mode="search" #sf [schema]="schema" [ui]="ui" (formSubmit)="search()" (formReset)="resetSF()"></sf>
|
||||
</div>
|
||||
<div class="table-content">
|
||||
<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] }"
|
||||
[loading]="service.http.loading" [scroll]="{x:'1200px'}">
|
||||
<ng-template st-row="amount" let-item>
|
||||
<div *ngIf="item.incomeType === '1'"> - {{item.amount | currency }}</div>
|
||||
<div *ngIf="item.incomeType === '2'"> + {{item.amount | currency }}</div>
|
||||
</ng-template>
|
||||
</st>
|
||||
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
|
||||
合计 <label class="text-red-dark">{{ summaryObj?.total }}</label> 项,收入 <label
|
||||
class="text-red-dark font-weight-bold">{{
|
||||
summaryObj?.income | currency
|
||||
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{
|
||||
summaryObj?.spending | currency }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<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>{{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}">
|
||||
<ng-template st-row="month" let-item>
|
||||
<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>
|
||||
|
||||
</st>
|
||||
</div>
|
||||
</nz-modal>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerAccountManagementRecordedDetailComponent } from './recorded-detail.component';
|
||||
|
||||
describe('PartnerAccountManagementRecordedDetailComponent', () => {
|
||||
let component: PartnerAccountManagementRecordedDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerAccountManagementRecordedDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PartnerAccountManagementRecordedDetailComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerAccountManagementRecordedDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,179 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { AccountManagemantService } from '../../services/account-managemant.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-account-management-recorded-detail',
|
||||
templateUrl: './recorded-detail.component.html',
|
||||
})
|
||||
export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
|
||||
summaryObj: any = {
|
||||
waitRecordedAmount: 0,
|
||||
totalRebate: 0,
|
||||
taxPersonalSum: 0,
|
||||
recordedAmount: 0,
|
||||
ltdName: '',
|
||||
taxno: ''
|
||||
};
|
||||
|
||||
detailRecord: any = {};
|
||||
|
||||
url = `/user`;
|
||||
schema: SFSchema = {};
|
||||
ui!: SFUISchema;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
|
||||
|
||||
columns: STColumn[] = [];
|
||||
billDetailColumns: STColumn[] = [];
|
||||
showBillDetail = false;
|
||||
billDetailList = [];
|
||||
roleId = '';
|
||||
|
||||
constructor(public service: AccountManagemantService, public router: Router, public ar: ActivatedRoute) {
|
||||
this.roleId = this.ar.snapshot.params.id;
|
||||
|
||||
}
|
||||
|
||||
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value, partnerId: this.roleId };
|
||||
}
|
||||
|
||||
get billDetailReqParams() {
|
||||
return {};
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
this.getInvoiceSummary();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
|
||||
abnormalCause: {
|
||||
title: '网络货运人',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } }, };
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ 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: [
|
||||
{
|
||||
text: '查看入账记录',
|
||||
click: (_record) => this.viewBookedRecord(_record)
|
||||
},
|
||||
{
|
||||
text: '查看账单明细',
|
||||
click: (_record) => this.viewAccountDetail(_record)
|
||||
},
|
||||
]
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
initBillDetailST() {
|
||||
this.billDetailColumns = [
|
||||
{ title: '账单月份', render: 'month', className: 'text-center', width: '40%' },
|
||||
{ title: '返佣金额(元)', render: 'profitAmountSum', className: 'text-center', width: '40%' },
|
||||
{
|
||||
title: '操作', className: 'text-center', width: '20%', buttons: [
|
||||
{
|
||||
text: '订单明细',
|
||||
click: (_record) => window.open(location.origin + `#/partner/rebate/record?ltdId=${_record?.ltdId}`)
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
search() {
|
||||
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() { }
|
||||
|
||||
/**
|
||||
* 查看入账记录
|
||||
* @param record 当前行
|
||||
*/
|
||||
viewBookedRecord(record: any) {
|
||||
window.open(location.origin + `#/partner/recorded/record?ltdId=${record?.ltdId}&userId=${record?.userId}&userIdLabel=${record?.banktypeLabel}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看账单明细
|
||||
* @param record 当前行
|
||||
*/
|
||||
viewAccountDetail(record: any) {
|
||||
this.billDetailColumns = [];
|
||||
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;
|
||||
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
<nz-card>
|
||||
<div nz-row>
|
||||
<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">
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-sm">
|
||||
<st #st [data]="service. $api_get_virtual_detail_page" [columns]="columns" [columns]="columns"
|
||||
[scroll]="{ x: '1200px' }"
|
||||
[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] }"
|
||||
[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>
|
||||
</nz-card>
|
||||
<div class="modal-footer text-center">
|
||||
<button nz-button type="button" nzType="primary" (click)="close()">确 定</button>
|
||||
</div>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerAccountManagementVirtualAccountDetailComponent } from './virtual-account-detail.component';
|
||||
|
||||
describe('PartnerAccountManagementVirtualAccountDetailComponent', () => {
|
||||
let component: PartnerAccountManagementVirtualAccountDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerAccountManagementVirtualAccountDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PartnerAccountManagementVirtualAccountDetailComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerAccountManagementVirtualAccountDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,184 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { ShipperBaseService } from 'src/app/shared/services/business/shipper-base.service';
|
||||
import { AccountManagemantService } from '../../services/account-managemant.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-account-management-virtual-account-detail',
|
||||
templateUrl: './virtual-account-detail.component.html',
|
||||
})
|
||||
export class PartnerAccountManagementVirtualAccountDetailComponent implements OnInit {
|
||||
url = `/user`;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
roleId = '';
|
||||
_$expand = false;
|
||||
record = {};
|
||||
|
||||
constructor(public shipperservice: ShipperBaseService, public service: AccountManagemantService,
|
||||
private modalRef: NzModalRef, public router: Router) {
|
||||
}
|
||||
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value, roleId: this.roleId };
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: {
|
||||
type: 'boolean', ui: { hidden: true }
|
||||
},
|
||||
userName: {
|
||||
title: '合伙人名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
phone: {
|
||||
title: '手机号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
ltdId: {
|
||||
title: '网络货运人',
|
||||
type: 'string',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder({}, true)
|
||||
}
|
||||
|
||||
},
|
||||
bankType: {
|
||||
type: 'string',
|
||||
title: '银行类型',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: {
|
||||
dictKey: 'bankname:type'
|
||||
},
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
},
|
||||
},
|
||||
virtualAccount: {
|
||||
title: '虚拟账户',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
},
|
||||
},
|
||||
createTime: {
|
||||
type: 'string',
|
||||
title: '创建时间',
|
||||
ui: {
|
||||
widget: 'sl-from-to',
|
||||
type: 'date',
|
||||
autoComplete: 'off',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
} as SFDateWidgetSchema,
|
||||
},
|
||||
}
|
||||
}
|
||||
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } }, };
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '合伙人', index: 'name', className: 'text-center', width: 200 },
|
||||
{ title: '手机号', index: 'phone', className: 'text-center', width: 150 },
|
||||
{ title: '网络货运人', index: 'ltdName', className: 'text-center', width: 200 },
|
||||
{ title: '银行类型', index: 'bankTypeLabel', className: 'text-center', width: 120 },
|
||||
{ title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 180 },
|
||||
{ title: '可用余额', render: 'availableBalance', className: 'text-center', width: 180 },
|
||||
{ title: '账户总余额', render: 'allBalance', className: 'text-center', width: 180 },
|
||||
{ title: '创建时间', index: 'createTime', className: 'text-center', width: 200 },
|
||||
{ title: '状态', index: 'stateDeletedLabel', className: 'text-center', width: 120 },
|
||||
{
|
||||
title: '操作',
|
||||
width: 120,
|
||||
buttons: [
|
||||
{
|
||||
text: '查看明细',
|
||||
click: (_record) => this.viewDetail(_record)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
resetSF() {
|
||||
this._$expand = false;
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
search() {
|
||||
this.st.load(1);
|
||||
}
|
||||
export() { }
|
||||
/**
|
||||
*
|
||||
* @param _record 当前行信息
|
||||
*/
|
||||
viewDetail(_record: any) {
|
||||
// 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() {
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-05 20:15:41
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:17:19
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\withdrawals-record\\withdrawals-detail\\withdrawals-detail.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<page-header-wrapper [title]="'提现详情'" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
|
||||
|
||||
<nz-card [nzLoading]="service.http.loading">
|
||||
<nz-alert nzType="info" nzMessage="提现信息" class="mb-md"></nz-alert>
|
||||
<div se-container [labelWidth]="130">
|
||||
<se label="网络货运人">
|
||||
{{formData?.ltdName}}
|
||||
</se>
|
||||
<se label="银行类型">
|
||||
{{formData?.bankType==='1'?'平安银行':'浦发银行'}}
|
||||
</se>
|
||||
<se label="提现单号">
|
||||
{{formData?.refundApplyCode}}
|
||||
</se>
|
||||
<se label="账户名称">
|
||||
{{formData?.bankAccountName}}
|
||||
</se>
|
||||
<se label="提现时间">
|
||||
{{formData?.createTime}}
|
||||
</se>
|
||||
<se label="虚拟账户">
|
||||
{{formData?.virtualAccount}}
|
||||
</se>
|
||||
<se label="提现状态">
|
||||
{{formData?.refundStatusLabel}}
|
||||
</se>
|
||||
<se label="提现金额">
|
||||
{{formData?.amount | currency}}
|
||||
</se>
|
||||
<se label="银行流水号">
|
||||
{{formData?.bankSerialNumber}}
|
||||
</se>
|
||||
<se label="提现至银行卡">
|
||||
{{formData?.bankCardNumber}}
|
||||
</se>
|
||||
<se label="银行回单" col="1">
|
||||
<a (click)="downBack()">{{formData?.refundStatus==='3'?'下载回单':'暂无回单'}}</a>
|
||||
</se>
|
||||
</div>
|
||||
|
||||
<nz-alert nzType="info" nzMessage="提现进度" class="mb-md mt-md"></nz-alert>
|
||||
<div nz-row class="mt-xl">
|
||||
<div nz-col nzSpan="12" nzOffset="1">
|
||||
<app-logistics-time-line [data]="timeLineData"></app-logistics-time-line>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -0,0 +1,17 @@
|
||||
:host::ng-deep {
|
||||
|
||||
.ant-alert-info {
|
||||
background-color: #f3f3f3;
|
||||
border : 1px solid #dbdbdb;
|
||||
|
||||
.ant-alert-message {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-form-item {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-account-management-withdrawals-detail',
|
||||
templateUrl: './withdrawals-detail.component.html',
|
||||
styleUrls: ['./withdrawals-detail.component.less']
|
||||
})
|
||||
export class PartnerAccountManagementWithdralDetailComponent implements OnInit {
|
||||
formData: any = {};
|
||||
|
||||
timeLineData: any = [];
|
||||
|
||||
constructor(public service: FreightAccountService, private route: ActivatedRoute) {
|
||||
const id = route.snapshot.params.id;
|
||||
this.loadRefundDetail(id);
|
||||
}
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
loadRefundDetail(id: string) {
|
||||
this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.formData = res;
|
||||
// 处理流程节点数据
|
||||
// 流程是否结束
|
||||
let isEnd = false;
|
||||
if (res.successTime) {
|
||||
isEnd = true;
|
||||
if (res.refundStatus === '3') {
|
||||
this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' });
|
||||
} else {
|
||||
this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' });
|
||||
}
|
||||
}
|
||||
if (res.agreeTime && res.refundStatus !== '4') {
|
||||
this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' });
|
||||
}
|
||||
if (res.agreeTime) {
|
||||
if (res.refundStatus === '4') {
|
||||
isEnd = true;
|
||||
this.timeLineData.push({
|
||||
time: res.agreeTime,
|
||||
value: `拒绝提现<br/>操作人员:${res.handlerUserIdLabel}`,
|
||||
color: 'red'
|
||||
});
|
||||
} else {
|
||||
this.timeLineData.push({
|
||||
time: res.agreeTime,
|
||||
value: `审核通过<br/>操作人员:${res.handlerUserIdLabel}`,
|
||||
color: 'gray'
|
||||
});
|
||||
}
|
||||
}
|
||||
if (res.createTime) {
|
||||
this.timeLineData.push({
|
||||
time: res.createTime,
|
||||
value: `提交提现申请<br/>提现${res.amount}元至${res.bankName}(${res.bankCardNumber})<br/>操作人员:${res.userIdLabel}`,
|
||||
color: 'gray'
|
||||
});
|
||||
}
|
||||
if (this.timeLineData?.length > 0 && !isEnd) {
|
||||
this.timeLineData[0].color = 'green';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
downBack() {
|
||||
if (this.formData?.refundStatus !== '3') {
|
||||
return;
|
||||
}
|
||||
this.service.getReceiptUrl(this.formData.receiptUrl, {
|
||||
bankType: this.formData.bankType,
|
||||
rmYll: this.formData.userId,
|
||||
snglFlgCd: this.formData.coreSerNo,
|
||||
bussType: '06',
|
||||
ltdId: this.formData.ltdId
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
history.go(-1);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
<page-header-wrapper [title]="''"></page-header-wrapper>
|
||||
<nz-card class="search-box" nzBordered>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #sf [schema]="searchSchema"
|
||||
[ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24,gutter:15 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
|
||||
class="text-right">
|
||||
<button nz-button nzType="primary" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button> 导出</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box" nzBordered>
|
||||
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"></nz-tab>
|
||||
<nz-tab nzTitle="待审核" (nzClick)="changeRefundStatus('1')"></nz-tab>
|
||||
<nz-tab nzTitle="处理中" (nzClick)="changeRefundStatus('2')"></nz-tab>
|
||||
<nz-tab nzTitle="提现成功" (nzClick)="changeRefundStatus('3')"></nz-tab>
|
||||
<nz-tab nzTitle="提现失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
|
||||
<nz-tab nzTitle="已拒绝" (nzClick)="changeRefundStatus('4')"></nz-tab>
|
||||
</nz-tabset>
|
||||
|
||||
<ng-template #extraTemplate>
|
||||
<div class="d-flex align-items-center ">
|
||||
<div class="mr-md">
|
||||
已选择
|
||||
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据 累计提现 <strong class="text-red">{{
|
||||
totalCallNo }}</strong>
|
||||
<!-- <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> -->
|
||||
</div>
|
||||
<button nz-button (click)="this.auditAction(null)">审核</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<st #st [data]="amService.$api_get_withdraw_record_page" [columns]="columns" [req]="{ process: beforeReq }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px' }" (change)="stChange($event)"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
|
||||
[page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }">
|
||||
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">
|
||||
{{ item.bankName }} <br> {{ item.bankCardNumber }}
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
|
||||
<ng-template #auditModal>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="80">
|
||||
<se [col]="1" label="备注">
|
||||
<textarea nz-input rows="3" [(ngModel)]="msg" placeholder="同意可以不用填写原因 ,拒绝必须说明原因"
|
||||
style="width: 325px;margin-left: 14px;"></textarea>
|
||||
</se>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -0,0 +1,335 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
|
||||
import Big from 'src/app/shared/utils/deal-precision';
|
||||
import { AccountManagemantService } from '../../services/account-managemant.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-account-management-withdrawals-record',
|
||||
templateUrl: './withdrawals-record.component.html',
|
||||
styleUrls: ['../../../../commom/less/box.less', '../../../../commom/less/expend-but.less']
|
||||
})
|
||||
export class PartnerAccountManagementWithdrawalsRecordComponent implements OnInit {
|
||||
@ViewChild('st', { static: true }) st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('auditModal', { static: false }) auditModal!: any;
|
||||
@ViewChild('viewReasonModal', { static: false }) viewReasonModal!: any;
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
_$expand = false;
|
||||
|
||||
selectedRows: any[] = [];
|
||||
totalCallNo = 0;
|
||||
refundStatus: any = '';
|
||||
|
||||
msg = '';
|
||||
constructor(public service: FreightAccountService, public amService: AccountManagemantService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { }
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
createTime: {
|
||||
start: this.sf.value.createTime?.[0] || '',
|
||||
end: this.sf.value.createTime?.[1] || ''
|
||||
},
|
||||
refundStatus: this.refundStatus || null
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
afterRes = (data: any[], rawData?: any) => {
|
||||
data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' }));
|
||||
return data;
|
||||
};
|
||||
|
||||
stChange(e: STChange): void {
|
||||
if (e.type === 'checkbox') {
|
||||
const checkRows = (e.checkbox as STData[]) || [];
|
||||
//判断当前页是否有选中的行
|
||||
if (checkRows.length === 0) {
|
||||
// 当前页没有存在已勾选的行,移除之前所记录的当前页的行
|
||||
const stList = this.st.list;
|
||||
stList.forEach(item => {
|
||||
this.selectedRows = this.selectedRows.filter((e: any) => e.id !== item.id);
|
||||
})
|
||||
} else {
|
||||
//添加新增的行
|
||||
checkRows.forEach((item: any) => {
|
||||
const newSelectedList = this.selectedRows.filter((r: any) => r.id === item.id);
|
||||
if (newSelectedList.length === 0) {
|
||||
this.selectedRows.push(item);
|
||||
|
||||
}
|
||||
})
|
||||
// 移除取消选中的行
|
||||
const stList = this.st.list;
|
||||
stList.forEach(item => {
|
||||
if (!item.checked) {
|
||||
const index = this.selectedRows.findIndex(_item => item.id === _item.id);
|
||||
if (index !== -1) this.selectedRows.splice(index, 1);
|
||||
}
|
||||
})
|
||||
}
|
||||
let totalCallNo = 0;
|
||||
this.selectedRows.forEach((item => {
|
||||
totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse();
|
||||
}));
|
||||
this.totalCallNo = totalCallNo;
|
||||
} else if (e.type === 'loaded') {
|
||||
// 页面加载时勾选
|
||||
(e?.loaded || []).forEach((r) => {
|
||||
this.selectedRows.forEach((x) => {
|
||||
if (x.id === r.id) {
|
||||
r.checked = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
changeRefundStatus(status?: string) {
|
||||
this.refundStatus = status || null;
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
auditAction(item?: any) {
|
||||
this.msg = '';
|
||||
let params: Array<string> = [];
|
||||
if (item) {
|
||||
params = [item.id];
|
||||
} else {
|
||||
params = this.selectedRows.map(node => node.id);
|
||||
}
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '审核',
|
||||
nzContent: this.auditModal,
|
||||
nzFooter: [
|
||||
{
|
||||
label: '拒绝',
|
||||
type: 'default',
|
||||
onClick: () => {
|
||||
this.service
|
||||
.request(this.service.$api_disagree_refund, {
|
||||
refundApplicationId: params,
|
||||
msg: this.msg
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('审核拒绝成功');
|
||||
modal.destroy();
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '通过',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
this.service
|
||||
.request(this.service.$api_agree_refund, {
|
||||
refundApplicationId: params,
|
||||
msg: this.msg
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('审核通过成功');
|
||||
modal.destroy();
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
|
||||
showReason(item: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '查看原因',
|
||||
nzContent: item?.rejectionCause || item?.failCause,
|
||||
nzFooter: [
|
||||
{
|
||||
label: '关闭',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
modal.destroy();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this._$expand = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/expand', this._$expand);
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
expand: {
|
||||
type: 'boolean',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
refundApplyCode: {
|
||||
type: 'string',
|
||||
title: '提现单号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
refundStatus: {
|
||||
type: 'string',
|
||||
title: '提现状态',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
title: '提现时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
placeholder: '请选择',
|
||||
nzShowTime: true
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
bankAccountName: {
|
||||
type: 'string',
|
||||
title: '账户名称',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
accountType: {
|
||||
type: 'string',
|
||||
title: '账户类型',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'bank:type' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
ltdId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getNetworkFreightForwarder(),
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
bankType: {
|
||||
type: 'string',
|
||||
title: '银行类型',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'bankname:type' },
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '', index: 'key', type: 'checkbox', className: 'text-center' },
|
||||
{ title: '提现时间', index: 'createTime', width: 180, className: 'text-center' },
|
||||
{ title: '提现单号', index: 'refundApplyCode', width: 180, className: 'text-center' },
|
||||
{ title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' },
|
||||
{ title: '银行类型', index: 'bankTypeLabel', width: 100, className: 'text-center' },
|
||||
{ title: '账户类型', index: 'accountTypeLabel', width: 100, className: 'text-center' },
|
||||
{ title: '账户名称', index: 'bankAccountName', width: 220, className: 'text-center' },
|
||||
{ title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' },
|
||||
{
|
||||
title: '提现金额',
|
||||
index: 'amount',
|
||||
width: 200,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) }
|
||||
},
|
||||
{ title: '提现银行账户', render: 'bankCardNumber', width: 200, className: 'text-center' },
|
||||
{ title: '提现状态', index: 'refundStatusLabel', width: 100, className: 'text-center' },
|
||||
{ title: '银行流水号', index: 'bankSerialNumber', width: 160, className: 'text-center' },
|
||||
{ title: '核心交易流水', index: 'coreSerNo', width: 180, className: 'text-center' },
|
||||
{ title: '失败原因', index: 'rejectionCause', width: 200, format: item => item.failCause, className: 'text-center' },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '110px',
|
||||
buttons: [
|
||||
{
|
||||
text: '查看回单',
|
||||
iif: item => item.refundStatus === '3',
|
||||
click: item =>
|
||||
this.service.getReceiptUrl(item.receiptUrl, {
|
||||
bankType: item.bankType,
|
||||
rmYll: item.userId,
|
||||
snglFlgCd: item.coreSerNo,
|
||||
bussType: '06',
|
||||
ltdId: item.ltdId
|
||||
})
|
||||
},
|
||||
{
|
||||
text: '查看原因',
|
||||
iif: item => item.refundStatus === '4',
|
||||
click: item => this.showReason(item)
|
||||
},
|
||||
{
|
||||
text: '审核',
|
||||
iif: item => item.refundStatus === '1',
|
||||
click: item => this.auditAction(item)
|
||||
},
|
||||
{
|
||||
text: '详情',
|
||||
click: item => this.router.navigate(['./../detail/' + item.id], { relativeTo: this.ar })
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AccountManagemantService extends BaseService {
|
||||
|
||||
$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) {
|
||||
super(injector)
|
||||
}
|
||||
}
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
<page-header-wrapper [title]="''"></page-header-wrapper>
|
||||
<nz-card>
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'">
|
||||
</sf>
|
||||
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="default" (click)="close()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="save()">确认</button>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<div class="align-center" style="display: flex; justify-content: center;">
|
||||
<button nz-button nzType="default" (click)="close()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="save()" style="margin-left: 48px">确认</button>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -0,0 +1,189 @@
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { AmapPoiPickerComponent } from 'src/app/shared/components/amap';
|
||||
import { ChannelSalesService } from '../../services/channel-sales.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-article-management-edit',
|
||||
templateUrl: './edit.component.html'
|
||||
})
|
||||
export class ParterArticleManagementEditComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
i: any;
|
||||
type: any;
|
||||
|
||||
constructor(
|
||||
public http: _HttpClient,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private route: ActivatedRoute,
|
||||
public service: ChannelSalesService,
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: { hidden: true }
|
||||
},
|
||||
name1: {
|
||||
type: 'string',
|
||||
title: '文章标题',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 },
|
||||
placeholder:'请输入50字符'
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
name2: {
|
||||
type: 'string',
|
||||
title: '文章简介',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 },
|
||||
placeholder:'请输入50字符'
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
name3: {
|
||||
type: 'string',
|
||||
title: '封面图',
|
||||
ui: {
|
||||
action: apiConf.fileUpload,
|
||||
accept: 'image/png,image/jpeg,image/jpg',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFilePath',
|
||||
urlReName: 'data.fullFilePath',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 280px * 180 px)',
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
name: {
|
||||
title: '分类',
|
||||
type: 'string',
|
||||
enum: [
|
||||
{ label: '管理员', value: '1'},
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
name4: {
|
||||
type: 'number',
|
||||
title: '排序',
|
||||
minimum: 0,
|
||||
maximum: 99,
|
||||
ui: {
|
||||
widgetWidth: 300 ,
|
||||
placeholder:'请输入0~99,数字越大,排序越靠前'
|
||||
}
|
||||
},
|
||||
name5: {
|
||||
type: 'string',
|
||||
title: '跳转路径',
|
||||
enum: [
|
||||
{ label: '图文', value: '1'},
|
||||
{ label: '视频', value: '2'},
|
||||
],
|
||||
ui: {
|
||||
widget: 'radio',
|
||||
} as SFRadioWidgetSchema,
|
||||
default: '1',
|
||||
},
|
||||
content: {
|
||||
type: 'string',
|
||||
title: '正文',
|
||||
ui: {
|
||||
widget: 'tinymce',
|
||||
loadingTip: 'loading...',
|
||||
config: {
|
||||
height: 450
|
||||
},
|
||||
visibleIf: { name5: (value: string) => value === '1' }
|
||||
},
|
||||
},
|
||||
name6: {
|
||||
type: 'string',
|
||||
title: '视频',
|
||||
ui: {
|
||||
action: apiConf.fileUpload,
|
||||
accept: 'video/mp4,video/avi,video/mkv,video/vob',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFilePath',
|
||||
urlReName: 'data.fullFilePath',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '支持MP4、AVI、DAT、MKV、FLV、VOB格式,文件小于20M。',
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 20;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('视频大小超过20M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
visibleIf: { name5: (value: string) => value === '2' }
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
},
|
||||
required: ['name1', 'name2']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 150,
|
||||
grid: { span: 20 }
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
close() {
|
||||
|
||||
}
|
||||
save() {
|
||||
this.sf.validator({ emitError: true });
|
||||
if(!this.sf.valid) return;
|
||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.modalRef.destroy(true);
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
<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>
|
||||
<button nz-button nzType="primary" style="margin-bottom: 24px" (click)="add()">新增文章</button>
|
||||
<!-- 数据列表 -->
|
||||
<st
|
||||
#st
|
||||
[data]="data"
|
||||
[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: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
>
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,200 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { processSingleSort } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ChannelSalesService } from '../../services/channel-sales.service';
|
||||
import { ParterArticleManagementEditComponent } from '../edit/edit.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-article-management-list',
|
||||
templateUrl: './list.component.html'
|
||||
})
|
||||
export class ParterArticleManagementListComponent implements OnInit {
|
||||
schema: SFSchema = {};
|
||||
columns!: STColumn[];
|
||||
ui!: SFUISchema;
|
||||
@ViewChild('st', { static: false })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
spuStatus = '1';
|
||||
_$expand = false;
|
||||
|
||||
data=[{name1:1111}]
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: ChannelSalesService,
|
||||
private modalService: NzModalService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
search() {
|
||||
// this.st1?.load(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字段个数
|
||||
*/
|
||||
get queryFieldCount(): number {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
name: {
|
||||
type: 'string',
|
||||
title: '文章标题'
|
||||
},
|
||||
phone: {
|
||||
type: 'string',
|
||||
title: '分类'
|
||||
},
|
||||
phone1: {
|
||||
type: 'string',
|
||||
title: '状态'
|
||||
},
|
||||
phone2: {
|
||||
type: 'string',
|
||||
title: '推荐到首页',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
grid: { span: 8, gutter: 4 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initST() {
|
||||
this.columns = [
|
||||
{
|
||||
title: '销售渠道姓名',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '所属组织',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '职级',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '等级',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '省市',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '邀请码',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '修改',
|
||||
click: (_record, _modal, _instance) => this.edit(_record),
|
||||
},
|
||||
{
|
||||
text: '禁用',
|
||||
click: (_record, _modal, _instance) => this.stop(_record),
|
||||
},
|
||||
{
|
||||
text: '启用',
|
||||
click: (_record, _modal, _instance) => this.start(_record.id),
|
||||
},
|
||||
{
|
||||
text: '推荐到首页',
|
||||
click: (_record, _modal, _instance) => this.recommend(_record.id),
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
// 新增
|
||||
add() {
|
||||
this.router.navigate(['/partner/knowledge/article-management-add'], { queryParams: {} });
|
||||
}
|
||||
|
||||
// 编辑
|
||||
edit(record: STData) {
|
||||
this.router.navigate(['/partner/knowledge/article-management-edit'], { queryParams: {} });
|
||||
}
|
||||
|
||||
|
||||
stop(record: STData) {
|
||||
this.modalService.confirm({
|
||||
nzTitle: '<i>禁用确认</i>',
|
||||
nzContent: `<b>确定禁用此文章吗?</br>`,
|
||||
// nzOnOk: () =>
|
||||
// this.service.request('', '').subscribe(res => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('冻结成功!');
|
||||
// this.st.reload();
|
||||
// }
|
||||
// })
|
||||
});
|
||||
}
|
||||
start(record: STData) {
|
||||
this.modalService.confirm({
|
||||
nzTitle: '<i>启用确认</i>',
|
||||
nzContent: `<b>确定启用此文章吗?</br>`,
|
||||
// nzOnOk: () =>
|
||||
// this.service.request('', '').subscribe(res => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('冻结成功!');
|
||||
// this.st.reload();
|
||||
// }
|
||||
// })
|
||||
});
|
||||
}
|
||||
recommend(record: STData) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ChannelSalesService extends BaseService {
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
<page-header-wrapper [title]="''" [tab]="tpTab">
|
||||
|
||||
</page-header-wrapper>
|
||||
<ng-template #tpTab>
|
||||
<nz-tabset [(nzSelectedIndex)]="selectedIndex">
|
||||
<nz-tab [nzTitle]="item.name" *ngFor="let item of tabs">
|
||||
</nz-tab>
|
||||
</nz-tabset>
|
||||
</ng-template>
|
||||
<app-partner-partner-statistics *ngIf="selectedIndex === 0"></app-partner-partner-statistics>
|
||||
<app-partner-sale-statistics *ngIf="selectedIndex === 1"></app-partner-sale-statistics>
|
||||
@ -0,0 +1,37 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFSchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-business-statistics-index',
|
||||
templateUrl: './index.component.html',
|
||||
})
|
||||
export class PartnerBusinessStatisticsIndexComponent implements OnInit {
|
||||
url = `/user`;
|
||||
schema!: SFSchema;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
columns: STColumn[] = [];
|
||||
selectedIndex = 0;
|
||||
tabs = [
|
||||
{
|
||||
name: '合伙人统计',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
name: '渠道销售统计',
|
||||
value: '1'
|
||||
}
|
||||
]
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
|
||||
|
||||
add(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
<page-header-wrapper [title]="'客户明细'" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<div class="user-info border-1" nz-row>
|
||||
<div nz-col nzSpan="24" class="d-flex p-md">
|
||||
<img class="user-logo" [src]="detailInfo?.logo" />
|
||||
<div style="flex: 1;">
|
||||
<div>
|
||||
<h3>{{detailInfo?.company}}</h3>
|
||||
<div class="mb-sm">
|
||||
<span class="letf-box text-grey-dark">{{detailInfo?.code}}</span>
|
||||
<span class="mr-xs">{{detailInfo?.proxy}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="letf-box">添加时间:{{detailInfo?.createTime}}</span>
|
||||
<span>所属城市:{{detailInfo?.belongCity}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-md" nz-row>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"> </sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8">
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="search()">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
|
||||
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{x:'1500px'}"
|
||||
[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] }"></st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,11 @@
|
||||
:host {
|
||||
.user-logo {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.letf-box {
|
||||
display: inline-block;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerPartnerCustomDetailComponent } from './partner-custom-detail.component';
|
||||
|
||||
describe('PartnerPartnerCustomDetailComponent', () => {
|
||||
let component: PartnerPartnerCustomDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerPartnerCustomDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PartnerPartnerCustomDetailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerPartnerCustomDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,163 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-partner-custom-detail',
|
||||
templateUrl: './partner-custom-detail.component.html',
|
||||
styleUrls: ['./partner-custom-detail.component.less']
|
||||
})
|
||||
export class PartnerPartnerCustomDetailComponent implements OnInit {
|
||||
schema: SFSchema = {};
|
||||
ui!: SFUISchema;
|
||||
detailInfo: any = {
|
||||
logo: './assets/images/user/logo.svg',
|
||||
company: '张三',
|
||||
code: '91440300357887492H',
|
||||
proxy: '企业合伙人',
|
||||
belongCity: '深圳、上海、北京',
|
||||
createTime: '2021-09-23 14:43:31'
|
||||
}
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
columns: STColumn[] = [
|
||||
{ title: '编号', index: 'no' },
|
||||
{ title: '调用次数', type: 'number', index: 'callNo' },
|
||||
{ title: '头像', type: 'img', width: '50px', index: 'avatar' },
|
||||
{ title: '时间', type: 'date', index: 'updatedAt' },
|
||||
{
|
||||
title: '',
|
||||
buttons: [
|
||||
// { text: '查看', click: (item: any) => `/form/${item.id}` },
|
||||
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
|
||||
]
|
||||
}
|
||||
];
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: BussinessStatisticsService, public router: Router) {
|
||||
|
||||
}
|
||||
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initST();
|
||||
this.initSF();
|
||||
}
|
||||
|
||||
resetSF() {
|
||||
this._$expand = false;
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
search() {
|
||||
this.st.load(1);
|
||||
}
|
||||
export() {
|
||||
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
abnormalCause: {
|
||||
title: '客户名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
abnormalCause1: {
|
||||
title: '客户状态',
|
||||
type: 'string',
|
||||
default: '',
|
||||
enum: [
|
||||
{
|
||||
label: '全部',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
label: '个人',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '企业',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
ui: {
|
||||
widget: 'select'
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
this.ui = {
|
||||
'*': { spanLabelFixed: 100, grid: { span: 11, gutter: 4 } },
|
||||
};
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '客户名称', index: 'carNo', className: 'text-center', width: 150 },
|
||||
{ title: '客户状态', render: 'carModelLabel', className: 'text-center', width: 120 },
|
||||
{ title: '结算时间段', index: 'carNo', className: 'text-center', width: 200 },
|
||||
{ title: '本月交易数', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
|
||||
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
|
||||
{ title: '累计交易数', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 },
|
||||
{ title: '本月已结算订单', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 },
|
||||
{ title: '累计已结算订单', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 },
|
||||
{ title: '本月交易金额(元)', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 },
|
||||
{ title: '累计交易金额(元)', index: 'approvalStatus6', className: 'text-right', sort: true, type: 'currency', width: 180 },
|
||||
{ title: '本月已结算金额(元)', index: 'approvalStatus7', className: 'text-right', sort: true, type: 'currency', width: 200 },
|
||||
{ title: '累计已结算金额(元)', index: 'approvalStatus8', className: 'text-right', sort: true, type: 'currency', width: 200 },
|
||||
{ title: '本月已开票金额(元)', index: 'approvalStatus9', className: 'text-right', sort: true, type: 'currency', width: 200 },
|
||||
{ title: '累计已开票金额(元)', index: 'approvalStatus10', className: 'text-right', sort: true, type: 'currency', width: 200 },
|
||||
{ title: '本月申请开票金额(元)', index: 'approvalStatus11', className: 'text-right', sort: true, type: 'currency', width: 200 },
|
||||
{
|
||||
title: '操作',
|
||||
width: 150,
|
||||
buttons: [
|
||||
{
|
||||
text: '查看订单明细',
|
||||
click: (_record) => this.viewOrderDetail(_record)
|
||||
}
|
||||
]
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看订单明细
|
||||
* @param record 当前对象
|
||||
*/
|
||||
viewOrderDetail(record: any) {
|
||||
this.router.navigate([`/partner/business-statistics/partner/custom-order-detail/${record?.id}`])
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
<page-header-wrapper [title]="'客户明细'" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<div class="user-info border-1" nz-row>
|
||||
<div nz-col nzSpan="24" class="d-flex p-md">
|
||||
<img class="user-logo" [src]="detailInfo?.logo" />
|
||||
<div style="flex: 1;">
|
||||
<div>
|
||||
<h3>{{detailInfo?.company}}</h3>
|
||||
<div class="mb-sm">
|
||||
<span class="letf-box text-grey-dark">{{detailInfo?.code}}</span>
|
||||
<span class="mr-xs">{{detailInfo?.proxy}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="letf-box">添加时间:{{detailInfo?.createTime}}</span>
|
||||
<span c>所属城市:{{detailInfo?.belongCity}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-md" nz-row>
|
||||
<div nz-col [nzSpan]="18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"> </sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="6">
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="search()">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
|
||||
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{x:'1500px'}"
|
||||
[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] }"></st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,11 @@
|
||||
:host {
|
||||
.user-logo {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.letf-box {
|
||||
display: inline-block;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerPartnerCustomOrderDetailComponent } from './partner-custom-order-detail.component';
|
||||
|
||||
describe('PartnerPartnerCustomOrderDetailComponent', () => {
|
||||
let component: PartnerPartnerCustomOrderDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerPartnerCustomOrderDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PartnerPartnerCustomOrderDetailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerPartnerCustomOrderDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,162 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-partner-custom-order-detail',
|
||||
templateUrl: './partner-custom-order-detail.component.html',
|
||||
styleUrls: ['./partner-custom-order-detail.component.less']
|
||||
})
|
||||
export class PartnerPartnerCustomOrderDetailComponent implements OnInit {
|
||||
schema: SFSchema = {};
|
||||
ui!: SFUISchema;
|
||||
detailInfo: any = {
|
||||
logo: './assets/images/user/logo.svg',
|
||||
company: '张三',
|
||||
code: '91440300357887492H',
|
||||
proxy: '企业合伙人',
|
||||
belongCity: '深圳、上海、北京',
|
||||
createTime: '2021-09-23 14:43:31'
|
||||
}
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: BussinessStatisticsService) {
|
||||
|
||||
}
|
||||
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initST();
|
||||
this.initSF();
|
||||
}
|
||||
|
||||
resetSF() {
|
||||
this._$expand = false;
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
search() {
|
||||
this.st.load(1);
|
||||
}
|
||||
export() {
|
||||
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
abnormalCause: {
|
||||
title: '订单号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
abnormalCause1: {
|
||||
title: '订单状态',
|
||||
type: 'string',
|
||||
default: '',
|
||||
enum: [
|
||||
{
|
||||
label: '全部',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
label: '个人',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '企业',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
ui: {
|
||||
widget: 'select'
|
||||
},
|
||||
},
|
||||
abnormalCause2: {
|
||||
title: '开票状态',
|
||||
type: 'string',
|
||||
default: '',
|
||||
enum: [
|
||||
{
|
||||
label: '全部',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
label: '个人',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '企业',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
ui: {
|
||||
widget: 'select'
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
this.ui = {
|
||||
'*': { spanLabelFixed: 100, grid: { span: 7, gutter: 4 } },
|
||||
};
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '订单号', index: 'carNo', className: 'text-center', width: 150 },
|
||||
{ title: '订单状态', render: 'carModelLabel', className: 'text-center', width: 120 },
|
||||
{ title: '订单金额(元)', index: 'carNo', className: 'text-center', width: 200 },
|
||||
{ title: '实际付款金额(元)', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
|
||||
{ title: '客户附加费率', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
|
||||
{ title: '预估收益(元)', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 },
|
||||
{ title: '开票状态', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 },
|
||||
{ title: '开票金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 },
|
||||
{ title: '下单时间', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 },
|
||||
{
|
||||
title: '操作',
|
||||
width: 150,
|
||||
buttons: [
|
||||
{
|
||||
text: '查看订单详情',
|
||||
click: (_record) => this.viewOrderDetail(_record)
|
||||
}
|
||||
]
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
viewOrderDetail(record: any) {
|
||||
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
<page-header-wrapper [title]="'客户明细'" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<div class="user-info border-1" nz-row>
|
||||
<div nz-col nzSpan="24" class="d-flex p-md">
|
||||
<img class="user-logo" [src]="detailInfo?.logo" />
|
||||
<div style="flex: 1;">
|
||||
<div>
|
||||
<h3>{{detailInfo?.company}}</h3>
|
||||
<div class="mb-sm">
|
||||
<span class="letf-box text-grey-dark">{{detailInfo?.code}}</span>
|
||||
<span class="mr-xs">{{detailInfo?.proxy}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="letf-box">添加时间:{{detailInfo?.createTime}}</span>
|
||||
<span c>所属城市:{{detailInfo?.belongCity}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-md" nzGutter="8" nz-row>
|
||||
<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" [nzLoading]="service.http.loading"
|
||||
(click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
|
||||
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{x:'1500px'}"
|
||||
[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] }"></st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,11 @@
|
||||
:host {
|
||||
.user-logo {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.letf-box {
|
||||
display: inline-block;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerPartnerOrderDetailComponent } from './partner-order-detail.component';
|
||||
|
||||
describe('PartnerPartnerOrderDetailComponent', () => {
|
||||
let component: PartnerPartnerOrderDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerPartnerOrderDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PartnerPartnerOrderDetailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerPartnerOrderDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,174 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-partner-order-detail',
|
||||
templateUrl: './partner-order-detail.component.html',
|
||||
styleUrls: ['./partner-order-detail.component.less']
|
||||
})
|
||||
export class PartnerPartnerOrderDetailComponent implements OnInit {
|
||||
schema: SFSchema = {};
|
||||
ui!: SFUISchema;
|
||||
detailInfo: any = {
|
||||
logo: './assets/images/user/logo.svg',
|
||||
company: '张三',
|
||||
code: '91440300357887492H',
|
||||
proxy: '企业合伙人',
|
||||
belongCity: '深圳、上海、北京',
|
||||
createTime: '2021-09-23 14:43:31'
|
||||
}
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: BussinessStatisticsService) {
|
||||
|
||||
}
|
||||
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initST();
|
||||
this.initSF();
|
||||
}
|
||||
|
||||
resetSF() {
|
||||
this._$expand = false;
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
search() {
|
||||
this.st.load(1);
|
||||
}
|
||||
export() {
|
||||
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
abnormalCause: {
|
||||
title: '订单号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
abnormalCause1: {
|
||||
title: '订单状态',
|
||||
type: 'string',
|
||||
default: '',
|
||||
enum: [
|
||||
{
|
||||
label: '全部',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
label: '个人',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '企业',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
ui: {
|
||||
widget: 'select'
|
||||
},
|
||||
},
|
||||
abnormalCause2: {
|
||||
title: '开票状态',
|
||||
type: 'string',
|
||||
default: '',
|
||||
enum: [
|
||||
{
|
||||
label: '全部',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
label: '个人',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '企业',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
ui: {
|
||||
widget: 'select'
|
||||
},
|
||||
},
|
||||
abnormalCause3: {
|
||||
title: '客户名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
this.ui = {
|
||||
'*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } },
|
||||
};
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '订单号', index: 'carNo', className: 'text-center', width: 150 },
|
||||
{ title: '订单状态', render: 'carModelLabel', className: 'text-center', width: 120 },
|
||||
{ title: '订单金额(元)', index: 'carNo', className: 'text-center', width: 200 },
|
||||
{ title: '实际付款金额(元)', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
|
||||
{ title: '客户附加费率', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
|
||||
{ title: '预估收益(元)', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 },
|
||||
{ title: '开票状态', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 },
|
||||
{ title: '开票金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 },
|
||||
{ title: '下单时间', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 },
|
||||
{
|
||||
title: '操作',
|
||||
width: 150,
|
||||
buttons: [
|
||||
{
|
||||
text: '查看订单详情',
|
||||
click: (_record) => this.viewOrderDetail(_record)
|
||||
}
|
||||
]
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
viewOrderDetail(record: any) {
|
||||
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
<nz-card>
|
||||
<sf mode="search" [schema]="schema" [ui]="ui" [button]="'none'" (formSubmit)="st.load(1)" (formReset)="resetSF()" #sf>
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
|
||||
(click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
</sf>
|
||||
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{ x: '1200px' }"
|
||||
[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] }"
|
||||
[loading]="service.http.loading">
|
||||
<ng-template st-row="approvalStatus" let-item>
|
||||
<a [routerLink]="'/partner/business-statistics/partner/custom-detail/'+item?.id">{{item.yskmoney}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="approvalStatus1" 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"
|
||||
[routerLink]="'/partner/business-statistics/partner/order-detail/'+item?.id">{{item.yskmoney | currency:'
|
||||
'}}</a>
|
||||
</ng-template>
|
||||
|
||||
<ng-template st-row="approvalStatus3" let-item>
|
||||
<div class="text-right">{{item.yskmoney | currency:' '}}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="approvalStatus4" let-item>
|
||||
<div class="text-right">{{item.armoney | currency:' '}}</div>
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerPartnerStatisticsComponent } from './partner-statistics.component';
|
||||
|
||||
describe('PartnerPartnerStatisticsComponent', () => {
|
||||
let component: PartnerPartnerStatisticsComponent;
|
||||
let fixture: ComponentFixture<PartnerPartnerStatisticsComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PartnerPartnerStatisticsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerPartnerStatisticsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,99 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-partner-statistics',
|
||||
templateUrl: './partner-statistics.component.html',
|
||||
})
|
||||
export class PartnerPartnerStatisticsComponent implements OnInit {
|
||||
url = `/user`;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
|
||||
constructor(public service: BussinessStatisticsService) { }
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
const params = { ...this.sf?.value };
|
||||
return params
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
abnormalCause: {
|
||||
title: '合伙人名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
abnormalCause1: {
|
||||
title: '类型',
|
||||
type: 'string',
|
||||
default: '',
|
||||
enum: [
|
||||
{
|
||||
label: '全部',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
label: '个人',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '企业',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
ui: {
|
||||
widget: 'select'
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 },
|
||||
{ title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 },
|
||||
{ title: '注册时间', index: 'carNo', className: 'text-center', width: 150 },
|
||||
{ title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
|
||||
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
|
||||
{ title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 },
|
||||
{ title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 },
|
||||
{ title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 },
|
||||
{ title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 },
|
||||
];
|
||||
}
|
||||
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
|
||||
export() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
<page-header-wrapper [title]="''" [content]="content">
|
||||
<ng-template #content>
|
||||
<div class="user-info border-1" nz-row>
|
||||
<div nz-col nzSpan="24" class="d-flex p-md">
|
||||
<img class="user-logo" [src]="detailInfo?.logo" />
|
||||
<div style="flex: 1;">
|
||||
<div>
|
||||
<h3>{{detailInfo?.name}}</h3>
|
||||
<div>
|
||||
<span class="mr-md">{{detailInfo?.phone}}</span>
|
||||
<span class="mr-xs">{{detailInfo?.proxy}}</span>
|
||||
<span>{{detailInfo?.level}}</span>
|
||||
</div>
|
||||
<p>添加时间:{{detailInfo?.createTime}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
|
||||
<st #st [data]="url" [columns]="columns"></st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerSaleCustomDetailComponent } from './sale-custom-detail.component';
|
||||
|
||||
describe('PartnerSaleCustomDetailComponent', () => {
|
||||
let component: PartnerSaleCustomDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerSaleCustomDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PartnerSaleCustomDetailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerSaleCustomDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,53 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFSchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-sale-custom-detail',
|
||||
templateUrl: './sale-custom-detail.component.html',
|
||||
})
|
||||
export class PartnerSaleCustomDetailComponent implements OnInit {
|
||||
url = `/user`;
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
no: {
|
||||
type: 'string',
|
||||
title: '编号'
|
||||
}
|
||||
}
|
||||
};
|
||||
detailInfo: any = {
|
||||
logo: './assets/images/user/logo.svg',
|
||||
name: '张三',
|
||||
phone: '1399999999',
|
||||
proxy: '城市代理',
|
||||
level: '二级',
|
||||
createTime: '添加时间'
|
||||
}
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
columns: STColumn[] = [
|
||||
{ title: '编号', index: 'no' },
|
||||
{ title: '调用次数', type: 'number', index: 'callNo' },
|
||||
{ title: '头像', type: 'img', width: '50px', index: 'avatar' },
|
||||
{ title: '时间', type: 'date', index: 'updatedAt' },
|
||||
{
|
||||
title: '',
|
||||
buttons: [
|
||||
// { text: '查看', click: (item: any) => `/form/${item.id}` },
|
||||
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
constructor(private http: _HttpClient, private modal: ModalHelper) { }
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<page-header [action]="phActionTpl">
|
||||
<ng-template #phActionTpl>
|
||||
<button (click)="add()" nz-button nzType="primary">新建</button>
|
||||
</ng-template>
|
||||
</page-header>
|
||||
<nz-card>
|
||||
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
|
||||
<st #st [data]="url" [columns]="columns"></st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerSalePartnerDetailComponent } from './sale-partner-detail.component';
|
||||
|
||||
describe('PartnerSalePartnerDetailComponent', () => {
|
||||
let component: PartnerSalePartnerDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerSalePartnerDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PartnerSalePartnerDetailComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerSalePartnerDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,45 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFSchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-sale-partner-detail',
|
||||
templateUrl: './sale-partner-detail.component.html',
|
||||
})
|
||||
export class PartnerSalePartnerDetailComponent implements OnInit {
|
||||
url = `/user`;
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
no: {
|
||||
type: 'string',
|
||||
title: '编号'
|
||||
}
|
||||
}
|
||||
};
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
columns: STColumn[] = [
|
||||
{ title: '编号', index: 'no' },
|
||||
{ title: '调用次数', type: 'number', index: 'callNo' },
|
||||
{ title: '头像', type: 'img', width: '50px', index: 'avatar' },
|
||||
{ title: '时间', type: 'date', index: 'updatedAt' },
|
||||
{
|
||||
title: '',
|
||||
buttons: [
|
||||
// { text: '查看', click: (item: any) => `/form/${item.id}` },
|
||||
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
constructor(private http: _HttpClient, private modal: ModalHelper) { }
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
<nz-card>
|
||||
<sf mode="search" [schema]="schema" [button]="'none'" #sf>
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
|
||||
(click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
</sf>
|
||||
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{ x: '1200px' }"
|
||||
[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] }"
|
||||
[loading]="service.http.loading">
|
||||
<ng-template st-row="approvalStatus" let-item>
|
||||
<a [routerLink]="'/'">{{item.yskmoney | currency:' ':false:'1.0-2'}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="approvalStatus1" let-item>
|
||||
<div>{{item.approvalStatus1 | currency:' '}}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="approvalStatus2" let-item>
|
||||
<div class="text-right">{{item.approvalStatus1 | currency:' '}}</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template st-row="approvalStatus3" let-item>
|
||||
<div class="text-right">{{item.yskmoney | currency:' '}}</div>
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerSaleStatisticsComponent } from './sale-statistics.component';
|
||||
|
||||
describe('PartnerSaleStatisticsComponent', () => {
|
||||
let component: PartnerSaleStatisticsComponent;
|
||||
let fixture: ComponentFixture<PartnerSaleStatisticsComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PartnerSaleStatisticsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerSaleStatisticsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,79 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { BussinessStatisticsService } from '../../services/bussiness-statistics.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-sale-statistics',
|
||||
templateUrl: './sale-statistics.component.html',
|
||||
})
|
||||
export class PartnerSaleStatisticsComponent implements OnInit {
|
||||
url = `/user`;
|
||||
schema!: SFSchema;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
ui!: SFUISchema;
|
||||
|
||||
constructor(public service: BussinessStatisticsService) { }
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
const params = { ...this.sf?.value };
|
||||
return params
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
abnormalCause: {
|
||||
title: '渠道销售姓名',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
abnormalCause1: {
|
||||
title: '手机号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 8 } } };
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '联系人', index: 'carNo', className: 'text-center' },
|
||||
{ title: '手机号', render: 'carModelLabel', className: 'text-center' },
|
||||
{ title: '添加时间', index: 'carNo', className: 'text-center' },
|
||||
{ title: '本月新增客户', render: 'approvalStatus', className: 'text-center', sort: true },
|
||||
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true },
|
||||
{ title: '本月新增合伙人', render: 'approvalStatus1', className: 'text-center', sort: true },
|
||||
{ title: '合伙人总数', render: 'approvalStatus1', className: 'text-center', sort: true },
|
||||
{ title: '本月已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true },
|
||||
{ title: '累计已结算金额(元)', render: 'approvalStatus3', className: 'text-right', sort: true },
|
||||
];
|
||||
}
|
||||
export() {
|
||||
|
||||
}
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class BussinessStatisticsService extends BaseService {
|
||||
|
||||
$api_get_partner_statistics_page = `/api/fcc/ficoBrmH/list/page`;
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'" [formData]="i">
|
||||
</sf>
|
||||
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="default" (click)="close()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="save()">确认</button>
|
||||
</div>
|
||||
@ -0,0 +1,145 @@
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SFAutoCompleteWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { AmapPoiPickerComponent } from 'src/app/shared/components/amap';
|
||||
import { ChannelSalesService } from '../../services/channel-sales.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-channel-sales-edit',
|
||||
templateUrl: './edit.component.html'
|
||||
})
|
||||
export class ParterChannelSalesEditComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
i: any;
|
||||
type: any;
|
||||
|
||||
constructor(
|
||||
public http: _HttpClient,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private route: ActivatedRoute,
|
||||
private modalService: NzModalService,
|
||||
public service: ChannelSalesService,
|
||||
private modalRef: NzModalRef
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: { hidden: true }
|
||||
},
|
||||
name: {
|
||||
title: '渠道销售姓名',
|
||||
type: 'string',
|
||||
maxLength: 12,
|
||||
ui: {
|
||||
placeholder:'请输入'
|
||||
}
|
||||
},
|
||||
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',
|
||||
title: '授权登录运营后台',
|
||||
enum: [
|
||||
{ label: '否', value: '0' },
|
||||
{ label: '是', value: '1' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'radio',
|
||||
} as SFRadioWidgetSchema,
|
||||
default: '0',
|
||||
},
|
||||
roleIds: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '授权角色',
|
||||
mode: 'multiple',
|
||||
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' }
|
||||
},
|
||||
},
|
||||
remark: {
|
||||
type: 'string',
|
||||
title: '备注',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 },
|
||||
placeholder:'请输入50字符'
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['name', 'phoneNumber', 'employeeVO', 'roleIds', 'remark']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 150,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$isAuthorization:{ grid: { span: 12 }},
|
||||
$roleIds:{ spanLabelFixed: 10, grid: { span: 12 }},
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
save() {
|
||||
this.sf.validator({ emitError: true });
|
||||
if(!this.sf.valid) return;
|
||||
this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => {
|
||||
if (res) {
|
||||
this.modalRef.destroy(true);
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
<nz-card>
|
||||
<!-- 搜索区 -->
|
||||
<sf
|
||||
#sf
|
||||
[ui]="ui"
|
||||
[schema]="schema"
|
||||
[mode]="'search'"
|
||||
(formSubmit)="st?.load(1)"
|
||||
(formReset)="resetSF()"
|
||||
></sf>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<button nz-button nzType="primary" style="margin-bottom: 24px" (click)="add()"><i nz-icon nzType="plus"></i>新增</button>
|
||||
<!-- 数据列表 -->
|
||||
<st
|
||||
#st
|
||||
[data]="service.$api_getPage"
|
||||
[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: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
>
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,175 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { processSingleSort } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ChannelSalesService } from '../../services/channel-sales.service';
|
||||
import { ParterChannelSalesEditComponent } from '../edit/edit.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-channel-sales-list',
|
||||
templateUrl: './list.component.html'
|
||||
})
|
||||
export class ParterChannelSalesListComponent implements OnInit {
|
||||
schema: SFSchema = {};
|
||||
columns!: STColumn[];
|
||||
ui!: SFUISchema;
|
||||
@ViewChild('st', { static: false })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
spuStatus = '1';
|
||||
|
||||
data=[{name1:1111}]
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: ChannelSalesService,
|
||||
private modalService: NzModalService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string',
|
||||
title: '销售渠道姓名'
|
||||
},
|
||||
telephone: {
|
||||
type: 'string',
|
||||
title: '手机号'
|
||||
},
|
||||
}
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
grid: { span: 8, gutter: 4 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initST() {
|
||||
this.columns = [
|
||||
{
|
||||
title: '销售渠道姓名',
|
||||
index: 'name'
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
index: 'telephone'
|
||||
},
|
||||
{
|
||||
title: '所属组织',
|
||||
index: 'organLable'
|
||||
},
|
||||
{
|
||||
title: '职级',
|
||||
index: 'station'
|
||||
},
|
||||
{
|
||||
title: '等级',
|
||||
index: 'postLevel'
|
||||
},
|
||||
{
|
||||
title: '省市',
|
||||
index: 'residencePlace'
|
||||
},
|
||||
{
|
||||
title: '邀请码',
|
||||
index: 'inviteCode'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '编辑',
|
||||
click: (_record, _modal, _instance) => this.edit(_record),
|
||||
},
|
||||
{
|
||||
text: '查看',
|
||||
click: (_record, _modal, _instance) => this.view(_record),
|
||||
},
|
||||
{
|
||||
text: '冻结',
|
||||
click: (_record, _modal, _instance) => this.stop(_record.id),
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
add() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzWidth:600,
|
||||
nzTitle: '新增',
|
||||
nzContent: ParterChannelSalesEditComponent,
|
||||
nzComponentParams: { type: this.spuStatus }
|
||||
});
|
||||
modalRef.afterClose.subscribe(res => {
|
||||
if (res) {
|
||||
this.st.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑
|
||||
edit(record: STData) {
|
||||
const modalRef = this.modalService.create({
|
||||
nzWidth:600,
|
||||
nzTitle: '编辑',
|
||||
nzContent: ParterChannelSalesEditComponent,
|
||||
nzComponentParams: { i: record, type: this.spuStatus }
|
||||
});
|
||||
modalRef.afterClose.subscribe(res => {
|
||||
if (res) {
|
||||
this.st.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑
|
||||
view(record: STData) {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '查看',
|
||||
nzContent: ParterChannelSalesEditComponent,
|
||||
nzComponentParams: { i: record }
|
||||
});
|
||||
}
|
||||
|
||||
stop(id: any) {
|
||||
this.modalService.confirm({
|
||||
nzTitle: '<i>冻结确认</i>',
|
||||
nzContent: `<b>确定冻结该账号吗?</br>`,
|
||||
// nzOnOk: () =>
|
||||
// this.service.request('', '').subscribe(res => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('冻结成功!');
|
||||
// this.st.reload();
|
||||
// }
|
||||
// })
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
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) {
|
||||
super(injector);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'" [formData]="i">
|
||||
</sf>
|
||||
<div style="font-size: 8px;">
|
||||
结算起算日:指给合伙人结算佣金的起算时间,更换合伙人,该日期是当前合伙人的结算起算日,原合伙人的结算结束时间则为此日期的前一天
|
||||
</div>
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="default" (click)="close()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="save()">确认</button>
|
||||
</div>
|
||||
@ -0,0 +1,98 @@
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { AmapPoiPickerComponent } from 'src/app/shared/components/amap';
|
||||
import { ClaimAuditService } from '../../services/claim-audit.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-claim-audit-channel-approve',
|
||||
templateUrl: './channel-approve.component.html'
|
||||
})
|
||||
export class ParterClaimAuditListChannelApproveComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
i: any;
|
||||
type: any;
|
||||
|
||||
constructor(
|
||||
public http: _HttpClient,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private route: ActivatedRoute,
|
||||
private modalService: NzModalService,
|
||||
public service: ClaimAuditService,
|
||||
private modalRef: NzModalRef
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: { hidden: true }
|
||||
},
|
||||
name1: {
|
||||
title: '合伙人(认领人)',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
} ,
|
||||
},
|
||||
name2: {
|
||||
title: '认领客户名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
} ,
|
||||
},
|
||||
data: {
|
||||
title: '结算起算日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
},
|
||||
name3: {
|
||||
type: 'string',
|
||||
title: '备注',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 },
|
||||
placeholder:'请不要超过50个字'
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['name3']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
save() {
|
||||
this.sf.validator({ emitError: true });
|
||||
if(!this.sf.valid) return;
|
||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.modalRef.destroy(true);
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
|
||||
<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-title>现渠道销售(提交人)</sv-title>
|
||||
<sv label="姓名"> </sv>
|
||||
<sv label="手机号"> </sv>
|
||||
<sv label="绑定时间"> </sv>
|
||||
<sv label="认领备注"> </sv>
|
||||
<sv label="提交时间"> </sv>
|
||||
</sv-container>
|
||||
</div>
|
||||
</div>
|
||||
<nz-divider></nz-divider>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sv-container col="1" labelWidth="120">
|
||||
<sv-title>原渠道销售</sv-title>
|
||||
<sv label="姓名"> </sv>
|
||||
<sv label="手机号"> </sv>
|
||||
<sv label="绑定时间"> </sv>
|
||||
</sv-container>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card nzTitle="操作日志">
|
||||
<st #st [data]="data" [columns]="columns"></st>
|
||||
</nz-card>
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
:host {
|
||||
.head-box {
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
padding: 8px;
|
||||
}
|
||||
.right-h{
|
||||
font-size: 16px;
|
||||
}
|
||||
.right-s{
|
||||
color: #7f7f7f;
|
||||
}
|
||||
|
||||
.left-rt {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.left-rb {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-top: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzCardComponent } from 'ng-zorro-antd/card';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import format from 'date-fns/format';
|
||||
|
||||
import { ClaimAuditService } from '../../services/claim-audit.service';
|
||||
import { ParterClaimAuditListChannelApproveComponent } from '../channel-approve/channel-approve.component';
|
||||
import { ParterClaimAuditListChannelRejectComponent } from '../channel-reject/channel-reject.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-claim-audit-channel-detail',
|
||||
templateUrl: './channel-detail.component.html',
|
||||
styleUrls: ['./channel-detail.component.less']
|
||||
})
|
||||
export class ParterClaimAuditListChannelDetailComponent implements OnInit {
|
||||
id = this.route.snapshot.queryParams.id;
|
||||
i: any;
|
||||
imges: any;
|
||||
isVisible = false;
|
||||
columns: STColumn[] = [
|
||||
{ title: '操作时间', index: 'id', width: 120 },
|
||||
{ title: '操作人', type: 'img', width: 120, },
|
||||
{ title: '操作人手机号', index: 'email', width: 120 },
|
||||
{ title: '操作页面', index: 'phone' },
|
||||
{ title: '操作内容', index: 'registered' }
|
||||
];
|
||||
|
||||
data=[{id:11111}]
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
private service: ClaimAuditService,
|
||||
private modalService: NzModalService,
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initData();
|
||||
}
|
||||
|
||||
initData() {
|
||||
// this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.i = res;
|
||||
//
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
approve() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '同意',
|
||||
nzWidth: 700,
|
||||
nzContent: ParterClaimAuditListChannelApproveComponent,
|
||||
nzComponentParams: {
|
||||
i: this.i
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
reject() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '拒绝',
|
||||
nzWidth: 700,
|
||||
nzContent: ParterClaimAuditListChannelRejectComponent,
|
||||
nzComponentParams: {
|
||||
i: this.i
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'" [formData]="i">
|
||||
</sf>
|
||||
<div style="font-size: 8px;">
|
||||
结算起算日:指给合伙人结算佣金的起算时间,更换合伙人,该日期是当前合伙人的结算起算日,原合伙人的结算结束时间则为此日期的前一天
|
||||
</div>
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="default" (click)="close()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="save()">确认</button>
|
||||
</div>
|
||||
@ -0,0 +1,98 @@
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { AmapPoiPickerComponent } from 'src/app/shared/components/amap';
|
||||
import { ClaimAuditService } from '../../services/claim-audit.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-claim-audit-channel-reject',
|
||||
templateUrl: './channel-reject.component.html'
|
||||
})
|
||||
export class ParterClaimAuditListChannelRejectComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
i: any;
|
||||
type: any;
|
||||
|
||||
constructor(
|
||||
public http: _HttpClient,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private route: ActivatedRoute,
|
||||
private modalService: NzModalService,
|
||||
public service: ClaimAuditService,
|
||||
private modalRef: NzModalRef
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: { hidden: true }
|
||||
},
|
||||
name1: {
|
||||
title: '合伙人(认领人)',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
} ,
|
||||
},
|
||||
name2: {
|
||||
title: '认领客户名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
} ,
|
||||
},
|
||||
data: {
|
||||
title: '结算起算日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
},
|
||||
name3: {
|
||||
type: 'string',
|
||||
title: '备注',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 },
|
||||
placeholder:'请不要超过50个字'
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['name3']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
save() {
|
||||
this.sf.validator({ emitError: true });
|
||||
if(!this.sf.valid) return;
|
||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.modalRef.destroy(true);
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
<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>
|
||||
<nz-tabset [nzSelectedIndex]="selectedIndex" (nzSelectChange) = "tabChange($event)">
|
||||
<nz-tab nzTitle="合伙人认领">
|
||||
<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-tab>
|
||||
<nz-tab nzTitle="渠道销售认领">
|
||||
<st
|
||||
#st2
|
||||
[data]="data"
|
||||
[columns]="columns2"
|
||||
[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-tab>
|
||||
</nz-tabset>
|
||||
|
||||
|
||||
</nz-card>
|
||||
@ -0,0 +1,230 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { processSingleSort } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ClaimAuditService } from '../../services/claim-audit.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-claim-audit-list',
|
||||
templateUrl: './list.component.html'
|
||||
})
|
||||
export class ParterClaimAuditListComponent implements OnInit {
|
||||
schema: SFSchema = {};
|
||||
columns1!: STColumn[];
|
||||
columns2!: STColumn[];
|
||||
@ViewChild('st1', { static: false })
|
||||
st1!: STComponent;
|
||||
@ViewChild('st2', { static: false })
|
||||
st2!: STComponent;
|
||||
ui!: SFUISchema;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
_$expand = false;
|
||||
selectedIndex = 0;
|
||||
|
||||
data=[{name1:1111}]
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: ClaimAuditService,
|
||||
private modalService: NzModalService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
}
|
||||
/**
|
||||
* 查询字段个数
|
||||
*/
|
||||
get queryFieldCount(): number {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
this.initST1();
|
||||
this.initST2();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
name: {
|
||||
type: 'string',
|
||||
title: '认领人'
|
||||
},
|
||||
name1: {
|
||||
type: 'string',
|
||||
title: '客户名称'
|
||||
},
|
||||
name2: {
|
||||
type: 'string',
|
||||
title: '平台审核状态'
|
||||
},
|
||||
name3: {
|
||||
type: 'string',
|
||||
title: '渠道销售状态',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
name4: {
|
||||
type: 'string',
|
||||
title: 'CRM状态',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
grid: { span: 8, gutter: 4 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initST1() {
|
||||
this.columns1 = [
|
||||
{
|
||||
title: '提交人',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '客户名称',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '认领备注',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '渠道销售审核状态',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: 'CRM状态',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '平台审核状态',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: 'CRM状态',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '提交时间',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '详情',
|
||||
click: (_record, _modal, _instance) => this.partnerView(_record),
|
||||
},
|
||||
{
|
||||
text: '审核',
|
||||
click: (_record, _modal, _instance) => this.partnerView(_record),
|
||||
},
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
initST2() {
|
||||
this.columns2 = [
|
||||
{
|
||||
title: '提交人',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '客户名称',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '认领备注',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: 'CRM状态',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '平台审核状态',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '提交时间',
|
||||
index: 'name1'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '详情',
|
||||
click: (_record, _modal, _instance) => this.channelView(_record),
|
||||
},
|
||||
{
|
||||
text: '审核',
|
||||
click: (_record, _modal, _instance) => this.channelView(_record),
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
partnerView(record: STData) {
|
||||
this.router.navigate(['/partner/claim-audit/partner-detail'], { queryParams: {} });
|
||||
}
|
||||
|
||||
channelView(record: STData) {
|
||||
this.router.navigate(['/partner/claim-audit/channel-detail'], { queryParams: {} });
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
}
|
||||
search() {
|
||||
// this.st1?.load(1);
|
||||
}
|
||||
|
||||
tabChange(index:any){
|
||||
console.log(index)
|
||||
switch (index) {
|
||||
case 0:
|
||||
this.initST1();
|
||||
break;
|
||||
case 1:
|
||||
this.initST2();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'" [formData]="i">
|
||||
</sf>
|
||||
<div style="font-size: 8px;">
|
||||
结算起算日:指给合伙人结算佣金的起算时间,更换合伙人,该日期是当前合伙人的结算起算日,原合伙人的结算结束时间则为此日期的前一天
|
||||
</div>
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="default" (click)="close()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="save()">确认</button>
|
||||
</div>
|
||||
@ -0,0 +1,98 @@
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { AmapPoiPickerComponent } from 'src/app/shared/components/amap';
|
||||
import { ClaimAuditService } from '../../services/claim-audit.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-claim-audit-partner-approve',
|
||||
templateUrl: './partner-approve.component.html'
|
||||
})
|
||||
export class ParterClaimAuditListPartnerApproveComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
i: any;
|
||||
type: any;
|
||||
|
||||
constructor(
|
||||
public http: _HttpClient,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private route: ActivatedRoute,
|
||||
private modalService: NzModalService,
|
||||
public service: ClaimAuditService,
|
||||
private modalRef: NzModalRef
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: { hidden: true }
|
||||
},
|
||||
name1: {
|
||||
title: '合伙人(认领人)',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
} ,
|
||||
},
|
||||
name2: {
|
||||
title: '认领客户名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
} ,
|
||||
},
|
||||
data: {
|
||||
title: '结算起算日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
},
|
||||
name3: {
|
||||
type: 'string',
|
||||
title: '备注',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 },
|
||||
placeholder:'请不要超过50个字'
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['name3']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
save() {
|
||||
this.sf.validator({ emitError: true });
|
||||
if(!this.sf.valid) return;
|
||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.modalRef.destroy(true);
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
|
||||
<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-title>现合伙人(提交人)</sv-title>
|
||||
<sv label="合伙人名称"> </sv>
|
||||
<sv label="手机号"> </sv>
|
||||
<sv label="绑定时间"> </sv>
|
||||
<sv label="结算时间段"> </sv>
|
||||
<sv label="认领备注"> </sv>
|
||||
<sv label="提交时间"> </sv>
|
||||
</sv-container>
|
||||
</div>
|
||||
<div nz-col nzSpan="12">
|
||||
<sv-container col="1" labelWidth="120">
|
||||
<sv-title>现渠道销售</sv-title>
|
||||
<sv label="姓名"> </sv>
|
||||
<sv label="手机号"> </sv>
|
||||
<sv label="绑定时间"> </sv>
|
||||
</sv-container>
|
||||
</div>
|
||||
</div>
|
||||
<nz-divider></nz-divider>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sv-container col="1" labelWidth="120">
|
||||
<sv-title>原合伙人</sv-title>
|
||||
<sv label="合伙人名称"> </sv>
|
||||
<sv label="管理员"> </sv>
|
||||
<sv label="绑定时间"> </sv>
|
||||
<sv label="结算时间段"> </sv>
|
||||
</sv-container>
|
||||
</div>
|
||||
<div nz-col nzSpan="12">
|
||||
<sv-container col="1" labelWidth="120">
|
||||
<sv-title>原渠道销售</sv-title>
|
||||
<sv label="姓名"> </sv>
|
||||
<sv label="手机号"> </sv>
|
||||
<sv label="绑定时间"> </sv>
|
||||
</sv-container>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card nzTitle="操作日志">
|
||||
<st #st [data]="data" [columns]="columns"></st>
|
||||
</nz-card>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzCardComponent } from 'ng-zorro-antd/card';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import format from 'date-fns/format';
|
||||
import { ClaimAuditService } from '../../services/claim-audit.service';
|
||||
import { ParterClaimAuditListPartnerRejectComponent } from '../partner-reject/partner-reject.component';
|
||||
import { ParterClaimAuditListPartnerApproveComponent } from '../partner-approve/partner-approve.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-claim-audit-partner-detail',
|
||||
templateUrl: './partner-detail.component.html',
|
||||
styleUrls: ['./partner-detail.component.less']
|
||||
})
|
||||
export class ParterClaimAuditListPartnerDetailComponent implements OnInit {
|
||||
id = this.route.snapshot.queryParams.id;
|
||||
i: any;
|
||||
imges: any;
|
||||
isVisible = false;
|
||||
columns: STColumn[] = [
|
||||
{ title: '操作时间', index: 'id', width: 120 },
|
||||
{ title: '操作人', type: 'img', width: 120, },
|
||||
{ title: '操作人手机号', index: 'email', width: 120 },
|
||||
{ title: '操作页面', index: 'phone' },
|
||||
{ title: '操作内容', index: 'registered' }
|
||||
];
|
||||
|
||||
data=[{id:11111}]
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
private service: ClaimAuditService,
|
||||
private modalService: NzModalService,
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initData();
|
||||
}
|
||||
|
||||
initData() {
|
||||
// this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.i = res;
|
||||
//
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
approve() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '同意',
|
||||
nzWidth: 700,
|
||||
nzContent: ParterClaimAuditListPartnerApproveComponent,
|
||||
nzComponentParams: {
|
||||
i: this.i
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
reject() {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '拒绝',
|
||||
nzWidth: 700,
|
||||
nzContent: ParterClaimAuditListPartnerRejectComponent,
|
||||
nzComponentParams: {
|
||||
i: this.i
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'" [formData]="i">
|
||||
</sf>
|
||||
<div style="font-size: 8px;">
|
||||
结算起算日:指给合伙人结算佣金的起算时间,更换合伙人,该日期是当前合伙人的结算起算日,原合伙人的结算结束时间则为此日期的前一天
|
||||
</div>
|
||||
<div *nzModalFooter>
|
||||
<button nz-button nzType="default" (click)="close()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="save()">确认</button>
|
||||
</div>
|
||||
@ -0,0 +1,98 @@
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { AmapPoiPickerComponent } from 'src/app/shared/components/amap';
|
||||
import { ClaimAuditService } from '../../services/claim-audit.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-claim-audit-partner-reject',
|
||||
templateUrl: './partner-reject.component.html'
|
||||
})
|
||||
export class ParterClaimAuditListPartnerRejectComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema!: SFSchema;
|
||||
ui!: SFUISchema;
|
||||
i: any;
|
||||
type: any;
|
||||
|
||||
constructor(
|
||||
public http: _HttpClient,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private route: ActivatedRoute,
|
||||
private modalService: NzModalService,
|
||||
public service: ClaimAuditService,
|
||||
private modalRef: NzModalRef
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: { hidden: true }
|
||||
},
|
||||
name1: {
|
||||
title: '合伙人(认领人)',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
} ,
|
||||
},
|
||||
name2: {
|
||||
title: '认领客户名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text',
|
||||
} ,
|
||||
},
|
||||
data: {
|
||||
title: '结算起算日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
},
|
||||
name3: {
|
||||
type: 'string',
|
||||
title: '备注',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 },
|
||||
placeholder:'请不要超过50个字'
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['name3']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
save() {
|
||||
this.sf.validator({ emitError: true });
|
||||
if(!this.sf.valid) return;
|
||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.modalRef.destroy(true);
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ClaimAuditService extends BaseService {
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
<!-- 页头 -->
|
||||
<page-header-wrapper [title]="''" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<div class="modal-header">
|
||||
<div class="modal-title" *ngIf="queryParams.type === 'add'">新增banner</div>
|
||||
<div class="modal-title" *ngIf="queryParams.type === 'edit'">编辑banner</div>
|
||||
<div class="modal-title" *ngIf="queryParams.type === 'view'">查看banner</div>
|
||||
</div>
|
||||
<sf #sf [schema]="schema" [ui]="ui" [button]="'none'" [formData]="detailData">
|
||||
</sf>
|
||||
<div class="modal-footer" *ngIf="queryParams.type !== 'view'">
|
||||
<button nz-button type="button" (click)="checkSort()" nzType="primary" [disabled]="validFalg">保存</button>
|
||||
<button nz-button type="button" (click)="goBack()">取消</button>
|
||||
</div>
|
||||
</nz-card>
|
||||
<!-- <nz-modal [(nzVisible)]="isVisible" nzTitle="The first Modal" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
|
||||
<baidu-map [inputAddress]="detailData.companyAddress" [inputPoint]="inputPoint" (outputPointAddress)="outputPointAddress($event)"></baidu-map>
|
||||
</nz-modal> -->
|
||||
@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { BannerComponentsAddComponent } from './add.component';
|
||||
|
||||
describe('BannerComponentsAddComponent', () => {
|
||||
let component: BannerComponentsAddComponent;
|
||||
let fixture: ComponentFixture<BannerComponentsAddComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ BannerComponentsAddComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BannerComponentsAddComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,241 @@
|
||||
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { EAEnvironmentService } from '@shared';
|
||||
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
||||
import format from 'date-fns/format';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { NzUploadFile } from 'ng-zorro-antd/upload';
|
||||
import { Observable, Observer, of } from 'rxjs';
|
||||
import { BannerService } from '../../services/banner.service';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
|
||||
@Component({
|
||||
selector: 'app-ad-components-add',
|
||||
templateUrl: './add.component.html',
|
||||
styleUrls: ['./add.less']
|
||||
})
|
||||
export class BannerComponentsAddComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
record: any = {};
|
||||
i: any;
|
||||
schema: SFSchema = {};
|
||||
contentListData = [];
|
||||
queryParams: any = {};
|
||||
oldTakeEffectTime = '';
|
||||
maxSort = 0;
|
||||
isVisible = false;
|
||||
validFalg = true;
|
||||
detailData: any = {
|
||||
advertisementContentDTOList: []
|
||||
};
|
||||
changeTimeFlag = false;
|
||||
currentIndex = 0;
|
||||
addFlag = true;
|
||||
addId = 1;
|
||||
inputPoint: any = {
|
||||
lng: 0,
|
||||
lat: 0
|
||||
};
|
||||
today = new Date();
|
||||
navData: any = [];
|
||||
navigationName = '';
|
||||
ui: SFUISchema = {
|
||||
'*': {
|
||||
spanLabelFixed: 200,
|
||||
grid: { span: 24 },
|
||||
},
|
||||
};
|
||||
constructor(
|
||||
public msgSrv: NzMessageService,
|
||||
public http: _HttpClient,
|
||||
public service: BannerService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private envSrv: EAEnvironmentService,
|
||||
) { }
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
this.queryParams = this.route.snapshot.queryParams;
|
||||
if (this.queryParams.type !== 'add') {
|
||||
this.initDetailData();
|
||||
}
|
||||
this.initSF();
|
||||
}
|
||||
initDetailData() {
|
||||
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string',
|
||||
title: 'banner名称',
|
||||
maxLength: 10,
|
||||
ui: {
|
||||
showRequired: true,
|
||||
placeholder: '请不要超过10个字',
|
||||
}
|
||||
},
|
||||
licensePhotoWatermark: {
|
||||
type: 'string',
|
||||
title: 'banner图',
|
||||
ui: {
|
||||
action: apiConf.fileUpload,
|
||||
accept: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 700px * 286px)。',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId,
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
this.detailData.enterpriseBaseDTO.licensePhoto = args.file.response.data.fullFilePath
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt4M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt4M) {
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt4M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
previewFile: (file: NzUploadFile) => of(file.url),
|
||||
},
|
||||
},
|
||||
sortId: {
|
||||
type: 'string',
|
||||
title: '顺序',
|
||||
ui: {
|
||||
showRequired: true,
|
||||
widget: '=',
|
||||
placeholder: '请输入0~99,数字越大,排序越靠前',
|
||||
serverSearch: true,
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
linkType: {
|
||||
type: 'string',
|
||||
title: '跳转路径',
|
||||
ui: {
|
||||
widget: 'radio',
|
||||
showRequired: true,
|
||||
} as SFRadioWidgetSchema,
|
||||
enum: [
|
||||
{ label: '文章ID', value: 1 },
|
||||
{ label: '分类ID', value: 2 },
|
||||
{ label: '自编辑', value: 3 },
|
||||
],
|
||||
},
|
||||
content: {
|
||||
type: 'string',
|
||||
title: '内容',
|
||||
ui: {
|
||||
widget: 'tinymce',
|
||||
loadingTip: 'loading...',
|
||||
config: {
|
||||
height: 450
|
||||
},
|
||||
visibleIf: { name5: (value: string) => value === '1' }
|
||||
},
|
||||
},
|
||||
},
|
||||
required: [],
|
||||
};
|
||||
if (this.queryParams.type === 'add'){
|
||||
setTimeout(() => {
|
||||
this.sf.setValue('/takeEffectType', 1);
|
||||
this.sf.setValue('/style', 1);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
get reqParams() {
|
||||
return {};
|
||||
}
|
||||
disabledDate = (current: Date): boolean => {
|
||||
// Can not select days before today and today
|
||||
return differenceInCalendarDays(current, this.today) < 0;
|
||||
}
|
||||
changeTime(){
|
||||
this.changeTimeFlag = true;
|
||||
}
|
||||
|
||||
|
||||
checkSort(){
|
||||
const params: any = {
|
||||
navigationId: this.sf?.value.navigationId,
|
||||
sortId: this.sf?.value.sortId,
|
||||
takeEffectType: this.sf?.value.takeEffectType,
|
||||
};
|
||||
if (this.queryParams.id !== '0'){
|
||||
params.advertisementId = this.queryParams.id;
|
||||
}
|
||||
if (this.sf.value.takeEffectType === 2){
|
||||
if (this.changeTimeFlag) {
|
||||
params.takeEffectTime = format(this.detailData.takeEffectTime, 'yyyy-MM-dd HH:mm');
|
||||
} else {
|
||||
params.takeEffectTime = this.detailData.takeEffectTime;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
save() {
|
||||
const params: any = {
|
||||
...this.sf?.value,
|
||||
latitude: this.inputPoint.lat,
|
||||
longitude: this.inputPoint.lng,
|
||||
id: this.queryParams.id
|
||||
};
|
||||
this.detailData.advertisementContentDTOList.forEach((item: any) => {
|
||||
delete item.addId;
|
||||
});
|
||||
if (this.queryParams.type === 'add') {
|
||||
delete params.id;
|
||||
}
|
||||
if (this.sf.value.takeEffectType === 2){
|
||||
if (this.changeTimeFlag) {
|
||||
params.takeEffectTime = format(this.detailData.takeEffectTime, 'yyyy-MM-dd HH:mm');
|
||||
} else {
|
||||
params.takeEffectTime = this.detailData.takeEffectTime;
|
||||
}
|
||||
} else {
|
||||
delete params.takeEffectTime;
|
||||
}
|
||||
this.service.request(this.service.$api_add_one, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('保存成功');
|
||||
this.router.navigate(['../list'], {relativeTo: this.route});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
gotoMap() {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isVisible = false;
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
119
src/app/routes/partner/knowledge/banner/components/add/add.less
Normal file
119
src/app/routes/partner/knowledge/banner/components/add/add.less
Normal file
@ -0,0 +1,119 @@
|
||||
:host {
|
||||
.styleBox {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
.imgBox {
|
||||
position: relative;
|
||||
width: 200px;
|
||||
padding: 6px 0;
|
||||
text-align: center;
|
||||
border: solid 1px #eee;
|
||||
.leftBox,
|
||||
.rightBox {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
img {
|
||||
width: 170px;
|
||||
height: 40px;
|
||||
}
|
||||
.leftBox {
|
||||
left: 3px;
|
||||
}
|
||||
.rightBox {
|
||||
right: 3px;
|
||||
}
|
||||
}
|
||||
.imgBox_two {
|
||||
width: 200px;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
border: solid 1px #eee;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
.imgBox_three {
|
||||
width: 200px;
|
||||
padding: 6px 0;
|
||||
text-align: center;
|
||||
border: solid 1px #eee;
|
||||
img {
|
||||
width: 25%;
|
||||
height: 40px;
|
||||
margin: 0 6% 0 0;
|
||||
&:first-child {
|
||||
margin: 0 6%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.imgBox_four {
|
||||
width: 200px;
|
||||
padding: 6px 0;
|
||||
text-align: center;
|
||||
border: solid 1px #eee;
|
||||
img {
|
||||
width: 22%;
|
||||
height: 40px;
|
||||
margin: 0 2% 0 0;
|
||||
&:first-child {
|
||||
margin: 0 2%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.imgBox_one {
|
||||
width: 60px;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
border: solid 1px #eee;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
.imgBox_info {
|
||||
width: 200px;
|
||||
padding: 6px;
|
||||
overflow: hidden;
|
||||
border: solid 1px #eee;
|
||||
.title {
|
||||
width: 100%;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
.infoBox {
|
||||
.name {
|
||||
line-height: 28px;
|
||||
}
|
||||
.map {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
img {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.hint {
|
||||
margin: 0 0 0 10px;
|
||||
color: #f00;
|
||||
}
|
||||
.addBtn {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
}
|
||||
.overflowText {
|
||||
display: -webkit-box;
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
text-align: left;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 1;
|
||||
line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user