增加入库物料信息扫码的格式化。

This commit is contained in:
梁州 2025-05-08 15:58:47 +08:00
parent eae7715ca4
commit ab65f82cf4
11 changed files with 484 additions and 390 deletions

View File

@ -10,3 +10,13 @@ export const getGoodsInfoByPage = (params) => {
data: params
})
}
/**
* 根据物料id查询物料信息
*/
export const getGoodsInfoByGoodsId = (params) => {
return request({
url: '/goods/getGoodsInfoByGoodsId',
method: 'get',
data: params
})
}

View File

@ -135,6 +135,7 @@ import {nextTick, onMounted, reactive, ref} from 'vue'
import {loading} from '@/utils/loading.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import {labelPosition} from '@/constant/form'
import {getGoodsInfoByGoodsId} from "@/api/goods";
const inTypeOptions = [
{
@ -241,6 +242,24 @@ const changeFocus = () => {
if (inTaskEntity.goodsId === '') {
goodsId.value.focus()
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 === '') {
opNum.value.focus()

View File

@ -18,21 +18,23 @@
<el-input v-model="outTaskEntity.vehicleId" ref="vehicleId" clearable/>
</el-form-item>
<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/>
</el-form-item>
<el-form-item label="原因" prop="reason" v-if="outTaskEntity.outType == 9">
<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-row>
<el-row>
<el-button type="primary"
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"
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>
</div>
</el-form>
@ -44,7 +46,7 @@
<el-row>
<el-row style="border-bottom: dashed 1px black;">
<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>
</el-form-item>
<el-form-item label="物料号" prop="goodsId">
@ -60,7 +62,7 @@
<el-input v-model="confirmEntity.planPickQty" disabled/>
</el-form-item>
<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()"/>
</el-form-item>
</el-row>
@ -72,7 +74,7 @@
<el-input v-model="confirmEntity.planRemainQty" disabled/>
</el-form-item>
<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/>
</el-form-item>
</el-row>
@ -80,7 +82,8 @@
<el-row>
<el-button type="success"
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>
</div>
</el-form>
@ -95,29 +98,24 @@ import store from '@/store'
import {requireStockOut, getCurrentTask, confirmCurrentTask} from '@/api/task.js'
import {errorBox, warningBox} from '@/utils/myMessageBox.js'
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 zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
import {useRoute} from "vue-router";
import {labelPosition} from '@/constant/form'
<script>
export default {
name: 'goodsOut',
data() {
return {
standId: store.getters.getStandId,
userName: store.getters.getUserName,
timer: '',
labelPosition: 'top',
outTaskRef: ref(),
outTaskEntity: reactive({
const STAND_ID = store.getters.getStandId
const USER_NAME = store.getters.getUserName
let timer = ref()
let outTaskRef = ref()
let outTaskEntity = reactive({
outType: 9,
goodsId: '',
vehicleId: '',
reason: '',
needNum: null
}),
requestRules: reactive({
})
const requestRules = reactive({
outType: [
{required: true, message: '请选择入库类型'}
],
@ -125,8 +123,8 @@ export default {
{required: true, message: '请输入数量'},
{type: 'number', message: '请输入数字值'}
],
}),
outTypeOptions: [
})
const outTypeOptions = [
{
label: '空箱出库',
value: 1
@ -135,8 +133,8 @@ export default {
label: '紧急出库',
value: 9
}
],
resonOptions: [
]
const reasonOptions = [
{
label: '补料',
value: '补料'
@ -153,68 +151,139 @@ export default {
label: '返工工单',
value: '返工工单'
}
],
confirmRef: ref(),
confirmEntity: reactive({}),
confirmRules: reactive({}),
pauseGetPickFlag: false,
}
},
mounted() {
this.$nextTick(() => {
this.timer = setInterval(() => {
this.getTask()
]
let confirmRef = ref()
let confirmEntity = reactive({
taskId: '',
outType: null,
goodsId: '',
totalNeed: null,
remainNeed: null,
planPickQty: null,
realPickQty: null,
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)
})
},
beforeUnmount() {
clearInterval(this.timer)
},
methods: {
//
clearInput() {
this.outTaskEntity = reactive({
outType: 9,
goodsId: '',
vehicleId: '',
needNum: null
})
},
onBeforeUnmount(() => {
clearInterval(timer.value)
})
//
watch(() => route.path, (newVal, oldVal) => {
if (newVal === '/goodsOut') {
timer.value = setInterval(() => {
timerTask_1()
}, 1000)
} else {
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('请求错误,请检查完原因后刷新界面。')
})
}
//
const clearInput = () => {
outTaskEntity.outType = 9
outTaskEntity.goodsId = ''
outTaskEntity.vehicleId = ''
outTaskEntity.needNum = null
}
//
confirmOut() {
if (this.outTaskEntity.needNum == null) {
const confirmOut = () => {
if (outTaskEntity.needNum == null) {
errorBox('请输入正确的数量。')
return
}
if (this.outTaskEntity.outType != 1) {
if (this.outTaskEntity.goodsId == '') {
if (outTaskEntity.outType !== 1) {
if (outTaskEntity.goodsId === '') {
errorBox('非空箱出库时,请输入料号。')
return
}
}
if (this.outTaskEntity.outType == 9) {
if (this.outTaskEntity.reason == '') {
if (outTaskEntity.outType === 9) {
if (outTaskEntity.reason === '') {
errorBox('紧急出库请选择原因。')
return
}
}
const request = {
outType: this.outTaskEntity.outType,
goodsId: this.outTaskEntity.goodsId.toUpperCase(),
vehicleId: this.outTaskEntity.vehicleId,
needNum: this.outTaskEntity.needNum,
reason: this.outTaskEntity.reason,
destination: this.standId,
userName: this.userName,
standId: this.standId
outType: outTaskEntity.outType,
goodsId: outTaskEntity.goodsId.toUpperCase().trim(),
vehicleId: outTaskEntity.vehicleId.toUpperCase().trim(),
needNum: outTaskEntity.needNum,
reason: outTaskEntity.reason,
destination: STAND_ID,
userName: USER_NAME,
standId: STAND_ID
}
loading.open('请求中,请稍等...')
requireStockOut(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
//
ElMessage.success(response.message)
this.clearInput()
clearInput()
} else {
errorBox(response.message)
}
@ -224,88 +293,41 @@ export default {
}).finally(() => {
loading.close()
})
},
//
getTask() {
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 confirmOrRelease = () => {
// ---
const request = {
taskConfirm: {
taskId: this.confirmEntity.taskId,
outType: this.confirmEntity.outType,
goodsId: this.confirmEntity.goodsId,
totalNeed: this.confirmEntity.totalNeed,
remainNeed: this.confirmEntity.remainNeed,
planPickQty: this.confirmEntity.planPickQty,
realPickQty: this.confirmEntity.realPickQty,
taskId: confirmEntity.taskId,
outType: confirmEntity.outType,
goodsId: confirmEntity.goodsId,
totalNeed: confirmEntity.totalNeed,
remainNeed: confirmEntity.remainNeed,
planPickQty: confirmEntity.planPickQty,
realPickQty: confirmEntity.realPickQty,
},
stockConfirm: {
stockId: this.confirmEntity.stockId,
vehicleId: this.confirmEntity.vehicleId,
goodsId: this.confirmEntity.goodsId,
planRemainQty: this.confirmEntity.planRemainQty,
realRemainQty: this.confirmEntity.realRemainQty,
isOut: this.confirmEntity.isOut,
putArea: this.confirmEntity.putArea,
stockId: confirmEntity.stockId,
vehicleId: confirmEntity.vehicleId,
goodsId: confirmEntity.goodsId,
planRemainQty: confirmEntity.planRemainQty,
realRemainQty: confirmEntity.realRemainQty,
isOut: confirmEntity.isOut,
putArea: confirmEntity.putArea,
},
standId: this.standId,
userName: this.userName
standId: STAND_ID,
userName: USER_NAME
}
confirmCurrentTask(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
// form
this.confirmEntity = reactive({})
this.pauseGetPickFlag = false
clearConfirmEntity()
pauseGetPickFlag.value = false
ElMessage.success(response.message)
} else if (response.code == 400) {
this.pauseGetPickFlag = false
} else if (response.code === 400) {
pauseGetPickFlag.value = false
warningBox(response.message)
} else {
//
@ -315,17 +337,30 @@ export default {
console.log(err)
errorBox('请求错误,请检查完原因后刷新界面。')
})
},
}
//
changePlanQty() {
if (this.confirmEntity.isOut == 0 && this.confirmEntity.realPickQty != this.confirmEntity.planPickQty) {
//
const changeQty = this.confirmEntity.realPickQty - this.confirmEntity.planPickQty
const changePlanQty = () => {
if (confirmEntity.isOut === 0 && confirmEntity.realPickQty !== 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>

View File

@ -46,7 +46,7 @@
<el-input v-model="confirmEntity.stockNum" disabled/>
</el-form-item>
<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/>
</el-form-item>
</el-row>

View File

@ -100,7 +100,7 @@
<el-input v-model="confirmEntity.planPickQty" disabled/>
</el-form-item>
<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()"/>
</el-form-item>
</el-row>
@ -111,11 +111,11 @@
<el-form-item label="存放区域" prop="putArea">
<el-input v-model="confirmEntity.putArea" disabled/>
</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-form-item>
<el-form-item label="实际剩余数量" prop="realRemainQty" v-if="confirmEntity.isOut != 1">
<el-input-number v-model.number="confirmEntity.realRemainQty"
<el-form-item label="实际剩余数量" prop="realRemainQty" v-if="confirmEntity.isOut !== 1">
<el-input-number style="width: 196px" v-model.number="confirmEntity.realRemainQty"
controls-position="right" :min="0" clearable/>
</el-form-item>
</el-row>
@ -319,7 +319,7 @@ onBeforeUnmount(() => {
})
//
watch(() => route.path, (newVal, oldVal) => {
if (newVal == '/kitting') {
if (newVal === '/kitting') {
timer.value = setInterval(() => {
timerTask_1()
}, 1000)
@ -331,7 +331,7 @@ watch(() => route.path, (newVal, oldVal) => {
}
})
watch(() => workFormEntity.workOrder, (newVal, oldVal) => {
if (newVal == '') {
if (newVal === '') {
workFormEntity.productIdOrigin = ''
workFormEntity.productId = ''
workFormEntity.singleProductId = ''
@ -340,20 +340,20 @@ watch(() => workFormEntity.workOrder, (newVal, oldVal) => {
}
})
watch(() => workFormEntity.productId, (newVal, oldVal) => {
if (newVal != oldVal) {
if (newVal !== oldVal) {
workFormEntity.singleProductId = ''
workFormEntity.boxNo = ''
workFormEntity.goodsId = ''
}
})
watch(() => workFormEntity.singleProductId, (newVal, oldVal) => {
if (newVal != oldVal) {
if (newVal !== oldVal) {
workFormEntity.boxNo = ''
workFormEntity.goodsId = ''
}
})
watch(() => workFormEntity.boxNo, (newVal, oldVal) => {
if (newVal != oldVal) {
if (newVal !== oldVal) {
workFormEntity.goodsId = ''
}
})
@ -368,23 +368,23 @@ const timerTask_1 = () => {
}
//
const solveEnterKey = (e) => {
if (e.key.toLocaleLowerCase() == 'enter') {
if (e.key.toLowerCase() === 'enter') {
confirmReleaseBtn.value.$el.click()
}
}
// options
const initWorkOptions = () => {
const request = {
workOrder: workFormQuery.workOrder != '' ? workFormQuery.workOrder : workFormEntity.workOrder,
singleProductId: workFormQuery.singleProductId != '' ? workFormQuery.singleProductId : workFormEntity.singleProductId,
boxNo: workFormQuery.boxNo != '' ? workFormQuery.boxNo : workFormEntity.boxNo,
goodsId: workFormQuery.goodsId != '' ? workFormQuery.goodsId : workFormEntity.goodsId,
workOrder: workFormQuery.workOrder !== '' ? workFormQuery.workOrder : workFormEntity.workOrder,
singleProductId: workFormQuery.singleProductId !== '' ? workFormQuery.singleProductId : workFormEntity.singleProductId,
boxNo: workFormQuery.boxNo !== '' ? workFormQuery.boxNo : workFormEntity.boxNo,
goodsId: workFormQuery.goodsId !== '' ? workFormQuery.goodsId : workFormEntity.goodsId,
planStartDate: dateFormatter(workFormEntity.planStartDate)
}
optionLoading.value = true
queryKateWorks(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
workOptions.workOrder = response.data.workOrder
//
workFormEntity.productIdOrigin = response.data.productIdOrigin
@ -434,7 +434,7 @@ const confirmStart = () => {
loading.open()
initWorks(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
ElMessage.success(response.message)
setTimeout(() => {
showBoxSummary()
@ -463,7 +463,7 @@ const showBoxSummary = () => {
}
getBoxesAndLacks(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
const boxDetailVo = response.data
//
getPrintTabs(boxDetailVo.boxSummary)
@ -496,7 +496,7 @@ const getWork = () => {
}
getCurrentWorks(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
// form
confirmEntity.workIndex = response.data.orderConfirm.workIndex
confirmEntity.workOrder = response.data.orderConfirm.workOrder
@ -515,10 +515,10 @@ const getWork = () => {
confirmEntity.warningQty = response.data.stockConfirm.warningQty
pauseGetWorkFlag.value = true
//
if (confirmEntity.isOut == 0 && confirmEntity.planRemainQty <= confirmEntity.warningQty) {
if (confirmEntity.isOut === 0 && confirmEntity.planRemainQty <= confirmEntity.warningQty) {
warningBox('剩余数量低于预警值,请清点库存数量。')
}
} else if (response.code == 400) {
} else if (response.code === 400) {
//
pauseGetWorkFlag.value = true
warningBox(response.message)
@ -543,17 +543,17 @@ const getWork = () => {
}
//
const ifNeedShowBoxSummary = () => {
if (storeKittingWork.workOrder != '') {
if (storeKittingWork.workOrder !== '') {
//
if (confirmEntity.workOrder != storeKittingWork.workOrder
|| confirmEntity.productId != storeKittingWork.productId
|| confirmEntity.singleProductId != storeKittingWork.singleProductId
|| confirmEntity.boxNo != storeKittingWork.boxNo) {
if (confirmEntity.workOrder !== storeKittingWork.workOrder
|| confirmEntity.productId !== storeKittingWork.productId
|| confirmEntity.singleProductId !== storeKittingWork.singleProductId
|| confirmEntity.boxNo !== storeKittingWork.boxNo) {
printLacks(storeKittingWork.workOrder, storeKittingWork.productId, storeKittingWork.singleProductId, storeKittingWork.boxNo)
if (confirmEntity.workOrder == '') {
if (confirmEntity.workOrder === '') {
//
successBox('当前工单已完成。')
} else if (confirmEntity.boxNo != storeKittingWork.boxNo) {
} else if (confirmEntity.boxNo !== storeKittingWork.boxNo) {
//
showBoxSummary()
}
@ -599,11 +599,11 @@ const confirmOrRelease = () => {
}
confirmCurrentWork(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
// form
resetConfirmEntity()
ElMessage.success(response.message)
} else if (response.code == 400) {
} else if (response.code === 400) {
// form
resetConfirmEntity()
//
@ -633,7 +633,7 @@ const resetConfirmEntity = () => {
}
//
const changePlanQty = () => {
if (confirmEntity.isOut == 0 && confirmEntity.realPickQty != confirmEntity.planPickQty) {
if (confirmEntity.isOut === 0 && confirmEntity.realPickQty !== confirmEntity.planPickQty) {
//
const changeQty = confirmEntity.realPickQty - confirmEntity.planPickQty
//
@ -648,7 +648,7 @@ const requestPrint = () => {
//
const getPrintTabs = (boxSummary) => {
printTabs.value = []
if (boxSummary != undefined) {
if (boxSummary !== undefined) {
for (let i = 1; i <= boxSummary.boxQty; i++) {
printTabs.value.push(
{
@ -675,7 +675,7 @@ const searchKittingGoods = () => {
request.boxNo = confirmEntity.boxNo
queryWorkingGoodsByPage(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
const data = response.data
if (data != null) {
currentBoxGoodsList.value = data.lists
@ -695,7 +695,7 @@ const handleSortChange = (data) => {
if (baseTableQuery.sortBy.has(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()
}
//
@ -710,7 +710,7 @@ const printLacks = (workOrder, productId, singleProductId, boxNo) => {
}
getLackGoods(request).then(res => {
const response = res.data
if (response.code == 0) {
if (response.code === 0) {
lackGoodsForPrint.value = response.data
nextTick(() => {
printLackGoodsBtn.value.click()

View File

@ -112,7 +112,7 @@
</el-col>
<el-col :span="12">
<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>
</el-form-item>
</el-col>
@ -120,7 +120,7 @@
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<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>
</el-form-item>
</el-col>

View File

@ -28,4 +28,14 @@ public class GoodsController {
public WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(@RequestBody GoodsQuery goodsQuery) {
return goodsControllerService.getGoodsInfoByPage(goodsQuery);
}
/**
* 根据物料id查询物料信息
* @param goodsId 查询参数
* @return 查询结果
*/
@GetMapping("/getGoodsInfoByGoodsId")
public WmsApiResponse<GoodsVo> getGoodsInfoByGoodsId(@RequestParam("goodsId") String goodsId) {
return goodsControllerService.getGoodsInfoByGoodsId(goodsId);
}
}

View File

@ -15,5 +15,12 @@ public interface IGoodsControllerService {
* @param goodsQuery 查询参数
* @return 查询结果
*/
WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(@RequestBody GoodsQuery goodsQuery);
WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(GoodsQuery goodsQuery);
/**
* 根据物料id获取物料信息
* @param goodsId 物料id
* @return 物料信息
*/
WmsApiResponse<GoodsVo> getGoodsInfoByGoodsId(String goodsId);
}

View File

@ -41,4 +41,21 @@ public class GoodsControllerServiceImpl implements IGoodsControllerService {
PageVo<GoodsVo> pageVo = PageVo.of(goodsPage, GoodsVo::of);
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));
}
}

View File

@ -110,7 +110,6 @@ public class LoginControllerServiceImpl implements ILoginControllerService {
}
List<MenuVo> menuVoList = new LinkedList<>();
// 查找一级菜单
// TODO 这里可以用递归优化减少代码量
for (TSysMenu firstMenu : menuPoList) {
if (AppConstant.ROOT_MENU_ID.equals(firstMenu.getParentId())) {// 查找到所有的一级子菜单
MenuVo tempFirstMenu = new MenuVo();

View File

@ -182,18 +182,15 @@ public class TaskOperationControllerServiceImpl implements ITaskOperationControl
* @param wmsTaskRequest 请求信息
*/
private void updateDetailInfoExceptStatus(TAppTask targetTask, WmsTaskRequest wmsTaskRequest) {
targetTask.setTaskType(wmsTaskRequest.getTaskType());
targetTask.setTaskPriority(wmsTaskRequest.getTaskPriority());
targetTask.setVehicleId(wmsTaskRequest.getVehicleId());
targetTask.setOrigin(wmsTaskRequest.getOrigin());
targetTask.setDestination(wmsTaskRequest.getDestination());
targetTask.setWcsTaskId(wmsTaskRequest.getWcsTaskId());
targetTask.setGoodsId(wmsTaskRequest.getGoodsId());
targetTask.setOpNum(wmsTaskRequest.getOpNum());
targetTask.setStockNum(wmsTaskRequest.getStockNum());
targetTask.setOpUser(wmsTaskRequest.getOpUser());
targetTask.setOpUser(wmsTaskRequest.getUserName());
targetTask.setRemark(wmsTaskRequest.getRemark());
targetTask.setCallStand(wmsTaskRequest.getCallStand());
targetTask.setGoodsDesc(wmsTaskRequest.getGoodsDesc());
}
}