|
|
@ -1,18 +1,14 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div style="display: flex;"> |
|
|
<div style="display: flex;"> |
|
|
|
|
|
|
|
|
<div :style="'padding: 15px;background-color: #fff;border-radius: 8px;width:' + (window.pageWidth - 200 - 110 - 65) + 'px;'"> |
|
|
|
|
|
<el-table :data="dataList" width="100%" |
|
|
|
|
|
:height="window.pageHeight < 600 ? 350:window.pageHeight-245" |
|
|
|
|
|
row-key="id" size="small" |
|
|
|
|
|
highlight-current-row ref="dataList" |
|
|
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
|
|
<el-table-column type="selection" width="40"/> |
|
|
|
|
|
|
|
|
<div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'"> |
|
|
|
|
|
<el-table :data="dataList" width="100%" :height="window.pageHeight < 600 ? 350 : window.pageHeight - 220" row-key="id" |
|
|
|
|
|
size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange" @row-click="rowClick"> |
|
|
|
|
|
<el-table-column type="selection" width="40" align="center" /> |
|
|
<el-table-column prop="isRecoverGuide" label="回收" width="50"> |
|
|
<el-table-column prop="isRecoverGuide" label="回收" width="50"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-checkbox :value="scope.row.isRecoverGuide == 'Y'" /> |
|
|
<el-checkbox :value="scope.row.isRecoverGuide == 'Y'" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column prop="completeFlag" label="体检进度"> |
|
|
<el-table-column prop="completeFlag" label="体检进度"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div> |
|
|
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div> |
|
|
@ -25,7 +21,8 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="customerOrgParentName" label="单位" width="180"> |
|
|
<el-table-column prop="customerOrgParentName" label="单位" width="180"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div> |
|
|
|
|
|
|
|
|
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }} |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="customerOrgName" label="部门" width="180"> |
|
|
<el-table-column prop="customerOrgName" label="部门" width="180"> |
|
|
@ -119,30 +116,30 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-left: 10px;"> |
|
|
<div style="margin-left: 10px;"> |
|
|
<div class="listBtn"> |
|
|
<div class="listBtn"> |
|
|
<el-button type="success" class="commonbutton" @click="recover">回收表单</el-button> |
|
|
|
|
|
|
|
|
<el-button type="success" class="commonbutton" @click="btnRecover">回收表单</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="listBtn"> |
|
|
<div class="listBtn"> |
|
|
<el-button type="primary" class="commonbutton" @click="scanRecover">扫码回收</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<el-button type="primary" class="commonbutton" @click="btnScanRecover">扫码回收</el-button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<el-dialog title="扫/输入条码签到" :visible.sync="dialogVisible"> |
|
|
|
|
|
<el-form :model="form"> |
|
|
|
|
|
<el-form-item label="条码" label-width="100px"> |
|
|
|
|
|
<el-input v-model="form.patientRegisterNo" @change="signByPatientRegisterNo"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
<el-dialog title="扫/输入条码回收体检表(指引单)" :visible.sync="dialogVisible" width="400" :append-to-body="true" |
|
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
|
<div class="query"> |
|
|
|
|
|
<span class="spanClass">条码号</span> |
|
|
|
|
|
<el-input ref="tmh" v-model="patientRegisterNo" @change="signByPatientRegisterNo"></el-input> |
|
|
|
|
|
</div> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button @click="dialogVisible = false" class="commonbutton">关闭</el-button> |
|
|
|
|
|
<el-button type="primary" @click="signByPatientRegisterNo" class="commonbutton">确定</el-button> |
|
|
<el-button type="primary" @click="signByPatientRegisterNo" class="commonbutton">确定</el-button> |
|
|
|
|
|
<el-button @click="dialogVisible = false" class="commonbutton">关闭</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import { mapState, mapActions } from "vuex"; |
|
|
import { mapState, mapActions } from "vuex"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc"; |
|
|
|
|
|
|
|
|
import { dddw, objCopy, arrayReduce,arrayExistObj } from "@/utlis/proFunc"; |
|
|
|
|
|
|
|
|
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue"; |
|
|
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue"; |
|
|
import Camera from "../../components/patientRegister/Camera.vue"; |
|
|
import Camera from "../../components/patientRegister/Camera.vue"; |
|
|
@ -156,10 +153,11 @@ export default { |
|
|
return { |
|
|
return { |
|
|
dataList: [], //列表数据 |
|
|
dataList: [], //列表数据 |
|
|
multipleSelection: [], //选中的数据列表 |
|
|
multipleSelection: [], //选中的数据列表 |
|
|
dialogVisible: false, |
|
|
|
|
|
form:{ |
|
|
|
|
|
patientRegisterNo:'' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
selectedRow:{}, // 单行选中的行 |
|
|
|
|
|
dialogVisible: false, |
|
|
|
|
|
|
|
|
|
|
|
patientRegisterNo: '' |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -168,7 +166,7 @@ export default { |
|
|
//挂载完成 |
|
|
//挂载完成 |
|
|
mounted() { }, |
|
|
mounted() { }, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapState(["window","dict", "patientRegister", "customerOrg"]), |
|
|
|
|
|
|
|
|
...mapState(["window", "dict", "patientRegister", "customerOrg"]), |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), |
|
|
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), |
|
|
@ -177,54 +175,79 @@ export default { |
|
|
this.multipleSelection = val; |
|
|
this.multipleSelection = val; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
recoverCore(body){ |
|
|
|
|
|
|
|
|
rowClick(row){ |
|
|
|
|
|
this.selectedRow = row |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 回收表提交 |
|
|
|
|
|
recoverCore(body) { |
|
|
postapi(`/api/app/patientregister/updaterecoverguidemany`, body) |
|
|
postapi(`/api/app/patientregister/updaterecoverguidemany`, body) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
if (res.code != -1){ |
|
|
|
|
|
console.log("操作成功"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
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.dataList,'id',body[0].id) |
|
|
|
|
|
if(lfind > -1){ |
|
|
|
|
|
this.dataList[lfind].isRecoverGuide = 'Y' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
|
|
|
this.$message.error({ showClose: true, message: "操作失败,原因:" + err}); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//选中人员签到 |
|
|
|
|
|
recover() { |
|
|
|
|
|
if (!this.multipleSelection || this.multipleSelection.length < 1 ) { |
|
|
|
|
|
this.$message.error({ showClose: true, message: "请选择体检人员,再进行此操作"}); |
|
|
|
|
|
|
|
|
//选中人员记录回收 |
|
|
|
|
|
btnRecover() { |
|
|
|
|
|
// 有勾选,则操作勾选的,无勾选则按选中的记录 |
|
|
|
|
|
let selectedRds = [] |
|
|
|
|
|
selectedRds = selectedRds.concat(this.multipleSelection) |
|
|
|
|
|
if(selectedRds.length == 0){ |
|
|
|
|
|
if(this.selectedRow.id) selectedRds.push(this.selectedRow) |
|
|
|
|
|
} |
|
|
|
|
|
if (selectedRds.length == 0) { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: "请勾选择或选中体检人员,再进行此操作" }); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let body = [] |
|
|
let body = [] |
|
|
this.multipleSelection.forEach(e =>{ |
|
|
|
|
|
|
|
|
selectedRds.forEach(e => { |
|
|
body.push(e.id) |
|
|
body.push(e.id) |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.recoverCore(body) |
|
|
this.recoverCore(body) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
scanRecover(){ |
|
|
|
|
|
|
|
|
// 点击扫码回收体检表按钮 |
|
|
|
|
|
btnScanRecover() { |
|
|
|
|
|
this.patientRegisterNo = '' |
|
|
this.dialogVisible = true |
|
|
this.dialogVisible = true |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs['tmh'].focus(); //打开光标定位到条码栏里 |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//按条码号查个人数据 |
|
|
//按条码号查个人数据 |
|
|
signByPatientRegisterNo() { |
|
|
signByPatientRegisterNo() { |
|
|
let patientRegisterNo = this.form.patientRegisterNo |
|
|
|
|
|
|
|
|
let patientRegisterNo = this.patientRegisterNo |
|
|
let body = { |
|
|
let body = { |
|
|
sType:1, |
|
|
|
|
|
|
|
|
sType: 1, |
|
|
patientRegisterNo |
|
|
patientRegisterNo |
|
|
} |
|
|
|
|
|
console.log(`/api/app/patientregister/getpatientregisterorpatient`,body) |
|
|
|
|
|
postapi('/api/app/patientregister/getpatientregisterorpatient',body) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
if(res.data){ |
|
|
|
|
|
this.recoverCore([res.data.id]) |
|
|
|
|
|
this.form.patientRegisterNo = '' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//console.log(`/api/app/patientregister/getpatientregisterorpatient`, body) |
|
|
|
|
|
postapi('/api/app/patientregister/getpatientregisterorpatient', body) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.recoverCore([res.data.id]) |
|
|
|
|
|
this.patientRegisterNo = '' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
ldddw(arrayData, key, value, display) { |
|
|
ldddw(arrayData, key, value, display) { |
|
|
@ -238,14 +261,14 @@ export default { |
|
|
//查询 |
|
|
//查询 |
|
|
query() { |
|
|
query() { |
|
|
let body = {} |
|
|
let body = {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(`this.patientRegister.query`, this.patientRegister.query) |
|
|
console.log(`this.patientRegister.query`, this.patientRegister.query) |
|
|
if (this.patientRegister.query.customerOrgFlag) { |
|
|
if (this.patientRegister.query.customerOrgFlag) { |
|
|
if (this.patientRegister.query.CustomerOrgParentId) { |
|
|
if (this.patientRegister.query.CustomerOrgParentId) { |
|
|
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId |
|
|
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId |
|
|
} else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId |
|
|
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex |
|
|
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex |
|
|
@ -258,8 +281,8 @@ export default { |
|
|
if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) { |
|
|
if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) { |
|
|
body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") |
|
|
body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") |
|
|
body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") |
|
|
body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") |
|
|
if(body.startDate > body.endDate){ |
|
|
|
|
|
this.$message.warning({ showClose: true, message: "起始日期不能大于截止日期,数据校验不通过!"}) |
|
|
|
|
|
|
|
|
if (body.startDate > body.endDate) { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: "起始日期不能大于截止日期,数据校验不通过!" }) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -272,23 +295,14 @@ export default { |
|
|
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo } |
|
|
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('/api/app/patientregister/getlistinfilter', body) |
|
|
|
|
|
const loading = this.$loading({ |
|
|
|
|
|
lock: true, |
|
|
|
|
|
text: 'Loading', |
|
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
//console.log('/api/app/patientregister/getlistinfilter', body) |
|
|
|
|
|
|
|
|
postapi('/api/app/patientregister/getlistinfilter', body) |
|
|
postapi('/api/app/patientregister/getlistinfilter', body) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
if(res.code != - 1){ |
|
|
|
|
|
|
|
|
if (res.code != - 1) { |
|
|
this.dataList = res.data.items; |
|
|
this.dataList = res.data.items; |
|
|
} |
|
|
} |
|
|
loading.close(); |
|
|
|
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
|
|
|
loading.close(); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -301,7 +315,7 @@ export default { |
|
|
this.query(); |
|
|
this.query(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
@ -310,7 +324,18 @@ export default { |
|
|
margin-top: 10px; |
|
|
margin-top: 10px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.btnClass{ |
|
|
|
|
|
width:100px; |
|
|
|
|
|
|
|
|
.btnClass { |
|
|
|
|
|
width: 100px; |
|
|
|
|
|
} |
|
|
|
|
|
.query { |
|
|
|
|
|
margin-right: 10px; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
color: #232748; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
font-family: "NotoSansSC-Regular"; |
|
|
|
|
|
} |
|
|
|
|
|
.spanClass { |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
padding: 0 2px 0 0; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |