Merge branch 'develop'

This commit is contained in:
Taric Xin
2022-04-27 10:02:43 +08:00
162 changed files with 4910 additions and 3698 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-18 09:51:21
* @LastEditors : Shiming
* @LastEditTime : 2022-04-22 14:01:00
* @LastEditTime : 2022-04-25 10:32:29
* @FilePath : \\tms-obc-web\\proxy.conf.js
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/

View File

@ -27,6 +27,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
import { NzGridModule } from 'ng-zorro-antd/grid';
import { LayoutPassportComponent } from './passport/passport.component';
import { PRO_COMPONENTS } from './pro/index';
import { SearchDrawerModule } from '../shared/components/search-drawer/search-drawer.module';
const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent];
@ -57,7 +58,8 @@ const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent
ThemeBtnModule,
ScrollbarModule,
NzGridModule,
NzMessageModule
NzMessageModule,
SearchDrawerModule
],
declarations: COMPONENTS,
exports: COMPONENTS

View File

@ -37,4 +37,5 @@
</div>
</div>
<ng-template #settingHost></ng-template>
<theme-btn></theme-btn>
<theme-btn></theme-btn>
<app-search-drawer></app-search-drawer>

View File

@ -151,7 +151,7 @@ export class AccountComponentsCenterComponent implements OnInit {
}
this.defaultCompany = res
if (res.projectId) {
this.getPayPw()
this.getPayPw()
}
})
}

View File

@ -1,14 +1,23 @@
import { AfterViewInit, Component, OnInit } from '@angular/core';
import { fromEvent } from 'rxjs';
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core';
import { SFComponent, SFSchema } from '@delon/form';
import { fromEvent, Subscription } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service';
@Component({
template: ''
})
export class BasicTableComponent implements AfterViewInit {
export class BasicTableComponent implements AfterViewInit, OnDestroy {
scrollY = '400px';
constructor() {}
sf!: SFComponent;
sfValue: Record<string, any> = {};
drawer: Subscription[] = [];
schema: SFSchema = {};
deviationHeight = 0;
constructor(public searchDrawerService: SearchDrawerService) {}
ngAfterViewInit(): void {
setTimeout(() => {
@ -21,20 +30,71 @@ export class BasicTableComponent implements AfterViewInit {
});
}
ngOnDestroy(): void {
this.drawer.forEach(sub => sub.unsubscribe());
}
openDrawer() {
if (this.drawer?.length > 0) {
this.searchDrawerService.create(this.sfValue, this.schema);
} else {
const drawer = this.searchDrawerService.create(this.sfValue, this.schema);
this.drawer.push(
drawer.initEvent.subscribe(sf => {
if (sf) {
this.sf = sf;
}
})
);
this.drawer.push(
drawer.closeEvent.subscribe(res => {
this.sfValue = res;
if (res) {
this.search();
}
})
);
}
}
getScrollY() {
const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
const header = document.getElementsByTagName('layout-pro-header')?.[0];
if (windowHeight && header) {
let scrollY = windowHeight - header.clientHeight - 35 - 49;
// 剔除页头高度
const headerWrapper = document.getElementsByTagName('page-header-wrapper')?.[0];
if (headerWrapper) {
scrollY -= headerWrapper.clientHeight;
}
const tabset = document.getElementsByTagName('nz-tabset')?.[0];
// 计算所有tabs高度
const tabset = document.getElementsByTagName('nz-tabs-nav');
let tabsetHeight = 0;
for (let index = 0; index < tabset.length; index++) {
tabsetHeight += tabset[index].clientHeight;
}
console.log('tabsetHeight', tabsetHeight);
if (tabset) {
scrollY -= tabset.clientHeight;
scrollY -= tabsetHeight;
}
// 剔除高度容器
// 计算所有tabs高度
const headerBox = document.getElementsByClassName('header_box');
let headerBoxHeight = 0;
for (let index = 0; index < headerBox.length; index++) {
headerBoxHeight += headerBox[index].clientHeight;
}
console.log('headerBoxHeight', headerBoxHeight);
if (headerBox) {
scrollY -= headerBoxHeight;
}
if (typeof this.deviationHeight === 'number') {
scrollY -= this.deviationHeight;
}
this.scrollY = scrollY + 'px';
}
}
search() {}
}

View File

@ -0,0 +1 @@
export * from './components/basic-table/basic-table.component';

View File

@ -9,7 +9,7 @@
}
.ant-tabs-tab {
margin: 0 0 0 16px;
margin : 0 0 0 16px;
padding: 12px 0;
}
@ -21,31 +21,77 @@
.ant-card-body {
padding: 0;
}
.tab_header {
display : flex;
align-items: center;
.page_title {
font-weight: bold;
font-size : 17px;
.driver {
color : #ff4d4f;
margin-left : 17px;
margin-right: 6px;
}
}
nz-tabset {
flex: 1;
}
}
}
.double_tabset_box {
margin : -24px -24px 0;
background: #ffffff;
.tab_header {
.page_title {
font-weight: bold;
font-size : 17px;
.driver {
color : #ff4d4f;
margin-left : 17px;
margin-right: 6px;
}
}
}
.header_tab {
nz-tabs-nav {
margin-bottom: 0;
}
}
}
.ant-table-pagination.ant-pagination {
margin: 8px;
}
.ant-table-thead > tr > th,
.ant-table-tbody > tr > td,
.ant-table tfoot > tr > th,
.ant-table tfoot > tr > td {
.ant-table-thead>tr>th,
.ant-table-tbody>tr>td,
.ant-table tfoot>tr>th,
.ant-table tfoot>tr>td {
padding: 8px;
}
.ant-table.ant-table-bordered > .ant-table-container {
.ant-table.ant-table-bordered>.ant-table-container {
border-top: 0;
}
.ant-pagination-item {
min-width: 24px;
height: 24px;
min-width : 24px;
height : 24px;
line-height: 21px;
}
.ant-pagination-total-text {
height: 24px;
height : 24px;
line-height: 24px;
}
@ -53,8 +99,8 @@
.ant-pagination-next,
.ant-pagination-jump-prev,
.ant-pagination-jump-next {
min-width: 24px;
height: 24px;
min-width : 24px;
height : 24px;
line-height: 21px;
}
@ -66,5 +112,28 @@
.ant-select-single .ant-select-selector .ant-select-selection-placeholder {
line-height: 21px;
}
.text-truncate {
white-space: normal;
}
}
}
.header_box {
display : flex;
align-items : center;
justify-content: space-between;
min-height : 47px;
.page_title {
font-weight: bold;
font-size : 17px;
.driver {
color : #ff4d4f;
margin-left : 17px;
margin-right: 6px;
}
}
}

View File

