diff --git a/public/config.json b/public/config.json index aca6ed7..b0ef407 100644 --- a/public/config.json +++ b/public/config.json @@ -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" } diff --git a/src/plugin/KeyScaner.js b/src/plugin/KeyScaner.js index b7ddc13..0b8024d 100644 --- a/src/plugin/KeyScaner.js +++ b/src/plugin/KeyScaner.js @@ -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(); } }; /** diff --git a/src/views/basic/UdiInfoSelectLocalUdi.vue b/src/views/basic/UdiInfoSelectLocalUdi.vue index a7e7f51..b2778e0 100644 --- a/src/views/basic/UdiInfoSelectLocalUdi.vue +++ b/src/views/basic/UdiInfoSelectLocalUdi.vue @@ -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; diff --git a/src/views/basic/basicCompanyProducts.vue b/src/views/basic/basicCompanyProducts.vue index 48699cf..1828b4f 100644 --- a/src/views/basic/basicCompanyProducts.vue +++ b/src/views/basic/basicCompanyProducts.vue @@ -75,10 +75,10 @@ >选入产品 - - - - + + + + @@ -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)" >拆分产品 @@ -1302,11 +1302,15 @@ + + - - - - - - + + + 分段扫码 + + + + + + - {{ item.name }} - - - + + {{ item.name }} + + + + + 查询 + + + + - - 查询 - - { - 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) { + //onInput事件在检测到回车键按下或在连续输入后超过500ms没有继续输入时触发 + if (text.includes("delete")) { + that.formData.code = ""; + return; + } + if (that.sitcomScan) { + that.filterQuery.code = that.filterQuery.code; + } else { + that.filterQuery.code = text; + } + }; + inputer.focus();//别忘了给要监听的节点放置焦点,如果是div一类默认不具备焦点的节点需要给它加上“tabindex”属性。不建议传入document、Body等全局节点,可能会影响其它输入控件的流畅性。 + }, created() { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index ab9b156..2e2d673 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -3,7 +3,7 @@
-

平和县医院

+

诏安县总医院

{{ scanText }} -
- - -
- -
@@ -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) { //onInput事件在检测到回车键按下或在连续输入后超过500ms没有继续输入时触发 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();//别忘了给要监听的节点放置焦点,如果是div一类默认不具备焦点的节点需要给它加上“tabindex”属性。不建议传入document、Body等全局节点,可能会影响其它输入控件的流畅性。 diff --git a/src/views/warehouse/addOrder.vue b/src/views/warehouse/addOrder.vue index a1edf5e..36ea96c 100644 --- a/src/views/warehouse/addOrder.vue +++ b/src/views/warehouse/addOrder.vue @@ -114,26 +114,21 @@
- {{ scanText }} -
-
- -
@@ -150,10 +145,12 @@
- + + + 分段扫码 - +
条码数量:{{ total }}
@@ -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) { //onInput事件在检测到回车键按下或在连续输入后超过500ms没有继续输入时触发 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();//别忘了给要监听的节点放置焦点,如果是div一类默认不具备焦点的节点需要给它加上“tabindex”属性。不建议传入document、Body等全局节点,可能会影响其它输入控件的流畅性。 @@ -790,6 +781,7 @@ export default { text-align: right; margin-top: 10px; } + #inputer { width: 100%; min-height: 30px;