| src/service/api/transaction.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/businessOperations/geofenceManagement/detail.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/transaction/order/orderManagement/components/Modal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/transaction/order/orderManagement/components/TableModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/transaction/order/orderManagement/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/service/api/transaction.ts
@@ -27,17 +27,17 @@ // 订单改价 export function changeAmount(params: any) { return request.Post<Service.ResponseResult<any>>('/order/api/v1/order/changeAmount', params) return request.Post<Service.ResponseResult<any>>(`/order/api/v1/order/changeAmount?id=${params.id}&amount=${params.amount}`) } // 获取订单详情 export function getOrderDetail(id: any) { return request.Get<Service.ResponseResult<any>>('/order/api/v1/order/queryById?id=' + id) return request.Get<Service.ResponseResult<any>>(`/order/api/v1/order/queryById?id=${id}`) } // 删除订单 export function deleteOrder(id: any) { return request.Delete<Service.ResponseResult<any>>('/order/api/v1/order/deleteById?id=' + id) return request.Delete<Service.ResponseResult<any>>(`/order/api/v1/order/deleteById?id=${id}`) } // 获取车队不分页列表 @@ -47,7 +47,7 @@ // 获取可用车辆列表 export function getAvailableVehicleList(orderId: any) { return request.Get<Service.ResponseResult<any>>('/vehicleConvoy/api/v1/vehicle/availableList?orderId=' + orderId) return request.Get<Service.ResponseResult<any>>(`/vehicleConvoy/api/v1/vehicle/availableList?orderId=${orderId}`) } /** 订单评价 */ @@ -76,7 +76,7 @@ // 删除导航与路径规划 export function deleteRoutePlan(id: any) { return request.Delete<Service.ResponseResult<any>>('/operation/api/v1/routePlan/deleteById/' + id) return request.Delete<Service.ResponseResult<any>>(`/operation/api/v1/routePlan/deleteById/${id}`) } /** 获取开通城市列表 */ @@ -84,9 +84,7 @@ return request.Get<Service.ResponseResult<any>>('/operation/base/v1/mini-program/api/v1/openCity/list') } // 交易策略 /** 获取交易策略 */ export function getTradingStrategyDetail() { @@ -98,9 +96,7 @@ return request.Post<Service.ResponseResult<any>>('/operation/api/v1/tradingStrategy/edit', params) } // 定价管理 /** 获取定价列表 */ export function getPricingList(params: any) { @@ -124,12 +120,12 @@ /** 删除定价 */ export function deletePricing(id: any) { return request.Delete<Service.ResponseResult<any>>('/operation/api/v1/pricing/deleteById?id=' + id) return request.Delete<Service.ResponseResult<any>>(`/operation/api/v1/pricing/deleteById?id=${id}`) } /** 获取定价详情 */ export function getPricingDetail(id: any) { return request.Get<Service.ResponseResult<any>>('/operation/api/v1/pricing/queryById?id=' + id) return request.Get<Service.ResponseResult<any>>(`/operation/api/v1/pricing/queryById?id=${id}`) } /** 计费规则 */ src/views/businessOperations/geofenceManagement/detail.vue
@@ -222,7 +222,6 @@ // 添加地图点击事件监听器,用于处理点击运营区域时的编辑状态切换 map.on('click', (e: any) => { // layerOptions.isActive = false console.log('点击事件', e) if (isDrawing) return // 检查是否点击在运营区域(主围栏)内或者点击在禁行区内 @@ -234,13 +233,11 @@ if (modalType.value !== 'detail') { // 检查是否点击在禁行区域内 if (disabledArea) { console.log('点击在禁行区域内', disabledArea) // 点击在禁行区域内,开启禁行区域编辑态 closeFenceEditor() handleDisallowedAreaEdit(disabledArea) } else { console.log('点击在运营区域内') // 关闭所有区域的编辑态 fenceEditor?.close() disallowedAreaList.value.forEach((item: any) => item.isActive = false) @@ -308,14 +305,12 @@ mouseTool.on('draw', (e: any) => { fence = e.obj // 绘制完成后,关闭绘制工具 console.log('绘制完成事件', e) mouseTool?.close() mouseTool = null isDrawing = false // 获取围栏坐标 fencePoints = fence.getPath().map((p: any) => [p.lng, p.lat]) console.log('围栏坐标:', fencePoints) if (fencePoints.length < 3) { message.error('请绘制至少3个点的围栏') @@ -340,7 +335,6 @@ function cancelDrawing() { const fence = mouseTool?.polygonTemp?.obj console.log('取消绘制事件', fence) const path = fence.getPath() if (!path || path.length === 0) return @@ -392,8 +386,10 @@ }) fenceEditor.open() isEditing = true console.log('开启编辑', fencePoints, fence) fenceEditor.on('end', (e: any) => { fenceEditor.on('adjust', (e: any) => { console.log('adjust') }) fenceEditor.on('end', () => { const path = fence.getPath() if (path.length < 3) { message.warning('运营区域至少需要3个点') @@ -414,7 +410,6 @@ // 正在绘制或编辑时,禁止再次绘制 // if (isDrawing || isEditing) { if (isEditing) { console.log('正在绘制或编辑禁行区,禁止再次绘制') return } isDrawing = true @@ -432,13 +427,11 @@ // 绘制完成事件 mouseTool.on('draw', (e: any) => { // 绘制完成后,关闭绘制工具 console.log('绘制完成事件', mouseTool) mouseTool?.close() mouseTool = null isDrawing = false // 获取围栏坐标 const path = e.obj.getPath().map((p: any) => [p.lng, p.lat]) console.log('禁行区围栏坐标:', path) if (path.length < 3) { message.error('请绘制至少3个点的禁行区') map.remove(e.obj) @@ -454,7 +447,6 @@ } // 计算禁行区面积 const area = calcPolygonArea(e.obj.getPath()) console.log('禁行区面积:', area) if (area > MAX_AREA) { message.warning(`当前禁行区范围过大,请缩小区域`) map.remove(e.obj) @@ -556,7 +548,6 @@ /** 编辑完成后最终校验(兜底) */ fenceEditor.on('end', (e: any) => { console.log('编辑完成事件', e, '11111111111111111111111111') const path = e.target ? e.target.getPath() : disallowedArea.fence.getPath() if (path.length < 3) { if (!fenceEditorClosed) { @@ -573,7 +564,6 @@ return false } const area = calcPolygonArea(path) console.log('禁行区面积:', path) // 检查面积限制 if (area > MAX_AREA) { message.warning(`当前禁行区范围过大,请缩小区域`) @@ -718,6 +708,10 @@ expireTimeTimestamp: null, } const formModel = ref({ ...formDefault }) const effectTimeText = ref('') const failureTimeText = ref('') const effectTimePicker = ref<any>() const failureTimePicker = ref<any>() const rules = { electronicName: { @@ -880,11 +874,6 @@ } } } const effectTimeText = ref('') const failureTimeText = ref('') const effectTimePicker = ref<any>() const failureTimePicker = ref<any>() /** 监听生效时间 */ function handleEffectTime() { @@ -1579,7 +1568,7 @@ }) // 添加鼠标进入事件 polygon.on('mouseover', (e: any) => { polygon.on('mouseover', () => { // 计算多边形中心点作为信息窗口位置 const centroid = calculateCentroid(points) @@ -1595,7 +1584,7 @@ }) // 添加鼠标离开事件 polygon.on('mouseout', (e: any) => { polygon.on('mouseout', () => { // 关闭信息窗口 if (infoWindow) { infoWindow.close() src/views/transaction/order/orderManagement/components/Modal.vue
@@ -13,6 +13,7 @@ const emit = defineEmits<{ open: [] close: [] refresh: [] }>() const { bool: modalVisible, setTrue: showModal, setFalse: hiddenModal } = useBoolean(false) @@ -54,6 +55,7 @@ }).then((res) => { if (res.code === 200) { window.$message.success('改价成功') emit('refresh') closeModal() } }).finally(() => { @@ -61,20 +63,22 @@ }) } watch(() => formModel.value, (newVal) => { if (!newVal.orderMoney || !newVal.discountAmount) { watch(() => formModel.value.discountAmount, (newVal) => { if (!newVal || !formModel.value.orderMoney) { return } formModel.value.totalAmount = `${Number(newVal.orderMoney) - Number(newVal.discountAmount)}` formModel.value.totalAmount = `${Number(formModel.value.orderMoney) - Number(newVal)}` }) </script> <template> <n-modal v-model:show="modalVisible" :mask-closable="false" preset="card" :title="modalName" class="w-400px" <n-modal v-model:show="modalVisible" :mask-closable="false" preset="card" :title="modalName" class="w-400px" :segmented="{ content: true, action: true, }"> }" > <n-form ref="formRef" label-placement="left" :model="formModel" require-mark-placement="left"> <n-form-item :span="1" label="当前订单金额:" path="orderMoney"> {{ formModel.orderMoney }}元 src/views/transaction/order/orderManagement/components/TableModal.vue
@@ -13,6 +13,7 @@ const emit = defineEmits<{ open: [] close: [] refresh: [] }>() const { bool: modalVisible, setTrue: showModal, setFalse: hiddenModal } = useBoolean(false) @@ -52,6 +53,7 @@ }).then((res: any) => { if (res.code === 0) { window.$message.success('改派成功') emit('refresh') closeModal() } }).finally(() => { @@ -69,7 +71,7 @@ const options = ref() const getList = async (orderId: number) => { async function getList(orderId: number) { const res = await getAvailableVehicleList(orderId) if (res.code === 0) { options.value = res.data.map((item: any) => ({ @@ -81,11 +83,13 @@ </script> <template> <n-modal v-model:show="modalVisible" :mask-closable="false" preset="card" :title="modalName" class="w-400px" <n-modal v-model:show="modalVisible" :mask-closable="false" preset="card" :title="modalName" class="w-400px" :segmented="{ content: true, action: true, }"> }" > <n-form ref="formRef" :rules="rules" label-placement="left" :model="formModel" require-mark-placement="left"> <n-form-item :span="1" label="改派车辆" path="vehicleId"> <n-select v-model:value="formModel.vehicleId" :options="options" /> src/views/transaction/order/orderManagement/index.vue
@@ -568,7 +568,7 @@ <Pagination :count="count" :page="pageParams.pageNum" :page-size="pageParams.pageSize" class="robotaxi-pagination mt-12px" @change="changePage" /> </div> </n-card> <TableModal ref="modalRef" modal-name="改派" /> <Modal ref="modalRef1" modal-name="改价" /> <TableModal ref="modalRef" modal-name="改派" @refresh="handleSearch" /> <Modal ref="modalRef1" modal-name="改价" @refresh="handleSearch"/> </div> </template>