From 4e4e05bacb4a324e89c0fe161fd9ef39faafbe34 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Sun, 24 Apr 2022 18:09:01 +0800 Subject: [PATCH 1/4] edit --- .../receipts-audit.component.html | 240 +++++++++--------- .../receipts-audit.component.less | 22 -- .../receipts-audit.component.ts | 145 +++++------ .../components/risk/risk.component.html | 113 ++++----- .../components/risk/risk.component.less | 13 - .../components/risk/risk.component.ts | 181 +++++-------- .../shared/components/search-drawer/index.ts | 3 + src/app/shared/index.ts | 1 + 8 files changed, 299 insertions(+), 419 deletions(-) create mode 100644 src/app/shared/components/search-drawer/index.ts 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..5a1ccecc 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 - + -
- +
+ +
+
+ + + +
- - - -
- -
-
- - - - -
-
- + --> - - - - - -
- - - {{ item.freightPrice | currency }} - - -
-
- -
-
- -
-
-
- -
-
- -
-
- -
-
-
- -
装 | {{ item?.loadingTime }}
-
卸 | {{ item?.unloadingTime }}
-
- -
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + item?.carNo : '' }}
-
- -
{{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }}
-
- - - {{ item.billCode }} - {{ item.billCode }} - {{ item.billCode }} -
- {{item?.billStatusLabel}} -
-
- {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? '':item?.serviceTypeLabel}} -
-
- -
{{ item?.goodsName }}
-
- {{ item?.weight ? item?.weight + '吨/' : '' }} - {{ item?.volume ? item?.volume + '方/' : '' }} - {{ item?.goodsNumber ? item?.goodsNumber + '件' : '' }} -
-
- -
-

- {{ data.expenseName }}:{{ data.price | currency }} - {{ data.paymentStatusLabel }} -

-
-
-
-
-
+ +
+ + + + + + +
- -
- - -
-
+
+ + + {{ item.freightPrice | currency }} + + +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+ +
装 | {{ item?.loadingTime }}
+
卸 | {{ item?.unloadingTime }}
+
+ +
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + + item?.carNo : '' }}
+
+ +
{{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }}
+
+ + + {{ + item.billCode }} + {{ + item.billCode }} + {{ + item.billCode }} +
+ {{item?.billStatusLabel}} +
+
+ {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? + '':item?.serviceTypeLabel}} +
+
+ +
{{ item?.goodsName }}
+
+ {{ item?.weight ? item?.weight + '吨/' : '' }} + {{ item?.volume ? item?.volume + '方/' : '' }} + {{ item?.goodsNumber ? item?.goodsNumber + '件' : '' }} +
+
+ +
+

+ {{ data.expenseName }}:{{ data.price | currency }} + {{ data.paymentStatusLabel }} +

+
+
+
+
+
+ + +
+ + + + +
    +
  • + 批量通过 +
  • +
  • + 批量生成电子单据 +
  • +
