diff --git a/proxy.conf.js b/proxy.conf.js index 89d93e1f..31995def 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-01-26 17:45:55 + * @LastEditTime : 2022-02-17 15:57:11 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -20,7 +20,7 @@ module.exports = { // } '//api': { target: { - host: 'tms-api-dev.eascs.com', + host: 'tms-api-test.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/supply-management/components/add-driver/add-driver.component.ts b/src/app/routes/supply-management/components/add-driver/add-driver.component.ts index 9c053953..76165473 100644 --- a/src/app/routes/supply-management/components/add-driver/add-driver.component.ts +++ b/src/app/routes/supply-management/components/add-driver/add-driver.component.ts @@ -32,17 +32,17 @@ export class CarAddDriverComponent implements OnInit { userPracticeSeniorityDTO: {} }; companyData: any = {}; - mobile = '' + mobile = ''; constructor( private modal: NzModalRef, public service: SupplyManagementService, private envSrv: EAEnvironmentService, - private eaCacheSrv: EACacheService, - ) { } + private eaCacheSrv: EACacheService + ) {} ngOnInit(): void { - this.companyData = this.eaCacheSrv.get(cacheConf.env) - this.initSF() + this.companyData = this.eaCacheSrv.get(cacheConf.env); + this.initSF(); } initSF() { this.schema = { @@ -51,7 +51,7 @@ export class CarAddDriverComponent implements OnInit { title: '司机信息(必填)', type: 'string', ui: { - widget: 'text', + widget: 'text' }, default: '照片上传后会自动识别文字并填充下列内容栏' }, @@ -61,7 +61,7 @@ export class CarAddDriverComponent implements OnInit { format: 'email', maxLength: 11, ui: { - widget: 'text', + widget: 'text' }, default: this.mobile }, @@ -70,17 +70,17 @@ export class CarAddDriverComponent implements OnInit { type: 'string', ui: { widget: 'text', - showRequired: true, + showRequired: true }, - default: '请上传身份证原件的高清照片,若上传复印件,则需加盖公司印章及法人签字;上传后系统会自动识别并填写', + default: '请上传身份证原件的高清照片,若上传复印件,则需加盖公司印章及法人签字;上传后系统会自动识别并填写' }, tipsA: { title: '', type: 'string', ui: { widget: 'custom', - offsetControl: 6, - }, + offsetControl: 6 + } }, certificatePhotoFrontWatermark: { type: 'string', @@ -96,14 +96,14 @@ export class CarAddDriverComponent implements OnInit { widget: 'upload', descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过2M', data: { - appId: this.envSrv.env.appId, + appId: this.envSrv.env.appId }, name: 'multipartFile', multiple: false, listType: 'picture-card', - change: (args) => { + change: args => { if (args.type === 'success') { - this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath + this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath; this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0); } }, @@ -118,16 +118,16 @@ export class CarAddDriverComponent implements OnInit { observer.next(isLt2M); observer.complete(); }); - }, - } as SFUploadWidgetSchema, + } + } as SFUploadWidgetSchema }, tipsB: { title: '', type: 'string', ui: { widget: 'custom', - offsetControl: 6, - }, + offsetControl: 6 + } }, certificatePhotoBackWatermark: { type: 'string', @@ -143,14 +143,14 @@ export class CarAddDriverComponent implements OnInit { widget: 'upload', descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过2M', data: { - appId: this.envSrv.env.appId, + appId: this.envSrv.env.appId }, name: 'multipartFile', multiple: false, listType: 'picture-card', - change: (args) => { + change: args => { if (args.type === 'success') { - this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath + this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath; this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0); } }, @@ -165,8 +165,8 @@ export class CarAddDriverComponent implements OnInit { observer.next(isLt2M); observer.complete(); }); - }, - } as SFUploadWidgetSchema, + } + } as SFUploadWidgetSchema }, name: { title: '姓名', @@ -174,8 +174,8 @@ export class CarAddDriverComponent implements OnInit { maxLength: 32, ui: { widget: '', - placeholder: '请输入姓名', - }, + placeholder: '请输入姓名' + } }, certificateNumber: { title: '身份证号', @@ -187,17 +187,12 @@ export class CarAddDriverComponent implements OnInit { widget: '', placeholder: '请输入法定代表人证件号', errors: { - required: '请输入18位身份证号码', - }, - }, - }, + required: '请输入18位身份证号码' + } + } + } }, - required: [ - 'certificatePhotoFrontWatermark', - 'certificatePhotoBackWatermark', - 'name', - 'certificateNumber' - ], + required: ['certificatePhotoFrontWatermark', 'certificatePhotoBackWatermark', 'name', 'certificateNumber'] }; this.schema1 = { properties: { @@ -205,7 +200,7 @@ export class CarAddDriverComponent implements OnInit { title: '驾驶证信息(必填)', type: 'string', ui: { - widget: 'text', + widget: 'text' }, default: '照片上传后会自动识别文字并填充下列内容栏' }, @@ -222,14 +217,14 @@ export class CarAddDriverComponent 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) => { + change: args => { if (args.type === 'success') { - this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath + this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath; this.checkDriverCard(args.file.response.data.fullFilePath, 'front', 0); } }, @@ -244,29 +239,29 @@ export class CarAddDriverComponent implements OnInit { observer.next(isLt4M); observer.complete(); }); - }, - } as SFUploadWidgetSchema, + } + } as SFUploadWidgetSchema }, licenseNo: { title: '驾驶证号', type: 'string', ui: { - // widget: 'text', - placeholder: '请输入', - }, + // widget: 'text', + placeholder: '请输入' + } // default: this.ar.snapshot.queryParams.licenseNo }, driverModel: { title: '准驾车型', type: 'string', enum: [ - {label: 'A1', value: 0}, - {label: 'B1', value: 1}, + { label: 'A1', value: 0 }, + { label: 'B1', value: 1 } ], ui: { // widget: this.detailData.commitFlag !== 0 ? 'text' : '', - placeholder: '请输入', - }, + placeholder: '请输入' + } }, validStartTime: { title: '法人证件有效开始日期', @@ -276,10 +271,10 @@ export class CarAddDriverComponent implements OnInit { format: 'yyyy-MM-dd', placeholder: '请选择', errors: { - required: '请选择起始日期', + required: '请选择起始日期' }, - change: (i) => { }, - } as SFDateWidgetSchema, + change: i => {} + } as SFDateWidgetSchema }, validEndTime: { title: '法人证件有效开始日期', @@ -289,10 +284,10 @@ export class CarAddDriverComponent implements OnInit { format: 'yyyy-MM-dd', placeholder: '请选择', errors: { - required: '请选择起始日期', + required: '请选择起始日期' }, - change: (i) => { }, - } as SFDateWidgetSchema, + change: i => {} + } as SFDateWidgetSchema }, signingOrganization: { title: '签发机关', @@ -300,17 +295,11 @@ export class CarAddDriverComponent implements OnInit { maxLength: 30, ui: { // widget: this.detailData.commitFlag !== 0 ? 'text' : '', - placeholder: '请输入', - }, - }, + placeholder: '请输入' + } + } }, - required: [ - 'certificatePhotoWatermark', - 'licenseNo', - 'driverModel', - 'validStartTime', - 'validEndTime', - ], + required: ['certificatePhotoWatermark', 'licenseNo', 'driverModel', 'validStartTime', 'validEndTime'] }; this.schema2 = { properties: { @@ -318,9 +307,9 @@ export class CarAddDriverComponent implements OnInit { title: '从业资格证(选填)', type: 'string', ui: { - widget: 'text', + widget: 'text' }, - default: '照片上传后会自动识别文字并填充下列内容栏', + default: '照片上传后会自动识别文字并填充下列内容栏' }, certificatePhotoWatermark: { type: 'string', @@ -336,14 +325,14 @@ export class CarAddDriverComponent implements OnInit { widget: 'upload', descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M', data: { - appId: this.envSrv.env.appId, + appId: this.envSrv.env.appId }, name: 'multipartFile', multiple: false, listType: 'picture-card', - change: (args) => { + change: args => { if (args.type === 'success') { - this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath + this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath; //this.checkIdCard(args.file.response.data.fullFile, 0, 0); } }, @@ -358,8 +347,8 @@ export class CarAddDriverComponent implements OnInit { observer.next(isLt2M); observer.complete(); }); - }, - } as SFUploadWidgetSchema, + } + } as SFUploadWidgetSchema }, licenseNo: { title: '从业资格证号', @@ -367,8 +356,8 @@ export class CarAddDriverComponent implements OnInit { maxLength: 30, ui: { // widget: this.detailData.commitFlag !== 0 ? 'text' : '', - placeholder: '请输入', - }, + placeholder: '请输入' + } }, regionCode: { title: '签发省份', @@ -376,8 +365,8 @@ export class CarAddDriverComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - asyncData: () => this.getProvinceData(), - } as SFDateWidgetSchema, + asyncData: () => this.getProvinceData() + } as SFDateWidgetSchema }, validStartTime: { title: '发证日期', @@ -387,10 +376,10 @@ export class CarAddDriverComponent implements OnInit { format: 'yyyy-MM-dd', placeholder: '请选择', errors: { - required: '请选择起始日期', + required: '请选择起始日期' }, - change: (i) => { }, - } as SFDateWidgetSchema, + change: i => {} + } as SFDateWidgetSchema }, validEndTime: { title: '有效期止', @@ -400,69 +389,67 @@ export class CarAddDriverComponent implements OnInit { format: 'yyyy-MM-dd', placeholder: '请选择', errors: { - required: '请选择起始日期', + required: '请选择起始日期' }, - change: (i) => { }, - } as SFDateWidgetSchema, - }, + change: i => {} + } as SFDateWidgetSchema + } }, - required: [ - - ], + required: [] }; this.ui = { '*': { spanLabelFixed: 180, grid: { span: 24 }, - width: 700, + width: 700 }, $title1: { - spanLabelFixed: 0, + spanLabelFixed: 0 }, $title2: { - spanLabelFixed: 0, + spanLabelFixed: 0 }, $title3: { - spanLabelFixed: 0, + spanLabelFixed: 0 }, $title4: { - spanLabelFixed: 0, + spanLabelFixed: 0 }, $enterpriseRegistrationTime: { - width: 680, + width: 680 }, $operatingEndTime: { - grid: { span: 9 }, + grid: { span: 9 } }, $dateType: { - grid: { span: 4 }, + grid: { span: 4 } }, $validEndTime: { - grid: { span: 9 }, + grid: { span: 9 } }, $dateType01: { - grid: { span: 4 }, + grid: { span: 4 } }, $registrationCapital: { - grid: { span: 12 }, + grid: { span: 12 } }, $unit: { spanLabelFixed: 20, - grid: { span: 3 }, - }, + grid: { span: 3 } + } }; } getProvinceData() { return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe( map((res: any) => { - const result: any = [] + const result: any = []; if (res) { res.map((m: any) => { - const item = { label: m.name, value: m.regionCode } - result.push(item) + const item = { label: m.name, value: m.regionCode }; + result.push(item); }); } - return result + return result; }) ); } @@ -470,7 +457,7 @@ export class CarAddDriverComponent implements OnInit { // 识别身份证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证 const params = { idCardUrl: imgurl, - side, + side }; this.service.request(this.service.$api_checkIdCard, params).subscribe((res: any) => { if (res) { @@ -489,7 +476,7 @@ export class CarAddDriverComponent implements OnInit { // 识别身份证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证 const params = { driverLicenseUrl: imgurl, - side, + side }; this.service.request(this.service.$api_recognizeDriverLicense, params).subscribe((res: any) => { if (res) { @@ -510,47 +497,59 @@ export class CarAddDriverComponent implements OnInit { close(): void { this.modal.destroy(); } - showExample(){ - this.showCardFlag = !this.showCardFlag + showExample() { + this.showCardFlag = !this.showCardFlag; } - showJopExample(){ - this.showJopFlag = !this.showJopFlag + showJopExample() { + this.showJopFlag = !this.showJopFlag; } - submitForm(){ - const params:any = { + submitForm() { + const params: any = { enterpriseId: this.companyData.enterpriseId, enterpriseProjectId: this.companyData.projectId, source: 1, mobile: this.mobile, - identityInfoDTO:{ + identityInfoDTO: { ...this.sf.value, certificatePhotoFront: this.detailData.certificatePhotoFront, - certificatePhotoBack: this.detailData.certificatePhotoBack, + certificatePhotoBack: this.detailData.certificatePhotoBack }, userDriverLicenseDTO: { ...this.sf1.value, - certificatePhoto: this.detailData.userDriverLicenseDTO.certificatePhoto, + certificatePhoto: this.detailData.userDriverLicenseDTO.certificatePhoto }, userPracticeSeniorityDTO: { ...this.sf2.value, - certificatePhoto: this.detailData.userPracticeSeniorityDTO.certificatePhoto, - }, + certificatePhoto: this.detailData.userPracticeSeniorityDTO.certificatePhoto + } }; - params.identityInfoDTO.certificatePhotoFrontWatermark = this.sf?.value.certificatePhotoFrontWatermark - params.identityInfoDTO.certificatePhotoBackWatermark = this.sf?.value.certificatePhotoBackWatermark - params.userDriverLicenseDTO.certificatePhotoWatermark = this.sf1?.value.certificatePhotoWatermark - params.userPracticeSeniorityDTO.certificatePhotoWatermark = this.sf2?.value.certificatePhotoWatermark + Object.assign(params, { + identityInfoDTO: { + certificatePhotoFrontWatermark: this.sf?.value.certificatePhotoFrontWatermark, + certificatePhotoBackWatermark: this.sf?.value.certificatePhotoBackWatermark + }, + userDriverLicenseDTO: { + certificatePhotoWatermark: this.sf?.value.certificatePhotoWatermark + }, + userPracticeSeniorityDTO: { + certificatePhotoWatermark: this.sf?.value.certificatePhotoWatermark + } + }); + // params.identityInfoDTO.certificatePhotoFrontWatermark = this.sf?.value.certificatePhotoFrontWatermark; + // params.identityInfoDTO.certificatePhotoBackWatermark = this.sf?.value.certificatePhotoBackWatermark; + // params.userDriverLicenseDTO.certificatePhotoWatermark = this.sf1?.value.certificatePhotoWatermark; + // params.userPracticeSeniorityDTO.certificatePhotoWatermark = this.sf2?.value.certificatePhotoWatermark; delete params.identityInfoDTO.titleA; delete params.identityInfoDTO.titleB; delete params.identityInfoDTO.titleC; delete params.userDriverLicenseDTO.tipsA; delete params.userPracticeSeniorityDTO.tipsC; - delete params.showName + delete params.showName; this.service.request(this.service.$api_enterpriseVehicleSave, params).subscribe((res: any) => { - if(res){ - this.service.msgSrv.success('添加成功') - this.modal.close(true) + if (res) { + this.service.msgSrv.success('添加成功'); + this.modal.close(true); } - }) + }); } } 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 8f7de8b8..9377a818 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -303,7 +303,7 @@ export class SupplyManagementBulkComponent implements OnInit { { text: '货源审核', click: (_record) => this.audit(_record, 1), - iif: item => item.resourceStatus == 1, + iif: item => item.auditStatus === '1' }, { text: '二维码 ', 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 15cf133d..d0f7d81b 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -539,7 +539,7 @@ export class SupplyManagementVehicleComponent implements OnInit { { text: '货源审核', click: _record => this.audit(_record, 1), - iif: item => item.resourceStatus === '1' + iif: item => item.auditStatus === '1' }, { text: '修改货源', diff --git a/src/app/shared/services/business/shipper-base.service.ts b/src/app/shared/services/business/shipper-base.service.ts index cd0fb364..3a6ff2ce 100644 --- a/src/app/shared/services/business/shipper-base.service.ts +++ b/src/app/shared/services/business/shipper-base.service.ts @@ -9,7 +9,7 @@ import { EACacheService } from '..'; }) export class ShipperBaseService extends BaseService { $api_get_carless_carrier = ``; // 获取承运人 - $api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表 + $api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList`; // 所属项目列表 $api_get_staff_list = `/api/mdc/cuc/userApp/getStaffList`; //查询企业项目员工列表(录单员) $api_get_network_freight_forwarder_list = `/api/mdc/cuc/networkTransporter/findAll`; // 获取网络货运人 $api_get_settlement_customer_list = `/api/mdc/cuc/settlementCustomer/findAll`; // 查找所有结算客户信息(下拉) @@ -44,22 +44,22 @@ export class ShipperBaseService extends BaseService { * 获取所属项目 * @returns */ - getEnterpriseProject(params = {}) { + getEnterpriseProject(params = {}) { return this.request(this.$api_get_enterprise_project, params).pipe( map((res: any) => { if (!res) { return []; } - const list = res.map((item: any) => { + const list = res.map(((item: any) => { return { label: item.projectName, - value: item.enterpriseId - }; - }); + value: item.id + } + })) const obj = [{ value: '', label: '全部' }]; return [...obj, ...list]; }) - ); + ) } /**