From d4dd453308fcdf19d388d38fc8630b96f90b28a3 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 4 Mar 2022 15:21:52 +0800 Subject: [PATCH 1/6] fix bug --- .../sure-arrive/sure-arrive.component.ts | 18 ++++-------- .../sure-depart/sure-depart.component.ts | 28 ++++++++----------- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts b/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts index eee67218..b99aa290 100644 --- a/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts +++ b/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts @@ -44,7 +44,7 @@ export class VehicleSureArriveComponent implements OnInit { ngOnInit(): void { console.log(this.i) this.initData() - this.i.time = this.i.loadingTime; + this.i.time = this.i?.loadingTime; this.initSF(); } initSF() { @@ -407,7 +407,7 @@ export class VehicleSureArriveComponent implements OnInit { } as SFUploadWidgetSchema, } }, - required: ['time', 'weight' ] + required: ['time' ] }; } this.ui = { @@ -422,19 +422,16 @@ export class VehicleSureArriveComponent implements OnInit { }; } save(value: any): void { - console.log('444'); if(this.Status === 1) { - console.log('555'); - if(!value.time) { this.service.msgSrv.warning('必填项为空!') return; } const params = { id: this.i.id, - imgUrl1: value.imgUrl1.data.fullFilePath, - imgUrl2: value.imgUrl2.data.fullFilePath, - time: value.time, + imgUrl1: value?.imgUrl1?.data?.fullFilePath, + imgUrl2: value?.imgUrl2?.data?.fullFilePath, + time: value?.time, } params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe((res) => { @@ -444,12 +441,10 @@ export class VehicleSureArriveComponent implements OnInit { } }) } else { - if(!value.time || !this.data.weight) { + if(!value.time ) { this.service.msgSrv.warning('必填项为空!') return; } - console.log(value) - console.log(this.i) const params = { id: this.i?.id, imgUrl1: value?.imgUrl1?.data?.fullFilePath, @@ -459,7 +454,6 @@ export class VehicleSureArriveComponent implements OnInit { weight: this.data?.weight } params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') - console.log(params) this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe((res) => { if(res) { this.service.msgSrv.success('确认到车成功!') diff --git a/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts b/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts index 31f94dd1..975f559d 100644 --- a/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts +++ b/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts @@ -99,7 +99,6 @@ export class VehicleSureDepartComponent implements OnInit { }, multiple: false, listType: 'picture-card', - showRequired: true, } as SFUploadWidgetSchema, }, imgUrl2: { @@ -138,11 +137,10 @@ export class VehicleSureDepartComponent implements OnInit { }, multiple: false, listType: 'picture-card', - showRequired: true, } as SFUploadWidgetSchema, } }, - required: ['reason'] + required: ['time'] }; } else { this.schema = { @@ -210,7 +208,6 @@ export class VehicleSureDepartComponent implements OnInit { }, multiple: false, listType: 'picture-card', - showRequired: true, } as SFUploadWidgetSchema, }, imgUrl2: { @@ -249,11 +246,10 @@ export class VehicleSureDepartComponent implements OnInit { }, multiple: false, listType: 'picture-card', - showRequired: true, } as SFUploadWidgetSchema, } }, - required: ['time', 'weight'] + required: ['time'] }; } @@ -268,15 +264,15 @@ export class VehicleSureDepartComponent implements OnInit { } save(value: any): void { if(this.Status === 1) { - if(!value.time) { + if(!value?.time) { this.service.msgSrv.warning('必填项为空!') return; } const params = { id: this.i.id, - imgUrl1: value.imgUrl1.data.fullFilePath, - imgUrl2: value.imgUrl2.data.fullFilePath, - time: value.time, + imgUrl1: value?.imgUrl1?.data?.fullFilePath, + imgUrl2: value?.imgUrl2?.data?.fullFilePath, + time: value?.time, } params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') this.service.request(this.service.$api_get_insertWholeStartCarInfo, params).subscribe((res) => { @@ -286,18 +282,18 @@ export class VehicleSureDepartComponent implements OnInit { } }) } else { - if(!value.time || !this.data.weight) { + if(!value?.time) { this.service.msgSrv.warning('必填项为空!') return; } console.log(value) const params = { id: this.i.id, - imgUrl1: value.imgUrl1.data.fullFilePath, - imgUrl2: value.imgUrl2.data.fullFilePath, - time: value.time, - volume: this.data.volume, - weight: this.data.weight + imgUrl1: value?.imgUrl1?.data?.fullFilePath, + imgUrl2: value?.imgUrl2?.data?.fullFilePath, + time: value?.time, + volume: this.data?.volume, + weight: this.data?.weight } params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ') this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe((res) => { From 99d00bafa88f4fe556b1e2c3618f09f3c40ec857 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 4 Mar 2022 15:36:26 +0800 Subject: [PATCH 2/6] fix bug --- .../onecar-publish.component.ts | 46 ++++++------------- .../release-publish.component.html | 9 ---- .../release-publish.component.ts | 46 ++++++------------- 3 files changed, 26 insertions(+), 75 deletions(-) diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index b2ee178e..fcfcf8c4 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -581,65 +581,45 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } } }, - receiptAddress: { - type: 'string', - title: '回单收件人信息', - ui: { - widget: 'custom', - placeholder: '请点击选择回单收件人信息', - // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), - visibleIf: { - receiptType: value => value === '2' - } - }, - default: '' - }, - receiptAddressId: { - type: 'string', - title: '', - ui: { - hidden: true - } - }, receiptUserName: { type: 'string', title: '联系人', + maxLength: 15, ui: { visibleIf: { receiptType: value => value === '2' } - }, - readOnly: true + } }, - phon: { + receiptUserPhone: { type: 'string', title: '联系电话', + maxLength: 11, ui: { visibleIf: { receiptType: value => value === '2' } - }, - readOnly: true + } }, - area: { + receiptAddressArea: { type: 'string', title: '所在地区', + maxLength: 30, ui: { visibleIf: { receiptType: value => value === '2' } - }, - readOnly: true + } }, - address: { + receiptAddress: { type: 'string', title: '详细地址', + maxLength: 30, ui: { visibleIf: { receiptType: value => value === '2' } - }, - readOnly: true + } }, remarks: { type: 'string', @@ -652,11 +632,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } as SFTextareaWidgetSchema } }, - required: ['stateReceipt', 'receiptType', 'receiptAddress'] + required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress'] }; this.ui6 = { '*': { - spanLabelFixed: 115, + spanLabelFixed: 90, grid: { span: 24 } } }; diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index 5981b49e..e8897d62 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -281,15 +281,6 @@
-
diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 6db5bdf8..6421e36f 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -565,65 +565,45 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } } }, - receiptAddress: { - type: 'string', - title: '回单收件人信息', - ui: { - widget: 'custom', - placeholder: '请点击选择回单收件人信息', - // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), - visibleIf: { - receiptType: value => value === '2' - } - }, - default: '' - }, - receiptAddressId: { - type: 'string', - title: '', - ui: { - hidden: true - } - }, receiptUserName: { type: 'string', title: '联系人', + maxLength: 15, ui: { visibleIf: { receiptType: value => value === '2' } - }, - readOnly: true + } }, - phon: { + receiptUserPhone: { type: 'string', title: '联系电话', + maxLength: 11, ui: { visibleIf: { receiptType: value => value === '2' } - }, - readOnly: true + } }, - area: { + receiptAddressArea: { type: 'string', title: '所在地区', + maxLength: 30, ui: { visibleIf: { receiptType: value => value === '2' } - }, - readOnly: true + } }, - address: { + receiptAddress: { type: 'string', title: '详细地址', + maxLength: 30, ui: { visibleIf: { receiptType: value => value === '2' } - }, - readOnly: true + } }, remarks: { type: 'string', @@ -636,11 +616,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } as SFTextareaWidgetSchema } }, - required: ['stateReceipt', 'receiptType', 'receiptAddress'] + required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress'] }; this.ui6 = { '*': { - spanLabelFixed: 115, + spanLabelFixed: 90, grid: { span: 24 } } }; From 855615d1ff002f2506cd6df33a648a3c9a0fed20 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 4 Mar 2022 16:14:22 +0800 Subject: [PATCH 3/6] fix bug --- .../bulk-detail/bulk-detail.component.ts | 2 +- .../bulk-publish/bulk-publish.component.ts | 13 ------ .../components/bulk/bulk.component.html | 4 +- .../components/bulk/bulk.component.ts | 11 +++-- .../vehicle-detail.component.ts | 2 +- .../components/vehicle/vehicle.component.html | 2 +- .../components/vehicle/vehicle.component.ts | 8 ++++ .../services/supply-management.service.ts | 40 ++++++++++--------- 8 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts index 235faf6f..75b71007 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts @@ -65,7 +65,7 @@ export class SupplyManagementBulkDetailComponent implements OnInit { get reqParams() { return { operateObject: this.i?.resourceCode, - operateType: 4, + operateTypeList: [4,7], }; } currentStatus = 0; diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 07b45ea3..ae2a93c3 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -464,19 +464,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } } }, - // receiptAddressId: { - // type: 'string', - // title: '选择地址', - // ui: { - // widget: 'custom', - // placeholder: '请点击选择收回单地址', - // // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), - // visibleIf: { - // receiptType: value => value === '2' - // } - // }, - // default: '' - // }, receiptUserName: { type: 'string', title: '联系人', 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 ad472530..27c00112 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-02 18:09:01 + * @LastEditTime : 2022-03-04 15:45:58 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -32,7 +32,7 @@
- + - +