|
|
@ -189,8 +189,20 @@
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
<!-- 绑定入库-->
|
|
|
|
<!-- 绑定入库-->
|
|
|
|
<el-dialog title="绑定入库" width="70%" :visible.sync="bindToDBVisible">
|
|
|
|
<el-dialog title="绑定入库" width="70%" :visible.sync="bindToDBVisible" @close="handleCloseToDB">
|
|
|
|
<div class="bind-to-db-title">请扫描试剂条码</div>
|
|
|
|
<div class="to-database">
|
|
|
|
|
|
|
|
<div class="bind-to-db-title">请扫描试剂条码</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-select v-model="client_id_input" placeholder="请选择柜体">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in clientOptions"
|
|
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
|
|
:label="item.client_name"
|
|
|
|
|
|
|
|
:value="item.client_id"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<el-table
|
|
|
|
<el-table
|
|
|
|
ref="singleTable"
|
|
|
|
ref="singleTable"
|
|
|
|
:header-cell-style="headerStyle"
|
|
|
|
:header-cell-style="headerStyle"
|
|
|
@ -271,7 +283,8 @@ export default {
|
|
|
|
bindToDBVisible: false,
|
|
|
|
bindToDBVisible: false,
|
|
|
|
bindToDBData: [],
|
|
|
|
bindToDBData: [],
|
|
|
|
barCode: '',
|
|
|
|
barCode: '',
|
|
|
|
currentRow: null
|
|
|
|
currentRow: null,
|
|
|
|
|
|
|
|
client_id_input: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
@ -279,14 +292,14 @@ export default {
|
|
|
|
// 扫码后提交后台并自动选择下一行
|
|
|
|
// 扫码后提交后台并自动选择下一行
|
|
|
|
barCode: function(newCode, oldCode) {
|
|
|
|
barCode: function(newCode, oldCode) {
|
|
|
|
if (newCode) {
|
|
|
|
if (newCode) {
|
|
|
|
if (!this.client_id) {
|
|
|
|
if (!this.client_id_input) {
|
|
|
|
this.$message.warning('请选择存储柜体!')
|
|
|
|
this.$message.warning('请选择存储柜体!')
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bind_tmp_enter_warehouse(stringify({
|
|
|
|
bind_tmp_enter_warehouse(stringify({
|
|
|
|
'tmplate_content': JSON.stringify(this.currentRow),
|
|
|
|
'tmplate_content': JSON.stringify(this.currentRow),
|
|
|
|
'bar_code': newCode,
|
|
|
|
'bar_code': newCode,
|
|
|
|
'client_id': this.client_id
|
|
|
|
'client_id': this.client_id_input
|
|
|
|
})).then(res => {
|
|
|
|
})).then(res => {
|
|
|
|
if (res.status === 0) {
|
|
|
|
if (res.status === 0) {
|
|
|
|
let cindex = 0 // 记录成功后的下一个index
|
|
|
|
let cindex = 0 // 记录成功后的下一个index
|
|
|
@ -314,6 +327,9 @@ export default {
|
|
|
|
this.getTmpList()
|
|
|
|
this.getTmpList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
handleCloseToDB() {
|
|
|
|
|
|
|
|
this.client_id_input = ''
|
|
|
|
|
|
|
|
},
|
|
|
|
formClose() {
|
|
|
|
formClose() {
|
|
|
|
this.propsformdata = {}
|
|
|
|
this.propsformdata = {}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -391,6 +407,7 @@ export default {
|
|
|
|
for (let i = 0; i < obj.num; i++) {
|
|
|
|
for (let i = 0; i < obj.num; i++) {
|
|
|
|
this.bindToDBData.push({ ...this.propsformdata, ...obj, 'status': false })
|
|
|
|
this.bindToDBData.push({ ...this.propsformdata, ...obj, 'status': false })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.client_id_input = obj.client_id
|
|
|
|
this.bindToDBVisible = true
|
|
|
|
this.bindToDBVisible = true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 处理选择试剂入库弹框关闭后数据留存问题
|
|
|
|
// 处理选择试剂入库弹框关闭后数据留存问题
|
|
|
@ -448,6 +465,7 @@ export default {
|
|
|
|
this.reagentAddTmpName = ''
|
|
|
|
this.reagentAddTmpName = ''
|
|
|
|
this.reagentAddClient = null
|
|
|
|
this.reagentAddClient = null
|
|
|
|
this.reagentAddTmpData = []
|
|
|
|
this.reagentAddTmpData = []
|
|
|
|
|
|
|
|
this.client_id_input = ''
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleAddSave: throttle(function() {
|
|
|
|
handleAddSave: throttle(function() {
|
|
|
|
if (!this.reagentAddTmpName) {
|
|
|
|
if (!this.reagentAddTmpName) {
|
|
|
@ -520,6 +538,9 @@ export default {
|
|
|
|
return item
|
|
|
|
return item
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
if (this.multipleSelection.length === 1) {
|
|
|
|
|
|
|
|
this.client_id_input = this.multipleSelection[0].client_id
|
|
|
|
|
|
|
|
}
|
|
|
|
// 自动选择第一行数据
|
|
|
|
// 自动选择第一行数据
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs.singleTable.setCurrentRow(this.bindToDBData[0])
|
|
|
|
this.$refs.singleTable.setCurrentRow(this.bindToDBData[0])
|
|
|
@ -583,4 +604,10 @@ export default {
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
margin-top: 1rem;
|
|
|
|
margin-top: 1rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.to-database{
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|