|
|
|
@ -117,15 +117,18 @@ |
|
|
|
</download-excel> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
<el-dialog title="扫/输入条码回收体检表(指引单)" :visible.sync="dialogVisible" width="400px" :append-to-body="true" |
|
|
|
<el-dialog title="扫/输入条码回收体检表(指引单)" :visible.sync="recover.dialog" width="400px" :append-to-body="true" |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<div class="query"> |
|
|
|
<span class="spanClass">条码号</span> <!-- @change="signByPatientRegisterNo" --> |
|
|
|
<el-input ref="tmh" v-model="patientRegisterNo" @keyup.native.enter="signByPatientRegisterNo"></el-input> |
|
|
|
<div style="margin-left: 10px;"> |
|
|
|
<template> |
|
|
|
<el-radio v-model="recover.recoverType" label="0">条码号</el-radio> |
|
|
|
<el-radio v-model="recover.recoverType" label="1">档案号</el-radio> |
|
|
|
</template> |
|
|
|
<el-input style="margin: 10px 0;" ref="tmh" v-model="recover.barcode" @keyup.native.enter="signByPatientRegisterNo"></el-input> |
|
|
|
</div> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="signByPatientRegisterNo" class="commonbutton">确定</el-button> |
|
|
|
<el-button @click="dialogVisible = false" class="commonbutton">关闭</el-button> |
|
|
|
<el-button @click="recover.dialog = false" class="commonbutton">关闭</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
@ -149,7 +152,16 @@ export default { |
|
|
|
tableData: [], //列表数据 |
|
|
|
multipleSelection: [], //选中的数据列表 |
|
|
|
tableDataCurrentRow:{}, // 单行选中的行 |
|
|
|
dialogVisible: false, |
|
|
|
|
|
|
|
// 体检表回收 |
|
|
|
recover: { |
|
|
|
dialog: false, |
|
|
|
recoverType: '0', //回收类型 0-条码号 1-档案号 |
|
|
|
barcode: '', // 条码号或档案号 |
|
|
|
barcodes: [], // 条码号或档案号集合 |
|
|
|
isRecoverGuide: 'Y', //状态 Y-回收,N-取消回收 |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
patientRegisterNo: '', |
|
|
|
|
|
|
|
@ -242,29 +254,41 @@ export default { |
|
|
|
this.tableDataCurrentRow = row |
|
|
|
}, |
|
|
|
|
|
|
|
// 回收表提交 |
|
|
|
// 回收表提交 Y-回收,N-取消 |
|
|
|
recoverCore(body) { |
|
|
|
postapi(`/api/app/patientregister/updaterecoverguidemany`, body) |
|
|
|
// postapi(`/api/app/patientregister/updaterecoverguidemany`, body) |
|
|
|
// .then((res) => { |
|
|
|
// if (res.code > -1) { |
|
|
|
// this.$message.success({ showClose: true, message: "操作成功!"}); |
|
|
|
// // 刷新页面回收状态 |
|
|
|
// if(this.multipleSelection.length > 0){ |
|
|
|
// this.multipleSelection.forEach(e => { |
|
|
|
// e.isRecoverGuide = 'Y' |
|
|
|
// }); |
|
|
|
// }else{ |
|
|
|
// let lfind = arrayExistObj(this.tableData,'id',body[0].id) |
|
|
|
// if(lfind > -1){ |
|
|
|
// this.tableData[lfind].isRecoverGuide = 'Y' |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }) |
|
|
|
postapi('/api/app/PatientRegister/BatchRecoverGuide', body) |
|
|
|
.then((res) => { |
|
|
|
if (res.code > -1) { |
|
|
|
this.$message.success({ showClose: true, message: "操作成功!"}); |
|
|
|
// 刷新页面回收状态 |
|
|
|
if(this.multipleSelection.length > 0){ |
|
|
|
this.multipleSelection.forEach(e => { |
|
|
|
e.isRecoverGuide = 'Y' |
|
|
|
this.$message.success({ showClose: true, message: '操作成功!' }) |
|
|
|
let key = body.recoverType == '0' ? 'patientRegisterNo':'patientNo' |
|
|
|
let lfind = -1 |
|
|
|
body.barcodes.forEach(e => { |
|
|
|
lfind = arrayExistObj(this.tableData,key,e) |
|
|
|
if(lfind > -1) this.tableData[lfind].isRecoverGuide = body.isRecoverGuide |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
let lfind = arrayExistObj(this.tableData,'id',body[0].id) |
|
|
|
if(lfind > -1){ |
|
|
|
this.tableData[lfind].isRecoverGuide = 'Y' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//选中人员记录回收 |
|
|
|
btnRecover() { |
|
|
|
btnRecover(isRecoverGuide) { |
|
|
|
// 有勾选,则操作勾选的,无勾选则按选中的记录 |
|
|
|
let selectedRds = [] |
|
|
|
selectedRds = selectedRds.concat(this.multipleSelection) |
|
|
|
@ -276,9 +300,13 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
let body = [] |
|
|
|
let body = { |
|
|
|
recoverType:'0', |
|
|
|
isRecoverGuide, |
|
|
|
barcodes:[] |
|
|
|
} |
|
|
|
selectedRds.forEach(e => { |
|
|
|
body.push(e.id) |
|
|
|
body.barcodes.push(e.patientRegisterNo) |
|
|
|
}); |
|
|
|
|
|
|
|
this.recoverCore(body) |
|
|
|
@ -287,8 +315,8 @@ export default { |
|
|
|
|
|
|
|
// 点击扫码回收体检表按钮 |
|
|
|
btnScanRecover() { |
|
|
|
this.patientRegisterNo = '' |
|
|
|
this.dialogVisible = true |
|
|
|
this.recover.barcode = '' |
|
|
|
this.recover.dialog = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['tmh'].focus(); //打开光标定位到条码栏里 |
|
|
|
}); |
|
|
|
@ -296,18 +324,31 @@ export default { |
|
|
|
|
|
|
|
//按条码号查个人数据 |
|
|
|
signByPatientRegisterNo() { |
|
|
|
let patientRegisterNos = [this.patientRegisterNo] |
|
|
|
let body = { |
|
|
|
patientRegisterNos |
|
|
|
} |
|
|
|
//console.log(`/api/app/patientregister/getpatientregisterorpatient`, body) |
|
|
|
postapi('/api/app/PatientRegister/BatchRecoverGuideByPatientRegisterNo', body) |
|
|
|
// let patientRegisterNos = [this.patientRegisterNo] |
|
|
|
// let body = { |
|
|
|
// patientRegisterNos |
|
|
|
// } |
|
|
|
// //console.log(`/api/app/patientregister/getpatientregisterorpatient`, body) |
|
|
|
// postapi('/api/app/PatientRegister/BatchRecoverGuideByPatientRegisterNo', body) |
|
|
|
// .then((res) => { |
|
|
|
// if (res.code > -1) { |
|
|
|
// this.$message.success({ showClose: true, message: '操作成功!' }) |
|
|
|
// //let lfind = arrayExistObj() |
|
|
|
// this.recover.barcode = '' |
|
|
|
// } |
|
|
|
// }); |
|
|
|
this.recover.barcodes = [this.recover.barcode] |
|
|
|
postapi('/api/app/PatientRegister/BatchRecoverGuide', this.recover) |
|
|
|
.then((res) => { |
|
|
|
if (res.code > -1) { |
|
|
|
this.patientRegisterNo = '' |
|
|
|
this.$message.success({ showClose: true, message: '操作成功!' }) |
|
|
|
let key = this.recover.recoverType == '0' ? 'patientRegisterNo':'patientNo' |
|
|
|
let lfind = arrayExistObj(this.tableData,key,this.recover.barcode) |
|
|
|
if(lfind > -1) this.tableData[lfind].isRecoverGuide = this.recover.isRecoverGuide |
|
|
|
this.recover.barcode = '' |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
ldddw(arrayData, key, value, display) { |
|
|
|
|