|
|
@ -205,30 +205,40 @@ export default { |
|
|
|
this.choosePkg(code) // 包装扫码 |
|
|
|
} else { // 扫的码不在包装列表中 |
|
|
|
// 包装项扫码 |
|
|
|
api.checkbarcode(code).then((res) => { |
|
|
|
if (res.code === 200) { |
|
|
|
if (res.data.InfoType === "doing") { // doing 需要手动创建包装单!(多个包装模板) |
|
|
|
this.$confirm(`是否要创建包装单`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.isVisible = true |
|
|
|
this.tempData = res.data.Items |
|
|
|
}) |
|
|
|
} else if (res.data.InfoType === "success") { // 成功创建包装单(单个包装模板) |
|
|
|
this.getPackorder() // 获取激活包装单列表 |
|
|
|
this.msgSuccess(res.data.Message) |
|
|
|
} else if (res.data.InfoType === "waiting") { // 已经有开口的包装单 |
|
|
|
this.msgError(res.data.Message) |
|
|
|
} else if (res.data.InfoType === 'fail') { |
|
|
|
this.msgError(res.data.Message) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.msgError(res.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.msgError('请手动创建包装项') |
|
|
|
// this.$confirm(`是否要创建包装单`, '提示', { |
|
|
|
// confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning', |
|
|
|
// }) |
|
|
|
// .then(() => { |
|
|
|
// this.isVisible = true |
|
|
|
// this.tempData = res.data.Items |
|
|
|
// }) |
|
|
|
// api.checkbarcode(code).then((res) => { |
|
|
|
// if (res.code === 200) { |
|
|
|
// if (res.data.InfoType === "doing") { // doing 需要手动创建包装单!(多个包装模板) |
|
|
|
// this.$confirm(`是否要创建包装单`, '提示', { |
|
|
|
// confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning', |
|
|
|
// }) |
|
|
|
// .then(() => { |
|
|
|
// this.isVisible = true |
|
|
|
// this.tempData = res.data.Items |
|
|
|
// }) |
|
|
|
// } else if (res.data.InfoType === "success") { // 成功创建包装单(单个包装模板) |
|
|
|
// this.getPackorder() // 获取激活包装单列表 |
|
|
|
// this.msgSuccess(res.data.Message) |
|
|
|
// } else if (res.data.InfoType === "waiting") { // 已经有开口的包装单 |
|
|
|
// this.msgError(res.data.Message) |
|
|
|
// } else if (res.data.InfoType === 'fail') { |
|
|
|
// this.msgError(res.data.Message) |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// this.msgError(res.msg) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
} |
|
|
|
this.isCodeInList = false |
|
|
|
} |
|
|
|