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.

1857 lines
71 KiB

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