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.

3742 lines
146 KiB

3 years ago
3 years ago
2 years ago
3 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 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
5 months ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
5 months ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
5 months ago
5 months ago
5 months ago
3 years ago
3 years ago
2 years ago
3 years ago
5 months ago
3 years ago
2 years ago
2 years ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 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
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 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
6 months ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
6 months ago
6 months ago
6 months ago
6 months ago
2 years ago
3 years ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
5 months ago
2 years ago
2 years ago
5 months ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 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
6 months ago
5 months ago
6 months ago
6 months ago
6 months ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
11 months ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
11 months ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 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
6 months ago
5 months ago
6 months ago
5 months ago
3 years ago
11 months 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
11 months ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 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
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
11 months ago
5 months ago
2 years ago
11 months ago
6 months ago
11 months ago
6 months ago
2 years ago
5 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
5 months 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
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
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
2 years ago
11 months ago
5 months ago
11 months ago
2 years ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
2 years ago
11 months ago
2 years ago
11 months ago
2 years ago
11 months ago
2 years ago
11 months ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
11 months ago
5 months ago
11 months ago
2 years ago
11 months ago
2 years ago
11 months ago
2 years ago
11 months ago
5 months ago
11 months ago
2 years ago
11 months ago
5 months ago
2 years ago
11 months ago
5 months ago
11 months ago
2 years ago
11 months ago
6 months ago
11 months ago
5 months ago
11 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
11 months ago
2 years ago
11 months ago
3 years ago
11 months ago
2 years ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
5 months ago
2 years ago
11 months ago
5 months ago
11 months ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
5 months ago
5 months ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
5 months ago
2 years ago
5 months ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
5 months ago
2 years ago
5 months ago
3 years ago
3 years ago
5 months ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
5 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 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
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
3 years ago
3 years ago
5 months ago
5 months ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
4 months ago
5 months ago
5 months ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 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
3 years ago
5 months ago
2 years ago
5 months 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
5 months ago
3 years ago
3 years ago
3 years ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
2 years ago
1 year ago
11 months ago
2 years ago
11 months ago
11 months ago
11 months ago
2 years ago
11 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
5 months ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
2 years ago
6 months ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
6 months 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
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
6 months ago
3 years ago
2 years ago
6 months 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
6 months ago
2 years ago
6 months ago
2 years ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
6 months ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
6 months 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
6 months ago
2 years ago
2 years ago
11 months ago
2 years ago
2 years ago
2 years ago
2 years ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
11 months ago
2 years ago
2 years ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months 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
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
11 months ago
2 years ago
11 months ago
3 years ago
3 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
3 years ago
3 years ago
2 years ago
2 years ago
1 year ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
  1. <template>
  2. <div>
  3. <!--组件主体-->
  4. <div style="display: flex">
  5. <div :style="'width:' + (window.pageWidth - 110 - 20) + 'px;'">
  6. <!--查询条件-->
  7. <div style="position: absolute;top:28px;left:140px;display: flex;">
  8. <div v-show="checkPagePriv(pagePriv.privs, '查找')">
  9. <PatientRegisterEditQuery />
  10. </div>
  11. <div style="display: flex;margin-left: 5px;">
  12. <div v-show="checkPagePriv(pagePriv.privs, '职业病')">
  13. <el-button @click="btnOcc" class="commonbutton" style="width:60px;">职业病</el-button>
  14. </div>
  15. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '读身份证')">
  16. <el-button @click="peopleIcCard" class="commonbutton" style="width:70px;">读身份证</el-button>
  17. </div>
  18. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '拍照')">
  19. <el-button type="primary" class="commonbutton" @click="photoGrah" style="width:60px;">拍照</el-button>
  20. </div>
  21. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '个人预约')">
  22. <el-button type="primary" class="commonbutton" @click="btnWebBooking" style="width:70px;">个人预约</el-button>
  23. </div>
  24. <div style="margin-left: 5px;">
  25. <el-button type="primary" class="commonbutton" @click="btnWebBookingMzak"
  26. style="width:70px;">人寿预约</el-button>
  27. </div>
  28. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '同步团检预约')">
  29. <el-button type="primary" class="commonbutton" @click="btnDownOrg"
  30. :disabled="(form.customerOrgId == dict.personOrgId) || !form.id">同步团检预约</el-button>
  31. </div>
  32. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '分诊排队')">
  33. <el-button type="primary" class="commonbutton" @click="fnQueue(form)"
  34. :disabled="!form.id">分诊排队</el-button>
  35. </div>
  36. </div>
  37. </div>
  38. <div style="background-color: #e8e8e8;">
  39. <el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium">
  40. <el-row>
  41. <el-col :span="5">
  42. <el-form-item label="单位名称" prop="customerOrgName">
  43. <el-input placeholder="请选择单位" v-model="form.customerOrgName" size="small" disabled>
  44. <el-button slot="append" icon="el-icon-search" @click="dialogOrg = true" style="font-size: 20px;"
  45. :disabled="(form.completeFlag == '3' || isDoctor != '1') ? true : false"></el-button>
  46. </el-input>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="5">
  50. <el-form-item label="条码号" prop="patientRegisterNo">
  51. <el-input v-model="form.patientRegisterNo" disabled size="small"></el-input>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="5">
  55. <el-form-item label="档案号" prop="patientNo">
  56. <el-input v-model="form.patientNo" disabled size="small"></el-input>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="3">
  60. <el-form-item label="体检次数" prop="medicalTimes">
  61. <el-input v-model="form.medicalTimes" disabled size="small"></el-input>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="3">
  65. <el-form-item label="性别" prop="sexId" label-width="50px">
  66. <el-select v-model="form.sexId" placeholder="请选择" size="small" filterable
  67. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'">
  68. <el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id">
  69. </el-option>
  70. </el-select>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="3">
  74. </el-col>
  75. </el-row>
  76. <el-row>
  77. <el-col :span="5">
  78. <el-form-item label="姓名" prop="patientName">
  79. <el-input id="patientName" v-model="form.patientName" @change="changePatientName" size="small"
  80. autocomplete="off"></el-input>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :span="5">
  84. <el-form-item label="身份证号" prop="idNo">
  85. <el-input v-model="form.idNo" placeholder="身份证号" @change="changeIdNo('N')" size="small"></el-input>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :span="5">
  89. <el-form-item label="出生日期" prop="birthDate">
  90. <!--
  91. <input type="date" v-model="form.birthDate" size="small"
  92. :style="'border-radius: 4px;border: 1px solid #DCDFE6;height: 32px;line-height: 32px;padding-left: 2px;width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'"/>
  93. -->
  94. <el-date-picker v-model="form.birthDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
  95. placeholder="出生日期" :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'"
  96. @change="changeBirthDate" prefix-icon="" size="small" />
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="3">
  100. <el-form-item label="年龄" prop="age">
  101. <el-input v-model="form.age" size="small" @change="changeAge"></el-input>
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="3">
  105. <el-form-item label="婚姻" prop="maritalStatusId" label-width="50px">
  106. <el-select v-model="form.maritalStatusId" placeholder="请选择" size="small" filterable
  107. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'">
  108. <el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName"
  109. :value="item.id">
  110. </el-option>
  111. </el-select>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="3" />
  115. </el-row>
  116. <el-row>
  117. <el-col :span="5">
  118. <el-form-item label="手机号" prop="mobileTelephone">
  119. <el-input v-model="form.mobileTelephone" size="small"></el-input>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="5">
  123. <el-form-item label="电话" prop="telephone">
  124. <el-input v-model="form.telephone" size="small"></el-input>
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="5">
  128. <el-form-item label="邮箱" prop="email">
  129. <el-input v-model="form.email" size="small"></el-input>
  130. </el-form-item>
  131. </el-col>
  132. <el-col :span="3">
  133. <el-form-item label="邮编" prop="postalCode">
  134. <el-input v-model="form.postalCode" size="small"></el-input>
  135. </el-form-item>
  136. </el-col>
  137. <el-col :span="3">
  138. <el-form-item label="籍贯" prop="birthPlaceId" label-width="50px">
  139. <el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
  140. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" size="small">
  141. <el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
  142. :value="item.id" />
  143. </el-select>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="3" />
  147. </el-row>
  148. <el-row>
  149. <el-col :span="10">
  150. <el-form-item label="地址" prop="address">
  151. <el-input v-model="form.address" size="small"></el-input>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="5">
  155. <el-form-item label="体检卡号" prop="medicalCardNo">
  156. <el-input v-model="form.medicalCardNo" size="small"></el-input>
  157. </el-form-item>
  158. </el-col>
  159. <el-col :span="3">
  160. <el-form-item label="性激素期" prop="sexHormoneTermId">
  161. <el-select v-model="form.sexHormoneTermId" placeholder="请选择" filterable clearable size="small"
  162. :disabled="isComplete">
  163. <el-option v-for="item in dict.sexHormoneTerm" :key="item.id" :label="item.displayName"
  164. :value="item.id">
  165. </el-option>
  166. </el-select>
  167. </el-form-item>
  168. </el-col>
  169. <el-col :span="2">
  170. <el-form-item label="民族" prop="nationId" label-width="50px">
  171. <el-select v-model="form.nationId" placeholder="请选择" filterable clearable default-first-option
  172. :filter-method="filterMethod" :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'"
  173. size="small">
  174. <el-option v-for="item in nation" :key="item.id" :label="item.displayName" :value="item.id" />
  175. </el-select>
  176. </el-form-item>
  177. </el-col>
  178. <el-col :span="3" />
  179. </el-row>
  180. <el-row>
  181. <el-col :span="5">
  182. <el-form-item label="体检类别" prop="medicalTypeId">
  183. <el-select v-model="form.medicalTypeId" placeholder="请选择" filterable clearable
  184. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small"
  185. @change="changeMedicalTypeId">
  186. <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName"
  187. :value="item.id" />
  188. </el-select>
  189. </el-form-item>
  190. </el-col>
  191. <el-col :span="5">
  192. <el-form-item label="人员类别" prop="personnelTypeId">
  193. <el-select v-model="form.personnelTypeId" placeholder="请选择" filterable clearable
  194. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  195. <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName"
  196. :value="item.id" />
  197. </el-select>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :span="5">
  201. <el-form-item label="工卡号" prop="jobCardNo">
  202. <el-input v-model="form.jobCardNo" size="small"></el-input>
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="3">
  206. <el-form-item label="职务" prop="jobPost">
  207. <el-input v-model="form.jobPost" size="small"></el-input>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="3">
  211. <el-form-item label="职称" prop="jobTitle" label-width="50px">
  212. <el-input v-model="form.jobTitle" size="small"
  213. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" />
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="3">
  217. <el-form-item label="介绍人" prop="salesman">
  218. <el-input v-model="form.salesman" size="small"></el-input>
  219. </el-form-item>
  220. </el-col>
  221. </el-row>
  222. <el-row>
  223. <el-col :span="5">
  224. <el-form-item label="体检中心" prop="medicalCenterId">
  225. <el-select v-model="form.medicalCenterId" placeholder="请选择" filterable
  226. :disabled="peisid ? true : false" size="small"
  227. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'">
  228. <el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName"
  229. :value="item.id">
  230. </el-option>
  231. </el-select>
  232. </el-form-item>
  233. </el-col>
  234. <el-col :span="4">
  235. <el-form-item label="单位体检次数" prop="isVip" label-width="110px">
  236. <el-select :class="form.customerOrgId == dict.personOrgId ? '' : 'enterToTab'"
  237. v-model="form.customerOrgRegisterId" placeholder="次数" size="small"
  238. :disabled="form.customerOrgId == dict.personOrgId || form.completeFlag == '3'"
  239. :style="'width:' + Math.floor((window.pageWidth - 654) / 6) + 'px;'" @change="changeMedicalTimes"
  240. value-key="id">
  241. <el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
  242. :value="item.id" :disabled="item.isComplete == 'Y'" />
  243. </el-select>
  244. </el-form-item>
  245. </el-col>
  246. <el-col :span="4">
  247. <el-form-item label="门诊号" prop="hisPatientId">
  248. <el-input v-model="form.hisPatientId" size="small" disabled />
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="2">
  252. <el-form-item label="电话随访" prop="isPhoneFollow">
  253. <!--
  254. <el-radio v-model="form.isPhoneFollow" label="Y"></el-radio>
  255. <el-radio v-model="form.isPhoneFollow" label="N"></el-radio>
  256. -->
  257. <el-checkbox v-model="form.isPhoneFollow" true-label="Y" false-label="N" />
  258. </el-form-item>
  259. </el-col>
  260. <el-col :span="2">
  261. <el-form-item label="VIP" prop="isVip" label-width="50px">
  262. <!--
  263. <el-radio v-model="form.isVip" label="Y"></el-radio>
  264. <el-radio v-model="form.isVip" label="N"></el-radio>
  265. -->
  266. <el-checkbox v-model="form.isVip" true-label="Y" false-label="N" />
  267. </el-form-item>
  268. </el-col>
  269. <el-col :span="2">
  270. <el-form-item label="隐藏姓名" prop="isNameHide">
  271. <!--
  272. <el-radio v-model="form.isNameHide" label="Y"></el-radio>
  273. <el-radio v-model="form.isNameHide" label="N"></el-radio>
  274. -->
  275. <el-checkbox v-model="form.isNameHide" true-label="Y" false-label="N" />
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="2">
  279. <el-form-item label="锁住" prop="isLock" label-width="50px">
  280. <!--
  281. <el-radio v-model="form.isLock" label="Y"></el-radio>
  282. <el-radio v-model="form.isLock" label="N"></el-radio>
  283. -->
  284. <el-checkbox v-model="form.isLock" true-label="Y" false-label="N" />
  285. </el-form-item>
  286. </el-col>
  287. <el-col :span="3">
  288. <el-form-item label="体检开始" prop="isMedicalStart">
  289. <el-select v-model="form.isMedicalStart" placeholder="请选择" disabled size="small">
  290. <el-option label="是" value="Y" />
  291. <el-option label="否" value="N" />
  292. </el-select>
  293. </el-form-item>
  294. </el-col>
  295. </el-row>
  296. <el-row>
  297. <el-col :span="5">
  298. <el-form-item label="分组" prop="customerOrgGroupId">
  299. <el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable
  300. @change="changeCustomerOrgGroupId" :disabled="displayGroup"
  301. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  302. <el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
  303. :value="item.id" />
  304. </el-select>
  305. </el-form-item>
  306. </el-col>
  307. <el-col :span="5">
  308. <el-form-item label="套餐" prop="medicalPackageId">
  309. <el-select v-model="form.medicalPackageId" placeholder="请选择" filterable clearable
  310. @change="changeMedicalPackageId" :disabled="displayPackage"
  311. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  312. <el-option v-for="item in dict.medicalPackage" :key="item.id" :label="item.displayName"
  313. :value="item.id" />
  314. </el-select>
  315. </el-form-item>
  316. </el-col>
  317. <el-col :span="11">
  318. <el-form-item label="备注" prop="remark">
  319. <el-input v-model="form.remark" type="textarea" :rows="1" placeholder="请输入备注" size="small"></el-input>
  320. </el-form-item>
  321. </el-col>
  322. <el-col :span="3">
  323. <el-form-item label="状态" prop="completeFlag" label-width="50px">
  324. <el-select v-model="form.completeFlag" placeholder="请选择"
  325. :disabled="(form.completeFlag == '2' || form.completeFlag == '3') ? true : false" size="small">
  326. <div v-if="form.completeFlag == '2' || form.completeFlag == '3'">
  327. <el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName"
  328. :value="item.id">
  329. </el-option>
  330. </div>
  331. <div v-else>
  332. <el-option label="预登记" value="0" />
  333. <el-option label="正式登记" value="1" />
  334. </div>
  335. </el-select>
  336. </el-form-item>
  337. </el-col>
  338. </el-row>
  339. <!--青藏公司 start-->
  340. <el-row v-if="LocalConfig.patientRegister.edit == 'qztl'">
  341. <el-col :span="4">
  342. <el-form-item label="高原/健康">
  343. <el-select v-model="form.qztlType" placeholder="请选择" disabled>
  344. <el-option v-for="item in dict.qztlType" :key="item.id" :label="item.displayName"
  345. :value="item.id" />
  346. </el-select>
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="2">
  350. <el-form-item label="普速">
  351. <el-checkbox v-model="form.qztlIsCw" true-label="Y" false-label="N" disabled />
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="2">
  355. <el-form-item label="从业">
  356. <el-checkbox v-model="form.qztlIsCy" true-label="Y" false-label="N" disabled />
  357. </el-form-item>
  358. </el-col>
  359. <el-col :span="2">
  360. <el-form-item label="高铁">
  361. <el-checkbox v-model="form.qztlIsGt" true-label="Y" false-label="N" disabled />
  362. </el-form-item>
  363. </el-col>
  364. <el-col :span="2">
  365. <el-form-item label="行车">
  366. <el-checkbox v-model="form.qztlIsMain" true-label="Y" false-label="N" disabled />
  367. </el-form-item>
  368. </el-col>
  369. <el-col :span="2">
  370. <el-form-item label="职害">
  371. <el-checkbox v-model="form.qztlIsWh" true-label="Y" false-label="N" disabled />
  372. </el-form-item>
  373. </el-col>
  374. <el-col :span="2">
  375. <el-form-item label="复检">
  376. <el-checkbox v-model="form.qztlIsFj" true-label="Y" false-label="N" disabled />
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="2">
  380. <el-form-item label="导入">
  381. <el-checkbox v-model="form.isQztlImport" true-label="Y" false-label="N" disabled />
  382. </el-form-item>
  383. </el-col>
  384. <el-col :span="2">
  385. <el-form-item label="上传">
  386. <el-checkbox v-model="form.uploadQztlFlag" true-label="Y" false-label="N" disabled />
  387. </el-form-item>
  388. </el-col>
  389. <el-col :span="4">
  390. <el-form-item label="计划" prop="planuserid">
  391. <el-input v-model="form.planuserid" size="small" disabled />
  392. </el-form-item>
  393. </el-col>
  394. </el-row>
  395. <!--青藏公司 end-->
  396. <!--职业病 start-->
  397. <el-row v-if="form.isPatientOccupationalDisease == 'Y'">
  398. <el-col :span="4">
  399. <el-form-item prop="ocCheckTypeId" label="检查类别">
  400. <el-select v-model="form.ocCheckTypeId" size="small" @change="changeOccPosionOrCheckType">
  401. <el-option v-for="item in dict.occCheckType" :key="item.value" :label="item.displayName"
  402. :value="item.id" />
  403. </el-select>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="3">
  407. <el-form-item label="工种" label-width="40px">
  408. <el-input v-model="form.jobType" clearable size="small"></el-input>
  409. </el-form-item>
  410. </el-col>
  411. <el-col :span="14">
  412. <el-form-item label="接害因素" label-width="65px">
  413. <el-select v-model="form.poisonIds" size="small"
  414. :style="`width:${Math.floor((window.pageWidth - 242) / 1.714)}px;`" clearable filterable
  415. :filter-method="filterMethodPoison" value-key="id" multiple @change="changeOccPosionOrCheckType"
  416. :disabled="form.completeFlag == '3' ? true : false">
  417. <el-option-group v-for="group in poison" :key="group.poisonTypeName" :label="group.poisonTypeName">
  418. <el-option v-for="item in group.poisonDtos" :key="item.id" :label="item.displayName"
  419. :value="item.id" />
  420. </el-option-group>
  421. </el-select>
  422. </el-form-item>
  423. </el-col>
  424. <el-col :span="3">
  425. <el-form-item label="申请号" prop="occupationalDiseaseNumber" label-width="50px">
  426. <el-input v-model="form.occupationalDiseaseNumber" clearable size="small"></el-input>
  427. </el-form-item>
  428. </el-col>
  429. </el-row>
  430. <!--职业病 end -->
  431. <el-row>
  432. <el-col :span="6">
  433. <el-form-item label="创建人员">
  434. <el-input v-model="form.creatorName" disabled size="small"></el-input>
  435. </el-form-item>
  436. </el-col>
  437. <el-col :span="6">
  438. <el-form-item label="创建时间">
  439. <el-input :value="form.creationTime
  440. ? moment(form.creationTime).format('yyyy-MM-DD')
  441. : ''
  442. " disabled size="small"></el-input>
  443. </el-form-item>
  444. </el-col>
  445. <el-col :span="6">
  446. <el-form-item label="修改人员">
  447. <el-input v-model="form.lastModifierName" disabled size="small"></el-input>
  448. </el-form-item>
  449. </el-col>
  450. <el-col :span="6">
  451. <el-form-item label="修改时间">
  452. <el-input :value="form.lastModificationTime
  453. ? moment(form.lastModificationTime).format('yyyy-MM-DD')
  454. : ''
  455. " disabled size="small"></el-input>
  456. </el-form-item>
  457. </el-col>
  458. </el-row>
  459. </el-form>
  460. <el-image
  461. :style="'position: absolute;top:70px;right:' + (100 + Math.floor((window.pageWidth - 680) / 24)) + 'px; width: 130px; height: 140px;'"
  462. :src="peoplePhoto">
  463. <div slot="placeholder" class="image-slot">
  464. 加载中<span class="dot">...</span>
  465. </div>
  466. </el-image>
  467. </div>
  468. <!--人员登记组合项目明细 register_check_asbitem-->
  469. <div>
  470. <PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :refreshFormId="refreshFormId" />
  471. </div>
  472. </div>
  473. <div style="margin-left: 10px;">
  474. <div v-show="checkPagePriv(pagePriv.privs, '新增')">
  475. <el-button type="primary" class="commonbutton" @click="btnAdd">新增</el-button>
  476. </div>
  477. <div v-show="checkPagePriv(pagePriv.privs, '复制新增')" class="btn">
  478. <el-button type="primary" class="commonbutton" @click="rdCopy">复制新增</el-button>
  479. </div>
  480. <div v-show="checkPagePriv(pagePriv.privs, '保存')" class="btn">
  481. <el-button type="success" class="commonbutton" @click="btnSubmit('form', true)">保存</el-button>
  482. </div>
  483. <div v-show="checkPagePriv(pagePriv.privs, '检验单申请')" class="btn">
  484. <el-button type="primary" class="commonbutton" @click="lisRequest">检验单申请</el-button>
  485. </div>
  486. <div v-show="checkPagePriv(pagePriv.privs, '条码打印')" class="btn">
  487. <el-button type="primary" class="commonbutton" @click="labelPrint(false)"
  488. :disabled="printing">条码打印</el-button>
  489. </div>
  490. <div v-show="checkPagePriv(pagePriv.privs, '条码补打')" class="btn">
  491. <el-button type="danger" class="commonbutton" @click="btnLabel">条码补打</el-button>
  492. </div>
  493. <div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="btn">
  494. <el-button type="primary" class="commonbutton" @click="guidePrint('0001', false)"
  495. :disabled="printing">指引单打印</el-button>
  496. </div>
  497. <!--
  498. <div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="btn">
  499. <el-button type="primary" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
  500. </div>
  501. -->
  502. <div v-show="checkPagePriv(pagePriv.privs, '条码合并')" class="btn">
  503. <el-button type="danger" class="commonbutton" @click="reLisRequest">条码合并</el-button>
  504. </div>
  505. <div v-show="checkPagePriv(pagePriv.privs, '手动合并项目')" class="btn">
  506. <el-button type="danger" class="commonbutton" @click="reMergeAsbitem">手动合并项目</el-button>
  507. </div>
  508. <div v-show="checkPagePriv(pagePriv.privs, '全个人支付')" style="margin-top: 30px;">
  509. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('0')">全个人支付</el-button>
  510. </div>
  511. <div v-show="checkPagePriv(pagePriv.privs, '全单位支付')" class="btn">
  512. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('1')">全单位支付</el-button>
  513. </div>
  514. <div v-show="checkPagePriv(pagePriv.privs, '全赠送')" class="btn">
  515. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('2')">全赠送</el-button>
  516. </div>
  517. <div v-show="checkPagePriv(pagePriv.privs, '收费')" class="btn">
  518. <el-button type="success" class="commonbutton" @click="toCharge(form)" :disabled="!form.id">收费</el-button>
  519. </div>
  520. <div v-show="checkPagePriv(pagePriv.privs, '收费申请')" class="btn">
  521. <el-button type="success" class="commonbutton" @click="chargeRequest(form)"
  522. :disabled="!form.id">收费申请</el-button>
  523. </div>
  524. <div v-show="checkPagePriv(pagePriv.privs, '复制分组')" class="btn">
  525. <el-button class="commonbutton" @click="btnCopyGroup"
  526. :disabled="form.isLock == 'Y' || form.completeFlag == '3' ? true : false">复制分组</el-button>
  527. </div>
  528. <div v-show="checkPagePriv(pagePriv.privs, '复制套餐')" class="btn">
  529. <el-button class="commonbutton" @click="btnCopyMedicalPackage"
  530. :disabled="form.isLock == 'Y' || form.completeFlag == '3' ? true : false">复制套餐</el-button>
  531. </div>
  532. </div>
  533. </div>
  534. <!--组件弹窗-->
  535. <div>
  536. <!-- 人员档案列表 -->
  537. <el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="900px" :show-close="false"
  538. :close-on-click-modal="false" :append-to-body="true">
  539. <el-table :data="patientList" border width="800" height="480" row-key="id" size="small"
  540. class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" @row-dblclick="patientDblclick"
  541. ref="patientList">
  542. <el-table-column type="index" width="30" align="center"/>
  543. <el-table-column prop="patientNo" label="档案号" min-width="80" align="center"/>
  544. <el-table-column prop="lastTime" label="末次体检" min-width="80" align="center">
  545. <template slot-scope="scope">
  546. <div v-if="scope.row.lastTime">
  547. {{ moment(scope.row.lastTime).format("yyyy-MM-DD") }}
  548. </div>
  549. </template>
  550. </el-table-column>
  551. <el-table-column prop="medicalTimes" label="体检次数" min-width="70" align="center"/>
  552. <el-table-column prop="displayName" label="姓名" min-width="70" align="center"/>
  553. <el-table-column prop="sexId" label="性别" min-width="50" align="center">
  554. <template slot-scope="scope">
  555. <div>
  556. {{ dddw(dict.sex, "id", scope.row.sexId, "displayName") }}
  557. </div>
  558. </template>
  559. </el-table-column>
  560. <el-table-column prop="maritalStatusId" label="婚姻" min-width="50" align="center">
  561. <template slot-scope="scope">
  562. <div>
  563. {{ dddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  564. </div>
  565. </template>
  566. </el-table-column>
  567. <el-table-column prop="birthDate" label="出生日期" min-width="80" align="center">
  568. <template slot-scope="scope">
  569. <div v-if="scope.row.birthDate">
  570. {{ moment(scope.row.birthDate).format("yyyy-MM-DD") }}
  571. </div>
  572. </template>
  573. </el-table-column>
  574. <el-table-column prop="nationId" label="民族" min-width="50" align="center">
  575. <template slot-scope="scope">
  576. <div>
  577. {{ dddw(dict.nation, "id", scope.row.nationId, "displayName") }}
  578. </div>
  579. </template>
  580. </el-table-column>
  581. <el-table-column prop="idNo" label="身份证号" min-width="150" align="center"/>
  582. <el-table-column prop="mobileTelephone" label="手机号" min-width="110" align="center"/>
  583. <el-table-column prop="telephone" label="电话" min-width="120" align="center"/>
  584. </el-table>
  585. <span slot="footer" class="dialog-footer">
  586. <el-button class="commonbutton" @click="dialogVisible = false" style="width:90px;">取消</el-button>
  587. <el-button class="commonbutton" type="primary" @click="choosePatient" style="width:90px;">确定</el-button>
  588. </span>
  589. </el-dialog>
  590. <el-dialog title="职业病" :visible.sync="dialogWin.OccDisease" width="800px" :close-on-click-modal="false"
  591. :append-to-body="true">
  592. <OccDisease />
  593. </el-dialog>
  594. <el-dialog title="网上预约" :visible.sync="dialogWin.WebBooking" width="800px" :close-on-click-modal="false"
  595. :append-to-body="true" :show-close="false" @close="close_dialogWin_WebBooking">
  596. <WebBooking />
  597. </el-dialog>
  598. <el-dialog title="网上预约--人寿" :visible.sync="dialogWin.WebBookingMzak" width="800px" :close-on-click-modal="false"
  599. :append-to-body="true" :show-close="false" @close="close_dialogWin_WebBookingMzak">
  600. <WebBookingMzak />
  601. </el-dialog>
  602. <!-- checkStrictly: true, expandTrigger: 'hover', lazyLoad: lazyLoad, lazy: true, @change="changeChooseOrgId" -->
  603. <!-- checkStrictly: true, expandTrigger: 'click', :show-all-levels="false" -->
  604. <el-dialog title="选择单位" :visible.sync="dialogOrg" width="800px" :close-on-click-modal="false"
  605. :append-to-body="true">
  606. <div style="height: 320px;">
  607. <el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll" style="width:400px;"
  608. filterable popper-class="example"
  609. :props="{ ...customerOrg.treeprops, leaf: 'isLeaf' }"
  610. size="small">
  611. </el-cascader>
  612. </div>
  613. <span slot="footer" class="dialog-footer">
  614. <el-button type="primary" @click="btnOkOrg">确定</el-button>
  615. <el-button @click="dialogOrg = false">关闭</el-button>
  616. </span>
  617. </el-dialog>
  618. <!-- 拍照openCamera 网页模式已废弃
  619. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600"
  620. :close-on-click-modal="false" :append-to-body="true">
  621. <Camera :id="form.id" />
  622. </el-dialog>
  623. -->
  624. <!-- 合并条码 -->
  625. <el-dialog title="合并条码" :visible.sync="patientRegister.lisRequestVisble" width="600px" height="400"
  626. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  627. <LisRequest :id="form.id" :brushTimes="brushTimes" />
  628. </el-dialog>
  629. <!-- 条码补打 -->
  630. <el-dialog title="条码补打" :visible.sync="dialogWin.Label" width="800px" height="400" :close-on-click-modal="false"
  631. :append-to-body="true">
  632. <el-tabs v-model="tabChoosed" style="height:320px;margin-top: -22px;">
  633. <!-- 组合项目 -->
  634. <el-tab-pane label="检验条码" name="1">
  635. <PatientLisRequest :isDialog="true" />
  636. </el-tab-pane>
  637. <el-tab-pane label="检查条码" name="2">
  638. <PatientPacsRequest :isDialog="true" />
  639. </el-tab-pane>
  640. </el-tabs>
  641. </el-dialog>
  642. <!-- 手动合并项目 -->
  643. <el-dialog title="手动合并项目" :visible.sync="patientRegister.mergeAsbitemVisble" width="600px" height="400"
  644. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  645. <MergeAsbitem :id="form.id" :medicalCenterId="form.medicalCenterId" :brushTimes="brushTimes" />
  646. </el-dialog>
  647. <!-- 收费 -->
  648. <el-dialog title="" :visible.sync="dialogWin.charge" :close-on-click-modal="false" :append-to-body="true"
  649. fullscreen @close="closeDialogCharge">
  650. <div style="margin-top: -30px;">
  651. <Charge :patientRegisterNo="chargePatientRegisterNo" />
  652. </div>
  653. </el-dialog>
  654. <!-- 收费申请 -->
  655. <el-dialog title="收费申请" :visible.sync="dialogWin.AsbChargeRequest" width="800px" :show-close="false"
  656. :close-on-click-modal="false" :append-to-body="true" @close="closeDialogCharge">
  657. <AsbChargeRequest :patientRegister="form" />
  658. </el-dialog>
  659. <!-- 分诊排队 -->
  660. <el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true"
  661. :close-on-click-modal="false">
  662. <Queue :refParams="queueParams" />
  663. </el-dialog>
  664. <!--复制套餐-->
  665. <el-dialog title="复制体检套餐" :visible.sync="medicalPackageVisble" width="800px" height="500" :show-close="false"
  666. :close-on-click-modal="false" :append-to-body="true">
  667. <el-table :data="dict.medicalPackage" border height="350" row-key="id" size="small" highlight-current-row
  668. @row-click="packageRowClick" @row-dblclick="rowDblclick" ref="patientList">
  669. <!-- "displayName": "健康体检套餐",
  670. "price": 20.00,
  671. "forSexId": "0",
  672. "isActive": "Y",
  673. "remark": "2",
  674. "displayOrder": 1,
  675. "simpleCode": "JKTJTC",
  676. "creatorName": "admin",
  677. "lastModifierName": "users",
  678. "lastModificationTime": "2023-08-04T16:34:02.94408",
  679. "lastModifierId": "3a0ca83b-3116-da05-3916-dfd4c0c548cb",
  680. "creationTime": "2023-07-10T19:53:30.210553",
  681. "creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
  682. "id": "3a0c51d3-2345-38df-ba0b-1862a3c3606f" -->
  683. <el-table-column type="index" width="50" />
  684. <el-table-column prop="displayName" label="套餐名称" width="180" />
  685. <el-table-column prop="price" label="价格" width="80" />
  686. <el-table-column prop="forSexId" label="适用性别" width="80">
  687. <template slot-scope="scope">
  688. <div>
  689. {{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }}
  690. </div>
  691. </template>
  692. </el-table-column>
  693. <el-table-column prop="remark" label="备注" width="100" />
  694. <el-table-column prop="creatorName" label="创建人员" width="80" />
  695. <el-table-column prop="creationTime" label="创建日期" width="100">
  696. <template slot-scope="scope">
  697. <div v-if="scope.row.creationTime">
  698. {{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}
  699. </div>
  700. </template>
  701. </el-table-column>
  702. <el-table-column prop="lastModifierName" label="修改人员" width="80" />
  703. <el-table-column prop="lastModificationTime" label="修改日期" width="100">
  704. <template slot-scope="scope">
  705. <div v-if="scope.row.lastModificationTime">
  706. {{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }}
  707. </div>
  708. </template>
  709. </el-table-column>
  710. </el-table>
  711. <span slot="footer" class="dialog-footer">
  712. <el-button class="commonbutton" type="primary" @click="copyMedicalPackage" style="width:90px;">确定</el-button>
  713. <el-button class="commonbutton" @click="medicalPackageVisble = false" style="width:90px;">取消</el-button>
  714. </span>
  715. </el-dialog>
  716. <!--复制分组-->
  717. <el-dialog title="复制单位分组" :visible.sync="groupVisble" width="800px" height="500" :show-close="false"
  718. :close-on-click-modal="false" :append-to-body="true">
  719. <div>
  720. <div style="display: flex">
  721. <div>
  722. <span>体检单位</span>
  723. <el-select v-model="customerOrgId" placeholder="请选择体检单位" :filter-method="filterMethodOrg"
  724. default-first-option clearable filterable @clear="customerOrgDisp = deepCopy(customerOrgAll)"
  725. style="margin-left: 10px" @change="changeCustomerOrg" size="small">
  726. <el-option v-for="item in customerOrgDisp" :key="item.id" :label="item.displayName" :value="item.id">
  727. {{ item.displayName }}
  728. </el-option>
  729. </el-select>
  730. </div>
  731. <div style="margin-left: 20px">
  732. <span>单位体检次数</span>
  733. <el-select v-model="customerOrgRegister" placeholder="次数" style="width: 60px; margin-left: 10px"
  734. size="small" @change="changeTimes" value-key="id">
  735. <el-option v-for="item in customerOrgRegisterListCopy" :key="item.id" :label="item.medicalTimes"
  736. :value="item" :disabled="item.isComplete == 'Y'" />
  737. </el-select>
  738. </div>
  739. </div>
  740. <el-table :data="customerOrgGroups" ref="customerOrgGroups" style="margin-top: 2px" row-key="id" border
  741. height="450px" size="small" highlight-current-row :row-class-name="handleRowClassName"
  742. @row-click="groupRowClick" @row-dblclick="groupRowDblclick">
  743. >
  744. <el-table-column type="index" label="序号" min-width="50" align="center" />
  745. <el-table-column prop="displayName" label="名称" min-width="150" />
  746. <el-table-column prop="price" label="价格" min-width="60" align="center" />
  747. <el-table-column prop="forSexId" label="适用性别" min-width="60" align="center">
  748. <template slot-scope="scope">
  749. {{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }}
  750. </template>
  751. </el-table-column>
  752. <el-table-column prop="maritalStatusId" label="适用婚姻状况" min-width="80" align="center">
  753. <template slot-scope="scope">
  754. {{
  755. dddw(
  756. dict.forMaritalStatus,
  757. "id",
  758. scope.row.maritalStatusId,
  759. "displayName"
  760. )
  761. }}
  762. </template>
  763. </el-table-column>
  764. <el-table-column prop="creatorName" label="创建者" min-width="60" align="center" />
  765. <el-table-column label="创建时间" min-width="150" align="center">
  766. <template slot-scope="scope">
  767. {{
  768. scope.row.creationTime
  769. ? moment(scope.row.creationTime).format("yyyy-MM-DD HH:mm:ss")
  770. : ""
  771. }}
  772. </template>
  773. </el-table-column>
  774. </el-table>
  775. <div style="display: flex;justify-content: space-between;margin-top: 10px;">
  776. <div></div>
  777. <span slot="footer" class="dialog-footer">
  778. <el-button class="commonbutton" type="primary" @click="copyGroup" style="width:90px;">确定</el-button>
  779. <el-button class="commonbutton" @click="groupVisble = false" style="width:90px;">取消</el-button>
  780. </span>
  781. </div>
  782. </div>
  783. </el-dialog>
  784. </div>
  785. </div>
  786. </template>
  787. <script>
  788. import moment from "moment";
  789. import { mapState, mapActions } from "vuex";
  790. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  791. import { getTreeNode } from "../../utlis/tree"
  792. import {
  793. getPagePriv, checkPagePriv, objCopy, setNull, dddw, checkIDCode, parseID,
  794. birthdayToAge, ageToBirthday, deepCopy, arrayFilter, arrayReduce, parsIcCardtoLocal,
  795. reMadeOrgTree, arrayExistObj, isValidMobileNumber
  796. } from "../../utlis/proFunc";
  797. import { getTreePids, madeTree } from "../../utlis/tree";
  798. import { photoParse, savePeoplePhoto, } from "../../utlis/proApi";
  799. import Camera from "./Camera.vue";
  800. import PatientRegisterItem from "./PatientRegisterItem.vue";
  801. import LisRequest from "./LisRequest.vue";
  802. import MergeAsbitem from "./MergeAsbitem.vue";
  803. import AsbChargeRequest from "./AsbChargeRequest.vue";
  804. import Charge from "../../views/charge/charge.vue";
  805. import PatientRegisterEditQuery from "../../components/patientRegister/PatientRegisterEditQuery.vue";
  806. import OccDisease from "../../components/occDisease/OccDisease.vue"
  807. import WebBooking from "../../components/webBooking/WebBooking.vue"
  808. import WebBookingMzak from "../../components/webBooking/WebBookingMzak.vue"
  809. import PatientLisRequest from "../../components/patientRegister/PatientLisRequest.vue";
  810. import PatientPacsRequest from "../../components/patientRegister/PatientPacsRequest.vue";
  811. import Queue from "../../components/queue/Queue.vue";
  812. export default {
  813. components: {
  814. Camera,
  815. LisRequest,
  816. MergeAsbitem,
  817. PatientRegisterItem,
  818. Charge,
  819. AsbChargeRequest,
  820. PatientRegisterEditQuery,
  821. OccDisease,
  822. PatientLisRequest,
  823. PatientPacsRequest,
  824. WebBooking, WebBookingMzak,
  825. Queue
  826. },
  827. // isDoctor: '0:标准人员登记/1:医生诊台登记(可修改单位)'
  828. props: ['isDoctor', 'patientRegisterId', 'editTimes', 'refreshRegister', 'refFuncSetData'],
  829. data() {
  830. return {
  831. pagePriv: {
  832. routeUrlorPageName: 'PatientRegisterEdit', //当前页面归属路由或归属页面权限名称
  833. privs: [] // 页面权限
  834. },
  835. patient_register_occ_check_id: '', // 属于职业病体检类别的ID
  836. merge_lis_pacs_label: "0", //默认0 检验检查条码合并 0:不合并,1:合并
  837. LocalConfig: {
  838. patientRegister: {
  839. editMode: 'standard', //standard/qztl 人员登记组件版本
  840. editHeight: 0, // 相较与标准版,选组合项目组件,减少高度
  841. immediateToHisCharge: true, // 人员登记保存后,立即发送收费申请
  842. findPatientByName: true, // 人员登记,启有人名查询
  843. printGuideLabel: ["guide", "pacs", "lis"], // 保存后打印指引单与条码
  844. dispCustomerOrgCode: 'N', // 人员登记列表--单位树是否显示 customerOrgCode
  845. },
  846. },
  847. brushTimes: 0,
  848. peisid: null,
  849. peoplePhoto: '',
  850. preCustomerOrgId: '', // 上一个人的体检单位,只是在本组件点新增时才用到
  851. form: {
  852. registerManType: 'customer', //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员
  853. id: "", //id
  854. photo: '', //照片
  855. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  856. patientNo: "", //档案号
  857. customerOrgId: ["00000000-0000-0000-0000-000000000001"], //单位编号 默认个人
  858. customerOrgParentId: "00000000-0000-0000-0000-000000000001",
  859. customerOrgName: "个人体检",
  860. customerOrgRegisterId: "00000000-0000-0000-0000-000000000001", //默认单位体检次数
  861. customerOrgGroupId: null, //分组
  862. medicalPackageId: null, //套餐
  863. patientName: "", //姓名
  864. birthDate: null, //日期型
  865. sexId: "U", //性别 默认未知U
  866. age: null, //年龄
  867. jobCardNo: "", //工卡号
  868. medicalCardNo: "", //体检卡号
  869. maritalStatusId: "9", //婚姻状况 默认未知
  870. medicalTypeId: null, //体检类别
  871. personnelTypeId: null, //人员类别
  872. jobPost: "", //职务
  873. jobTitle: "", //职称
  874. salesman: "", //介绍人
  875. sexHormoneTermId: null, //性激素期限
  876. isNameHide: "N", //隐藏姓名
  877. isPhoneFollow: "N", //电话随访
  878. isVip: "N", //vip客户
  879. remark: "", //
  880. isLock: "N", //是否锁住
  881. completeFlag: "1", //完成标志 0:预登记,1:正式登记(未检),2:部份已检,3:已总检 【创建编辑时不操作】
  882. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  883. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  884. medicalTimes: 1, //条码号 【创建编辑时不操作】
  885. medicalCenterId: null, //体检中心
  886. address: "", //地址
  887. email: "", //email
  888. idNo: "", //身份证号
  889. telephone: "", //电话
  890. mobileTelephone: "", //手机号
  891. nationId: null, //民族编号
  892. birthPlaceId: null, //籍惯(出生地)
  893. postalCode: "", //邮编
  894. creatorId: null,
  895. creationTime: "",
  896. lastModificationTime: "",
  897. lastModifierId: null,
  898. isMaxMedicalTimes: 'N',
  899. medicalStartDate: null,
  900. hisPatientId: '', //对接 hisid
  901. registerCheckAsbitems: [], //所选组合项目明细
  902. // 青藏公司 数据
  903. qztlType: '0', // 高原/健康
  904. qztlIsCw: 'N', // 普速
  905. qztlIsCy: 'N', // 从业
  906. qztlIsGt: 'N', // 高铁
  907. qztlIsMain: 'N', // 行车
  908. qztlIsWh: 'N', // 职害
  909. qztlIsFj: 'N', // 复检
  910. isQztlImport: 'N', // 导入
  911. uploadQztlFlag: 'N', // 上传
  912. planuserid: '', // 计划人
  913. // 职业病
  914. ocCheckTypeId: null, //检查类别
  915. jobType: '', //工种
  916. poisonIds: [], // 接害因素IDs(主表不保存此项数据)
  917. isPatientOccupationalDisease: 'Y', // 是否职业病检查(主表不保存此项数据)
  918. appointPatientRegisterId: "",
  919. thirdBookingId: "",
  920. occupationalDiseaseNumber: "",
  921. }, //单位 记录 目前新增与更新是一致
  922. formInit: {}, //表单初始化
  923. customerOrgRegisterList: [], //单位体检次数列表
  924. defaultNull: [
  925. "customerOrgId",
  926. "customerOrgGroupId",
  927. "medicalPackageId",
  928. "birthDate",
  929. "age",
  930. "maritalStatusId",
  931. "medicalTypeId",
  932. "personnelTypeId",
  933. "sexHormoneTermId",
  934. "medicalCenterId",
  935. "nationId",
  936. "birthPlaceId",
  937. ], //一般uuid字段为空时,需设置为null值
  938. rules: {
  939. customerOrgId: [
  940. { required: true, message: "请填写单位", trigger: "blur" },
  941. ],
  942. patientName: [
  943. { required: true, message: "请填写姓名", trigger: "blur" },
  944. ],
  945. medicalCenterId: [
  946. { required: true, message: "请填写体检中心", trigger: "blur" },
  947. ],
  948. // mobileTelephone: [
  949. // { required: true, message: "请填写手机号", trigger: "blur" },
  950. // { validator: validateMobileTelephone, trigger: 'blur' }
  951. // ],
  952. },
  953. dialogVisible: false,
  954. patientList: [], //人员列表(用于判断人员多次体检)
  955. patientChoosed: {}, //查重选中的人员
  956. registerVisible: false,
  957. patientRegisters: [],
  958. registerChoosed: {},
  959. dialogCamera: false, //拍照组件
  960. chargePatientRegisterNo: '', //对哪个条码客户收费
  961. //人员登记,组合项目明细操作相关参数
  962. prAsbOpraOpts: {
  963. formId: '', //form.id为空时,明细保存取此formId
  964. copyNew: 0, //触发复制新增
  965. payTypeFlag: '', //触发调整支付方式
  966. prAsbSave: 0, //触发组合项目明细保存
  967. prAsbQuery: 0,//触发组合项目明细查询,比如收费后,刷新收费状态
  968. prAsbGroup: 0, //触发分组更换
  969. prAsbPackage: 0, //触发套餐更换
  970. },
  971. nation: [], //
  972. dialogOrg: false,
  973. printing: false, // 是否打印中,控制一次只能有一个任务
  974. completeFlag: '0', // 默认预登记,首次正式登记或者预登记转正式登记,提示打印条码与指引单
  975. tabChoosed: "1",
  976. poison: [],
  977. poisonList: [],
  978. thirdInterfaceId: '', // 网上预约用到
  979. queueParams: {}, // 分诊排队参数
  980. //**复制分组与套餐相关数据
  981. //控制 复制套餐与分组页面 显示
  982. medicalPackageVisble: false,
  983. groupVisble: false,
  984. customerOrgGroups: [],
  985. //选中套餐与分组所包含的组合项目
  986. curPackageId: '',
  987. curGroupId: '',
  988. packageAsbitems: [],
  989. groupAsbitems: [],
  990. customerOrgId: '',
  991. customerOrgDisp: [],
  992. customerOrgAll: [],
  993. customerOrgRegisterListCopy: [], //当前体检次数集合
  994. customerOrgRegister: {}, // 当前选择体检次数
  995. hc_warn_mode: '1', //0-仅提醒;1-提醒并决择;2-有互斥项目时不允许保存
  996. };
  997. },
  998. created() {
  999. //获取用户当前页面的权限
  1000. let userPriv = window.sessionStorage.getItem('userPriv')
  1001. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  1002. try {
  1003. let LocalConfig = JSON.parse(window.localStorage.getItem('LocalConfig'))
  1004. if (LocalConfig && LocalConfig.patientRegister) {
  1005. if (LocalConfig.patientRegister.edit) this.LocalConfig.patientRegister.edit = LocalConfig.patientRegister.edit
  1006. if (LocalConfig.patientRegister.editHeight) this.LocalConfig.patientRegister.editHeight = LocalConfig.patientRegister.editHeight
  1007. if (LocalConfig.patientRegister.immediateToHisCharge) {
  1008. this.LocalConfig.patientRegister.immediateToHisCharge = true
  1009. } else {
  1010. this.LocalConfig.patientRegister.immediateToHisCharge = false
  1011. }
  1012. if (LocalConfig.patientRegister.findPatientByName) {
  1013. this.LocalConfig.patientRegister.findPatientByName = true
  1014. } else {
  1015. this.LocalConfig.patientRegister.findPatientByName = false
  1016. }
  1017. if (LocalConfig.patientRegister.printGuideLabel) this.LocalConfig.patientRegister.printGuideLabel = deepCopy(LocalConfig.patientRegister.printGuideLabel)
  1018. if (LocalConfig.patientRegister.dispCustomerOrgCode) this.LocalConfig.patientRegister.dispCustomerOrgCode = LocalConfig.patientRegister.dispCustomerOrgCode
  1019. }
  1020. } catch (error) {
  1021. console.log("window.localStorage.getItem('LocalConfig')", error)
  1022. }
  1023. this.formInit = deepCopy(this.form)
  1024. // 初始化字典数据
  1025. this.dictInit()
  1026. },
  1027. //挂载完成
  1028. mounted() {
  1029. this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  1030. // 表单中 回车 代替 tab
  1031. this.enterToTab();
  1032. },
  1033. computed: {
  1034. ...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "customerOrg", "projPriv"]),
  1035. //是否总检(已总检则不允许修改套餐与分组)
  1036. isComplete() {
  1037. return this.form.completeFlag == '3' ? true : false;
  1038. },
  1039. // 套餐 disabled 如完成体检亦不允许编辑
  1040. displayPackage() {
  1041. let isPersonOrgId = true
  1042. if (!this.isComplete) {
  1043. if (!this.form.customerOrgId) return false
  1044. if (typeof this.form.customerOrgId == 'string') {
  1045. if (this.form.customerOrgId == this.dict.personOrgId) isPersonOrgId = false
  1046. } else {
  1047. if (this.form.customerOrgId[this.form.customerOrgId.length - 1] == this.dict.personOrgId) isPersonOrgId = false
  1048. }
  1049. }
  1050. return isPersonOrgId
  1051. },
  1052. // 分组 disabled 如完成体检亦不允许编辑
  1053. displayGroup() {
  1054. let isPersonOrgId = true
  1055. if (!this.isComplete) {
  1056. if (!this.form.customerOrgId) return isPersonOrgId
  1057. if (typeof this.form.customerOrgId == 'string') {
  1058. if (this.form.customerOrgId != this.dict.personOrgId) isPersonOrgId = false
  1059. } else {
  1060. if (this.form.customerOrgId[this.form.customerOrgId.length - 1] != this.dict.personOrgId) isPersonOrgId = false
  1061. }
  1062. }
  1063. return isPersonOrgId
  1064. },
  1065. },
  1066. methods: {
  1067. ...mapActions(['getPatientRegisterAbs']),
  1068. dddw, moment, checkPagePriv,
  1069. btnTest() {
  1070. // console.log('form', this.form)
  1071. },
  1072. validateMobileTelephone(rule, value, callback) {
  1073. if (value) {
  1074. if (!isValidMobileNumber(value)) {
  1075. callback(new Error('请填写正确的手机号!'));
  1076. } else {
  1077. callback();
  1078. }
  1079. } else {
  1080. callback();
  1081. }
  1082. },
  1083. //数据初始化
  1084. dictInit() {
  1085. // 获取系统参数 -- 职业病 体检类别编号
  1086. let sysParmId = "patient_register_occ_check_id"
  1087. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId })
  1088. .then(res => {
  1089. if (res.code > -1) this.patient_register_occ_check_id = res.data
  1090. })
  1091. // 获取系统参数 -- 合并检验检查条码
  1092. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'merge_lis_pacs_label' })
  1093. .then(res => {
  1094. if (res.code > -1) {
  1095. this.merge_lis_pacs_label = res.data || "0"
  1096. }
  1097. })
  1098. // 获取系统参数 -- 人员登记必填列
  1099. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'patient_register_required_field' })
  1100. .then(res => {
  1101. if (res.code > -1) {
  1102. try {
  1103. let masterCols = JSON.parse(res.data)
  1104. let cols = Object.keys(masterCols)
  1105. cols.forEach(key => {
  1106. if (!this.rules[key]) {
  1107. this.rules[key] = [{
  1108. required: true, message: `请填写${masterCols[key]}`, trigger: "blur"
  1109. }]
  1110. }
  1111. });
  1112. } catch (error) {
  1113. console.error(error)
  1114. }
  1115. }
  1116. })
  1117. //性别(仅档案用)
  1118. getapi("/api/app/sex").then((res) => {
  1119. if (res.code == 1) {
  1120. this.dict.sex = res.data;
  1121. }
  1122. });
  1123. //适用性别
  1124. getapi("/api/app/for-sex").then((res) => {
  1125. if (res.code == 1) {
  1126. this.dict.forSex = res.data;
  1127. }
  1128. });
  1129. //体检中心
  1130. getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
  1131. (res) => {
  1132. if (res.code == 1) {
  1133. this.dict.organization = res.data;
  1134. }
  1135. }
  1136. );
  1137. //体检单位
  1138. // getapi("/api/app/customer-org/in-filter").then((res) => {
  1139. // if (res.code == 1) {
  1140. // this.dict.customerOrg = res.data;
  1141. // }
  1142. // });
  1143. //体检类别
  1144. getapi("/api/app/medical-type/in-filter").then((res) => {
  1145. if (res.code > -1) {
  1146. this.dict.medicalType = res.data;
  1147. }
  1148. });
  1149. //人员类别
  1150. getapi("/api/app/personnel-type/in-filter").then((res) => {
  1151. if (res.code > -1) {
  1152. this.dict.personnelType = res.data;
  1153. }
  1154. });
  1155. //婚姻状况
  1156. getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
  1157. if (res.code == 1) {
  1158. this.dict.maritalStatus = res.data;
  1159. }
  1160. });
  1161. //性激素期
  1162. getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
  1163. if (res.code == 1) {
  1164. this.dict.sexHormoneTerm = res.data;
  1165. }
  1166. });
  1167. //民族
  1168. getapi("/api/app/nation/in-filter").then((res) => {
  1169. if (res.code != -1) {
  1170. this.dict.nation = res.data;
  1171. this.nation = deepCopy(res.data)
  1172. }
  1173. });
  1174. //籍惯 ,出生地
  1175. getapi("/api/app/birth-place/in-filter").then((res) => {
  1176. if (res.code == 1) {
  1177. this.dict.birthPlace = res.data;
  1178. }
  1179. });
  1180. //套餐
  1181. postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
  1182. if (res.code == 1) {
  1183. this.dict.medicalPackage = res.data;
  1184. }
  1185. });
  1186. //支付方式
  1187. getapi("/api/app/pay-mode").then((res) => {
  1188. if (res.code == 1) {
  1189. this.dict.payMode = res.data;
  1190. }
  1191. });
  1192. //职业病检查类别
  1193. postapi("/api/app/OcCheckType/GetList").then((res) => {
  1194. if (res.code > -1) {
  1195. this.dict.occCheckType = res.data;
  1196. }
  1197. });
  1198. //接害因素
  1199. postapi("/api/app/Poison/GetPoisonWithTypeList").then(res => {
  1200. if (res.code > -1) {
  1201. this.poison = res.data;
  1202. this.poisonList = []
  1203. this.poison.forEach(e => {
  1204. e.poisonDtos.forEach(e2 => {
  1205. this.poisonList.push({
  1206. poisonTypeName: e.poisonTypeName,
  1207. id: e2.id,
  1208. displayName: e2.displayName,
  1209. simpleCode: e2.simpleCode
  1210. })
  1211. });
  1212. });
  1213. }
  1214. })
  1215. //项目类别 树结构
  1216. // getapi("/api/app/item-type/by-code-all").then((res) => {
  1217. // if (res.code != -1) {
  1218. // this.dict.itemTypeTree = res.data;
  1219. // tcdate(this.dict.itemTypeTree);
  1220. // }
  1221. // });
  1222. // postapi("/api/app/asbitem/GetBasicList",{isFilterActive:'Y'}).then((res) => {
  1223. // if (res.code != -1) {
  1224. // this.dict.asbItemAll = res.data;
  1225. // }
  1226. // });
  1227. // // console.log("dict", this.dict);
  1228. },
  1229. changeMedicalTypeId(v) {
  1230. if (this.patient_register_occ_check_id && this.patient_register_occ_check_id == v) {
  1231. this.form.isPatientOccupationalDisease = 'Y'
  1232. } else {
  1233. this.form.isPatientOccupationalDisease = 'N'
  1234. }
  1235. },
  1236. changeChooseOrgId(v) {
  1237. let parentId = null
  1238. if (v) {
  1239. parentId = v[v.length - 1]
  1240. // 已经查询过或无叶子节点的无需再查询
  1241. let lfind = arrayExistObj(this.patientRegister.customerOrgs, 'parentId', parentId)
  1242. if (lfind > -1) return
  1243. lfind = arrayExistObj(this.patientRegister.customerOrgs, 'id', parentId)
  1244. if (lfind > -1 && this.patientRegister.customerOrgs[lfind].isChild == 'N') return
  1245. } else {
  1246. return
  1247. }
  1248. this.getCustomerOrgChild(parentId)
  1249. },
  1250. getCustomerOrgChild(parentId) {
  1251. return new Promise((resolve, reject) => {
  1252. postapi('/api/app/CustomerOrg/GetCustomerOrgByParentId', { parentId })
  1253. .then(res => {
  1254. if (res.code > -1) {
  1255. res.data.forEach(e => {
  1256. e.isLeaf = e.isChild == 'Y' ? false : true
  1257. });
  1258. // console.log('this.patientRegister.customerOrgs', this.patientRegister.customerOrgs)
  1259. let treeData = reMadeOrgTree(deepCopy(res.data), this.LocalConfig.patientRegister.dispCustomerOrgCode);
  1260. treeData.forEach(e => {
  1261. if (arrayExistObj(this.patientRegister.customerOrgs, 'id', e.id) == -1) {
  1262. this.patientRegister.customerOrgs.push(e)
  1263. }
  1264. });
  1265. this.patientRegister.customerOrgTreeAll = madeTree(this.patientRegister.customerOrgs, 'treeChildren', 'parentId', 'id', null)
  1266. // console.log('this.patientRegister.customerOrgTreeAll', this.patientRegister.customerOrgTreeAll)
  1267. resolve(treeData)
  1268. }
  1269. })
  1270. .catch(err => {
  1271. reject(err)
  1272. })
  1273. })
  1274. },
  1275. lazyLoad(node, resolve) {
  1276. if (node && node.data && node.data.id) {
  1277. this.getCustomerOrgChild(node.data.id).then(res => {
  1278. resolve(res)
  1279. }).catch(err => {
  1280. resolve([])
  1281. })
  1282. }
  1283. },
  1284. // 确定选中企业
  1285. btnOkOrg() {
  1286. let customerOrgId = ''
  1287. this.changeCustomerOrgId(this.form.customerOrgId)
  1288. .then(res => {
  1289. this.form.customerOrgParentId = res
  1290. })
  1291. if (Array.isArray(this.form.customerOrgId)) {
  1292. customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  1293. } else {
  1294. customerOrgId = this.form.customerOrgId
  1295. }
  1296. // 设置单位显示值
  1297. let node = getTreeNode(this.patientRegister.customerOrgTreeAll, "treeChildren", "id", customerOrgId)
  1298. if (node) this.form.customerOrgName = node.displayName
  1299. this.dialogOrg = false
  1300. },
  1301. // 获取登记信息 初始form表单数据
  1302. initFormData(patientRegisterId) {
  1303. return new Promise((resolve, reject) => {
  1304. this.peisid = window.sessionStorage.getItem('peisid');
  1305. let customerOrgId, customerOrgName, customerOrgParentId
  1306. if (this.patientRegister.query.customerOrgId) {
  1307. customerOrgParentId = this.patientRegister.query.CustomerOrgParentId
  1308. customerOrgId = this.patientRegister.query.customerOrgId
  1309. customerOrgName = this.patientRegister.query.customerOrgName
  1310. } else {
  1311. customerOrgParentId = this.form.customerOrgParentId
  1312. customerOrgId = this.form.customerOrgId
  1313. customerOrgName = this.form.customerOrgName
  1314. }
  1315. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  1316. if (!patientRegisterId) { //添加
  1317. this.peoplePhoto = '' // 清掉照片
  1318. this.form = Object.assign({}, this.form, this.formInit)
  1319. this.form.registerCheckAsbitems = []
  1320. this.form.medicalCenterId = this.peisid; //体检中收
  1321. this.form.customerOrgId = customerOrgId //体检单位
  1322. this.form.customerOrgParentId = customerOrgParentId //体检父单位
  1323. this.form.customerOrgName = customerOrgName
  1324. // 登记时继承单位的体检类别
  1325. this.getMedicalTypeByOrg(customerOrgId)
  1326. this.completeFlag = '0'
  1327. this.handleFormData().then(() => {
  1328. resolve()
  1329. })
  1330. } else {
  1331. // let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
  1332. postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId })
  1333. .then(res => {
  1334. if (res.code > -1) {
  1335. // this.form = res.data 这种方式,会造成 checkbox 值变化不响应,故取消
  1336. this.form = Object.assign({}, this.form, res.data)
  1337. this.completeFlag = this.form.completeFlag
  1338. this.handleFormData().then(() => resolve())
  1339. }
  1340. })
  1341. .catch(() => resolve())
  1342. }
  1343. })
  1344. },
  1345. // 根据体检单位ID,获取体检类别
  1346. getMedicalTypeByOrg(customerOrgId) {
  1347. return new Promise((resolve, reject) => {
  1348. postapi('/api/app/Customerorg/GetMedicalTypeIdByCustomerOrgId', { customerOrgId })
  1349. .then(res => {
  1350. if (res.code > -1) {
  1351. this.form.medicalTypeId = res.data.medicalTypeId
  1352. this.form.personnelTypeId = res.data.personnelTypeId
  1353. }
  1354. })
  1355. })
  1356. },
  1357. handleFormData() {
  1358. return new Promise((resolve, reject) => {
  1359. // 判断是否职业健康检查
  1360. this.changeMedicalTypeId(this.form.medicalTypeId)
  1361. if (this.form.isPatientOccupationalDisease == 'Y') {
  1362. this.getOccDiseaseData()
  1363. }
  1364. // 处理照片
  1365. this.getPeoplePhoto(this.form.photo)
  1366. // this.dataTransOpts.refresh.register_check_asbitem.D++ //触发所选组合项目刷新 (取消这种触发,减少交互)
  1367. this.dataTransOpts.tableM.register_check_asbitem = this.form.registerCheckAsbitems
  1368. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1369. e.standTotal = e.amount * e.standardPrice
  1370. e.total = e.amount * e.chargePrice
  1371. });
  1372. // 单位/个人 的分组与套餐处理
  1373. this.changeCustomerOrgId(this.form.customerOrgId)
  1374. .then(() => {
  1375. // 刷新明细项目(已登记)
  1376. this.dataTransOpts.refresh.register_check_asbitem.OnlyRefreshAsbitem++
  1377. })
  1378. .finally(() => {
  1379. resolve()
  1380. })
  1381. })
  1382. },
  1383. //快速选择组合项目时,调整可按拼间简码及简称查找
  1384. filterMethod(keyWords) {
  1385. //// console.log('filterMethod',this.asbItemQuick)
  1386. if (keyWords) {
  1387. this.nation = [];
  1388. this.dict.nation.forEach(item => {
  1389. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1390. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  1391. this.nation.push(item);
  1392. }
  1393. });
  1394. } else {
  1395. this.nation = deepCopy(this.dict.nation);
  1396. }
  1397. },
  1398. //选择单位,并返回顶级单位
  1399. changeCustomerOrgId(v) {
  1400. // 始终返回 reslove ,主要用于流程控制
  1401. return new Promise((resolve, reject) => {
  1402. console.log('选择单位 changeCustomerOrgId', v, this.form.customerOrgParentId)
  1403. let customerOrgId = "", customerOrgParentId = ""
  1404. if (Array.isArray(v) && v.length > 0) {
  1405. customerOrgId = v[v.length - 1]
  1406. } else {
  1407. customerOrgId = v // 后台顶级单位ID未获取正确(再获取一次)
  1408. }
  1409. // 保留之前预选的单位 if (!this.preCustomerOrgId)
  1410. this.preCustomerOrgId = customerOrgId
  1411. this.getParentCustomerOrgId(v)
  1412. .then(res => {
  1413. console.log('获得顶级单位 getParentCustomerOrgId', res, this.form.customerOrgParentId)
  1414. if (res) {
  1415. customerOrgParentId = res
  1416. // 获取并设置体检次数(个人的固定 "00000000-0000-0000-0000-000000000001" ),单位刷新分组字典
  1417. this.getCustomerOrgRegisterList(customerOrgParentId)
  1418. .then(() => {
  1419. // 需要触发 修改 分组/套餐 顶级ID 没有变时,不改变套餐与分组
  1420. if (customerOrgParentId != this.form.customerOrgParentId) {
  1421. this.form.customerOrgGroupId = null
  1422. this.form.medicalPackageId = null
  1423. // 清除套餐分组标识
  1424. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1425. e.isBelongGroupPackage = 'N'
  1426. });
  1427. // 如果是个人,则清除分组字典
  1428. if (customerOrgParentId == this.dict.personOrgId) {
  1429. this.patientRegister.customerOrgGroup = []
  1430. }
  1431. if (this.form.customerOrgParentId == this.dict.personOrgId) {
  1432. this.changeMedicalPackageId()
  1433. } else {
  1434. this.changeCustomerOrgGroupId()
  1435. }
  1436. }
  1437. resolve(customerOrgParentId)
  1438. })
  1439. } else {
  1440. resolve(customerOrgParentId)
  1441. }
  1442. })
  1443. .catch(() => {
  1444. resolve(customerOrgParentId)
  1445. })
  1446. })
  1447. },
  1448. // 获取顶级单位ID
  1449. getParentCustomerOrgId(v) {
  1450. return new Promise((resolve, reject) => {
  1451. let customerOrgParentId = null
  1452. if (Array.isArray(v) && v.length > 0) {
  1453. customerOrgParentId = v[0]
  1454. resolve(customerOrgParentId)
  1455. } else {
  1456. if (!v) {
  1457. resolve(customerOrgParentId)
  1458. } else {
  1459. if (v == this.dict.personOrgId) {
  1460. resolve(v) // 等于个人体检时,则直接返回
  1461. } else {
  1462. getapi(`/api/app/customer-org/parent/${v}`)
  1463. .then(res => {
  1464. if (res.code > -1) customerOrgParentId = res.data
  1465. })
  1466. .finally(() => {
  1467. resolve(customerOrgParentId)
  1468. })
  1469. }
  1470. }
  1471. }
  1472. })
  1473. },
  1474. //获取并设置体检次数(个人的固定 "00000000-0000-0000-0000-000000000001" ),单位刷新分组字典
  1475. getCustomerOrgRegisterList(customerOrgParentId) {
  1476. return new Promise((resolve, reject) => {
  1477. if (customerOrgParentId == this.dict.personOrgId) {
  1478. // 个人体检则 固定单位体检次数
  1479. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001"
  1480. return resolve()
  1481. } else {
  1482. console.log('更换单位前顶级单位', this.form.customerOrgParentId)
  1483. console.log('更换单位后顶级单位', customerOrgParentId)
  1484. //获取单位体检次数信息
  1485. getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`)
  1486. .then(res => {
  1487. if (res.code > - 1) {
  1488. // console.log('获取单位体检次数', this.form.customerOrgRegisterId, res.data)
  1489. this.customerOrgRegisterList = res.data
  1490. let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数
  1491. let oldCustomerOrgRegisterId = this.form.customerOrgRegisterId
  1492. // 初始化打开页面人员登记页面
  1493. if (!oldCustomerOrgRegisterId || oldCustomerOrgRegisterId == "00000000-0000-0000-0000-000000000001") {
  1494. if (customerOrgRegisterList.length > 0) {
  1495. this.form.customerOrgRegisterId = customerOrgRegisterList[customerOrgRegisterList.length - 1].id
  1496. }
  1497. } else {
  1498. // 更换了顶级单位时,要更换体检次数
  1499. if (customerOrgParentId != this.form.customerOrgParentId) {
  1500. this.form.customerOrgRegisterId = ''
  1501. if (customerOrgRegisterList.length > 0) {
  1502. this.form.customerOrgRegisterId = customerOrgRegisterList[customerOrgRegisterList.length - 1].id
  1503. }
  1504. }
  1505. }
  1506. // 清除单位分组
  1507. this.patientRegister.customerOrgGroup = []
  1508. if (!this.form.customerOrgRegisterId) {
  1509. console.log('当前所选单位无可用的体检次数')
  1510. resolve()
  1511. } else {
  1512. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId}
  1513. console.log('更换体检次数', this.form.customerOrgRegisterId)
  1514. if (this.form.customerOrgRegisterId && this.form.customerOrgRegisterId != '00000000-0000-0000-0000-000000000001') {
  1515. //获取单位分组
  1516. postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId: this.form.customerOrgRegisterId })
  1517. .then(res2 => {
  1518. if (res2.code > -1) {
  1519. this.patientRegister.customerOrgGroup = res2.data;
  1520. }
  1521. })
  1522. .finally(() => {
  1523. resolve()
  1524. })
  1525. }
  1526. }
  1527. }
  1528. })
  1529. .catch(err => {
  1530. console.error('获取单位体检次数信息失败', err)
  1531. resolve()
  1532. })
  1533. }
  1534. })
  1535. },
  1536. //读取身份证信息
  1537. peopleIcCard() {
  1538. if (!this.$peisAPI) {
  1539. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1540. return
  1541. }
  1542. this.$peisAPI.peopleIcCard().then(res => {
  1543. // console.log('peopleIcCard', res)
  1544. let lres = JSON.parse(res)
  1545. if (lres.code >= -1) {
  1546. let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
  1547. this.form.patientName = idNos.Name
  1548. this.form.birthDate = idNos.birthDate
  1549. this.form.sexId = idNos.sexId
  1550. this.form.age = idNos.age
  1551. this.form.nationId = idNos.nationId
  1552. this.form.idNo = idNos.IDCode
  1553. this.form.address = idNos.Address
  1554. this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
  1555. // this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  1556. // isNameContinue 身份证号查重后是否姓名查重
  1557. this.changeIdNo('N') // 触发身份证查询档案号(Y:身份证没查到,再按名字查,N:仅按身份证号查)
  1558. } else {
  1559. this.$message.error({ showClose: true, message: `${lres.message}` })
  1560. }
  1561. })
  1562. },
  1563. // 分诊排队
  1564. fnQueue(row) {
  1565. this.queueParams = {
  1566. patientRegisterId: row.id
  1567. }
  1568. this.dialogWin.queue = true
  1569. this.dataTransOpts.plus.queue++
  1570. },
  1571. //修改单位体检次数
  1572. changeMedicalTimes() {
  1573. this.form.customerOrgGroupId = null
  1574. this.changeCustomerOrgGroupId()
  1575. //获取体检次数下的分组
  1576. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  1577. },
  1578. //移除旧分组或套餐的组合项目
  1579. removeGroupPackageAsb() {
  1580. let body = { registerAsbitemIds: [] }
  1581. let registerAsbitemIds = []
  1582. let chargeComplete = ''
  1583. //体检基本信息未保存时,删除所有所选项目
  1584. if (!this.form.id) {
  1585. this.patientRegister.patientRegisterAbs = [];
  1586. return body;
  1587. }
  1588. //删除已选 分组或套餐的组合项目 ,如已收费或 已检时,将 groupPackageId 置为null
  1589. for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
  1590. if (!this.patientRegister.patientRegisterAbs[i].id) {
  1591. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1592. i--
  1593. continue
  1594. }
  1595. if (this.patientRegister.patientRegisterAbs[i].isCharge == 'Y' || this.patientRegister.patientRegisterAbs[i].checkCompleteFlag != '0') {
  1596. chargeComplete += this.patientRegister.patientRegisterAbs[i].asbitemName + ','
  1597. this.patientRegister.patientRegisterAbs[i].groupPackageId = null
  1598. } else {
  1599. //数据库有,才添加到待删除的数组中
  1600. if (this.patientRegister.patientRegisterAbs[i].id) {
  1601. registerAsbitemIds.push(this.patientRegister.patientRegisterAbs[i].id)
  1602. }
  1603. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1604. i--
  1605. }
  1606. }
  1607. if (chargeComplete) {
  1608. this.$message.info({ showClose: true, message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
  1609. }
  1610. body = { registerAsbitemIds };
  1611. return body;
  1612. },
  1613. //添加新套餐/分组的组合项目
  1614. addGroupPackageAsb(groupPackageAsb, typeFlag, groupPackageId) {
  1615. let payTypeFlag = '0'; //默认个人支付
  1616. let lfind = -1
  1617. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
  1618. for (let i = 0; i < groupPackageAsb.length; i++) {
  1619. lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id)
  1620. if (lfind > - 1) {
  1621. this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
  1622. //editCount++
  1623. continue
  1624. }
  1625. let pojo = {
  1626. asbitemId: groupPackageAsb[i].id,
  1627. asbitemName: groupPackageAsb[i].displayName,
  1628. patientRegisterId: this.form.id,
  1629. standardPrice: groupPackageAsb[i].price,
  1630. chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice : groupPackageAsb[i].price,
  1631. payTypeFlag,
  1632. discount: typeFlag == 'group' ? groupPackageAsb[i].discount : 100,
  1633. isCharge: "N",
  1634. amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount : 1,
  1635. groupPackageId: groupPackageId
  1636. }
  1637. this.patientRegister.patientRegisterAbs.push(pojo)
  1638. }
  1639. },
  1640. //获取体检次数下的分组
  1641. getCustomerOrgGroup(customerOrgRegisterId) {
  1642. this.patientRegister.customerOrgGroup = []
  1643. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
  1644. postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId }).then(res => {
  1645. if (res.code != - 1) {
  1646. this.patientRegister.customerOrgGroup = res.data;
  1647. }
  1648. })
  1649. },
  1650. //修改出生日期
  1651. changeBirthDate() {
  1652. this.form.age = birthdayToAge(this.form.birthDate)
  1653. },
  1654. //修改出生日期
  1655. changeAge() {
  1656. this.form.birthDate = ageToBirthday(this.form.age)
  1657. },
  1658. //修改身份证,生成年龄、出生、性别
  1659. // isNameContinue 身份证号查重后是否姓名查重
  1660. changeIdNo(isNameContinue) {
  1661. if (!this.form.idNo) return
  1662. this.Query(this.form.idNo,isNameContinue)
  1663. let ret = parseID(this.form.idNo)
  1664. // console.log('changeIdNo',ret)
  1665. if (ret.age != -1) {
  1666. this.form.birthDate = new Date(ret.birthday)
  1667. this.form.age = ret.age
  1668. this.form.sexId = ret.sex
  1669. }
  1670. },
  1671. // 输入名字时,查重
  1672. changePatientName() {
  1673. console.log('this.LocalConfig.patientRegister.findPatientByName', this.LocalConfig.patientRegister.findPatientByName)
  1674. if (this.LocalConfig.patientRegister.findPatientByName) {
  1675. this.Query(this.form.patientName)
  1676. }
  1677. },
  1678. // //分组改变时触发
  1679. changeCustomerOrgGroupId() {
  1680. this.prAsbOpraOpts.prAsbGroup++
  1681. },
  1682. // //套餐改变时触发
  1683. changeMedicalPackageId() {
  1684. this.prAsbOpraOpts.prAsbPackage++
  1685. },
  1686. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  1687. // isNameContinue 身份证号查重后是否姓名查重
  1688. Query(param,isNameContinue) {
  1689. this.patientChoosed = { id: '' } // 清空之前的选择
  1690. //编辑的时候不查重
  1691. if (this.form.id || !param) return;
  1692. //// console.log(`/api/app/patient/in-filter?Filter=${param}`)
  1693. let body = {
  1694. filter: param,
  1695. maxResultCount: 500
  1696. }
  1697. this.patientList = []
  1698. postapi('/api/app/patient/getlistinfilter', body).then((res) => {
  1699. if (res.code > -1) {
  1700. // console.log("查重 ", res); //有数据才显示
  1701. if (res.data && res.data.length > 0) {
  1702. this.patientList = res.data;
  1703. this.dialogVisible = true;
  1704. }else{
  1705. // 读身份证没
  1706. if(isNameContinue == 'Y' && this.LocalConfig.patientRegister.findPatientByName){
  1707. this.Query(this.form.patientName)
  1708. }
  1709. }
  1710. }
  1711. });
  1712. },
  1713. //列表选中
  1714. rowick(row) {
  1715. this.patientChoosed = row;
  1716. },
  1717. patientDblclick(row) {
  1718. this.patientChoosed = row;
  1719. this.choosePatient()
  1720. },
  1721. //确定选择人员
  1722. choosePatient() {
  1723. if (!this.patientChoosed.id) {
  1724. this.$message.warning({ showClose: true, message: '请选择人员档案信息' })
  1725. return;
  1726. }
  1727. this.dialogVisible = false;
  1728. this.form.patientId = this.patientChoosed.id;
  1729. this.form.patientNo = this.patientChoosed.patientNo;
  1730. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  1731. // 考滤录入有值,档案却无值
  1732. if (this.patientChoosed.displayName) this.form.patientName = this.patientChoosed.displayName;
  1733. if (this.patientChoosed.sexId) this.form.sexId = this.patientChoosed.sexId;
  1734. if (this.patientChoosed.birthDate) this.form.birthDate = new Date(this.patientChoosed.birthDate);
  1735. if (this.patientChoosed.nationId) this.form.nationId = this.patientChoosed.nationId;
  1736. if (this.patientChoosed.idNo) this.form.idNo = this.patientChoosed.idNo;
  1737. if (!this.form.maritalStatusId) this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  1738. if (!this.form.telephone) this.form.telephone = this.patientChoosed.telephone;
  1739. if (!this.form.mobileTelephone) this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  1740. if (this.form.birthDate) {
  1741. this.form.age = birthdayToAge(this.form.birthDate)
  1742. }
  1743. if (this.form.idNo) {
  1744. let ret = parseID(this.form.idNo)
  1745. this.form.birthDate = new Date(ret.birthday)
  1746. this.form.age = ret.age
  1747. this.form.sexId = ret.sex
  1748. }
  1749. },
  1750. registerRowClick(row) {
  1751. this.registerChoosed = row;
  1752. },
  1753. registerRowDblclick(row) {
  1754. this.registerChoosed = row;
  1755. this.chooseRegister()
  1756. },
  1757. chooseRegister() {
  1758. if (!this.registerChoosed) {
  1759. alert("请选中人员登记信息");
  1760. return;
  1761. }
  1762. objCopy(this.registerChoosed, this.form)
  1763. // this.patientRegister.patientRegisterId = this.registerChoosed.id
  1764. // this.patientRegister.photo = this.registerChoosed.photo
  1765. // this.getPatientRegisterAbs(this.registerChoosed.id)
  1766. this.dataTransOpts.tableS.patient_register.id = this.registerChoosed.id
  1767. setTimeout(() => {
  1768. this.dataTransOpts.refresh.register_check_asbitem.M++
  1769. }, 20);
  1770. this.registerVisible = false
  1771. },
  1772. // 组装基本信息保存的参数体
  1773. madePrBody() {
  1774. //赋值
  1775. let body = deepCopy(this.form);
  1776. // // console.log('this.form',this.form)
  1777. console.log('body', this.form, body)
  1778. if (this.form.birthDate) {
  1779. try {
  1780. body.birthDate = moment(new Date(this.form.birthDate)).format("yyyy-MM-DD")
  1781. } catch (error) {
  1782. // this.form.birthDate != "Invalid date"
  1783. body.birthDate = null
  1784. }
  1785. } else {
  1786. body.birthDate = null
  1787. }
  1788. if (body.birthDate == "Invalid date") body.birthDate = null
  1789. if (isNaN(body.age)) {
  1790. body.age = null
  1791. } else {
  1792. body.age = Number(body.age)
  1793. }
  1794. // // console.log('body',body)
  1795. // Invalid date
  1796. delete body.registerManType;
  1797. delete body.patientRegisterNo;
  1798. delete body.medicalTimes;
  1799. // delete body.completeFlag;
  1800. delete body.isMedicalStart;
  1801. delete body.patientNo;
  1802. delete body.creatorId;
  1803. delete body.creationTime;
  1804. delete body.lastModificationTime;
  1805. delete body.lastModifierId;
  1806. delete body.isVipBox;
  1807. delete body.isNameHideBox;
  1808. delete body.isPhoneFollowBox;
  1809. delete body.isLockBox;
  1810. delete body.photo;
  1811. // if(this.form.registerManType == 'customer') delete body.medicalStartDate;
  1812. if (this.form.id) delete body.medicalStartDate;
  1813. setNull(body, this.defaultNull);
  1814. if (typeof this.form.customerOrgId == 'object') {
  1815. if (this.form.customerOrgId.length > 0) body.customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  1816. }
  1817. //日期转换 日期控件增加格式
  1818. // // console.log("body.birthDate", body.birthDate);
  1819. // if (body.birthDate) {
  1820. // body.birthDate = moment(new Date(body.birthDate)).format(
  1821. // "yyyy-MM-DD"
  1822. // );
  1823. // }
  1824. return body
  1825. },
  1826. // 验证职业病数据合法性
  1827. validateOccData() {
  1828. let err = ''
  1829. if (!this.form.idNo) return "职业健康检查必须填写 身份证号!"
  1830. if (this.form.maritalStatusId == '9') return "职业健康检查 婚姻不允许填未知!"
  1831. if (this.form.sexId == 'U') return "职业健康检查 性别不允许填未知!"
  1832. if (!this.form.ocCheckTypeId) return "职业健康检查必须填写 检查类别!"
  1833. if (!this.form.jobType) return "职业健康检查必须填写 工种!"
  1834. if (this.form.poisonIds == null || this.form.poisonIds.length == 0) return "职业健康检查必须填写 接害因素!"
  1835. return err
  1836. },
  1837. //提交
  1838. btnSubmit(formName, msgTip) {
  1839. //console.log('btnSubmit,formName,form', formName, JSON.stringify(this.form))
  1840. console.log('this.rules', this.rules)
  1841. this.$refs[formName].validate((valid, fields) => {
  1842. // console.log('fields', fields)
  1843. if (!valid) {
  1844. this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
  1845. return false
  1846. }
  1847. // 手机号非必填时,如有填手机号,也要再验证手机号是否合法
  1848. if (this.form['mobileTelephone']) {
  1849. if (!isValidMobileNumber(this.form['mobileTelephone'])) {
  1850. this.$message.warning({ showClose: true, message: '请填写正确的手机号!' });
  1851. return false
  1852. }
  1853. }
  1854. //console.log('btnSubmit1', formName)
  1855. if (this.form.customerOrgId != this.dict.personOrgId) {
  1856. if (!this.form.customerOrgRegisterId) {
  1857. this.$message.warning({ showClose: true, message: "请填写单位体检次数!" });
  1858. return false
  1859. }
  1860. }
  1861. if (this.form.idNo && checkIDCode(this.form.idNo) == false) {
  1862. this.$message.warning({ showClose: true, message: "身份证号填写不合法!" });
  1863. return false
  1864. }
  1865. // 如果是职业病,数据验证
  1866. if (this.form.isPatientOccupationalDisease == 'Y') {
  1867. let message = this.validateOccData()
  1868. if (message) {
  1869. this.$message.warning({ showClose: true, message });
  1870. return false
  1871. }
  1872. }
  1873. // console.log('btnSubmit2', formName)
  1874. let body = this.madePrBody()
  1875. // console.log('madePrBody',body)
  1876. body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem)
  1877. if (this.form.id) {
  1878. // 更新时,先保存明细,再更新主表
  1879. // this.prAsbOpraOpts.prAsbSave++ //触发组合项目保存
  1880. body.patientRegisterId = body.id;
  1881. } else {
  1882. delete body.id;
  1883. }
  1884. //console.log('btnSubmit3', formName)
  1885. // // console.log(`/api/patientregister/createreturninfo`, body);
  1886. // 保存前,判断是否有互斥项目
  1887. this.checkAsbItemHC()
  1888. .then(() => {
  1889. return postapi(`/api/PatientRegister/CreatePatientRegister`, body)
  1890. })
  1891. .then(async (res) => {
  1892. if (res.code > -1) {
  1893. // 因为 res.data 返回的 isPatientOccupationalDisease 是错误的(因为职业病尚未保存,所以以form里的值为准)
  1894. let isPatientOccupationalDisease = this.form.isPatientOccupationalDisease
  1895. this.form = Object.assign({}, this.form, res.data, { isPatientOccupationalDisease })
  1896. this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
  1897. delete this.dataTransOpts.tableS.patient_register.registerCheckAsbitems
  1898. // 保存成功赋 id 值等
  1899. this.dataTransOpts.tableM.register_check_asbitem = res.data.registerCheckAsbitems
  1900. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1901. e.total = e.amount * e.chargePrice
  1902. });
  1903. //一般读身份证照片时,会出现这种情况
  1904. if (this.peoplePhoto && this.peoplePhoto.indexOf("data:image") > -1) await savePeoplePhoto(res.data.id, this.peoplePhoto);
  1905. // 如果是职业病,则保存职业病相关信息
  1906. // console.log('this.form.isPatientOccupationalDisease', this.form.isPatientOccupationalDisease)
  1907. if (this.form.isPatientOccupationalDisease == 'Y') {
  1908. await this.occUpdate()
  1909. }
  1910. // 保存即发送收费申请 正式登记的才发送申请
  1911. if (this.form.completeFlag != '0' && this.LocalConfig.patientRegister.immediateToHisCharge) {
  1912. await this.immediateToHisCharge(this.form.id)
  1913. }
  1914. // 首次正式登记或者预登记转正式登记,提示打印条码与指引单
  1915. if (this.completeFlag == '0' && this.form.completeFlag != '0') {
  1916. if (Array.isArray(this.LocalConfig.patientRegister.printGuideLabel) && this.LocalConfig.patientRegister.printGuideLabel.length > 0) {
  1917. this.$confirm("是否打印 指引单、人员条码、检验条码及 Pacs 条码?", "提示", {
  1918. confirmButtonText: "是",
  1919. cancelButtonText: "否",
  1920. type: "warning",
  1921. })
  1922. .then(() => {
  1923. return this.labelPrint(false)
  1924. })
  1925. .then(res => {
  1926. return this.guidePrint('0001', false)
  1927. })
  1928. .catch((err) => {
  1929. if (err != "cancel") {
  1930. console.log(err)
  1931. this.$message.error({ showClose: true, message: err })
  1932. }
  1933. })
  1934. .finally(() => {
  1935. this.completeFlag = this.form.completeFlag
  1936. });
  1937. }
  1938. }
  1939. }
  1940. }
  1941. )
  1942. .catch(err => {
  1943. console.error(err)
  1944. })
  1945. ;
  1946. });
  1947. },
  1948. // 检查项目互斥
  1949. checkAsbItemHC() {
  1950. return new Promise((resolve, reject) => {
  1951. let asbitemIds = []
  1952. //console.log('this.dataTransOpts.tableM.register_check_asbitem',this.dataTransOpts.tableM.register_check_asbitem)
  1953. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1954. asbitemIds.push(e.asbitemId)
  1955. });
  1956. let message = ''
  1957. if (asbitemIds.length == 0) {
  1958. resolve()
  1959. } else {
  1960. postapi('/api/app/AsbitemMutualExclusion/GetAsbitemIsMutualExclusion', { asbitemIds })
  1961. .then(res => {
  1962. if (res.code > -1) {
  1963. if (res?.data?.message) message = res.data.message
  1964. }
  1965. })
  1966. .finally(() => {
  1967. if (message) {
  1968. switch (this.hc_warn_mode) {
  1969. case '1': ''
  1970. this.$confirm(`${message} 是否继续?`, "提示", {
  1971. confirmButtonText: "是",
  1972. cancelButtonText: " 否 ",
  1973. type: "warning",
  1974. })
  1975. .then(() => {
  1976. resolve()
  1977. })
  1978. .catch((err) => {
  1979. reject(message)
  1980. // if (err == "cancel") {
  1981. // console.log("已取消删除");
  1982. // }
  1983. });
  1984. break;
  1985. case '2':
  1986. this.$message.error({ showClose: true, message })
  1987. reject(message)
  1988. break;
  1989. default:
  1990. this.$message.warning({ showClose: true, message })
  1991. resolve()
  1992. break;
  1993. }
  1994. } else {
  1995. resolve()
  1996. }
  1997. })
  1998. }
  1999. })
  2000. },
  2001. // 保存职业病信息
  2002. async occUpdate() {
  2003. // 职业病基本信息
  2004. let lriskFactors = []
  2005. this.form.poisonIds.forEach(e => {
  2006. lriskFactors.push(dddw(this.poisonList, 'id', e, 'displayName'))
  2007. });
  2008. let diseaseBase = {
  2009. patientRegisterId: this.form.id,
  2010. ocCheckTypeId: this.form.ocCheckTypeId,
  2011. jobType: this.form.jobType,
  2012. riskFactors: `${lriskFactors}`,
  2013. occupationalDiseaseNumber: this.form.occupationalDiseaseNumber
  2014. }
  2015. // 职业病接害因素
  2016. let poisons = this.dataTransOpts.tableM.patient_poison.filter(e => {
  2017. return this.form.poisonIds.indexOf(e.poisonId) > - 1
  2018. })
  2019. this.form.poisonIds.forEach(e => {
  2020. if (arrayExistObj(poisons, 'poisonId', e) == -1) {
  2021. poisons.push({
  2022. patientRegisterId: this.form.id,
  2023. poisonId: e,
  2024. occupationalAbnormalId: null
  2025. })
  2026. }
  2027. });
  2028. let patientOccupationalDisease = Object.assign({}, this.dataTransOpts.tableS.patient_occupational_disease || {}, diseaseBase)
  2029. let body = {
  2030. patientRegisterId: this.form.id,
  2031. patientOccupationalDisease,
  2032. patientPoisons: poisons,
  2033. isPatientOccupationalDiseaseUpdate: "Y", //基本信息
  2034. isPatientPoisonsUpdate: "Y", //接害因素
  2035. isPatientPastMedicalHistorysUpdate: "N", // 既往病史
  2036. isPatientOccupationalMedicalHistorysUpdate: "N", // 职业病史
  2037. isPatientOccupationalHistorysUpdate: "N", // 职业史
  2038. isPatientSymptomsUpdate: "N", // 症状
  2039. }
  2040. try {
  2041. await postapi('/api/app/OccupationalDisease/CreateOccupationalDiseaseWithDetail', body)
  2042. this.getOccDiseaseData()
  2043. } catch (error) {
  2044. console.log('occUpdate error', error)
  2045. }
  2046. },
  2047. // 获取职业病信息
  2048. getOccDiseaseData() {
  2049. return new Promise((resolve, reject) => {
  2050. let patientRegisterId = this.form.id
  2051. postapi('/api/app/OccupationalDisease/GetOccupationalDiseaseWithDetailByPatientRegisterId', { patientRegisterId })
  2052. .then(res => {
  2053. if (res.code > -1) {
  2054. if (res.data['patientOccupationalDisease'] == null) {
  2055. this.dataTransOpts.tableS.patient_occupational_disease = { patientRegisterId }
  2056. } else {
  2057. this.dataTransOpts.tableS.patient_occupational_disease = deepCopy(res.data['patientOccupationalDisease'])
  2058. }
  2059. this.dataTransOpts.tableM.patient_poison = deepCopy(res.data['patientPoisonDtos'])
  2060. this.form.ocCheckTypeId = this.dataTransOpts.tableS.patient_occupational_disease.ocCheckTypeId
  2061. this.form.jobType = this.dataTransOpts.tableS.patient_occupational_disease.jobType
  2062. this.form.occupationalDiseaseNumber = this.dataTransOpts.tableS.patient_occupational_disease.occupationalDiseaseNumber
  2063. let poisonIds = [] // 接害因素IDs
  2064. this.dataTransOpts.tableM.patient_poison.forEach(e => {
  2065. poisonIds.push(e.poisonId)
  2066. });
  2067. this.form.poisonIds = poisonIds
  2068. resolve('')
  2069. } else {
  2070. reject(res.message)
  2071. }
  2072. })
  2073. .catch(error => {
  2074. reject(error)
  2075. })
  2076. })
  2077. },
  2078. // 列表数据生成 分组 select
  2079. madeSelectGroup(poisonList) {
  2080. let poison = []
  2081. poisonList.forEach(e => {
  2082. let lfind = arrayExistObj(poison, "poisonTypeName", e.poisonTypeName)
  2083. if (lfind == -1) {
  2084. poison.push({ poisonTypeName: e.poisonTypeName, poisonDtos: [{ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }] })
  2085. } else {
  2086. poison[lfind]['poisonDtos'].push({ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode })
  2087. }
  2088. });
  2089. return poison
  2090. },
  2091. filterMethodPoison(v) {
  2092. // console.log('this.poisonList',v,this.poisonList)
  2093. if (v) {
  2094. let lv = v.toUpperCase()
  2095. let poisonList = this.poisonList.filter(e => {
  2096. return e.poisonTypeName.indexOf(lv) > -1 || e.displayName.indexOf(lv) > -1 || e.simpleCode.indexOf(lv) > -1
  2097. })
  2098. this.poison = this.madeSelectGroup(poisonList)
  2099. } else {
  2100. this.poison = this.madeSelectGroup(this.poisonList)
  2101. }
  2102. console.log('filterMethod', this.poison)
  2103. },
  2104. // 人员新增
  2105. btnAdd() {
  2106. this.dataTransOpts.tableS.patient_register.id = ''
  2107. this.dataTransOpts.refresh.patient_register.S++
  2108. },
  2109. //将现有的数据,复制并展现,但未保存
  2110. rdCopy() {
  2111. if (!this.form.id) {
  2112. this.$message.info({ showClose: true, message: "该信息尚未保存,不可执行此操作!" });
  2113. return;
  2114. }
  2115. this.dataTransOpts.tableS.patient_register.id = ''
  2116. this.peoplePhoto = '/pic/Photo.jpg'
  2117. this.patientRegister.patientRegisterId = '';
  2118. this.form.id = '';
  2119. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  2120. this.form.patientRegisterNo = '';
  2121. this.form.patientNo = '';
  2122. this.form.medicalTimes = 1;
  2123. this.form.patientName = '';
  2124. this.form.photo = '';
  2125. this.form.completeFlag = '1'; //
  2126. this.form.planuserid = '' //清除青藏公司的计划ID
  2127. // this.patientRegister.patientRegisterAbs.forEach(e => {
  2128. // e.id = '';
  2129. // e.patientRegisterId = '';
  2130. // e.isCharge = 'N';
  2131. // e.checkCompleteFlag = '0'
  2132. // e.isLock = 'N'
  2133. // });
  2134. // 触发明细项目复制
  2135. // setTimeout(() => {
  2136. // this.prAsbOpraOpts.copyNew++
  2137. // }, 10);
  2138. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2139. delete e.id
  2140. e.patientRegisterId = ''
  2141. e.isCharge = 'N'
  2142. e.isLock = 'N'
  2143. e.checkCompleteFlag = '0'
  2144. });
  2145. // // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  2146. this.$message.warning({ showClose: true, message: "操作成功,请记得点保存" });
  2147. },
  2148. //删除
  2149. del() {
  2150. deletapi(
  2151. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  2152. ).then((res) => {
  2153. // console.log("删除 操作成功");
  2154. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  2155. this.getCustomerOrgTree();
  2156. });
  2157. },
  2158. // 同步团检人员网上添加项目信息
  2159. btnDownOrg() {
  2160. postapi("/api/app/ThirdInterface/GetListByThirdInterfaceTypeAsync", { thirdInterfaceType: "07" })
  2161. .then(res => {
  2162. if (res.code > -1 && res.data && Array.isArray(res.data) && res.data.length > 0) {
  2163. this.thirdInterfaceId = res.data[0].id
  2164. return postapi('/api/app/AppointPatientRegister/GetByPatientRegisterId', { thirdInterfaceId: this.thirdInterfaceId, appointPatientRegisterId: '1', patientRegisterId: this.form.id })
  2165. }
  2166. })
  2167. .then(res => {
  2168. if (res && res.code > -1) {
  2169. this.form.appointPatientRegisterId = res.data.appointPatientRegisterId
  2170. return postapi('/api/app/AppointPatientRegister/GetAppointRegisterAsbitemListById', {
  2171. thirdInterFaceId: this.thirdInterfaceId,
  2172. appointPatientRegisterId: res.data.appointPatientRegisterId
  2173. })
  2174. }
  2175. })
  2176. .then(res => {
  2177. if (res && res.code > -1) {
  2178. res.data.forEach(e => {
  2179. e.discount = e.standardPrice == 0 ? 100 : Math.floor(e.chargePrice * 10000 / e.standardPrice) / 100
  2180. if (!e.isBelongGroupPackage) {
  2181. e.isBelongGroupPackage = e.isInMedicalPackage
  2182. }
  2183. // e.standTotal = e.amount * e.standardPrice
  2184. e.total = e.amount * e.chargePrice
  2185. });
  2186. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data)
  2187. this.$message.success({ showClose: true, message: '操作成功!' })
  2188. }
  2189. })
  2190. },
  2191. //拍照(已废弃)
  2192. // openCamera() {
  2193. // if (!this.form.id) {
  2194. // alert("请先保存人员信息");
  2195. // return;
  2196. // }
  2197. // this.patientRegister.cameraVisble = true;
  2198. // },
  2199. //拍照(调壳程序)
  2200. photoGrah() {
  2201. if (!this.form.id) {
  2202. alert("请先保存人员信息");
  2203. return;
  2204. }
  2205. if (!this.$peisAPI) {
  2206. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  2207. return
  2208. }
  2209. this.$peisAPI.photoGrah()
  2210. .then(res => {
  2211. // console.log('this.$peisAPI.photoGrah 原始返回结果', res)
  2212. let lres = JSON.parse(res)
  2213. if (lres.code > -1) {
  2214. let uploadPhoto = {
  2215. patientRegisterId: this.form.id,
  2216. photo: lres.data.Photo,
  2217. };
  2218. this.peoplePhoto = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  2219. // this.patientRegister.photo = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  2220. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  2221. } else {
  2222. this.$message.error({ showClose: true, message: "上传照片错误" + lres.code })
  2223. }
  2224. }).then(res => {
  2225. if (res && res.code > -1) {
  2226. let body = {
  2227. patientRegisterId: this.form.id,
  2228. photo: res.data,
  2229. };
  2230. // console.log(body);
  2231. return postapi(`/api/app/patient-register/update-photo`, body);
  2232. }
  2233. }).then(res => {
  2234. if (res && res.code > -1) {
  2235. //// console.log('拍照',res.data)
  2236. this.patientRegister.patientRegisterRd.photo = res.data.photo
  2237. // console.log("操作成功");
  2238. }
  2239. }).catch(err => {
  2240. // console.log('this.$peisAPI.photoGrah', err)
  2241. this.$message.error({ showClose: true, message: `照片操作错误 ${err}` })
  2242. })
  2243. },
  2244. getPeoplePhoto(photo) {
  2245. this.peoplePhoto = photoParse(photo)
  2246. },
  2247. // 打印指引单(isPreview)
  2248. guidePrint(ReportCode, isPreview) {
  2249. return new Promise((resolve, reject) => {
  2250. if (!this.form.id) {
  2251. reject("人员信息尚未保存,不可执行此操作!")
  2252. }
  2253. if (this.form.completeFlag == '0') {
  2254. reject("预登记人员,不可执行此操作!")
  2255. }
  2256. if (!this.$peisAPI) {
  2257. reject("此功能,需要在壳客户端才可运行!")
  2258. }
  2259. let token = window.sessionStorage.getItem('token');
  2260. let user = window.sessionStorage.getItem('user');
  2261. let toOutShell = {
  2262. ReportCode, token,
  2263. isBuildImage: 'N',
  2264. IsUploadPdf: 'N',
  2265. preViewCanPrint: 'N',
  2266. BusinessCode: this.form.id,
  2267. Parameters: [
  2268. { Name: 'printer', Value: user },
  2269. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  2270. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
  2271. ],
  2272. };
  2273. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2274. this.printing = true
  2275. if (isPreview) {
  2276. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2277. .then(res => {
  2278. if (JSON.parse(res).code < 0) {
  2279. reject(JSON.parse(res).message)
  2280. } else {
  2281. resolve(res)
  2282. }
  2283. })
  2284. .catch(err => {
  2285. reject(err)
  2286. })
  2287. .finally(() => {
  2288. this.printing = false
  2289. })
  2290. } else {
  2291. this.$peisAPI.print(JSON.stringify(toOutShell))
  2292. .then(res => {
  2293. if (JSON.parse(res).code < 0) {
  2294. reject(JSON.parse(res).message)
  2295. } else {
  2296. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  2297. }
  2298. })
  2299. .then(res => {
  2300. if (res && res.code > -1) {
  2301. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  2302. if (lfind > -1) {
  2303. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  2304. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  2305. } else {
  2306. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  2307. }
  2308. }
  2309. resolve(res)
  2310. } else {
  2311. reject("更新指引单打印错误")
  2312. }
  2313. })
  2314. .catch(err => {
  2315. reject(err)
  2316. })
  2317. .finally(() => {
  2318. this.printing = false
  2319. })
  2320. }
  2321. })
  2322. },
  2323. //检验申请
  2324. async lisRequest() {
  2325. this.$message.warning({ showClose: true, message: '此功能已合并到条码打印' });
  2326. /*
  2327. let isPrintLisRequest = false
  2328. let res = null
  2329. if (this.form.id.length < 1) {
  2330. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!"});
  2331. return;
  2332. }
  2333. try {
  2334. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  2335. // console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  2336. } catch (error) {
  2337. return;
  2338. }
  2339. if (res.code > -1) {
  2340. // this.$message.info("发送检验申请成功!");
  2341. isPrintLisRequest = true;
  2342. }
  2343. //重复申请,重打
  2344. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  2345. isPrintLisRequest = true;
  2346. }
  2347. if (!isPrintLisRequest) return;
  2348. try {
  2349. await this.$confirm("是否打印检验申请单?", "提示", {
  2350. confirmButtonText: "是",
  2351. cancelButtonText: "否",
  2352. type: "info",
  2353. showClose: false,
  2354. closeOnClickModal: false,
  2355. closeOnPressEscape: false,
  2356. });
  2357. } catch (error) {
  2358. return;
  2359. }
  2360. //打印检验申请单
  2361. this.lisPrint('0003', false);
  2362. */
  2363. },
  2364. //条码打印(lis + pacs)
  2365. labelPrint(isPreview) {
  2366. return new Promise((resolve, reject) => {
  2367. if (!this.form.id) {
  2368. reject("人员信息尚未保存,不可执行此操作!");
  2369. }
  2370. if (this.form.completeFlag == '0') {
  2371. reject("预登记人员,不可执行此操作!");
  2372. }
  2373. if (!this.$peisAPI) {
  2374. reject("此功能,需要在壳客户端才可运行!");
  2375. }
  2376. let token = window.sessionStorage.getItem('token');
  2377. let user = window.sessionStorage.getItem('user');
  2378. let toOutShell = {
  2379. token, // ReportCode,
  2380. IsMoreLabel: 'Y',
  2381. isBuildImage: 'N',
  2382. IsUploadPdf: 'N',
  2383. BusinessCode: this.form.id,
  2384. Parameters: [
  2385. { Name: 'printer', Value: user },
  2386. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  2387. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' }
  2388. ],
  2389. };
  2390. this.printing = true
  2391. if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2392. if (this.merge_lis_pacs_label == '1') {
  2393. this.lisPrint('0002', isPreview, toOutShell)
  2394. .then(res => {
  2395. return this.guidePrintEasy('0008', isPreview, toOutShell)
  2396. })
  2397. // .then(res => {
  2398. // return this.pacsPrint('0004', isPreview, toOutShell)
  2399. // })
  2400. .then(res => {
  2401. resolve(res)
  2402. })
  2403. .catch(err => {
  2404. reject(err)
  2405. })
  2406. .finally(() => {
  2407. this.printing = false
  2408. })
  2409. } else {
  2410. this.lisPrint('0002', isPreview, toOutShell)
  2411. .then(res => {
  2412. return this.pacsPrint('0004', isPreview, toOutShell)
  2413. })
  2414. .then(res => {
  2415. return this.guidePrintEasy('0008', isPreview, toOutShell)
  2416. })
  2417. .then(res => {
  2418. resolve(res)
  2419. })
  2420. .catch(err => {
  2421. reject(err)
  2422. })
  2423. .finally(() => {
  2424. this.printing = false
  2425. })
  2426. }
  2427. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
  2428. this.lisPrint('0002', isPreview, toOutShell)
  2429. .then(res => {
  2430. return this.guidePrintEasy('0008', isPreview, toOutShell)
  2431. })
  2432. .then(res => {
  2433. resolve(res)
  2434. })
  2435. .catch(err => {
  2436. reject(err)
  2437. })
  2438. .finally(() => {
  2439. this.printing = false
  2440. })
  2441. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2442. this.pacsPrint('0004', isPreview, toOutShell)
  2443. .then(res => {
  2444. return this.guidePrintEasy('0008', isPreview, toOutShell)
  2445. })
  2446. .then(res => {
  2447. resolve(res)
  2448. })
  2449. .catch(err => {
  2450. reject(err)
  2451. })
  2452. .finally(() => {
  2453. this.printing = false
  2454. })
  2455. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2456. if (this.merge_lis_pacs_label == '1') {
  2457. this.lisPrint('0002', isPreview, toOutShell)
  2458. // .then(res => {
  2459. // return this.pacsPrint('0004', isPreview, toOutShell)
  2460. // })
  2461. .then(res => {
  2462. resolve(res)
  2463. })
  2464. .catch(err => {
  2465. reject(err)
  2466. })
  2467. .finally(() => {
  2468. this.printing = false
  2469. })
  2470. } else {
  2471. this.lisPrint('0002', isPreview, toOutShell)
  2472. .then(res => {
  2473. return this.pacsPrint('0004', isPreview, toOutShell)
  2474. })
  2475. .then(res => {
  2476. resolve(res)
  2477. })
  2478. .catch(err => {
  2479. reject(err)
  2480. })
  2481. .finally(() => {
  2482. this.printing = false
  2483. })
  2484. }
  2485. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1) {
  2486. this.guidePrintEasy('0008', isPreview, toOutShell)
  2487. .then(res => {
  2488. resolve(res)
  2489. })
  2490. .catch(err => {
  2491. reject(err)
  2492. })
  2493. .finally(() => {
  2494. this.printing = false
  2495. })
  2496. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
  2497. this.lisPrint('0002', isPreview, toOutShell)
  2498. .then(res => {
  2499. resolve(res)
  2500. })
  2501. .catch(err => {
  2502. reject(err)
  2503. })
  2504. .finally(() => {
  2505. this.printing = false
  2506. })
  2507. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2508. this.pacsPrint('0004', isPreview, toOutShell)
  2509. .then(res => {
  2510. resolve(res)
  2511. })
  2512. .catch(err => {
  2513. reject(err)
  2514. })
  2515. .finally(() => {
  2516. this.printing = false
  2517. })
  2518. } else {
  2519. this.printing = false
  2520. resolve("success")
  2521. }
  2522. })
  2523. },
  2524. // lis条码打印
  2525. guidePrintEasy(ReportCode, isPreview, toOutShell) {
  2526. return new Promise((resolve, reject) => {
  2527. toOutShell.ReportCode = ReportCode
  2528. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2529. if (isPreview) {
  2530. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2531. .then(res => {
  2532. if (JSON.parse(res).code < 0) {
  2533. // this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  2534. reject(JSON.parse(res).message)
  2535. } else {
  2536. resolve(res)
  2537. }
  2538. })
  2539. .catch(err => {
  2540. reject(err)
  2541. })
  2542. } else {
  2543. this.$peisAPI.print(JSON.stringify(toOutShell))
  2544. .then(res => {
  2545. if (JSON.parse(res).code < 0) {
  2546. reject(JSON.parse(res).message)
  2547. } else {
  2548. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  2549. }
  2550. })
  2551. .then(res => {
  2552. if (res && res.code > -1) {
  2553. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  2554. if (lfind > -1) {
  2555. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  2556. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  2557. } else {
  2558. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  2559. }
  2560. }
  2561. resolve(res)
  2562. } else {
  2563. reject(res.message)
  2564. }
  2565. })
  2566. .catch(err => {
  2567. reject(err)
  2568. })
  2569. }
  2570. })
  2571. },
  2572. // lis条码打印
  2573. lisPrint(ReportCode, isPreview, toOutShell) {
  2574. return new Promise((resolve, reject) => {
  2575. toOutShell.ReportCode = ReportCode
  2576. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2577. if (isPreview) {
  2578. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2579. .then(res => {
  2580. if (JSON.parse(res).code < 0) {
  2581. // this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  2582. reject(JSON.parse(res).message)
  2583. } else {
  2584. resolve(res)
  2585. }
  2586. })
  2587. .catch(err => {
  2588. reject(err)
  2589. })
  2590. } else {
  2591. this.$peisAPI.print(JSON.stringify(toOutShell))
  2592. .then(res => {
  2593. if (JSON.parse(res).code < 0) {
  2594. reject(JSON.parse(res).message)
  2595. } else {
  2596. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  2597. }
  2598. })
  2599. .then(res => {
  2600. if (res && res.code < 0) {
  2601. reject(res.message)
  2602. } else {
  2603. resolve(res)
  2604. }
  2605. })
  2606. .catch(err => {
  2607. reject(err)
  2608. })
  2609. }
  2610. })
  2611. },
  2612. //pacs条码打印
  2613. pacsPrint(ReportCode, isPreview, toOutShell) {
  2614. return new Promise((resolve, reject) => {
  2615. toOutShell.ReportCode = ReportCode
  2616. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2617. if (isPreview) {
  2618. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2619. .then(res => {
  2620. if (JSON.parse(res).code < 0) {
  2621. // this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  2622. reject(JSON.parse(res).message)
  2623. } else {
  2624. resolve(res)
  2625. }
  2626. })
  2627. .catch((err) => {
  2628. // console.log('打印pacs条码错误', err)
  2629. this.$message.warning({ showClose: true, message: `${err}` });
  2630. reject(err)
  2631. });
  2632. } else {
  2633. this.$peisAPI.print(JSON.stringify(toOutShell))
  2634. .then(res => {
  2635. if (JSON.parse(res).code < 0) {
  2636. // this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  2637. reject(JSON.parse(res).message)
  2638. } else {
  2639. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  2640. operateType: 1,
  2641. patientRegisterId: this.form.id,
  2642. });
  2643. }
  2644. })
  2645. .then(res => {
  2646. if (res && res.code < 0) {
  2647. // this.$message.error({ showClose: true, message: `${res.message}` });
  2648. reject(res.message)
  2649. } else {
  2650. resolve(res)
  2651. }
  2652. })
  2653. .catch((err) => {
  2654. // console.log('打印pacs条码错误', err)
  2655. // this.$message.error({ showClose: true, message: `${err}` });
  2656. reject(err)
  2657. });
  2658. }
  2659. });
  2660. },
  2661. //补打条码
  2662. reLisRequest() {
  2663. if (!this.form.id) {
  2664. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  2665. return;
  2666. }
  2667. if (this.form.completeFlag == '0') {
  2668. this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
  2669. return;
  2670. }
  2671. this.brushTimes++;
  2672. this.patientRegister.lisRequestVisble = true;
  2673. },
  2674. //手动合并项目
  2675. reMergeAsbitem() {
  2676. if (this.form.id.length < 1) {
  2677. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  2678. return;
  2679. }
  2680. this.brushTimes++;
  2681. this.patientRegister.mergeAsbitemVisble = true;
  2682. },
  2683. btnPayTypeFlag(payTypeFlag) {
  2684. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2685. if (e.isCharge == 'N') e.payTypeFlag = payTypeFlag
  2686. });
  2687. },
  2688. // 刷新登记的检查项目
  2689. getAsb(id) {
  2690. return new Promise((resolve, reject) => {
  2691. getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`)
  2692. .then(res => {
  2693. if (res.code > - 1) {
  2694. this.dataTransOpts.tableM.register_check_asbitem = res.data
  2695. resolve()
  2696. } else {
  2697. reject(res.message)
  2698. }
  2699. })
  2700. .catch(err => {
  2701. reject(err.message)
  2702. })
  2703. })
  2704. },
  2705. // 跳至收费页面
  2706. toCharge(form) {
  2707. if (!form.patientRegisterNo) {
  2708. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  2709. return
  2710. }
  2711. if (form.completeFlag == '0') {
  2712. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  2713. return
  2714. }
  2715. this.getAsb(form.id)
  2716. .then(() => {
  2717. let chargeMoney = Number(0)
  2718. //支付方式,比如是0自费、2免费、1单位支付
  2719. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2720. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  2721. });
  2722. if (chargeMoney == 0) {
  2723. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  2724. } else {
  2725. //多次重复点击时,刷新处理
  2726. this.chargePatientRegisterNo = form.patientRegisterNo
  2727. //this.dataTransOpts.refresh.charge.S++
  2728. this.dialogWin.charge = true
  2729. this.dataTransOpts.refresh.charge.S++
  2730. }
  2731. })
  2732. .catch(err => {
  2733. this.$message.error(err.message)
  2734. })
  2735. },
  2736. // 收费申请
  2737. chargeRequest(form) {
  2738. if (!form.id) {
  2739. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  2740. return
  2741. }
  2742. if (form.completeFlag == '0') {
  2743. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  2744. return
  2745. }
  2746. this.getAsb(form.id)
  2747. .then(() => {
  2748. let chargeMoney = Number(0)
  2749. //支付方式,比如是0自费、2免费、1单位支付
  2750. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2751. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  2752. });
  2753. if (chargeMoney == 0) {
  2754. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  2755. } else {
  2756. // 显示
  2757. this.dataTransOpts.refresh.charge.S++
  2758. this.dialogWin.AsbChargeRequest = true
  2759. }
  2760. })
  2761. .catch(err => {
  2762. this.$message.error(err.message)
  2763. })
  2764. },
  2765. // 保存立即发送收费申请
  2766. immediateToHisCharge(patientRegisterId) {
  2767. postapi('/api/app/registerasbitem/GetCanChargeAsbitemsByPatientRegisterId', { patientRegisterId })
  2768. .then(res => {
  2769. if (res.code > -1 && res.data.length > 0) {
  2770. let body = {
  2771. patientRegisterId,
  2772. registerCheckAsbitems: []
  2773. }
  2774. res.data.forEach(e => {
  2775. body.registerCheckAsbitems.push({ registerCheckAsbitemId: e.registerCheckAsbitemId })
  2776. });
  2777. // 向 His 或 其他第三方 推送收费申请
  2778. postapi("/api/app/ChargeRequest/Create", body)
  2779. .then(resCharge => {
  2780. if (resCharge.code > -1) {
  2781. this.dataTransOpts.refresh.patient_register.S++
  2782. }
  2783. })
  2784. }
  2785. })
  2786. .catch(error => {
  2787. this.$message.error({ showClose: true, message: error.message })
  2788. })
  2789. },
  2790. //关闭收费窗口时,刷新收费状态信息
  2791. closeDialogCharge() {
  2792. // this.prAsbOpraOpts.prAsbQuery++
  2793. this.dataTransOpts.refresh.patient_register.S++
  2794. // this.dataTransOpts.refresh.register_check_asbitem.D++
  2795. },
  2796. // 新增保存基本信息产生新的ID,等明细保存后,再更新表单form.id
  2797. refreshFormId() {
  2798. // console.log('refreshFormId', this.prAsbOpraOpts.formId)
  2799. this.form.id = this.prAsbOpraOpts.formId
  2800. this.prAsbOpraOpts.formId = '' //清空
  2801. /**/
  2802. // this.patientRegister.prList.push(res.data); //列表添加记录
  2803. this.patientRegister.patientRegisterId = this.form.id;
  2804. objCopy(this.form, this.patientRegister.patientRegisterRd);
  2805. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)放在窗口关闭事件中去
  2806. // let curRow = deepCopy(this.patientRegister.patientRegisterRd)
  2807. // curRow.index = this.patientRegister.prList.length
  2808. // this.patientRegister.prList.push(curRow)
  2809. },
  2810. // 显示职业病
  2811. btnOcc() {
  2812. if (!this.form.id) {
  2813. this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })
  2814. return
  2815. }
  2816. this.dataTransOpts.plus.OccDisease++
  2817. this.dialogWin.OccDisease = true
  2818. },
  2819. // 获取接害因素 + 检查类别 的组合项目 后,刷新当前组合项目
  2820. changeOccPosionOrCheckType() {
  2821. this.getOccAsbitems().then(res => {
  2822. let lfind = 0
  2823. for (let i = this.dataTransOpts.tableM.register_check_asbitem.length - 1; i >= 0; i--) {
  2824. let e = this.dataTransOpts.tableM.register_check_asbitem[i];
  2825. if (e.isCharge == 'Y' || e.checkCompleteFlag != '0') {
  2826. continue
  2827. } else {
  2828. // 已登记的项目 在 this.occAsbitems 中,则不删除 (如果删除的话,条码会变)
  2829. lfind = arrayExistObj(this.occAsbitems, 'id', e.asbitemId)
  2830. if (lfind == -1) this.dataTransOpts.tableM.register_check_asbitem.splice(i, 1)
  2831. }
  2832. }
  2833. lfind = 0
  2834. let payTypeFlag = '1'; //职业病 默认单位支付
  2835. if (this.form.customerOrgId == this.dict.personOrgId) payTypeFlag = '0' //个人支付
  2836. this.occAsbitems.forEach(e => {
  2837. lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id)
  2838. if (lfind == -1) {
  2839. this.dataTransOpts.tableM.register_check_asbitem.push({
  2840. asbitemId: e.id,
  2841. asbitemName: e.displayName,
  2842. patientRegisterId: this.form.id,
  2843. standardPrice: e.price,
  2844. chargePrice: e.ocCheckTypeDetailPrice,
  2845. payTypeFlag,
  2846. isCharge: "N",
  2847. checkCompleteFlag: '0',
  2848. discount: e.price == 0 ? 100 : Math.floor(10000 * e.ocCheckTypeDetailPrice / e.price) / 100,
  2849. amount: e.ocCheckTypeDetailAmount,
  2850. total: e.ocCheckTypeDetailAmount * e.ocCheckTypeDetailPrice,
  2851. standTotal: e.ocCheckTypeDetailAmount * e.price
  2852. })
  2853. }
  2854. });
  2855. })
  2856. },
  2857. // 获取接害因素 + 检查类别 的组合项目
  2858. getOccAsbitems() {
  2859. return new Promise((resolve, reject) => {
  2860. if (!this.form.ocCheckTypeId || this.form.poisonIds.length == 0) {
  2861. this.occAsbitems = []
  2862. resolve(this.occAsbitems)
  2863. } else {
  2864. let body = {
  2865. ocCheckTypeId: this.form.ocCheckTypeId,
  2866. poisonIds: this.form.poisonIds
  2867. }
  2868. postapi('/api/app/OcCheckTypeDetail/GetOcCheckTypeDetailByOcCheckTypeIdAndPoisonId', body).then(res => {
  2869. if (res.code > -1) {
  2870. this.occAsbitems = res.data
  2871. resolve(this.occAsbitems)
  2872. } else {
  2873. reject(res.message)
  2874. }
  2875. })
  2876. .catch(err => {
  2877. reject(err)
  2878. })
  2879. }
  2880. })
  2881. },
  2882. // 显示预约
  2883. btnWebBooking() {
  2884. this.dataTransOpts.tableS.appoint_patient_register = {}
  2885. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2886. this.dataTransOpts.tableS.appoint_patient_register = {}
  2887. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2888. this.dataTransOpts.plus.WebBooking++
  2889. this.dialogWin.WebBooking = true
  2890. },
  2891. // 显示预约
  2892. btnWebBookingMzak() {
  2893. this.dataTransOpts.tableS.appoint_patient_register = {}
  2894. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2895. this.dataTransOpts.tableS.appoint_patient_register = {}
  2896. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2897. this.dataTransOpts.plus.WebBookingMzak++
  2898. this.dialogWin.WebBookingMzak = true
  2899. },
  2900. // 关闭预约窗口
  2901. close_dialogWin_WebBooking() {
  2902. // console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
  2903. // console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
  2904. // 没有选中网上预约记录,直接返回,不做任何处理
  2905. let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
  2906. if (!appoint_patient_register.appointPatientRegisterId) return
  2907. // 新增 (个人预约只登记个人的)
  2908. this.dataTransOpts.tableS.patient_register.id = ''
  2909. this.preCustomerOrgId = this.dict.personOrgId
  2910. this.patientRegister.query.customerOrgId = this.dict.personOrgId
  2911. this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId
  2912. this.form.customerOrgId = [this.dict.personOrgId] //单位编号 默认个人
  2913. this.form.customerOrgParentId = this.dict.personOrgId
  2914. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001" //默认单位体检次数
  2915. // "appointPatientRegisterId": "string",
  2916. // "personId": "string",
  2917. // "personName": "string",
  2918. // "idNo": "string",
  2919. // "sexId": "string",
  2920. // "sexName": "string",
  2921. // "maritalStatusId": "string",
  2922. // "maritalStatusName": "string",
  2923. // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2924. // "customerOrgName": "string",
  2925. // "childCustomerOrgName": "string",
  2926. // "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2927. // "customerOrgGroupName": "string",
  2928. // "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2929. // "medicalPackageName": "string",
  2930. // "completeFlag": "string",
  2931. // "appointDate": "2024-06-09T11:46:34.962Z",
  2932. // "remark": "string",
  2933. // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2934. // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2935. // "pregnantFlag": "string",
  2936. // "pregnantFlagName": "string",
  2937. // "height": 0,
  2938. // "weight": 0
  2939. this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2940. .then(() => {
  2941. delete appoint_patient_register.medicalCenterId
  2942. Object.assign(this.form, appoint_patient_register,
  2943. {
  2944. patientName: appoint_patient_register.personName,
  2945. completeFlag: '1',
  2946. }
  2947. )
  2948. console.log('this.form', JSON.stringify(this.form))
  2949. // 明细必填项
  2950. // "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2951. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2952. // "standardPrice": 0,
  2953. // "chargePrice": 0,
  2954. // "payTypeFlag": "string",
  2955. // "isCharge": "string",
  2956. // "amount": 0
  2957. // 预约明细数据
  2958. // "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
  2959. // "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
  2960. // "asbitemName": "腹部平片(立位)",
  2961. // "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
  2962. // "itemTypeName": "放射科",
  2963. // "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
  2964. // "standardPrice": 45.00,
  2965. // "chargePrice": 30.50,
  2966. // "payTypeFlag": "\u0000",
  2967. // "isCharge": "N",
  2968. // "amount": 1,
  2969. // "isInMedicalPackage": "N",
  2970. // "itemTypeDisplayOrder": 28,
  2971. // "displayOrder": 1
  2972. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
  2973. this.changeIdNo() // 触发身份证查询档案号
  2974. })
  2975. },
  2976. // 关闭预约窗口--人寿 (团检、个人都可以)
  2977. close_dialogWin_WebBookingMzak() {
  2978. // console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
  2979. // console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
  2980. // 没有选中网上预约记录,直接返回,不做任何处理
  2981. let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
  2982. if (!appoint_patient_register.thirdBookingId) return
  2983. this.dataTransOpts.tableS.patient_register.id = ''
  2984. // this.preCustomerOrgId = this.dict.personOrgId
  2985. this.patientRegister.query.customerOrgId = appoint_patient_register.customerOrgId
  2986. this.patientRegister.query.CustomerOrgParentId = appoint_patient_register.customerOrgId
  2987. this.form.customerOrgId = [appoint_patient_register.customerOrgId] //单位编号 默认个人
  2988. let customerOrgParentId = ''
  2989. this.getParentCustomerOrgId(appoint_patient_register.customerOrgId)
  2990. .then(res => {
  2991. customerOrgParentId = res
  2992. this.form.customerOrgParentId = customerOrgParentId
  2993. return this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2994. })
  2995. .then(() => {
  2996. // this.form.customerOrgName = customerOrgParentId
  2997. // "appointPatientRegisterId": "string",
  2998. // "personId": "string",
  2999. // "personName": "string",
  3000. // "idNo": "string",
  3001. // "sexId": "string",
  3002. // "sexName": "string",
  3003. // "maritalStatusId": "string",
  3004. // "maritalStatusName": "string",
  3005. // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  3006. // "customerOrgName": "string",
  3007. // "childCustomerOrgName": "string",
  3008. // "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  3009. // "customerOrgGroupName": "string",
  3010. // "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  3011. // "medicalPackageName": "string",
  3012. // "completeFlag": "string",
  3013. // "appointDate": "2024-06-09T11:46:34.962Z",
  3014. // "remark": "string",
  3015. // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  3016. // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  3017. // "pregnantFlag": "string",
  3018. // "pregnantFlagName": "string",
  3019. // "height": 0,
  3020. // "weight": 0
  3021. delete appoint_patient_register.medicalCenterId
  3022. Object.assign(this.form, appoint_patient_register,
  3023. {
  3024. patientName: appoint_patient_register.personName,
  3025. completeFlag: '1',
  3026. }
  3027. )
  3028. // 人寿接口,甲方需求:岗位数据导入人员类别
  3029. // personnelTypeId --> positionName
  3030. // dict.personnelType" :key="item.id" :label="item.displayName"
  3031. let lfind = arrayExistObj(this.dict.personnelType, 'displayName', appoint_patient_register.positionName)
  3032. if (lfind > -1) this.form.personnelTypeId = this.dict.personnelType[lfind].id
  3033. console.log('this.form', JSON.stringify(this.form))
  3034. // 明细必填项
  3035. // "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  3036. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  3037. // "standardPrice": 0,
  3038. // "chargePrice": 0,
  3039. // "payTypeFlag": "string",
  3040. // "isCharge": "string",
  3041. // "amount": 0
  3042. // 预约明细数据
  3043. // "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
  3044. // "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
  3045. // "asbitemName": "腹部平片(立位)",
  3046. // "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
  3047. // "itemTypeName": "放射科",
  3048. // "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
  3049. // "standardPrice": 45.00,
  3050. // "chargePrice": 30.50,
  3051. // "payTypeFlag": "\u0000",
  3052. // "isCharge": "N",
  3053. // "amount": 1,
  3054. // "isInMedicalPackage": "N",
  3055. // "itemTypeDisplayOrder": 28,
  3056. // "displayOrder": 1
  3057. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
  3058. // 触发分组 项目
  3059. if (this.form.customerOrgGroupId) this.changeCustomerOrgGroupId()
  3060. this.changeIdNo() // 触发身份证查询档案号
  3061. })
  3062. },
  3063. btnLabel() {
  3064. if (!this.form.id) {
  3065. this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })
  3066. return
  3067. }
  3068. this.dataTransOpts.refresh.lis_request.M++ //触发检验条码刷新
  3069. this.dataTransOpts.refresh.register_check.M++ //触发检查条码刷新
  3070. this.dialogWin.Label = true
  3071. },
  3072. // 复制分组时,设置当前顶级单位及体检次数
  3073. setCurParentOrgId() {
  3074. // 获取顶级单位
  3075. console.log('setCurParentOrgId_this.form.customerOrgId', this.form.customerOrgId)
  3076. this.getParentCustomerOrgId(this.form.customerOrgId)
  3077. .then(res => {
  3078. if (res) {
  3079. if (res != this.dict.personOrgId) {
  3080. this.customerOrgId = res
  3081. // 获取体检次数
  3082. getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res}`)
  3083. .then(res => {
  3084. if (res.code > -1) {
  3085. this.customerOrgRegisterList = res.data
  3086. if (res.data.length > 0) {
  3087. this.customerOrgRegister = res.data[res.data.length - 1]
  3088. this.getCustomerOrgGroupCopy(this.customerOrgRegister.id)
  3089. }
  3090. }
  3091. })
  3092. }
  3093. }
  3094. })
  3095. },
  3096. //复制分组
  3097. btnCopyGroup() {
  3098. console.log('this.customerOrgGroup', this.customerOrgGroup)
  3099. this.customerOrgRegisterList = [];
  3100. this.customerOrgRegister = {};
  3101. this.customerOrgGroups = [];
  3102. // 首次打开 复制分组 页面时,需获取顶级单位信息
  3103. if (this.customerOrgAll.length == 0) {
  3104. getapi("/api/app/customer-org/parent-all")
  3105. .then(res => {
  3106. if (res.code > -1) {
  3107. this.customerOrgAll = res.data
  3108. this.customerOrgDisp = res.data
  3109. this.groupVisble = true
  3110. // 复制分组时,设置当前顶级单位及体检次数
  3111. this.setCurParentOrgId()
  3112. }
  3113. })
  3114. } else {
  3115. // 复制分组时,设置当前顶级单位及体检次数
  3116. this.setCurParentOrgId()
  3117. this.groupVisble = true
  3118. }
  3119. },
  3120. //选中分组
  3121. async groupRowClick(row) {
  3122. this.curGroupId = row.id
  3123. this.groupAsbitems = []
  3124. try {
  3125. let res = await getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${row.id}`)
  3126. if (res.code != -1) this.groupAsbitems = res.data
  3127. } catch (error) {
  3128. console.log(error)
  3129. }
  3130. },
  3131. //双击选分组,并确认复制
  3132. async groupRowDblclick(row) {
  3133. await this.groupRowClick(row)
  3134. this.copyGroup()
  3135. },
  3136. //复制分组(确认选中分组)
  3137. copyGroup() {
  3138. if (!this.curGroupId) {
  3139. this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!" })
  3140. return
  3141. }
  3142. console.log('this.packageAsbitems', this.groupAsbitems)
  3143. this.addAbs(deepCopy(this.groupAsbitems))
  3144. this.groupVisble = false
  3145. },
  3146. //复制套餐
  3147. btnCopyMedicalPackage() {
  3148. this.medicalPackageVisble = true
  3149. },
  3150. //选中套餐
  3151. packageRowClick(row) {
  3152. return new Promise((resolve, reject) => {
  3153. this.curPackageId = row.id
  3154. this.packageAsbitems = []
  3155. postapi('/api/app/medicalpackagedetail/getmedicalpackageinasbitem', { medicalPackageId: row.id })
  3156. .then(res => {
  3157. if (res.code > -1) {
  3158. this.packageAsbitems = res.data
  3159. resolve()
  3160. } else {
  3161. reject(res.message)
  3162. }
  3163. })
  3164. .catch(err => {
  3165. reject(err.message)
  3166. })
  3167. })
  3168. },
  3169. //双击选套餐,并确认复制
  3170. rowDblclick(row) {
  3171. this.packageRowClick(row)
  3172. .then(res => {
  3173. this.copyMedicalPackage()
  3174. })
  3175. },
  3176. //复制套餐(确认选中套餐)
  3177. copyMedicalPackage() {
  3178. if (!this.curPackageId) {
  3179. this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!" })
  3180. return
  3181. }
  3182. console.log('this.packageAsbitems', this.packageAsbitems)
  3183. this.addAbs(deepCopy(this.packageAsbitems))
  3184. this.medicalPackageVisble = false
  3185. },
  3186. // 过滤体检单位
  3187. filterMethodOrg(keyWords) {
  3188. if (keyWords) {
  3189. this.customerOrgDisp = [];
  3190. this.customerOrgAll.forEach((item) => {
  3191. if (
  3192. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
  3193. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  3194. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  3195. ) {
  3196. this.customerOrgDisp.push(item);
  3197. }
  3198. });
  3199. } else {
  3200. this.customerOrgDisp = deepCopy(this.customerOrgAll);
  3201. }
  3202. },
  3203. //选择单位
  3204. changeCustomerOrg(v) {
  3205. if (!v) {
  3206. this.customerOrgRegisterListCopy = [];
  3207. this.customerOrgRegister = {};
  3208. this.customerOrgGroups = [];
  3209. } else {
  3210. getapi(
  3211. `/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${v}`
  3212. ).then((res) => {
  3213. if (res.code != -1) {
  3214. this.customerOrgRegisterListCopy = res.data;
  3215. if (res.data.length > 0) {
  3216. this.customerOrgRegister = res.data[res.data.length - 1];
  3217. this.getCustomerOrgGroupCopy(this.customerOrgRegister.id);
  3218. }
  3219. }
  3220. });
  3221. }
  3222. },
  3223. //选择体检次数
  3224. changeTimes(v) {
  3225. this.getCustomerOrgGroup(v.id);
  3226. },
  3227. //获取体检次数下的分组
  3228. getCustomerOrgGroupCopy(customerOrgRegisterId) {
  3229. // this.isDrag = false;
  3230. // objCopy(this.formInit, this.form);
  3231. // this.form.customerOrgRegisterId = customerOrgRegisterId;
  3232. this.customerOrgGroups = [];
  3233. getapi(
  3234. `/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
  3235. ).then((res) => {
  3236. if (res.code != -1) {
  3237. this.customerOrgGroups = res.data;
  3238. this.customerOrgGroups.forEach((e) => {
  3239. e.customerOrgRegisterId = customerOrgRegisterId;
  3240. });
  3241. }
  3242. });
  3243. },
  3244. handleRowClassName({ row, rowIndex }) {
  3245. // highLightBg 为 'selected'的高亮
  3246. //console.log(rowIndex, row)
  3247. //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
  3248. if (row.choosed) {
  3249. return 'current-row';
  3250. } else {
  3251. return '';
  3252. }
  3253. },
  3254. // 添加组合项目
  3255. ///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6'
  3256. addAbs(asbItemChoosed) {
  3257. if (asbItemChoosed.length < 1) {
  3258. this.$message.warning({ showClose: true, message: "该套餐或分组下无可复制的组合项目" })
  3259. return
  3260. }
  3261. //性别、年龄判断
  3262. // "displayName": "身高体重",
  3263. // "shortName": "哈f哈",
  3264. // "forSexId": "F",
  3265. // "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940",
  3266. // "price": 0,
  3267. console.log('asbItemChoosed.length', asbItemChoosed.length)
  3268. let unChecks = [] //不适配项目名称
  3269. for (let i = 0; i < asbItemChoosed.length; i++) {
  3270. if (this.form.sexId == 'U') break //未选性别时,无需判断组合项目性别限制
  3271. if (asbItemChoosed[i].forSexId == 'A') continue
  3272. if (asbItemChoosed[i].forSexId != this.form.sexId) {
  3273. unChecks.push(asbItemChoosed[i].displayName)
  3274. asbItemChoosed[i].unCheck = true
  3275. }
  3276. }
  3277. if (unChecks.length > 0) {
  3278. this.$message.warning({ showClose: true, message: `所选项目:${unChecks.toString()},不适合当前人员性别` })
  3279. if (asbItemChoosed.length == unChecks.length) return
  3280. }
  3281. let payTypeFlag = '0' // 0: 个人,1:单位,2:免费
  3282. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1'
  3283. asbItemChoosed.forEach(e => {
  3284. if (!e.unCheck) {
  3285. // 未在已选列表中,才选择添加
  3286. let lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id)
  3287. if (lfind < 0) {
  3288. let pojo = {
  3289. asbitemId: e.id,
  3290. asbitemName: e.displayName,
  3291. patientRegisterId: this.form.id,
  3292. standardPrice: e.price,
  3293. chargePrice: e.price,
  3294. payTypeFlag,
  3295. isCharge: "N",
  3296. checkCompleteFlag: '0',
  3297. discount: 100,
  3298. amount: 1,
  3299. total: e.price,
  3300. }
  3301. this.dataTransOpts.tableM.register_check_asbitem.push(pojo)
  3302. }
  3303. }
  3304. });
  3305. // 刷新左侧待选组合项目
  3306. this.changeItemType(deepCopy(this.dataTransOpts.copyGroup.itemTypeIds))
  3307. },
  3308. //项目类别过滤 组合项目,未过滤已选择的组合项目
  3309. changeItemType(data) {
  3310. //console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds)
  3311. this.dataTransOpts.copyGroup.itemTypeIds = data
  3312. let asbItemAll = deepCopy(this.dataTransOpts.copyGroup.asbItemAll)
  3313. let lv = "";
  3314. if (typeof this.dataTransOpts.copyGroup.itemTypeIds == "object") {
  3315. if (this.dataTransOpts.copyGroup.itemTypeIds.length > 0) lv = this.dataTransOpts.copyGroup.itemTypeIds[this.dataTransOpts.copyGroup.itemTypeIds.length - 1];
  3316. }
  3317. if (lv) {
  3318. this.dataTransOpts.copyGroup.asbItem = arrayFilter(asbItemAll, "itemTypeId", lv);
  3319. } else {
  3320. this.dataTransOpts.copyGroup.asbItem = deepCopy(asbItemAll);
  3321. }
  3322. arrayReduce(this.dataTransOpts.copyGroup.asbItem, this.dataTransOpts.tableM.register_check_asbitem, "id=asbitemId");
  3323. //console.log('this.dataTransOpts.copyGroup.asbItem',this.dataTransOpts.copyGroup.asbItem,this.dataTransOpts.tableM.register_check_asbitem)
  3324. },
  3325. //回车替代tab键
  3326. enterToTab() {
  3327. this.$nextTick(() => {
  3328. let inputs = document.querySelectorAll("form input"); //用数组可以读取多个标签的元素 //.inline-input
  3329. //// console.log('inputs',inputs);
  3330. // 为每个输入框添加键盘事件监听器
  3331. inputs.forEach((input, i) => {
  3332. input.addEventListener('keydown', (event) => {
  3333. // 如果按下的是回车键
  3334. // // console.log('data-ismultiline',input.getAttribute('data-ismultiline'));
  3335. if (event.keyCode === 13) {
  3336. // 阻止回车键的默认行为(换行)
  3337. event.preventDefault();
  3338. // 如果是身份证,则计算出生与年龄
  3339. let placeholder = input.getAttribute('placeholder')
  3340. if (placeholder == '身份证号') this.changeIdNo()
  3341. // 跳至下一个输入框
  3342. for (let j = i + 1; j < inputs.length; j++) {
  3343. if (inputs[j].getAttribute('disabled') != "disabled") {
  3344. inputs[j].focus();
  3345. break;
  3346. }
  3347. }
  3348. }
  3349. });
  3350. });
  3351. });
  3352. },
  3353. },
  3354. //监听事件
  3355. watch: {
  3356. //人员ID未切换换时 也可以强制刷新数据
  3357. "dataTransOpts.refresh.patient_register.S": {
  3358. // immediate: true,
  3359. handler(newVal, oldVal) {
  3360. // console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
  3361. if (newVal != oldVal) this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  3362. }
  3363. },
  3364. //拍照触发
  3365. // "form.photo"(newVal, oldVal) {
  3366. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  3367. // if (newVal != oldVal) {
  3368. // this.getPeoplePhoto(newVal)
  3369. // }
  3370. // },
  3371. //修改单位触发
  3372. // "form.customerOrgId": {
  3373. // // immediate:true,
  3374. // // // deep:true,
  3375. // handler(newVal, oldVal) {
  3376. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  3377. // if (newVal != oldVal) {
  3378. // this.changeCustomerOrgId(newVal)
  3379. // }
  3380. // }
  3381. // },
  3382. // 从体检人员登记列表 点登记,触发
  3383. // 清空查询条件
  3384. "dataTransOpts.plus.clearPatientRegisterQuery": {
  3385. // immediate: true,
  3386. handler(newVal, oldVal) {
  3387. // console.log('从体检人员登记列表 点登记,触发', newVal, oldVal)
  3388. if (newVal != oldVal) {
  3389. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  3390. // console.log('this.preCustomerOrgId', this.preCustomerOrgId)
  3391. }
  3392. }
  3393. },
  3394. },
  3395. };
  3396. </script>
  3397. <style scoped>
  3398. ::v-deep .el-icon-search:before {
  3399. color: #00F;
  3400. }
  3401. ::v-deep .el-select-group__title {
  3402. font-size: 15px;
  3403. background-color: #EEEEEE;
  3404. color: black;
  3405. font-weight: 700;
  3406. }
  3407. .btn {
  3408. margin-top: 5px;
  3409. }
  3410. .commonbutton {
  3411. width: 100px;
  3412. }
  3413. .query {
  3414. margin-left: 10px;
  3415. }
  3416. .querySpan {
  3417. margin-right: 2px;
  3418. }
  3419. </style>