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.

1536 lines
59 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
  1. <template>
  2. <div>
  3. <div style="display: flex">
  4. <div :style="'width:' + (window.pageWidth - 110 - 20) + 'px;'">
  5. <div>
  6. <el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium">
  7. <el-row>
  8. <el-col :span="5">
  9. <el-form-item label="单位名称" prop="customerOrgId">
  10. <el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll"
  11. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'"
  12. :props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
  13. :show-all-levels="false" disabled size="small">
  14. </el-cascader>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="5">
  18. <el-form-item label="条码号" prop="patientRegisterNo">
  19. <el-input v-model="form.patientRegisterNo" disabled size="small"></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="5">
  23. <el-form-item label="档案号" prop="patientNo">
  24. <el-input v-model="form.patientNo" disabled size="small"></el-input>
  25. </el-form-item>
  26. </el-col>
  27. <el-col :span="3">
  28. <el-form-item label="体检次数" prop="medicalTimes">
  29. <el-input v-model="form.medicalTimes" disabled size="small"></el-input>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="3">
  33. <el-form-item label="性别" prop="sexId" label-width="50px">
  34. <el-select v-model="form.sexId" placeholder="请选择" size="small"
  35. :style="'width:' + Math.floor((window.pageWidth - 650) / 8) + 'px;'">
  36. <el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id">
  37. </el-option>
  38. </el-select>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="3">
  42. </el-col>
  43. </el-row>
  44. <el-row>
  45. <el-col :span="5">
  46. <el-form-item label="姓名" prop="patientName">
  47. <el-input v-model="form.patientName" @change="Query(form.patientName)" size="small" autocomplete="off"></el-input>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="5">
  51. <el-form-item label="身份证号" prop="idNo">
  52. <el-input v-model="form.idNo" @change="changeIdNo" size="small"></el-input>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :span="5">
  56. <el-form-item label="出生日期" prop="birthDate">
  57. <el-date-picker v-model="form.birthDate" type="date" value-format="yyyy-MM-dd" placeholder="出生日期"
  58. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'" @change="changeBirthDate"
  59. prefix-icon="" size="small"/>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="3">
  63. <el-form-item label="年龄" prop="age">
  64. <el-input v-model="form.age" size="small" @change="changeAge"></el-input>
  65. </el-form-item>
  66. </el-col>
  67. <el-col :span="3">
  68. <el-form-item label="婚姻" prop="maritalStatusId" label-width="50px">
  69. <el-select v-model="form.maritalStatusId" placeholder="请选择" size="small"
  70. :style="'width:' + Math.floor((window.pageWidth - 650) / 8) + 'px;'">
  71. <el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName"
  72. :value="item.id">
  73. </el-option>
  74. </el-select>
  75. </el-form-item>
  76. </el-col>
  77. <el-col :span="3" />
  78. </el-row>
  79. <el-row>
  80. <el-col :span="5">
  81. <el-form-item label="手机号" prop="mobileTelephone">
  82. <el-input v-model="form.mobileTelephone" size="small"></el-input>
  83. </el-form-item>
  84. </el-col>
  85. <el-col :span="5">
  86. <el-form-item label="电话" prop="telephone">
  87. <el-input v-model="form.telephone" size="small"></el-input>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="5">
  91. <el-form-item label="邮箱" prop="email">
  92. <el-input v-model="form.email" size="small"></el-input>
  93. </el-form-item>
  94. </el-col>
  95. <el-col :span="3">
  96. <el-form-item label="邮编" prop="postalCode">
  97. <el-input v-model="form.postalCode" size="small"></el-input>
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="3">
  101. <el-form-item label="籍贯" prop="birthPlaceId" label-width="50px">
  102. <el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
  103. :style="'width:' + Math.floor((window.pageWidth - 650) / 8) + 'px;'" size="small">
  104. <el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
  105. :value="item.id" />
  106. </el-select>
  107. </el-form-item>
  108. </el-col>
  109. <el-col :span="3" />
  110. </el-row>
  111. <el-row>
  112. <el-col :span="10">
  113. <el-form-item label="地址" prop="address">
  114. <el-input v-model="form.address" size="small"></el-input>
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="5">
  118. <el-form-item label="人员类别" prop="personnelTypeId">
  119. <el-select v-model="form.personnelTypeId" placeholder="请选择" filterable clearable
  120. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'" size="small">
  121. <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName"
  122. :value="item.id" />
  123. </el-select>
  124. </el-form-item>
  125. </el-col>
  126. <el-col :span="3">
  127. <el-form-item label="性激素期" prop="sexHormoneTermId">
  128. <el-select v-model="form.sexHormoneTermId" placeholder="请选择" filterable clearable size="small">
  129. <el-option v-for="item in dict.sexHormoneTerm" :key="item.id" :label="item.displayName"
  130. :value="item.id">
  131. </el-option>
  132. </el-select>
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="3">
  136. <el-form-item label="民族" prop="nationId" label-width="50px">
  137. <el-select v-model="form.nationId" placeholder="请选择" filterable clearable
  138. :style="'width:' + Math.floor((window.pageWidth - 650) / 8) + 'px;'" size="small">
  139. <el-option v-for="item in dict.nation" :key="item.nationId" :label="item.displayName"
  140. :value="item.nationId" />
  141. </el-select>
  142. </el-form-item>
  143. </el-col>
  144. <el-col :span="3" />
  145. </el-row>
  146. <el-row>
  147. <el-col :span="5">
  148. <el-form-item label="体检类别" prop="medicalTypeId">
  149. <el-select v-model="form.medicalTypeId" placeholder="请选择" filterable clearable
  150. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'" size="small">
  151. <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName"
  152. :value="item.id" />
  153. </el-select>
  154. </el-form-item>
  155. </el-col>
  156. <el-col :span="5">
  157. <el-form-item label="工卡号" prop="jobCardNo">
  158. <el-input v-model="form.jobCardNo" size="small"></el-input>
  159. </el-form-item>
  160. </el-col>
  161. <el-col :span="5">
  162. <el-form-item label="体检卡号" prop="medicalCardNo">
  163. <el-input v-model="form.medicalCardNo" size="small"></el-input>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="3">
  167. <el-form-item label="职务" prop="jobPost">
  168. <el-input v-model="form.jobPost" size="small"></el-input>
  169. </el-form-item>
  170. </el-col>
  171. <el-col :span="3">
  172. <el-form-item label="职称" prop="jobTitle" label-width="50px">
  173. <el-input v-model="form.jobTitle" size="small"
  174. :style="'width:' + Math.floor((window.pageWidth - 650) / 8) + 'px;'" />
  175. </el-form-item>
  176. </el-col>
  177. <el-col :span="3">
  178. <el-form-item label="介绍人" prop="salesman">
  179. <el-input v-model="form.salesman" size="small"></el-input>
  180. </el-form-item>
  181. </el-col>
  182. </el-row>
  183. <el-row>
  184. <el-col :span="5">
  185. <el-form-item label="体检中心" prop="organizationUnitId">
  186. <el-select v-model="form.organizationUnitId" placeholder="请选择" filterable
  187. :disabled="peisid ? true : false" size="small"
  188. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
  189. <el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName"
  190. :value="item.id">
  191. </el-option>
  192. </el-select>
  193. </el-form-item>
  194. </el-col>
  195. <el-col :span="5">
  196. <el-form-item label="单位体检次数" prop="isVip" label-width="110px">
  197. <el-select v-model="form.customerOrgRegisterId" placeholder="次数" size="small"
  198. :disabled="form.customerOrgId == dict.personOrgId"
  199. :style="'width:' + Math.floor((window.pageWidth - 674) / 4.8) + 'px;'" @change="changeMedicalTimes"
  200. value-key="id">
  201. <el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
  202. :value="item.id" />
  203. </el-select>
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="3">
  207. <el-form-item label="电话随访" prop="isPhoneFollow">
  208. <!--
  209. <el-radio v-model="form.isPhoneFollow" label="Y"></el-radio>
  210. <el-radio v-model="form.isPhoneFollow" label="N"></el-radio>
  211. -->
  212. <el-checkbox v-model="form.isPhoneFollowBox" @change="changeBox('isPhoneFollow')" />
  213. </el-form-item>
  214. </el-col>
  215. <el-col :span="2">
  216. <el-form-item label="VIP" prop="isVip" label-width="50px">
  217. <!--
  218. <el-radio v-model="form.isVip" label="Y"></el-radio>
  219. <el-radio v-model="form.isVip" label="N"></el-radio>
  220. -->
  221. <el-checkbox v-model="form.isVipBox" @change="changeBox('isVip')" />
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="3">
  225. <el-form-item label="隐藏姓名" prop="isNameHide">
  226. <!--
  227. <el-radio v-model="form.isNameHide" label="Y"></el-radio>
  228. <el-radio v-model="form.isNameHide" label="N"></el-radio>
  229. -->
  230. <el-checkbox v-model="form.isNameHideBox" @change="changeBox('isNameHide')" />
  231. </el-form-item>
  232. </el-col>
  233. <el-col :span="3">
  234. <el-form-item label="锁住" prop="isLock" label-width="50px">
  235. <!--
  236. <el-radio v-model="form.isLock" label="Y"></el-radio>
  237. <el-radio v-model="form.isLock" label="N"></el-radio>
  238. -->
  239. <el-checkbox v-model="form.isLockBox" @change="changeBox('isLock')" />
  240. </el-form-item>
  241. </el-col>
  242. <el-col :span="3">
  243. <el-form-item label="体检开始" prop="isMedicalStart">
  244. <el-select v-model="form.isMedicalStart" placeholder="请选择" disabled size="small">
  245. <el-option label="是" value="Y" />
  246. <el-option label="否" value="N" />
  247. </el-select>
  248. </el-form-item>
  249. </el-col>
  250. </el-row>
  251. <el-row>
  252. <el-col :span="5">
  253. <el-form-item label="分组" prop="customerOrgGroupId">
  254. <el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable
  255. @change="changeCustomerOrgGroupId" :disabled="form.customerOrgId === dict.personOrgId ? true : false"
  256. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'" size="small">
  257. <el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
  258. :value="item.id" />
  259. </el-select>
  260. </el-form-item>
  261. </el-col>
  262. <el-col :span="5">
  263. <el-form-item label="套餐" prop="medicalPackageId">
  264. <el-select v-model="form.medicalPackageId" placeholder="请选择" filterable clearable
  265. @change="changeMedicalPackageId" :disabled="form.customerOrgId === dict.personOrgId ? false : true"
  266. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'" size="small">
  267. <el-option v-for="item in dict.medicalPackage" :key="item.id" :label="item.displayName"
  268. :value="item.id" />
  269. </el-select>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="11">
  273. <el-form-item label="备注" prop="remark">
  274. <el-input v-model="form.remark" type="textarea" :rows="1" placeholder="请输入备注" size="small"></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="3">
  278. <el-form-item label="状态" prop="completeFlag" label-width="50px">
  279. <el-select v-model="form.completeFlag" placeholder="请选择" disabled size="small">
  280. <el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName"
  281. :value="item.id">
  282. </el-option>
  283. </el-select>
  284. </el-form-item>
  285. </el-col>
  286. </el-row>
  287. <el-row>
  288. <el-col :span="6">
  289. <el-form-item label="创建人员">
  290. <el-input v-model="form.creatorId" disabled size="small"></el-input>
  291. </el-form-item>
  292. </el-col>
  293. <el-col :span="6">
  294. <el-form-item label="创建时间">
  295. <el-input :value="form.creationTime
  296. ? lmoment(form.creationTime, 'yyyy-MM-DD')
  297. : ''
  298. " disabled size="small"></el-input>
  299. </el-form-item>
  300. </el-col>
  301. <el-col :span="6">
  302. <el-form-item label="修改人员">
  303. <el-input v-model="form.lastModifierId" disabled size="small"></el-input>
  304. </el-form-item>
  305. </el-col>
  306. <el-col :span="6">
  307. <el-form-item label="修改时间">
  308. <el-input :value="form.lastModificationTime
  309. ? lmoment(form.lastModificationTime, 'yyyy-MM-DD')
  310. : ''
  311. " disabled size="small"></el-input>
  312. </el-form-item>
  313. </el-col>
  314. </el-row>
  315. </el-form>
  316. <el-image
  317. :style="'position: absolute;top:50px;right:' + (100 + Math.floor((window.pageWidth - 750) / 24)) + 'px; width: 150px; height: 160px;'"
  318. :src="peoplePhoto">
  319. <div slot="placeholder" class="image-slot">
  320. 加载中<span class="dot">...</span>
  321. </div>
  322. </el-image>
  323. </div>
  324. <div>
  325. <PatientRegisterItem :patientRegisterForm="form" :payTypeFlag="payTypeFlag" />
  326. </div>
  327. </div>
  328. <div style="margin-left: 10px;">
  329. <div>
  330. <el-button type="primary" class="btnClass" @click="photoGrah" icon="el-icon-camera">拍照</el-button>
  331. </div>
  332. <div class="btn">
  333. <el-button @click="peopleIcCard" class="btnClass">读身份证</el-button>
  334. </div>
  335. <div class="btn">
  336. <el-button type="primary" class="btnClass" @click="rdCopy">复制新增</el-button>
  337. </div>
  338. <div class="btn">
  339. <el-button type="success" class="btnClass" @click="btnSubmit('form', true)">保存</el-button>
  340. </div>
  341. <div class="btn">
  342. <el-button type="primary" class="btnClass" @click="lisRequest">检验单申请</el-button>
  343. </div>
  344. <div class="btn">
  345. <el-button type="primary" class="btnClass" @click="lisPrint('0002', false)">条码打印</el-button>
  346. </div>
  347. <div class="btn">
  348. <el-button type="danger" class="btnClass" @click="reLisRequest">条码补打</el-button>
  349. </div>
  350. <div class="btn">
  351. <el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单打印</el-button>
  352. </div>
  353. <div class="btn">
  354. <el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单预览</el-button>
  355. </div>
  356. <div class="btn">
  357. <el-button type="danger" class="btnClass" @click="reMergeAsbitem">手动合并项目</el-button>
  358. </div>
  359. <div style="margin-top: 30px;">
  360. <el-button type="primary" class="btnClass" @click="payTypeFlag = '0'">全个人支付</el-button>
  361. </div>
  362. <div class="btn">
  363. <el-button type="primary" class="btnClass" @click="payTypeFlag = '1'">全单位支付</el-button>
  364. </div>
  365. <div class="btn">
  366. <el-button type="primary" class="btnClass" @click="payTypeFlag = '2'">全赠送</el-button>
  367. </div>
  368. <div class="btn">
  369. <el-button type="success" class="btnClass" @click="toCharge(form.patientRegisterNo)">收费</el-button>
  370. </div>
  371. </div>
  372. </div>
  373. <!--查询条件-->
  374. <div style="position: absolute;top:30px;left:180px;display: flex; flex-wrap: wrap; height:60px;">
  375. <div class="query">
  376. <span class="querySpan">查找&nbsp;&nbsp;条码号</span>
  377. <el-input placeholder="条码号" v-model="query.patientRegisterNo" size="small"
  378. clearable style="width: 140px" @change="quickQuery('patientRegisterNo')"/>
  379. </div>
  380. <div class="query">
  381. <span class="querySpan">档案号</span>
  382. <el-input placeholder="档案号" v-model="query.patientNo" size="small"
  383. clearable style="width: 100px" @change="quickQuery('patientNo')" />
  384. </div>
  385. <div class="query">
  386. <span class="querySpan">姓名</span>
  387. <el-input placeholder="姓名" v-model="query.patientName" size="small"
  388. clearable style="width: 80px" @change="quickQuery('patientName')" />
  389. </div>
  390. <div class="query">
  391. <span class="querySpan">手机号</span>
  392. <el-input placeholder="预约手机号" v-model="query.tel" size="small"
  393. clearable style="width: 120px" @change="quickQuery('tel')" />
  394. </div>
  395. </div>
  396. <!-- 人员档案列表 -->
  397. <el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800px" :show-close="false" :close-on-click-modal="false"
  398. :append-to-body="true">
  399. <el-table :data="patientList" border width="800" height="480" row-key="id" size="small"
  400. class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="patientList">
  401. <el-table-column type="index" width="30" />
  402. <el-table-column prop="patientNo" label="档案号" />
  403. <el-table-column prop="lastTime" label="末次体检" width="100">
  404. <template slot-scope="scope">
  405. <div v-if="scope.row.lastTime">
  406. {{ lmoment(scope.row.lastTime, "yyyy-MM-DD") }}
  407. </div>
  408. </template>
  409. </el-table-column>
  410. <el-table-column prop="medicalTimes" label="体检次数" />
  411. <el-table-column prop="displayName" label="姓名" />
  412. <el-table-column prop="sexId" label="性别">
  413. <template slot-scope="scope">
  414. <div>
  415. {{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}
  416. </div>
  417. </template>
  418. </el-table-column>
  419. <el-table-column prop="maritalStatusId" label="婚姻">
  420. <template slot-scope="scope">
  421. <div>
  422. {{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  423. </div>
  424. </template>
  425. </el-table-column>
  426. <el-table-column prop="birthDate" label="出生日期" width="100">
  427. <template slot-scope="scope">
  428. <div v-if="scope.row.birthDate">
  429. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  430. </div>
  431. </template>
  432. </el-table-column>
  433. <el-table-column prop="nationId" label="民族">
  434. <template slot-scope="scope">
  435. <div>
  436. {{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
  437. </div>
  438. </template>
  439. </el-table-column>
  440. <el-table-column prop="idNo" label="身份证号" />
  441. <el-table-column prop="telephone" label="电话" />
  442. <el-table-column prop="mobileTelephone" label="手机号" />
  443. </el-table>
  444. <span slot="footer" class="dialog-footer">
  445. <el-button @click="dialogVisible = false" style="width:90px;">取消</el-button>
  446. <el-button type="primary" @click="choosePatient" style="width:90px;">确定</el-button>
  447. </span>
  448. </el-dialog>
  449. <!-- 体检人员记录列表 -->
  450. <el-dialog title="体检人员列表" :visible.sync="registerVisible" width="800px" :show-close="false" :close-on-click-modal="false"
  451. :append-to-body="true">
  452. <el-table :data="patientRegisters" border width="800" height="480" highlight-current-row
  453. @row-click="registerRowClick" size="small">
  454. <el-table-column prop="completeFlag" label="体检进度">
  455. <template slot-scope="scope">
  456. <div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  457. </template>
  458. </el-table-column>
  459. <el-table-column prop="guidePrintTimes" label="打印" width="50">
  460. <template slot-scope="scope">
  461. <i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 24px;color: green;"></i>
  462. </template>
  463. </el-table-column>
  464. <el-table-column prop="isLock" label="锁住">
  465. <template slot-scope="scope">
  466. <div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
  467. </template>
  468. </el-table-column>
  469. <el-table-column prop="customerOrgParentName" label="单位" width="180">
  470. <template slot-scope="scope">
  471. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
  472. </template>
  473. </el-table-column>
  474. <el-table-column prop="customerOrgName" label="部门" width="180">
  475. <template slot-scope="scope">
  476. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
  477. </template>
  478. </el-table-column>
  479. <el-table-column prop="patientName" label="姓名" />
  480. <el-table-column prop="sexId" label="性别">
  481. <template slot-scope="scope">
  482. <div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
  483. </template>
  484. </el-table-column>
  485. <el-table-column prop="age" label="年龄" />
  486. <el-table-column prop="patientRegisterNo" label="条码号" width="150" />
  487. <el-table-column prop="patientNo" label="档案号" />
  488. <el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
  489. <el-table-column label="分组/套餐" width="150">
  490. <template slot-scope="scope">
  491. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  492. {{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
  493. </div>
  494. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  495. {{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
  496. </div>
  497. </template>
  498. </el-table-column>
  499. <el-table-column prop="nationId" label="民族">
  500. <template slot-scope="scope">
  501. <div>
  502. {{ ldddw(dict.nation, "nationId", scope.row.nationId, "displayName") }}
  503. </div>
  504. </template>
  505. </el-table-column>
  506. <el-table-column prop="idNo" label="身份证" width="150" />
  507. <el-table-column prop="birthDate" label="出生日期" width="100">
  508. <template slot-scope="scope">
  509. <div v-if="scope.row.birthDate">
  510. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  511. </div>
  512. </template>
  513. </el-table-column>
  514. <el-table-column prop="email" label="邮箱" width="180" />
  515. <el-table-column prop="mobileTelephone" label="手机" width="100" />
  516. <el-table-column prop="telephone" label="电话" width="100" />
  517. <el-table-column prop="address" label="地址" width="300" />
  518. <el-table-column prop="medicalCardNo" label="体检卡号" />
  519. <el-table-column prop="jobCardNo" label="工卡号" />
  520. <el-table-column prop="maritalStatusId" label="婚姻状况">
  521. <template slot-scope="scope">
  522. <div>
  523. {{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  524. </div>
  525. </template>
  526. </el-table-column>
  527. <el-table-column prop="medicalTypeId" label="体检类别">
  528. <template slot-scope="scope">
  529. <div v-if="scope.row.medicalTypeId !== dict.personOrgId">
  530. {{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
  531. </div>
  532. </template>
  533. </el-table-column>
  534. <el-table-column prop="personnelTypeId" label="人员类别">
  535. <template slot-scope="scope">
  536. <div v-if="scope.row.personnelTypeId !== dict.personOrgId">
  537. {{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
  538. </div>
  539. </template>
  540. </el-table-column>
  541. <el-table-column prop="jobPost" label="职务" />
  542. <el-table-column prop="jobTitle" label="职称" />
  543. <el-table-column prop="salesman" label="介绍人" />
  544. <el-table-column prop="isVip" label="是否VIP">
  545. <template slot-scope="scope">
  546. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  547. </template>
  548. </el-table-column>
  549. <el-table-column prop="creatorName" label="登记人" />
  550. <el-table-column prop="creationTime" label="登记日期" width="100">
  551. <template slot-scope="scope">
  552. <div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
  553. </template>
  554. </el-table-column>
  555. <el-table-column prop="isUpload" label="是否上传">
  556. <template slot-scope="scope">
  557. <div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
  558. </template>
  559. </el-table-column>
  560. <!--
  561. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  562. "interposeMeasure": null,
  563. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  564. "reportPrintTimes": 0,
  565. "isMedicalStart": "N",
  566. "medicalStartDate": "6/28/2023",
  567. "isRecoverGuide": "N",
  568. "summaryDate": "",
  569. "summaryDoctor": null,
  570. "isAudit": "N",
  571. "auditDoctor": null,
  572. "auditDate": "",
  573. "isNameHide": "N",
  574. "isPhoneFollow": "N",
  575. "thirdInfo": null,
  576. "guidePrintTimes": null,
  577. "remark": null,
  578. "organizationUnitId": "00000000-0000-0000-0000-000000000000",
  579. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  580. "lastModifierName": "",
  581. "lastModificationTime": null,
  582. "lastModifierId": null,
  583. "creatorId": null,
  584. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  585. -->
  586. </el-table>
  587. <span slot="footer" class="dialog-footer">
  588. <el-button @click="registerVisible = false" style="width:90px;">取消</el-button>
  589. <el-button type="primary" @click="chooseRegister" style="width:90px;">确定</el-button>
  590. </span>
  591. </el-dialog>
  592. <!-- 拍照openCamera 网页模式已废弃
  593. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600"
  594. :close-on-click-modal="false" :append-to-body="true">
  595. <Camera :id="form.id" />
  596. </el-dialog>
  597. -->
  598. <!-- 检验条码补打 -->
  599. <el-dialog title="检验条码补打" :visible.sync="patientRegister.lisRequestVisble" width="600px" height="400"
  600. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  601. <LisRequest :id="form.id" :brushTimes="brushTimes" />
  602. </el-dialog>
  603. <!-- 手动合并项目 -->
  604. <el-dialog title="手动合并项目" :visible.sync="patientRegister.mergeAsbitemVisble" width="600px" height="400"
  605. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  606. <MergeAsbitem :id="form.id" :organizationUnitId="form.organizationUnitId" :brushTimes="brushTimes" />
  607. </el-dialog>
  608. </div>
  609. </template>
  610. <script>
  611. import moment from "moment";
  612. import { mapState, mapActions } from "vuex";
  613. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  614. import mm from "../../utlis/mm";
  615. import { objCopy, setNull, dddw,checkIDCode, parseID, birthdayToAge,ageToBirthday, deepCopy, arrayFilter, parsIcCardtoLocal, photoParse, savePeoplePhoto, arrayExistObj } from "../../utlis/proFunc";
  616. import Camera from "./Camera.vue";
  617. import PatientRegisterItem from "./PatientRegisterItem.vue";
  618. import LisRequest from "./LisRequest.vue";
  619. import MergeAsbitem from "./MergeAsbitem.vue";
  620. export default {
  621. components: {
  622. Camera,
  623. LisRequest,
  624. MergeAsbitem,
  625. PatientRegisterItem,
  626. },
  627. props: ['formInitData', 'editTimes'],
  628. data() {
  629. return {
  630. apiurl: mm.apiurl,
  631. brushTimes: 0,
  632. payTypeFlag: '',
  633. peisid: null,
  634. peoplePhoto: '',
  635. query: {
  636. patientRegisterNo: '',
  637. patientNo: '',
  638. patientName: '',
  639. tel: ''
  640. },
  641. form: {
  642. id: "", //id
  643. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  644. patientNo: "", //档案号
  645. customerOrgId: null, //单位编号
  646. customerOrgGroupId: null, //分组
  647. medicalPackageId: null, //套餐
  648. patientName: "", //姓名
  649. birthDate: null, //日期型
  650. sexId: "U", //性别 默认未知U
  651. age: null, //年龄
  652. jobCardNo: "", //工卡号
  653. medicalCardNo: "", //体检卡号
  654. maritalStatusId: "9", //婚姻状况 默认未知
  655. medicalTypeId: null, //体检类别
  656. personnelTypeId: null, //人员类别
  657. jobPost: "", //职务
  658. jobTitle: "", //职称
  659. salesman: "", //介绍人
  660. sexHormoneTermId: null, //性激素期限
  661. isNameHide: "N", //隐藏姓名
  662. isPhoneFollow: "N", //电话随访
  663. isVip: "N", //vip客户
  664. remark: "", //
  665. isLock: "N", //是否锁住
  666. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  667. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  668. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  669. medicalTimes: 1, //条码号 【创建编辑时不操作】
  670. organizationUnitId: null, //体检中心
  671. address: "", //地址
  672. email: "", //email
  673. idNo: "", //身份证号
  674. telephone: "", //电话
  675. mobileTelephone: "", //手机号
  676. nationId: null, //民族编号
  677. birthPlaceId: null, //籍惯(出生地)
  678. postalCode: "", //邮编
  679. creatorId: null,
  680. creationTime: "",
  681. lastModificationTime: "",
  682. lastModifierId: null,
  683. isVipBox: false, //vip客户
  684. isNameHideBox: false, //隐藏姓名
  685. isPhoneFollowBox: false, //电话随访
  686. isLockBox: false, //是否锁住
  687. customerOrgRegisterId: null,
  688. isMaxMedicalTimes: 'N',
  689. }, //单位 记录 目前新增与更新是一致
  690. customerOrgRegisterList: [], //单位体检次数列表
  691. defaultNull: [
  692. "customerOrgId",
  693. "customerOrgGroupId",
  694. "medicalPackageId",
  695. "birthDate",
  696. "age",
  697. "medicalTypeId",
  698. "personnelTypeId",
  699. "sexHormoneTermId",
  700. "organizationUnitId",
  701. "nationId",
  702. "birthPlaceId",
  703. ], //一般uuid字段为空时,需设置为null值
  704. rules: {
  705. customerOrgId:[
  706. { required: true, message: "请填写单位", trigger: "blur" },
  707. ],
  708. patientName: [
  709. { required: true, message: "请填写姓名", trigger: "blur" },
  710. ],
  711. organizationUnitId: [
  712. { required: true, message: "请填写体检中心", trigger: "blur" },
  713. ],
  714. },
  715. dialogVisible: false,
  716. patientList: [], //人员列表(用于判断人员多次体检)
  717. patientChoosed: {}, //查重选中的人员
  718. registerVisible:false,
  719. patientRegisters:[],
  720. registerChoosed:{},
  721. dialogCamera: false, //拍照组件
  722. };
  723. },
  724. created() {
  725. this.peisid = window.sessionStorage.getItem('peisid');
  726. if (!this.form.id) {
  727. this.form.organizationUnitId = this.peisid;
  728. }
  729. objCopy(this.formInitData, this.form);
  730. this.initBox();
  731. this.getPeoplePhoto(this.patientRegister.photo)
  732. },
  733. //挂载完成
  734. mounted() {
  735. // objCopy(this.formInitData, this.form);
  736. // this.initBox();
  737. // this.getCustomerOrgRegisterList()
  738. // this.getPeoplePhoto(this.patientRegister.photo)
  739. },
  740. computed: {
  741. ...mapState(["window", "dict", "patientRegister", "customerOrg", "projPriv"]),
  742. },
  743. methods: {
  744. ...mapActions(['getPatientRegisterAbs']),
  745. //快速查找个人数据
  746. quickQuery(type) {
  747. let url1 = '/api/app/patientregister/getpatientregisterorpatient'
  748. let body={}
  749. let url2 = '/api/app/patientregister/getlistinfilter'
  750. switch (type) {
  751. case 'patientNo':
  752. if(!this.query.patientNo) return;
  753. body = {
  754. sType:2,
  755. patientNo:this.query.patientNo
  756. }
  757. this.getpatientregisterorpatient(url1,body)
  758. break;
  759. case 'patientRegisterNo':
  760. if(!this.query.patientRegisterNo) return;
  761. body = {
  762. sType:1,
  763. patientRegisterNo:this.query.patientRegisterNo
  764. }
  765. this.getpatientregisterorpatient(url1,body)
  766. break;
  767. case 'tel':
  768. if(!this.query.tel) return;
  769. body = {
  770. phone:this.query.tel
  771. }
  772. this.getlistinfilter(url2,body);
  773. break;
  774. case 'patientName':
  775. if(!this.query.patientName) return;
  776. body = {
  777. patientName:this.query.patientName
  778. }
  779. this.getlistinfilter(url2,body);
  780. break;
  781. default:
  782. return;
  783. }
  784. },
  785. //按流水号或档案号查客户信息
  786. getpatientregisterorpatient(url,body){
  787. postapi(url,body)
  788. .then((res) => {
  789. console.log('getpatientregisterorpatient', res)
  790. if (res.code == 1) {
  791. objCopy(res.data, this.form)
  792. this.patientRegister.patientRegisterId = res.data.id
  793. this.patientRegister.photo = res.data.photo
  794. this.getPatientRegisterAbs(res.data.id)
  795. }else if(res.code == 0){
  796. this.$message.info("未找到相关信息")
  797. }
  798. });
  799. },
  800. //按手机号或姓名查找客户信息
  801. getlistinfilter(url,body){
  802. postapi(url, body)
  803. .then((res) => {
  804. if (res.code != -1) {
  805. if(res.data.items.length == 0){
  806. this.$message.info("未找到相关信息")
  807. }else if(res.data.items.length == 1){
  808. objCopy(res.data.items[0], this.form)
  809. this.patientRegister.patientRegisterId = res.data.items[0].id
  810. this.patientRegister.photo = res.data.items[0].photo
  811. this.getPatientRegisterAbs(res.data.items[0].id)
  812. }else{
  813. //显示列表,供选择
  814. this.patientRegisters = res.data.items
  815. this.registerVisible = true
  816. }
  817. }
  818. });
  819. },
  820. //读取身份证信息
  821. peopleIcCard() {
  822. if(!this.$peisAPI) {
  823. this.$message.info("此功能,需要在壳客户端才可运行!")
  824. return
  825. }
  826. this.$peisAPI.peopleIcCard().then(res => {
  827. //console.log('peopleIcCard',res)
  828. let lres = JSON.parse(res)
  829. if (lres.code >= 0) {
  830. let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
  831. this.form.patientName = idNos.Name
  832. this.form.birthDate = idNos.birthDate
  833. this.form.sexId = idNos.sexId
  834. this.form.age = idNos.age
  835. this.form.nationId = idNos.nationId
  836. this.form.idNo = idNos.IDCode
  837. this.form.address = idNos.Address
  838. this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  839. }
  840. })
  841. },
  842. //获取单位体检次数列表,并默认赋最后一次体检次数
  843. async getCustomerOrgRegisterList() {
  844. this.customerOrgRegisterList = []
  845. if (this.form.customerOrgId == this.dict.personOrgId) {
  846. this.form.customerOrgRegisterId = null
  847. return
  848. }
  849. try {
  850. let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`);
  851. let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`);
  852. this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N')
  853. //要把已完成体检的次数去掉 (查询时不能触发保存)
  854. // if (this.customerOrgRegisterList.length > 0) {
  855. // this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id
  856. // //this.changeCustomerOrgGroupId()
  857. // this.changeMedicalTimes()
  858. // }
  859. } catch (error) {
  860. console.log(error)
  861. }
  862. },
  863. //修改单位体检次数
  864. changeMedicalTimes() {
  865. this.form.customerOrgGroupId = null
  866. this.changeCustomerOrgGroupId()
  867. //获取体检次数下的分组
  868. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  869. },
  870. //获取体检次数下的分组
  871. getCustomerOrgGroup(customerOrgRegisterId) {
  872. this.patientRegister.customerOrgGroup = []
  873. getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => {
  874. if (res.code != - 1) {
  875. this.patientRegister.customerOrgGroup = res.data.items;
  876. }
  877. })
  878. },
  879. //修改出生日期
  880. changeBirthDate() {
  881. this.form.age = birthdayToAge(this.form.birthDate)
  882. },
  883. //修改出生日期
  884. changeAge() {
  885. this.form.birthDate = ageToBirthday(this.form.age)
  886. },
  887. //修改身份证,生成年龄、出生、性别
  888. changeIdNo() {
  889. this.Query(this.form.idNo)
  890. let ret = parseID(this.form.idNo)
  891. if (ret.age != -1) {
  892. this.form.birthDate = new Date(ret.birthday)
  893. this.form.age = ret.age
  894. this.form.sexId = ret.sex
  895. }
  896. },
  897. //分组改变时触发
  898. changeCustomerOrgGroupId() {
  899. this.patientRegister.customerOrgGroupChange++;
  900. if (this.form.id) this.btnSubmit('form', false);
  901. },
  902. //套餐改变时触发
  903. changeMedicalPackageId() {
  904. this.patientRegister.medicalPackageChange++;
  905. if (this.form.id) this.btnSubmit('form', false);
  906. },
  907. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  908. Query(param) {
  909. //编辑的时候不查重
  910. if (this.form.id || !param) return;
  911. //console.log(`/api/app/patient/in-filter?Filter=${param}`)
  912. let body = {
  913. filter:param,
  914. maxResultCount:500
  915. }
  916. postapi('/api/app/patient/getlistinfilter',body).then((res) => {
  917. if (res.code != -1) {
  918. console.log("查重 ", res); //有数据才显示
  919. if (res.data.items && res.data.items.length > 0) {
  920. this.patientList = res.data.items;
  921. this.dialogVisible = true;
  922. }
  923. }
  924. });
  925. },
  926. //列表选中
  927. rowick(row) {
  928. this.patientChoosed = row;
  929. },
  930. //确定选择人员
  931. choosePatient() {
  932. if (!this.patientChoosed) {
  933. alert("请选中人员档案信息");
  934. return;
  935. }
  936. this.dialogVisible = false;
  937. this.form.patientId = this.patientChoosed.id;
  938. this.form.patientName = this.patientChoosed.displayName;
  939. this.form.sexId = this.patientChoosed.sexId;
  940. this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  941. this.form.birthDate = new Date(this.patientChoosed.birthDate);
  942. this.form.nationId = this.patientChoosed.nationId;
  943. this.form.idNo = this.patientChoosed.idNo;
  944. this.form.telephone = this.patientChoosed.telephone;
  945. this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  946. this.form.patientNo = this.patientChoosed.patientNo;
  947. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  948. if (this.form.birthDate) {
  949. this.form.age = birthdayToAge(this.form.birthDate)
  950. }
  951. if (this.form.idNo) {
  952. let ret = parseID(this.form.idNo)
  953. if (!this.form.birthDate) this.form.birthDate = new Date(ret.birthday)
  954. if (!this.form.age) this.form.age = ret.age
  955. if (!this.form.sexId) this.form.age = ret.sex
  956. }
  957. },
  958. registerRowClick(row){
  959. this.registerChoosed = row;
  960. },
  961. chooseRegister(){
  962. if (!this.registerChoosed) {
  963. alert("请选中人员档案信息");
  964. return;
  965. }
  966. objCopy(this.registerChoosed, this.form)
  967. this.patientRegister.patientRegisterId = this.registerChoosed.id
  968. this.patientRegister.photo = this.registerChoosed.photo
  969. this.registerVisible = false
  970. this.getPatientRegisterAbs(this.registerChoosed.id)
  971. },
  972. ldddw(arrayData, key, value, display) {
  973. return dddw(arrayData, key, value, display);
  974. },
  975. lmoment(date, forMat) {
  976. return moment(new Date(date)).format(forMat);
  977. },
  978. changeBox(type) {
  979. //赋值
  980. if (this.form[type + 'Box']) {
  981. this.form[type] = 'Y';
  982. } else {
  983. this.form[type] = 'N';
  984. }
  985. },
  986. initBox() {
  987. if (this.form.isVip == 'Y') {
  988. this.form.isVipBox = true;
  989. } else {
  990. this.form.isVipBox = false;
  991. }
  992. if (this.form.isNameHide == 'Y') {
  993. this.form.isNameHideBox = true;
  994. } else {
  995. this.form.isNameHideBox = false;
  996. }
  997. if (this.form.isPhoneFollow == 'Y') {
  998. this.form.isPhoneFollowBox = true;
  999. } else {
  1000. this.form.isPhoneFollowBox = false;
  1001. }
  1002. if (this.form.isLock == 'Y') {
  1003. this.form.isLockBox = true;
  1004. } else {
  1005. this.form.isLockBox = false;
  1006. }
  1007. if (!this.form.id) {
  1008. this.form.organizationUnitId = this.peisid;
  1009. }
  1010. },
  1011. //提交
  1012. btnSubmit(formName, msgTip) {
  1013. this.$refs[formName].validate((valid,fields) => {
  1014. console.log('fields',fields)
  1015. if(!valid){
  1016. this.$message.warning(fields[Object.keys(fields)[0]][0].message);
  1017. return false
  1018. }
  1019. if(this.form.customerOrgId != this.dict.personOrgId){
  1020. if(!this.form.customerOrgRegisterId){
  1021. this.$message.warning("请填写单位体检次数!");
  1022. return false
  1023. }
  1024. }
  1025. if(this.form.idNo && checkIDCode(this.form.idNo) == false){
  1026. this.$message.warning("身份证号填写不合法!");
  1027. return false
  1028. }
  1029. //赋值
  1030. let body = deepCopy(this.form);
  1031. if (this.form.birthDate && this.form.birthDate != "Invalid date") {
  1032. body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD")
  1033. }else{
  1034. body.birthDate = null
  1035. }
  1036. delete body.id;
  1037. delete body.patientRegisterNo;
  1038. delete body.medicalTimes;
  1039. delete body.completeFlag;
  1040. delete body.isMedicalStart;
  1041. delete body.patientNo;
  1042. delete body.creatorId;
  1043. delete body.creationTime;
  1044. delete body.lastModificationTime;
  1045. delete body.lastModifierId;
  1046. delete body.isVipBox;
  1047. delete body.isNameHideBox;
  1048. delete body.isPhoneFollowBox;
  1049. delete body.isLockBox;
  1050. delete body.photo;
  1051. setNull(body, this.defaultNull);
  1052. //日期转换 日期控件增加格式
  1053. // console.log("body.birthDate", body.birthDate);
  1054. // if (body.birthDate) {
  1055. // body.birthDate = moment(new Date(body.birthDate)).format(
  1056. // "yyyy-MM-DD"
  1057. // );
  1058. // }
  1059. if (this.form.id.length < 1) {
  1060. //id为空则新增
  1061. console.log(`/api/patientregister/createreturninfo`, body);
  1062. postapi(`/api/patientregister/createreturninfo`, body).then(
  1063. (res) => {
  1064. if (res.code == 1) {
  1065. //console.log('res',res)
  1066. if (msgTip) this.$message.success("创健 操作成功");
  1067. //一般读身份证照片时,会出现这种情况
  1068. if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo);
  1069. objCopy(res.data, this.form);
  1070. // this.patientRegister.prList.push(res.data); //列表添加记录
  1071. this.patientRegister.patientRegisterId = res.data.id;
  1072. objCopy(this.form, this.patientRegister.patientRegisterRd);
  1073. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)放在窗口关闭事件中去
  1074. let curRow = deepCopy(this.patientRegister.patientRegisterRd)
  1075. curRow.index = this.patientRegister.prList.length
  1076. this.patientRegister.prList.push(curRow)
  1077. //触发已选组合项目保存
  1078. this.patientRegister.patientRegisterAbs.forEach(e => {
  1079. e.patientRegisterId = res.data.id;
  1080. return e;
  1081. });
  1082. this.patientRegister.saveTimes++;
  1083. }
  1084. }
  1085. );
  1086. } else {
  1087. //id不为空则编辑 api/patientregister/updatepatientregister
  1088. console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body);
  1089. postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => {
  1090. if (res.code == 1) {
  1091. if (msgTip) this.$message.success("更新 操作成功");
  1092. //一般读身份证照片时,会出现这种情况
  1093. if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
  1094. objCopy(this.form, this.patientRegister.patientRegisterRd);
  1095. // this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新) 放在窗口关闭事件中去
  1096. // let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  1097. // if(lfind > - 1) objCopy(this.form,this.patientRegister.prList[lfind])
  1098. //this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存
  1099. }
  1100. });
  1101. }
  1102. });
  1103. },
  1104. //将现有的数据,复制并展现,但未保存
  1105. rdCopy() {
  1106. if (!this.patientRegister.patientRegisterId) {
  1107. this.$message.info("该信息尚未保存,不可执行此操作!");
  1108. return;
  1109. }
  1110. this.patientRegister.photo = '/pic/Photo.jpg'
  1111. this.patientRegister.patientRegisterId = '';
  1112. this.form.id = '';
  1113. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  1114. this.form.patientRegisterNo = '';
  1115. this.form.patientNo = '';
  1116. this.form.medicalTimes = 1;
  1117. this.form.patientName = '';
  1118. this.form.photo = '';
  1119. this.patientRegister.patientRegisterAbs.forEach(e => {
  1120. e.patientRegisterId = '';
  1121. e.id = '';
  1122. return e;
  1123. });
  1124. // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  1125. this.$message.info("操作成功,确定请记得点保存");
  1126. },
  1127. //删除
  1128. del() {
  1129. deletapi(
  1130. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  1131. ).then((res) => {
  1132. this.$message.success("删除 操作成功");
  1133. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  1134. this.getCustomerOrgTree();
  1135. });
  1136. },
  1137. //拍照(已废弃)
  1138. // openCamera() {
  1139. // if (!this.form.id) {
  1140. // alert("请先保存人员信息");
  1141. // return;
  1142. // }
  1143. // this.patientRegister.cameraVisble = true;
  1144. // },
  1145. //拍照(调壳程序)
  1146. photoGrah() {
  1147. if (!this.form.id) {
  1148. alert("请先保存人员信息");
  1149. return;
  1150. }
  1151. if(!this.$peisAPI) {
  1152. this.$message.info("此功能,需要在壳客户端才可运行!")
  1153. return
  1154. }
  1155. this.$peisAPI.photoGrah()
  1156. .then(res => {
  1157. console.log(res)
  1158. //alert(res)
  1159. let lres = JSON.parse(res)
  1160. if (lres.code && lres.code.toLowerCase() == 'success') {
  1161. let uploadPhoto = {
  1162. patientRegisterId: this.form.id,
  1163. photo: lres.Photo,
  1164. };
  1165. this.patientRegister.photo = `data:image/${lres.PhotoFormat};base64,${lres.Photo}`
  1166. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  1167. } else {
  1168. this.$message.error("上传照片错误" + lres.code)
  1169. }
  1170. }).then(res => {
  1171. if (res.code == 1) {
  1172. let body = {
  1173. patientRegisterId: this.form.id,
  1174. photo: res.data,
  1175. };
  1176. console.log(body);
  1177. return postapi(`/api/app/patient-register/update-photo`, body);
  1178. }
  1179. }).then(res => {
  1180. if (res.code != -1) {
  1181. //console.log('拍照',res.data)
  1182. this.patientRegister.patientRegisterRd.photo = res.data.photo
  1183. this.$message.success("操作成功");
  1184. }
  1185. }).catch(err => {
  1186. console.log('this.$peisAPI.photoGrah', err)
  1187. })
  1188. },
  1189. getPeoplePhoto(photo) {
  1190. this.peoplePhoto = photoParse(photo)
  1191. },
  1192. // 打印指引单(isPreview)
  1193. async guidePrint(ReportCode, isPreview) {
  1194. if (this.form.id.length < 1) {
  1195. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1196. return;
  1197. }
  1198. if(!this.$peisAPI) {
  1199. this.$message.info("此功能,需要在壳客户端才可运行!")
  1200. return
  1201. }
  1202. let token = localStorage.getItem('token');
  1203. let user = localStorage.getItem('user');
  1204. let toOutShell = {
  1205. ReportCode, token,
  1206. preViewCanPrint: 'N',
  1207. Parameters: [
  1208. { Name: 'printer', Value: user },
  1209. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1210. ],
  1211. };
  1212. if (isPreview) {
  1213. //
  1214. //this.multipleSelection.forEach((item,index) =>{
  1215. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  1216. .then((res) => {
  1217. if (res.code != -1) {
  1218. toOutShell.ReportTable = res.data;
  1219. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1220. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1221. }
  1222. })
  1223. .catch(err => {
  1224. this.$message.warning(err);
  1225. });
  1226. // });
  1227. } else {
  1228. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  1229. .then((res) => {
  1230. if (res.code != -1) {
  1231. toOutShell.ReportTable = res.data;
  1232. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1233. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1234. }
  1235. })
  1236. .then(res => {
  1237. if (res.code != -1) {
  1238. //更新打印次数
  1239. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  1240. }
  1241. })
  1242. .then(res => {
  1243. if (res.code != -1) {
  1244. lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  1245. if (lfind > -1) {
  1246. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  1247. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  1248. } else {
  1249. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  1250. }
  1251. }
  1252. }
  1253. })
  1254. .catch(err => {
  1255. this.$message.warning(err);
  1256. });
  1257. }
  1258. },
  1259. //检验申请
  1260. async lisRequest() {
  1261. let isPrintLisRequest = false
  1262. let res = null
  1263. if (this.form.id.length < 1) {
  1264. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1265. return;
  1266. }
  1267. try {
  1268. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  1269. console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  1270. } catch (error) {
  1271. return;
  1272. }
  1273. if (res.code != -1) {
  1274. this.$message.info("发送检验申请成功!");
  1275. isPrintLisRequest = true;
  1276. }
  1277. //重复申请,重打
  1278. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  1279. isPrintLisRequest = true;
  1280. }
  1281. if (!isPrintLisRequest) return;
  1282. try {
  1283. await this.$confirm("是否打印检验申请单?", "提示", {
  1284. confirmButtonText: "是",
  1285. cancelButtonText: "否",
  1286. type: "info",
  1287. showClose: false,
  1288. closeOnClickModal: false,
  1289. closeOnPressEscape: false,
  1290. });
  1291. } catch (error) {
  1292. return;
  1293. }
  1294. //打印检验申请单
  1295. this.lisPrint('0003', false);
  1296. },
  1297. //条码打印
  1298. lisPrint(ReportCode, isPreview) {
  1299. if (this.form.id.length < 1) {
  1300. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1301. return;
  1302. }
  1303. if(!this.$peisAPI) {
  1304. this.$message.info("此功能,需要在壳客户端才可运行!")
  1305. return
  1306. }
  1307. let token = localStorage.getItem('token');
  1308. let user = localStorage.getItem('user');
  1309. let toOutShell = {
  1310. ReportCode, token,
  1311. Parameters: [
  1312. { Name: 'printer', Value: user },
  1313. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1314. ],
  1315. };
  1316. if (isPreview) {
  1317. //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
  1318. //this.multipleSelection.forEach((item,index) =>{
  1319. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  1320. .then((res) => {
  1321. if (res.code != -1) {
  1322. toOutShell.ReportTable = { lisRequest: res.data };
  1323. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1324. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1325. }
  1326. })
  1327. .catch(err => {
  1328. this.$message.warning(err);
  1329. });
  1330. // });
  1331. } else {
  1332. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  1333. .then((res) => {
  1334. if (res.code != -1) {
  1335. toOutShell.ReportTable = { lisRequest: res.data };
  1336. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1337. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1338. }
  1339. })
  1340. .then(res => {
  1341. if (res.code != -1) {
  1342. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  1343. // {
  1344. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  1345. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1346. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1347. // }
  1348. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  1349. }
  1350. })
  1351. .catch(err => {
  1352. this.$message.warning(err);
  1353. });
  1354. }
  1355. },
  1356. //补打条码
  1357. reLisRequest() {
  1358. if (this.form.id.length < 1) {
  1359. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1360. return;
  1361. }
  1362. this.brushTimes++;
  1363. this.patientRegister.lisRequestVisble = true;
  1364. },
  1365. //手动合并项目
  1366. reMergeAsbitem() {
  1367. if (this.form.id.length < 1) {
  1368. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1369. return;
  1370. }
  1371. this.brushTimes++;
  1372. this.patientRegister.mergeAsbitemVisble = true;
  1373. },
  1374. toCharge(patientRegisterNo) {
  1375. this.patientRegister.patientRegisterRd.patientRegisterNo = patientRegisterNo;
  1376. this.$router.push({ path: "/charge" });
  1377. },
  1378. },
  1379. //监听事件
  1380. watch: {
  1381. "form.customerOrgId"(newVal, oldVal) {
  1382. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  1383. if (newVal != oldVal) {
  1384. this.getCustomerOrgRegisterList()
  1385. }
  1386. },
  1387. //新增或编辑
  1388. "editTimes"(newVal, oldVal) {
  1389. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  1390. if (newVal != oldVal) {
  1391. console.log('this.editTimes', this.editTimes,this.formInitData)
  1392. objCopy(this.formInitData, this.form);
  1393. this.initBox();
  1394. this.getPeoplePhoto(this.patientRegister.photo)
  1395. //console.log('this.form',this.form)
  1396. }
  1397. },
  1398. //拍照触发
  1399. "patientRegister.photo"(newVal, oldVal) {
  1400. //console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  1401. if (newVal != oldVal) {
  1402. this.getPeoplePhoto(newVal)
  1403. }
  1404. },
  1405. },
  1406. };
  1407. </script>
  1408. <style scoped>
  1409. .btn {
  1410. margin-top: 5px;
  1411. }
  1412. .btnClass {
  1413. width: 100px;
  1414. }
  1415. .query {
  1416. margin-left: 10px;
  1417. }
  1418. .querySpan {
  1419. margin-right: 2px;
  1420. }
  1421. </style>