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

This commit is contained in:
weiyu
2022-04-25 11:28:58 +08:00
49 changed files with 1276 additions and 1618 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-18 09:51:21 * @Date : 2022-01-18 09:51:21
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-24 16:40:24 * @LastEditTime : 2022-04-25 10:32:29
* @FilePath : \\tms-obc-web\\proxy.conf.js * @FilePath : \\tms-obc-web\\proxy.conf.js
* Copyright (C) 2022 huzhenhong. All rights reserved. * 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 { NzGridModule } from 'ng-zorro-antd/grid';
import { LayoutPassportComponent } from './passport/passport.component'; import { LayoutPassportComponent } from './passport/passport.component';
import { PRO_COMPONENTS } from './pro/index'; import { PRO_COMPONENTS } from './pro/index';
import { SearchDrawerModule } from '../shared/components/search-drawer/search-drawer.module';
const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent]; const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent];
@ -57,7 +58,8 @@ const COMPONENTS: Array<Type<any>> = [...PRO_COMPONENTS, LayoutPassportComponent
ThemeBtnModule, ThemeBtnModule,
ScrollbarModule, ScrollbarModule,
NzGridModule, NzGridModule,
NzMessageModule NzMessageModule,
SearchDrawerModule
], ],
declarations: COMPONENTS, declarations: COMPONENTS,
exports: COMPONENTS exports: COMPONENTS

View File

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

View File

