增加取放货点
发起任务增加取放货点
This commit is contained in:
parent
39c2a529a8
commit
44b4935aa4
@ -4,9 +4,9 @@ NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
# VITE_BASE_URL='http://10.10.7.132:48080'
|
||||
VITE_BASE_URL='http://10.10.7.132:48080'
|
||||
# VITE_BASE_URL='http://10.10.100.15:48080'
|
||||
VITE_BASE_URL='http://10.10.5.5:48080'
|
||||
# VITE_BASE_URL='http://10.10.5.5:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
|
@ -101,7 +101,7 @@
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-else-if="locationTypeNumber == 2 || locationTypeNumber == 3">
|
||||
<el-popover placement="top" trigger="click" :popper-style="{ padding: '0px' }">
|
||||
<template #reference>
|
||||
<img
|
||||
@ -135,6 +135,21 @@
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
<template v-else-if="locationTypeNumber == 4">
|
||||
<div
|
||||
@click="choosePoint(item)"
|
||||
:style="{
|
||||
position: 'absolute',
|
||||
left: Number(item.locationX) - Number(item.locationWidePx) / 2 + 'px',
|
||||
top: Number(item.locationY) - Number(item.locationDeepPx) / 2 + 'px',
|
||||
width: item.locationWidePx + 'px',
|
||||
height: item.locationDeepPx + 'px',
|
||||
zIndex: 999,
|
||||
backgroundColor: item.id == currentItem?.id ? '#5ecc62' : '#000',
|
||||
borderRadius: '50%'
|
||||
}"
|
||||
></div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -289,10 +304,11 @@ const getAllNodeList = async () => {
|
||||
item.locationDeepPx = pxObj.pHeight
|
||||
}
|
||||
allMapPointInfo.value.push(item)
|
||||
return
|
||||
}
|
||||
|
||||
//线库 laneId
|
||||
if (item.type === 2 && locationTypeNumber.value == 2 && item.laneId !== null) {
|
||||
if (locationTypeNumber.value == 2 && item.type === 2 && item.laneId !== null) {
|
||||
item.locationX = Number(item.locationX) * (imgBgObj.showWidth / imgBgObj.width)
|
||||
item.locationY = Number(item.locationY) * (imgBgObj.showWidth / imgBgObj.width)
|
||||
item.dataList = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
|
||||
@ -307,10 +323,11 @@ const getAllNodeList = async () => {
|
||||
item.locationDeepPx = pxObj.pHeight
|
||||
}
|
||||
allMapPointInfo.value.push(item)
|
||||
return
|
||||
}
|
||||
|
||||
//区域 areaId
|
||||
if (item.type === 2 && locationTypeNumber.value == 3 && item?.areaId !== null) {
|
||||
if (locationTypeNumber.value == 3 && item.type === 2 && item?.areaId !== null) {
|
||||
item.locationX = Number(item.locationX) * (imgBgObj.showWidth / imgBgObj.width)
|
||||
item.locationY = Number(item.locationY) * (imgBgObj.showWidth / imgBgObj.width)
|
||||
item.dataList = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
|
||||
@ -325,6 +342,24 @@ const getAllNodeList = async () => {
|
||||
item.locationDeepPx = pxObj.pHeight
|
||||
}
|
||||
allMapPointInfo.value.push(item)
|
||||
return
|
||||
}
|
||||
|
||||
if (item.type === 8 && locationTypeNumber.value == 4) {
|
||||
item.locationX = Number(item.locationX) * (imgBgObj.showWidth / imgBgObj.width)
|
||||
item.locationY = Number(item.locationY) * (imgBgObj.showWidth / imgBgObj.width)
|
||||
item.dataList = item.dataJson ? JSONBigInt({ storeAsString: true }).parse(item.dataJson) : []
|
||||
item.locationDeepPx = 8
|
||||
item.locationWidePx = 8
|
||||
|
||||
//要将实际的cm改成px
|
||||
if (item.locationWide && item.locationDeep) {
|
||||
let pxObj = cmConversionPx(item.locationWide, item.locationDeep)
|
||||
item.locationWidePx = pxObj.pWidth
|
||||
item.locationDeepPx = pxObj.pHeight
|
||||
}
|
||||
allMapPointInfo.value.push(item)
|
||||
return
|
||||
}
|
||||
|
||||
if (item.dataList && item.dataList.length > 0) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<Dialog
|
||||
v-model="dialogFormVisible"
|
||||
title="节点属性"
|
||||
width="650"
|
||||
width="700"
|
||||
class="node-form-dialog"
|
||||
@close="dialogClose"
|
||||
>
|
||||
@ -73,9 +73,10 @@
|
||||
<el-option label="取放货点" :value="8" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="弧度" prop="locationYaw" required>
|
||||
<el-input-number
|
||||
class="!w-300px"
|
||||
class="!w-18.75rem"
|
||||
v-model="form.locationYaw"
|
||||
:min="-MathPI"
|
||||
:max="MathPI"
|
||||
@ -83,10 +84,11 @@
|
||||
:precision="4"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<div v-if="form.type === 2 || form.type === 3 || form.type === 4">
|
||||
<el-form-item label="层数" prop="layersNumber" required v-if="form.type === 2">
|
||||
<el-input-number
|
||||
class="!w-300px"
|
||||
class="!w-18.75rem"
|
||||
v-model="form.layersNumber"
|
||||
:min="1"
|
||||
:max="4"
|
||||
@ -97,14 +99,14 @@
|
||||
<el-text class="mx-1">(最大层数:4)</el-text>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="locationNumber" v-if="form.type === 2" required>
|
||||
<el-input-number class="!w-300px" v-model="form.locationNumber" :min="1" />
|
||||
<el-input-number class="!w-18.75rem" v-model="form.locationNumber" :min="1" />
|
||||
<el-text class="mx-1">(最大值:10000000)</el-text>
|
||||
</el-form-item>
|
||||
<el-form-item label="编号" prop="deviceId" required v-if="form.type === 3">
|
||||
<div>
|
||||
<el-select
|
||||
v-model="deviceInfo.deviceType"
|
||||
class="!w-160px"
|
||||
class="!w-10rem"
|
||||
clearable
|
||||
placeholder="请选择设备类型"
|
||||
@change="deviceTypeChange()"
|
||||
@ -118,7 +120,7 @@
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="form.deviceId"
|
||||
class="!w-160px ml-4"
|
||||
class="!w-10rem ml-4"
|
||||
clearable
|
||||
placeholder="请选择设备编号"
|
||||
@change="deviceChange"
|
||||
@ -133,10 +135,9 @@
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="库位类型" required prop="locationTypeId" v-if="form.type === 2">
|
||||
<el-select
|
||||
class="!w-300px"
|
||||
class="!w-18.75rem"
|
||||
v-model="form.locationTypeId"
|
||||
clearable
|
||||
placeholder="请选择库位类型"
|
||||
@ -150,11 +151,10 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="库位长度" prop="locationDeep" required>
|
||||
<div style="display: flex">
|
||||
<el-input-number
|
||||
class="!w-300px"
|
||||
class="!w-18.75rem"
|
||||
placeholder="请输入"
|
||||
v-model="form.locationDeep"
|
||||
:min="10"
|
||||
@ -166,7 +166,7 @@
|
||||
<el-form-item label="库位宽度" prop="locationWide" required>
|
||||
<div style="display: flex">
|
||||
<el-input-number
|
||||
class="!w-300px"
|
||||
class="!w-18.75rem"
|
||||
placeholder="请输入"
|
||||
v-model="form.locationWide"
|
||||
:min="10"
|
||||
@ -197,6 +197,31 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<div v-if="form.type === 8">
|
||||
<el-button type="primary" class="ml-9 mb-4 mt-2" @click="addPointInfo"
|
||||
>添加点位信息</el-button
|
||||
>
|
||||
<div v-for="(item, index) in form.dataList" :key="index">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" :prop="`dataList.${index}.pointName`">
|
||||
<el-input v-model="item.pointName" style="width: 100%" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="托盘高度" :prop="`dataList.${index}.trayHeight`">
|
||||
<div class="flex-center">
|
||||
<el-input v-model="item.trayHeight" style="width: 100%" placeholder="请输入" />
|
||||
<el-icon size="20" class="ml-2" color="#ff4c4c" @click="deletePointInfo(index)"
|
||||
><CircleCloseFilled
|
||||
/></el-icon>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -331,7 +356,7 @@ const submit = async (formEl) => {
|
||||
await formEl.validate((valid, fields) => {
|
||||
if (!valid) return
|
||||
//在这边把数据处理好
|
||||
if (form.value.type === 1 || form.value.type === 6 || form.value.type === 8) {
|
||||
if (form.value.type === 1 || form.value.type === 6) {
|
||||
//不需要dataJson的类型
|
||||
form.value.dataJson = ''
|
||||
} else if (form.value.type === 2) {
|
||||
@ -383,6 +408,8 @@ const submit = async (formEl) => {
|
||||
form.value.dataJson = JSON.stringify(form.value.dataObj)
|
||||
} else if (form.value.type === 5) {
|
||||
form.value.dataJson = JSON.stringify(form.value.dataObj)
|
||||
} else if (form.value.type === 8) {
|
||||
form.value.dataJson = JSON.stringify(form.value.dataList)
|
||||
} else {
|
||||
//类型为路径点位 区域变更点 等待点 值为对象
|
||||
form.value.dataObj.positionMapId = props.positionMapId
|
||||
@ -446,63 +473,41 @@ const typeChange = (type) => {
|
||||
form.value.dataObj = {}
|
||||
form.value.dataList = []
|
||||
form.value.locationTypeId = null
|
||||
if (type === 1 || type === 8) {
|
||||
form.value.layersNumber = null
|
||||
form.value.direction = null
|
||||
form.value.inDirection = null
|
||||
form.value.outDirection = null
|
||||
form.value.locationNumber = null
|
||||
form.value.locationDeep = 40
|
||||
form.value.locationWide = 40
|
||||
form.value.locationDeepPx = 8
|
||||
form.value.locationWidePx = 8
|
||||
} else if (type === 2) {
|
||||
if (type === 2) {
|
||||
form.value.locationNumber = null
|
||||
//选一个默认的库位
|
||||
let firstItem = houseLocationTypeList.value[0]
|
||||
form.value.locationTypeId = firstItem.id
|
||||
form.value.locationDeep = Number(firstItem.locationDeep)
|
||||
form.value.locationWide = Number(firstItem.locationWide)
|
||||
} else if (type === 3) {
|
||||
form.value.direction = null
|
||||
form.value.inDirection = null
|
||||
form.value.outDirection = null
|
||||
form.value.locationNumber = null
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
} else if (type === 4) {
|
||||
form.value.direction = null
|
||||
form.value.inDirection = null
|
||||
form.value.outDirection = null
|
||||
form.value.locationNumber = null
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
} else if (type === 5) {
|
||||
} else {
|
||||
if (type === 1 || type === 8) {
|
||||
form.value.locationDeep = 40
|
||||
form.value.locationWide = 40
|
||||
form.value.locationDeepPx = 8
|
||||
form.value.locationWidePx = 8
|
||||
} else {
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
}
|
||||
form.value.layersNumber = null
|
||||
form.value.direction = null
|
||||
form.value.inDirection = null
|
||||
form.value.outDirection = null
|
||||
form.value.locationNumber = null
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
} else if (type === 6) {
|
||||
form.value.layersNumber = null
|
||||
form.value.direction = null
|
||||
form.value.inDirection = null
|
||||
form.value.outDirection = null
|
||||
form.value.locationNumber = null
|
||||
form.value.locationDeep = 150
|
||||
form.value.locationWide = 150
|
||||
form.value.locationDeepPx = 30
|
||||
form.value.locationWidePx = 30
|
||||
}
|
||||
}
|
||||
|
||||
const addPointInfo = () => {
|
||||
form.value.dataList.push({ pointName: '', trayHeight: '' })
|
||||
}
|
||||
|
||||
const deletePointInfo = (index) => {
|
||||
form.value.dataList.splice(index, 1)
|
||||
}
|
||||
|
||||
//设备切换
|
||||
const deviceChange = (deviceId) => {
|
||||
deviceList.value.forEach((item) => {
|
||||
|
@ -4301,7 +4301,7 @@ const getAllNodeList = async () => {
|
||||
item.lockAspectRatio = true
|
||||
} else if (item.type === 2) {
|
||||
//库位点
|
||||
item.dataList = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
|
||||
item.dataList = item.dataJson ? JSONBigInt({ storeAsString: true }).parse(item.dataJson) : []
|
||||
item.locationDeep = item.dataList[0].locationDeep
|
||||
item.locationWide = item.dataList[0].locationWide
|
||||
item.areaName = item.dataList[0].areaName || undefined
|
||||
@ -4312,7 +4312,7 @@ const getAllNodeList = async () => {
|
||||
item.rotatable = false
|
||||
item.lockAspectRatio = true
|
||||
} else if (item.type === 3) {
|
||||
item.dataObj = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
|
||||
item.dataObj = item.dataJson ? JSONBigInt({ storeAsString: true }).parse(item.dataJson) : {}
|
||||
item.dataList = []
|
||||
item.locationDeep = item.dataObj.locationDeep
|
||||
item.locationWide = item.dataObj.locationWide
|
||||
@ -4325,7 +4325,7 @@ const getAllNodeList = async () => {
|
||||
item.rotatable = false
|
||||
item.lockAspectRatio = true
|
||||
} else if (item.type === 4) {
|
||||
item.dataObj = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
|
||||
item.dataObj = item.dataJson ? JSONBigInt({ storeAsString: true }).parse(item.dataJson) : {}
|
||||
item.dataList = []
|
||||
item.locationDeep = item.dataObj.locationDeep
|
||||
item.locationWide = item.dataObj.locationWide
|
||||
@ -4343,7 +4343,7 @@ const getAllNodeList = async () => {
|
||||
item.rotatable = false
|
||||
item.lockAspectRatio = true
|
||||
} else if (item.type === 7) {
|
||||
item.dataObj = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
|
||||
item.dataObj = item.dataJson ? JSONBigInt({ storeAsString: true }).parse(item.dataJson) : {}
|
||||
item.text = item.dataObj.text
|
||||
item.fontColor = item.dataObj.fontColor
|
||||
item.fontFamily = item.dataObj.fontFamily
|
||||
@ -4355,6 +4355,15 @@ const getAllNodeList = async () => {
|
||||
item.lockAspectRatio = true
|
||||
item.locationDeep = 20
|
||||
item.locationWide = 20
|
||||
} else if (item.type === 8) {
|
||||
item.dataObj = {}
|
||||
item.dataList = item.dataJson ? JSONBigInt({ storeAsString: true }).parse(item.dataJson) : []
|
||||
item.locationDeep = 40
|
||||
item.locationWide = 40
|
||||
item.draggable = true
|
||||
item.resizable = false
|
||||
item.rotatable = false
|
||||
item.lockAspectRatio = true
|
||||
}
|
||||
|
||||
//要将实际的cm改成px
|
||||
|
@ -196,6 +196,7 @@
|
||||
<el-option label="库位" :value="1" />
|
||||
<el-option label="线库" :value="2" />
|
||||
<el-option label="区域" :value="3" />
|
||||
<el-option label="取放货点" :value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -224,7 +225,7 @@
|
||||
<el-option
|
||||
v-for="item in detailItem.takeList"
|
||||
:key="item.id"
|
||||
:label="item.locationNo"
|
||||
:label="detailItem.takeType == 4 ? item.pointName : item.locationNo"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -255,6 +256,7 @@
|
||||
<el-option label="库位" :value="1" />
|
||||
<el-option label="线库" :value="2" />
|
||||
<el-option label="区域" :value="3" />
|
||||
<el-option label="取放货点" :value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -283,7 +285,7 @@
|
||||
<el-option
|
||||
v-for="item in detailItem.releaseList"
|
||||
:key="item.id"
|
||||
:label="item.locationNo"
|
||||
:label="detailItem.releaseType == 4 ? item.pointName : item.locationNo"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -440,7 +442,7 @@
|
||||
<el-option
|
||||
v-for="item in detailItem.releaseList"
|
||||
:key="item.id"
|
||||
:label="item.locationNo"
|
||||
:label="detailItem.releaseType == 4 ? item.pointName : item.locationNo"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -466,6 +468,7 @@
|
||||
<el-option label="库位" :value="1" />
|
||||
<el-option label="线库" :value="2" />
|
||||
<el-option label="区域" :value="3" />
|
||||
<el-option label="取放货点" :value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -494,7 +497,7 @@
|
||||
<el-option
|
||||
v-for="item in detailItem.takeList"
|
||||
:key="item.id"
|
||||
:label="item.locationNo"
|
||||
:label="detailItem.takeType == 4 ? item.pointName : item.locationNo"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -551,6 +554,7 @@
|
||||
<el-option label="库位" :value="1" />
|
||||
<el-option label="线库" :value="2" />
|
||||
<el-option label="区域" :value="3" />
|
||||
<el-option label="取放货点" :value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -579,7 +583,7 @@
|
||||
<el-option
|
||||
v-for="item in detailItem.releaseList"
|
||||
:key="item.id"
|
||||
:label="item.locationNo"
|
||||
:label="detailItem.releaseType == 4 ? item.pointName : item.locationNo"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
@ -669,110 +673,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<!-- 扫描码 -->
|
||||
<!-- <div v-if="detailItem.taskType === 7">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
required
|
||||
label="车辆编号"
|
||||
:prop="`taskDetailList[${index}].robotNo`"
|
||||
:rules="{ required: true, message: '车辆不能为空', trigger: 'change' }"
|
||||
>
|
||||
<el-select v-model="detailItem.robotNo" placeholder="请选择车辆">
|
||||
<el-option
|
||||
v-for="car in robotList"
|
||||
:key="car.id"
|
||||
:label="car.robotList"
|
||||
:value="car.robotNo"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
required
|
||||
label="放货位置"
|
||||
:prop="`taskDetailList[${index}].releaseId`"
|
||||
:rules="{ required: true, message: '放货位置不能为空', trigger: 'change' }"
|
||||
>
|
||||
<el-select
|
||||
:disabled="!detailItem.releaseType"
|
||||
v-model="detailItem.releaseId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入放货位置"
|
||||
:remote-method="
|
||||
(query) => {
|
||||
releaseRemoteMethod(query, detailItem)
|
||||
}
|
||||
"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in detailItem.releaseList"
|
||||
:key="item.id"
|
||||
:label="item.locationNo"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div> -->
|
||||
<!-- 检测托盘类型 -->
|
||||
<!-- <div v-if="detailItem.taskType === 8">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
required
|
||||
label="车辆编号"
|
||||
:prop="`taskDetailList[${index}].robotNo`"
|
||||
:rules="{ required: true, message: '车辆不能为空', trigger: 'change' }"
|
||||
>
|
||||
<el-select v-model="detailItem.robotNo" placeholder="请选择车辆">
|
||||
<el-option
|
||||
v-for="car in robotList"
|
||||
:key="car.id"
|
||||
:label="car.robotList"
|
||||
:value="car.robotNo"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
required
|
||||
label="检测位置"
|
||||
:prop="`taskDetailList[${index}].releaseId`"
|
||||
:rules="{ required: true, message: '检测位置不能为空', trigger: 'change' }"
|
||||
>
|
||||
<el-select
|
||||
:disabled="!detailItem.releaseType"
|
||||
v-model="detailItem.releaseId"
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入检测位置"
|
||||
:remote-method="
|
||||
(query) => {
|
||||
releaseRemoteMethod(query, detailItem)
|
||||
}
|
||||
"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in detailItem.releaseList"
|
||||
:key="item.id"
|
||||
:label="item.locationNo"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@ -789,6 +689,7 @@
|
||||
import { reactive } from 'vue'
|
||||
import { RefreshRight, Position } from '@element-plus/icons-vue'
|
||||
import * as MapTaskAPi from '@/api/map/mapTask'
|
||||
import * as DeviceApi from '@/api/device/index'
|
||||
import locationSelectionDialog from '../components/locationSelectionDialog.vue'
|
||||
|
||||
defineOptions({ name: 'TaskManagementCreateTask' })
|
||||
@ -815,7 +716,7 @@ const formData = ref({
|
||||
{
|
||||
taskType: 1, //任务类型(1:取放货、2:停车、 3:充电、4:移动、5:仅取货、6:仅放货、7:扫描码、8:检测托盘类型)
|
||||
releaseType: 1, //放货类型 1:库位、2:线库、 3:区域
|
||||
takeType: 1, //取货类型(1:库位、2:线库、 3:区域)
|
||||
takeType: 1, //取货类型(1:库位、2:线库、 3:区域 4.取放货点)
|
||||
releaseId: undefined, //放货位置的id
|
||||
releaseList: [], //放货的名称的列表
|
||||
takeId: undefined, //取货位置的id
|
||||
@ -859,7 +760,7 @@ const resetFormData = () => {
|
||||
{
|
||||
taskType: 1, //任务类型(1:取放货、2:停车、 3:充电、4:移动、5:仅取货、6:仅放货、7:扫描码、8:检测托盘类型)
|
||||
releaseType: 1, //放货类型 1:库位、2:线库、 3:区域 4:点位
|
||||
takeType: 1, //取货类型(1:库位、2:线库、 3:区域)
|
||||
takeType: 1, //取货类型(1:库位、2:线库、 3:区域 4.取放货点)
|
||||
releaseId: undefined, //放货位置的id
|
||||
releaseList: [], //放货的名称的列表
|
||||
takeId: undefined, //取货位置的id
|
||||
@ -904,10 +805,14 @@ const getTaskNo = async () => {
|
||||
|
||||
//获取取货位置可选的列表
|
||||
const getLocationList = async (type, locationNo) => {
|
||||
return await MapTaskAPi.getLocationByName({
|
||||
type, // 放货类型(1:库位、2:线库、 3:区域)
|
||||
locationNo
|
||||
})
|
||||
if (type == 4) {
|
||||
return await DeviceApi.getWareHouseTakePointList({ pointType: 1 })
|
||||
} else {
|
||||
return await MapTaskAPi.getLocationByName({
|
||||
type, // 放货类型(1:库位、2:线库、 3:区域)
|
||||
locationNo
|
||||
})
|
||||
}
|
||||
}
|
||||
//放货的选择列表
|
||||
const loading = ref(false)
|
||||
@ -1305,7 +1210,7 @@ const chooseLocation = (type, item, index) => {
|
||||
const locationSelectionDialogSuccess = (item) => {
|
||||
if (chooseLocationType.value == 'take') {
|
||||
//取货
|
||||
if (locationTypeNumber.value == 1) {
|
||||
if (locationTypeNumber.value == 1 || locationTypeNumber.value == 4) {
|
||||
// 1库位
|
||||
takeRemoteMethod(item.locationNo, formData.value.taskDetailList[currentItemIndex.value])
|
||||
formData.value.taskDetailList[currentItemIndex.value].takeId = item.id
|
||||
@ -1313,14 +1218,14 @@ const locationSelectionDialogSuccess = (item) => {
|
||||
// 2线库
|
||||
takeRemoteMethod(item.laneName, formData.value.taskDetailList[currentItemIndex.value])
|
||||
formData.value.taskDetailList[currentItemIndex.value].takeId = item.laneId
|
||||
} else {
|
||||
} else if (locationTypeNumber.value == 3) {
|
||||
// 3区域
|
||||
takeRemoteMethod(item.areaName, formData.value.taskDetailList[currentItemIndex.value])
|
||||
formData.value.taskDetailList[currentItemIndex.value].takeId = item.areaId
|
||||
}
|
||||
} else if (chooseLocationType.value == 'release') {
|
||||
//放货
|
||||
if (locationTypeNumber.value == 1) {
|
||||
if (locationTypeNumber.value == 1 || locationTypeNumber.value == 4) {
|
||||
// 1库位
|
||||
releaseRemoteMethod(item.locationNo, formData.value.taskDetailList[currentItemIndex.value])
|
||||
formData.value.taskDetailList[currentItemIndex.value].releaseId = item.id
|
||||
@ -1328,7 +1233,7 @@ const locationSelectionDialogSuccess = (item) => {
|
||||
// 2线库
|
||||
releaseRemoteMethod(item.laneName, formData.value.taskDetailList[currentItemIndex.value])
|
||||
formData.value.taskDetailList[currentItemIndex.value].releaseId = item.laneId
|
||||
} else {
|
||||
} else if (locationTypeNumber.value == 3) {
|
||||
// 3区域
|
||||
releaseRemoteMethod(item.areaName, formData.value.taskDetailList[currentItemIndex.value])
|
||||
formData.value.taskDetailList[currentItemIndex.value].releaseId = item.areaId
|
||||
|
Loading…
Reference in New Issue
Block a user