From b0a7611ae4b7b1bb3a177ac9ebbe3598abcb031f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Wed, 9 Mar 2022 16:33:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2containsAllLable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-list/contract-list.component.ts | 136 +++--- .../contract-template.component.ts | 30 +- .../payment-order/payment-order.component.ts | 32 +- .../components/list/list.component.ts | 60 +-- .../components/bulk/bulk.component.ts | 76 +-- .../compliance-audit.component.ts | 214 ++++---- .../receipts-audit.component.ts | 34 +- .../components/risk/risk.component.ts | 62 +-- .../components/vehicle/vehicle.component.ts | 456 +++++++++--------- .../components/list/list.component.html | 14 +- .../components/list/list.component.ts | 72 +-- .../virtual-account-detail.component.html | 27 ++ .../virtual-account-detail.component.spec.ts | 24 + .../virtual-account-detail.component.ts | 174 +++++++ .../services/account-managemant.service.ts | 1 + .../routes/partner/partner-routing.module.ts | 4 +- src/app/routes/partner/partner.module.ts | 4 +- .../components/bulk/bulk.component.ts | 240 ++++----- .../release-publish.component.ts | 174 +++---- .../components/vehicle/vehicle.component.ts | 10 +- .../cancellation-invoice.component.ts | 12 +- .../components/audit/audit.component.ts | 36 +- .../vehicle/components/list/list.component.ts | 8 +- .../abnormal-appear.component.ts | 334 ++++++------- .../components/bulk/bulk.component.ts | 150 +++--- .../components/vehicle/vehicle.component.ts | 80 +-- .../dict-select/dict-select.component.ts | 4 +- .../dict-select/dict-select.widget.html | 2 +- 28 files changed, 1365 insertions(+), 1105 deletions(-) create mode 100644 src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html create mode 100644 src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.spec.ts create mode 100644 src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts diff --git a/src/app/routes/contract-management/components/contract-list/contract-list.component.ts b/src/app/routes/contract-management/components/contract-list/contract-list.component.ts index dd3947da..c9777ad6 100644 --- a/src/app/routes/contract-management/components/contract-list/contract-list.component.ts +++ b/src/app/routes/contract-management/components/contract-list/contract-list.component.ts @@ -27,17 +27,17 @@ export class ContractManagementContractListComponent implements OnInit { /** * 查询参数 */ - get reqParams() { + get reqParams() { const params = { ...this.sf?.value, } delete params.signTime; delete params._$expand; - if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { + if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { params.signTime = { start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), - } + } } return { ...params @@ -49,7 +49,7 @@ export class ContractManagementContractListComponent implements OnInit { private nzModalService: NzModalService, private router: Router, private datePipe: DatePipe, - ) {} + ) { } ngOnInit(): void { this.initST() @@ -58,7 +58,7 @@ export class ContractManagementContractListComponent implements OnInit { /** * 初始化数据列表 */ - initST() { + initST() { this.columns = [ { title: '合同编号', @@ -70,13 +70,13 @@ export class ContractManagementContractListComponent implements OnInit { title: '单据类型', width: '100px', className: 'text-center', - index:'documentType' + index: 'documentType' }, { title: '合同名称', width: '100px', className: 'text-center', - index:'contractName' + index: 'contractName' }, { title: '托运人', index: 'shipperName', width: '120px', className: 'text-center' }, { title: '承运人', index: 'carrierName', width: '120px', className: 'text-center' }, @@ -108,69 +108,69 @@ export class ContractManagementContractListComponent implements OnInit { '7': { text: '已拒签', color: 'warning' }, }, }, - + ]; } - /** - * 初始化查询表单 - */ - initSF() { - this.schema = { - properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, - contractCode: { - type: 'string', - title: '合同编号', - }, - businessCode: { - type: 'string', - title: '业务单号' - }, - shipperName: { - type: 'string', - title: '托运人' - }, - carrierName: { - type: 'string', - title: '承运人', - ui: { - visibleIf: { - _$expand: (value: boolean) => value, - }, - } - }, - documentType: { - title: '单据类型', - type: 'string', - default: '', - ui: { - widget: 'dict-select', - containsAllLable: true, - params: { dictKey: 'contract:document:type' }, - containAllLable:true, - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, - }, - signTime: { - title: '签署日期', - type: 'string', - ui: { - widget: 'custom', - visibleIf: { - _$expand: (value: boolean) => value, - }, - } - }, + /** +* 初始化查询表单 +*/ + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + contractCode: { + type: 'string', + title: '合同编号', }, - type: 'object', - }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; - } - /** - * 查询字段个数 - */ + businessCode: { + type: 'string', + title: '业务单号' + }, + shipperName: { + type: 'string', + title: '托运人' + }, + carrierName: { + type: 'string', + title: '承运人', + ui: { + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, + documentType: { + title: '单据类型', + type: 'string', + default: '', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'contract:document:type' }, + containAllLable: true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFSelectWidgetSchema, + }, + signTime: { + title: '签署日期', + type: 'string', + ui: { + widget: 'custom', + visibleIf: { + _$expand: (value: boolean) => value, + }, + } + }, + }, + type: 'object', + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + /** +* 查询字段个数 +*/ get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; } @@ -239,7 +239,7 @@ export class ContractManagementContractListComponent implements OnInit { /** * 伸缩查询条件 */ - expandToggle(): void { + expandToggle(): void { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } diff --git a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts index 3a28c9f8..416936b7 100644 --- a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts +++ b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts @@ -26,23 +26,23 @@ export class ContractManagementTemplateComponent implements OnInit { columns: STColumn[] = []; datass: any = [ { - one: '1', - two: '1', - three: '1', - id: 1 - }, + one: '1', + two: '1', + three: '1', + id: 1 + }, { - one: '2', - two: '2', - three: '2', - id: 2 - }, -]; + one: '2', + two: '2', + three: '2', + id: 2 + }, + ]; constructor( public service: ContractManagementService, private modal: NzModalService, private router: Router - ) { } + ) { } /** * 查询参数 @@ -80,7 +80,7 @@ export class ContractManagementTemplateComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'contract:template:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -178,7 +178,7 @@ export class ContractManagementTemplateComponent implements OnInit { } edit(value: any) { - this.router.navigate(['/contract-management/template/detail/' + value.id],{ + this.router.navigate(['/contract-management/template/detail/' + value.id], { queryParams: { status: 2 } @@ -195,7 +195,7 @@ export class ContractManagementTemplateComponent implements OnInit { window.history.go(-1) } view(value: any) { - this.router.navigate(['/contract-management/template/detail/' + value.id],{ + this.router.navigate(['/contract-management/template/detail/' + value.id], { queryParams: { status: 3 } diff --git a/src/app/routes/financial-management/components/payment-order/payment-order.component.ts b/src/app/routes/financial-management/components/payment-order/payment-order.component.ts index 95454878..179783d9 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order.component.ts +++ b/src/app/routes/financial-management/components/payment-order/payment-order.component.ts @@ -23,26 +23,26 @@ export class PaymentOrderComponent implements OnInit { _$expand = false; selectedRows: any[] = []; - constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} + constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) { } - ngOnInit(): void {} + ngOnInit(): void { } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { - let params = {...this.sf.value}; - if(params.payDate){ - const payDate = {start:this.sf?.value?.payDate?.[0],end:this.sf?.value?.payDate?.[1]} - params.payDate = payDate; + let params = { ...this.sf.value }; + if (params.payDate) { + const payDate = { start: this.sf?.value?.payDate?.[0], end: this.sf?.value?.payDate?.[1] } + params.payDate = payDate; } - if(params.payDate2){ - const payDate2 = {start:this.sf?.value?.payDate2?.[0],end:this.sf?.value?.payDate2?.[1]} - params.payDate2 = payDate2; + if (params.payDate2) { + const payDate2 = { start: this.sf?.value?.payDate2?.[0], end: this.sf?.value?.payDate2?.[1] } + params.payDate2 = payDate2; } - if(params.createTime){ - const createTime = {start:this.sf?.value?.createTime?.[0],end:this.sf?.value?.createTime?.[1]} - params.createTime = createTime; + if (params.createTime) { + const createTime = { start: this.sf?.value?.createTime?.[0], end: this.sf?.value?.createTime?.[1] } + params.createTime = createTime; } - Object.assign(requestOptions.body,params ); + Object.assign(requestOptions.body, params); } return requestOptions; }; @@ -113,7 +113,7 @@ export class PaymentOrderComponent implements OnInit { title: '付款状态', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'refund:apply:status' }, placeholder: '请选择' } @@ -123,7 +123,7 @@ export class PaymentOrderComponent implements OnInit { title: '付款类型', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'pay:type' }, placeholder: '请选择', visibleIf: { @@ -136,7 +136,7 @@ export class PaymentOrderComponent implements OnInit { title: '付款方式', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'pay:mode' }, placeholder: '请选择', visibleIf: { diff --git a/src/app/routes/insurance-management/components/list/list.component.ts b/src/app/routes/insurance-management/components/list/list.component.ts index 7cc54aaa..8f2522e5 100644 --- a/src/app/routes/insurance-management/components/list/list.component.ts +++ b/src/app/routes/insurance-management/components/list/list.component.ts @@ -64,7 +64,7 @@ export class insuranceManagementListComponent implements OnInit { public shipperservice: ShipperBaseService, private router: Router, private modale: ModalHelper, - ) {} + ) { } /** * 查询参数 @@ -176,7 +176,7 @@ export class insuranceManagementListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'insure:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -238,7 +238,7 @@ export class insuranceManagementListComponent implements OnInit { }, } as SFSelectWidgetSchema }, - + driverName: { title: '承运司机', type: 'string', @@ -263,7 +263,7 @@ export class insuranceManagementListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'insure:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -321,33 +321,33 @@ export class insuranceManagementListComponent implements OnInit { } } as SFDateWidgetSchema }, - + }, type: 'object' }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) - ) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); - } + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 初始化数据列表 */ @@ -501,7 +501,7 @@ export class insuranceManagementListComponent implements OnInit { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } - tabChange(item: any) {} + tabChange(item: any) { } /** * 重置表单 */ @@ -541,8 +541,8 @@ export class insuranceManagementListComponent implements OnInit { } }); } - // 保险配置 - changeOrder() { - this.router.navigate(['/insurance-management/list-set', 1]); - } + // 保险配置 + changeOrder() { + this.router.navigate(['/insurance-management/list-set', 1]); + } } 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 734c6771..917aa662 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -72,7 +72,7 @@ export class OrderManagementBulkComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router - ) {} + ) { } /** * 查询参数 @@ -257,7 +257,7 @@ export class OrderManagementBulkComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -312,7 +312,7 @@ export class OrderManagementBulkComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -323,7 +323,7 @@ export class OrderManagementBulkComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, containAllLable: true, visibleIf: { @@ -372,27 +372,27 @@ export class OrderManagementBulkComponent implements OnInit { }; this.uiView = { '*': { spanLabelFixed: 80, grid: { span: 12, gutter: 4 } } }; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) - ) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); - } + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 初始化数据列表 */ @@ -510,7 +510,7 @@ export class OrderManagementBulkComponent implements OnInit { 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'] }, + acl: { ability: ['ORDER-BULK-signBulkOrder'] }, }, { text: '申请退款 ', @@ -605,7 +605,7 @@ export class OrderManagementBulkComponent implements OnInit { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } - tabChange(item: any) {} + tabChange(item: any) { } /** * 重置表单 */ @@ -617,8 +617,8 @@ export class OrderManagementBulkComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} - audit(item: any) {} + importGoodsSource() { } + audit(item: any) { } /* * 审核关闭弹窗 @@ -639,7 +639,7 @@ export class OrderManagementBulkComponent implements OnInit { /** * 审核通过按钮 */ - handleOK() {} + handleOK() { } OpenPrice(item: any) { this.changeId = item.id; this.isVisible = true; @@ -692,10 +692,10 @@ export class OrderManagementBulkComponent implements OnInit { nzFooter: null }); modal.afterClose.subscribe((res: any) => { - if(res) { - this.st.reload(1); - this.getGoodsSourceStatistical(); - } + if (res) { + this.st.reload(1); + this.getGoodsSourceStatistical(); + } }); } }); @@ -772,10 +772,10 @@ export class OrderManagementBulkComponent implements OnInit { changeOrder(value: any) { this.router.navigate(['order-management/bulk-detailChange', value.id]); } - /** - *申请退款 - */ - applyRefund(item: any) { + /** +*申请退款 +*/ + applyRefund(item: any) { const modalRef = this.modal.create({ nzTitle: '申请退款', nzContent: OneCarOrderCancelConfirmComponent, @@ -786,7 +786,7 @@ export class OrderManagementBulkComponent implements OnInit { nzFooter: null }); modalRef.afterClose.subscribe((res: boolean) => { - if(res) { + if (res) { this.resetSF; this.st.load(); } 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 d6e0fa51..d890942d 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 @@ -51,7 +51,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router - ) {} + ) { } /** * 查询参数 @@ -232,7 +232,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -258,7 +258,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -282,27 +282,27 @@ export class OrderManagementComplianceAuditComponent implements OnInit { }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) - ) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); - } + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 初始化数据列表 */ @@ -428,7 +428,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { className: 'text-center', index: 'applyUserName' }, - { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, + { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, { title: '操作', fixed: 'right', @@ -441,7 +441,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { { text: '撤销', click: (_record) => this.revoke(_record), - iif: item => item.handleStatus === '1' || item.handleStatus === 1, + iif: item => item.handleStatus === '1' || item.handleStatus === 1, }, ], }, @@ -462,16 +462,20 @@ export class OrderManagementComplianceAuditComponent implements OnInit { index: 'amountAfterChange', render: 'amountAfterChange' }, - { title: '变更值', + { + title: '变更值', index: 'amountchangeValue', render: 'amountchangeValue', width: '120px', - className: 'text-center' }, - { title: '变更后', + className: 'text-center' + }, + { + title: '变更后', index: 'amountBeforeChange', render: 'amountBeforeChange', width: '120px', - className: 'text-center' } + className: 'text-center' + } ]; } /** @@ -480,30 +484,30 @@ export class OrderManagementComplianceAuditComponent implements OnInit { get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; } - /** - * 浮动费用查看 - */ - FloatView(item: any) { - console.log(item) - this.changeViewId = item.id; - this.service.request(this.service.$api_getChangeRecordWholeDetail, {id: this.changeViewId}).subscribe((res) => { - this.ViewCause = res; + /** +* 浮动费用查看 +*/ + FloatView(item: any) { + console.log(item) + this.changeViewId = item.id; + this.service.request(this.service.$api_getChangeRecordWholeDetail, { id: this.changeViewId }).subscribe((res) => { + this.ViewCause = res; + }) + 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) + if (res) { + this.service.msgSrv.success('撤销成功!') + this.stFloat.reload() + } }) - 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) - if(res) { - this.service.msgSrv.success('撤销成功!') - this.stFloat.reload() - } - }) - }); - } + }); + } /** * 伸缩查询条件 */ @@ -511,7 +515,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } - tabChange(item: any) {} + tabChange(item: any) { } /** * 重置表单 */ @@ -523,7 +527,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} + importGoodsSource() { } OpenPrice(item: any) { this.changeId = item.id; this.isVisible = true; @@ -580,24 +584,24 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } }; } - /* - * 审核关闭弹窗 - */ - handleCancel(value?: string) { - if(value === '0') { - this.isVisible = false; - } else if(value === '1') { - this.isVisibleRE = false; - } else if(value === '2') { - this.isVisibleView = false; - } + /* + * 审核关闭弹窗 + */ + handleCancel(value?: string) { + if (value === '0') { + this.isVisible = false; + } else if (value === '1') { + this.isVisibleRE = false; + } else if (value === '2') { + this.isVisibleView = false; } - /** - * 审核通过按钮 - */ + } + /** +* 审核通过按钮 +*/ handleOK() { let idList: any[] = []; - if(this.selectedRows.length > 0) { + if (this.selectedRows.length > 0) { this.selectedRows.forEach(item => { idList.push(item.id); }); @@ -614,55 +618,55 @@ export class OrderManagementComplianceAuditComponent implements OnInit { 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('备注不能为空!'); - return; - } - let idList: any[] = []; - if(this.selectedRows.length > 0) { - this.selectedRows.forEach(item => { - idList.push(item.id); - }); - } else { - idList.push(this.sfView.value.billCode) - } - const parms = { - ids: idList, - complianceRemark: this.sfView.value.complianceRemark, - 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() - } - }); + /** + * 审核拒绝按钮 + */ + reject() { + if (!this.sfView.value.complianceRemark) { + this.service.msgSrv.error('备注不能为空!'); + return; } - /** - *合规抽查 - */ + let idList: any[] = []; + if (this.selectedRows.length > 0) { + this.selectedRows.forEach(item => { + idList.push(item.id); + }); + } else { + idList.push(this.sfView.value.billCode) + } + const parms = { + ids: idList, + complianceRemark: this.sfView.value.complianceRemark, + 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() + } + }); + } + /** +*合规抽查 +*/ audit(item?: any) { if (item) { this.isVisibleRE = true; this.auditId = item.id; this.initSTAudit(1); } else { - if(this.selectedRows.length <= 0) { + if (this.selectedRows.length <= 0) { this.service.msgSrv.error('请选择订单!') return; } else { - this.isVisibleRE = true; - this.initSTAudit(2); + this.isVisibleRE = true; + this.initSTAudit(2); } } } 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 bdce2344..a32f28c6 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 @@ -41,7 +41,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router - ) {} + ) { } /** * 查询参数 @@ -207,7 +207,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -233,7 +233,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -244,7 +244,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, containAllLable: true, visibleIf: { @@ -347,7 +347,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { { text: '修改    ', click: _record => this.modification(_record), - iif: item => item.auditStatus == '1' , + iif: item => item.auditStatus == '1', acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, }, { @@ -373,7 +373,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { this._$expand = !this._$expand; this.sf?.setValue('/_$expand', this._$expand); } - tabChange(item: any) {} + tabChange(item: any) { } /** * 重置表单 */ @@ -385,13 +385,13 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} - audit(item: any) {} + importGoodsSource() { } + audit(item: any) { } /** * 审核通过按钮 */ - handleOK() {} + handleOK() { } OpenPrice(item: any) { this.isVisible = true; } @@ -410,12 +410,12 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { modalRef.afterClose.subscribe((result: any) => { this.st.load(1); this.getGoodsSourceStatistical() - }); + }); } // 生成电子单据 generate(item: any, sts?: number) { let text = '查看凭证'; - if(sts == 2) { + if (sts == 2) { text = '生成电子单据'; } const modalRef = this.modal.create({ @@ -431,23 +431,23 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { modalRef.afterClose.subscribe((result: any) => { this.st.load(1); this.getGoodsSourceStatistical() - }); + }); } // 通过 sign(item?: any) { let params: any = [] let text = ''; - if(item === '1') { - if(this.selectedRows.length <= 0) { + if (item === '1') { + if (this.selectedRows.length <= 0) { 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) @@ -470,7 +470,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { } // 批量生成电子单据 sign1(item?: any) { - if(this.selectedRows.length <= 0) { + if (this.selectedRows.length <= 0) { this.service.msgSrv.error('请选择订单!') return } 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 541c4424..b08f0a3d 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -40,34 +40,34 @@ export class OrderManagementRiskComponent implements OnInit { public shipperservice: ShipperBaseService, private modal: NzModalService, public router: Router - ) {} + ) { } /** * 查询参数 */ - get reqParams() { + get reqParams() { // const a:any = {}; // if(this.resourceStatus) { - // a.representationsStatus = this.resourceStatus + // a.representationsStatus = this.resourceStatus // } // return { // ...a, // ...this.sf?.value, // }; - const a:any = {}; - if(this.resourceStatus) { - a.representationsStatus = this.resourceStatus + const a: any = {}; + if (this.resourceStatus) { + a.representationsStatus = this.resourceStatus } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '', }, - }; + }; } search() { this.st?.load(1); @@ -84,17 +84,17 @@ export class OrderManagementRiskComponent implements OnInit { getGoodsSourceStatistical() { this.service.request(this.service.$api_get_listStatisticalStatus, this.reqParams).subscribe(res => { if (res) { - res.forEach((element: any) => { - if(element.representationsStatusLabel === '待申述') { - this.tabs.stayQuantity = element.quantity - } else if (element.representationsStatusLabel === '申诉失败') { - this.tabs.receivedQuantity = element.quantity - } else if (element.representationsStatusLabel === '申述成功') { - this.tabs.cancelQuantity = element.quantity - } else if (element.representationsStatusLabel === '申诉中') { - this.tabs.underwayQuantity = element.quantity - } - }); + res.forEach((element: any) => { + if (element.representationsStatusLabel === '待申述') { + this.tabs.stayQuantity = element.quantity + } else if (element.representationsStatusLabel === '申诉失败') { + this.tabs.receivedQuantity = element.quantity + } else if (element.representationsStatusLabel === '申述成功') { + this.tabs.cancelQuantity = element.quantity + } else if (element.representationsStatusLabel === '申诉中') { + this.tabs.underwayQuantity = element.quantity + } + }); } }) } @@ -168,7 +168,7 @@ export class OrderManagementRiskComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'freight:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -180,7 +180,7 @@ export class OrderManagementRiskComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'BulkFreightUnitPriceType' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -307,7 +307,7 @@ export class OrderManagementRiskComponent implements OnInit { { text: '审核', click: _record => this.audit(_record), - iif: item => item.representationsStatus == '1' || item.representationsStatus == '2' , + iif: item => item.representationsStatus == '1' || item.representationsStatus == '2', acl: { ability: ['ORDER-RISK-audit'] }, }, { @@ -405,7 +405,7 @@ export class OrderManagementRiskComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} + importGoodsSource() { } /* * 审核关闭弹窗 @@ -418,7 +418,7 @@ export class OrderManagementRiskComponent implements OnInit { */ handleOK() { let idList: any[] = []; - if(this.selectedRows.length > 0) { + if (this.selectedRows.length > 0) { this.selectedRows.forEach(item => { idList.push(item.id); }); @@ -435,7 +435,7 @@ export class OrderManagementRiskComponent implements OnInit { this.service.msgSrv.success('审核通过成功!'); this.isVisibleRE = false; this.st?.load(1); - this.getGoodsSourceStatistical() + this.getGoodsSourceStatistical() } }); } @@ -444,14 +444,14 @@ export class OrderManagementRiskComponent implements OnInit { */ reject() { let idList: any[] = []; - if(this.selectedRows.length > 0) { + if (this.selectedRows.length > 0) { this.selectedRows.forEach(item => { idList.push(item.id); }); } else { idList.push(this.sfView.value.billCode) } - if(!this.sfView.value.representationsCause) { + if (!this.sfView.value.representationsCause) { this.service.msgSrv.error('拒绝原因为空!'); return; } @@ -476,14 +476,14 @@ export class OrderManagementRiskComponent implements OnInit { if (item) { this.auditId = item.id; this.initSTAudit(1); - this.isVisibleRE = true; + this.isVisibleRE = true; } else { - if(this.selectedRows.length <= 0) { + if (this.selectedRows.length <= 0) { this.service.msgSrv.error('请选择订单!') return; } else { - this.initSTAudit(2); - this.isVisibleRE = true; + this.initSTAudit(2); + this.isVisibleRE = true; } } } diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 09e49f8c..b942ed34 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -43,34 +43,34 @@ export class OrderManagementVehicleComponent implements OnInit { columnsFloatView: STColumn[] = []; datass: any = [ { - one: '1', - two: '1', - three: '1', - id: 1 - }, + one: '1', + two: '1', + three: '1', + id: 1 + }, { - one: '2', - two: '2', - three: '2', - id: 2 - }, -]; -tabs = { - cancelQuantity: 0, - receivedQuantity: 0, - stayQuantity: 0, - signQuantity: 0, - compolatelQuantity: 0, - GoingQuantity: 0, - totalCount: 0 -}; -resourceStatus: any; + one: '2', + two: '2', + three: '2', + id: 2 + }, + ]; + tabs = { + cancelQuantity: 0, + receivedQuantity: 0, + stayQuantity: 0, + signQuantity: 0, + compolatelQuantity: 0, + GoingQuantity: 0, + totalCount: 0 + }; + resourceStatus: any; constructor( public service: OrderManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, public router: Router, - ) { } + ) { } /** * 查询参数 @@ -86,20 +86,20 @@ resourceStatus: any; }; } get reqParams() { - const a:any = {}; - if(this.resourceStatus) { + const a: any = {}; + if (this.resourceStatus) { a.billStatus = this.resourceStatus; - } + } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '', }, - }; + }; } get selectedRows() { return this.st?.list.filter((item) => item.checked) || []; @@ -112,8 +112,8 @@ resourceStatus: any; this.initSTFloatView(); } search() { - this.st?.load(1); - this.getGoodsSourceStatistical() + this.st?.load(1); + this.getGoodsSourceStatistical() } getGoodsSourceStatistical() { this.tabs = { @@ -127,26 +127,26 @@ resourceStatus: any; }; const params: any = Object.assign({}, this.reqParams || {}); delete params.billStatus - this.service.request(this.service.$api_statisticalStatus,params).subscribe(res => { + this.service.request(this.service.$api_statisticalStatus, params).subscribe(res => { if (res) { let totalCount = 0; - res.forEach((element: any) => { - if(element.billStatusLabel === '待发车') { - this.tabs.stayQuantity = element.quantity - } else if (element.billStatusLabel === '待接单') { - this.tabs.receivedQuantity = element.quantity - } else if (element.billStatusLabel === '运输中') { - this.tabs.GoingQuantity = element.quantity - } else if (element.billStatusLabel === '待签收') { - this.tabs.signQuantity = element.quantity - } else if (element.billStatusLabel === '已完成') { - this.tabs.compolatelQuantity = element.quantity - } else if (element.billStatusLabel === '已取消') { - this.tabs.cancelQuantity = element.quantity - } - totalCount += element.quantity - }); - this.tabs.totalCount = totalCount + res.forEach((element: any) => { + if (element.billStatusLabel === '待发车') { + this.tabs.stayQuantity = element.quantity + } else if (element.billStatusLabel === '待接单') { + this.tabs.receivedQuantity = element.quantity + } else if (element.billStatusLabel === '运输中') { + this.tabs.GoingQuantity = element.quantity + } else if (element.billStatusLabel === '待签收') { + this.tabs.signQuantity = element.quantity + } else if (element.billStatusLabel === '已完成') { + this.tabs.compolatelQuantity = element.quantity + } else if (element.billStatusLabel === '已取消') { + this.tabs.cancelQuantity = element.quantity + } + totalCount += element.quantity + }); + this.tabs.totalCount = totalCount } }) } @@ -154,14 +154,14 @@ resourceStatus: any; /** * 初始化查询表单 */ - initSF() { + initSF() { this.schema = { properties: { _$expand: { type: 'boolean', ui: { hidden: true } }, billCode: { type: 'string', title: '订单号' - + }, resourceCode: { type: 'string', @@ -179,7 +179,7 @@ resourceStatus: any; onSearch: (q: any) => { if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -247,14 +247,14 @@ resourceStatus: any; _$expand: (value: boolean) => value, }, } - }, + }, paymentStatus: { title: '支付状态', type: 'string', ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -328,7 +328,7 @@ resourceStatus: any; ui: { widget: 'dict-select', params: { dictKey: 'service:type' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -345,7 +345,7 @@ resourceStatus: any; */ initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '订单号', width: '200px', @@ -411,11 +411,11 @@ resourceStatus: any; width: '120px', className: 'text-left', buttons: [ - + { text: '运费变更记录', click: (_record) => this.OpenPrice(_record), - iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6', + iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '6', acl: { ability: ['ORDER-VEHICLE-ChangeApplyList'] }, }, { @@ -460,7 +460,7 @@ resourceStatus: any; iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', // acl: { ability: ['VEHICLE-LIST-view'] }, }, - + ], }, ]; @@ -482,7 +482,7 @@ resourceStatus: any; className: 'text-center', index: 'applyUserName' }, - { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, + { title: '状态', index: 'handleStatusLabel', className: 'text-center' }, { title: '操作', fixed: 'right', @@ -495,7 +495,7 @@ resourceStatus: any; { text: '撤销', click: (_record) => this.revoke(_record), - iif: item => item.handleStatus === '1' || item.handleStatus === 1, + iif: item => item.handleStatus === '1' || item.handleStatus === 1, }, ], }, @@ -516,39 +516,43 @@ resourceStatus: any; index: 'amountAfterChange', render: 'amountAfterChange' }, - { title: '变更值', + { + title: '变更值', index: 'amountchangeValue', render: 'amountchangeValue', width: '120px', - className: 'text-center' }, - { title: '变更后', + className: 'text-center' + }, + { + title: '变更后', index: 'amountBeforeChange', render: 'amountBeforeChange', width: '120px', - className: 'text-center' } + className: 'text-center' + } ]; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) + ) ) - ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); -} + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 查询字段个数 */ @@ -588,19 +592,19 @@ resourceStatus: any; audit(item: any) { } - /* - * 审核关闭弹窗 - view: 1 - 浮动费用: 0 - 查看评价: 3 - */ + /* + * 审核关闭弹窗 + view: 1 + 浮动费用: 0 + 查看评价: 3 + */ handleCancel(type: string) { console.log(type) - if(type === '0') { + if (type === '0') { this.isVisible = false - } else if(type === '1') { + } else if (type === '1') { this.isVisibleView = false - } else if(type === '2') { + } else if (type === '2') { this.isVisibleEvaluate = false } } @@ -608,20 +612,20 @@ resourceStatus: any; this.changeId = value.id; this.isVisible = true } - /** - * 浮动费用查看 - */ + /** + * 浮动费用查看 + */ FloatView(item: any) { 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 } - /** - *查看评价 - */ + /** + *查看评价 + */ viewEvaluate(item: any) { console.log(item) this.isVisibleEvaluate = true @@ -643,22 +647,22 @@ resourceStatus: any; this.diverList = res.evaluateInfos }); } - /** - *变更运费 - */ - updateFreight(item: any) { - console.log(item?.isFreightChangeApplication) + /** +*变更运费 +*/ + updateFreight(item: any) { + console.log(item?.isFreightChangeApplication) this.service.request(this.service.$api_get_getFreightChangeWholeDetail, { id: item.id }).subscribe(data => { if (data) { const modal = this.modal.create({ nzTitle: '变更运费', nzWidth: 580, nzContent: VehicleUpdateFreightComponent, - nzComponentParams: { data: { ...data, id: item.id,isFreightChangeApplication: item?.isFreightChangeApplication } }, + nzComponentParams: { data: { ...data, id: item.id, isFreightChangeApplication: item?.isFreightChangeApplication } }, nzFooter: null, }); - modal.afterClose.subscribe((res: Boolean) => { - if(res) { + modal.afterClose.subscribe((res: Boolean) => { + if (res) { this.st.load(); this.getGoodsSourceStatistical() } @@ -669,33 +673,33 @@ resourceStatus: any; /** *修改附加费率 */ - modifyRate() { + modifyRate() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); }); - if(params.length === 0) { + if (params.length === 0) { this.service.msgSrv.error('请先选择订单!') return } - const modal = this.modal.create({ - nzTitle: '修改附加费率', - nzWidth: 600, - nzContent: VehicleModifyRateComponent, - nzComponentParams: { data: { ids: params } }, - nzFooter: null, - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改附加费率', + nzWidth: 600, + nzContent: VehicleModifyRateComponent, + nzComponentParams: { data: { ids: params } }, + nzFooter: null, + }); + modal.afterClose.subscribe((result) => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical() + } + }); } - /** - *修改网络货运人 - */ - modifyFreightPeople() { + /** +*修改网络货运人 +*/ + modifyFreightPeople() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); @@ -704,73 +708,73 @@ resourceStatus: any; this.selectedRows.forEach(item => { params2.push(item.enterpriseInfoId); }); - if(params.length === 0) { + if (params.length === 0) { this.service.msgSrv.error('请先选择订单!') return } - const modal = this.modal.create({ - nzTitle: '修改网络货运人', - nzWidth: 600, - nzContent: VehicleFreightPeopleComponent, - nzComponentParams: { data: { ids: params, enterpriseInfoIds: params2, } }, - nzFooter: null, - // nzOnOk: sin => { - // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('变更运费成功'); - // modal.destroy(); - // this.st.reload(); - // } - // }); - // return false; - // } - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改网络货运人', + nzWidth: 600, + nzContent: VehicleFreightPeopleComponent, + nzComponentParams: { data: { ids: params, enterpriseInfoIds: params2, } }, + nzFooter: null, + // nzOnOk: sin => { + // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('变更运费成功'); + // modal.destroy(); + // this.st.reload(); + // } + // }); + // return false; + // } + }); + modal.afterClose.subscribe((result) => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical() + } + }); } - /** - *修改网络货运人 - */ - modifycaptain() { + /** +*修改网络货运人 +*/ + modifycaptain() { let params: any[] = []; this.selectedRows.forEach(item => { params.push(item.id); }); - if(params.length === 0) { + if (params.length === 0) { this.service.msgSrv.error('请先选择订单!') return } - const modal = this.modal.create({ - nzTitle: '修改车队长', - nzWidth: 900, - nzContent: VehicleModifyCaptainComponent, - nzComponentParams: { data: { ids: params, } }, - nzFooter: null, - // nzOnOk: sin => { - // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('变更运费成功'); - // modal.destroy(); - // this.st.reload(); - // } - // }); - // return false; - // } - }); - modal.afterClose.subscribe((result) => { - if (result) { - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); + const modal = this.modal.create({ + nzTitle: '修改车队长', + nzWidth: 900, + nzContent: VehicleModifyCaptainComponent, + nzComponentParams: { data: { ids: params, } }, + nzFooter: null, + // nzOnOk: sin => { + // this.service.request(this.service.$api_change_bulk, { billId: item.id, ...sin.sf.value }).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('变更运费成功'); + // modal.destroy(); + // this.st.reload(); + // } + // }); + // return false; + // } + }); + modal.afterClose.subscribe((result) => { + if (result) { + this.st.load(1); + this.getGoodsSourceStatistical() + } + }); } - + // *确认签收 - + confirmReceipt(item: any) { const modalRef = this.modal.create({ nzTitle: '确认签收', @@ -783,61 +787,61 @@ resourceStatus: any; nzFooter: null }); } - revoke(item: any) { - this.modal.confirm({ - nzTitle: '是否确定立即撤销费用变更!', - nzOnOk: () => - this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id}).subscribe((res) => { + revoke(item: any) { + this.modal.confirm({ + nzTitle: '是否确定立即撤销费用变更!', + nzOnOk: () => + this.service.request(this.service.$api_get_revokeChangeRecord, { id: item.id }).subscribe((res) => { console.log(res) - if(res) { + if (res) { this.service.msgSrv.success('撤销成功!') this.stFloat.reload() } }) - }); + }); + } + // 取消订单 + cancellation(item: any) { + // api_get_cancelAnOrder + this.modal.confirm({ + nzTitle: '确定取消该订单吗?', + nzContent: `取消后无法恢复,请确认`, + nzOnOk: () => + this.service.request(this.service.$api_get_cancelAnOrder, { id: item.id }).subscribe((res) => { + if (res === true) { + this.service.msgSrv.success('操作成功!'); + this.st.load(1); + this.getGoodsSourceStatistical() + this.initST(); + } + }), + }) + } + userAction() { + let params: any[] = []; + this.selectedRows.forEach(item => { + params.push(item.id); + }); + if (params.length === 0) { + this.service.msgSrv.error('请先选择订单!') + return } - // 取消订单 - cancellation(item: any) { - // api_get_cancelAnOrder - this.modal.confirm({ - nzTitle: '确定取消该订单吗?', - nzContent: `取消后无法恢复,请确认`, - nzOnOk: () => - this.service.request(this.service.$api_get_cancelAnOrder, {id: item.id}).subscribe((res) => { - if (res === true) { - this.service.msgSrv.success('操作成功!'); - this.st.load(1); - this.getGoodsSourceStatistical() - this.initST(); - } - }), - }) - } - userAction() { - let params: any[] = []; - this.selectedRows.forEach(item => { - params.push(item.id); - }); - if(params.length === 0) { - this.service.msgSrv.error('请先选择订单!') - return + this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => { + if (res) { + console.log(res); + this.st.load(1); + this.getGoodsSourceStatistical() } - this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => { - if (res) { - console.log(res); - this.st.load(1); - this.getGoodsSourceStatistical() - } - }); - } - // 修改订单 + }); + } + // 修改订单 changeOrder(value: any) { this.router.navigate(['order-management/vehicle-detailChange', value.id]); } - /** - *申请退款 - */ - applyRefund(item: any) { + /** + *申请退款 + */ + applyRefund(item: any) { const modalRef = this.modal.create({ nzTitle: '申请退款', nzContent: OneCarOrderCancelConfirmComponent, @@ -848,7 +852,7 @@ resourceStatus: any; nzFooter: null }); modalRef.afterClose.subscribe((res: boolean) => { - if(res) { + if (res) { this.resetSF; this.st.load(); } diff --git a/src/app/routes/partner/account-management/components/list/list.component.html b/src/app/routes/partner/account-management/components/list/list.component.html index eff67eb6..a32db2ca 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.html +++ b/src/app/routes/partner/account-management/components/list/list.component.html @@ -1,5 +1,11 @@ - + + @@ -8,7 +14,7 @@ -
{{item.yskmoney | currency:' '}}
- -
{{item.armoney | currency:' '}}
-
+
diff --git a/src/app/routes/partner/account-management/components/list/list.component.ts b/src/app/routes/partner/account-management/components/list/list.component.ts index e072fc3c..d49477c8 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.ts +++ b/src/app/routes/partner/account-management/components/list/list.component.ts @@ -2,7 +2,10 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; +import { NzModalService } from 'ng-zorro-antd/modal'; import { BussinessStatisticsService } from '../../../business-statistics/services/bussiness-statistics.service'; +import { AccountManagemantService } from '../../services/account-managemant.service'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from '../virtual-account-detail/virtual-account-detail.component'; @Component({ selector: 'app-partner-list', @@ -16,7 +19,7 @@ export class PartnerAccountManagementListComponent implements OnInit { @ViewChild('sf') private readonly sf!: SFComponent; columns: STColumn[] = []; - constructor(public service: BussinessStatisticsService) { } + constructor(public service: AccountManagemantService, public modal: NzModalService) { } /** * 查询参数 */ @@ -41,45 +44,36 @@ export class PartnerAccountManagementListComponent implements OnInit { }, }, abnormalCause1: { - title: '类型', + title: '手机号', type: 'string', - default: '', - enum: [ - { - label: '全部', - value: '' - }, - { - label: '个人', - value: '1' - }, - { - label: '企业', - value: '2' - } - ], ui: { - widget: 'select' + placeholder: '请输入', }, }, } } - this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } }; + this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 12 } }, }; } /** * 初始化数据列表 */ initST() { this.columns = [ - { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 }, - { title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 }, - { title: '注册时间', index: 'carNo', className: 'text-center', width: 150 }, - { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, - { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, - { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 }, - { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 }, - { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 }, - { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 }, + { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 300 }, + { title: '手机号', render: 'carModelLabel', className: 'text-center', width: 200 }, + { title: '账户总额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 200 }, + { title: '待入账余额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 200 }, + { title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 250 }, + { title: '虚拟账户', index: 'approvalStatus4', className: 'text-center', width: 200 }, + { + title: '操作', + buttons: [ + { + text: '虚拟账户明细', + click: (_record) => this.viewVirtual(_record) + } + ] + } ]; } @@ -90,6 +84,28 @@ export class PartnerAccountManagementListComponent implements OnInit { }) } + /** + * + * @param _record 当前行信息 + */ + viewVirtual(_record: any) { + + const modalRef = this.modal.create({ + nzTitle: '虚拟账户明细', + nzContent: PartnerAccountManagementVirtualAccountDetailComponent, + nzComponentParams: { + id: _record?.id + }, + nzWidth: '85%', + nzFooter: null + }); + modalRef.afterClose.subscribe(result => { + }); + } + + /** + * + */ export() { } diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html new file mode 100644 index 00000000..649ddc1c --- /dev/null +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.html @@ -0,0 +1,27 @@ + +
+
+ +
+
+ + + + +
+
+
+ +
+
+ diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.spec.ts b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.spec.ts new file mode 100644 index 00000000..9a7da573 --- /dev/null +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from './virtual-account-detail.component'; + +describe('PartnerAccountManagementVirtualAccountDetailComponent', () => { + let component: PartnerAccountManagementVirtualAccountDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [PartnerAccountManagementVirtualAccountDetailComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerAccountManagementVirtualAccountDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts new file mode 100644 index 00000000..efd4933f --- /dev/null +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts @@ -0,0 +1,174 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { ShipperBaseService } from 'src/app/shared/services/business/shipper-base.service'; +import { AccountManagemantService } from '../../services/account-managemant.service'; + +@Component({ + selector: 'app-partner-virtual-account-detail', + templateUrl: './virtual-account-detail.component.html', +}) +export class PartnerAccountManagementVirtualAccountDetailComponent implements OnInit { + url = `/user`; + schema!: SFSchema; + ui!: SFUISchema; + @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; + columns: STColumn[] = []; + id = ''; + _$expand = false; + + constructor(public shipperservice: ShipperBaseService, public amService: AccountManagemantService, private modalRef: NzModalRef) { } + + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit(): void { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { + type: 'boolean', ui: { hidden: true } + }, + abnormalCause: { + title: '合伙人名称', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '手机号', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause2: { + title: '网络货运人', + type: 'string', + default: '', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder({}, true) + } + + }, + bankType: { + type: 'string', + title: '银行类型', + default: '', + ui: { + widget: 'dict-select', + params: { + dictKey: 'bankname:type' + }, + placeholder: '请选择', + allowClear: true, + containsAllLabel: true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + }, + }, + abnormalCause3: { + title: '虚拟账户', + type: 'string', + ui: { + placeholder: '请输入', + visibleIf: { + _$expand: (value: boolean) => value + }, + }, + }, + createTime: { + type: 'string', + title: '创建时间', + ui: { + widget: 'sl-from-to', + type: 'date', + autoComplete: 'off', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value + }, + } as SFDateWidgetSchema, + }, + } + } + this.ui = { '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } }, }; + } + + /** +* 初始化数据列表 +*/ + initST() { + this.columns = [ + { title: '合伙人', index: 'carNo', className: 'text-center', width: 200 }, + { title: '手机号', render: 'carModelLabel', className: 'text-center', width: 150 }, + { title: '网络货运人', render: 'carModelLabel', className: 'text-center', width: 200 }, + { title: '银行类型', render: 'carModelLabel', className: 'text-center', width: 120 }, + { title: '虚拟账户', render: 'carModelLabel', className: 'text-center', width: 180 }, + { title: '可用余额', render: 'approvalStatus1', className: 'text-right', width: 180 }, + { title: '账户总余额', render: 'approvalStatus2', className: 'text-right', width: 180 }, + { title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', width: 180 }, + { title: '创建时间', index: 'approvalStatus4', className: 'text-center', width: 200 }, + { title: '状态', index: 'approvalStatus4', className: 'text-center', width: 120 }, + { + title: '操作', + width: 120, + buttons: [ + { + text: '查看明细', + click: (_record) => this.viewDetail(_record) + } + ] + } + ]; + } + + resetSF() { + this._$expand = false; + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } + /** +* 伸缩查询条件 +*/ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + add(): void { + // this.modal + // .createStatic(FormEditComponent, { i: { id: 0 } }) + // .subscribe(() => this.st.reload()); + } + search() { + this.st.load(1); + } + export() { } + /** + * + * @param _record 当前行信息 + */ + viewDetail(_record: any) { + + } + + close() { + this.modalRef.destroy(); + } + +} diff --git a/src/app/routes/partner/account-management/services/account-managemant.service.ts b/src/app/routes/partner/account-management/services/account-managemant.service.ts index 3ca08cb0..d88522a1 100644 --- a/src/app/routes/partner/account-management/services/account-managemant.service.ts +++ b/src/app/routes/partner/account-management/services/account-managemant.service.ts @@ -6,6 +6,7 @@ import { BaseService } from '@shared'; }) export class AccountManagemantService extends BaseService { + $api_get_account_management_page = `/api/fcc/ficoBrmH/list/page`; constructor(public injector: Injector) { super(injector) } diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 6cd0f164..8664f185 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -22,6 +22,7 @@ import { PartnerSalePartnerDetailComponent } from './business-statistics/compone import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component'; const routes: Routes = [ { @@ -63,7 +64,8 @@ const routes: Routes = [ children: [ { path: 'list', component: PartnerAccountManagementListComponent }, ] - }]; + }, +]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 157b33d6..bdd2ef14 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -16,6 +16,7 @@ import { PartnerSalePartnerDetailComponent } from './business-statistics/compone import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; +import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -32,7 +33,8 @@ const COMPONENTS: any[] = [ PartnerSalePartnerDetailComponent, PartnerPartnerCustomOrderDetailComponent, PartnerPartnerOrderDetailComponent, - PartnerAccountManagementListComponent]; + PartnerAccountManagementListComponent, + PartnerAccountManagementVirtualAccountDetailComponent]; @NgModule({ declarations: [...COMPONENTS], diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index f64e2a74..e79fa857 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -43,7 +43,7 @@ export class SupplyManagementBulkComponent implements OnInit { private modal: NzModalService, private router: Router, public shipperservice: ShipperBaseService - ) { } + ) { } ngOnInit(): void { this.initSF(); @@ -54,14 +54,14 @@ export class SupplyManagementBulkComponent implements OnInit { /** * 查询参数 */ - get reqParams() { - const a:any = {}; - if(this.resourceStatus) { - a.resourceStatus = this.resourceStatus + get reqParams() { + const a: any = {}; + if (this.resourceStatus) { + a.resourceStatus = this.resourceStatus } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, releaseTime: { @@ -72,7 +72,7 @@ export class SupplyManagementBulkComponent implements OnInit { start: this.sf?.value?.deadlineTime?.[0] || '', end: this.sf?.value?.deadlineTime?.[1] || '', }, - }; + }; } search() { this.st?.load(1); @@ -82,7 +82,7 @@ export class SupplyManagementBulkComponent implements OnInit { console.log(data) return data.map(item => ({ ...item, - disabled: item.auditStatus !== '1' + disabled: item.auditStatus !== '1' })); }; /** @@ -110,9 +110,9 @@ export class SupplyManagementBulkComponent implements OnInit { default: '', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'service:type' }, - containAllLable:true, + containAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -123,9 +123,9 @@ export class SupplyManagementBulkComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, - containAllLable:true, + containAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -186,7 +186,7 @@ export class SupplyManagementBulkComponent implements OnInit { console.log(q) if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -204,24 +204,24 @@ export class SupplyManagementBulkComponent implements OnInit { this.freightSchema = { properties: { remarks: { - title: '备注', - type: 'string', - maxLength: 50, - ui: { - placeholder: '请输入备注', - widget: 'textarea', + title: '备注', + type: 'string', + maxLength: 50, + ui: { + placeholder: '请输入备注', + widget: 'textarea', + }, }, - }, - } - }; - this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 16 } } }; + } + }; + this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 16 } } }; } /** * 初始化数据列表 */ initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '货源编号', width: '200px', @@ -236,12 +236,12 @@ export class SupplyManagementBulkComponent implements OnInit { { title: '装货地', className: 'text-left', - index: 'loadingAddressArr', + index: 'loadingAddressArr', width: '200px', }, { title: '卸货地', className: 'text-left', - index: 'unloadingAddressArr', + index: 'unloadingAddressArr', width: '200px', }, { @@ -306,7 +306,7 @@ export class SupplyManagementBulkComponent implements OnInit { iif: item => item.auditStatus === '1', acl: { ability: ['SUPPLY-INDEX-bulkBatchAudit'] }, }, - { + { text: '二维码 ', click: (_record) => this.assignedQrcode(_record), iif: item => item.resourceStatus == 1, @@ -314,7 +314,7 @@ export class SupplyManagementBulkComponent implements OnInit { { text: '修改单价', click: (_record) => this.modification(_record), - iif: item => item.resourceStatus == 1 , + iif: item => item.resourceStatus == 1, acl: { ability: ['SUPPLY-INDEX-modificationUnitPrice'] }, }, { @@ -389,86 +389,86 @@ export class SupplyManagementBulkComponent implements OnInit { tabChange(item: any) { console.log(item) } - /** - * 审核 - * status : 1 单个 2:批量 - * value : 单个单条数据 - */ - audit(value: any, status?: any) { - console.log(value) - console.log(status) - if(status === 2) { - if(this.selectedRows.length <= 0) { - this.service.msgSrv.error('未选择货源单!'); - return - } - let list: any[] = []; - this.selectedRows.forEach(item => { - list.push(item.id); - }); - this.auditID = list; - this.auditMany = true; - } else { - this.auditID = value.id - this.auditMany = false; + /** + * 审核 + * status : 1 单个 2:批量 + * value : 单个单条数据 + */ + audit(value: any, status?: any) { + console.log(value) + console.log(status) + if (status === 2) { + if (this.selectedRows.length <= 0) { + this.service.msgSrv.error('未选择货源单!'); + return } - this.isVisible = true; + let list: any[] = []; + this.selectedRows.forEach(item => { + list.push(item.id); + }); + this.auditID = list; + this.auditMany = true; + } else { + this.auditID = value.id + this.auditMany = false; } - /** - * 审核关闭弹窗 - */ + this.isVisible = true; + } + /** +* 审核关闭弹窗 +*/ handleCancel(type: any) { this.isVisible = false } - /** - * 代发货源 - */ - releaseGoods() { - this.router.navigate(['/supply-management/bulk-release']); - } + /** + * 代发货源 + */ + releaseGoods() { + this.router.navigate(['/supply-management/bulk-release']); + } /** * 审核通过按钮 */ handleOK(value: any) { - if(this.selectedRows.length <= 0) { - const params: any = { - id: this.auditID, - remarks: this.sfFre.value.remarks, - } - if(value == 1) { - params.auditStatus = 2 - } else { - params.auditStatus = 3 - } - console.log(params) - this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => { - if (res === true) { - this.service.msgSrv.success('审核成功!'); - this.isVisible = false; - this.st?.reload(); - this.getGoodsSourceStatistical(); + if (this.selectedRows.length <= 0) { + const params: any = { + id: this.auditID, + remarks: this.sfFre.value.remarks, } - }) - } else { - const params: any = { - ids: this.auditID, - remarks: this.sfFre.value.remarks, - } - if(value == 1) { - params.auditStatus = 2 - } else { - params.auditStatus = 3 - } - console.log(params) - this.service.request(this.service.$api_batchGoodsResourceAudit, params).subscribe(res => { - if (res === true) { - this.service.msgSrv.success('审核成功!'); - this.isVisible = false; - this.st?.reload(); - this.getGoodsSourceStatistical(); + if (value == 1) { + params.auditStatus = 2 + } else { + params.auditStatus = 3 } - }) - } + console.log(params) + this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => { + if (res === true) { + this.service.msgSrv.success('审核成功!'); + this.isVisible = false; + this.st?.reload(); + this.getGoodsSourceStatistical(); + } + }) + } else { + const params: any = { + ids: this.auditID, + remarks: this.sfFre.value.remarks, + } + if (value == 1) { + params.auditStatus = 2 + } else { + params.auditStatus = 3 + } + console.log(params) + this.service.request(this.service.$api_batchGoodsResourceAudit, params).subscribe(res => { + if (res === true) { + this.service.msgSrv.success('审核成功!'); + this.isVisible = false; + this.st?.reload(); + this.getGoodsSourceStatistical(); + } + }) + } } // 修改单价 modification(item: any) { @@ -509,34 +509,34 @@ export class SupplyManagementBulkComponent implements OnInit { nzTitle: '确定取消货源吗?', nzContent: `取消后不可恢复,谨慎操作`, nzOnOk: () => - this.service.request(this.service.$api_cancelSource, {id: item.id}).subscribe((res) => { - if(res) { + this.service.request(this.service.$api_cancelSource, { id: item.id }).subscribe((res) => { + if (res) { this.service.msgSrv.success('已取消货源!') this.st?.reload(); this.getGoodsSourceStatistical(); } }) }) - + + } + // 获取货源状态统计 + getGoodsSourceStatistical() { + this.tabs = { + totalQuantity: 0, + cancelQuantity: 0, + receivedQuantity: 0, + stayQuantity: 0 + }; + const params: any = Object.assign({}, this.reqParams || {}); + delete params.resourceStatus + this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...params }).subscribe(res => { + if (res) { + console.log(res) + this.tabs = res; + } + }) + } + userAction() { + } - // 获取货源状态统计 - getGoodsSourceStatistical() { - this.tabs = { - totalQuantity: 0, - cancelQuantity: 0, - receivedQuantity: 0, - stayQuantity: 0 - }; - const params: any = Object.assign({}, this.reqParams || {}); - delete params.resourceStatus - this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...params }).subscribe(res => { - if (res) { - console.log(res) - this.tabs = res; - } - }) - } - userAction() { - - } } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 214ed987..16d5ec3b 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -65,10 +65,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.validateForm1 = fb.group({ loadAddress0: [null, [Validators.required]], loadName0: [null, [Validators.required]], - loadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]], + loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], unloadAddress0: [null, [Validators.required]], unloadName0: [null, [Validators.required]], - unloadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]], + unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], loadingTime: [null, []], unloadingTime: [null, []] }); @@ -89,7 +89,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { @ViewChild('sf5', { static: false }) sf5!: SFComponent; schema5: SFSchema = {}; ui5!: SFUISchema; - + @ViewChild('sf55', { static: false }) sf55!: SFComponent; schema55: SFSchema = {}; ui55!: SFUISchema; @@ -101,15 +101,15 @@ export class SupplyManagementReleasePublishComponent implements OnInit { @ViewChild('sf7', { static: false }) sf7!: SFComponent; schema7: SFSchema = {}; ui7!: SFUISchema; - formatterRmb = (value: number): string =>{ - if(value){ - let value2 = Number(value).toLocaleString(undefined,{'minimumFractionDigits':2,'maximumFractionDigits':2}); + formatterRmb = (value: number): string => { + if (value) { + let value2 = Number(value).toLocaleString(undefined, { 'minimumFractionDigits': 2, 'maximumFractionDigits': 2 }); return `¥ ${value2}`; } return `¥ 0.00` - - } ; - parserRmb = (value: string): string => value.replace('¥ ', '').replace(',',''); + + }; + parserRmb = (value: string): string => value.replace('¥ ', '').replace(',', ''); // 页面初始化 ngOnInit(): void { this.initSF1(); @@ -221,7 +221,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } as SFSelectWidgetSchema } }, - required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName', ] + required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName',] }; this.ui1 = { '*': { @@ -343,13 +343,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select', mode: 'multiple', - maxMultipleCount:3, + maxMultipleCount: 3, placeholder: '请选择车型', errors: { required: '请选择车型' }, asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); + change: (tag: any, org: any) => { + if (tag.includes("999")) { + this.sf4.setValue('/carModel', ["999"]); } } } @@ -360,13 +360,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select', mode: 'multiple', - maxMultipleCount:3, + maxMultipleCount: 3, placeholder: '请选择车长', errors: { required: '请选择车长' }, asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); + change: (tag: any, org: any) => { + if (tag.includes("999")) { + this.sf4.setValue('/carModel', ["999"]); } } } @@ -443,29 +443,29 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select' }, - default:'0' + default: '0' }, type1: { type: 'string', title: '', - enum: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'], + enum: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'], readOnly: true, ui: { widget: 'checkbox', - visibleIf: {insuranceType: (value: string) => value ==='1'}, + visibleIf: { insuranceType: (value: string) => value === '1' }, } as SFCheckboxWidgetSchema, - default: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'], + default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'], }, type2: { type: 'string', title: '', - enum: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'], + enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'], readOnly: true, ui: { widget: 'checkbox', - visibleIf: {insuranceType: (value: string) => value ==='2'}, + visibleIf: { insuranceType: (value: string) => value === '2' }, } as SFCheckboxWidgetSchema, - default: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'], + default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'], } } }; @@ -501,7 +501,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'receipt:type' }, - containsAllLable: false, + containsAllLabel: false, placeholder: '请选择', errors: { required: '请选择' }, visibleIf: { @@ -573,7 +573,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } as SFTextareaWidgetSchema } }, - required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress'] + required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress'] }; this.ui6 = { '*': { @@ -589,19 +589,19 @@ export class SupplyManagementReleasePublishComponent implements OnInit { type: 'number', title: '预付', default: 0, - ui: {widget: 'custom'} + ui: { widget: 'custom' } }, toPay: { type: 'number', title: '到付', default: 0, - ui: { widget: 'custom'} + ui: { widget: 'custom' } }, receiptPay: { type: 'number', title: '回单付', default: 0, - ui: {widget: 'custom'} + ui: { widget: 'custom' } }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, @@ -651,12 +651,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit { const params = { shipperId: this.envCache?.enterpriseId, enterpriseInfoId: this.envCache?.networkTransporterId, - totalFreight:subtotal, - fuelCardAmount:oilCardPay, - resourcetype:'1' + totalFreight: subtotal, + fuelCardAmount: oilCardPay, + resourcetype: '1' } this.service - .request(this.service.$api_getCalculatedSurcharge,params) + .request(this.service.$api_getCalculatedSurcharge, params) .subscribe(res => { if (res) { this.sf7.setValue('/appendFee', res.surcharge); @@ -818,7 +818,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ...this.sf6.value, expenseDTOList: expenseList, paymentDays: this.sf7.value.paymentDays, - insuranceType:this.sf55.value.insuranceType, + insuranceType: this.sf55.value.insuranceType, }; let reqUrl = this.service.$api_consignWhole; @@ -977,63 +977,63 @@ export class SupplyManagementReleasePublishComponent implements OnInit { goBack() { window.history.go(-1); } - // 装卸货地址互换 - swapAddress(){ - this.startInfo.forEach((element:any, index:any) => { - this.validateForm1.removeControl(`loadAddress${index}`); - this.validateForm1.removeControl(`loadName${index}`); - this.validateForm1.removeControl(`loadPhone${index}`); - }); - this.endInfo.forEach((element:any, index:any) => { - this.validateForm1.removeControl(`unloadAddress${index}`); - this.validateForm1.removeControl(`unloadName${index}`); - this.validateForm1.removeControl(`unloadPhone${index}`); - }); - - let item = this.startInfo; - this.startInfo = this.endInfo; - this.endInfo = item; - - this.startInfo.forEach((element:any,index:any) => { - element.type = '1'; - this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); - }); - this.endInfo.forEach((element:any,index:any) => { - element.type = '2'; - this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); - }); - - // 计算里程,时间 - if (this.startInfo[0]?.area && this.endInfo[0]?.area) { + // 装卸货地址互换 + swapAddress() { + this.startInfo.forEach((element: any, index: any) => { + this.validateForm1.removeControl(`loadAddress${index}`); + this.validateForm1.removeControl(`loadName${index}`); + this.validateForm1.removeControl(`loadPhone${index}`); + }); + this.endInfo.forEach((element: any, index: any) => { + this.validateForm1.removeControl(`unloadAddress${index}`); + this.validateForm1.removeControl(`unloadName${index}`); + this.validateForm1.removeControl(`unloadPhone${index}`); + }); + + let item = this.startInfo; + this.startInfo = this.endInfo; + this.endInfo = item; + + this.startInfo.forEach((element: any, index: any) => { + element.type = '1'; + this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); + }); + this.endInfo.forEach((element: any, index: any) => { + element.type = '2'; + this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); + }); + + // 计算里程,时间 + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { this.totalDistance = res.distance; this.totalTime = res.time; }); } - } - goodsValuesChange(value: any) { - console.log(value); - console.log(this.totalDistance); - - if(value >= 50000 && this.totalDistance > 0){ - const params = { - goodsValue: value, - insuranceType: this.sf55.value.insuranceType, - km: this.totalDistance - }; - this.service - .request(this.service.$api_getWholeInsuranceInfo, params) - .subscribe(res => { - if (res) { - this.sf5.setValue('/insurancePremium',res.insurancePremium); - }else{ - this.sf5.setValue('/insurancePremium',null); - } + } + goodsValuesChange(value: any) { + console.log(value); + console.log(this.totalDistance); + + if (value >= 50000 && this.totalDistance > 0) { + const params = { + goodsValue: value, + insuranceType: this.sf55.value.insuranceType, + km: this.totalDistance + }; + this.service + .request(this.service.$api_getWholeInsuranceInfo, params) + .subscribe(res => { + if (res) { + this.sf5.setValue('/insurancePremium', res.insurancePremium); + } else { + this.sf5.setValue('/insurancePremium', null); + } }); - } } + } } diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index 1d192fa2..bfd8ca69 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -44,7 +44,7 @@ export class SupplyManagementVehicleComponent implements OnInit { private router: Router, private ar: ActivatedRoute, public shipperSrv: ShipperBaseService - ) {} + ) { } /** * 查询参数 @@ -147,7 +147,7 @@ export class SupplyManagementVehicleComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} + importGoodsSource() { } /** * 修改运费 @@ -382,7 +382,7 @@ export class SupplyManagementVehicleComponent implements OnInit { // _$expand: (value: boolean) => value // }, // allowClear: true, - // containsAllLable: true, + // containsAllLabel: true, // asyncData: () => this.shipperSrv.getEnterpriseProject(this.sf.value?.shipperAppUserId) // } as SFSelectWidgetSchema // }, @@ -402,7 +402,7 @@ export class SupplyManagementVehicleComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'service:type' }, visibleIf: { _$expand: (value: boolean) => value @@ -416,7 +416,7 @@ export class SupplyManagementVehicleComponent implements OnInit { ui: { widget: 'dict-select', allowClear: true, - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'goodresource:audit:status' }, visibleIf: { _$expand: (value: boolean) => value diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts index 8bc8f0f2..985007bc 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts @@ -30,9 +30,9 @@ export class CancellationInvoiceComponent implements OnInit { totalCallNo = 0; openInfo: any = { invoicedate: null, invoiceno: null }; - constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} + constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) { } - ngOnInit(): void {} + ngOnInit(): void { } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { @@ -113,7 +113,7 @@ export class CancellationInvoiceComponent implements OnInit { this.nzModalService.warning({ nzTitle: '确定将所选待处理开票申请推送开票?', nzContent: '推送开票后发票信息不可修改,待系统开票完成后会自动返回开票结果', - nzOnOk: () => {} + nzOnOk: () => { } }); } @@ -130,7 +130,7 @@ export class CancellationInvoiceComponent implements OnInit { this.nzModalService.warning({ nzTitle: '确定将所选待确认开票申请撤回?', nzContent: '提交税控后发票信息不可修改,待税控开票完成后返回开票结果', - nzOnOk: () => {} + nzOnOk: () => { } }); } @@ -147,7 +147,7 @@ export class CancellationInvoiceComponent implements OnInit { this.nzModalService.warning({ nzTitle: '确定将所选待确认开票申请撤回?', nzContent: '提交税控后发票信息不可修改,待税控开票完成后返回开票结果', - nzOnOk: () => {} + nzOnOk: () => { } }); } @@ -232,7 +232,7 @@ export class CancellationInvoiceComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'vatinv:status' }, containAllLable: true, visibleIf: { diff --git a/src/app/routes/vehicle/components/audit/audit.component.ts b/src/app/routes/vehicle/components/audit/audit.component.ts index 6a46ee14..dcf50b10 100644 --- a/src/app/routes/vehicle/components/audit/audit.component.ts +++ b/src/app/routes/vehicle/components/audit/audit.component.ts @@ -22,7 +22,7 @@ export class VehicleComponentsAuditComponent implements OnInit { @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper) {} + constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper) { } /** * 查询字段个数navigate */ @@ -34,14 +34,14 @@ export class VehicleComponentsAuditComponent implements OnInit { * 查询参数 */ get reqParams() { - const a:any = {}; - if(this.resourceStatus === 1) { + const a: any = {}; + if (this.resourceStatus === 1) { a.approvalStatus = 10 - } else if(this.resourceStatus === 2) { + } else if (this.resourceStatus === 2) { a.approvalStatus = 20 - } else if(this.resourceStatus === 3) { + } else if (this.resourceStatus === 3) { a.approvalStatus = 30 - } + } return { ...a, ...this.sf?.value, @@ -106,7 +106,7 @@ export class VehicleComponentsAuditComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:color' }, - containsAllLable: true, + containsAllLabel: true, } }, isSelf: { @@ -157,17 +157,17 @@ export class VehicleComponentsAuditComponent implements OnInit { initST() { this.columns = [ // { title: '', type: 'checkbox', className: 'text-center' }, - { title: '车牌号', width:'180px', className: 'text-center', index: 'carNo' }, - { title: '车牌颜色', width:'180px', className: 'text-center', index: 'carNoColorLabel' }, - { title: '车型-车长-载重', width:'180px',className: 'text-center', render: 'carLength' }, - { title: '是否挂靠', width:'180px', className: 'text-center', render: 'isSelf' }, - { title: '所有人', width:'180px', className: 'text-center', index: 'carOwner' }, - { title: '录入人员', width:'180px', className: 'text-center', index: 'saveUser', }, + { title: '车牌号', width: '180px', className: 'text-center', index: 'carNo' }, + { title: '车牌颜色', width: '180px', className: 'text-center', index: 'carNoColorLabel' }, + { title: '车型-车长-载重', width: '180px', className: 'text-center', render: 'carLength' }, + { title: '是否挂靠', width: '180px', className: 'text-center', render: 'isSelf' }, + { title: '所有人', width: '180px', className: 'text-center', index: 'carOwner' }, + { title: '录入人员', width: '180px', className: 'text-center', index: 'saveUser', }, { title: '审核状态', className: 'text-center', index: 'approvalStatus', - width:'180px', + width: '180px', type: 'badge', badge: { '-1': { text: '未上传', color: 'default' }, @@ -179,7 +179,7 @@ export class VehicleComponentsAuditComponent implements OnInit { 40: { text: '证件过期', color: 'error' }, }, }, - { title: '申请时间', width:'180px', className: 'text-center', index: 'createTime' }, + { title: '申请时间', width: '180px', className: 'text-center', index: 'createTime' }, { title: '操作', fixed: 'right', @@ -190,7 +190,7 @@ export class VehicleComponentsAuditComponent implements OnInit { text: '查看', acl: { ability: ['VEHICLE-AUDIT-view'] }, click: (item) => { - this.router.navigate(['./detail', item.id], { relativeTo: this.ar,queryParams: { carId: item.carId } }); + this.router.navigate(['./detail', item.id], { relativeTo: this.ar, queryParams: { carId: item.carId } }); // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); }, }, @@ -224,13 +224,13 @@ export class VehicleComponentsAuditComponent implements OnInit { } // 导出 exportFire() { - this.service.downloadFile(this.service.$api_carLicenseAudit_export, this.reqParams ); + this.service.downloadFile(this.service.$api_carLicenseAudit_export, this.reqParams); } addModal() { const i = { appUserId: '', } - this.modalHelper.create(CarSettleCarauthComponent, {i}, { size: 900 }).subscribe((res) => { + this.modalHelper.create(CarSettleCarauthComponent, { i }, { size: 900 }).subscribe((res) => { this.st.load() }); } diff --git a/src/app/routes/vehicle/components/list/list.component.ts b/src/app/routes/vehicle/components/list/list.component.ts index 817881c3..4a7ca3bf 100644 --- a/src/app/routes/vehicle/components/list/list.component.ts +++ b/src/app/routes/vehicle/components/list/list.component.ts @@ -19,7 +19,7 @@ export class VehicleComponentsListComponent implements OnInit { @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} + constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) { } /** * 查询参数 @@ -87,7 +87,7 @@ export class VehicleComponentsListComponent implements OnInit { title: '车牌颜色', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'car:color' } } }, @@ -109,7 +109,7 @@ export class VehicleComponentsListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:model' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { expand: (value: boolean) => value } @@ -121,7 +121,7 @@ export class VehicleComponentsListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:length' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { expand: (value: boolean) => value } 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 c2be082a..aa2ba3f9 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 @@ -24,55 +24,57 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { addSchema: SFSchema = {}; _$expand = false; editText = ''; - formData :any; + formData: any; isVisible = false; edit = false; editId = false; selectedIndex = 0; columns: STColumn[] = [ - { title: '异常编号', index: 'exceptionCode',width: '180px',className: 'text-left', }, - { title: '关联运单号', index: 'wayBillCode',width: '180px',className: 'text-left', }, - { title: '网络货运人', index: 'enterpriseInfoName',width: '220px',className: 'text-left', }, - { title: '货主', index: 'shipperAppUserName' ,width: '220px',className: 'text-left',}, - { title: '装货地', index: 'loadingAddressArr' ,width: '220px',className: 'text-left',}, - { title: '卸货地', index: 'unloadingAddressArr' ,width: '220px',className: 'text-left',}, - { title: '承运司机', index: 'driver' ,width: '250px',className: 'text-left',}, - { title: '异常信息', index: 'exceptionContent',width: '250px',className: 'text-left', }, - { title: '异常图片', render: 'exceptionCertificateFirstFilePath' ,width: '200px',className: 'text-left',}, - { title: '上报时间', index: 'createTime',width: '180px' ,className: 'text-left',}, + { title: '异常编号', index: 'exceptionCode', width: '180px', className: 'text-left', }, + { title: '关联运单号', index: 'wayBillCode', width: '180px', className: 'text-left', }, + { title: '网络货运人', index: 'enterpriseInfoName', width: '220px', className: 'text-left', }, + { title: '货主', index: 'shipperAppUserName', width: '220px', className: 'text-left', }, + { title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left', }, + { title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left', }, + { title: '承运司机', index: 'driver', width: '250px', className: 'text-left', }, + { title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left', }, + { title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '200px', className: 'text-left', }, + { title: '上报时间', index: 'createTime', width: '180px', className: 'text-left', }, ]; columns2: STColumn[] = [ - { title: '异常编号', index: 'exceptionCode',width: '180px',className: 'text-left' }, - { title: '关联运单号', index: 'wayBillCode',width: '180px' ,className: 'text-left'}, - { title: '网络货运人', index: 'enterpriseInfoName',width: '180px',className: 'text-left' }, - { title: '货主', index: 'shipperAppUserName' ,width: '180px',className: 'text-left'}, - { title: '装货地', index: 'loadingPlace' ,width: '180px',className: 'text-left'}, - { title: '卸货地', index: 'dischargePlace' ,width: '180px',className: 'text-left'}, - { title: '承运司机', index: 'driver' ,width: '90px',className: 'text-left'}, - { title: '异常信息', index: 'exceptionContent',width: '250px' ,className: 'text-left'}, - { title: '异常图片', render: 'exceptionCertificateFirstFilePath' ,width: '220px',className: 'text-left'}, - { title: '上报时间', index: 'reportingTime',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'}, + { title: '异常编号', index: 'exceptionCode', width: '180px', className: 'text-left' }, + { title: '关联运单号', index: 'wayBillCode', width: '180px', className: 'text-left' }, + { title: '网络货运人', index: 'enterpriseInfoName', width: '180px', className: 'text-left' }, + { title: '货主', index: 'shipperAppUserName', width: '180px', className: 'text-left' }, + { title: '装货地', index: 'loadingPlace', width: '180px', className: 'text-left' }, + { title: '卸货地', index: 'dischargePlace', width: '180px', className: 'text-left' }, + { title: '承运司机', index: 'driver', width: '90px', className: 'text-left' }, + { title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' }, + { title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '220px', className: 'text-left' }, + { title: '上报时间', index: 'reportingTime', 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' }, ]; - get reqParams (){ + get reqParams() { return { - ...this.sf?.value, - }}; - get reqParams2 (){ + ...this.sf?.value, + } + }; + get reqParams2() { return { - ...this.sf?.value, - }}; + ...this.sf?.value, + } + }; constructor( public service: WaybillManagementServe, private nzModalService: NzModalService, public shipperSrv: ShipperBaseService - ) {} + ) { } ngOnInit(): void { this.initSF() @@ -82,131 +84,131 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { * 伸缩查询条件 */ expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); } - /** - * 查询字段个数 - */ + /** + * 查询字段个数 + */ get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; + return Object.keys(this.schema?.properties || {}).length; } - initSF(){ - this.schema = { - properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, - exceptionCode: { - type: 'string', - title: '异常编号', - ui: { placeholder: '请输入' } - }, - wayBillCode: { - type: 'string', - title: '运单号', - ui: { placeholder: '请输入' } - }, - exceptionType: { - title: '异常类型', - type: 'string', - ui: { - widget: 'dict-select', - containsAllLable: true, - params: { dictKey: 'exception:report:type' }, - } as SFSelectWidgetSchema - }, - shipperAppUserId: { - type: 'string', - title: '货主', - ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - allowClear: true, - onSearch: (q: any) => { - console.log(q) - if (!!q) { - return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) - .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + exceptionCode: { + type: 'string', + title: '异常编号', + ui: { placeholder: '请输入' } + }, + wayBillCode: { + type: 'string', + title: '运单号', + ui: { placeholder: '请输入' } + }, + exceptionType: { + title: '异常类型', + type: 'string', + ui: { + widget: 'dict-select', + containsAllLabel: true, + params: { dictKey: 'exception:report:type' }, + } as SFSelectWidgetSchema + }, + shipperAppUserId: { + type: 'string', + title: '货主', + ui: { + widget: 'select', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', + allowClear: true, + onSearch: (q: any) => { + console.log(q) + if (!!q) { + return this.service + .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) + .toPromise(); + } else { + return of([]); + } + }, + change: (q: any) => { + this.getRegionCode(q); + }, + visibleIf: { + _$expand: (value: boolean) => value, + }, + } as SFSelectWidgetSchema, + }, + enterpriseProjectId: { + type: 'string', + title: '所属项目', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value + }, + } as SFSelectWidgetSchema + }, + driverName: { + title: '承运司机', + type: 'string', + ui: { + visibleIf: { + _$expand: (value: boolean) => value } - }, - change: (q: any) => { - this.getRegionCode(q); - }, - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, - }, - enterpriseProjectId: { - type: 'string', - title: '所属项目', - ui: { - widget: 'select', - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - }, - } as SFSelectWidgetSchema - }, - driverName: { - title: '承运司机', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value } + }, + carNo: { + title: '车牌号', + type: 'string', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, + reportingTime: { + title: '上报时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value, + }, + allowClear: true, + asyncData: () => this.shipperSrv.getNetworkFreightForwarder(), + }, } - }, - carNo: { - title: '车牌号', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } - }, - reportingTime: { - title: '上报时间', - type: 'string', - ui: { - widget: 'date', - mode: 'range', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - } - } as SFDateWidgetSchema - }, - enterpriseInfoId: { - type: 'string', - title: '网络货运人', - ui: { - widget: 'select', - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value, - }, - allowClear: true, - asyncData: () => this.shipperSrv.getNetworkFreightForwarder(), - }, - } - } - }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } search() { console.log(this.selectedIndex) - if(this.selectedIndex === 0) { - this.st?.load(1) + if (this.selectedIndex === 0) { + this.st?.load(1) } else { - this.st2?.load(1) + this.st2?.load(1) } } /** @@ -215,25 +217,25 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { resetSF() { this.sf.reset(); } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) - ) - ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); - } + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) + ) + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } } 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 26890393..0c1b2017 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -27,37 +27,37 @@ export class WaybillManagementBulkComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; columns: STColumn[] = []; resourceStatus: any; -tabs = { - signQuantity: 0, - cancelQuantity: 0, - receivedQuantity: 0, - totalQuantity: 0, - compolatelQuantity: 0, - deltQuantity: 0 -}; + tabs = { + signQuantity: 0, + cancelQuantity: 0, + receivedQuantity: 0, + totalQuantity: 0, + compolatelQuantity: 0, + deltQuantity: 0 + }; constructor( - public service: WaybillManagementServe, - private modal: NzModalService, + public service: WaybillManagementServe, + private modal: NzModalService, public shipperservice: ShipperBaseService) { } /** * 查询参数 */ get reqParams() { - const a:any = {}; - if(this.resourceStatus) { - a.wayBillStatus = this.resourceStatus + const a: any = {}; + if (this.resourceStatus) { + a.wayBillStatus = this.resourceStatus } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '', }, - }; + }; } get selectedRows() { return this.st?.list.filter((item) => item.checked) || []; @@ -98,14 +98,14 @@ tabs = { console.log(q) if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { return of([]); } }, - + } as SFSelectWidgetSchema, }, loadingPlace: { @@ -152,14 +152,14 @@ tabs = { _$expand: (value: boolean) => value, }, } - }, + }, paymentstatus: { title: '支付状态', type: 'string', ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -170,14 +170,14 @@ tabs = { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'service:type' }, visibleIf: { _$expand: (value: boolean) => value } } as SFSelectWidgetSchema }, - + riskStatus: { type: 'string', title: '是否风险单', @@ -230,9 +230,9 @@ tabs = { /** * 初始化数据列表 */ - initST() { + initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '运单号', width: '180px', @@ -257,7 +257,7 @@ tabs = { width: '220px', index: 'dischargePlace' }, - { + { title: '货物信息', className: 'text-left', width: '250px', @@ -315,13 +315,13 @@ tabs = { { text: '确认发车', click: (_record) => this.sureDepart(_record), - iif: item => item.wayBillStatus == '2' , + iif: item => item.wayBillStatus == '2', acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] }, }, { text: '确认到车', click: (_record) => this.sureArrive(_record), - iif: item => item.wayBillStatus == '3' , + iif: item => item.wayBillStatus == '3', acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] }, }, ], @@ -357,8 +357,8 @@ tabs = { } selectChange(e: number) { console.log(e); - if(e>=1) { - this.resourceStatus = e + 1; + if (e >= 1) { + this.resourceStatus = e + 1; } this.initST(); setTimeout(() => { @@ -374,15 +374,15 @@ tabs = { audit(item: any) { console.log(item) } - /** - * 审核通过按钮 - */ + /** +* 审核通过按钮 +*/ handleOK() { - + } - /** - *查看评价 - */ + /** + *查看评价 + */ viewEvaluate(item: any) { console.log(item) this.isVisibleEvaluate = true @@ -402,62 +402,62 @@ tabs = { if (res) { let totalCount = 0; res.forEach((ele: any) => { - switch(ele.wayBillStatus) { + switch (ele.wayBillStatus) { case '2': this.tabs.receivedQuantity = ele?.count; break; case '3': this.tabs.cancelQuantity = ele?.count; - break; + break; case '4': this.tabs.signQuantity = ele?.count; - break; + break; case '5': this.tabs.compolatelQuantity = ele?.count; - break; + break; case '6': this.tabs.deltQuantity = ele?.count; - break; + break; } totalCount += ele.count - }); - this.tabs.totalQuantity = totalCount + }); + this.tabs.totalQuantity = totalCount } }) } - // *确认发车 - - sureDepart(item: any) { - const modalRef = this.modal.create({ - nzTitle: '确认发车', - nzWidth: '50%', - nzContent: VehicleSureDepartComponent, - nzComponentParams: { - i: item, - Status: 2 - }, - nzFooter: null - }); - modalRef.afterClose.subscribe((result: any) => { - this.st.load(1); - this.getGoodsSourceStatistical() + // *确认发车 + + sureDepart(item: any) { + const modalRef = this.modal.create({ + nzTitle: '确认发车', + nzWidth: '50%', + nzContent: VehicleSureDepartComponent, + nzComponentParams: { + i: item, + Status: 2 + }, + nzFooter: null }); - } - // 确认到车 - sureArrive(item: any) { - const modalRef = this.modal.create({ - nzTitle: '确认到车', - nzWidth: '50%', - nzContent: VehicleSureArriveComponent, - nzComponentParams: { - i: item, - Status: 2 - }, - nzFooter: null - }); - modalRef.afterClose.subscribe((result: any) => { - this.st.load(1); - this.getGoodsSourceStatistical() + modalRef.afterClose.subscribe((result: any) => { + this.st.load(1); + this.getGoodsSourceStatistical() }); - } + } + // 确认到车 + sureArrive(item: any) { + const modalRef = this.modal.create({ + nzTitle: '确认到车', + nzWidth: '50%', + nzContent: VehicleSureArriveComponent, + nzComponentParams: { + i: item, + Status: 2 + }, + nzFooter: null + }); + modalRef.afterClose.subscribe((result: any) => { + this.st.load(1); + this.getGoodsSourceStatistical() + }); + } } 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 fa427fd6..b70676e2 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -37,27 +37,27 @@ export class WaybillManagementVehicleComponent implements OnInit { }; constructor( public service: WaybillManagementServe, - private modal: NzModalService, - public shipperservice: ShipperBaseService) {} + private modal: NzModalService, + public shipperservice: ShipperBaseService) { } /** * 查询参数 */ get reqParams() { - const a:any = {}; + const a: any = {}; if (this.resourceStatus) { a.wayBillStatus = this.resourceStatus; } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { + return { ...a, ...params, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '', }, - }; + }; } get selectedRows() { return this.st?.list.filter(item => item.checked) || []; @@ -96,7 +96,7 @@ export class WaybillManagementVehicleComponent implements OnInit { console.log(q) if (!!q) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: q }) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -137,7 +137,7 @@ export class WaybillManagementVehicleComponent implements OnInit { } } }, - + driverName: { title: '承运司机', type: 'string', @@ -164,14 +164,14 @@ export class WaybillManagementVehicleComponent implements OnInit { _$expand: (value: boolean) => value, }, } - }, + }, paymentstatus: { title: '支付状态', type: 'string', ui: { widget: 'dict-select', params: { dictKey: 'overall:payment:status' }, - containsAllLable: true, + containsAllLabel: true, visibleIf: { _$expand: (value: boolean) => value } @@ -182,14 +182,14 @@ export class WaybillManagementVehicleComponent implements OnInit { type: 'string', ui: { widget: 'dict-select', - containsAllLable: true, + containsAllLabel: true, params: { dictKey: 'service:type' }, visibleIf: { _$expand: (value: boolean) => value } } as SFSelectWidgetSchema }, - + riskStatus: { type: 'string', title: '是否风险单', @@ -238,34 +238,34 @@ export class WaybillManagementVehicleComponent implements OnInit { }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } - // 获取城市列表 - getRegionCode(regionCode: any) { - console.log(regionCode); - return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) - .pipe( - map(res => - res.map((item: any) => ({ - label: item.projectName, - value: item.id - })) + // 获取城市列表 + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) + ) ) - ) - .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); - // if (this.enterpriseProjectIds) { - // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); - // } - }); -} + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // if (this.enterpriseProjectIds) { + // this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds); + // } + }); + } /** * 初始化数据列表 */ initST() { this.columns = [ - { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '运单号', width: '180px', @@ -391,7 +391,7 @@ export class WaybillManagementVehicleComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() {} + importGoodsSource() { } /** *查看评价 */ @@ -428,16 +428,16 @@ export class WaybillManagementVehicleComponent implements OnInit { case '4': this.tabs.signQuantity = ele?.count; break; - case '5': - this.tabs.compolatelQuantity = ele?.count; + case '5': + this.tabs.compolatelQuantity = ele?.count; break; - case '6': - this.tabs.deltQuantity = ele?.count; + case '6': + this.tabs.deltQuantity = ele?.count; break; } totalCount += ele.count }); - this.tabs.totalQuantity = totalCount + this.tabs.totalQuantity = totalCount } }); } @@ -457,7 +457,7 @@ export class WaybillManagementVehicleComponent implements OnInit { modalRef.afterClose.subscribe((result: any) => { this.st.load(1); this.getGoodsSourceStatistical() - }); + }); } // 确认到车 sureArrive(item: any) { @@ -474,6 +474,6 @@ export class WaybillManagementVehicleComponent implements OnInit { modalRef.afterClose.subscribe((result: any) => { this.st.load(1); this.getGoodsSourceStatistical() - }); + }); } } diff --git a/src/app/shared/components/dict-select/dict-select.component.ts b/src/app/shared/components/dict-select/dict-select.component.ts index a1936ea9..661bce83 100644 --- a/src/app/shared/components/dict-select/dict-select.component.ts +++ b/src/app/shared/components/dict-select/dict-select.component.ts @@ -27,7 +27,7 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor { @Input() params = {};// 请求参数 dictList: any[] = []; - @Input() containsAllLable = true; // 是否包含全部这一选项 + @Input() containsAllLabel = true; // 是否包含全部这一选项 @Input() mode: 'multiple' | 'tags' | 'default' = 'default'; @@ -55,7 +55,7 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor { this.service.getDictList(this.url || this.defaultUrl, this.params).subscribe(res => { if (res) { this.dictList = res || []; - if (this.dictList.length > 0 && this.containsAllLable) { + if (this.dictList.length > 0 && this.containsAllLabel) { const obj = { label: '全部', value: '' }; this.dictList.unshift(obj); } diff --git a/src/app/shared/widget/dict-select/dict-select.widget.html b/src/app/shared/widget/dict-select/dict-select.widget.html index b54a3e88..c014b4fc 100644 --- a/src/app/shared/widget/dict-select/dict-select.widget.html +++ b/src/app/shared/widget/dict-select/dict-select.widget.html @@ -8,7 +8,7 @@ --> + [containsAllLabel]="ui?.containsAllLabel" [mode]="ui?.mode" name="sf.dict.select">