@ -1,14 +1,21 @@
import { AfterViewInit, Component, OnInit } from '@angular/core'; import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core';
import { fromEvent } from 'rxjs'; import { SFComponent, SFSchema } from '@delon/form';
import { fromEvent, Subscription } from 'rxjs';
import { debounceTime } from 'rxjs/operators'; import { debounceTime } from 'rxjs/operators';
import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service';
@Component({ @Component({
template: '' template: ''
}) })
export class BasicTableComponent implements AfterViewInit { export class BasicTableComponent implements AfterViewInit, OnDestroy {
scrollY = '400px'; scrollY = '400px';
constructor() {} sf!: SFComponent;
sfValue: Record<string, any> = {};
drawer: Subscription[] = [];
schema: SFSchema = {};
constructor(public searchDrawerService: SearchDrawerService) {}
ngAfterViewInit(): void { ngAfterViewInit(): void {
setTimeout(() => { setTimeout(() => {
@ -21,20 +28,65 @@ 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() { getScrollY() {
const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight); const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
const header = document.getElementsByTagName('layout-pro-header')?.[0]; const header = document.getElementsByTagName('layout-pro-header')?.[0];
if (windowHeight && header) { if (windowHeight && header) {
let scrollY = windowHeight - header.clientHeight - 35 - 49; let scrollY = windowHeight - header.clientHeight - 35 - 49;
// 剔除页头高度
const headerWrapper = document.getElementsByTagName('page-header-wrapper')?.[0]; const headerWrapper = document.getElementsByTagName('page-header-wrapper')?.[0];
if (headerWrapper) { if (headerWrapper) {
scrollY -= headerWrapper.clientHeight; scrollY -= headerWrapper.clientHeight;
} }
const tabset = document.getElementsByTagName('nz-tabset')?.[0]; // 计算所有tabs高度
const tabset = document.getElementsByTagName('nz-tabset');
let tabsetHeight = 0;
for (let index = 0; index < tabset.length; index++) {
tabsetHeight += tabset[index].clientHeight;
}
if (tabset) { 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;
}
if (headerBox) {
scrollY -= headerBoxHeight;
} }
this.scrollY = scrollY + 'px'; 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 { .ant-tabs-tab {
margin: 0 0 0 16px; margin : 0 0 0 16px;
padding: 12px 0; padding: 12px 0;
} }
@ -21,31 +21,69 @@
.ant-card-body { .ant-card-body {
padding: 0; 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;
}
}
.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;
}
}
}
} }
.ant-table-pagination.ant-pagination { .ant-table-pagination.ant-pagination {
margin: 8px; margin: 8px;
} }
.ant-table-thead > tr > th, .ant-table-thead>tr>th,
.ant-table-tbody > tr > td, .ant-table-tbody>tr>td,
.ant-table tfoot > tr > th, .ant-table tfoot>tr>th,
.ant-table tfoot > tr > td { .ant-table tfoot>tr>td {
padding: 8px; padding: 8px;
} }
.ant-table.ant-table-bordered > .ant-table-container { .ant-table.ant-table-bordered>.ant-table-container {
border-top: 0; border-top: 0;
} }
.ant-pagination-item { .ant-pagination-item {
min-width: 24px; min-width : 24px;
height: 24px; height : 24px;
line-height: 21px; line-height: 21px;
} }
.ant-pagination-total-text { .ant-pagination-total-text {
height: 24px; height : 24px;
line-height: 24px; line-height: 24px;
} }
@ -53,8 +91,8 @@
.ant-pagination-next, .ant-pagination-next,
.ant-pagination-jump-prev, .ant-pagination-jump-prev,
.ant-pagination-jump-next { .ant-pagination-jump-next {
min-width: 24px; min-width : 24px;
height: 24px; height : 24px;
line-height: 21px; line-height: 21px;
} }

View File

@ -5,7 +5,7 @@ import { OnChanges } from '@angular/core';
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-05 11:01:55 * @Date : 2022-01-05 11:01:55
* @LastEditors : Shiming * @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 * @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. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -96,8 +96,6 @@ export class ContractManagementTemplateTextComponent implements OnInit {
{ label: '运单合同', value: '3' }, { label: '运单合同', value: '3' },
{ label: '运单补充协议', value: '4' }, { label: '运单补充协议', value: '4' },
{ label: '委托代收合同', value: '5' }, { label: '委托代收合同', value: '5' },
{ label: '电子提货单', value: '10' },
{ label: '电子卸货单', value: '11' },
]; ];
this.sf.getProperty('/contractType')!.schema.enum = this.Types; this.sf.getProperty('/contractType')!.schema.enum = this.Types;
this.sf.getProperty('/contractType')!.widget.reset(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 = { this.ui = {
'*': { '*': {

View File

@ -240,11 +240,21 @@ export class CwcAccountManagementWithdrawDepositComponent implements OnInit {
this.sf.setValue('/payPsd', val); this.sf.setValue('/payPsd', val);
if (val || val !== '') { if (val || val !== '') {
const last = val.substr(val.length - 1); const last = val.substr(val.length - 1);
const password = this.sf.getValue('/payPassword'); const password = this.sf.getValue('/payPassword') || '';
const start = this.psd?.nativeElement.selectionStart; const start = this.psd?.nativeElement.selectionStart;
const index = val.lastIndexOf('•');
if (last !== '•') { if (last !== '•') {
this.sf.setValue('/payPassword', start !== 1 ? (password + last) : 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 { } else {
// 删除
this.sf.setValue('/payPassword', password.substr(0, val.length)); this.sf.setValue('/payPassword', password.substr(0, val.length));
} }
const payPswVal = this.sf.getValue('/payPsd'); const payPswVal = this.sf.getValue('/payPsd');

View File

@ -9,41 +9,18 @@
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row nzGutter="8"> <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"> <ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18"> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div> </div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
nz-button [acl-ability]="['ORDER-COMPLIANCE-AUDIT-search']">查询</button>
nzType="primary" <button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['ORDER-COMPLIANCE-AUDIT-export']"
[nzLoading]="service.http.loading" (click)="exprot()">导出</button>
(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 [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }} {{ !_$expand ? '展开' : '收起' }}
@ -52,21 +29,23 @@
</div> </div>
</ng-container> </ng-container>
</div> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<div style="margin-top: 15px"> <div class="header_box">
<st <label class="page_title"> <label class="driver">|</label> 异常预警</label>
#st <div class="mr-sm">
[bordered]="true" <button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[scroll]="{ x: '2000px' }" [acl-ability]="['ORDER-COMPLIANCE-AUDIT-search']">筛选</button>
[data]="service.$api_get_abnormalWarning" <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" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
[loading]="false"
>
<ng-template st-row="driverName" let-item let-index="index"> <ng-template st-row="driverName" let-item let-index="index">
@ -84,11 +63,14 @@
<span>{{ item?.billStatusLabel }}</span> <span>{{ item?.billStatusLabel }}</span>
</div> </div>
<div> <div>
<span >{{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ? '':item?.serviceTypeLabel}}</span> <span>{{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ?
'':item?.serviceTypeLabel}}</span>
</div> </div>
</ng-template> </ng-template>
</st> </st>
</div> </div>
</nz-card> </nz-card>
<ng-template #extraTemplate>
</ng-template>

View File

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

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

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

View File

@ -10,59 +10,67 @@
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper title="" [tab]="tpTab"> <!-- <page-header-wrapper title="" [tab]="tpTab">
<ng-template #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 *ngFor="let tab of mainTabs" [nzTitle]="tab.name" (nzSelect)="selectMainTab(tab)">
</nz-tab> </nz-tab>
</nz-tabset> </nz-tabset>
</ng-template> </ng-template>
</page-header-wrapper> </page-header-wrapper> -->
<nz-card> <!-- <nz-card>
<div nz-row nzGutter="12"> <div nz-row nzGutter="12">
<!-- 查询字段大于3个时根据展开状态调整布局 --> <div nz-col [nzSpan]="24">
<div nz-col [nzSpan]="24"> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> </div>
</div> <div nz-col [nzSpan]="24" style="display: flex; justify-content: flex-end;">
<div nz-col [nzSpan]="24" style="display: flex; justify-content: flex-end;"> <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading"
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" (click)="st?.load(1)" acl [acl-ability]="['ORDER-COMPLAINT-search']">查询</button>
(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 nzType="primary" acl [acl-ability]="['ORDER-COMPLAINT-export']" (click)="exprot()" <button nz-button (click)="resetSF()">重置</button>
>导出</button> </div>
<button nz-button (click)="resetSF()">重置</button>
</div>
</div> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" > <div class="tab_header">
<nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab.name" (nzClick)="tabChange(i)"> <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-tab>
</nz-tabset> </nz-tabset>
<div style="margin-top: 15px;"> <div>
<st <st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_operate_listPage"
#st [columns]="columns"
[bordered]="true" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[scroll]="{ x: '2000px' }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[data]="service.$api_get_operate_listPage" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
[columns]="columns" <ng-template st-row="complaintCode" let-item let-index="index">
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" <a href="javascript:;" (click)="view(item)">{{item.complaintCode}}</a>
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" </ng-template>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" <ng-template st-row="complaintCauseLabel" let-item let-index="index">
[loading]="false" <div *ngIf="selectedMainTabStatus == '2'">{{item?.drvComplaintCauseLabel}}</div>
> <div *ngIf="selectedMainTabStatus == '1'">{{item?.complaintCauseLabel}}</div>
<ng-template st-row="complaintCode" let-item let-index="index"> </ng-template>
<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> </st>
</div> </div>
</nz-card> </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> <ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'"> <sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'">
</sf> </sf>
@ -73,5 +81,3 @@
<button nz-button nzType="primary" (click)="handleCancel2()">强制取消</button> <button nz-button nzType="primary" (click)="handleCancel2()">强制取消</button>
</ng-template> </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 { NzModalService } from 'ng-zorro-antd/modal';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service'; 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({ @Component({
selector: 'app-supply-management-complaint', selector: 'app-supply-management-complaint',
templateUrl: './complaint.component.html', templateUrl: './complaint.component.html',
styleUrls: ['./complaint.component.less'] styleUrls: ['../../../commom/less/commom-table.less', './complaint.component.less']
}) })
export class OrderManagementComplaintComponent implements OnInit { export class OrderManagementComplaintComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {}; uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {}; schemaView: SFSchema = {};
auditMany = false; auditMany = false;
isVisibleRE = false; isVisibleRE = false;
_$expand = false;
channelId: any; channelId: any;
resourceStatus: any; resourceStatus: any;
selectedMainTabStatus = '2'; selectedMainTabStatus = '2';
@ -51,7 +50,13 @@ export class OrderManagementComplaintComponent implements OnInit {
type: 3 type: 3
} }
]; ];
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); // console.log(this.selectedIndex);
// if (this.selectedIndex === 0) { // if (this.selectedIndex === 0) {
// this.selectedMainTabStatus = '2'; // this.selectedMainTabStatus = '2';
@ -101,16 +106,15 @@ export class OrderManagementComplaintComponent implements OnInit {
wayBillCode: { wayBillCode: {
type: 'string', type: 'string',
title: '运单号', title: '运单号',
ui: { ui: {}
}
}, },
complaintCause: { drvComplaintCause: {
title: '投诉原因', title: '投诉原因',
type: 'string', type: 'string',
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'drvcomplaint:cause' }, params: { dictKey: 'drvcomplaint:cause' },
hidden: this.selectedMainTabStatus == '1', hidden: this.selectedMainTabStatus == '1',
containsAllLabel: true containsAllLabel: true
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
@ -120,7 +124,7 @@ export class OrderManagementComplaintComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'drvcomplaint:cause' }, params: { dictKey: 'drvcomplaint:cause' },
hidden: this.selectedMainTabStatus == '2', hidden: this.selectedMainTabStatus == '2',
containsAllLabel: true containsAllLabel: true
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
@ -132,16 +136,10 @@ export class OrderManagementComplaintComponent implements OnInit {
widget: 'sl-from-to', widget: 'sl-from-to',
type: 'date', type: 'date',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
},
} as SFDateWidgetSchema } as SFDateWidgetSchema
} }
} }
}; };
this.ui = {
'*': { spanLabelFixed: 110, grid: { span: 8, gutter: 8 } }
};
} }
/** /**
@ -270,21 +268,7 @@ export class OrderManagementComplaintComponent implements OnInit {
get queryFieldCount(): number { get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length; return Object.keys(this.schema?.properties || {}).length;
} }
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) {} tabChange(item: any) {}
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this.isLoading = true;
}
selectChange(e: number) { selectChange(e: number) {
this.resourceStatus = e; this.resourceStatus = e;
this.initST(); this.initST();

View File

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

View File

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

View File

@ -1,4 +1,4 @@
billCode<!-- <!--
* @Description : * @Description :
* @Version : 1.0 * @Version : 1.0
* @Author : Shiming * @Author : Shiming
@ -9,61 +9,40 @@ billCode<!--
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 --> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
<sf </div>
#sf <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
[schema]="schema" <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
[ui]="ui" [acl-ability]="['ORDER-RECEIPTS-search']">查询</button>
[mode]="'search'" <button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
[disabled]="!sf?.valid" <button nz-button [disabled]="false" (click)="resetSF()">重置</button>
[loading]="false" <button nz-button nzType="link" (click)="expandToggle()">
(formSubmit)="st?.load(1)" {{ !_$expand ? '展开' : '收起' }}
(formReset)="resetSF()" <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
></sf> </button>
</div> </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> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate"> <div class="tab_header">
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab> <label class="page_title"> <label class="driver">|</label> 单据审核</label>
<nz-tab [nzTitle]="'待审核(' + tabs?.receivedQuantity + ')'"></nz-tab> <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'已审核(' + tabs?.stayQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'待审核(' + tabs?.receivedQuantity + ')'"></nz-tab>
<div style="margin-top: 15px"> <nz-tab [nzTitle]="'已审核(' + tabs?.stayQuantity + ')'"></nz-tab>
<st </nz-tabset>
#st </div>
[bordered]="true"
[scroll]="{ x: '2000px' }" <div>
[data]="service.$api_get_billExamine_page" <st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_billExamine_page"
[columns]="columns" [columns]="columns" [req]="{ process: beforeReq }"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}" [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] }" [loading]="false">
[loading]="false"
>
<ng-template st-row="freightPrice" let-item let-index="index"> <ng-template st-row="freightPrice" let-item let-index="index">
{{ item.freightPrice | currency }} {{ item.freightPrice | currency }}
</ng-template> </ng-template>
@ -79,12 +58,13 @@ billCode<!--
</ng-template> </ng-template>
<ng-template st-row="unloadingLadingBillFilePath" let-item let-index="index"> <ng-template st-row="unloadingLadingBillFilePath" let-item let-index="index">
<div class="imgBox"> <div class="imgBox">
<div *ngIf="item.unloadingLadingBillFilePath"> <div *ngIf="item.unloadingLadingBillFilePath">
<app-imagelist style="width: 40px" [imgList]="[item.unloadingLadingBillFilePath]"> </app-imagelist> <app-imagelist style="width: 40px" [imgList]="[item.unloadingLadingBillFilePath]"> </app-imagelist>
</div> </div>
<div *ngIf="item.unloadingPeopleVehiclesGoodsFilePath"> <div *ngIf="item.unloadingPeopleVehiclesGoodsFilePath">
<app-imagelist style="width: 40px" [imgList]="[item.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist> <app-imagelist style="width: 40px" [imgList]="[item.unloadingPeopleVehiclesGoodsFilePath]">
</div> </app-imagelist>
</div>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="loadingTime" let-item let-index="index"> <ng-template st-row="loadingTime" let-item let-index="index">
@ -92,21 +72,26 @@ billCode<!--
<div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div> <div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div>
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <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>
<ng-template st-row="payeeName" let-item let-index="index"> <ng-template st-row="payeeName" let-item let-index="index">
<div> {{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }} </div> <div> {{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }} </div>
</ng-template> </ng-template>
<ng-template st-row="billCode" let-item let-index="index"> <ng-template st-row="billCode" let-item let-index="index">
<!-- <div>{{ item.billCode }}</div> --> <!-- <div>{{ item.billCode }}</div> -->
<a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a> <a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
<a *ngIf="item.resourceType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a> item.billCode }}</a>
<a *ngIf="item.resourceType == '3'" [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> <div>
<span>{{item?.billStatusLabel}}</span> <span>{{item?.billStatusLabel}}</span>
</div> </div>
<div> <div>
<span >{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? '':item?.serviceTypeLabel}}</span> <span>{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ?
'':item?.serviceTypeLabel}}</span>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="goodsName" let-item let-index="index"> <ng-template st-row="goodsName" let-item let-index="index">
@ -131,7 +116,20 @@ billCode<!--
<ng-template #extraTemplate> <ng-template #extraTemplate>
<div> <div>
<button nz-button nzType="primary" (click)="sign('1')" acl [acl-ability]="['ORDER-RECEIPTS-billAuditPassBatch']"> 批量通过 </button> <button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
<button nz-button nzType="primary" (click)="sign1('1')" acl [acl-ability]="['ORDER-RECEIPTS- electronicBilling']"> 批量生成电子单据 </button> [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> </div>
</ng-template> </ng-template>

View File

@ -1,22 +1,3 @@
p{
:host { margin-bottom: 0
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;
}
}
}
}

View File

@ -8,25 +8,23 @@ import { OrderManagementService } from '../../services/order-management.service'
import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component';
import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component'; import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { ShipperBaseService } from '@shared'; import { SearchDrawerService, ShipperBaseService } from '@shared';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component'; import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
@Component({ @Component({
selector: 'app-order-management-receipts-audit', selector: 'app-order-management-receipts-audit',
templateUrl: './receipts-audit.component.html', 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 { export class OrderManagementReceiptsAuditComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {}; uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {}; schemaView: SFSchema = {};
auditMany = false; auditMany = false;
isVisibleView = false; isVisibleView = false;
isVisibleEvaluate = false; isVisibleEvaluate = false;
isVisible = false; isVisible = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
@ -41,8 +39,11 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
public service: OrderManagementService, public service: OrderManagementService,
private modal: NzModalService, private modal: NzModalService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
private router: Router private router: Router,
) { } public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/** /**
* 查询参数 * 查询参数
@ -73,21 +74,21 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
if (this.sf) { if (this.sf) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...a, ...a,
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '' end: this.sf?.value?.createTime?.[1] || ''
} }
}); });
} }
this.loading = true; this.loading = true;
return requestOptions; return requestOptions;
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
console.log(data) console.log(data);
this.loading = false this.loading = false;
return data.map(item => ({ return data.map(item => ({
...item, ...item
// disabled: item.billStatus !== '4' // disabled: item.billStatus !== '4'
})); }));
}; };
@ -105,7 +106,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
totalCount: 0 totalCount: 0
}; };
const params: any = Object.assign({}, this.reqParams || {}); const params: any = Object.assign({}, this.reqParams || {});
delete params.auditStatus delete params.auditStatus;
this.service.request(this.service.$api_get_getAuditStatistical, params).subscribe(res => { this.service.request(this.service.$api_get_getAuditStatistical, params).subscribe(res => {
if (res) { if (res) {
let totalCount = 0; let totalCount = 0;
@ -173,7 +174,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, },
onSearch: (q: any) => { onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,""); let str = q.replace(/^\s+|\s+$/g, '');
if (str) { if (str) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str }) .request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -196,7 +197,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
placeholder: '请先选择货主', placeholder: '请先选择货主',
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, }
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
loadingPlace: { loadingPlace: {
@ -298,12 +299,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
loadingDocuments: { loadingDocuments: {
type: 'string', type: 'string',
title: '装卸货凭证', title: '装卸货凭证',
enum:[ enum: [
{label: '全部',value: ''}, { label: '全部', value: '' },
{label: '无装卸货凭证',value: '1'}, { label: '无装卸货凭证', value: '1' },
{label: '装卸货凭证齐全',value: '2'}, { label: '装卸货凭证齐全', value: '2' },
{label: '只有装货凭证',value: '3'}, { label: '只有装货凭证', value: '3' },
{label: '只有卸货凭证',value: '4'}, { label: '只有卸货凭证', value: '4' }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
@ -311,13 +312,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
allowClear: true, allowClear: true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, }
} }
}, }
}, },
type: 'object' type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
} }
/** /**
@ -397,27 +397,27 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
{ {
text: '生成电子单据', text: '生成电子单据',
click: _record => this.generate(_record, 2), click: _record => this.generate(_record, 2),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }, acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }
}, },
{ {
text: '通过', text: '通过',
click: _record => this.sign(_record), click: _record => this.sign(_record),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }, acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }
}, },
{ {
text: '修改', text: '修改',
click: _record => this.modification(_record), click: _record => this.modification(_record),
iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath,
acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }
}, },
{ {
text: '查看凭证', text: '查看凭证',
click: _record => this.generate(_record, 3), click: _record => this.generate(_record, 3),
iif: item => item?.loadingElectronicsLadingBillFilePath && item?.unloadingElectronicsLadingBillFilePath, 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 { get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length; return Object.keys(this.schema?.properties || {}).length;
} }
/** tabChange(item: any) {}
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
/** /**
* 导入货源 * 导入货源
*/ */
importGoodsSource() { } importGoodsSource() {}
audit(item: any) { } audit(item: any) {}
/** /**
* 审核通过按钮 * 审核通过按钮
*/ */
handleOK() { } handleOK() {}
OpenPrice(item: any) { OpenPrice(item: any) {
this.isVisible = true; this.isVisible = true;
} }
@ -471,7 +457,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
}); });
modalRef.afterClose.subscribe((result: any) => { modalRef.afterClose.subscribe((result: any) => {
this.st.load(1); this.st.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
}); });
} }
// 生成电子单据 // 生成电子单据
@ -491,31 +477,31 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
nzFooter: null nzFooter: null
}); });
modalRef.afterClose.subscribe((result: any) => { modalRef.afterClose.subscribe((result: any) => {
if(result) { if (result) {
this.st.load(); this.st.load();
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
}); });
} }
// 通过 // 通过
sign(item?: any) { sign(item?: any) {
let params: any = [] let params: any = [];
let text = ''; let text = '';
if (item === '1') { if (item === '1') {
if (this.selectedRows.length <= 0) { if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择订单!') this.service.msgSrv.error('请选择订单!');
return return;
} }
this.selectedRows.forEach(ite => { this.selectedRows.forEach(ite => {
params.push(ite.id); params.push(ite.id);
}); });
text = `<b>已选择${this.selectedRows.length}条订单,确认批量通过审核吗?</b>` text = `<b>已选择${this.selectedRows.length}条订单,确认批量通过审核吗?</b>`;
} else { } else {
text = `<b>确认通过审核吗?</b>` text = `<b>确认通过审核吗?</b>`;
params.push(item.id); params.push(item.id);
} }
console.log(this.selectedRows) console.log(this.selectedRows);
console.log(params) console.log(params);
this.modal.confirm({ this.modal.confirm({
nzTitle: text, nzTitle: text,
nzContent: `<b>通过后不可修改,可以再生成电子单据。</b>`, nzContent: `<b>通过后不可修改,可以再生成电子单据。</b>`,
@ -535,8 +521,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
// 批量生成电子单据 // 批量生成电子单据
sign1(item?: any) { sign1(item?: any) {
if (this.selectedRows?.length <= 0) { if (this.selectedRows?.length <= 0) {
this.service.msgSrv.error('请选择订单!') this.service.msgSrv.error('请选择订单!');
return return;
} }
let params: any[] = []; let params: any[] = [];
this.selectedRows.forEach(item => { this.selectedRows.forEach(item => {
@ -545,17 +531,16 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
this.modal.confirm({ this.modal.confirm({
nzTitle: `<b>已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?</b>`, nzTitle: `<b>已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?</b>`,
nzContent: `<b>确认后单据不可修改,请谨慎操作。</b>`, nzContent: `<b>确认后单据不可修改,请谨慎操作。</b>`,
nzOnOk: () => nzOnOk: () => {
{ this.service.downloadFile(this.service.$api_createBillEsignGoods, params);
this.service.downloadFile(this.service.$api_createBillEsignGoods,params) this.service.msgSrv.success('生成成功!');
this.service.msgSrv.success('生成成功!'); this.st?.reload();
this.st?.reload()
// this.getGoodsSourceStatistical(); // this.getGoodsSourceStatistical();
} }
}) });
} }
// 获取所属项目 // 获取所属项目
getRegionCode(regionCode: any) { getRegionCode(regionCode: any) {
console.log(regionCode); console.log(regionCode);
return this.service return this.service
.request(this.service.$api_get_enterprise_project, { id: regionCode }) .request(this.service.$api_get_enterprise_project, { id: regionCode })
@ -575,8 +560,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
// } // }
}); });
} }
// 导出 // 导出
exprot() { exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList); 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. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 --> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
<sf </div>
#sf <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
[schema]="schema" <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
[ui]="ui" [acl-ability]="['ORDER-RISK-search']">查询</button>
[mode]="'search'" <button nz-button nzType="primary" [disabled]="false" (click)="exprot()">导出</button>
[disabled]="!sf?.valid" <button nz-button [disabled]="false" (click)="resetSF()">重置</button>
[loading]="false" <button nz-button nzType="link" (click)="expandToggle()">
(formSubmit)="search()" {{ !_$expand ? '展开' : '收起' }}
(formReset)="resetSF()" <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
></sf> </button>
</div> </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> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate"> <div class="tab_header">
<nz-tab [nzTitle]="'全部'"></nz-tab> <label class="page_title"> <label class="driver">|</label> 风险单管理</label>
<nz-tab [nzTitle]="'待申诉(' + tabs?.stayQuantity + ')'"></nz-tab> <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'申诉中(' + tabs?.underwayQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'全部'"></nz-tab>
<nz-tab [nzTitle]="'申诉成功(' + tabs?.receivedQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'申诉(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'申诉失败(' + tabs?.cancelQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'申诉(' + tabs?.underwayQuantity + ')'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'申诉成功(' + tabs?.receivedQuantity + ')'"></nz-tab>
<div style="margin-top: 15px"> <nz-tab [nzTitle]="'申诉失败(' + tabs?.cancelQuantity + ')'"></nz-tab>
<st </nz-tabset>
#st </div>
[bordered]="true"
[scroll]="{ x: '2000px' }" <div>
[data]="service.$api_get_listRiskPage" <st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_listRiskPage" [columns]="columns"
[columns]="columns"
[req]="{ process: beforeReq }" [req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}" [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] }" [loading]="false">
[loading]="false"
>
<!-- <ng-template st-row="billCode" let-item let-index="index"> <!-- <ng-template st-row="billCode" let-item let-index="index">
<a [routerLink]="'/order-management/risk-detail/' + item.id">{{ item.billCode }}</a> <a [routerLink]="'/order-management/risk-detail/' + item.id">{{ item.billCode }}</a>
<div> <div>
@ -75,14 +56,18 @@
</ng-template> --> </ng-template> -->
<ng-template st-row="billCode" let-item let-index="index"> <ng-template st-row="billCode" let-item let-index="index">
<!-- <div>{{ item.billCode }}</div> --> <!-- <div>{{ item.billCode }}</div> -->
<a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a> <a *ngIf="item.billType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{
<a *ngIf="item.billType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a> item.billCode }}</a>
<a *ngIf="item.billType == '3'" [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> <div>
<span>{{ item?.representationsStatusLabel }}</span> <span>{{ item?.representationsStatusLabel }}</span>
</div> </div>
<div> <div>
<span >{{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' : item?.serviceTypeLabel}}</span> <span>{{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' :
item?.serviceTypeLabel}}</span>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="timeer" let-item let-index="index"> <ng-template st-row="timeer" let-item let-index="index">
@ -96,7 +81,8 @@
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <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>
<ng-template st-row="payeeName" let-item> <ng-template st-row="payeeName" let-item>
<div *ngIf="item?.driverId !== item?.payeeId"> <div *ngIf="item?.driverId !== item?.payeeId">
@ -113,7 +99,7 @@
<ng-template st-row="goodsInfoVOList" let-item let-index="index"> <ng-template st-row="goodsInfoVOList" let-item let-index="index">
<div *ngFor="let i of item?.goodsInfoVOList"> <div *ngFor="let i of item?.goodsInfoVOList">
<p>货物名称:{{ i?.goodsName }}</p> <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> <p>车型/车长:{{ i?.carModelLabel }} {{ i?.carLengthLabel ? "/" + i?.carLengthLabel : ''}}</p>
</div> </div>
</ng-template> </ng-template>
@ -121,14 +107,8 @@
</div> </div>
</nz-card> </nz-card>
<nz-modal <nz-modal [(nzVisible)]="isVisibleRE" [nzWidth]="600" [nzFooter]="nzModalFooterview2" (nzOnOk)="handleOK()" nzTitle="审核"
[(nzVisible)]="isVisibleRE" (nzOnCancel)="handleCancel()">
[nzWidth]="600"
[nzFooter]="nzModalFooterview2"
(nzOnOk)="handleOK()"
nzTitle="审核"
(nzOnCancel)="handleCancel()"
>
<ng-container *nzModalContent> <ng-container *nzModalContent>
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'"> </sf> <sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'"> </sf>
</ng-container> </ng-container>
@ -139,7 +119,10 @@
</nz-modal> </nz-modal>
<ng-template #extraTemplate> <ng-template #extraTemplate>
<div> <div class="mr-sm">
<button nz-button nzType="primary" (click)="audit()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 批量审核 </button> <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> </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 { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared'; import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { OrderManagementService } from '../../services/order-management.service'; import { OrderManagementService } from '../../services/order-management.service';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component';
@Component({ @Component({
selector: 'app-supply-management-risk', selector: 'app-supply-management-risk',
templateUrl: './risk.component.html', templateUrl: './risk.component.html',
styleUrls: ['./risk.component.less'] styleUrls: ['../../../commom/less/commom-table.less', './risk.component.less']
}) })
export class OrderManagementRiskComponent implements OnInit { export class OrderManagementRiskComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {}; uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {}; schemaView: SFSchema = {};
auditMany = false; auditMany = false;
loading: boolean = true; loading: boolean = true;
@ -26,9 +25,7 @@ export class OrderManagementRiskComponent implements OnInit {
auditIdR: any; auditIdR: any;
isVisibleRE = false; isVisibleRE = false;
resourceStatus: any; resourceStatus: any;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfView', { static: false }) sfView!: SFComponent; @ViewChild('sfView', { static: false }) sfView!: SFComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
tabs = { tabs = {
@ -41,8 +38,11 @@ export class OrderManagementRiskComponent implements OnInit {
public service: OrderManagementService, public service: OrderManagementService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
private modal: NzModalService, private modal: NzModalService,
public router: Router public router: Router,
) { } public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/** /**
* 查询参数 * 查询参数
@ -50,7 +50,7 @@ export class OrderManagementRiskComponent implements OnInit {
get reqParams() { get reqParams() {
const a: any = {}; const a: any = {};
if (this.resourceStatus) { if (this.resourceStatus) {
a.representationsStatus = this.resourceStatus a.representationsStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand; delete params._$expand;
@ -59,14 +59,14 @@ export class OrderManagementRiskComponent implements OnInit {
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '', end: this.sf?.value?.createTime?.[1] || ''
}, }
}; };
} }
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
const a: any = {}; const a: any = {};
if (this.resourceStatus) { if (this.resourceStatus) {
a.representationsStatus = this.resourceStatus a.representationsStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand; delete params._$expand;
@ -76,16 +76,16 @@ export class OrderManagementRiskComponent implements OnInit {
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '', end: this.sf?.value?.createTime?.[1] || ''
}, }
}); });
} }
this.loading = true; this.loading = true;
return requestOptions; return requestOptions;
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
console.log(data) console.log(data);
this.loading = false this.loading = false;
return data.map(item => ({ return data.map(item => ({
...item, ...item,
disabled: item.representationsStatus !== '2' disabled: item.representationsStatus !== '2'
@ -93,34 +93,34 @@ export class OrderManagementRiskComponent implements OnInit {
}; };
search() { search() {
this.st?.load(1); this.st?.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
get selectedRows() { get selectedRows() {
return this.st?.list.filter(item => item.checked) || []; return this.st?.list.filter(item => item.checked) || [];
} }
ngOnInit(): void { ngOnInit(): void {
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
this.initSF(); this.initSF();
this.initST(); this.initST();
} }
getGoodsSourceStatistical() { getGoodsSourceStatistical() {
this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => { this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => {
if (res) { if (res) {
res.forEach((element: any) => { res.forEach((element: any) => {
console.log(element.representationsStatus); console.log(element.representationsStatus);
if(element.representationsStatus === '1') { if (element.representationsStatus === '1') {
this.tabs.stayQuantity = element.quantity this.tabs.stayQuantity = element.quantity;
} else if (element.representationsStatus == '4') { } else if (element.representationsStatus == '4') {
this.tabs.cancelQuantity = element.quantity this.tabs.cancelQuantity = element.quantity;
} else if (element.representationsStatus == '3') { } else if (element.representationsStatus == '3') {
this.tabs.receivedQuantity = element.quantity this.tabs.receivedQuantity = element.quantity;
}else if (element.representationsStatus == '2') { } else if (element.representationsStatus == '2') {
this.tabs.underwayQuantity = element.quantity this.tabs.underwayQuantity = element.quantity;
} }
}); });
console.log(this.tabs) console.log(this.tabs);
} }
}) });
} }
/** /**
* 初始化查询表单 * 初始化查询表单
@ -146,48 +146,23 @@ export class OrderManagementRiskComponent implements OnInit {
}, },
loadingPlace: { loadingPlace: {
type: 'string', type: 'string',
title: '装货地', title: '装货地'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
dischargePlace: { dischargePlace: {
type: 'string', type: 'string',
title: '卸货地', title: '卸货地'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
driverName: { driverName: {
title: '承运司机', title: '承运司机',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
carNo: { carNo: {
title: '车牌号', title: '车牌号',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
payeeName: { payeeName: {
type: 'string', type: 'string',
title: '车队长', title: '车队长'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
wayBillType: { wayBillType: {
title: '运单类型', title: '运单类型',
@ -195,10 +170,7 @@ export class OrderManagementRiskComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'bill:type' }, params: { dictKey: 'bill:type' },
containsAllLabel: true, containsAllLabel: true
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
shipperAppUserName: { shipperAppUserName: {
@ -210,11 +182,8 @@ export class OrderManagementRiskComponent implements OnInit {
searchDebounceTime: 300, searchDebounceTime: 300,
searchLoadingText: '搜索中...', searchLoadingText: '搜索中...',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => { onSearch: (q: any) => {
let str =q.replace(/^\s+|\s+$/g,""); let str = q.replace(/^\s+|\s+$/g, '');
if (str) { if (str) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str }) .request(this.service.$api_enterpriceList, { enterpriseName: str })
@ -223,7 +192,7 @@ export class OrderManagementRiskComponent implements OnInit {
} else { } else {
return of([]); return of([]);
} }
}, }
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
enterpriseInfoId: { enterpriseInfoId: {
@ -233,11 +202,8 @@ export class OrderManagementRiskComponent implements OnInit {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true,
visibleIf: { asyncData: () => this.shipperservice.getNetworkFreightForwarder()
_$expand: (value: boolean) => value, }
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
},
}, },
createTime: { createTime: {
title: '创建时间', title: '创建时间',
@ -246,16 +212,12 @@ export class OrderManagementRiskComponent implements OnInit {
widget: 'date', widget: 'date',
mode: 'range', mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
allowClear: true, allowClear: true
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema } as SFDateWidgetSchema
} }
}, },
type: 'object' type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
} }
/** /**
@ -347,14 +309,14 @@ export class OrderManagementRiskComponent implements OnInit {
{ {
text: '审核', text: '审核',
click: _record => this.audit(_record), click: _record => this.audit(_record),
iif: item => item.representationsStatus == '2' , iif: item => item.representationsStatus == '2',
acl: { ability: ['ORDER-RISK-audit'] }, acl: { ability: ['ORDER-RISK-audit'] }
}, },
{ {
text: '详情', text: '详情',
click: _record => this.viewEvaluate(_record), click: _record => this.viewEvaluate(_record),
iif: item => item.representationsStatus !== '1' , iif: item => item.representationsStatus !== '1',
acl: { ability: ['ORDER-RISK-riskDetail'] }, acl: { ability: ['ORDER-RISK-riskDetail'] }
} }
] ]
} }
@ -419,30 +381,10 @@ export class OrderManagementRiskComponent implements OnInit {
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } }; 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) { tabChange(item: any) {
console.log(item); console.log(item);
} }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
selectChange(e: number) { selectChange(e: number) {
this.resourceStatus = e; this.resourceStatus = e;
@ -454,7 +396,7 @@ export class OrderManagementRiskComponent implements OnInit {
/** /**
* 导入货源 * 导入货源
*/ */
importGoodsSource() { } importGoodsSource() {}
/* /*
* 审核关闭弹窗 * 审核关闭弹窗
@ -472,20 +414,20 @@ export class OrderManagementRiskComponent implements OnInit {
idList.push(item.id); idList.push(item.id);
}); });
} else { } else {
idList.push(this.sfView.value.id) idList.push(this.sfView.value.id);
} }
const parms = { const parms = {
ids: idList, ids: idList,
auditRemark: this.sfView.value.representationsCause, auditRemark: this.sfView.value.representationsCause,
representationsStatus: 3, representationsStatus: 3,
auditStatus: 2, auditStatus: 2
}; };
this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => { this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success('审核通过成功!'); this.service.msgSrv.success('审核通过成功!');
this.isVisibleRE = false; this.isVisibleRE = false;
this.st?.load(1); this.st?.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
}); });
} }
@ -499,7 +441,7 @@ export class OrderManagementRiskComponent implements OnInit {
idList.push(item.id); idList.push(item.id);
}); });
} else { } else {
idList.push(this.sfView.value.id) idList.push(this.sfView.value.id);
} }
if (!this.sfView.value.representationsCause) { if (!this.sfView.value.representationsCause) {
this.service.msgSrv.error('拒绝原因为空!'); this.service.msgSrv.error('拒绝原因为空!');
@ -509,14 +451,14 @@ export class OrderManagementRiskComponent implements OnInit {
ids: idList, ids: idList,
auditRemark: this.sfView.value.representationsCause, auditRemark: this.sfView.value.representationsCause,
representationsStatus: 4, representationsStatus: 4,
auditStatus: 3, auditStatus: 3
}; };
this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => { this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success('审核拒绝成功!'); this.service.msgSrv.success('审核拒绝成功!');
this.isVisibleRE = false; this.isVisibleRE = false;
this.st?.load(1); this.st?.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
}); });
} }
@ -531,7 +473,7 @@ export class OrderManagementRiskComponent implements OnInit {
this.isVisibleRE = true; this.isVisibleRE = true;
} else { } else {
if (this.selectedRows.length <= 0) { if (this.selectedRows.length <= 0) {
this.service.msgSrv.error('请选择订单!') this.service.msgSrv.error('请选择订单!');
return; return;
} else { } else {
this.initSTAudit(2); this.initSTAudit(2);
@ -545,8 +487,8 @@ export class OrderManagementRiskComponent implements OnInit {
viewEvaluate(item: any) { viewEvaluate(item: any) {
this.router.navigate(['/order-management/risk-detail', item.id]); this.router.navigate(['/order-management/risk-detail', item.id]);
} }
// 导出 // 导出
exprot() { exprot() {
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList); this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList);
} }
} }

View File

@ -31,11 +31,11 @@
</nz-card> --> </nz-card> -->
<nz-card class="table-box"> <nz-card class="table-box">
<div style="display: flex;align-items: center;"> <div class="tab_header">
<label style="font-weight: bold;font-size: 17px;"> <label class="page_title">
<label style="color: #ff4d4f;margin-left: 17px;margin-right: 6px;">|</label> <label class="driver">|</label>
整车订单</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?.totalCount + ')'"></nz-tab>
<nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待接单(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待发车(' + tabs?.stayQuantity + ')'"></nz-tab>
@ -69,7 +69,7 @@
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="createUserName" let-item let-index="index"> <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>
<!-- <ng-template st-row="mybidDetailInfo" let-item let-index="index"> <!-- <ng-template st-row="mybidDetailInfo" let-item let-index="index">
<div *ngIf="item.mybidDetailInfo.length > 0"> <div *ngIf="item.mybidDetailInfo.length > 0">
@ -83,7 +83,8 @@
<div *ngIf="item.mybidDetailInfo.length > 0"> <div *ngIf="item.mybidDetailInfo.length > 0">
<p *ngFor="let data of item.mybidDetailInfo"> <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 | 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> <span *ngIf="data.paymentStatusLabel" style="color: #f59a63">{{ data.paymentStatusLabel }}</span>
</p> </p>
</div> </div>
@ -94,8 +95,10 @@
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <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?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' +
<div *ngIf="item.payeeName !== item.driverName">车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ item?.payeePhone }} </div> item?.carNo : '' }} </div><br />
<div *ngIf="item.payeeName !== item.driverName">车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{
item?.payeePhone }} </div>
</ng-template> </ng-template>
<ng-template st-row="loadingTime" let-item let-index="index"> <ng-template st-row="loadingTime" let-item let-index="index">
@ -177,35 +180,31 @@
</ng-template> </ng-template>
</nz-modal> </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> <ng-template #extraTemplate>
<div> <div class="mr-sm">
<button nz-button nzType="primary" (click)="modifyRate()" acl <button nz-button nzDanger (click)="openDrawer()" class="mr-sm">筛选</button>
[acl-ability]="['ORDER-VEHICLE-modificationAdditional']"> 修改附加费率 </button> <button nz-button nzDanger [disabled]="loading" (click)="exprot()">导出</button>
<button nz-button nzType="primary" (click)="modifyFreightPeople()" acl <button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
[acl-ability]="['ORDER-VEHICLE-modificationNetworkFreight']"> 修改网络货运人 </button> 更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
<button nz-button nzType="primary" (click)="modifycaptain()" acl <nz-dropdown-menu #menu="nzDropdownMenu">
[acl-ability]="['ORDER-VEHICLE-modificationCarCaptain']"> 修改车队长 </button> <ul nz-menu>
<button *ngIf="resourceStatus == 4" nz-button nzType="primary" nzGhost nz-popconfirm [nzPopconfirmTitle]="enable" <li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationAdditional']" (click)="modifyRate()">
(nzOnConfirm)="userAction()" nzPopconfirmPlacement="bottomRight" acl 修改附加费率
[acl-ability]="['ORDER-VEHICLE-batchSignWholeOrder']"> </li>
批量签收 <li nz-menu-item acl [acl-ability]="['ORDER-VEHICLE-modificationNetworkFreight']"
</button> (click)="modifyFreightPeople()">
<button nz-button nzType="primary" [disabled]="loading" (click)="exprot()">导出</button> 修改网络货运人
<button nz-button nzType="primary" (click)="visible=true;" class="mr-sm">筛选</button> </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> </div>
</ng-template> </ng-template>
<ng-template #enable> <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 { Router, ActivatedRoute } from '@angular/router';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared'; import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; 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 { debounceTime, map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component'; 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 { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component';
import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component'; import { VehicleConfirReceiptComponent } from '../../modal/vehicle/confir-receipt/confir-receipt.component';
import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component'; import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-people/freight-people.component';
@ -22,8 +23,6 @@ import { OrderManagementService } from '../../services/order-management.service'
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 { export class OrderManagementVehicleComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
schema: SFSchema = {};
auditMany = false; auditMany = false;
isVisibleView = false; isVisibleView = false;
isVisibleEvaluate = false; isVisibleEvaluate = false;
@ -39,7 +38,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('stFloat') private readonly stFloat!: STComponent; @ViewChild('stFloat') private readonly stFloat!: STComponent;
@ViewChild('stFloatView') private readonly stFloatView!: STComponent; @ViewChild('stFloatView') private readonly stFloatView!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent; @ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
columnsFloat: STColumn[] = []; columnsFloat: STColumn[] = [];
@ -56,7 +54,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
two: '2', two: '2',
three: '2', three: '2',
id: 2 id: 2
}, }
]; ];
tabs = { tabs = {
cancelQuantity: 0, cancelQuantity: 0,
@ -69,15 +67,15 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}; };
resourceStatus: any; resourceStatus: any;
visible = false;
constructor( constructor(
public service: OrderManagementService, public service: OrderManagementService,
private modal: NzModalService, private modal: NzModalService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
public router: Router, 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) { if (this.resourceStatus) {
a.billStatus = 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; delete params._$expand;
return { return {
...a, ...a,
...params, ...params
}; };
} }
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
@ -110,12 +108,12 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
if (this.resourceStatus) { if (this.resourceStatus) {
a.billStatus = 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; delete params._$expand;
this.paramsList = params this.paramsList = params;
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...a, ...a,
...this.paramsList, ...this.paramsList
}); });
this.loading = true; this.loading = true;
return requestOptions; return requestOptions;
@ -197,7 +195,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
type: 'string', type: 'string',
title: '运单号', title: '运单号',
ui: { ui: {
placeholder: '最多100个单号空号隔开', placeholder: '最多100个单号空号隔开'
} }
}, },
resourceCode: { resourceCode: {
@ -234,7 +232,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
title: '所属项目', title: '所属项目',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请先选择货主', placeholder: '请先选择货主'
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
loadingPlace: { loadingPlace: {
@ -284,7 +282,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
createTime: { createTime: {
type: 'string', type: 'string',
title: '创建时间', 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: { riskStatus: {
type: 'string', type: 'string',
@ -342,7 +340,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}, },
type: 'object' type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 95, grid: { span: 24, gutter: 4 } } };
} }
/** /**
@ -416,13 +413,12 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
text: '运费变更记录', text: '运费变更记录',
click: _record => this.OpenPrice(_record), click: _record => this.OpenPrice(_record),
iif: item => iif: item =>
item.billType !== '3' && ( item.billType !== '3' &&
item.billStatus == '4' || (item.billStatus == '4' ||
item.billStatus == '5' || item.billStatus == '5' ||
item.billStatus == '2' || item.billStatus == '2' ||
item.billStatus == '3' || item.billStatus == '3' ||
item.billStatus == '6' item.billStatus == '6'),
),
acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] } acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] }
}, },
// { // {
@ -560,23 +556,9 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
get queryFieldCount(): number { get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length; return Object.keys(this.schema?.properties || {}).length;
} }
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
tabChange(item: any) { tabChange(item: any) {
console.log(item); console.log(item);
} }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
selectChange(e: number) { selectChange(e: number) {
this.resourceStatus = e; this.resourceStatus = e;
this.initST(); this.initST();
@ -587,8 +569,8 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
/** /**
* 导入货源 * 导入货源
*/ */
importGoodsSource() { } importGoodsSource() {}
audit(item: any) { } audit(item: any) {}
/* /*
* 审核关闭弹窗 * 审核关闭弹窗
@ -771,7 +753,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}); });
modalRef.afterClose.subscribe((res: boolean) => { modalRef.afterClose.subscribe((res: boolean) => {
if (res) { if (res) {
this.resetSF;
this.st.load(); this.st.load();
this.getGoodsSourceStatistical(); this.getGoodsSourceStatistical();
} }
@ -849,7 +830,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme
}); });
modalRef.afterClose.subscribe((res: boolean) => { modalRef.afterClose.subscribe((res: boolean) => {
if (res) { if (res) {
this.resetSF;
this.st.load(); this.st.load();
} }
}); });

View File

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

View File

@ -335,7 +335,7 @@ export class SupplyManagementBulkComponent implements OnInit {
{ {
text: '二维码', text: '二维码',
click: _record => this.assignedQrcode(_record), click: _record => this.assignedQrcode(_record),
iif: item => item.resourceStatus == 1 && item.serviceType === '1' iif: item => item.resourceStatus == 1 && item.serviceType === '1' && !(item.resourceType === '2' && item.serviceType === '2')
}, },
{ {
text: '修改单价', text: '修改单价',

View File

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

View File

@ -187,6 +187,10 @@ this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
console.log(res) console.log(res)
if(res) { if(res) {
this.formData = 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; this.edit = true;

View File

@ -369,7 +369,7 @@
<sv-container col="3" class="mt16"> <sv-container col="3" class="mt16">
<sv-title>合伙人信息</sv-title> <sv-title>合伙人信息</sv-title>
<sv label="合伙人名称"> <sv label="合伙人名称">
{{partnerInfo.partnerEnterpriseName}} {{partnerInfo.partnerContactName}}
</sv> </sv>
<sv label="手机号"> <sv label="手机号">
<input nz-input type="text" [(ngModel)]="partnerInfo.partnerContactMobile" [readonly]="!isEdit" <input nz-input type="text" [(ngModel)]="partnerInfo.partnerContactMobile" [readonly]="!isEdit"

View File

@ -116,7 +116,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
className: 'text-center' className: 'text-center'
}, },
{ title: '修改时间', render: 'modifyTime', className: 'text-center' }, { title: '修改时间', render: 'modifyTime', className: 'text-center' },
{ title: '生效时间', render: 'effectiveTime', className: 'text-center' }, { title: '生效时间', index: 'effectiveTime', className: 'text-center' },
{ title: '操作人', render: 'approvalUser', className: 'text-center' }, { title: '操作人', render: 'approvalUser', className: 'text-center' },
]; ];

View File

@ -1,8 +1,8 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
import { EAEnvironmentService } from '@shared'; import { EAEnvironmentService, ShipperBaseService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format'; import format from 'date-fns/format';
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
@ -19,8 +19,9 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
}) })
export class EditPartnerComponentsAddComponent implements OnInit { export class EditPartnerComponentsAddComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any; i: any;
sts: any;
rows: any;
schema: SFSchema = {}; schema: SFSchema = {};
detailData: any = {} detailData: any = {}
ui: SFUISchema = {}; ui: SFUISchema = {};
@ -33,14 +34,18 @@ export class EditPartnerComponentsAddComponent implements OnInit {
public service: UsermanageService, public service: UsermanageService,
private envSrv: EAEnvironmentService, private envSrv: EAEnvironmentService,
private modal: NzModalRef, private modal: NzModalRef,
public shipperservice: ShipperBaseService
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
this.initDetailData() if(this.sts == '2') {
this.initDetailData()
}
this.initSF(); this.initSF();
} }
initDetailData() { initDetailData() {
const params = { const params = {
id: this.i.id id: this.i.id
} }
@ -55,18 +60,45 @@ export class EditPartnerComponentsAddComponent implements OnInit {
initSF() { initSF() {
this.schema = { this.schema = {
properties: { properties: {
// channelId: {
// type: 'string',
// title: '合伙人修改为',
// ui: {
// widget: 'radio',
// showRequired: true,
// } as SFRadioWidgetSchema,
// enum: [
// { label: '全部可见', value: 1 },
// { label: '合伙人可见', value: 2 },
// { label: '销售渠道可见', value: 3 },
// ],
// },channelId
channelId: { channelId: {
type: 'string', type: 'string',
title: '合伙人修改为', title: '合伙人修改为',
ui: { ui: {
widget: 'radio', widget: 'select',
showRequired: true, placeholder: '请选择',
} as SFRadioWidgetSchema, allowClear: true,
enum: [ visibleIf: {
{ label: '全部可见', value: 1 }, _$expand: (value: boolean) => value
{ label: '合伙人可见', value: 2 }, },
{ label: '销售渠道可见', value: 3 }, asyncData: () => this.shipperservice.getNetworkenterpriceIds()
], }
},
// settStartTime: {
// title: '结算起算日期',
// type: 'string',
// ui: {
// widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd', visibleIf: {
// _$expand: (value: boolean) => value,
// },
// } as SFDateWidgetSchema,
// },
settStartTime: {
title: '结算起算日期',
type: 'string',
format: 'date',
}, },
remark: { remark: {
type: 'string', type: 'string',
@ -87,7 +119,8 @@ export class EditPartnerComponentsAddComponent implements OnInit {
} as SFRadioWidgetSchema, } as SFRadioWidgetSchema,
enum: [ enum: [
{ label: '修改成功后立即生效', value: 1 }, { label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核通过后生效', value: 2 } { label: 'CRM流程审核后生效', value: 2 },
{ label: 'CRM流程审核通过后生效', value: 3 }
], ],
}, },
}, },
@ -108,9 +141,18 @@ export class EditPartnerComponentsAddComponent implements OnInit {
this.modal.close(true) this.modal.close(true)
} }
save() { save() {
const params = { console.log(this?.rows);
...this.sf.value let enterId : any;
if(this.sts == '1') {
enterId = this.rows
} else {
enterId = [this.i.id]
} }
const params = {
...this.sf.value,
enterpriceIds: enterId,
}
this.service.request(this.service.$api_batchUpdateEnterpricePartner, params).subscribe(res => { this.service.request(this.service.$api_batchUpdateEnterpricePartner, params).subscribe(res => {
if(res) { if(res) {
this.service.msgSrv.success('修改成功') this.service.msgSrv.success('修改成功')

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-12 10:52:50 * @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-11 15:08:47 * @LastEditTime : 2022-04-24 17:13:51
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\list\\list.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\list\\list.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -33,7 +33,7 @@
</div> </div>
</div> </div>
</nz-card> </nz-card>
<nz-card> <nz-card [nzExtra]="extraTemplate" >
<!-- 数据列表 --> <!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" --> <!-- [data]="service.$api_get_supplier_page" -->
@ -57,6 +57,9 @@
<ng-template st-row="contacter" let-item let-index="index"> <ng-template st-row="contacter" let-item let-index="index">
{{ item.contacter }}<br>/{{item.mobile}} {{ item.contacter }}<br>/{{item.mobile}}
</ng-template> </ng-template>
<ng-template st-row="partnerName" let-item let-index="index">
{{ item.partnerName }}<br>/{{item.promotersTelephone}}
</ng-template>
<ng-template st-row="promotersTelephone" let-item let-index="index"> <ng-template st-row="promotersTelephone" let-item let-index="index">
<a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.promotersTelephone <a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.promotersTelephone
|| '添加' }}</a> || '添加' }}</a>
@ -73,3 +76,9 @@
</div> </div>
</div> </div>
</ng-template> </ng-template>
<ng-template #extraTemplate>
<div>
<button nz-button nzType="primary" (click)="editPartner()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改合伙人 </button>
<button nz-button nzType="primary" (click)="editSale()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改渠道销售 </button>
</div>
</ng-template>

View File

@ -125,13 +125,32 @@ export class FreightComponentsListComponent implements OnInit {
} }
}); });
} }
editPartner(record: any) { get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}
editPartner(record?: any) {
let status = 1
if(record) {
status = 2
}
if (this.selectedRows.length <= 0 && !record) {
this.service.msgSrv.error('请选择订单!');
return;
}
let params: any[] = [];
this.selectedRows.forEach(item => {
params.push(item.id);
});
console.log(params);
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '修改合伙人', nzTitle: '修改合伙人',
nzContent: EditPartnerComponentsAddComponent, nzContent: EditPartnerComponentsAddComponent,
nzWidth: 800, nzWidth: 800,
nzComponentParams: { nzComponentParams: {
i: record i: record,
sts: status,
rows: params
}, },
nzFooter: null nzFooter: null
}); });
@ -141,7 +160,7 @@ export class FreightComponentsListComponent implements OnInit {
} }
}); });
} }
editSale(record: any) { editSale(record?: any) {
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '修改渠道销售', nzTitle: '修改渠道销售',
nzContent: EditSaleComponentsAddComponent, nzContent: EditSaleComponentsAddComponent,
@ -380,7 +399,7 @@ export class FreightComponentsListComponent implements OnInit {
initST() { initST() {
this.columns = [ this.columns = [
// { title: '', type: 'checkbox', className: 'text-center' }, { title: '', type: 'checkbox', className: 'text-center' },
{ title: '企业名称', render: 'enterpriseName', width: 350 }, { title: '企业名称', render: 'enterpriseName', width: 350 },
{ title: '统一社会信用代码', className: 'text-center', render: 'unifiedSocialCreditCode', width: 200 }, { title: '统一社会信用代码', className: 'text-center', render: 'unifiedSocialCreditCode', width: 200 },
{ {
@ -407,7 +426,7 @@ export class FreightComponentsListComponent implements OnInit {
enum: { 10: '整车发货', 20: '大宗发货' }, enum: { 10: '整车发货', 20: '大宗发货' },
width: 140 width: 140
}, },
{ title: '业务员', className: 'text-center', render: 'promotersTelephone', width: 150 }, { title: '渠道销售', className: 'text-center', render: 'promotersTelephone', width: 150 },
{ title: '合伙人', className: 'text-center', render: 'partnerName', width: 150 }, { title: '合伙人', className: 'text-center', render: 'partnerName', width: 150 },
{ title: '客服人员', className: 'text-center', index: 'customerServiceIdLabel', width: 150 }, { title: '客服人员', className: 'text-center', index: 'customerServiceIdLabel', width: 150 },
{ title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 }, { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 },

View File

@ -6,17 +6,10 @@
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\abnormal-appear\\abnormal-appear.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\abnormal-appear\\abnormal-appear.component.html
--> -->
<page-header-wrapper title="异常上报"> </page-header-wrapper> <!-- <page-header-wrapper title="异常上报"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row nzGutter="8"> <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>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4"> <ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18"> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
@ -32,57 +25,62 @@
</div> </div>
</ng-container> </ng-container>
</div> </div>
</nz-card> -->
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"> <label class="driver">|</label> 异常上报</label>
<nz-tabset [(nzSelectedIndex)]="selectedIndex" (nzSelectedIndexChange)="selectChange($event)"
[nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'待回复(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已回复(' + tabs?.receivedQuantity + ')'"> </nz-tab>
</nz-tabset>
</div>
<div>
<st #st [data]="service.$api_get_listOperatePage" [columns]="columns" [req]="{ params: reqParams }" [page]="{ }"
[loading]="false" [scroll]="{ x: '2000px' ,y:scrollY }">
<ng-template st-row="exceptionCertificateFirstFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item?.exceptionCertificateFirstFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateFirstFilePath]">
</app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateSecondFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateSecondFilePath]">
</app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateThirdFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateThirdFilePath]">
</app-imagelist>
</div>
</div>
</ng-template>
</st>
<!-- <st #st2 *ngIf="selectedIndex===1" [data]="service.$api_get_listOperatePage" [columns]="columns2"
[req]="{ params: reqParams2 }" [page]="{ }" [loading]="false" [scroll]="{ x: '2000px',y:scrollY }">
<ng-template st-row="exceptionCertificateFirstFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item?.exceptionCertificateFirstFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateFirstFilePath]"> </app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateSecondFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateSecondFilePath]"> </app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateThirdFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateThirdFilePath]"> </app-imagelist>
</div>
</div>
</ng-template>
</st> -->
</div>
</nz-card> </nz-card>
<nz-card class="content-box"> <ng-template #extraTemplate>
<nz-tabset [(nzSelectedIndex)]="selectedIndex" (nzSelectedIndexChange)="selectChange($event)"> <div class="mr-sm">
<nz-tab [nzTitle]="'待回复(' + tabs?.stayQuantity + ')'"> <button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
<st #st [data]="service.$api_get_listOperatePage" [columns]="columns" [acl-ability]="['WAYBILL-ABNORMAL-search']">筛选</button>
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" </div>
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" </ng-template>
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"
[scroll]="{ x: '2000px' }">
<ng-template st-row="exceptionCertificateFirstFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item?.exceptionCertificateFirstFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateFirstFilePath]">
</app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateSecondFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateSecondFilePath]">
</app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateThirdFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateThirdFilePath]">
</app-imagelist>
</div>
</div>
</ng-template>
</st>
</nz-tab>
<nz-tab [nzTitle]="'已回复(' + tabs?.receivedQuantity + ')'">
<st #st2 [data]="service.$api_get_listOperatePage" [columns]="columns2"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams2 }"
[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"
[scroll]="{ x: '2000px' }">
<ng-template st-row="exceptionCertificateFirstFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item?.exceptionCertificateFirstFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateFirstFilePath]"> </app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateSecondFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateSecondFilePath]"> </app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateThirdFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateThirdFilePath]"> </app-imagelist>
</div>
</div>
</ng-template>
</st>
</nz-tab>
</nz-tabset>
</nz-card>
<ng-template #detailModal> <ng-template #detailModal>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">

View File

@ -10,32 +10,28 @@ import {
SFSelectWidgetSchema, SFSelectWidgetSchema,
SFUISchema SFUISchema
} from '@delon/form'; } from '@delon/form';
import { ShipperBaseService } from '@shared'; import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom';
import { WaybillManagementServe } from '../../services/waybill-management.service'; import { WaybillManagementServe } from '../../services/waybill-management.service';
@Component({ @Component({
selector: 'app-abnormal-appear', selector: 'app-abnormal-appear',
templateUrl: './abnormal-appear.component.html', templateUrl: './abnormal-appear.component.html',
styleUrls: ['./abnormal-appear.component.less'] styleUrls: ['../../../commom/less/commom-table.less', './abnormal-appear.component.less']
}) })
export class WaybillManagementAbnormalAppearComponent implements OnInit { export class WaybillManagementAbnormalAppearComponent extends BasicTableComponent implements OnInit {
@ViewChild('detailModal', { static: true }) @ViewChild('detailModal', { static: true })
detailModal!: any; detailModal!: any;
@ViewChild('replyModal', { static: true }) @ViewChild('replyModal', { static: true })
replyModal!: any; replyModal!: any;
@ViewChild('st', { static: true }) @ViewChild('st', { static: true })
st!: STComponent; st!: STComponent;
@ViewChild('st2', { static: true })
st2!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = {}; ui: SFUISchema = {};
ui2: SFUISchema = {}; ui2: SFUISchema = {};
schema: SFSchema = {};
addSchema: SFSchema = {}; addSchema: SFSchema = {};
_$expand = false;
editText = ''; editText = '';
formData: any; formData: any;
isVisible = false; isVisible = false;
@ -74,44 +70,17 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
{ title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' }, { title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' },
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '300px', className: 'text-left' }, { title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '300px', className: 'text-left' },
{ title: '上报时间', index: 'createTime', width: '180px', className: 'text-center' }, { title: '上报时间', index: 'createTime', width: '180px', className: 'text-center' },
{ title: '回复人', index: 'replyAppUserName', width: '180px', className: 'text-left', iif: _ => this.selectedIndex === 1 },
{ title: '回复时间', index: 'replyTime', width: '180px', className: 'text-left', iif: _ => this.selectedIndex === 1 },
{ {
title: '操作', title: '操作',
fixed: 'right', fixed: 'right',
width: '100px', width: '100px',
iif: _ => this.selectedIndex === 0,
className: 'text-center', className: 'text-center',
buttons: [{ text: '回复', click: item => this.replyAction(item) }] buttons: [{ text: '回复', click: item => this.replyAction(item) }]
} }
]; ];
columns2: STColumn[] = [
{
title: '异常编号',
index: 'exceptionCode',
width: '180px',
className: 'text-left',
type: 'link',
click: item => this.reviewDetailAction(item)
},
{ title: '异常类型', index: 'exceptionTypeLabel', width: '180px', className: 'text-left' },
{
title: '关联运单号',
index: 'wayBillCode',
width: '180px',
className: 'text-left',
type: 'link',
click: item => this.routeToBill(item)
},
{ title: '网络货运人', index: 'enterpriseInfoName', width: '180px', className: 'text-left' },
{ title: '货主', index: 'shipperAppUserName', width: '180px', className: 'text-left' },
{ title: '装货地', index: 'loadingAddressArr', width: '180px', className: 'text-left' },
{ title: '卸货地', index: 'unloadingAddressArr', width: '180px', className: 'text-left' },
{ title: '承运司机', index: 'driver', width: '200px', className: 'text-left' },
{ title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' },
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '220px', className: 'text-left' },
{ title: '上报时间', index: 'createTime', width: '180px', className: 'text-left' },
{ title: '回复内容', index: 'replyContent', width: '180px', className: 'text-left' },
{ title: '回复人', index: 'replyAppUserName', width: '180px', className: 'text-left' },
{ title: '回复时间', index: 'replyTime', width: '180px', className: 'text-left' }
];
resourceStatus: number | undefined; resourceStatus: number | undefined;
get reqParams() { get reqParams() {
@ -140,28 +109,17 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
public service: WaybillManagementServe, public service: WaybillManagementServe,
private nzModalService: NzModalService, private nzModalService: NzModalService,
public shipperSrv: ShipperBaseService, public shipperSrv: ShipperBaseService,
private router: Router private router: Router,
) {} public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.initSF();
this.getGoodsSourceStatistical(); this.getGoodsSourceStatistical();
} }
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
reviewDetailAction(item: any) { reviewDetailAction(item: any) {
this.itemInfo = {}; this.itemInfo = {};
this.service.request(`${this.service.$api_get_listOperate_detail}${item.id}`, {}, 'GET').subscribe(res => { this.service.request(`${this.service.$api_get_listOperate_detail}${item.id}`, {}, 'GET').subscribe(res => {
@ -217,7 +175,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
initSF() { initSF() {
this.schema = { this.schema = {
properties: { properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
exceptionCode: { exceptionCode: {
type: 'string', type: 'string',
title: '异常编号', title: '异常编号',
@ -259,9 +216,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
}, },
change: (q: any) => { change: (q: any) => {
this.getRegionCode(q); this.getRegionCode(q);
},
visibleIf: {
_$expand: (value: boolean) => value
} }
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
@ -270,29 +224,16 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
title: '所属项目', title: '所属项目',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请先选择货主', placeholder: '请先选择货主'
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
driverName: { driverName: {
title: '承运司机', title: '承运司机',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
carNo: { carNo: {
title: '车牌号', title: '车牌号',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
reportingTime: { reportingTime: {
title: '上报时间', title: '上报时间',
@ -300,10 +241,7 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
ui: { ui: {
widget: 'date', widget: 'date',
mode: 'range', mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd'
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
enterpriseInfoId: { enterpriseInfoId: {
@ -312,9 +250,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true, allowClear: true,
asyncData: () => this.shipperSrv.getNetworkFreightForwarder() asyncData: () => this.shipperSrv.getNetworkFreightForwarder()
} }
@ -328,7 +263,7 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
this.resourceStatus = e; this.resourceStatus = e;
setTimeout(() => { setTimeout(() => {
this?.st?.load(1); this?.st?.load(1);
this?.st2?.load(1); this.st.resetColumns();
}, 0); }, 0);
} }
getGoodsSourceStatistical() { getGoodsSourceStatistical() {
@ -351,11 +286,9 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
}); });
} }
search() { search() {
if (this.selectedIndex === 0) { console.log(this.st);
this.st?.load(1);
} else { this.st?.load(1);
this.st2?.load(1);
}
this.getGoodsSourceStatistical(); this.getGoodsSourceStatistical();
} }
/** /**

View File

@ -7,24 +7,9 @@
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk\\bulk.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk\\bulk.component.html
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row nzGutter="8"> <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"> <ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18"> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
@ -40,32 +25,26 @@
</div> </div>
</ng-container> </ng-container>
</div> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)"> <div class="tab_header">
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab> <label class="page_title"> <label class="driver">|</label> 大宗运单</label>
<nz-tab [nzTitle]="'待发车(' + tabs?.receivedQuantity + ')'"></nz-tab> <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'运输中(' + tabs?.cancelQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'签收(' + tabs?.signQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'发车(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'运输中(' + tabs?.cancelQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已取消(' + tabs?.deltQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
<div style="margin-top: 15px"> <nz-tab [nzTitle]="'已取消(' + tabs?.deltQuantity + ')'"></nz-tab>
<st </nz-tabset>
#st </div>
[bordered]="true" <div>
[scroll]="{ x: '2000px' }" <st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_Bulkpage" [columns]="columns"
[data]="service.$api_get_Bulkpage" [req]="{ params: reqParams }" [page]="{ }" [loading]="false">
[columns]="columns" <ng-template st-row="createUserName" let-item let-index="index">
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" <div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" </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 }} </div>
</ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.driverLicenseCarNo }} </div> <div> {{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.driverLicenseCarNo }} </div>
</ng-template> </ng-template>
@ -78,7 +57,7 @@
<span>{{item?.wayBillStatusLabel}}</span> <span>{{item?.wayBillStatusLabel}}</span>
</div> </div>
<div> <div>
<span >{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}}</span> <span>{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}}</span>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="freightPrice" let-item let-index="index"> <ng-template st-row="freightPrice" let-item let-index="index">
@ -98,7 +77,8 @@
</ng-template> </ng-template>
<ng-template st-row="goodsInfos" let-item let-index="index"> <ng-template st-row="goodsInfos" let-item let-index="index">
<div>{{ item?.goodsInfos?.goodsName }}</div> <div>{{ item?.goodsInfos?.goodsName }}</div>
<div>{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{ item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}</div> <div>{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{
item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}</div>
</ng-template> </ng-template>
<ng-template st-row="loadingTime" let-item let-index="index"> <ng-template st-row="loadingTime" let-item let-index="index">
<div *ngIf="item?.loadingTime">装 | {{ item?.loadingTime }}</div> <div *ngIf="item?.loadingTime">装 | {{ item?.loadingTime }}</div>
@ -107,3 +87,11 @@
</st> </st>
</div> </div>
</nz-card> </nz-card>
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['WAYBILL-BULK-search']">筛选</button>
<button nz-button nzDanger acl [acl-ability]="['WAYBILL-BULK-export']" (click)="exprot()">导出</button>
</div>
</ng-template>

View File

@ -2,29 +2,24 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared'; import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom';
import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component'; import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component'; import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component';
import { WaybillManagementServe } from '../../services/waybill-management.service'; import { WaybillManagementServe } from '../../services/waybill-management.service';
@Component({ @Component({
selector: 'app-supply-management-bulk', selector: 'app-supply-management-bulk',
templateUrl: './bulk.component.html', templateUrl: './bulk.component.html',
styleUrls: ['./bulk.component.less'] styleUrls: ['../../../commom/less/commom-table.less','./bulk.component.less']
}) })
export class WaybillManagementBulkComponent implements OnInit { export class WaybillManagementBulkComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
uiView: SFUISchema = {}; uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {}; schemaView: SFSchema = {};
isVisibleEvaluate = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
resourceStatus: any; resourceStatus: any;
tabs = { tabs = {
@ -38,15 +33,19 @@ export class WaybillManagementBulkComponent implements OnInit {
constructor( constructor(
public service: WaybillManagementServe, public service: WaybillManagementServe,
private modal: NzModalService, private modal: NzModalService,
public shipperservice: ShipperBaseService) { } public shipperservice: ShipperBaseService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/** /**
* 查询参数 * 查询参数
*/ */
get reqParams() { get reqParams() {
const a: any = {}; const a: any = {};
if (this.resourceStatus) { if (this.resourceStatus) {
a.wayBillStatus = this.resourceStatus a.wayBillStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand; delete params._$expand;
@ -55,24 +54,22 @@ export class WaybillManagementBulkComponent implements OnInit {
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '', end: this.sf?.value?.createTime?.[1] || ''
}, }
}; };
} }
get selectedRows() { get selectedRows() {
return this.st?.list.filter((item) => item.checked) || []; return this.st?.list.filter(item => item.checked) || [];
} }
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.initSF();
this.initST(); this.initST();
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
} }
/** /**
* 初始化查询表单 * 初始化查询表单
*/ */
initSF() { initSF() {
this.schema = { this.schema = {
properties: { properties: {
@ -104,68 +101,39 @@ export class WaybillManagementBulkComponent implements OnInit {
searchDebounceTime: 300, searchDebounceTime: 300,
searchLoadingText: '搜索中...', searchLoadingText: '搜索中...',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => { onSearch: (q: any) => {
console.log(q) console.log(q);
let str =q.replace(/^\s+|\s+$/g,""); let str = q.replace(/^\s+|\s+$/g, '');
if (str) { if (str) {
return this.service return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str}) .request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise(); .toPromise();
} else { } else {
return of([]); return of([]);
} }
}, }
} as SFSelectWidgetSchema
} as SFSelectWidgetSchema,
}, },
loadingPlace: { loadingPlace: {
type: 'string', type: 'string',
title: '装货地', title: '装货地'
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
}, },
dischargePlace: { dischargePlace: {
type: 'string', type: 'string',
title: '卸货地', title: '卸货地'
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
}, },
driverName: { driverName: {
title: '承运司机', title: '承运司机',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
licenseCarNo: { licenseCarNo: {
title: '车牌号', title: '车牌号',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
carCaptainName: { carCaptainName: {
title: '车队长', title: '车队长',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
}, },
paymentstatus: { paymentstatus: {
title: '支付状态', title: '支付状态',
@ -173,11 +141,8 @@ export class WaybillManagementBulkComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'overall:payment:status' }, params: { dictKey: 'overall:payment:status' },
containsAllLabel: true, containsAllLabel: true
visibleIf: { } as SFSelectWidgetSchema
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
}, },
serviceType: { serviceType: {
title: '服务类型', title: '服务类型',
@ -185,10 +150,7 @@ export class WaybillManagementBulkComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
containsAllLabel: true, containsAllLabel: true,
params: { dictKey: 'service:type' }, params: { dictKey: 'service:type' }
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
@ -203,11 +165,8 @@ export class WaybillManagementBulkComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
allowClear: true, allowClear: true,
placeholder: '请选择', placeholder: '请选择'
visibleIf: { }
_$expand: (value: boolean) => value,
},
},
}, },
enterpriseInfoId: { enterpriseInfoId: {
type: 'string', type: 'string',
@ -215,12 +174,9 @@ export class WaybillManagementBulkComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true, allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder(), asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}, }
}, },
createTime: { createTime: {
title: '创建时间', title: '创建时间',
@ -229,16 +185,12 @@ export class WaybillManagementBulkComponent implements OnInit {
widget: 'date', widget: 'date',
mode: 'range', mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
allowClear: true, allowClear: true
visibleIf: { } as SFDateWidgetSchema
_$expand: (value: boolean) => value, }
},
} as SFDateWidgetSchema,
},
}, },
type: 'object', type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
} }
/** /**
@ -288,15 +240,14 @@ export class WaybillManagementBulkComponent implements OnInit {
title: '接单数量', title: '接单数量',
index: 'orderReceivingQuantity', index: 'orderReceivingQuantity',
width: '200px', width: '200px',
className: 'text-left', className: 'text-left'
}, },
{ {
title: '结算数量', title: '结算数量',
index: '结算数量', index: '结算数量',
width: '200px', width: '200px',
className: 'text-left', className: 'text-left',
format: (item: any) => format: (item: any) => `${item.settlementWeight || ''}`
`${item.settlementWeight || ''}`
}, },
{ {
title: '承运司机', title: '承运司机',
@ -308,7 +259,7 @@ export class WaybillManagementBulkComponent implements OnInit {
title: '车队长', title: '车队长',
className: 'text-left', className: 'text-left',
width: '200px', width: '200px',
render: 'payeeName', render: 'payeeName'
}, },
{ {
title: '装卸货时间', title: '装卸货时间',
@ -320,7 +271,7 @@ export class WaybillManagementBulkComponent implements OnInit {
title: '创建时间', title: '创建时间',
width: '180px', width: '180px',
className: 'text-left', className: 'text-left',
index: 'createTime', index: 'createTime'
}, },
{ {
title: '操作', title: '操作',
@ -330,81 +281,36 @@ export class WaybillManagementBulkComponent implements OnInit {
buttons: [ buttons: [
{ {
text: '确认发车', text: '确认发车',
click: (_record) => this.sureDepart(_record), click: _record => this.sureDepart(_record),
iif: item => item.wayBillStatus == '2', iif: item => item.wayBillStatus == '2',
acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] }, acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] }
}, },
{ {
text: '确认到车', text: '确认到车',
click: (_record) => this.sureArrive(_record), click: _record => this.sureArrive(_record),
iif: item => item.wayBillStatus == '3', iif: item => item.wayBillStatus == '3',
acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] }, acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] }
}, }
], ]
}, }
]; ];
} }
search() { search() {
this.st?.load(1); this.st?.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
}
/**
* 查询字段个数
*/
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) { selectChange(e: number) {
console.log(e);
if (e >= 1) { if (e >= 1) {
this.resourceStatus = e + 1; this.resourceStatus = e + 1;
} else { } else {
this.resourceStatus = 0 this.resourceStatus = 0;
} }
this.initST(); this.initST();
setTimeout(() => { setTimeout(() => {
this.st.load(1); this.st.load(1);
}, 500); }, 500);
} }
/**
* 导入货源
*/
importGoodsSource() {
}
audit(item: any) {
console.log(item)
}
/**
* 审核通过按钮
*/
handleOK() {
}
/**
*查看评价
*/
viewEvaluate(item: any) {
console.log(item)
this.isVisibleEvaluate = true
}
getGoodsSourceStatistical() { getGoodsSourceStatistical() {
this.tabs = { this.tabs = {
signQuantity: 0, signQuantity: 0,
@ -415,7 +321,7 @@ export class WaybillManagementBulkComponent implements OnInit {
deltQuantity: 0 deltQuantity: 0
}; };
const params: any = Object.assign({}, this.reqParams || {}); const params: any = Object.assign({}, this.reqParams || {});
delete params.wayBillStatus delete params.wayBillStatus;
this.service.request(this.service.$api_get_getBulkStatistics, params).subscribe(res => { this.service.request(this.service.$api_get_getBulkStatistics, params).subscribe(res => {
if (res) { if (res) {
let totalCount = 0; let totalCount = 0;
@ -437,11 +343,11 @@ export class WaybillManagementBulkComponent implements OnInit {
this.tabs.deltQuantity = ele?.count; this.tabs.deltQuantity = ele?.count;
break; break;
} }
totalCount += ele.count totalCount += ele.count;
}); });
this.tabs.totalQuantity = totalCount this.tabs.totalQuantity = totalCount;
} }
}) });
} }
// *确认发车 // *确认发车
@ -458,7 +364,7 @@ export class WaybillManagementBulkComponent implements OnInit {
}); });
modalRef.afterClose.subscribe((result: any) => { modalRef.afterClose.subscribe((result: any) => {
this.st.load(1); this.st.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
}); });
} }
// 确认到车 // 确认到车
@ -475,11 +381,11 @@ export class WaybillManagementBulkComponent implements OnInit {
}); });
modalRef.afterClose.subscribe((result: any) => { modalRef.afterClose.subscribe((result: any) => {
this.st.load(1); this.st.load(1);
this.getGoodsSourceStatistical() this.getGoodsSourceStatistical();
}); });
} }
// 导出 // 导出
exprot() { exprot() {
this.service.exportStart(this.reqParams,this.service.$api_asyncExportBulkList) this.service.exportStart(this.reqParams, this.service.$api_asyncExportBulkList);
} }
} }