@ -5,7 +5,7 @@ import { OnChanges } from '@angular/core';
* @Author : Shiming
* @Date : 2022-01-05 11:01:55
* @LastEditors : Shiming
* @LastEditTime : 2022-03-30 10:45:19
* @LastEditTime : 2022-04-25 10:28:10
* @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -96,8 +96,6 @@ export class ContractManagementTemplateTextComponent implements OnInit {
{ label: '运单合同', value: '3' },
{ label: '运单补充协议', value: '4' },
{ label: '委托代收合同', value: '5' },
{ label: '电子提货单', value: '10' },
{ label: '电子卸货单', value: '11' },
];
this.sf.getProperty('/contractType')!.schema.enum = this.Types;
this.sf.getProperty('/contractType')!.widget.reset(this.Types);
@ -178,7 +176,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
}
}
},
required: ['templateName', 'templateType']
required: ['templateName', 'templateType','contractType']
};
this.ui = {
'*': {

View File

@ -1,5 +1,3 @@
<!-- 页头 -->
<page-header-wrapper [title]="'数据报表'"></page-header-wrapper>
<div nz-row [nzGutter]="16">
<div nz-col class="gutter-row" [nzSpan]="6">
<g2-card [title]="AdvanceDepositTitle" [bordered]="true" [total]="totalAdvanceDeposit?.totalAmount || '¥ 0.00万'"
@ -11,9 +9,10 @@
</p>
</ng-template>
<ng-template #AdvanceDepositFooter>
<g2-mini-area line color="#cceafe" height="45" [data]="totalAdvanceDeposit?.list || []"
<g2-custom #AdvanceDeposit delay="100"></g2-custom>
<!-- <g2-mini-area line color="#cceafe" height="45" [data]="totalAdvanceDeposit?.list || []"
(clickItem)="handleClick($event)">
</g2-mini-area>
</g2-mini-area> -->
</ng-template>
</g2-card>
</div>

View File

@ -19,6 +19,7 @@ import { GeometryLabelCfg } from '@antv/g2/lib/interface';
providers: [CurrencyPipe]
})
export class DatatableDataindexComponent implements OnInit {
@ViewChild('AdvanceDeposit', { static: false }) AdvanceDeposit!: G2CustomComponent;
@ViewChild('g2custom', { static: false }) g2custom!: G2CustomComponent;
@ViewChild('RegionalPerforman', { static: false }) RegionalPerforman!: G2CustomComponent;
@ViewChild('BillDirectProportion', { static: false }) BillDirectProportion!: G2CustomComponent;
@ -49,6 +50,7 @@ export class DatatableDataindexComponent implements OnInit {
this.service.request(this.service.$api_total_advance_deposit).subscribe((res: DataTotalVO) => {
if (res) {
this.totalAdvanceDeposit = this.formatMiniAreaData(res);
this.initAreaMap(this.AdvanceDeposit['el'].nativeElement as any, []);
}
});
// 业绩量总额
@ -179,7 +181,7 @@ export class DatatableDataindexComponent implements OnInit {
.style({
fillOpacity: 1,
stroke: 'white',
lineWidth: 8
lineWidth: 4
})
.state({
active: {
@ -294,42 +296,57 @@ export class DatatableDataindexComponent implements OnInit {
* @param el
*/
private initAreaMap(el: HTMLElement, datas: any[]): void {
const data = [
{ city: '冰岛(雷克雅未克)', type: '首都人口', value: 0.56 },
{ city: '冰岛(雷克雅未克)', type: '城市人口', value: 0.38 }
];
const chart = new Chart({
container: el,
autoFit: true,
height: 500
height: 45
});
chart.data(datas);
chart.scale('Data', {
range: [0, 1],
tickCount: 10,
type: 'timeCat'
chart.data(data);
chart.legend(false);
chart.axis('city', false);
chart.axis('value', {
label: {
formatter: val => val
},
title: null,
grid: null
});
chart.scale('sales', {
nice: true
});
chart.axis('Data', false);
chart.axis('sales', false);
chart.coordinate('rect').transpose();
chart.tooltip({
showCrosshairs: true
customItems: items => {
return [];
},
showContent: true,
title: '1,968.08万'
});
// chart.annotation().dataMarker({
// position: ['2014-01', 1750],
// top: true,
// text: {
// content: '因政策调整导致销量下滑',
// style: {
// fontSize: 13
// }
// },
// line: {
// length: 30
// }
// });
chart.line().position('Data*sales');
chart.area().position('Data*sales');
chart.interaction('active-region');
chart
.interval()
.adjust('stack')
.position('city*value')
.color('type*city', (type: any, city: any) => {
if (type === '首都人口') {
return '#E60012';
}
if (type === '城市人口') {
return '#EAEAEB';
}
return '#EAEAEB';
})
.style('type', (type: any, city: any) => {
if (type === '首都人口') {
return { radius: [0, 0, 20, 20] };
}
if (type === '城市人口') {
return { radius: [20, 20, 0, 0] };
}
return {};
});
chart.render();
}
@ -409,7 +426,7 @@ export class DatatableDataindexComponent implements OnInit {
chart.data(data);
// 设置坐标轴
chart.scale({
y1: { alias: y1Title, min: 0, max: 1000000 },
y1: { alias: y1Title, min: 0, max: 2000000000 },
y2: { alias: y2Title, min: 0, max: 1, formatter: val => (val * 100).toFixed(0) + '%' },
y3: { alias: y3Title, min: 0, max: 1, formatter: val => (val * 100).toFixed(0) + '%' }
});
@ -420,8 +437,8 @@ export class DatatableDataindexComponent implements OnInit {
padding: [10, 0, 40, 0],
items: [
{ value: 'y1', name: y1Title, marker: { symbol: 'circle', style: { fill: '#E60012', r: 5, fontSize: 13 } } },
{ value: 'y3', name: y3Title, marker: { symbol: 'circle', style: { fill: '#6CBFFF', r: 5, fontSize: 13 } } },
{ value: 'y2', name: y2Title, marker: { symbol: 'circle', style: { fill: '#50D4AB', r: 5, fontSize: 13 } } }
{ value: 'y2', name: y2Title, marker: { symbol: 'circle', style: { fill: '#FE7823', r: 5, fontSize: 13 } } },
{ value: 'y3', name: y3Title, marker: { symbol: 'circle', style: { fill: '#F7CFCE', r: 5, fontSize: 13 } } }
]
});
chart.axis('y2', {
@ -440,16 +457,16 @@ export class DatatableDataindexComponent implements OnInit {
.line()
.position('x*y2')
// .label('pre', val => ({ content: (val * 100).toFixed(0) + '%' }))
.color('#6CBFFF')
.color('#F7CFCE')
.size(3);
chart.point().position('x*y2').color('#6CBFFF').size(3).shape('circle');
chart.point().position('x*y2').color('#F7CFCE').size(3).shape('circle');
chart
.line()
.position('x*y3')
// .label('pre2', val => ({ content: (val * 100).toFixed(0) + '%' }))
.color('#50D4AB')
.color('#FE7823')
.size(3);
chart.point().position('x*y3').color('#50D4AB').size(3).shape('circle');
chart.point().position('x*y3').color('#FE7823').size(3).shape('circle');
chart.interaction('active-region');
chart.removeInteraction('legend-filter'); // 自定义图例,移除默认的分类图例筛选交互

View File

@ -1,14 +1,4 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-06 10:57:56
* @LastEditors : Shiming
* @LastEditTime : 2022-04-14 10:39:57
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\abnormal-gold\\abnormal-gold.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'异常入金'"> </page-header-wrapper>
<!-- <page-header-wrapper [title]="'异常入金'"> </page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
@ -31,22 +21,25 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box" nzBordered>
<nz-tabset>
<nz-tab nzTitle="处理中"(nzClick)="changePaymentStatus('1')"></nz-tab>
<nz-tab nzTitle="已退款"(nzClick)="changePaymentStatus('5')"></nz-tab>
<nz-tab nzTitle="全部"(nzClick)="changePaymentStatus('')"></nz-tab>
</nz-tabset>
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"><label class="driver">|</label>异常入金</label>
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
<nz-tab nzTitle="处理中" (nzClick)="changePaymentStatus('1')"></nz-tab>
<nz-tab nzTitle="已退款" (nzClick)="changePaymentStatus('5')"></nz-tab>
<nz-tab nzTitle="全部" (nzClick)="changePaymentStatus('')"></nz-tab>
</nz-tabset>
</div>
<st
#st
[data]="service.$api_get_getAbnormalAmountPage"
[columns]="columns"
[req]="{ process: beforeReq }"
[page]="{}"
[loading]="false"
[scroll]="{ x: '1200px' }"
></st>
</nz-card>
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exprot()"> 导出</button>
</div>
</ng-template>
<st #st [data]="service.$api_get_getAbnormalAmountPage" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x: '1200px',y:scrollY }"></st>
</nz-card>

View File

@ -2,30 +2,39 @@ 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 { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
import { ClearingModalComponent } from './clearing-modal/clearing-modal.component';
@Component({
selector: 'app-abnormal-gold',
templateUrl: './abnormal-gold.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class AbnormalGoldComponent implements OnInit {
export class AbnormalGoldComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
schema: SFSchema = this.initSF();
rechargeStatus = '1';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { rechargeStatus: this.rechargeStatus });
if (this.sf) {
@ -56,22 +65,6 @@ export class AbnormalGoldComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
@ -116,30 +109,21 @@ export class AbnormalGoldComponent implements OnInit {
type: 'string',
title: '付款账户',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
transferBankCardNumber: {
type: 'string',
title: '付款账号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
transferBankOpenName: {
type: 'string',
title: '付款银行',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
transferDate: {
@ -149,10 +133,7 @@ export class AbnormalGoldComponent implements OnInit {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => value
}
nzShowTime: true
} as SFDateWidgetSchema
}
}

View File

@ -1,4 +1,4 @@
<page-header-wrapper title="预收款余额">
<!-- <page-header-wrapper title="预收款余额">
</page-header-wrapper>
<nz-card class="search-box">
@ -19,10 +19,17 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box">
<st #st [data]="service.$api_get_advance_collection_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x: '1200px' }">
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 预收款余额</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exportList()"> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_advance_collection_page" [columns]="columns" [req]="{ process: beforeReq }"
[page]="{}" [loading]="false" [scroll]="{ x: '1200px',y:scrollY }">
</st>
</nz-card>

View File

@ -2,26 +2,37 @@ import { Component, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-advance-collection',
templateUrl: './advance-collection.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class AdvanceCollectionComponent {
export class AdvanceCollectionComponent extends BasicTableComponent {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
searchSchema: SFSchema = this.initSF();
schema: SFSchema = this.initSF();
columns: STColumn[] = this.initST();
_$expand = false;
constructor(public service: FreightAccountService, private router: Router, private modal: NzModalService) {}
constructor(
public service: FreightAccountService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
@ -30,24 +41,8 @@ export class AdvanceCollectionComponent {
return requestOptions;
};
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
exportList() {
this.service.exportStart( { ...this.sf.value, pageSize: -1 }, this.service.$api_get_reportYskBla,);
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_reportYskBla);
}
private initSF(): SFSchema {
@ -97,10 +92,7 @@ export class AdvanceCollectionComponent {
enum: [{ label: '全部', value: null }],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: null
},
@ -114,10 +106,7 @@ export class AdvanceCollectionComponent {
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: null
}

View File

@ -8,7 +8,7 @@
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\cost-management\\cost-management.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper title="费用管理"> </page-header-wrapper>
<!-- <page-header-wrapper title="费用管理"> </page-header-wrapper>
<nz-card class="search-box">
<div nz-row nzGutter="8">
@ -20,28 +20,36 @@
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl
[acl-ability]="['FINANCIAL-COST-list']">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<!-- <button nz-button (click)="exportList()"> 导出</button>
<button nz-button (click)="exportList()"> 导出明细</button> -->
<button nz-button (click)="exportList()"> 导出</button>
<button nz-button (click)="exportList()"> 导出明细</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box">
<div nz-row class="mb-sm">
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 费用管理</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['FINANCIAL-COST-list']">筛选</button>
<button nz-button nzDanger (click)="exportList()"> 导出</button>
</div>
</div>
<!-- <div nz-row class="mb-sm">
<div nz-col nzSpan="24">
<!-- <button nz-button nzType="primary" [nzLoading]="service.http.loading"
<button nz-button nzType="primary" [nzLoading]="service.http.loading"
(click)="routeTo('/financial-management/cost-management/expenses-receivable/1')">添加应收费用</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading"
(click)="routeTo('/financial-management/cost-management/expenses-payable/1')">添加应付费用</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading">导入费用</button> -->
<button nz-button nzType="primary" [nzLoading]="service.http.loading">导入费用</button>
</div>
</div>
</div> -->
<st #st [data]="service.$api_get_cost_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x: '2000px' }">
[loading]="false" [scroll]="{ x: '2000px',y:scrollY }">
<ng-template st-row="armoeny" let-item let-index="index">
{{ item.armoeny | currency }}
</ng-template>

View File

@ -2,34 +2,43 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema, SFSchemaEnum } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-cost-management',
templateUrl: './cost-management.component.html',
styleUrls: ['../../../commom/less/box.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class CostManagementComponent implements OnInit {
export class CostManagementComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('auditModal', { static: false })
auditModal!: any;
searchSchema: SFSchema = this.initSF();
schema: SFSchema = this.initSF();
columns: STColumn[] = this.initST();
selectedRows: any[] = [];
_$expand = false;
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
@ -73,24 +82,9 @@ export class CostManagementComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
exportList() {
this.service.exportStart( { ...this.sf.value, pageSize: -1 }, this.service.$api_get_exportPlatformAccountBalanceByOperator,);
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_exportPlatformAccountBalanceByOperator);
}
routeTo(url: string, params?: any, status?: any) {
@ -100,12 +94,6 @@ export class CostManagementComponent implements OnInit {
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
feecode: {
type: 'string',
title: '费用单号',
@ -131,9 +119,6 @@ export class CostManagementComponent implements OnInit {
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
feetype: {
@ -147,9 +132,6 @@ export class CostManagementComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
@ -159,14 +141,11 @@ export class CostManagementComponent implements OnInit {
enum: [
{ label: '全部', value: '全部' },
{ label: '运输费', value: '1475197820443299842' },
{ label: '附加费', value: '1476197820443299842 ' },
{ label: '附加费', value: '1476197820443299842 ' }
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
ltdId: {
@ -177,9 +156,6 @@ export class CostManagementComponent implements OnInit {
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
}
},
hrto: {
@ -202,9 +178,6 @@ export class CostManagementComponent implements OnInit {
return of([]);
}
},
visibleIf: {
expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
arto: {
@ -227,9 +200,6 @@ export class CostManagementComponent implements OnInit {
return of([]);
}
},
visibleIf: {
expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
createTime: {
@ -240,9 +210,6 @@ export class CostManagementComponent implements OnInit {
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
ishrhx: {
@ -256,9 +223,6 @@ export class CostManagementComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
@ -270,9 +234,6 @@ export class CostManagementComponent implements OnInit {
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getCloseAccount(),
visibleIf: {
expand: (value: boolean) => value
}
}
}
}

View File

@ -1,4 +1,4 @@
<page-header-wrapper title="司机账户"> </page-header-wrapper>
<!-- <page-header-wrapper title="司机账户"> </page-header-wrapper>
<nz-card class="search-box">
<div nz-row nzGutter="8">
@ -21,23 +21,22 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box">
<st
#st
[data]="service.$api_get_driver_account_page"
[columns]="columns"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
[page]="{}"
[loading]="false"
[scroll]="{ x: '1200px' }"
>
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 司机账户</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exportList()"> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_driver_account_page" [columns]="columns" [req]="{ process: beforeReq }"
[res]="{ process: afterRes}" [page]="{}" [loading]="false" [scroll]="{ x: '1200px',y:scrollY }">
<ng-template st-row="availableBalance" let-item let-index="index">
<a (click)="showAccountDetail(item)">{{
(parseFloat(item.availableBalance) + parseFloat(item.freezeBalance)).toFixed(2) | currency
}}</a>
}}</a>
</ng-template>
</st>
</nz-card>
</nz-card>

View File

@ -3,30 +3,38 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-driver-account',
templateUrl: './driver-account.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class DriverAccountComponent implements OnInit {
export class DriverAccountComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
loading: boolean = true;
searchSchema: SFSchema = this.initSF();
schema: SFSchema = this.initSF();
columns: STColumn[] = this.initST();
_$expand = false;
constructor(public service: FreightAccountService, private router: Router, private modal: NzModalService) {}
constructor(
public service: FreightAccountService,
private router: Router,
private modal: NzModalService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { accountType: 2 });
if (this.sf) {
@ -44,11 +52,8 @@ export class DriverAccountComponent implements OnInit {
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
console.log(data)
this.loading = false
return data.map(item => ({
...item,
}));
this.loading = false;
return data;
};
showAccountDetail(item: any) {
this.modal.create({
@ -64,25 +69,7 @@ export class DriverAccountComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
exportList() {
console.log(this.sf.value);
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_driver_account_page);
}
@ -118,9 +105,6 @@ export class DriverAccountComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder()
}
@ -135,10 +119,7 @@ export class DriverAccountComponent implements OnInit {
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: null
},
@ -146,10 +127,7 @@ export class DriverAccountComponent implements OnInit {
type: 'string',
title: '虚拟账户',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
createTime: {
@ -158,10 +136,7 @@ export class DriverAccountComponent implements OnInit {
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
} as SFDateWidgetSchema
}
}

View File

@ -1,4 +1,4 @@
<page-header-wrapper title="货主账户">
<!-- <page-header-wrapper title="货主账户">
</page-header-wrapper>
<nz-card class="search-box">
@ -19,11 +19,18 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box">
<st #st [data]="service.$api_get_shipper_account_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x: '1200px' }">
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 货主账户</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exportList()"> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_shipper_account_page" [columns]="columns" [req]="{ process: beforeReq }"
[page]="{}" [loading]="false" [scroll]="{ x: '1200px',y:scrollY }">
<ng-template st-row="description" let-item let-index="index">
<a (click)="showAccountDetail(item)">{{ (parseFloat(item.availableBalance) +
parseFloat(item.freezeBalance)).toFixed(2) | currency}}</a>

View File

@ -5,9 +5,10 @@ import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { CurrencyService } from '@delon/util';
import { CurrencyCNYPipe } from '@delon/util/pipes/currency/cny.pipe';
import { ShipperBaseService } from '@shared';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { parse } from 'path';
import { BasicTableComponent } from 'src/app/routes/commom';
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
import { FreightAccountService } from '../../services/freight-account.service';
@ -15,24 +16,31 @@ import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-freight-account',
templateUrl: './freight-account.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class FreightAccountComponent implements OnInit {
export class FreightAccountComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
searchSchema: SFSchema = this.initSF();
schema: SFSchema = this.initSF();
columns: STColumn[] = this.initST();
selectedRows: any[] = [];
_$expand = false;
constructor(public service: FreightAccountService, private router: Router, private modal: NzModalService) {}
constructor(
public service: FreightAccountService,
private router: Router,
private modal: NzModalService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { accountType: 1 });
if (this.sf) {
@ -63,22 +71,6 @@ export class FreightAccountComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
exportList() {
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_exportShipperAccountBalanceByOperator);
}
@ -86,12 +78,6 @@ export class FreightAccountComponent implements OnInit {
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
tenantName: {
type: 'string',
title: '企业名称',
@ -115,9 +101,6 @@ export class FreightAccountComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder()
}
@ -133,9 +116,6 @@ export class FreightAccountComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: null
},
@ -144,9 +124,6 @@ export class FreightAccountComponent implements OnInit {
title: '虚拟账户',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
createTime: {
@ -156,9 +133,6 @@ export class FreightAccountComponent implements OnInit {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
}
}
@ -172,7 +146,7 @@ export class FreightAccountComponent implements OnInit {
{ title: '联系人电话', width: 140, index: 'phone' },
{ title: '网络货运人', width: 170, index: 'ltdName' },
{ title: '银行类型', width: 120, index: 'bankTypeLabel' },
{ title: '虚拟账户', width: 140, index: 'virtualAccount' },
{ title: '虚拟账户', width: 160, index: 'virtualAccount' },
{
title: '可用余额',
index: 'availableBalance',

View File

@ -1,4 +1,4 @@
<page-header-wrapper [title]="'付款单'">
<!-- <page-header-wrapper [title]="'付款单'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
@ -11,29 +11,42 @@
<div nz-col [nzXl]="_$expand ? 24 : 7" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right" [class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<!-- <button nz-button nzType="primary" > 导出</button>
<button nz-button nzType="primary" > 导出明细</button> -->
<button nz-button nzType="primary" > 导出</button>
<button nz-button nzType="primary" > 导出明细</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box" nzBordered>
<nz-card class="table-box">
<div class="header_box">
<div>
<label class="page_title"> <label class="driver">|</label> 付款单</label>
<label class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张单
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</label>
</div>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
</div>
</div>
<div class="d-flex align-items-center mb-md mt-md">
<!-- <button nz-button (click)="this.addInvoice()" nzType="primary">添加付款</button>
<button nz-button (click)="this.addInvoice()" nzType="primary">导入付款</button> -->
<!-- <div class="d-flex align-items-center mb-md mt-md">
<button nz-button (click)="this.addInvoice()" nzType="primary">添加付款</button>
<button nz-button (click)="this.addInvoice()" nzType="primary">导入付款</button>
<div class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张单
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div>
</div>
</div> -->
<st #st [data]="service.$api_get_payment_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }" (change)="stChange($event)">
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -2,7 +2,9 @@ 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 { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { TicketService } from 'src/app/routes/ticket-management/services/ticket.service';
import { FreightAccountService } from '../../services/freight-account.service';
@ -10,23 +12,30 @@ import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-payment-order',
templateUrl: './payment-order.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class PaymentOrderComponent implements OnInit {
export class PaymentOrderComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
schema: SFSchema = this.initSF();
selectedRows: any[] = [];
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
let params = { ...this.sf.value };
@ -68,31 +77,9 @@ export class PaymentOrderComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
paycode: {
type: 'string',
title: '付款单号'
@ -135,10 +122,7 @@ export class PaymentOrderComponent implements OnInit {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'pay:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
arto: {
@ -147,10 +131,7 @@ export class PaymentOrderComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
}
allowClear: true
}
},
billCode: {
@ -159,10 +140,7 @@ export class PaymentOrderComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
}
allowClear: true
}
},
payDate: {
@ -170,10 +148,7 @@ export class PaymentOrderComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
payDate2: {
@ -181,20 +156,12 @@ export class PaymentOrderComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
waybillCode: {
type: 'string',
title: '运单号',
ui: {
visibleIf: {
expand: (value: boolean) => value
}
}
title: '运单号'
},
// feeCode: {
// type: 'string',
@ -210,20 +177,14 @@ export class PaymentOrderComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
payRemarks: {
type: 'string',
title: '付款备注',
ui: {
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
}
}
@ -233,9 +194,9 @@ export class PaymentOrderComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox', fixed: 'left', className: 'text-center' },
{ title: '付款单号', index: 'payCode', type: 'link', width: 180 },
{ title: '网络货运人', index: 'ltdName', width: 180 },
{ title: '运单号', index: 'waybillCode', width: 180 },
{ title: '付款单号', index: 'payCode', className: 'text-left', type: 'link', width: 180 },
{ title: '网络货运人', index: 'ltdName', className: 'text-left', width: 180 },
{ title: '运单号', index: 'waybillCode', className: 'text-left', width: 180 },
// { title: '费用号', index: 'feeCode', width: 180 },
{ title: '要求付款日期', index: 'payDate', type: 'date', className: 'text-center', width: 150 },
{

View File

@ -1,14 +1,4 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-03-21 14:19:21
* @LastEditors : Shiming
* @LastEditTime : 2022-03-21 15:03:40
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\payment-record\\payment-record.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'支付记录'">
<!-- <page-header-wrapper [title]="'支付记录'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
@ -29,19 +19,28 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box" nzBordered>
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"><label class="driver">|</label>支付记录</label>
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
<nz-tab nzTitle="全部" (nzClick)="changePaymentStatus()"></nz-tab>
<nz-tab nzTitle="支付中" (nzClick)="changePaymentStatus('4')"></nz-tab>
<nz-tab nzTitle="已支付" (nzClick)="changePaymentStatus('2')"></nz-tab>
<nz-tab nzTitle="支付失败" (nzClick)="changePaymentStatus('5')"></nz-tab>
</nz-tabset>
</div>
<nz-tabset>
<nz-tab nzTitle="全部" (nzClick)="changePaymentStatus()"></nz-tab>
<nz-tab nzTitle="支付中" (nzClick)="changePaymentStatus('4')"></nz-tab>
<nz-tab nzTitle="已支付" (nzClick)="changePaymentStatus('2')"></nz-tab>
<nz-tab nzTitle="支付失败" (nzClick)="changePaymentStatus('5')"></nz-tab>
</nz-tabset>
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exprot()"> 导出</button>
</div>
</ng-template>
<st #st [data]="service.$api_get_order_payment_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }">
<st #st [data]="service.$api_get_order_payment_page" [columns]="columns" [req]="{ process: beforeReq }"
[page]="{}" [loading]="false" [scroll]="{ x:'1200px',y:scrollY }">
<ng-template st-row="orderPaymentCode" let-item let-index="index" let-column="column">
{{ item?.orderPaymentCode }} <br> <a>{{ item?.paymentStatusLabel }}</a>
</ng-template>

View File

@ -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-left : 16px;
padding-right: 16px;
}
.text-truncate {
white-space: normal;
}
}
.expend-options {
margin-top: 0px;
}
@media (min-width: 1200px) {
.expend-options {
max-width: 400px;
position : absolute;
right : 0;
bottom : 25px;
}
}

View File

@ -2,31 +2,39 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
import { ClearingModalComponent } from '../abnormal-gold/clearing-modal/clearing-modal.component';
@Component({
selector: 'app-payment-record',
templateUrl: './payment-record.component.html',
styleUrls: ['./payment-record.component.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class PaymentRecordComponent implements OnInit {
export class PaymentRecordComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
schema: SFSchema = this.initSF();
paymentStatus: any = '';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
@ -38,10 +46,10 @@ export class PaymentRecordComponent implements OnInit {
handlerDate: {
start: this.sf.value.handlerDate?.[0] || '',
end: this.sf.value.handlerDate?.[1] || ''
},
paymentStatus: this.paymentStatus || null
}
});
}
Object.assign(requestOptions.body, { paymentStatus: this.paymentStatus || null });
return requestOptions;
};
@ -57,22 +65,6 @@ export class PaymentRecordComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
@ -109,10 +101,7 @@ export class PaymentRecordComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'service:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: ''
},
@ -120,46 +109,34 @@ export class PaymentRecordComponent implements OnInit {
type: 'string',
title: '承运司机',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
driverLicensePlate: {
type: 'string',
title: '车牌号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
captain: {
type: 'string',
title: '收款人',
ui: {
placeholder: '请输入收款人姓名/手机号',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入收款人姓名/手机号'
}
},
isCaptain: {
type: 'string',
title: '车队长收款',
enum: [
{label: '全部', value: ''},
{label: '是', value: '1'},
{label: '否', value: '2'}
{ label: '全部', value: '' },
{ label: '是', value: '1' },
{ label: '否', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: ''
},
@ -169,10 +146,7 @@ export class PaymentRecordComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'paybill:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: ''
},
@ -183,10 +157,7 @@ export class PaymentRecordComponent implements OnInit {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => value
}
nzShowTime: true
} as SFDateWidgetSchema
},
handlerDate: {
@ -196,10 +167,7 @@ export class PaymentRecordComponent implements OnInit {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => value
}
nzShowTime: true
} as SFDateWidgetSchema
},
bankType: {
@ -212,10 +180,7 @@ export class PaymentRecordComponent implements OnInit {
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: ''
},
@ -226,10 +191,7 @@ export class PaymentRecordComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
asyncData: () => this.service.getNetworkFreightForwarder()
}
}
}

View File

@ -119,7 +119,7 @@ export class PlatformAccountDetailComponent implements OnInit {
nzShowTime: true
} as SFDateWidgetSchema
},
businessNumber: {
channelPaySn: {
type: 'string',
title: '流水号',
ui: {

View File

@ -5,6 +5,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { FreightAccountService } from '../../services/freight-account.service';
import { CwcBankCardManagementBindComponent } from '../bank-card-management/bind/bind.component';
import { CwcAccountManagementWithdrawDepositComponent } from './withdraw-deposit/withdraw-deposit.component';
@Component({
selector: 'app-platform-account',
@ -192,12 +193,18 @@ export class PlatformAccountComponent implements OnInit {
})
},
{
text: '绑定银行卡',
click: item => this.bindBankcard(item)
text: '提现',
click: item => this.withdraw(item),
iif: (_record) => _record.bankType !== '1'
},
// {
// text: '绑定银行卡',
// click: item => this.bindBankcard(item)
// },
{
text: '查看银行卡',
click: item => this.viewBankcard(item)
click: item => this.viewBankcard(item),
iif: (_record) => _record.bankType !== '1'
},
]
}
@ -239,4 +246,25 @@ export class PlatformAccountComponent implements OnInit {
exportList() {
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_exportPlatformAccountBalanceByOperator,);
}
// 提现
withdraw(record: any) {
const modalRef = this.modal.create({
nzTitle: '提现',
nzWidth: '35%',
nzContent: CwcAccountManagementWithdrawDepositComponent,
nzMaskClosable: false,
nzComponentParams: {
record
},
nzFooter: null
});
modalRef.afterClose.subscribe(res => {
if (res) {
// this.getSummary();
// this.withdrawTable.refresh();
}
})
}
}

View File

@ -0,0 +1,39 @@
<sf #sf mode="edit" [schema]="schema" [ui]="ui" button="none" autocomplete="off">
<ng-template sf-template="availableBalance" let-me>
<div *ngIf=" me.formProperty.value === null || me.formProperty.value === undefined ">-</div>
<div *ngIf=" me.formProperty.value >= 0 " class="text-red-dark">{{me.formProperty.value | currency}}</div>
</ng-template>
<ng-template sf-template="bankId" let-me let-ui="ui" let-schema="schema">
<nz-radio-group *ngIf="bankCardList.length >0" [ngModel]="me.formProperty.value" class="pay-way-group "
(ngModelChange)="checkBankCard($event)">
<div class=" band-card mb-xs" *ngFor="let item of bankCardList">
<label [nzValue]="item.id" nz-radio ngModel class="pay-way-label">
<img class="mr-sm" [src]="'./assets/images/wallet.svg'" width="26" height="26" />
<span class="mr-sm"> {{ item.bankName}}</span>
<span>{{item.bankCardNumber}}</span>
</label>
</div>
</nz-radio-group>
<div> <a (click)="toAddBankPage()" class="text-blue-dark">+添加银行卡 </a></div>
</ng-template>
<ng-template sf-template="amount" let-me>
<nz-input-number nz-input type="number" [nzMax]="balanceObj?.allBalance" [nzMin]="1" placeholder="请输入提现金额"
[ngModel]="me.formProperty.value" class="input-row" (ngModelChange)="me.setValue($event)" autocomplete="off"
[nzPrecision]="2"></nz-input-number>
<a (click)="allWithdrawal()">全部提现</a>
</ng-template>
<ng-template sf-template="payPsd" let-me>
<input maxlength="6" class="input-row iconfont icon-yuandian" id="psd" [type]="'text'" autocomplete="off" nz-input
placeholder="请输入支付密码" [ngModel]="me.formProperty.value" (ngModelChange)="changePsd($event)"
(keydown)="keydown($event)" (mouseup)="setFocus()" #psd />
<a (click)="toForgetPsdPage()">忘记密码?</a>
</ng-template>
<div class="modal-footer">
<button nz-button type="button" (click)="close(false)">取 消</button>
<button nz-button type="submit" nzType="primary" (click)="save(sf?.value)" [disabled]="!sf.valid"
[nzLoading]="service.http.loading">
</button>
</div>
</sf>

View File

@ -0,0 +1,37 @@
:host {
.bank-card-select-content {
padding: 5px;
border: 1px solid #ccc;
.band-card-row {
display: flex;
align-items: center;
}
}
.pay-way-group {
width: 100%;
margin-bottom: 5px;
.bank-card-row {
display: flex;
align-items: center;
}
.band-card {
border: 1px solid #e8e8e8;
.pay-way-label {
width: 100%;
padding: 6px 10px;
}
}
}
.input-row {
width: 70%;
margin-right: 8px;
}
}

View File

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

View File

@ -0,0 +1,298 @@
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { cacheConf } from '@conf/cache.conf';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { EACacheService, EAEnvironmentService, ShipperBaseService } from '@shared';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { BankCardManagementService } from '../../../services/bank-card-management.service';
@Component({
selector: 'app-cwc-withdraw-deposit',
templateUrl: './withdraw-deposit.component.html',
styleUrls: ['./withdraw-deposit.component.less']
})
export class CwcAccountManagementWithdrawDepositComponent implements OnInit {
accountBalance = 0;
minWithdrawAmount = 0;
minWithdrawFee: any = 0;
code = '';
bankList: Array<any> = [];
bankAccount = '';
count = 0;
interval$: any;
ui: SFUISchema = {};
i: any;
schema: SFSchema = {};
totalGJ: any = 0.0;
cacFee: any = 0;
columns: STColumn[] = [];
totalBalance = 200;
bankCardList: Array<any> = [];
cardNo = '';
accountDetail: any = {};
networkTransporterId = '';
networkTransporterName = '';
balanceObj: any = {
allBalance: 99999999
};
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('psd') psd!: ElementRef;
record: any;
bankType = '2';
constructor(
public service: BankCardManagementService,
private modal: NzModalRef,
private shipperSrv: ShipperBaseService,
public eaCacheSrv: EACacheService,
public envSrv: EAEnvironmentService,
public router: Router
) {
this.networkTransporterId = this.eaCacheSrv.get(cacheConf.env)?.networkTransporterId;
}
ngOnInit() {
this.initSF();
this.getBankList();
this.getProjectBalanceDetail();
}
/**
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
ltdName: {
title: '网络货运人',
type: 'string',
default: this.record?.ltdName,
ui: {
widget: 'text',
}
},
bankType: {
title: '银行',
type: 'string',
default: this.bankType,
enum: [
{ label: '浦发银行', value: '2' }
],
ui: {
widget: 'select',
containsAllLabel: false,
showRequired: true,
change: (value: any) => {
// if (value && this.sf?.value?.ltdId) {
// const parmas = { bankType: value, ltdId: this.sf.getValue('/ltdId') };
// this.getProjectBalanceDetail(parmas);
// }
}
} as SFSelectWidgetSchema
},
availableBalance: { title: '可提现余额', type: 'string', ui: { showRequired: false, widget: 'custom' } },
bankId: {
title: '提现至',
type: 'string',
ui: {
showRequired: true, widget: 'custom'
},
},
amount: {
title: '提现金额',
type: 'string',
ui: {
showRequired: true,
widget: 'custom',
validator: (val) => {
if (!val && val !== 0) {
return [{ keyword: 'required', message: '必填项' }];
} else if (val > this.balanceObj.allBalance) {
return [{ keyword: 'required', message: '提现金额超过可提现余额' }];
}
return [];
}
},
},
payPsd: {
title: '支付密码',
type: 'string',
minLength: 6,
maxLength: 6,
ui: { widget: 'custom' },
},
payPassword: {
title: '',
type: 'string',
ui: {
hidden: true
}
}
},
autocomplete: 'off',
required: ['bankType', 'payPsd']
};
this.ui = {
'*': { spanLabelFixed: 100, grid: { span: 18, gutter: 2 } },
$addBankCard1: {
grid: { span: 24 }
},
$addBankCard2: {
grid: { span: 24 }
}
};
}
save(value: any) {
if (this.sf.valid) {
const { amount, bankId, bankType, ltdName, payPassword } = value;
if (amount > this.balanceObj?.allBalance) {
this.service.msgSrv.warning('提现金额超过可提现余额!');
return;
}
const params = {
amount,
bankId,
bankType,
ltdId: this.record.ltdId,
ltdName,
payPassword
};
this.service.request(this.service.$api_apply_withdraw, { ...params })
.subscribe(res => {
if (res) {
this.service.msgSrv.success('提现成功!');
this.close(true);
}
})
}
}
close(flag: boolean) {
this.modal.destroy(flag);
}
toAddBankPage() {
window.open(`/#/financial-management/bank-card-management/index?ltdId=${this.record?.ltdId}&ltdName=${this.record?.ltdName}`);
}
/**
* 全部提现
*/
allWithdrawal() {
if (!this.sf.getValue('/availableBalance')) {
this.sf.setValue('/amount', '');
return;
}
this.sf.setValue('/amount', this.balanceObj?.allBalance);
}
/**
* 跳转至忘记密码页
*/
toForgetPsdPage() {
window.open('/#/account/edit-paypassword');
}
/**
* 切换银行卡
*/
checkBankCard(e: any) {
this.sf.setValue('/bankId', e);
}
getBankList() {
this.service.request(this.service.$api_bank_card_list, { accountType: '3', roleId: this.record?.ltdId }).subscribe((res) => {
if (res) {
this.bankCardList = res;
}
});
}
/**
* 获取项目账户余额
*/
getProjectBalanceDetail(params = {}) {
this.service.request(this.service.$api_get_account_available_balance, { bankType: this.bankType, ltdId: this.record?.ltdId }).subscribe(res => {
if (res) {
this.balanceObj = res;
this.sf.setValue('/availableBalance', res?.allBalance);
// this.sf.getProperty('/amount')?.updateValueAndValidity();
}
})
}
keydown(e: any) {
if (e.keyCode == 37 || e.keyCode == 39) e.preventDefault();
if (e.keyCode === 8) {
// const payPswVal = this.sf.getValue('/password');
// this.sf.setValue('/password', payPswVal.substr(0, payPswVal.length - 1));
}
}
clickInput(e: any) {
this.psd.nativeElement.focus();
}
changePsd(val: any) {
this.sf.setValue('/payPsd', val);
if (val || val !== '') {
const last = val.substr(val.length - 1);
const password = this.sf.getValue('/payPassword') || '';
const start = this.psd?.nativeElement.selectionStart;
const index = val.lastIndexOf('•');
if (last !== '•') {
if (password.length !== 0) {
// 新增 或 替换
const pre = password.substr(0, index + 1);
const detail = val.substr(index + 1, val.length);
this.sf.setValue('/payPassword', pre + detail);
} else {
// 新增
this.sf.setValue('/payPassword', val);
}
} else {
// 删除
this.sf.setValue('/payPassword', password.substr(0, val.length));
}
const payPswVal = this.sf.getValue('/payPsd');
this.sf.setValue('/payPsd', payPswVal.replace(/./g, "•"));
} else {
this.sf.setValue('/payPassword', '');
}
}
/**
* 设置光标聚焦
*/
setFocus() {
const len = this.psd?.nativeElement.value.length;
this.setSelectionRange(this.psd?.nativeElement, len, len); //将光标定位到文本最后
}
/**
* 设置光标位置
* @param input dom元素
* @param selectionStart 起始位置
* @param selectionEnd 结束位置
*/
setSelectionRange(input: ElementRef | any, selectionStart: number, selectionEnd: number) {
if (input?.setSelectionRange) {
input.focus();
input.setSelectionRange(selectionStart, selectionEnd);
}
else if (input.createTextRange) {
var range = input.createTextRange();
range.collapse(true);
range.moveEnd('character', selectionEnd);
range.moveStart('character', selectionStart);
range.select();
}
}
}

View File

@ -1,14 +1,4 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-18 18:43:42
* @LastEditors : Shiming
* @LastEditTime : 2022-01-25 15:38:21
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\receipt-order\\receipt-order.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'收款单'"> </page-header-wrapper>
<!-- <page-header-wrapper [title]="'收款单'"> </page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
@ -19,28 +9,41 @@
<div nz-col [nzXl]="_$expand ? 24 : 7" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right" [class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<!-- <button nz-button nzType="primary"> 导出</button>
<button nz-button nzType="primary"> 导出核销</button> -->
<button nz-button nzType="primary"> 导出</button>
<button nz-button nzType="primary"> 导出核销</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box" nzBordered>
<div class="d-flex align-items-center mb-md mt-md">
<!-- <button nz-button (click)="this.addInvoice()" nzType="primary">添加收款</button>
<button nz-button (click)="this.addInvoice()" nzType="primary">导入收款</button> -->
<nz-card class="table-box">
<div class="header_box">
<div>
<label class="page_title"> <label class="driver">|</label> 收款单</label>
<label class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张单
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</label>
</div>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
</div>
</div>
<!-- <div class="d-flex align-items-center mb-md mt-md">
<button nz-button (click)="this.addInvoice()" nzType="primary">添加收款</button>
<button nz-button (click)="this.addInvoice()" nzType="primary">导入收款</button>
<div class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张单
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div>
</div>
</div> -->
<st #st [data]="service.$api_get_receipt_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x: '1200px' }" (change)="stChange($event)">
[loading]="false" [scroll]="{ x: '1200px',y:scrollY }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -2,30 +2,38 @@ 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 { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-receipt-order',
templateUrl: './receipt-order.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class ReceiptOrderComponent implements OnInit {
export class ReceiptOrderComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
schema: SFSchema = this.initSF();
selectedRows: any[] = [];
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
@ -48,6 +56,7 @@ export class ReceiptOrderComponent implements OnInit {
});
}
}
this.selectedRows = [];
return requestOptions;
};
@ -72,22 +81,6 @@ export class ReceiptOrderComponent implements OnInit {
// });
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
@ -128,10 +121,7 @@ export class ReceiptOrderComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'driverrecord:receive:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
brmmode: {
@ -140,10 +130,7 @@ export class ReceiptOrderComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'receive:mode' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
arto: {
@ -155,10 +142,7 @@ export class ReceiptOrderComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }),
visibleIf: {
expand: (value: boolean) => value
}
onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q })
}
},
sts: {
@ -167,10 +151,7 @@ export class ReceiptOrderComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'write:off:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
brmdate: {
@ -178,10 +159,7 @@ export class ReceiptOrderComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
createTime: {
@ -189,10 +167,7 @@ export class ReceiptOrderComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
// billHCode: {
@ -219,10 +194,7 @@ export class ReceiptOrderComponent implements OnInit {
type: 'string',
title: '收款备注',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
}
}

View File

@ -1,5 +1,5 @@
<page-header-wrapper [title]="'充值记录'">
</page-header-wrapper>
<!-- <page-header-wrapper [title]="'充值记录'">
</page-header-wrapper> -->
<!-- <nz-card>
<nz-row [nzGutter]="16">
@ -15,7 +15,7 @@
</nz-row>
</nz-card> -->
<nz-card class="search-box" nzBordered>
<!-- <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"
@ -33,11 +33,18 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box" nzBordered>
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 充值记录</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exportList()"> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_recharge_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }">
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }">
<ng-template st-row="transferBankAccount" let-item let-index="index" let-column="column">
{{ item.transferBankOpenName }} <br> {{ item.transferBankCardNumber }}
</ng-template>

View File

@ -1,31 +1,36 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-recharge-record',
templateUrl: './recharge-record.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class RechargeRecordComponent implements OnInit {
export class RechargeRecordComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
schema: SFSchema = this.initSF();
@ViewChild('remarkodal', { static: true })
remarkodal!: any;
rechargeRemark = '';
_$expand = false;
constructor(public service: FreightAccountService, private modal: NzModalService) {}
constructor(public service: FreightAccountService, private modal: NzModalService, public searchDrawerService: SearchDrawerService) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf.value });
@ -70,22 +75,6 @@ export class RechargeRecordComponent implements OnInit {
history.go(-1);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
exportList() {
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_get_exportPageByOperator);
}
@ -93,12 +82,6 @@ export class RechargeRecordComponent implements OnInit {
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
rechargeNo: {
type: 'string',
title: '充值单号',
@ -137,9 +120,6 @@ export class RechargeRecordComponent implements OnInit {
ui: {
placeholder: '请输入',
autocomplete: 'off',
visibleIf: {
expand: (value: boolean) => value
}
}
},
accountType: {
@ -154,9 +134,6 @@ export class RechargeRecordComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
@ -166,9 +143,6 @@ export class RechargeRecordComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder()
}
@ -184,9 +158,6 @@ export class RechargeRecordComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
}

View File

@ -1,4 +1,4 @@
<page-header-wrapper [title]="'退款记录'">
<!-- <page-header-wrapper [title]="'退款记录'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
@ -19,19 +19,24 @@
</button>
</div>
</div>
</nz-card>
</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('4')"></nz-tab>
<nz-tab nzTitle="退款成功" (nzClick)="changeRefundStatus('2')"></nz-tab>
<nz-tab nzTitle="退款失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
</nz-tabset>
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title">
<label class="driver">|</label>
退款记录</label>
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
<nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"> </nz-tab>
<nz-tab nzTitle="待审核" (nzClick)="changeRefundStatus('1')"></nz-tab>
<nz-tab nzTitle="退款中" (nzClick)="changeRefundStatus('4')"></nz-tab>
<nz-tab nzTitle="退款成功" (nzClick)="changeRefundStatus('2')"></nz-tab>
<nz-tab nzTitle="退款失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
</nz-tabset>
</div>
<st #st [data]="service.$api_get_refund_record_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }">
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }">
<ng-template st-row="orderRefundCode" let-item let-index="index" let-column="column">
{{ item.orderRefundCode }} <br> {{ item.refundStatusLabel }}
</ng-template>
@ -42,7 +47,7 @@
</ng-template>
<ng-template st-row="billRefundPaymentVOS" let-item let-index="index" let-column="column">
<ng-container *ngFor="let bill of item.billRefundPaymentVOS">
{{ bill.paymentApplicationCode }}<br>
{{ bill.paymentApplicationCode }}<br>
</ng-container>
</ng-template>
<ng-template st-row="driver" let-item let-index="index" let-column="column">
@ -54,6 +59,13 @@
</st>
</nz-card>
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger (click)="openDrawer()" class="mr-sm">筛选</button>
<button nz-button nzDanger [disabled]="service.http.loading" (click)="exprot()">导出</button>
</div>
</ng-template>
<ng-template #auditModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">

View File

@ -2,32 +2,40 @@ 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 { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-refund-record',
templateUrl: './refund-record.component.html',
styleUrls: ['../../../commom/less/box.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class RefundRecordComponent implements OnInit {
export class RefundRecordComponent extends BasicTableComponent 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();
schema: SFSchema = this.initSF();
_$expand = false;
refundStatus: any = '';
msg = '';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { refundStatus: this.refundStatus || null });
@ -120,22 +128,6 @@ export class RefundRecordComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
@ -177,9 +169,6 @@ export class RefundRecordComponent implements OnInit {
type: 'string',
title: '订单号',
ui: {
visibleIf: {
expand: (value: boolean) => value
},
placeholder: '请输入'
}
},
@ -187,19 +176,13 @@ export class RefundRecordComponent implements OnInit {
type: 'string',
title: '所属项目',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
resourceCode: {
type: 'string',
title: '货源号',
ui: {
visibleIf: {
expand: (value: boolean) => value
},
placeholder: '请输入'
}
},
@ -210,9 +193,6 @@ export class RefundRecordComponent implements OnInit {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
},
nzShowTime: true
} as SFDateWidgetSchema
},
@ -223,10 +203,7 @@ export class RefundRecordComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
asyncData: () => this.service.getNetworkFreightForwarder()
}
},
bankType: {
@ -235,10 +212,7 @@ export class RefundRecordComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'bankname:type' },
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
}
}

View File

@ -1,4 +1,4 @@
<page-header-wrapper [title]="'交易流水'"> </page-header-wrapper>
<!-- <page-header-wrapper [title]="'交易流水'"> </page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
@ -18,13 +18,17 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box pt-xl" nzBordered>
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 交易流水</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exportList()"> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_account_blance" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x: '1200px' }">
<ng-template st-row="amount">
</ng-template>
[loading]="false" [scroll]="{ x: '1200px',y:scrollY }">
</st>
</nz-card>

View File

@ -3,32 +3,29 @@ import { Component, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-transaction-flow',
templateUrl: './transaction-flow.component.html',
styleUrls: ['./transaction-flow.component.less'],
providers: [CurrencyPipe]
styleUrls: ['../../../commom/less/commom-table.less']
})
export class TransactionFlowComponent {
export class TransactionFlowComponent extends BasicTableComponent {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
schema: SFSchema = this.initSF();
_$expand = false;
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
private currencyPipe: CurrencyPipe
) {}
constructor(public service: FreightAccountService, public searchDrawerService: SearchDrawerService) {
super(searchDrawerService);
}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
@ -43,31 +40,10 @@ export class TransactionFlowComponent {
return requestOptions;
};
/**
* 重置表单
*/
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
}
},
createTime: {
title: '交易时间',
type: 'string',
@ -96,9 +72,6 @@ export class TransactionFlowComponent {
title: '订单号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
tradeType: {
@ -120,9 +93,6 @@ export class TransactionFlowComponent {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
@ -137,9 +107,6 @@ export class TransactionFlowComponent {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
@ -155,9 +122,6 @@ export class TransactionFlowComponent {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
@ -166,9 +130,6 @@ export class TransactionFlowComponent {
title: '账户名称',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
projectId: {
@ -178,9 +139,6 @@ export class TransactionFlowComponent {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
},
asyncData: () => this.service.getEnterpriseProject()
},
default: ''
@ -196,9 +154,6 @@ export class TransactionFlowComponent {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
@ -209,9 +164,6 @@ export class TransactionFlowComponent {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
expand: (value: boolean) => value
},
asyncData: () => this.service.getNetworkFreightForwarder()
},
default: ''
@ -225,8 +177,8 @@ export class TransactionFlowComponent {
{ title: '交易时间', index: 'createTime', width: 180 },
{ title: '流水号', index: 'transactionNumber', width: 180 },
{ title: '交易类型', index: 'tradeTypeLabel', width: 120 },
{ title: '关联单号', index: 'businessNumber', width: 150 },
{ title: '订单号', index: 'orderSn', width: 150 },
{ title: '关联单号', index: 'businessNumber', width: 170 },
{ title: '订单号', index: 'orderSn', width: 170 },
{ title: '账户类型', index: 'accountTypeLabel', width: 130 },
{ title: '账户名称', index: 'roleName', width: 180 },
{ title: '所属项目', index: 'projectName', width: 140 },

View File

@ -1,4 +1,4 @@
<page-header-wrapper [title]="'凭证管理'">
<!-- <page-header-wrapper [title]="'凭证管理'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
@ -11,29 +11,38 @@
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['FINANCIAL-VOUCHER-list']">查询</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<!-- <button nz-button [disabled]="false"> 导出</button>
<button nz-button [disabled]="false"> 导出明细</button> -->
<button nz-button [disabled]="false"> 导出</button>
<button nz-button [disabled]="false"> 导出明细</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="content-box" nzBordered>
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 凭证管理</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['FINANCIAL-VOUCHER-list']">筛选</button>
</div>
</div>
<div class="d-flex align-items-center mb-md mt-md">
<!-- <button nz-button nzType="primary">新建凭证</button>
<!-- <div class="d-flex align-items-center mb-md mt-md">
<button nz-button [disabled]="false"> 导出</button>
<button nz-button [disabled]="false"> 导出明细</button>
<button nz-button nzType="primary">新建凭证</button>
<button nz-button nzType="primary">凭证导入</button>
<div class="ml-md">
已选择
<strong class="text-primary">{{ selectedRows.length }}</strong> 张发票
<a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a>
</div> -->
</div>
</div>
</div> -->
<st #st [data]="service.$api_get_fico_vch_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }" (change)="stChange($event)">
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -1,43 +1,36 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-18 15:57:44
* @LastEditors : Shiming
* @LastEditTime : 2022-04-09 16:36:42
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\voucher-management\\voucher-management.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { CurrencyPipe } from '@angular/common';
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 { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-voucher-management',
templateUrl: './voucher-management.component.html',
styleUrls: ['../../../commom/less/box.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class VoucherManagementComponent implements OnInit {
export class VoucherManagementComponent extends BasicTableComponent 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;
schema: SFSchema = this.initSF();
selectedRows: any[] = [];
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(public service: FreightAccountService, private router: Router, public searchDrawerService: SearchDrawerService) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
@ -71,22 +64,6 @@ export class VoucherManagementComponent implements OnInit {
}
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
@ -128,10 +105,7 @@ export class VoucherManagementComponent implements OnInit {
title: '原始单号',
ui: {
autocomplete: 'off',
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
sourceType: {
@ -155,10 +129,7 @@ export class VoucherManagementComponent implements OnInit {
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
createTime: {
@ -166,20 +137,14 @@ export class VoucherManagementComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
remarks: {
type: 'string',
title: '凭证摘要',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vctype: {
@ -188,10 +153,7 @@ export class VoucherManagementComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'credential:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: ''
},
@ -211,20 +173,14 @@ export class VoucherManagementComponent implements OnInit {
type: 'string',
title: '借方金额',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
crmoney: {
type: 'string',
title: '贷方金额',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vcltdid: {
@ -233,10 +189,7 @@ export class VoucherManagementComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
sts: {
@ -245,10 +198,7 @@ export class VoucherManagementComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'credential:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: ''
},
@ -256,20 +206,14 @@ export class VoucherManagementComponent implements OnInit {
type: 'string',
title: 'NC凭证',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vc2code: {
type: 'string',
title: '汇总凭证号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
importnc: {
@ -278,10 +222,7 @@ export class VoucherManagementComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
isvc2: {
@ -294,10 +235,7 @@ export class VoucherManagementComponent implements OnInit {
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
}
}

View File

@ -1,14 +1,4 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-18 15:57:44
* @LastEditors : Shiming
* @LastEditTime : 2022-01-20 15:23:44
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\voucher-summary\\voucher-summary.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'凭证汇总'">
<!-- <page-header-wrapper [title]="'凭证汇总'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
@ -23,18 +13,26 @@
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="primary" [disabled]="false" (click)='exportList()'> 导出</button>
<!-- <button nz-button nzType="primary" [disabled]="false"> 导出明细</button>
<button nz-button nzType="primary" [disabled]="false"> 导出凭证</button> -->
<button nz-button nzType="primary" [disabled]="false"> 导出明细</button>
<button nz-button nzType="primary" [disabled]="false"> 导出凭证</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card nzBordered>
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 凭证汇总</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['FINANCIAL-VOUCHER-list']">筛选</button>
<button nz-button nzDanger (click)='exportList()'> 导出</button>
</div>
</div>
<st #st [data]="service.$api_get_fico_vch_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }" (change)="stChange($event)">
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -3,36 +3,41 @@ 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 { SearchDrawerService } from '@shared';
import { DateHelperByDatePipe } from 'ng-zorro-antd/i18n';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-voucher-summary',
templateUrl: './voucher-summary.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class VoucherSummaryComponent implements OnInit {
export class VoucherSummaryComponent extends BasicTableComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
schema: SFSchema = this.initSF();
selectedRows: any[] = [];
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
private dateHelperByDatePipe: DateHelperByDatePipe
) {}
private dateHelperByDatePipe: DateHelperByDatePipe,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { isvc2: 1 });
if (this.sf) {
@ -72,22 +77,6 @@ export class VoucherSummaryComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
exportList() {
this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_fico_vch_page);
}
@ -133,10 +122,7 @@ export class VoucherSummaryComponent implements OnInit {
title: '原始单号',
ui: {
autocomplete: 'off',
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
sourceType: {
@ -144,10 +130,7 @@ export class VoucherSummaryComponent implements OnInit {
title: '原始单类型',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
createTime: {
@ -155,20 +138,14 @@ export class VoucherSummaryComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
remarks: {
type: 'string',
title: '凭证摘要',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vctype: {
@ -177,10 +154,7 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'credential:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
},
default: ''
},
@ -190,30 +164,21 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
drmoney: {
type: 'string',
title: '借方金额',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
crmoney: {
type: 'string',
title: '贷方金额',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vcltdid: {
@ -222,10 +187,7 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
sts: {
@ -234,30 +196,21 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'credential:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
feecode: {
type: 'string',
title: 'NC凭证',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
vccode: {
type: 'string',
title: '凭证号',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
},
s22t2ss: {
@ -266,10 +219,7 @@ export class VoucherSummaryComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请选择'
}
},
createt1im2e: {
@ -277,10 +227,7 @@ export class VoucherSummaryComponent implements OnInit {
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
}
}

View File

@ -210,7 +210,7 @@ export class WithdrawalsDetailComponent implements OnInit {
enum: [
{label: '全部', value: ''},
{label: '是', value: '1'},
{label: '否', value: '2'}
{label: '否', value: '0'}
],
ui: {
widget: 'select',

View File

@ -1,5 +1,5 @@
<page-header-wrapper [title]="'提现记录'">
</page-header-wrapper>
<!-- <page-header-wrapper [title]="'提现记录'">
</page-header-wrapper> -->
<!-- <nz-card>
<nz-row [nzGutter]="16">
@ -22,7 +22,7 @@
</nz-row>
</nz-card> -->
<nz-card class="search-box" nzBordered>
<!-- <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"
@ -39,17 +39,22 @@
</button>
</div>
</div>
</nz-card>
</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>
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title">
<label class="driver">|</label>
提现记录</label>
<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>
</div>
<ng-template #extraTemplate>
<div class="d-flex align-items-center ">
@ -60,12 +65,14 @@
totalCallNo }}</strong>
<a *ngIf="totalCallNo > 0" (click)="st.clearCheck();totalCallNo=0" class="ml-lg">清空</a>
</div>
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exprot()"> 导出</button>
<button nz-button (click)="this.auditAction(null)">审核</button>
</div>
</ng-template>
<st #st [data]="service.$api_get_refund_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }" (change)="stChange($event)">
[loading]="false" [scroll]="{ x:'1200px',y:scrollY }" (change)="stChange($event)">
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">
{{ item.bankName }} <br> {{ item.bankCardNumber }}
</ng-template>

View File

@ -2,36 +2,45 @@ import { Component, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
selector: 'app-withdrawals-record',
templateUrl: './withdrawals-record.component.html',
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class WithdrawalsRecordComponent {
export class WithdrawalsRecordComponent extends BasicTableComponent {
@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;
schema: SFSchema = this.initSF();
selectedRows: any[] = [];
totalCallNo = 0;
refundStatus: any = '';
msg = '';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: FreightAccountService,
private nzModalService: NzModalService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
@ -40,10 +49,12 @@ export class WithdrawalsRecordComponent {
start: this.sf.value.createTime?.[0] || '',
end: this.sf.value.createTime?.[1] || ''
},
refundStatus: this.refundStatus || null
});
}
delete requestOptions?.body?.expand;
this.selectedRows = [];
this.totalCallNo = 0;
Object.assign(requestOptions.body, { refundStatus: this.refundStatus || null });
return requestOptions;
};
@ -145,31 +156,9 @@ export class WithdrawalsRecordComponent {
});
}
/**
* 重置表单
*/
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: '提现单号',
@ -177,15 +166,6 @@ export class WithdrawalsRecordComponent {
placeholder: '请输入'
}
},
// refundStatus: {
// type: 'string',
// title: '提现状态',
// ui: {
// widget: 'dict-select',
// params: { dictKey: 'refund:apply:status' },
// placeholder: '请选择'
// }
// },
createTime: {
title: '提现时间',
type: 'string',
@ -206,13 +186,14 @@ export class WithdrawalsRecordComponent {
accountType: {
type: 'string',
title: '账户类型',
enum: [
{label: '全部', value: ''},
{label: '个人合伙人', value: '4'},
{label: '企业合伙人', value: '5'}
],
ui: {
widget: 'dict-select',
params: { dictKey: 'bank:type' },
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
ltdId: {
@ -222,10 +203,7 @@ export class WithdrawalsRecordComponent {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
asyncData: () => this.service.getNetworkFreightForwarder()
}
},
bankType: {
@ -234,10 +212,7 @@ export class WithdrawalsRecordComponent {
ui: {
widget: 'dict-select',
params: { dictKey: 'bankname:type' },
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
placeholder: '请输入'
}
}
}
@ -246,7 +221,7 @@ export class WithdrawalsRecordComponent {
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox' },
{ title: '', index: 'key', type: 'checkbox', className: 'text-center' },
{ title: '提现时间', index: 'createTime', width: 180 },
{ title: '提现单号', index: 'refundApplyCode', width: 120 },
{ title: '网络货运人', index: 'ltdName', width: 140 },

View File

@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FreightAccountComponent } from './components/freight-account/freight-account.component';
import { DriverAccountComponent } from './components/driver-account/driver-account.component';
import { RechargeRecordComponent } from './components/recharge-record/recharge-record.component';
import { WithdrawalsRecordComponent } from './components/withdrawals-record/withdrawals-record.component';
import { SharedModule } from '@shared';
import { FinancialManagementRoutingModule } from './financial-managemen-routing.module';
@ -39,6 +38,8 @@ import { AbnormalGoldDetailComponent } from './components/abnormal-gold/abnormal
import { CwcBankCardManagementIndexComponent } from './components/bank-card-management/index/index.component';
import { CwcBankCardManagementBindComponent } from './components/bank-card-management/bind/bind.component';
import { CwcBankCardManagementAddComponent } from './components/bank-card-management/add/add.component';
import { CwcAccountManagementWithdrawDepositComponent } from './components/platform-account/withdraw-deposit/withdraw-deposit.component';
import { RechargeRecordComponent } from './components/recharge-record/recharge-record.component';
const ROUTESCOMPONENTS = [
FreightAccountComponent,
@ -74,7 +75,8 @@ const ROUTESCOMPONENTS = [
AbnormalGoldDetailComponent,
CwcBankCardManagementIndexComponent,
CwcBankCardManagementBindComponent,
CwcBankCardManagementAddComponent
CwcBankCardManagementAddComponent,
CwcAccountManagementWithdrawDepositComponent
];
const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, ClearingModalComponent];

View File

@ -8,6 +8,8 @@ export class BankCardManagementService extends BaseService {
$api_bank_card_list = `/api/fcc/bankInfoOBC/list/myBankInfo`; // 获取银行卡列表
$api_bank_card_del = `/api/fcc/bankInfoOBC/delete`; // 删除银行卡
$api_bank_card_add = `/api/fcc/bankInfoOBC/save`;//新增银行卡
$api_get_account_available_balance = `/api/fcc/accountBalance/getWithdrawalAccountBalanceOperator`; //平台可提现金额查询
$api_apply_withdraw = `/api/fcc/refundApplicationOBC/addAgreeRefund`; // 提现申请
constructor(public injector: Injector) {
super(injector);
}

View File

@ -9,41 +9,18 @@
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper>
<!-- <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'"
[disabled]="!sf?.valid"
[loading]="false"
(formSubmit)="st?.load(1)"
(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"
[nzLoading]="service.http.loading"
(click)="search()"
acl
[acl-ability]="['ORDER-COMPLIANCE-AUDIT-search']"
>查询</button
>
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-export']" (click)="exprot()"
>导出</button
>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
[acl-ability]="['ORDER-COMPLIANCE-AUDIT-search']">查询</button>
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-export']"
(click)="exprot()">导出</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
@ -52,23 +29,25 @@
</div>
</ng-container>
</div>
</nz-card>
</nz-card> -->
<nz-card>
<div style="margin-top: 15px">
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_abnormalWarning"
<nz-card class="table-box">
<div class="header_box">
<label class="page_title"> <label class="driver">|</label> 异常预警</label>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['ORDER-COMPLIANCE-AUDIT-search']">筛选</button>
<button nz-button nzDanger acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-export']" (click)="exprot()">导出</button>
</div>
</div>
<div>
<st #st [bordered]="true" [scroll]="{ x: '2000px' ,y:scrollY }" [data]="service.$api_get_abnormalWarning"
[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] }"
[loading]="false"
>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
<ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }} </div>
</ng-template>
@ -84,11 +63,14 @@
<span>{{ item?.billStatusLabel }}</span>
</div>
<div>
<span >{{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ? '':item?.serviceTypeLabel}}</span>
<span>{{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ?
'':item?.serviceTypeLabel}}</span>
</div>
</ng-template>
</st>
</div>
</nz-card>
<ng-template #extraTemplate>
</ng-template>

View File

@ -1,29 +1,24 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service';
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
import { of } from 'rxjs';
import { ShipperBaseService } from '@shared';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { Router } from '@angular/router';
import { OneCarOrderAppealComponent } from '../../modal/audit/appeal/appeal.component';
import { BasicTableComponent } from 'src/app/routes/commom';
@Component({
selector: 'app-order-management-abnormal-warning',
templateUrl: './abnormal-warning.component.html',
styleUrls: ['./abnormal-warning.component.less']
styleUrls: ['../../../commom/less/commom-table.less', './abnormal-warning.component.less']
})
export class OrderManagementAbnormalWarningComponent implements OnInit {
ui: SFUISchema = {};
export class OrderManagementAbnormalWarningComponent extends BasicTableComponent implements OnInit {
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
changeViewId: any; // 查看运费变更记录id - 用于查看
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
changeViewId: any; // 查看运费变更记录id - 用于查看
auditId: any;
auditIdR: any;
auditMany = false;
@ -31,22 +26,23 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
isVisibleEvaluate = false;
isVisible = false;
isVisibleRE = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
@ViewChild('stFloat') private readonly stFloat!: STComponent;
@ViewChild('stFloatView') private readonly stFloatView!: STComponent;
columns: STColumn[] = [];
columnsFloat: STColumn[] = [];
columnsFloatView: STColumn[] = [];
ViewCause: any; // 变更运费查看数据
ViewCause: any; // 变更运费查看数据
constructor(
public service: OrderManagementService,
private modal: NzModalService,
public shipperservice: ShipperBaseService,
private router: Router
) { }
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
* 查询参数
@ -96,14 +92,12 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
billCode: {
type: 'string',
title: '订单号',
ui: {
}
ui: {}
},
wayBillCode: {
type: 'string',
title: '运单号',
ui: {
}
ui: {}
},
serviceType: {
title: '服务类型',
@ -112,7 +106,7 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'service:type' },
containsAllLabel: true,
containsAllLabel: true
} as SFSelectWidgetSchema
},
resourceType: {
@ -120,12 +114,9 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
type: 'string',
default: '',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
},
widget: 'dict-select',
params: { dictKey: 'goodresource:type' },
containsAllLabel: true,
containsAllLabel: true
} as SFSelectWidgetSchema
},
shipperId: {
@ -137,11 +128,8 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
let str = q.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -150,44 +138,24 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
} else {
return of([]);
}
},
}
} as SFSelectWidgetSchema
},
loadingPlace: {
type: 'string',
title: '装货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
dischargePlace: {
type: 'string',
title: '卸货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
driverName: {
title: '承运司机',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
carNo: {
title: '车牌号',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
warningTime: {
title: '预警时间',
@ -197,15 +165,11 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
mode: 'range',
format: 'yyyy-MM-dd',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
}
},
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
/**
@ -227,13 +191,19 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
className: 'text-left',
index: 'wayCode'
},
{ title: '服务类型', index: 'serviceTypeLabel', width: '220px', className: 'text-left',format: (item) => {
return item?.resourceTypeLabel + item?.serviceTypeLabel
} },
{
title: '服务类型',
index: 'serviceTypeLabel',
width: '220px',
className: 'text-left',
format: item => {
return item?.resourceTypeLabel + item?.serviceTypeLabel;
}
},
{ title: '货主', index: 'shipperName', width: '220px', className: 'text-left' },
{ title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left' },
{ title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left' },
{ title: '司机', render: 'driverName', width: '180px', className: 'text-left' },
{ title: '司机', render: 'driverName', width: '180px', className: 'text-left' },
{ title: '车牌号', index: 'carNo', width: '180px', className: 'text-left' },
{ title: '预警类型', index: 'warningTypeLabel', width: '180px', className: 'text-left' },
{
@ -252,39 +222,15 @@ export class OrderManagementAbnormalWarningComponent implements OnInit {
title: '提醒内容',
className: 'text-left',
width: '250px',
index: 'warningContent',
},
index: 'warningContent'
}
];
}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
tabChange(item: any) {}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_abnormalWarning_asyncExport);
}
tabChange(item: any) { }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_abnormalWarning_asyncExport);
}
}

View File

@ -4,37 +4,19 @@
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-04-14 10:53:35
* @LastEditTime : 2022-04-22 16:51:29
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk\\bulk.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card>
<!-- <nz-card>
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf
#sf
[schema]="schema"
[ui]="ui"
[mode]="'search'"
[disabled]="!sf?.valid"
[loading]="false"
(formSubmit)="st?.load(1)"
(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" [nzLoading]="loading" (click)="search()" acl [acl-ability]="['ORDER-BULK-search']"
>查询</button
>
<button nz-button nzType="primary" [nzLoading]="loading" (click)="openDrawer()" acl
[acl-ability]="['ORDER-BULK-search']">筛选</button>
<button nz-button nzType="primary" [disabled]="loading" (click)="exprot()">导出</button>
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
@ -42,32 +24,30 @@
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
</div>
</nz-card>
</nz-card> -->
<nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'运输中(' + tabs?.GoingQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px">
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_listBulkPage"
[columns]="columns"
[req]="{ process: beforeReq }"
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title">
<label class="driver">|</label>
大宗订单</label>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'运输中(' + tabs?.GoingQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
</nz-tabset>
</div>
<div>
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_listBulkPage"
[columns]="columns" [req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="false"
>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
<ng-template st-row="freightPrice" let-item let-index="index">
{{ item.freightPrice | currency }}
</ng-template>
@ -76,16 +56,19 @@
<div *ngIf="item?.unloadTime">卸 | {{ item?.unloadTime }}</div>
</ng-template>
<ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}} </div>
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" +
item?.carNo : ''}} </div>
</ng-template>
<ng-template st-row="settlementWeight" let-item let-index="index">
<div> {{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? item.settlementVolume + '方 ': ''}}</div>
<div> {{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ?
item.settlementVolume + '方 ': ''}}</div>
</ng-template>
<ng-template st-row="payeeName" let-item let-index="index">
<div> {{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }} </div>
<div *ngIf="item.payeeName !== item.driverName"> {{ item?.payeeName }}{{ item?.payeePhone ? "/" +
item?.payeePhone : '' }} </div>
</ng-template>
<ng-template st-row="createUserName" let-item let-index="index">
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }} </div>
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }} </div>
</ng-template>
<ng-template st-row="billCode" let-item let-index="index">
<a [routerLink]="'bulk-detail/' + item.id">{{ item.billCode }}</a>
@ -108,7 +91,8 @@
<div *ngIf="item.mybidDetailInfo.length > 0">
<p *ngFor="let data of item.mybidDetailInfo">
<span *ngIf="data.expenseCode !== 'FL'">{{ data.expenseName }}{{ data.price | currency }}</span>
<span *ngIf="data.expenseCode === 'FL'" >{{ data.expenseName }}{{ (data.price * 100).toFixed(2) + '%' }}</span>
<span *ngIf="data.expenseCode === 'FL'">{{ data.expenseName }}{{ (data.price * 100).toFixed(2) + '%'
}}</span>
<span *ngIf="data.paymentStatusLabel" style="color: #f59a63">{{ data.paymentStatusLabel }}</span>
</p>
</div>
@ -117,25 +101,13 @@
</div>
</nz-card>
<nz-modal
[(nzVisible)]="isVisible"
[nzWidth]="600"
[nzFooter]="nzModalFooter"
nzTitle="运费变更记录"
(nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel('0')"
>
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooter" nzTitle="运费变更记录" (nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel('0')">
<ng-container *nzModalContent>
<st
#stFloat
size="small"
[bordered]="true"
[data]="service.$api_get_listChangeApply"
[columns]="columnsFloat"
<st #stFloat size="small" [bordered]="true" [data]="service.$api_get_listChangeApply" [columns]="columnsFloat"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }">
<ng-template st-row="order" let-item let-index="index">
{{ index + 1 }}
</ng-template>
@ -155,14 +127,8 @@
</ng-template>
</nz-modal>
<nz-modal
[(nzVisible)]="isVisibleView"
[nzWidth]="600"
[nzFooter]="nzModalFooterview"
nzTitle="查看"
(nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel('1')"
>
<nz-modal [(nzVisible)]="isVisibleView" [nzWidth]="600" [nzFooter]="nzModalFooterview" nzTitle="查看"
(nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('1')">
<ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [formData]="ViewCause" [compact]="true" [button]="'none'">
<ng-template sf-template="no" let-me let-ui="uiView" let-schema="schemaView">
@ -172,30 +138,21 @@
</div>
</ng-template>
</sf>
<st
#stFloatView
multiSort
size="small"
[bordered]="true"
[data]="service.$api_getChangeRecordBulkDetail"
<st #stFloatView multiSort size="small" [bordered]="true" [data]="service.$api_getChangeRecordBulkDetail"
[columns]="columnsFloatView"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeViewParams }"
[res]="{ reName: { list: 'data.list', total: 'data.total' } }"
>
[res]="{ reName: { list: 'data.list', total: 'data.total' } }">
<ng-template st-row="amountBeforeChange" let-item let-index="index">
{{ item.amountBeforeChange | currency }}
</ng-template>
<ng-template st-row="amountchangeValue" let-item let-index="index"> ¥{{ item.amountchangeValue | number: '0.2-2' }} </ng-template>
<ng-template st-row="amountchangeValue" let-item let-index="index"> ¥{{ item.amountchangeValue | number: '0.2-2'
}} </ng-template>
<ng-template st-row="amountAfterChange" let-item let-index="index">
{{ item.amountAfterChange | currency }}
</ng-template>
</st>
<div
><span>变更原因:{{ ViewCause?.changeCause }}</span></div
>
<div
><span>拒绝原因:{{ ViewCause?.refuseCause }}</span></div
>
<div><span>变更原因:{{ ViewCause?.changeCause }}</span></div>
<div><span>拒绝原因:{{ ViewCause?.refuseCause }}</span></div>
<div><span>注:附加费依据调整后的运输费用重新计算</span></div>
</ng-container>
<ng-template #nzModalFooterview>
@ -204,13 +161,8 @@
</ng-template>
</nz-modal>
<nz-modal
[(nzVisible)]="isVisibleEvaluate"
[nzWidth]="600"
[nzFooter]="nzModalFooterEvaluate"
(nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel('2')"
>
<nz-modal [(nzVisible)]="isVisibleEvaluate" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()"
(nzOnCancel)="handleCancel('2')">
<ng-container *nzModalContent>
<nz-tabset>
<nz-tab nzTitle="货主评价">
@ -239,26 +191,21 @@
<ng-template #enable>
<div class="ant-popover-message">
<i nz-icon nzType="info-circle" nzTheme="fill"></i>
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px"
>已选择{{ selectedRows?.length || 0 }}条订单,确认批量签收吗?
<div class="ant-popover-message-title ng-star-inserted self-ant-popover-title" style="font-size: 16px">已选择{{
selectedRows?.length || 0 }}条订单,确认批量签收吗?
</div>
<div class="ant-popover-message-title ng-star-inserted"> 签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。 </div>
</div>
</ng-template>
<ng-template #extraTemplate>
<div *ngIf="resourceStatus == 4">
<button
nz-button
nzType="primary"
nzGhost
nz-popconfirm
[nzPopconfirmTitle]="enable"
(nzOnConfirm)="userAction()"
nzPopconfirmPlacement="bottomRight"
acl
[acl-ability]="['ORDER-BULK-batchSignBulkOrder']"
>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="loading" (click)="openDrawer()" acl
[acl-ability]="['ORDER-BULK-search']">筛选</button>
<button nz-button nzDanger [disabled]="loading" (click)="exprot()">导出</button>
<button *ngIf="resourceStatus == 4" nz-button nzType="primary" nzGhost nz-popconfirm [nzPopconfirmTitle]="enable"
(nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl
[acl-ability]="['ORDER-BULK-batchSignBulkOrder']">
批量签收
</button>
</div>
</ng-template>
</ng-template>

View File

@ -1,4 +1,4 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
@ -7,20 +7,20 @@ import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service';
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
import { of } from 'rxjs';
import { of, Subscription } from 'rxjs';
import { ShipperBaseService } from '@shared';
import { Router, ActivatedRoute } from '@angular/router';
import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component';
import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
@Component({
selector: 'app-supply-management-bulk',
templateUrl: './bulk.component.html',
styleUrls: ['./bulk.component.less']
styleUrls: ['../../../commom/less/commom-table.less','./bulk.component.less']
})
export class OrderManagementBulkComponent implements OnInit {
ui: SFUISchema = {};
export class OrderManagementBulkComponent extends BasicTableComponent implements OnInit {
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
auditMany = false;
isVisibleView = false;
@ -54,13 +54,17 @@ export class OrderManagementBulkComponent implements OnInit {
GoingQuantity: 0,
totalCount: 0
};
constructor(
public service: OrderManagementService,
private modal: NzModalService,
public shipperservice: ShipperBaseService,
private router: Router,
private ar: ActivatedRoute,
) { }
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
* 查询参数
@ -70,14 +74,14 @@ export class OrderManagementBulkComponent implements OnInit {
if (this.resourceStatus) {
a.billStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || {});
const params: any = Object.assign({}, this.sfValue || {});
delete params._$expand;
return {
...a,
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || ''
start: this.sfValue?.createTime?.[0] || '',
end: this.sfValue?.createTime?.[1] || ''
}
};
}
@ -86,17 +90,17 @@ export class OrderManagementBulkComponent implements OnInit {
if (this.resourceStatus) {
a.billStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || {});
const params: any = Object.assign({}, this.sfValue || {});
delete params._$expand;
console.log(params);
if (this.sf) {
if (this.sfValue) {
Object.assign(requestOptions.body, {
...a,
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || ''
start: this.sfValue?.createTime?.[0] || '',
end: this.sfValue?.createTime?.[1] || ''
}
});
}
@ -104,8 +108,8 @@ export class OrderManagementBulkComponent implements OnInit {
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
console.log(data)
this.loading = false
console.log(data);
this.loading = false;
return data.map(item => ({
...item,
disabled: item.billStatus !== '4'
@ -119,6 +123,7 @@ export class OrderManagementBulkComponent implements OnInit {
id: this.changeId
};
}
search() {
this.st?.load();
this.getGoodsSourceStatistical();
@ -185,14 +190,14 @@ export class OrderManagementBulkComponent implements OnInit {
type: 'string',
title: '订单号',
ui: {
placeholder: '最多100个单号空号隔开',
placeholder: '最多100个单号空号隔开'
}
},
wayBillCode: {
type: 'string',
title: '运单号',
ui: {
placeholder: '最多100个单号空号隔开',
placeholder: '最多100个单号空号隔开'
}
},
resourceCode: {
@ -208,11 +213,8 @@ export class OrderManagementBulkComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => {
let str = q.replace(/^\s+|\s+$/g, "");
let str = q.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -233,55 +235,27 @@ export class OrderManagementBulkComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请先选择货主',
visibleIf: {
_$expand: (value: boolean) => value
},
} as SFSelectWidgetSchema
},
loadingPlace: {
type: 'string',
title: '装货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
dischargePlace: {
type: 'string',
title: '卸货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
driverName: {
title: '承运司机',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
carNo: {
title: '车牌号',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
carCaptainName: {
title: '车队长',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
paymentStatus: {
title: '支付状态',
@ -290,9 +264,6 @@ export class OrderManagementBulkComponent implements OnInit {
widget: 'dict-select',
params: { dictKey: 'overall:payment:status' },
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
createTime: {
@ -303,9 +274,6 @@ export class OrderManagementBulkComponent implements OnInit {
mode: 'range',
format: 'yyyy-MM-dd',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
riskStatus: {
@ -319,9 +287,6 @@ export class OrderManagementBulkComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
}
}
},
enterpriseInfoName: {
@ -331,9 +296,6 @@ export class OrderManagementBulkComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
asyncData: () => this.shipperservice.getNetworkEnterpriseName()
}
},
@ -345,9 +307,6 @@ export class OrderManagementBulkComponent implements OnInit {
widget: 'dict-select',
params: { dictKey: 'service:type' },
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
settlementBasis: {
@ -358,15 +317,11 @@ export class OrderManagementBulkComponent implements OnInit {
containsAllLabel: true,
params: { dictKey: 'goodresource:settlement:type' },
containAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
}
},
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
/**
* 初始化查询表单
@ -493,7 +448,7 @@ export class OrderManagementBulkComponent implements OnInit {
title: '结算数量',
render: 'settlementWeight',
width: '170px',
className: 'text-left',
className: 'text-left'
// format: (item: any) =>
// `${item.settlementWeight || '0'}吨/
// ${item.settlementVolume || '0'}方`
@ -509,7 +464,6 @@ export class OrderManagementBulkComponent implements OnInit {
title: '车队长',
className: 'text-left',
width: '180px',
index: 'payeeName',
render: 'payeeName'
},
{
@ -534,27 +488,31 @@ export class OrderManagementBulkComponent implements OnInit {
title: '操作',
fixed: 'right',
width: '130px',
className: 'text-left block-td',
className: 'text-center block-td',
buttons: [
{
text: '运费变更记录',
click: _record => this.OpenPrice(_record),
iif: item =>
item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6',
acl: { ability: ['ORDER-BULK-listChangeApply'] },
item.billStatus == '4' ||
item.billStatus == '5' ||
item.billStatus == '2' ||
item.billStatus == '3' ||
item.billStatus == '6',
acl: { ability: ['ORDER-BULK-listChangeApply'] }
},
{
text: '查看评价',
click: _record => this.viewEvaluate(_record),
iif: item => item.billStatus == '5',
acl: { ability: ['ORDER-BULK-evaluation'] },
acl: { ability: ['ORDER-BULK-evaluation'] }
},
{
text: '查看详情',
click: (item: any) => {
this.router.navigate(['./bulk-detail', item.id], { relativeTo: this.ar });
},
acl: { ability: ['USERCENTER-FREIGHT-USER-view'] },
acl: { ability: ['USERCENTER-FREIGHT-USER-view'] }
},
{
text: '变更运费',
@ -563,32 +521,36 @@ export class OrderManagementBulkComponent implements OnInit {
const flag = _record.mybidDetailInfo.find((item: any) => item?.expenseCode === 'TRA' && item?.paymentStatus === '4');
return _record.billStatus !== '1' && _record.billStatus !== '6' && !flag;
},
acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] },
acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] }
},
{
text: '确认签收',
click: _record => this.confirmReceipt(_record),
iif: item => item.billStatus == '4',
acl: { ability: ['VEHICLE-LIST-view'] },
acl: { ability: ['VEHICLE-LIST-view'] }
},
{
text: '取消订单',
click: _record => this.cancellation(_record),
iif: item =>
item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1',
acl: { ability: ['ORDER-BULK-signBulkOrder'] },
item.billStatus == '4' ||
item.billStatus == '5' ||
item.billStatus == '2' ||
item.billStatus == '3' ||
item.billStatus == '1',
acl: { ability: ['ORDER-BULK-signBulkOrder'] }
},
{
text: '申请退款',
click: (_record) => this.applyRefund(_record),
click: _record => this.applyRefund(_record),
iif: item => item.isApplyForRefund,
acl: { ability: ['ORDER-VEHICLE-modificationOrder'] },
acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }
},
{
text: '修改订单',
click: _record => this.changeOrder(_record),
iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3',
acl: { ability: ['ORDER-BULK-BulkBillDetail'] },
acl: { ability: ['ORDER-BULK-BulkBillDetail'] }
}
]
}
@ -664,27 +626,13 @@ export class OrderManagementBulkComponent implements OnInit {
id: this.changeViewId
};
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
tabChange(item: any) {}
/**
* 导入货源
*/
importGoodsSource() { }
audit(item: any) { }
importGoodsSource() {}
audit(item: any) {}
/*
* 审核关闭弹窗
@ -705,7 +653,7 @@ export class OrderManagementBulkComponent implements OnInit {
/**
* 审核通过按钮
*/
handleOK() { }
handleOK() {}
OpenPrice(item: any) {
this.changeId = item.id;
this.isVisible = true;
@ -839,8 +787,8 @@ export class OrderManagementBulkComponent implements OnInit {
this.router.navigate(['order-management/bulk-detailChange', value.id]);
}
/**
*申请退款
*/
*申请退款
*/
applyRefund(item: any) {
const modalRef = this.modal.create({
nzTitle: '申请退款',
@ -853,7 +801,6 @@ export class OrderManagementBulkComponent implements OnInit {
});
modalRef.afterClose.subscribe((res: boolean) => {
if (res) {
this.resetSF;
this.st.load();
}
});

View File

@ -195,7 +195,7 @@ export class OrderManagementComplaintDetailComponent implements OnInit {
}
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
if(res) {
this.service.msgSrv.success('已拒绝')
this.service.msgSrv.success('已取消')
this.isVisibleRE = false
this.getDetail(this.id);
this.complaintStatus = true;
@ -214,9 +214,10 @@ export class OrderManagementComplaintDetailComponent implements OnInit {
return
}
const paramsa = {
...this.sfView.value,
id: this.channelId
}
this.service.request(this.service.$api_get_canelComplaint, paramsa).subscribe((res: any) =>{
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false

View File

@ -10,59 +10,67 @@
-->
<!-- 搜索表单 -->
<page-header-wrapper title="" [tab]="tpTab">
<!-- <page-header-wrapper title="" [tab]="tpTab">
<ng-template #tpTab>
<nz-tabset [nzSelectedIndex]="selectedIndex">
<nz-tabset [nzSelectedIndex]="selectedIndex" [nzTabBarExtraContent]="extraTemplate">
<nz-tab *ngFor="let tab of mainTabs" [nzTitle]="tab.name" (nzSelect)="selectMainTab(tab)">
</nz-tab>
</nz-tabset>
</ng-template>
</page-header-wrapper>
<nz-card>
</page-header-wrapper> -->
<!-- <nz-card>
<div nz-row nzGutter="12">
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<div nz-col [nzSpan]="24">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="24" style="display: flex; justify-content: flex-end;">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading"
(click)="st?.load(1)" acl [acl-ability]="['ORDER-COMPLAINT-search']">查询</button>
<button nz-button nzType="primary" acl [acl-ability]="['ORDER-COMPLAINT-export']" (click)="exprot()"
>导出</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
<div nz-col [nzSpan]="24">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="24" style="display: flex; justify-content: flex-end;">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading"
(click)="st?.load(1)" acl [acl-ability]="['ORDER-COMPLAINT-search']">查询</button>
<button nz-button nzType="primary" acl [acl-ability]="['ORDER-COMPLAINT-export']" (click)="exprot()">导出</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" >
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name" (nzClick)="tabChange(i)">
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"> <label class="driver">|</label> 投诉管理</label>
<nz-tabset [nzSelectedIndex]="selectedIndex" [nzTabBarExtraContent]="extraTemplate">
<nz-tab *ngFor="let tab of mainTabs" [nzTitle]="tab.name" (nzSelect)="selectMainTab(tab)">
</nz-tab>
</nz-tabset>
</div>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)">
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name" (nzClick)="tabChange(i)">
</nz-tab>
</nz-tabset>
<div style="margin-top: 15px;">
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_operate_listPage"
[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] }"
[loading]="false"
>
<ng-template st-row="complaintCode" let-item let-index="index">
<a href="javascript:;" (click)="view(item)">{{item.complaintCode}}</a>
</ng-template>
<ng-template st-row="complaintCauseLabel" let-item let-index="index">
<div *ngIf="selectedMainTabStatus == '2'">{{item?.drvComplaintCauseLabel}}</div>
<div *ngIf="selectedMainTabStatus == '1'">{{item?.complaintCauseLabel}}</div>
</ng-template>
<div>
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_operate_listPage"
[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] }" [loading]="false">
<ng-template st-row="complaintCode" let-item let-index="index">
<a href="javascript:;" (click)="view(item)">{{item.complaintCode}}</a>
</ng-template>
<ng-template st-row="complaintCauseLabel" let-item let-index="index">
<div *ngIf="selectedMainTabStatus == '2'">{{item?.drvComplaintCauseLabel}}</div>
<div *ngIf="selectedMainTabStatus == '1'">{{item?.complaintCauseLabel}}</div>
</ng-template>
</st>
</div>
</nz-card>
<nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="处理" (nzOnCancel)="Cancel()">
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="isLoading && st.loading" (click)="openDrawer()" acl
[acl-ability]="['ORDER-COMPLAINT-search']">筛选</button>
<button nz-button nzDanger acl [acl-ability]="['ORDER-COMPLAINT-export']" (click)="exprot()">导出</button>
</div>
</ng-template>
<nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="处理"
(nzOnCancel)="Cancel()">
<ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'">
</sf>
@ -72,6 +80,4 @@
<button nz-button nzType="primary" (click)="handleOK()">通过</button>
<button nz-button nzType="primary" (click)="handleCancel2()">强制取消</button>
</ng-template>
</nz-modal>
</nz-modal>

View File

@ -6,20 +6,19 @@ import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service';
import { SearchDrawerService } from '@shared';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
@Component({
selector: 'app-supply-management-complaint',
templateUrl: './complaint.component.html',
styleUrls: ['./complaint.component.less']
styleUrls: ['../../../commom/less/commom-table.less', './complaint.component.less']
})
export class OrderManagementComplaintComponent implements OnInit {
ui: SFUISchema = {};
export class OrderManagementComplaintComponent extends BasicTableComponent implements OnInit {
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
auditMany = false;
isVisibleRE = false;
_$expand = false;
channelId: any;
resourceStatus: any;
selectedMainTabStatus = '2';
@ -49,9 +48,19 @@ export class OrderManagementComplaintComponent implements OnInit {
{
name: '已撤销',
type: 3
}
},
{
name: '已取消',
type: 4
},
];
constructor(public service: OrderManagementService, private modal: NzModalService, private router: Router) {
constructor(
public service: OrderManagementService,
private modal: NzModalService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
// console.log(this.selectedIndex);
// if (this.selectedIndex === 0) {
// this.selectedMainTabStatus = '2';
@ -101,16 +110,15 @@ export class OrderManagementComplaintComponent implements OnInit {
wayBillCode: {
type: 'string',
title: '运单号',
ui: {
}
ui: {}
},
complaintCause: {
drvComplaintCause: {
title: '投诉原因',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'drvcomplaint:cause' },
hidden: this.selectedMainTabStatus == '1',
hidden: this.selectedMainTabStatus == '1',
containsAllLabel: true
} as SFSelectWidgetSchema
},
@ -120,7 +128,7 @@ export class OrderManagementComplaintComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'drvcomplaint:cause' },
hidden: this.selectedMainTabStatus == '2',
hidden: this.selectedMainTabStatus == '2',
containsAllLabel: true
} as SFSelectWidgetSchema
},
@ -132,16 +140,10 @@ export class OrderManagementComplaintComponent implements OnInit {
widget: 'sl-from-to',
type: 'date',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
},
} as SFDateWidgetSchema
}
}
};
this.ui = {
'*': { spanLabelFixed: 110, grid: { span: 8, gutter: 8 } }
};
}
/**
@ -270,21 +272,7 @@ export class OrderManagementComplaintComponent implements OnInit {
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) {}
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this.isLoading = true;
}
selectChange(e: number) {
this.resourceStatus = e;
this.initST();

View File

@ -9,41 +9,18 @@
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper>
<!-- <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'"
[disabled]="!sf?.valid"
[loading]="false"
(formSubmit)="st?.load(1)"
(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"
[nzLoading]="service.http.loading"
(click)="search()"
acl
[acl-ability]="['ORDER-COMPLIANCE-AUDIT-search']"
>查询</button
>
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-export']" (click)="exprot()"
>导出</button
>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
[acl-ability]="['ORDER-COMPLIANCE-AUDIT-search']">查询</button>
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-export']"
(click)="exprot()">导出</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
@ -52,27 +29,24 @@
</div>
</ng-container>
</div>
</nz-card>
</nz-card> -->
<nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待抽查(' + tabs?.spotQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'合格(' + tabs?.qualifiedtity + ')'"></nz-tab>
<nz-tab [nzTitle]="'不合格(' + tabs?.unstayQuantity + ')'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px">
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_listCompliancePage"
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"> <label class="driver">|</label> 合规抽查</label>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待抽查(' + tabs?.spotQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'合格(' + tabs?.qualifiedtity + ')'"></nz-tab>
<nz-tab [nzTitle]="'不合格(' + tabs?.unstayQuantity + ')'"></nz-tab>
</nz-tabset>
</div>
<div>
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_listCompliancePage"
[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] }"
[loading]="false"
>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
<ng-template st-row="freightPrice" let-item let-index="index">
{{ item.freightPrice | currency }}
</ng-template>
@ -81,20 +55,25 @@
<div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div>
</ng-template>
<ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : '' }} </div>
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" +
item?.carNo : '' }} </div>
</ng-template>
<ng-template st-row="payeeName" let-item let-index="index">
<div> {{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }} </div>
</ng-template>
<ng-template st-row="billCode" let-item let-index="index">
<a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id" [queryParams]="{ sts :1}">{{ item.billCode }}</a>
<a *ngIf="item.billType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
item.billCode }}</a>
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id"
[queryParams]="{ sts :1}">{{ item.billCode }}</a>
<a *ngIf="item.billType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
item.billCode }}</a>
<div>
<span>{{ item?.billStatusLabel }}</span>
</div>
<div>
<span >{{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ? '':item?.serviceTypeLabel}}</span>
<span>{{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ?
'':item?.serviceTypeLabel}}</span>
</div>
</ng-template>
<ng-template st-row="goodsName" let-item let-index="index">
@ -119,18 +98,16 @@
<ng-template #extraTemplate>
<div>
<button nz-button nzType="primary" (click)="audit()" acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-updateBillByComplianceBatch']"> 批量抽查 </button>
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['ORDER-COMPLIANCE-AUDIT-search']">筛选</button>
<button nz-button nzDanger acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-export']" (click)="exprot()">导出</button>
<button nz-button nzType="primary" (click)="audit()" acl
[acl-ability]="['ORDER-COMPLIANCE-AUDIT-updateBillByComplianceBatch']"> 批量抽查 </button>
</div>
</ng-template>
<nz-modal
[(nzVisible)]="isVisibleRE"
[nzWidth]="600"
[nzFooter]="nzModalFooterview2"
(nzOnOk)="handleOK()"
nzTitle="抽查"
(nzOnCancel)="handleCancel('1')"
>
<nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="抽查"
(nzOnCancel)="handleCancel('1')">
<ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'"> </sf>
</ng-container>
@ -140,18 +117,13 @@
</ng-template>
</nz-modal>
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooter" nzTitle="运费变更记录" (nzOnCancel)="handleCancel('0')">
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooter" nzTitle="运费变更记录"
(nzOnCancel)="handleCancel('0')">
<ng-container *nzModalContent>
<st
#stFloat
multiSort
size="small"
[bordered]="true"
[data]="service.$api_get_listChangeApply"
<st #stFloat multiSort size="small" [bordered]="true" [data]="service.$api_get_listChangeApply"
[columns]="columnsFloat"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeParams }"
[res]="{ reName: { list: 'data', total: 'data.total' } }"
>
[res]="{ reName: { list: 'data', total: 'data.total' } }">
<ng-template st-row="order" let-item let-index="index">
{{ index + 1 }}
</ng-template>
@ -163,35 +135,27 @@
</ng-template>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleView" [nzWidth]="600" [nzFooter]="nzModalFooterview" nzTitle="查看" (nzOnCancel)="handleCancel('2')">
<nz-modal [(nzVisible)]="isVisibleView" [nzWidth]="600" [nzFooter]="nzModalFooterview" nzTitle="查看"
(nzOnCancel)="handleCancel('2')">
<ng-container *nzModalContent>
<st
#stFloatView
size="small"
[bordered]="true"
[data]="service.$api_getChangeRecordWholeDetail"
[columns]="columnsFloatView"
[req]="{ method: 'POST', allInBody: true, params: changeViewParams }"
[res]="{ reName: { list: 'data.list', total: 'data.total' } }"
>
<st #stFloatView size="small" [bordered]="true" [data]="service.$api_getChangeRecordWholeDetail"
[columns]="columnsFloatView" [req]="{ method: 'POST', allInBody: true, params: changeViewParams }"
[res]="{ reName: { list: 'data.list', total: 'data.total' } }">
<ng-template st-row="amountBeforeChange" let-item let-index="index">
{{ item.amountBeforeChange | currency }}
</ng-template>
<ng-template st-row="amountchangeValue" let-item let-index="index"> ¥{{ item.amountchangeValue | number: '0.2-2' }} </ng-template>
<ng-template st-row="amountchangeValue" let-item let-index="index"> ¥{{ item.amountchangeValue | number: '0.2-2'
}} </ng-template>
<ng-template st-row="amountAfterChange" let-item let-index="index">
{{ item.amountAfterChange | currency }}
</ng-template>
</st>
<div
><span>变更原因:{{ ViewCause?.changeCause }}</span></div
>
<div
><span>拒绝原因:{{ ViewCause?.refuseCause }}</span></div
>
<div><span>变更原因:{{ ViewCause?.changeCause }}</span></div>
<div><span>拒绝原因:{{ ViewCause?.refuseCause }}</span></div>
<div><span>注:附加费依据调整后的运输费用重新计算</span></div>
</ng-container>
<ng-template #nzModalFooterview>
<button nz-button nzType="default" (click)="handleCancel('2')">取消</button>
<button nz-button nzType="primary" (click)="handleCancel('2')">确定</button>
</ng-template>
</nz-modal>
</nz-modal>

View File

@ -8,22 +8,21 @@ import { OrderManagementService } from '../../services/order-management.service'
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
import { of } from 'rxjs';
import { ShipperBaseService } from '@shared';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { Router } from '@angular/router';
import { OneCarOrderAppealComponent } from '../../modal/audit/appeal/appeal.component';
import { BasicTableComponent } from 'src/app/routes/commom';
@Component({
selector: 'app-order-management-compliance-audit',
templateUrl: './compliance-audit.component.html',
styleUrls: ['./compliance-audit.component.less']
styleUrls: ['../../../commom/less/commom-table.less', './compliance-audit.component.less']
})
export class OrderManagementComplianceAuditComponent implements OnInit {
ui: SFUISchema = {};
export class OrderManagementComplianceAuditComponent extends BasicTableComponent implements OnInit {
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
changeViewId: any; // 查看运费变更记录id - 用于查看
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
changeViewId: any; // 查看运费变更记录id - 用于查看
auditId: any;
auditIdR: any;
auditMany = false;
@ -31,16 +30,14 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
isVisibleEvaluate = false;
isVisible = false;
isVisibleRE = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
@ViewChild('stFloat') private readonly stFloat!: STComponent;
@ViewChild('stFloatView') private readonly stFloatView!: STComponent;
columns: STColumn[] = [];
columnsFloat: STColumn[] = [];
columnsFloatView: STColumn[] = [];
ViewCause: any; // 变更运费查看数据
ViewCause: any; // 变更运费查看数据
resourceStatus: any;
tabs = {
totalCount: 0,
@ -52,8 +49,11 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
public service: OrderManagementService,
private modal: NzModalService,
public shipperservice: ShipperBaseService,
private router: Router
) { }
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
* 查询参数
@ -99,7 +99,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
unstayQuantity: 0
};
const params: any = Object.assign({}, this.reqParams || {});
delete params.complianceStatus
delete params.complianceStatus;
this.service.request(this.service.$api_get_getComplianceStatisticalStatus, params).subscribe(res => {
if (res) {
let totalCount = 0;
@ -142,8 +142,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
billCode: {
type: 'string',
title: '订单号',
ui: {
}
ui: {}
},
resourceCode: {
type: 'string',
@ -159,7 +158,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
let str = q.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -179,56 +178,28 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
title: '所属项目',
ui: {
widget: 'select',
placeholder: '请先选择货主',
visibleIf: {
_$expand: (value: boolean) => value
},
placeholder: '请先选择货主'
} as SFSelectWidgetSchema
},
loadingPlace: {
type: 'string',
title: '装货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
title: '装货地'
},
dischargePlace: {
type: 'string',
title: '卸货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
title: '卸货地'
},
driverName: {
title: '承运司机',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
type: 'string'
},
carNo: {
title: '车牌号',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
type: 'string'
},
carCaptainName: {
title: '车队长',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
type: 'string'
},
paymentStatus: {
title: '支付状态',
@ -236,10 +207,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'overall:payment:status' },
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
containsAllLabel: true
} as SFSelectWidgetSchema
},
enterpriseInfoId: {
@ -249,9 +217,6 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}
},
@ -262,10 +227,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'service:type' },
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
containsAllLabel: true
} as SFSelectWidgetSchema
},
createTime: {
@ -275,16 +237,12 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
allowClear: true
} as SFDateWidgetSchema
},
}
},
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
// 获取城市列表
getRegionCode(regionCode: any) {
@ -397,21 +355,21 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
buttons: [
{
text: '查看申诉记录',
click: _record => this.appeal(_record),
click: _record => this.appeal(_record)
// iif: item => item.billStatus == '5'
},
{
text: '运费变更记录',
click: _record => this.OpenPrice(_record),
// iif: item => item.billStatus == '4',
acl: { ability: ['ORDER-COMPLIANCE-AUDIT-listChangeApply'] },
acl: { ability: ['ORDER-COMPLIANCE-AUDIT-listChangeApply'] }
},
{
text: '合规抽查',
click: _record => this.audit(_record),
iif: item => item.complianceStatus == '0',
acl: { ability: ['ORDER-COMPLIANCE-AUDIT-updateBillByCompliance'] },
},
acl: { ability: ['ORDER-COMPLIANCE-AUDIT-updateBillByCompliance'] }
}
]
}
];
@ -441,15 +399,15 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
buttons: [
{
text: '查看',
click: (_record) => this.FloatView(_record),
click: _record => this.FloatView(_record)
},
{
text: '撤销',
click: (_record) => this.revoke(_record),
iif: item => item.handleStatus === '1' || item.handleStatus === 1,
},
],
},
click: _record => this.revoke(_record),
iif: item => item.handleStatus === '1' || item.handleStatus === 1
}
]
}
];
}
initSTFloatView() {
@ -508,49 +466,38 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
this.router.navigate(['/order-management/risk-detail', item.id]);
}
/**
* 浮动费用查看
*/
* 浮动费用查看
*/
FloatView(item: any) {
console.log(item)
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
});
this.isVisibleView = true;
}
revoke(item: any) {
this.modal.confirm({
nzTitle: '是否确定立即撤销费用变更!</i>',
nzOnOk: () =>
this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe((res) => {
console.log(res)
this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe(res => {
console.log(res);
if (res) {
this.service.msgSrv.success('撤销成功!')
this.stFloat.reload()
this.service.msgSrv.success('撤销成功!');
this.stFloat.reload();
}
})
});
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { }
tabChange(item: any) {}
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
/**
* 导入货源
*/
importGoodsSource() { }
importGoodsSource() {}
OpenPrice(item: any) {
this.changeId = item.id;
this.isVisible = true;
@ -608,8 +555,8 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } };
}
/*
* 审核关闭弹窗
*/
* 审核关闭弹窗
*/
handleCancel(value?: string) {
if (value === '0') {
this.isVisible = false;
@ -620,8 +567,8 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
}
}
/**
* 审核通过按钮
*/
* 审核通过按钮
*/
handleOK() {
let idList: any[] = [];
if (this.selectedRows.length > 0) {
@ -629,25 +576,25 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
idList.push(item.id);
});
} else {
idList.push(this?.auditIdR)
idList.push(this?.auditIdR);
}
const parms = {
ids: idList,
complianceRemark: this.sfView.value.complianceRemark,
complianceStatus: 1,
complianceStatus: 1
};
this.service.request(this.service.$api_get_updateBillByCompliance, parms).subscribe(res => {
if (res) {
this.service.msgSrv.success('提交成功!');
this.isVisibleRE = false;
this.st?.load(1);
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
}
});
}
/**
* 审核拒绝按钮
*/
* 审核拒绝按钮
*/
reject() {
if (!this.sfView.value.complianceRemark) {
this.service.msgSrv.error('备注不能为空!');
@ -659,25 +606,25 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
idList.push(item.id);
});
} else {
idList.push(this.sfView.value.billCode)
idList.push(this.sfView.value.billCode);
}
const parms = {
ids: idList,
complianceRemark: this.sfView.value.complianceRemark,
complianceStatus: 2,
complianceStatus: 2
};
this.service.request(this.service.$api_get_updateBillByCompliance, parms).subscribe(res => {
if (res) {
this.service.msgSrv.success('提交成功!');
this.isVisibleRE = false;
this.st?.load(1);
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
}
});
}
/**
*合规抽查
*/
*合规抽查
*/
audit(item?: any) {
if (item) {
this.isVisibleRE = true;
@ -686,7 +633,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
this.initSTAudit(1);
} else {
if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择订单!')
this.service.msgSrv.error('请选择订单!');
return;
} else {
this.isVisibleRE = true;
@ -694,8 +641,8 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
}
}
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportSpotCheckList);
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportSpotCheckList);
}
}

View File

@ -1,4 +1,4 @@
billCode<!--
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
@ -9,61 +9,40 @@ billCode<!--
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper>
<!-- <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'"
[disabled]="!sf?.valid"
[loading]="false"
(formSubmit)="st?.load(1)"
(formReset)="resetSF()"
></sf>
<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" [nzLoading]="service.http.loading" (click)="search()" acl
[acl-ability]="['ORDER-RECEIPTS-search']">查询</button>
<button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</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" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['ORDER-RECEIPTS-search']"
>查询</button
>
<button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
<button nz-button [disabled]="false" (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-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待审核(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已审核(' + tabs?.stayQuantity + ')'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px">
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_billExamine_page"
[columns]="columns"
[req]="{ process: beforeReq }"
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"> <label class="driver">|</label> 单据审核</label>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待审核(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已审核(' + tabs?.stayQuantity + ')'"></nz-tab>
</nz-tabset>
</div>
<div>
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_billExamine_page"
[columns]="columns" [req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="false"
>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
<ng-template st-row="freightPrice" let-item let-index="index">
{{ item.freightPrice | currency }}
</ng-template>
@ -79,12 +58,13 @@ billCode<!--
</ng-template>
<ng-template st-row="unloadingLadingBillFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item.unloadingLadingBillFilePath">
<app-imagelist style="width: 40px" [imgList]="[item.unloadingLadingBillFilePath]"> </app-imagelist>
</div>
<div *ngIf="item.unloadingPeopleVehiclesGoodsFilePath">
<app-imagelist style="width: 40px" [imgList]="[item.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
</div>
<div *ngIf="item.unloadingLadingBillFilePath">
<app-imagelist style="width: 40px" [imgList]="[item.unloadingLadingBillFilePath]"> </app-imagelist>
</div>
<div *ngIf="item.unloadingPeopleVehiclesGoodsFilePath">
<app-imagelist style="width: 40px" [imgList]="[item.unloadingPeopleVehiclesGoodsFilePath]">
</app-imagelist>
</div>
</div>
</ng-template>
<ng-template st-row="loadingTime" let-item let-index="index">
@ -92,21 +72,26 @@ billCode<!--
<div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div>
</ng-template>
<ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + item?.carNo : '' }} </div>
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" +
item?.carNo : '' }} </div>
</ng-template>
<ng-template st-row="payeeName" let-item let-index="index">
<div> {{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }} </div>
</ng-template>
<ng-template st-row="billCode" let-item let-index="index">
<!-- <div>{{ item.billCode }}</div> -->
<a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.resourceType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.resourceType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
item.billCode }}</a>
<a *ngIf="item.resourceType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{
item.billCode }}</a>
<a *ngIf="item.resourceType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
item.billCode }}</a>
<div>
<span>{{item?.billStatusLabel}}</span>
</div>
<div>
<span >{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? '':item?.serviceTypeLabel}}</span>
<span>{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ?
'':item?.serviceTypeLabel}}</span>
</div>
</ng-template>
<ng-template st-row="goodsName" let-item let-index="index">
@ -131,7 +116,20 @@ billCode<!--
<ng-template #extraTemplate>
<div>
<button nz-button nzType="primary" (click)="sign('1')" acl [acl-ability]="['ORDER-RECEIPTS-billAuditPassBatch']"> 批量通过 </button>
<button nz-button nzType="primary" (click)="sign1('1')" acl [acl-ability]="['ORDER-RECEIPTS- electronicBilling']"> 批量生成电子单据 </button>
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['ORDER-RECEIPTS-search']">查询</button>
<button nz-button nzDanger [disabled]="false" (click)="exprot()">导出</button>
<button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item (click)="sign('1')" acl [acl-ability]="['ORDER-RECEIPTS-billAuditPassBatch']">
批量通过
</li>
<li nz-menu-item (click)="sign1('1')" acl [acl-ability]="['ORDER-RECEIPTS- electronicBilling']">
批量生成电子单据
</li>
</ul>
</nz-dropdown-menu>
</div>
</ng-template>
</ng-template>

View File

@ -1,22 +1,3 @@
:host {
p{
margin-bottom: 0
}
.left_btn {
width: 50px;
height: 32px;
padding-left: 8px;
line-height:32px;
background-color: #d7d7d7;
}
::ng-deep {
.imgBox {
display: flex;
img {
width: 60px !important;
}
}
}
}
p{
margin-bottom: 0
}

View File

@ -8,25 +8,23 @@ import { OrderManagementService } from '../../services/order-management.service'
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
import { of } from 'rxjs';
import { ShipperBaseService } from '@shared';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { Router } from '@angular/router';
import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
@Component({
selector: 'app-order-management-receipts-audit',
templateUrl: './receipts-audit.component.html',
styleUrls: ['./receipts-audit.component.less']
styleUrls: ['../../../commom/less/commom-table.less', './receipts-audit.component.less']
})
export class OrderManagementReceiptsAuditComponent implements OnInit {
ui: SFUISchema = {};
export class OrderManagementReceiptsAuditComponent extends BasicTableComponent implements OnInit {
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
auditMany = false;
isVisibleView = false;
isVisibleEvaluate = false;
isVisible = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
columns: STColumn[] = [];
@ -41,8 +39,11 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
public service: OrderManagementService,
private modal: NzModalService,
public shipperservice: ShipperBaseService,
private router: Router
) { }
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
* 查询参数
@ -73,22 +74,22 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
if (this.sf) {
Object.assign(requestOptions.body, {
...a,
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || ''
}
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || ''
}
});
}
this.loading = true;
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
console.log(data)
this.loading = false
console.log(data);
this.loading = false;
return data.map(item => ({
...item,
// disabled: item.billStatus !== '4'
...item
// disabled: item.billStatus !== '4'
}));
};
get selectedRows() {
@ -105,7 +106,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
totalCount: 0
};
const params: any = Object.assign({}, this.reqParams || {});
delete params.auditStatus
delete params.auditStatus;
this.service.request(this.service.$api_get_getAuditStatistical, params).subscribe(res => {
if (res) {
let totalCount = 0;
@ -173,7 +174,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
let str = q.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -196,7 +197,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
placeholder: '请先选择货主',
visibleIf: {
_$expand: (value: boolean) => value
},
}
} as SFSelectWidgetSchema
},
loadingPlace: {
@ -298,12 +299,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
loadingDocuments: {
type: 'string',
title: '装卸货凭证',
enum:[
{label: '全部',value: ''},
{label: '无装卸货凭证',value: '1'},
{label: '装卸货凭证齐全',value: '2'},
{label: '只有装货凭证',value: '3'},
{label: '只有卸货凭证',value: '4'},
enum: [
{ label: '全部', value: '' },
{ label: '无装卸货凭证', value: '1' },
{ label: '装卸货凭证齐全', value: '2' },
{ label: '只有装货凭证', value: '3' },
{ label: '只有卸货凭证', value: '4' }
],
ui: {
widget: 'select',
@ -311,13 +312,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
}
}
},
}
},
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
/**
@ -397,27 +397,27 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
{
text: '生成电子单据',
click: _record => this.generate(_record, 2),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] },
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }
},
{
text: '通过',
click: _record => this.sign(_record),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] },
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }
},
{
text: '修改',
click: _record => this.modification(_record),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] },
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }
},
{
text: '查看凭证',
click: _record => this.generate(_record, 3),
iif: item => item?.loadingElectronicsLadingBillFilePath && item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-view'] },
},
acl: { ability: ['ORDER-RECEIPTS-view'] }
}
]
}
];
@ -428,32 +428,18 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
tabChange(item: any) {}
/**
* 导入货源
*/
importGoodsSource() { }
audit(item: any) { }
importGoodsSource() {}
audit(item: any) {}
/**
* 审核通过按钮
*/
handleOK() { }
handleOK() {}
OpenPrice(item: any) {
this.isVisible = true;
}
@ -471,7 +457,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
});
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
});
}
// 生成电子单据
@ -491,31 +477,31 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
if(result) {
if (result) {
this.st.load();
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
}
});
}
// 通过
sign(item?: any) {
let params: any = []
let params: any = [];
let text = '';
if (item === '1') {
if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择订单!')
return
this.service.msgSrv.error('请选择订单!');
return;
}
this.selectedRows.forEach(ite => {
params.push(ite.id);
});
text = `<b>已选择${this.selectedRows.length}条订单,确认批量通过审核吗?</b>`
text = `<b>已选择${this.selectedRows.length}条订单,确认批量通过审核吗?</b>`;
} else {
text = `<b>确认通过审核吗?</b>`
text = `<b>确认通过审核吗?</b>`;
params.push(item.id);
}
console.log(this.selectedRows)
console.log(params)
console.log(this.selectedRows);
console.log(params);
this.modal.confirm({
nzTitle: text,
nzContent: `<b>通过后不可修改,可以再生成电子单据。</b>`,
@ -535,8 +521,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
// 批量生成电子单据
sign1(item?: any) {
if (this.selectedRows?.length <= 0) {
this.service.msgSrv.error('请选择订单!')
return
this.service.msgSrv.error('请选择订单!');
return;
}
let params: any[] = [];
this.selectedRows.forEach(item => {
@ -545,18 +531,16 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
this.modal.confirm({
nzTitle: `<b>已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?</b>`,
nzContent: `<b>确认后单据不可修改,请谨慎操作。</b>`,
nzOnOk: () =>
{
this.service.downloadFile(this.service.$api_createBillTakeGoods,params)
this.service.downloadFile(this.service.$api_createBillDischargeGoods,params)
this.service.msgSrv.success('生成成功!');
this.st?.reload()
nzOnOk: () => {
this.service.downloadFile(this.service.$api_createBillEsignGoods, params);
this.service.msgSrv.success('生成成功!');
this.st?.reload();
// this.getGoodsSourceStatistical();
}
})
}
});
}
// 获取所属项目
getRegionCode(regionCode: any) {
// 获取所属项目
getRegionCode(regionCode: any) {
console.log(regionCode);
return this.service
.request(this.service.$api_get_enterprise_project, { id: regionCode })
@ -576,8 +560,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
// }
});
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList);
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList);
}
}

View File

@ -9,61 +9,42 @@
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper>
<!-- <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'"
[disabled]="!sf?.valid"
[loading]="false"
(formSubmit)="search()"
(formReset)="resetSF()"
></sf>
<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" [nzLoading]="service.http.loading" (click)="search()" acl
[acl-ability]="['ORDER-RISK-search']">查询</button>
<button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</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">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['ORDER-RISK-search']">查询</button>
<button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
<button nz-button [disabled]="false" (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-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部'"></nz-tab>
<nz-tab [nzTitle]="'待申诉(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'申诉中(' + tabs?.underwayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'申诉成功(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'申诉失败(' + tabs?.cancelQuantity + ')'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px">
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_listRiskPage"
[columns]="columns"
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"> <label class="driver">|</label> 风险单管理</label>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部'"></nz-tab>
<nz-tab [nzTitle]="'申诉(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'申诉(' + tabs?.underwayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'申诉成功(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'申诉失败(' + tabs?.cancelQuantity + ')'"></nz-tab>
</nz-tabset>
</div>
<div>
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_listRiskPage" [columns]="columns"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="false"
>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
<!-- <ng-template st-row="billCode" let-item let-index="index">
<a [routerLink]="'/order-management/risk-detail/' + item.id">{{ item.billCode }}</a>
<div>
@ -75,14 +56,18 @@
</ng-template> -->
<ng-template st-row="billCode" let-item let-index="index">
<!-- <div>{{ item.billCode }}</div> -->
<a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.billType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
<a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
item.billCode }}</a>
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode
}}</a>
<a *ngIf="item.billType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
item.billCode }}</a>
<div>
<span>{{ item?.representationsStatusLabel }}</span>
</div>
<div>
<span >{{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' : item?.serviceTypeLabel}}</span>
<span>{{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' :
item?.serviceTypeLabel}}</span>
</div>
</ng-template>
<ng-template st-row="timeer" let-item let-index="index">
@ -96,7 +81,8 @@
</div>
</ng-template>
<ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}} </div>
<div> {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" +
item?.carNo : ''}} </div>
</ng-template>
<ng-template st-row="payeeName" let-item>
<div *ngIf="item?.driverId !== item?.payeeId">
@ -113,7 +99,7 @@
<ng-template st-row="goodsInfoVOList" let-item let-index="index">
<div *ngFor="let i of item?.goodsInfoVOList">
<p>货物名称:{{ i?.goodsName }}</p>
<p>重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}</p>
<p>重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}</p>
<p>车型/车长:{{ i?.carModelLabel }} {{ i?.carLengthLabel ? "/" + i?.carLengthLabel : ''}}</p>
</div>
</ng-template>
@ -121,14 +107,8 @@
</div>
</nz-card>
<nz-modal
[(nzVisible)]="isVisibleRE"
[nzWidth]="600"
[nzFooter]="nzModalFooterview2"
(nzOnOk)="handleOK()"
nzTitle="审核"
(nzOnCancel)="handleCancel()"
>
<nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="审核"
(nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'"> </sf>
</ng-container>
@ -139,7 +119,10 @@
</nz-modal>
<ng-template #extraTemplate>
<div>
<button nz-button nzType="primary" (click)="audit()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 批量审核 </button>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['ORDER-RISK-search']">筛选</button>
<button nz-button nzDanger [disabled]="false" (click)="exprot()">导出</button>
<button nz-button nzType="primary" (click)="audit()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 批量审核 </button>
</div>
</ng-template>
</ng-template>

View File

@ -1,13 +0,0 @@
:host {
p{
margin-bottom: 0
}
.left_btn {
width: 50px;
height: 32px;
padding-left: 8px;
line-height:32px;
background-color: #d7d7d7;
}
}

View File

@ -4,21 +4,20 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
@Component({
selector: 'app-supply-management-risk',
templateUrl: './risk.component.html',
styleUrls: ['./risk.component.less']
styleUrls: ['../../../commom/less/commom-table.less', './risk.component.less']
})
export class OrderManagementRiskComponent implements OnInit {
ui: SFUISchema = {};
export class OrderManagementRiskComponent extends BasicTableComponent implements OnInit {
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
auditMany = false;
loading: boolean = true;
@ -26,9 +25,7 @@ export class OrderManagementRiskComponent implements OnInit {
auditIdR: any;
isVisibleRE = false;
resourceStatus: any;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
columns: STColumn[] = [];
tabs = {
@ -40,9 +37,11 @@ export class OrderManagementRiskComponent implements OnInit {
constructor(
public service: OrderManagementService,
public shipperservice: ShipperBaseService,
private modal: NzModalService,
public router: Router
) { }
public router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
* 查询参数
@ -50,7 +49,7 @@ export class OrderManagementRiskComponent implements OnInit {
get reqParams() {
const a: any = {};
if (this.resourceStatus) {
a.representationsStatus = this.resourceStatus
a.representationsStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
@ -59,14 +58,14 @@ export class OrderManagementRiskComponent implements OnInit {
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '',
},
end: this.sf?.value?.createTime?.[1] || ''
}
};
}
beforeReq = (requestOptions: STRequestOptions) => {
const a: any = {};
if (this.resourceStatus) {
a.representationsStatus = this.resourceStatus
a.representationsStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
@ -76,51 +75,51 @@ export class OrderManagementRiskComponent implements OnInit {
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '',
},
end: this.sf?.value?.createTime?.[1] || ''
}
});
}
this.loading = true;
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
console.log(data)
this.loading = false
console.log(data);
this.loading = false;
return data.map(item => ({
...item,
disabled: item.representationsStatus !== '2'
disabled: item.representationsStatus !== '2'
}));
};
search() {
this.st?.load(1);
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
}
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}
ngOnInit(): void {
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
this.initSF();
this.initST();
}
getGoodsSourceStatistical() {
this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => {
if (res) {
res.forEach((element: any) => {
console.log(element.representationsStatus);
if(element.representationsStatus === '1') {
this.tabs.stayQuantity = element.quantity
} else if (element.representationsStatus == '4') {
this.tabs.cancelQuantity = element.quantity
} else if (element.representationsStatus == '3') {
this.tabs.receivedQuantity = element.quantity
}else if (element.representationsStatus == '2') {
this.tabs.underwayQuantity = element.quantity
}
});
console.log(this.tabs)
res.forEach((element: any) => {
console.log(element.representationsStatus);
if (element.representationsStatus === '1') {
this.tabs.stayQuantity = element.quantity;
} else if (element.representationsStatus == '4') {
this.tabs.cancelQuantity = element.quantity;
} else if (element.representationsStatus == '3') {
this.tabs.receivedQuantity = element.quantity;
} else if (element.representationsStatus == '2') {
this.tabs.underwayQuantity = element.quantity;
}
});
console.log(this.tabs);
}
})
});
}
/**
* 初始化查询表单
@ -146,48 +145,23 @@ export class OrderManagementRiskComponent implements OnInit {
},
loadingPlace: {
type: 'string',
title: '装货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
title: '装货地'
},
dischargePlace: {
type: 'string',
title: '卸货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
title: '卸货地'
},
driverName: {
title: '承运司机',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
type: 'string'
},
carNo: {
title: '车牌号',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
type: 'string'
},
payeeName: {
type: 'string',
title: '车队长',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
title: '车队长'
},
wayBillType: {
title: '运单类型',
@ -195,10 +169,7 @@ export class OrderManagementRiskComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'bill:type' },
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
containsAllLabel: true
} as SFSelectWidgetSchema
},
shipperAppUserName: {
@ -210,11 +181,8 @@ export class OrderManagementRiskComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
let str = q.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -223,7 +191,7 @@ export class OrderManagementRiskComponent implements OnInit {
} else {
return of([]);
}
},
}
} as SFSelectWidgetSchema
},
enterpriseInfoId: {
@ -233,11 +201,8 @@ export class OrderManagementRiskComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value,
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}
},
createTime: {
title: '创建时间',
@ -246,16 +211,12 @@ export class OrderManagementRiskComponent implements OnInit {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
allowClear: true
} as SFDateWidgetSchema
}
},
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
/**
@ -347,14 +308,14 @@ export class OrderManagementRiskComponent implements OnInit {
{
text: '审核',
click: _record => this.audit(_record),
iif: item => item.representationsStatus == '2' ,
acl: { ability: ['ORDER-RISK-audit'] },
iif: item => item.representationsStatus == '2',
acl: { ability: ['ORDER-RISK-audit'] }
},
{
text: '详情',
click: _record => this.viewEvaluate(_record),
iif: item => item.representationsStatus !== '1' ,
acl: { ability: ['ORDER-RISK-riskDetail'] },
iif: item => item.representationsStatus !== '1',
acl: { ability: ['ORDER-RISK-riskDetail'] }
}
]
}
@ -419,30 +380,10 @@ export class OrderManagementRiskComponent implements OnInit {
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } };
}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) {
console.log(item);
}
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
selectChange(e: number) {
this.resourceStatus = e;
@ -454,7 +395,7 @@ export class OrderManagementRiskComponent implements OnInit {
/**
* 导入货源
*/
importGoodsSource() { }
importGoodsSource() {}
/*
* 审核关闭弹窗
@ -472,20 +413,20 @@ export class OrderManagementRiskComponent implements OnInit {
idList.push(item.id);
});
} else {
idList.push(this.sfView.value.id)
idList.push(this.sfView.value.id);
}
const parms = {
ids: idList,
auditRemark: this.sfView.value.representationsCause,
representationsStatus: 3,
auditStatus: 2,
auditStatus: 2
};
this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => {
if (res) {
this.service.msgSrv.success('审核通过成功!');
this.isVisibleRE = false;
this.st?.load(1);
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
}
});
}
@ -499,7 +440,7 @@ export class OrderManagementRiskComponent implements OnInit {
idList.push(item.id);
});
} else {
idList.push(this.sfView.value.id)
idList.push(this.sfView.value.id);
}
if (!this.sfView.value.representationsCause) {
this.service.msgSrv.error('拒绝原因为空!');
@ -509,14 +450,14 @@ export class OrderManagementRiskComponent implements OnInit {
ids: idList,
auditRemark: this.sfView.value.representationsCause,
representationsStatus: 4,
auditStatus: 3,
auditStatus: 3
};
this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => {
if (res) {
this.service.msgSrv.success('审核拒绝成功!');
this.isVisibleRE = false;
this.st?.load(1);
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
}
});
}
@ -531,7 +472,7 @@ export class OrderManagementRiskComponent implements OnInit {
this.isVisibleRE = true;
} else {
if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择订单!')
this.service.msgSrv.error('请选择订单!');
return;
} else {
this.initSTAudit(2);
@ -545,8 +486,8 @@ export class OrderManagementRiskComponent implements OnInit {
viewEvaluate(item: any) {
this.router.navigate(['/order-management/risk-detail', item.id]);
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList);
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList);
}
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-28 14:42:03
* @LastEditors : Shiming
* @LastEditTime : 2022-04-21 17:03:50
* @LastEditTime : 2022-04-22 16:27:43
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-04-08 11:32:46
* @LastEditTime : 2022-04-22 16:53:07
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle\\vehicle.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -31,11 +31,11 @@
</nz-card> -->
<nz-card class="table-box">
<div style="display: flex;align-items: center;">
<label style="font-weight: bold;font-size: 17px;">
<label style="color: #ff4d4f;margin-left: 17px;margin-right: 6px;">|</label>
<div class="tab_header">
<label class="page_title">
<label class="driver">|</label>
整车订单</label>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate" style="flex: 1;">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate" >
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
@ -69,7 +69,7 @@
</div>
</ng-template>
<ng-template st-row="createUserName" let-item let-index="index">
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }} </div>
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }} </div>
</ng-template>
<!-- <ng-template st-row="mybidDetailInfo" let-item let-index="index">
<div *ngIf="item.mybidDetailInfo.length > 0">
@ -83,7 +83,8 @@
<div *ngIf="item.mybidDetailInfo.length > 0">
<p *ngFor="let data of item.mybidDetailInfo">
<span *ngIf="data.expenseCode !== 'FL'">{{ data.expenseName }}{{ data.price | currency }}</span>
<span *ngIf="data.expenseCode === 'FL'" >{{ data.expenseName }}{{ (data.price * 100).toFixed(2) + '%' }}</span>
<span *ngIf="data.expenseCode === 'FL'">{{ data.expenseName }}{{ (data.price * 100).toFixed(2) + '%'
}}</span>
<span *ngIf="data.paymentStatusLabel" style="color: #f59a63">{{ data.paymentStatusLabel }}</span>
</p>
</div>
@ -94,10 +95,12 @@
</div>
</ng-template>
<ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' + item?.carNo : '' }} </div><br />
<div> {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ item?.payeePhone }} </div>
<div> {{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' +
item?.carNo : '' }} </div><br />
<div *ngIf="item.payeeName !== item.driverName">车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{
item?.payeePhone }} </div>
</ng-template>
<ng-template st-row="loadingTime" let-item let-index="index">
<div *ngIf="item?.loadingTime">装 | {{ item?.loadingTime }}</div>
<div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div>
@ -177,35 +180,31 @@
</ng-template>
</nz-modal>
<nz-drawer [nzBodyStyle]="{ overflow: 'auto' }" [nzMaskClosable]="false" [nzWidth]="420" [nzVisible]="visible"
[nzMaskClosable]="true" nzTitle="筛选" [nzFooter]="footerTpl" (nzOnClose)="visible=false">
<div *nzDrawerContent>
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<ng-template #footerTpl>
<div style="float: right">
<button nz-button (click)="visible=false">关闭</button>
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
<button nz-button nzType="primary" (click)="search();;">搜索</button>
</div>
</ng-template>
</nz-drawer>
<ng-template #extraTemplate>
<div>
<button nz-button nzType="primary" (click)="modifyRate()" acl
[acl-ability]="['ORDER-VEHICLE-modificationAdditional']"> 修改附加费率 </button>
<button nz-button nzType="primary" (click)="modifyFreightPeople()" acl
[acl-ability]="['ORDER-VEHICLE-modificationNetworkFreight']"> 修改网络货运人 </button>
<button nz-button nzType="primary" (click)="modifycaptain()" acl
[acl-ability]="['ORDER-VEHICLE-modificationCarCaptain']"> 修改车队长 </button>
<button *ngIf="resourceStatus == 4" nz-button nzType="primary" nzGhost nz-popconfirm [nzPopconfirmTitle]="enable"
(nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl
[acl-ability]="['ORDER-VEHICLE-batchSignWholeOrder']">
批量签收
</button>
<button nz-button nzType="primary" [disabled]="loading" (click)="exprot()">导出</button>
<button nz-button nzType="primary" (click)="visible=true;" class="mr-sm">筛选</button>
<div class="mr-sm">
<button nz-button nzDanger (click)="openDrawer()" class="mr-sm">筛选</button>
<button nz-button nzDanger [disabled]="loading" (click)="exprot()">导出</button>
<button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationAdditional']" (click)="modifyRate()">
修改附加费率
</li>
<li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationNetworkFreight']"
(click)="modifyFreightPeople()">
修改网络货运人
</li>
<li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationCarCaptain']" (click)="modifycaptain()">
修改车队长
</li>
<li *ngIf="resourceStatus == 4" nz-menu-item nz-popconfirm [nzPopconfirmTitle]="enable"
(nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl
[acl-ability]="['ORDER-VEHICLE-batchSignWholeOrder']">
批量签收
</li>
</ul>
</nz-dropdown-menu>
</div>
</ng-template>
<ng-template #enable>

View File

@ -1,12 +1,13 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { fromEvent, of } from 'rxjs';
import { fromEvent, of, Subscription } from 'rxjs';
import { debounceTime, map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service';
import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component';
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component';
@ -19,11 +20,9 @@ import { OrderManagementService } from '../../services/order-management.service'
@Component({
selector: 'app-supply-management-vehicle',
templateUrl: './vehicle.component.html',
styleUrls: ['../../../commom/less/commom-table.less','./vehicle.component.less']
styleUrls: ['../../../commom/less/commom-table.less', './vehicle.component.less']
})
export class OrderManagementVehicleComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
schema: SFSchema = {};
auditMany = false;
isVisibleView = false;
isVisibleEvaluate = false;
@ -39,7 +38,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('stFloat') private readonly stFloat!: STComponent;
@ViewChild('stFloatView') private readonly stFloatView!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
columns: STColumn[] = [];
columnsFloat: STColumn[] = [];
@ -56,7 +54,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
two: '2',
three: '2',
id: 2
},
}
];
tabs = {
cancelQuantity: 0,
@ -69,15 +67,15 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
};
resourceStatus: any;
visible = false;
constructor(
public service: OrderManagementService,
private modal: NzModalService,
public shipperservice: ShipperBaseService,
public router: Router,
public ar: ActivatedRoute
public ar: ActivatedRoute,
public searchDrawerService: SearchDrawerService
) {
super();
super(searchDrawerService);
}
/**
@ -98,11 +96,11 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
if (this.resourceStatus) {
a.billStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || this.paramsList);
const params: any = Object.assign({}, this.sfValue || this.paramsList);
delete params._$expand;
return {
...a,
...params,
...params
};
}
beforeReq = (requestOptions: STRequestOptions) => {
@ -110,13 +108,13 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
if (this.resourceStatus) {
a.billStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || this.paramsList);
const params: any = Object.assign({}, this.sfValue || this.paramsList);
delete params._$expand;
this.paramsList = params
Object.assign(requestOptions.body, {
...a,
...this.paramsList,
});
this.paramsList = params;
Object.assign(requestOptions.body, {
...a,
...this.paramsList
});
this.loading = true;
return requestOptions;
};
@ -197,7 +195,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
type: 'string',
title: '运单号',
ui: {
placeholder: '最多100个单号空号隔开',
placeholder: '最多100个单号空号隔开'
}
},
resourceCode: {
@ -234,7 +232,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
title: '所属项目',
ui: {
widget: 'select',
placeholder: '请先选择货主',
placeholder: '请先选择货主'
} as SFSelectWidgetSchema
},
loadingPlace: {
@ -284,7 +282,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
createTime: {
type: 'string',
title: '创建时间',
ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema,
ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema
},
riskStatus: {
type: 'string',
@ -342,7 +340,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
},
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 95, grid: { span: 24, gutter: 4 } } };
}
/**
@ -416,11 +413,12 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
text: '运费变更记录',
click: _record => this.OpenPrice(_record),
iif: item =>
item.billStatus == '4' ||
item.billStatus == '5' ||
item.billStatus == '2' ||
item.billStatus == '3' ||
item.billStatus == '6',
item.billType !== '3' &&
(item.billStatus == '4' ||
item.billStatus == '5' ||
item.billStatus == '2' ||
item.billStatus == '3' ||
item.billStatus == '6'),
acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] }
},
// {
@ -439,7 +437,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
{
text: '变更运费',
click: _record => this.updateFreight(_record),
iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2',
iif: item => item.billType !== '3' && item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus != '2',
acl: { ability: ['ORDER-VEHICLE-FreightChangeWholeDetail'] }
},
{
@ -558,23 +556,9 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) {
console.log(item);
}
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
selectChange(e: number) {
this.resourceStatus = e;
this.initST();
@ -769,7 +753,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
});
modalRef.afterClose.subscribe((res: boolean) => {
if (res) {
this.resetSF;
this.st.load();
this.getGoodsSourceStatistical();
}
@ -847,7 +830,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
});
modalRef.afterClose.subscribe((res: boolean) => {
if (res) {
this.resetSF;
this.st.load();
}
});
@ -870,8 +852,8 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}
});
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportWholeList);
}
// 导出
exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportWholeList);
}
}

View File

@ -523,57 +523,29 @@ export class orderManagementVoucherViewComponent implements OnInit {
请等待${time}秒后自动关闭
`
});
this.service.request(this.service.$api_createBillTakeGoods, [this.datas?.id]).subscribe(res => {
this.service.request(this.service.$api_createBillEsignGoods, [this.datas?.id]).subscribe(res => {
if (res) {
switch (res[0]?.esignFlowStatus) {
case 1:
case '1':
setTimeout(() => {
this.service.request(this.service.$api_getBillTakeEsignFile, [this.datas?.id]).subscribe(res => {
if (res[0]?.esignFlowStatus == '2') {
}
});
}, 9000);
return;
case 2:
return;
case '13':
res.forEach((element:any) => {
switch (element?.esignFlowStatus) {
case '1':
setTimeout(() => {
this.service.request(this.service.$api_getBillGoodsEsignFile, [this.datas?.id]).subscribe(res => {
if (res[0]?.esignFlowStatus == '2') {
this.service.msgSrv.success('生成电子单据成功!');
this.modal.destroy(true);
}
});
}, 9000);
return;
default:
this.service.msgSrv.error('电子装货单签署异常!');
this.service.msgSrv.error('签署异常!');
modal.destroy();
return;
}
return;
}
});
} else {
this.service.msgSrv.error('电子装货单签署异常!');
modal.destroy();
}
});
this.service.request(this.service.$api_createBillDischargeGoods, [this.datas?.id]).subscribe(res => {
if (res) {
switch (res[0]?.esignFlowStatus) {
case 1:
case '1':
setTimeout(() => {
this.service.request(this.service.$api_getBillDischargeEsignFile, [this.datas?.id]).subscribe(res => {
if (res[0]?.esignFlowStatus == '2') {
this.service.msgSrv.success('生成电子单据成功!');
this.modal.destroy(true);
}
});
modal.destroy();
}, 9000);
return;
case 2:
modal.destroy();
return;
default:
this.service.msgSrv.error('电子卸货单签署异常!');
modal.destroy();
return;
}
} else {
this.service.msgSrv.error('电子卸货单签署异常!');
this.service.msgSrv.error('签署异常!');
modal.destroy();
}
});

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-30 14:45:39
* @LastEditors : Shiming
* @LastEditTime : 2022-04-22 15:42:08
* @LastEditTime : 2022-04-22 16:31:57
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-captain\\modify-captain.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -108,6 +108,11 @@ export class VehicleModifyCaptainComponent implements OnInit {
});
}
initDate() {
let phone = this.sf?.value.mobile.replace(/^\s*|\s*$/g,"")
if(!phone) {
this.service.msgSrv.error('请输入手机号!');
return
}
const params = {
fetchBank: 1,
...this.sf?.value

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-22 13:53:29
* @LastEditors : Shiming
* @LastEditTime : 2022-03-08 15:01:14
* @LastEditTime : 2022-04-22 16:27:40
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -13,8 +13,8 @@
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [mapList]="mapList" [pois]="pois">
</amap-path-simplifier>
<st [scroll]="{ y: '350px' }" #st [data]="addressItems" [columns]="logColumns2" [ps]="0"
[page]="{ show: false, showSize: false }" size="small" class="map_st">
</st>
[page]="{ show: false, showSize: false }" size="small" class="map_st">
</st>
<nz-radio-group [(ngModel)]="trajectory" (ngModelChange)="trajectoryChange($event)" class="map_radio">
<label nz-radio-button nzValue="car">车辆轨迹</label>
<label nz-radio-button nzValue="driver">司机轨迹</label>

View File

@ -1,84 +1,10 @@
/* stylelint-disable order/properties-order */
:host {
.btn-size {
font-size: 14px;
}
.bdr {
border-right: 1px solid #ccc;
}
.bdl {
border-left: 1px solid #ccc;
}
.source-info {
p {
margin-bottom: .5em;
}
}
.freight-info-box {
width: 95%;
}
.freigth-label {
display : inline-block;
width : 50px;
text-align: right;
}
::ng-deep {
.approval-status {
.ant-steps {
width : 70%;
margin: 0 auto;
}
}
}
.leftPadding {
padding-right: 100px;
}
.hide{
display: none;
}
.handling-info {
min-height: 100px;
border: 1px solid #ccc;
.loading-row {
display: flex;
}
.handling-info-icon {
width: 32px;
height: 32px;
margin-right: 24px;
color: #fff;
line-height: 32px;
text-align: center;
border-radius: 50%;
&.loading-bg {
background-color: #50D4AB;
}
&.unloaing-bg {
background: #F66F6A;
}
}
.info {
flex: 1;
}
.time-info {
margin-left: 56px;
}
}
.target-fix {
display: block;
margin-top: 290px;
}
}
.map_st2 {
position: absolute;
top: 20px;
right: 49px;
height: 350px;
width: 360px;
}
}

