diff --git a/src/views/business/components/waybill-manage-page.vue b/src/views/business/components/waybill-manage-page.vue index a582422..70b6a03 100644 --- a/src/views/business/components/waybill-manage-page.vue +++ b/src/views/business/components/waybill-manage-page.vue @@ -2835,8 +2835,11 @@ @@ -2931,6 +2934,14 @@ + + photo?.url) .map(photo => ({ url: photo.url, type: photo.voucherType || photo.type || '' })), }; + this.waybillPunchAddressMapVisible = false; this.waybillPunchRecordEditDialog.visible = true; }, + // 地图选点回填:地址与经纬度必须成套,只回填地址会让坐标停留在旧点上 + handleWaybillPunchAddressMapConfirm(payload) { + const selection = typeof payload === 'string' ? { address: payload } : payload || {}; + if (selection.address) { + this.waybillPunchEditForm.address = selection.address; + } + if ( + selection.longitude !== undefined && + selection.longitude !== null && + selection.longitude !== '' + ) { + this.waybillPunchEditForm.longitude = Number(selection.longitude).toFixed(6); + } + if ( + selection.latitude !== undefined && + selection.latitude !== null && + selection.latitude !== '' + ) { + this.waybillPunchEditForm.latitude = Number(selection.latitude).toFixed(6); + } + }, beforeWaybillPunchPhotoUpload(file) { const validType = ['image/jpeg', 'image/png', 'image/jpg', 'image/bmp'].includes(file.type); if (!validType) {