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.

1501 lines
58 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
  1. <template>
  2. <div>
  3. <div style="display: flex">
  4. <div :style="'width:' + (window.pageWidth - 120 - 30) + '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" @blur="Query(form.patientName)" size="small"></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" @blur="Query(form.idNo)" 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"></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:65px;right:' + (110 + 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;width:110px;">
  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="800" :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="800" :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, parseID, birthdayToAge, 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. "age",
  696. "medicalTypeId",
  697. "personnelTypeId",
  698. "sexHormoneTermId",
  699. "organizationUnitId",
  700. "nationId",
  701. "birthPlaceId",
  702. ], //一般uuid字段为空时,需设置为null值
  703. rules: {
  704. customerOrgId:[
  705. { required: true, message: "请填写单位", trigger: "blur" },
  706. ],
  707. patientName: [
  708. { required: true, message: "请填写姓名", trigger: "blur" },
  709. ],
  710. organizationUnitId: [
  711. { required: true, message: "请填写体检中心", trigger: "blur" },
  712. ],
  713. },
  714. dialogVisible: false,
  715. patientList: [], //人员列表(用于判断人员多次体检)
  716. patientChoosed: {}, //查重选中的人员
  717. registerVisible:false,
  718. patientRegisters:[],
  719. registerChoosed:{},
  720. dialogCamera: false, //拍照组件
  721. };
  722. },
  723. created() {
  724. this.peisid = window.sessionStorage.getItem('peisid');
  725. if (!this.form.id) {
  726. this.form.organizationUnitId = this.peisid;
  727. }
  728. objCopy(this.formInitData, this.form);
  729. this.initBox();
  730. this.getPeoplePhoto(this.patientRegister.photo)
  731. },
  732. //挂载完成
  733. mounted() {
  734. // objCopy(this.formInitData, this.form);
  735. // this.initBox();
  736. // this.getCustomerOrgRegisterList()
  737. // this.getPeoplePhoto(this.patientRegister.photo)
  738. },
  739. computed: {
  740. ...mapState(["window", "dict", "patientRegister", "customerOrg", "projPriv"]),
  741. },
  742. methods: {
  743. ...mapActions(['getPatientRegisterAbs']),
  744. //快速查找个人数据
  745. quickQuery(type) {
  746. let url1 = '/api/app/patientregister/getpatientregisterorpatient'
  747. let body={}
  748. let url2 = '/api/app/patientregister/getlistinfilter'
  749. switch (type) {
  750. case 'patientNo':
  751. if(!this.query.patientNo) return;
  752. body = {
  753. sType:2,
  754. patientNo:this.query.patientNo
  755. }
  756. this.getpatientregisterorpatient(url1,body)
  757. break;
  758. case 'patientRegisterNo':
  759. if(!this.query.patientRegisterNo) return;
  760. body = {
  761. sType:1,
  762. patientRegisterNo:this.query.patientRegisterNo
  763. }
  764. this.getpatientregisterorpatient(url1,body)
  765. break;
  766. case 'tel':
  767. if(!this.query.tel) return;
  768. body = {
  769. phone:this.query.tel
  770. }
  771. this.getlistinfilter(url2,body);
  772. break;
  773. case 'patientName':
  774. if(!this.query.patientName) return;
  775. body = {
  776. patientName:this.query.patientName
  777. }
  778. this.getlistinfilter(url2,body);
  779. break;
  780. default:
  781. return;
  782. }
  783. },
  784. //按流水号或档案号查客户信息
  785. getpatientregisterorpatient(url,body){
  786. postapi(url,body)
  787. .then((res) => {
  788. console.log('getpatientregisterorpatient', res)
  789. if (res.code == 1) {
  790. objCopy(res.data, this.form)
  791. this.patientRegister.patientRegisterId = res.data.id
  792. this.patientRegister.photo = res.data.photo
  793. this.getPatientRegisterAbs(res.data.id)
  794. }else if(res.code == 0){
  795. this.$message.info("未找到相关信息")
  796. }
  797. });
  798. },
  799. //按手机号或姓名查找客户信息
  800. getlistinfilter(url,body){
  801. postapi(url, body)
  802. .then((res) => {
  803. if (res.code != -1) {
  804. if(res.data.items.length == 0){
  805. this.$message.info("未找到相关信息")
  806. }else if(res.data.items.length == 1){
  807. objCopy(res.data.items[0], this.form)
  808. this.patientRegister.patientRegisterId = res.data.items[0].id
  809. this.patientRegister.photo = res.data.items[0].photo
  810. this.getPatientRegisterAbs(res.data.items[0].id)
  811. }else{
  812. //显示列表,供选择
  813. this.patientRegisters = res.data.items
  814. this.registerVisible = true
  815. }
  816. }
  817. });
  818. },
  819. //读取身份证信息
  820. peopleIcCard() {
  821. this.$peisAPI.peopleIcCard().then(res => {
  822. //console.log('peopleIcCard',res)
  823. let lres = JSON.parse(res)
  824. if (lres.code && lres.code.toLowerCase() == 'success') {
  825. this.projPriv.idNos = lres
  826. let idNos = parsIcCardtoLocal(this.projPriv.idNos, this.dict.sex, this.dict.nation)
  827. this.form.patientName = idNos.Name
  828. this.form.birthDate = idNos.birthDate
  829. this.form.sexId = idNos.sexId
  830. this.form.age = idNos.age
  831. this.form.nationId = idNos.nationId
  832. this.form.idNo = idNos.IDCode
  833. this.form.address = idNos.Address
  834. this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  835. }
  836. })
  837. },
  838. //获取单位体检次数列表,并默认赋最后一次体检次数
  839. async getCustomerOrgRegisterList() {
  840. this.customerOrgRegisterList = []
  841. if (this.form.customerOrgId == this.dict.personOrgId) {
  842. this.form.customerOrgRegisterId = null
  843. return
  844. }
  845. try {
  846. let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`);
  847. let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`);
  848. this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N')
  849. //要把已完成体检的次数去掉 (查询时不能触发保存)
  850. // if (this.customerOrgRegisterList.length > 0) {
  851. // this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id
  852. // //this.changeCustomerOrgGroupId()
  853. // this.changeMedicalTimes()
  854. // }
  855. } catch (error) {
  856. console.log(error)
  857. }
  858. },
  859. //修改单位体检次数
  860. changeMedicalTimes() {
  861. this.form.customerOrgGroupId = null
  862. this.changeCustomerOrgGroupId()
  863. //获取体检次数下的分组
  864. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  865. },
  866. //获取体检次数下的分组
  867. getCustomerOrgGroup(customerOrgRegisterId) {
  868. this.patientRegister.customerOrgGroup = []
  869. getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => {
  870. if (res.code != - 1) {
  871. this.patientRegister.customerOrgGroup = res.data.items;
  872. }
  873. })
  874. },
  875. //修改出生日期
  876. changeBirthDate() {
  877. this.form.age = birthdayToAge(this.form.birthDate)
  878. },
  879. //修改身份证,生成年龄、出生、性别
  880. changeIdNo() {
  881. let ret = parseID(this.form.idNo)
  882. if (ret.age != -1) {
  883. this.form.birthDate = new Date(ret.birthday)
  884. this.form.age = ret.age
  885. this.form.sexId = ret.sex
  886. }
  887. },
  888. //分组改变时触发
  889. changeCustomerOrgGroupId() {
  890. this.patientRegister.customerOrgGroupChange++;
  891. if (this.form.id) this.btnSubmit('form', false);
  892. },
  893. //套餐改变时触发
  894. changeMedicalPackageId() {
  895. this.patientRegister.medicalPackageChange++;
  896. if (this.form.id) this.btnSubmit('form', false);
  897. },
  898. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  899. Query(param) {
  900. //编辑的时候不查重
  901. if (this.form.id || !param) return;
  902. //console.log(param)
  903. getapi(`/api/app/patient/in-filter?Filter=${param}`).then((res) => {
  904. if (res.code == 1) {
  905. console.log("查重 ", res); //有数据才显示
  906. if (res.data.items && res.data.items.length > 0) {
  907. this.patientList = res.data.items;
  908. this.dialogVisible = true;
  909. }
  910. }
  911. });
  912. },
  913. //列表选中
  914. rowick(row) {
  915. this.patientChoosed = row;
  916. },
  917. //确定选择人员
  918. choosePatient() {
  919. if (!this.patientChoosed) {
  920. alert("请选中人员档案信息");
  921. return;
  922. }
  923. this.dialogVisible = false;
  924. this.form.patientId = this.patientChoosed.id;
  925. this.form.patientName = this.patientChoosed.displayName;
  926. this.form.sexId = this.patientChoosed.sexId;
  927. this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  928. this.form.birthDate = new Date(this.patientChoosed.birthDate);
  929. this.form.nationId = this.patientChoosed.nationId;
  930. this.form.idNo = this.patientChoosed.idNo;
  931. this.form.telephone = this.patientChoosed.telephone;
  932. this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  933. this.form.patientNo = this.patientChoosed.patientNo;
  934. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  935. if (this.form.birthDate) {
  936. this.form.age = birthdayToAge(this.form.birthDate)
  937. }
  938. if (this.form.idNo) {
  939. let ret = parseID(this.form.idNo)
  940. if (!this.form.birthDate) this.form.birthDate = new Date(ret.birthday)
  941. if (!this.form.age) this.form.age = ret.age
  942. if (!this.form.sexId) this.form.age = ret.sex
  943. }
  944. },
  945. registerRowClick(row){
  946. this.registerChoosed = row;
  947. },
  948. chooseRegister(){
  949. if (!this.registerChoosed) {
  950. alert("请选中人员档案信息");
  951. return;
  952. }
  953. objCopy(this.registerChoosed, this.form)
  954. this.patientRegister.patientRegisterId = this.registerChoosed.id
  955. this.patientRegister.photo = this.registerChoosed.photo
  956. this.registerVisible = false
  957. this.getPatientRegisterAbs(this.registerChoosed.id)
  958. },
  959. ldddw(arrayData, key, value, display) {
  960. return dddw(arrayData, key, value, display);
  961. },
  962. lmoment(date, forMat) {
  963. return moment(new Date(date)).format(forMat);
  964. },
  965. changeBox(type) {
  966. //赋值
  967. if (this.form[type + 'Box']) {
  968. this.form[type] = 'Y';
  969. } else {
  970. this.form[type] = 'N';
  971. }
  972. },
  973. initBox() {
  974. if (this.form.isVip == 'Y') {
  975. this.form.isVipBox = true;
  976. } else {
  977. this.form.isVipBox = false;
  978. }
  979. if (this.form.isNameHide == 'Y') {
  980. this.form.isNameHideBox = true;
  981. } else {
  982. this.form.isNameHideBox = false;
  983. }
  984. if (this.form.isPhoneFollow == 'Y') {
  985. this.form.isPhoneFollowBox = true;
  986. } else {
  987. this.form.isPhoneFollowBox = false;
  988. }
  989. if (this.form.isLock == 'Y') {
  990. this.form.isLockBox = true;
  991. } else {
  992. this.form.isLockBox = false;
  993. }
  994. if (!this.form.id) {
  995. this.form.organizationUnitId = this.peisid;
  996. }
  997. },
  998. //提交
  999. btnSubmit(formName, msgTip) {
  1000. this.$refs[formName].validate((valid,fields) => {
  1001. console.log('fields',fields)
  1002. if(!valid){
  1003. this.$message.warning(fields[Object.keys(fields)[0]][0].message);
  1004. return false
  1005. }
  1006. if(this.form.customerOrgId != this.dict.personOrgId){
  1007. if(!this.form.customerOrgRegisterId){
  1008. this.$message.warning("请填写单位体检次数!");
  1009. return false
  1010. }
  1011. }
  1012. //赋值
  1013. let body = deepCopy(this.form);
  1014. if (this.form.birthDate) {
  1015. body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD")
  1016. }
  1017. delete body.id;
  1018. delete body.patientRegisterNo;
  1019. delete body.medicalTimes;
  1020. delete body.completeFlag;
  1021. delete body.isMedicalStart;
  1022. delete body.patientNo;
  1023. delete body.creatorId;
  1024. delete body.creationTime;
  1025. delete body.lastModificationTime;
  1026. delete body.lastModifierId;
  1027. delete body.isVipBox;
  1028. delete body.isNameHideBox;
  1029. delete body.isPhoneFollowBox;
  1030. delete body.isLockBox;
  1031. delete body.photo;
  1032. setNull(body, this.defaultNull);
  1033. //日期转换 日期控件增加格式
  1034. // console.log("body.birthDate", body.birthDate);
  1035. // if (body.birthDate) {
  1036. // body.birthDate = moment(new Date(body.birthDate)).format(
  1037. // "yyyy-MM-DD"
  1038. // );
  1039. // }
  1040. if (this.form.id.length < 1) {
  1041. //id为空则新增
  1042. console.log(`/api/patientregister/createreturninfo`, body);
  1043. postapi(`/api/patientregister/createreturninfo`, body).then(
  1044. (res) => {
  1045. if (res.code == 1) {
  1046. //console.log('res',res)
  1047. if (msgTip) this.$message.success("创健 操作成功");
  1048. //一般读身份证照片时,会出现这种情况
  1049. if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo);
  1050. objCopy(res.data, this.form);
  1051. // this.patientRegister.prList.push(res.data); //列表添加记录
  1052. this.patientRegister.patientRegisterId = res.data.id;
  1053. this.patientRegister.patientRegisterRd = res.data;
  1054. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)
  1055. this.patientRegister.prList.push(res.data)
  1056. //触发已选组合项目保存
  1057. this.patientRegister.patientRegisterAbs.forEach(e => {
  1058. e.patientRegisterId = res.data.id;
  1059. return e;
  1060. });
  1061. this.patientRegister.saveTimes++;
  1062. }
  1063. }
  1064. );
  1065. } else {
  1066. //id不为空则编辑 api/patientregister/updatepatientregister
  1067. console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body);
  1068. postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => {
  1069. if (res.code == 1) {
  1070. if (msgTip) this.$message.success("更新 操作成功");
  1071. //一般读身份证照片时,会出现这种情况
  1072. if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
  1073. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)
  1074. let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  1075. if(lfind > - 1) objCopy(this.form,this.patientRegister.prList[lfind])
  1076. //this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存
  1077. }
  1078. });
  1079. }
  1080. });
  1081. },
  1082. //将现有的数据,复制并展现,但未保存
  1083. rdCopy() {
  1084. if (!this.patientRegister.patientRegisterId) {
  1085. this.$message.info("该信息尚未保存,不可执行此操作!");
  1086. return;
  1087. }
  1088. this.patientRegister.photo = '/pic/Photo.jpg'
  1089. this.patientRegister.patientRegisterId = '';
  1090. this.form.id = '';
  1091. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  1092. this.form.patientRegisterNo = '';
  1093. this.form.patientNo = '';
  1094. this.form.medicalTimes = 1;
  1095. this.form.patientName = '';
  1096. this.form.photo = '';
  1097. this.patientRegister.patientRegisterAbs.forEach(e => {
  1098. e.patientRegisterId = '';
  1099. e.id = '';
  1100. return e;
  1101. });
  1102. // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  1103. this.$message.info("操作成功,确定请记得点保存");
  1104. },
  1105. //删除
  1106. del() {
  1107. deletapi(
  1108. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  1109. ).then((res) => {
  1110. this.$message.success("删除 操作成功");
  1111. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  1112. this.getCustomerOrgTree();
  1113. });
  1114. },
  1115. //拍照(已废弃)
  1116. openCamera() {
  1117. if (!this.form.id) {
  1118. alert("请先保存人员信息");
  1119. return;
  1120. }
  1121. this.patientRegister.cameraVisble = true;
  1122. },
  1123. //拍照(调壳程序)
  1124. photoGrah() {
  1125. if (!this.form.id) {
  1126. alert("请先保存人员信息");
  1127. return;
  1128. }
  1129. this.$peisAPI.photoGrah()
  1130. .then(res => {
  1131. console.log(res)
  1132. //alert(res)
  1133. let lres = JSON.parse(res)
  1134. if (lres.code && lres.code.toLowerCase() == 'success') {
  1135. let uploadPhoto = {
  1136. patientRegisterId: this.form.id,
  1137. photo: lres.Photo,
  1138. };
  1139. this.patientRegister.photo = `data:image/${lres.PhotoFormat};base64,${lres.Photo}`
  1140. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  1141. } else {
  1142. this.$message.error("上传照片错误" + lres.code)
  1143. }
  1144. }).then(res => {
  1145. if (res.code == 1) {
  1146. let body = {
  1147. patientRegisterId: this.form.id,
  1148. photo: res.data,
  1149. };
  1150. console.log(body);
  1151. return postapi(`/api/app/patient-register/update-photo`, body);
  1152. }
  1153. }).then(res => {
  1154. if (res.code != -1) {
  1155. //console.log('拍照',res.data)
  1156. this.patientRegister.patientRegisterRd.photo = res.data.photo
  1157. this.$message.success("操作成功");
  1158. }
  1159. }).catch(err => {
  1160. console.log('this.$peisAPI.photoGrah', err)
  1161. })
  1162. },
  1163. getPeoplePhoto(photo) {
  1164. this.peoplePhoto = photoParse(photo)
  1165. },
  1166. // 打印指引单(isPreview)
  1167. async guidePrint(ReportCode, isPreview) {
  1168. if (this.form.id.length < 1) {
  1169. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1170. return;
  1171. }
  1172. let token = localStorage.getItem('token');
  1173. let user = localStorage.getItem('user');
  1174. let toOutShell = {
  1175. ReportCode, token,
  1176. preViewCanPrint: 'N',
  1177. Parameters: [
  1178. { Name: 'printer', Value: user },
  1179. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1180. ],
  1181. };
  1182. if (isPreview) {
  1183. //
  1184. //this.multipleSelection.forEach((item,index) =>{
  1185. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  1186. .then((res) => {
  1187. if (res.code != -1) {
  1188. toOutShell.ReportTable = res.data;
  1189. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1190. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1191. }
  1192. })
  1193. .catch(err => {
  1194. this.$message.warning(err);
  1195. });
  1196. // });
  1197. } else {
  1198. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  1199. .then((res) => {
  1200. if (res.code != -1) {
  1201. toOutShell.ReportTable = res.data;
  1202. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1203. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1204. }
  1205. })
  1206. .then(res => {
  1207. if (res.toLowerCase() == 'success') {
  1208. //更新打印次数
  1209. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  1210. }
  1211. })
  1212. .then(res => {
  1213. if (res.code != -1) {
  1214. lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  1215. if (lfind > -1) {
  1216. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  1217. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  1218. } else {
  1219. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  1220. }
  1221. }
  1222. }
  1223. })
  1224. .catch(err => {
  1225. this.$message.warning(err);
  1226. });
  1227. }
  1228. },
  1229. //检验申请
  1230. async lisRequest() {
  1231. let isPrintLisRequest = false
  1232. let res = null
  1233. if (this.form.id.length < 1) {
  1234. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1235. return;
  1236. }
  1237. try {
  1238. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  1239. console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  1240. } catch (error) {
  1241. return;
  1242. }
  1243. if (res.code != -1) {
  1244. this.$message.info("发送检验申请成功!");
  1245. isPrintLisRequest = true;
  1246. }
  1247. //重复申请,重打
  1248. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  1249. isPrintLisRequest = true;
  1250. }
  1251. if (!isPrintLisRequest) return;
  1252. try {
  1253. await this.$confirm("是否打印检验申请单?", "提示", {
  1254. confirmButtonText: "是",
  1255. cancelButtonText: "否",
  1256. type: "info",
  1257. showClose: false,
  1258. closeOnClickModal: false,
  1259. closeOnPressEscape: false,
  1260. });
  1261. } catch (error) {
  1262. return;
  1263. }
  1264. //打印检验申请单
  1265. this.lisPrint('0003', false);
  1266. },
  1267. //条码打印
  1268. lisPrint(ReportCode, isPreview) {
  1269. if (this.form.id.length < 1) {
  1270. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1271. return;
  1272. }
  1273. let token = localStorage.getItem('token');
  1274. let user = localStorage.getItem('user');
  1275. let toOutShell = {
  1276. ReportCode, token,
  1277. Parameters: [
  1278. { Name: 'printer', Value: user },
  1279. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1280. ],
  1281. };
  1282. if (isPreview) {
  1283. //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
  1284. //this.multipleSelection.forEach((item,index) =>{
  1285. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  1286. .then((res) => {
  1287. if (res.code != -1) {
  1288. toOutShell.ReportTable = { lisRequest: res.data };
  1289. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1290. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1291. }
  1292. })
  1293. .catch(err => {
  1294. this.$message.warning(err);
  1295. });
  1296. // });
  1297. } else {
  1298. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  1299. .then((res) => {
  1300. if (res.code != -1) {
  1301. toOutShell.ReportTable = { lisRequest: res.data };
  1302. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1303. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1304. }
  1305. })
  1306. .then(res => {
  1307. if (res.toLowerCase() == 'success') {
  1308. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  1309. // {
  1310. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  1311. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1312. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1313. // }
  1314. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  1315. }
  1316. })
  1317. .catch(err => {
  1318. this.$message.warning(err);
  1319. });
  1320. }
  1321. },
  1322. //补打条码
  1323. reLisRequest() {
  1324. if (this.form.id.length < 1) {
  1325. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1326. return;
  1327. }
  1328. this.brushTimes++;
  1329. this.patientRegister.lisRequestVisble = true;
  1330. },
  1331. //手动合并项目
  1332. reMergeAsbitem() {
  1333. if (this.form.id.length < 1) {
  1334. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1335. return;
  1336. }
  1337. this.brushTimes++;
  1338. this.patientRegister.mergeAsbitemVisble = true;
  1339. },
  1340. toCharge(patientRegisterNo) {
  1341. this.patientRegister.patientRegisterRd.patientRegisterNo = patientRegisterNo;
  1342. this.$router.push({ path: "/charge" });
  1343. },
  1344. },
  1345. //监听事件
  1346. watch: {
  1347. "form.customerOrgId"(newVal, oldVal) {
  1348. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  1349. if (newVal != oldVal) {
  1350. this.getCustomerOrgRegisterList()
  1351. }
  1352. },
  1353. //新增或编辑
  1354. "editTimes"(newVal, oldVal) {
  1355. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  1356. if (newVal != oldVal) {
  1357. console.log('this.editTimes', this.editTimes,this.formInitData)
  1358. objCopy(this.formInitData, this.form);
  1359. this.initBox();
  1360. this.getPeoplePhoto(this.patientRegister.photo)
  1361. //console.log('this.form',this.form)
  1362. }
  1363. },
  1364. //拍照触发
  1365. "patientRegister.photo"(newVal, oldVal) {
  1366. //console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  1367. if (newVal != oldVal) {
  1368. this.getPeoplePhoto(newVal)
  1369. }
  1370. },
  1371. },
  1372. };
  1373. </script>
  1374. <style scoped>
  1375. ::v-deep .el-button {
  1376. padding: 10px 5px;
  1377. /* 原值:12px 20px; */
  1378. }
  1379. .btn {
  1380. margin-top: 5px;
  1381. }
  1382. .btnClass {
  1383. width: 110px;
  1384. }
  1385. .query {
  1386. margin-left: 10px;
  1387. }
  1388. .querySpan {
  1389. margin-right: 2px;
  1390. }
  1391. </style>