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.

3027 lines
118 KiB

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