forked from BaoKaiWms/202501-Wms-Kate-Wuxi
增加入库物料信息扫码的格式化。
This commit is contained in:
parent
eae7715ca4
commit
ab65f82cf4
|
|
@ -10,3 +10,13 @@ export const getGoodsInfoByPage = (params) => {
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据物料id查询物料信息
|
||||||
|
*/
|
||||||
|
export const getGoodsInfoByGoodsId = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/goods/getGoodsInfoByGoodsId',
|
||||||
|
method: 'get',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -135,6 +135,7 @@ import {nextTick, onMounted, reactive, ref} from 'vue'
|
||||||
import {loading} from '@/utils/loading.js'
|
import {loading} from '@/utils/loading.js'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
import {labelPosition} from '@/constant/form'
|
import {labelPosition} from '@/constant/form'
|
||||||
|
import {getGoodsInfoByGoodsId} from "@/api/goods";
|
||||||
|
|
||||||
const inTypeOptions = [
|
const inTypeOptions = [
|
||||||
{
|
{
|
||||||
|
|
@ -241,6 +242,24 @@ const changeFocus = () => {
|
||||||
if (inTaskEntity.goodsId === '') {
|
if (inTaskEntity.goodsId === '') {
|
||||||
goodsId.value.focus()
|
goodsId.value.focus()
|
||||||
return
|
return
|
||||||
|
} else {
|
||||||
|
// 对料号进行一下格式化
|
||||||
|
inTaskEntity.goodsId = inTaskEntity.goodsId.toUpperCase().trim()
|
||||||
|
if (inTaskEntity.goodsId.substring(0, 1) === 'P') {
|
||||||
|
// 检索一遍数据库,判断是否有该料号
|
||||||
|
loading.open('请求中,请稍等...')
|
||||||
|
getGoodsInfoByGoodsId(inTaskEntity.goodsId).then(res => {
|
||||||
|
const goodsResponse = res.data
|
||||||
|
if (goodsResponse.code !== 0) {
|
||||||
|
// 去除前缀P
|
||||||
|
inTaskEntity.goodsId = inTaskEntity.goodsId.substring(1)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (inTaskEntity.opNum == null || inTaskEntity.opNum === '') {
|
if (inTaskEntity.opNum == null || inTaskEntity.opNum === '') {
|
||||||
opNum.value.focus()
|
opNum.value.focus()
|
||||||
|
|
|
||||||
|
|
@ -12,27 +12,29 @@
|
||||||
:options="outTypeOptions"></el-select-v2>
|
:options="outTypeOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="料号" prop="goodsId">
|
<el-form-item label="料号" prop="goodsId">
|
||||||
<el-input v-model="outTaskEntity.goodsId" ref="goodsId" clearable />
|
<el-input v-model="outTaskEntity.goodsId" ref="goodsId" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="箱号" prop="vehicleId" v-if="outTaskEntity.outType != 9">
|
<el-form-item label="箱号" prop="vehicleId" v-if="outTaskEntity.outType != 9">
|
||||||
<el-input v-model="outTaskEntity.vehicleId" ref="vehicleId" clearable />
|
<el-input v-model="outTaskEntity.vehicleId" ref="vehicleId" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数量" prop="needNum">
|
<el-form-item label="数量" prop="needNum">
|
||||||
<el-input-number v-model.number="outTaskEntity.needNum" ref="needNum"
|
<el-input-number style="width: 196px" v-model.number="outTaskEntity.needNum" ref="needNum"
|
||||||
controls-position="right" :min="1" clearable />
|
controls-position="right" :min="1" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="原因" prop="reason" v-if="outTaskEntity.outType == 9">
|
<el-form-item label="原因" prop="reason" v-if="outTaskEntity.outType == 9">
|
||||||
<el-select-v2 style="width: 196px" v-model="outTaskEntity.reason" placeholder="请选择紧急出库原因"
|
<el-select-v2 style="width: 196px" v-model="outTaskEntity.reason" placeholder="请选择紧急出库原因"
|
||||||
:options="resonOptions"></el-select-v2>
|
:options="reasonOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-button type="primary"
|
<el-button type="primary"
|
||||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||||
@click="confirmOut()">确认出库</el-button>
|
@click="confirmOut()">确认出库
|
||||||
|
</el-button>
|
||||||
<el-button type="warning"
|
<el-button type="warning"
|
||||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||||
@click="clearInput()">清除输入</el-button>
|
@click="clearInput()">清除输入
|
||||||
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -44,43 +46,44 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-row style="border-bottom: dashed 1px black;">
|
<el-row style="border-bottom: dashed 1px black;">
|
||||||
<el-form-item label="出库类型" prop="outType">
|
<el-form-item label="出库类型" prop="outType">
|
||||||
<el-select-v2 v-model="confirmEntity.outType" placeholder=" "
|
<el-select-v2 style="width: 196px" v-model="confirmEntity.outType" placeholder=" "
|
||||||
:options="outTypeOptions" disabled></el-select-v2>
|
:options="outTypeOptions" disabled></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料号" prop="goodsId">
|
<el-form-item label="物料号" prop="goodsId">
|
||||||
<el-input v-model="confirmEntity.goodsId" disabled />
|
<el-input v-model="confirmEntity.goodsId" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总需求" prop="totalNeed">
|
<el-form-item label="总需求" prop="totalNeed">
|
||||||
<el-input v-model="confirmEntity.totalNeed" disabled />
|
<el-input v-model="confirmEntity.totalNeed" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="剩余需求" prop="remainNeed">
|
<el-form-item label="剩余需求" prop="remainNeed">
|
||||||
<el-input v-model="confirmEntity.remainNeed" disabled />
|
<el-input v-model="confirmEntity.remainNeed" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="本次计划拣选" prop="planPickQty">
|
<el-form-item label="本次计划拣选" prop="planPickQty">
|
||||||
<el-input v-model="confirmEntity.planPickQty" disabled />
|
<el-input v-model="confirmEntity.planPickQty" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="本次实际拣选" prop="realPickQty">
|
<el-form-item label="本次实际拣选" prop="realPickQty">
|
||||||
<el-input-number v-model.number="confirmEntity.realPickQty"
|
<el-input-number style="width: 196px" v-model.number="confirmEntity.realPickQty"
|
||||||
controls-position="right" :min="0" clearable @change="changePlanQty()" />
|
controls-position="right" :min="0" clearable @change="changePlanQty()"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="箱号" prop="vehicleId">
|
<el-form-item label="箱号" prop="vehicleId">
|
||||||
<el-input v-model="confirmEntity.vehicleId" disabled />
|
<el-input v-model="confirmEntity.vehicleId" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划剩余数量" prop="planRemainQty">
|
<el-form-item label="计划剩余数量" prop="planRemainQty">
|
||||||
<el-input v-model="confirmEntity.planRemainQty" disabled />
|
<el-input v-model="confirmEntity.planRemainQty" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实际剩余数量" prop="realRemainQty">
|
<el-form-item label="实际剩余数量" prop="realRemainQty">
|
||||||
<el-input-number v-model.number="confirmEntity.realRemainQty"
|
<el-input-number style="width: 196px" v-model.number="confirmEntity.realRemainQty"
|
||||||
controls-position="right" :min="0" clearable />
|
controls-position="right" :min="0" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-button type="success"
|
<el-button type="success"
|
||||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||||
@click="confirmOrRelease()">确认/放行</el-button>
|
@click="confirmOrRelease()">确认/放行
|
||||||
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -92,41 +95,36 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { requireStockOut, getCurrentTask, confirmCurrentTask } from '@/api/task.js'
|
import {requireStockOut, getCurrentTask, confirmCurrentTask} from '@/api/task.js'
|
||||||
import { errorBox, warningBox } from '@/utils/myMessageBox.js'
|
import {errorBox, warningBox} from '@/utils/myMessageBox.js'
|
||||||
import { ElMessage } from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import { reactive, ref } from 'vue'
|
import {nextTick, onBeforeUnmount, onMounted, reactive, ref, watch} from 'vue'
|
||||||
import { loading } from '@/utils/loading'
|
import {loading} from '@/utils/loading'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
</script>
|
import {useRoute} from "vue-router";
|
||||||
|
import {labelPosition} from '@/constant/form'
|
||||||
|
|
||||||
<script>
|
const STAND_ID = store.getters.getStandId
|
||||||
export default {
|
const USER_NAME = store.getters.getUserName
|
||||||
name: 'goodsOut',
|
let timer = ref()
|
||||||
data() {
|
let outTaskRef = ref()
|
||||||
return {
|
let outTaskEntity = reactive({
|
||||||
standId: store.getters.getStandId,
|
|
||||||
userName: store.getters.getUserName,
|
|
||||||
timer: '',
|
|
||||||
labelPosition: 'top',
|
|
||||||
outTaskRef: ref(),
|
|
||||||
outTaskEntity: reactive({
|
|
||||||
outType: 9,
|
outType: 9,
|
||||||
goodsId: '',
|
goodsId: '',
|
||||||
vehicleId: '',
|
vehicleId: '',
|
||||||
reason: '',
|
reason: '',
|
||||||
needNum: null
|
needNum: null
|
||||||
}),
|
})
|
||||||
requestRules: reactive({
|
const requestRules = reactive({
|
||||||
outType: [
|
outType: [
|
||||||
{ required: true, message: '请选择入库类型' }
|
{required: true, message: '请选择入库类型'}
|
||||||
],
|
],
|
||||||
needNum: [
|
needNum: [
|
||||||
{ required: true, message: '请输入数量' },
|
{required: true, message: '请输入数量'},
|
||||||
{ type: 'number', message: '请输入数字值' }
|
{type: 'number', message: '请输入数字值'}
|
||||||
],
|
],
|
||||||
}),
|
})
|
||||||
outTypeOptions: [
|
const outTypeOptions = [
|
||||||
{
|
{
|
||||||
label: '空箱出库',
|
label: '空箱出库',
|
||||||
value: 1
|
value: 1
|
||||||
|
|
@ -135,8 +133,8 @@ export default {
|
||||||
label: '紧急出库',
|
label: '紧急出库',
|
||||||
value: 9
|
value: 9
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
resonOptions: [
|
const reasonOptions = [
|
||||||
{
|
{
|
||||||
label: '补料',
|
label: '补料',
|
||||||
value: '补料'
|
value: '补料'
|
||||||
|
|
@ -153,68 +151,139 @@ export default {
|
||||||
label: '返工工单',
|
label: '返工工单',
|
||||||
value: '返工工单'
|
value: '返工工单'
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
confirmRef: ref(),
|
let confirmRef = ref()
|
||||||
confirmEntity: reactive({}),
|
let confirmEntity = reactive({
|
||||||
confirmRules: reactive({}),
|
taskId: '',
|
||||||
pauseGetPickFlag: false,
|
outType: null,
|
||||||
}
|
goodsId: '',
|
||||||
},
|
totalNeed: null,
|
||||||
mounted() {
|
remainNeed: null,
|
||||||
this.$nextTick(() => {
|
planPickQty: null,
|
||||||
this.timer = setInterval(() => {
|
realPickQty: null,
|
||||||
this.getTask()
|
stockId: '',
|
||||||
|
vehicleId: '',
|
||||||
|
planRemainQty: null,
|
||||||
|
realRemainQty: null,
|
||||||
|
isOut: null,
|
||||||
|
putArea: '',
|
||||||
|
warningQty: null
|
||||||
|
})
|
||||||
|
const confirmRules = reactive({})
|
||||||
|
let pauseGetPickFlag = ref(false)
|
||||||
|
const route = useRoute()// 路由
|
||||||
|
// 系统
|
||||||
|
onMounted(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
timer.value = setInterval(() => {
|
||||||
|
timerTask_1()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
},
|
})
|
||||||
beforeUnmount() {
|
onBeforeUnmount(() => {
|
||||||
clearInterval(this.timer)
|
clearInterval(timer.value)
|
||||||
},
|
})
|
||||||
methods: {
|
// 监视路由
|
||||||
// 清除输入
|
watch(() => route.path, (newVal, oldVal) => {
|
||||||
clearInput() {
|
if (newVal === '/goodsOut') {
|
||||||
this.outTaskEntity = reactive({
|
timer.value = setInterval(() => {
|
||||||
outType: 9,
|
timerTask_1()
|
||||||
goodsId: '',
|
}, 1000)
|
||||||
vehicleId: '',
|
} else {
|
||||||
needNum: null
|
clearInterval(timer.value)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 定时器任务1
|
||||||
|
const timerTask_1 = () => {
|
||||||
|
getTask()
|
||||||
|
}
|
||||||
|
// 获取拣选信息
|
||||||
|
const getTask = () => {
|
||||||
|
if (pauseGetPickFlag.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const request = {
|
||||||
|
standId: STAND_ID,
|
||||||
|
userName: USER_NAME
|
||||||
|
}
|
||||||
|
// 获取当前拣选信息
|
||||||
|
getCurrentTask(request).then(res => {
|
||||||
|
const response = res.data
|
||||||
|
if (response.code === 0) {
|
||||||
|
const confirmVo = response.data
|
||||||
|
// 设置form
|
||||||
|
confirmEntity.taskId = confirmVo.taskConfirm.taskId
|
||||||
|
confirmEntity.outType = confirmVo.taskConfirm.outType
|
||||||
|
confirmEntity.goodsId = confirmVo.taskConfirm.goodsId
|
||||||
|
confirmEntity.totalNeed = confirmVo.taskConfirm.totalNeed
|
||||||
|
confirmEntity.remainNeed = confirmVo.taskConfirm.remainNeed
|
||||||
|
confirmEntity.planPickQty = confirmVo.taskConfirm.planPickQty
|
||||||
|
confirmEntity.realPickQty = confirmVo.taskConfirm.realPickQty
|
||||||
|
confirmEntity.stockId = confirmVo.stockConfirm.stockId
|
||||||
|
confirmEntity.vehicleId = confirmVo.stockConfirm.vehicleId
|
||||||
|
confirmEntity.planRemainQty = confirmVo.stockConfirm.planRemainQty
|
||||||
|
confirmEntity.realRemainQty = confirmVo.stockConfirm.realRemainQty
|
||||||
|
confirmEntity.isOut = confirmVo.stockConfirm.isOut
|
||||||
|
confirmEntity.putArea = confirmVo.stockConfirm.putArea
|
||||||
|
confirmEntity.warningQty = confirmVo.stockConfirm.warningQty
|
||||||
|
pauseGetPickFlag.value = true
|
||||||
|
// 如果剩余数量低于预警值,弹框报警
|
||||||
|
if (confirmEntity.isOut === 0 && confirmEntity.planRemainQty <= confirmEntity.warningQty) {
|
||||||
|
warningBox('剩余数量低于预警值,请清点库存数量。')
|
||||||
|
}
|
||||||
|
} else if (response.code === 400) {
|
||||||
|
// 警告,弹框
|
||||||
|
pauseGetPickFlag.value = true
|
||||||
|
warningBox(response.message)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
pauseGetPickFlag.value = true
|
||||||
|
errorBox('请求错误,请检查完原因后刷新界面。')
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
// 确认出库
|
// 清除输入
|
||||||
confirmOut() {
|
const clearInput = () => {
|
||||||
if (this.outTaskEntity.needNum == null) {
|
outTaskEntity.outType = 9
|
||||||
|
outTaskEntity.goodsId = ''
|
||||||
|
outTaskEntity.vehicleId = ''
|
||||||
|
outTaskEntity.needNum = null
|
||||||
|
}
|
||||||
|
// 确认出库
|
||||||
|
const confirmOut = () => {
|
||||||
|
if (outTaskEntity.needNum == null) {
|
||||||
errorBox('请输入正确的数量。')
|
errorBox('请输入正确的数量。')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.outTaskEntity.outType != 1) {
|
if (outTaskEntity.outType !== 1) {
|
||||||
if (this.outTaskEntity.goodsId == '') {
|
if (outTaskEntity.goodsId === '') {
|
||||||
errorBox('非空箱出库时,请输入料号。')
|
errorBox('非空箱出库时,请输入料号。')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.outTaskEntity.outType == 9) {
|
if (outTaskEntity.outType === 9) {
|
||||||
if (this.outTaskEntity.reason == '') {
|
if (outTaskEntity.reason === '') {
|
||||||
errorBox('紧急出库请选择原因。')
|
errorBox('紧急出库请选择原因。')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const request = {
|
const request = {
|
||||||
outType: this.outTaskEntity.outType,
|
outType: outTaskEntity.outType,
|
||||||
goodsId: this.outTaskEntity.goodsId.toUpperCase(),
|
goodsId: outTaskEntity.goodsId.toUpperCase().trim(),
|
||||||
vehicleId: this.outTaskEntity.vehicleId,
|
vehicleId: outTaskEntity.vehicleId.toUpperCase().trim(),
|
||||||
needNum: this.outTaskEntity.needNum,
|
needNum: outTaskEntity.needNum,
|
||||||
reason: this.outTaskEntity.reason,
|
reason: outTaskEntity.reason,
|
||||||
destination: this.standId,
|
destination: STAND_ID,
|
||||||
userName: this.userName,
|
userName: USER_NAME,
|
||||||
standId: this.standId
|
standId: STAND_ID
|
||||||
}
|
}
|
||||||
loading.open('请求中,请稍等...')
|
loading.open('请求中,请稍等...')
|
||||||
requireStockOut(request).then(res => {
|
requireStockOut(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
// 成功
|
// 成功
|
||||||
ElMessage.success(response.message)
|
ElMessage.success(response.message)
|
||||||
this.clearInput()
|
clearInput()
|
||||||
} else {
|
} else {
|
||||||
errorBox(response.message)
|
errorBox(response.message)
|
||||||
}
|
}
|
||||||
|
|
@ -224,88 +293,41 @@ export default {
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
// 获取拣选信息
|
// 确认/放行
|
||||||
getTask() {
|
const confirmOrRelease = () => {
|
||||||
if (this.pauseGetPickFlag) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const request = {
|
|
||||||
standId: this.standId,
|
|
||||||
userName: this.userName
|
|
||||||
}
|
|
||||||
// 获取当前拣选信息
|
|
||||||
getCurrentTask(request).then(res => {
|
|
||||||
const response = res.data
|
|
||||||
if (response.code == 0) {
|
|
||||||
const confirmVo = response.data
|
|
||||||
// 设置form
|
|
||||||
this.confirmEntity = {
|
|
||||||
taskId: confirmVo.taskConfirm.taskId,
|
|
||||||
outType: confirmVo.taskConfirm.outType,
|
|
||||||
goodsId: confirmVo.taskConfirm.goodsId,
|
|
||||||
totalNeed: confirmVo.taskConfirm.totalNeed,
|
|
||||||
remainNeed: confirmVo.taskConfirm.remainNeed,
|
|
||||||
planPickQty: confirmVo.taskConfirm.planPickQty,
|
|
||||||
realPickQty: confirmVo.taskConfirm.realPickQty,
|
|
||||||
stockId: confirmVo.stockConfirm.stockId,
|
|
||||||
vehicleId: confirmVo.stockConfirm.vehicleId,
|
|
||||||
planRemainQty: confirmVo.stockConfirm.planRemainQty,
|
|
||||||
realRemainQty: confirmVo.stockConfirm.realRemainQty,
|
|
||||||
isOut: confirmVo.stockConfirm.isOut,
|
|
||||||
putArea: confirmVo.stockConfirm.putArea,
|
|
||||||
warningQty: confirmVo.stockConfirm.warningQty
|
|
||||||
}
|
|
||||||
this.pauseGetPickFlag = true
|
|
||||||
// 如果剩余数量低于预警值,弹框报警
|
|
||||||
if (this.confirmEntity.isOut == 0 && this.confirmEntity.planRemainQty <= this.confirmEntity.warningQty) {
|
|
||||||
warningBox('剩余数量低于预警值,请清点库存数量。')
|
|
||||||
}
|
|
||||||
} else if (response.code == 400) {
|
|
||||||
// 警告,弹框
|
|
||||||
this.pauseGetPickFlag = true
|
|
||||||
warningBox(response.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
this.pauseGetPickFlag = true
|
|
||||||
errorBox('请求错误,请检查完原因后刷新界面。')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 确认/放行
|
|
||||||
confirmOrRelease() {
|
|
||||||
// 确认放行---与配料工作区分开来
|
// 确认放行---与配料工作区分开来
|
||||||
const request = {
|
const request = {
|
||||||
taskConfirm: {
|
taskConfirm: {
|
||||||
taskId: this.confirmEntity.taskId,
|
taskId: confirmEntity.taskId,
|
||||||
outType: this.confirmEntity.outType,
|
outType: confirmEntity.outType,
|
||||||
goodsId: this.confirmEntity.goodsId,
|
goodsId: confirmEntity.goodsId,
|
||||||
totalNeed: this.confirmEntity.totalNeed,
|
totalNeed: confirmEntity.totalNeed,
|
||||||
remainNeed: this.confirmEntity.remainNeed,
|
remainNeed: confirmEntity.remainNeed,
|
||||||
planPickQty: this.confirmEntity.planPickQty,
|
planPickQty: confirmEntity.planPickQty,
|
||||||
realPickQty: this.confirmEntity.realPickQty,
|
realPickQty: confirmEntity.realPickQty,
|
||||||
},
|
},
|
||||||
stockConfirm: {
|
stockConfirm: {
|
||||||
stockId: this.confirmEntity.stockId,
|
stockId: confirmEntity.stockId,
|
||||||
vehicleId: this.confirmEntity.vehicleId,
|
vehicleId: confirmEntity.vehicleId,
|
||||||
goodsId: this.confirmEntity.goodsId,
|
goodsId: confirmEntity.goodsId,
|
||||||
planRemainQty: this.confirmEntity.planRemainQty,
|
planRemainQty: confirmEntity.planRemainQty,
|
||||||
realRemainQty: this.confirmEntity.realRemainQty,
|
realRemainQty: confirmEntity.realRemainQty,
|
||||||
isOut: this.confirmEntity.isOut,
|
isOut: confirmEntity.isOut,
|
||||||
putArea: this.confirmEntity.putArea,
|
putArea: confirmEntity.putArea,
|
||||||
},
|
},
|
||||||
standId: this.standId,
|
standId: STAND_ID,
|
||||||
userName: this.userName
|
userName: USER_NAME
|
||||||
}
|
}
|
||||||
confirmCurrentTask(request).then(res => {
|
confirmCurrentTask(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
// 设置form
|
// 设置form
|
||||||
this.confirmEntity = reactive({})
|
clearConfirmEntity()
|
||||||
this.pauseGetPickFlag = false
|
pauseGetPickFlag.value = false
|
||||||
ElMessage.success(response.message)
|
ElMessage.success(response.message)
|
||||||
} else if (response.code == 400) {
|
} else if (response.code === 400) {
|
||||||
this.pauseGetPickFlag = false
|
pauseGetPickFlag.value = false
|
||||||
warningBox(response.message)
|
warningBox(response.message)
|
||||||
} else {
|
} else {
|
||||||
// 错误,弹框
|
// 错误,弹框
|
||||||
|
|
@ -315,18 +337,31 @@ export default {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
errorBox('请求错误,请检查完原因后刷新界面。')
|
errorBox('请求错误,请检查完原因后刷新界面。')
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
// 当拣选数量修改时,要对应的修改
|
// 当拣选数量修改时,要对应的修改
|
||||||
changePlanQty() {
|
const changePlanQty = () => {
|
||||||
if (this.confirmEntity.isOut == 0 && this.confirmEntity.realPickQty != this.confirmEntity.planPickQty) {
|
if (confirmEntity.isOut === 0 && confirmEntity.realPickQty !== confirmEntity.planPickQty) {
|
||||||
// 修正量
|
|
||||||
const changeQty = this.confirmEntity.realPickQty - this.confirmEntity.planPickQty
|
|
||||||
// 修正实际剩余数量
|
// 修正实际剩余数量
|
||||||
this.confirmEntity.realRemainQty = this.confirmEntity.planRemainQty - changeQty
|
confirmEntity.realRemainQty = confirmEntity.planRemainQty - confirmEntity.realPickQty + confirmEntity.planPickQty
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 清楚confirmEntity
|
||||||
|
const clearConfirmEntity = () => {
|
||||||
|
confirmEntity.taskId = ''
|
||||||
|
confirmEntity.outType = null
|
||||||
|
confirmEntity.goodsId = ''
|
||||||
|
confirmEntity.totalNeed = null
|
||||||
|
confirmEntity.remainNeed = null
|
||||||
|
confirmEntity.planPickQty = null
|
||||||
|
confirmEntity.realPickQty = null
|
||||||
|
confirmEntity.stockId = ''
|
||||||
|
confirmEntity.vehicleId = ''
|
||||||
|
confirmEntity.planRemainQty = null
|
||||||
|
confirmEntity.realRemainQty = null
|
||||||
|
confirmEntity.isOut = null
|
||||||
|
confirmEntity.putArea = ''
|
||||||
|
confirmEntity.warningQty = null
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
<el-input v-model="confirmEntity.stockNum" disabled/>
|
<el-input v-model="confirmEntity.stockNum" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="确认数量" prop="confirmNum">
|
<el-form-item label="确认数量" prop="confirmNum">
|
||||||
<el-input-number v-model.number="confirmEntity.confirmNum"
|
<el-input-number style="width: 196px" v-model.number="confirmEntity.confirmNum"
|
||||||
controls-position="right" :min="0" clearable/>
|
controls-position="right" :min="0" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
<el-input v-model="confirmEntity.planPickQty" disabled/>
|
<el-input v-model="confirmEntity.planPickQty" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实际拣选数量" prop="realPickQty">
|
<el-form-item label="实际拣选数量" prop="realPickQty">
|
||||||
<el-input-number v-model.number="confirmEntity.realPickQty"
|
<el-input-number style="width: 196px" v-model.number="confirmEntity.realPickQty"
|
||||||
controls-position="right" :min="0" clearable @change="changePlanQty()"/>
|
controls-position="right" :min="0" clearable @change="changePlanQty()"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -111,11 +111,11 @@
|
||||||
<el-form-item label="存放区域" prop="putArea">
|
<el-form-item label="存放区域" prop="putArea">
|
||||||
<el-input v-model="confirmEntity.putArea" disabled/>
|
<el-input v-model="confirmEntity.putArea" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划剩余数量" prop="planRemainQty" v-if="confirmEntity.isOut != 1">
|
<el-form-item label="计划剩余数量" prop="planRemainQty" v-if="confirmEntity.isOut !== 1">
|
||||||
<el-input v-model="confirmEntity.planRemainQty" disabled/>
|
<el-input v-model="confirmEntity.planRemainQty" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实际剩余数量" prop="realRemainQty" v-if="confirmEntity.isOut != 1">
|
<el-form-item label="实际剩余数量" prop="realRemainQty" v-if="confirmEntity.isOut !== 1">
|
||||||
<el-input-number v-model.number="confirmEntity.realRemainQty"
|
<el-input-number style="width: 196px" v-model.number="confirmEntity.realRemainQty"
|
||||||
controls-position="right" :min="0" clearable/>
|
controls-position="right" :min="0" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -319,7 +319,7 @@ onBeforeUnmount(() => {
|
||||||
})
|
})
|
||||||
// 监视路由
|
// 监视路由
|
||||||
watch(() => route.path, (newVal, oldVal) => {
|
watch(() => route.path, (newVal, oldVal) => {
|
||||||
if (newVal == '/kitting') {
|
if (newVal === '/kitting') {
|
||||||
timer.value = setInterval(() => {
|
timer.value = setInterval(() => {
|
||||||
timerTask_1()
|
timerTask_1()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
@ -331,7 +331,7 @@ watch(() => route.path, (newVal, oldVal) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
watch(() => workFormEntity.workOrder, (newVal, oldVal) => {
|
watch(() => workFormEntity.workOrder, (newVal, oldVal) => {
|
||||||
if (newVal == '') {
|
if (newVal === '') {
|
||||||
workFormEntity.productIdOrigin = ''
|
workFormEntity.productIdOrigin = ''
|
||||||
workFormEntity.productId = ''
|
workFormEntity.productId = ''
|
||||||
workFormEntity.singleProductId = ''
|
workFormEntity.singleProductId = ''
|
||||||
|
|
@ -340,20 +340,20 @@ watch(() => workFormEntity.workOrder, (newVal, oldVal) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
watch(() => workFormEntity.productId, (newVal, oldVal) => {
|
watch(() => workFormEntity.productId, (newVal, oldVal) => {
|
||||||
if (newVal != oldVal) {
|
if (newVal !== oldVal) {
|
||||||
workFormEntity.singleProductId = ''
|
workFormEntity.singleProductId = ''
|
||||||
workFormEntity.boxNo = ''
|
workFormEntity.boxNo = ''
|
||||||
workFormEntity.goodsId = ''
|
workFormEntity.goodsId = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
watch(() => workFormEntity.singleProductId, (newVal, oldVal) => {
|
watch(() => workFormEntity.singleProductId, (newVal, oldVal) => {
|
||||||
if (newVal != oldVal) {
|
if (newVal !== oldVal) {
|
||||||
workFormEntity.boxNo = ''
|
workFormEntity.boxNo = ''
|
||||||
workFormEntity.goodsId = ''
|
workFormEntity.goodsId = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
watch(() => workFormEntity.boxNo, (newVal, oldVal) => {
|
watch(() => workFormEntity.boxNo, (newVal, oldVal) => {
|
||||||
if (newVal != oldVal) {
|
if (newVal !== oldVal) {
|
||||||
workFormEntity.goodsId = ''
|
workFormEntity.goodsId = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -368,23 +368,23 @@ const timerTask_1 = () => {
|
||||||
}
|
}
|
||||||
// 自定义方法
|
// 自定义方法
|
||||||
const solveEnterKey = (e) => {
|
const solveEnterKey = (e) => {
|
||||||
if (e.key.toLocaleLowerCase() == 'enter') {
|
if (e.key.toLowerCase() === 'enter') {
|
||||||
confirmReleaseBtn.value.$el.click()
|
confirmReleaseBtn.value.$el.click()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 初始化工单options
|
// 初始化工单options
|
||||||
const initWorkOptions = () => {
|
const initWorkOptions = () => {
|
||||||
const request = {
|
const request = {
|
||||||
workOrder: workFormQuery.workOrder != '' ? workFormQuery.workOrder : workFormEntity.workOrder,
|
workOrder: workFormQuery.workOrder !== '' ? workFormQuery.workOrder : workFormEntity.workOrder,
|
||||||
singleProductId: workFormQuery.singleProductId != '' ? workFormQuery.singleProductId : workFormEntity.singleProductId,
|
singleProductId: workFormQuery.singleProductId !== '' ? workFormQuery.singleProductId : workFormEntity.singleProductId,
|
||||||
boxNo: workFormQuery.boxNo != '' ? workFormQuery.boxNo : workFormEntity.boxNo,
|
boxNo: workFormQuery.boxNo !== '' ? workFormQuery.boxNo : workFormEntity.boxNo,
|
||||||
goodsId: workFormQuery.goodsId != '' ? workFormQuery.goodsId : workFormEntity.goodsId,
|
goodsId: workFormQuery.goodsId !== '' ? workFormQuery.goodsId : workFormEntity.goodsId,
|
||||||
planStartDate: dateFormatter(workFormEntity.planStartDate)
|
planStartDate: dateFormatter(workFormEntity.planStartDate)
|
||||||
}
|
}
|
||||||
optionLoading.value = true
|
optionLoading.value = true
|
||||||
queryKateWorks(request).then(res => {
|
queryKateWorks(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
workOptions.workOrder = response.data.workOrder
|
workOptions.workOrder = response.data.workOrder
|
||||||
// 设置成品号
|
// 设置成品号
|
||||||
workFormEntity.productIdOrigin = response.data.productIdOrigin
|
workFormEntity.productIdOrigin = response.data.productIdOrigin
|
||||||
|
|
@ -434,7 +434,7 @@ const confirmStart = () => {
|
||||||
loading.open()
|
loading.open()
|
||||||
initWorks(request).then(res => {
|
initWorks(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
ElMessage.success(response.message)
|
ElMessage.success(response.message)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
showBoxSummary()
|
showBoxSummary()
|
||||||
|
|
@ -463,7 +463,7 @@ const showBoxSummary = () => {
|
||||||
}
|
}
|
||||||
getBoxesAndLacks(request).then(res => {
|
getBoxesAndLacks(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
const boxDetailVo = response.data
|
const boxDetailVo = response.data
|
||||||
// 获得打印标签数据
|
// 获得打印标签数据
|
||||||
getPrintTabs(boxDetailVo.boxSummary)
|
getPrintTabs(boxDetailVo.boxSummary)
|
||||||
|
|
@ -496,7 +496,7 @@ const getWork = () => {
|
||||||
}
|
}
|
||||||
getCurrentWorks(request).then(res => {
|
getCurrentWorks(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
// 设置form
|
// 设置form
|
||||||
confirmEntity.workIndex = response.data.orderConfirm.workIndex
|
confirmEntity.workIndex = response.data.orderConfirm.workIndex
|
||||||
confirmEntity.workOrder = response.data.orderConfirm.workOrder
|
confirmEntity.workOrder = response.data.orderConfirm.workOrder
|
||||||
|
|
@ -515,10 +515,10 @@ const getWork = () => {
|
||||||
confirmEntity.warningQty = response.data.stockConfirm.warningQty
|
confirmEntity.warningQty = response.data.stockConfirm.warningQty
|
||||||
pauseGetWorkFlag.value = true
|
pauseGetWorkFlag.value = true
|
||||||
// 如果剩余数量低于预警值,弹框报警
|
// 如果剩余数量低于预警值,弹框报警
|
||||||
if (confirmEntity.isOut == 0 && confirmEntity.planRemainQty <= confirmEntity.warningQty) {
|
if (confirmEntity.isOut === 0 && confirmEntity.planRemainQty <= confirmEntity.warningQty) {
|
||||||
warningBox('剩余数量低于预警值,请清点库存数量。')
|
warningBox('剩余数量低于预警值,请清点库存数量。')
|
||||||
}
|
}
|
||||||
} else if (response.code == 400) {
|
} else if (response.code === 400) {
|
||||||
// 警告,弹框
|
// 警告,弹框
|
||||||
pauseGetWorkFlag.value = true
|
pauseGetWorkFlag.value = true
|
||||||
warningBox(response.message)
|
warningBox(response.message)
|
||||||
|
|
@ -543,17 +543,17 @@ const getWork = () => {
|
||||||
}
|
}
|
||||||
// 是否弹出料盒界面
|
// 是否弹出料盒界面
|
||||||
const ifNeedShowBoxSummary = () => {
|
const ifNeedShowBoxSummary = () => {
|
||||||
if (storeKittingWork.workOrder != '') {
|
if (storeKittingWork.workOrder !== '') {
|
||||||
// 需要弹出上一个料盒的缺料打印信息
|
// 需要弹出上一个料盒的缺料打印信息
|
||||||
if (confirmEntity.workOrder != storeKittingWork.workOrder
|
if (confirmEntity.workOrder !== storeKittingWork.workOrder
|
||||||
|| confirmEntity.productId != storeKittingWork.productId
|
|| confirmEntity.productId !== storeKittingWork.productId
|
||||||
|| confirmEntity.singleProductId != storeKittingWork.singleProductId
|
|| confirmEntity.singleProductId !== storeKittingWork.singleProductId
|
||||||
|| confirmEntity.boxNo != storeKittingWork.boxNo) {
|
|| confirmEntity.boxNo !== storeKittingWork.boxNo) {
|
||||||
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo)
|
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo)
|
||||||
if (confirmEntity.workOrder == '') {
|
if (confirmEntity.workOrder === '') {
|
||||||
// 说明当前工单工作已完成,需要弹框提示工作已完成
|
// 说明当前工单工作已完成,需要弹框提示工作已完成
|
||||||
successBox('当前工单已完成。')
|
successBox('当前工单已完成。')
|
||||||
} else if (confirmEntity.boxNo != storeKittingWork.boxNo) {
|
} else if (confirmEntity.boxNo !== storeKittingWork.boxNo) {
|
||||||
// 前一个料盒已完成,需要弹框提示料盒已完成
|
// 前一个料盒已完成,需要弹框提示料盒已完成
|
||||||
showBoxSummary()
|
showBoxSummary()
|
||||||
}
|
}
|
||||||
|
|
@ -599,11 +599,11 @@ const confirmOrRelease = () => {
|
||||||
}
|
}
|
||||||
confirmCurrentWork(request).then(res => {
|
confirmCurrentWork(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
// 设置form
|
// 设置form
|
||||||
resetConfirmEntity()
|
resetConfirmEntity()
|
||||||
ElMessage.success(response.message)
|
ElMessage.success(response.message)
|
||||||
} else if (response.code == 400) {
|
} else if (response.code === 400) {
|
||||||
// 设置form
|
// 设置form
|
||||||
resetConfirmEntity()
|
resetConfirmEntity()
|
||||||
// 警告
|
// 警告
|
||||||
|
|
@ -633,7 +633,7 @@ const resetConfirmEntity = () => {
|
||||||
}
|
}
|
||||||
// 当拣选数量修改时,要对应的修改
|
// 当拣选数量修改时,要对应的修改
|
||||||
const changePlanQty = () => {
|
const changePlanQty = () => {
|
||||||
if (confirmEntity.isOut == 0 && confirmEntity.realPickQty != confirmEntity.planPickQty) {
|
if (confirmEntity.isOut === 0 && confirmEntity.realPickQty !== confirmEntity.planPickQty) {
|
||||||
// 修正量
|
// 修正量
|
||||||
const changeQty = confirmEntity.realPickQty - confirmEntity.planPickQty
|
const changeQty = confirmEntity.realPickQty - confirmEntity.planPickQty
|
||||||
// 修正实际剩余数量
|
// 修正实际剩余数量
|
||||||
|
|
@ -648,7 +648,7 @@ const requestPrint = () => {
|
||||||
// 获得打印数据
|
// 获得打印数据
|
||||||
const getPrintTabs = (boxSummary) => {
|
const getPrintTabs = (boxSummary) => {
|
||||||
printTabs.value = []
|
printTabs.value = []
|
||||||
if (boxSummary != undefined) {
|
if (boxSummary !== undefined) {
|
||||||
for (let i = 1; i <= boxSummary.boxQty; i++) {
|
for (let i = 1; i <= boxSummary.boxQty; i++) {
|
||||||
printTabs.value.push(
|
printTabs.value.push(
|
||||||
{
|
{
|
||||||
|
|
@ -675,7 +675,7 @@ const searchKittingGoods = () => {
|
||||||
request.boxNo = confirmEntity.boxNo
|
request.boxNo = confirmEntity.boxNo
|
||||||
queryWorkingGoodsByPage(request).then(res => {
|
queryWorkingGoodsByPage(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
const data = response.data
|
const data = response.data
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
currentBoxGoodsList.value = data.lists
|
currentBoxGoodsList.value = data.lists
|
||||||
|
|
@ -695,7 +695,7 @@ const handleSortChange = (data) => {
|
||||||
if (baseTableQuery.sortBy.has(data.prop)) {
|
if (baseTableQuery.sortBy.has(data.prop)) {
|
||||||
baseTableQuery.sortBy.delete(data.prop)
|
baseTableQuery.sortBy.delete(data.prop)
|
||||||
}
|
}
|
||||||
baseTableQuery.sortBy.set(data.prop, data.order == 'ascending')
|
baseTableQuery.sortBy.set(data.prop, data.order.toLowerCase() === 'ascending')
|
||||||
searchKittingGoods()
|
searchKittingGoods()
|
||||||
}
|
}
|
||||||
// 打印上一个料盒的缺料信息
|
// 打印上一个料盒的缺料信息
|
||||||
|
|
@ -710,7 +710,7 @@ const printLacks = (workOrder, productId, singleProductId, boxNo) => {
|
||||||
}
|
}
|
||||||
getLackGoods(request).then(res => {
|
getLackGoods(request).then(res => {
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code === 0) {
|
||||||
lackGoodsForPrint.value = response.data
|
lackGoodsForPrint.value = response.data
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
printLackGoodsBtn.value.click()
|
printLackGoodsBtn.value.click()
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="任务类型">
|
<el-form-item label="任务类型">
|
||||||
<el-select-v2 v-model="rowEditFormEntity.taskType" placeholder="请选择任务类型"
|
<el-select-v2 style="width: 196px" v-model="rowEditFormEntity.taskType" placeholder="请选择任务类型"
|
||||||
:options="taskTypeOptions" disabled></el-select-v2>
|
:options="taskTypeOptions" disabled></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -120,7 +120,7 @@
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="任务状态">
|
<el-form-item label="任务状态">
|
||||||
<el-select-v2 v-model="rowEditFormEntity.taskStatus" placeholder="请选择任务状态"
|
<el-select-v2 style="width: 196px" v-model="rowEditFormEntity.taskStatus" placeholder="请选择任务状态"
|
||||||
:options="wmsTaskStatusOptions"></el-select-v2>
|
:options="wmsTaskStatusOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,14 @@ public class GoodsController {
|
||||||
public WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(@RequestBody GoodsQuery goodsQuery) {
|
public WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(@RequestBody GoodsQuery goodsQuery) {
|
||||||
return goodsControllerService.getGoodsInfoByPage(goodsQuery);
|
return goodsControllerService.getGoodsInfoByPage(goodsQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据物料id查询物料信息
|
||||||
|
* @param goodsId 查询参数
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/getGoodsInfoByGoodsId")
|
||||||
|
public WmsApiResponse<GoodsVo> getGoodsInfoByGoodsId(@RequestParam("goodsId") String goodsId) {
|
||||||
|
return goodsControllerService.getGoodsInfoByGoodsId(goodsId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,12 @@ public interface IGoodsControllerService {
|
||||||
* @param goodsQuery 查询参数
|
* @param goodsQuery 查询参数
|
||||||
* @return 查询结果
|
* @return 查询结果
|
||||||
*/
|
*/
|
||||||
WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(@RequestBody GoodsQuery goodsQuery);
|
WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(GoodsQuery goodsQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据物料id获取物料信息
|
||||||
|
* @param goodsId 物料id
|
||||||
|
* @return 物料信息
|
||||||
|
*/
|
||||||
|
WmsApiResponse<GoodsVo> getGoodsInfoByGoodsId(String goodsId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,4 +41,21 @@ public class GoodsControllerServiceImpl implements IGoodsControllerService {
|
||||||
PageVo<GoodsVo> pageVo = PageVo.of(goodsPage, GoodsVo::of);
|
PageVo<GoodsVo> pageVo = PageVo.of(goodsPage, GoodsVo::of);
|
||||||
return WmsApiResponse.success("查询成功", pageVo);
|
return WmsApiResponse.success("查询成功", pageVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据物料id查询物料信息
|
||||||
|
* @param goodsId 物料id
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmsApiResponse<GoodsVo> getGoodsInfoByGoodsId(String goodsId) {
|
||||||
|
if (StringUtils.isEmpty(goodsId)) {
|
||||||
|
return WmsApiResponse.error("请求参数不能为空。", null);
|
||||||
|
}
|
||||||
|
TAppGoods targetGoods = goodsService.getById(goodsId);
|
||||||
|
if (targetGoods == null) {
|
||||||
|
return WmsApiResponse.error("查询结果为空。", null);
|
||||||
|
}
|
||||||
|
return WmsApiResponse.success("查询成功。", GoodsVo.of(targetGoods));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,6 @@ public class LoginControllerServiceImpl implements ILoginControllerService {
|
||||||
}
|
}
|
||||||
List<MenuVo> menuVoList = new LinkedList<>();
|
List<MenuVo> menuVoList = new LinkedList<>();
|
||||||
// 查找一级菜单
|
// 查找一级菜单
|
||||||
// TODO 这里可以用递归优化,减少代码量
|
|
||||||
for (TSysMenu firstMenu : menuPoList) {
|
for (TSysMenu firstMenu : menuPoList) {
|
||||||
if (AppConstant.ROOT_MENU_ID.equals(firstMenu.getParentId())) {// 查找到所有的一级子菜单
|
if (AppConstant.ROOT_MENU_ID.equals(firstMenu.getParentId())) {// 查找到所有的一级子菜单
|
||||||
MenuVo tempFirstMenu = new MenuVo();
|
MenuVo tempFirstMenu = new MenuVo();
|
||||||
|
|
|
||||||
|
|
@ -182,18 +182,15 @@ public class TaskOperationControllerServiceImpl implements ITaskOperationControl
|
||||||
* @param wmsTaskRequest 请求信息
|
* @param wmsTaskRequest 请求信息
|
||||||
*/
|
*/
|
||||||
private void updateDetailInfoExceptStatus(TAppTask targetTask, WmsTaskRequest wmsTaskRequest) {
|
private void updateDetailInfoExceptStatus(TAppTask targetTask, WmsTaskRequest wmsTaskRequest) {
|
||||||
targetTask.setTaskType(wmsTaskRequest.getTaskType());
|
|
||||||
targetTask.setTaskPriority(wmsTaskRequest.getTaskPriority());
|
targetTask.setTaskPriority(wmsTaskRequest.getTaskPriority());
|
||||||
targetTask.setVehicleId(wmsTaskRequest.getVehicleId());
|
|
||||||
targetTask.setOrigin(wmsTaskRequest.getOrigin());
|
targetTask.setOrigin(wmsTaskRequest.getOrigin());
|
||||||
targetTask.setDestination(wmsTaskRequest.getDestination());
|
targetTask.setDestination(wmsTaskRequest.getDestination());
|
||||||
targetTask.setWcsTaskId(wmsTaskRequest.getWcsTaskId());
|
targetTask.setWcsTaskId(wmsTaskRequest.getWcsTaskId());
|
||||||
targetTask.setGoodsId(wmsTaskRequest.getGoodsId());
|
targetTask.setGoodsId(wmsTaskRequest.getGoodsId());
|
||||||
targetTask.setOpNum(wmsTaskRequest.getOpNum());
|
targetTask.setOpNum(wmsTaskRequest.getOpNum());
|
||||||
targetTask.setStockNum(wmsTaskRequest.getStockNum());
|
targetTask.setStockNum(wmsTaskRequest.getStockNum());
|
||||||
targetTask.setOpUser(wmsTaskRequest.getOpUser());
|
targetTask.setOpUser(wmsTaskRequest.getUserName());
|
||||||
targetTask.setRemark(wmsTaskRequest.getRemark());
|
targetTask.setRemark(wmsTaskRequest.getRemark());
|
||||||
targetTask.setCallStand(wmsTaskRequest.getCallStand());
|
|
||||||
targetTask.setGoodsDesc(wmsTaskRequest.getGoodsDesc());
|
targetTask.setGoodsDesc(wmsTaskRequest.getGoodsDesc());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user