同步设置,扫码校验

master
anthonyywj2 3 years ago
parent 20a1f295bb
commit f38fa25e79

@ -41,17 +41,16 @@ const KeyScaner = /** @class */ (function () {
if (ev.shiftKey || ev.altKey || ev.ctrlKey || ev.metaKey) { if (ev.shiftKey || ev.altKey || ev.ctrlKey || ev.metaKey) {
return; return;
} }
console.log("监听到回车键。。。。。。。。。。。。。。。。。。。");
this.appendChar("\r"); this.appendChar("\r");
this.completeInput(); //立即完成输入 this.completeInput(); //立即完成输入
} else if (ev.key == "Delete" || ev.key == "Backspace") { } else if (ev.key == "Delete" || ev.key == "Backspace") {
console.log("监听到删除键。。。。。。。。。。。。。。。。。。。");
this.dom.innerTex = ""; this.dom.innerTex = "";
this.appendChar("delete"); this.appendChar("delete");
this.completeInput(); //立即完成输入 this.completeInput(); //立即完成输入
} else { } else {
if (ev.key.length == 1) { if (ev.key.length == 1) {
var charCode = ev.key.charCodeAt(0); var charCode = ev.key.charCodeAt(0);
console.log("key="+charCode);
if (charCode >= 48 && charCode <= 57) { if (charCode >= 48 && charCode <= 57) {
if (ev.altKey) { if (ev.altKey) {
this.altBuf.push(ev.key); this.altBuf.push(ev.key);

@ -209,7 +209,6 @@ export default {
}); });
}, },
getOrderType(code) { getOrderType(code) {
let query = { let query = {
locInvCode: code locInvCode: code
} }

@ -209,7 +209,11 @@
prop="action" prop="action"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column width="180" label="允许缺量补单">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.outChange"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -320,20 +324,18 @@ export default {
getConfig() { getConfig() {
findConfig() findConfig()
.then((response) => { .then((response) => {
if (response.code == 20000) { this.configQuery = response.data;
this.configQuery = response.data; this.checkedBusTypes = this.configQuery.busTypes;
this.checkedBusTypes = []; if (this.configQuery.busTypes != null) {
if (this.configQuery.busTypes != null) { // for (let i = 0; i < this.configQuery.busTypes.length; i++) {
for (let i = 0; i < this.configQuery.busTypes.length; i++) { //
// for (let k = 0; k < this.busTypes.length; k++) {
for (let k = 0; k < this.busTypes.length; k++) { // if (this.busTypes[k].action == this.configQuery.busTypes[i]) {
if (this.busTypes[k].action == this.configQuery.busTypes[i]) { // this.checkedBusTypes.push(this.busTypes[k]);
this.checkedBusTypes.push(this.busTypes[k]); // this.busTypes[k].isSelect = true;
this.busTypes[k].isSelect = true; // }
} // }
} // }
}
}
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
@ -353,17 +355,19 @@ export default {
center: true, center: true,
}).then(() => { }).then(() => {
if (this.checkedBusTypes != null) { if (this.checkedBusTypes != null) {
this.configQuery.busTypes = []; this.configQuery.busTypes = this.checkedBusTypes;
for (let i = 0; i < this.checkedBusTypes.length; i++) { // for (let i = 0; i < this.checkedBusTypes.length; i++) {
this.configQuery.busTypes.push(this.checkedBusTypes[i].action); // this.configQuery.busTypes.push(this.checkedBusTypes);
} // }
} }
updateConfig(this.configQuery) updateConfig(this.configQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("更新成功!"); this.$message.success("修改成功!");
this.getConfig(); this.getConfig();
} else {
this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
@ -414,6 +418,7 @@ export default {
addBusType() { addBusType() {
var selectData = this.multipleSelection; var selectData = this.multipleSelection;
selectData.forEach((obj) => { selectData.forEach((obj) => {
obj.outChange = false;
this.checkedBusTypes.push(obj); this.checkedBusTypes.push(obj);
}); });
this.addBusDialogVisible = false; this.addBusDialogVisible = false;

Loading…
Cancel
Save