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.

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