|
|
|
@ -364,7 +364,6 @@
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-form-item prop="code" label="扫码录入校验:">
|
|
|
|
|
<el-input
|
|
|
|
|
id="inputer"
|
|
|
|
|
@focus="getInputFocus($event)"
|
|
|
|
|
@keypress.enter.native="enterKey($event)"
|
|
|
|
|
ref="inputRef"
|
|
|
|
@ -377,29 +376,29 @@
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<el-button-group
|
|
|
|
|
style="display: flex; height: 35px">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click.native.stop="addCode()"
|
|
|
|
|
style="margin-left: 15px"
|
|
|
|
|
>扫码添加
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click.native="selectOrder()"
|
|
|
|
|
v-if="curAction.checkWebNew != 2 || viewType !=1"
|
|
|
|
|
>下载码上放心追溯码
|
|
|
|
|
<!-- v-if="(curAction.checkWebNew !== 2 || viewType !== 1) && orderFormData.billNo"-->
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
v-if="curAction.useDyCount == 2"
|
|
|
|
|
@click.native.stop="addInvProduct()"
|
|
|
|
|
>库存选入
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click.native.stop="addCode()"
|
|
|
|
|
style="margin-left: 15px"
|
|
|
|
|
>扫码添加
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click.native="selectOrder()"
|
|
|
|
|
v-if="curAction.checkWebNew != 2 || viewType !=1"
|
|
|
|
|
>下载码上放心追溯码
|
|
|
|
|
<!-- v-if="(curAction.checkWebNew !== 2 || viewType !== 1) && orderFormData.billNo"-->
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
v-if="curAction.useDyCount == 2"
|
|
|
|
|
@click.native.stop="addInvProduct()"
|
|
|
|
|
>库存选入
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -435,17 +434,17 @@
|
|
|
|
|
v-if="isCodeDetailAlive"
|
|
|
|
|
></codeDetailPanel>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<!-- <el-tab-pane label="扫码明细" v-if="viewCodeDetailVisible">-->
|
|
|
|
|
<!-- <codesPanel-->
|
|
|
|
|
<!-- :idQuery="orderFormData"-->
|
|
|
|
|
<!-- :refreshPanel="refreshCodesPanel"-->
|
|
|
|
|
<!-- v-if="isCodeAlive"-->
|
|
|
|
|
<!-- :viewType="viewType"-->
|
|
|
|
|
<!-- :selectRlTitle="selectRlTitle"-->
|
|
|
|
|
<!-- :editTitle="editTitle"-->
|
|
|
|
|
<!-- :selectUnitTitle="selectUnitTitle"-->
|
|
|
|
|
<!-- ></codesPanel>-->
|
|
|
|
|
<!-- </el-tab-pane>-->
|
|
|
|
|
<!-- <el-tab-pane label="扫码明细" v-if="viewCodeDetailVisible">-->
|
|
|
|
|
<!-- <codesPanel-->
|
|
|
|
|
<!-- :idQuery="orderFormData"-->
|
|
|
|
|
<!-- :refreshPanel="refreshCodesPanel"-->
|
|
|
|
|
<!-- v-if="isCodeAlive"-->
|
|
|
|
|
<!-- :viewType="viewType"-->
|
|
|
|
|
<!-- :selectRlTitle="selectRlTitle"-->
|
|
|
|
|
<!-- :editTitle="editTitle"-->
|
|
|
|
|
<!-- :selectUnitTitle="selectUnitTitle"-->
|
|
|
|
|
<!-- ></codesPanel>-->
|
|
|
|
|
<!-- </el-tab-pane>-->
|
|
|
|
|
<el-tab-pane label="处方使用耗材" v-if="viewSickVisible">
|
|
|
|
|
<diSkPrescribePanel
|
|
|
|
|
:perscribeData="orderFormData"
|
|
|
|
@ -601,7 +600,7 @@ import {
|
|
|
|
|
submitCodes,
|
|
|
|
|
submitOrderWeb,
|
|
|
|
|
saveOrderWeb,
|
|
|
|
|
submitAllocateBiz, rollbackWaitcheck, submitCodeResult, submitCheckResult, delmitBiz, addDrugOrderWeb,
|
|
|
|
|
submitAllocateBiz, rollbackWaitcheck, submitCodeResult, submitCheckResult, delmitBiz, addDrugOrderWeb, batchAddCode,
|
|
|
|
|
} from "../../api/inout/order";
|
|
|
|
|
import {filterSubAll, findByFrom, findInvByUser} from "../../api/system/invSubWarehouse";
|
|
|
|
|
import {parseTime} from "../../utils/coTools";
|
|
|
|
@ -638,6 +637,11 @@ export default {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
fromCorp: {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
errView: {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true,
|
|
|
|
@ -942,14 +946,14 @@ export default {
|
|
|
|
|
let query = {
|
|
|
|
|
code: this.orderFormData.invCode,
|
|
|
|
|
editType: 2, //可编辑
|
|
|
|
|
productType:2
|
|
|
|
|
productType: 2
|
|
|
|
|
};
|
|
|
|
|
if (this.viewTypeKsck) {
|
|
|
|
|
query = {
|
|
|
|
|
code: this.orderFormData.invCode,
|
|
|
|
|
editType: 2, //可编辑
|
|
|
|
|
useDyCount: 2, //可编辑
|
|
|
|
|
productType:2
|
|
|
|
|
productType: 2
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1020,7 +1024,7 @@ export default {
|
|
|
|
|
this.closeDialog();
|
|
|
|
|
} else {
|
|
|
|
|
// this.$message.error(response.message);
|
|
|
|
|
const codeDetailComponent = this.$refs.IoCreateOrderCodeDetail.getOrderDetails();
|
|
|
|
|
// const codeDetailComponent = this.$refs.IoCreateOrderCodeDetail.getOrderDetails();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
const codeDetailComponent = this.$refs.IoCreateOrderCodeDetail.getOrderDetails();
|
|
|
|
@ -1111,9 +1115,9 @@ export default {
|
|
|
|
|
(this.curAction.corpType == 1 && !this.curAction.genUnit)
|
|
|
|
|
) {
|
|
|
|
|
//1.切换往来单位
|
|
|
|
|
this.orderFormData.fromCorp = null;
|
|
|
|
|
// this.orderFormData.fromCorp = null;
|
|
|
|
|
|
|
|
|
|
this.delorderData();
|
|
|
|
|
// this.delorderData();
|
|
|
|
|
|
|
|
|
|
this.findMethod();
|
|
|
|
|
} else if (this.curAction.corpType == 3) {
|
|
|
|
@ -1353,7 +1357,12 @@ export default {
|
|
|
|
|
let tQuery = Object.assign(
|
|
|
|
|
JSON.parse(JSON.stringify(this.orderFormData))
|
|
|
|
|
);
|
|
|
|
|
tQuery.code = this.codeFormData.code;
|
|
|
|
|
|
|
|
|
|
if (this.codeFormData.code.includes(';')) {
|
|
|
|
|
const codeArray = this.codeFormData.code.split(';')
|
|
|
|
|
tQuery.codeList = codeArray
|
|
|
|
|
} else
|
|
|
|
|
tQuery.code = this.codeFormData.code;
|
|
|
|
|
tQuery.orderType = this.viewType;
|
|
|
|
|
this.addCodeSubmit(tQuery);
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
@ -1377,7 +1386,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
//添加条码后提交
|
|
|
|
|
addCodeSubmit(tQuery) {
|
|
|
|
|
addDrugOrderWeb(tQuery).then((response) => {
|
|
|
|
|
batchAddCode(tQuery).then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.orderFormData.billNo = response.data.orderId;
|
|
|
|
|
if (response.data.errMsg != null) {
|
|
|
|
@ -1391,9 +1400,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.corpOrderIdDisabled = true;
|
|
|
|
|
this.refreshCodesPanel();
|
|
|
|
|
this.orderFormData.relId = null;
|
|
|
|
|
this.printMutiCodeResult(response.data.vailCodeResultResponses)
|
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
|
this.orderFormData.relId = null;
|
|
|
|
|
} else {
|
|
|
|
|
if (response.code == 502) {
|
|
|
|
|
//该产品绑定多个产品ID处理
|
|
|
|
@ -1524,6 +1534,27 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async printMutiCodeResult(vailCodeResultResponses) {
|
|
|
|
|
let result = ""
|
|
|
|
|
let warnResult = ""
|
|
|
|
|
for (let i = 0; i < vailCodeResultResponses.length; i++) {
|
|
|
|
|
let data = vailCodeResultResponses[i]
|
|
|
|
|
if (data.status == 1) {
|
|
|
|
|
result = result + ';' + vailCodeResultResponses[i].code
|
|
|
|
|
} else if (data.status == 2) {
|
|
|
|
|
if (result == '') {
|
|
|
|
|
}
|
|
|
|
|
warnResult = warnResult + '\n' + vailCodeResultResponses[i].code + ':' + vailCodeResultResponses[i].errMsg
|
|
|
|
|
} else if (data.status == 3) {
|
|
|
|
|
result = result + '\n' + vailCodeResultResponses[i].code
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!isBlank(warnResult)) {
|
|
|
|
|
this.$message.error(warnResult)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
refreshOrder(orderQuery) {
|
|
|
|
|
this.orderFormData = orderQuery;
|
|
|
|
|
},
|
|
|
|
@ -1841,29 +1872,11 @@ 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) {
|
|
|
|
|
if (text.includes("delete")) {
|
|
|
|
|
that.codeFormData.code = "";
|
|
|
|
|
that.sictomText = "";
|
|
|
|
|
that.originCode = "";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (that.sitcomScan) {
|
|
|
|
|
let tempTxt = text;
|
|
|
|
|
let str = tempTxt.replace(/[\r]/g, "");
|
|
|
|
|
that.sictomText = that.sictomText + str;
|
|
|
|
|
that.codeFormData.code = that.sictomText;
|
|
|
|
|
} else {
|
|
|
|
|
that.codeFormData.code = text;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
inputer.focus();
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
//页面初始化
|
|
|
|
|
this.orderQuery.fromCorp = this.fromCorp
|
|
|
|
|
console.log(this.orderQuery.fromCorp)
|
|
|
|
|
this.codeFormData.code = "";
|
|
|
|
|
//页面类型
|
|
|
|
|
if (this.viewType == 2) {
|
|
|
|
@ -1936,29 +1949,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
#inputer {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: 30px;
|
|
|
|
|
background-color: white;
|
|
|
|
|
border: #d0d0d0;
|
|
|
|
|
border-style: solid;
|
|
|
|
|
border-width: 0.1px;
|
|
|
|
|
color: #4a4a4a;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#inputer:focus {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: 30px;
|
|
|
|
|
background-color: white;
|
|
|
|
|
border: #0080ff;
|
|
|
|
|
border-style: solid;
|
|
|
|
|
border-width: 0.1px;
|
|
|
|
|
color: #4a4a4a;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ime-disabled {
|
|
|
|
|
ime-mode: disabled;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|