|
|
|
@ -239,30 +239,30 @@ export default {
|
|
|
|
|
}else if (res.code == 503){
|
|
|
|
|
this.replaceCode(query,2)
|
|
|
|
|
} else if (res.code == 504){
|
|
|
|
|
//追溯码不存在 是否执行更换
|
|
|
|
|
this.$confirm('追溯码校验超出是否继续添加', '提示', {
|
|
|
|
|
confirmButtonText: '添加',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
center: true,
|
|
|
|
|
closeOnPressEscape: false,//按下 ESC 键关闭弹窗
|
|
|
|
|
closeOnClickModal: false,//点击遮罩关闭弹窗
|
|
|
|
|
distinguishCancelAndClose: true,//区分取消与关闭
|
|
|
|
|
}).then(() => {
|
|
|
|
|
scanCheckCodeReplace(query).then(res => {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
this.scanCode = ''
|
|
|
|
|
this.orderData.checkCodeConfirm = res.data.checkCodeConfirm
|
|
|
|
|
this.codeQuery.selectType = 1
|
|
|
|
|
this.getResultDetailList()
|
|
|
|
|
this.getInputFocus()
|
|
|
|
|
this.$message.success("添加成功")
|
|
|
|
|
}else {
|
|
|
|
|
this.$message.error("添加失败")
|
|
|
|
|
}
|
|
|
|
|
//追溯码不存在 是否执行更换
|
|
|
|
|
this.$confirm('追溯码校验超出是否继续添加', '提示', {
|
|
|
|
|
confirmButtonText: '添加',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
center: true,
|
|
|
|
|
closeOnPressEscape: false,//按下 ESC 键关闭弹窗
|
|
|
|
|
closeOnClickModal: false,//点击遮罩关闭弹窗
|
|
|
|
|
distinguishCancelAndClose: true,//区分取消与关闭
|
|
|
|
|
}).then(() => {
|
|
|
|
|
scanCheckCodeReplace(query).then(res => {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
this.scanCode = ''
|
|
|
|
|
this.orderData.checkCodeConfirm = res.data.checkCodeConfirm
|
|
|
|
|
this.codeQuery.selectType = 1
|
|
|
|
|
this.getResultDetailList()
|
|
|
|
|
this.getInputFocus()
|
|
|
|
|
this.$message.success("添加成功")
|
|
|
|
|
}else {
|
|
|
|
|
this.$message.error("添加失败")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}else {
|
|
|
|
|
}else {
|
|
|
|
|
if (Array.isArray(res.data)) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
@ -278,9 +278,9 @@ export default {
|
|
|
|
|
let title = ''
|
|
|
|
|
if (type == 1){
|
|
|
|
|
const codeStr = query.codeList.join('\n');
|
|
|
|
|
title = `${codeStr}该追溯码不存在是否继续添加`;
|
|
|
|
|
title = `${codeStr}该追溯码不存在是否继续添加`;
|
|
|
|
|
}else {
|
|
|
|
|
title = '该追溯码不存在是否继续添加'
|
|
|
|
|
title = '该追溯码不存在是否继续添加'
|
|
|
|
|
}
|
|
|
|
|
//追溯码不存在 是否执行更换
|
|
|
|
|
this.$confirm(title, '提示', {
|
|
|
|
@ -481,19 +481,19 @@ export default {
|
|
|
|
|
this.commit()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// // 检查是否所有行都是绿色
|
|
|
|
|
// let allGreen = this.detailList.every(row => {
|
|
|
|
|
// return this.checkCodeEndList.includes(row.code);
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// if (allGreen) {
|
|
|
|
|
// // 如果所有行都是绿色,执行提交操作
|
|
|
|
|
// // this.doSubmit();
|
|
|
|
|
// this.$message.success('所有行都是绿色');
|
|
|
|
|
// } else {
|
|
|
|
|
// // 如果不是所有行都是绿色,提示用户
|
|
|
|
|
// this.$message.error('请确保所有行都是绿色后再提交');
|
|
|
|
|
// }
|
|
|
|
|
// // 检查是否所有行都是绿色
|
|
|
|
|
// let allGreen = this.detailList.every(row => {
|
|
|
|
|
// return this.checkCodeEndList.includes(row.code);
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// if (allGreen) {
|
|
|
|
|
// // 如果所有行都是绿色,执行提交操作
|
|
|
|
|
// // this.doSubmit();
|
|
|
|
|
// this.$message.success('所有行都是绿色');
|
|
|
|
|
// } else {
|
|
|
|
|
// // 如果不是所有行都是绿色,提示用户
|
|
|
|
|
// this.$message.error('请确保所有行都是绿色后再提交');
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
commit(){
|
|
|
|
|
commitCheckCodeOrder(this.filterQuery).then(res => {
|
|
|
|
|