diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts index 3556e2d5..57a658a1 100644 --- a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts @@ -84,9 +84,11 @@ export class AdvanceCollectionComponent { title: '付款人', ui: { widget: 'select', - placeholder: '请选择', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', allowClear: true, - asyncData: () => this.service.getCRM() + onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }) } }, brmtype: { diff --git a/src/app/routes/financial-management/components/freight-account/freight-account.component.ts b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts index 2309923a..610f1efe 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account.component.ts +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts @@ -80,7 +80,7 @@ export class FreightAccountComponent implements OnInit { } exportList() { - this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageSize: -1 }); + this.service.asyncExport({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_shipper); } private initSF(): SFSchema { diff --git a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts index c356eb36..820d90b9 100644 --- a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts +++ b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.ts @@ -151,9 +151,11 @@ export class ReceiptOrderComponent implements OnInit { title: '付款人', ui: { widget: 'select', - placeholder: '请选择', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', allowClear: true, - asyncData: () => this.service.getCRM(), + onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }), visibleIf: { expand: (value: boolean) => value } diff --git a/src/app/routes/financial-management/components/receivable-order/receivable-order-detail/receivable-order-detail.component.html b/src/app/routes/financial-management/components/receivable-order/receivable-order-detail/receivable-order-detail.component.html index 117b7972..9a87db0d 100644 --- a/src/app/routes/financial-management/components/receivable-order/receivable-order-detail/receivable-order-detail.component.html +++ b/src/app/routes/financial-management/components/receivable-order/receivable-order-detail/receivable-order-detail.component.html @@ -29,9 +29,9 @@ {{headerInfo?.artoname}} - + {{headerInfo?.armoney | currency}} diff --git a/src/app/routes/financial-management/components/receivable-order/receivable-order.component.ts b/src/app/routes/financial-management/components/receivable-order/receivable-order.component.ts index 590aa5fe..a8e78022 100644 --- a/src/app/routes/financial-management/components/receivable-order/receivable-order.component.ts +++ b/src/app/routes/financial-management/components/receivable-order/receivable-order.component.ts @@ -158,9 +158,11 @@ export class ReceivableOrderComponent implements OnInit { title: '付款人', ui: { widget: 'select', - placeholder: '请选择', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', allowClear: true, - asyncData: () => this.service.getCRM(), + onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }), visibleIf: { expand: (value: boolean) => value } @@ -181,7 +183,7 @@ export class ReceivableOrderComponent implements OnInit { } } }, - bankType: { + banktype: { type: 'string', title: '银行类型', enum: [ diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html index 3ba4fb26..667027cd 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html @@ -62,8 +62,7 @@ [ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true" [button]="'none'"> -
+
@@ -73,11 +72,29 @@
- - - {{index+1}} + + + + {{detail.costName}}:{{detail.price |currency}} + + + + {{item.billCode}}
+ {{item.billStatus}}
+
+ + {{item.wayBillCode}}
+ {{item.wayBillStatus}}
+
+ + {{item.driverName}}
+ {{item.driverTelephone}}
+ {{item.driverLicencePlate}}
+
+ + {{item.captainName}}
+ {{item.captainTelephone}}
diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts index 60812cec..77f2cfd9 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts @@ -210,24 +210,31 @@ export class WithdrawalsDetailComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '支付编号', index: 'brmHCode', className: 'text-left', width: 200 }, + { title: '支付编号', index: 'orderPaymentCode', className: 'text-left', width: 200 }, { title: '支付金额', - index: 'yskmoney', + index: 'payAmount', type: 'widget', className: 'text-right', - widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yskmoney }) }, + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.payAmount }) }, width: 140 }, - { title: '运费明细', index: 'billHId', className: 'text-center', width: 150 }, - { title: '货主', index: 'billHId', className: 'text-center', width: 150 }, - { title: '订单号', index: 'billHId', className: 'text-center', width: 150 }, - { title: '运单号', index: 'billHId', className: 'text-center', width: 150 }, - { title: '货源编号', index: 'billHId', className: 'text-center', width: 150 }, - { title: '服务类型', index: 'billHId', className: 'text-center', width: 150 }, - { title: '承运司机', index: 'billHId', className: 'text-center', width: 150 }, - { title: '收款人', index: 'billHId', className: 'text-center', width: 150 }, - { title: '银行类型', index: 'billHId', className: 'text-center', width: 150 } + { title: '运费明细', render: 'amountDetails', className: 'text-center', width: 150 }, + { title: '货主', index: 'ltdName', className: 'text-center', width: 200 }, + { title: '订单号', render: 'billId', className: 'text-center', width: 150 }, + { title: '运单号', render: 'wayBillId', className: 'text-center', width: 150 }, + { title: '货源编号', index: 'resourceCode', className: 'text-center', width: 150 }, + { + title: '服务类型', + index: 'serviceType', + className: 'text-center', + width: 150, + type: 'enum', + enum: { '1': '抢单', '2': '指派', '3': '二维码', '4': '手工单' } + }, + { title: '承运司机', render: 'driverId', className: 'text-center', width: 150 }, + { title: '收款人', render: 'captainName', className: 'text-center', width: 150 }, + { title: '银行类型', index: 'bankType', className: 'text-center', width: 150 } ]; } } diff --git a/src/app/routes/financial-management/services/freight-account.service.ts b/src/app/routes/financial-management/services/freight-account.service.ts index 65b1abe1..99477de7 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -42,6 +42,8 @@ export class FreightAccountService extends ShipperBaseService { // 货主端获取账户余额交易明细 $api_get_balance_by_shipper = '/api/fcc/accountBalanceDetail/getAccountBalanceByShipperPage'; + // 运营端导出货主账户明细信息 + $api_export_shipper = '/api/fcc/accountBalance/reportShipperAccountBalanceByOperator'; // 查询订单支付申请表 $api_get_order_payment_page = '/api/fcc/billPaymentApplicationOBC/list/page'; 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 8adef7ef..5a524963 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 @@ -121,7 +121,6 @@ export class OrderManagementComplianceAuditComponent implements OnInit { this.initST(); setTimeout(() => { this.st.load(); - this.getGoodsSourceStatistical(); }, 500); } ngOnInit(): void { @@ -492,20 +491,21 @@ export class OrderManagementComplianceAuditComponent implements OnInit { } // 申诉记录 appeal(item: any) { - const modalRef = this.modal.create({ - nzTitle: '申诉', - nzContent: OneCarOrderAppealComponent, - nzComponentParams: { - i: item - }, - nzFooter: null - }); - modalRef.afterClose.subscribe((res) => { - if(res){ - this.resetSF; - this.st.load(); - } - }); + // const modalRef = this.modal.create({ + // nzTitle: '申诉', + // nzContent: OneCarOrderAppealComponent, + // nzComponentParams: { + // i: item + // }, + // nzFooter: null + // }); + // modalRef.afterClose.subscribe((res) => { + // if(res){ + // this.resetSF; + // this.st.load(); + // } + // }); + this.router.navigate(['/order-management/risk-detail', item.id]); } /** * 浮动费用查看 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 92a29c7c..22bdb5c3 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -450,7 +450,7 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme { text: '取消订单', click: _record => this.cancellation(_record), - iif: item => item.billStatus !== '1' && item.billStatus !== '6' && item.overallPaymentStatus !== '2', + iif: item => item.billStatus !== '6' && item.overallPaymentStatus !== '2', acl: { ability: ['ORDER-VEHICLE-cancelAnOrder'] } }, { diff --git a/src/app/routes/order-management/modal/audit/appeal/appeal.component.html b/src/app/routes/order-management/modal/audit/appeal/appeal.component.html index d3e53fd1..6e717730 100644 --- a/src/app/routes/order-management/modal/audit/appeal/appeal.component.html +++ b/src/app/routes/order-management/modal/audit/appeal/appeal.component.html @@ -1,7 +1,48 @@ + - - +
+ + + {{ dataList?.representationsStatusLabel }} + + +
+
+ {{ item?.complianceName }} +
+
+
+ + {{ dataList?.representationsCause }} + + + {{ dataList?.representationsDescribe }} + + +
+ + +
+
+
+
diff --git a/src/app/routes/order-management/modal/audit/appeal/appeal.component.ts b/src/app/routes/order-management/modal/audit/appeal/appeal.component.ts index 9a7eada4..451a3796 100644 --- a/src/app/routes/order-management/modal/audit/appeal/appeal.component.ts +++ b/src/app/routes/order-management/modal/audit/appeal/appeal.component.ts @@ -22,11 +22,8 @@ import { OrderManagementService } from '../../../services/order-management.servi templateUrl: './appeal.component.html' }) export class OneCarOrderAppealComponent implements OnInit { - record: any = {}; i: any; - @ViewChild('sf', { static: false }) sf!: SFComponent; - schema: SFSchema = {}; - ui: SFUISchema = {}; + dataList: any; constructor( private modalRef: NzModalRef, private modal: NzModalService, @@ -36,93 +33,88 @@ export class OneCarOrderAppealComponent implements OnInit { ) {} ngOnInit(): void { - this.initSF(); + this.initDate(); } - initSF() { - this.schema = { - properties: { - abnormalCause: { - type: 'string', - title: '异常原因', - default: this.i.abnormalCause, - readOnly: true, - ui: { - widget: 'textarea', - autosize: { minRows: 4, maxRows: 6 } - } as SFTextareaWidgetSchema - }, - representationsCause: { - type: 'string', - title: '申诉原因', - ui: { - widget: 'dict-select', - params: { dictKey: 'bill:representation:reason' }, - containsAllLabel: false, - placeholder: '请选择', - errors: { required: '请选择' } - } - }, - representationsDescribe: { - type: 'string', - title: '申诉描述', - maxLength: 100, - ui: { - widget: 'textarea', - autosize: { minRows: 4, maxRows: 6 } - } as SFTextareaWidgetSchema - }, - fileArr: { - type: 'string', - title: '上传凭证', - ui: { - action: apiConf.fileUpload, - accept: 'image/png,image/jpeg,image/jpg', - limit: 5, - limitFileCount: 5, - resReName: 'data.fullFilePath', - urlReName: 'data.fullFilePath', - widget: 'upload', - descriptionI18n: '不超过5张,单张大小不超过5M,支持.jpg、.jpeg和 .png格式', - name: 'multipartFile', - multiple: true, - listType: 'picture-card', - beforeUpload: (file: any, _fileList: any) => { - return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 5; - if (!isLt2M) { - this.service.msgSrv.warning('图片大小超过5M!'); - observer.complete(); - return; - } - observer.next(isLt2M); - observer.complete(); - }); - } - } as SFUploadWidgetSchema - } - }, - required: ['representationsCause', 'representationsDescribe'] - }; - this.ui = { - '*': { - spanLabelFixed: 100, - grid: { span: 20 } + // initSF() { + // this.schema = { + // properties: { + // abnormalCause: { + // type: 'string', + // title: '异常原因', + // default: this.i.abnormalCause, + // readOnly: true, + // ui: { + // widget: 'textarea', + // autosize: { minRows: 4, maxRows: 6 } + // } as SFTextareaWidgetSchema + // }, + // representationsCause: { + // type: 'string', + // title: '申诉原因', + // ui: { + // widget: 'dict-select', + // params: { dictKey: 'bill:representation:reason' }, + // containsAllLabel: false, + // placeholder: '请选择', + // errors: { required: '请选择' } + // } + // }, + // representationsDescribe: { + // type: 'string', + // title: '申诉描述', + // maxLength: 100, + // ui: { + // widget: 'textarea', + // autosize: { minRows: 4, maxRows: 6 } + // } as SFTextareaWidgetSchema + // }, + // fileArr: { + // type: 'string', + // title: '上传凭证', + // ui: { + // action: apiConf.fileUpload, + // accept: 'image/png,image/jpeg,image/jpg', + // limit: 5, + // limitFileCount: 5, + // resReName: 'data.fullFilePath', + // urlReName: 'data.fullFilePath', + // widget: 'upload', + // descriptionI18n: '不超过5张,单张大小不超过5M,支持.jpg、.jpeg和 .png格式', + // name: 'multipartFile', + // multiple: true, + // listType: 'picture-card', + // beforeUpload: (file: any, _fileList: any) => { + // return new Observable((observer: Observer) => { + // const isLt2M = file.size / 1024 / 1024 < 5; + // if (!isLt2M) { + // this.service.msgSrv.warning('图片大小超过5M!'); + // observer.complete(); + // return; + // } + // observer.next(isLt2M); + // observer.complete(); + // }); + // } + // } as SFUploadWidgetSchema + // } + // }, + // required: ['representationsCause', 'representationsDescribe'] + // }; + // this.ui = { + // '*': { + // spanLabelFixed: 100, + // grid: { span: 20 } + // } + // }; + // } + initDate(): void { + console.log(this.i); + this.service.request(this.service.$api_get_getOrderComplaintDetail, { id: this.i?.id }).subscribe((res: any) => { + if (res) { + console.log(res); + this.dataList = res } - }; - } - save(value: any): void { - // if (!this.sf.valid){ - // this.sf.validator({ emitError: true }); - // return; - // } - // this.service.request(this.service.$api_addCompleteVehicleRepresentations, { id: this.i?.id, ...this.sf.value }).subscribe(res => { - // if (res) { - // this.service.msgSrv.success('申诉成功!'); - // this.modalRef.close(true); - // } else { - // this.service.msgSrv.error(res.msg); - // } - // }); + }); } close(): void { diff --git a/src/app/routes/order-management/services/order-management.service.ts b/src/app/routes/order-management/services/order-management.service.ts index 68e977d5..0292cef2 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 15:31:52 * @LastEditors : Shiming - * @LastEditTime : 2022-03-22 17:29:07 + * @LastEditTime : 2022-03-25 15:27:40 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -174,6 +174,8 @@ export class OrderManagementService extends ShipperBaseService { $api_get_getTrajectory = `/api/sdc/billShipper/getTrajectoryByBillId`; // 获取订单司机轨迹 $api_get_getAppDriverPosition = `/api/sdc/billShipper/getAppDriverPosition`; + // 查看申述记录 + $api_get_getOrderComplaintDetail = `/api/sdc/billOperate/getOrderComplaintDetail`; /** * 根据企业ID,获取企业历史网络货运人 * @returns diff --git a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html index 4df4ab9b..bd95c61e 100644 --- a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.html @@ -1,4 +1,10 @@ - + + + + + diff --git a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts index 8ad008d2..14efa97f 100644 --- a/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts +++ b/src/app/routes/partner/partner-list/components/add-etp-partner/add-etp-partner.component.ts @@ -11,7 +11,7 @@ import { } from '@delon/form'; import { NzTreeNode } from 'ng-zorro-antd/tree'; import { NzUploadFile } from 'ng-zorro-antd/upload'; -import { of } from 'rxjs'; +import { of, Subscription } from 'rxjs'; import { map } from 'rxjs/operators'; import { PartnerListService } from '../../services/partner-list.service'; @@ -64,6 +64,9 @@ export class AddEtpPartnerComponent { } }; + getIdentityInfoSub = new Subscription(); + loadingIdentityInfoSub = false; + constructor(public service: PartnerListService) {} submitForm() { @@ -426,7 +429,28 @@ export class AddEtpPartnerComponent { ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入企业管理员手机号', - errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' } + errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' }, + change: (mobile: any) => { + // 根据手机号获取实名信息 + if (mobile?.length === 11) { + if (this.loadingIdentityInfoSub) { + this.getIdentityInfoSub.unsubscribe(); + } + this.loadingIdentityInfoSub = true; + this.getIdentityInfoSub = this.service.request(this.service.$api_get_identityInfo_by_mobile, { mobile }).subscribe( + res => { + if (res) { + this.setInfo(res); + this.sf.setValue('/adminUserInfo/id', res.id); + this.sf.setValue('/adminUserInfo/userId', res.userId); + } + this.loadingIdentityInfoSub = false; + }, + _ => {}, + () => (this.loadingIdentityInfoSub = false) + ); + } + } } }, // 企业管理员信息 @@ -441,6 +465,8 @@ export class AddEtpPartnerComponent { }, default: true }, + id: { title: '', type: 'string', ui: { hidden: true } }, + userId: { title: '', type: 'string', ui: { hidden: true } }, certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, certificatePhotoFrontWatermark: { @@ -589,4 +615,52 @@ export class AddEtpPartnerComponent { ] }; } + + private setInfo(info: any) { + if (info.name) { + this.sf.setValue('/adminUserInfo/name', info.name); + } + if (info.certificatePhotoFront) { + this.sf.setValue('/adminUserInfo/certificatePhotoFront', info.certificatePhotoFront); + } + if (info.certificatePhotoFrontWatermark) { + console.log(this.sf.getProperty('/adminUserInfo/certificatePhotoFrontWatermark')); + + this.sf.setValue('/adminUserInfo/certificatePhotoFrontWatermark', [ + { + uid: -1, + name: '文件', + status: 'done', + url: info.certificatePhotoFrontWatermark, + response: info.certificatePhotoFrontWatermark + } + ]); + } + if (info.certificatePhotoBack) { + this.sf.setValue('/adminUserInfo/certificatePhotoBack', info.certificatePhotoBack); + } + if (info.certificatePhotoBackWatermark) { + this.sf.setValue('/adminUserInfo/certificatePhotoBackWatermark', [ + { + uid: -1, + name: '文件', + status: 'done', + url: info.certificatePhotoBackWatermark, + response: info.certificatePhotoBackWatermark + } + ]); + } + if (info.certificateNumber) { + this.sf.setValue('/adminUserInfo/certificateNumber', info.certificateNumber); + } + if (info.validStartTime) { + this.sf.setValue('/adminUserInfo/validStartTime', info.validStartTime); + } + if (info.validEndTime) { + this.sf.setValue('/adminUserInfo/validEndTime', info.validEndTime); + this.sf.setValue('/adminUserInfo/_isLoingDate', false); + } else { + this.sf.setValue('/adminUserInfo/_isLoingDate', true); + } + } } diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html index cb94b51b..7a071adc 100644 --- a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.html @@ -1,4 +1,10 @@ - + + + + + @@ -36,7 +42,8 @@
- +
-
+
\ No newline at end of file diff --git a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts index eca02366..d21416e3 100644 --- a/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts +++ b/src/app/routes/partner/partner-list/components/add-personal-partner/add-personal-partner.component.ts @@ -12,7 +12,7 @@ import { } from '@delon/form'; import { NzTreeNode } from 'ng-zorro-antd/tree'; import { NzUploadFile } from 'ng-zorro-antd/upload'; -import { of } from 'rxjs'; +import { of, Subscription } from 'rxjs'; import { map } from 'rxjs/operators'; import { PartnerListService } from '../../services/partner-list.service'; @@ -65,6 +65,9 @@ export class AddPersonalPartnerComponent { } }; + getIdentityInfoSub = new Subscription(); + loadingIdentityInfoSub = false; + constructor(private router: Router, public service: PartnerListService) {} submitForm() { @@ -156,7 +159,28 @@ export class AddPersonalPartnerComponent { ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入手机号', - errors: { required: '请输入手机号', format: '手机号格式错误' } + errors: { required: '请输入手机号', format: '手机号格式错误' }, + change: (mobile: any) => { + // 根据手机号获取实名信息 + if (mobile?.length === 11) { + if (this.loadingIdentityInfoSub) { + this.getIdentityInfoSub.unsubscribe(); + } + this.loadingIdentityInfoSub = true; + this.getIdentityInfoSub = this.service.request(this.service.$api_get_identityInfo_by_mobile, { mobile }).subscribe( + res => { + if (res) { + this.setInfo(res); + this.sf.setValue('/adminUserInfo/id', res.id); + this.sf.setValue('/adminUserInfo/userId', res.userId); + } + this.loadingIdentityInfoSub = false; + }, + _ => {}, + () => (this.loadingIdentityInfoSub = false) + ); + } + } } }, // 合伙人信息 @@ -172,6 +196,8 @@ export class AddPersonalPartnerComponent { default: true }, certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } }, + id: { title: '', type: 'string', ui: { hidden: true } }, + userId: { title: '', type: 'string', ui: { hidden: true } }, certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } }, certificateType: { title: '', type: 'string', ui: { hidden: true }, default: 0 }, certificatePhotoFrontWatermark: { @@ -311,4 +337,52 @@ export class AddPersonalPartnerComponent { required: ['cityCodesList', 'invitationCode'] }; } + + private setInfo(info: any) { + if (info.name) { + this.sf.setValue('/adminUserInfo/name', info.name); + } + if (info.certificatePhotoFront) { + this.sf.setValue('/adminUserInfo/certificatePhotoFront', info.certificatePhotoFront); + } + if (info.certificatePhotoFrontWatermark) { + console.log(this.sf.getProperty('/adminUserInfo/certificatePhotoFrontWatermark')); + + this.sf.setValue('/adminUserInfo/certificatePhotoFrontWatermark', [ + { + uid: -1, + name: '文件', + status: 'done', + url: info.certificatePhotoFrontWatermark, + response: info.certificatePhotoFrontWatermark + } + ]); + } + if (info.certificatePhotoBack) { + this.sf.setValue('/adminUserInfo/certificatePhotoBack', info.certificatePhotoBack); + } + if (info.certificatePhotoBackWatermark) { + this.sf.setValue('/adminUserInfo/certificatePhotoBackWatermark', [ + { + uid: -1, + name: '文件', + status: 'done', + url: info.certificatePhotoBackWatermark, + response: info.certificatePhotoBackWatermark + } + ]); + } + if (info.certificateNumber) { + this.sf.setValue('/adminUserInfo/certificateNumber', info.certificateNumber); + } + if (info.validStartTime) { + this.sf.setValue('/adminUserInfo/validStartTime', info.validStartTime); + } + if (info.validEndTime) { + this.sf.setValue('/adminUserInfo/validEndTime', info.validEndTime); + this.sf.setValue('/adminUserInfo/_isLoingDate', false); + } else { + this.sf.setValue('/adminUserInfo/_isLoingDate', true); + } + } } diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.html b/src/app/routes/partner/partner-list/components/index/partner-list.component.html index 4d21c024..ff6f4383 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.html +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.html @@ -33,7 +33,7 @@
- {{selectItem?.enterpriseName}} + {{selectItem?.enterpriseName || selectItem?.contactName}} @@ -47,28 +47,29 @@
- 深圳某某有限公司 - 张三/13999999999 + {{selectItem?.enterpriseName || selectItem?.contactName}} + {{selectItem?.channelId}} - + - +

已选(0)

+ ]" [req]="{ process: beforeReq,params:{effectiveStatus:2 ,newPartnerId:selectItem.id} }" + [loading]="service.http.loading" [page]="{show:false}" (change)="stChange($event)">
- - - + + +
diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.less b/src/app/routes/partner/partner-list/components/index/partner-list.component.less deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts index 5b5c457e..2e47723a 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts @@ -31,6 +31,8 @@ export class PartnerListComponent { editCannel: any; customers: any[] = []; cannels: any[] = []; + selectedRows: any[] = []; + cannelItem: any = { channelId: null, effectiveNode: 1, enterpriseIdList: [], remark: '' }; selectItem: any = {}; @@ -49,7 +51,7 @@ export class PartnerListComponent { return requestOptions; }; - loadSelectOptions(){ + loadSelectOptions() { this.service.getRebateConfig().subscribe(res => { if (res) { this.customers = res; @@ -57,7 +59,7 @@ export class PartnerListComponent { }); this.service.getChannel().subscribe(res => { if (res) { - this.customers = res; + this.cannels = res; } }); } @@ -66,13 +68,14 @@ export class PartnerListComponent { const modal = this.nzModalService.create({ nzTitle: '审核', nzContent: PartnerAuditModalComponent, - nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName } }, + nzComponentParams: { info: { ...item, enterpriseName: item.enterpriseName || item.contactName }, sourcePage: '合伙人审核列表' }, nzFooter: null }); } editTemplateAction(item: any) { this.selectItem = item; + this.templateId = item.templateId || null; const modal = this.nzModalService.create({ nzTitle: '修改返佣模板', nzContent: this.editTemplate, @@ -87,7 +90,7 @@ export class PartnerListComponent { }); } - confirmEditTemplate() { + private confirmEditTemplate() { const modal = this.nzModalService.confirm({ nzTitle: '确定要修改返佣模板吗?', nzOnOk: () => { @@ -107,15 +110,39 @@ export class PartnerListComponent { }); } + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + break; + } + } + editCannelAction(item: any) { this.selectItem = item; - const modal = this.nzModalService.create({ - nzTitle: '修改渠道销售', - nzWidth: 650, - nzContent: this.editCannel, - nzOnOk: () => { - this.confirmEditCannel(item); - return false; + this.cannelItem = { channelId: null, effectiveNode: 1, enterpriseIdList: [], remark: '' }; + this.selectedRows = []; + // 校验合伙人是否可修改渠道销售 true:可以修改 false:不可以修改 + this.service.request(this.service.$api_check_partenr_change_channel, { id: item.id }).subscribe(res => { + if (res) { + this.selectItem = item; + const modal = this.nzModalService.create({ + nzTitle: '修改渠道销售', + nzWidth: 650, + nzContent: this.editCannel, + nzOnOk: () => { + if (!this.cannelItem.channelId) { + this.service.msgSrv.warning('请选择渠道销售'); + return false; + } + if (!this.cannelItem.remark) { + this.service.msgSrv.warning('请填写备注'); + return false; + } + this.confirmEditCannel(item); + return false; + } + }); } }); } @@ -124,7 +151,18 @@ export class PartnerListComponent { const modal = this.nzModalService.confirm({ nzTitle: '确定提交吗?', nzOnOk: () => { - this.nzModalService.closeAll(); + this.cannelItem.enterpriseIdList = this.selectedRows.map(row => row.id); + this.service + .request(this.service.$api_update_partner_channel_by_id, { + ...this.cannelItem, + id: item.id + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('修改成功'); + this.nzModalService.closeAll(); + } + }); } }); } @@ -321,15 +359,20 @@ export class PartnerListComponent { private initST(): STColumn[] { return [ - { title: '合伙人名称', index: 'enterpriseName', width: 180, format: item => `${item.enterpriseName || item.contactName}` }, + { + title: '合伙人名称', + index: 'enterpriseName', + width: 180, + format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') + }, { title: '付款编码', index: 'payCode', width: 160 }, { title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 }, - { title: '企业管理员', index: 'contactName', width: 150 }, + { title: '企业管理员', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') }, { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '注册渠道', index: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, width: 130 }, { title: '注册时间', index: 'createTime', className: 'text-center', width: 170 }, - { title: '渠道销售', index: 'channelId', width: 170 }, + { title: '渠道销售', index: 'channelIdLabel', width: 170 }, { title: '返佣模板', index: 'templateName', width: 150 }, { title: '认证审核状态', @@ -337,7 +380,7 @@ export class PartnerListComponent { width: 150, type: 'badge', badge: { - 0: { text: '草稿', color: 'default' }, + '-1': { text: '未提交', color: 'default' }, 10: { text: '待审核', color: 'processing' }, 20: { text: '审核通过', color: 'success' }, 30: { text: '驳回', color: 'error' } @@ -385,7 +428,13 @@ export class PartnerListComponent { buttons: [ { type: 'divider' }, { - text: '详情', + text: '审核', + iif: item => item.id && item.approvalStatus === 10, + click: item => this.auditPartner(item) + }, + { + text: '详情
', + iif: item => item.id, click: item => { if (item.partnerType === 1) { this.router.navigate([`/partner/partner-list/etp-detail/${item.id}`]); @@ -394,21 +443,20 @@ export class PartnerListComponent { } } }, - { - text: '审核
', - click: item => this.auditPartner(item) - }, { text: '修改返佣模板', + iif: item => item.id, click: item => this.editTemplateAction(item) }, { text: '修改渠道销售', + iif: item => item.id, click: item => this.editCannelAction(item) }, { text: '重发CRM流程', - click: item => this.reSendCRM(item) + click: item => item.id && this.reSendCRM(item), + iif: item => item.crmStatus === 10 } ] } diff --git a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts index 8c2586a8..6e271d70 100644 --- a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts +++ b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts @@ -14,6 +14,7 @@ export class PartnerAuditModalComponent implements OnInit { @Input() info: any; schema!: SFSchema; + sourcePage = ''; constructor(private nzModalService: NzModalService, public service: PartnerListService) {} ngOnInit(): void { @@ -53,13 +54,11 @@ export class PartnerAuditModalComponent implements OnInit { channelId: { title: '渠道销售', type: 'string', - enum: [ - { value: true, label: '通过' }, - { value: false, label: '驳回' } - ], ui: { widget: 'select', placeholder: '请选择', + allowClear: true, + asyncData: () => this.service.getChannel(), hidden: this.info.isPass === false, visibleIf: { status: value => value @@ -115,7 +114,8 @@ export class PartnerAuditModalComponent implements OnInit { .request(this.service.$api_audit_partner, { auditStatusEnum: params.auditStatusEnum, id: params.id, - approvalOpinion: params.approvalOpinion + approvalOpinion: params.approvalOpinion, + sourcePage: this.sourcePage }) .subscribe(res => { if (res) { diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html index 777d019f..c4abbd48 100644 --- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.html @@ -40,7 +40,7 @@ - + @@ -87,8 +87,9 @@ [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> - + + {{detailData.adminUserInfo.mobile}} - - + 修改渠道销售记录 + [req]="{params:{partnerId:route.snapshot.params.id}}" [loading]="service.http.loading" bordered size="small" + [page]="{ show: false }" [scroll]="{ x: '1200px' }"> @@ -316,13 +319,15 @@ -

转移客户数:10

- +

转移客户数:{{changeST?.total}}

+ -

不转移客户数:10

- +

不转移客户数:{{noChangeST?.total}}

+

客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,修改成功后,修改时间也是合伙人与客户的结算结束时间,成为原来渠道销售的直客。 diff --git a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts index 94b4c869..61559772 100644 --- a/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts +++ b/src/app/routes/partner/partner-list/components/partner-detail/partner-detail.component.ts @@ -47,7 +47,7 @@ export class PartnerDetailComponent implements OnInit, OnDestroy { subscribeScoll!: Subscription; constructor( public service: PartnerListService, - private route: ActivatedRoute, + public route: ActivatedRoute, private nzModalService: NzModalService, private datePipe: DatePipe ) {} @@ -138,7 +138,7 @@ export class PartnerDetailComponent implements OnInit, OnDestroy { const modal = this.nzModalService.create({ nzTitle: '审核', nzContent: PartnerAuditModalComponent, - nzComponentParams: { info: { ...this.detailData, isPass } }, + nzComponentParams: { info: { ...this.detailData, isPass },sourcePage:'合伙人审核详情' }, nzFooter: null }); } @@ -366,13 +366,13 @@ export class PartnerDetailComponent implements OnInit, OnDestroy { private initST(): { logsColumn: STColumn[]; changeColumn: STColumn[]; beChangeColumn: STColumn[] } { return { logsColumn: [ - { title: '修改后渠道销售', index: 'newChannelName', width: 180 }, - { title: '修改前渠道销售', index: 'originalChannelName', width: 160 }, + { title: '修改后渠道销售', index: 'newChannelIdLabel', width: 180 }, + { title: '修改前渠道销售', index: 'originalChannelIdLabel', width: 160 }, { title: '转移客户数', index: 'quantity', className: 'text-center', width: 130 }, { title: '生效节点', index: 'effectiveNode', width: 150, type: 'enum', enum: { 1: '立即生效', 2: 'CRM审核后生效' } }, { title: '备注', index: 'remark', className: 'text-center', width: 150 }, - { title: '修改时间', index: 'effectiveTime', className: 'text-center', width: 130, type: 'date' }, - { title: '操作人', index: 'modifyUserId', width: 130 }, + { title: '修改时间', index: 'effectiveTime', className: 'text-center', width: 180, type: 'date' }, + { title: '操作人', index: 'modifyUserIdLabel', width: 180 }, { title: '操作', fixed: 'right', diff --git a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html index aa2b1e32..96041864 100644 --- a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html +++ b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.html @@ -40,7 +40,7 @@ - + diff --git a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts index c6da1adc..6ee8f6d5 100644 --- a/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts +++ b/src/app/routes/partner/partner-list/components/personal-partner-detail/personal-partner-detail.component.ts @@ -113,7 +113,10 @@ export class PersonalPartnerDetailComponent implements OnInit { const modal = this.nzModalService.create({ nzTitle: '审核', nzContent: PartnerAuditModalComponent, - nzComponentParams: { info: { ...this.detailData, isPass, enterpriseName: this.detailData.adminUserInfo?.name } }, + nzComponentParams: { + info: { ...this.detailData, isPass, enterpriseName: this.detailData.adminUserInfo?.name }, + sourcePage: '合伙人审核详情' + }, nzFooter: null }); } diff --git a/src/app/routes/partner/partner-list/services/partner-list.service.ts b/src/app/routes/partner/partner-list/services/partner-list.service.ts index 77ba94b4..5a00d758 100644 --- a/src/app/routes/partner/partner-list/services/partner-list.service.ts +++ b/src/app/routes/partner/partner-list/services/partner-list.service.ts @@ -23,12 +23,20 @@ export class PartnerListService extends ShipperBaseService { $api_update_partner_template = '/api/mdc/partner/updateTemplate'; // 更新渠道销售 $api_update_partner_channel = '/api/mdc/partner/updateChannelSale'; + // 更新渠道销售 + $api_update_partner_channel_by_id = '/api/mdc/partner/updateChannelSaleByID'; // 重新发起CRM $api_resend_crm = '/api/mdc/partner/reSendCrm'; // 查询合伙人修改渠道渠道销售记录 $api_get_personal_channel_list = '/api/mdc/partnerChannelRelLog/list/page'; // 查询客户关系列表-不分页 - $api_get_enterprice_rel_list = '/api/mdc/enterpriceRelLog/list'; + $api_get_enterprice_rel_list = '/api/mdc/EnterpriseRelLog/list'; + // 校验合伙人是否可修改渠道销售 true:可以修改 false:不可以修改 + $api_check_partenr_change_channel = '/api/mdc/partner/updateChannelCheck'; + // 根据手机号查询实名信息 + $api_get_identityInfo_by_mobile= '/api/mdc/cuc/identityInfo/getByMobile'; + // 渠道销售修改详情 + $api_get_partner_change_list = '/api/mdc/partnerChannelRelLog/partnerChannelUpdateDetaiList'; // 冻结/启用企业业 $api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock'; diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.html b/src/app/routes/supply-management/components/bulk/bulk.component.html index 3061d17c..570e07f3 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.html +++ b/src/app/routes/supply-management/components/bulk/bulk.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-04 15:45:58 + * @LastEditTime : 2022-03-25 16:51:13 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -86,7 +86,7 @@ {{ item?.resourceCode }}

{{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel }}
-
{{ item?.resourceStatusLabel }}
+
{{ item?.resourceStatusLabel === '已完成' ? '已完结' : item?.resourceStatusLabel }}
diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts index 5456947b..a334b188 100644 --- a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts @@ -1,7 +1,15 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STComponent, STColumn, STChange } from '@delon/abc/st'; -import { SFCascaderWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { + SFCascaderWidgetSchema, + SFComponent, + SFRadioWidgetSchema, + SFSchema, + SFSchemaEnum, + SFSelectWidgetSchema, + SFUISchema +} from '@delon/form'; import { DynamicSettingModalComponent, SinglepageSettingModalComponent } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; @@ -32,10 +40,10 @@ export class NetworkFreightComponent implements OnInit { ticketSchema: SFSchema = {}; TaxSchema: SFSchema = {}; NCSchema: SFSchema = {}; - _$expand :boolean= false; - taxStatus :boolean= false; - TicketStatus :boolean= true; - NCStatus :boolean = false; + _$expand: boolean = false; + taxStatus: boolean = false; + TicketStatus: boolean = true; + NCStatus: boolean = false; formData: any; ticketId: any; ticketItem: any; @@ -117,29 +125,28 @@ export class NetworkFreightComponent implements OnInit { fixed: 'right', className: 'text-center', buttons: [ + { type: 'divider' }, { - text: '基础设置', + text: '基础设置
', click: item => this.creat(item) }, { - text: '财务设置', + text: '财务设置
', click: item => this.ticket(item) }, { - text: '充值账户', + text: '充值账户
', click: item => this.settingPay(item) }, { - text: '应用设置', + text: '应用设置
', click: item => this.settingApp(item) }, { - text: '系统配置', + text: '系统配置
', click: item => this.settingAction(item) }, - { type: 'divider' }, - // { // text: '合同设置', // click: item => this.roleAction(item, 2) @@ -337,9 +344,9 @@ export class NetworkFreightComponent implements OnInit { 'drawer' ] }; - this.ui3 = { - '*': { spanLabelFixed: 150, grid: { span: 24 } }, - '$taxClassificationVersion': { spanLabelFixed: 150, grid: { span: 24 } }, + this.ui3 = { + '*': { spanLabelFixed: 150, grid: { span: 24 } }, + $taxClassificationVersion: { spanLabelFixed: 150, grid: { span: 24 } } }; } initSFTax() { @@ -377,7 +384,7 @@ export class NetworkFreightComponent implements OnInit { let str = q.replace(/^\s+|\s+$/g, ''); if (str) { console.log(str); - + return this.service .request(this.service.$api_get_crmCustomer_page, { customerName: str }) .pipe(map((res: any) => (res.records as any[]).map(i => ({ label: i.customerName, value: i.id } as SFSchemaEnum)))) @@ -387,12 +394,11 @@ export class NetworkFreightComponent implements OnInit { } } } as SFSelectWidgetSchema - }, + } }, required: ['crmCustomerId'] }; this.ui5 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; - } initSFFre() { this.addSchema = { @@ -444,16 +450,16 @@ export class NetworkFreightComponent implements OnInit { this.formDataNC = []; this.formDataTax = []; this.ticketItem = value; - this.taxStatus = false - this.TicketStatus = true - this.NCStatus = false + this.taxStatus = false; + this.TicketStatus = true; + this.NCStatus = false; this.initSFTax(); this.initSFNC(); this.initSFTicket(); this.NCID = value.id; - if(this.TicketStatus) { + if (this.TicketStatus) { console.log('9999999'); - + this.service.request(this.service.$api_getTicketByNetworkTransporterId, { id: value.id }).subscribe((res: any) => { console.log(res); if (res) { @@ -466,8 +472,8 @@ export class NetworkFreightComponent implements OnInit { } }); } - if(this.NCStatus) { - this.getNcSetData() + if (this.NCStatus) { + this.getNcSetData(); } this.isVisibleTicket = true; } @@ -477,12 +483,12 @@ export class NetworkFreightComponent implements OnInit { this.service.request(this.service.$api_get_crmCustomer, { id: this.ticketItem.crmCustomerId }).subscribe((res: any) => { console.log(res); if (res) { - List.push({ label: res.customerName, value: res.id }); - console.log(List); - - this.sfNC.getProperty('/crmCustomerId')!.schema.enum = List; - this.sfNC.getProperty('/crmCustomerId')!.widget.reset(List); - this.sfNC.setValue('/crmCustomerId', res?.id); + List.push({ label: res.customerName, value: res.id }); + console.log(List); + + this.sfNC.getProperty('/crmCustomerId')!.schema.enum = List; + this.sfNC.getProperty('/crmCustomerId')!.widget.reset(List); + this.sfNC.setValue('/crmCustomerId', res?.id); } }); } @@ -493,7 +499,7 @@ export class NetworkFreightComponent implements OnInit { regioin?.forEach((element: any) => { enterpriseAddressCode.push(Number(element)); }); - if(this.TicketStatus) { + if (this.TicketStatus) { this.sfTicket.setValue('/senderRegionCode', enterpriseAddressCode); return enterpriseAddressCode; } @@ -587,11 +593,11 @@ export class NetworkFreightComponent implements OnInit { this.isVisibleTicket = false; } handleOKTicket() { - console.log( this.taxStatus, this.TicketStatus,this.NCStatus); - if(this.TicketStatus) { + console.log(this.taxStatus, this.TicketStatus, this.NCStatus); + if (this.TicketStatus) { console.log(this.sfTicket); console.log(this.sfTicket.value); - + if (!this.sfTicket.valid) { this.service.msgSrv.warning('请正确填写完整!'); return; @@ -611,11 +617,11 @@ export class NetworkFreightComponent implements OnInit { this.st.reload(1); } }); - } else if(this.NCStatus){ + } else if (this.NCStatus) { console.log(this.sfNC); console.log(this.formDataNC); console.log(this.sfNC?.value); - + if (!this.sfNC.valid) { this.service.msgSrv.warning('请正确填写完整!'); return; @@ -636,7 +642,6 @@ export class NetworkFreightComponent implements OnInit { }); // api_setCrmCustomer } - } handleOK() { @@ -674,12 +679,12 @@ export class NetworkFreightComponent implements OnInit { this.taxStatus = true; this.TicketStatus = false; this.NCStatus = false; - } else if (value.name === '开票设置'){ + } else if (value.name === '开票设置') { this.TicketStatus = true; this.NCStatus = false; this.taxStatus = false; - } else if (value.name === 'NC设置'){ - this.getNcSetData() + } else if (value.name === 'NC设置') { + this.getNcSetData(); this.NCStatus = true; this.TicketStatus = false; this.taxStatus = false; diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html index c2b8daca..c31db228 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html @@ -65,7 +65,7 @@

开户行: {{openInfo?.artobank}}

- {{openInfo?.vatname}} + {{openInfo?.vatnameLable}} {{openInfo?.vatremarks}} 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 e2e9009e..be6850ef 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 @@ -2,9 +2,11 @@ import { CurrencyPipe } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; -import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema } from '@delon/form'; +import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema, SFSchemaEnum } from '@delon/form'; import { dateTimePickerUtil } from '@delon/util'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { of } from 'rxjs'; +import { map } from 'rxjs/operators'; import { TicketService } from '../../services/ticket.service'; import { RequestedInvoiceModalComponent } from '../invoice-requested/requested-invoice-modal/requested-invoice-modal.component'; import { PushInvoiceComponent } from './push-invoice/push-invoice.component'; @@ -257,13 +259,16 @@ export class CancellationInvoiceComponent implements OnInit { placeholder: '请输入' } }, - receiveName2: { + arto: { type: 'string', title: '购买人', - enum: [{ label: '全部', value: '全部' }], ui: { widget: 'select', - placeholder: '请选择' + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', + allowClear: true, + onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }) } }, ltdId: { @@ -280,7 +285,7 @@ export class CancellationInvoiceComponent implements OnInit { } }, sts: { - title: '结算依据', + title: '发票状态', type: 'string', ui: { widget: 'dict-select', diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html index 3a5ab163..14f0808f 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html @@ -19,13 +19,13 @@ {{headerInfo?.vatinvHNum}} / {{headerInfo?.vatinvBillNum}} - {{headerInfo?.vatinvHAmount}} / {{headerInfo?.vatinvHNumAmount}} + {{headerInfo?.vatinvHAmount |currency}} / {{headerInfo?.vatinvHNumAmount |currency}} {{headerInfo?.vatinvHNum}} - {{headerInfo?.reciname}} + {{headerInfo?.reciname}} {{headerInfo?.provinceName}}{{headerInfo?.cityName}}{{headerInfo?.areaName}}{{headerInfo?.reciaddr}} @@ -101,13 +101,13 @@ 已选择 {{ selectedRows.length }} 条数据   开票金额总计 {{ - totalCallNo }} + totalCallNo |currency }} 清空
- {{ item.billHCode }} diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts index f1c5e073..a21104a4 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts @@ -90,7 +90,7 @@ export class InvoiceRequestedComponent { return false; } let ids = item.map(row => row.id); - this.service.request(this.service.$api_reject_invoice, ids).subscribe(res => { + this.service.request(this.service.$api_reject_invoice, { id: ids, rejectContent: this.rejectReason }).subscribe(res => { if (res) { this.service.msgSrv.success('驳回成功'); modal.destroy(true); @@ -133,7 +133,7 @@ export class InvoiceRequestedComponent { this.service .request(this.service.$api_update_invoice_address, { ...component.sf.value, - + ids: item.map(i => i.id) }) .subscribe(res => { if (res) { @@ -244,7 +244,7 @@ export class InvoiceRequestedComponent { requestedInvoiceAction(item: any) { const modal = this.nzModalService.create({ - nzTitle: '开票', + nzTitle: '开票受理', nzContent: RequestedInvoiceModalComponent, nzWidth: 1200, nzComponentParams: { @@ -385,12 +385,14 @@ export class InvoiceRequestedComponent { title: '货主名称', ui: { widget: 'select', - placeholder: '请选择', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', allowClear: true, + onSearch: (q: any) => this.service.getEnterpriceList({ enterpriseName: q }), visibleIf: { expand: (value: boolean) => value - }, - asyncData: () => this.service.getCRM() + } } } } diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.html b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.html index 40730c41..737e5eef 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.html @@ -38,7 +38,7 @@ {{headerInfo?.ordlines}} - {{headerInfo?.vatinvHNumAmount}} + {{headerInfo?.vatinvHNumAmount | currency}} {{headerInfo?.vatnameLabel}} diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.ts index 8fa4924e..675783d0 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.ts @@ -32,7 +32,6 @@ export class RequestedDetailComponent implements OnInit { initData() { if(this.id) { this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.id }).subscribe(res => { - console.log(res); if (res) { this.headerInfo = res; } @@ -40,7 +39,6 @@ export class RequestedDetailComponent implements OnInit { } if(this.Id) { this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.Id }).subscribe(res => { - console.log(res); if (res) { this.headerInfo = res; } diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.ts b/src/app/routes/usercenter/components/driver/detail/detail.component.ts index 98c51cc2..6dcce146 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.ts @@ -8,8 +8,10 @@ import { ModalHelper, _HttpClient } from '@delon/theme'; import { NzImageService } from 'ng-zorro-antd/image'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { Subject } from 'rxjs'; import { ImageViewComponent } from 'src/app/shared/components/imagelist'; import { UsermanageService } from '../../../services/usercenter.service'; +import { debounceTime } from 'rxjs/operators'; @Component({ selector: 'app-usercenter-components-driver-detail', @@ -21,6 +23,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { detailData: any; userDetail: any; contencarModel: any; + changeSub = new Subject(); facetext: any; faceStatus: any = 0; userIdentityDetail: any = {}; @@ -73,6 +76,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { ngOnInit() { this.initData(); this.initDetailByCode(); + this.changeEndKmAction() } initData() { // 获取司机头部信息 @@ -209,17 +213,21 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { nzTitle: '审核通过', nzContent: `

驾驶证号:${this.driverDetail?.licenseNo}

从业资格证号:${this.licenseDetail?.licenseNo}

是否确认通过审核`, nzOnOk: () => { - this.adjuctDriverLicense( - { - approvalStatus: 20, - appUserId: this.userDetail?.appUserId - }, - '审核成功' - ); + this.changeEndKmAction() } }); } - + changeEndKmAction() { + this.changeSub.pipe(debounceTime(500)).subscribe((res: string) => { + this.adjuctDriverLicense( + { + approvalStatus: 20, + appUserId: this.userDetail?.appUserId + }, + '审核成功' + ); + }) + } /** 驳回驾驶员信息 */ rejectedDriver() { this.approvalOpinion = ''; diff --git a/src/app/routes/vehicle/components/list/carauth/carauth.component.html b/src/app/routes/vehicle/components/list/carauth/carauth.component.html index 150b90d0..9eda46b1 100644 --- a/src/app/routes/vehicle/components/list/carauth/carauth.component.html +++ b/src/app/routes/vehicle/components/list/carauth/carauth.component.html @@ -2,9 +2,9 @@ * @Description : * @Version : 1.0 * @Author : Shiming - * @Date : 2022-02-16 10:09:23 + * @Date : 2022-03-14 14:17:38 * @LastEditors : Shiming - * @LastEditTime : 2022-02-16 10:14:29 + * @LastEditTime : 2022-03-25 16:22:32 * @FilePath : \\tms-obc-web\\src\\app\\routes\\vehicle\\components\\list\\carauth\\carauth.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -32,12 +32,16 @@

+ + + + + + - - - - + + \ No newline at end of file diff --git a/src/app/routes/vehicle/components/list/carauth/carauth.component.less b/src/app/routes/vehicle/components/list/carauth/carauth.component.less index e3f1fc3f..ee4cb587 100644 --- a/src/app/routes/vehicle/components/list/carauth/carauth.component.less +++ b/src/app/routes/vehicle/components/list/carauth/carauth.component.less @@ -75,7 +75,7 @@ .pa { position: absolute; top: 35px; - left: 150px; + left: 140px; } .tips { @@ -96,7 +96,7 @@ .drivercard{ position: absolute; top: 0; - left: 330px; + left: 325px; border: solid 1px #ebf0fb; } .jopcard{ @@ -113,11 +113,17 @@ } :host{ ::ng-deep { - .ant-input-borderless{ - padding: 0; - padding-top: 4px; - color: black; - resize:none; - } + .ant-input-borderless{ + padding: 0; + padding-top: 4px; + color: black; + resize:none; + } + .setCustom .ant-form-item-control{ + margin-left: -100px !important + } + .borderImg{ + border: solid 1px #ebf0fb; + } } - } \ No newline at end of file +} \ No newline at end of file diff --git a/src/app/routes/vehicle/components/list/carauth/carauth.component.ts b/src/app/routes/vehicle/components/list/carauth/carauth.component.ts index 16e43dcc..bbd91cfb 100644 --- a/src/app/routes/vehicle/components/list/carauth/carauth.component.ts +++ b/src/app/routes/vehicle/components/list/carauth/carauth.component.ts @@ -24,38 +24,37 @@ export class CarSettleCarauthComponent implements OnInit { showJopFlag = false; companyData: any = {}; detailData: any = {}; - carNo = ''; - + carNo = '' + constructor( private modal: NzModalRef, public service: VehicleService, private envSrv: EAEnvironmentService, - private eaCacheSrv: EACacheService - ) {} + private eaCacheSrv: EACacheService, + ) { } ngOnInit(): void { - console.log(this.i) - this.initData(); - this.initSF(); + this.initData() + this.initSF() } initData() { - if (this.i?.id) { - this.companyData = this.eaCacheSrv.get(cacheConf.env); + if (this.i.id) { + this.companyData = this.eaCacheSrv.get(cacheConf.env) const params = { - id: this.i?.id - }; + id: this.i.id, + } this.service.request(this.service.$api_shipperCarGet, params).subscribe(res => { - this.detailData = res; - this.detailData.isSelf = res.isSelf ? 1 : 0; - this.detailData.isTrailer = res.isTrailer ? 1 : 0; + this.detailData = res + this.detailData.isSelf = res.isSelf ? 1 : 0 + this.detailData.isTrailer = res.isTrailer ? 1 : 0 this.detailData.carFrontPhotoWatermark = [ { uid: -1, name: 'LOGO', status: 'done', url: this.detailData.carFrontPhotoWatermark, - response: this.detailData.carFrontPhotoWatermark - } + response: this.detailData.carFrontPhotoWatermark, + }, ]; this.detailData.carProtocalWatermark = [ { @@ -63,8 +62,8 @@ export class CarSettleCarauthComponent implements OnInit { name: 'LOGO', status: 'done', url: this.detailData.carProtocalWatermark, - response: this.detailData.carProtocalWatermark - } + response: this.detailData.carProtocalWatermark, + }, ]; this.detailData.certificatePhotoFrontWatermark = [ { @@ -72,8 +71,8 @@ export class CarSettleCarauthComponent implements OnInit { name: 'LOGO', status: 'done', url: this.detailData.certificatePhotoFrontWatermark, - response: this.detailData.certificatePhotoFrontWatermark - } + response: this.detailData.certificatePhotoFrontWatermark, + }, ]; this.detailData.certificatePhotoBackWatermark = [ { @@ -81,8 +80,8 @@ export class CarSettleCarauthComponent implements OnInit { name: 'LOGO', status: 'done', url: this.detailData.certificatePhotoBackWatermark, - response: this.detailData.certificatePhotoBackWatermark - } + response: this.detailData.certificatePhotoBackWatermark, + }, ]; this.detailData.roadTransportPhotoWatermark = [ { @@ -90,10 +89,10 @@ export class CarSettleCarauthComponent implements OnInit { name: 'LOGO', status: 'done', url: this.detailData.roadTransportPhotoWatermark, - response: this.detailData.roadTransportPhotoWatermark - } + response: this.detailData.roadTransportPhotoWatermark, + }, ]; - }); + }) } } initSF() { @@ -104,7 +103,7 @@ export class CarSettleCarauthComponent implements OnInit { title: '车头照照片', ui: { action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', + accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, resReName: 'data.fullFileWatermarkPath', @@ -112,21 +111,21 @@ export class CarSettleCarauthComponent implements OnInit { widget: 'upload', descriptionI18n: '请上传车头照照片,支持JPG、PNG格式,文件小于5M。', data: { - appId: this.envSrv.env.appId + appId: this.envSrv.env.appId, }, name: 'multipartFile', multiple: false, listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { - this.detailData.carFrontPhoto = args.file.response.data.fullFilePath; + this.detailData.carFrontPhoto = args.file.response.data.fullFilePath } }, beforeUpload: (file: any, _fileList: any) => { return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 2; + const isLt2M = file.size / 1024 / 1024 < 5; if (!isLt2M) { - this.service.msgSrv.warning('图片大小超过2M!'); + this.service.msgSrv.warning('图片大小超过5M!'); observer.complete(); return; } @@ -134,7 +133,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - // previewFile: (file: NzUploadFile) => of(file.url) + previewFile: (file: NzUploadFile) => of(file.url), } }, carNo: { @@ -142,8 +141,8 @@ export class CarSettleCarauthComponent implements OnInit { maxLength: 9, type: 'string', ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, carNoColor: { title: '车牌颜色', @@ -151,9 +150,9 @@ export class CarSettleCarauthComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'car:color' }, - placeholder: '请选择车型', - containsAllLabel: false - } as SFSelectWidgetSchema + placeholder: '请选择车牌颜色', + containsAllLabel:false, + } as SFSelectWidgetSchema, }, carModel: { title: '车型', @@ -162,8 +161,8 @@ export class CarSettleCarauthComponent implements OnInit { widget: 'dict-select', params: { dictKey: 'car:model' }, placeholder: '请选择车型', - containsAllLabel: false - } as SFSelectWidgetSchema + containsAllLabel:false, + } as SFSelectWidgetSchema, }, carLength: { title: '车长', @@ -172,8 +171,8 @@ export class CarSettleCarauthComponent implements OnInit { widget: 'dict-select', params: { dictKey: 'car:length' }, placeholder: '请选择车长', - containsAllLabel: false - } as SFSelectWidgetSchema + containsAllLabel:false, + } as SFSelectWidgetSchema, }, carLoad: { title: '载重', @@ -181,10 +180,11 @@ export class CarSettleCarauthComponent implements OnInit { maxLength: 6, ui: { placeholder: '请输入', - change: (val: any) => { - const value = val.replace(/\D/g, ''); - this.sf.setValue('/carLoad', value); - } + addOnAfter: '吨', + change: (val: any) =>{ + const value = val.replace(/\D/g,'') + this.sf.setValue('/carLoad', value) + }, } }, isSelf: { @@ -192,11 +192,11 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', enum: [ { label: '否', value: 0 }, - { label: '是', value: 1 } + { label: '是', value: 1 }, ], ui: { widget: 'select', - placeholder: '请选择' + placeholder: '请选择', } }, isTrailer: { @@ -204,11 +204,11 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', enum: [ { label: '否', value: 0 }, - { label: '是', value: 1 } + { label: '是', value: 1 }, ], ui: { widget: 'select', - placeholder: '请选择' + placeholder: '请选择', } }, carProtocalWatermark: { @@ -216,7 +216,7 @@ export class CarSettleCarauthComponent implements OnInit { title: '挂靠协议', ui: { action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', + accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, resReName: 'data.fullFileWatermarkPath', @@ -224,14 +224,14 @@ export class CarSettleCarauthComponent implements OnInit { widget: 'upload', descriptionI18n: '请上传挂靠协议,支持JPG、PNG格式,文件小于5M。', data: { - appId: this.envSrv.env.appId + appId: this.envSrv.env.appId, }, name: 'multipartFile', multiple: false, listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { - this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath; + this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath } }, beforeUpload: (file: any, _fileList: any) => { @@ -246,31 +246,39 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - // previewFile: (file: NzUploadFile) => of(file.url) + previewFile: (file: NzUploadFile) => of(file.url), + } + }, + agreeImg: { + title: '', + type: 'boolean', + // enum: [{ label: '长期', value: true }], + ui: { + widget: 'custom', } }, titleA: { title: '行驶证信息(必填)', type: 'string', ui: { - widget: 'text' + widget: 'text', }, - default: '照片上传后会自动识别文字并填充下列内容栏' + default: '照片上传后会自动识别文字并填充下列内容栏', }, tipsA: { title: '', type: 'string', ui: { widget: 'custom', - offsetControl: 6 - } + offsetControl: 6, + }, }, certificatePhotoFrontWatermark: { type: 'string', title: '行驶证首页照片', ui: { action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', + accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, resReName: 'data.fullFileWatermarkPath', @@ -278,24 +286,24 @@ export class CarSettleCarauthComponent implements OnInit { widget: 'upload', descriptionI18n: '请上传行驶证首页照片,支持JPG、PNG格式,文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清,都不会通过审核。', data: { - appId: this.envSrv.env.appId + appId: this.envSrv.env.appId, }, name: 'multipartFile', multiple: false, listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { - this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath; + this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath this.checkCarCard(args.file.response.data.fullFilePath, 'front'); } else { - this.detailData.certificatePhotoFront = ''; + this.detailData.certificatePhotoFront = '' } }, beforeUpload: (file: any, _fileList: any) => { return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 2; + const isLt2M = file.size / 1024 / 1024 < 5; if (!isLt2M) { - this.service.msgSrv.warning('图片大小超过2M!'); + this.service.msgSrv.warning('图片大小超过5M!'); observer.complete(); return; } @@ -303,7 +311,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - // previewFile: (file: NzUploadFile) => of(file.url) + previewFile: (file: NzUploadFile) => of(file.url), } }, tipsB: { @@ -311,15 +319,15 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', ui: { widget: 'custom', - offsetControl: 6 - } + offsetControl: 6, + }, }, certificatePhotoBackWatermark: { type: 'string', title: '行驶证副页照片', ui: { action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', + accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, resReName: 'data.fullFileWatermarkPath', @@ -327,24 +335,24 @@ export class CarSettleCarauthComponent implements OnInit { widget: 'upload', descriptionI18n: '请上传行驶证副业照片,支持JPG、PNG格式,文件小于5M。', data: { - appId: this.envSrv.env.appId + appId: this.envSrv.env.appId, }, name: 'multipartFile', multiple: false, listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { - this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath; + this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath this.checkCarCard(args.file.response.data.fullFilePath, 'back'); } else { - this.detailData.certificatePhotoBack = ''; + this.detailData.certificatePhotoBack = '' } }, beforeUpload: (file: any, _fileList: any) => { return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 2; + const isLt2M = file.size / 1024 / 1024 < 5; if (!isLt2M) { - this.service.msgSrv.warning('图片大小超过2M!'); + this.service.msgSrv.warning('图片大小超过5M!'); observer.complete(); return; } @@ -352,7 +360,7 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - // previewFile: (file: NzUploadFile) => of(file.url) + previewFile: (file: NzUploadFile) => of(file.url), } }, driverLicenseRegisterTime: { @@ -360,16 +368,16 @@ export class CarSettleCarauthComponent implements OnInit { type: 'string', format: 'date', ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, driverLicenseGetTime: { title: '行驶证发证日期', type: 'string', format: 'date', ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, driverLicenseEndTime: { title: '行驶证到期日期', @@ -377,24 +385,24 @@ export class CarSettleCarauthComponent implements OnInit { format: 'date', maxLength: 30, ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, driverLicenseSigningOrg: { title: '行驶证签发机关', type: 'string', maxLength: 30, ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, carDistinguishCode: { title: '车辆识别代码', type: 'string', maxLength: 30, ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, useNature: { title: '使用性质', @@ -402,42 +410,42 @@ export class CarSettleCarauthComponent implements OnInit { maxLength: 30, enum: [ { label: '非营运', value: 0 }, - { label: '营运', value: 1 } + { label: '营运', value: 1 }, ], ui: { widget: 'select', - placeholder: '请选择' - } + placeholder: '请选择', + }, }, curbWeight: { title: '整备质量', type: 'string', ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, carOwner: { title: '所有人', type: 'string', maxLength: 30, ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, titleB: { title: '道运证(选填)', type: 'string', ui: { - widget: 'text' + widget: 'text', }, - default: '照片上传后会自动识别文字并填充下列内容栏' + default: '照片上传后会自动识别文字并填充下列内容栏', }, roadTransportPhotoWatermark: { type: 'string', title: '道运证照片', ui: { action: apiConf.fileUpload, - fileType: 'image/png,image/jpeg,image/jpg,image/gif', + accept: 'image/png,image/jpeg,image/jpg,image/gif', limit: 1, limitFileCount: 1, resReName: 'data.fullFileWatermarkPath', @@ -445,24 +453,24 @@ export class CarSettleCarauthComponent implements OnInit { widget: 'upload', descriptionI18n: '请上传道运证照片,支持JPG、PNG格式,文件小于5M。蓝牌绿牌车辆,可不用传道运证', data: { - appId: this.envSrv.env.appId + appId: this.envSrv.env.appId, }, name: 'multipartFile', multiple: false, listType: 'picture-card', change: (args: any) => { if (args.type === 'success') { - this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath; + this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath this.checkTransCard(args.file.response.data.fullFilePath); } else { - this.detailData.roadTransportPhoto = ''; + this.detailData.roadTransportPhoto = '' } }, beforeUpload: (file: any, _fileList: any) => { return new Observable((observer: Observer) => { - const isLt2M = file.size / 1024 / 1024 < 2; + const isLt2M = file.size / 1024 / 1024 < 5; if (!isLt2M) { - this.service.msgSrv.warning('图片大小超过2M!'); + this.service.msgSrv.warning('图片大小超过5M!'); observer.complete(); return; } @@ -470,7 +478,15 @@ export class CarSettleCarauthComponent implements OnInit { observer.complete(); }); }, - // previewFile: (file: NzUploadFile) => of(file.url) + previewFile: (file: NzUploadFile) => of(file.url), + } + }, + roadImg: { + title: '', + type: 'boolean', + // enum: [{ label: '长期', value: true }], + ui: { + widget: 'custom', } }, roadTransportNo: { @@ -479,8 +495,8 @@ export class CarSettleCarauthComponent implements OnInit { maxLength: 30, ui: { // widget: this.detailData.commitFlag !== 0 ? 'text' : '', - placeholder: '请输入' - } + placeholder: '请输入', + }, }, roadTransportLicenceNo: { title: '经营许可证号', @@ -488,25 +504,25 @@ export class CarSettleCarauthComponent implements OnInit { maxLength: 30, ui: { // widget: this.detailData.commitFlag !== 0 ? 'text' : '', - placeholder: '请输入' - } + placeholder: '请输入', + }, }, roadTransportStartTime: { title: '发证日期', type: 'string', format: 'date', ui: { - placeholder: '请输入' - } + placeholder: '请输入', + }, }, roadTransportEndTime: { title: '有效期至', type: 'string', format: 'date', ui: { - placeholder: '请输入' - } - } + placeholder: '请输入', + }, + }, }, required: [ 'carFrontPhotoWatermark', @@ -526,62 +542,61 @@ export class CarSettleCarauthComponent implements OnInit { 'carDistinguishCode', 'useNature', 'carOwner' - ] + ], }; this.ui = { '*': { spanLabelFixed: 180, grid: { span: 18 }, - width: 600 + width: 600, }, $title1: { - spanLabelFixed: 0 + spanLabelFixed: 0, }, $title2: { - spanLabelFixed: 0 + spanLabelFixed: 0, }, $title3: { - spanLabelFixed: 0 + spanLabelFixed: 0, }, - $enterpriseRegistrationTime: { - width: 680 + $isTrailer:{ + grid: { span: 24 }, }, - $operatingEndTime: { - grid: { span: 9 } + $carProtocalWatermark: { + grid: { span:12 }, }, - $dateType: { - grid: { span: 4 } + $agreeImg: { + grid: { span: 4 }, + class: 'setCustom' }, - $validEndTime: { - grid: { span: 9 } + $titleB:{ + grid: { span: 24 }, }, - $dateType01: { - grid: { span: 4 } + $roadTransportPhotoWatermark: { + grid: { span: 12 }, }, - $registrationCapital: { - grid: { span: 12 } + $roadImg: { + grid: { span: 4 }, + class: 'setCustom' }, - $unit: { - spanLabelFixed: 20, - grid: { span: 3 } - } + }; } // 道路运输证识别 checkTransCard(imgurl: any) { const params = { - transportationLicenseUrl: imgurl + transportationLicenseUrl: imgurl, }; - this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe(res => { + this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe((res: any) => { if (res) { this.sf.setValue('/roadTransportNo', res.number); this.sf.setValue('/roadTransportLicenceNo', res.businessCertificate); this.sf.setValue('/roadTransportStartTime', res.issueDate); - if (this.carNo === '') { - this.carNo = res.number; - } else if (this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) { - this.service.msgSrv.warning('请上传同一认证车辆的相关证件'); + if(this.carNo === '') { + this.carNo = res.number + } else if(this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) { + this.service.msgSrv.warning('请上传同一认证车辆的相关证件') } } }); @@ -590,12 +605,11 @@ export class CarSettleCarauthComponent implements OnInit { checkCarCard(imgurl: any, side: any) { const params = { vehicleLicenseUrl: imgurl, - side + side, }; - this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe(res => { + this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe((res: any) => { if (res) { - if (side === 'front') { - // 正面 + if (side === 'front') { // 正面 this.sf.setValue('/driverLicenseRegisterTime', res.registerDate); this.sf.setValue('/carNo', res.number); this.sf.setValue('/driverLicenseGetTime', res.issueDate); @@ -603,49 +617,46 @@ export class CarSettleCarauthComponent implements OnInit { this.sf.setValue('/carDistinguishCode', res.vin); this.sf.setValue('/carOwner', res.name); this.sf.setValue('/useNature', res.useCharacter === '非营运' ? 0 : 1); + } else { this.sf.setValue('/curbWeight', res.unladenMass); } - if (this.carNo === '') { - this.carNo = res.number; - } else if (this.carNo && this.carNo !== res.number) { - this.service.msgSrv.warning('请上传同一认证车辆的相关证件'); + if(this.carNo === '') { + this.carNo = res.number + } else if(this.carNo && this.carNo !== res.number) { + this.service.msgSrv.warning('请上传同一认证车辆的相关证件') } } }); } close(): void { - this.modal.destroy(); + this.modal.close(true); } showExample() { - this.showCardFlag = !this.showCardFlag; + this.showCardFlag = !this.showCardFlag } showJopExample() { - this.showJopFlag = !this.showJopFlag; + this.showJopFlag = !this.showJopFlag } submitForm() { const params: any = { appUserId: this.i.appUserId, - ...this.sf.value + ...this.sf.value, + bindType: this.i.bindType }; - params.carFrontPhoto = this.detailData.carFrontPhoto; - params.carProtocal = this.detailData.carProtocal; - params.certificatePhotoFront = this.detailData.certificatePhotoFront; - params.certificatePhotoBack = this.detailData.certificatePhotoBack; - params.roadTransportPhoto = this.detailData.roadTransportPhoto; - params.carFrontPhotoWatermark = this.sf.value.carFrontPhotoWatermark?.data?.fullFilePath || this.sf.value.carFrontPhotoWatermark - params.carProtocalWatermark = this.sf.value.carProtocalWatermark?.data?.fullFilePath || this.sf.value.carProtocalWatermark - params.certificatePhotoBackWatermark = this.sf.value.certificatePhotoBackWatermark?.data?.fullFilePath || this.sf.value.certificatePhotoBackWatermark - params.certificatePhotoFrontWatermark = this.sf.value.certificatePhotoFrontWatermark?.data?.fullFilePath || this.sf.value.certificatePhotoFrontWatermark - params.roadTransportPhotoWatermark = this.sf.value.roadTransportPhotoWatermark?.data?.fullFilePath || this.sf.value.roadTransportPhotoWatermark - delete params.titleA; - delete params.titleB; - this.service.request(this.service.$api_addOrUpdateCarLicenseInfo, params).subscribe(res => { + params.carFrontPhoto = this.detailData.carFrontPhoto + params.carProtocal = this.detailData.carProtocal + params.certificatePhotoFront = this.detailData.certificatePhotoFront + params.certificatePhotoBack = this.detailData.certificatePhotoBack + params.roadTransportPhoto = this.detailData.roadTransportPhoto + delete params.titleA + delete params.titleB + this.service.request(this.service.$api_saveUpdateShipperCar, params).subscribe((res: any) => { if (res) { - this.service.msgSrv.success('添加成功'); - this.modal.close(true); + this.service.msgSrv.success('添加成功') + this.modal.close(true) } - }); + }) } } diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.html b/src/app/routes/waybill-management/components/bulk/bulk.component.html index 0e381f1e..851fa149 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.html +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.html @@ -1,7 +1,7 @@
- + diff --git a/src/app/shared/components/imagelist/imagelist.component.ts b/src/app/shared/components/imagelist/imagelist.component.ts index 40bb7f37..6fba4fd0 100644 --- a/src/app/shared/components/imagelist/imagelist.component.ts +++ b/src/app/shared/components/imagelist/imagelist.component.ts @@ -1,10 +1,10 @@ /* * @Author: your name * @Date: 2021-12-09 17:36:13 - * @LastEditTime: 2021-12-10 14:12:24 - * @LastEditors: Please set LastEditors + * @LastEditTime : 2022-03-25 15:43:12 + * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE - * @FilePath: \tms-obc-web\src\app\shared\components\imagelist\imagelist.component.ts + * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\imagelist\\imagelist.component.ts */ import { Component, Input, OnInit } from '@angular/core'; import { ModalHelper, _HttpClient } from '@delon/theme'; @@ -26,13 +26,20 @@ export class ImageListComponent implements OnInit { private nzImageService: NzImageService ) {} - ngOnInit(): void {} + ngOnInit(): void { + + } showImg(index: any) { const params = { imgList: this.imgList, index }; - const images = this.imgList.map((url: string) => ({ src: url })); + const images = this.imgList.map((url: string) => { + if(url) { + console.log(url); + ({ src: url }) + } + }); this.nzImageService.preview(images); // this.modal.create(ImageViewComponent, { params }).subscribe(res => {}); } diff --git a/src/app/shared/services/business/shipper-base.service.ts b/src/app/shared/services/business/shipper-base.service.ts index 9d60db0e..045ca354 100644 --- a/src/app/shared/services/business/shipper-base.service.ts +++ b/src/app/shared/services/business/shipper-base.service.ts @@ -23,13 +23,16 @@ export class ShipperBaseService extends BaseService { $api_get_rebate_config = `/api/mdc/rebateConfig/list/listRebateConfig`; // 获取渠道销售管理集合 $api_get_channel = `/api/mdc/channelSalesManagement/list/listChannelSalesManagement`; + + // 获取货主企业列表 + public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; constructor(public injector: Injector) { super(injector); } /** * 获取无车承运人 - * @returns + * @returns */ getCarlessCarrier() { const params = {}; @@ -166,6 +169,33 @@ export class ShipperBaseService extends BaseService { ); } + /** + * 获取货主企业列表 + * @returns + */ + getEnterpriceList(params = { enterpriseName: '' }, containerAll = false) { + let str = params.enterpriseName.replace(/^\s+|\s+$/g, ''); + if (str) { + return this.request(this.$api_enterpriceList, params).pipe( + map((res: any) => { + if (!res) { + return []; + } + const list = res.map((item: any) => { + return { label: item.enterpriseName, value: item.id }; + }); + const obj = []; + if (containerAll) { + obj.push({ label: '全部', value: '' }); + } + return [...obj, ...list]; + }) + ).toPromise();; + } else { + return of([]); + } + } + /** * 获取结算客户 * @returns @@ -267,7 +297,7 @@ export class ShipperBaseService extends BaseService { map(res => { if (res) { return res.map((m: any) => { - return { label: m.name, value: m.id }; + return { label: `${m.employeeVO?.empName}/${m.employeeVO?.mobile}`, value: m.id }; }); } else { return [];