View File

@ -4,27 +4,17 @@
* @Author : Shiming
* @Date : 2022-02-22 13:53:29
* @LastEditors : Shiming
* @LastEditTime : 2022-04-22 15:49:04
* @LastEditTime : 2022-04-22 16:24:06
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn } from '@delon/abc/st';
import {
SFComponent,
SFCustomWidgetSchema,
SFNumberWidgetSchema,
SFRadioWidgetSchema,
SFSchema,
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
import { Component, OnInit } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import format from 'date-fns/format';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service';
import { ThisReceiver } from '@angular/compiler';
@Component({
selector: 'app-order-management-view-track',
@ -39,7 +29,7 @@ export class OneCarOrderViewtrackComponent implements OnInit {
addressItems: any[] = []; //打点地址数据组
logColumns2: STColumn[] = [
{ title: '时间', index: 'parkBte', width: 120, className: 'text-center' },
{ title: '地点', index: 'parkAdr' }
{ title: '地点', index: 'parkAdr',width: 120,className: 'text-center' }
];
pois: any[] = [];
@ -102,6 +92,8 @@ export class OneCarOrderViewtrackComponent implements OnInit {
} else {
this.addressItems = [];
}
console.log(this.addressItems);
}
});
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-03 15:31:52
* @LastEditors : Shiming
* @LastEditTime : 2022-04-22 10:54:29
* @LastEditTime : 2022-04-22 17:14:39
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -163,8 +163,8 @@ export class OrderManagementService extends ShipperBaseService {
// 异常预警
public $api_getAbnormalWarningByBillId = '/api/sdc/abnormalWarning/getAbnormalWarningByBillId';
// 生成卸货单
public $api_createBillDischargeGoods = '/api/sdc/billOperate/createBillDischargeGoods';
// 获取电子提/卸货单签章附件
public $api_getBillGoodsEsignFile = '/api/sdc/billOperate/getBillGoodsEsignFile';
// 生成提货单
public $api_createBillTakeGoods = '/api/sdc/billOperate/createBillTakeGoods';
// 生成卸货单-页面展示
@ -217,6 +217,8 @@ export class OrderManagementService extends ShipperBaseService {
public $api_getBillDischargeGoods = `/api/sdc/billOperate/getBillDischargeGoods`;
// 预览提货单
public $api_getBillTakeGoods = `/api/sdc/billOperate/getBillTakeGoods`;
// 生成提/卸货单
public $api_createBillEsignGoods = `/api/sdc/billOperate/createBillEsignGoods`;
// // 生成卸货单
// public $api_createBillDischargeGoods = `/api/sdc/billOperate/createBillDischargeGoods`;

View File

@ -236,9 +236,13 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni
accountType: {
type: 'string',
title: '账户类型',
enum: [
{label: '全部', value: ''},
{label: '个人合伙人', value: '4'},
{label: '企业合伙人', value: '5'}
],
ui: {
widget: 'dict-select',
params: { dictKey: 'bank:type' },
widget: 'select',
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value

View File

@ -1,8 +1,19 @@
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 {
SFAutoCompleteWidgetSchema,
SFComponent,
SFRadioWidgetSchema,
SFSchema,
SFSchemaEnum,
SFSchemaEnumType,
SFSelectWidgetSchema,
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { AmapPoiPickerComponent } from 'src/app/shared/components/amap';
import { ChannelSalesService } from '../../services/channel-sales.service';
@ -16,9 +27,10 @@ export class ParterChannelSalesEditComponent implements OnInit {
schema!: SFSchema;
ui!: SFUISchema;
i: any;
sts: any;
type: any;
record:any;
currentOAItem:any;
record: any;
currentOAItem: any;
constructor(
public http: _HttpClient,
private cdr: ChangeDetectorRef,
@ -29,14 +41,32 @@ export class ParterChannelSalesEditComponent implements OnInit {
) {}
ngOnInit(): void {
this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => {
if(res){
this.record = res;
}
this.initSF();
});
this.initSF();
if (!this.sts) {
this.service.request(this.service.$api_getChannelSalesInfo, { id: this.i?.id }).subscribe(res => {
const List: any = [];
if (res) {
let value1 = Object.assign({}, res);
delete value1.employeeVO;
let value = res.employeeVO;
List.push({ label: value.empName + '/' + value.empNo, value: value.empNo });
setTimeout(() => {
if (this.sf) {
console.log(this.sf.getProperty('/employeeVO')!.schema);
this.sf.getProperty('/employeeVO')!.schema.enum = List;
this.sf.getProperty('/employeeVO')!.widget.reset(List);
}
if (value.empNo) {
this.sf.setValue('/employeeVO', value.empNo);
this.currentOAItem = value;
this.sf.setValue('/phoneNumber', res.telephone);
}
})
this.record = value1;
}
});
}
}
initSF() {
this.schema = {
@ -51,34 +81,67 @@ export class ParterChannelSalesEditComponent implements OnInit {
type: 'string',
maxLength: 12,
ui: {
placeholder:'请输入'
}
placeholder: '请输入'
}
},
phoneNumber: {
title: '手机号',
type: 'string',
maxLength: 11,
ui: {
placeholder:'请输入'
}
placeholder: '请输入'
}
},
// employeeVO: {
// title: '关联OA员工',
// type: 'string',
// ui: {
// widget: 'select',
// placeholder:'请选择',
// asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe(
// map((res: any) => {
// return res.map((item:any)=>{
// return {label: item.empName+"/"+item.empNo, value: item.empNo, obj: item}
// })
// })
// ),
// change:(item:any, org:any)=>{
// this.currentOAItem = org.obj;
// }
// } as SFAutoCompleteWidgetSchema,
// },
employeeVO: {
title: '关联OA员工',
type: 'string',
maxLength: 30,
ui: {
widget: 'autocomplete',
placeholder:'请选择',
asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe(
map((res: any) => {
return res.map((item:any)=>{
return {label: item.empName+"/"+item.empNo, value: item.empNo, obj: item}
})
})
),
change:(item:any, org:any)=>{
widget: 'select',
// serverSearch: true,
allowClear: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
onSearch: (q: any) => {
let str = q?.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_fuzzyQuery, { name: str })
.pipe(map(res => (res as any[]).map(i => ({ label: i.empName + '/' + i.empNo, value: i.empNo, obj: i } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
// asyncData: (input:string) => this.service.request(this.service.$api_fuzzyQuery,{name:input}).pipe(
// map((res: any) => {
// return res.map((item:any)=>{
// return {label: item.empName+"/"+item.empNo, value: item.empNo, obj: item}
// })
// })
// ),
change: (item: any, org: any) => {
this.currentOAItem = org.obj;
}
} as SFAutoCompleteWidgetSchema,
} as SFSelectWidgetSchema
},
isAuthorization: {
type: 'string',
@ -88,9 +151,9 @@ export class ParterChannelSalesEditComponent implements OnInit {
{ label: '是', value: '1' }
],
ui: {
widget: 'radio',
widget: 'radio'
} as SFRadioWidgetSchema,
default: '0',
default: '0'
},
roleIds: {
title: '',
@ -112,7 +175,7 @@ export class ParterChannelSalesEditComponent implements OnInit {
);
},
visibleIf: { isAuthorization: (value: string) => value === '1' }
},
}
},
remark: {
type: 'string',
@ -121,9 +184,9 @@ export class ParterChannelSalesEditComponent implements OnInit {
ui: {
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 },
placeholder:'请输入50字符'
} as SFTextareaWidgetSchema,
},
placeholder: '请输入50字符'
} as SFTextareaWidgetSchema
}
},
required: ['name', 'phoneNumber', 'employeeVO', 'roleIds', 'remark']
};
@ -132,24 +195,26 @@ export class ParterChannelSalesEditComponent implements OnInit {
spanLabelFixed: 150,
grid: { span: 24 }
},
$isAuthorization:{ grid: { span: 12 }},
$roleIds:{ spanLabelFixed: 10, grid: { span: 12 }},
$isAuthorization: { grid: { span: 12 } },
$roleIds: { spanLabelFixed: 10, grid: { span: 12 } }
};
}
close() {
this.modalRef.destroy();
}
save() {
save() {
this.sf.validator({ emitError: true });
if(!this.sf.valid) return;
this.service.request(this.service.$api_save, { ...this.sf.value, employeeVO: this.currentOAItem}).subscribe(res => {
if (!this.sf.valid) return;
let params: any= {
...this.sf.value,
}
delete params.telephone
this.service.request(this.service.$api_save, { ...params, employeeVO: this.currentOAItem }).subscribe(res => {
if (res) {
this.service.msgSrv.success(res.msg);
this.modalRef.destroy(true);
} else {
this.service.msgSrv.error(res.msg);
}
});
}

View File

@ -1,3 +1,13 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-21 13:49:22
* @LastEditors : Shiming
* @LastEditTime : 2022-04-26 09:47:43
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\channel-sales\\components\\list\\list.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<nz-card>
<!-- 搜索区 -->
<sf
@ -16,6 +26,7 @@
<st
#st
[data]="service.$api_getPage"
[scroll]="{x: '1200px'}"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"

View File

@ -21,13 +21,13 @@ export class ParterChannelSalesListComponent implements OnInit {
sf!: SFComponent;
spuStatus = '1';
data=[{name1:1111}]
data = [{ name1: 1111 }]
constructor(
public router: Router,
public ar: ActivatedRoute,
public service: ChannelSalesService,
private modalService: NzModalService
) {}
) { }
/**
* 查询参数
@ -64,35 +64,65 @@ export class ParterChannelSalesListComponent implements OnInit {
this.columns = [
{
title: '销售渠道姓名',
index: 'name'
index: 'name',
width: '180px'
},
{
title: '手机号',
index: 'telephone'
index: 'telephone',
width: '150px'
},
{
title: '关联OA员工姓名',
index: 'empName',
width: '150px'
},
{
title: '关联OA员工手机号',
index: 'mobile',
width: '180px'
},
{
title: '所属组织',
index: 'organLable'
index: 'organLable',
width: '300px'
},
{
title: '职级',
index: 'station'
index: 'station',
width: '150px'
},
{
title: '等级',
index: 'postLevel'
index: 'postLevel',
width: '150px'
},
{
title: '省市',
index: 'residencePlace'
index: 'residencePlace',
width: '150px'
},
{
title: '邀请码',
index: 'inviteCode'
index: 'inviteCode',
width: '150px'
},
{
title: '状态',
className: 'text-center',
index: 'stateLocked',
type: 'badge',
width: '150px',
badge: {
true: { text: '冻结', color: 'error' },
false: { text: '正常', color: 'success' }
},
},
{
title: '操作',
className: 'text-center',
width: '120px',
fixed: 'right',
buttons: [
{
text: '编辑',
@ -100,7 +130,7 @@ export class ParterChannelSalesListComponent implements OnInit {
},
{
text: '冻结',
click: (_record, _modal, _instance) => this.stop(_record.id),
click: (_record, _modal, _instance) => this.stop(_record),
}
]
}
@ -109,9 +139,10 @@ export class ParterChannelSalesListComponent implements OnInit {
add() {
const modalRef = this.modalService.create({
nzWidth:600,
nzWidth: 600,
nzTitle: '新增',
nzContent: ParterChannelSalesEditComponent,
nzComponentParams: { sts: 'add' }
});
modalRef.afterClose.subscribe(res => {
if (res) {
@ -123,7 +154,7 @@ export class ParterChannelSalesListComponent implements OnInit {
// 编辑
edit(record: STData) {
const modalRef = this.modalService.create({
nzWidth:600,
nzWidth: 600,
nzTitle: '编辑',
nzContent: ParterChannelSalesEditComponent,
nzComponentParams: { i: record }
@ -134,21 +165,23 @@ export class ParterChannelSalesListComponent implements OnInit {
}
});
}
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();
// }
// })
});
stop(record: STData) {
if (!record.stateLocked) {
const params = {
id: record.id
}
this.modalService.confirm({
nzTitle: '<i>冻结确认</i>',
nzContent: `<b>确定冻结该账号吗?</br>`,
nzOnOk: () =>
this.service.request(this.service.$api_frozenChannelSales, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('冻结成功!');
this.st.reload();
}
})
});
}
}
/**

View File

@ -19,6 +19,8 @@ export class ChannelSalesService extends BaseService {
$api_listChannelSalesManagement = '/api/mdc/channelSalesManagement/list/listChannelSalesManagement';
// 根据渠道销售id获取渠道信息
$api_getChannelSalesInfo = '/api/mdc/channelSalesManagement/getChannelSalesInfo';
// 冻结渠道销售
$api_frozenChannelSales = '/api/mdc/channelSalesManagement/frozenChannelSales';
constructor(public injector: Injector) {

View File

@ -21,7 +21,7 @@ export class ParterLevelConfigListComponent implements OnInit {
sf!: SFComponent;
spuStatus = '1';
data=[{name1:1111}]
data = [{ name1: 1111 }];
constructor(
public router: Router,
public ar: ActivatedRoute,
@ -45,21 +45,25 @@ export class ParterLevelConfigListComponent implements OnInit {
properties: {
gradeName: {
type: 'string',
title: '等级姓名',
title: '等级姓名'
},
stateLocked: {
type: 'string',
title: '状态',
enum:[{label:'启用',value:'1'},{label:'禁用',value:'0'}],
ui:{
widget:'select',
enum: [
{ label: '全部', value: '' },
{ label: '启用', value: '1' },
{ label: '禁用', value: '0' }
],
ui: {
widget: 'select'
}
},
}
}
};
this.ui = {
'*': {
width:300,
width: 300,
grid: { span: 12, gutter: 4 }
}
};
@ -79,15 +83,20 @@ export class ParterLevelConfigListComponent implements OnInit {
title: '创建时间',
index: 'createTime'
},
{
title: '启用时间',
index: 'enableTime'
},
{
title: '排序',
index: 'sortId'
},
{
title: '状态',
index: 'stateLocked',
format: (item: any) => {
return item.stateLocked ? '用':'用'
return item.stateLocked ? '用' : '用';
}
},
{
@ -96,17 +105,17 @@ export class ParterLevelConfigListComponent implements OnInit {
buttons: [
{
text: '编辑',
click: (_record, _modal, _instance) => this.edit(_record),
click: (_record, _modal, _instance) => this.edit(_record)
},
{
text: '禁用',
click: (_record, _modal, _instance) => this.stop(_record),
iif:(item)=>!item.stateLocked
iif: item => !item.stateLocked
},
{
text: '启用',
click: (_record, _modal, _instance) => this.restart(_record),
iif:(item)=>item.stateLocked
iif: item => item.stateLocked
}
]
}
@ -115,7 +124,7 @@ export class ParterLevelConfigListComponent implements OnInit {
add() {
const modalRef = this.modalService.create({
nzWidth:500,
nzWidth: 500,
nzTitle: '新增',
nzContent: ParterLevelConfigEditComponent,
nzComponentParams: { type: this.spuStatus }
@ -130,7 +139,7 @@ export class ParterLevelConfigListComponent implements OnInit {
// 编辑
edit(record: STData) {
const modalRef = this.modalService.create({
nzWidth:500,
nzWidth: 500,
nzTitle: '编辑',
nzContent: ParterLevelConfigEditComponent,
nzComponentParams: { i: record, type: this.spuStatus }
@ -142,8 +151,8 @@ export class ParterLevelConfigListComponent implements OnInit {
});
}
// 编辑
view(record: STData) {
// 编辑
view(record: STData) {
const modalRef = this.modalService.create({
nzTitle: '查看',
nzContent: ParterLevelConfigEditComponent,
@ -156,7 +165,7 @@ export class ParterLevelConfigListComponent implements OnInit {
nzTitle: '<i>启用确认</i>',
nzContent: `<b>确定启用该账号吗?</br>`,
nzOnOk: () =>
this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => {
this.service.request(this.service.$api_updatePartnerGradeConfig, { id: item.id }).subscribe(res => {
if (res) {
this.service.msgSrv.success('启用成功!');
this.st.reload();
@ -169,7 +178,7 @@ export class ParterLevelConfigListComponent implements OnInit {
nzTitle: '<i>禁用确认</i>',
nzContent: `<b>确定禁用该账号吗?</br>`,
nzOnOk: () =>
this.service.request(this.service.$api_updatePartnerGradeConfig, {id:item.id}).subscribe(res => {
this.service.request(this.service.$api_updatePartnerGradeConfig, { id: item.id }).subscribe(res => {
if (res) {
this.service.msgSrv.success('禁用成功!');
this.st.reload();
@ -185,6 +194,4 @@ export class ParterLevelConfigListComponent implements OnInit {
this.sf.reset();
this.st.load(1);
}
}

View File

@ -617,15 +617,8 @@ export class AddEtpPartnerComponent {
}
private setInfo(info: any) {
if (info.name) {
this.sf.setValue('/adminUserInfo/name', info.name);
}
if (info.certificatePhotoFront) {
this.sf.setValue('/adminUserInfo/certificatePhotoFront', info.certificatePhotoFront);
}
if (info.certificatePhotoFrontWatermark) {
console.log(this.sf.getProperty('/adminUserInfo/certificatePhotoFrontWatermark'));
this.sf.setValue('/adminUserInfo/certificatePhotoFrontWatermark', [
{
uid: -1,
@ -635,11 +628,7 @@ export class AddEtpPartnerComponent {
response: info.certificatePhotoFrontWatermark
}
]);
}
if (info.certificatePhotoBack) {
this.sf.setValue('/adminUserInfo/certificatePhotoBack', info.certificatePhotoBack);
}
if (info.certificatePhotoBackWatermark) {
this.sf.setValue('/adminUserInfo/certificatePhotoBackWatermark', [
{
uid: -1,
@ -649,18 +638,9 @@ export class AddEtpPartnerComponent {
response: info.certificatePhotoBackWatermark
}
]);
}
if (info.certificateNumber) {
this.sf.setValue('/adminUserInfo/certificateNumber', info.certificateNumber);
}
if (info.validStartTime) {
this.sf.setValue('/adminUserInfo/validStartTime', info.validStartTime);
}
if (info.validEndTime) {
this.sf.setValue('/adminUserInfo/validEndTime', info.validEndTime);
this.sf.setValue('/adminUserInfo/_isLoingDate', false);
} else {
this.sf.setValue('/adminUserInfo/_isLoingDate', true);
}
this.sf.setValue('/adminUserInfo/validEndTime', info?.validEndTime ? info?.validEndTime: null);
this.sf.setValue('/adminUserInfo/_isLoingDate', info?.validEndTime ? false: true);
}
}

View File

@ -339,50 +339,30 @@ export class AddPersonalPartnerComponent {
}
private setInfo(info: any) {
if (info.name) {
this.sf.setValue('/adminUserInfo/name', info.name);
}
if (info.certificatePhotoFront) {
this.sf.setValue('/adminUserInfo/certificatePhotoFront', info.certificatePhotoFront);
}
if (info.certificatePhotoFrontWatermark) {
console.log(this.sf.getProperty('/adminUserInfo/certificatePhotoFrontWatermark'));
this.sf.setValue('/adminUserInfo/name', info?.name);
this.sf.setValue('/adminUserInfo/certificatePhotoFront', info?.certificatePhotoFront);
this.sf.setValue('/adminUserInfo/certificatePhotoFrontWatermark', [
{
uid: -1,
name: '文件',
status: 'done',
url: info.certificatePhotoFrontWatermark,
response: info.certificatePhotoFrontWatermark
url: info?.certificatePhotoFrontWatermark,
response: info?.certificatePhotoFrontWatermark
}
]);
}
if (info.certificatePhotoBack) {
this.sf.setValue('/adminUserInfo/certificatePhotoBack', info.certificatePhotoBack);
}
if (info.certificatePhotoBackWatermark) {
this.sf.setValue('/adminUserInfo/certificatePhotoBack', info?.certificatePhotoBack);
this.sf.setValue('/adminUserInfo/certificatePhotoBackWatermark', [
{
uid: -1,
name: '文件',
status: 'done',
url: info.certificatePhotoBackWatermark,
response: info.certificatePhotoBackWatermark
url: info?.certificatePhotoBackWatermark,
response: info?.certificatePhotoBackWatermark
}
]);
}
if (info.certificateNumber) {
this.sf.setValue('/adminUserInfo/certificateNumber', info.certificateNumber);
}
if (info.validStartTime) {
this.sf.setValue('/adminUserInfo/validStartTime', info.validStartTime);
}
if (info.validEndTime) {
this.sf.setValue('/adminUserInfo/validEndTime', info.validEndTime);
this.sf.setValue('/adminUserInfo/_isLoingDate', false);
} else {
this.sf.setValue('/adminUserInfo/_isLoingDate', true);
}
this.sf.setValue('/adminUserInfo/certificateNumber', info?.certificateNumber);
this.sf.setValue('/adminUserInfo/validStartTime', info?.validStartTime);
this.sf.setValue('/adminUserInfo/validEndTime', info?.validEndTime ? info?.validEndTime: null);
this.sf.setValue('/adminUserInfo/_isLoingDate', info?.validEndTime ? false: true);
}
}

View File

@ -4,77 +4,113 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
* @LastEditTime : 2022-04-22 14:29:23
* @LastEditTime : 2022-04-26 20:44:56
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'新增'"> </page-header-wrapper>
<page-header-wrapper [title]="titleText" [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>
<!-- 数据列表 -->
<sv-container col="1">
<sv label="配置名称"> <input style="max-width: 400px;" nz-input placeholder="请输入" [(ngModel)]="configName" /></sv>
<sv-container col="1">
<sv label="配置名称"> <input style="max-width: 400px" nz-input placeholder="请输入" [disabled]="hiden" [(ngModel)]="configName" /></sv>
<sv-title>固定结算费率配置</sv-title>
<sv-title> 固定结算费率配置</sv-title>
<sv label="固定结算费率"> <nz-input-number [(ngModel)]="accountingRate" [nzPrecision]="precision" nzPlaceHolder="请输入"></nz-input-number>&nbsp;%</sv>
<sv label="固定结算费率">
<nz-input-number [disabled]="hiden" [nzMin]="0" [nzMax]="100" [(ngModel)]="accountingRate" [nzPrecision]="precision" nzPlaceHolder="请输入"></nz-input-number
>&nbsp;%</sv
>
<sv-title>业务量和管理费比例配置</sv-title>
<sv-title>业务量和管理费比例配置</sv-title>
<sv label="选择配置类型">
<nz-radio-group [(ngModel)]="configType">
<label nz-radio nzValue="1">按全部等级配置</label>
<label nz-radio nzValue="2">按不同等级配置</label>
</nz-radio-group>
<sv label="选择配置类型">
<nz-radio-group [(ngModel)]="configType" [disabled]="hiden">
<label nz-radio nzValue="1">按全部等级配置</label>
<label nz-radio nzValue="2">按不同等级配置</label>
</nz-radio-group>
</sv>
<sv col="1" >
<div style='width: 850px'>
<app-rebate-table #table [(data)]='tabelData'></app-rebate-table>
<sv col="1">
<div style="width: 850px" *ngIf="configType == '1'">
<app-rebate-table #table [(data)]="tabelData" [type]="1" [hiden]="hiden"></app-rebate-table>
</div>
<div style="width: 850px" *ngIf="configType == '2'">
<app-rebate-table #table [(data)]="tabelData" [type]="2" [hiden]="hiden"></app-rebate-table>
</div>
</sv>
<sv-title>关联合伙人配置</sv-title>
<sv-title>关联合伙人配置</sv-title>
<sv label="合伙人选择">
<nz-select [(ngModel)]="partnerType" (ngModelChange)="changePartner(partnerType)" style="max-width: 400px; min-width: 200px;">
<nz-option nzValue="1" nzLabel="全部合伙人"></nz-option>
<nz-option nzValue="2" nzLabel="新注册合伙人"></nz-option>
<nz-option nzValue="3" nzLabel="自定义合伙人"></nz-option>
</nz-select>
<span *ngIf="addStatus" style="padding-left: 15px; color: #0000FF;" (click)="add()">添加</span>
<st *ngIf="partnerPeopleList?.length > 0" #st [data]="partnerPeopleList" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' } }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100] }" [loading]="false"
[scroll]="{ x: '1000' }">
</st>
</sv>
<sv label="合伙人范围">
<nz-select
[(ngModel)]="partnerType"
[disabled]="hiden"
(ngModelChange)="changePartner(partnerType)"
style="max-width: 400px; min-width: 200px"
>
<nz-option nzValue="1" nzLabel="全部合伙人(默认模板)"></nz-option>
<nz-option nzValue="2" nzLabel="新注册合伙人"></nz-option>
<nz-option nzValue="3" nzLabel="自定义合伙人"></nz-option>
</nz-select>
<span *ngIf="addStatus" style="padding-left: 15px; color: #0000ff" (click)="add()">添加</span>
<st
*ngIf="partnerPeopleList?.length > 0"
#st
[data]="partnerPeopleList"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' } }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100] }"
[loading]="false"
[scroll]="{ x: '1000' }"
>
</st>
</sv>
<sv label="优先级" col="1">
<nz-select [(ngModel)]="priority" style="max-width: 400px; min-width: 200px;">
<nz-option nzValue=1 nzLabel="1">1</nz-option>
<nz-option nzValue=2 nzLabel="2">2</nz-option>
<nz-option nzValue=3 nzLabel="3">3</nz-option>
<nz-option nzValue=4 nzLabel="4">4</nz-option>
<nz-option nzValue=5 nzLabel="5">5</nz-option>
</nz-select>
</sv>
<sv label="优先级" col="1">
<nz-select [(ngModel)]="priority" [disabled]="hiden" style="max-width: 400px; min-width: 200px; margin-left: 28px">
<nz-option nzValue="1" nzLabel="1">1</nz-option>
<nz-option nzValue="2" nzLabel="2">2</nz-option>
<nz-option nzValue="3" nzLabel="3">3</nz-option>
<nz-option nzValue="4" nzLabel="4">4</nz-option>
<nz-option nzValue="5" nzLabel="5">5</nz-option>
</nz-select>
</sv>
<sv label="规则说明" col="1">
<sf #sf mode="edit" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 12 }} }"
button="none"> </sf>
</sv>
<sv label="规则说明" col="1">
<sf
#sf
mode="edit"
[disabled]="hiden"
[formData]="formData"
[schema]="schema1"
[ui]="{ '*': { spanLabelFixed: 10, grid: { span: 16 } } }"
button="none"
>
</sf>
</sv>
<sv label="备注" col="1" style="margin-top: 16px;">
<textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="remarke"></textarea>
</sv>
<sv label="备注" col="1" style="margin-top: 16px">
<textarea
[disabled]="hiden"
style="max-width: 400px; min-width: 200px; margin-left: 40px"
rows="4"
nz-input
[(ngModel)]="remarke"
></textarea>
</sv>
</sv-container>
</sv-container>
<div class="align-center" style="margin-top: 15px;">
<button nz-button nzType="primary" (click)="goBack()">取消</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="save()"
acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交</button
>
</div>
<div class="align-center" style="margin-top: 15px" *ngIf="!hiden">
<button nz-button nzType="primary" (click)="goBack()">取消</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="save()" acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']"
>提交</button
>
</div>
</nz-card>

View File

@ -4,20 +4,18 @@
* @Author : Shiming
* @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming
* @LastEditTime : 2022-04-22 15:01:43
* @LastEditTime : 2022-04-26 21:06:50
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { ModalHelper } from '@delon/theme';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { processSingleSort, ShipperBaseService } from '@shared';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { RebateManagementService } from '../../../services/rebate-management.service';
import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlist/add-partnerlist.component';
import { inRange } from '@delon/util';
@Component({
selector: 'app-parter-channel-rebate-management-add',
styleUrls: ['./add.component.less'],
@ -25,8 +23,12 @@ import { inRange } from '@delon/util';
})
export class ParterRebateManageMentAddComponent implements OnInit {
@ViewChild('table') table!: any;
titleText :string= '新增';
tabelData: any;
tabelType: any;
formData: any;
addStatus: boolean = false;
hiden: boolean = false;
configName: string = '';
partnerType: string = '';
remarke: string = '';
@ -35,7 +37,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
partnerPeopleList: any = [];
configType = '1';
precision = 2;
partnerId :Array<string> =[];
partnerId: Array<string> = [];
inputValue = '';
@ViewChild('st', { static: true })
st!: STComponent;
@ -48,47 +50,61 @@ export class ParterRebateManageMentAddComponent implements OnInit {
private modal: NzModalService,
public shipperservice: ShipperBaseService
) {}
columns: STColumn[] = [
{
title: '合伙人名称',
index: 'enterpriseName',
width: 180,
format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '')
},
{ title: '联系人', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') },
{ title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 },
{ title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } },
{
title: '操作', width: '90px', fixed: 'right',
buttons: [
{
text: '移除',
click: _record => this.delete(_record),
acl: { ability: ['AbnormalAppear-reply'] }
},
]
},
];
columns: STColumn[] =[]
initSF(data?: any) {
this.schema1 = {
properties: {
ruleDescription: {
type: 'string',
title: '',
disabled: this.hiden,
ui: {
widget: 'tinymce',
loadingTip: 'loading...',
config: {
height: 500,
height: 500
}
},
}
// default: data?.agreementContent || ''
}
}
};
this.columns= [
{
title: '合伙人名称',
index: 'enterpriseName',
width: 180,
format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '')
},
{ title: '联系人', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') },
{ title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 },
{ title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } },
{
title: '操作',
width: '90px',
fixed: 'right',
buttons: [
{
text: '移除',
click: _record => this.delete(_record),
iif: ()=> {
return !this.hiden
},
acl: { ability: ['AbnormalAppear-reply'] }
}
]
}
];
}
ngOnInit() {
this.addStatus =false
if(this.ar.snapshot?.queryParams?.id) {
this.titleText= '查看'
this.hiden= true
this.initSF();
this.initData(this.ar.snapshot?.queryParams?.id);
}
this.addStatus = false;
this.initSF();
}
goBack() {
@ -97,64 +113,98 @@ export class ParterRebateManageMentAddComponent implements OnInit {
/**
*合伙人选择
*/
add(item?: any) {
add(item?: any) {
const modalRef = this.modal.create({
nzTitle: '合伙人选择',
nzWidth: 1000,
nzContent: ParterRebateManageMentAddPartnerListComponent,
nzComponentParams: {
i: item,
i: item
},
nzFooter: null
});
modalRef.afterClose.subscribe((res: any) => {
this.partnerId = [];
if (res) {
if(Array.isArray(res)) {
console.log(res);
console.log(this.partnerPeopleList);
this.partnerPeopleList = this.partnerPeopleList.concat(res);
if (Array.isArray(res)) {
this.partnerPeopleList = this.partnerPeopleList.concat(res);
res.forEach((ele: any) => {
this.partnerId.push(ele?.id);
})
});
} else {
console.log(res);
this.partnerPeopleList = this.partnerPeopleList.concat(res);
this.partnerPeopleList = this.partnerPeopleList.concat(res);
this.partnerId.push(res?.id);
}
}
}
});
}
delete(item: any) {
this.partnerPeopleList = this.partnerPeopleList.filter((d:any, i: any) => {
return item.id != d.id
});
this.partnerPeopleList = this.partnerPeopleList.filter((d: any, i: any) => {
return item.id != d.id;
});
}
save () {
save() {
console.log(this.configName);
// if(!this.configName) {
// this.service.msgSrv.warning('请输入配置名称!');
// return
// }
// if(!this.accountingRate) {
// this.service.msgSrv.warning('请输入固定结算费率!');
// return
// }
// if(!this.partnerType) {
// this.service.msgSrv.warning('请选择合伙人范围!');
// return
// }
// if(this.partnerType == '3' && this.partnerPeopleList?.length == 0) {
// this.service.msgSrv.warning('请选择合伙人!');
// return
// }
this.table.data.forEach((element: any) => {
console.log(element);
});
const params = {
accountingRate: this.accountingRate,
configName: this.configName,
configType: this.configType,
rebateConfigLineDTO: this.table.data,
priority: this.priority,// 优先级
partnerId: this.partnerId.join(','),
priority: this.priority, // 优先级
partnerIds: this.partnerId,
ruleDescription: this.sf.value.ruleDescription,
remarke: this.remarke,
partnerType: this.partnerType
}
console.log(params);
this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
};
// this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
// if (res) {
// this.service.msgSrv.success('新增成功!');
// this.router.navigate(['/partner/rebate/setting']);
// }
// });
}
initData(id:string) {
this.service.request(this.service.$api_get_getPartnerRebateConfigInfo, {id: id}).subscribe((res: any) => {
if(res) {
console.log(res);
this.service.msgSrv.success('新增成功!')
this.router.navigate(['/partner/rebate/setting'])
this.configName = res?.configName;
this.accountingRate = res?.accountingRate;
this.accountingRate = res?.accountingRate;
this.configType = res?.configType + '';
this.tabelData = res?.partnerRebateConfigLineVOList;
this.partnerType = res?.partnerType + '';
this.partnerPeopleList = res?.partnerListVOs;
this.priority = res?.priority + '';
this.formData = {ruleDescription: res?.ruleDescription};
this.remarke = res.remark;
}
})
}
changePartner(value: any) {
console.log(value);
if(value) {
this.addStatus = true
if (value == '3') {
this.addStatus = true;
} else {
this.addStatus = false;
}
}
}

View File

@ -120,12 +120,12 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
{
title: '操作',
fixed: 'right',
width: '90px',
width: '120px',
className: 'text-left',
buttons: [
{
text: '查看',
click: _record => this.viewEvaluate(_record),
click: _record => this.configAction(_record),
},
{
text: '禁用',
@ -187,9 +187,9 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
}
});
}
configAction() {
this.router.navigate(['/partner/rebate/setting/add/', 1])
}
configAction(value?: any) {
this.router.navigate(['/partner/rebate/setting/add/', '0'], {queryParams: value})
}
/**
* 重置表单
*/

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-10 11:19:00
* @LastEditors : Shiming
* @LastEditTime : 2022-03-29 11:26:38
* @LastEditTime : 2022-04-25 19:23:25
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\services\\rebate-management.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -27,6 +27,8 @@ export class RebateManagementService extends BaseService {
// 运营端查询合伙人返佣
public $api_get_getIncomeByBillpage = '/api/bpc/partnerIncomeHead/getIncomeByBillpage';
// 获取返佣模板信息
public $api_get_getPartnerRebateConfigInfo = '/api/mdc/rebateConfig/getPartnerRebateConfigInfo';
  // 查询合伙人信息-分页
public $api_get_partner_page = '/api/mdc/partner/list/page';
constructor(public injector: Injector) {

View File

@ -1,3 +1,13 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-21 13:49:22
* @LastEditors : Shiming
* @LastEditTime : 2022-04-25 11:11:58
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\recorded\\services\\recorded.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Injectable, Injector } from '@angular/core';
import { BaseService } from '@shared';
@ -7,7 +17,7 @@ import { BaseService } from '@shared';
export class RecordedService extends BaseService {
$api_get_recorded_page = `/api/bpc/partnerInvoiceEntry/queryInvoiceEntrylist`; // 查询合伙人发票入账主表
$api_get_recorded_record_detail = `/api/bpc/partnerInvoice/getDetailByOpration`; // 入账记录详情
$api_get_recorded_record_detail = `/api/bpc/partnerInvoice/getDetailById`; // 入账记录详情
$api_disagree_recorded = ``; // 拒绝审核
$api_agree_recorded = ``; // 同意审核
$api_audit_recored = `/api/bpc/partnerInvoiceEntry/oprationAudit`; // 审核单据

View File

@ -1,187 +1,160 @@
<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 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">
<h3 style="font-weight: 600">提现手续费配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="125" [se-container]="1">
<se label="个人提现手续费" style="margin:15px 0 0 0">
<div>
按照提现金额收取
<nz-input-number [(ngModel)]="personValue" [nzMin]="0" [nzMax]="100" [nzPrecision]="2" [nzStep]="0.01"></nz-input-number>
<span> %手续费 </span>
</div>
</se>
<se label="企业提现手续费" style="margin:15px 0 0 0;">
<div>
按照提现金额收取
<nz-input-number
[(ngModel)]="enterpriseValue"
[nzMin]="0"
[nzMax]="100"
[nzPrecision]="2"
[nzStep]="0.01"
></nz-input-number>
<span> %手续费 </span>
</div>
</se>
</div>
</div>
<div nz-col nzSpan="20" style="overflow: scroll">
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===0 ">
<h2 style="font-weight: 800;">货主端配置</h2>
<h3 style="font-weight: 600;margin-left: 120px;">图片配置</h3>
<sf style="margin-left: 30px" #sf mode="default" [formData]="i" [schema]="schema2"
[ui]="{ '*': { spanLabelFixed: 200,grid: { span: 24 }} }" button="none">
<ng-template sf-template="start" let-me let-ui="ui" let-schema="schema">
</ng-template>
<template id="tpl">
<span>so good </span>
</template>
<ng-template sf-template="time2" let-me let-ui="ui" let-schema="schema">
<div class="text-left">可输入字符</div>
<nz-range-picker extend nzFormat="HH:mm:ss"></nz-range-picker>
</ng-template>
</sf>
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">短信配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="230" [se-container]="1">
<se label="短信内容设置" style="margin-bottom: 0;">
<p style="margin-top: 6px;">配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容</p>
<textarea nz-input rows="4"
placeholder="【运多星】您的验证码XXXXXX。有效期10分钟请及时输入请勿向他人泄露您的验证码。如非本人操作请忽略。"
style="width: 400px;"></textarea>
</se>
</div>
</div>
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">通知配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24">
<ng-container *ngTemplateOutlet="textMessage;context:{$implicit: 'World', title:'用户实名认证审核'}">
</ng-container>
<ng-container *ngTemplateOutlet="textMessage;context:{$implicit: 'World', title: '企业认证审核'}">
</ng-container>
</div>
</div>
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">客服电话配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="230">
<se label="客服电话" style="margin-bottom: 0;">
<input nz-input style="width: 325px;" />
</se>
</div>
</div>
</nz-card>
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===1">
<h2 style="font-weight: 800;">司机端配置</h2>
<h3 style="font-weight: 600;margin-left: 120px;">图片配置</h3>
<sf style="margin-left: 30px" #sf mode="default" [formData]="i" [schema]="schema"
[ui]="{ '*': { spanLabelFixed: 200,grid: { span: 24 }} }" button="none">
<ng-template sf-template="start" let-me let-ui="ui" let-schema="schema">
</ng-template>
<template id="tpl">
<span>so good </span>
</template>
<ng-template sf-template="time2" let-me let-ui="ui" let-schema="schema">
<div class="text-left">可输入字符</div>
<nz-range-picker extend nzFormat="HH:mm:ss"></nz-range-picker>
</ng-template>
</sf>
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">短信配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="230" [se-container]="1">
<se label="短信内容设置" style="margin-bottom: 0;">
<p style="margin-top: 6px;">配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容</p>
<textarea nz-input rows="4"
placeholder="【运多星】您的验证码XXXXXX。有效期10分钟请及时输入请勿向他人泄露您的验证码。如非本人操作请忽略。"
style="width: 400px;"></textarea>
</se>
</div>
</div>
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">通知配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24">
<ng-container *ngTemplateOutlet="textMessage;context:{$implicit: 'World', title:'司机实名认证审核'}">
</ng-container>
<ng-container *ngTemplateOutlet="textMessage;context:{$implicit: 'World', title: '司机驾驶证证审核'}">
</ng-container>
<div se-container [labelWidth]="230" [se-container]="1">
<se class="mb-sm">
<nz-radio-group [(ngModel)]="formDate.isAudit">
<label nz-radio [nzValue]="false" class="mt-sm">到期系统通知</label>
<label nz-radio [nzValue]="true" class="mt-sm">短信通知</label>
</nz-radio-group>
</se>
<se label="司机驾驶证证审核" class="mb-sm">
<nz-radio-group [(ngModel)]="formDate.isAudit">
<label nz-radio [nzValue]="false" class="mt-sm">审核通过系统通知</label>
<label nz-radio [nzValue]="true" class="mt-sm">短信通知</label>
</nz-radio-group>
</se>
<se class="mb-sm">
<nz-radio-group [(ngModel)]="formDate.isAudit">
<label nz-radio [nzValue]="false" class="mt-sm">审核驳回系统通知</label>
<label nz-radio [nzValue]="true" class="mt-sm">短信通知</label>
</nz-radio-group>
</se>
<se class="mb-sm">
<nz-radio-group [(ngModel)]="formDate.isAudit">
<label nz-radio [nzValue]="false" class="mt-sm">到期系统通知</label>
<label nz-radio [nzValue]="true" class="mt-sm">短信通知</label>
</nz-radio-group>
</se>
</div>
</div>
</div>
<h3 style="font-weight: 600;margin-left: 140px;" class="mt-md">客服电话配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="230">
<se label="客服电话" >
<input nz-input style="width: 325px;" />
</se>
</div>
</div>
<h3 style="font-weight: 600;margin-left: 140px;" class="mt-md">证件提醒配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="230" [se-container]="1">
<se label="证件临期提醒" style="margin-bottom: 0;">
距离到期时间
<input type="number" nz-input style="width: 40px;"/>
天开始提醒,每隔
<input type="number" nz-input style="width: 40px;" />
天提醒一次
</se>
</div>
</div>
</nz-card>
<div class="mb-md save-btn">
<button class="ml-lg" nz-button nzSize="large" nzType="primary">保存</button>
<button class="ml-lg" nz-button nzSize="large">取消</button>
<h3 style="font-weight: 600;margin:15px 0 0 0;" class="mb-md">合伙人提现配置</h3>
<div nz-row nzGutter="8" class="audit">
<div nz-col nzSpan="24" se-container>
<se label="提现审核" style="margin:15px 0 0 0;">
<nz-radio-group [(ngModel)]="auditValue">
<label nz-radio [nzValue]="false" class="mt-sm">关闭</label>
<label nz-radio [nzValue]="true" class="mt-sm">开启</label>
</nz-radio-group>
</se>
<se label="审核时间" style="margin:15px 0 0 0;">
<div se-container [se-container]="1" style="margin-left: 0px">
<nz-radio-group style="display: block" [(ngModel)]="auditTime" (ngModelChange)="changeAuto(auditTime)">
<label nz-radio [nzValue]="1" class="mt-sm">全天</label>
<label nz-radio [nzValue]="2" class="mt-sm">自定义</label>
</nz-radio-group>
</div>
</se>
<div style="margin-left: 200px">
<ng-container *ngTemplateOutlet="auditTimes"> </ng-container>
</div>
</div>
</div>
<h3 style="font-weight: 600;margin:15px 0 0 0;" class="mb-md">客户定义配置</h3>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24">
<span>客户</span>
<nz-input-number style="margin: 0 10px; " [(ngModel)]="personValue" [nzMin]="0" [nzMax]="3000" [nzPrecision]="2" [nzStep]="0.1"></nz-input-number>
<span>天内没有交易订单的视为“沉默客户”</span>
</div>
<div nz-col nzSpan="24" style="margin-top: 10px;">
<span>客户</span>
<nz-input-number style="margin: 0 10px; " [(ngModel)]="personValue" [nzMin]="0" [nzMax]="3000" [nzPrecision]="2" [nzStep]="0.1"></nz-input-number>
<span>天内没有交易订单的视为“流失客户”</span>
</div>
<div nz-col nzSpan="24">
<span style="color: #797979; font-size: 14px;">说明:交易订单指从司机已接单开始的订单。</span>
</div>
</div>
</nz-card>
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab === 1">
<h3 style="font-weight: 600;">邀请合伙人</h3>
<sf
style="margin-left: 14px"
#sf
mode="default"
[formData]="i"
[schema]="schema"
[ui]="{ '*': { spanLabelFixed: 200, grid: { span: 24 } } }"
button="none"
>
</sf>
<h3 style="font-weight: 600;">邀请客户</h3>
<sf
style="margin-left: 14px"
#sf2
mode="default"
[formData]="i"
[schema]="schema2"
[ui]="{ '*': { spanLabelFixed: 200, grid: { span: 24 } } }"
button="none"
>
<ng-template sf-template="start" let-me let-ui="ui" let-schema="schema"> </ng-template>
<template id="tpl">
<span>so good </span>
</template>
</sf>
</nz-card>
<div class="mb-md save-btn">
<button class="ml-lg" nz-button nzSize="large" nzType="primary">保存</button>
<button class="ml-lg" nz-button nzSize="large">取消</button>
</div>
</div>
</div>
</nz-card>
<ng-template #textMessage let-data="data" let-title="title">
<div se-container [labelWidth]="230" [se-container]="1">
<se [label]="title" style="margin-bottom: 0;">
<nz-radio-group [(ngModel)]="formDate.isAudit">
<label nz-radio [nzValue]="false" class="mt-sm">审核通过系统通知</label>
<label nz-radio [nzValue]="true" class="mt-sm">短信通知</label>
</nz-radio-group>
</se>
<se class="mb-sm">
<label for="">通知标题 : </label>
<input nz-input placeholder="请不要超过20个汉字" style="width: 325px;" maxlength="20" />
</se>
<se class="mb-sm">
<label for="">通知内容 : </label>
<input nz-input placeholder="请不要超过50个汉字" style="width: 325px;" maxlength="50" />
</se>
<se class="mb-sm">
<nz-radio-group [(ngModel)]="formDate.isAudit">
<label nz-radio [nzValue]="false" class="mt-sm">审核驳回系统通知</label>
<label nz-radio [nzValue]="true" class="mt-sm">短信通知</label>
</nz-radio-group>
</se>
<se class="mb-sm">
<label for="">通知标题 : </label>
<input nz-input placeholder="请不要超过20个汉字" style="width: 325px;" maxlength="20" />
</se>
<se class="mb-sm">
<label for="">通知内容 : </label>
<input nz-input placeholder="请不要超过50个汉字" style="width: 325px;" maxlength="50" />
</se>
<se class="mb-sm">
<div class=" d-flex">
<label for="">短信内容 : </label>
<textarea nz-input rows="3" placeholder="【运多星】您的账号XXXXXX。实名认证审核已被驳回请重新上传"
style="width: 325px;margin-left: 14px;"></textarea>
</div>
</se>
<ng-template #auditTimes let-data="data" let-title="title">
<div *ngIf="auditTimeStatus" >
<div style="display: flex">
<nz-radio-group [(ngModel)]="everyDay" (ngModelChange)="everyDayChange(everyDay)" style="display: block">
<label nz-radio [nzValue]="1" class="mt-sm"
>每天<span *ngIf="TimeStatus" style="margin-left: 30px; color: #0200ff; cursor: pointer" (click)="addEvery()">添加时间段</span></label
>
</nz-radio-group>
<br />
<div *ngIf="TimeStatus">
<div *ngFor="let item of everyDayData; let i = index">
<div style="margin-top: 15px;">
<input type="time" [(ngModel)]="item.startTime" placeHolder="开始时间" style="margin-left: 23px" />
<label class="ml-sm mr-sm"> --</label>
<input type="time" [(ngModel)]="item.endTime" placeHolder="结束时间" style="margin-left: 0" class="mr-xl" />
<label class="ml-sm mr-sm" style=" color: #0200ff; cursor: pointer" *ngIf="i !== 0" (click)="delEvery(i)">删除</label>
</div>
</div>
</div>
</div>
</ng-template>
<div >
<nz-radio-group [(ngModel)]="MonthDay" (ngModelChange)="MonthDayChange(MonthDay)" style="display: block">
<label nz-radio [nzValue]="2" class="mt-sm"
>每周<span *ngIf="!TimeStatus" style="margin-left: 30px; color: #0200ff; cursor: pointer" (click)="addMonth()">添加星期</span></label
>
</nz-radio-group>
<div *ngIf="!TimeStatus">
<div *ngFor="let item of MonthDayData; let i = index">
<nz-checkbox-group style="margin-top: 15px;" [(ngModel)]="item.month" (ngModelChange)="changeMonth(item.month)"></nz-checkbox-group>
<br />
<div *ngFor="let ite of item.Times; let ii = index">
<div style="margin-top: 15px;">
<input type="time" [(ngModel)]="ite.startTime" placeHolder="开始时间" style="margin-left: 23px" />
<label class="ml-sm mr-sm"> --</label>
<input type="time" [(ngModel)]="ite.endTime" placeHolder="结束时间" style="margin-left: 0" class="mr-xl" />
<label class="ml-sm mr-sm" style=" color: #0200ff; cursor: pointer" (click)="addMonthEvery(i)">添加时间段</label>
<label *ngIf="ii !== 0" class="ml-sm mr-sm" style=" color: #0200ff; cursor: pointer" (click)="delMonth(i,ii)">删除</label>
</div>
</div>
</div>
</div>
</div>
</div>
</ng-template>

View File

@ -18,5 +18,8 @@
width : 100px;
margin-left: 10px;
}
.audit .ant-form-item-label{
width: 81px !important;
}
}
}

View File

@ -1,29 +1,70 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { SFComponent, SFSchema, SFUploadWidgetSchema } from '@delon/form';
import { Observable, Observer } from 'rxjs';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { ConfigService } from '../../services/config.service';
import { apiConf } from '@conf/api.conf';
const IMAGECONFIG = {
previewFile: (file: NzUploadFile) => of(file.url),
action: apiConf.waterFileUpload,
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
fileSize: 5120,
limit: 1,
limitFileCount: 1,
resReName: 'data.fullFileWatermarkPath',
urlReName: 'data.fullFileWatermarkPath',
widget: 'upload',
name: 'multipartFile',
multiple: false,
listType: 'picture-card'
} as SFUploadWidgetSchema;
@Component({
selector: 'app-config',
selector: 'app-parterl-config',
templateUrl: './config.component.html',
styleUrls: ['./config.component.less']
})
export class PartnerSystemConfigComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
formDate: any = {
isAudit: false,
isEveryDay: false,
isEveryWeek: false
};
personValue!: number;
enterpriseValue!: number;
auditValue!: number;
auditTime!: any;
auditTimeStatus: boolean = false
everyDay: boolean = false
MonthDay: boolean = false
time: Date | null = null;
defaultOpenValue = new Date(0, 0, 0, 0, 0, 0);
tabs = [
{
name: '货主端配置'
name: '基础配置'
},
{
name: '司机端配置'
name: '分享配置'
}
];
selectedTab = 0;
TimeStatus: boolean = true
everyDayData: Array<any> =[];
MonthDayData: any = [
{month: [
{ label: '周一', value: '周一', },
{ label: '周二', value: '周二' },
{ label: '周三', value: '周三' },
{ label: '周四', value: '周四' },
{ label: '周五', value: '周五' },
{ label: '周六', value: '周六' },
{ label: '周日', value: '周日' }
], Times:[ {
startTime: [],
endTime: [],
}]}
]
checkOptionsOne = [
{ label: '周一', value: '周一', checked: true },
@ -39,189 +80,212 @@ export class PartnerSystemConfigComponent implements OnInit {
schema!: SFSchema;
schema2!: SFSchema;
imageConfig = {
widget: 'upload',
action: `/scm/cms/cms/upload/multipartFile/fileModel`,
limit: 1,
limitFileCount: 1,
resReName: 'url',
urlReName: 'url',
data: {
appId: this.service.envSrv.getEnvironment().appId
},
multiple: false,
listType: 'picture-card',
showRequired: true
};
// IMAGECONFIG = {
// widget: 'upload',
// action: `/scm/cms/cms/upload/multipartFile/fileModel`,
// limit: 1,
// limitFileCount: 1,
// resReName: 'url',
// urlReName: 'url',
// data: {
// appId: this.service.envSrv.getEnvironment().appId
// },
// multiple: false,
// listType: 'picture-card',
// showRequired: true
// };
constructor(private service: ConfigService) {}
ngOnInit() {
this.initSF();
this.everyDayData = [
{
startTime: '',
endTime: '',
}
]
}
addEvery() {
this.everyDayData.push(
{
startTime: [],
endTime: [],
}
)
}
delEvery(index: number) {
this.everyDayData.splice(index, 1)
}
addMonthEvery(value: any) {
this.MonthDayData[value].Times.push(
{
startTime: '',
endTime: ''
}
)
}
addMonth() {
this.MonthDayData.push(
{month: [
{ label: '周一', value: '周一', },
{ label: '周二', value: '周二' },
{ label: '周三', value: '周三' },
{ label: '周四', value: '周四' },
{ label: '周五', value: '周五' },
{ label: '周六', value: '周六' },
{ label: '周日', value: '周日' }
], Times:[{
startTime: '',
endTime: ''
}]}
)
}
delMonth(value: number,index: number) {
this.MonthDayData[value].Times.splice(index, 1)
}
changeType(type: number): void {
this.selectedTab = type;
}
changeMonth(type: any): void {
console.log(type);
console.log( this.MonthDayData);
}
everyDayChange(type: any): void {
console.log(type);
if(type) {
this.MonthDay = false
this.TimeStatus = true
}
}
MonthDayChange(type: any): void {
console.log(type);
if(type) {
this.everyDay = false
this.TimeStatus = false
}
}
initSF() {
this.schema = {
properties: {
sysMinLogo: {
roadTransportPhoto: { title: '', type: 'string', ui: { hidden: true } },
roadTransportPhotoWatermark: {
type: 'string',
title: '系统LOGO',
// enum: [],
title: '分享海报',
ui: {
...this.imageConfig,
descriptionI18n: '大尺寸logo支持JPG、PNG格式文件小于2M建议尺寸300*170px。',
...IMAGECONFIG,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸 750px* 1624 px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, 'sysMinLogo');
this.sf?.setValue('/sysMinLogo', avatar);
this.i.sysMinLogo = avatar;
this.sf.setValue('/roadTransportPhoto', args.fileList[0].response.data.fullFilePath);
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo: {
share: { title: '', type: 'string', ui: { hidden: true } },
shareWatermark: {
type: 'string',
title: '用户默认头像',
title: '分享图',
ui: {
...this.imageConfig,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸60*60px。',
...IMAGECONFIG,
descriptionI18n: '支持JPG、PNG格式文件小于2M 建议尺寸 856px * 688px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo', avatar);
this.i.sysMaxLogo = avatar;
this.sf.setValue('/share', args.fileList[0].response.data.fullFilePath);
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo1: {
take: { title: '', type: 'string', ui: { hidden: true } },
takeWatermark: {
type: 'string',
title: '用户默认头像',
title: '受邀海报',
ui: {
...this.imageConfig,
descriptionI18n: '支持JPG、PNG格式文件小于5M建议尺寸375*773px。',
...IMAGECONFIG,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸 750px* 1624 px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo1', avatar);
this.i.sysMaxLogo1 = avatar;
this.sf.setValue('/take', args.fileList[0].response.data.fullFilePath);
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
complianceRemark: {
title: '分享文案',
type: 'string',
maxLength: 50,
ui: {
placeholder: '请不要超过50个字',
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
}
}
},
required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1']
required: ['roadTransportPhotoWatermark', 'shareWatermark', 'takeWatermark', 'complianceRemark']
};
this.schema2 = {
properties: {
sysMinLogo: {
roadTransportPhoto: { title: '', type: 'string', ui: { hidden: true } },
roadTransportPhotoWatermark: {
type: 'string',
title: '系统LOGO(小)',
// enum: [],
title: '分享海报',
ui: {
...this.imageConfig,
descriptionI18n: '小尺寸logo支持JPG、PNG格式文件小于2M建议尺寸32*32px。',
...IMAGECONFIG,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸750px* 1624 px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, 'sysMinLogo');
this.sf?.setValue('/sysMinLogo', avatar);
this.i.sysMinLogo = avatar;
this.sf2.setValue('/roadTransportPhoto', args.fileList[0].response.data.fullFilePath);
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo: {
share: { title: '', type: 'string', ui: { hidden: true } },
shareWatermark: {
type: 'string',
title: '系统LOGO(大)',
title: '分享图',
ui: {
...this.imageConfig,
descriptionI18n: '小尺寸logo支持JPG、PNG格式文件小于2M建议尺寸32*32px。',
...IMAGECONFIG,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸 856px * 688px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo', avatar);
this.i.sysMaxLogo = avatar;
this.sf2.setValue('/share', args.fileList[0].response.data.fullFilePath);
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo1: {
take: { title: '', type: 'string', ui: { hidden: true } },
takeWatermark: {
type: 'string',
title: '用户默认头像',
title: '受邀海报',
ui: {
...this.imageConfig,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸60*60px。',
...IMAGECONFIG,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸750px* 1624 px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo1', avatar);
this.i.sysMaxLogo1 = avatar;
this.sf2.setValue('/take', args.fileList[0].response.data.fullFilePath);
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo2: {
complianceRemark: {
title: '分享文案',
type: 'string',
title: '企业默认头像',
maxLength: 50,
ui: {
...this.imageConfig,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸60*60px',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo2', avatar);
this.i.sysMaxLogo2 = avatar;
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo3: {
type: 'string',
title: '货主PC端登陆页海报',
ui: {
...this.imageConfig,
descriptionI18n: '支持JPG、PNG格式文件小于5M建议尺寸1920*630px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo3', avatar);
this.i.sysMaxLogo3 = avatar;
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo4: {
type: 'string',
title: 'APP开屏海报',
ui: {
...this.imageConfig,
descriptionI18n: '支持JPG、PNG格式文件小于5M建议尺寸375*773px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo4', avatar);
this.i.sysMaxLogo4 = avatar;
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
placeholder: '请不要超过50个字',
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
}
}
},
required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1', 'sysMaxLogo2', 'sysMaxLogo3', 'sysMaxLogo4']
required: ['roadTransportPhotoWatermark', 'shareWatermark', 'takeWatermark', 'complianceRemark']
};
}
private uploadBefore = (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 2;
@ -241,7 +305,14 @@ export class PartnerSystemConfigComponent implements OnInit {
observer.complete();
});
};
changeAuto(value: any) {
console.log(value);
if(value == '2') {
this.auditTimeStatus = true
} else {
this.auditTimeStatus = false
}
}
private getImageModel(args: any, key: any) {
return [
{

View File

@ -8,30 +8,15 @@
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<nz-card>
<!-- 搜索表单 -->
<!-- <nz-card>
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf
#sf
[schema]="schema"
[ui]="ui"
[mode]="'search'"
[disabled]="!sf?.valid"
[loading]="false"
(formSubmit)="st?.load(1)"
(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">
<button nz-button nzType="primary" [nzLoading]="loading" (click)="search()" acl [acl-ability]="['SUPPLY-INDEX-bulkSearch']">查询</button>
<button nz-button nzType="primary" [nzLoading]="loading" (click)="search()" acl
[acl-ability]="['SUPPLY-INDEX-bulkSearch']">查询</button>
<button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()">导出</button>
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
@ -41,43 +26,49 @@
</div>
</ng-container>
</div>
</nz-card>
</nz-card> -->
<ng-template #extraTemplate>
<div>
<button (click)="audit('', 2)" nz-button nzType="primary" acl [acl-ability]="['SUPPLY-INDEX-bulkBatchAudit']">审核</button>
<button (click)="releaseGoods()" nz-button nzType="primary" acl [acl-ability]="['SUPPLY-INDEX-bulkUndertakesToSupply']">代发货源</button>
<button nz-button nzDanger (click)="openDrawer()" class="mr-sm" [nzLoading]="loading" acl
[acl-ability]="['SUPPLY-INDEX-bulkSearch']">筛选</button>
<button nz-button nzDanger [disabled]="loading" (click)="exportFire()">导出</button>
<button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item acl [acl-ability]="['SUPPLY-INDEX-bulkBatchAudit']" (click)="audit('', 2)">
审核
</li>
<li nz-menu-item acl [acl-ability]="['SUPPLY-INDEX-bulkUndertakesToSupply']" (click)="releaseGoods()">
代发货源
</li>
</ul>
</nz-dropdown-menu>
</div>
</ng-template>
<nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'进行中(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已完结(' + tabs?.completedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
</nz-tabset>
<div style="position: relative">
<nz-alert
nzType="info"
[nzMessage]="'当前共' + st?.total + '行记录已选择' + selectedRows.length + ''"
nzShowIcon
[ngStyle]="{ margin: '0 0 1rem 0' }"
>
</nz-alert>
<nz-card class="table-box" style="margin: 0;">
<div class="tab_header">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'进行中(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'完结(' + tabs?.completedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
</nz-tabset>
</div>
<div style="margin-top: 15px">
<st
#st
[scroll]="{ x: '2000px' }"
[data]="service.$api_get_bulkPage_list"
[columns]="columns"
<div>
<div style="position: relative;">
<nz-alert nzType="info" [nzMessage]="'当前共' + st?.total + '行记录已选择' + selectedRows.length + ''" nzShowIcon
style="margin: 0.5rem 16px;display: block;" class="header_box">
</nz-alert>
</div>
<st #st [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_bulkPage_list" [columns]="columns"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="false"
>
<ng-template st-row="createUserName" let-item let-index="index">
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? '/' + item?.createUserPhone : ''}} </div>
</ng-template>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
<ng-template st-row="createUserName" let-item let-index="index">
<div> {{ item?.createUserName }}{{ item?.createUserPhone ? '/' + item?.createUserPhone : ''}} </div>
</ng-template>
<!--运费单价 -->
<ng-template st-row="freightPrice" let-item let-index="index">
<div class="mr-xs">{{ item?.freightPrice | currency }} </div>
@ -97,8 +88,7 @@
<ng-template st-row="orderSn" let-item let-index="index">
<div *ngFor="let item of item?.wayBillClassifiedStatisticsVOList">
<label>{{ item?.wayBillStatusLabel }}</label>
(<span [ngStyle]="{ color: item?.count > 0 ? '#1890FF' : '' }">{{ item?.count }}</span
>)
(<span [ngStyle]="{ color: item?.count > 0 ? '#1890FF' : '' }">{{ item?.count }}</span>)
</div>
</ng-template>
<!-- 货物信息 -->
@ -115,10 +105,12 @@
</st>
</div>
</nz-card>
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="货源审核" (nzOnCancel)="handleCancel('suppliersType')">
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="货源审核"
(nzOnCancel)="handleCancel('suppliersType')">
<ng-container *nzModalContent>
<div style="position: relative" *ngIf="auditMany">
<nz-alert nzType="info" [nzMessage]="'已选择' + selectedRows?.length + ''" nzShowIcon [ngStyle]="{ margin: '0 0 1rem 0' }">
<nz-alert nzType="info" [nzMessage]="'已选择' + selectedRows?.length + ''" nzShowIcon
[ngStyle]="{ margin: '0 0 1rem 0' }">
</nz-alert>
</div>
<sf #sfFre [schema]="freightSchema" [ui]="ui2" [compact]="false" [button]="'none'"> </sf>
@ -133,4 +125,4 @@
<button (click)="audit('',2)" nz-button nzType="primary">批量审核</button>
<button (click)="audit('')" nz-button nzType="primary">发布货源</button>
</div>
</ng-template> -->
</ng-template> -->

View File

@ -3,32 +3,31 @@ import { Router } from '@angular/router';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom';
import { SupplyManagementService } from '../../services/supply-management.service';
import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.component';
import { SupplyManagementUpdatePriceComponent } from '../update-price/update-price.component';
@Component({
selector: 'app-supply-management-bulk',
templateUrl: './bulk.component.html'
templateUrl: './bulk.component.html',
styleUrls: ['../../../commom/less/commom-table.less']
})
export class SupplyManagementBulkComponent implements OnInit {
export class SupplyManagementBulkComponent extends BasicTableComponent implements OnInit {
resourceStatus: any;
ui: SFUISchema = {};
ui2: SFUISchema = {};
schema: SFSchema = {};
auditMany = false;
isVisible = false;
loading: boolean = true;
auditID: any;
_$expand = false;
columns: STColumn[] = [];
freightSchema: SFSchema = {};
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
tabs: any = {
@ -37,12 +36,16 @@ export class SupplyManagementBulkComponent implements OnInit {
receivedQuantity: 0,
stayQuantity: 0
};
deviationHeight = 10;
constructor(
public service: SupplyManagementService,
private modal: NzModalService,
private router: Router,
public shipperservice: ShipperBaseService
) {}
public shipperservice: ShipperBaseService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {
this.initSF();
@ -136,10 +139,7 @@ export class SupplyManagementBulkComponent implements OnInit {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'service:type' },
containAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value
}
containAllLable: true
} as SFSelectWidgetSchema
},
settlementBasis: {
@ -149,10 +149,7 @@ export class SupplyManagementBulkComponent implements OnInit {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'goodresource:settlement:type' },
containAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value
}
containAllLable: true
} as SFSelectWidgetSchema
},
releaseTime: {
@ -162,9 +159,6 @@ export class SupplyManagementBulkComponent implements OnInit {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true
} as SFDateWidgetSchema
},
@ -175,9 +169,6 @@ export class SupplyManagementBulkComponent implements OnInit {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true
} as SFDateWidgetSchema
},
@ -187,9 +178,6 @@ export class SupplyManagementBulkComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}
@ -202,9 +190,6 @@ export class SupplyManagementBulkComponent implements OnInit {
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true,
onSearch: (q: any) => {
let str = q.replace(/^\s+|\s+$/g, '');
@ -335,7 +320,7 @@ export class SupplyManagementBulkComponent implements OnInit {
{
text: '二维码',
click: _record => this.assignedQrcode(_record),
iif: item => item.resourceStatus == 1
iif: item => item.resourceStatus == 1 && item.serviceType === '1' && !(item.resourceType === '2' && item.serviceType === '2')
},
{
text: '修改单价',
@ -364,27 +349,7 @@ export class SupplyManagementBulkComponent implements OnInit {
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}

View File

@ -8,7 +8,7 @@
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\index\\index.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [tab]="tpTab">
<!-- <page-header-wrapper [tab]="tpTab">
</page-header-wrapper>
<ng-template #tpTab>
<nz-tabset [(nzSelectedIndex)]="selectedIndex">
@ -19,4 +19,17 @@
<app-supply-management-bulk></app-supply-management-bulk>
</nz-tab>
</nz-tabset>
</ng-template>
</ng-template> -->
<div class="double_tabset_box">
<div class="header_box" style="margin-bottom: -12px;">
<label class="page_title"> <label class="driver">|</label> 货源管理</label>
</div>
<nz-tabset [(nzSelectedIndex)]="selectedIndex" class="header_tab">
<nz-tab nzTitle="整车货源">
<app-supply-management-vehicle></app-supply-management-vehicle>
</nz-tab>
<nz-tab nzTitle="大宗货源">
<app-supply-management-bulk></app-supply-management-bulk>
</nz-tab>
</nz-tabset>
</div>

View File

@ -2,17 +2,17 @@ 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';
import { SearchDrawerService } from '@shared';
import { BasicTableComponent } from 'src/app/routes/commom';
@Component({
selector: 'app-supply-management-index',
templateUrl: './index.component.html',
styleUrls: ['../../../commom/less/commom-table.less']
})
export class SupplyManagementIndexComponent implements OnInit {
selectedIndex = 0;
constructor(private http: _HttpClient, private modal: ModalHelper) { }
ngOnInit(): void { }
ngOnInit(): void {}
}

View File

@ -10,28 +10,18 @@
-->
<!-- 搜索表单 -->
<nz-card>
<!-- <nz-card>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf
#sf
[schema]="schema"
[ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24, gutter: 4 } } }"
[compact]="true"
[button]="'none'"
></sf>
<sf #sf [schema]="schema"
[ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24, gutter: 4 } } }" [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]="loading"
(click)="search()"
acl
[acl-ability]="['SUPPLY-INDEX-vehicleSearch']"
>查询</button
>
<button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()" >导出</button>
<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]="loading" (click)="search()" acl
[acl-ability]="['SUPPLY-INDEX-vehicleSearch']">查询</button>
<button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()">导出</button>
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
@ -39,41 +29,32 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card>
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'待接单(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
</nz-tabset>
<div style="margin-top: 15px">
<nz-card class="table-box" style="margin: 0;">
<div class="tab_header">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'接单(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
</nz-tabset>
</div>
<div>
<!-- 选中提示框 -->
<div style="position: relative">
<nz-alert
nzType="info"
[nzMessage]="'当前共' + st?.total + '行记录已选择' + selectedRows.length + ''"
nzShowIcon
[ngStyle]="{ margin: '0 0 1rem 0' }"
>
<div style="position: relative;">
<nz-alert nzType="info" [nzMessage]="'当前共' + st?.total + '行记录已选择' + selectedRows.length + ''" nzShowIcon
style="margin: 0.5rem 16px;display: block;" class="header_box">
</nz-alert>
</div>
<!-- [req]="{ params: reqParams }" -->
<st
#st
[data]="service.$api_get_wholePage_list"
[columns]="columns"
[req]="{ process: beforeReq }"
[res]="{ process: afterRes }"
[page]="{ }"
[loading]="loading"
[scroll]="{ x: '1200px', y: '500px' }"
>
<ng-template st-row="createUserName" let-item let-index="index">
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
</ng-template>
<st #st [data]="service.$api_get_wholePage_list" [columns]="columns" [req]="{ process: beforeReq }"
[res]="{ process: afterRes }" [page]="{ }" [loading]="loading" [scroll]="{ x: '1200px',y:scrollY }">
<ng-template st-row="createUserName" let-item let-index="index">
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
</ng-template>
<ng-template st-row="resourceCode" let-item let-index="index">
<a [routerLink]="'vehicle-detail/' + item?.id">{{ item?.resourceCode }}</a>
<p>{{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel }}</p>
@ -97,25 +78,41 @@
</nz-card>
<ng-template #extraTemplate>
<div>
<button (click)="audit('', 2)" nz-button nzType="primary" acl [acl-ability]="['SUPPLY-INDEX-vehicleBatchAudit']">审核</button>
<button (click)="releaseGoods()" nz-button nzType="primary" acl [acl-ability]="['SUPPLY-INDEX-vehicleUndertakesToSupply']"
>代发货源</button
>
<button (click)="importGoodsSource()" nz-button nzType="primary">导入货源</button>
<button nz-button nzDanger (click)="openDrawer()" class="mr-sm" acl
[acl-ability]="['SUPPLY-INDEX-vehicleSearch']">筛选</button>
<button nz-button nzDanger [disabled]="loading" (click)="exportFire()">导出</button>
<button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item acl [acl-ability]="['SUPPLY-INDEX-vehicleBatchAudit']" (click)="audit('', 2)">
审核
</li>
<li nz-menu-item acl [acl-ability]="['SUPPLY-INDEX-vehicleUndertakesToSupply']" (click)="releaseGoods()">
代发货源
</li>
<li nz-menu-item (click)="importGoodsSource()">
导入货源
</li>
</ul>
</nz-dropdown-menu>
</div>
</ng-template>
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="货源审核" (nzOnCancel)="handleCancel('suppliersType')">
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="货源审核"
(nzOnCancel)="handleCancel('suppliersType')">
<ng-container *nzModalContent>
<div style="position: relative" *ngIf="auditMany">
<nz-alert nzType="info" [nzMessage]="'已选择' + selectedRows?.length + ''" nzShowIcon [ngStyle]="{ margin: '0 0 1rem 0' }">
<nz-alert nzType="info" [nzMessage]="'已选择' + selectedRows?.length + ''" nzShowIcon
[ngStyle]="{ margin: '0 0 1rem 0' }">
</nz-alert>
</div>
<sf #sfFre [schema]="freightSchema" [ui]="{ '*': { spanLabelFixed: 120, grid: { span: 16 } } }" [compact]="false" [button]="'none'">
<sf #sfFre [schema]="freightSchema" [ui]="{ '*': { spanLabelFixed: 120, grid: { span: 16 } } }" [compact]="false"
[button]="'none'">
</sf>
</ng-container>
<ng-template #nzModalFooter>
<button nz-button nzType="primary" (click)="handleOK(1)" [disabled]="">通过</button>
<button nz-button nzType="default" (click)="handleOK(2)">不通过</button>
</ng-template>
</nz-modal>
</nz-modal>

View File

@ -9,17 +9,17 @@ import { SupplyManagementService } from '../../services/supply-management.servic
import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component';
import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component';
import { of } from 'rxjs';
import { ShipperBaseService } from '@shared';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { SupplyManagementImportSupplyComponent } from '../../model/import-supply/import-supply.component';
import { BasicTableComponent } from 'src/app/routes/commom';
@Component({
selector: 'app-supply-management-vehicle',
templateUrl: './vehicle.component.html',
styleUrls: ['./vehicle.component.less']
styleUrls: ['../../../commom/less/commom-table.less', './vehicle.component.less']
})
export class SupplyManagementVehicleComponent implements OnInit {
export class SupplyManagementVehicleComponent extends BasicTableComponent implements OnInit {
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
loading: boolean = true;
schema: SFSchema = this.initSF();
@ -38,13 +38,18 @@ export class SupplyManagementVehicleComponent implements OnInit {
resourceStatus: any;
auditID: any;
deviationHeight = 10;
constructor(
public service: SupplyManagementService,
private modal: NzModalService,
private router: Router,
private ar: ActivatedRoute,
public shipperSrv: ShipperBaseService
) { }
public shipperSrv: ShipperBaseService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
* 查询参数
@ -150,7 +155,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
/**
* 导入货源
*/
importGoodsSource() {
importGoodsSource() {
const modalRef = this.modal.create({
nzTitle: '货源导入',
nzWidth: 600,
@ -181,25 +186,25 @@ export class SupplyManagementVehicleComponent implements OnInit {
type: 'primary',
loading: this.service.http.loading,
onClick: () => {
if(!result?.failNumber) {
if (!result?.failNumber) {
this.service.msgSrv.error('没有失败数据!');
tipsModal.destroy();
this.st?.reload();
this.getGoodsSourceStatistical();
return;
}
this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids)
this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids);
tipsModal.destroy();
this.st?.reload();
this.getGoodsSourceStatistical();
}
},
}
]
})
tipsModal.afterClose.subscribe(result => {
});
tipsModal.afterClose.subscribe(result => {
this.st?.reload();
this.getGoodsSourceStatistical();
})
this.getGoodsSourceStatistical();
});
} else {
this.st?.reload();
this.getGoodsSourceStatistical();
@ -207,7 +212,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
});
}
/**
* 重新指派
*/
@ -396,9 +400,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true,
onSearch: (q: any) => {
let str = q.replace(/^\s+|\s+$/g, '');
@ -434,10 +435,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
title: '所属项目',
ui: {
widget: 'select',
placeholder: '请先选择货主',
visibleIf: {
_$expand: (value: boolean) => value
}
placeholder: '请先选择货主'
} as SFSelectWidgetSchema
},
serviceType: {
@ -447,9 +445,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'service:type' },
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true
} as SFSelectWidgetSchema
},
@ -460,10 +455,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
widget: 'dict-select',
allowClear: true,
containsAllLabel: true,
params: { dictKey: 'goodresource:audit:status' },
visibleIf: {
_$expand: (value: boolean) => value
}
params: { dictKey: 'goodresource:audit:status' }
} as SFSelectWidgetSchema
},
enterpriseInfoId: {
@ -473,9 +465,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true
}
}

View File

@ -16,7 +16,7 @@
<sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [loading]="false" (formSubmit)="st?.load(1)"
(formReset)="resetSF()"></sf>
</div>
edit
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18">

View File

@ -187,6 +187,10 @@ this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
console.log(res)
if(res) {
this.formData = res;
const List: any = [];
List.push({ label: res.enterpriseName, value: res.id });
this.sfFre.getProperty('/enterpriseId')!.schema.enum = List;
this.sfFre.getProperty('/enterpriseId')!.widget.reset(List);
}
})
this.edit = true;

View File

@ -0,0 +1,15 @@
<nz-card [nzLoading]="loadingInfo" [nzBordered]="false">
<se-container se-container="1">
<se label="接口权限" required [labelWidth]="120">
<app-menu-tree #menu (changeData)="getData($event)" [type]="'edit'"
[roleId]="params.id" [appId]="params.appId" [isAuthorityIdDTOList]="roleInfoData.authority || []"
[authorityAssistId]="roleInfoData.authorityAssistId || []" (changeIF)="changeIF($event)">
</app-menu-tree>
</se>
</se-container>
</nz-card>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">取消</button>
<button nz-button type="button" nzType="primary" (click)="sure()">确定</button>
</div>

View File

@ -0,0 +1,17 @@
:host {
::ng-deep {
.box {
width : 100%;
margin: 0 auto;
}
.sv__label {
display : inline-block;
float : left;
width : 120px;
color : #000;
font-size : 13px;
text-align: right;
}
}
}

View File

@ -0,0 +1,83 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { SystemService } from '../../../services/system.service';
import { SettingMenuComponent } from '../../role-management/menu/menu.component';
@Component({
selector: 'app-api-auth-modal',
templateUrl: './api-auth-modal.component.html',
styleUrls: ['./api-auth-modal.component.less']
})
export class ApiAuthModalComponent implements OnInit {
@ViewChild('menu', { static: false })
menu!: SettingMenuComponent;
roleInfoData: any = {};
authorityAssistId: any[] = [];
params: any;
changeValue: boolean = false;
authority: any[] = [];
loadingInfo = false;
constructor(private modal: NzModalRef, public service: SystemService) {}
ngOnInit(): void {
if (this.params.id) {
this.getRoleInfo();
}
}
getRoleInfo() {
this.loadingInfo = true;
this.service.request(this.params.infoUrl, { id: this.params.id }).subscribe(
res => {
if (res) {
this.roleInfoData = res;
}
this.loadingInfo = false;
},
_ => (this.loadingInfo = false),
() => (this.loadingInfo = false)
);
}
getData(res: { authority: any[]; authorityAssistId: any[] }) {
console.log('修改了');
this.authority = res.authority;
this.authorityAssistId = res.authorityAssistId;
}
close() {
this.modal.destroy();
}
changeIF(value: any) {
this.changeValue = true;
}
sure() {
const auths = this.menu?.washTree();
if (auths.authorityAssistId.length === 0) {
this.service.msgSrv.warning('请选择权限!');
return;
}
const params: any = {
id: this.params.id,
...this.roleInfoData,
authority: auths.authority,
authorityAssistId: auths.authorityAssistId
};
if (this.params.id === 0) {
delete params.id;
}
if (this.params?.type === 'freight') {
Object.assign(params, { enterpriseId: 0, enterpriseProjectId: 0 });
}
this.loadingInfo = true;
this.service.request(this.params.updateUrl, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('编辑成功');
this.modal.close(true);}
this.loadingInfo = false;
},
_ => (this.loadingInfo = false),
() => (this.loadingInfo = false)
);
}
}

View File

@ -0,0 +1,23 @@
<div class="treeWrap">
<div class="leftBox">
<nz-tree #nzTreeComponent [nzData]="functionList" (nzClick)="clickTreeNodeAction($event)" nzCheckable
(nzCheckBoxChange)="changeTreeCheckEvent($event)" [nzCheckedKeys]="authorityAssistId" style="max-height: 600px;
overflow: auto;">
</nz-tree>
</div>
<div class="rightBox">
<nz-tabset [nzSize]="'small'">
<nz-tab nzTitle="操作权限">
<div *ngIf="origin.buttonInfoList && origin.buttonInfoList.length">
<label style="width: 100%" nz-checkbox [ngModel]="_apiAuthSet.has(item.functionButtonId)"
*ngFor="let item of origin.buttonInfoList"
(ngModelChange)="addAuthority($event,origin,node, item)" [disabled]="source === 'onlyAuth'">{{
item.permissionsName }}</label>
</div>
<nz-empty nzNotFoundImage="simple" *ngIf="!origin.buttonInfoList || origin.buttonInfoList.length === 0">
</nz-empty>
</nz-tab>
</nz-tabset>
</div>
</div>
<nz-empty nzNotFoundImage="simple" *ngIf="functionList.length === 0"></nz-empty>

Some files were not shown because too many files have changed in this diff Show More