diff --git a/proxy.conf.js b/proxy.conf.js index 688f3a27..ff162fda 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-04-24 16:40:24 + * @LastEditTime : 2022-04-25 10:32:29 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ diff --git a/src/app/layout/layout.module.ts b/src/app/layout/layout.module.ts index 3afd4206..a2961e91 100644 --- a/src/app/layout/layout.module.ts +++ b/src/app/layout/layout.module.ts @@ -27,6 +27,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip'; import { NzGridModule } from 'ng-zorro-antd/grid'; import { LayoutPassportComponent } from './passport/passport.component'; import { PRO_COMPONENTS } from './pro/index'; +import { SearchDrawerModule } from '../shared/components/search-drawer/search-drawer.module'; const COMPONENTS: Array> = [...PRO_COMPONENTS, LayoutPassportComponent]; @@ -57,7 +58,8 @@ const COMPONENTS: Array> = [...PRO_COMPONENTS, LayoutPassportComponent ThemeBtnModule, ScrollbarModule, NzGridModule, - NzMessageModule + NzMessageModule, + SearchDrawerModule ], declarations: COMPONENTS, exports: COMPONENTS diff --git a/src/app/layout/pro/pro.component.html b/src/app/layout/pro/pro.component.html index 94c8c60b..4193e6bc 100644 --- a/src/app/layout/pro/pro.component.html +++ b/src/app/layout/pro/pro.component.html @@ -37,4 +37,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/src/app/routes/commom/components/basic-table/basic-table.component.ts b/src/app/routes/commom/components/basic-table/basic-table.component.ts index 99def7f4..ffd15394 100644 --- a/src/app/routes/commom/components/basic-table/basic-table.component.ts +++ b/src/app/routes/commom/components/basic-table/basic-table.component.ts @@ -1,14 +1,21 @@ -import { AfterViewInit, Component, OnInit } from '@angular/core'; -import { fromEvent } from 'rxjs'; +import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'; +import { SFComponent, SFSchema } from '@delon/form'; +import { fromEvent, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; +import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service'; @Component({ template: '' }) -export class BasicTableComponent implements AfterViewInit { +export class BasicTableComponent implements AfterViewInit, OnDestroy { scrollY = '400px'; - constructor() {} + sf!: SFComponent; + sfValue: Record = {}; + drawer: Subscription[] = []; + schema: SFSchema = {}; + + constructor(public searchDrawerService: SearchDrawerService) {} ngAfterViewInit(): void { 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() { const windowHeight = window.innerHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight); const header = document.getElementsByTagName('layout-pro-header')?.[0]; if (windowHeight && header) { let scrollY = windowHeight - header.clientHeight - 35 - 49; + // 剔除页头高度 const headerWrapper = document.getElementsByTagName('page-header-wrapper')?.[0]; if (headerWrapper) { scrollY -= headerWrapper.clientHeight; } - const tabset = document.getElementsByTagName('nz-tabset')?.[0]; + // 计算所有tabs高度 + const tabset = document.getElementsByTagName('nz-tabset'); + let tabsetHeight = 0; + for (let index = 0; index < tabset.length; index++) { + tabsetHeight += tabset[index].clientHeight; + } 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'; } } + + search() {} } diff --git a/src/app/routes/commom/index.ts b/src/app/routes/commom/index.ts new file mode 100644 index 00000000..0bafb3d8 --- /dev/null +++ b/src/app/routes/commom/index.ts @@ -0,0 +1 @@ +export * from './components/basic-table/basic-table.component'; diff --git a/src/app/routes/commom/less/commom-table.less b/src/app/routes/commom/less/commom-table.less index 1eb73d94..2bc0f547 100644 --- a/src/app/routes/commom/less/commom-table.less +++ b/src/app/routes/commom/less/commom-table.less @@ -9,7 +9,7 @@ } .ant-tabs-tab { - margin: 0 0 0 16px; + margin : 0 0 0 16px; padding: 12px 0; } @@ -21,31 +21,69 @@ .ant-card-body { padding: 0; } + + .tab_header { + display : flex; + align-items: center; + + .page_title { + font-weight: bold; + font-size : 17px; + + .driver { + color : #ff4d4f; + margin-left : 17px; + margin-right: 6px; + } + } + + nz-tabset { + flex: 1; + } + } + + .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 { margin: 8px; } - .ant-table-thead > tr > th, - .ant-table-tbody > tr > td, - .ant-table tfoot > tr > th, - .ant-table tfoot > tr > td { + .ant-table-thead>tr>th, + .ant-table-tbody>tr>td, + .ant-table tfoot>tr>th, + .ant-table tfoot>tr>td { padding: 8px; } - .ant-table.ant-table-bordered > .ant-table-container { + .ant-table.ant-table-bordered>.ant-table-container { border-top: 0; } .ant-pagination-item { - min-width: 24px; - height: 24px; + min-width : 24px; + height : 24px; line-height: 21px; } .ant-pagination-total-text { - height: 24px; + height : 24px; line-height: 24px; } @@ -53,8 +91,8 @@ .ant-pagination-next, .ant-pagination-jump-prev, .ant-pagination-jump-next { - min-width: 24px; - height: 24px; + min-width : 24px; + height : 24px; line-height: 21px; } @@ -67,4 +105,4 @@ line-height: 21px; } } -} +} \ No newline at end of file diff --git a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts index a942aff9..e235e937 100644 --- a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts +++ b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts @@ -5,7 +5,7 @@ import { OnChanges } from '@angular/core'; * @Author : Shiming * @Date : 2022-01-05 11:01:55 * @LastEditors : Shiming - * @LastEditTime : 2022-03-30 10:45:19 + * @LastEditTime : 2022-04-25 10:28:10 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -96,8 +96,6 @@ export class ContractManagementTemplateTextComponent implements OnInit { { label: '运单合同', value: '3' }, { label: '运单补充协议', value: '4' }, { label: '委托代收合同', value: '5' }, - { label: '电子提货单', value: '10' }, - { label: '电子卸货单', value: '11' }, ]; this.sf.getProperty('/contractType')!.schema.enum = this.Types; this.sf.getProperty('/contractType')!.widget.reset(this.Types); @@ -178,7 +176,7 @@ export class ContractManagementTemplateTextComponent implements OnInit { } } }, - required: ['templateName', 'templateType'] + required: ['templateName', 'templateType','contractType'] }; this.ui = { '*': { diff --git a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts index ca2cb877..f27df88a 100644 --- a/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts +++ b/src/app/routes/financial-management/components/platform-account/withdraw-deposit/withdraw-deposit.component.ts @@ -240,11 +240,21 @@ export class CwcAccountManagementWithdrawDepositComponent implements OnInit { this.sf.setValue('/payPsd', val); if (val || val !== '') { 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 index = val.lastIndexOf('•'); 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 { + // 删除 this.sf.setValue('/payPassword', password.substr(0, val.length)); } const payPswVal = this.sf.getValue('/payPsd'); diff --git a/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.html b/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.html index 9c9d31eb..26129d7a 100644 --- a/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.html +++ b/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.html @@ -9,41 +9,18 @@ * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + -
- -
- -
- - + +
- + --> - -
- +
+ +
+ + +
+
+
+ - - + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> + +
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}
@@ -84,11 +63,14 @@ {{ item?.billStatusLabel }}
- {{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ? '':item?.serviceTypeLabel}} + {{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ? + '':item?.serviceTypeLabel}}
+ + \ No newline at end of file diff --git a/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.ts b/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.ts index 70043520..cfea574f 100644 --- a/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.ts +++ b/src/app/routes/order-management/components/abnormal-warning/abnormal-warning.component.ts @@ -1,29 +1,24 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; -import { ModalHelper, _HttpClient } from '@delon/theme'; import { NzModalService } from 'ng-zorro-antd/modal'; import { map } from 'rxjs/operators'; import { OrderManagementService } from '../../services/order-management.service'; -import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; -import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component'; import { of } from 'rxjs'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { Router } from '@angular/router'; -import { OneCarOrderAppealComponent } from '../../modal/audit/appeal/appeal.component'; +import { BasicTableComponent } from 'src/app/routes/commom'; @Component({ selector: 'app-order-management-abnormal-warning', templateUrl: './abnormal-warning.component.html', - styleUrls: ['./abnormal-warning.component.less'] + styleUrls: ['../../../commom/less/commom-table.less', './abnormal-warning.component.less'] }) -export class OrderManagementAbnormalWarningComponent implements OnInit { - ui: SFUISchema = {}; +export class OrderManagementAbnormalWarningComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; - changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 - changeViewId: any; // 查看运费变更记录id - 用于查看 + changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 + changeViewId: any; // 查看运费变更记录id - 用于查看 auditId: any; auditIdR: any; auditMany = false; @@ -31,22 +26,23 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { isVisibleEvaluate = false; isVisible = false; isVisibleRE = false; - _$expand = false; @ViewChild('st') private readonly st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sfView', { static: false }) sfView!: SFComponent; @ViewChild('stFloat') private readonly stFloat!: STComponent; @ViewChild('stFloatView') private readonly stFloatView!: STComponent; columns: STColumn[] = []; columnsFloat: STColumn[] = []; columnsFloatView: STColumn[] = []; - ViewCause: any; // 变更运费查看数据 + ViewCause: any; // 变更运费查看数据 constructor( public service: OrderManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, - private router: Router - ) { } + private router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** * 查询参数 @@ -96,14 +92,12 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { billCode: { type: 'string', title: '订单号', - ui: { - } + ui: {} }, wayBillCode: { type: 'string', title: '运单号', - ui: { - } + ui: {} }, serviceType: { title: '服务类型', @@ -112,7 +106,7 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLabel: true, + containsAllLabel: true } as SFSelectWidgetSchema }, resourceType: { @@ -120,12 +114,9 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { type: 'string', default: '', ui: { - visibleIf: { - _$expand: (value: boolean) => value - }, widget: 'dict-select', params: { dictKey: 'goodresource:type' }, - containsAllLabel: true, + containsAllLabel: true } as SFSelectWidgetSchema }, shipperId: { @@ -137,11 +128,8 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, onSearch: (q: any) => { - let str =q.replace(/^\s+|\s+$/g,""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -150,44 +138,24 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { } else { return of([]); } - }, + } } as SFSelectWidgetSchema }, loadingPlace: { type: 'string', title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, dischargePlace: { type: 'string', title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, driverName: { title: '承运司机', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, carNo: { title: '车牌号', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, warningTime: { title: '预警时间', @@ -197,15 +165,11 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { mode: 'range', format: 'yyyy-MM-dd', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFDateWidgetSchema - }, + } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } /** @@ -227,13 +191,19 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { className: 'text-left', index: 'wayCode' }, - { title: '服务类型', index: 'serviceTypeLabel', width: '220px', className: 'text-left',format: (item) => { - return item?.resourceTypeLabel + item?.serviceTypeLabel - } }, + { + title: '服务类型', + index: 'serviceTypeLabel', + width: '220px', + className: 'text-left', + format: item => { + return item?.resourceTypeLabel + item?.serviceTypeLabel; + } + }, { title: '货主', index: 'shipperName', width: '220px', className: 'text-left' }, { title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left' }, { title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left' }, - { title: '司机', render: 'driverName', width: '180px', className: 'text-left' }, + { title: '司机', render: 'driverName', width: '180px', className: 'text-left' }, { title: '车牌号', index: 'carNo', width: '180px', className: 'text-left' }, { title: '预警类型', index: 'warningTypeLabel', width: '180px', className: 'text-left' }, { @@ -252,39 +222,15 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { title: '提醒内容', className: 'text-left', width: '250px', - index: 'warningContent', - }, - + index: 'warningContent' + } ]; } - /** - * 查询字段个数 - */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } + tabChange(item: any) {} - - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); + // 导出 + exprot() { + this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_abnormalWarning_asyncExport); } - tabChange(item: any) { } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } - - - // 导出 - exprot() { - this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_abnormalWarning_asyncExport); - } } diff --git a/src/app/routes/order-management/components/bulk/bulk.component.html b/src/app/routes/order-management/components/bulk/bulk.component.html index 1ea7f649..a2b6d182 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.html +++ b/src/app/routes/order-management/components/bulk/bulk.component.html @@ -9,32 +9,14 @@ * Copyright (C) 2022 huzhenhong. All rights reserved. --> - - + -
- -
- - -
- +
-
-
+ --> - - - - - - - - - - -
- +
+ + + + + + + + + + +
+ +
+ + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> {{ item.freightPrice | currency }} @@ -76,16 +56,19 @@
卸 | {{ item?.unloadTime }}
-
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + + item?.carNo : ''}}
-
{{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? item.settlementVolume + '方 ': ''}}
+
{{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? + item.settlementVolume + '方 ': ''}}
-
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + + item?.payeePhone : '' }}
-
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
{{ item.billCode }} @@ -108,7 +91,8 @@

