代码更新:

1. 功能修改
This commit is contained in:
梁州 2024-09-29 17:17:48 +08:00
parent c0f4b8c652
commit bd863e9989
4 changed files with 94 additions and 8 deletions

View File

@ -32,9 +32,18 @@ const getStockUpdateRecord = (params) => {
})
}
const handleExceptionStock = (params) => {
return request({
url: '/stock/handleExceptionStock',
method: 'post',
data: params
})
}
export {
getAllStocks,
updateStockInfo,
getStockNumByGoodsId,
getStockUpdateRecord
getStockUpdateRecord,
handleExceptionStock
}

View File

@ -1,7 +1,7 @@
import axios from 'axios'
const request = axios.create({
baseURL: 'http://10.90.36.70:443/wmsServer/wms',
baseURL: 'http://localhost:12315/wms',
timeout: 5000
})

View File

@ -13,7 +13,7 @@
<span class="station-text">工作站</span>
</div>
<div class="station-no-div">
<span class="station-no-text">{{ standId }}</span>
<span class="station-no-text" @click="showStockDealDialog()">{{ standId }}</span>
</div>
</fieldset>
<fieldset class="main-area">
@ -132,6 +132,33 @@
</div>
</el-form>
</fieldset>
<el-dialog v-model="dialogVisible" title="异常箱料处理" width="40%" draggable :show-close="false">
<div style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
<el-form ref="exceptionHandleFormRef" :model="exceptionHandleFormEntity" :label-position="labelPosition"
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="箱号" prop="vehicleId">
<el-input v-model="exceptionHandleFormEntity.vehicleId" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="料号" prop="goodsId">
<el-input v-model="exceptionHandleFormEntity.goodsId" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="exceptionHandle()">
确定
</el-button>
</span>
</template>
</el-dialog>
</div>
</el-container>
</el-config-provider>
@ -140,6 +167,7 @@
<script setup>
import store from '@/store'
import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods } from '@/api/task'
import { handleExceptionStock } from '@/api/stock'
import { errorBox, warningBox } from '@/utils/myMessageBox.js'
import { ElMessage } from 'element-plus'
import { reactive, ref } from 'vue'
@ -172,13 +200,16 @@ export default {
{ required: true, message: '请输入料号' }
]
}),
exceptionHandleFormEntity: reactive({}),
exceptionHandleFormRef: ref(),
dialogVisible: false
}
},
mounted() {
this.$refs.goodsId.focus()
this.timer = setInterval(() => {
this.queryFinish()
}, 1000)
}, 1500)
},
beforeUnmount() {
clearInterval(this.timer)
@ -287,6 +318,34 @@ export default {
console.log(err)
errorBox('确认时发生异常')
})
},
showStockDealDialog() {
errorBox('暂未开放')
},
exceptionHandle() {
if (this.exceptionHandleFormEntity.vehicleId == '' || this.exceptionHandleFormEntity.goodsId == '') {
errorBox('箱号和料号必须输入。')
return
}
const request = {
vehicleId: this.exceptionHandleFormEntity.vehicleId.trim(),
goodsId: this.exceptionHandleFormEntity.goodsId.trim(),
standId: this.standId,
userName: store.getters.getUserName
}
handleExceptionStock(request).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage.success(response.message)
this.exceptionHandleFormEntity.vehicleId = ''
this.exceptionHandleFormEntity.goodsId = ''
} else {
errorBox(response.message)
}
}).catch(err => {
console.log(err)
errorBox('确认时发生异常')
})
}
}
}
@ -408,6 +467,8 @@ export default {
align-self: center;
font-weight: bold;
font-size: 25px;
width: 100%;
cursor: pointer;
}
.display-title-div {

View File

@ -3,14 +3,18 @@
<el-config-provider :locale="zhCn">
<div style="display: flex;justify-content: space-between;">
<el-row>
<el-input v-model="workOrderQuery" style="width: 196px; margin-right: 10px;" placeholder="工单号"
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px;" placeholder="工单号"
:suffix-icon="Search" />
<el-input v-model="workCenterQuery" style="width: 196px; margin-right: 10px;" placeholder="工位/小盒子"
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px;" placeholder="工位/小盒子"
:suffix-icon="Search" />
<el-input v-model="goodsIdQuery" style="width: 196px; margin-right: 10px;" placeholder="料号"
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
:suffix-icon="Search" />
<el-input v-model="standIdQuery" style="width: 196px; margin-right: 10px;" placeholder="站台号"
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
:suffix-icon="Search" />
<el-select-v2 v-model="lightStatusQuery" style="width: 158px; margin-right: 10px;"
placeholder="请选择灯光状态" :options="lightStatusOptions" @change="search()"></el-select-v2>
<el-select-v2 v-model="workStatusQuery" style="width: 158px; margin-right: 10px;"
placeholder="请选择工作状态" :options="workStatusOptions" @change="search()"></el-select-v2>
<el-button type="primary" @click="search()">搜索</el-button>
<el-button type="warning" @click="reset()">重置</el-button>
</el-row>
@ -177,6 +181,8 @@ export default {
workCenterQuery: '',
goodsIdQuery: '',
standIdQuery: '',
lightStatusQuery: -99,
workStatusQuery: -99,
loading: true,
dialogVisible: false,
workFlowId: '',
@ -185,6 +191,10 @@ export default {
labelPosition: 'top',
rules: reactive({}),
lightStatusOptions: [
{
value: -99,
label: '全部'
},
{
value: 0,
label: '未亮灯'
@ -199,6 +209,10 @@ export default {
}
],
workStatusOptions: [
{
value: -99,
label: '全部'
},
{
value: 0,
label: '未开始'
@ -227,6 +241,8 @@ export default {
workOrder: this.workOrderQuery.trim(),
workCenter: this.workCenterQuery.trim(),
goodsId: this.goodsIdQuery.trim(),
lightStatus: this.lightStatusQuery == -99 ? null : this.lightStatusQuery,
workStatus: this.workStatusQuery == -99 ? null : this.workStatusQuery,
userName: store.getters.getUserName
}
getWorkFlows(request).then(res => {