fix: 修复处理单据扫码回车

dev_ksck_z
chenhc 7 months ago
parent 34df04d874
commit 3962860171

@ -132,6 +132,14 @@ export function enterCodeWeb(query) {
});
}
export function enterCodeBillNo(query) {
return axios({
url: "/warehouse/inout/enterCodeBillNo",
method: "post",
data: query
});
}
export function postOrdersWeb(query) {
return axios({

@ -697,7 +697,7 @@ export default {
type: "warning",
})
.then(() => {
_this.deleteOrders(row.code);
_this.deleteOrders(row.billNo);
})
.catch(() => {
});

@ -353,7 +353,7 @@ import prescribeOriginPanel from "./PannelOrderBiz";
import prescribeCodePanel from "./PanelOrderTagCode";
import PannelOrderBiz from "./PannelOrderBiz";
import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage";
import {enterCodeWeb} from "@/api/inout/order";
import {enterCodeWeb,enterCodeBillNo} from "@/api/inout/order";
import {cancelOrder, draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {getCurOrder, getNextOrder, findByBill, findFromCorp} from "@/api/collect/collectOrder";
@ -627,6 +627,10 @@ export default {
enterKey() {
if (this.formData.billNo == null){
this.enterBillNoKey()
return;
}
this.checkSuccess = true;
this.filterQuery.code = this.scanCode;
let tQuery = {
@ -701,6 +705,81 @@ export default {
});
},
enterBillNoKey() {
this.checkSuccess = true;
this.filterQuery.code = this.scanCode;
let tQuery = {
viewType: "tagCode",
workPlaceCode: this.workplaceId,
originCode: this.originCode,
busType: this.formData.busType,
code: this.filterQuery.code.trim(),
};
enterCodeBillNo(tQuery).then((response) => {
if (response.code === 20000) {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
this.isSuccess = true;
this.printCodeResult(response.data, response.message)
this.filterQuery.code = response.data.code;
this.scanCode = ""
this.originCode = ""
this.addCode();
} else {
if (response.code == 502) {
this.checkSuccess = false;
this.isSuccess = false;
this.printCodeResult(response.data, response.message)
this.filterQuery.code = response.data.code;
this.originCode = response.data.code;
this.scanCode = ""
} else if (response.code == 501) {
this.checkSuccess = false;
this.$message.error(response.message);
this.scanCode = ""
} else if (response.code == 503) {
this.checkSuccess = false;
this.isSuccess = false;
this.printCodeResult(response.data, response.message)
this.filterQuery.code = response.data.code;
this.scanCode = ""
this.$confirm(response.message, "提示", {
type: "warning",
})
.then(() => {
this.filterQuery.code = response.data.code;
this.addCode();
})
.catch(() => {
this.filterQuery.code = response.data.code;
});
} else if (response.code == 508) {
this.originCode = "";
this.filterQuery.code = "01" + response.data.nameCode;
this.originCode = this.filterQuery.code;
} else if (response.code == 601) {
this.formData.billNo = response.data.billNo
this.getBillNo(this.formData.billNo)
this.startDeal();
} else {
this.scanCode = ""
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
type: "warning",
closeOnClickModal: true,
callback: (action) => {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
},
});
}
}
this.loading = false;
});
},
addCode() {
if (this.$isBlank(this.filterQuery.code)) {
this.filterQuery.code = this.scanCode.trim();

Loading…
Cancel
Save