You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

301 lines
11 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div style="display: flex">
  3. <div :style="'width:' + (window.pageWidth - 200 - 120 - 70) + 'px;'">
  4. <el-table :data="dataList" border width="100%"
  5. :height="window.pageHeight < 600 ? 350:window.pageHeight-250"
  6. row-key="id" size="small"
  7. highlight-current-row ref="dataList"
  8. @selection-change="handleSelectionChange">
  9. <el-table-column type="selection" width="40"/>
  10. <el-table-column prop="isRecoverGuide" label="回收" width="50">
  11. <template slot-scope="scope">
  12. <el-checkbox :value="scope.row.isRecoverGuide == 'Y'" />
  13. </template>
  14. </el-table-column>
  15. <el-table-column prop="completeFlag" label="体检进度">
  16. <template slot-scope="scope">
  17. <div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  18. </template>
  19. </el-table-column>
  20. <el-table-column prop="isLock" label="锁住" width="50">
  21. <template slot-scope="scope">
  22. <div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
  23. </template>
  24. </el-table-column>
  25. <el-table-column prop="customerOrgParentName" label="单位" width="180">
  26. <template slot-scope="scope">
  27. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
  28. </template>
  29. </el-table-column>
  30. <el-table-column prop="customerOrgName" label="部门" width="180">
  31. <template slot-scope="scope">
  32. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
  33. </template>
  34. </el-table-column>
  35. <el-table-column prop="patientName" label="姓名" />
  36. <el-table-column prop="sexId" label="性别">
  37. <template slot-scope="scope">
  38. <div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
  39. </template>
  40. </el-table-column>
  41. <el-table-column prop="age" label="年龄" />
  42. <el-table-column prop="patientRegisterNo" label="条码号" width="150" />
  43. <el-table-column prop="patientNo" label="档案号" />
  44. <el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
  45. <el-table-column label="分组/套餐" width="150">
  46. <template slot-scope="scope">
  47. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  48. {{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
  49. </div>
  50. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  51. {{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
  52. </div>
  53. </template>
  54. </el-table-column>
  55. <el-table-column prop="nationId" label="民族">
  56. <template slot-scope="scope">
  57. <div>
  58. {{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
  59. </div>
  60. </template>
  61. </el-table-column>
  62. <el-table-column prop="idNo" label="身份证" width="150" />
  63. <el-table-column prop="birthDate" label="出生日期" width="100">
  64. <template slot-scope="scope">
  65. <div v-if="scope.row.birthDate">
  66. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  67. </div>
  68. </template>
  69. </el-table-column>
  70. <el-table-column prop="email" label="邮箱" width="100" />
  71. <el-table-column prop="mobileTelephone" label="手机" width="100" />
  72. <el-table-column prop="telephone" label="电话" width="100" />
  73. <el-table-column prop="address" label="地址" width="300" />
  74. <el-table-column prop="medicalCardNo" label="体检卡号" />
  75. <el-table-column prop="jobCardNo" label="工卡号" />
  76. <el-table-column prop="maritalStatusId" label="婚姻状况">
  77. <template slot-scope="scope">
  78. <div>
  79. {{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  80. </div>
  81. </template>
  82. </el-table-column>
  83. <el-table-column prop="medicalTypeId" label="体检类别">
  84. <template slot-scope="scope">
  85. <div v-if="scope.row.medicalTypeId !== dict.personOrgId">
  86. {{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
  87. </div>
  88. </template>
  89. </el-table-column>
  90. <el-table-column prop="personnelTypeId" label="人员类别">
  91. <template slot-scope="scope">
  92. <div v-if="scope.row.personnelTypeId !== dict.personOrgId">
  93. {{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
  94. </div>
  95. </template>
  96. </el-table-column>
  97. <el-table-column prop="jobPost" label="职务" />
  98. <el-table-column prop="jobTitle" label="职称" />
  99. <el-table-column prop="salesman" label="介绍人" />
  100. <el-table-column prop="isVip" label="是否VIP">
  101. <template slot-scope="scope">
  102. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  103. </template>
  104. </el-table-column>
  105. <el-table-column prop="creatorName" label="登记人" />
  106. <el-table-column prop="creationTime" label="登记日期" width="100">
  107. <template slot-scope="scope">
  108. <div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column prop="isUpload" label="是否上传">
  112. <template slot-scope="scope">
  113. <div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
  114. </template>
  115. </el-table-column>
  116. </el-table>
  117. </div>
  118. <div style="margin-left: 10px;width:110px;">
  119. <div class="listBtn">
  120. <el-button type="success" class="btnClass" @click="recover">回收表单</el-button>
  121. </div>
  122. <div class="listBtn">
  123. <el-button type="primary" class="btnClass" @click="scanRecover">扫码回收</el-button>
  124. </div>
  125. </div>
  126. <el-dialog title="扫/输入条码签到" :visible.sync="dialogVisible">
  127. <el-form :model="form">
  128. <el-form-item label="条码" label-width="100px">
  129. <el-input v-model="form.patientRegisterNo" @change="signByPatientRegisterNo"></el-input>
  130. </el-form-item>
  131. </el-form>
  132. <div slot="footer" class="dialog-footer">
  133. <el-button @click="dialogVisible = false">关闭</el-button>
  134. <el-button type="primary" @click="signByPatientRegisterNo">确定</el-button>
  135. </div>
  136. </el-dialog>
  137. </div>
  138. </template>
  139. <script>
  140. import moment from "moment";
  141. import { mapState, mapActions } from "vuex";
  142. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  143. import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
  144. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  145. import Camera from "../../components/patientRegister/Camera.vue";
  146. export default {
  147. components: {
  148. PatientRegisterEdit,
  149. Camera,
  150. },
  151. data() {
  152. return {
  153. dataList: [], //列表数据
  154. multipleSelection: [], //选中的数据列表
  155. dialogVisible: false,
  156. form:{
  157. patientRegisterNo:''
  158. }
  159. };
  160. },
  161. created() { },
  162. //挂载完成
  163. mounted() { },
  164. computed: {
  165. ...mapState(["window","dict", "patientRegister", "customerOrg"]),
  166. },
  167. methods: {
  168. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  169. handleSelectionChange(val) {
  170. this.multipleSelection = val;
  171. },
  172. recoverCore(body){
  173. postapi(`/api/app/patientregister/updaterecoverguidemany`, body)
  174. .then((res) => {
  175. if (res.code != -1){
  176. this.$message.success("操作成功");
  177. }
  178. })
  179. .catch((err) => {
  180. this.$message({type: "error",message: "操作失败,原因:" + err});
  181. });
  182. },
  183. //选中人员签到
  184. recover() {
  185. if (!this.multipleSelection || this.multipleSelection.length < 1 ) {
  186. alert("请选择体检人员,再进行此操作");
  187. return;
  188. }
  189. let body = []
  190. this.multipleSelection.forEach(e =>{
  191. body.push(e.id)
  192. });
  193. this.recoverCore(body)
  194. },
  195. scanRecover(){
  196. this.dialogVisible = true
  197. },
  198. //按条码号查个人数据
  199. signByPatientRegisterNo() {
  200. let val = this.form.patientRegisterNo
  201. console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
  202. getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
  203. .then((res) => {
  204. if (res.code != -1) {
  205. if(res.data){
  206. this.recoverCore([res.data.id])
  207. this.form.patientRegisterNo = ''
  208. }
  209. }
  210. });
  211. },
  212. ldddw(arrayData, key, value, display) {
  213. return dddw(arrayData, key, value, display);
  214. },
  215. lmoment(date, forMat) {
  216. return moment(new Date(date)).format(forMat);
  217. },
  218. //查询
  219. query() {
  220. let body = {}
  221. console.log(`this.patientRegister.query`, this.patientRegister.query)
  222. if (this.patientRegister.query.customerOrgFlag) {
  223. if (this.patientRegister.query.CustomerOrgParentId) {
  224. body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
  225. } else{
  226. if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
  227. }
  228. }
  229. if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
  230. if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
  231. if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
  232. //StartDate EndDate
  233. if (this.patientRegister.query.dateRange) {
  234. body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
  235. body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
  236. }
  237. if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
  238. if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
  239. if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
  240. console.log('/api/app/patientregister/getlistinfilter', body)
  241. postapi('/api/app/patientregister/getlistinfilter', body)
  242. .then((res) => {
  243. if(res.code != - 1){
  244. this.dataList = res.data.items;
  245. }
  246. });
  247. },
  248. },
  249. //监听事件
  250. watch: {
  251. //触发查询事件
  252. "patientRegister.query.times"(newVal, oldVal) {
  253. if (newVal != oldVal) {
  254. //alert('触发查询事件')
  255. this.query();
  256. }
  257. },
  258. },
  259. };
  260. </script>
  261. <style scoped>
  262. .box {
  263. display: flex;
  264. }
  265. .listBtn {
  266. margin-top: 10px;
  267. text-align: center;
  268. }
  269. .btnClass{
  270. width:110px;
  271. }
  272. </style>