edit
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
<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" [nzLoading]="service.http.loading" (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>
|
||||
<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-tabset>
|
||||
|
||||
<st #st [data]="service.$api_get_refund_record_page" [columns]="columns" [req]="{ process: beforeReq }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px' }">
|
||||
<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,292 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-refund-record',
|
||||
templateUrl: './refund-record.component.html',
|
||||
styleUrls: ['../../../commom/less/box.less']
|
||||
})
|
||||
export class RefundRecordComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
@ViewChild('auditModal', { static: false })
|
||||
auditModal!: any;
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
_$expand = false;
|
||||
refundStatus: any = '';
|
||||
|
||||
msg = '';
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { refundStatus: this.refundStatus || null });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
createTime: {
|
||||
start: this.sf.value.createTime?.[0] || '',
|
||||
end: this.sf.value.createTime?.[1] || ''
|
||||
}
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
changeRefundStatus(status?: string) {
|
||||
this.refundStatus = status || null;
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
auditAction(item?: any) {
|
||||
this.msg = '';
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '审核',
|
||||
nzContent: this.auditModal,
|
||||
nzFooter: [
|
||||
{
|
||||
label: '拒绝',
|
||||
type: 'default',
|
||||
onClick: () => {
|
||||
this.service
|
||||
.request(this.service.$api_disagree_refund_record, {
|
||||
applicationId: item.id,
|
||||
remark: this.msg
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('审核拒绝成功');
|
||||
modal.destroy(true);
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '通过',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
this.service
|
||||
.request(this.service.$api_agree_refund_record, {
|
||||
applicationId: item.id,
|
||||
remark: this.msg
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('审核通过成功');
|
||||
modal.destroy(true);
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
reApply(item: any) {
|
||||
const modal = this.nzModalService.warning({
|
||||
nzTitle: '确定要重新发起退款?',
|
||||
nzOnOk: () => {
|
||||
this.service
|
||||
.request(this.service.$api_rebulid_refund_record, {
|
||||
applicationId: item.id
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('发起成功');
|
||||
modal.destroy(true);
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
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
|
||||
}
|
||||
},
|
||||
orderRefundCode: {
|
||||
type: 'string',
|
||||
title: '退款单号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
refundType: {
|
||||
type: 'string',
|
||||
title: '退款类型',
|
||||
enum: [
|
||||
{ value: '1', label: '平台退款货主' },
|
||||
{ value: '2', label: '司机退款平' },
|
||||
{ value: '3', label: '车队长退款司机' },
|
||||
{ value: '4', label: '车队长退款平台' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
shipperId: {
|
||||
type: 'string',
|
||||
title: '货主',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
billCode: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getEnterpriseProject(),
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
resourceId: {
|
||||
type: 'string',
|
||||
title: '货源号',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
refundExecuteTime: {
|
||||
title: '退款时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
nzShowTime: true
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
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: 'orderRefundCode', width: 180 },
|
||||
{ title: '退款类型', index: 'refundType', width: 120 },
|
||||
{
|
||||
title: '退款金额',
|
||||
render: 'refundAmount',
|
||||
width: 120,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.refundAmount }) }
|
||||
},
|
||||
{ title: '退款时间', index: 'applyTime', width: 100 },
|
||||
{ title: '货主', index: 'shipperId', width: 100 },
|
||||
{ title: '所属项目', index: 'enterpriseProjectName', width: 140 },
|
||||
{ title: '支付单', index: 'billRefundPaymentVOS.paymentApplicationCode', width: 100 },
|
||||
{ title: '订单号', index: 'billCode', width: 100 },
|
||||
{ title: '货源号', index: 'resourceCode', width: 100 },
|
||||
{ title: '司机', render: ' driver', width: 100 },
|
||||
{ title: '收款人', render: 'captain', width: 100 },
|
||||
{ title: '网络货运人', render: 'ltdName', width: 180 },
|
||||
{ title: '银行类型', index: 'bankTypeLabel', width: 100 },
|
||||
{ title: '退款原因', index: 'rejectionCause', width: 150 },
|
||||
{ title: '失败原因', index: 'failCause', width: 150 },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '110px',
|
||||
buttons: [
|
||||
{
|
||||
text: '审核',
|
||||
iif: item => item.refundStatus === '1',
|
||||
click: item => this.auditAction(item)
|
||||
},
|
||||
{
|
||||
text: '重新发起',
|
||||
click: item => this.reApply(item)
|
||||
}
|
||||
// {
|
||||
// text: '关闭',
|
||||
// click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/' + item.id])
|
||||
// }
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
:host::ng-deep {
|
||||
.search-box {
|
||||
.ant-card-body {
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box {
|
||||
.ant-card-body {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
nz-range-picker {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ant-tabs-tab-btn {
|
||||
padding-right: 16px;
|
||||
padding-left : 16px;
|
||||
}
|
||||
|
||||
.text-truncate {
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.expend-options {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.expend-options {
|
||||
position : absolute;
|
||||
right : 0;
|
||||
bottom : 25px;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -8,7 +8,7 @@ import { FreightAccountService } from '../../services/freight-account.service';
|
||||
@Component({
|
||||
selector: 'app-withdrawals-record',
|
||||
templateUrl: './withdrawals-record.component.html',
|
||||
styleUrls: ['./withdrawals-record.component.less']
|
||||
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
|
||||
})
|
||||
export class WithdrawalsRecordComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
|
||||
@ -31,6 +31,7 @@ import { PlatformAccountComponent } from './components/platform-account/platform
|
||||
import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component';
|
||||
import { AdvanceCollectionComponent } from './components/advance-collection/advance-collection.component';
|
||||
import { AdvanceCollectionDetailComponent } from './components/advance-collection/advance-collection-detail/advance-collection-detail.component';
|
||||
import { RefundRecordComponent } from './components/refund-record/refund-record.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: 'freight-account', component: FreightAccountComponent, data: { guard: { ability: ['FINANCIAL-FREIGHT-ACOUNT-list'] } } },
|
||||
@ -42,6 +43,7 @@ const routes: Routes = [
|
||||
{ path: 'recharge-record', component: RechargeRecordComponent },
|
||||
{ path: 'withdrawals-record', component: WithdrawalsRecordComponent },
|
||||
{ path: 'withdrawals-record/detail/:id', component: WithdrawalsDetailComponent },
|
||||
{ path: 'refund-record', component: RefundRecordComponent },
|
||||
{ path: 'voucher-management', component: VoucherManagementComponent },
|
||||
{ path: 'voucher-management/detail/:id', component: VoucherDetailComponent },
|
||||
{ path: 'voucher-summary', component: VoucherSummaryComponent },
|
||||
|
||||
@ -34,6 +34,7 @@ import { PlatformAccountComponent } from './components/platform-account/platform
|
||||
import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component';
|
||||
import { AdvanceCollectionComponent } from './components/advance-collection/advance-collection.component';
|
||||
import { AdvanceCollectionDetailComponent } from './components/advance-collection/advance-collection-detail/advance-collection-detail.component';
|
||||
import { RefundRecordComponent } from './components/refund-record/refund-record.component';
|
||||
|
||||
const ROUTESCOMPONENTS = [
|
||||
FreightAccountComponent,
|
||||
@ -64,7 +65,8 @@ const ROUTESCOMPONENTS = [
|
||||
VoucherListComponent,
|
||||
ReceiptOrderDetailComponent,
|
||||
AdvanceCollectionComponent,
|
||||
AdvanceCollectionDetailComponent
|
||||
AdvanceCollectionDetailComponent,
|
||||
RefundRecordComponent
|
||||
];
|
||||
|
||||
const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, ClearingModalComponent];
|
||||
|
||||
@ -53,6 +53,15 @@ export class FreightAccountService extends ShipperBaseService {
|
||||
// 拒绝提现
|
||||
$api_disagree_refund = '/api/fcc/refundApplicationOBC/disagreeRefund';
|
||||
|
||||
// 查询订单退款申请表
|
||||
$api_get_refund_record_page = '/api/fcc/billRefundApplication/list/page';
|
||||
// 同意退款
|
||||
$api_agree_refund_record= '/api/fcc/billRefundApplication/agreeRefund';
|
||||
// 不同意退款
|
||||
$api_disagree_refund_record = '/api/fcc/billRefundApplication/disagreeRefund';
|
||||
// 重新发起
|
||||
$api_rebulid_refund_record = '/api/fcc/billRefundApplication/rebulid';
|
||||
|
||||
// 查询充值信息表
|
||||
$api_get_recharge_page = '/api/fcc/rechargeInfo/list/getPageByOperator';
|
||||
// 查询异常入金
|
||||
|
||||
@ -63,7 +63,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
afterRes = (data: any[], rawData?: any) => {
|
||||
console.log(data)
|
||||
return data.map(item => ({
|
||||
...item,
|
||||
disabled: item.auditStatus !== '1'
|
||||
@ -89,7 +88,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '请输入备注',
|
||||
widget: 'textarea',
|
||||
widget: 'textarea'
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -105,7 +104,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
|
||||
search() {
|
||||
this.st?.load(1);
|
||||
this.getGoodsSourceStatistical()
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
@ -200,7 +199,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
if (status === 2) {
|
||||
if (this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('未选择货源单!');
|
||||
return
|
||||
return;
|
||||
}
|
||||
let list: any[] = [];
|
||||
this.selectedRows.forEach(item => {
|
||||
@ -209,7 +208,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
this.auditID = list;
|
||||
this.auditMany = true;
|
||||
} else {
|
||||
this.auditID = value.id
|
||||
this.auditID = value.id;
|
||||
this.auditMany = false;
|
||||
}
|
||||
this.isVisible = true;
|
||||
@ -224,19 +223,19 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK(value: any) {
|
||||
console.log(this.sfFre.valid)
|
||||
console.log(this.sfFre.value)
|
||||
console.log(this.sfFre.valid);
|
||||
console.log(this.sfFre.value);
|
||||
if (this.selectedRows.length <= 0) {
|
||||
const params: any = {
|
||||
id: this.auditID,
|
||||
remarks: this.sfFre.value.remarks,
|
||||
}
|
||||
remarks: this.sfFre.value.remarks
|
||||
};
|
||||
if (value == 1) {
|
||||
params.auditStatus = 2
|
||||
params.auditStatus = 2;
|
||||
} else {
|
||||
params.auditStatus = 3
|
||||
params.auditStatus = 3;
|
||||
}
|
||||
console.log(params)
|
||||
console.log(params);
|
||||
this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('审核成功!');
|
||||
@ -244,18 +243,18 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
this.st?.reload();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
const params: any = {
|
||||
ids: this.auditID,
|
||||
remarks: this.sfFre.value.remarks,
|
||||
}
|
||||
remarks: this.sfFre.value.remarks
|
||||
};
|
||||
if (value == 1) {
|
||||
params.auditStatus = 2
|
||||
params.auditStatus = 2;
|
||||
} else {
|
||||
params.auditStatus = 3
|
||||
params.auditStatus = 3;
|
||||
}
|
||||
console.log(params)
|
||||
console.log(params);
|
||||
this.service.request(this.service.$api_batchGoodsResourceAudit, params).subscribe(res => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('审核成功!');
|
||||
@ -263,9 +262,8 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
this.st?.reload();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 跳转修改货源
|
||||
@ -317,7 +315,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
stayQuantity: 0
|
||||
};
|
||||
const params: any = Object.assign({}, this.reqParams || {});
|
||||
delete params.resourceStatus
|
||||
delete params.resourceStatus;
|
||||
this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 1, ...params }).subscribe(res => {
|
||||
if (res) {
|
||||
console.log(res);
|
||||
@ -396,7 +394,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
serviceType: {
|
||||
@ -422,8 +420,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
params: { dictKey: 'goodresource:audit:status' },
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
enterpriseInfoId: {
|
||||
@ -480,7 +477,8 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
title: '货主',
|
||||
index: 'shipperAppUserName',
|
||||
width: '180px',
|
||||
className: 'text-left' },
|
||||
className: 'text-left'
|
||||
},
|
||||
{
|
||||
title: '项目名称',
|
||||
index: 'enterpriseProjectName',
|
||||
@ -542,7 +540,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
title: '货源状态',
|
||||
className: 'text-left',
|
||||
index: 'resourceStatusLabel',
|
||||
width: '120px',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@ -574,13 +572,13 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
text: '货源审核',
|
||||
click: _record => this.audit(_record, 1),
|
||||
iif: item => item.auditStatus === '1',
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleBatchAudit'] },
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleBatchAudit'] }
|
||||
},
|
||||
{
|
||||
text: '修改货源',
|
||||
click: _record => this.amend(_record),
|
||||
iif: item => item.resourceStatus === '1',
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleModificationSupply'] },
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleModificationSupply'] }
|
||||
},
|
||||
// {
|
||||
// text: '修改运费',
|
||||
@ -591,18 +589,18 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
text: '取消货源',
|
||||
click: _record => this.cancleGoodsSource(_record),
|
||||
iif: item => item.resourceStatus === '1',
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleCancelSupply'] },
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleCancelSupply'] }
|
||||
},
|
||||
{
|
||||
text: '再下一单',
|
||||
click: _record => this.nextOrder(_record),
|
||||
acl: { ability: ['SUPPLY-INDEX-vehiclePlaceOrder'] },
|
||||
acl: { ability: ['SUPPLY-INDEX-vehiclePlaceOrder'] }
|
||||
},
|
||||
{
|
||||
text: '重新指派 ',
|
||||
click: _record => this.assignedCar(_record),
|
||||
iif: item => item.resourceStatus === '1' && item.serviceType === '2',
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleReassign'] },
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleReassign'] }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,166 +0,0 @@
|
||||
<nz-card>
|
||||
<div nz-row [nzGutter]="8">
|
||||
<div nz-col nzSpan="4">
|
||||
<ul nz-menu nzMode="inline" class="card-height">
|
||||
<li nz-menu-item [nzSelected]="idx === 0" (click)="changeType(idx)"
|
||||
*ngFor="let item of tabs; let idx = index">
|
||||
{{ item.name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div nz-col nzSpan="20" style="overflow: scroll">
|
||||
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===0 || selectedTab===1">
|
||||
<h2 style="font-weight: 800;">货主提现设置</h2>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="100">
|
||||
<se label="提现审核">
|
||||
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||
<label nz-radio [nzValue]="false" class="ml-xl">关闭</label>
|
||||
<label nz-radio [nzValue]="true" class="ml-xl">开启</label>
|
||||
</nz-radio-group>
|
||||
</se>
|
||||
<se label="审核时间" style="margin-bottom: 0;">
|
||||
<nz-radio-group [(ngModel)]="formDate.isEveryDay">
|
||||
<label nz-radio [nzValue]="false" class="ml-xl block-radio">全天</label>
|
||||
<label nz-radio [nzValue]="true" class="ml-xl block-radio">自定义</label>
|
||||
</nz-radio-group>
|
||||
</se>
|
||||
<se [col]="1">
|
||||
<nz-radio-group [(ngModel)]="formDate.isEveryWeek">
|
||||
<label nz-radio [nzValue]="false" class="ml-xxl block-radio">
|
||||
<div class="d-flex">
|
||||
每天
|
||||
<div class="ml-md" style="cursor:default">
|
||||
<p style="color: #1890ff;cursor: pointer;">添加时间段</p>
|
||||
<div class="mb-md">
|
||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="开始时间"></nz-time-picker>
|
||||
--
|
||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="结束时间"></nz-time-picker>
|
||||
<label style="color: #1890ff;cursor: pointer;" class="ml-md">删除</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label nz-radio [nzValue]="true" class="ml-xxl block-radio mt-md">
|
||||
<div class="d-flex">
|
||||
每周
|
||||
<div class="ml-md" style="cursor:default">
|
||||
<p style="color: #1890ff;cursor: pointer;">添加星期</p>
|
||||
<div class="mb-md">
|
||||
<nz-checkbox-group [(ngModel)]="checkOptionsOne"></nz-checkbox-group>
|
||||
</div>
|
||||
<div>
|
||||
<div class="mb-md">
|
||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="开始时间">
|
||||
</nz-time-picker>
|
||||
--
|
||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="结束时间">
|
||||
</nz-time-picker>
|
||||
<label style="color: #1890ff;cursor: pointer;"
|
||||
class="ml-md">删除</label>
|
||||
</div>
|
||||
<p style="color: #1890ff;cursor: pointer;"> 添加时间段</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</nz-radio-group>
|
||||
</se>
|
||||
<se label="提现限额">
|
||||
<div class="d-flex align-items-center ml-xl mb-md">
|
||||
<label nz-checkbox>每日最多可提现</label>
|
||||
<nz-input-group nzAddOnAfter="元" style="width: 150px;">
|
||||
<input type="number" nz-input placeholder="请输入" />
|
||||
</nz-input-group>
|
||||
</div>
|
||||
<div class="d-flex align-items-center ml-xl">
|
||||
<label nz-checkbox>每月最多可提现</label>
|
||||
<nz-input-group nzAddOnAfter="元" style="width: 150px;">
|
||||
<input type="number" nz-input placeholder="请输入" />
|
||||
</nz-input-group>
|
||||
</div>
|
||||
</se>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===2">
|
||||
<h2 style="font-weight: 800;">路桥发票设置</h2>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="100">
|
||||
<se label="发票申请" style="margin-bottom: 0;">
|
||||
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||
<label nz-radio [nzValue]="false" class="ml-xl">手动申请</label>
|
||||
<label nz-radio [nzValue]="true" class="ml-xl">自动申请</label>
|
||||
</nz-radio-group>
|
||||
</se>
|
||||
<se>
|
||||
<p class="ml-xl" style="color: #7e7c7c;">开启自动申请后,运单完成卸货后会自动根据运单信息申请ETC发票。</p>
|
||||
</se>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===3">
|
||||
<h2 style="font-weight: 800;">风险单监控</h2>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="180">
|
||||
<se [col]="1" label="早/晚于计划出发时间" style="margin-bottom: 8px;">
|
||||
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||
<label nz-radio [nzValue]="false" class="ml-xl mt-sm">不限定</label>
|
||||
<label nz-radio [nzValue]="true" class="ml-xl mt-sm">范围外报异常</label>
|
||||
</nz-radio-group>
|
||||
<nz-input-group nzAddOnAfter="小时" style="width: 200px;">
|
||||
<input type="number" nz-input placeholder="请输入允许时间差" />
|
||||
</nz-input-group>
|
||||
</se>
|
||||
<se [col]="1">
|
||||
<p class="ml-xl" style="color: #7e7c7c;">当前时间与计划时间对比,允许如上合理范围内执行不报异常,差异在范围外则报异常</p>
|
||||
</se>
|
||||
<se [col]="1" label="早/晚于计划到达时间" style="margin-bottom: 8px;">
|
||||
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||
<label nz-radio [nzValue]="false" class="ml-xl mt-sm">不限定</label>
|
||||
<label nz-radio [nzValue]="true" class="ml-xl mt-sm">范围外报异常</label>
|
||||
</nz-radio-group>
|
||||
<nz-input-group nzAddOnAfter="小时" style="width: 200px;">
|
||||
<input type="number" nz-input placeholder="请输入允许时间差" />
|
||||
</nz-input-group>
|
||||
</se>
|
||||
<se [col]="1">
|
||||
<p class="ml-xl" style="color: #7e7c7c;">当前时间与计划时间对比,允许如上合理范围内执行不报异常,差异在范围外则报异常</p>
|
||||
</se>
|
||||
<se [col]="1" label="损耗量" style="margin-bottom: 8px;">
|
||||
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||
<label nz-radio [nzValue]="false" class="ml-xl mt-sm">不限定</label>
|
||||
<label nz-radio [nzValue]="true" class="ml-xl mt-sm">范围外报异常</label>
|
||||
</nz-radio-group>
|
||||
<nz-input-group nzAddOnAfter="%" style="width: 200px;">
|
||||
<input type="number" nz-input placeholder="请输入允许时间差" />
|
||||
</nz-input-group>
|
||||
</se>
|
||||
<se [col]="1">
|
||||
<p class="ml-xl" style="color: #7e7c7c;">签收量与装运量对比,允许如上合理范围内损耗不报异常,差异在范围外则报异常</p>
|
||||
</se>
|
||||
<se [col]="1" label="装货/卸货地距离范围" style="margin-bottom: 8px;">
|
||||
<nz-radio-group [(ngModel)]="formDate.isAudit">
|
||||
<label nz-radio [nzValue]="false" class="ml-xl mt-sm">不限定</label>
|
||||
<label nz-radio [nzValue]="true" class="ml-xl mt-sm">范围外报异常</label>
|
||||
</nz-radio-group>
|
||||
<nz-input-group nzAddOnAfter="KM" style="width: 200px;">
|
||||
<input type="number" nz-input placeholder="请输入允许时间差" />
|
||||
</nz-input-group>
|
||||
</se>
|
||||
<se [col]="1">
|
||||
<p class="ml-xl" style="color: #7e7c7c;">装货地和发货地、签收地和收货地距离对比,允许如上合理范围内执行不报异常,差异在范围外则报异常</p>
|
||||
</se>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<div class="mb-md save-btn">
|
||||
<button class="ml-lg" nz-button nzSize="large" nzType="primary">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -41,7 +41,28 @@ export class FreightConfigComponent implements OnInit {
|
||||
nzWidth: 900,
|
||||
nzComponentParams: {
|
||||
extendType: '2',
|
||||
businessId: item.id
|
||||
businessId: item.id,
|
||||
formatTypeList: (item: any[]) => [
|
||||
...item,
|
||||
{
|
||||
name: '权限配置',
|
||||
items: [
|
||||
{
|
||||
configType: 1,
|
||||
itemType: 999
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '费率变更记录',
|
||||
items: [
|
||||
{
|
||||
configType: 2,
|
||||
itemType: 999
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
|
||||
@ -203,11 +203,11 @@ export class FreightComponentsListComponent implements OnInit {
|
||||
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
|
||||
}
|
||||
},
|
||||
{
|
||||
acl: { ability: ['USERCENTER-FREIGHT-LIST-basicSetting'] },
|
||||
text: '基础设置',
|
||||
click: item => this.settingAction(item)
|
||||
},
|
||||
// {
|
||||
// acl: { ability: ['USERCENTER-FREIGHT-LIST-basicSetting'] },
|
||||
// text: '基础设置',
|
||||
// click: item => this.settingAction(item)
|
||||
// },
|
||||
{
|
||||
acl: { ability: ['USERCENTER-FREIGHT-LIST-balance'] },
|
||||
text: '资金账户',
|
||||
|
||||
@ -100,8 +100,8 @@
|
||||
<nz-switch [(ngModel)]="item.itemValue"></nz-switch>
|
||||
</ng-container>
|
||||
<!-- 开关选项 -->
|
||||
<ng-container *ngSwitchCase="99">
|
||||
<nz-switch [(ngModel)]="item.itemValue"></nz-switch>
|
||||
<ng-container *ngSwitchCase="999">
|
||||
<ng-content select="custom-element"></ng-content>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</se>
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
<div class="mb-md save-btn">
|
||||
<button class="ml-lg" nz-button nzSize="large" nzType="primary" (click)="saveAction()"
|
||||
*ngIf="selectedTab?.configKey!=='freight'">保存</button>
|
||||
*ngIf="selectedTab?.configKey!=='freight' && labelWidth!==0">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
<app-dynamic-setting-h5 [tabs]="tabs" [configList]="configList" [selectedTab]="selectedTab"
|
||||
(selectedEvent)="changeType($event)" (saveEvent)="saveAction($event)" [tabSpan]="6" [labelWidth]="200" >
|
||||
(selectedEvent)="changeType($event)" (saveEvent)="saveAction($event)" [tabSpan]="6" [labelWidth]="labelWidth">
|
||||
<custom-element>
|
||||
<ng-container [ngSwitch]="selectedTab?.configType">
|
||||
<ng-container *ngSwitchCase="1">
|
||||
权限配置
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="2">
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchDefault>
|
||||
费率变更记录
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
</custom-element>
|
||||
</app-dynamic-setting-h5>
|
||||
@ -8,9 +8,12 @@
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-modal\\dynamic-setting-modal.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/compiler';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { BaseService } from 'src/app/shared/services';
|
||||
|
||||
@Component({
|
||||
@ -21,48 +24,67 @@ import { BaseService } from 'src/app/shared/services';
|
||||
export class DynamicSettingModalComponent implements OnInit {
|
||||
tabs: any[] = [];
|
||||
selectedTab: any = null;
|
||||
configFullKey = 'sys.config'
|
||||
configFullKey = 'sys.config';
|
||||
configList: any = [];
|
||||
|
||||
// 配置类型数组重组函数
|
||||
@Input()
|
||||
formatTypeList = (item: any[]) => {
|
||||
return [...item];
|
||||
};
|
||||
@Input()
|
||||
extendType!: string;
|
||||
@Input()
|
||||
businessId!: string;
|
||||
@Input()
|
||||
configvalue!: string;
|
||||
@Input()
|
||||
labelWidth = 200;
|
||||
|
||||
constructor(public service: BaseService, private modalHelp: NzModalRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
if (this.configvalue) {
|
||||
this.configFullKey = this.configvalue
|
||||
this.configFullKey = this.configvalue;
|
||||
}
|
||||
this.getTypeList();
|
||||
}
|
||||
|
||||
getTypeList() {
|
||||
|
||||
this.service
|
||||
.request('/api/mdc/pbc/sysConfigItemExtend/getSysConfigExtend', {
|
||||
configFullKey: this.configFullKey,
|
||||
extendType: this.extendType,
|
||||
businessId: this.businessId
|
||||
})
|
||||
.subscribe((res: Array<any>) => {
|
||||
.pipe(
|
||||
map((res: Array<any>) => {
|
||||
if (res?.length > 0) {
|
||||
const typeData = res.find(config => config.configFullKey === this.configFullKey);
|
||||
if (typeData) {
|
||||
this.tabs = typeData.children;
|
||||
this.selectedTab = typeData.children[0];
|
||||
this.configList = this.formatItems(this.selectedTab.items);
|
||||
return typeData.children || [];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}),
|
||||
map(this.formatTypeList)
|
||||
)
|
||||
.subscribe((res: Array<any>) => {
|
||||
this.tabs = res;
|
||||
if (res?.length > 0) {
|
||||
this.selectedTab = res[0];
|
||||
this.configList = this.formatItems(this.selectedTab.items);
|
||||
const hiddenType = this.configList.find((item: any) => item.itemType === 7 || item.itemType === 999);
|
||||
this.labelWidth = hiddenType ? 0 : 200;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
changeType(type: any): void {
|
||||
this.selectedTab = type;
|
||||
this.configList = this.formatItems(type.items);
|
||||
const hiddenType = this.configList.find((item: any) => item.itemType === 7 || item.itemType === 999);
|
||||
this.labelWidth = hiddenType ? 0 : 200;
|
||||
}
|
||||
|
||||
saveAction(params: Array<any>) {
|
||||
@ -93,13 +115,12 @@ export class DynamicSettingModalComponent implements OnInit {
|
||||
itemData: item.extendItemData || item.itemData,
|
||||
itemValue: item.extendItemValue || item.itemValue
|
||||
}))
|
||||
.map(item => (
|
||||
{
|
||||
.map(item => ({
|
||||
...item,
|
||||
remark: item?.remark ? JSON.parse(item?.remark) : null,
|
||||
extend: item?.extend ? JSON.parse(item?.extend) : [],
|
||||
// itemData: item.itemData ? JSON.parse(item.itemData) : item.itemData,
|
||||
itemValue: item?.itemValue ? item?.itemType !== 8? JSON.parse(item?.itemValue) : item?.itemValue : item?.itemValue
|
||||
itemValue: item?.itemValue ? (item?.itemType !== 8 ? JSON.parse(item?.itemValue) : item?.itemValue) : item?.itemValue
|
||||
}));
|
||||
}
|
||||
return [];
|
||||
|
||||
@ -17,10 +17,12 @@ import { FormsModule } from '@angular/forms';
|
||||
import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component';
|
||||
import { FreightTableComponent } from './freight-table/freight-table.component';
|
||||
import { SEModule } from '@delon/abc/se';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
const COMPONENTS = [DynamicSettingH5Component, DynamicSettingModalComponent, FreightTableComponent];
|
||||
@NgModule({
|
||||
declarations: [...COMPONENTS],
|
||||
imports: [CommonModule, FormsModule, SHARED_ZORRO_MODULES, SEModule],
|
||||
exports: [...COMPONENTS]
|
||||
exports: [...COMPONENTS],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
})
|
||||
export class DynamicSettingModule {}
|
||||
|
||||
@ -45,7 +45,6 @@ export class ShipperBaseService extends BaseService {
|
||||
* @returns
|
||||
*/
|
||||
getEnterpriseProject(params?: any) {
|
||||
console.log(params)
|
||||
return this.request(this.$api_get_enterprise_project, params).pipe(
|
||||
map((res: any) => {
|
||||
if (!res) {
|
||||
|
||||
Reference in New Issue
Block a user