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.

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