Browse Source

recover

master
pengjun 2 years ago
parent
commit
56ac304120
  1. 294
      src/components/patientRegister/PatientRegisterRecoverList.vue
  2. 181
      src/views/customerOrg/patientRegisterRecover.vue

294
src/components/patientRegister/PatientRegisterRecoverList.vue

@ -0,0 +1,294 @@
<template>
<div>
<div style="display: flex">
<el-table :data="dataList" border width="100%" height="700" row-key="id" size="small"
highlight-current-row ref="dataList"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="40"/>
<el-table-column prop="isRecoverGuide" label="回收" width="50">
<template slot-scope="scope">
<el-checkbox :value="scope.row.isRecoverGuide == 'Y'" />
</template>
</el-table-column>
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="isLock" label="锁住" width="50">
<template slot-scope="scope">
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgParentName" label="单位" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgName" label="部门" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
</template>
</el-table-column>
<el-table-column prop="patientName" label="姓名" />
<el-table-column prop="sexId" label="性别">
<template slot-scope="scope">
<div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="age" label="年龄" />
<el-table-column prop="patientRegisterNo" label="条码号" width="150" />
<el-table-column prop="patientNo" label="档案号" />
<el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
<el-table-column label="分组/套餐" width="150">
<template slot-scope="scope">
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
{{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
</div>
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
{{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="nationId" label="民族">
<template slot-scope="scope">
<div>
{{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="idNo" label="身份证" width="150" />
<el-table-column prop="birthDate" label="出生日期" width="100">
<template slot-scope="scope">
<div v-if="scope.row.birthDate">
{{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="email" label="邮箱" width="100" />
<el-table-column prop="mobileTelephone" label="手机" width="100" />
<el-table-column prop="telephone" label="电话" width="100" />
<el-table-column prop="address" label="地址" width="300" />
<el-table-column prop="medicalCardNo" label="体检卡号" />
<el-table-column prop="jobCardNo" label="工卡号" />
<el-table-column prop="maritalStatusId" label="婚姻状况">
<template slot-scope="scope">
<div>
{{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="medicalTypeId" label="体检类别">
<template slot-scope="scope">
<div v-if="scope.row.medicalTypeId !== dict.personOrgId">
{{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="personnelTypeId" label="人员类别">
<template slot-scope="scope">
<div v-if="scope.row.personnelTypeId !== dict.personOrgId">
{{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="jobPost" label="职务" />
<el-table-column prop="jobTitle" label="职称" />
<el-table-column prop="salesman" label="介绍人" />
<el-table-column prop="isVip" label="是否VIP">
<template slot-scope="scope">
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" />
<el-table-column prop="creationTime" label="登记日期" width="100">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
</template>
</el-table-column>
<el-table-column prop="isUpload" label="是否上传">
<template slot-scope="scope">
<div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
</el-table>
<div style="margin-left: 10px">
<div class="listBtn">
<el-button type="success" @click="recover">回收表单</el-button>
</div>
<div class="listBtn">
<el-button type="primary" @click="scanRecover">扫码回收</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>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
<el-button type="primary" @click="signByPatientRegisterNo">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
export default {
components: {
PatientRegisterEdit,
Camera,
},
data() {
return {
dataList: [], //
multipleSelection: [], //
dialogVisible: false,
form:{
patientRegisterNo:''
}
};
},
created() { },
//
mounted() { },
computed: {
...mapState(["dict", "patientRegister", "customerOrg"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
handleSelectionChange(val) {
this.multipleSelection = val;
},
recoverCore(body){
postapi(`/api/app/patientregister/updaterecoverguidemany`, body)
.then((res) => {
if (res.code != -1){
this.$message.success("操作成功");
}
})
.catch((err) => {
this.$message({type: "error",message: "操作失败,原因:" + err});
});
},
//
recover() {
if (!this.multipleSelection || this.multipleSelection.length < 1 ) {
alert("请选择体检人员,再进行此操作");
return;
}
let body = []
this.multipleSelection.forEach(e =>{
body.push(e.id)
});
this.recoverCore(body)
},
scanRecover(){
this.dialogVisible = true
},
//
signByPatientRegisterNo() {
let val = this.form.patientRegisterNo
console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
.then((res) => {
if (res.code != -1) {
if(res.data){
this.recoverCore([res.data.id])
this.form.patientRegisterNo = ''
}
}
});
},
ldddw(arrayData, key, value, display) {
return dddw(arrayData, key, value, display);
},
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat);
},
//
query() {
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
if (this.patientRegister.query.CustomerOrgParentId) {
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
} else{
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.patientName) body.patientName = this.patientRegister.query.patientName
if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
//StartDate EndDate
if (this.patientRegister.query.dateRange) {
body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
}
if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
console.log('/api/app/patientregister/getlistinfilter', body)
postapi('/api/app/patientregister/getlistinfilter', body)
.then((res) => {
this.dataList = res.data;
});
},
},
//
watch: {
//
"patientRegister.query.times"(newVal, oldVal) {
if (newVal != oldVal) {
//alert('')
this.query();
}
},
},
};
</script>
<style scoped>
.box {
display: flex;
}
.listBtn {
margin-top: 10px;
}
</style>

181
src/views/customerOrg/patientRegisterRecover.vue

@ -1,26 +1,19 @@
<template> <template>
<div class="box"> <div class="box">
<div>
<el-card style="width: 98%">
<div style="width: 100%">
<el-card>
<div style="display: flex"> <div style="display: flex">
<!-- 单位树组件 --> <!-- 单位树组件 -->
<div style="width: 15%; border: 1px solid"> <div style="width: 15%; border: 1px solid">
<CustomerOrgTreeAll /> <CustomerOrgTreeAll />
</div> </div>
<div style="width: 85%">
<!-- 单位详情 录入与编辑 -->
<CustomerOrgEdit />
<!-- 体检次数 联系人 -->
<el-tabs style="margin-left: 10px">
<!-- 体检次数 -->
<el-tab-pane label="组合项目" name="first">
<PatientRegisterAsbItem />
</el-tab-pane>
<!-- 联系人 -->
<el-tab-pane label="基本信息" name="second">
</el-tab-pane>
</el-tabs>
<div style="margin-left: 10px; width: 85%">
<!-- 查询条件 -->
<PatientRegisterQuery />
<!-- 人员列表信息 -->
<PatientRegisterRecoverList />
</div> </div>
</div> </div>
</el-card> </el-card>
@ -28,27 +21,167 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate } from "../../utlis/proFunc";
import CustomerOrgTreeAll from "../../components/patientRegister/customerOrgTreeAll.vue"; import CustomerOrgTreeAll from "../../components/patientRegister/customerOrgTreeAll.vue";
import CustomerOrgEdit from "../../components/patientRegisterSign/customerOrgEdit.vue";
import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
import PatientRegisterQuery from "../../components/patientRegister/patientRegisterQuery.vue";
import PatientRegisterRecoverList from "../../components/patientRegister/PatientRegisterRecoverList.vue";
export default { export default {
components: { components: {
CustomerOrgTreeAll, CustomerOrgTreeAll,
CustomerOrgEdit,
PatientRegisterAsbItem,
PatientRegisterQuery,
PatientRegisterRecoverList,
}, },
data() { data() {
return {};
return {
tabChoosed: "1",
};
}, },
created() {}, created() {},
// //
mounted() {},
mounted() {
this.dictInit();
},
computed: {
...mapState(["dict", "patientRegister", "customerOrg"]),
},
methods: {
...mapActions(["getCustomerOrgGroup"]),
//
dictInit() {
//
getapi("/api/app/sex").then((res) => {
if (res.code == 1) {
this.dict.sex = res.data;
}
});
//
getapi("/api/app/for-sex").then((res) => {
if (res.code == 1) {
this.dict.forSex = res.data;
}
});
//
getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
(res) => {
if (res.code == 1) {
this.dict.organization = res.data;
}
}
);
//
getapi("/api/app/customer-org/in-filter").then((res) => {
if (res.code == 1) {
this.dict.customerOrg = res.data.items;
}
});
//
getapi("/api/app/medical-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.medicalType = res.data.items;
}
});
//
getapi("/api/app/personnel-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.personnelType = res.data.items;
}
});
methods: {},
//
getapi("/api/app/marital-statuses").then((res) => {
if (res.code == 1) {
this.dict.maritalStatus = res.data.items;
}
});
//
getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
if (res.code == 1) {
this.dict.sexHormoneTerm = res.data.items;
}
});
//
getapi("/api/app/nation/in-filter").then((res) => {
if (res.code == 1) {
this.dict.nation = res.data.items;
}
});
//
getapi("/api/app/birth-place/in-filter").then((res) => {
if (res.code == 1) {
this.dict.birthPlace = res.data.items;
}
});
//
getapi("/api/app/medical-package/in-filter").then((res) => {
if (res.code == 1) {
this.dict.medicalPackage = res.data.items;
}
});
//
getapi("/api/app/customer-org-group").then((res) => {
if (res.code == 1) {
this.dict.customerOrgGroupAll = res.data.items;
}
});
//
getapi("/api/app/pay-mode").then((res) => {
if (res.code == 1) {
this.dict.payMode = res.data;
}
});
//
getapi("/api/app/item-type/by-code-all").then((res) => {
if (res.code == 1) {
this.dict.itemTypeTree = res.data;
tcdate(this.dict.itemTypeTree);
}
});
getapi("/api/app/asbitem/in-filter?Filter").then((res) => {
if (res.code == 1) {
this.dict.asbItemAll = res.data.items;
}
});
console.log("dict", this.dict);
},
},
//()
watch: {
//1
"patientRegister.query.CustomerOrgParentId"(newVal, oldVal) {
console.log(
"watch patientRegister.query.CustomerOrgParentId newVal:",
newVal,
" oldVal:",
oldVal
);
if (newVal != oldVal && newVal !== this.dict.personOrgId) {
this.getCustomerOrgGroup(newVal);
}
},
},
}; };
</script> </script>
<style scoped> <style scoped>

Loading…
Cancel
Save