单据扫码,流向查询,扫码拦截问题

master
anthonywj 3 years ago
parent 53375967c0
commit 8fc8a93dec

@ -1,4 +1,4 @@
{
"BASE_URL": "http://139.159.187.130/SPMS_SERVER",
"BASE_URL": "http://192.168.0.109:9996",
"SERVER_IP": "http://192.168.0.109:9996"
}

@ -96,7 +96,7 @@ const KeyScaner = /** @class */ (function () {
KeyScaner.prototype.onTick = function () {
if (this.keybufs && this.keybufs.length > 0 && (!this.altBuf || this.altBuf.length == 0) && new Date().getTime() - this.lastTime > 500) {
//有缓存的字符且没有缓存的alt字符 且 与上次按键时间超过500毫秒。 收集输入
this.completeInput();
// this.completeInput();
}
};
/**

@ -395,6 +395,14 @@ export default {
type: Object,
required: true,
},
thirdId: {
type: Object,
required: true,
},
idSpliUdi: {
type: Object,
required: true,
}
},
data() {
@ -412,9 +420,11 @@ export default {
},
combineLoading: false,
combineQuery: {
idSpliUdi: false,
thirdId: "",
relId: "",
erpName: "",
thirdName:null,
keys: [],
},
checked: true,
@ -607,7 +617,11 @@ export default {
},
combine() {
if (this.idSpliUdi) {
this.combineQuery.idSpliUdi = true;
this.combineQuery.thirdId = this.thirdId;
this.combineQuery.erpName = this.data.thirdName;
}
combineUdi(this.combineQuery)
.then((response) => {
this.combineLoading = false;

@ -75,10 +75,10 @@
>选入产品
</el-button
>
<!-- <el-button type="primary" icon="search" @click="intentImportErp"-->
<!-- >添加产品信息-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button type="primary" icon="search" @click="intentImportErp"-->
<!-- >添加产品信息-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button type="primary" @click="addProductVisible=true"></el-button>-->
</el-button-group>
</el-form-item>
@ -185,8 +185,8 @@
v-if="isSpCombine"
type="text"
size="small"
:disabled="scope.row.thirdId==scope.row.nameCode"
@click.native.stop="intentImportErp(scope.row)"
:disabled="scope.row.thirdId==scope.row.nameCode || scope.row.thirdId==null || scope.row.nameCode==null"
@click.native.stop="splitSelectUdi(scope.row)"
>拆分产品
</el-button>
@ -1302,11 +1302,15 @@
<selectLocalUdi
:closeDialog="closeDialog"
:relId="relId"
:thirdId="thirdId"
:idSpliUdi="idSpliUdi"
:isImportUdi="isImportUdi"
:data="thisData"
@closeUdi="closeUdi"
></selectLocalUdi>
</el-dialog>
<el-dialog
title="选入产品信息"
:visible.sync="selectProductVisible"
@ -1385,6 +1389,7 @@ export default {
filterType: null,
auditStatus: null,
},
idSpliUdi: false,
newType: 2,
selectProductVisible: false,
addProductVisible: false,
@ -1663,8 +1668,20 @@ export default {
this.isImportUdi = true;
this.thisData = val;
console.log("-----" + this.relId);
this.idSpliUdi = false;
this.thirdId = val.thirdId;
this.selectLocalVisible = true;
},
splitSelectUdi(val) {
this.thirdId = val.thirdId;
this.isImportUdi = true;
this.thisData = val;
this.idSpliUdi = true;
console.log("-----" + this.relId);
this.selectLocalVisible = true;
},
intentImportUdi() {
this.relId = null;
this.selectLocalVisible = true;

@ -5,48 +5,57 @@
<el-form
:inline="true"
:model="filterQuery"
style="display: flex"
label-width="480px"
size="mini"
>
<el-form-item class="query-form-item" label-width="100px">
<el-input
v-model="filterQuery.code"
placeholder="UDI码"
style="width: 500px"
@keyup.enter.native="keyup_submit($event)"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select
v-model="filterQuery.supId"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入供应商名称"
:remote-method="findMethod"
size="mini"
style="width: 100%"
:loading="loading"
>
<el-option
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
<el-row>
<el-form-item class="query-form-item" label-width="100px">
<el-input
id="inputer"
v-model="filterQuery.code"
placeholder="UDI码"
ref='inputRef'
style="width: 500px"
@keypress.enter.native="enterKey($event)"
></el-input>
<el-checkbox v-model="sitcomScan" style="margin-left: 15px"></el-checkbox>
</el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item">
<el-select
v-model="filterQuery.supId"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入供应商名称"
:remote-method="findMethod"
size="mini"
style="width: 100%"
:loading="loading"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-option
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item style="display: flex">
<el-button type="primary" icon="search" @click="getList"
>查询
</el-button
>
</el-form-item>
</el-row>
<el-form-item style="display: flex">
<el-button type="primary" icon="search" @click="getList"
>查询
</el-button
>
</el-form-item>
</el-form>
<el-table
@ -308,6 +317,7 @@ import selectErpOrder from "../warehouse/DialogSelectErpOrder";
import {getBussinessType} from "../../api/basic/bussinessType";
import {filterOrderTrace} from "@/api/inventory/invCodeTrace";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import A from "@/plugin/KeyScaner";
const formJson = {
site_id: "",
@ -335,6 +345,7 @@ export default {
limit: 20,
supId: null,
},
sitcomScan: false,
checkStatus: {
1: "校验异常",
0: "未校验",
@ -475,6 +486,15 @@ export default {
this.actDateRange = [];
this.getList();
},
enterKey(event) {
if (this.sitcomScan) {
return;
} else {
this.$refs.inputRef.select();
this.onSubmit();
}
},
onSubmit() {
this.getList();
},
@ -567,11 +587,17 @@ export default {
this.filterQuery.customerId = store.getters.customerId;
filterOrderTrace(this.filterQuery)
.then((response) => {
console.log(response)
this.loading = false;
this.list = response.data.list || [];
this.detailList = [];
this.total = response.data.total || 0;
if (response.code == 20000) {
this.loading = false;
this.list = response.data.list || [];
this.detailList = [];
this.total = response.data.total || 0;
} else {
this.loading = false;
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
@ -948,6 +974,23 @@ export default {
event.preventDefault();
event.stopPropagation();
};
var that = this;
var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) {
//onInput500ms
if (text.includes("delete")) {
that.formData.code = "";
return;
}
if (that.sitcomScan) {
that.filterQuery.code = that.filterQuery.code;
} else {
that.filterQuery.code = text;
}
};
inputer.focus();//divtabindexdocumentBody
},
created() {

@ -3,7 +3,7 @@
<div>
<h3 class="toptitle">平和县医院</h3>
<h3 class="toptitle">诏安县总医院</h3>
</div>
<el-form

@ -184,28 +184,20 @@
<el-col :span="2">
<div class="ao-text">
<el-link
@click.native.stop="scanChange()"
target="_blank">{{ scanText }}
</el-link>
</div>
</el-col>
<el-col :span="16">
<el-form-item prop="code">
<el-input
v-if="!isScan"
id="inputer"
@focus="getInputFocus($event)"
@keypress.enter.native="enterKey($event)"
ref='inputRef'
class="ime-disabled"
style="ime-mode:disabled"
v-model="formData.code"
></el-input>
<!-- style="ime-mode:inactive"-->
<!-- class="ime-disabled"-->
<div id="inputer" tabindex="0" v-if="isScan"></div>
<!-- <input type="text" id="inputer" ime-mode="disabled" tabindex="0">-->
</el-form-item>
</el-col>
<el-col :span="2">
@ -497,11 +489,11 @@ export default {
this.formData.corpOrderId = this.formData.corpOrderId.trim();
this.actionEnable = true;
if (event == null) {
// this.$refs.inputRef.focus();
var inputer = document.getElementById("inputer");
this.formData.code = inputer.innerText.replace("\r", "");
inputer.focus();
} else event.target.select();
this.$refs.inputRef.select();
if (this.$isBlank(this.formData.action)) {
this.$message.warning("请选择单据类型!");
return;
@ -528,7 +520,7 @@ export default {
tQuery.action = this.formData.action;
console.log(tQuery.action);
this.addCodeSubmit(tQuery);
this.$refs.inputRef.select();
},
@ -633,7 +625,7 @@ export default {
this.isScan = !this.isScan;
if (this.isScan) {
this.scanText = "扫码录入:";
document.getElementById("inputer").focus();
// document.getElementById("inputer").focus();
} else {
this.scanText = "手动录入:";
// this.$refs.inputRef.focus();
@ -925,17 +917,13 @@ export default {
sc.onInput = function (text) {
//onInput500ms
if (text.includes("delete")) {
inputer.innerText = "";
that.formData.code = "";
return;
}
if (that.sitcomScan) {
inputer.innerText = inputer.innerText + text;//.replace("\r", "")
console.log(" inputer.innerText" + inputer.innerText);
that.formData.code = that.formData.code;
} else {
inputer.innerText = text;
that.formData.code = inputer.innerText;
that.addCode(null);
that.formData.code = text;
}
};
inputer.focus();//divtabindexdocumentBody

@ -114,26 +114,21 @@
<el-row :gutter="20">
<el-col :span="3">
<div class="ao-text">
<el-link
@click.native.stop="scanChange()"
target="_blank">{{ scanText }}
</el-link>
</div>
</el-col>
<el-col :span="16">
<el-form-item prop="code">
<el-input
v-if="!isScan"
id="inputer"
@focus="getInputFocus($event)"
@keypress.enter.native="enterKey($event)"
ref='inputRef'
style="ime-mode:disabled"
v-model="formData.code"
></el-input>
<div id="inputer" tabindex="0" v-if="isScan"></div>
<!-- <input type="text" id="inputer" ime-mode="disabled" tabindex="0">-->
</el-form-item>
</el-col>
<el-col :span="2">
@ -150,10 +145,12 @@
</el-row>
<el-row :gutter="20">
<el-col :span="16" style="margin-left: 40px">
<el-col :span="14" style="margin-left: 40px">
</el-col>
<el-col :span="2">
<el-checkbox v-model="sitcomScan"></el-checkbox>
</el-col>
<el-col :span="4">
<el-col :span="3">
<div class="text item" style="margin-left: 30px"> 条码数量{{ total }}
</div>
</el-col>
@ -420,7 +417,6 @@ export default {
},
addCode(event) {
if (event == null) {
// this.$refs.inputRef.focus();
var inputer = document.getElementById("inputer");
this.formData.code = inputer.innerText.replace("\r", "");
inputer.focus();
@ -715,24 +711,19 @@ export default {
event.preventDefault();
event.stopPropagation();
};
var that = this;
var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) {
//onInput500ms
if (text.includes("delete")) {
inputer.innerText = "";
that.formData.code = "";
return;
}
if (that.sitcomScan) {
inputer.innerText = inputer.innerText + text;//.replace("\r", "")
console.log(" inputer.innerText" + inputer.innerText);
that.formData.code = that.formData.code;
} else {
inputer.innerText = text;
that.formData.code = inputer.innerText;
that.addCode(null);
that.formData.code = text;
}
};
inputer.focus();//divtabindexdocumentBody
@ -790,6 +781,7 @@ export default {
text-align: right;
margin-top: 10px;
}
#inputer {
width: 100%;
min-height: 30px;

Loading…
Cancel
Save