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.

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