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.

2143 lines
83 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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="peopleIcCard" class="commonbutton">读身份证</el-button>
  14. </div>
  15. <div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '拍照')">
  16. <el-button type="primary" class="commonbutton" @click="photoGrah" icon="el-icon-camera">拍照</el-button>
  17. </div>
  18. </div>
  19. </div>
  20. <div>
  21. <el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium">
  22. <el-row>
  23. <el-col :span="5">
  24. <el-form-item label="单位名称" prop="customerOrgName">
  25. <el-input placeholder="请选择单位" v-model="form.customerOrgName" size="small" disabled>
  26. <el-button slot="append" icon="el-icon-search" @click="dialogOrg = true" style="font-size: 20px;"
  27. :disabled="(form.completeFlag == '3' || isDoctor != '1') ? true : false"></el-button>
  28. </el-input>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="5">
  32. <el-form-item label="条码号" prop="patientRegisterNo">
  33. <el-input v-model="form.patientRegisterNo" disabled size="small"></el-input>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="5">
  37. <el-form-item label="档案号" prop="patientNo">
  38. <el-input v-model="form.patientNo" disabled size="small"></el-input>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="3">
  42. <el-form-item label="体检次数" prop="medicalTimes">
  43. <el-input v-model="form.medicalTimes" disabled size="small"></el-input>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :span="3">
  47. <el-form-item label="性别" prop="sexId" label-width="50px">
  48. <el-select v-model="form.sexId" placeholder="请选择" size="small" filterable
  49. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'">
  50. <el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id">
  51. </el-option>
  52. </el-select>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :span="3">
  56. </el-col>
  57. </el-row>
  58. <el-row>
  59. <el-col :span="5">
  60. <el-form-item label="姓名" prop="patientName">
  61. <el-input id="patientName" v-model="form.patientName" @change="Query(form.patientName)" size="small"
  62. autocomplete="off"></el-input>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="5">
  66. <el-form-item label="身份证号" prop="idNo">
  67. <el-input v-model="form.idNo" placeholder="身份证号" @change="changeIdNo" size="small"></el-input>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :span="5">
  71. <el-form-item label="出生日期" prop="birthDate">
  72. <!--
  73. <input type="date" v-model="form.birthDate" size="small"
  74. :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;'"/>
  75. -->
  76. <el-date-picker v-model="form.birthDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
  77. placeholder="出生日期" :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'"
  78. @change="changeBirthDate" prefix-icon="" size="small" />
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="3">
  82. <el-form-item label="年龄" prop="age">
  83. <el-input v-model="form.age" size="small" @change="changeAge"></el-input>
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="3">
  87. <el-form-item label="婚姻" prop="maritalStatusId" label-width="50px">
  88. <el-select v-model="form.maritalStatusId" placeholder="请选择" size="small" filterable
  89. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'">
  90. <el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName"
  91. :value="item.id">
  92. </el-option>
  93. </el-select>
  94. </el-form-item>
  95. </el-col>
  96. <el-col :span="3" />
  97. </el-row>
  98. <el-row>
  99. <el-col :span="5">
  100. <el-form-item label="手机号" prop="mobileTelephone">
  101. <el-input v-model="form.mobileTelephone" size="small"></el-input>
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="5">
  105. <el-form-item label="电话" prop="telephone">
  106. <el-input v-model="form.telephone" size="small"></el-input>
  107. </el-form-item>
  108. </el-col>
  109. <el-col :span="5">
  110. <el-form-item label="邮箱" prop="email">
  111. <el-input v-model="form.email" size="small"></el-input>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="3">
  115. <el-form-item label="邮编" prop="postalCode">
  116. <el-input v-model="form.postalCode" size="small"></el-input>
  117. </el-form-item>
  118. </el-col>
  119. <el-col :span="3">
  120. <el-form-item label="籍贯" prop="birthPlaceId" label-width="50px">
  121. <el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
  122. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" size="small">
  123. <el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
  124. :value="item.id" />
  125. </el-select>
  126. </el-form-item>
  127. </el-col>
  128. <el-col :span="3" />
  129. </el-row>
  130. <el-row>
  131. <el-col :span="10">
  132. <el-form-item label="地址" prop="address">
  133. <el-input v-model="form.address" size="small"></el-input>
  134. </el-form-item>
  135. </el-col>
  136. <el-col :span="5">
  137. <el-form-item label="人员类别" prop="personnelTypeId">
  138. <el-select v-model="form.personnelTypeId" placeholder="请选择" filterable clearable
  139. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  140. <el-option v-for="item in dict.personnelType" :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-form-item label="性激素期" prop="sexHormoneTermId">
  147. <el-select v-model="form.sexHormoneTermId" placeholder="请选择" filterable clearable size="small"
  148. :disabled="isComplete">
  149. <el-option v-for="item in dict.sexHormoneTerm" :key="item.id" :label="item.displayName"
  150. :value="item.id">
  151. </el-option>
  152. </el-select>
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="3">
  156. <el-form-item label="民族" prop="nationId" label-width="50px">
  157. <el-select v-model="form.nationId" placeholder="请选择" filterable clearable default-first-option
  158. :filter-method="filterMethod" :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'"
  159. size="small">
  160. <el-option v-for="item in nation" :key="item.id" :label="item.displayName" :value="item.id" />
  161. </el-select>
  162. </el-form-item>
  163. </el-col>
  164. <el-col :span="3" />
  165. </el-row>
  166. <el-row>
  167. <el-col :span="5">
  168. <el-form-item label="体检类别" prop="medicalTypeId">
  169. <el-select v-model="form.medicalTypeId" placeholder="请选择" filterable clearable
  170. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  171. <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName"
  172. :value="item.id" />
  173. </el-select>
  174. </el-form-item>
  175. </el-col>
  176. <el-col :span="5">
  177. <el-form-item label="工卡号" prop="jobCardNo">
  178. <el-input v-model="form.jobCardNo" size="small"></el-input>
  179. </el-form-item>
  180. </el-col>
  181. <el-col :span="5">
  182. <el-form-item label="体检卡号" prop="medicalCardNo">
  183. <el-input v-model="form.medicalCardNo" size="small"></el-input>
  184. </el-form-item>
  185. </el-col>
  186. <el-col :span="3">
  187. <el-form-item label="职务" prop="jobPost">
  188. <el-input v-model="form.jobPost" size="small"></el-input>
  189. </el-form-item>
  190. </el-col>
  191. <el-col :span="3">
  192. <el-form-item label="职称" prop="jobTitle" label-width="50px">
  193. <el-input v-model="form.jobTitle" size="small"
  194. :style="'width:' + Math.floor((window.pageWidth - 630) / 8) + 'px;'" />
  195. </el-form-item>
  196. </el-col>
  197. <el-col :span="3">
  198. <el-form-item label="介绍人" prop="salesman">
  199. <el-input v-model="form.salesman" size="small"></el-input>
  200. </el-form-item>
  201. </el-col>
  202. </el-row>
  203. <el-row>
  204. <el-col :span="5">
  205. <el-form-item label="体检中心" prop="medicalCenterId">
  206. <el-select v-model="form.medicalCenterId" placeholder="请选择" filterable :disabled="peisid ? true : false"
  207. size="small" :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'">
  208. <el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName"
  209. :value="item.id">
  210. </el-option>
  211. </el-select>
  212. </el-form-item>
  213. </el-col>
  214. <el-col :span="4">
  215. <el-form-item label="单位体检次数" prop="isVip" label-width="110px">
  216. <el-select :class="form.customerOrgId == dict.personOrgId ? '' : 'enterToTab'"
  217. v-model="form.customerOrgRegisterId" placeholder="次数" size="small"
  218. :disabled="form.customerOrgId == dict.personOrgId || form.completeFlag == '3'"
  219. :style="'width:' + Math.floor((window.pageWidth - 654) / 6) + 'px;'" @change="changeMedicalTimes"
  220. value-key="id">
  221. <el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
  222. :value="item.id" :disabled="item.isComplete == 'Y'" />
  223. </el-select>
  224. </el-form-item>
  225. </el-col>
  226. <el-col :span="4">
  227. <el-form-item label="门诊号" prop="hisPatientId">
  228. <el-input v-model="form.hisPatientId" size="small" disabled />
  229. </el-form-item>
  230. </el-col>
  231. <el-col :span="2">
  232. <el-form-item label="电话随访" prop="isPhoneFollow">
  233. <!--
  234. <el-radio v-model="form.isPhoneFollow" label="Y"></el-radio>
  235. <el-radio v-model="form.isPhoneFollow" label="N"></el-radio>
  236. -->
  237. <el-checkbox v-model="form.isPhoneFollow" true-label="Y" false-label="N" />
  238. </el-form-item>
  239. </el-col>
  240. <el-col :span="2">
  241. <el-form-item label="VIP" prop="isVip" label-width="50px">
  242. <!--
  243. <el-radio v-model="form.isVip" label="Y"></el-radio>
  244. <el-radio v-model="form.isVip" label="N"></el-radio>
  245. -->
  246. <el-checkbox v-model="form.isVip" true-label="Y" false-label="N" />
  247. </el-form-item>
  248. </el-col>
  249. <el-col :span="2">
  250. <el-form-item label="隐藏姓名" prop="isNameHide">
  251. <!--
  252. <el-radio v-model="form.isNameHide" label="Y"></el-radio>
  253. <el-radio v-model="form.isNameHide" label="N"></el-radio>
  254. -->
  255. <el-checkbox v-model="form.isNameHide" true-label="Y" false-label="N" />
  256. </el-form-item>
  257. </el-col>
  258. <el-col :span="2">
  259. <el-form-item label="锁住" prop="isLock" label-width="50px">
  260. <!--
  261. <el-radio v-model="form.isLock" label="Y"></el-radio>
  262. <el-radio v-model="form.isLock" label="N"></el-radio>
  263. -->
  264. <el-checkbox v-model="form.isLock" true-label="Y" false-label="N" />
  265. </el-form-item>
  266. </el-col>
  267. <el-col :span="3">
  268. <el-form-item label="体检开始" prop="isMedicalStart">
  269. <el-select v-model="form.isMedicalStart" placeholder="请选择" disabled size="small">
  270. <el-option label="是" value="Y" />
  271. <el-option label="否" value="N" />
  272. </el-select>
  273. </el-form-item>
  274. </el-col>
  275. </el-row>
  276. <el-row>
  277. <el-col :span="5">
  278. <el-form-item label="分组" prop="customerOrgGroupId">
  279. <el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable
  280. @change="changeCustomerOrgGroupId" :disabled="displayGroup"
  281. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  282. <el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
  283. :value="item.id" />
  284. </el-select>
  285. </el-form-item>
  286. </el-col>
  287. <el-col :span="5">
  288. <el-form-item label="套餐" prop="medicalPackageId">
  289. <el-select v-model="form.medicalPackageId" placeholder="请选择" filterable clearable
  290. @change="changeMedicalPackageId" :disabled="displayPackage"
  291. :style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" size="small">
  292. <el-option v-for="item in dict.medicalPackage" :key="item.id" :label="item.displayName"
  293. :value="item.id" />
  294. </el-select>
  295. </el-form-item>
  296. </el-col>
  297. <el-col :span="11">
  298. <el-form-item label="备注" prop="remark">
  299. <el-input v-model="form.remark" type="textarea" :rows="1" placeholder="请输入备注" size="small"></el-input>
  300. </el-form-item>
  301. </el-col>
  302. <el-col :span="3">
  303. <el-form-item label="状态" prop="completeFlag" label-width="50px">
  304. <el-select v-model="form.completeFlag" placeholder="请选择"
  305. :disabled="(form.completeFlag == '2' || form.completeFlag == '3') ? true : false" size="small">
  306. <div v-if="form.completeFlag == '2' || form.completeFlag == '3'">
  307. <el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName"
  308. :value="item.id">
  309. </el-option>
  310. </div>
  311. <div v-else>
  312. <el-option label="预登记" value="0" />
  313. <el-option label="正式登记" value="1" />
  314. </div>
  315. </el-select>
  316. </el-form-item>
  317. </el-col>
  318. </el-row>
  319. <!--青藏公司 start-->
  320. <el-row v-if="LocalConfig.patientRegister.edit == 'qztl'">
  321. <el-col :span="4">
  322. <el-form-item label="高原/健康">
  323. <el-select v-model="form.qztlType" placeholder="请选择">
  324. <el-option v-for="item in dict.qztlType" :key="item.id" :label="item.displayName" :value="item.id" />
  325. </el-select>
  326. </el-form-item>
  327. </el-col>
  328. <el-col :span="2">
  329. <el-form-item label="普速">
  330. <el-checkbox v-model="form.qztlIsCw" true-label="Y" false-label="N" />
  331. </el-form-item>
  332. </el-col>
  333. <el-col :span="2">
  334. <el-form-item label="从业">
  335. <el-checkbox v-model="form.qztlIsCy" true-label="Y" false-label="N" />
  336. </el-form-item>
  337. </el-col>
  338. <el-col :span="2">
  339. <el-form-item label="高铁">
  340. <el-checkbox v-model="form.qztlIsGt" true-label="Y" false-label="N" />
  341. </el-form-item>
  342. </el-col>
  343. <el-col :span="2">
  344. <el-form-item label="行车">
  345. <el-checkbox v-model="form.qztlIsMain" true-label="Y" false-label="N" />
  346. </el-form-item>
  347. </el-col>
  348. <el-col :span="2">
  349. <el-form-item label="职害">
  350. <el-checkbox v-model="form.qztlIsWh" true-label="Y" false-label="N" />
  351. </el-form-item>
  352. </el-col>
  353. <el-col :span="2">
  354. <el-form-item label="复检">
  355. <el-checkbox v-model="form.qztlIsFj" true-label="Y" false-label="N" />
  356. </el-form-item>
  357. </el-col>
  358. <el-col :span="2">
  359. <el-form-item label="导入">
  360. <el-checkbox v-model="form.isQztlImport" true-label="Y" false-label="N" />
  361. </el-form-item>
  362. </el-col>
  363. <el-col :span="2">
  364. <el-form-item label="上传">
  365. <el-checkbox v-model="form.uploadQztlFlag" true-label="Y" false-label="N" />
  366. </el-form-item>
  367. </el-col>
  368. <el-col :span="4">
  369. <el-form-item label="计划" prop="planuserid">
  370. <el-input v-model="form.planuserid" size="small" />
  371. </el-form-item>
  372. </el-col>
  373. </el-row>
  374. <!--青藏公司 end-->
  375. <el-row>
  376. <el-col :span="6">
  377. <el-form-item label="创建人员">
  378. <el-input v-model="form.creatorName" disabled size="small"></el-input>
  379. </el-form-item>
  380. </el-col>
  381. <el-col :span="6">
  382. <el-form-item label="创建时间">
  383. <el-input :value="form.creationTime
  384. ? moment(form.creationTime).format('yyyy-MM-DD')
  385. : ''
  386. " disabled size="small"></el-input>
  387. </el-form-item>
  388. </el-col>
  389. <el-col :span="6">
  390. <el-form-item label="修改人员">
  391. <el-input v-model="form.lastModifierName" disabled size="small"></el-input>
  392. </el-form-item>
  393. </el-col>
  394. <el-col :span="6">
  395. <el-form-item label="修改时间">
  396. <el-input :value="form.lastModificationTime
  397. ? moment(form.lastModificationTime).format('yyyy-MM-DD')
  398. : ''
  399. " disabled size="small"></el-input>
  400. </el-form-item>
  401. </el-col>
  402. </el-row>
  403. </el-form>
  404. <el-image
  405. :style="'position: absolute;top:70px;right:' + (100 + Math.floor((window.pageWidth - 680) / 24)) + 'px; width: 130px; height: 140px;'"
  406. :src="peoplePhoto">
  407. <div slot="placeholder" class="image-slot">
  408. 加载中<span class="dot">...</span>
  409. </div>
  410. </el-image>
  411. </div>
  412. <!--人员登记组合项目明细 register_check_asbitem-->
  413. <div>
  414. <PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :refreshFormId="refreshFormId" />
  415. </div>
  416. </div>
  417. <div style="margin-left: 10px;">
  418. <div v-show="checkPagePriv(pagePriv.privs, '新增')">
  419. <el-button type="primary" class="commonbutton" @click="btnAdd">新增</el-button>
  420. </div>
  421. <div v-show="checkPagePriv(pagePriv.privs, '复制新增')" class="btn">
  422. <el-button type="primary" class="commonbutton" @click="rdCopy">复制新增</el-button>
  423. </div>
  424. <div v-show="checkPagePriv(pagePriv.privs, '保存')" class="btn">
  425. <el-button type="success" class="commonbutton" @click="btnSubmit('form', true)">保存</el-button>
  426. </div>
  427. <div v-show="checkPagePriv(pagePriv.privs, '检验单申请')" class="btn">
  428. <el-button type="primary" class="commonbutton" @click="lisRequest">检验单申请</el-button>
  429. </div>
  430. <div v-show="checkPagePriv(pagePriv.privs, '条码打印')" class="btn">
  431. <el-button type="primary" class="commonbutton" @click="labelPrint(false)" :disabled="printing">条码打印</el-button>
  432. </div>
  433. <div v-show="checkPagePriv(pagePriv.privs, '条码补打')" class="btn">
  434. <el-button type="danger" class="commonbutton" @click="reLisRequest">条码补打</el-button>
  435. </div>
  436. <div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="btn">
  437. <el-button type="primary" class="commonbutton" @click="guidePrint('0001', false)"
  438. :disabled="printing">指引单打印</el-button>
  439. </div>
  440. <!--
  441. <div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="btn">
  442. <el-button type="primary" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
  443. </div>
  444. -->
  445. <div v-show="checkPagePriv(pagePriv.privs, '手动合并项目')" class="btn">
  446. <el-button type="danger" class="commonbutton" @click="reMergeAsbitem">手动合并项目</el-button>
  447. </div>
  448. <div v-show="checkPagePriv(pagePriv.privs, '全个人支付')" style="margin-top: 30px;">
  449. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('0')">全个人支付</el-button>
  450. </div>
  451. <div v-show="checkPagePriv(pagePriv.privs, '全单位支付')" class="btn">
  452. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('1')">全单位支付</el-button>
  453. </div>
  454. <div v-show="checkPagePriv(pagePriv.privs, '全免费')" class="btn">
  455. <el-button type="primary" class="commonbutton" @click="btnPayTypeFlag('2')">全免费</el-button>
  456. </div>
  457. <div v-show="checkPagePriv(pagePriv.privs, '收费')" class="btn">
  458. <el-button type="success" class="commonbutton" @click="toCharge(form)" :disabled="!form.id">收费</el-button>
  459. </div>
  460. <div v-show="checkPagePriv(pagePriv.privs, '收费申请')" class="btn">
  461. <el-button type="success" class="commonbutton" @click="chargeRequest(form)"
  462. :disabled="!form.id">收费申请</el-button>
  463. </div>
  464. <!--
  465. <div class="btn">
  466. <el-button type="success" class="commonbutton" @click="btnTest">test</el-button>
  467. </div>
  468. -->
  469. </div>
  470. </div>
  471. <!--组件弹窗-->
  472. <div>
  473. <!-- 人员档案列表 -->
  474. <el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800px" :show-close="false"
  475. :close-on-click-modal="false" :append-to-body="true">
  476. <el-table :data="patientList" border width="800" height="480" row-key="id" size="small"
  477. class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" @row-dblclick="patientDblclick"
  478. ref="patientList">
  479. <el-table-column type="index" width="30" />
  480. <el-table-column prop="patientNo" label="档案号" />
  481. <el-table-column prop="lastTime" label="末次体检" width="100">
  482. <template slot-scope="scope">
  483. <div v-if="scope.row.lastTime">
  484. {{ moment(scope.row.lastTime).format("yyyy-MM-DD") }}
  485. </div>
  486. </template>
  487. </el-table-column>
  488. <el-table-column prop="medicalTimes" label="体检次数" />
  489. <el-table-column prop="displayName" label="姓名" />
  490. <el-table-column prop="sexId" label="性别">
  491. <template slot-scope="scope">
  492. <div>
  493. {{ dddw(dict.sex, "id", scope.row.sexId, "displayName") }}
  494. </div>
  495. </template>
  496. </el-table-column>
  497. <el-table-column prop="maritalStatusId" label="婚姻">
  498. <template slot-scope="scope">
  499. <div>
  500. {{ dddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  501. </div>
  502. </template>
  503. </el-table-column>
  504. <el-table-column prop="birthDate" label="出生日期" width="100">
  505. <template slot-scope="scope">
  506. <div v-if="scope.row.birthDate">
  507. {{ moment(scope.row.birthDate).format("yyyy-MM-DD") }}
  508. </div>
  509. </template>
  510. </el-table-column>
  511. <el-table-column prop="nationId" label="民族">
  512. <template slot-scope="scope">
  513. <div>
  514. {{ dddw(dict.nation, "id", scope.row.nationId, "displayName") }}
  515. </div>
  516. </template>
  517. </el-table-column>
  518. <el-table-column prop="idNo" label="身份证号" />
  519. <el-table-column prop="telephone" label="电话" />
  520. <el-table-column prop="mobileTelephone" label="手机号" />
  521. </el-table>
  522. <span slot="footer" class="dialog-footer">
  523. <el-button class="commonbutton" @click="dialogVisible = false" style="width:90px;">取消</el-button>
  524. <el-button class="commonbutton" type="primary" @click="choosePatient" style="width:90px;">确定</el-button>
  525. </span>
  526. </el-dialog>
  527. <el-dialog title="选择单位" :visible.sync="dialogOrg" width="800px" :close-on-click-modal="false"
  528. :append-to-body="true">
  529. <div style="height: 320px;">
  530. <el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll" style="width:400px;"
  531. filterable popper-class="example" :show-all-levels="false"
  532. :props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" size="small">
  533. </el-cascader>
  534. </div>
  535. <span slot="footer" class="dialog-footer">
  536. <el-button type="primary" @click="btnOkOrg">确定</el-button>
  537. <el-button @click="dialogOrg = false">关闭</el-button>
  538. </span>
  539. </el-dialog>
  540. <!-- 拍照openCamera 网页模式已废弃
  541. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600"
  542. :close-on-click-modal="false" :append-to-body="true">
  543. <Camera :id="form.id" />
  544. </el-dialog>
  545. -->
  546. <!-- 检验条码补打 -->
  547. <el-dialog title="检验条码补打" :visible.sync="patientRegister.lisRequestVisble" width="600px" height="400"
  548. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  549. <LisRequest :id="form.id" :brushTimes="brushTimes" />
  550. </el-dialog>
  551. <!-- 手动合并项目 -->
  552. <el-dialog title="手动合并项目" :visible.sync="patientRegister.mergeAsbitemVisble" width="600px" height="400"
  553. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  554. <MergeAsbitem :id="form.id" :medicalCenterId="form.medicalCenterId" :brushTimes="brushTimes" />
  555. </el-dialog>
  556. <!-- 收费 -->
  557. <el-dialog title="" :visible.sync="dialogWin.charge" :close-on-click-modal="false" :append-to-body="true" fullscreen
  558. @close="closeDialogCharge">
  559. <div style="margin-top: -30px;">
  560. <Charge :patientRegisterNo="chargePatientRegisterNo" />
  561. </div>
  562. </el-dialog>
  563. <!-- 收费申请 -->
  564. <el-dialog title="收费申请" :visible.sync="dialogWin.AsbChargeRequest" width="800px" :show-close="false"
  565. :close-on-click-modal="false" :append-to-body="true" @close="closeDialogCharge">
  566. <AsbChargeRequest :patientRegister="form" />
  567. </el-dialog>
  568. </div>
  569. </div>
  570. </template>
  571. <script>
  572. import moment from "moment";
  573. import { mapState, mapActions } from "vuex";
  574. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  575. import { getTreeNode } from "../../utlis/tree"
  576. import {
  577. getPagePriv, checkPagePriv, objCopy, setNull, dddw, checkIDCode, parseID,
  578. birthdayToAge, ageToBirthday, deepCopy, arrayFilter, arrayReduce, parsIcCardtoLocal,
  579. arrayExistObj
  580. } from "../../utlis/proFunc";
  581. import { getTreePids } from "../../utlis/tree";
  582. import { photoParse, savePeoplePhoto, } from "../../utlis/proApi";
  583. import Camera from "./Camera.vue";
  584. import PatientRegisterItem from "./PatientRegisterItem.vue";
  585. import LisRequest from "./LisRequest.vue";
  586. import MergeAsbitem from "./MergeAsbitem.vue";
  587. import AsbChargeRequest from "./AsbChargeRequest.vue";
  588. import Charge from "../../views/charge/charge.vue";
  589. import PatientRegisterEditQuery from "../../components/patientRegister/PatientRegisterEditQuery.vue";
  590. export default {
  591. components: {
  592. Camera,
  593. LisRequest,
  594. MergeAsbitem,
  595. PatientRegisterItem,
  596. Charge,
  597. AsbChargeRequest,
  598. PatientRegisterEditQuery
  599. },
  600. // isDoctor: '0:标准人员登记/1:医生诊台登记(可修改单位)'
  601. props: ['isDoctor', 'patientRegisterId', 'editTimes', 'refreshRegister', 'refFuncSetData'],
  602. data() {
  603. return {
  604. pagePriv: {
  605. routeUrlorPageName: 'PatientRegisterEdit', //当前页面归属路由或归属页面权限名称
  606. privs: [] // 页面权限
  607. },
  608. LocalConfig: {
  609. patientRegister: {
  610. editMode: 'standard', //standard/qztl 人员登记组件版本
  611. editHeight: 0, // 相较与标准版,选组合项目组件,减少高度
  612. immediateToHisCharge: true, // 人员登记保存后,立即发送收费申请
  613. printGuideLabel: ["guide", "pacs", "lis"], // 保存后打印指引单与条码
  614. },
  615. },
  616. brushTimes: 0,
  617. peisid: null,
  618. peoplePhoto: '',
  619. preCustomerOrgId: '', // 上一个人的体检单位,只是在本组件点新增时才用到
  620. form: {
  621. registerManType: 'customer', //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员
  622. id: "", //id
  623. photo: '', //照片
  624. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  625. patientNo: "", //档案号
  626. customerOrgId: ["00000000-0000-0000-0000-000000000001"], //单位编号 默认个人
  627. customerOrgParentId: "00000000-0000-0000-0000-000000000001",
  628. customerOrgName: "个人体检",
  629. customerOrgRegisterId: "00000000-0000-0000-0000-000000000001", //默认单位体检次数
  630. customerOrgGroupId: null, //分组
  631. medicalPackageId: null, //套餐
  632. patientName: "", //姓名
  633. birthDate: null, //日期型
  634. sexId: "U", //性别 默认未知U
  635. age: null, //年龄
  636. jobCardNo: "", //工卡号
  637. medicalCardNo: "", //体检卡号
  638. maritalStatusId: "9", //婚姻状况 默认未知
  639. medicalTypeId: null, //体检类别
  640. personnelTypeId: null, //人员类别
  641. jobPost: "", //职务
  642. jobTitle: "", //职称
  643. salesman: "", //介绍人
  644. sexHormoneTermId: null, //性激素期限
  645. isNameHide: "N", //隐藏姓名
  646. isPhoneFollow: "N", //电话随访
  647. isVip: "N", //vip客户
  648. remark: "", //
  649. isLock: "N", //是否锁住
  650. completeFlag: "1", //完成标志 0:预登记,1:正式登记(未检),2:部份已检,3:已总检 【创建编辑时不操作】
  651. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  652. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  653. medicalTimes: 1, //条码号 【创建编辑时不操作】
  654. medicalCenterId: null, //体检中心
  655. address: "", //地址
  656. email: "", //email
  657. idNo: "", //身份证号
  658. telephone: "", //电话
  659. mobileTelephone: "", //手机号
  660. nationId: null, //民族编号
  661. birthPlaceId: null, //籍惯(出生地)
  662. postalCode: "", //邮编
  663. creatorId: null,
  664. creationTime: "",
  665. lastModificationTime: "",
  666. lastModifierId: null,
  667. isMaxMedicalTimes: 'N',
  668. medicalStartDate: null,
  669. hisPatientId: '', //对接 hisid
  670. registerCheckAsbitems: [], //所选组合项目明细
  671. qztlType: '0', // 高原/健康
  672. qztlIsCw: 'N', // 普速
  673. qztlIsCy: 'N', // 从业
  674. qztlIsGt: 'N', // 高铁
  675. qztlIsMain: 'N', // 行车
  676. qztlIsWh: 'N', // 职害
  677. qztlIsFj: 'N', // 复检
  678. isQztlImport: 'N', // 导入
  679. uploadQztlFlag: 'N', // 上传
  680. planuserid: '', // 计划人
  681. }, //单位 记录 目前新增与更新是一致
  682. formInit: {}, //表单初始化
  683. customerOrgRegisterList: [], //单位体检次数列表
  684. defaultNull: [
  685. "customerOrgId",
  686. "customerOrgGroupId",
  687. "medicalPackageId",
  688. "birthDate",
  689. "age",
  690. "maritalStatusId",
  691. "medicalTypeId",
  692. "personnelTypeId",
  693. "sexHormoneTermId",
  694. "medicalCenterId",
  695. "nationId",
  696. "birthPlaceId",
  697. ], //一般uuid字段为空时,需设置为null值
  698. rules: {
  699. customerOrgId: [
  700. { required: true, message: "请填写单位", trigger: "blur" },
  701. ],
  702. patientName: [
  703. { required: true, message: "请填写姓名", trigger: "blur" },
  704. ],
  705. medicalCenterId: [
  706. { required: true, message: "请填写体检中心", trigger: "blur" },
  707. ],
  708. },
  709. dialogVisible: false,
  710. patientList: [], //人员列表(用于判断人员多次体检)
  711. patientChoosed: {}, //查重选中的人员
  712. registerVisible: false,
  713. patientRegisters: [],
  714. registerChoosed: {},
  715. dialogCamera: false, //拍照组件
  716. chargePatientRegisterNo: '', //对哪个条码客户收费
  717. //人员登记,组合项目明细操作相关参数
  718. prAsbOpraOpts: {
  719. formId: '', //form.id为空时,明细保存取此formId
  720. copyNew: 0, //触发复制新增
  721. payTypeFlag: '', //触发调整支付方式
  722. prAsbSave: 0, //触发组合项目明细保存
  723. prAsbQuery: 0,//触发组合项目明细查询,比如收费后,刷新收费状态
  724. prAsbGroup: 0, //触发分组更换
  725. prAsbPackage: 0, //触发套餐更换
  726. },
  727. nation: [], //
  728. dialogOrg: false,
  729. printing: false, // 是否打印中,控制一次只能有一个任务
  730. };
  731. },
  732. created() {
  733. //获取用户当前页面的权限
  734. let userPriv = window.sessionStorage.getItem('userPriv')
  735. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  736. try {
  737. let LocalConfig = JSON.parse(window.localStorage.getItem('LocalConfig'))
  738. if (LocalConfig && LocalConfig.patientRegister) {
  739. if (LocalConfig.patientRegister.edit) this.LocalConfig.patientRegister.edit = LocalConfig.patientRegister.edit
  740. if (LocalConfig.patientRegister.editHeight) this.LocalConfig.patientRegister.editHeight = LocalConfig.patientRegister.editHeight
  741. if (LocalConfig.patientRegister.immediateToHisCharge) this.LocalConfig.patientRegister.immediateToHisCharge = LocalConfig.patientRegister.immediateToHisCharge
  742. if (LocalConfig.patientRegister.printGuideLabel) this.LocalConfig.patientRegister.printGuideLabel = deepCopy(LocalConfig.patientRegister.printGuideLabel)
  743. }
  744. } catch (error) {
  745. console.log("window.localStorage.getItem('LocalConfig')", error)
  746. }
  747. this.formInit = deepCopy(this.form)
  748. // 初始化字典数据
  749. this.dictInit()
  750. },
  751. //挂载完成
  752. mounted() {
  753. this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  754. // 表单中 回车 代替 tab
  755. this.enterToTab();
  756. },
  757. computed: {
  758. ...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "customerOrg", "projPriv"]),
  759. //是否总检(已总检则不允许修改套餐与分组)
  760. isComplete() {
  761. return this.form.completeFlag == '3' ? true : false;
  762. },
  763. // 套餐 disabled 如完成体检亦不允许编辑
  764. displayPackage() {
  765. let isPersonOrgId = true
  766. if (!this.isComplete) {
  767. if (!this.form.customerOrgId) return false
  768. if (typeof this.form.customerOrgId == 'string') {
  769. if (this.form.customerOrgId == this.dict.personOrgId) isPersonOrgId = false
  770. } else {
  771. if (this.form.customerOrgId[this.form.customerOrgId.length - 1] == this.dict.personOrgId) isPersonOrgId = false
  772. }
  773. }
  774. return isPersonOrgId
  775. },
  776. // 分组 disabled 如完成体检亦不允许编辑
  777. displayGroup() {
  778. let isPersonOrgId = true
  779. if (!this.isComplete) {
  780. if (!this.form.customerOrgId) return isPersonOrgId
  781. if (typeof this.form.customerOrgId == 'string') {
  782. if (this.form.customerOrgId != this.dict.personOrgId) isPersonOrgId = false
  783. } else {
  784. if (this.form.customerOrgId[this.form.customerOrgId.length - 1] != this.dict.personOrgId) isPersonOrgId = false
  785. }
  786. }
  787. return isPersonOrgId
  788. },
  789. },
  790. methods: {
  791. ...mapActions(['getPatientRegisterAbs']),
  792. dddw, moment, checkPagePriv,
  793. btnTest() {
  794. // console.log('form', this.form)
  795. },
  796. //数据初始化
  797. dictInit() {
  798. //性别(仅档案用)
  799. getapi("/api/app/sex").then((res) => {
  800. if (res.code == 1) {
  801. this.dict.sex = res.data;
  802. }
  803. });
  804. //适用性别
  805. getapi("/api/app/for-sex").then((res) => {
  806. if (res.code == 1) {
  807. this.dict.forSex = res.data;
  808. }
  809. });
  810. //体检中心
  811. getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
  812. (res) => {
  813. if (res.code == 1) {
  814. this.dict.organization = res.data;
  815. }
  816. }
  817. );
  818. //体检单位
  819. // getapi("/api/app/customer-org/in-filter").then((res) => {
  820. // if (res.code == 1) {
  821. // this.dict.customerOrg = res.data;
  822. // }
  823. // });
  824. //体检类别
  825. getapi("/api/app/medical-type/in-filter").then((res) => {
  826. if (res.code == 1) {
  827. this.dict.medicalType = res.data;
  828. }
  829. });
  830. //人员类别
  831. getapi("/api/app/personnel-type/in-filter").then((res) => {
  832. if (res.code == 1) {
  833. this.dict.personnelType = res.data;
  834. }
  835. });
  836. //婚姻状况
  837. getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
  838. if (res.code == 1) {
  839. this.dict.maritalStatus = res.data;
  840. }
  841. });
  842. //性激素期
  843. getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
  844. if (res.code == 1) {
  845. this.dict.sexHormoneTerm = res.data;
  846. }
  847. });
  848. //民族
  849. getapi("/api/app/nation/in-filter").then((res) => {
  850. if (res.code != -1) {
  851. this.dict.nation = res.data;
  852. this.nation = deepCopy(res.data)
  853. }
  854. });
  855. //籍惯 ,出生地
  856. getapi("/api/app/birth-place/in-filter").then((res) => {
  857. if (res.code == 1) {
  858. this.dict.birthPlace = res.data;
  859. }
  860. });
  861. //套餐
  862. postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
  863. if (res.code == 1) {
  864. this.dict.medicalPackage = res.data;
  865. }
  866. });
  867. //支付方式
  868. getapi("/api/app/pay-mode").then((res) => {
  869. if (res.code == 1) {
  870. this.dict.payMode = res.data;
  871. }
  872. });
  873. //项目类别 树结构
  874. // getapi("/api/app/item-type/by-code-all").then((res) => {
  875. // if (res.code != -1) {
  876. // this.dict.itemTypeTree = res.data;
  877. // tcdate(this.dict.itemTypeTree);
  878. // }
  879. // });
  880. // postapi("/api/app/asbitem/GetBasicList",{isFilterActive:'Y'}).then((res) => {
  881. // if (res.code != -1) {
  882. // this.dict.asbItemAll = res.data;
  883. // }
  884. // });
  885. // // console.log("dict", this.dict);
  886. },
  887. // 确定选中企业
  888. btnOkOrg() {
  889. let customerOrgId = ''
  890. this.changeCustomerOrgId(this.form.customerOrgId)
  891. if (Array.isArray(this.form.customerOrgId)) {
  892. this.form.customerOrgParentId = this.form.customerOrgId[0]
  893. customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  894. } else {
  895. this.form.customerOrgParentId = this.form.customerOrgId
  896. customerOrgId = this.form.customerOrgId
  897. }
  898. let node = getTreeNode(this.patientRegister.customerOrgTreeAll, "treeChildren", "id", customerOrgId)
  899. if (node) this.form.customerOrgName = node.displayName
  900. this.dialogOrg = false
  901. },
  902. // 获取登记信息 初始form表单数据
  903. async initFormData(patientRegisterId) {
  904. this.peisid = window.sessionStorage.getItem('peisid');
  905. let customerOrgId, customerOrgName, customerOrgParentId
  906. if (this.patientRegister.query.customerOrgId) {
  907. customerOrgParentId = this.patientRegister.query.CustomerOrgParentId
  908. customerOrgId = this.patientRegister.query.customerOrgId
  909. customerOrgName = this.patientRegister.query.customerOrgName
  910. } else {
  911. customerOrgParentId = this.form.customerOrgParentId
  912. customerOrgId = this.form.customerOrgId
  913. customerOrgName = this.form.customerOrgName
  914. }
  915. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  916. if (!patientRegisterId) { //添加
  917. this.peoplePhoto = '' // 清掉照片
  918. objCopy(this.formInit, this.form);
  919. this.form.registerCheckAsbitems = []
  920. this.form.medicalCenterId = this.peisid; //体检中收
  921. this.form.customerOrgId = customerOrgId //体检单位
  922. this.form.customerOrgParentId = customerOrgParentId //体检父单位
  923. this.form.customerOrgName = customerOrgName
  924. this.handleFormData()
  925. } else {
  926. // let res = await getapi(`/api/app/patient-register/${patientRegisterId}`)
  927. postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId }).then(res => {
  928. if (res.code > -1) {
  929. // this.form = res.data 这种方式,会造成 checkbox 值变化不响应,故取消
  930. this.form = res.data
  931. this.handleFormData()
  932. }
  933. })
  934. }
  935. },
  936. handleFormData() {
  937. this.getPeoplePhoto(this.form.photo)
  938. // this.dataTransOpts.refresh.register_check_asbitem.D++ //触发所选组合项目刷新 (取消这种触发,减少交互)
  939. this.dataTransOpts.tableM.register_check_asbitem = this.form.registerCheckAsbitems
  940. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  941. e.standTotal = e.amount * e.standardPrice
  942. e.total = e.amount * e.chargePrice
  943. });
  944. // 单位/个人 的分组与套餐处理
  945. this.changeCustomerOrgId(this.form.customerOrgId)
  946. this.dataTransOpts.refresh.register_check_asbitem.OnlyRefreshAsbitem++
  947. },
  948. //快速选择组合项目时,调整可按拼间简码及简称查找
  949. filterMethod(keyWords) {
  950. //// console.log('filterMethod',this.asbItemQuick)
  951. if (keyWords) {
  952. this.nation = [];
  953. this.dict.nation.forEach(item => {
  954. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  955. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  956. this.nation.push(item);
  957. }
  958. });
  959. } else {
  960. this.nation = deepCopy(this.dict.nation);
  961. }
  962. },
  963. //选择单位
  964. async changeCustomerOrgId(v) {
  965. console.log('changeCustomerOrgId', v, this.form.customerOrgParentId)
  966. let customerOrgId = "", customerOrgParentId = ""
  967. if (Array.isArray(v) && v.length > 0) {
  968. customerOrgId = v[v.length - 1]
  969. customerOrgParentId = v[0]
  970. } else {
  971. customerOrgId = v // 后台顶级单位ID未获取正确(再获取一次)
  972. let pids = getTreePids(this.patientRegister.customerOrgTreeAll, "treeChildren", "parentId", "id", customerOrgId)
  973. if (Array.isArray(pids) && pids.length > 0) {
  974. if (pids.length == 1) {
  975. customerOrgParentId = customerOrgId
  976. } else {
  977. customerOrgParentId = pids[1]
  978. }
  979. }
  980. }
  981. this.preCustomerOrgId = customerOrgId
  982. // let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId)
  983. if (customerOrgParentId) {
  984. if (customerOrgParentId == this.dict.personOrgId) {
  985. this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001"
  986. } else {
  987. // 获取体检次数字典库
  988. this.getCustomerOrgRegisterList(customerOrgParentId)
  989. }
  990. // 需要触发 修改 分组/套餐 顶级ID 没有变时,不改变套餐与分组
  991. if (customerOrgParentId != this.form.customerOrgParentId) {
  992. this.form.customerOrgGroupId = null
  993. this.form.medicalPackageId = null
  994. // 清除套餐分组标识
  995. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  996. e.isBelongGroupPackage = 'N'
  997. });
  998. if (customerOrgParentId == this.dict.personOrgId) {
  999. this.patientRegister.customerOrgGroup = []
  1000. }
  1001. if (this.form.customerOrgParentId == this.dict.personOrgId) {
  1002. this.changeMedicalPackageId()
  1003. } else {
  1004. this.changeCustomerOrgGroupId()
  1005. }
  1006. }
  1007. }
  1008. },
  1009. // 获取顶级单位ID
  1010. async getParentCustomerOrgId(customerOrgId) {
  1011. let customerOrgParentId = null
  1012. if (!customerOrgId) return customerOrgParentId
  1013. if (typeof customerOrgId == 'string') {
  1014. try {
  1015. let res = await getapi(`/api/app/customer-org/parent/${customerOrgId}`)
  1016. if (res.code != -1) customerOrgParentId = res.data
  1017. } catch (error) {
  1018. // console.log('获取顶级单位ID出错:', error)
  1019. }
  1020. } else if (customerOrgId.length > 0) {
  1021. customerOrgParentId = customerOrgId[0]
  1022. }
  1023. return customerOrgParentId
  1024. },
  1025. //获取单位体检次数
  1026. getCustomerOrgRegisterList(customerOrgParentId) {
  1027. //获取单位体检次数信息
  1028. getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`)
  1029. .then(res => {
  1030. if (res.code > - 1) {
  1031. // console.log('获取单位体检次数', this.form.customerOrgRegisterId, res.data)
  1032. this.customerOrgRegisterList = res.data
  1033. if (!this.form.customerOrgRegisterId || this.form.customerOrgRegisterId == "00000000-0000-0000-0000-000000000001") {
  1034. let customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数
  1035. if (customerOrgRegisterList.length > 0) {
  1036. this.form.customerOrgRegisterId = customerOrgRegisterList[customerOrgRegisterList.length - 1].id
  1037. }
  1038. }
  1039. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId}
  1040. this.patientRegister.customerOrgGroup = []
  1041. if (this.form.customerOrgRegisterId && this.form.customerOrgRegisterId != '00000000-0000-0000-0000-000000000001') return postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId: this.form.customerOrgRegisterId }) //获取单位分组
  1042. }
  1043. }).then(res => {
  1044. if (res && res.code != -1) {
  1045. this.patientRegister.customerOrgGroup = res.data;
  1046. }
  1047. })
  1048. },
  1049. //读取身份证信息
  1050. peopleIcCard() {
  1051. if (!this.$peisAPI) {
  1052. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1053. return
  1054. }
  1055. this.$peisAPI.peopleIcCard().then(res => {
  1056. // console.log('peopleIcCard', res)
  1057. let lres = JSON.parse(res)
  1058. if (lres.code >= -1) {
  1059. let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
  1060. this.form.patientName = idNos.Name
  1061. this.form.birthDate = idNos.birthDate
  1062. this.form.sexId = idNos.sexId
  1063. this.form.age = idNos.age
  1064. this.form.nationId = idNos.nationId
  1065. this.form.idNo = idNos.IDCode
  1066. this.form.address = idNos.Address
  1067. this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
  1068. // this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  1069. this.changeIdNo() // 触发身份证查询档案号
  1070. } else {
  1071. this.$message.error({ showClose: true, message: `${lres.message}` })
  1072. }
  1073. })
  1074. },
  1075. //修改单位体检次数
  1076. changeMedicalTimes() {
  1077. this.form.customerOrgGroupId = null
  1078. this.changeCustomerOrgGroupId()
  1079. //获取体检次数下的分组
  1080. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  1081. },
  1082. //移除旧分组或套餐的组合项目
  1083. removeGroupPackageAsb() {
  1084. let body = { registerAsbitemIds: [] }
  1085. let registerAsbitemIds = []
  1086. let chargeComplete = ''
  1087. //体检基本信息未保存时,删除所有所选项目
  1088. if (!this.form.id) {
  1089. this.patientRegister.patientRegisterAbs = [];
  1090. return body;
  1091. }
  1092. //删除已选 分组或套餐的组合项目 ,如已收费或 已检时,将 groupPackageId 置为null
  1093. for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
  1094. if (!this.patientRegister.patientRegisterAbs[i].id) {
  1095. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1096. i--
  1097. continue
  1098. }
  1099. if (this.patientRegister.patientRegisterAbs[i].isCharge == 'Y' || this.patientRegister.patientRegisterAbs[i].checkCompleteFlag != '0') {
  1100. chargeComplete += this.patientRegister.patientRegisterAbs[i].asbitemName + ','
  1101. this.patientRegister.patientRegisterAbs[i].groupPackageId = null
  1102. } else {
  1103. //数据库有,才添加到待删除的数组中
  1104. if (this.patientRegister.patientRegisterAbs[i].id) {
  1105. registerAsbitemIds.push(this.patientRegister.patientRegisterAbs[i].id)
  1106. }
  1107. this.patientRegister.patientRegisterAbs.splice(i, 1)
  1108. i--
  1109. }
  1110. }
  1111. if (chargeComplete) {
  1112. this.$message.info({ showClose: true, message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
  1113. }
  1114. body = { registerAsbitemIds };
  1115. return body;
  1116. },
  1117. //添加新套餐/分组的组合项目
  1118. addGroupPackageAsb(groupPackageAsb, typeFlag, groupPackageId) {
  1119. let payTypeFlag = '0'; //默认个人支付
  1120. let lfind = -1
  1121. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
  1122. for (let i = 0; i < groupPackageAsb.length; i++) {
  1123. lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id)
  1124. if (lfind > - 1) {
  1125. this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
  1126. //editCount++
  1127. continue
  1128. }
  1129. let pojo = {
  1130. asbitemId: groupPackageAsb[i].id,
  1131. asbitemName: groupPackageAsb[i].displayName,
  1132. patientRegisterId: this.form.id,
  1133. standardPrice: groupPackageAsb[i].price,
  1134. chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice : groupPackageAsb[i].price,
  1135. payTypeFlag,
  1136. discount: typeFlag == 'group' ? groupPackageAsb[i].discount : 100,
  1137. isCharge: "N",
  1138. amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount : 1,
  1139. groupPackageId: groupPackageId
  1140. }
  1141. this.patientRegister.patientRegisterAbs.push(pojo)
  1142. }
  1143. },
  1144. //获取体检次数下的分组
  1145. getCustomerOrgGroup(customerOrgRegisterId) {
  1146. this.patientRegister.customerOrgGroup = []
  1147. // /api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
  1148. postapi('/api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter', { customerOrgRegisterId }).then(res => {
  1149. if (res.code != - 1) {
  1150. this.patientRegister.customerOrgGroup = res.data;
  1151. }
  1152. })
  1153. },
  1154. //修改出生日期
  1155. changeBirthDate() {
  1156. this.form.age = birthdayToAge(this.form.birthDate)
  1157. },
  1158. //修改出生日期
  1159. changeAge() {
  1160. this.form.birthDate = ageToBirthday(this.form.age)
  1161. },
  1162. //修改身份证,生成年龄、出生、性别
  1163. changeIdNo() {
  1164. if (!this.form.idNo) return
  1165. this.Query(this.form.idNo)
  1166. let ret = parseID(this.form.idNo)
  1167. // console.log('changeIdNo',ret)
  1168. if (ret.age != -1) {
  1169. this.form.birthDate = new Date(ret.birthday)
  1170. this.form.age = ret.age
  1171. this.form.sexId = ret.sex
  1172. }
  1173. },
  1174. // //分组改变时触发
  1175. changeCustomerOrgGroupId() {
  1176. this.prAsbOpraOpts.prAsbGroup++
  1177. },
  1178. // //套餐改变时触发
  1179. changeMedicalPackageId() {
  1180. this.prAsbOpraOpts.prAsbPackage++
  1181. },
  1182. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  1183. Query(param) {
  1184. this.patientChoosed = { id: '' } // 清空之前的选择
  1185. //编辑的时候不查重
  1186. if (this.form.id || !param) return;
  1187. //// console.log(`/api/app/patient/in-filter?Filter=${param}`)
  1188. let body = {
  1189. filter: param,
  1190. maxResultCount: 500
  1191. }
  1192. this.patientList = []
  1193. postapi('/api/app/patient/getlistinfilter', body).then((res) => {
  1194. if (res.code > -1) {
  1195. // console.log("查重 ", res); //有数据才显示
  1196. if (res.data && res.data.length > 0) {
  1197. this.patientList = res.data;
  1198. this.dialogVisible = true;
  1199. }
  1200. }
  1201. });
  1202. },
  1203. //列表选中
  1204. rowick(row) {
  1205. this.patientChoosed = row;
  1206. },
  1207. patientDblclick(row) {
  1208. this.patientChoosed = row;
  1209. this.choosePatient()
  1210. },
  1211. //确定选择人员
  1212. choosePatient() {
  1213. if (!this.patientChoosed.id) {
  1214. this.$message.warning({ showClose: true, message: '请选择人员档案信息' })
  1215. return;
  1216. }
  1217. this.dialogVisible = false;
  1218. this.form.patientId = this.patientChoosed.id;
  1219. this.form.patientNo = this.patientChoosed.patientNo;
  1220. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  1221. // 考滤录入有值,档案却无值
  1222. if (this.patientChoosed.displayName) this.form.patientName = this.patientChoosed.displayName;
  1223. if (this.patientChoosed.sexId) this.form.sexId = this.patientChoosed.sexId;
  1224. if (this.patientChoosed.birthDate) this.form.birthDate = new Date(this.patientChoosed.birthDate);
  1225. if (this.patientChoosed.nationId) this.form.nationId = this.patientChoosed.nationId;
  1226. if (this.patientChoosed.idNo) this.form.idNo = this.patientChoosed.idNo;
  1227. if (!this.form.maritalStatusId) this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  1228. if (!this.form.telephone) this.form.telephone = this.patientChoosed.telephone;
  1229. if (!this.form.mobileTelephone) this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  1230. if (this.form.birthDate) {
  1231. this.form.age = birthdayToAge(this.form.birthDate)
  1232. }
  1233. if (this.form.idNo) {
  1234. let ret = parseID(this.form.idNo)
  1235. this.form.birthDate = new Date(ret.birthday)
  1236. this.form.age = ret.age
  1237. this.form.sexId = ret.sex
  1238. }
  1239. },
  1240. registerRowClick(row) {
  1241. this.registerChoosed = row;
  1242. },
  1243. registerRowDblclick(row) {
  1244. this.registerChoosed = row;
  1245. this.chooseRegister()
  1246. },
  1247. chooseRegister() {
  1248. if (!this.registerChoosed) {
  1249. alert("请选中人员登记信息");
  1250. return;
  1251. }
  1252. objCopy(this.registerChoosed, this.form)
  1253. // this.patientRegister.patientRegisterId = this.registerChoosed.id
  1254. // this.patientRegister.photo = this.registerChoosed.photo
  1255. // this.getPatientRegisterAbs(this.registerChoosed.id)
  1256. this.dataTransOpts.tableS.patient_register.id = this.registerChoosed.id
  1257. setTimeout(() => {
  1258. this.dataTransOpts.refresh.register_check_asbitem.M++
  1259. }, 20);
  1260. this.registerVisible = false
  1261. },
  1262. // 组装基本信息保存的参数体
  1263. madePrBody() {
  1264. //赋值
  1265. let body = deepCopy(this.form);
  1266. // // console.log('this.form',this.form)
  1267. // console.log('body',this.form,body)
  1268. if (this.form.birthDate) {
  1269. try {
  1270. body.birthDate = moment(new Date(this.form.birthDate)).format("yyyy-MM-DD")
  1271. } catch (error) {
  1272. // this.form.birthDate != "Invalid date"
  1273. body.birthDate = null
  1274. }
  1275. } else {
  1276. body.birthDate = null
  1277. }
  1278. if (body.birthDate == "Invalid date") body.birthDate = null
  1279. if (isNaN(body.age)) {
  1280. body.age = null
  1281. } else {
  1282. body.age = Number(body.age)
  1283. }
  1284. // // console.log('body',body)
  1285. // Invalid date
  1286. delete body.registerManType;
  1287. delete body.patientRegisterNo;
  1288. delete body.medicalTimes;
  1289. // delete body.completeFlag;
  1290. delete body.isMedicalStart;
  1291. delete body.patientNo;
  1292. delete body.creatorId;
  1293. delete body.creationTime;
  1294. delete body.lastModificationTime;
  1295. delete body.lastModifierId;
  1296. delete body.isVipBox;
  1297. delete body.isNameHideBox;
  1298. delete body.isPhoneFollowBox;
  1299. delete body.isLockBox;
  1300. delete body.photo;
  1301. // if(this.form.registerManType == 'customer') delete body.medicalStartDate;
  1302. if (this.form.id) delete body.medicalStartDate;
  1303. setNull(body, this.defaultNull);
  1304. if (typeof this.form.customerOrgId == 'object') {
  1305. if (this.form.customerOrgId.length > 0) body.customerOrgId = this.form.customerOrgId[this.form.customerOrgId.length - 1]
  1306. }
  1307. //日期转换 日期控件增加格式
  1308. // // console.log("body.birthDate", body.birthDate);
  1309. // if (body.birthDate) {
  1310. // body.birthDate = moment(new Date(body.birthDate)).format(
  1311. // "yyyy-MM-DD"
  1312. // );
  1313. // }
  1314. return body
  1315. },
  1316. //提交
  1317. btnSubmit(formName, msgTip) {
  1318. this.$refs[formName].validate((valid, fields) => {
  1319. // console.log('fields', fields)
  1320. if (!valid) {
  1321. this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
  1322. return false
  1323. }
  1324. if (this.form.customerOrgId != this.dict.personOrgId) {
  1325. if (!this.form.customerOrgRegisterId) {
  1326. this.$message.warning({ showClose: true, message: "请填写单位体检次数!" });
  1327. return false
  1328. }
  1329. }
  1330. if (this.form.idNo && checkIDCode(this.form.idNo) == false) {
  1331. this.$message.warning({ showClose: true, message: "身份证号填写不合法!" });
  1332. return false
  1333. }
  1334. let body = this.madePrBody()
  1335. // console.log('madePrBody',body)
  1336. body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem)
  1337. if (this.form.id) {
  1338. // 更新时,先保存明细,再更新主表
  1339. // this.prAsbOpraOpts.prAsbSave++ //触发组合项目保存
  1340. body.patientRegisterId = body.id;
  1341. } else {
  1342. delete body.id;
  1343. }
  1344. // // console.log(`/api/patientregister/createreturninfo`, body);
  1345. postapi(`/api/PatientRegister/CreatePatientRegister`, body)
  1346. .then(async (res) => {
  1347. if (res.code > -1) {
  1348. objCopy(res.data, this.form) // 日期类型复制会有问题(记得要特殊处理)
  1349. this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
  1350. delete this.dataTransOpts.tableS.patient_register.registerCheckAsbitems
  1351. // 保存成功赋 id 值等
  1352. this.dataTransOpts.tableM.register_check_asbitem = res.data.registerCheckAsbitems
  1353. //一般读身份证照片时,会出现这种情况
  1354. if (this.peoplePhoto && this.peoplePhoto.indexOf("data:image") > -1) await savePeoplePhoto(res.data.id, this.peoplePhoto);
  1355. // 保存即发送收费申请
  1356. if (this.LocalConfig.patientRegister.immediateToHisCharge) {
  1357. await this.immediateToHisCharge(this.form.id)
  1358. }
  1359. // 新增保存时,提示是否打条码 (预登记一般不打条码)
  1360. if (!body.id && this.form.completeFlag != '0') {
  1361. if (Array.isArray(this.LocalConfig.patientRegister.printGuideLabel) && this.LocalConfig.patientRegister.printGuideLabel.length > 0) {
  1362. this.$confirm("是否打印 指引单、检验条码及 Pacs 条码?", "提示", {
  1363. confirmButtonText: "是",
  1364. cancelButtonText: "否",
  1365. type: "warning",
  1366. })
  1367. .then(async () => {
  1368. try {
  1369. if(this.LocalConfig.patientRegister.printGuideLabel.indexOf('guide') > -1) await this.guidePrint('0001', false)
  1370. await this.labelPrint(false)
  1371. } catch (error) {
  1372. // this.$message.info({ showClose: true, message: error });
  1373. console.log(error)
  1374. }
  1375. })
  1376. .catch((err) => {
  1377. // if (err == "cancel") {
  1378. // this.$message.info({ showClose: true, message: "已取消操作" });
  1379. // }
  1380. });
  1381. }
  1382. }
  1383. }
  1384. }
  1385. );
  1386. });
  1387. },
  1388. // 人员新增
  1389. btnAdd() {
  1390. this.dataTransOpts.tableS.patient_register.id = ''
  1391. this.dataTransOpts.refresh.patient_register.S++
  1392. },
  1393. //将现有的数据,复制并展现,但未保存
  1394. rdCopy() {
  1395. if (!this.form.id) {
  1396. this.$message.info({ showClose: true, message: "该信息尚未保存,不可执行此操作!" });
  1397. return;
  1398. }
  1399. this.dataTransOpts.tableS.patient_register.id = ''
  1400. this.peoplePhoto = '/pic/Photo.jpg'
  1401. this.patientRegister.patientRegisterId = '';
  1402. this.form.id = '';
  1403. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  1404. this.form.patientRegisterNo = '';
  1405. this.form.patientNo = '';
  1406. this.form.medicalTimes = 1;
  1407. this.form.patientName = '';
  1408. this.form.photo = '';
  1409. this.form.completeFlag = '1'; //
  1410. // this.patientRegister.patientRegisterAbs.forEach(e => {
  1411. // e.id = '';
  1412. // e.patientRegisterId = '';
  1413. // e.isCharge = 'N';
  1414. // e.checkCompleteFlag = '0'
  1415. // e.isLock = 'N'
  1416. // });
  1417. // 触发明细项目复制
  1418. // setTimeout(() => {
  1419. // this.prAsbOpraOpts.copyNew++
  1420. // }, 10);
  1421. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1422. delete e.id
  1423. e.patientRegisterId = ''
  1424. e.isCharge = 'N'
  1425. e.isLock = 'N'
  1426. });
  1427. // // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  1428. this.$message.info({ showClose: true, message: "操作成功,请记得点保存" });
  1429. },
  1430. //删除
  1431. del() {
  1432. deletapi(
  1433. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  1434. ).then((res) => {
  1435. // console.log("删除 操作成功");
  1436. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  1437. this.getCustomerOrgTree();
  1438. });
  1439. },
  1440. //拍照(已废弃)
  1441. // openCamera() {
  1442. // if (!this.form.id) {
  1443. // alert("请先保存人员信息");
  1444. // return;
  1445. // }
  1446. // this.patientRegister.cameraVisble = true;
  1447. // },
  1448. //拍照(调壳程序)
  1449. photoGrah() {
  1450. if (!this.form.id) {
  1451. alert("请先保存人员信息");
  1452. return;
  1453. }
  1454. if (!this.$peisAPI) {
  1455. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1456. return
  1457. }
  1458. this.$peisAPI.photoGrah()
  1459. .then(res => {
  1460. // console.log('this.$peisAPI.photoGrah 原始返回结果', res)
  1461. let lres = JSON.parse(res)
  1462. if (lres.code > -1) {
  1463. let uploadPhoto = {
  1464. patientRegisterId: this.form.id,
  1465. photo: lres.data.Photo,
  1466. };
  1467. this.peoplePhoto = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  1468. // this.patientRegister.photo = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}`
  1469. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  1470. } else {
  1471. this.$message.error({ showClose: true, message: "上传照片错误" + lres.code })
  1472. }
  1473. }).then(res => {
  1474. if (res && res.code > -1) {
  1475. let body = {
  1476. patientRegisterId: this.form.id,
  1477. photo: res.data,
  1478. };
  1479. // console.log(body);
  1480. return postapi(`/api/app/patient-register/update-photo`, body);
  1481. }
  1482. }).then(res => {
  1483. if (res && res.code > -1) {
  1484. //// console.log('拍照',res.data)
  1485. this.patientRegister.patientRegisterRd.photo = res.data.photo
  1486. // console.log("操作成功");
  1487. }
  1488. }).catch(err => {
  1489. // console.log('this.$peisAPI.photoGrah', err)
  1490. this.$message.error({ showClose: true, message: `照片操作错误 ${err}` })
  1491. })
  1492. },
  1493. getPeoplePhoto(photo) {
  1494. this.peoplePhoto = photoParse(photo)
  1495. },
  1496. // 打印指引单(isPreview)
  1497. async guidePrint(ReportCode, isPreview) {
  1498. if (!this.form.id) {
  1499. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  1500. return;
  1501. }
  1502. if(this.form.completeFlag == '0'){
  1503. this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
  1504. return;
  1505. }
  1506. if (!this.$peisAPI) {
  1507. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1508. return
  1509. }
  1510. let token = window.sessionStorage.getItem('token');
  1511. let user = window.sessionStorage.getItem('user');
  1512. let toOutShell = {
  1513. ReportCode, token,
  1514. isBuildImage: 'N',
  1515. IsUploadPdf: 'N',
  1516. preViewCanPrint: 'N',
  1517. BusinessCode: this.form.id,
  1518. Parameters: [
  1519. { Name: 'printer', Value: user },
  1520. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1521. { Name: 'pageFooter', Value: 'pic/peisQrCode.jpg' },
  1522. ],
  1523. };
  1524. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  1525. this.printing = true
  1526. if (isPreview) {
  1527. /*
  1528. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  1529. .then((res) => {
  1530. if (res.code != -1) {
  1531. toOutShell.ReportTable = res.data;
  1532. // console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1533. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1534. }
  1535. })
  1536. .catch(err => {
  1537. this.$message.warning({ showClose: true, message: err});
  1538. });
  1539. */
  1540. try {
  1541. let lres = await this.$peisAPI.printPre(JSON.stringify(toOutShell))
  1542. if (JSON.parse(lres).code < 0) {
  1543. this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  1544. }
  1545. } catch (error) {
  1546. this.$message.warning({ showClose: true, message: `${error}` });
  1547. }
  1548. } else {
  1549. try {
  1550. let lres = await this.$peisAPI.print(JSON.stringify(toOutShell))
  1551. if (JSON.parse(lres).code < 0) {
  1552. this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  1553. this.printing = false
  1554. return
  1555. }
  1556. postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id]).then(res => {
  1557. if (res && res.code > -1) {
  1558. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  1559. if (lfind > -1) {
  1560. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  1561. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  1562. } else {
  1563. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  1564. }
  1565. }
  1566. }
  1567. })
  1568. } catch (error) {
  1569. this.$message.warning({ showClose: true, message: `${error}` });
  1570. }
  1571. }
  1572. this.printing = false
  1573. },
  1574. //检验申请
  1575. async lisRequest() {
  1576. this.$message.warning({ showClose: true, message: '此功能已合并到条码打印' });
  1577. /*
  1578. let isPrintLisRequest = false
  1579. let res = null
  1580. if (this.form.id.length < 1) {
  1581. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!"});
  1582. return;
  1583. }
  1584. try {
  1585. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  1586. // console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  1587. } catch (error) {
  1588. return;
  1589. }
  1590. if (res.code > -1) {
  1591. // this.$message.info("发送检验申请成功!");
  1592. isPrintLisRequest = true;
  1593. }
  1594. //重复申请,重打
  1595. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  1596. isPrintLisRequest = true;
  1597. }
  1598. if (!isPrintLisRequest) return;
  1599. try {
  1600. await this.$confirm("是否打印检验申请单?", "提示", {
  1601. confirmButtonText: "是",
  1602. cancelButtonText: "否",
  1603. type: "info",
  1604. showClose: false,
  1605. closeOnClickModal: false,
  1606. closeOnPressEscape: false,
  1607. });
  1608. } catch (error) {
  1609. return;
  1610. }
  1611. //打印检验申请单
  1612. this.lisPrint('0003', false);
  1613. */
  1614. },
  1615. //条码打印(lis + pacs)
  1616. async labelPrint(isPreview) {
  1617. if (!this.form.id) {
  1618. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  1619. return;
  1620. }
  1621. if(this.form.completeFlag == '0'){
  1622. this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
  1623. return;
  1624. }
  1625. if (!this.$peisAPI) {
  1626. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  1627. return
  1628. }
  1629. let token = window.sessionStorage.getItem('token');
  1630. let user = window.sessionStorage.getItem('user');
  1631. let toOutShell = {
  1632. token, // ReportCode,
  1633. IsMoreLabel: 'Y',
  1634. isBuildImage: 'N',
  1635. IsUploadPdf: 'N',
  1636. BusinessCode: this.form.id,
  1637. Parameters: [
  1638. { Name: 'printer', Value: user },
  1639. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1640. ],
  1641. };
  1642. this.printing = true
  1643. try {
  1644. // lis条码打印
  1645. if(this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) await this.lisPrint('0002', isPreview, toOutShell)
  1646. // pacs条码打印
  1647. if(this.LocalConfig.patientRegister.printGuideLabel.indexOf('pacs') > -1) await this.pacsPrint('0004', isPreview, toOutShell)
  1648. } catch (error) {
  1649. console.log(error)
  1650. }
  1651. this.printing = false
  1652. },
  1653. // lis条码打印
  1654. async lisPrint(ReportCode, isPreview, toOutShell) {
  1655. toOutShell.ReportCode = ReportCode
  1656. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  1657. if (isPreview) {
  1658. try {
  1659. let lres = await this.$peisAPI.printPre(JSON.stringify(toOutShell))
  1660. if (JSON.parse(lres).code < 0) {
  1661. this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  1662. }
  1663. } catch (error) {
  1664. this.$message.warning({ showClose: true, message: `${error}` });
  1665. }
  1666. } else {
  1667. try {
  1668. let lres = await this.$peisAPI.print(JSON.stringify(toOutShell))
  1669. if (JSON.parse(lres).code < 0) {
  1670. this.$message.warning({ showClose: true, message: JSON.parse(lres).message });
  1671. return
  1672. }
  1673. postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  1674. .then(res => {
  1675. if (res && res.code < 0) {
  1676. this.$message.error({ showClose: true, message: `更新条码打印状态失败,原因:${res.message}` });
  1677. }
  1678. })
  1679. } catch (error) {
  1680. this.$message.warning({ showClose: true, message: error });
  1681. }
  1682. }
  1683. },
  1684. //pacs条码打印
  1685. pacsPrint(ReportCode, isPreview, toOutShell) {
  1686. toOutShell.ReportCode = ReportCode
  1687. console.log('this.$peisAPI.print', JSON.stringify(toOutShell))
  1688. if (isPreview) {
  1689. this.$peisAPI.printPre(JSON.stringify(toOutShell))
  1690. .then(res => {
  1691. if (JSON.parse(res).code < 0) {
  1692. this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  1693. }
  1694. })
  1695. .catch((err) => {
  1696. // console.log('打印pacs条码错误', err)
  1697. this.$message.warning({ showClose: true, message: `${err}` });
  1698. });
  1699. } else {
  1700. this.$peisAPI.print(JSON.stringify(toOutShell))
  1701. .then(res => {
  1702. if (JSON.parse(res).code < 0) {
  1703. this.$message.warning({ showClose: true, message: JSON.parse(res).message });
  1704. } else {
  1705. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  1706. operateType: 1,
  1707. patientRegisterId: this.form.id,
  1708. });
  1709. }
  1710. })
  1711. .then(res => {
  1712. if (res && res.code < 0) {
  1713. this.$message.error({ showClose: true, message: `${res.message}` });
  1714. }
  1715. })
  1716. .catch((err) => {
  1717. // console.log('打印pacs条码错误', err)
  1718. this.$message.error({ showClose: true, message: `${err}` });
  1719. });
  1720. }
  1721. },
  1722. //补打条码
  1723. reLisRequest() {
  1724. if (this.form.id.length < 1) {
  1725. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  1726. return;
  1727. }
  1728. this.brushTimes++;
  1729. this.patientRegister.lisRequestVisble = true;
  1730. },
  1731. //手动合并项目
  1732. reMergeAsbitem() {
  1733. if (this.form.id.length < 1) {
  1734. this.$message.info({ showClose: true, message: "人员信息尚未保存,不可执行此操作!" });
  1735. return;
  1736. }
  1737. this.brushTimes++;
  1738. this.patientRegister.mergeAsbitemVisble = true;
  1739. },
  1740. btnPayTypeFlag(payTypeFlag) {
  1741. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1742. if (e.isCharge == 'N') e.payTypeFlag = payTypeFlag
  1743. });
  1744. },
  1745. async getAsb(id) {
  1746. let err = ''
  1747. try {
  1748. let res = await getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`)
  1749. if (res.code > -1) {
  1750. this.dataTransOpts.tableM.register_check_asbitem = res.data
  1751. } else {
  1752. err = res.message
  1753. }
  1754. } catch (error) {
  1755. err = `${error}`
  1756. }
  1757. return err
  1758. },
  1759. async toCharge(form) {
  1760. if (!form.patientRegisterNo) {
  1761. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  1762. return
  1763. }
  1764. if (form.completeFlag == '0') {
  1765. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  1766. return
  1767. }
  1768. let err = await this.getAsb(form.id)
  1769. if (err) {
  1770. this.$message.error(err)
  1771. return
  1772. }
  1773. let chargeMoney = Number(0)
  1774. //支付方式,比如是0自费、2免费、1单位支付
  1775. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1776. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  1777. });
  1778. if (chargeMoney == 0) {
  1779. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  1780. return
  1781. }
  1782. //多次重复点击时,刷新处理
  1783. this.chargePatientRegisterNo = form.patientRegisterNo
  1784. this.dataTransOpts.refresh.charge.S++
  1785. this.dialogWin.charge = true
  1786. },
  1787. // 收费申请
  1788. async chargeRequest(form) {
  1789. if (!form.id) {
  1790. this.$message.warning({ showClose: true, message: "请先保存人员信息!" })
  1791. return
  1792. }
  1793. if (form.completeFlag == '0') {
  1794. this.$message.warning({ showClose: true, message: "预登记的人员不可执行此操作!" })
  1795. return
  1796. }
  1797. let err = await this.getAsb(form.id)
  1798. if (err) {
  1799. this.$message.error(err)
  1800. return
  1801. }
  1802. let chargeMoney = Number(0)
  1803. //支付方式,比如是0自费、2免费、1单位支付
  1804. this.dataTransOpts.tableM.register_check_asbitem.forEach(e => {
  1805. if (e.payTypeFlag == '0') chargeMoney += Number(e.total)
  1806. });
  1807. if (chargeMoney == 0) {
  1808. this.$message.warning({ showClose: true, message: '没有可收费或退费的记录!' })
  1809. return
  1810. }
  1811. // 显示
  1812. this.dataTransOpts.refresh.charge.S++
  1813. this.dialogWin.AsbChargeRequest = true
  1814. },
  1815. // 保存立即发送收费申请
  1816. async immediateToHisCharge(patientRegisterId) {
  1817. try {
  1818. let res = await postapi('/api/app/registerasbitem/GetCanChargeAsbitemsByPatientRegisterId', { patientRegisterId })
  1819. if (!(res.code > -1 && res.data.length > 0)) return
  1820. let body = {
  1821. patientRegisterId,
  1822. registerCheckAsbitems: []
  1823. }
  1824. res.data.forEach(e => {
  1825. body.registerCheckAsbitems.push({ registerCheckAsbitemId: e.registerCheckAsbitemId })
  1826. });
  1827. let resCharge = await postapi("/api/app/ChargeRequest/Create", body)
  1828. if (resCharge.code > -1) {
  1829. this.dataTransOpts.refresh.patient_register.S++
  1830. }
  1831. } catch (error) {
  1832. this.$message.error({ showClose: true, message: `${error}` })
  1833. }
  1834. },
  1835. //关闭收费窗口时,刷新收费状态信息
  1836. closeDialogCharge() {
  1837. // this.prAsbOpraOpts.prAsbQuery++
  1838. this.dataTransOpts.refresh.patient_register.S++
  1839. // this.dataTransOpts.refresh.register_check_asbitem.D++
  1840. },
  1841. // 新增保存基本信息产生新的ID,等明细保存后,再更新表单form.id
  1842. refreshFormId() {
  1843. // console.log('refreshFormId', this.prAsbOpraOpts.formId)
  1844. this.form.id = this.prAsbOpraOpts.formId
  1845. this.prAsbOpraOpts.formId = '' //清空
  1846. /**/
  1847. // this.patientRegister.prList.push(res.data); //列表添加记录
  1848. this.patientRegister.patientRegisterId = this.form.id;
  1849. objCopy(this.form, this.patientRegister.patientRegisterRd);
  1850. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)放在窗口关闭事件中去
  1851. // let curRow = deepCopy(this.patientRegister.patientRegisterRd)
  1852. // curRow.index = this.patientRegister.prList.length
  1853. // this.patientRegister.prList.push(curRow)
  1854. },
  1855. //回车替代tab键
  1856. enterToTab() {
  1857. this.$nextTick(() => {
  1858. let inputs = document.querySelectorAll("form input"); //用数组可以读取多个标签的元素 //.inline-input
  1859. //// console.log('inputs',inputs);
  1860. // 为每个输入框添加键盘事件监听器
  1861. inputs.forEach((input, i) => {
  1862. input.addEventListener('keydown', (event) => {
  1863. // 如果按下的是回车键
  1864. // // console.log('data-ismultiline',input.getAttribute('data-ismultiline'));
  1865. if (event.keyCode === 13) {
  1866. // 阻止回车键的默认行为(换行)
  1867. event.preventDefault();
  1868. // 如果是身份证,则计算出生与年龄
  1869. let placeholder = input.getAttribute('placeholder')
  1870. if (placeholder == '身份证号') this.changeIdNo()
  1871. // 跳至下一个输入框
  1872. for (let j = i + 1; j < inputs.length; j++) {
  1873. if (inputs[j].getAttribute('disabled') != "disabled") {
  1874. inputs[j].focus();
  1875. break;
  1876. }
  1877. }
  1878. }
  1879. });
  1880. });
  1881. });
  1882. },
  1883. },
  1884. //监听事件
  1885. watch: {
  1886. //人员ID未切换换时 也可以强制刷新数据
  1887. "dataTransOpts.refresh.patient_register.S": {
  1888. // immediate: true,
  1889. async handler(newVal, oldVal) {
  1890. // console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
  1891. if (newVal != oldVal) await this.initFormData(this.dataTransOpts.tableS.patient_register.id)
  1892. }
  1893. },
  1894. //拍照触发
  1895. // "form.photo"(newVal, oldVal) {
  1896. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  1897. // if (newVal != oldVal) {
  1898. // this.getPeoplePhoto(newVal)
  1899. // }
  1900. // },
  1901. //修改单位触发
  1902. // "form.customerOrgId": {
  1903. // // immediate:true,
  1904. // // // deep:true,
  1905. // handler(newVal, oldVal) {
  1906. // //// console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  1907. // if (newVal != oldVal) {
  1908. // this.changeCustomerOrgId(newVal)
  1909. // }
  1910. // }
  1911. // },
  1912. // 从体检人员登记列表 点登记,触发
  1913. // 清空查询条件
  1914. "dataTransOpts.plus.clearPatientRegisterQuery": {
  1915. // immediate: true,
  1916. handler(newVal, oldVal) {
  1917. // console.log('从体检人员登记列表 点登记,触发', newVal, oldVal)
  1918. if (newVal != oldVal) {
  1919. this.preCustomerOrgId = this.patientRegister.query.customerOrgId
  1920. // console.log('this.preCustomerOrgId', this.preCustomerOrgId)
  1921. }
  1922. }
  1923. },
  1924. },
  1925. };
  1926. </script>
  1927. <style scoped>
  1928. ::v-deep .el-icon-search:before {
  1929. color: #00F;
  1930. }
  1931. .btn {
  1932. margin-top: 5px;
  1933. }
  1934. .commonbutton {
  1935. width: 100px;
  1936. }
  1937. .query {
  1938. margin-left: 10px;
  1939. }
  1940. .querySpan {
  1941. margin-right: 2px;
  1942. }
  1943. </style>