+
+
+
\ No newline at end of file diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.less b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.less index 3b21fa16..e69de29b 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.less +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.less @@ -1,22 +0,0 @@ - - :host { - p{ - margin-bottom: 0 - } - .left_btn { - width: 50px; - height: 32px; - padding-left: 8px; - line-height:32px; - background-color: #d7d7d7; - } - ::ng-deep { - .imgBox { - display: flex; - img { - width: 60px !important; - } - } - } - } - \ No newline at end of file diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index d8c217a8..31987466 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -8,25 +8,23 @@ import { OrderManagementService } from '../../services/order-management.service' import { UpdateFreightComponent } from '../../modal/bulk/update-freight/update-freight.component'; import { ConfirReceiptComponent } from '../../modal/bulk/confir-receipt/confir-receipt.component'; import { of } from 'rxjs'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { Router } from '@angular/router'; import { orderManagementVoucherViewComponent } from '../../modal/audit/voucher-view/voucher-view.component'; +import { BasicTableComponent } from 'src/app/routes/commom/components/basic-table/basic-table.component'; @Component({ selector: 'app-order-management-receipts-audit', templateUrl: './receipts-audit.component.html', - styleUrls: ['./receipts-audit.component.less'] + styleUrls: ['../../../commom/less/commom-table.less', './receipts-audit.component.less'] }) -export class OrderManagementReceiptsAuditComponent implements OnInit { - ui: SFUISchema = {}; +export class OrderManagementReceiptsAuditComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; auditMany = false; isVisibleView = false; isVisibleEvaluate = false; isVisible = false; - _$expand = false; @ViewChild('st') private readonly st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; columns: STColumn[] = []; @@ -41,8 +39,11 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { public service: OrderManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, - private router: Router - ) { } + private router: Router, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** * 查询参数 @@ -73,22 +74,22 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { if (this.sf) { Object.assign(requestOptions.body, { ...a, - ...params, - createTime: { - start: this.sf?.value?.createTime?.[0] || '', - end: this.sf?.value?.createTime?.[1] || '' - } + ...params, + createTime: { + start: this.sf?.value?.createTime?.[0] || '', + end: this.sf?.value?.createTime?.[1] || '' + } }); } this.loading = true; return requestOptions; }; afterRes = (data: any[], rawData?: any) => { - console.log(data) - this.loading = false + console.log(data); + this.loading = false; return data.map(item => ({ - ...item, - // disabled: item.billStatus !== '4' + ...item + // disabled: item.billStatus !== '4' })); }; get selectedRows() { @@ -105,7 +106,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { totalCount: 0 }; const params: any = Object.assign({}, this.reqParams || {}); - delete params.auditStatus + delete params.auditStatus; this.service.request(this.service.$api_get_getAuditStatistical, params).subscribe(res => { if (res) { let totalCount = 0; @@ -173,7 +174,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { _$expand: (value: boolean) => value }, onSearch: (q: any) => { - let str =q.replace(/^\s+|\s+$/g,""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -196,7 +197,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { placeholder: '请先选择货主', visibleIf: { _$expand: (value: boolean) => value - }, + } } as SFSelectWidgetSchema }, loadingPlace: { @@ -298,12 +299,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { loadingDocuments: { type: 'string', title: '装卸货凭证', - enum:[ - {label: '全部',value: ''}, - {label: '无装卸货凭证',value: '1'}, - {label: '装卸货凭证齐全',value: '2'}, - {label: '只有装货凭证',value: '3'}, - {label: '只有卸货凭证',value: '4'}, + enum: [ + { label: '全部', value: '' }, + { label: '无装卸货凭证', value: '1' }, + { label: '装卸货凭证齐全', value: '2' }, + { label: '只有装货凭证', value: '3' }, + { label: '只有卸货凭证', value: '4' } ], ui: { widget: 'select', @@ -311,13 +312,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { allowClear: true, visibleIf: { _$expand: (value: boolean) => value - }, + } } - }, + } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } /** @@ -397,27 +397,27 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { { text: '生成电子单据', click: _record => this.generate(_record, 2), - iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, - acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }, + iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, + acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] } }, { text: '通过', click: _record => this.sign(_record), - iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, - acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }, + iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, + acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] } }, { text: '修改', click: _record => this.modification(_record), - iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, - acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, + iif: item => !item?.loadingElectronicsLadingBillFilePath || !item?.unloadingElectronicsLadingBillFilePath, + acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] } }, { text: '查看凭证', click: _record => this.generate(_record, 3), iif: item => item?.loadingElectronicsLadingBillFilePath && item?.unloadingElectronicsLadingBillFilePath, - acl: { ability: ['ORDER-RECEIPTS-view'] }, - }, + acl: { ability: ['ORDER-RECEIPTS-view'] } + } ] } ]; @@ -428,32 +428,18 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - tabChange(item: any) { } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } + tabChange(item: any) {} /** * 导入货源 */ - importGoodsSource() { } - audit(item: any) { } + importGoodsSource() {} + audit(item: any) {} /** * 审核通过按钮 */ - handleOK() { } + handleOK() {} OpenPrice(item: any) { this.isVisible = true; } @@ -471,7 +457,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { }); modalRef.afterClose.subscribe((result: any) => { this.st.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); }); } // 生成电子单据 @@ -491,31 +477,31 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { nzFooter: null }); modalRef.afterClose.subscribe((result: any) => { - if(result) { + if (result) { this.st.load(); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical(); } }); } // 通过 sign(item?: any) { - let params: any = [] + let params: any = []; let text = ''; if (item === '1') { if (this.selectedRows.length <= 0) { - this.service.msgSrv.error('请选择订单!') - return + this.service.msgSrv.error('请选择订单!'); + return; } this.selectedRows.forEach(ite => { params.push(ite.id); }); - text = `已选择${this.selectedRows.length}条订单,确认批量通过审核吗?` + text = `已选择${this.selectedRows.length}条订单,确认批量通过审核吗?`; } else { - text = `确认通过审核吗?` + text = `确认通过审核吗?`; params.push(item.id); } - console.log(this.selectedRows) - console.log(params) + console.log(this.selectedRows); + console.log(params); this.modal.confirm({ nzTitle: text, nzContent: `通过后不可修改,可以再生成电子单据。`, @@ -535,8 +521,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { // 批量生成电子单据 sign1(item?: any) { if (this.selectedRows?.length <= 0) { - this.service.msgSrv.error('请选择订单!') - return + this.service.msgSrv.error('请选择订单!'); + return; } let params: any[] = []; this.selectedRows.forEach(item => { @@ -545,17 +531,16 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { this.modal.confirm({ nzTitle: `已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?`, nzContent: `确认后单据不可修改,请谨慎操作。`, - nzOnOk: () => - { - this.service.downloadFile(this.service.$api_createBillEsignGoods,params) - this.service.msgSrv.success('生成成功!'); - this.st?.reload() + nzOnOk: () => { + this.service.downloadFile(this.service.$api_createBillEsignGoods, params); + this.service.msgSrv.success('生成成功!'); + this.st?.reload(); // this.getGoodsSourceStatistical(); - } - }) + } + }); } - // 获取所属项目 - getRegionCode(regionCode: any) { + // 获取所属项目 + getRegionCode(regionCode: any) { console.log(regionCode); return this.service .request(this.service.$api_get_enterprise_project, { id: regionCode }) @@ -575,8 +560,8 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { // } }); } - // 导出 - exprot() { - this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList); - } + // 导出 + exprot() { + this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportExamineBillList); + } } diff --git a/src/app/routes/order-management/components/risk/risk.component.html b/src/app/routes/order-management/components/risk/risk.component.html index 6236f606..ca034454 100644 --- a/src/app/routes/order-management/components/risk/risk.component.html +++ b/src/app/routes/order-management/components/risk/risk.component.html @@ -9,61 +9,42 @@ * 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.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..1188e06e 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,7 +25,6 @@ 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; @@ -41,8 +39,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 +51,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 +60,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 +77,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 +147,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 +171,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 +183,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 +193,7 @@ export class OrderManagementRiskComponent implements OnInit { } else { return of([]); } - }, + } } as SFSelectWidgetSchema }, enterpriseInfoId: { @@ -233,11 +203,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 +213,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 +310,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 +382,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 +397,7 @@ export class OrderManagementRiskComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() { } + importGoodsSource() {} /* * 审核关闭弹窗 @@ -472,20 +415,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 +442,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 +452,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 +474,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 +488,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/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/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'; From b8415bbac53e84f87308c21522036d1e2190f7f5 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Sun, 24 Apr 2022 18:10:26 +0800 Subject: [PATCH 2/4] edit --- .../receipts-audit.component.html | 200 +++++++++--------- .../receipts-audit.component.less | 3 + 2 files changed, 102 insertions(+), 101 deletions(-) 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 5a1ccecc..74e950e6 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 @@ -28,110 +28,108 @@
--> - - -
- - - - - - -
+ +
+ + + + + + +
-
- - - {{ item.freightPrice | currency }} - - -
-
- -
-
- -
+
+ + + {{ item.freightPrice | currency }} + + +
+
+
- - -
-
- -
-
- - -
+
+
- - -
装 | {{ item?.loadingTime }}
-
卸 | {{ item?.unloadingTime }}
-
- -
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + - item?.carNo : '' }}
-
- -
{{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }}
-
- - - {{ - item.billCode }} - {{ - item.billCode }} - {{ - item.billCode }} -
- {{item?.billStatusLabel}} +
+
+ +
+
+
-
- {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? - '':item?.serviceTypeLabel}} +
+ +
- - -
{{ item?.goodsName }}
-
- {{ item?.weight ? item?.weight + '吨/' : '' }} - {{ item?.volume ? item?.volume + '方/' : '' }} - {{ item?.goodsNumber ? item?.goodsNumber + '件' : '' }} -
-
- -
-

