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.

3734 lines
145 KiB

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