Browse Source

修改栈板分类bug

dev
常熟吴彦祖 2 weeks ago
parent
commit
3a285f47dd
  1. 5
      src/api/handlingunit/handlingunit.js
  2. 8
      src/api/inventory/label.js
  3. 4
      src/api/po/po.js
  4. 22
      src/views/modules/handling-unit/merging-hu.vue
  5. 31
      src/views/modules/handling-unit/packing-hu.vue
  6. 24
      src/views/modules/handling-unit/splitting-hu.vue
  7. 6
      src/views/modules/inventory/wms-cancel-reserve.vue

5
src/api/handlingunit/handlingunit.js

@ -6,6 +6,9 @@ export const getHandlingUnitList = data => createAPI(`handlingunit/getHandlingUn
// 查询处理单元详情 // 查询处理单元详情
export const getHandlingUnitDetail = data => createAPI(`handlingunit/getHandlingUnitDetail`,'post',data) export const getHandlingUnitDetail = data => createAPI(`handlingunit/getHandlingUnitDetail`,'post',data)
// HU操作扫码追加在盘校验;普通详情查询及标签拆分保留旧接口,不改变查询参数 - rqrq
export const scanHandlingUnitLabel = data => createAPI(`handlingunit/scanHandlingUnitLabel`, 'post', data)
// 装Handling Unit(托盘/箱) // 装Handling Unit(托盘/箱)
export const packHandlingUnit = data => createAPI(`handlingunit/packHandlingUnit`,'post',data) export const packHandlingUnit = data => createAPI(`handlingunit/packHandlingUnit`,'post',data)
@ -48,4 +51,4 @@ export const mergeHandlingUnits = data => createAPI(`handlingunit/mergeHandlingU
export const splitHandlingUnit = data => createAPI(`handlingunit/splitHandlingUnit`,'post',data) export const splitHandlingUnit = data => createAPI(`handlingunit/splitHandlingUnit`,'post',data)
// 查询物料信息 // 查询物料信息
export const getMaterialInfo = data => createAPI(`handlingunit/getMaterialInfo`,'post',data)
export const getMaterialInfo = data => createAPI(`handlingunit/getMaterialInfo`,'post',data)

8
src/api/inventory/label.js

@ -2,6 +2,12 @@ import { createAPI } from "@/utils/httpRequest.js";
export const queryLabelInfo = data => createAPI(`/pda/label/query`,'post',data) export const queryLabelInfo = data => createAPI(`/pda/label/query`,'post',data)
// 取消预留扫码独立校验在盘状态,不修改标签查询/拆分使用的queryLabelInfo - rqrq
export const queryLabelForCancelReserve = data => createAPI(`/handlingunit/scanLabelForCancelReserve`, 'post', {
site: data.site,
unitId: data.labelCode
})
// 取消WMS预留 - rqrq // 取消WMS预留 - rqrq
export const cancelReserve = data => createAPI(`/pda/label/cancelReserve`,'post',data) export const cancelReserve = data => createAPI(`/pda/label/cancelReserve`,'post',data)
@ -14,4 +20,4 @@ export const splitLabel = data => createAPI(`/pda/label/split`,'post',data)
export const queryLabelCalibration = data => createAPI(`/pda/labelCalibration/query`, 'post', data) export const queryLabelCalibration = data => createAPI(`/pda/labelCalibration/query`, 'post', data)
// 执行标签校准纠正 - rqrq // 执行标签校准纠正 - rqrq
export const calibrateLabel = data => createAPI(`/pda/labelCalibration/calibrate`, 'post', data)
export const calibrateLabel = data => createAPI(`/pda/labelCalibration/calibrate`, 'post', data)

4
src/api/po/po.js

@ -16,8 +16,8 @@ export const getQualifiedInspectionList = data => createAPI(`inspection/getQuali
// 获取检验不合格待处理单据列表 // 获取检验不合格待处理单据列表
export const getUnqualifiedInspectionList = data => createAPI(`inspection/getUnqualifiedInspectionList`,'post',data) export const getUnqualifiedInspectionList = data => createAPI(`inspection/getUnqualifiedInspectionList`,'post',data)
// 扫描条码获取HandlingUnit信息
export const scanHandlingUnitLabel = data => createAPI(`handlingunit/getHandlingUnitDetail`,'post',data)
// 操作扫码增加公共在盘校验,原参数和data结构不变;其他入库/不合格处理等共用 - rqrq
export const scanHandlingUnitLabel = data => createAPI(`handlingunit/scanHandlingUnitLabel`,'post',data)
export const scanHandlingUnitLabelForYiKu = data => createAPI(`handlingunit/scanHandlingUnitLabelForYiKu`,'post',data) export const scanHandlingUnitLabelForYiKu = data => createAPI(`handlingunit/scanHandlingUnitLabelForYiKu`,'post',data)
export const scanHandlingUnitLabelForOther = data => createAPI(`handlingunit/scanHandlingUnitLabelForOther`,'post',data) export const scanHandlingUnitLabelForOther = data => createAPI(`handlingunit/scanHandlingUnitLabelForOther`,'post',data)

22
src/views/modules/handling-unit/merging-hu.vue

@ -235,7 +235,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { import {
getHandlingUnitDetail,
scanHandlingUnitLabel,
createNewHu, createNewHu,
mergeHandlingUnits mergeHandlingUnits
} from '@/api/handlingunit/handlingunit.js' } from '@/api/handlingunit/handlingunit.js'
@ -274,11 +274,18 @@ export default {
this.loading = true this.loading = true
try { try {
const response = await getHandlingUnitDetail({
// 合并源HU扫码检查立库绑定,保留原site及HU状态业务 - rqrq
const response = await scanHandlingUnitLabel({
site: localStorage.getItem('site'), site: localStorage.getItem('site'),
unitId: this.sourceHuCode.trim() unitId: this.sourceHuCode.trim()
}) })
// 在盘校验失败不能作为“HU不存在”处理,也不能添加到待合并列表 - rqrq
if (!response.data || response.data.code !== 0) {
this.$alert((response.data && response.data.msg) || '标签校验失败', '提示')
return
}
if (response.data.data) { if (response.data.data) {
const huInfo = response.data.data const huInfo = response.data.data
@ -334,11 +341,20 @@ export default {
this.loading = true this.loading = true
try { try {
const response = await getHandlingUnitDetail({
// 合并目标HU同样检查绑定,防止将物料合并到立库正在使用的标签 - rqrq
const response = await scanHandlingUnitLabel({
site: localStorage.getItem('site'), site: localStorage.getItem('site'),
unitId: this.targetHuCode.trim() unitId: this.targetHuCode.trim()
}) })
// 失败时不得进入创建目标HU分支,清除旧目标以免继续提交 - rqrq
if (!response.data || response.data.code !== 0) {
this.targetHuInfo = null
this.showCreateTargetDialog = false
this.$alert((response.data && response.data.msg) || '标签校验失败', '提示')
return
}
if (response.data.data) { if (response.data.data) {
this.targetHuInfo = response.data.data this.targetHuInfo = response.data.data

31
src/views/modules/handling-unit/packing-hu.vue

@ -326,7 +326,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { import {
getHandlingUnitDetail,
scanHandlingUnitLabel,
createNewHu, createNewHu,
getHuContents, getHuContents,
completePacking, completePacking,
@ -381,11 +381,20 @@ export default {
this.loading = true this.loading = true
try { try {
// 查询HU是否存在 // 查询HU是否存在
const response = await getHandlingUnitDetail({
// HU装载操作扫码增加立库绑定拦截,普通查看接口不变 - rqrq
const response = await scanHandlingUnitLabel({
site: localStorage.getItem('site'), site: localStorage.getItem('site'),
unitId: this.parentHuCode.trim() unitId: this.parentHuCode.trim()
}) })
// 绑定校验失败不是HU不存在,不允许误入创建分支 - rqrq
if (!response.data || response.data.code !== 0) {
this.parentHuInfo = null
this.showCreateHuDialog = false
this.$alert((response.data && response.data.msg) || '标签校验失败', '提示')
return
}
if (response.data.data) { if (response.data.data) {
// HU已存在 // HU已存在
this.parentHuInfo = response.data.data this.parentHuInfo = response.data.data
@ -417,11 +426,18 @@ export default {
this.loading = true this.loading = true
try { try {
// 首先检查是否是子HU // 首先检查是否是子HU
const huResponse = await getHandlingUnitDetail({
// 新容器装载扫描子HU时复用公共绑定检查,不改物料识别流程 - rqrq
const huResponse = await scanHandlingUnitLabel({
site: localStorage.getItem('site'), site: localStorage.getItem('site'),
unitId: this.newHuScanCode.trim() unitId: this.newHuScanCode.trim()
}) })
// 绑定失败立即结束,禁止把被拦截的标签再当作物料条码添加 - rqrq
if (!huResponse.data || huResponse.data.code !== 0) {
this.$alert((huResponse.data && huResponse.data.msg) || '标签校验失败', '提示')
return
}
if (huResponse.data.data) { if (huResponse.data.data) {
// 是子HU,添加到子HU列表 // 是子HU,添加到子HU列表
await this.addNewHuChild(huResponse.data.data) await this.addNewHuChild(huResponse.data.data)
@ -628,11 +644,18 @@ export default {
this.loading = true this.loading = true
try { try {
// 先检查是否是子HU // 先检查是否是子HU
const huResponse = await getHandlingUnitDetail({
// 已有容器装载也在扫码时检查子HU绑定,避免遗漏第二种装载模式 - rqrq
const huResponse = await scanHandlingUnitLabel({
site: localStorage.getItem('site'), site: localStorage.getItem('site'),
unitId: this.scanCode.trim() unitId: this.scanCode.trim()
}) })
// 失败不进入物料分支,finally仍负责恢复loading - rqrq
if (!huResponse.data || huResponse.data.code !== 0) {
this.$alert((huResponse.data && huResponse.data.msg) || '标签校验失败', '提示')
return
}
if (huResponse.data.data) { if (huResponse.data.data) {
// 是子HU // 是子HU
await this.handleChildHuScan(huResponse.data.data) await this.handleChildHuScan(huResponse.data.data)

24
src/views/modules/handling-unit/splitting-hu.vue

@ -346,7 +346,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { import {
getHandlingUnitDetail,
scanHandlingUnitLabel,
getHuContents, getHuContents,
splitHandlingUnit splitHandlingUnit
} from '@/api/handlingunit/handlingunit.js' } from '@/api/handlingunit/handlingunit.js'
@ -383,11 +383,21 @@ export default {
this.loading = true this.loading = true
try { try {
const response = await getHandlingUnitDetail({
// 此处是HU容器拆装,区别于允许在盘操作且同步数量的标签拆分/pda/label/split - rqrq
const response = await scanHandlingUnitLabel({
site: localStorage.getItem('site'), site: localStorage.getItem('site'),
unitId: this.sourceHuCode.trim() unitId: this.sourceHuCode.trim()
}) })
// 已绑定的源HU不能进入容器拆装,失败清理旧源及明细避免继续提交 - rqrq
if (!response.data || response.data.code !== 0) {
this.sourceHuInfo = null
this.materialContents = []
this.childHuContents = []
this.$alert((response.data && response.data.msg) || '标签校验失败', '提示')
return
}
if (response.data.data) { if (response.data.data) {
this.sourceHuInfo = response.data.data this.sourceHuInfo = response.data.data
@ -540,11 +550,19 @@ export default {
this.loading = true this.loading = true
try { try {
// 检查HU是否已存在 // 检查HU是否已存在
const response = await getHandlingUnitDetail({
// 目标容器扫码保留存在性判断,只追加绑定拦截 - rqrq
const response = await scanHandlingUnitLabel({
site: localStorage.getItem('site'), site: localStorage.getItem('site'),
unitId: this.targetHuCode.trim() unitId: this.targetHuCode.trim()
}) })
// 校验失败不能当成不存在并创建新HU - rqrq
if (!response.data || response.data.code !== 0) {
this.targetHuInfo = null
this.$alert((response.data && response.data.msg) || '标签校验失败', '提示')
return
}
if (response.data.data) { if (response.data.data) {
this.$toast('该HU已存在,请使用其他编码') this.$toast('该HU已存在,请使用其他编码')
this.targetHuCode = '' this.targetHuCode = ''

6
src/views/modules/inventory/wms-cancel-reserve.vue

@ -117,7 +117,8 @@
</template> </template>
<script> <script>
import { queryLabelInfo, cancelReserve } from '@/api/inventory/label'
// 取消预留的扫码使用绑定校验入口,标签拆分页面仍使用原queryLabelInfo - rqrq
import { queryLabelForCancelReserve, cancelReserve } from '@/api/inventory/label'
export default { export default {
name: 'WmsCancelReserve', name: 'WmsCancelReserve',
@ -151,7 +152,8 @@ export default {
this.loading = true; this.loading = true;
queryLabelInfo({
// 保持原请求site/标签号,仅增加扫码阶段在盘拦截 - rqrq
queryLabelForCancelReserve({
site: this.site, site: this.site,
labelCode: this.labelCode.trim() labelCode: this.labelCode.trim()
}).then(({ data }) => { }).then(({ data }) => {

Loading…
Cancel
Save