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.

3013 lines
117 KiB

3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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. }, //单位 记录 目前新增与更新是一致
  799. formInit: {}, //表单初始化
  800. customerOrgRegisterList: [], //单位体检次数列表
  801. defaultNull: [
  802. "customerOrgId",
  803. "customerOrgGroupId",
  804. "medicalPackageId",
  805. "birthDate",
  806. "age",
  807. "maritalStatusId",
  808. "medicalTypeId",
  809. "personnelTypeId",
  810. "sexHormoneTermId",
  811. "medicalCenterId",
  812. "nationId",
  813. "birthPlaceId",
  814. ], //一般uuid字段为空时,需设置为null值
  815. rules: {
  816. customerOrgId: [
  817. { required: true, message: "请填写单位", trigger: "blur" },
  818. ],
  819. patientName: [
  820. { required: true, message: "请填写姓名", trigger: "blur" },
  821. ],
  822. medicalCenterId: [
  823. { required: true, message: "请填写体检中心", trigger: "blur" },
  824. ],
  825. mobileTelephone: [
  826. { validator: validateMobileTelephone, trigger: 'blur' }
  827. ],
  828. },
  829. dialogVisible: false,
  830. patientList: [], //人员列表(用于判断人员多次体检)
  831. patientChoosed: {}, //查重选中的人员
  832. registerVisible: false,
  833. patientRegisters: [],
  834. registerChoosed: {},
  835. dialogCamera: false, //拍照组件
  836. chargePatientRegisterNo: '', //对哪个条码客户收费
  837. //人员登记,组合项目明细操作相关参数
  838. prAsbOpraOpts: {
  839. formId: '', //form.id为空时,明细保存取此formId
  840. copyNew: 0, //触发复制新增
  841. payTypeFlag: '', //触发调整支付方式
  842. prAsbSave: 0, //触发组合项目明细保存
  843. prAsbQuery: 0,//触发组合项目明细查询,比如收费后,刷新收费状态
  844. prAsbGroup: 0, //触发分组更换
  845. prAsbPackage: 0, //触发套餐更换
  846. },
  847. nation: [], //
  848. dialogOrg: false,
  849. printing: false, // 是否打印中,控制一次只能有一个任务
  850. completeFlag: '0', // 默认预登记,首次正式登记或者预登记转正式登记,提示打印条码与指引单
  851. tabChoosed: "1",
  852. poison: [],
  853. poisonList: [],
  854. thirdInterfaceId: '', // 网上预约用到
  855. queueParams: {}, // 分诊排队参数
  856. };
  857. },
  858. async created() {
  859. //获取用户当前页面的权限
  860. let userPriv = window.sessionStorage.getItem('userPriv')
  861. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  862. try {
  863. let LocalConfig = JSON.parse(window.localStorage.getItem('LocalConfig'))
  864. if (LocalConfig && LocalConfig.patientRegister) {
  865. if (LocalConfig.patientRegister.edit) this.LocalConfig.patientRegister.edit = LocalConfig.patientRegister.edit
  866. if (LocalConfig.patientRegister.editHeight) this.LocalConfig.patientRegister.editHeight = LocalConfig.patientRegister.editHeight
  867. if (LocalConfig.patientRegister.immediateToHisCharge) {
  868. this.LocalConfig.patientRegister.immediateToHisCharge = true
  869. } else {
  870. this.LocalConfig.patientRegister.immediateToHisCharge = false
  871. }
  872. if (LocalConfig.patientRegister.findPatientByName) {
  873. this.LocalConfig.patientRegister.findPatientByName = true
  874. } else {
  875. this.LocalConfig.patientRegister.findPatientByName = false
  876. }
  877. if (LocalConfig.patientRegister.printGuideLabel) this.LocalConfig.patientRegister.printGuideLabel = deepCopy(LocalConfig.patientRegister.printGuideLabel)
  878. if (LocalConfig.patientRegister.dispCustomerOrgCode) this.LocalConfig.patientRegister.dispCustomerOrgCode = LocalConfig.patientRegister.dispCustomerOrgCode
  879. }
  880. } catch (error) {
  881. console.log("window.localStorage.getItem('LocalConfig')", error)
  882. }
  883. this.formInit = deepCopy(this.form)
  884. // 初始化字典数据
  885. await this.dictInit()
  886. },
  887. //挂载完成
  888. mounted() {
  889. this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  890. // 表单中 回车 代替 tab
  891. this.enterToTab();
  892. },
  893. computed: {
  894. ...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "customerOrg", "projPriv"]),
  895. //是否总检(已总检则不允许修改套餐与分组)
  896. isComplete() {
  897. return this.form.completeFlag == '3' ? true : false;
  898. },
  899. // 套餐 disabled 如完成体检亦不允许编辑
  900. displayPackage() {
  901. let isPersonOrgId = true
  902. if (!this.isComplete) {
  903. if (!this.form.customerOrgId) return false
  904. if (typeof this.form.customerOrgId == 'string') {
  905. if (this.form.customerOrgId == this.dict.personOrgId) isPersonOrgId = false
  906. } else {
  907. if (this.form.customerOrgId[this.form.customerOrgId.length - 1] == this.dict.personOrgId) isPersonOrgId = false
  908. }
  909. }
  910. return isPersonOrgId
  911. },
  912. // 分组 disabled 如完成体检亦不允许编辑
  913. displayGroup() {
  914. let isPersonOrgId = true
  915. if (!this.isComplete) {
  916. if (!this.form.customerOrgId) return isPersonOrgId
  917. if (typeof this.form.customerOrgId == 'string') {
  918. if (this.form.customerOrgId != this.dict.personOrgId) isPersonOrgId = false
  919. } else {
  920. if (this.form.customerOrgId[this.form.customerOrgId.length - 1] != this.dict.personOrgId) isPersonOrgId = false
  921. }
  922. }
  923. return isPersonOrgId
  924. },
  925. },
  926. methods: {
  927. ...mapActions(['getPatientRegisterAbs']),
  928. dddw, moment, checkPagePriv,
  929. btnTest() {
  930. // console.log('form', this.form)
  931. },
  932. //数据初始化
  933. async dictInit() {
  934. try {
  935. let sysParmId = "patient_register_occ_check_id"
  936. let sysParm = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId })
  937. if (sysParm.code > -1) {
  938. this.patient_register_occ_check_id = sysParm.data
  939. }
  940. } catch (error) {
  941. console.log('sysParmId:patient_register_occ_check_id', error)
  942. }
  943. //性别(仅档案用)
  944. getapi("/api/app/sex").then((res) => {
  945. if (res.code == 1) {
  946. this.dict.sex = res.data;
  947. }
  948. });
  949. //适用性别
  950. getapi("/api/app/for-sex").then((res) => {
  951. if (res.code == 1) {
  952. this.dict.forSex = res.data;
  953. }
  954. });
  955. //体检中心
  956. getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
  957. (res) => {
  958. if (res.code == 1) {
  959. this.dict.organization = res.data;
  960. }
  961. }
  962. );
  963. //体检单位
  964. // getapi("/api/app/customer-org/in-filter").then((res) => {
  965. // if (res.code == 1) {
  966. // this.dict.customerOrg = res.data;
  967. // }
  968. // });
  969. //体检类别
  970. getapi("/api/app/medical-type/in-filter").then((res) => {
  971. if (res.code > -1) {
  972. this.dict.medicalType = res.data;
  973. }
  974. });
  975. //人员类别
  976. getapi("/api/app/personnel-type/in-filter").then((res) => {
  977. if (res.code > -1) {
  978. this.dict.personnelType = res.data;
  979. }
  980. });
  981. //婚姻状况
  982. getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
  983. if (res.code == 1) {
  984. this.dict.maritalStatus = res.data;
  985. }
  986. });
  987. //性激素期
  988. getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
  989. if (res.code == 1) {
  990. this.dict.sexHormoneTerm = res.data;
  991. }
  992. });
  993. //民族
  994. getapi("/api/app/nation/in-filter").then((res) => {
  995. if (res.code != -1) {
  996. this.dict.nation = res.data;
  997. this.nation = deepCopy(res.data)
  998. }
  999. });
  1000. //籍惯 ,出生地
  1001. getapi("/api/app/birth-place/in-filter").then((res) => {
  1002. if (res.code == 1) {
  1003. this.dict.birthPlace = res.data;
  1004. }
  1005. });
  1006. //套餐
  1007. postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
  1008. if (res.code == 1) {
  1009. this.dict.medicalPackage = res.data;
  1010. }
  1011. });
  1012. //支付方式
  1013. getapi("/api/app/pay-mode").then((res) => {
  1014. if (res.code == 1) {
  1015. this.dict.payMode = res.data;
  1016. }
  1017. });
  1018. //职业病检查类别
  1019. postapi("/api/app/OcCheckType/GetList").then((res) => {
  1020. if (res.code > -1) {
  1021. this.dict.occCheckType = res.data;
  1022. }
  1023. });
  1024. //接害因素
  1025. postapi("/api/app/Poison/GetPoisonWithTypeList").then(res => {
  1026. if (res.code > -1) {
  1027. this.poison = res.data;
  1028. this.poisonList = []
  1029. this.poison.forEach(e => {
  1030. e.poisonDtos.forEach(e2 => {
  1031. this.poisonList.push({
  1032. poisonTypeName: e.poisonTypeName,
  1033. id: e2.id,
  1034. displayName: e2.displayName,
  1035. simpleCode: e2.simpleCode
  1036. })
  1037. });
  1038. });
  1039. }
  1040. })
  1041. //项目类别 树结构
  1042. // getapi("/api/app/item-type/by-code-all").then((res) => {
  1043. // if (res.code != -1) {
  1044. // this.dict.itemTypeTree = res.data;
  1045. // tcdate(this.dict.itemTypeTree);
  1046. // }
  1047. // });
  1048. // postapi("/api/app/asbitem/GetBasicList",{isFilterActive:'Y'}).then((res) => {
  1049. // if (res.code != -1) {
  1050. // this.dict.asbItemAll = res.data;
  1051. // }
  1052. // });
  1053. // // console.log("dict", this.dict);
  1054. },
  1055. changeMedicalTypeId(v) {
  1056. if (this.patient_register_occ_check_id && this.patient_register_occ_check_id == v) {
  1057. this.form.isPatientOccupationalDisease = 'Y'
  1058. } else {
  1059. this.form.isPatientOccupationalDisease = 'N'
  1060. }
  1061. },
  1062. changeChooseOrgId(v) {
  1063. let parentId = null
  1064. if (v) {
  1065. parentId = v[v.length - 1]
  1066. // 已经查询过或无叶子节点的无需再查询
  1067. let lfind = arrayExistObj(this.patientRegister.customerOrgs, 'parentId', parentId)
  1068. if (lfind > -1) return
  1069. lfind = arrayExistObj(this.patientRegister.customerOrgs, 'id', parentId)
  1070. if (lfind > -1 && this.patientRegister.customerOrgs[lfind].isChild == 'N') return
  1071. } else {
  1072. return
  1073. }
  1074. this.getCustomerOrgChild(parentId)
  1075. },
  1076. getCustomerOrgChild(parentId) {
  1077. return new Promise((resolve, reject) => {
  1078. postapi('/api/app/CustomerOrg/GetCustomerOrgByParentId', { parentId })
  1079. .then(res => {
  1080. if (res.code > -1) {
  1081. res.data.forEach(e => {
  1082. e.isLeaf = e.isChild == 'Y' ? false : true
  1083. });
  1084. // console.log('this.patientRegister.customerOrgs', this.patientRegister.customerOrgs)
  1085. let treeData = reMadeOrgTree(deepCopy(res.data), this.LocalConfig.patientRegister.dispCustomerOrgCode);
  1086. treeData.forEach(e => {
  1087. if (arrayExistObj(this.patientRegister.customerOrgs, 'id', e.id) == -1) {
  1088. this.patientRegister.customerOrgs.push(e)
  1089. }
  1090. });
  1091. this.patientRegister.customerOrgTreeAll = madeTree(this.patientRegister.customerOrgs, 'treeChildren', 'parentId', 'id', null)
  1092. // console.log('this.patientRegister.customerOrgTreeAll', this.patientRegister.customerOrgTreeAll)
  1093. resolve(treeData)
  1094. }
  1095. })
  1096. .catch(err => {
  1097. reject(err)
  1098. })
  1099. })
  1100. },
  1101. lazyLoad(node, resolve) {
  1102. if (node && node.data && node.data.id) {
  1103. this.getCustomerOrgChild(node.data.id).then(res => {
  1104. resolve(res)
  1105. }).catch(err => {
  1106. resolve([])
  1107. })
  1108. }
  1109. },
  1110. // 确定选中企业
  1111. btnOkOrg() {
  1112. let customerOrgId = ''
  1113. this.changeCustomerOrgId(this.form.customerOrgId)
  1114. if (Array.isArray(this.form.customerOrgId)) {
  1115. this.form.customerOrgParentId = this.form.customerOrgId[0]
  1116. customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  1117. } else {
  1118. this.form.customerOrgParentId = this.form.customerOrgId
  1119. customerOrgId = this.form.customerOrgId
  1120. }
  1121. let node = getTreeNode(this.patientRegister.customerOrgTreeAll, "treeChildren", "id", customerOrgId)
  1122. if (node) this.form.customerOrgName = node.displayName
  1123. this.dialogOrg = false
  1124. },
  1125. // 获取登记信息 初始form表单数据
  1126. async initFormData(patientRegisterId) {
  1127. this.peisid = window.sessionStorage.getItem('peisid');
  1128. let customerOrgId, customerOrgName, customerOrgParentId
  1129. if (this.patientRegister.query.customerOrgId) {
  1130. customerOrgParentId = this.patientRegister.query.CustomerOrgParentId
  1131. customerOrgId = this.patientRegister.query.customerOrgId
  1132. customerOrgName = this.patientRegister.query.customerOrgName
  1133. } else {
  1134. customerOrgParentId = this.form.customerOrgParentId
  1135. customerOrgId = this.form.customerOrgId
  1136. customerOrgName = this.form.customerOrgName
  1137. }
  1138. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  1139. if (!patientRegisterId) { //添加
  1140. this.peoplePhoto = '' // 清掉照片
  1141. this.form = Object.assign({}, this.form, this.formInit)
  1142. this.form.registerCheckAsbitems = []
  1143. this.form.medicalCenterId = this.peisid; //体检中收
  1144. this.form.customerOrgId = customerOrgId //体检单位
  1145. this.form.customerOrgParentId = customerOrgParentId //体检父单位
  1146. this.form.customerOrgName = customerOrgName
  1147. this.handleFormData()
  1148. this.completeFlag = '0'
  1149. } else {
  1150. // let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
  1151. postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId }).then(res => {
  1152. if (res.code > -1) {
  1153. // this.form = res.data 这种方式,会造成 checkbox 值变化不响应,故取消
  1154. this.form = Object.assign({}, this.form, res.data)
  1155. this.completeFlag = this.form.completeFlag
  1156. this.handleFormData()
  1157. }
  1158. })
  1159. }
  1160. },
  1161. handleFormData() {
  1162. // 判断是否职业健康检查
  1163. this.changeMedicalTypeId(this.form.medicalTypeId)
  1164. if (this.form.isPatientOccupationalDisease == 'Y') {
  1165. this.getOccDiseaseData()
  1166. }
  1167. // 处理照片
  1168. this.getPeoplePhoto(this.form.photo)
  1169. // this.dataTransOpts.refresh.register_check_asbitem.D++ //触发所选组合项目刷新 (取消这种触发,减少交互)
  1170. this.dataTransOpts.tableM.register_check_asbitem = this.form.registerCheckAsbitems
  1171. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1172. e.standTotal = e.amount * e.standardPrice
  1173. e.total = e.amount * e.chargePrice
  1174. });
  1175. // 单位/个人 的分组与套餐处理
  1176. this.changeCustomerOrgId(this.form.customerOrgId)
  1177. this.dataTransOpts.refresh.register_check_asbitem.OnlyRefreshAsbitem++
  1178. },
  1179. //快速选择组合项目时,调整可按拼间简码及简称查找
  1180. filterMethod(keyWords) {
  1181. //// console.log('filterMethod',this.asbItemQuick)
  1182. if (keyWords) {
  1183. this.nation = [];
  1184. this.dict.nation.forEach(item => {
  1185. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1186. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  1187. this.nation.push(item);
  1188. }
  1189. });
  1190. } else {
  1191. this.nation = deepCopy(this.dict.nation);
  1192. }
  1193. },
  1194. //选择单位
  1195. async changeCustomerOrgId(v) {
  1196. console.log('changeCustomerOrgId', v, this.form.customerOrgParentId)
  1197. let customerOrgId = "", customerOrgParentId = ""
  1198. if (Array.isArray(v) && v.length > 0) {
  1199. customerOrgId = v[v.length - 1]
  1200. customerOrgParentId = v[0]
  1201. } else {
  1202. customerOrgId = v // 后台顶级单位ID未获取正确(再获取一次)
  1203. customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId)
  1204. // let pids = getTreePids(this.patientRegister.customerOrgTreeAll, "treeChildren", "parentId", "id", customerOrgId)
  1205. // if (Array.isArray(pids) && pids.length > 0) {
  1206. // if (pids.length == 1) {
  1207. // customerOrgParentId = customerOrgId
  1208. // } else {
  1209. // customerOrgParentId = pids[1]
  1210. // }
  1211. // }
  1212. }
  1213. this.preCustomerOrgId = customerOrgId
  1214. if (customerOrgParentId) {
  1215. if (customerOrgParentId == this.dict.personOrgId) {
  1216. // 个人体检则 固定单位体检次数
  1217. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001"
  1218. } else {
  1219. // 获取体检次数字典库
  1220. this.getCustomerOrgRegisterList(customerOrgParentId)
  1221. }
  1222. // 需要触发 修改 分组/套餐 顶级ID 没有变时,不改变套餐与分组
  1223. if (customerOrgParentId != this.form.customerOrgParentId) {
  1224. this.form.customerOrgGroupId = null
  1225. this.form.medicalPackageId = null
  1226. // 清除套餐分组标识
  1227. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1228. e.isBelongGroupPackage = 'N'
  1229. });
  1230. if (customerOrgParentId == this.dict.personOrgId) {
  1231. this.patientRegister.customerOrgGroup = []
  1232. }
  1233. if (this.form.customerOrgParentId == this.dict.personOrgId) {
  1234. this.changeMedicalPackageId()
  1235. } else {
  1236. this.changeCustomerOrgGroupId()
  1237. }
  1238. }
  1239. }
  1240. },
  1241. // 获取顶级单位ID
  1242. async getParentCustomerOrgId(customerOrgId) {
  1243. let customerOrgParentId = null
  1244. if (!customerOrgId) return customerOrgParentId
  1245. if (typeof customerOrgId == 'string') {
  1246. try {
  1247. let res = await getapi(`/api/app/customer-org/parent/${customerOrgId}`)
  1248. if (res.code != -1) customerOrgParentId = res.data
  1249. } catch (error) {
  1250. // console.log('获取顶级单位ID出错:', error)
  1251. }
  1252. } else if (customerOrgId.length > 0) {
  1253. customerOrgParentId = customerOrgId[0]
  1254. }
  1255. return customerOrgParentId
  1256. },
  1257. //获取单位体检次数
  1258. getCustomerOrgRegisterList(customerOrgParentId) {
  1259. //获取单位体检次数信息
  1260. getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`)
  1261. .then(res => {
  1262. if (res.code > - 1) {
  1263. // console.log('获取单位体检次数', this.form.customerOrgRegisterId, res.data)
  1264. this.customerOrgRegisterList = res.data
  1265. if (!this.form.customerOrgRegisterId || this.form.customerOrgRegisterId == "00000000-0000-0000-0000-000000000001") {
  1266. let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数
  1267. if (customerOrgRegisterList.length > 0) {
  1268. this.form.customerOrgRegisterId = customerOrgRegisterList[customerOrgRegisterList.length - 1].id
  1269. }
  1270. }
  1271. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId}
  1272. this.patientRegister.customerOrgGroup = []
  1273. if (this.form.customerOrgRegisterId && this.form.customerOrgRegisterId != '00000000-0000-0000-0000-000000000001') return postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId: this.form.customerOrgRegisterId }) //获取单位分组
  1274. }
  1275. }).then(res => {
  1276. if (res && res.code != -1) {
  1277. this.patientRegister.customerOrgGroup = res.data;
  1278. }
  1279. })
  1280. },
  1281. //读取身份证信息
  1282. peopleIcCard() {
  1283. if (!this.$peisAPI) {
  1284. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1285. return
  1286. }
  1287. this.$peisAPI.peopleIcCard().then(res => {
  1288. // console.log('peopleIcCard', res)
  1289. let lres = JSON.parse(res)
  1290. if (lres.code >= -1) {
  1291. let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
  1292. this.form.patientName = idNos.Name
  1293. this.form.birthDate = idNos.birthDate
  1294. this.form.sexId = idNos.sexId
  1295. this.form.age = idNos.age
  1296. this.form.nationId = idNos.nationId
  1297. this.form.idNo = idNos.IDCode
  1298. this.form.address = idNos.Address
  1299. this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
  1300. // this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  1301. this.changeIdNo() // 触发身份证查询档案号
  1302. } else {
  1303. this.$message.error({ showClose: true, message: `${lres.message}` })
  1304. }
  1305. })
  1306. },
  1307. // 分诊排队
  1308. fnQueue(row) {
  1309. this.queueParams = {
  1310. patientRegisterId: row.id
  1311. }
  1312. this.dialogWin.queue = true
  1313. this.dataTransOpts.plus.queue++
  1314. },
  1315. //修改单位体检次数
  1316. changeMedicalTimes() {
  1317. this.form.customerOrgGroupId = null
  1318. this.changeCustomerOrgGroupId()
  1319. //获取体检次数下的分组
  1320. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  1321. },
  1322. //移除旧分组或套餐的组合项目
  1323. removeGroupPackageAsb() {
  1324. let body = { registerAsbitemIds: [] }
  1325. let registerAsbitemIds = []
  1326. let chargeComplete = ''
  1327. //体检基本信息未保存时,删除所有所选项目
  1328. if (!this.form.id) {
  1329. this.patientRegister.patientRegisterAbs = [];
  1330. return body;
  1331. }
  1332. //删除已选 分组或套餐的组合项目 ,如已收费或 已检时,将 groupPackageId 置为null
  1333. for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
  1334. if (!this.patientRegister.patientRegisterAbs[i].id) {
  1335. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1336. i--
  1337. continue
  1338. }
  1339. if (this.patientRegister.patientRegisterAbs[i].isCharge == 'Y' || this.patientRegister.patientRegisterAbs[i].checkCompleteFlag != '0') {
  1340. chargeComplete += this.patientRegister.patientRegisterAbs[i].asbitemName + ','
  1341. this.patientRegister.patientRegisterAbs[i].groupPackageId = null
  1342. } else {
  1343. //数据库有,才添加到待删除的数组中
  1344. if (this.patientRegister.patientRegisterAbs[i].id) {
  1345. registerAsbitemIds.push(this.patientRegister.patientRegisterAbs[i].id)
  1346. }
  1347. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1348. i--
  1349. }
  1350. }
  1351. if (chargeComplete) {
  1352. this.$message.info({ showClose: true, message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
  1353. }
  1354. body = { registerAsbitemIds };
  1355. return body;
  1356. },
  1357. //添加新套餐/分组的组合项目
  1358. addGroupPackageAsb(groupPackageAsb, typeFlag, groupPackageId) {
  1359. let payTypeFlag = '0'; //默认个人支付
  1360. let lfind = -1
  1361. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
  1362. for (let i = 0; i < groupPackageAsb.length; i++) {
  1363. lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id)
  1364. if (lfind > - 1) {
  1365. this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
  1366. //editCount++
  1367. continue
  1368. }
  1369. let pojo = {
  1370. asbitemId: groupPackageAsb[i].id,
  1371. asbitemName: groupPackageAsb[i].displayName,
  1372. patientRegisterId: this.form.id,
  1373. standardPrice: groupPackageAsb[i].price,
  1374. chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice : groupPackageAsb[i].price,
  1375. payTypeFlag,
  1376. discount: typeFlag == 'group' ? groupPackageAsb[i].discount : 100,
  1377. isCharge: "N",
  1378. amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount : 1,
  1379. groupPackageId: groupPackageId
  1380. }
  1381. this.patientRegister.patientRegisterAbs.push(pojo)
  1382. }
  1383. },
  1384. //获取体检次数下的分组
  1385. getCustomerOrgGroup(customerOrgRegisterId) {
  1386. this.patientRegister.customerOrgGroup = []
  1387. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
  1388. postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId }).then(res => {
  1389. if (res.code != - 1) {
  1390. this.patientRegister.customerOrgGroup = res.data;
  1391. }
  1392. })
  1393. },
  1394. //修改出生日期
  1395. changeBirthDate() {
  1396. this.form.age = birthdayToAge(this.form.birthDate)
  1397. },
  1398. //修改出生日期
  1399. changeAge() {
  1400. this.form.birthDate = ageToBirthday(this.form.age)
  1401. },
  1402. //修改身份证,生成年龄、出生、性别
  1403. changeIdNo() {
  1404. if (!this.form.idNo) return
  1405. this.Query(this.form.idNo)
  1406. let ret = parseID(this.form.idNo)
  1407. // console.log('changeIdNo',ret)
  1408. if (ret.age != -1) {
  1409. this.form.birthDate = new Date(ret.birthday)
  1410. this.form.age = ret.age
  1411. this.form.sexId = ret.sex
  1412. }
  1413. },
  1414. // 输入名字时,查重
  1415. changePatientName() {
  1416. console.log('this.LocalConfig.patientRegister.findPatientByName', this.LocalConfig.patientRegister.findPatientByName)
  1417. if (this.LocalConfig.patientRegister.findPatientByName) {
  1418. this.Query(this.form.patientName)
  1419. }
  1420. },
  1421. // //分组改变时触发
  1422. changeCustomerOrgGroupId() {
  1423. this.prAsbOpraOpts.prAsbGroup++
  1424. },
  1425. // //套餐改变时触发
  1426. changeMedicalPackageId() {
  1427. this.prAsbOpraOpts.prAsbPackage++
  1428. },
  1429. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  1430. Query(param) {
  1431. this.patientChoosed = { id: '' } // 清空之前的选择
  1432. //编辑的时候不查重
  1433. if (this.form.id || !param) return;
  1434. //// console.log(`/api/app/patient/in-filter?Filter=${param}`)
  1435. let body = {
  1436. filter: param,
  1437. maxResultCount: 500
  1438. }
  1439. this.patientList = []
  1440. postapi('/api/app/patient/getlistinfilter', body).then((res) => {
  1441. if (res.code > -1) {
  1442. // console.log("查重 ", res); //有数据才显示
  1443. if (res.data && res.data.length > 0) {
  1444. this.patientList = res.data;
  1445. this.dialogVisible = true;
  1446. }
  1447. }
  1448. });
  1449. },
  1450. //列表选中
  1451. rowick(row) {
  1452. this.patientChoosed = row;
  1453. },
  1454. patientDblclick(row) {
  1455. this.patientChoosed = row;
  1456. this.choosePatient()
  1457. },
  1458. //确定选择人员
  1459. choosePatient() {
  1460. if (!this.patientChoosed.id) {
  1461. this.$message.warning({ showClose: true, message: '请选择人员档案信息' })
  1462. return;
  1463. }
  1464. this.dialogVisible = false;
  1465. this.form.patientId = this.patientChoosed.id;
  1466. this.form.patientNo = this.patientChoosed.patientNo;
  1467. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  1468. // 考滤录入有值,档案却无值
  1469. if (this.patientChoosed.displayName) this.form.patientName = this.patientChoosed.displayName;
  1470. if (this.patientChoosed.sexId) this.form.sexId = this.patientChoosed.sexId;
  1471. if (this.patientChoosed.birthDate) this.form.birthDate = new Date(this.patientChoosed.birthDate);
  1472. if (this.patientChoosed.nationId) this.form.nationId = this.patientChoosed.nationId;
  1473. if (this.patientChoosed.idNo) this.form.idNo = this.patientChoosed.idNo;
  1474. if (!this.form.maritalStatusId) this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  1475. if (!this.form.telephone) this.form.telephone = this.patientChoosed.telephone;
  1476. if (!this.form.mobileTelephone) this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  1477. if (this.form.birthDate) {
  1478. this.form.age = birthdayToAge(this.form.birthDate)
  1479. }
  1480. if (this.form.idNo) {
  1481. let ret = parseID(this.form.idNo)
  1482. this.form.birthDate = new Date(ret.birthday)
  1483. this.form.age = ret.age
  1484. this.form.sexId = ret.sex
  1485. }
  1486. },
  1487. registerRowClick(row) {
  1488. this.registerChoosed = row;
  1489. },
  1490. registerRowDblclick(row) {
  1491. this.registerChoosed = row;
  1492. this.chooseRegister()
  1493. },
  1494. chooseRegister() {
  1495. if (!this.registerChoosed) {
  1496. alert("请选中人员登记信息");
  1497. return;
  1498. }
  1499. objCopy(this.registerChoosed, this.form)
  1500. // this.patientRegister.patientRegisterId = this.registerChoosed.id
  1501. // this.patientRegister.photo = this.registerChoosed.photo
  1502. // this.getPatientRegisterAbs(this.registerChoosed.id)
  1503. this.dataTransOpts.tableS.patient_register.id = this.registerChoosed.id
  1504. setTimeout(() => {
  1505. this.dataTransOpts.refresh.register_check_asbitem.M++
  1506. }, 20);
  1507. this.registerVisible = false
  1508. },
  1509. // 组装基本信息保存的参数体
  1510. madePrBody() {
  1511. //赋值
  1512. let body = deepCopy(this.form);
  1513. // // console.log('this.form',this.form)
  1514. console.log('body', this.form, body)
  1515. if (this.form.birthDate) {
  1516. try {
  1517. body.birthDate = moment(new Date(this.form.birthDate)).format("yyyy-MM-DD")
  1518. } catch (error) {
  1519. // this.form.birthDate != "Invalid date"
  1520. body.birthDate = null
  1521. }
  1522. } else {
  1523. body.birthDate = null
  1524. }
  1525. if (body.birthDate == "Invalid date") body.birthDate = null
  1526. if (isNaN(body.age)) {
  1527. body.age = null
  1528. } else {
  1529. body.age = Number(body.age)
  1530. }
  1531. // // console.log('body',body)
  1532. // Invalid date
  1533. delete body.registerManType;
  1534. delete body.patientRegisterNo;
  1535. delete body.medicalTimes;
  1536. // delete body.completeFlag;
  1537. delete body.isMedicalStart;
  1538. delete body.patientNo;
  1539. delete body.creatorId;
  1540. delete body.creationTime;
  1541. delete body.lastModificationTime;
  1542. delete body.lastModifierId;
  1543. delete body.isVipBox;
  1544. delete body.isNameHideBox;
  1545. delete body.isPhoneFollowBox;
  1546. delete body.isLockBox;
  1547. delete body.photo;
  1548. // if(this.form.registerManType == 'customer') delete body.medicalStartDate;
  1549. if (this.form.id) delete body.medicalStartDate;
  1550. setNull(body, this.defaultNull);
  1551. if (typeof this.form.customerOrgId == 'object') {
  1552. if (this.form.customerOrgId.length > 0) body.customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  1553. }
  1554. //日期转换 日期控件增加格式
  1555. // // console.log("body.birthDate", body.birthDate);
  1556. // if (body.birthDate) {
  1557. // body.birthDate = moment(new Date(body.birthDate)).format(
  1558. // "yyyy-MM-DD"
  1559. // );
  1560. // }
  1561. return body
  1562. },
  1563. // 验证职业病数据合法性
  1564. validateOccData() {
  1565. let err = ''
  1566. if (!this.form.idNo) return "职业健康检查必须填写 身份证号!"
  1567. if (this.form.maritalStatusId == '9') return "职业健康检查 婚姻不允许填未知!"
  1568. if (this.form.sexId == 'U') return "职业健康检查 性别不允许填未知!"
  1569. if (!this.form.ocCheckTypeId) return "职业健康检查必须填写 检查类别!"
  1570. if (!this.form.jobType) return "职业健康检查必须填写 工种!"
  1571. if (this.form.poisonIds == null || this.form.poisonIds.length == 0) return "职业健康检查必须填写 接害因素!"
  1572. return err
  1573. },
  1574. //提交
  1575. btnSubmit(formName, msgTip) {
  1576. console.log('btnSubmit,formName,form', formName, JSON.stringify(this.form))
  1577. this.$refs[formName].validate((valid, fields) => {
  1578. // console.log('fields', fields)
  1579. if (!valid) {
  1580. this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
  1581. return false
  1582. }
  1583. console.log('btnSubmit1', formName)
  1584. if (this.form.customerOrgId != this.dict.personOrgId) {
  1585. if (!this.form.customerOrgRegisterId) {
  1586. this.$message.warning({ showClose: true, message: "请填写单位体检次数!" });
  1587. return false
  1588. }
  1589. }
  1590. if (this.form.idNo && checkIDCode(this.form.idNo) == false) {
  1591. this.$message.warning({ showClose: true, message: "身份证号填写不合法!" });
  1592. return false
  1593. }
  1594. // 如果是职业病,数据验证
  1595. if (this.form.isPatientOccupationalDisease == 'Y') {
  1596. let message = this.validateOccData()
  1597. if (message) {
  1598. this.$message.warning({ showClose: true, message });
  1599. return false
  1600. }
  1601. }
  1602. // console.log('btnSubmit2', formName)
  1603. let body = this.madePrBody()
  1604. // console.log('madePrBody',body)
  1605. body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem)
  1606. if (this.form.id) {
  1607. // 更新时,先保存明细,再更新主表
  1608. // this.prAsbOpraOpts.prAsbSave++ //触发组合项目保存
  1609. body.patientRegisterId = body.id;
  1610. } else {
  1611. delete body.id;
  1612. }
  1613. console.log('btnSubmit3', formName)
  1614. // // console.log(`/api/patientregister/createreturninfo`, body);
  1615. postapi(`/api/PatientRegister/CreatePatientRegister`, body)
  1616. .then(async (res) => {
  1617. if (res.code > -1) {
  1618. // 因为 res.data 返回的 isPatientOccupationalDisease 是错误的(因为职业病尚未保存,所以以form里的值为准)
  1619. let isPatientOccupationalDisease = this.form.isPatientOccupationalDisease
  1620. this.form = Object.assign({}, this.form, res.data, { isPatientOccupationalDisease })
  1621. this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
  1622. delete this.dataTransOpts.tableS.patient_register.registerCheckAsbitems
  1623. // 保存成功赋 id 值等
  1624. this.dataTransOpts.tableM.register_check_asbitem = res.data.registerCheckAsbitems
  1625. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1626. e.total = e.amount * e.chargePrice
  1627. });
  1628. //一般读身份证照片时,会出现这种情况
  1629. if (this.peoplePhoto && this.peoplePhoto.indexOf("data:image") > -1) await savePeoplePhoto(res.data.id, this.peoplePhoto);
  1630. // 如果是职业病,则保存职业病相关信息
  1631. // console.log('this.form.isPatientOccupationalDisease', this.form.isPatientOccupationalDisease)
  1632. if (this.form.isPatientOccupationalDisease == 'Y') {
  1633. await this.occUpdate()
  1634. }
  1635. // 保存即发送收费申请 正式登记的才发送申请
  1636. if (this.form.completeFlag != '0' && this.LocalConfig.patientRegister.immediateToHisCharge) {
  1637. await this.immediateToHisCharge(this.form.id)
  1638. }
  1639. // 首次正式登记或者预登记转正式登记,提示打印条码与指引单
  1640. if (this.completeFlag == '0' && this.form.completeFlag != '0') {
  1641. if (Array.isArray(this.LocalConfig.patientRegister.printGuideLabel) && this.LocalConfig.patientRegister.printGuideLabel.length > 0) {
  1642. this.$confirm("是否打印 指引单、人员条码、检验条码及 Pacs 条码?", "提示", {
  1643. confirmButtonText: "是",
  1644. cancelButtonText: "否",
  1645. type: "warning",
  1646. })
  1647. .then(() => {
  1648. return this.labelPrint(false)
  1649. })
  1650. .then(res => {
  1651. return this.guidePrint('0001', false)
  1652. })
  1653. .catch((err) => {
  1654. if (err != "cancel") {
  1655. console.log(err)
  1656. this.$message.error({ showClose: true, message: err })
  1657. }
  1658. })
  1659. .finally(() => {
  1660. this.completeFlag = this.form.completeFlag
  1661. });
  1662. }
  1663. }
  1664. }
  1665. }
  1666. );
  1667. });
  1668. },
  1669. // 保存职业病信息
  1670. async occUpdate() {
  1671. // 职业病基本信息
  1672. let lriskFactors = []
  1673. this.form.poisonIds.forEach(e => {
  1674. lriskFactors.push(dddw(this.poisonList, 'id', e, 'displayName'))
  1675. });
  1676. let diseaseBase = {
  1677. patientRegisterId: this.form.id,
  1678. ocCheckTypeId: this.form.ocCheckTypeId,
  1679. jobType: this.form.jobType,
  1680. riskFactors: `${lriskFactors}`
  1681. }
  1682. // 职业病接害因素
  1683. let poisons = this.dataTransOpts.tableM.patient_poison.filter(e => {
  1684. return this.form.poisonIds.indexOf(e.poisonId) > - 1
  1685. })
  1686. this.form.poisonIds.forEach(e => {
  1687. if (arrayExistObj(poisons, 'poisonId', e) == -1) {
  1688. poisons.push({
  1689. patientRegisterId: this.form.id,
  1690. poisonId: e,
  1691. occupationalAbnormalId: null
  1692. })
  1693. }
  1694. });
  1695. let patientOccupationalDisease = Object.assign({}, this.dataTransOpts.tableS.patient_occupational_disease || {}, diseaseBase)
  1696. let body = {
  1697. patientRegisterId: this.form.id,
  1698. patientOccupationalDisease,
  1699. patientPoisons: poisons,
  1700. isPatientOccupationalDiseaseUpdate: "Y", //基本信息
  1701. isPatientPoisonsUpdate: "Y", //接害因素
  1702. isPatientPastMedicalHistorysUpdate: "N", // 既往病史
  1703. isPatientOccupationalMedicalHistorysUpdate: "N", // 职业病史
  1704. isPatientOccupationalHistorysUpdate: "N", // 职业史
  1705. isPatientSymptomsUpdate: "N", // 症状
  1706. }
  1707. try {
  1708. await postapi('/api/app/OccupationalDisease/CreateOccupationalDiseaseWithDetail', body)
  1709. this.getOccDiseaseData()
  1710. } catch (error) {
  1711. console.log('occUpdate error', error)
  1712. }
  1713. },
  1714. // 获取职业病信息
  1715. getOccDiseaseData() {
  1716. let patientRegisterId = this.form.id
  1717. postapi('/api/app/OccupationalDisease/GetOccupationalDiseaseWithDetailByPatientRegisterId', { patientRegisterId })
  1718. .then(res => {
  1719. if (res.code > -1) {
  1720. if (res.data['patientOccupationalDisease'] == null) {
  1721. this.dataTransOpts.tableS.patient_occupational_disease = { patientRegisterId }
  1722. } else {
  1723. this.dataTransOpts.tableS.patient_occupational_disease = deepCopy(res.data['patientOccupationalDisease'])
  1724. }
  1725. this.dataTransOpts.tableM.patient_poison = deepCopy(res.data['patientPoisonDtos'])
  1726. this.form.ocCheckTypeId = this.dataTransOpts.tableS.patient_occupational_disease.ocCheckTypeId
  1727. this.form.jobType = this.dataTransOpts.tableS.patient_occupational_disease.jobType
  1728. let poisonIds = [] // 接害因素IDs
  1729. this.dataTransOpts.tableM.patient_poison.forEach(e => {
  1730. poisonIds.push(e.poisonId)
  1731. });
  1732. this.form.poisonIds = poisonIds
  1733. }
  1734. })
  1735. },
  1736. // 列表数据生成 分组 select
  1737. madeSelectGroup(poisonList) {
  1738. let poison = []
  1739. poisonList.forEach(e => {
  1740. let lfind = arrayExistObj(poison, "poisonTypeName", e.poisonTypeName)
  1741. if (lfind == -1) {
  1742. poison.push({ poisonTypeName: e.poisonTypeName, poisonDtos: [{ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode }] })
  1743. } else {
  1744. poison[lfind]['poisonDtos'].push({ id: e.id, displayName: e.displayName, simpleCode: e.simpleCode })
  1745. }
  1746. });
  1747. return poison
  1748. },
  1749. filterMethodPoison(v) {
  1750. // console.log('this.poisonList',v,this.poisonList)
  1751. if (v) {
  1752. let lv = v.toUpperCase()
  1753. let poisonList = this.poisonList.filter(e => {
  1754. return e.poisonTypeName.indexOf(lv) > -1 || e.displayName.indexOf(lv) > -1 || e.simpleCode.indexOf(lv) > -1
  1755. })
  1756. this.poison = this.madeSelectGroup(poisonList)
  1757. } else {
  1758. this.poison = this.madeSelectGroup(this.poisonList)
  1759. }
  1760. console.log('filterMethod', this.poison)
  1761. },
  1762. // 人员新增
  1763. btnAdd() {
  1764. this.dataTransOpts.tableS.patient_register.id = ''
  1765. this.dataTransOpts.refresh.patient_register.S++
  1766. },
  1767. //将现有的数据,复制并展现,但未保存
  1768. rdCopy() {
  1769. if (!this.form.id) {
  1770. this.$message.info({ showClose: true, message: "该信息尚未保存,不可执行此操作!" });
  1771. return;
  1772. }
  1773. this.dataTransOpts.tableS.patient_register.id = ''
  1774. this.peoplePhoto = '/pic/Photo.jpg'
  1775. this.patientRegister.patientRegisterId = '';
  1776. this.form.id = '';
  1777. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  1778. this.form.patientRegisterNo = '';
  1779. this.form.patientNo = '';
  1780. this.form.medicalTimes = 1;
  1781. this.form.patientName = '';
  1782. this.form.photo = '';
  1783. this.form.completeFlag = '1'; //
  1784. // this.patientRegister.patientRegisterAbs.forEach(e => {
  1785. // e.id = '';
  1786. // e.patientRegisterId = '';
  1787. // e.isCharge = 'N';
  1788. // e.checkCompleteFlag = '0'
  1789. // e.isLock = 'N'
  1790. // });
  1791. // 触发明细项目复制
  1792. // setTimeout(() => {
  1793. // this.prAsbOpraOpts.copyNew++
  1794. // }, 10);
  1795. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1796. delete e.id
  1797. e.patientRegisterId = ''
  1798. e.isCharge = 'N'
  1799. e.isLock = 'N'
  1800. });
  1801. // // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  1802. this.$message.info({ showClose: true, message: "操作成功,请记得点保存" });
  1803. },
  1804. //删除
  1805. del() {
  1806. deletapi(
  1807. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  1808. ).then((res) => {
  1809. // console.log("删除 操作成功");
  1810. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  1811. this.getCustomerOrgTree();
  1812. });
  1813. },
  1814. // 同步团检人员网上添加项目信息
  1815. btnDownOrg() {
  1816. postapi("/api/app/ThirdInterface/GetListByThirdInterfaceTypeAsync", { thirdInterfaceType: "07" })
  1817. .then(res => {
  1818. if (res.code > -1 && res.data && Array.isArray(res.data) && res.data.length > 0) {
  1819. this.thirdInterfaceId = res.data[0].id
  1820. return postapi('/api/app/AppointPatientRegister/GetByPatientRegisterId', { thirdInterfaceId: this.thirdInterfaceId, appointPatientRegisterId: '1', patientRegisterId: this.form.id })
  1821. }
  1822. })
  1823. .then(res => {
  1824. if (res && res.code > -1) {
  1825. this.form.appointPatientRegisterId = res.data.appointPatientRegisterId
  1826. return postapi('/api/app/AppointPatientRegister/GetAppointRegisterAsbitemListById', {
  1827. thirdInterFaceId: this.thirdInterfaceId,
  1828. appointPatientRegisterId: res.data.appointPatientRegisterId
  1829. })
  1830. }
  1831. })
  1832. .then(res => {
  1833. if (res && res.code > -1) {
  1834. res.data.forEach(e => {
  1835. e.discount = e.standardPrice == 0 ? 100 : Math.floor(e.chargePrice * 10000 / e.standardPrice) / 100
  1836. if (!e.isBelongGroupPackage) {
  1837. e.isBelongGroupPackage = e.isInMedicalPackage
  1838. }
  1839. // e.standTotal = e.amount * e.standardPrice
  1840. e.total = e.amount * e.chargePrice
  1841. });
  1842. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data)
  1843. this.$message.success({ showClose: true, message: '操作成功!' })
  1844. }
  1845. })
  1846. },
  1847. //拍照(已废弃)
  1848. // openCamera() {
  1849. // if (!this.form.id) {
  1850. // alert("请先保存人员信息");
  1851. // return;
  1852. // }
  1853. // this.patientRegister.cameraVisble = true;
  1854. // },
  1855. //拍照(调壳程序)
  1856. photoGrah() {
  1857. if (!this.form.id) {
  1858. alert("请先保存人员信息");
  1859. return;
  1860. }
  1861. if (!this.$peisAPI) {
  1862. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1863. return
  1864. }
  1865. this.$peisAPI.photoGrah()
  1866. .then(res => {
  1867. // console.log('this.$peisAPI.photoGrah 原始返回结果', res)
  1868. let lres = JSON.parse(res)
  1869. if (lres.code > -1) {
  1870. let uploadPhoto = {
  1871. patientRegisterId: this.form.id,
  1872. photo: lres.data.Photo,
  1873. };
  1874. this.peoplePhoto = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  1875. // this.patientRegister.photo = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  1876. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  1877. } else {
  1878. this.$message.error({ showClose: true, message: "上传照片错误" + lres.code })
  1879. }
  1880. }).then(res => {
  1881. if (res && res.code > -1) {
  1882. let body = {
  1883. patientRegisterId: this.form.id,
  1884. photo: res.data,
  1885. };
  1886. // console.log(body);
  1887. return postapi(`/api/app/patient-register/update-photo`, body);
  1888. }
  1889. }).then(res => {
  1890. if (res && res.code > -1) {
  1891. //// console.log('拍照',res.data)
  1892. this.patientRegister.patientRegisterRd.photo = res.data.photo
  1893. // console.log("操作成功");
  1894. }
  1895. }).catch(err => {
  1896. // console.log('this.$peisAPI.photoGrah', err)
  1897. this.$message.error({ showClose: true, message: `照片操作错误 ${err}` })
  1898. })
  1899. },
  1900. getPeoplePhoto(photo) {
  1901. this.peoplePhoto = photoParse(photo)
  1902. },
  1903. // 打印指引单(isPreview)
  1904. guidePrint(ReportCode, isPreview) {
  1905. return new Promise((resolve, reject) => {
  1906. if (!this.form.id) {
  1907. reject("人员信息尚未保存,不可执行此操作!")
  1908. }
  1909. if (this.form.completeFlag == '0') {
  1910. reject("预登记人员,不可执行此操作!")
  1911. }
  1912. if (!this.$peisAPI) {
  1913. reject("此功能,需要在壳客户端才可运行!")
  1914. }
  1915. let token = window.sessionStorage.getItem('token');
  1916. let user = window.sessionStorage.getItem('user');
  1917. let toOutShell = {
  1918. ReportCode, token,
  1919. isBuildImage: 'N',
  1920. IsUploadPdf: 'N',
  1921. preViewCanPrint: 'N',
  1922. BusinessCode: this.form.id,
  1923. Parameters: [
  1924. { Name: 'printer', Value: user },
  1925. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1926. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
  1927. ],
  1928. };
  1929. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  1930. this.printing = true
  1931. if (isPreview) {
  1932. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  1933. .then(res => {
  1934. if (JSON.parse(res).code < 0) {
  1935. reject(JSON.parse(res).message)
  1936. } else {
  1937. resolve(res)
  1938. }
  1939. })
  1940. .catch(err => {
  1941. reject(err)
  1942. })
  1943. .finally(() => {
  1944. this.printing = false
  1945. })
  1946. } else {
  1947. this.$peisAPI.print(JSON.stringify(toOutShell))
  1948. .then(res => {
  1949. if (JSON.parse(res).code < 0) {
  1950. reject(JSON.parse(res).message)
  1951. } else {
  1952. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  1953. }
  1954. })
  1955. .then(res => {
  1956. if (res && res.code > -1) {
  1957. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  1958. if (lfind > -1) {
  1959. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  1960. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  1961. } else {
  1962. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  1963. }
  1964. }
  1965. resolve(res)
  1966. } else {
  1967. reject("更新指引单打印错误")
  1968. }
  1969. })
  1970. .catch(err => {
  1971. reject(err)
  1972. })
  1973. .finally(() => {
  1974. this.printing = false
  1975. })
  1976. }
  1977. })
  1978. },
  1979. //检验申请
  1980. async lisRequest() {
  1981. this.$message.warning({ showClose: true, message: '此功能已合并到条码打印' });
  1982. /*
  1983. let isPrintLisRequest = false
  1984. let res = null
  1985. if (this.form.id.length < 1) {
  1986. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!"});
  1987. return;
  1988. }
  1989. try {
  1990. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  1991. // console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  1992. } catch (error) {
  1993. return;
  1994. }
  1995. if (res.code > -1) {
  1996. // this.$message.info("发送检验申请成功!");
  1997. isPrintLisRequest = true;
  1998. }
  1999. //重复申请,重打
  2000. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  2001. isPrintLisRequest = true;
  2002. }
  2003. if (!isPrintLisRequest) return;
  2004. try {
  2005. await this.$confirm("是否打印检验申请单?", "提示", {
  2006. confirmButtonText: "是",
  2007. cancelButtonText: "否",
  2008. type: "info",
  2009. showClose: false,
  2010. closeOnClickModal: false,
  2011. closeOnPressEscape: false,
  2012. });
  2013. } catch (error) {
  2014. return;
  2015. }
  2016. //打印检验申请单
  2017. this.lisPrint('0003', false);
  2018. */
  2019. },
  2020. //条码打印(lis + pacs)
  2021. labelPrint(isPreview) {
  2022. return new Promise((resolve, reject) => {
  2023. if (!this.form.id) {
  2024. reject("人员信息尚未保存,不可执行此操作!");
  2025. }
  2026. if (this.form.completeFlag == '0') {
  2027. reject("预登记人员,不可执行此操作!");
  2028. }
  2029. if (!this.$peisAPI) {
  2030. reject("此功能,需要在壳客户端才可运行!");
  2031. }
  2032. let token = window.sessionStorage.getItem('token');
  2033. let user = window.sessionStorage.getItem('user');
  2034. let toOutShell = {
  2035. token, // ReportCode,
  2036. IsMoreLabel: 'Y',
  2037. isBuildImage: 'N',
  2038. IsUploadPdf: 'N',
  2039. BusinessCode: this.form.id,
  2040. Parameters: [
  2041. { Name: 'printer', Value: user },
  2042. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  2043. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' }
  2044. ],
  2045. };
  2046. this.printing = true
  2047. if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2048. this.guidePrintEasy('0008', isPreview, toOutShell)
  2049. .then(res => {
  2050. return this.lisPrint('0002', isPreview, toOutShell)
  2051. })
  2052. .then(res => {
  2053. return this.pacsPrint('0004', isPreview, toOutShell)
  2054. })
  2055. .then(res => {
  2056. resolve(res)
  2057. })
  2058. .catch(err => {
  2059. reject(err)
  2060. })
  2061. .finally(() => {
  2062. this.printing = false
  2063. })
  2064. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
  2065. this.guidePrintEasy('0008', isPreview, toOutShell)
  2066. .then(res => {
  2067. return this.lisPrint('0002', isPreview, toOutShell)
  2068. })
  2069. .then(res => {
  2070. resolve(res)
  2071. })
  2072. .catch(err => {
  2073. reject(err)
  2074. })
  2075. .finally(() => {
  2076. this.printing = false
  2077. })
  2078. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2079. this.guidePrintEasy('0008', isPreview, toOutShell)
  2080. .then(res => {
  2081. return this.pacsPrint('0004', isPreview, toOutShell)
  2082. })
  2083. .then(res => {
  2084. resolve(res)
  2085. })
  2086. .catch(err => {
  2087. reject(err)
  2088. })
  2089. .finally(() => {
  2090. this.printing = false
  2091. })
  2092. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2093. this.lisPrint('0002', isPreview, toOutShell)
  2094. .then(res => {
  2095. return this.pacsPrint('0004', isPreview, toOutShell)
  2096. })
  2097. .then(res => {
  2098. resolve(res)
  2099. })
  2100. .catch(err => {
  2101. reject(err)
  2102. })
  2103. .finally(() => {
  2104. this.printing = false
  2105. })
  2106. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1) {
  2107. this.guidePrintEasy('0008', isPreview, toOutShell)
  2108. .then(res => {
  2109. resolve(res)
  2110. })
  2111. .catch(err => {
  2112. reject(err)
  2113. })
  2114. .finally(() => {
  2115. this.printing = false
  2116. })
  2117. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
  2118. this.lisPrint('0002', isPreview, toOutShell)
  2119. .then(res => {
  2120. resolve(res)
  2121. })
  2122. .catch(err => {
  2123. reject(err)
  2124. })
  2125. .finally(() => {
  2126. this.printing = false
  2127. })
  2128. } else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) {
  2129. this.pacsPrint('0004', isPreview, toOutShell)
  2130. .then(res => {
  2131. resolve(res)
  2132. })
  2133. .catch(err => {
  2134. reject(err)
  2135. })
  2136. .finally(() => {
  2137. this.printing = false
  2138. })
  2139. } else {
  2140. this.printing = false
  2141. resolve("success")
  2142. }
  2143. })
  2144. },
  2145. // lis条码打印
  2146. guidePrintEasy(ReportCode, isPreview, toOutShell) {
  2147. return new Promise((resolve, reject) => {
  2148. toOutShell.ReportCode = ReportCode
  2149. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2150. if (isPreview) {
  2151. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2152. .then(res => {
  2153. if (JSON.parse(res).code < 0) {
  2154. // this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  2155. reject(JSON.parse(res).message)
  2156. } else {
  2157. resolve(res)
  2158. }
  2159. })
  2160. .catch(err => {
  2161. reject(err)
  2162. })
  2163. } else {
  2164. this.$peisAPI.print(JSON.stringify(toOutShell))
  2165. .then(res => {
  2166. if (JSON.parse(res).code < 0) {
  2167. reject(JSON.parse(res).message)
  2168. } else {
  2169. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  2170. }
  2171. })
  2172. .then(res => {
  2173. if (res && res.code > -1) {
  2174. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  2175. if (lfind > -1) {
  2176. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  2177. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  2178. } else {
  2179. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  2180. }
  2181. }
  2182. resolve(res)
  2183. } else {
  2184. reject(res.message)
  2185. }
  2186. })
  2187. .catch(err => {
  2188. reject(err)
  2189. })
  2190. }
  2191. })
  2192. },
  2193. // lis条码打印
  2194. lisPrint(ReportCode, isPreview, toOutShell) {
  2195. return new Promise((resolve, reject) => {
  2196. toOutShell.ReportCode = ReportCode
  2197. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2198. if (isPreview) {
  2199. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2200. .then(res => {
  2201. if (JSON.parse(res).code < 0) {
  2202. // this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  2203. reject(JSON.parse(res).message)
  2204. } else {
  2205. resolve(res)
  2206. }
  2207. })
  2208. .catch(err => {
  2209. reject(err)
  2210. })
  2211. } else {
  2212. this.$peisAPI.print(JSON.stringify(toOutShell))
  2213. .then(res => {
  2214. if (JSON.parse(res).code < 0) {
  2215. reject(JSON.parse(res).message)
  2216. } else {
  2217. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  2218. }
  2219. })
  2220. .then(res => {
  2221. if (res && res.code < 0) {
  2222. reject(res.message)
  2223. } else {
  2224. resolve(res)
  2225. }
  2226. })
  2227. .catch(err => {
  2228. reject(err)
  2229. })
  2230. }
  2231. })
  2232. },
  2233. //pacs条码打印
  2234. pacsPrint(ReportCode, isPreview, toOutShell) {
  2235. return new Promise((resolve, reject) => {
  2236. toOutShell.ReportCode = ReportCode
  2237. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  2238. if (isPreview) {
  2239. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  2240. .then(res => {
  2241. if (JSON.parse(res).code < 0) {
  2242. // this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  2243. reject(JSON.parse(res).message)
  2244. } else {
  2245. resolve(res)
  2246. }
  2247. })
  2248. .catch((err) => {
  2249. // console.log('打印pacs条码错误', err)
  2250. this.$message.warning({ showClose: true, message: `${err}` });
  2251. reject(err)
  2252. });
  2253. } else {
  2254. this.$peisAPI.print(JSON.stringify(toOutShell))
  2255. .then(res => {
  2256. if (JSON.parse(res).code < 0) {
  2257. // this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  2258. reject(JSON.parse(res).message)
  2259. } else {
  2260. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  2261. operateType: 1,
  2262. patientRegisterId: this.form.id,
  2263. });
  2264. }
  2265. })
  2266. .then(res => {
  2267. if (res && res.code < 0) {
  2268. // this.$message.error({ showClose: true, message: `${res.message}` });
  2269. reject(res.message)
  2270. } else {
  2271. resolve(res)
  2272. }
  2273. })
  2274. .catch((err) => {
  2275. // console.log('打印pacs条码错误', err)
  2276. // this.$message.error({ showClose: true, message: `${err}` });
  2277. reject(err)
  2278. });
  2279. }
  2280. });
  2281. },
  2282. //补打条码
  2283. reLisRequest() {
  2284. if (!this.form.id) {
  2285. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  2286. return;
  2287. }
  2288. if (this.form.completeFlag == '0') {
  2289. this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
  2290. return;
  2291. }
  2292. this.brushTimes++;
  2293. this.patientRegister.lisRequestVisble = true;
  2294. },
  2295. //手动合并项目
  2296. reMergeAsbitem() {
  2297. if (this.form.id.length < 1) {
  2298. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  2299. return;
  2300. }
  2301. this.brushTimes++;
  2302. this.patientRegister.mergeAsbitemVisble = true;
  2303. },
  2304. btnPayTypeFlag(payTypeFlag) {
  2305. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2306. if (e.isCharge == 'N') e.payTypeFlag = payTypeFlag
  2307. });
  2308. },
  2309. async getAsb(id) {
  2310. let err = ''
  2311. try {
  2312. let res = await getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`)
  2313. if (res.code > -1) {
  2314. this.dataTransOpts.tableM.register_check_asbitem = res.data
  2315. } else {
  2316. err = res.message
  2317. }
  2318. } catch (error) {
  2319. err = `${error}`
  2320. }
  2321. return err
  2322. },
  2323. async toCharge(form) {
  2324. if (!form.patientRegisterNo) {
  2325. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  2326. return
  2327. }
  2328. if (form.completeFlag == '0') {
  2329. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  2330. return
  2331. }
  2332. let err = await this.getAsb(form.id)
  2333. if (err) {
  2334. this.$message.error(err)
  2335. return
  2336. }
  2337. let chargeMoney = Number(0)
  2338. //支付方式,比如是0自费、2免费、1单位支付
  2339. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2340. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  2341. });
  2342. if (chargeMoney == 0) {
  2343. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  2344. return
  2345. }
  2346. //多次重复点击时,刷新处理
  2347. this.chargePatientRegisterNo = form.patientRegisterNo
  2348. this.dataTransOpts.refresh.charge.S++
  2349. this.dialogWin.charge = true
  2350. },
  2351. // 收费申请
  2352. async chargeRequest(form) {
  2353. if (!form.id) {
  2354. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  2355. return
  2356. }
  2357. if (form.completeFlag == '0') {
  2358. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  2359. return
  2360. }
  2361. let err = await this.getAsb(form.id)
  2362. if (err) {
  2363. this.$message.error(err)
  2364. return
  2365. }
  2366. let chargeMoney = Number(0)
  2367. //支付方式,比如是0自费、2免费、1单位支付
  2368. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  2369. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  2370. });
  2371. if (chargeMoney == 0) {
  2372. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  2373. return
  2374. }
  2375. // 显示
  2376. this.dataTransOpts.refresh.charge.S++
  2377. this.dialogWin.AsbChargeRequest = true
  2378. },
  2379. // 保存立即发送收费申请
  2380. async immediateToHisCharge(patientRegisterId) {
  2381. try {
  2382. let res = await postapi('/api/app/registerasbitem/GetCanChargeAsbitemsByPatientRegisterId', { patientRegisterId })
  2383. if (!(res.code > -1 && res.data.length > 0)) return
  2384. let body = {
  2385. patientRegisterId,
  2386. registerCheckAsbitems: []
  2387. }
  2388. res.data.forEach(e => {
  2389. body.registerCheckAsbitems.push({ registerCheckAsbitemId: e.registerCheckAsbitemId })
  2390. });
  2391. let resCharge = await postapi("/api/app/ChargeRequest/Create", body)
  2392. if (resCharge.code > -1) {
  2393. this.dataTransOpts.refresh.patient_register.S++
  2394. }
  2395. } catch (error) {
  2396. this.$message.error({ showClose: true, message: `${error}` })
  2397. }
  2398. },
  2399. //关闭收费窗口时,刷新收费状态信息
  2400. closeDialogCharge() {
  2401. // this.prAsbOpraOpts.prAsbQuery++
  2402. this.dataTransOpts.refresh.patient_register.S++
  2403. // this.dataTransOpts.refresh.register_check_asbitem.D++
  2404. },
  2405. // 新增保存基本信息产生新的ID,等明细保存后,再更新表单form.id
  2406. refreshFormId() {
  2407. // console.log('refreshFormId', this.prAsbOpraOpts.formId)
  2408. this.form.id = this.prAsbOpraOpts.formId
  2409. this.prAsbOpraOpts.formId = '' //清空
  2410. /**/
  2411. // this.patientRegister.prList.push(res.data); //列表添加记录
  2412. this.patientRegister.patientRegisterId = this.form.id;
  2413. objCopy(this.form, this.patientRegister.patientRegisterRd);
  2414. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)放在窗口关闭事件中去
  2415. // let curRow = deepCopy(this.patientRegister.patientRegisterRd)
  2416. // curRow.index = this.patientRegister.prList.length
  2417. // this.patientRegister.prList.push(curRow)
  2418. },
  2419. // 显示职业病
  2420. btnOcc() {
  2421. if (!this.form.id) {
  2422. this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })
  2423. return
  2424. }
  2425. this.dataTransOpts.plus.OccDisease++
  2426. this.dialogWin.OccDisease = true
  2427. },
  2428. // 获取接害因素 + 检查类别 的组合项目 后,刷新当前组合项目
  2429. changeOccPosionOrCheckType() {
  2430. this.getOccAsbitems().then(res => {
  2431. let lfind = 0
  2432. for (let i = this.dataTransOpts.tableM.register_check_asbitem.length - 1; i >= 0; i--) {
  2433. let e = this.dataTransOpts.tableM.register_check_asbitem[i];
  2434. if (e.isCharge == 'Y' || e.checkCompleteFlag != '0') {
  2435. continue
  2436. } else {
  2437. // 已登记的项目 在 this.occAsbitems 中,则不删除 (如果删除的话,条码会变)
  2438. lfind = arrayExistObj(this.occAsbitems, 'id', e.asbitemId)
  2439. if (lfind == -1) this.dataTransOpts.tableM.register_check_asbitem.splice(i, 1)
  2440. }
  2441. }
  2442. lfind = 0
  2443. let payTypeFlag = '1'; //职业病 默认单位支付
  2444. if (this.form.customerOrgId == this.dict.personOrgId) payTypeFlag = '0' //个人支付
  2445. this.occAsbitems.forEach(e => {
  2446. lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id)
  2447. if (lfind == -1) {
  2448. this.dataTransOpts.tableM.register_check_asbitem.push({
  2449. asbitemId: e.id,
  2450. asbitemName: e.displayName,
  2451. patientRegisterId: this.form.id,
  2452. standardPrice: e.price,
  2453. chargePrice: e.ocCheckTypeDetailPrice,
  2454. payTypeFlag,
  2455. isCharge: "N",
  2456. checkCompleteFlag: '0',
  2457. discount: e.price == 0 ? 100 : Math.floor(10000 * e.ocCheckTypeDetailPrice / e.price) / 100,
  2458. amount: e.ocCheckTypeDetailAmount,
  2459. total: e.ocCheckTypeDetailAmount * e.ocCheckTypeDetailPrice,
  2460. standTotal: e.ocCheckTypeDetailAmount * e.price
  2461. })
  2462. }
  2463. });
  2464. })
  2465. },
  2466. // 获取接害因素 + 检查类别 的组合项目
  2467. getOccAsbitems() {
  2468. return new Promise((resolve, reject) => {
  2469. if (!this.form.ocCheckTypeId || this.form.poisonIds.length == 0) {
  2470. this.occAsbitems = []
  2471. resolve(this.occAsbitems)
  2472. } else {
  2473. let body = {
  2474. ocCheckTypeId: this.form.ocCheckTypeId,
  2475. poisonIds: this.form.poisonIds
  2476. }
  2477. postapi('/api/app/OcCheckTypeDetail/GetOcCheckTypeDetailByOcCheckTypeIdAndPoisonId', body).then(res => {
  2478. if (res.code > -1) {
  2479. this.occAsbitems = res.data
  2480. resolve(this.occAsbitems)
  2481. } else {
  2482. reject(res.message)
  2483. }
  2484. })
  2485. .catch(err => {
  2486. reject(err)
  2487. })
  2488. }
  2489. })
  2490. },
  2491. // 显示预约
  2492. btnWebBooking() {
  2493. this.dataTransOpts.tableS.appoint_patient_register = {}
  2494. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2495. this.dataTransOpts.tableS.appoint_patient_register = {}
  2496. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2497. this.dataTransOpts.plus.WebBooking++
  2498. this.dialogWin.WebBooking = true
  2499. },
  2500. // 显示预约
  2501. btnWebBookingMzak() {
  2502. this.dataTransOpts.tableS.appoint_patient_register = {}
  2503. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2504. this.dataTransOpts.tableS.appoint_patient_register = {}
  2505. this.dataTransOpts.tableM.appoint_register_asbitem = []
  2506. this.dataTransOpts.plus.WebBookingMzak++
  2507. this.dialogWin.WebBookingMzak = true
  2508. },
  2509. // 关闭预约窗口
  2510. async close_dialogWin_WebBooking() {
  2511. // console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
  2512. // console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
  2513. // 没有选中网上预约记录,直接返回,不做任何处理
  2514. let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
  2515. if (!appoint_patient_register.appointPatientRegisterId) return
  2516. // 新增 (个人预约只登记个人的)
  2517. this.dataTransOpts.tableS.patient_register.id = ''
  2518. this.preCustomerOrgId = this.dict.personOrgId
  2519. this.patientRegister.query.customerOrgId = this.dict.personOrgId
  2520. this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId
  2521. this.form.customerOrgId = [this.dict.personOrgId] //单位编号 默认个人
  2522. this.form.customerOrgParentId = this.dict.personOrgId
  2523. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001" //默认单位体检次数
  2524. await this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2525. // "appointPatientRegisterId": "string",
  2526. // "personId": "string",
  2527. // "personName": "string",
  2528. // "idNo": "string",
  2529. // "sexId": "string",
  2530. // "sexName": "string",
  2531. // "maritalStatusId": "string",
  2532. // "maritalStatusName": "string",
  2533. // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2534. // "customerOrgName": "string",
  2535. // "childCustomerOrgName": "string",
  2536. // "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2537. // "customerOrgGroupName": "string",
  2538. // "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2539. // "medicalPackageName": "string",
  2540. // "completeFlag": "string",
  2541. // "appointDate": "2024-06-09T11:46:34.962Z",
  2542. // "remark": "string",
  2543. // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2544. // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2545. // "pregnantFlag": "string",
  2546. // "pregnantFlagName": "string",
  2547. // "height": 0,
  2548. // "weight": 0
  2549. delete appoint_patient_register.medicalCenterId
  2550. Object.assign(this.form, appoint_patient_register,
  2551. {
  2552. patientName: appoint_patient_register.personName,
  2553. completeFlag: '1',
  2554. }
  2555. )
  2556. console.log('this.form', JSON.stringify(this.form))
  2557. // 明细必填项
  2558. // "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2559. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2560. // "standardPrice": 0,
  2561. // "chargePrice": 0,
  2562. // "payTypeFlag": "string",
  2563. // "isCharge": "string",
  2564. // "amount": 0
  2565. // 预约明细数据
  2566. // "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
  2567. // "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
  2568. // "asbitemName": "腹部平片(立位)",
  2569. // "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
  2570. // "itemTypeName": "放射科",
  2571. // "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
  2572. // "standardPrice": 45.00,
  2573. // "chargePrice": 30.50,
  2574. // "payTypeFlag": "\u0000",
  2575. // "isCharge": "N",
  2576. // "amount": 1,
  2577. // "isInMedicalPackage": "N",
  2578. // "itemTypeDisplayOrder": 28,
  2579. // "displayOrder": 1
  2580. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
  2581. this.changeIdNo() // 触发身份证查询档案号
  2582. },
  2583. // 关闭预约窗口--人寿 (团检、个人都可以)
  2584. async close_dialogWin_WebBookingMzak() {
  2585. // console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
  2586. // console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
  2587. // 没有选中网上预约记录,直接返回,不做任何处理
  2588. let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
  2589. if (!appoint_patient_register.appointPatientRegisterId) return
  2590. await this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2591. // "appointPatientRegisterId": "string",
  2592. // "personId": "string",
  2593. // "personName": "string",
  2594. // "idNo": "string",
  2595. // "sexId": "string",
  2596. // "sexName": "string",
  2597. // "maritalStatusId": "string",
  2598. // "maritalStatusName": "string",
  2599. // "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2600. // "customerOrgName": "string",
  2601. // "childCustomerOrgName": "string",
  2602. // "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2603. // "customerOrgGroupName": "string",
  2604. // "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2605. // "medicalPackageName": "string",
  2606. // "completeFlag": "string",
  2607. // "appointDate": "2024-06-09T11:46:34.962Z",
  2608. // "remark": "string",
  2609. // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2610. // "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2611. // "pregnantFlag": "string",
  2612. // "pregnantFlagName": "string",
  2613. // "height": 0,
  2614. // "weight": 0
  2615. delete appoint_patient_register.medicalCenterId
  2616. Object.assign(this.form, appoint_patient_register,
  2617. {
  2618. patientName: appoint_patient_register.personName,
  2619. completeFlag: '1',
  2620. }
  2621. )
  2622. console.log('this.form', JSON.stringify(this.form))
  2623. // 明细必填项
  2624. // "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2625. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  2626. // "standardPrice": 0,
  2627. // "chargePrice": 0,
  2628. // "payTypeFlag": "string",
  2629. // "isCharge": "string",
  2630. // "amount": 0
  2631. // 预约明细数据
  2632. // "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
  2633. // "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
  2634. // "asbitemName": "腹部平片(立位)",
  2635. // "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
  2636. // "itemTypeName": "放射科",
  2637. // "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
  2638. // "standardPrice": 45.00,
  2639. // "chargePrice": 30.50,
  2640. // "payTypeFlag": "\u0000",
  2641. // "isCharge": "N",
  2642. // "amount": 1,
  2643. // "isInMedicalPackage": "N",
  2644. // "itemTypeDisplayOrder": 28,
  2645. // "displayOrder": 1
  2646. this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
  2647. // 触发分组 项目
  2648. if (this.form.customerOrgGroupId) this.changeCustomerOrgGroupId()
  2649. this.changeIdNo() // 触发身份证查询档案号
  2650. },
  2651. btnLabel() {
  2652. if (!this.form.id) {
  2653. this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })
  2654. return
  2655. }
  2656. this.dataTransOpts.refresh.lis_request.M++ //触发检验条码刷新
  2657. this.dataTransOpts.refresh.register_check.M++ //触发检查条码刷新
  2658. this.dialogWin.Label = true
  2659. },
  2660. //回车替代tab键
  2661. enterToTab() {
  2662. this.$nextTick(() => {
  2663. let inputs = document.querySelectorAll("form input"); //用数组可以读取多个标签的元素 //.inline-input
  2664. //// console.log('inputs',inputs);
  2665. // 为每个输入框添加键盘事件监听器
  2666. inputs.forEach((input, i) => {
  2667. input.addEventListener('keydown', (event) => {
  2668. // 如果按下的是回车键
  2669. // // console.log('data-ismultiline',input.getAttribute('data-ismultiline'));
  2670. if (event.keyCode === 13) {
  2671. // 阻止回车键的默认行为(换行)
  2672. event.preventDefault();
  2673. // 如果是身份证,则计算出生与年龄
  2674. let placeholder = input.getAttribute('placeholder')
  2675. if (placeholder == '身份证号') this.changeIdNo()
  2676. // 跳至下一个输入框
  2677. for (let j = i + 1; j < inputs.length; j++) {
  2678. if (inputs[j].getAttribute('disabled') != "disabled") {
  2679. inputs[j].focus();
  2680. break;
  2681. }
  2682. }
  2683. }
  2684. });
  2685. });
  2686. });
  2687. },
  2688. },
  2689. //监听事件
  2690. watch: {
  2691. //人员ID未切换换时 也可以强制刷新数据
  2692. "dataTransOpts.refresh.patient_register.S": {
  2693. // immediate: true,
  2694. async handler(newVal, oldVal) {
  2695. // console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
  2696. if (newVal != oldVal) await this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  2697. }
  2698. },
  2699. //拍照触发
  2700. // "form.photo"(newVal, oldVal) {
  2701. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  2702. // if (newVal != oldVal) {
  2703. // this.getPeoplePhoto(newVal)
  2704. // }
  2705. // },
  2706. //修改单位触发
  2707. // "form.customerOrgId": {
  2708. // // immediate:true,
  2709. // // // deep:true,
  2710. // handler(newVal, oldVal) {
  2711. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  2712. // if (newVal != oldVal) {
  2713. // this.changeCustomerOrgId(newVal)
  2714. // }
  2715. // }
  2716. // },
  2717. // 从体检人员登记列表 点登记,触发
  2718. // 清空查询条件
  2719. "dataTransOpts.plus.clearPatientRegisterQuery": {
  2720. // immediate: true,
  2721. handler(newVal, oldVal) {
  2722. // console.log('从体检人员登记列表 点登记,触发', newVal, oldVal)
  2723. if (newVal != oldVal) {
  2724. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  2725. // console.log('this.preCustomerOrgId', this.preCustomerOrgId)
  2726. }
  2727. }
  2728. },
  2729. },
  2730. };
  2731. </script>
  2732. <style scoped>
  2733. ::v-deep .el-icon-search:before {
  2734. color: #00F;
  2735. }
  2736. ::v-deep .el-select-group__title {
  2737. font-size: 15px;
  2738. background-color: #EEEEEE;
  2739. color: black;
  2740. font-weight: 700;
  2741. }
  2742. .btn {
  2743. margin-top: 5px;
  2744. }
  2745. .commonbutton {
  2746. width: 100px;
  2747. }
  2748. .query {
  2749. margin-left: 10px;
  2750. }
  2751. .querySpan {
  2752. margin-right: 2px;
  2753. }
  2754. </style>