- {{ data.expenseName }}:{{ data.price | currency }} - {{ data.paymentStatusLabel }} -

-
-
- -
- +
+
+ +
装 | {{ item?.loadingTime }}
+
卸 | {{ item?.unloadingTime }}
+
+ +
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + + item?.carNo : '' }}
+
+ +
{{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }}
+
+ + + {{ + item.billCode }} + {{ + item.billCode }} + {{ + item.billCode }} +
+ {{item?.billStatusLabel}} +
+
+ {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? + '':item?.serviceTypeLabel}} +
+
+ +
{{ item?.goodsName }}
+
+ {{ item?.weight ? item?.weight + '吨/' : '' }} + {{ item?.volume ? item?.volume + '方/' : '' }} + {{ item?.goodsNumber ? item?.goodsNumber + '件' : '' }} +
+
+ +
+

+ {{ data.expenseName }}:{{ data.price | currency }} + {{ data.paymentStatusLabel }} +

+
+
+ +
+ - -
- - - - -
    -
  • - 批量通过 -
  • -
  • - 批量生成电子单据 -
  • -
-
-
-
\ No newline at end of file + +
+ + + + +
    +
  • + 批量通过 +
  • +
  • + 批量生成电子单据 +
  • +
+
+
+
\ No newline at end of file diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.less b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.less index e69de29b..1c23dad0 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.less +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.less @@ -0,0 +1,3 @@ +p{ + margin-bottom: 0 +} \ No newline at end of file From 7b7a145e1f9ac44da0afcf1bcbca62e8edbb376b Mon Sep 17 00:00:00 2001 From: "xiaoxing.liu" Date: Mon, 25 Apr 2022 09:14:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/freight/list/detail/detail.component.html | 2 +- .../components/freight/list/detail/detail.component.ts | 2 +- .../usercenter/components/freight/list/list.component.html | 3 +++ .../usercenter/components/freight/list/list.component.ts | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index cfd71b20..5f8491e0 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -369,7 +369,7 @@ 合伙人信息 - {{partnerInfo.partnerEnterpriseName}} + {{partnerInfo.partnerContactName}} {{ item.contacter }}
/{{item.mobile}}
+ + {{ item.partnerName }}
/{{item.promotersTelephone}} +
{{ item.promotersTelephone || '添加' }} 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 f85f9951..162ddc2b 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -424,7 +424,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 }, From da615429bd960d2ee302e670751e3603e07f374f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Mon, 25 Apr 2022 09:33:42 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../withdraw-deposit/withdraw-deposit.component.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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');