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.

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