diamagnetic更新
This commit is contained in:
parent
cb47a1a814
commit
fd8b4a04f0
|
|
@ -8,32 +8,27 @@ const updateConfig = (params) => {
|
||||||
return request.post('/config/updateConfig', params)
|
return request.post('/config/updateConfig', params)
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryBoxConfig = (params) => {
|
const restartSystem = (params) => {
|
||||||
return request.post('/config/queryBoxConfig', params)
|
return request({
|
||||||
|
url: '/system/restartSystem',
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
timeout: 5000
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryBoxConfigByPage = (params) => {
|
const reloadConfig = (params) => {
|
||||||
return request.post('/config/queryBoxConfigByPage', params)
|
return request({
|
||||||
}
|
url: '/system/reloadConfig',
|
||||||
|
method: 'post',
|
||||||
const updateBoxConfig = (params) => {
|
data: params,
|
||||||
return request.post('/config/updateBoxConfig', params)
|
timeout: 5000
|
||||||
}
|
})
|
||||||
|
|
||||||
const addBoxConfig = (params) => {
|
|
||||||
return request.post('/config/addBoxConfig', params)
|
|
||||||
}
|
|
||||||
|
|
||||||
const deleteBoxConfig = (params) => {
|
|
||||||
return request.post('/config/deleteBoxConfig', params)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getConfigs,
|
getConfigs,
|
||||||
updateConfig,
|
updateConfig,
|
||||||
queryBoxConfig,
|
restartSystem,
|
||||||
queryBoxConfigByPage,
|
reloadConfig
|
||||||
updateBoxConfig,
|
|
||||||
addBoxConfig,
|
|
||||||
deleteBoxConfig
|
|
||||||
}
|
}
|
||||||
199
src/api/excel.js
199
src/api/excel.js
|
|
@ -1,6 +1,6 @@
|
||||||
import request from "@/http/request";
|
import request from "@/http/request";
|
||||||
|
|
||||||
const downlocadExcel = () => {
|
const downloadExcel = () => {
|
||||||
return request.get('/test/testExcelExport', {
|
return request.get('/test/testExcelExport', {
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
|
|
@ -15,42 +15,6 @@ const uploadExcel = (formData) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const uploadExcelPeijian = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/uploadExcelPeijian',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 100000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const uploadExcelHejian = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/uploadExcelHejian',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 100000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const uploadExcelJinji = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/uploadExcelJinji',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 100000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const uploadExcelKatePackage = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/uploadExcelKatePackage',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 100000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const uploadExcelParts = (data) => {
|
const uploadExcelParts = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/uploadStocks',
|
url: '/excel/uploadStocks',
|
||||||
|
|
@ -60,95 +24,55 @@ const uploadExcelParts = (data) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const uploadBoxConfig = (data) => {
|
const downloadStockExcel = (params) => {
|
||||||
return request({
|
|
||||||
url: '/excel/uploadBoxConfig',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 100000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const distributePeijianTasks = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/distributePeijianTasks',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 100000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const distributeHejianTasks = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/distributeHejianTasks',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 100000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const distributeJinjiTasks = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/distributeJinjiTasks',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 100000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const downloadStockExcel = () => {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/downloadStockExcel',
|
url: '/excel/downloadStockExcel',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
responseType: 'blob'
|
responseType: 'blob',
|
||||||
|
params: {
|
||||||
|
stockStatus: params.stockStatus,
|
||||||
|
goodsStatus: params.goodsStatus,
|
||||||
|
locationId: params.locationId,
|
||||||
|
vehicleId: params.vehicleId,
|
||||||
|
goodsId: params.goodsId,
|
||||||
|
goodsName: params.goodsName
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadKateTaskExcel = () => {
|
const downloadInRecordExcel = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/downloadKateTaskExcel',
|
url: '/excel/downloadInRecordExcel',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
responseType: 'blob'
|
responseType: 'blob',
|
||||||
|
params: {
|
||||||
|
vehicleId: params.vehicleId,
|
||||||
|
goodsId: params.goodsId
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadPeijianExcel = () => {
|
const downloadOutRecordExcel = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/downloadPeijianExcel',
|
url: '/excel/downloadOutRecordExcel',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
responseType: 'blob'
|
responseType: 'blob',
|
||||||
|
params: {
|
||||||
|
vehicleId: params.vehicleId,
|
||||||
|
goodsId: params.goodsId
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadRukuExcel = () => {
|
const downloadInventoryRecordExcel = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/downloadRukuExcel',
|
url: '/excel/downloadInventoryRecordExcel',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
responseType: 'blob'
|
responseType: 'blob',
|
||||||
})
|
params: {
|
||||||
}
|
vehicleId: params.vehicleId,
|
||||||
|
goodsId: params.goodsId
|
||||||
const downloadHejianExcel = () => {
|
}
|
||||||
return request({
|
|
||||||
url: '/excel/downloadHejianExcel',
|
|
||||||
method: 'get',
|
|
||||||
responseType: 'blob'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const downloadJinjiExcel = () => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/downloadJinjiExcel',
|
|
||||||
method: 'get',
|
|
||||||
responseType: 'blob'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const downloadPackageExcel = () => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/downloadPackageExcel',
|
|
||||||
method: 'get',
|
|
||||||
responseType: 'blob'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -160,24 +84,43 @@ const downloadMaterialExcel = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
const downloadVehicleExcel = (vehicleQuery) => {
|
||||||
downlocadExcel,
|
return request({
|
||||||
uploadExcel,
|
url: '/excel/downloadVehicleExcel',
|
||||||
uploadExcelPeijian,
|
method: 'get',
|
||||||
uploadExcelHejian,
|
responseType: 'blob',
|
||||||
uploadExcelParts,
|
params: {
|
||||||
distributePeijianTasks,
|
vehicleId: vehicleQuery.vehicleId,
|
||||||
distributeHejianTasks,
|
locationId: vehicleQuery.locationId,
|
||||||
downloadStockExcel,
|
isEmpty: vehicleQuery.isEmpty,
|
||||||
downloadKateTaskExcel,
|
vehicleStatus: vehicleQuery.vehicleStatus
|
||||||
uploadExcelJinji,
|
}
|
||||||
distributeJinjiTasks,
|
})
|
||||||
downloadPeijianExcel,
|
}
|
||||||
downloadRukuExcel,
|
|
||||||
downloadHejianExcel,
|
const downloadLocationsExcel = (params) => {
|
||||||
downloadJinjiExcel,
|
return request({
|
||||||
downloadPackageExcel,
|
url: '/excel/downloadLocationsExcel',
|
||||||
uploadBoxConfig,
|
method: 'get',
|
||||||
uploadExcelKatePackage,
|
responseType: 'blob',
|
||||||
downloadMaterialExcel
|
params: {
|
||||||
|
locationId: params.locationId,
|
||||||
|
areaId: params.areaId,
|
||||||
|
isLock: params.isLock,
|
||||||
|
locationStatus: params.locationStatus
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
downloadExcel,
|
||||||
|
uploadExcel,
|
||||||
|
uploadExcelParts,
|
||||||
|
downloadStockExcel,
|
||||||
|
downloadMaterialExcel,
|
||||||
|
downloadVehicleExcel,
|
||||||
|
downloadInRecordExcel,
|
||||||
|
downloadOutRecordExcel,
|
||||||
|
downloadInventoryRecordExcel,
|
||||||
|
downloadLocationsExcel
|
||||||
}
|
}
|
||||||
|
|
@ -16,10 +16,11 @@ const sendGoodsOutTask = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getAllTasks = () => {
|
const getTasks = () => {
|
||||||
return request({
|
return request({
|
||||||
url: '/task/getAllTasks',
|
url: '/task/getTasks',
|
||||||
method: 'get'
|
method: 'post',
|
||||||
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,25 +40,17 @@ const finishInventoryTask = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTasks = (params) => {
|
const getTasksByPage = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/task/getTasks',
|
url: '/task/getTasksByPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const finishPicking = (params) => {
|
const finishPickingAndBack = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/task/finishPicking',
|
url: '/task/finishPickingAndBack',
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const getTaskByTask = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/task/getTaskByTask',
|
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
|
|
@ -71,32 +64,13 @@ const changeTaskStatus = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryNotConfirmScanInfo = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/task/queryNotConfirmScanInfo',
|
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const solveScanDifference = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/task/solveScanDifference',
|
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
sendGoodsInTask,
|
sendGoodsInTask,
|
||||||
sendGoodsOutTask,
|
sendGoodsOutTask,
|
||||||
getAllTasks,
|
getTasksByPage,
|
||||||
sendInventoryTask,
|
sendInventoryTask,
|
||||||
finishInventoryTask,
|
finishInventoryTask,
|
||||||
getTasks,
|
getTasks,
|
||||||
finishPicking,
|
finishPickingAndBack,
|
||||||
getTaskByTask,
|
|
||||||
changeTaskStatus,
|
changeTaskStatus,
|
||||||
queryNotConfirmScanInfo,
|
|
||||||
solveScanDifference
|
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@ import request from "@/http/request";
|
||||||
|
|
||||||
const getAllVehicles = (params) => {
|
const getAllVehicles = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/location/getVehicles',
|
url: '/location/getVehiclesByPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
const request = axios.create({
|
const request = axios.create({
|
||||||
baseURL: 'http://localhost:12315/wms',
|
baseURL: 'http://192.168.3.254:12315/wms',
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
})
|
})
|
||||||
|
|
||||||
// axios.defaults.baseURL = 'http://10.18.61.7:12315/wms'
|
// axios.defaults.baseURL = 'http://192.168.3.254:12315/wms'
|
||||||
// axios.defaults.baseURL = 'http://localhost:12315/wms'
|
// axios.defaults.baseURL = 'http://localhost:12315/wms'
|
||||||
// axios.defaults.baseURL = 'http://10.30.9.89:12315/wms'
|
// axios.defaults.baseURL = 'http://10.30.9.89:12315/wms'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ export default {
|
||||||
disabledEmpty: false,
|
disabledEmpty: false,
|
||||||
taskInRequestEntity: reactive({
|
taskInRequestEntity: reactive({
|
||||||
vehicleId: '',
|
vehicleId: '',
|
||||||
originPoint: 'R1',
|
originPoint: 'RC1',
|
||||||
goodsId: '',
|
goodsId: '',
|
||||||
goodsName: '',
|
goodsName: '',
|
||||||
singleWeight: 0,
|
singleWeight: 0,
|
||||||
|
|
@ -159,8 +159,8 @@ export default {
|
||||||
}),
|
}),
|
||||||
standOptions: [
|
standOptions: [
|
||||||
{
|
{
|
||||||
value: "R1",
|
value: "RC1",
|
||||||
label: '入库站台1'
|
label: '入库口'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
stockTypeOptions: [
|
stockTypeOptions: [
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,13 @@
|
||||||
<!-- 此表格现在显示当前当前站台正在执行的出库任务 -->
|
<!-- 此表格现在显示当前当前站台正在执行的出库任务 -->
|
||||||
<el-table :data="tasks" stripe border class="table-class" max-height="250px"
|
<el-table :data="tasks" stripe border class="table-class" max-height="250px"
|
||||||
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
|
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
|
||||||
<el-table-column prop="goodsType" label="型号" fixed="left" min-width="120px" />
|
<el-table-column prop="goodsRelated.goodsId" label="物料编号" fixed="left" min-width="120px" />
|
||||||
<el-table-column prop="specification" label="规格" min-width="120px" />
|
<el-table-column prop="vehicleId" label="载具号" min-width="120px" />
|
||||||
<el-table-column prop="taskGroup" label="任务单号" min-width="120px" />
|
<el-table-column prop="goodsRelated.originNum" label="库存数量" min-width="120px" />
|
||||||
<el-table-column prop="batchNo" label="批次号" min-width="120px" />
|
<el-table-column prop="goodsRelated.opNum" label="操作数量" min-width="120px" />
|
||||||
<el-table-column prop="operateNum" label="操作数量" min-width="120px" />
|
|
||||||
<el-table-column prop="totalNum" label="库存数量" min-width="120px" />
|
|
||||||
<el-table-column prop="origin" label="起始位置" min-width="120px" />
|
<el-table-column prop="origin" label="起始位置" min-width="120px" />
|
||||||
<el-table-column prop="destination" label="目标位置" min-width="120px" />
|
<el-table-column prop="destination" label="目标位置" min-width="120px" />
|
||||||
|
<el-table-column prop="isPicking" label="是否拣选" min-width="120px" />
|
||||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" />
|
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" />
|
||||||
<el-table-column prop="createTime" label="运行时长" :formatter="dueFormat" min-width="120px" />
|
<el-table-column prop="createTime" label="运行时长" :formatter="dueFormat" min-width="120px" />
|
||||||
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
||||||
|
|
@ -36,27 +35,42 @@
|
||||||
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="型号" prop="goodsType">
|
<el-form-item label="载具号" prop="vehicleId">
|
||||||
<el-input v-model="taskOutRequestEntity.goodsType" clearable placeholder="此处输入型号" />
|
<el-input v-model="taskOutRequestEntity.vehicleId" clearable
|
||||||
|
placeholder="此处输入载具号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="规格" prop="specification">
|
<el-form-item label="物料编号" prop="goodsId">
|
||||||
<el-input v-model="taskOutRequestEntity.specification" clearable
|
<el-input v-model="taskOutRequestEntity.goodsId" clearable placeholder="此处输入物料编号" />
|
||||||
placeholder="此处输入规格" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="数量" prop="quantity">
|
<el-form-item label="数量" prop="goodsNum">
|
||||||
<el-input-number v-model.number="taskOutRequestEntity.quantity"
|
<el-input-number v-model.number="taskOutRequestEntity.goodsNum"
|
||||||
controls-position="right" :min="0" />
|
controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="任务单号" prop="taskId">
|
<el-form-item label="起始库位" prop="originPoint">
|
||||||
<el-input v-model="taskOutRequestEntity.taskId" clearable placeholder="此处输入任务单号" />
|
<el-input v-model="taskOutRequestEntity.originPoint" clearable
|
||||||
|
placeholder="此处输入起始库位,格式为A-01-01-01" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="是否拣选" prop="isPicking">
|
||||||
|
<el-select-v2 v-model="taskOutRequestEntity.isPicking" placeholder="请选择是否拣选"
|
||||||
|
:options="pickOptions"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出库站台" prop="destinationPoint">
|
||||||
|
<el-select-v2 v-model="taskOutRequestEntity.destinationPoint" placeholder="请选择出库站台"
|
||||||
|
:options="destinationPointOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -70,6 +84,46 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<fieldset class="input-area-down" style="margin-top: 15px;">
|
||||||
|
<legend>拣选确认信息</legend>
|
||||||
|
<el-form ref="pickConfirmRef" :model="pickConfirmEntity" :label-position="labelPosition"
|
||||||
|
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="载具号" prop="vehicleId">
|
||||||
|
<el-input v-model="pickConfirmEntity.vehicleId" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料编号" prop="goodsId">
|
||||||
|
<el-input v-model="pickConfirmEntity.goodsId" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="库存数量" prop="originNum">
|
||||||
|
<el-input-number v-model.number="pickConfirmEntity.originNum" clearable
|
||||||
|
controls-position="right" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="拣选数量" prop="opNum">
|
||||||
|
<el-input-number v-model.number="pickConfirmEntity.opNum" clearable
|
||||||
|
controls-position="right" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16" class="btn-area">
|
||||||
|
<el-col :span="8" :offset="8">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="success" round
|
||||||
|
@click="confirmTask(pickConfirmRef, pickConfirmEntity)">拣货完成确认回库</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
|
|
@ -77,23 +131,16 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { sendGoodsOutTask, getTasks } from '@/api/task'
|
import { sendGoodsOutTask, getTasksByPage, getTasks, finishPickingAndBack } from '@/api/task'
|
||||||
import { taskStatusFormatter, dueFormatter, timeFormatter } from '@/utils/formatter.js'
|
import { taskStatusFormatter, dueFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||||
import { genTaskId } from '@/utils/stringUtils'
|
|
||||||
import { reactive, ref } from 'vue'
|
import { reactive, ref } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
const taskOutRequestRef = ref()
|
const taskOutRequestRef = ref()
|
||||||
|
const pickConfirmRef = ref()
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
goodsType: [
|
destinationPointOptions: [
|
||||||
{ required: true, message: '请输入型号' }
|
{ required: true, message: '请选择出库站台' }
|
||||||
],
|
|
||||||
specification: [
|
|
||||||
{ required: true, message: '请输入规格' }
|
|
||||||
],
|
|
||||||
quantity: [
|
|
||||||
{ required: true, message: '请输入数量' },
|
|
||||||
{ type: 'number', message: '请输入数字' }
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -112,12 +159,42 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
labelPosition: 'top',
|
labelPosition: 'top',
|
||||||
taskOutRequestEntity: {
|
taskOutRequestEntity: {
|
||||||
goodsType: '',
|
vehicleId: '',
|
||||||
specification: '',
|
goodsId: '',
|
||||||
quantity: 0,
|
goodsNum: 0,
|
||||||
taskId: '',
|
originPoint: '',
|
||||||
|
isPicking: 0,
|
||||||
|
destinationPoint: '',
|
||||||
userName: store.getters.getUserName,
|
userName: store.getters.getUserName,
|
||||||
}
|
},
|
||||||
|
pickConfirmEntity: {
|
||||||
|
taskId: '',
|
||||||
|
vehicleId: '',
|
||||||
|
goodsId: '',
|
||||||
|
opNum: 0,
|
||||||
|
originNum: 0,
|
||||||
|
userName: store.getters.getUserName,
|
||||||
|
},
|
||||||
|
destinationPointOptions: [
|
||||||
|
{
|
||||||
|
value: "RC1",
|
||||||
|
label: '入库口'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "P1",
|
||||||
|
label: '拣选台'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
pickOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '非拣选任务'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '拣选任务'
|
||||||
|
}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -130,22 +207,18 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getAllTasks() {
|
getAllTasks() {
|
||||||
this.pageInfo.pageNum = this.currentPage
|
const request = {
|
||||||
this.pageInfo.pageSize = this.pageSize
|
pageNo: this.currentPage,
|
||||||
const tableRequest = {
|
pageSize: this.pageSize,
|
||||||
page: this.pageInfo,
|
taskType: 2
|
||||||
param: {
|
|
||||||
taskType: 2,
|
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
getTasks(tableRequest).then(res => {
|
getTasksByPage(request).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code != 0) {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.tasks = tableResponse.rows
|
this.tasks = tableResponse.returnData.lists
|
||||||
this.total = tableResponse.total
|
this.total = tableResponse.returnData.total
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询任务错误')
|
ElMessage.error('查询任务错误')
|
||||||
|
|
@ -173,23 +246,43 @@ export default {
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (formData.quantity <= 0) {
|
if (formData.vehicleId == '' || formData.goodsId == '' || formData.originPoint == '') {
|
||||||
|
ElMessage({
|
||||||
|
message: '载具号、物料号、起始库位号必须至少输入一个',
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (formData.goodsNum <= 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '数量必须要大于0的数字',
|
message: '数量必须要大于0的数字',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if ((formData.isPicking == 1 && formData.destinationPoint != 'P1')) {
|
||||||
|
ElMessage({
|
||||||
|
message: '拣选任务必须选拣选站台',
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (formData.isPicking == 0 && formData.destinationPoint == 'P1') {
|
||||||
|
ElMessage({
|
||||||
|
message: '非拣选任务不得选拣选站台',
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
const outParams = {
|
const outParams = {
|
||||||
taskId: formData.taskId == '' ? genTaskId('') : formData.taskId,
|
goodsId: formData.goodsId,
|
||||||
taskType: 2,
|
goodsNum: formData.goodsNum,
|
||||||
detailTaskInfoList: [
|
vehicleId: formData.vehicleId,
|
||||||
{
|
originPoint: formData.originPoint,
|
||||||
goodsType: formData.goodsType,
|
destinationPoint: formData.destinationPoint,
|
||||||
specification: formData.specification,
|
userName: store.getters.getUserName,
|
||||||
quantity: formData.quantity
|
isPicking: formData.isPicking,
|
||||||
}
|
pickStand: formData.destinationPoint
|
||||||
]
|
|
||||||
}
|
}
|
||||||
sendGoodsOutTask(outParams).then(res => {
|
sendGoodsOutTask(outParams).then(res => {
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
|
|
@ -206,6 +299,77 @@ export default {
|
||||||
ElMessage.error('创建出库任务错误!')
|
ElMessage.error('创建出库任务错误!')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getPickTaskDetails() {
|
||||||
|
const request = {
|
||||||
|
taskType: 2,
|
||||||
|
isPicking: 1,
|
||||||
|
taskStatus: 8
|
||||||
|
}
|
||||||
|
getTasks(request).then(res1 => {
|
||||||
|
if (res1.data.code == 0) {
|
||||||
|
if (res1.data.returnData.length > 0) {
|
||||||
|
const currentFinishTask = res1.data.returnData[0];
|
||||||
|
if (currentFinishTask.taskId == this.pickConfirmEntity.taskId) {// 信息没更新
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.pickConfirmEntity.taskId = currentFinishTask.taskId
|
||||||
|
this.pickConfirmEntity.goodsId = currentFinishTask.goodsRelated.goodsId
|
||||||
|
this.pickConfirmEntity.vehicleId = currentFinishTask.vehicleId
|
||||||
|
this.pickConfirmEntity.opNum = currentFinishTask.goodsRelated.opNum
|
||||||
|
this.pickConfirmEntity.originNum = currentFinishTask.goodsRelated.originNum
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.pickConfirmEntity.taskId = ''
|
||||||
|
this.pickConfirmEntity.goodsId = ''
|
||||||
|
this.pickConfirmEntity.vehicleId = ''
|
||||||
|
this.pickConfirmEntity.opNum = 0
|
||||||
|
this.pickConfirmEntity.originNum = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage.error('查询任务错误')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirmTask(formEl, formData) {
|
||||||
|
if (!formEl) return
|
||||||
|
formEl.validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
ElMessage({
|
||||||
|
message: '确认信息验证失败',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (formData.taskId = '' || formData.vehicleId == '' || formData.goodsId == '') {
|
||||||
|
ElMessage({
|
||||||
|
message: '载具号、物料号、任务号不可缺少',
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const confirmParams = {
|
||||||
|
taskId: formData.taskId,
|
||||||
|
vehicleId: formData.vehicleId,
|
||||||
|
goodsId: formData.goodsId,
|
||||||
|
opNum: formData.opNum,
|
||||||
|
originNum: formData.originNum,
|
||||||
|
userName: formData.userName
|
||||||
|
}
|
||||||
|
finishPickingAndBack(confirmParams).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
ElMessage({
|
||||||
|
message: '确认成功!',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
formEl.resetFields()
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage.error('创建出库任务错误!')
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -256,7 +420,16 @@ export default {
|
||||||
.input-area-up {
|
.input-area-up {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
max-width: inherit;
|
max-width: inherit;
|
||||||
height: 632px;
|
height: 300px;
|
||||||
|
border: solid 1px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 15px 10px -15px #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-area-down {
|
||||||
|
margin: auto;
|
||||||
|
max-width: inherit;
|
||||||
|
height: 300px;
|
||||||
border: solid 1px;
|
border: solid 1px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
box-shadow: 0px 15px 10px -15px #000;
|
box-shadow: 0px 15px 10px -15px #000;
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getTaskRecords } from '@/api/record.js'
|
import { getTaskRecords } from '@/api/record.js'
|
||||||
import { dateFormatter, taskStatusFormatter, timeFormatter } from '@/utils/formatter.js'
|
import { dateFormatter, taskStatusFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||||
import { downloadRukuExcel } from '@/api/excel.js'
|
import { downloadInRecordExcel } from '@/api/excel.js'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import store from '@/store'
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -107,12 +106,16 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.goodsTypeQuery = ''
|
this.goodsIdQuery = ''
|
||||||
this.specificationQuery = ''
|
this.vehicleIdQuery = ''
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
downloadRukuExcel().then(res => {
|
const params = {
|
||||||
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
|
goodsId: this.goodsIdQuery.trim()
|
||||||
|
}
|
||||||
|
downloadInRecordExcel(params).then(res => {
|
||||||
const link = document.createElement('a');//创建a标签
|
const link = document.createElement('a');//创建a标签
|
||||||
try {
|
try {
|
||||||
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
||||||
|
|
|
||||||
284
src/layout/locationsTable.vue
Normal file
284
src/layout/locationsTable.vue
Normal file
|
|
@ -0,0 +1,284 @@
|
||||||
|
<template>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<el-config-provider :locale="zhCn">
|
||||||
|
<el-row style="align-items: flex-start;">
|
||||||
|
<el-input v-model="queryKey" style="width: 196px; margin-left: auto; margin-right: 10px;" placeholder="载具号" />
|
||||||
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
|
<el-button type="success" @click="exportExcel()">导出信息</el-button>
|
||||||
|
</el-row>
|
||||||
|
<br />
|
||||||
|
<el-table :data="vehicles" stripe border v-loading="loading" class="table-class" max-height="650px"
|
||||||
|
highlight-current-row @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||||
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
|
<el-table-column width="65px" fixed="left">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-radio :label="scope.row.vehicleId" v-model="vehicleId"> </el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="vehicleId" label="托盘号" fixed="left" min-width="120px" />
|
||||||
|
<el-table-column prop="currentLocation" label="所在位置" fixed="left" :formatter="locationFormat" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="vehicleStatus" label="状态" :formatter="vehicleStatusFormat" min-width="120px" />
|
||||||
|
<el-table-column prop="isEmpty" label="空托" :formatter="isEmptyFormat" min-width="120px" />
|
||||||
|
<el-table-column fixed="right" label="操作" width="120px" v-if="selVehicle == null">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button plain type="primary" @click="editCurrentRowVehicle(scope.row)">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<br />
|
||||||
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
||||||
|
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||||
|
@current-change="search" />
|
||||||
|
<el-dialog v-model="dialogVisible" title="托盘信息" width="40%" draggable :show-close="false">
|
||||||
|
<el-form ref="vehicleFormRef" :model="vehicleFormEntity" :label-position="labelPosition" label-width="100px"
|
||||||
|
style="max-width: 100%" :rules="rules" status-icon>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="载具号" prop="vehicleId">
|
||||||
|
<el-input v-model="vehicleFormEntity.vehicleId" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="库位" prop="locationId">
|
||||||
|
<el-input v-model="vehicleFormEntity.currentLocation" placeholder="请输入库位号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="空托" prop="isEmpty">
|
||||||
|
<el-select-v2 v-model="vehicleFormEntity.isEmpty" placeholder="请选择是否空托"
|
||||||
|
:options="isEmptyOptions"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="托盘状态" prop="vehicleStatus">
|
||||||
|
<el-select-v2 v-model="vehicleFormEntity.vehicleStatus" placeholder="请选择托盘状态"
|
||||||
|
:options="vehicleStatusOptions"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitVehicleInfo(vehicleFormEntity)">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</el-config-provider>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getAllVehicles, updateVehicleInfo } from '@/api/vehicle'
|
||||||
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { vehicleStatusFormatter, locationFormatter, dateFormatter } from '@/utils/formatter.js'
|
||||||
|
import { downloadLocationsExcel } from '@/api/excel.js'
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'locationsTable',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageInfo: {},
|
||||||
|
vehicles: [],
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
queryKey: '',
|
||||||
|
loading: true,
|
||||||
|
dialogVisible: false,
|
||||||
|
vehicleId: '',
|
||||||
|
vehicleFormEntity: reactive({}),
|
||||||
|
labelPosition: 'top',
|
||||||
|
vehicleFormRef: ref(),
|
||||||
|
rules: reactive({
|
||||||
|
vehicleId: [
|
||||||
|
{ required: true, message: '请输入托盘号' }
|
||||||
|
],
|
||||||
|
currentLocation: [
|
||||||
|
{ required: true, message: '请输入库位' }
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
// 物料高度
|
||||||
|
isEmptyOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '带料'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '空托'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 托盘状态
|
||||||
|
vehicleStatusOptions: [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '在库中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '在站台'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '移动中'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
search() {
|
||||||
|
this.loading = true
|
||||||
|
const tableRequest = {
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
vehicleId: this.queryKey.trim()
|
||||||
|
}
|
||||||
|
getAllVehicles(tableRequest).then(res => {
|
||||||
|
const tableResponse = res.data
|
||||||
|
if (tableResponse.code != 0) {
|
||||||
|
ElMessage.error(tableResponse.message)
|
||||||
|
}
|
||||||
|
this.vehicles = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage.error('查询载具信息错误' + err.message)
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
vehicleStatusFormat: (row, column, cellValue, index) => {
|
||||||
|
return vehicleStatusFormatter(cellValue)
|
||||||
|
},
|
||||||
|
locationFormat: (row, column, cellValue, index) => {
|
||||||
|
return locationFormatter(cellValue)
|
||||||
|
},
|
||||||
|
isEmptyFormat: (row, column, cellValue, index) => {
|
||||||
|
if (cellValue == 0) {
|
||||||
|
return '带料'
|
||||||
|
}
|
||||||
|
if (cellValue == 1) {
|
||||||
|
return '空载具'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.queryKey = ''
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
editCurrentRowVehicle(row) {
|
||||||
|
this.vehicleFormEntity = row
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
submitVehicleInfo(formData) {
|
||||||
|
const request = {
|
||||||
|
vehicleId: formData.vehicleId,
|
||||||
|
currentLocation: formData.currentLocation,
|
||||||
|
isEmpty: formData.isEmpty,
|
||||||
|
vehicleStatus: formData.vehicleStatus
|
||||||
|
}
|
||||||
|
updateVehicleInfo(request).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
ElMessage({
|
||||||
|
message: '更新载具信息成功',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
this.search()
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage.error('更新载具信息失败:' + err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCurrentRow(row) {
|
||||||
|
this.vehicleId = row.vehicleId
|
||||||
|
this.$emit('update:selVehicle', row)
|
||||||
|
},
|
||||||
|
exportExcel() {
|
||||||
|
const request = {
|
||||||
|
vehicleId: formData.vehicleId,
|
||||||
|
currentLocation: formData.currentLocation,
|
||||||
|
isEmpty: formData.isEmpty,
|
||||||
|
vehicleStatus: formData.vehicleStatus
|
||||||
|
}
|
||||||
|
downloadLocationsExcel(request).then(res => {
|
||||||
|
const link = document.createElement('a');//创建a标签
|
||||||
|
try {
|
||||||
|
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
||||||
|
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
||||||
|
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
||||||
|
let _fileName = "导出载具信息" + dateFormatter(new Date) + ".xlsx"
|
||||||
|
link.style.display = 'none'//隐藏
|
||||||
|
|
||||||
|
// 兼容不同浏览器的URL对象
|
||||||
|
const url = window.URL || window.webkitURL || window.moxURL
|
||||||
|
link.href = url.createObjectURL(blob)
|
||||||
|
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
|
url.revokeObjectURL(link.href)//移除url对象
|
||||||
|
} catch (e) {
|
||||||
|
ElMessage({
|
||||||
|
message: '下载文件失败:: ' + e,
|
||||||
|
type: 'error',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage({
|
||||||
|
message: '导出失败:: ' + err,
|
||||||
|
type: 'error',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-pagination {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-button {
|
||||||
|
width: 72px;
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-class {
|
||||||
|
width: 100%;
|
||||||
|
/* font-size: 5px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item {
|
||||||
|
width: 10% inherit;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-select-v2 {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-input-number {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-button {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -3,10 +3,11 @@
|
||||||
<div style="margin-bottom: 15px">
|
<div style="margin-bottom: 15px">
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="goodsTypeQuery" style="width: 256px; margin-right: 10px;" placeholder="型号" />
|
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="物料编号" />
|
||||||
<el-input v-model="specificationQuery" style="width: 256px; margin-right: 10px;" placeholder="规格" />
|
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="载具号" />
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
|
<el-button type="success" @click="exportExcel()">导出记录</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<br />
|
<br />
|
||||||
<el-table :data="tasks" stripe border v-loading="loading" style="width: 100%" max-height="684px"
|
<el-table :data="tasks" stripe border v-loading="loading" style="width: 100%" max-height="684px"
|
||||||
|
|
@ -39,6 +40,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getTaskRecords } from '@/api/record.js'
|
import { getTaskRecords } from '@/api/record.js'
|
||||||
import { dateFormatter, taskStatusFormatter, timeFormatter } from '@/utils/formatter.js'
|
import { dateFormatter, taskStatusFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||||
|
import { downloadOutRecordExcel } from '@/api/excel.js'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
@ -53,8 +55,8 @@ export default {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
goodsTypeQuery: '',
|
goodsIdQuery: '',
|
||||||
specificationQuery: '',
|
vehicleIdQuery: '',
|
||||||
loading: true
|
loading: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -82,16 +84,12 @@ export default {
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.pageInfo.pageNum = this.currentPage
|
|
||||||
this.pageInfo.pageSize = this.pageSize
|
|
||||||
const tableRequest = {
|
const tableRequest = {
|
||||||
page: this.pageInfo,
|
pageNo: this.currentPage,
|
||||||
param: {
|
pageSize: this.pageSize,
|
||||||
taskType: 2,
|
taskType: 2,
|
||||||
goodsType: this.goodsTypeQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
specification: this.specificationQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim()
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
getTaskRecords(tableRequest).then(res => {
|
getTaskRecords(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
|
|
@ -111,6 +109,43 @@ export default {
|
||||||
this.specificationQuery = ''
|
this.specificationQuery = ''
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
|
exportExcel() {
|
||||||
|
const params = {
|
||||||
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
|
goodsId: this.goodsIdQuery.trim()
|
||||||
|
}
|
||||||
|
downloadOutRecordExcel(params).then(res => {
|
||||||
|
const link = document.createElement('a');//创建a标签
|
||||||
|
try {
|
||||||
|
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
||||||
|
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
||||||
|
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
||||||
|
let _fileName = "导出出库记录" + dateFormatter(new Date) + ".xlsx"
|
||||||
|
link.style.display = 'none'//隐藏
|
||||||
|
|
||||||
|
// 兼容不同浏览器的URL对象
|
||||||
|
const url = window.URL || window.webkitURL || window.moxURL
|
||||||
|
link.href = url.createObjectURL(blob)
|
||||||
|
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
|
url.revokeObjectURL(link.href)//移除url对象
|
||||||
|
} catch (e) {
|
||||||
|
ElMessage({
|
||||||
|
message: '下载文件失败:: ' + e,
|
||||||
|
type: 'error',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage({
|
||||||
|
message: '导出失败:: ' + err,
|
||||||
|
type: 'error',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,300 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-config-provider :locale="zhCn">
|
|
||||||
<el-container class="content">
|
|
||||||
<div class="left">
|
|
||||||
<fieldset class="display-area">
|
|
||||||
<legend>
|
|
||||||
入库站台1
|
|
||||||
</legend>
|
|
||||||
<el-table :data="stand1ScanInfos" stripe border v-loading="loading" style="width: 100%"
|
|
||||||
max-height="684px" class="table-class" :header-cell-style="{ 'text-align': 'center' }"
|
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
|
||||||
<el-table-column width="65px" fixed="left">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-radio :label="scope.row.scanId" v-model="scanId1"> </el-radio>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="standId" label="站台" min-width="120px" />
|
|
||||||
<el-table-column prop="position" label="位置" min-width="120px" />
|
|
||||||
<el-table-column prop="requestCode" label="请求条码" min-width="120px" />
|
|
||||||
<el-table-column prop="scanCode" label="设备扫码" min-width="120px" />
|
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button plain type="primary" @click="confirmCurrentRow(scope.row)">处理</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<br />
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<div class="right">
|
|
||||||
<fieldset class="display-area">
|
|
||||||
<legend>
|
|
||||||
入库站台2
|
|
||||||
</legend>
|
|
||||||
<el-table :data="stand2ScanInfos" stripe border v-loading="loading" style="width: 100%"
|
|
||||||
max-height="684px" class="table-class" :header-cell-style="{ 'text-align': 'center' }"
|
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
|
||||||
<el-table-column width="65px" fixed="left">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-radio :label="scope.row.scanId" v-model="scanId2"> </el-radio>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="standId" label="站台" min-width="120px" />
|
|
||||||
<el-table-column prop="position" label="位置" min-width="120px" />
|
|
||||||
<el-table-column prop="requestCode" label="请求条码" min-width="120px" />
|
|
||||||
<el-table-column prop="scanCode" label="设备扫码" min-width="120px" />
|
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button plain type="primary" @click="confirmCurrentRow(scope.row)">处理</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<br />
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<el-dialog v-model="dialogVisible" title="确认扫码信息" width="40%" draggable :show-close="false">
|
|
||||||
<el-form ref="confirmFormRef" :model="confirmFormEntity" :label-position="labelPosition"
|
|
||||||
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="站台" prop="standId">
|
|
||||||
<el-input v-model="confirmFormEntity.standId" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="位置" prop="position">
|
|
||||||
<el-input v-model="confirmFormEntity.position" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="请求条码号" prop="requestCode">
|
|
||||||
<el-input v-model="confirmFormEntity.requestCode" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="扫描条码号" prop="scanCode">
|
|
||||||
<el-input v-model="confirmFormEntity.scanCode" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="确认条码号" prop="confirmCode">
|
|
||||||
<el-select-v2 v-model="confirmFormEntity.confirmCode" placeholder="请选择正确的条码号"
|
|
||||||
:options="confirmFormEntity.barCodeOptions"></el-select-v2>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="submitConfirmCode(confirmFormEntity)">
|
|
||||||
确定
|
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</el-container>
|
|
||||||
</el-config-provider>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { queryNotConfirmScanInfo, solveScanDifference } from '@/api/task'
|
|
||||||
import { reactive, ref } from 'vue'
|
|
||||||
import { ElMessage } from 'element-plus'
|
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
||||||
const confirmFormRef = ref()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'scanConfirm',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
labelPosition: "top",
|
|
||||||
loading: false,
|
|
||||||
scanId1: '',
|
|
||||||
scanId2: '',
|
|
||||||
stand1ScanInfos: [],
|
|
||||||
stand2ScanInfos: [],
|
|
||||||
tempTasks: [],
|
|
||||||
tempStandId: '',
|
|
||||||
confirmFormEntity: reactive({
|
|
||||||
scanId: '',
|
|
||||||
standId: '',
|
|
||||||
position: null,
|
|
||||||
requestCode: '',
|
|
||||||
scanCode: '',
|
|
||||||
confirmCode: '',
|
|
||||||
barCodeOptions: []
|
|
||||||
}),
|
|
||||||
rules: reactive({
|
|
||||||
confirmCode: [
|
|
||||||
{ required: true, message: '请确认条码' }
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
dialogVisible: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
this.getStand1Codes()
|
|
||||||
this.getStand2Codes()
|
|
||||||
}, 2000)
|
|
||||||
},
|
|
||||||
beforeUnmount() {
|
|
||||||
clearInterval(this.timer)
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getStand1Codes() {
|
|
||||||
const scanRequest = {
|
|
||||||
standId: 'R1'
|
|
||||||
}
|
|
||||||
queryNotConfirmScanInfo(scanRequest).then(res => {
|
|
||||||
const scanResponse = res.data
|
|
||||||
if (scanResponse.code != 0) {
|
|
||||||
ElMessage.error(scanResponse.message)
|
|
||||||
}
|
|
||||||
this.stand1ScanInfos = scanResponse.returnData
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
ElMessage.error('查询站台1扫码确认信息错误')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getStand2Codes() {
|
|
||||||
const scanRequest = {
|
|
||||||
standId: 'R2'
|
|
||||||
}
|
|
||||||
queryNotConfirmScanInfo(scanRequest).then(res => {
|
|
||||||
const scanResponse = res.data
|
|
||||||
if (scanResponse.code != 0) {
|
|
||||||
ElMessage.error(scanResponse.message)
|
|
||||||
}
|
|
||||||
this.stand2ScanInfos = scanResponse.returnData
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
ElMessage.error('查询站台2扫码确认信息错误')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirmCurrentRow(row) {
|
|
||||||
this.confirmFormEntity.scanId = row.scanId
|
|
||||||
this.confirmFormEntity.standId = row.standId
|
|
||||||
this.confirmFormEntity.position = row.position
|
|
||||||
this.confirmFormEntity.requestCode = row.requestCode
|
|
||||||
this.confirmFormEntity.scanCode = row.scanCode
|
|
||||||
this.confirmFormEntity.confirmCode = ''
|
|
||||||
this.confirmFormEntity.barCodeOptions = [
|
|
||||||
{ value: row.requestCode, label: row.requestCode },
|
|
||||||
{ value: row.scanCode, label: row.scanCode }
|
|
||||||
]
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
submitConfirmCode(confirmFormEntity) {
|
|
||||||
if (confirmFormEntity.scanId == null | undefined || confirmFormEntity.scanId == '') {
|
|
||||||
ElMessage({ message: '缺少主键', type: 'error' })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (confirmFormEntity.confirmCode == null | undefined || confirmFormEntity.confirmCode == '') {
|
|
||||||
ElMessage({ message: '确认条码不能为空', type: 'error' })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
solveScanDifference(confirmFormEntity).then(res => {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
this.clearFormEntity(confirmFormEntity)
|
|
||||||
this.dialogVisible = false
|
|
||||||
ElMessage({
|
|
||||||
message: '处理扫码信息成功',
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.data.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
ElMessage({
|
|
||||||
message: '处理扫码信息失败: ' + err,
|
|
||||||
type: 'error',
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clearFormEntity(confirmFormEntity) {
|
|
||||||
confirmFormEntity.scanId = ''
|
|
||||||
confirmFormEntity.standId = ''
|
|
||||||
confirmFormEntity.position = null
|
|
||||||
confirmFormEntity.requestCode = ''
|
|
||||||
confirmFormEntity.scanCode = ''
|
|
||||||
confirmFormEntity.confirmCode = ''
|
|
||||||
confirmFormEntity.barCodeOptions = []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.content {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item {
|
|
||||||
width: 30% inherit;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* .btn-area .el-form-item {
|
|
||||||
width: 30% inherit;
|
|
||||||
padding-left: 15px;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-select {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-select-v2 {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-input-number {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-button {
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
width: 49%;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left {
|
|
||||||
width: 49%;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-area {
|
|
||||||
margin: auto;
|
|
||||||
max-width: inherit;
|
|
||||||
height: 632px;
|
|
||||||
border: solid 1px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0px 15px 10px -15px #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.display-area {
|
|
||||||
margin: auto;
|
|
||||||
min-width: inherit;
|
|
||||||
height: 632px;
|
|
||||||
border: solid 1px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0px 15px 10px -15px #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-class {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -17,20 +17,22 @@
|
||||||
<el-radio :label="scope.row.stockId" v-model="stockId"> </el-radio>
|
<el-radio :label="scope.row.stockId" v-model="stockId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="vehicleId" label="型号" fixed="left" min-width="120px" />
|
<el-table-column prop="goodsRelated.goodsId" label="物料号" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="goodsRelated.goodsId" label="规格" fixed="left" min-width="120px" />
|
<el-table-column prop="goodsRelated.goodsName" label="物料名称" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="locationId" label="库位" :formatter="locationFormat" min-width="120px" />
|
<el-table-column prop="goodsRelated.remainNum" label="剩余数量" min-width="120px" />
|
||||||
|
<el-table-column prop="goodsRelated.totalNum" label="入库数量" min-width="120px" />
|
||||||
|
<el-table-column prop="vehicleId" label="载具号" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="locationId" label="库位" :formatter="locationFormat" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="isInventory" label="是否盘点" min-width="120px" />
|
<el-table-column prop="isInventory" label="是否盘点" min-width="120px" />
|
||||||
<el-table-column prop="orderId" label="订单号" min-width="120px" />
|
<el-table-column prop="createTime" label="上架时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="createTime" label="上架时间" :formatter="timeFormat" min-width="140px" />
|
|
||||||
<el-table-column prop="goodsRelated.goodsStatus" label="物料状态" :formatter="goodsStatusFormat" min-width="120px" />
|
<el-table-column prop="goodsRelated.goodsStatus" label="物料状态" :formatter="goodsStatusFormat" min-width="120px" />
|
||||||
<el-table-column prop="stockStatus" label="库存状态" :formatter="stockStatusFormat" fixed="right"
|
<el-table-column prop="stockStatus" label="库存状态" :formatter="stockStatusFormat" fixed="right"
|
||||||
min-width="120px" />
|
min-width="120px" />
|
||||||
<el-table-column fixed="right" label="操作" width="120px" v-if="selStock == null">
|
<!-- <el-table-column fixed="right" label="操作" width="120px" v-if="selStock == null">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button plain type="primary" @click="editCurrentRowStock(scope.row)">编辑</el-button>
|
<el-button plain type="primary" @click="editCurrentRowStock(scope.row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
<br />
|
<br />
|
||||||
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
||||||
|
|
@ -288,11 +290,10 @@ export default {
|
||||||
getAllStocks(request).then(res => {
|
getAllStocks(request).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code != 0) {
|
||||||
console.log(tableResponse.code + ':' + tableResponse.message)
|
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.displayStocks = tableResponse.lists
|
this.displayStocks = tableResponse.returnData.lists
|
||||||
this.total = tableResponse.total
|
this.total = tableResponse.returnData.total
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询库存错误')
|
ElMessage.error('查询库存错误')
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
<div style="margin-bottom: 15px">
|
<div style="margin-bottom: 15px">
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="goodsTypeQuery" style="width: 256px; margin-right: 10px;" placeholder="型号" />
|
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="物料号" />
|
||||||
<el-input v-model="specificationQuery" style="width: 256px; margin-right: 10px;" placeholder="规格" />
|
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="载具号" />
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -18,14 +18,14 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px" />
|
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px" />
|
||||||
<el-table-column prop="goodsType" label="型号" min-width="120px" />
|
<el-table-column prop="vehicleId" label="载具号" min-width="120px" />
|
||||||
<el-table-column prop="specification" label="规格" min-width="120px" />
|
<el-table-column prop="goodsRelated.goodsId" label="物料编号" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="batchNo" label="批次号" min-width="120px" />
|
<el-table-column prop="goodsRelated.goodsName" label="物料名称" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="taskGroup" label="任务单号" min-width="120px" />
|
<el-table-column prop="taskGroup" label="任务组" min-width="120px" />
|
||||||
<el-table-column prop="origin" label="起点" min-width="120px" />
|
<el-table-column prop="origin" label="起点" min-width="120px" />
|
||||||
<el-table-column prop="destination" label="终点" min-width="120px" />
|
<el-table-column prop="destination" label="终点" min-width="120px" />
|
||||||
<el-table-column prop="operateNum" label="操作数量" min-width="120px" />
|
<el-table-column prop="opNum" label="操作数量" min-width="120px" />
|
||||||
<el-table-column prop="totalNum" label="库存数量" min-width="120px" />
|
<el-table-column prop="originNum" label="库存数量" min-width="120px" />
|
||||||
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
|
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
|
||||||
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" />
|
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" />
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getTasks, changeTaskStatus } from '@/api/task.js'
|
import { getTasksByPage, changeTaskStatus } from '@/api/task.js'
|
||||||
import { getAvailableLocations } from '@/api/location.js'
|
import { getAvailableLocations } from '@/api/location.js'
|
||||||
import { dateFormatter, locationFormatter, taskStatusFormatter, timeFormatter, dueFormatter } from '@/utils/formatter.js'
|
import { dateFormatter, locationFormatter, taskStatusFormatter, timeFormatter, dueFormatter } from '@/utils/formatter.js'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
|
|
@ -124,8 +124,8 @@ export default {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
goodsTypeQuery: '',
|
goodsIdQuery: '',
|
||||||
specificationQuery: '',
|
vehicleIdQuery: '',
|
||||||
loading: true,
|
loading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
taskFormEntity: reactive({}),
|
taskFormEntity: reactive({}),
|
||||||
|
|
@ -195,24 +195,19 @@ export default {
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.pageInfo.pageNum = this.currentPage
|
|
||||||
this.pageInfo.pageSize = this.pageSize
|
|
||||||
const tableRequest = {
|
const tableRequest = {
|
||||||
page: this.pageInfo,
|
pageNo: this.currentPage,
|
||||||
param: {
|
pageSize: this.pageSize,
|
||||||
goodsType: this.goodsTypeQuery.trim(),
|
goodsId: this.goodsIdQuery.trim(),
|
||||||
specification: this.specificationQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim()
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
getTasks(tableRequest).then(res => {
|
getTasksByPage(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code != 0) {
|
||||||
console.log(tableResponse.code + ':' + tableResponse.message)
|
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.tasks = tableResponse.rows
|
this.tasks = tableResponse.returnData.lists
|
||||||
this.total = tableResponse.total
|
this.total = tableResponse.returnData.total
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
ElMessage.error('查询任务错误')
|
ElMessage.error('查询任务错误')
|
||||||
|
|
@ -220,8 +215,8 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.goodsTypeQuery = ''
|
this.goodsIdQuery = ''
|
||||||
this.specificationQuery = ''
|
this.vehicleIdQuery = ''
|
||||||
},
|
},
|
||||||
editCurrentRowTask(row) {
|
editCurrentRowTask(row) {
|
||||||
if (row.taskType == 1) {
|
if (row.taskType == 1) {
|
||||||
|
|
|
||||||
288
src/layout/vehicle.vue
Normal file
288
src/layout/vehicle.vue
Normal file
|
|
@ -0,0 +1,288 @@
|
||||||
|
<template>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<el-config-provider :locale="zhCn">
|
||||||
|
<el-row style="align-items: flex-start;">
|
||||||
|
<!-- <div v-if="selVehicle == null"><uploadVehicles></uploadVehicles></div> -->
|
||||||
|
<el-input v-model="queryKey" style="width: 196px; margin-left: auto; margin-right: 10px;" placeholder="载具号" />
|
||||||
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
|
<el-button type="success" @click="exportExcel()" v-if="selVehicle == null">导出信息</el-button>
|
||||||
|
</el-row>
|
||||||
|
<br />
|
||||||
|
<el-table :data="vehicles" stripe border v-loading="loading" class="table-class" max-height="650px"
|
||||||
|
highlight-current-row @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||||
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
|
<el-table-column width="65px" fixed="left">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-radio :label="scope.row.vehicleId" v-model="vehicleId"> </el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="vehicleId" label="托盘号" fixed="left" min-width="120px" />
|
||||||
|
<el-table-column prop="currentLocation" label="所在位置" fixed="left" :formatter="locationFormat" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="vehicleStatus" label="状态" :formatter="vehicleStatusFormat" min-width="120px" />
|
||||||
|
<el-table-column prop="isEmpty" label="空托" :formatter="isEmptyFormat" min-width="120px" />
|
||||||
|
<el-table-column fixed="right" label="操作" width="120px" v-if="selVehicle == null">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button plain type="primary" @click="editCurrentRowVehicle(scope.row)">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<br />
|
||||||
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
||||||
|
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||||
|
@current-change="search" />
|
||||||
|
<el-dialog v-model="dialogVisible" title="托盘信息" width="40%" draggable :show-close="false">
|
||||||
|
<el-form ref="vehicleFormRef" :model="vehicleFormEntity" :label-position="labelPosition" label-width="100px"
|
||||||
|
style="max-width: 100%" :rules="rules" status-icon>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="载具号" prop="vehicleId">
|
||||||
|
<el-input v-model="vehicleFormEntity.vehicleId" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="库位" prop="locationId">
|
||||||
|
<el-input v-model="vehicleFormEntity.currentLocation" placeholder="请输入库位号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="空托" prop="isEmpty">
|
||||||
|
<el-select-v2 v-model="vehicleFormEntity.isEmpty" placeholder="请选择是否空托"
|
||||||
|
:options="isEmptyOptions"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="托盘状态" prop="vehicleStatus">
|
||||||
|
<el-select-v2 v-model="vehicleFormEntity.vehicleStatus" placeholder="请选择托盘状态"
|
||||||
|
:options="vehicleStatusOptions"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitVehicleInfo(vehicleFormEntity)">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</el-config-provider>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getAllVehicles, updateVehicleInfo } from '@/api/vehicle'
|
||||||
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { vehicleStatusFormatter, locationFormatter, dateFormatter } from '@/utils/formatter.js'
|
||||||
|
// import uploadVehicles from '@/excel/uploadVehicles.vue'
|
||||||
|
import { downloadVehicleExcel } from '@/api/excel.js'
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'vehicle',
|
||||||
|
props: ['selVehicle'],
|
||||||
|
emits: ['update:selVehicle'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageInfo: {},
|
||||||
|
vehicles: [],
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
queryKey: '',
|
||||||
|
loading: true,
|
||||||
|
dialogVisible: false,
|
||||||
|
vehicleId: '',
|
||||||
|
vehicleFormEntity: reactive({}),
|
||||||
|
labelPosition: 'top',
|
||||||
|
vehicleFormRef: ref(),
|
||||||
|
rules: reactive({
|
||||||
|
vehicleId: [
|
||||||
|
{ required: true, message: '请输入托盘号' }
|
||||||
|
],
|
||||||
|
currentLocation: [
|
||||||
|
{ required: true, message: '请输入库位' }
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
// 物料高度
|
||||||
|
isEmptyOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '带料'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '空托'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 托盘状态
|
||||||
|
vehicleStatusOptions: [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '在库中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '在站台'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '移动中'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
search() {
|
||||||
|
this.loading = true
|
||||||
|
const tableRequest = {
|
||||||
|
pageNo: this.currentPage,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
vehicleId: this.queryKey.trim()
|
||||||
|
}
|
||||||
|
getAllVehicles(tableRequest).then(res => {
|
||||||
|
const tableResponse = res.data
|
||||||
|
if (tableResponse.code != 0) {
|
||||||
|
ElMessage.error(tableResponse.message)
|
||||||
|
}
|
||||||
|
this.vehicles = tableResponse.returnData.lists
|
||||||
|
this.total = tableResponse.returnData.total
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage.error('查询载具信息错误' + err.message)
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
vehicleStatusFormat: (row, column, cellValue, index) => {
|
||||||
|
return vehicleStatusFormatter(cellValue)
|
||||||
|
},
|
||||||
|
locationFormat: (row, column, cellValue, index) => {
|
||||||
|
return locationFormatter(cellValue)
|
||||||
|
},
|
||||||
|
isEmptyFormat: (row, column, cellValue, index) => {
|
||||||
|
if (cellValue == 0) {
|
||||||
|
return '带料'
|
||||||
|
}
|
||||||
|
if (cellValue == 1) {
|
||||||
|
return '空载具'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.queryKey = ''
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
|
editCurrentRowVehicle(row) {
|
||||||
|
this.vehicleFormEntity = row
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
submitVehicleInfo(formData) {
|
||||||
|
const request = {
|
||||||
|
vehicleId: formData.vehicleId,
|
||||||
|
currentLocation: formData.currentLocation,
|
||||||
|
isEmpty: formData.isEmpty,
|
||||||
|
vehicleStatus: formData.vehicleStatus
|
||||||
|
}
|
||||||
|
updateVehicleInfo(request).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
ElMessage({
|
||||||
|
message: '更新载具信息成功',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
this.search()
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage.error('更新载具信息失败:' + err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCurrentRow(row) {
|
||||||
|
this.vehicleId = row.vehicleId
|
||||||
|
this.$emit('update:selVehicle', row)
|
||||||
|
},
|
||||||
|
exportExcel() {
|
||||||
|
const request = {
|
||||||
|
vehicleId: formData.vehicleId,
|
||||||
|
currentLocation: formData.currentLocation,
|
||||||
|
isEmpty: formData.isEmpty,
|
||||||
|
vehicleStatus: formData.vehicleStatus
|
||||||
|
}
|
||||||
|
downloadVehicleExcel(request).then(res => {
|
||||||
|
const link = document.createElement('a');//创建a标签
|
||||||
|
try {
|
||||||
|
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
||||||
|
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
||||||
|
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
||||||
|
let _fileName = "导出载具信息" + dateFormatter(new Date) + ".xlsx"
|
||||||
|
link.style.display = 'none'//隐藏
|
||||||
|
|
||||||
|
// 兼容不同浏览器的URL对象
|
||||||
|
const url = window.URL || window.webkitURL || window.moxURL
|
||||||
|
link.href = url.createObjectURL(blob)
|
||||||
|
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
|
url.revokeObjectURL(link.href)//移除url对象
|
||||||
|
} catch (e) {
|
||||||
|
ElMessage({
|
||||||
|
message: '下载文件失败:: ' + e,
|
||||||
|
type: 'error',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
ElMessage({
|
||||||
|
message: '导出失败:: ' + err,
|
||||||
|
type: 'error',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-pagination {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-button {
|
||||||
|
width: 72px;
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-class {
|
||||||
|
width: 100%;
|
||||||
|
/* font-size: 5px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item {
|
||||||
|
width: 10% inherit;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-select-v2 {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-input-number {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row .el-form-item .el-button {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,359 +0,0 @@
|
||||||
<template>
|
|
||||||
<div style="margin-bottom: 10px">
|
|
||||||
<el-config-provider :locale="zhCn">
|
|
||||||
<el-row style="margin-top: 10px;">
|
|
||||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="零件号" />
|
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
|
||||||
<el-button type="success" @click="exportExcel()">导出信息</el-button>
|
|
||||||
</el-row>
|
|
||||||
<br />
|
|
||||||
<el-table :data="partInfos" stripe border v-loading="loading" class="table-class" max-height="650px"
|
|
||||||
highlight-current-row @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
|
||||||
<el-table-column width="65px" fixed="left">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-radio :label="scope.row.material" v-model="material"> </el-radio>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="material" label="零件号" fixed="left" sortable min-width="120px" />
|
|
||||||
<el-table-column prop="itemDesc" label="描述" fixed="left" min-width="120px" />
|
|
||||||
<el-table-column prop="category" label="零件类型" fixed="left" sortable min-width="120px" />
|
|
||||||
<el-table-column prop="categoryRemark" label="策略" min-width="120px" />
|
|
||||||
<el-table-column prop="unloadPlace" label="卸货点" min-width="120px" />
|
|
||||||
<el-table-column prop="kittingPoint" label="配料点" min-width="120px" />
|
|
||||||
<el-table-column prop="property" label="可用性" min-width="120px" />
|
|
||||||
<el-table-column prop="vendorId" label="供应商代码" min-width="120px" />
|
|
||||||
<el-table-column prop="dataOwner" label="数据负责人" min-width="120px" />
|
|
||||||
<el-table-column prop="partWeight" label="重量" min-width="120px" />
|
|
||||||
<el-table-column prop="storageLocation" label="库位" min-width="120px" />
|
|
||||||
<el-table-column prop="storageType" label="存储类型" min-width="120px" />
|
|
||||||
<el-table-column prop="storageBin" label="BIN位" min-width="120px" />
|
|
||||||
<el-table-column prop="vendorNameEN" label="供应商名称(英文)" min-width="120px" />
|
|
||||||
<el-table-column prop="vendorNameCN" label="供应商名称(中文)" min-width="120px" />
|
|
||||||
<el-table-column prop="vendorCountry" label="供应商国家/地区" min-width="120px" />
|
|
||||||
<el-table-column prop="SLED" label="SLED" min-width="120px" />
|
|
||||||
<el-table-column prop="updateDate" label="更新日期" min-width="120px" />
|
|
||||||
<el-table-column fixed="right" label="操作" width="240px">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button plain type="primary" @click="editCurrentRowGoods(scope.row)">编辑</el-button>
|
|
||||||
<el-button plain type="danger" @click="deleteCurrentRowGoods(scope.row)">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<br />
|
|
||||||
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
|
||||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
|
||||||
@current-change="search" />
|
|
||||||
<el-dialog v-model="dialogVisible" title="物料信息" width="40%" draggable :show-close="false">
|
|
||||||
<el-form ref="goodsFormRef" :model="goodsFormEntity" :label-position="labelPosition" label-width="100px"
|
|
||||||
style="max-width: 100%" :rules="rules" status-icon>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="零件号" prop="material">
|
|
||||||
<el-input v-model="goodsFormEntity.material" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="描述" prop="itemDesc">
|
|
||||||
<el-input v-model="goodsFormEntity.itemDesc" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="零件类型" prop="category">
|
|
||||||
<el-input v-model="goodsFormEntity.category" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="策略" prop="categoryRemark">
|
|
||||||
<el-input v-model="goodsFormEntity.categoryRemark" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="卸货点" prop="unloadPlace">
|
|
||||||
<el-input v-model="goodsFormEntity.unloadPlace" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="配料点" prop="kittingPoint">
|
|
||||||
<el-input v-model="goodsFormEntity.kittingPoint" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="可用性" prop="property">
|
|
||||||
<el-input v-model="goodsFormEntity.property" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="供应商代码" prop="vendorId">
|
|
||||||
<el-input v-model="goodsFormEntity.vendorId" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="数据负责人" prop="dataOwner">
|
|
||||||
<el-input v-model="goodsFormEntity.dataOwner" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="重量" prop="partWeight">
|
|
||||||
<el-input v-model="goodsFormEntity.partWeight" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="库位" prop="storageLocation">
|
|
||||||
<el-input v-model="goodsFormEntity.storageLocation" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="存储类型" prop="storageType">
|
|
||||||
<el-input v-model="goodsFormEntity.storageType" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="BIN位" prop="storageBin">
|
|
||||||
<el-input v-model="goodsFormEntity.storageBin" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="供应商名称(英文)" prop="vendorNameEN">
|
|
||||||
<el-input v-model="goodsFormEntity.vendorNameEN" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="供应商名称(中文)" prop="vendorNameCN">
|
|
||||||
<el-input v-model="goodsFormEntity.vendorNameCN" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="供应商国家/地区" prop="vendorCountry">
|
|
||||||
<el-input v-model="goodsFormEntity.vendorCountry" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="SLED" prop="SLED">
|
|
||||||
<el-input-number v-model.number="goodsFormEntity.SLED" clearable controls-position="right"
|
|
||||||
:min="0" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="更新日期" prop="updateDate">
|
|
||||||
<el-input v-model="goodsFormEntity.updateDate" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="submitGoodsInfo(goodsFormEntity)">
|
|
||||||
确定
|
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</el-config-provider>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { getPartInfo, updatePartInfo, deleteCurrentPartInfo } from '@/api/goods.js'
|
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
||||||
import { ElMessage } from 'element-plus'
|
|
||||||
import { ref, reactive } from 'vue'
|
|
||||||
import { dateFormatter } from '@/utils/formatter.js'
|
|
||||||
import UploadExcelPart from '@/excel/UploadExcelPart.vue'
|
|
||||||
import { downloadMaterialExcel } from '@/api/excel.js'
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'goods',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
partInfos: [],
|
|
||||||
pageInfo: {},
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
total: 0,
|
|
||||||
queryKey: '',
|
|
||||||
loading: true,
|
|
||||||
dialogVisible: false,
|
|
||||||
material: '',
|
|
||||||
goodsFormEntity: reactive({}),
|
|
||||||
labelPosition: 'top',
|
|
||||||
goodsFormRef: ref(),
|
|
||||||
rules: reactive({})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.search()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
search() {
|
|
||||||
this.loading = true
|
|
||||||
this.pageInfo.pageNum = this.currentPage
|
|
||||||
this.pageInfo.pageSize = this.pageSize
|
|
||||||
const tableRequest = {
|
|
||||||
page: this.pageInfo,
|
|
||||||
param: {
|
|
||||||
material: this.queryKey.trim()
|
|
||||||
},
|
|
||||||
}
|
|
||||||
getPartInfo(tableRequest).then(res => {
|
|
||||||
const tableResponse = res.data
|
|
||||||
if (tableResponse.code != 0) {
|
|
||||||
console.log(tableResponse.code + ':' + tableResponse.message)
|
|
||||||
ElMessage.error(tableResponse.message)
|
|
||||||
}
|
|
||||||
this.partInfos = tableResponse.rows
|
|
||||||
this.total = tableResponse.total
|
|
||||||
}).catch(err => {
|
|
||||||
ElMessage.error('查询物料错误' + err.message)
|
|
||||||
})
|
|
||||||
this.loading = false
|
|
||||||
},
|
|
||||||
dateFormat: (row, column, cellValue, index) => {
|
|
||||||
return dateFormatter(cellValue)
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
this.queryKey = ''
|
|
||||||
this.search
|
|
||||||
},
|
|
||||||
// getCurrentPageGoods() {
|
|
||||||
// this.currentGoods = this.displayGoods.slice((this.currentPage - 1) * this.pageSize, this.currentPage * this.pageSize)
|
|
||||||
// },
|
|
||||||
editCurrentRowGoods(row) {
|
|
||||||
this.goodsFormEntity = row
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
deleteCurrentRowGoods(row) {
|
|
||||||
this.material = row.material
|
|
||||||
const goods = {
|
|
||||||
material: row.material
|
|
||||||
}
|
|
||||||
deleteCurrentPartInfo(goods).then(res => {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
ElMessage({
|
|
||||||
message: '删除零件信息成功',
|
|
||||||
type: 'success',
|
|
||||||
})
|
|
||||||
this.search()
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.data.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
ElMessage.error('删除零件信息失败:' + err)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
submitGoodsInfo(formData) {
|
|
||||||
updatePartInfo(formData).then(res => {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
this.dialogVisible = false
|
|
||||||
ElMessage({
|
|
||||||
message: '更新零件信息成功',
|
|
||||||
type: 'success',
|
|
||||||
})
|
|
||||||
this.search()
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.data.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
ElMessage.error('更新零件信息失败')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getCurrentRow(row) {
|
|
||||||
this.goodsId = row.goodsId
|
|
||||||
},
|
|
||||||
exportExcel() {
|
|
||||||
downloadMaterialExcel().then(res => {
|
|
||||||
const link = document.createElement('a');//创建a标签
|
|
||||||
try {
|
|
||||||
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
|
||||||
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
|
||||||
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
|
||||||
let _fileName = "导出物料信息" + dateFormatter(new Date) + ".xlsx"
|
|
||||||
link.style.display = 'none'//隐藏
|
|
||||||
|
|
||||||
// 兼容不同浏览器的URL对象
|
|
||||||
const url = window.URL || window.webkitURL || window.moxURL
|
|
||||||
link.href = url.createObjectURL(blob)
|
|
||||||
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
|
||||||
document.body.appendChild(link)
|
|
||||||
link.click()
|
|
||||||
document.body.removeChild(link)
|
|
||||||
url.revokeObjectURL(link.href)//移除url对象
|
|
||||||
} catch (e) {
|
|
||||||
ElMessage({
|
|
||||||
message: '下载文件失败:: ' + e,
|
|
||||||
type: 'error',
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
ElMessage({
|
|
||||||
message: '导出失败:: ' + err,
|
|
||||||
type: 'error',
|
|
||||||
showClose: true
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// watch: {
|
|
||||||
// currentPage() {
|
|
||||||
// this.getCurrentPageGoods()
|
|
||||||
// },
|
|
||||||
// pageSize() {
|
|
||||||
// this.getCurrentPageGoods()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.el-pagination {
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-button {
|
|
||||||
width: 72px;
|
|
||||||
margin-left: 0px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-class {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item {
|
|
||||||
width: 10% inherit;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-select-v2 {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-input-number {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-button {
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -135,23 +135,20 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
search() {
|
search() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.pageInfo.pageNum = this.currentPage
|
|
||||||
this.pageInfo.pageSize = this.pageSize
|
|
||||||
const tableRequest = {
|
const tableRequest = {
|
||||||
page: this.pageInfo,
|
pageNo: this.currentPage,
|
||||||
param: {
|
pageSize: this.pageSize,
|
||||||
logRequest: this.queryKey.trim()
|
queryParam: this.queryKey.trim()
|
||||||
},
|
|
||||||
}
|
}
|
||||||
queryLogs(tableRequest).then(res => {
|
queryLogs(tableRequest).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code != 0) {
|
if (tableResponse.code != 0) {
|
||||||
ElMessage.error(tableResponse.message)
|
ElMessage.error(tableResponse.message)
|
||||||
}
|
}
|
||||||
this.wmsLogs = tableResponse.rows
|
this.wmsLogs = tableResponse.returnData.lists
|
||||||
this.total = tableResponse.total
|
this.total = tableResponse.returnData.total
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage.error('查询物料错误' + err.message)
|
ElMessage.error('查询日志错误' + err.message)
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@ const routes = [
|
||||||
{ path: '/standSettings', component: () => import('@/layout/standSettings.vue') },// 站台(库口)设置
|
{ path: '/standSettings', component: () => import('@/layout/standSettings.vue') },// 站台(库口)设置
|
||||||
{ path: '/config', component: () => import('@/layout/config.vue') },// 系统配置
|
{ path: '/config', component: () => import('@/layout/config.vue') },// 系统配置
|
||||||
{ path: '/taskMonitor', component: () => import('@/layout/taskMonitor.vue') },// 任务监控
|
{ path: '/taskMonitor', component: () => import('@/layout/taskMonitor.vue') },// 任务监控
|
||||||
|
{ path: '/vehicles', component: () => import('@/layout/vehicle.vue') },// 任务监控
|
||||||
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
|
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
|
||||||
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点
|
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点
|
||||||
{ path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志
|
{ path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志
|
||||||
{ path: '/scanConfirm', component: () => import('@/layout/scanConfirm.vue') },// 扫码确认
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,8 @@ function locationFormatter(locationId) {
|
||||||
if (locationId === null || locationId == undefined) {
|
if (locationId === null || locationId == undefined) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
return locationId.substr(0, 2) + '排' + locationId.substr(2, 2) + '列' + locationId.substr(4, 2) + '层' + locationId.substr(7, 3) + '深度'
|
const locationArray = locationId.split('-')
|
||||||
|
return locationArray[0] + '排' + locationArray[1] + '列' + locationArray[2] + '层' + locationArray[3] + '深度'
|
||||||
}
|
}
|
||||||
|
|
||||||
function kateTaskStatusFormatter(value) {
|
function kateTaskStatusFormatter(value) {
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,21 @@
|
||||||
<el-image :src="icon_img_url" :fit="'fill'" />
|
<el-image :src="icon_img_url" :fit="'fill'" />
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>WMS仓库管理系统</span>
|
<span style="font-size: 15px;font-weight: bold;">WMS仓库管理系统</span>
|
||||||
|
</div>
|
||||||
|
<div class="user">
|
||||||
|
<el-dropdown @command="handleCommand">
|
||||||
|
<span class="el-dropdown-link">
|
||||||
|
{{ userName }}
|
||||||
|
</span>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item command="1">重启系统</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="2" divided>重载配置</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<div class="user">{{ userName }}</div>
|
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-container class="content">
|
<el-container class="content">
|
||||||
<el-aside class="aside">
|
<el-aside class="aside">
|
||||||
|
|
@ -36,7 +48,7 @@
|
||||||
</router-view>
|
</router-view>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer class="footer">© 1970-2024 江苏菲达宝开电气股份有限公司</el-footer>
|
<el-footer class="footer">© 1970- 江苏菲达宝开电气股份有限公司</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
@ -46,6 +58,9 @@
|
||||||
// @ is an alias to /src
|
// @ is an alias to /src
|
||||||
import sideMenu from '@/components/sideMenu.vue'
|
import sideMenu from '@/components/sideMenu.vue'
|
||||||
import appTag from '@/components/appTag.vue'
|
import appTag from '@/components/appTag.vue'
|
||||||
|
import store from '@/store'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { restartSystem, reloadConfig } from '@/api/config.js'
|
||||||
const icon_img_url = require('@/assets/fdbk_log.png')
|
const icon_img_url = require('@/assets/fdbk_log.png')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -58,7 +73,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
userName() {
|
userName() {
|
||||||
return this.$store.state.user.userName
|
return store.getters.getUserName
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -69,6 +84,33 @@ export default {
|
||||||
path: '/location'
|
path: '/location'
|
||||||
})
|
})
|
||||||
this.$router.push('/location')
|
this.$router.push('/location')
|
||||||
|
},
|
||||||
|
handleCommand: (command) => {
|
||||||
|
const param = store.getters.getUser
|
||||||
|
if (command == 1) {
|
||||||
|
restartSystem(param).then(res => {
|
||||||
|
if (res.data.code != 0) {
|
||||||
|
ElMessage.error(res.data.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
ElMessage.error('发生错误')
|
||||||
|
})
|
||||||
|
} else if (command == 2) {
|
||||||
|
reloadConfig(param).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
ElMessage({
|
||||||
|
message: '重载配置成功',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
ElMessage.error('发生错误')
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user