{{ data.expenseName }}:{{ data.price | currency }} - {{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%' }} + {{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%' + }} {{ data.paymentStatusLabel }}

@@ -117,25 +101,13 @@
- + - + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"> {{ index + 1 }} @@ -155,14 +127,8 @@ - + @@ -172,30 +138,21 @@
- + [res]="{ reName: { list: 'data.list', total: 'data.total' } }"> {{ item.amountBeforeChange | currency }} - ¥{{ item.amountchangeValue | number: '0.2-2' }} + ¥{{ item.amountchangeValue | number: '0.2-2' + }} {{ item.amountAfterChange | currency }} -
变更原因:{{ ViewCause?.changeCause }}
-
拒绝原因:{{ ViewCause?.refuseCause }}
+
变更原因:{{ ViewCause?.changeCause }}
+
拒绝原因:{{ ViewCause?.refuseCause }}
注:附加费依据调整后的运输费用重新计算
@@ -204,13 +161,8 @@ - + @@ -239,26 +191,21 @@
-
已选择{{ selectedRows?.length || 0 }}条订单,确认批量签收吗? +
已选择{{ + selectedRows?.length || 0 }}条订单,确认批量签收吗?
签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。
-
- + +
-
+ \ No newline at end of file diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index 688a6796..aeccbc6d 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; @@ -7,20 +7,20 @@ import { map } from 'rxjs/operators'; import { OrderManagementService } from '../../services/order-management.service'; import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component'; -import { of } from 'rxjs'; +import { of, Subscription } from 'rxjs'; import { ShipperBaseService } from '@shared'; import { Router, ActivatedRoute } from '@angular/router'; import { OneCarOrderCancelConfirmComponent } from '../../modal/vehicle/cancel-confirm/cancel-confirm.component'; +import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service'; +import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component'; @Component({ selector: 'app-supply-management-bulk', templateUrl: './bulk.component.html', - styleUrls: ['./bulk.component.less'] + styleUrls: ['../../../commom/less/commom-table.less','./bulk.component.less'] }) -export class OrderManagementBulkComponent implements OnInit { - ui: SFUISchema = {}; +export class OrderManagementBulkComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; auditMany = false; isVisibleView = false; @@ -54,13 +54,17 @@ export class OrderManagementBulkComponent implements OnInit { GoingQuantity: 0, totalCount: 0 }; + constructor( public service: OrderManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router, private ar: ActivatedRoute, - ) { } + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** * 查询参数 @@ -70,14 +74,14 @@ export class OrderManagementBulkComponent implements OnInit { if (this.resourceStatus) { a.billStatus = this.resourceStatus; } - const params: any = Object.assign({}, this.sf?.value || {}); + const params: any = Object.assign({}, this.sfValue || {}); delete params._$expand; return { ...a, ...params, createTime: { - start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '' + start: this.sfValue?.createTime?.[0] || '', + end: this.sfValue?.createTime?.[1] || '' } }; } @@ -86,17 +90,17 @@ export class OrderManagementBulkComponent implements OnInit { if (this.resourceStatus) { a.billStatus = this.resourceStatus; } - const params: any = Object.assign({}, this.sf?.value || {}); + const params: any = Object.assign({}, this.sfValue || {}); delete params._$expand; console.log(params); - if (this.sf) { + if (this.sfValue) { Object.assign(requestOptions.body, { ...a, ...params, createTime: { - start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '' + start: this.sfValue?.createTime?.[0] || '', + end: this.sfValue?.createTime?.[1] || '' } }); } @@ -104,8 +108,8 @@ export class OrderManagementBulkComponent implements OnInit { return requestOptions; }; afterRes = (data: any[], rawData?: any) => { - console.log(data) - this.loading = false + console.log(data); + this.loading = false; return data.map(item => ({ ...item, disabled: item.billStatus !== '4' @@ -119,6 +123,7 @@ export class OrderManagementBulkComponent implements OnInit { id: this.changeId }; } + search() { this.st?.load(); this.getGoodsSourceStatistical(); @@ -185,14 +190,14 @@ export class OrderManagementBulkComponent implements OnInit { type: 'string', title: '订单号', ui: { - placeholder: '最多100个单号,空号隔开', + placeholder: '最多100个单号,空号隔开' } }, wayBillCode: { type: 'string', title: '运单号', ui: { - placeholder: '最多100个单号,空号隔开', + placeholder: '最多100个单号,空号隔开' } }, resourceCode: { @@ -208,11 +213,8 @@ export class OrderManagementBulkComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, onSearch: (q: any) => { - let str = q.replace(/^\s+|\s+$/g, ""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -233,55 +235,27 @@ export class OrderManagementBulkComponent implements OnInit { ui: { widget: 'select', placeholder: '请先选择货主', - visibleIf: { - _$expand: (value: boolean) => value - }, } as SFSelectWidgetSchema }, loadingPlace: { type: 'string', title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, dischargePlace: { type: 'string', title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, driverName: { title: '承运司机', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, carNo: { title: '车牌号', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, carCaptainName: { title: '车队长', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } }, paymentStatus: { title: '支付状态', @@ -290,9 +264,6 @@ export class OrderManagementBulkComponent implements OnInit { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFSelectWidgetSchema }, createTime: { @@ -303,9 +274,6 @@ export class OrderManagementBulkComponent implements OnInit { mode: 'range', format: 'yyyy-MM-dd', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFDateWidgetSchema }, riskStatus: { @@ -319,9 +287,6 @@ export class OrderManagementBulkComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - } } }, enterpriseInfoName: { @@ -331,9 +296,6 @@ export class OrderManagementBulkComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, asyncData: () => this.shipperservice.getNetworkEnterpriseName() } }, @@ -345,9 +307,6 @@ export class OrderManagementBulkComponent implements OnInit { widget: 'dict-select', params: { dictKey: 'service:type' }, containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFSelectWidgetSchema }, settlementBasis: { @@ -358,15 +317,11 @@ export class OrderManagementBulkComponent implements OnInit { containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, containAllLable: true, - visibleIf: { - _$expand: (value: boolean) => value - } } as SFSelectWidgetSchema } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } /** * 初始化查询表单 @@ -493,7 +448,7 @@ export class OrderManagementBulkComponent implements OnInit { title: '结算数量', render: 'settlementWeight', width: '170px', - className: 'text-left', + className: 'text-left' // format: (item: any) => // `${item.settlementWeight || '0'}吨/ // ${item.settlementVolume || '0'}方` @@ -509,7 +464,7 @@ export class OrderManagementBulkComponent implements OnInit { title: '车队长', className: 'text-left', width: '180px', - render: 'payeeName', + render: 'payeeName' }, { title: '装卸货时间', @@ -533,27 +488,31 @@ export class OrderManagementBulkComponent implements OnInit { title: '操作', fixed: 'right', width: '130px', - className: 'text-left block-td', + className: 'text-center block-td', buttons: [ { text: '运费变更记录', click: _record => this.OpenPrice(_record), iif: item => - item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6', - acl: { ability: ['ORDER-BULK-listChangeApply'] }, + item.billStatus == '4' || + item.billStatus == '5' || + item.billStatus == '2' || + item.billStatus == '3' || + item.billStatus == '6', + acl: { ability: ['ORDER-BULK-listChangeApply'] } }, { text: '查看评价', click: _record => this.viewEvaluate(_record), iif: item => item.billStatus == '5', - acl: { ability: ['ORDER-BULK-evaluation'] }, + acl: { ability: ['ORDER-BULK-evaluation'] } }, { text: '查看详情', click: (item: any) => { this.router.navigate(['./bulk-detail', item.id], { relativeTo: this.ar }); }, - acl: { ability: ['USERCENTER-FREIGHT-USER-view'] }, + acl: { ability: ['USERCENTER-FREIGHT-USER-view'] } }, { text: '变更运费', @@ -562,32 +521,36 @@ export class OrderManagementBulkComponent implements OnInit { const flag = _record.mybidDetailInfo.find((item: any) => item?.expenseCode === 'TRA' && item?.paymentStatus === '4'); return _record.billStatus !== '1' && _record.billStatus !== '6' && !flag; }, - acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] }, + acl: { ability: ['ORDER-BULK-FreightChangeBulkDetail'] } }, { text: '确认签收', click: _record => this.confirmReceipt(_record), iif: item => item.billStatus == '4', - acl: { ability: ['VEHICLE-LIST-view'] }, + acl: { ability: ['VEHICLE-LIST-view'] } }, { text: '取消订单', click: _record => this.cancellation(_record), iif: item => - item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1', - acl: { ability: ['ORDER-BULK-signBulkOrder'] }, + item.billStatus == '4' || + item.billStatus == '5' || + item.billStatus == '2' || + item.billStatus == '3' || + item.billStatus == '1', + acl: { ability: ['ORDER-BULK-signBulkOrder'] } }, { text: '申请退款', - click: (_record) => this.applyRefund(_record), + click: _record => this.applyRefund(_record), iif: item => item.isApplyForRefund, - acl: { ability: ['ORDER-VEHICLE-modificationOrder'] }, + acl: { ability: ['ORDER-VEHICLE-modificationOrder'] } }, { text: '修改订单', click: _record => this.changeOrder(_record), iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', - acl: { ability: ['ORDER-BULK-BulkBillDetail'] }, + acl: { ability: ['ORDER-BULK-BulkBillDetail'] } } ] } @@ -663,27 +626,13 @@ export class OrderManagementBulkComponent implements OnInit { id: this.changeViewId }; } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - tabChange(item: any) { } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } + tabChange(item: any) {} /** * 导入货源 */ - importGoodsSource() { } - audit(item: any) { } + importGoodsSource() {} + audit(item: any) {} /* * 审核关闭弹窗 @@ -704,7 +653,7 @@ export class OrderManagementBulkComponent implements OnInit { /** * 审核通过按钮 */ - handleOK() { } + handleOK() {} OpenPrice(item: any) { this.changeId = item.id; this.isVisible = true; @@ -838,8 +787,8 @@ export class OrderManagementBulkComponent implements OnInit { this.router.navigate(['order-management/bulk-detailChange', value.id]); } /** -*申请退款 -*/ + *申请退款 + */ applyRefund(item: any) { const modalRef = this.modal.create({ nzTitle: '申请退款', @@ -852,7 +801,6 @@ export class OrderManagementBulkComponent implements OnInit { }); modalRef.afterClose.subscribe((res: boolean) => { if (res) { - this.resetSF; this.st.load(); } }); diff --git a/src/app/routes/order-management/components/complaint/complaint.component.html b/src/app/routes/order-management/components/complaint/complaint.component.html index da667180..b76b3b8d 100644 --- a/src/app/routes/order-management/components/complaint/complaint.component.html +++ b/src/app/routes/order-management/components/complaint/complaint.component.html @@ -10,59 +10,67 @@ --> - + + -
- -
-
- - - -
+
+ +
+
+ + + +
-
+ --> - - - + +
+ + + + + +
+ + -
- - - {{item.complaintCode}} - - -
{{item?.drvComplaintCauseLabel}}
-
{{item?.complaintCauseLabel}}
-
+
+ + + {{item.complaintCode}} + + +
{{item?.drvComplaintCauseLabel}}
+
{{item?.complaintCauseLabel}}
+
- + +
+ + +
+
+ + @@ -72,6 +80,4 @@ - - - +
\ No newline at end of file diff --git a/src/app/routes/order-management/components/complaint/complaint.component.ts b/src/app/routes/order-management/components/complaint/complaint.component.ts index a0e077a1..3f34d0de 100644 --- a/src/app/routes/order-management/components/complaint/complaint.component.ts +++ b/src/app/routes/order-management/components/complaint/complaint.component.ts @@ -6,20 +6,19 @@ import { ModalHelper, _HttpClient } from '@delon/theme'; import { NzModalService } from 'ng-zorro-antd/modal'; import { map } from 'rxjs/operators'; import { OrderManagementService } from '../../services/order-management.service'; +import { SearchDrawerService } from '@shared'; +import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component'; @Component({ selector: 'app-supply-management-complaint', templateUrl: './complaint.component.html', - styleUrls: ['./complaint.component.less'] + styleUrls: ['../../../commom/less/commom-table.less', './complaint.component.less'] }) -export class OrderManagementComplaintComponent implements OnInit { - ui: SFUISchema = {}; +export class OrderManagementComplaintComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; auditMany = false; isVisibleRE = false; - _$expand = false; channelId: any; resourceStatus: any; selectedMainTabStatus = '2'; @@ -51,7 +50,13 @@ export class OrderManagementComplaintComponent implements OnInit { 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); // if (this.selectedIndex === 0) { // this.selectedMainTabStatus = '2'; @@ -101,16 +106,15 @@ export class OrderManagementComplaintComponent implements OnInit { wayBillCode: { type: 'string', title: '运单号', - ui: { - } + ui: {} }, - complaintCause: { + drvComplaintCause: { title: '投诉原因', type: 'string', ui: { widget: 'dict-select', params: { dictKey: 'drvcomplaint:cause' }, - hidden: this.selectedMainTabStatus == '1', + hidden: this.selectedMainTabStatus == '1', containsAllLabel: true } as SFSelectWidgetSchema }, @@ -120,7 +124,7 @@ export class OrderManagementComplaintComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'drvcomplaint:cause' }, - hidden: this.selectedMainTabStatus == '2', + hidden: this.selectedMainTabStatus == '2', containsAllLabel: true } as SFSelectWidgetSchema }, @@ -132,16 +136,10 @@ export class OrderManagementComplaintComponent implements OnInit { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - }, } as SFDateWidgetSchema } } }; - this.ui = { - '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 8 } } - }; } /** @@ -270,21 +268,7 @@ export class OrderManagementComplaintComponent implements OnInit { get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } tabChange(item: any) {} - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this.isLoading = true; - } selectChange(e: number) { this.resourceStatus = e; this.initST(); diff --git a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html index 0803df06..2aaeb8e3 100644 --- a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html +++ b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html @@ -9,41 +9,18 @@ * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + -
- -
- -
- - + +
-
+
--> - - - - - - - -
- +
+ + + + + + + +
+
+ + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> {{ item.freightPrice | currency }} @@ -81,20 +55,25 @@
卸 | {{ item?.unloadingTime }}
-
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : '' }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + + item?.carNo : '' }}
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
- {{ item.billCode }} - {{ item.billCode }} - {{ item.billCode }} + {{ + item.billCode }} + {{ item.billCode }} + {{ + item.billCode }}
{{ item?.billStatusLabel }}
- {{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ? '':item?.serviceTypeLabel}} + {{item?.billTypeLabel}}{{item?.serviceTypeLabel === item?.billTypeLabel ? + '':item?.serviceTypeLabel}}
@@ -119,18 +98,16 @@
- + + +
- + @@ -140,18 +117,13 @@
- + - + [res]="{ reName: { list: 'data', total: 'data.total' } }"> {{ index + 1 }} @@ -163,35 +135,27 @@ - + - + {{ item.amountBeforeChange | currency }} - ¥{{ item.amountchangeValue | number: '0.2-2' }} + ¥{{ item.amountchangeValue | number: '0.2-2' + }} {{ item.amountAfterChange | currency }} -
变更原因:{{ ViewCause?.changeCause }}
-
拒绝原因:{{ ViewCause?.refuseCause }}
+
变更原因:{{ ViewCause?.changeCause }}
+
拒绝原因:{{ ViewCause?.refuseCause }}
注:附加费依据调整后的运输费用重新计算
-
+
\ No newline at end of file diff --git a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts index 9009e89a..4b645c2f 100644 --- a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts +++ b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts @@ -8,22 +8,21 @@ import { OrderManagementService } from '../../services/order-management.service' import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component'; import { of } from 'rxjs'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { Router } from '@angular/router'; import { OneCarOrderAppealComponent } from '../../modal/audit/appeal/appeal.component'; +import { BasicTableComponent } from 'src/app/routes/commom'; @Component({ selector: 'app-order-management-compliance-audit', templateUrl: './compliance-audit.component.html', - styleUrls: ['./compliance-audit.component.less'] + styleUrls: ['../../../commom/less/commom-table.less', './compliance-audit.component.less'] }) -export class OrderManagementComplianceAuditComponent implements OnInit { - ui: SFUISchema = {}; +export class OrderManagementComplianceAuditComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; - changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 - changeViewId: any; // 查看运费变更记录id - 用于查看 + changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录 + changeViewId: any; // 查看运费变更记录id - 用于查看 auditId: any; auditIdR: any; auditMany = false; @@ -31,16 +30,14 @@ export class OrderManagementComplianceAuditComponent implements OnInit { isVisibleEvaluate = false; isVisible = false; isVisibleRE = false; - _$expand = false; @ViewChild('st') private readonly st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sfView', { static: false }) sfView!: SFComponent; @ViewChild('stFloat') private readonly stFloat!: STComponent; @ViewChild('stFloatView') private readonly stFloatView!: STComponent; columns: STColumn[] = []; columnsFloat: STColumn[] = []; columnsFloatView: STColumn[] = []; - ViewCause: any; // 变更运费查看数据 + ViewCause: any; // 变更运费查看数据 resourceStatus: any; tabs = { totalCount: 0, @@ -52,8 +49,11 @@ export class OrderManagementComplianceAuditComponent implements OnInit { public service: OrderManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, - private router: Router - ) { } + private router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** * 查询参数 @@ -99,7 +99,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { unstayQuantity: 0 }; const params: any = Object.assign({}, this.reqParams || {}); - delete params.complianceStatus + delete params.complianceStatus; this.service.request(this.service.$api_get_getComplianceStatisticalStatus, params).subscribe(res => { if (res) { let totalCount = 0; @@ -142,8 +142,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { billCode: { type: 'string', title: '订单号', - ui: { - } + ui: {} }, resourceCode: { type: 'string', @@ -159,7 +158,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - let str =q.replace(/^\s+|\s+$/g,""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -179,56 +178,28 @@ export class OrderManagementComplianceAuditComponent implements OnInit { title: '所属项目', ui: { widget: 'select', - placeholder: '请先选择货主', - visibleIf: { - _$expand: (value: boolean) => value - }, + placeholder: '请先选择货主' } as SFSelectWidgetSchema }, loadingPlace: { type: 'string', - title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '装货地' }, dischargePlace: { type: 'string', - title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '卸货地' }, driverName: { title: '承运司机', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, carNo: { title: '车牌号', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, carCaptainName: { title: '车队长', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, paymentStatus: { title: '支付状态', @@ -236,10 +207,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLabel: true } as SFSelectWidgetSchema }, enterpriseInfoId: { @@ -249,9 +217,6 @@ export class OrderManagementComplianceAuditComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, asyncData: () => this.shipperservice.getNetworkFreightForwarder() } }, @@ -262,10 +227,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLabel: true } as SFSelectWidgetSchema }, createTime: { @@ -275,16 +237,12 @@ export class OrderManagementComplianceAuditComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } + allowClear: true } as SFDateWidgetSchema - }, + } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } // 获取城市列表 getRegionCode(regionCode: any) { @@ -397,21 +355,21 @@ export class OrderManagementComplianceAuditComponent implements OnInit { buttons: [ { text: '查看申诉记录', - click: _record => this.appeal(_record), + click: _record => this.appeal(_record) // iif: item => item.billStatus == '5' }, { text: '运费变更记录', click: _record => this.OpenPrice(_record), // iif: item => item.billStatus == '4', - acl: { ability: ['ORDER-COMPLIANCE-AUDIT-listChangeApply'] }, + acl: { ability: ['ORDER-COMPLIANCE-AUDIT-listChangeApply'] } }, { text: '合规抽查', click: _record => this.audit(_record), iif: item => item.complianceStatus == '0', - acl: { ability: ['ORDER-COMPLIANCE-AUDIT-updateBillByCompliance'] }, - }, + acl: { ability: ['ORDER-COMPLIANCE-AUDIT-updateBillByCompliance'] } + } ] } ]; @@ -441,15 +399,15 @@ export class OrderManagementComplianceAuditComponent implements OnInit { buttons: [ { text: '查看', - click: (_record) => this.FloatView(_record), + click: _record => this.FloatView(_record) }, { text: '撤销', - click: (_record) => this.revoke(_record), - iif: item => item.handleStatus === '1' || item.handleStatus === 1, - }, - ], - }, + click: _record => this.revoke(_record), + iif: item => item.handleStatus === '1' || item.handleStatus === 1 + } + ] + } ]; } initSTFloatView() { @@ -508,49 +466,38 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this.router.navigate(['/order-management/risk-detail', item.id]); } /** -* 浮动费用查看 -*/ + * 浮动费用查看 + */ FloatView(item: any) { - console.log(item) + console.log(item); this.changeViewId = item.id; - this.service.request(this.service.$api_getChangeRecordWholeDetail, { id: this.changeViewId }).subscribe((res) => { + this.service.request(this.service.$api_getChangeRecordWholeDetail, { id: this.changeViewId }).subscribe(res => { this.ViewCause = res; - }) - this.isVisibleView = true + }); + this.isVisibleView = true; } revoke(item: any) { this.modal.confirm({ nzTitle: '是否确定立即撤销费用变更!', nzOnOk: () => - this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe((res) => { - console.log(res) + this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe(res => { + console.log(res); if (res) { - this.service.msgSrv.success('撤销成功!') - this.stFloat.reload() + this.service.msgSrv.success('撤销成功!'); + this.stFloat.reload(); } }) }); } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - tabChange(item: any) { } + tabChange(item: any) {} /** * 重置表单 */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } /** * 导入货源 */ - importGoodsSource() { } + importGoodsSource() {} OpenPrice(item: any) { this.changeId = item.id; this.isVisible = true; @@ -608,8 +555,8 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } }; } /* - * 审核关闭弹窗 - */ + * 审核关闭弹窗 + */ handleCancel(value?: string) { if (value === '0') { this.isVisible = false; @@ -620,8 +567,8 @@ export class OrderManagementComplianceAuditComponent implements OnInit { } } /** -* 审核通过按钮 -*/ + * 审核通过按钮 + */ handleOK() { let idList: any[] = []; if (this.selectedRows.length > 0) { @@ -629,25 +576,25 @@ export class OrderManagementComplianceAuditComponent implements OnInit { idList.push(item.id); }); } else { - idList.push(this?.auditIdR) + idList.push(this?.auditIdR); } const parms = { ids: idList, complianceRemark: this.sfView.value.complianceRemark, - complianceStatus: 1, + complianceStatus: 1 }; this.service.request(this.service.$api_get_updateBillByCompliance, parms).subscribe(res => { if (res) { this.service.msgSrv.success('提交成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } }); } /** - * 审核拒绝按钮 - */ + * 审核拒绝按钮 + */ reject() { if (!this.sfView.value.complianceRemark) { this.service.msgSrv.error('备注不能为空!'); @@ -659,25 +606,25 @@ export class OrderManagementComplianceAuditComponent implements OnInit { idList.push(item.id); }); } else { - idList.push(this.sfView.value.billCode) + idList.push(this.sfView.value.billCode); } const parms = { ids: idList, complianceRemark: this.sfView.value.complianceRemark, - complianceStatus: 2, + complianceStatus: 2 }; this.service.request(this.service.$api_get_updateBillByCompliance, parms).subscribe(res => { if (res) { this.service.msgSrv.success('提交成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } }); } /** -*合规抽查 -*/ + *合规抽查 + */ audit(item?: any) { if (item) { this.isVisibleRE = true; @@ -686,7 +633,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this.initSTAudit(1); } else { if (this.selectedRows.length <= 0) { - this.service.msgSrv.error('请选择订单!') + this.service.msgSrv.error('请选择订单!'); return; } else { this.isVisibleRE = true; @@ -694,8 +641,8 @@ export class OrderManagementComplianceAuditComponent implements OnInit { } } } - // 导出 - exprot() { - this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportSpotCheckList); - } + // 导出 + exprot() { + this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportSpotCheckList); + } } diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html index cabacf83..d367d660 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html @@ -1,4 +1,4 @@ -billCode - + -
- +
+ +
+
+ + + +
- - - -
- -
-
- - - - -
-
- + --> - - - - - - -
- +
+ + + + + + +
+ +
+ + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> {{ item.freightPrice | currency }} @@ -79,12 +58,13 @@ billCode - {{ item.billCode }} - {{ item.billCode }} - {{ item.billCode }} + {{ + item.billCode }} + {{ + item.billCode }} + {{ + item.billCode }}
{{item?.billStatusLabel}}
- {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? '':item?.serviceTypeLabel}} + {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? + '':item?.serviceTypeLabel}}
@@ -131,7 +116,20 @@ billCode - + -
- +
+ +
+
+ + + +
- - - -
- -
-
- - - - -
-
- + --> - - - - - - - - -
- +
+ + + + + + + + +
+ +
+ + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> - {{ item.billCode }} - {{ item.billCode }} - {{ item.billCode }} + {{ + item.billCode }} + {{ item.billCode + }} + {{ + item.billCode }}
{{ item?.representationsStatusLabel }}
- {{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' : item?.serviceTypeLabel}} + {{item?.billTypeLabel}}{{item?.billTypeLabel === item?.serviceTypeLabel ? '' : + item?.serviceTypeLabel}}
@@ -96,7 +81,8 @@
-
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + + item?.carNo : ''}}
@@ -113,7 +99,7 @@

