diff --git a/src/api/stock.js b/src/api/stock.js index 6812ea4..9c30c57 100644 --- a/src/api/stock.js +++ b/src/api/stock.js @@ -24,8 +24,17 @@ const getStockNumByGoodsId = (params) => { }) } +const getStockUpdateRecord = (params) => { + return request({ + url: '/stock/getStockUpdateRecord', + method: 'post', + data: params + }) +} + export { getAllStocks, updateStockInfo, - getStockNumByGoodsId + getStockNumByGoodsId, + getStockUpdateRecord } \ No newline at end of file diff --git a/src/layout/clcNoPlan.vue b/src/layout/clcNoPlan.vue index 5c25108..796f39f 100644 --- a/src/layout/clcNoPlan.vue +++ b/src/layout/clcNoPlan.vue @@ -197,7 +197,7 @@ import store from '@/store' import { clcNoPlan, clcNoPlanConfirmBack } from '@/api/task' import { replaceEnglishAndNumberIGAI } from '@/utils/formatter' -import { errorBox } from '@/utils/myMessageBox.js' +import { errorBox, successBox } from '@/utils/myMessageBox.js' import { getStockNumByGoodsId } from '@/api/stock' import { reactive, ref } from 'vue' import { ElMessage } from 'element-plus' @@ -313,7 +313,7 @@ export default { clcNoPlan(requestParams).then(res => { const response = res.data if (response.code == 0) { - ElMessage.success(response.message) + successBox(response.message) this.resetForms() } else { errorBox(response.message) diff --git a/src/layout/goodsIn.vue b/src/layout/goodsIn.vue index 802f8c0..5f5d3aa 100644 --- a/src/layout/goodsIn.vue +++ b/src/layout/goodsIn.vue @@ -49,8 +49,8 @@
-
@@ -121,7 +121,7 @@ export default { workFormEntity: reactive({ vehicleId: '', goodsId: '', - goodsNum: null + goodsNum: '' }), rules: reactive({ vehicleId: [ @@ -144,12 +144,28 @@ export default { this.workFormEntity = reactive({ vehicleId: '', goodsId: '', - goodsNum: null + goodsNum: '' }) }, addTempTask() { - this.workFormEntity.vehicleId = replaceEnglishAndNumberIGAI(this.workFormEntity.vehicleId) - if (this.workFormEntity.vehicleId != '' && this.workFormEntity.goodsId != '' && this.workFormEntity.goodsNum != null && this.workFormEntity.goodsNum > 0) { + if (this.workFormEntity.vehicleId != '') { + const vehicleIdString = replaceEnglishAndNumberIGAI(this.workFormEntity.vehicleId) + if (!vehicleIdString.startsWith('ASRS') || vehicleIdString.length != 9) { + errorBox('料箱格式不正确') + return + } else { + this.workFormEntity.vehicleId = vehicleIdString + } + } + if (this.workFormEntity.goodsNum != ''){ + if (isNaN(Number.parseInt(this.workFormEntity.goodsNum))) { + errorBox('数量格式不正确') + return + } else { + this.workFormEntity.goodsNum = Number.parseInt(this.workFormEntity.goodsNum) + } + } + if (this.workFormEntity.vehicleId != '' && this.workFormEntity.goodsId != '' && this.workFormEntity.goodsNum != '' && this.workFormEntity.goodsNum > 0) { if (this.workFormEntity.vehicleId == this.workFormEntity.goodsId) { errorBox('料箱号与料号不能相同') return @@ -189,12 +205,12 @@ export default { } this.currentVehicleId = this.workFormEntity.vehicleId this.workFormEntity.goodsId = '' - this.workFormEntity.goodsNum = null + this.workFormEntity.goodsNum = '' this.$refs.goodsId.focus() return }).catch(() => { ElMessage.info('操作取消') - this.workFormEntity.goodsNum = null + this.workFormEntity.goodsNum = '' this.$refs.goodsNum.focus() return }) @@ -212,7 +228,7 @@ export default { } this.currentVehicleId = this.workFormEntity.vehicleId this.workFormEntity.goodsId = '' - this.workFormEntity.goodsNum = null + this.workFormEntity.goodsNum = '' this.$refs.goodsId.focus() return } @@ -225,7 +241,7 @@ export default { this.$refs.goodsId.focus() return } - if (this.workFormEntity.goodsNum == null || this.workFormEntity.goodsNum <= 0) { + if (this.workFormEntity.goodsNum == '') { this.$refs.goodsNum.focus() return } diff --git a/src/layout/stockUpdateRecord.vue b/src/layout/stockUpdateRecord.vue new file mode 100644 index 0000000..fc11a78 --- /dev/null +++ b/src/layout/stockUpdateRecord.vue @@ -0,0 +1,162 @@ + + + + + + \ No newline at end of file diff --git a/src/layout/workSummary.vue b/src/layout/workSummary.vue index 8efe902..d3afacd 100644 --- a/src/layout/workSummary.vue +++ b/src/layout/workSummary.vue @@ -59,7 +59,6 @@ import store from '@/store' import { getWorkSummary } from '@/api/kateWork.js' import { errorBox } from '@/utils/myMessageBox.js' -import { ref, reactive } from 'vue' import { dateFormatter, timeFormatter } from '@/utils/formatter.js' import { Search } from '@element-plus/icons-vue' import zhCn from 'element-plus/dist/locale/zh-cn.mjs' diff --git a/src/router/index.js b/src/router/index.js index c6953ce..f39074e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -40,7 +40,8 @@ const routes = [ { path: '/goodsToStation', component: () => import('@/layout/goodsToStation.vue') },// 站台要料 { path: '/clcNoPlan', component: () => import('@/layout/clcNoPlan.vue') },// 非计划领料 { path: '/clcKanban', component: () => import('@/layout/clcKanban.vue') },// 需求看板 - { path: '/goodsInQR', component: () => import('@/layout/goodsInQR.vue') },// 需求看板 + { path: '/goodsInQR', component: () => import('@/layout/goodsInQR.vue') },// 二维码入库 + { path: '/stockUpdateRecord', component: () => import('@/layout/stockUpdateRecord.vue') },// 库存更新记录 ] }, {