✨ 运单详情编辑打卡记录支持地图选点定打卡地址
打卡地址改为只读输入框,点击弹出地图选址(复用 address-map-picker, 与空港、港口、维修记录等处同一套),确定后回填地址与经纬度。 地址与经纬度成套更新——只回填地址会让坐标停留在司机打卡时的旧点上。 经纬度输入框保留,仍可手工微调。
This commit is contained in:
@@ -2835,8 +2835,11 @@
|
|||||||
<el-form-item label="打卡地址">
|
<el-form-item label="打卡地址">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="waybillPunchEditForm.address"
|
v-model="waybillPunchEditForm.address"
|
||||||
|
readonly
|
||||||
maxlength="500"
|
maxlength="500"
|
||||||
placeholder="请输入"
|
placeholder="点击选择地图地址"
|
||||||
|
:suffix-icon="Location"
|
||||||
|
@click="waybillPunchAddressMapVisible = true"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -2931,6 +2934,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<address-map-picker
|
||||||
|
v-model="waybillPunchAddressMapVisible"
|
||||||
|
:address="waybillPunchEditForm.address"
|
||||||
|
:longitude="waybillPunchEditForm.longitude"
|
||||||
|
:latitude="waybillPunchEditForm.latitude"
|
||||||
|
@confirm="handleWaybillPunchAddressMapConfirm"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="attachmentDocumentPreviewVisible"
|
v-model="attachmentDocumentPreviewVisible"
|
||||||
:title="attachmentPreviewFile.name || '附件预览'"
|
:title="attachmentPreviewFile.name || '附件预览'"
|
||||||
@@ -3668,6 +3679,7 @@ import {
|
|||||||
trackVehicle,
|
trackVehicle,
|
||||||
} from '@/api/business/waybill-manage';
|
} from '@/api/business/waybill-manage';
|
||||||
import VoucherExecutionDetail from './voucher-execution-detail.vue';
|
import VoucherExecutionDetail from './voucher-execution-detail.vue';
|
||||||
|
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
||||||
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
||||||
import {
|
import {
|
||||||
fetchDriversByCarrierOrganizations,
|
fetchDriversByCarrierOrganizations,
|
||||||
@@ -3874,6 +3886,7 @@ export default {
|
|||||||
ElImageViewer,
|
ElImageViewer,
|
||||||
OpenFileViewer,
|
OpenFileViewer,
|
||||||
VoucherExecutionDetail,
|
VoucherExecutionDetail,
|
||||||
|
AddressMapPicker,
|
||||||
},
|
},
|
||||||
name: 'WaybillManagePage',
|
name: 'WaybillManagePage',
|
||||||
props: {
|
props: {
|
||||||
@@ -3981,6 +3994,7 @@ export default {
|
|||||||
remark: '',
|
remark: '',
|
||||||
photos: [],
|
photos: [],
|
||||||
},
|
},
|
||||||
|
waybillPunchAddressMapVisible: false,
|
||||||
waybillRouteChangeBox: false,
|
waybillRouteChangeBox: false,
|
||||||
waybillRouteChangeTab: 'change',
|
waybillRouteChangeTab: 'change',
|
||||||
waybillRouteChangeRows: [],
|
waybillRouteChangeRows: [],
|
||||||
@@ -5876,8 +5890,30 @@ export default {
|
|||||||
.filter(photo => photo?.url)
|
.filter(photo => photo?.url)
|
||||||
.map(photo => ({ url: photo.url, type: photo.voucherType || photo.type || '' })),
|
.map(photo => ({ url: photo.url, type: photo.voucherType || photo.type || '' })),
|
||||||
};
|
};
|
||||||
|
this.waybillPunchAddressMapVisible = false;
|
||||||
this.waybillPunchRecordEditDialog.visible = true;
|
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) {
|
beforeWaybillPunchPhotoUpload(file) {
|
||||||
const validType = ['image/jpeg', 'image/png', 'image/jpg', 'image/bmp'].includes(file.type);
|
const validType = ['image/jpeg', 'image/png', 'image/jpg', 'image/bmp'].includes(file.type);
|
||||||
if (!validType) {
|
if (!validType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user