货物名称:{{ i?.goodsName }}

-

重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}

+

重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}

车型/车长:{{ i?.carModelLabel }} {{ i?.carLengthLabel ? "/" + i?.carLengthLabel : ''}}

@@ -121,14 +107,8 @@
- + @@ -139,7 +119,10 @@ -
- +
+ + +
- + \ No newline at end of file diff --git a/src/app/routes/order-management/components/risk/risk.component.less b/src/app/routes/order-management/components/risk/risk.component.less index 987664d0..e69de29b 100644 --- a/src/app/routes/order-management/components/risk/risk.component.less +++ b/src/app/routes/order-management/components/risk/risk.component.less @@ -1,13 +0,0 @@ - - :host { - p{ - margin-bottom: 0 - } - .left_btn { - width: 50px; - height: 32px; - padding-left: 8px; - line-height:32px; - background-color: #d7d7d7; - } - } \ No newline at end of file diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index 400d1fb0..eda512a5 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -4,21 +4,20 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; import { OrderManagementService } from '../../services/order-management.service'; +import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component'; @Component({ selector: 'app-supply-management-risk', templateUrl: './risk.component.html', - styleUrls: ['./risk.component.less'] + styleUrls: ['../../../commom/less/commom-table.less', './risk.component.less'] }) -export class OrderManagementRiskComponent implements OnInit { - ui: SFUISchema = {}; +export class OrderManagementRiskComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; auditMany = false; loading: boolean = true; @@ -26,9 +25,7 @@ export class OrderManagementRiskComponent implements OnInit { auditIdR: any; isVisibleRE = false; resourceStatus: any; - _$expand = false; @ViewChild('st') private readonly st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sfView', { static: false }) sfView!: SFComponent; columns: STColumn[] = []; tabs = { @@ -41,8 +38,11 @@ export class OrderManagementRiskComponent implements OnInit { public service: OrderManagementService, public shipperservice: ShipperBaseService, 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() { const a: any = {}; if (this.resourceStatus) { - a.representationsStatus = this.resourceStatus + a.representationsStatus = this.resourceStatus; } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; @@ -59,14 +59,14 @@ export class OrderManagementRiskComponent implements OnInit { ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '', - }, + end: this.sf?.value?.createTime?.[1] || '' + } }; } beforeReq = (requestOptions: STRequestOptions) => { const a: any = {}; if (this.resourceStatus) { - a.representationsStatus = this.resourceStatus + a.representationsStatus = this.resourceStatus; } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; @@ -76,51 +76,51 @@ export class OrderManagementRiskComponent implements OnInit { ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '', - }, + end: this.sf?.value?.createTime?.[1] || '' + } }); } this.loading = true; return requestOptions; }; afterRes = (data: any[], rawData?: any) => { - console.log(data) - this.loading = false + console.log(data); + this.loading = false; return data.map(item => ({ ...item, - disabled: item.representationsStatus !== '2' + disabled: item.representationsStatus !== '2' })); }; search() { this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } get selectedRows() { return this.st?.list.filter(item => item.checked) || []; } ngOnInit(): void { - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); this.initSF(); this.initST(); } getGoodsSourceStatistical() { this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => { if (res) { - res.forEach((element: any) => { - console.log(element.representationsStatus); - if(element.representationsStatus === '1') { - this.tabs.stayQuantity = element.quantity - } else if (element.representationsStatus == '4') { - this.tabs.cancelQuantity = element.quantity - } else if (element.representationsStatus == '3') { - this.tabs.receivedQuantity = element.quantity - }else if (element.representationsStatus == '2') { - this.tabs.underwayQuantity = element.quantity - } - }); - console.log(this.tabs) + res.forEach((element: any) => { + console.log(element.representationsStatus); + if (element.representationsStatus === '1') { + this.tabs.stayQuantity = element.quantity; + } else if (element.representationsStatus == '4') { + this.tabs.cancelQuantity = element.quantity; + } else if (element.representationsStatus == '3') { + this.tabs.receivedQuantity = element.quantity; + } else if (element.representationsStatus == '2') { + this.tabs.underwayQuantity = element.quantity; + } + }); + console.log(this.tabs); } - }) + }); } /** * 初始化查询表单 @@ -146,48 +146,23 @@ export class OrderManagementRiskComponent implements OnInit { }, loadingPlace: { type: 'string', - title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '装货地' }, dischargePlace: { type: 'string', - title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '卸货地' }, driverName: { title: '承运司机', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, carNo: { title: '车牌号', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, payeeName: { type: 'string', - title: '车队长', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '车队长' }, wayBillType: { title: '运单类型', @@ -195,10 +170,7 @@ export class OrderManagementRiskComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'bill:type' }, - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLabel: true } as SFSelectWidgetSchema }, shipperAppUserName: { @@ -210,11 +182,8 @@ export class OrderManagementRiskComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, onSearch: (q: any) => { - let str =q.replace(/^\s+|\s+$/g,""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -223,7 +192,7 @@ export class OrderManagementRiskComponent implements OnInit { } else { return of([]); } - }, + } } as SFSelectWidgetSchema }, enterpriseInfoId: { @@ -233,11 +202,8 @@ export class OrderManagementRiskComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value, - }, - asyncData: () => this.shipperservice.getNetworkFreightForwarder(), - }, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } }, createTime: { title: '创建时间', @@ -246,16 +212,12 @@ export class OrderManagementRiskComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } + allowClear: true } as SFDateWidgetSchema } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } /** @@ -347,14 +309,14 @@ export class OrderManagementRiskComponent implements OnInit { { text: '审核', click: _record => this.audit(_record), - iif: item => item.representationsStatus == '2' , - acl: { ability: ['ORDER-RISK-audit'] }, + iif: item => item.representationsStatus == '2', + acl: { ability: ['ORDER-RISK-audit'] } }, { text: '详情', click: _record => this.viewEvaluate(_record), - iif: item => item.representationsStatus !== '1' , - acl: { ability: ['ORDER-RISK-riskDetail'] }, + iif: item => item.representationsStatus !== '1', + acl: { ability: ['ORDER-RISK-riskDetail'] } } ] } @@ -419,30 +381,10 @@ export class OrderManagementRiskComponent implements OnInit { this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } }; } - /** - * 查询字段个数 - */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } + tabChange(item: any) { console.log(item); } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } - selectChange(e: number) { this.resourceStatus = e; @@ -454,7 +396,7 @@ export class OrderManagementRiskComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() { } + importGoodsSource() {} /* * 审核关闭弹窗 @@ -472,20 +414,20 @@ export class OrderManagementRiskComponent implements OnInit { idList.push(item.id); }); } else { - idList.push(this.sfView.value.id) + idList.push(this.sfView.value.id); } const parms = { ids: idList, auditRemark: this.sfView.value.representationsCause, representationsStatus: 3, - auditStatus: 2, + auditStatus: 2 }; this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => { if (res) { this.service.msgSrv.success('审核通过成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } }); } @@ -499,7 +441,7 @@ export class OrderManagementRiskComponent implements OnInit { idList.push(item.id); }); } else { - idList.push(this.sfView.value.id) + idList.push(this.sfView.value.id); } if (!this.sfView.value.representationsCause) { this.service.msgSrv.error('拒绝原因为空!'); @@ -509,14 +451,14 @@ export class OrderManagementRiskComponent implements OnInit { ids: idList, auditRemark: this.sfView.value.representationsCause, representationsStatus: 4, - auditStatus: 3, + auditStatus: 3 }; this.service.request(this.service.$api_get_listRisk_audit, parms).subscribe(res => { if (res) { this.service.msgSrv.success('审核拒绝成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } }); } @@ -531,7 +473,7 @@ export class OrderManagementRiskComponent implements OnInit { this.isVisibleRE = true; } else { if (this.selectedRows.length <= 0) { - this.service.msgSrv.error('请选择订单!') + this.service.msgSrv.error('请选择订单!'); return; } else { this.initSTAudit(2); @@ -545,8 +487,8 @@ export class OrderManagementRiskComponent implements OnInit { viewEvaluate(item: any) { this.router.navigate(['/order-management/risk-detail', item.id]); } - // 导出 - exprot() { - this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList); - } + // 导出 + exprot() { + this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportRiskBillList); + } } diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.html b/src/app/routes/order-management/components/vehicle/vehicle.component.html index 4780db3c..542019b6 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.html @@ -31,11 +31,11 @@ --> -
-
- + @@ -57,6 +57,9 @@ {{ item.contacter }}
/{{item.mobile}}
+ + {{ item.partnerName }}
/{{item.promotersTelephone}} +
{{ item.promotersTelephone || '添加' }} @@ -72,4 +75,10 @@
+
+ +
+ + +
\ No newline at end of file diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index 4653512b..e31caa23 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -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({ nzTitle: '修改合伙人', nzContent: EditPartnerComponentsAddComponent, nzWidth: 800, nzComponentParams: { - i: record + i: record, + sts: status, + rows: params }, nzFooter: null }); @@ -141,7 +160,7 @@ export class FreightComponentsListComponent implements OnInit { } }); } - editSale(record: any) { + editSale(record?: any) { const modalRef = this.modal.create({ nzTitle: '修改渠道销售', nzContent: EditSaleComponentsAddComponent, @@ -380,7 +399,7 @@ export class FreightComponentsListComponent implements OnInit { initST() { this.columns = [ - // { title: '', type: 'checkbox', className: 'text-center' }, + { title: '', type: 'checkbox', className: 'text-center' }, { title: '企业名称', render: 'enterpriseName', width: 350 }, { title: '统一社会信用代码', className: 'text-center', render: 'unifiedSocialCreditCode', width: 200 }, { @@ -407,7 +426,7 @@ export class FreightComponentsListComponent implements OnInit { enum: { 10: '整车发货', 20: '大宗发货' }, 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', index: 'customerServiceIdLabel', width: 150 }, { title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 }, diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html index 5681c18e..fc3d8541 100644 --- a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html @@ -6,17 +6,10 @@ * @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 --> - + -
- -
- -
@@ -32,57 +25,62 @@
+ --> + + +
+ + + + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
- - - - - -
-
- - -
-
- - -
-
- - -
-
-
-
-
- - - -
-
- -
-
- -
-
- -
-
-
-
-
-
-
+ +
+ +
+
diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts index a9d112ba..53cdfc00 100644 --- a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts @@ -10,32 +10,28 @@ import { SFSelectWidgetSchema, SFUISchema } from '@delon/form'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { WaybillManagementServe } from '../../services/waybill-management.service'; @Component({ selector: 'app-abnormal-appear', 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 }) detailModal!: any; @ViewChild('replyModal', { static: true }) replyModal!: any; @ViewChild('st', { static: true }) st!: STComponent; - @ViewChild('st2', { static: true }) - st2!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; ui: SFUISchema = {}; ui2: SFUISchema = {}; - schema: SFSchema = {}; addSchema: SFSchema = {}; - _$expand = false; editText = ''; formData: any; isVisible = false; @@ -74,44 +70,17 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { { title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' }, { title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '300px', className: 'text-left' }, { 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: '操作', fixed: 'right', width: '100px', + iif: _ => this.selectedIndex === 0, className: 'text-center', 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; get reqParams() { @@ -140,28 +109,17 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { public service: WaybillManagementServe, private nzModalService: NzModalService, public shipperSrv: ShipperBaseService, - private router: Router - ) {} + private router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } ngOnInit(): void { this.initSF(); 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) { this.itemInfo = {}; this.service.request(`${this.service.$api_get_listOperate_detail}${item.id}`, {}, 'GET').subscribe(res => { @@ -217,7 +175,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { initSF() { this.schema = { properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, exceptionCode: { type: 'string', title: '异常编号', @@ -259,9 +216,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { }, change: (q: any) => { this.getRegionCode(q); - }, - visibleIf: { - _$expand: (value: boolean) => value } } as SFSelectWidgetSchema }, @@ -270,29 +224,16 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { title: '所属项目', ui: { widget: 'select', - placeholder: '请先选择货主', - visibleIf: { - _$expand: (value: boolean) => value - } + placeholder: '请先选择货主' } as SFSelectWidgetSchema }, driverName: { title: '承运司机', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, carNo: { title: '车牌号', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, reportingTime: { title: '上报时间', @@ -300,10 +241,7 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { ui: { widget: 'date', mode: 'range', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, enterpriseInfoId: { @@ -312,9 +250,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true, asyncData: () => this.shipperSrv.getNetworkFreightForwarder() } @@ -328,7 +263,7 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { this.resourceStatus = e; setTimeout(() => { this?.st?.load(1); - this?.st2?.load(1); + this.st.resetColumns(); }, 0); } getGoodsSourceStatistical() { @@ -351,11 +286,9 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { }); } search() { - if (this.selectedIndex === 0) { - this.st?.load(1); - } else { - this.st2?.load(1); - } + console.log(this.st); + + this.st?.load(1); this.getGoodsSourceStatistical(); } /** diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.html b/src/app/routes/waybill-management/components/bulk/bulk.component.html index cbc5221f..9403b45c 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.html +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.html @@ -7,24 +7,9 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk\\bulk.component.html --> - + -
- -
- -
@@ -40,32 +25,26 @@
- + --> - - - - - - - - - -
- - -
{{ item?.createUserName }}/{{ item?.createUserPhone }}
-
+ +
+ + + + + + + + + +
+
+ + +
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.driverLicenseCarNo }}
@@ -78,7 +57,7 @@ {{item?.wayBillStatusLabel}}
- {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}} + {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}}
@@ -98,7 +77,8 @@
{{ item?.goodsInfos?.goodsName }}
-
{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{ item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}
+
{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{ + item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}
装 | {{ item?.loadingTime }}
@@ -107,3 +87,11 @@
+ + +
+ + +
+
\ No newline at end of file diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.ts b/src/app/routes/waybill-management/components/bulk/bulk.component.ts index e3b993be..f196fc63 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -2,29 +2,24 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { 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 { WaybillManagementServe } from '../../services/waybill-management.service'; - @Component({ selector: 'app-supply-management-bulk', templateUrl: './bulk.component.html', - styleUrls: ['./bulk.component.less'] + styleUrls: ['../../../commom/less/commom-table.less','./bulk.component.less'] }) -export class WaybillManagementBulkComponent implements OnInit { - ui: SFUISchema = {}; +export class WaybillManagementBulkComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; - isVisibleEvaluate = false; - _$expand = false; @ViewChild('st') private readonly st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; columns: STColumn[] = []; resourceStatus: any; tabs = { @@ -38,15 +33,19 @@ export class WaybillManagementBulkComponent implements OnInit { constructor( public service: WaybillManagementServe, private modal: NzModalService, - public shipperservice: ShipperBaseService) { } + public shipperservice: ShipperBaseService, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** - * 查询参数 - */ + * 查询参数 + */ get reqParams() { const a: any = {}; if (this.resourceStatus) { - a.wayBillStatus = this.resourceStatus + a.wayBillStatus = this.resourceStatus; } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; @@ -55,24 +54,22 @@ export class WaybillManagementBulkComponent implements OnInit { ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '', - }, + end: this.sf?.value?.createTime?.[1] || '' + } }; } get selectedRows() { - return this.st?.list.filter((item) => item.checked) || []; + return this.st?.list.filter(item => item.checked) || []; } ngOnInit(): void { this.initSF(); this.initST(); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } - - /** - * 初始化查询表单 - */ + * 初始化查询表单 + */ initSF() { this.schema = { properties: { @@ -104,68 +101,39 @@ export class WaybillManagementBulkComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, onSearch: (q: any) => { - console.log(q) - let str =q.replace(/^\s+|\s+$/g,""); + console.log(q); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: str}) - .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) + .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { return of([]); } - }, - - } as SFSelectWidgetSchema, + } + } as SFSelectWidgetSchema }, loadingPlace: { type: 'string', - title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value, - }, - } + title: '装货地' }, dischargePlace: { type: 'string', - title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value, - }, - } + title: '卸货地' }, driverName: { title: '承运司机', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, licenseCarNo: { title: '车牌号', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, carCaptainName: { title: '车队长', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value, - }, - } + type: 'string' }, paymentstatus: { title: '支付状态', @@ -173,11 +141,8 @@ export class WaybillManagementBulkComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, + containsAllLabel: true + } as SFSelectWidgetSchema }, serviceType: { title: '服务类型', @@ -185,10 +150,7 @@ export class WaybillManagementBulkComponent implements OnInit { ui: { widget: 'dict-select', containsAllLabel: true, - params: { dictKey: 'service:type' }, - visibleIf: { - _$expand: (value: boolean) => value - } + params: { dictKey: 'service:type' } } as SFSelectWidgetSchema }, @@ -203,11 +165,8 @@ export class WaybillManagementBulkComponent implements OnInit { ui: { widget: 'select', allowClear: true, - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value, - }, - }, + placeholder: '请选择' + } }, enterpriseInfoId: { type: 'string', @@ -215,12 +174,9 @@ export class WaybillManagementBulkComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value, - }, allowClear: true, - asyncData: () => this.shipperservice.getNetworkFreightForwarder(), - }, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } }, createTime: { title: '创建时间', @@ -229,16 +185,12 @@ export class WaybillManagementBulkComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFDateWidgetSchema, - }, + allowClear: true + } 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: '接单数量', index: 'orderReceivingQuantity', width: '200px', - className: 'text-left', + className: 'text-left' }, { title: '结算数量', index: '结算数量', width: '200px', className: 'text-left', - format: (item: any) => - `${item.settlementWeight || ''}` + format: (item: any) => `${item.settlementWeight || ''}` }, { title: '承运司机', @@ -308,7 +259,7 @@ export class WaybillManagementBulkComponent implements OnInit { title: '车队长', className: 'text-left', width: '200px', - render: 'payeeName', + render: 'payeeName' }, { title: '装卸货时间', @@ -320,7 +271,7 @@ export class WaybillManagementBulkComponent implements OnInit { title: '创建时间', width: '180px', className: 'text-left', - index: 'createTime', + index: 'createTime' }, { title: '操作', @@ -330,81 +281,36 @@ export class WaybillManagementBulkComponent implements OnInit { buttons: [ { text: '确认发车', - click: (_record) => this.sureDepart(_record), + click: _record => this.sureDepart(_record), iif: item => item.wayBillStatus == '2', - acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] }, + acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] } }, { text: '确认到车', - click: (_record) => this.sureArrive(_record), + click: _record => this.sureArrive(_record), iif: item => item.wayBillStatus == '3', - acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] }, - }, - ], - }, + acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] } + } + ] + } ]; } search() { this.st?.load(1); - 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; + this.getGoodsSourceStatistical(); } selectChange(e: number) { - console.log(e); if (e >= 1) { this.resourceStatus = e + 1; } else { - this.resourceStatus = 0 + this.resourceStatus = 0; } this.initST(); setTimeout(() => { this.st.load(1); }, 500); } - /** - * 导入货源 - */ - importGoodsSource() { - - } - audit(item: any) { - console.log(item) - } - /** -* 审核通过按钮 -*/ - handleOK() { - - } - /** - *查看评价 - */ - viewEvaluate(item: any) { - console.log(item) - this.isVisibleEvaluate = true - } + getGoodsSourceStatistical() { this.tabs = { signQuantity: 0, @@ -415,7 +321,7 @@ export class WaybillManagementBulkComponent implements OnInit { deltQuantity: 0 }; const params: any = Object.assign({}, this.reqParams || {}); - delete params.wayBillStatus + delete params.wayBillStatus; this.service.request(this.service.$api_get_getBulkStatistics, params).subscribe(res => { if (res) { let totalCount = 0; @@ -437,11 +343,11 @@ export class WaybillManagementBulkComponent implements OnInit { this.tabs.deltQuantity = ele?.count; 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) => { this.st.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); }); } // 确认到车 @@ -475,11 +381,11 @@ export class WaybillManagementBulkComponent implements OnInit { }); modalRef.afterClose.subscribe((result: any) => { this.st.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); }); } - // 导出 - exprot() { - this.service.exportStart(this.reqParams,this.service.$api_asyncExportBulkList) - } + // 导出 + exprot() { + this.service.exportStart(this.reqParams, this.service.$api_asyncExportBulkList); + } } diff --git a/src/app/routes/waybill-management/components/vehicle/vehicle.component.html b/src/app/routes/waybill-management/components/vehicle/vehicle.component.html index 9561f324..517154ff 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.html @@ -7,31 +7,18 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle\\vehicle.component.html --> - + -
- -
- -
- - + +
-
+ --> - - - - - - - - - - -
- +
+ + + + + + + + + + +
+
+ - -
{{ item?.createUserName }}/{{ item?.createUserPhone }}
-
- -
{{ item?.createUserName }}/{{ item?.createUserPhone }}
-
+ [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> + +
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
+ +
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.driverLicenseCarNo }}
@@ -95,7 +78,7 @@ {{item?.wayBillStatusLabel}}
- {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}} + {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}}
@@ -103,7 +86,8 @@
{{ item?.goodsInfos?.goodsName }}
-
{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{ item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}
+
{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{ + item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}
装 | {{ item?.loadingTime }}
@@ -112,3 +96,11 @@
+ + +
+ + +
+
\ No newline at end of file diff --git a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts index eb87999f..5eaa1be6 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -2,11 +2,12 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { NzUploadChangeParam } from 'ng-zorro-antd/upload'; import { of } from 'rxjs'; 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 { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component'; import { WaybillManagementServe } from '../../services/waybill-management.service'; @@ -14,17 +15,13 @@ import { WaybillManagementServe } from '../../services/waybill-management.servic @Component({ selector: 'app-supply-management-vehicle', 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 { - ui: SFUISchema = {}; - schema: SFSchema = {}; +export class WaybillManagementVehicleComponent extends BasicTableComponent implements OnInit { isVisibleEvaluate = false; isVisible = false; - _$expand = false; resourceStatus: any; @ViewChild('st') private readonly st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; columns: STColumn[] = []; tabs = { signQuantity: 0, @@ -35,7 +32,14 @@ export class WaybillManagementVehicleComponent implements OnInit { compolatelQuantity: 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, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, onSearch: (q: any) => { let str = q.replace(/^\s+|\s+$/g, ''); if (str) { @@ -123,57 +124,29 @@ export class WaybillManagementVehicleComponent implements OnInit { title: '所属项目', ui: { widget: 'select', - placeholder: '请先选择货主', - visibleIf: { - _$expand: (value: boolean) => value - } + placeholder: '请先选择货主' } as SFSelectWidgetSchema }, loadingPlace: { type: 'string', - title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '装货地' }, dischargePlace: { type: 'string', - title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + title: '卸货地' }, driverName: { title: '承运司机', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, licenseCarNo: { title: '车牌号', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, carCaptainName: { title: '车队长', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + type: 'string' }, paymentstatus: { title: '支付状态', @@ -181,10 +154,7 @@ export class WaybillManagementVehicleComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLabel: true } as SFSelectWidgetSchema }, serviceType: { @@ -193,10 +163,7 @@ export class WaybillManagementVehicleComponent implements OnInit { ui: { widget: 'dict-select', containsAllLabel: true, - params: { dictKey: 'service:type' }, - visibleIf: { - _$expand: (value: boolean) => value - } + params: { dictKey: 'service:type' } } as SFSelectWidgetSchema }, @@ -211,10 +178,7 @@ export class WaybillManagementVehicleComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } + allowClear: true } }, enterpriseInfoId: { @@ -223,9 +187,6 @@ export class WaybillManagementVehicleComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true, asyncData: () => this.shipperservice.getNetworkFreightForwarder() } @@ -237,16 +198,12 @@ export class WaybillManagementVehicleComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } + allowClear: true } as SFDateWidgetSchema } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } // 获取城市列表 getRegionCode(regionCode: any) { @@ -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) { console.log(item); } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } search() { this.st?.load(1); this.getGoodsSourceStatistical(); diff --git a/src/app/shared/components/search-drawer/index.ts b/src/app/shared/components/search-drawer/index.ts new file mode 100644 index 00000000..7129b4d9 --- /dev/null +++ b/src/app/shared/components/search-drawer/index.ts @@ -0,0 +1,3 @@ +export * from './search-drawer.component'; +export * from './search-drawer.module'; +export * from './search-drawer.service'; \ No newline at end of file diff --git a/src/app/shared/components/search-drawer/search-drawer.component.html b/src/app/shared/components/search-drawer/search-drawer.component.html new file mode 100644 index 00000000..070bb956 --- /dev/null +++ b/src/app/shared/components/search-drawer/search-drawer.component.html @@ -0,0 +1,14 @@ + +
+ + +
+ +
+ + + +
+
+
\ No newline at end of file diff --git a/src/app/shared/components/search-drawer/search-drawer.component.less b/src/app/shared/components/search-drawer/search-drawer.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/shared/components/search-drawer/search-drawer.component.ts b/src/app/shared/components/search-drawer/search-drawer.component.ts new file mode 100644 index 00000000..3e8b30fd --- /dev/null +++ b/src/app/shared/components/search-drawer/search-drawer.component.ts @@ -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; + } +} diff --git a/src/app/shared/components/search-drawer/search-drawer.module.ts b/src/app/shared/components/search-drawer/search-drawer.module.ts new file mode 100644 index 00000000..08746cc8 --- /dev/null +++ b/src/app/shared/components/search-drawer/search-drawer.module.ts @@ -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 {} diff --git a/src/app/shared/components/search-drawer/search-drawer.service.ts b/src/app/shared/components/search-drawer/search-drawer.service.ts new file mode 100644 index 00000000..6201c006 --- /dev/null +++ b/src/app/shared/components/search-drawer/search-drawer.service.ts @@ -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(); + createEvent = new Subject(); + initEvent = new Subject(); + + visible = false; + constructor() {} + + create(defaultValue: Record, newSchema?: SFSchema, newUI?: SFUISchema) { + this.createEvent.next({ defaultValue, newSchema, newUI }); + return this; + } +} diff --git a/src/app/shared/index.ts b/src/app/shared/index.ts index 7ea8c70d..11bf70b7 100644 --- a/src/app/shared/index.ts +++ b/src/app/shared/index.ts @@ -22,6 +22,7 @@ export * from './components/dynamic-setting'; export * from './components/singlepage-setting'; export * from './components/insurance-table/index'; export * from './components/rebate-table/index'; +export * from './components/search-drawer'; // Utils export * from './utils'; diff --git a/src/app/shared/services/business/shipper-base.service.ts b/src/app/shared/services/business/shipper-base.service.ts index bf46b2dd..306f8614 100644 --- a/src/app/shared/services/business/shipper-base.service.ts +++ b/src/app/shared/services/business/shipper-base.service.ts @@ -26,6 +26,9 @@ export class ShipperBaseService extends BaseService { // 获取货主企业列表 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'; constructor(public injector: Injector) { @@ -146,19 +149,43 @@ export class ShipperBaseService extends BaseService { ); } /** - * 获取网络货运人 + * 合伙人下拉列表 * @returns */ 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) => { if (!res) { return []; } const list = res.map((item: any) => { return { - label: item.enterpriseName, - value: item.enterpriseName + label: item.keyword, + 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 = []; diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 705f6cc8..18f62bd9 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -39,6 +39,8 @@ import { PipeModule } from './pipes'; import { AccountDetailComponent } from './components/account-detail/account-detail.component'; import { CaptchaModule } from './components/captcha'; 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 = [ AddressModule, @@ -55,6 +57,7 @@ const MODULES = [ PipeModule, rebateTableModule, CaptchaModule, + SearchDrawerModule, ...PRO_SHARED_MODULES ]; // #endregion @@ -92,4 +95,4 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou ], declarations: SHAREDCOMPONENTS }) -export class SharedModule { } +export class SharedModule {} diff --git a/src/styles/theme.less b/src/styles/theme.less index ae6c6f8c..f5667bf2 100644 --- a/src/styles/theme.less +++ b/src/styles/theme.less @@ -19,3 +19,7 @@ // .page-header__title { // display: none; // } + +.ant-btn { + border-radius: 4px; +} \ No newline at end of file