View File

@ -7,31 +7,18 @@
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle\\vehicle.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle\\vehicle.component.html
--> -->
<!-- 搜索表单 --> <!-- 搜索表单 -->
<page-header-wrapper [title]="''"> </page-header-wrapper> <!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card> <nz-card>
<div nz-row nzGutter="8"> <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"> <ng-container *ngIf="queryFieldCount > 4">
<div nz-col [nzSpan]="_$expand ? 24 : 18"> <div nz-col [nzSpan]="_$expand ? 24 : 18">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div> </div>
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right"> <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['WAYBILL-VEHICLE-search']">查询</button> <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['WAYBILL-VEHICLE-export']" (click)="exprot()">导出</button> [acl-ability]="['WAYBILL-VEHICLE-search']">查询</button>
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['WAYBILL-VEHICLE-export']"
(click)="exprot()">导出</button>
<button nz-button [disabled]="false" (click)="resetSF()">重置</button> <button nz-button [disabled]="false" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }} {{ !_$expand ? '展开' : '收起' }}
@ -40,36 +27,32 @@
</div> </div>
</ng-container> </ng-container>
</div> </div>
</nz-card> </nz-card> -->
<nz-card> <nz-card class="table-box">
<nz-tabset (nzSelectedIndexChange)="selectChange($event)"> <div class="tab_header">
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab> <label class="page_title"> <label class="driver">|</label> 整车运单</label>
<nz-tab [nzTitle]="'待接单(' + tabs?.stayQuantity + ')'"></nz-tab> <nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'待发车(' + tabs?.receivedQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'运输中(' + tabs?.cancelQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待接单(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'签收(' + tabs?.signQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'发车(' + tabs?.receivedQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'运输中(' + tabs?.cancelQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已取消(' + tabs?.deltQuantity + ')'"></nz-tab> <nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
</nz-tabset> <nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
<div style="margin-top: 15px"> <nz-tab [nzTitle]="'已取消(' + tabs?.deltQuantity + ')'"></nz-tab>
<st </nz-tabset>
#st </div>
[bordered]="true" <div>
[scroll]="{ x: '2000px' }" <st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_wholePage" [columns]="columns"
[data]="service.$api_get_wholePage"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
[loading]="false" <ng-template st-row="createUserName" let-item let-index="index">
> <div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
<ng-template st-row="createUserName" let-item let-index="index"> </ng-template>
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div> <ng-template st-row="createUserName" let-item let-index="index">
</ng-template> <div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
<ng-template st-row="createUserName" let-item let-index="index"> </ng-template>
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
</ng-template>
<ng-template st-row="driverName" let-item let-index="index"> <ng-template st-row="driverName" let-item let-index="index">
<div> {{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.driverLicenseCarNo }} </div> <div> {{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.driverLicenseCarNo }} </div>
</ng-template> </ng-template>
@ -95,7 +78,7 @@
<span>{{item?.wayBillStatusLabel}}</span> <span>{{item?.wayBillStatusLabel}}</span>
</div> </div>
<div> <div>
<span >{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}}</span> <span>{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}}</span>
</div> </div>
</ng-template> </ng-template>
<ng-template st-row="wayBill" let-item let-index="index"> <ng-template st-row="wayBill" let-item let-index="index">
@ -103,7 +86,8 @@
</ng-template> </ng-template>
<ng-template st-row="goodsInfos" let-item let-index="index"> <ng-template st-row="goodsInfos" let-item let-index="index">
<div>{{ item?.goodsInfos?.goodsName }}</div> <div>{{ item?.goodsInfos?.goodsName }}</div>
<div>{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{ item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}</div> <div>{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{
item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}</div>
</ng-template> </ng-template>
<ng-template st-row="loadingTime" let-item let-index="index"> <ng-template st-row="loadingTime" let-item let-index="index">
<div *ngIf="item?.loadingTime">装 | {{ item?.loadingTime }}</div> <div *ngIf="item?.loadingTime">装 | {{ item?.loadingTime }}</div>
@ -112,3 +96,11 @@
</st> </st>
</div> </div>
</nz-card> </nz-card>
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['WAYBILL-VEHICLE-search']">筛选</button>
<button nz-button nzDanger acl [acl-ability]="['WAYBILL-VEHICLE-export']" (click)="exprot()">导出</button>
</div>
</ng-template>

View File

@ -2,11 +2,12 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared'; import { SearchDrawerService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { NzUploadChangeParam } from 'ng-zorro-antd/upload'; import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { BasicTableComponent } from 'src/app/routes/commom';
import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component'; import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component'; import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component';
import { WaybillManagementServe } from '../../services/waybill-management.service'; import { WaybillManagementServe } from '../../services/waybill-management.service';
@ -14,17 +15,13 @@ import { WaybillManagementServe } from '../../services/waybill-management.servic
@Component({ @Component({
selector: 'app-supply-management-vehicle', selector: 'app-supply-management-vehicle',
templateUrl: './vehicle.component.html', templateUrl: './vehicle.component.html',
styleUrls: ['./vehicle.component.less', '../../../commom/less/expend-but.less', '../../../commom/less/box.less'] styleUrls: ['../../../commom/less/commom-table.less', './vehicle.component.less']
}) })
export class WaybillManagementVehicleComponent implements OnInit { export class WaybillManagementVehicleComponent extends BasicTableComponent implements OnInit {
ui: SFUISchema = {};
schema: SFSchema = {};
isVisibleEvaluate = false; isVisibleEvaluate = false;
isVisible = false; isVisible = false;
_$expand = false;
resourceStatus: any; resourceStatus: any;
@ViewChild('st') private readonly st!: STComponent; @ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
columns: STColumn[] = []; columns: STColumn[] = [];
tabs = { tabs = {
signQuantity: 0, signQuantity: 0,
@ -35,7 +32,14 @@ export class WaybillManagementVehicleComponent implements OnInit {
compolatelQuantity: 0, compolatelQuantity: 0,
deltQuantity: 0 deltQuantity: 0
}; };
constructor(public service: WaybillManagementServe, private modal: NzModalService, public shipperservice: ShipperBaseService) {} constructor(
public service: WaybillManagementServe,
private modal: NzModalService,
public shipperservice: ShipperBaseService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/** /**
* 查询参数 * 查询参数
@ -99,9 +103,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
searchDebounceTime: 300, searchDebounceTime: 300,
searchLoadingText: '搜索中...', searchLoadingText: '搜索中...',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => { onSearch: (q: any) => {
let str = q.replace(/^\s+|\s+$/g, ''); let str = q.replace(/^\s+|\s+$/g, '');
if (str) { if (str) {
@ -123,57 +124,29 @@ export class WaybillManagementVehicleComponent implements OnInit {
title: '所属项目', title: '所属项目',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请先选择货主', placeholder: '请先选择货主'
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
loadingPlace: { loadingPlace: {
type: 'string', type: 'string',
title: '装货地', title: '装货地'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
dischargePlace: { dischargePlace: {
type: 'string', type: 'string',
title: '卸货地', title: '卸货地'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
driverName: { driverName: {
title: '承运司机', title: '承运司机',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
licenseCarNo: { licenseCarNo: {
title: '车牌号', title: '车牌号',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
carCaptainName: { carCaptainName: {
title: '车队长', title: '车队长',
type: 'string', type: 'string'
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
}, },
paymentstatus: { paymentstatus: {
title: '支付状态', title: '支付状态',
@ -181,10 +154,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'overall:payment:status' }, params: { dictKey: 'overall:payment:status' },
containsAllLabel: true, containsAllLabel: true
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
serviceType: { serviceType: {
@ -193,10 +163,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
containsAllLabel: true, containsAllLabel: true,
params: { dictKey: 'service:type' }, params: { dictKey: 'service:type' }
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
@ -211,10 +178,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true
visibleIf: {
_$expand: (value: boolean) => value
}
} }
}, },
enterpriseInfoId: { enterpriseInfoId: {
@ -223,9 +187,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true, allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder() asyncData: () => this.shipperservice.getNetworkFreightForwarder()
} }
@ -237,16 +198,12 @@ export class WaybillManagementVehicleComponent implements OnInit {
widget: 'date', widget: 'date',
mode: 'range', mode: 'range',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
allowClear: true, allowClear: true
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema } as SFDateWidgetSchema
} }
}, },
type: 'object' type: 'object'
}; };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
} }
// 获取城市列表 // 获取城市列表
getRegionCode(regionCode: any) { getRegionCode(regionCode: any) {
@ -364,29 +321,9 @@ export class WaybillManagementVehicleComponent 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) { tabChange(item: any) {
console.log(item); console.log(item);
} }
/**
* 重置表单
*/
resetSF(): void {
this.sf.reset();
this._$expand = false;
}
search() { search() {
this.st?.load(1); this.st?.load(1);
this.getGoodsSourceStatistical(); this.getGoodsSourceStatistical();

View File

@ -0,0 +1,3 @@
export * from './search-drawer.component';
export * from './search-drawer.module';
export * from './search-drawer.service';

View File

@ -0,0 +1,14 @@
<nz-drawer [nzBodyStyle]="{ overflow: 'auto' }" [nzMaskClosable]="false" [nzWidth]="420" [nzVisible]="service.visible"
[nzMaskClosable]="true" nzTitle="筛选" [nzFooter]="footerTpl" (nzOnClose)="destroy()">
<div *nzDrawerContent>
<sf *ngIf="schema" #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'" [formData]="defaultValue">
</sf>
</div>
<ng-template #footerTpl>
<div style="float: right">
<button nz-button (click)="destroy()">关闭</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="primary" (click)="search();;">搜索</button>
</div>
</ng-template>
</nz-drawer>

View File

@ -0,0 +1,56 @@
import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { Subject } from 'rxjs';
import { SearchDrawerService } from './search-drawer.service';
@Component({
selector: 'app-search-drawer',
templateUrl: './search-drawer.component.html',
styleUrls: ['./search-drawer.component.less']
})
export class SearchDrawerComponent implements OnInit, AfterViewInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = { '*': { spanLabelFixed: 95, grid: { span: 24, gutter: 4 } } };
schema!: SFSchema;
loading = true;
defaultValue = {};
constructor(public service: SearchDrawerService) {}
ngAfterViewInit(): void {}
ngOnInit(): void {
this.service.createEvent.subscribe(({ defaultValue, newSchema, newUI }) => {
if (defaultValue) {
this.defaultValue = defaultValue;
}
if (newSchema) {
this.schema = newSchema;
if (this.sf) {
this.sf.refreshSchema(newSchema, newUI);
this.sf.reset();
}
this.service.visible = true;
}
setTimeout(() => {
this.service.initEvent.next(this.sf);
}, 500);
});
}
resetSF(): void {
this.sf.reset();
this.defaultValue = {};
}
search() {
if (this.sf) {
this.service.closeEvent.next(this.sf.value);
}
}
destroy() {
this.service.visible = false;
}
}

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SHARED_DELON_MODULES } from '../../shared-delon.module';
import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module';
import { SearchDrawerComponent } from './search-drawer.component';
import { FormsModule } from '@angular/forms';
import { DelonACLModule } from '@delon/acl';
@NgModule({
declarations: [SearchDrawerComponent],
imports: [CommonModule, FormsModule, DelonACLModule, ...SHARED_DELON_MODULES, ...SHARED_ZORRO_MODULES],
exports: [SearchDrawerComponent]
})
export class SearchDrawerModule {}

View File

@ -0,0 +1,20 @@
import { Injectable } from '@angular/core';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { Subject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class SearchDrawerService {
closeEvent = new Subject<any>();
createEvent = new Subject<any>();
initEvent = new Subject<any>();
visible = false;
constructor() {}
create(defaultValue: Record<string, any>, newSchema?: SFSchema, newUI?: SFUISchema) {
this.createEvent.next({ defaultValue, newSchema, newUI });
return this;
}
}

View File

@ -22,6 +22,7 @@ export * from './components/dynamic-setting';
export * from './components/singlepage-setting'; export * from './components/singlepage-setting';
export * from './components/insurance-table/index'; export * from './components/insurance-table/index';
export * from './components/rebate-table/index'; export * from './components/rebate-table/index';
export * from './components/search-drawer';
// Utils // Utils
export * from './utils'; export * from './utils';

View File

@ -26,6 +26,9 @@ export class ShipperBaseService extends BaseService {
// 获取货主企业列表 // 获取货主企业列表
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
// 合伙人下拉列表
public $api_partner_lists = '/api/mdc/partner/list';
// 批量获取项目信息 // 批量获取项目信息
public $api_get_project_list = '/api/mdc/cuc/enterpriseProject/getProjectList'; public $api_get_project_list = '/api/mdc/cuc/enterpriseProject/getProjectList';
constructor(public injector: Injector) { constructor(public injector: Injector) {
@ -146,19 +149,43 @@ export class ShipperBaseService extends BaseService {
); );
} }
/** /**
* 获取网络货运人 * 合伙人下拉列表
* @returns * @returns
*/ */
getNetworkEnterpriseName(params = {}, containerAll = false) { getNetworkEnterpriseName(params = {}, containerAll = false) {
return this.request(this.$api_get_network_freight_forwarder_list, params).pipe( return this.request(this.$api_partner_lists, params).pipe(
map((res: any) => { map((res: any) => {
if (!res) { if (!res) {
return []; return [];
} }
const list = res.map((item: any) => { const list = res.map((item: any) => {
return { return {
label: item.enterpriseName, label: item.keyword,
value: item.enterpriseName value: item.id
};
});
const obj = [];
if (containerAll) {
obj.push({ label: '全部', value: '' });
}
return [...obj, ...list];
})
);
}
/**
* 获取网络货运人
* @returns
*/
getNetworkenterpriceIds(params = {}, containerAll = false) {
return this.request(this.$api_partner_lists, params).pipe(
map((res: any) => {
if (!res) {
return [];
}
const list = res.map((item: any) => {
return {
label: item.contactName + '/' + item.contactMobile,
value: item.id
}; };
}); });
const obj = []; const obj = [];

View File

@ -39,6 +39,8 @@ import { PipeModule } from './pipes';
import { AccountDetailComponent } from './components/account-detail/account-detail.component'; import { AccountDetailComponent } from './components/account-detail/account-detail.component';
import { CaptchaModule } from './components/captcha'; import { CaptchaModule } from './components/captcha';
import { rebateTableModule } from './components/rebate-table'; import { rebateTableModule } from './components/rebate-table';
import { SearchDrawerComponent } from './components/search-drawer/search-drawer.component';
import { SearchDrawerModule } from './components/search-drawer/search-drawer.module';
const MODULES = [ const MODULES = [
AddressModule, AddressModule,
@ -55,6 +57,7 @@ const MODULES = [
PipeModule, PipeModule,
rebateTableModule, rebateTableModule,
CaptchaModule, CaptchaModule,
SearchDrawerModule,
...PRO_SHARED_MODULES ...PRO_SHARED_MODULES
]; ];
// #endregion // #endregion
@ -92,4 +95,4 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou
], ],
declarations: SHAREDCOMPONENTS declarations: SHAREDCOMPONENTS
}) })
export class SharedModule { } export class SharedModule {}

View File

@ -19,3 +19,7 @@
// .page-header__title { // .page-header__title {
// display: none; // display: none;
// } // }
.ant-btn {
border-radius: 4px;
}