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.

1673 lines
64 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  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 - 510) / 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 - 630) / 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 - 510) / 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 - 630) / 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 - 630) / 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 - 510) / 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 - 630) / 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 - 510) / 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 - 630) / 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 - 510) / 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 - 654) / 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 - 510) / 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 - 510) / 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. ? moment(form.creationTime).format('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. ? moment(form.lastModificationTime).format('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. {{ moment(scope.row.lastTime).format("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. {{ dddw(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. {{ dddw(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. {{ moment(scope.row.birthDate).format("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. {{ dddw(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>{{ dddw(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>{{ dddw(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. {{ dddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
  493. </div>
  494. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  495. {{ dddw(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. {{ dddw(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. {{ moment(scope.row.birthDate).format("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. {{ dddw(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. {{ dddw(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. {{ dddw(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 v-if="scope.row.creationTime">{{ moment(scope.row.creationTime).format("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.initFormData()
  726. },
  727. //挂载完成
  728. mounted() {
  729. // objCopy(this.formInitData, this.form);
  730. // this.initBox();
  731. // this.getCustomerOrgRegisterList()
  732. // this.getPeoplePhoto(this.patientRegister.photo)
  733. },
  734. computed: {
  735. ...mapState(["window", "dict", "patientRegister", "customerOrg", "projPriv"]),
  736. },
  737. methods: {
  738. ...mapActions(['getPatientRegisterAbs']),
  739. dddw,moment,
  740. //初始form表单数据
  741. initFormData(){
  742. objCopy(this.formInitData, this.form);
  743. this.peisid = window.sessionStorage.getItem('peisid');
  744. if (!this.form.id) {
  745. this.form.organizationUnitId = this.peisid;
  746. }
  747. this.initBox();
  748. this.getPeoplePhoto(this.patientRegister.photo)
  749. //获取顶级单位ID
  750. let customerOrgParentId = ''
  751. if (this.form.customerOrgId == this.dict.personOrgId) {
  752. customerOrgParentId = this.dict.personOrgId;
  753. this.form.customerOrgRegisterId = null
  754. this.patientRegister.customerOrgGroup = []
  755. }else{
  756. getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}
  757. `).then(res => {
  758. if(res.code != - 1){
  759. customerOrgParentId = res.data //获取顶级单位ID
  760. return getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`) //获取单位体检次数信息
  761. }
  762. }).then(res =>{
  763. if(res.code != - 1){
  764. this.customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //不显示已完成的体检次数
  765. if(this.customerOrgRegisterList.length > 0){
  766. this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id
  767. return getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.form.customerOrgRegisterId}`) //获取单位分组
  768. }
  769. }
  770. }).then(res =>{
  771. if(res.code != -1){
  772. this.patientRegister.customerOrgGroup = res.data.items;
  773. }
  774. })
  775. }
  776. },
  777. //快速查找个人数据
  778. quickQuery(type) {
  779. let url1 = '/api/app/patientregister/getpatientregisterorpatient'
  780. let body={}
  781. let url2 = '/api/app/patientregister/getlistinfilter'
  782. switch (type) {
  783. case 'patientNo':
  784. if(!this.query.patientNo) return;
  785. body = {
  786. sType:2,
  787. patientNo:this.query.patientNo
  788. }
  789. this.getpatientregisterorpatient(url1,body)
  790. break;
  791. case 'patientRegisterNo':
  792. if(!this.query.patientRegisterNo) return;
  793. body = {
  794. sType:1,
  795. patientRegisterNo:this.query.patientRegisterNo
  796. }
  797. this.getpatientregisterorpatient(url1,body)
  798. break;
  799. case 'tel':
  800. if(!this.query.tel) return;
  801. body = {
  802. phone:this.query.tel
  803. }
  804. this.getlistinfilter(url2,body);
  805. break;
  806. case 'patientName':
  807. if(!this.query.patientName) return;
  808. body = {
  809. patientName:this.query.patientName
  810. }
  811. this.getlistinfilter(url2,body);
  812. break;
  813. default:
  814. return;
  815. }
  816. },
  817. //按流水号或档案号查客户信息
  818. getpatientregisterorpatient(url,body){
  819. postapi(url,body)
  820. .then((res) => {
  821. console.log('getpatientregisterorpatient', res)
  822. if (res.code == 1) {
  823. objCopy(res.data, this.form)
  824. this.patientRegister.patientRegisterId = res.data.id
  825. this.patientRegister.photo = res.data.photo
  826. this.getPatientRegisterAbs(res.data.id)
  827. }else if(res.code == 0){
  828. this.$message.info("未找到相关信息")
  829. }
  830. });
  831. },
  832. //按手机号或姓名查找客户信息
  833. getlistinfilter(url,body){
  834. postapi(url, body)
  835. .then((res) => {
  836. if (res.code != -1) {
  837. if(res.data.items.length == 0){
  838. this.$message.info("未找到相关信息")
  839. }else if(res.data.items.length == 1){
  840. objCopy(res.data.items[0], this.form)
  841. this.patientRegister.patientRegisterId = res.data.items[0].id
  842. this.patientRegister.photo = res.data.items[0].photo
  843. this.getPatientRegisterAbs(res.data.items[0].id)
  844. }else{
  845. //显示列表,供选择
  846. this.patientRegisters = res.data.items
  847. this.registerVisible = true
  848. }
  849. }
  850. });
  851. },
  852. //读取身份证信息
  853. peopleIcCard() {
  854. if(!this.$peisAPI) {
  855. this.$message.info("此功能,需要在壳客户端才可运行!")
  856. return
  857. }
  858. this.$peisAPI.peopleIcCard().then(res => {
  859. //console.log('peopleIcCard',res)
  860. let lres = JSON.parse(res)
  861. if (lres.code >= 0) {
  862. let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
  863. this.form.patientName = idNos.Name
  864. this.form.birthDate = idNos.birthDate
  865. this.form.sexId = idNos.sexId
  866. this.form.age = idNos.age
  867. this.form.nationId = idNos.nationId
  868. this.form.idNo = idNos.IDCode
  869. this.form.address = idNos.Address
  870. this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  871. }
  872. })
  873. },
  874. //获取单位体检次数列表,并默认赋最后一次体检次数
  875. async getCustomerOrgRegisterList() {
  876. this.customerOrgRegisterList = []
  877. if (this.form.customerOrgId == this.dict.personOrgId) {
  878. this.form.customerOrgRegisterId = null
  879. return
  880. }
  881. try {
  882. let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`);
  883. let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`);
  884. this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N')
  885. //要把已完成体检的次数去掉 (查询时不能触发保存)
  886. // if (this.customerOrgRegisterList.length > 0) {
  887. // this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id
  888. // //this.changeCustomerOrgGroupId()
  889. // this.changeMedicalTimes()
  890. // }
  891. } catch (error) {
  892. console.log(error)
  893. }
  894. },
  895. //修改单位体检次数
  896. changeMedicalTimes() {
  897. this.form.customerOrgGroupId = null
  898. this.changeCustomerOrgGroupId()
  899. //获取体检次数下的分组
  900. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  901. },
  902. //选中 套餐/分组 所包含的组合项目
  903. getGroupPackageAsb(typeFlag, groupPackageId) {
  904. let delBody = {};
  905. let url = typeFlag == 'group' ?
  906. '/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId='
  907. : '/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=';
  908. let msg = typeFlag == 'group' ? '更换分组' : '更换套餐';
  909. console.log(`${url}${groupPackageId}`);
  910. getapi(`${url}${groupPackageId}`)
  911. .then((res) => {
  912. console.log("getGroupPackageAsb", res);
  913. if (res.code != -1) {
  914. //移除旧分组或套餐的组合项目
  915. delBody = this.removeGroupPackageAsb();
  916. //添加或更新已选组合项目
  917. this.addGroupPackageAsb(res.data, typeFlag,groupPackageId);
  918. //console.log('delBody', delBody,delBody['registerAsbitemIds'].length);
  919. if (delBody['registerAsbitemIds'].length > 0) {
  920. return postapi(`/api/app/registerasbitem/deletemany`, delBody)
  921. } else {
  922. this.onSubmit(msg);
  923. }
  924. }
  925. })
  926. .then(res => {
  927. //console.log('res', res);
  928. if (res && res.code != -1) {
  929. //添加新套餐的组合项目
  930. this.onSubmit(msg);
  931. }
  932. });
  933. },
  934. //移除旧分组或套餐的组合项目
  935. removeGroupPackageAsb() {
  936. let body = { registerAsbitemIds: [] }
  937. let registerAsbitemIds = []
  938. let chargeComplete = ''
  939. //体检基本信息未保存时,删除所有所选项目
  940. if (!this.form.id) {
  941. this.patientRegister.patientRegisterAbs = [];
  942. return body;
  943. }
  944. //删除已选 分组或套餐的组合项目 ,如已收费或 已检时,将 groupPackageId 置为null
  945. for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
  946. if (!this.patientRegister.patientRegisterAbs[i].id) {
  947. this.patientRegister.patientRegisterAbs.splice(i, 1)
  948. i--
  949. continue
  950. }
  951. if (this.patientRegister.patientRegisterAbs[i].isCharge == 'Y' || this.patientRegister.patientRegisterAbs[i].checkCompleteFlag != '0') {
  952. chargeComplete += this.patientRegister.patientRegisterAbs[i].asbitemName + ','
  953. this.patientRegister.patientRegisterAbs[i].groupPackageId = null
  954. } else {
  955. //数据库有,才添加到待删除的数组中
  956. if (this.patientRegister.patientRegisterAbs[i].id) {
  957. registerAsbitemIds.push(this.patientRegister.patientRegisterAbs[i].id)
  958. }
  959. this.patientRegister.patientRegisterAbs.splice(i, 1)
  960. i--
  961. }
  962. }
  963. if (chargeComplete) {
  964. this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
  965. }
  966. body = { registerAsbitemIds };
  967. return body;
  968. },
  969. //添加新套餐/分组的组合项目
  970. addGroupPackageAsb(groupPackageAsb, typeFlag, groupPackageId) {
  971. let payTypeFlag = '0'; //默认个人支付
  972. let lfind = -1
  973. if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付
  974. for (let i = 0; i < groupPackageAsb.length; i++) {
  975. lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id)
  976. if (lfind > - 1) {
  977. this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
  978. //editCount++
  979. continue
  980. }
  981. let pojo = {
  982. asbitemId: groupPackageAsb[i].id,
  983. asbitemName: groupPackageAsb[i].displayName,
  984. patientRegisterId: this.form.id,
  985. standardPrice: groupPackageAsb[i].price,
  986. chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice:groupPackageAsb[i].price,
  987. payTypeFlag,
  988. discount: typeFlag == 'group' ? groupPackageAsb[i].discount:100,
  989. isCharge: "N",
  990. amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount:1,
  991. groupPackageId: groupPackageId
  992. }
  993. this.patientRegister.patientRegisterAbs.push(pojo)
  994. }
  995. },
  996. //获取体检次数下的分组
  997. getCustomerOrgGroup(customerOrgRegisterId) {
  998. this.patientRegister.customerOrgGroup = []
  999. getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => {
  1000. if (res.code != - 1) {
  1001. this.patientRegister.customerOrgGroup = res.data.items;
  1002. }
  1003. })
  1004. },
  1005. //修改出生日期
  1006. changeBirthDate() {
  1007. this.form.age = birthdayToAge(this.form.birthDate)
  1008. },
  1009. //修改出生日期
  1010. changeAge() {
  1011. this.form.birthDate = ageToBirthday(this.form.age)
  1012. },
  1013. //修改身份证,生成年龄、出生、性别
  1014. changeIdNo() {
  1015. this.Query(this.form.idNo)
  1016. let ret = parseID(this.form.idNo)
  1017. if (ret.age != -1) {
  1018. this.form.birthDate = new Date(ret.birthday)
  1019. this.form.age = ret.age
  1020. this.form.sexId = ret.sex
  1021. }
  1022. },
  1023. //分组改变时触发
  1024. changeCustomerOrgGroupId() {
  1025. this.patientRegister.customerOrgGroupChange++;
  1026. if (this.form.id) this.btnSubmit('form', false);
  1027. },
  1028. //套餐改变时触发
  1029. changeMedicalPackageId() {
  1030. this.patientRegister.medicalPackageChange++;
  1031. if (this.form.id) this.btnSubmit('form', false);
  1032. },
  1033. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  1034. Query(param) {
  1035. //编辑的时候不查重
  1036. if (this.form.id || !param) return;
  1037. //console.log(`/api/app/patient/in-filter?Filter=${param}`)
  1038. let body = {
  1039. filter:param,
  1040. maxResultCount:500
  1041. }
  1042. postapi('/api/app/patient/getlistinfilter',body).then((res) => {
  1043. if (res.code != -1) {
  1044. console.log("查重 ", res); //有数据才显示
  1045. if (res.data.items && res.data.items.length > 0) {
  1046. this.patientList = res.data.items;
  1047. this.dialogVisible = true;
  1048. }
  1049. }
  1050. });
  1051. },
  1052. //列表选中
  1053. rowick(row) {
  1054. this.patientChoosed = row;
  1055. },
  1056. //确定选择人员
  1057. choosePatient() {
  1058. if (!this.patientChoosed) {
  1059. alert("请选中人员档案信息");
  1060. return;
  1061. }
  1062. this.dialogVisible = false;
  1063. this.form.patientId = this.patientChoosed.id;
  1064. this.form.patientName = this.patientChoosed.displayName;
  1065. this.form.sexId = this.patientChoosed.sexId;
  1066. this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  1067. this.form.birthDate = new Date(this.patientChoosed.birthDate);
  1068. this.form.nationId = this.patientChoosed.nationId;
  1069. this.form.idNo = this.patientChoosed.idNo;
  1070. this.form.telephone = this.patientChoosed.telephone;
  1071. this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  1072. this.form.patientNo = this.patientChoosed.patientNo;
  1073. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  1074. if (this.form.birthDate) {
  1075. this.form.age = birthdayToAge(this.form.birthDate)
  1076. }
  1077. if (this.form.idNo) {
  1078. let ret = parseID(this.form.idNo)
  1079. if (!this.form.birthDate) this.form.birthDate = new Date(ret.birthday)
  1080. if (!this.form.age) this.form.age = ret.age
  1081. if (!this.form.sexId) this.form.age = ret.sex
  1082. }
  1083. },
  1084. registerRowClick(row){
  1085. this.registerChoosed = row;
  1086. },
  1087. chooseRegister(){
  1088. if (!this.registerChoosed) {
  1089. alert("请选中人员档案信息");
  1090. return;
  1091. }
  1092. objCopy(this.registerChoosed, this.form)
  1093. this.patientRegister.patientRegisterId = this.registerChoosed.id
  1094. this.patientRegister.photo = this.registerChoosed.photo
  1095. this.registerVisible = false
  1096. this.getPatientRegisterAbs(this.registerChoosed.id)
  1097. },
  1098. changeBox(type) {
  1099. //赋值
  1100. if (this.form[type + 'Box']) {
  1101. this.form[type] = 'Y';
  1102. } else {
  1103. this.form[type] = 'N';
  1104. }
  1105. },
  1106. initBox() {
  1107. if (this.form.isVip == 'Y') {
  1108. this.form.isVipBox = true;
  1109. } else {
  1110. this.form.isVipBox = false;
  1111. }
  1112. if (this.form.isNameHide == 'Y') {
  1113. this.form.isNameHideBox = true;
  1114. } else {
  1115. this.form.isNameHideBox = false;
  1116. }
  1117. if (this.form.isPhoneFollow == 'Y') {
  1118. this.form.isPhoneFollowBox = true;
  1119. } else {
  1120. this.form.isPhoneFollowBox = false;
  1121. }
  1122. if (this.form.isLock == 'Y') {
  1123. this.form.isLockBox = true;
  1124. } else {
  1125. this.form.isLockBox = false;
  1126. }
  1127. if (!this.form.id) {
  1128. this.form.organizationUnitId = this.peisid;
  1129. }
  1130. },
  1131. //提交
  1132. btnSubmit(formName, msgTip) {
  1133. this.$refs[formName].validate((valid,fields) => {
  1134. console.log('fields',fields)
  1135. if(!valid){
  1136. this.$message.warning(fields[Object.keys(fields)[0]][0].message);
  1137. return false
  1138. }
  1139. if(this.form.customerOrgId != this.dict.personOrgId){
  1140. if(!this.form.customerOrgRegisterId){
  1141. this.$message.warning("请填写单位体检次数!");
  1142. return false
  1143. }
  1144. }
  1145. if(this.form.idNo && checkIDCode(this.form.idNo) == false){
  1146. this.$message.warning("身份证号填写不合法!");
  1147. return false
  1148. }
  1149. //赋值
  1150. let body = deepCopy(this.form);
  1151. if (this.form.birthDate && this.form.birthDate != "Invalid date") {
  1152. body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD")
  1153. }else{
  1154. body.birthDate = null
  1155. }
  1156. delete body.id;
  1157. delete body.patientRegisterNo;
  1158. delete body.medicalTimes;
  1159. delete body.completeFlag;
  1160. delete body.isMedicalStart;
  1161. delete body.patientNo;
  1162. delete body.creatorId;
  1163. delete body.creationTime;
  1164. delete body.lastModificationTime;
  1165. delete body.lastModifierId;
  1166. delete body.isVipBox;
  1167. delete body.isNameHideBox;
  1168. delete body.isPhoneFollowBox;
  1169. delete body.isLockBox;
  1170. delete body.photo;
  1171. setNull(body, this.defaultNull);
  1172. //日期转换 日期控件增加格式
  1173. // console.log("body.birthDate", body.birthDate);
  1174. // if (body.birthDate) {
  1175. // body.birthDate = moment(new Date(body.birthDate)).format(
  1176. // "yyyy-MM-DD"
  1177. // );
  1178. // }
  1179. if (this.form.id.length < 1) {
  1180. //id为空则新增
  1181. console.log(`/api/patientregister/createreturninfo`, body);
  1182. postapi(`/api/patientregister/createreturninfo`, body).then(
  1183. (res) => {
  1184. if (res.code == 1) {
  1185. //console.log('res',res)
  1186. if (msgTip) this.$message.success("创健 操作成功");
  1187. //一般读身份证照片时,会出现这种情况
  1188. if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo);
  1189. objCopy(res.data, this.form);
  1190. // this.patientRegister.prList.push(res.data); //列表添加记录
  1191. this.patientRegister.patientRegisterId = res.data.id;
  1192. objCopy(this.form, this.patientRegister.patientRegisterRd);
  1193. //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新)放在窗口关闭事件中去
  1194. let curRow = deepCopy(this.patientRegister.patientRegisterRd)
  1195. curRow.index = this.patientRegister.prList.length
  1196. this.patientRegister.prList.push(curRow)
  1197. //触发已选组合项目保存
  1198. this.patientRegister.patientRegisterAbs.forEach(e => {
  1199. e.patientRegisterId = res.data.id;
  1200. return e;
  1201. });
  1202. this.patientRegister.saveTimes++;
  1203. }
  1204. }
  1205. );
  1206. } else {
  1207. //id不为空则编辑 api/patientregister/updatepatientregister
  1208. console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body);
  1209. postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => {
  1210. if (res.code == 1) {
  1211. if (msgTip) this.$message.success("更新 操作成功");
  1212. //一般读身份证照片时,会出现这种情况
  1213. if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
  1214. objCopy(this.form, this.patientRegister.patientRegisterRd);
  1215. // this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新) 放在窗口关闭事件中去
  1216. // let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  1217. // if(lfind > - 1) objCopy(this.form,this.patientRegister.prList[lfind])
  1218. //this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存
  1219. }
  1220. });
  1221. }
  1222. });
  1223. },
  1224. //将现有的数据,复制并展现,但未保存
  1225. rdCopy() {
  1226. if (!this.patientRegister.patientRegisterId) {
  1227. this.$message.info("该信息尚未保存,不可执行此操作!");
  1228. return;
  1229. }
  1230. this.patientRegister.photo = '/pic/Photo.jpg'
  1231. this.patientRegister.patientRegisterId = '';
  1232. this.form.id = '';
  1233. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  1234. this.form.patientRegisterNo = '';
  1235. this.form.patientNo = '';
  1236. this.form.medicalTimes = 1;
  1237. this.form.patientName = '';
  1238. this.form.photo = '';
  1239. this.patientRegister.patientRegisterAbs.forEach(e => {
  1240. e.patientRegisterId = '';
  1241. e.id = '';
  1242. return e;
  1243. });
  1244. // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  1245. this.$message.info("操作成功,确定请记得点保存");
  1246. },
  1247. //删除
  1248. del() {
  1249. deletapi(
  1250. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  1251. ).then((res) => {
  1252. this.$message.success("删除 操作成功");
  1253. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  1254. this.getCustomerOrgTree();
  1255. });
  1256. },
  1257. //拍照(已废弃)
  1258. // openCamera() {
  1259. // if (!this.form.id) {
  1260. // alert("请先保存人员信息");
  1261. // return;
  1262. // }
  1263. // this.patientRegister.cameraVisble = true;
  1264. // },
  1265. //拍照(调壳程序)
  1266. photoGrah() {
  1267. if (!this.form.id) {
  1268. alert("请先保存人员信息");
  1269. return;
  1270. }
  1271. if(!this.$peisAPI) {
  1272. this.$message.info("此功能,需要在壳客户端才可运行!")
  1273. return
  1274. }
  1275. this.$peisAPI.photoGrah()
  1276. .then(res => {
  1277. console.log(res)
  1278. //alert(res)
  1279. let lres = JSON.parse(res)
  1280. if (lres.code && lres.code.toLowerCase() == 'success') {
  1281. let uploadPhoto = {
  1282. patientRegisterId: this.form.id,
  1283. photo: lres.Photo,
  1284. };
  1285. this.patientRegister.photo = `data:image/${lres.PhotoFormat};base64,${lres.Photo}`
  1286. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  1287. } else {
  1288. this.$message.error("上传照片错误" + lres.code)
  1289. }
  1290. }).then(res => {
  1291. if (res.code == 1) {
  1292. let body = {
  1293. patientRegisterId: this.form.id,
  1294. photo: res.data,
  1295. };
  1296. console.log(body);
  1297. return postapi(`/api/app/patient-register/update-photo`, body);
  1298. }
  1299. }).then(res => {
  1300. if (res.code != -1) {
  1301. //console.log('拍照',res.data)
  1302. this.patientRegister.patientRegisterRd.photo = res.data.photo
  1303. this.$message.success("操作成功");
  1304. }
  1305. }).catch(err => {
  1306. console.log('this.$peisAPI.photoGrah', err)
  1307. })
  1308. },
  1309. getPeoplePhoto(photo) {
  1310. this.peoplePhoto = photoParse(photo)
  1311. },
  1312. // 打印指引单(isPreview)
  1313. async guidePrint(ReportCode, isPreview) {
  1314. if (this.form.id.length < 1) {
  1315. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1316. return;
  1317. }
  1318. if(!this.$peisAPI) {
  1319. this.$message.info("此功能,需要在壳客户端才可运行!")
  1320. return
  1321. }
  1322. let token = localStorage.getItem('token');
  1323. let user = localStorage.getItem('user');
  1324. let toOutShell = {
  1325. ReportCode, token,
  1326. preViewCanPrint: 'N',
  1327. Parameters: [
  1328. { Name: 'printer', Value: user },
  1329. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1330. ],
  1331. };
  1332. if (isPreview) {
  1333. //
  1334. //this.multipleSelection.forEach((item,index) =>{
  1335. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  1336. .then((res) => {
  1337. if (res.code != -1) {
  1338. toOutShell.ReportTable = res.data;
  1339. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1340. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1341. }
  1342. })
  1343. .catch(err => {
  1344. this.$message.warning(err);
  1345. });
  1346. // });
  1347. } else {
  1348. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  1349. .then((res) => {
  1350. if (res.code != -1) {
  1351. toOutShell.ReportTable = res.data;
  1352. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1353. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1354. }
  1355. })
  1356. .then(res => {
  1357. if (res.code != -1) {
  1358. //更新打印次数
  1359. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  1360. }
  1361. })
  1362. .then(res => {
  1363. if (res.code != -1) {
  1364. lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  1365. if (lfind > -1) {
  1366. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  1367. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  1368. } else {
  1369. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  1370. }
  1371. }
  1372. }
  1373. })
  1374. .catch(err => {
  1375. this.$message.warning(err);
  1376. });
  1377. }
  1378. },
  1379. //检验申请
  1380. async lisRequest() {
  1381. let isPrintLisRequest = false
  1382. let res = null
  1383. if (this.form.id.length < 1) {
  1384. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1385. return;
  1386. }
  1387. try {
  1388. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  1389. console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  1390. } catch (error) {
  1391. return;
  1392. }
  1393. if (res.code != -1) {
  1394. this.$message.info("发送检验申请成功!");
  1395. isPrintLisRequest = true;
  1396. }
  1397. //重复申请,重打
  1398. if (res.code == -1 && res.message.indexOf('已申请') > -1) {
  1399. isPrintLisRequest = true;
  1400. }
  1401. if (!isPrintLisRequest) return;
  1402. try {
  1403. await this.$confirm("是否打印检验申请单?", "提示", {
  1404. confirmButtonText: "是",
  1405. cancelButtonText: "否",
  1406. type: "info",
  1407. showClose: false,
  1408. closeOnClickModal: false,
  1409. closeOnPressEscape: false,
  1410. });
  1411. } catch (error) {
  1412. return;
  1413. }
  1414. //打印检验申请单
  1415. this.lisPrint('0003', false);
  1416. },
  1417. //条码打印
  1418. lisPrint(ReportCode, isPreview) {
  1419. if (this.form.id.length < 1) {
  1420. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1421. return;
  1422. }
  1423. if(!this.$peisAPI) {
  1424. this.$message.info("此功能,需要在壳客户端才可运行!")
  1425. return
  1426. }
  1427. let token = localStorage.getItem('token');
  1428. let user = localStorage.getItem('user');
  1429. let toOutShell = {
  1430. ReportCode, token,
  1431. Parameters: [
  1432. { Name: 'printer', Value: user },
  1433. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1434. ],
  1435. };
  1436. if (isPreview) {
  1437. //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
  1438. //this.multipleSelection.forEach((item,index) =>{
  1439. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  1440. .then((res) => {
  1441. if (res.code != -1) {
  1442. toOutShell.ReportTable = { lisRequest: res.data };
  1443. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1444. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1445. }
  1446. })
  1447. .catch(err => {
  1448. this.$message.warning(err);
  1449. });
  1450. // });
  1451. } else {
  1452. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  1453. .then((res) => {
  1454. if (res.code != -1) {
  1455. toOutShell.ReportTable = { lisRequest: res.data };
  1456. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1457. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1458. }
  1459. })
  1460. .then(res => {
  1461. if (res.code != -1) {
  1462. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  1463. // {
  1464. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  1465. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1466. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1467. // }
  1468. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  1469. }
  1470. })
  1471. .catch(err => {
  1472. this.$message.warning(err);
  1473. });
  1474. }
  1475. },
  1476. //补打条码
  1477. reLisRequest() {
  1478. if (this.form.id.length < 1) {
  1479. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1480. return;
  1481. }
  1482. this.brushTimes++;
  1483. this.patientRegister.lisRequestVisble = true;
  1484. },
  1485. //手动合并项目
  1486. reMergeAsbitem() {
  1487. if (this.form.id.length < 1) {
  1488. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1489. return;
  1490. }
  1491. this.brushTimes++;
  1492. this.patientRegister.mergeAsbitemVisble = true;
  1493. },
  1494. toCharge(patientRegisterNo) {
  1495. this.patientRegister.patientRegisterRd.patientRegisterNo = patientRegisterNo;
  1496. this.$router.push({ path: "/charge" });
  1497. },
  1498. },
  1499. //监听事件
  1500. watch: {
  1501. "form.customerOrgId"(newVal, oldVal) {
  1502. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  1503. if (newVal != oldVal) {
  1504. this.getCustomerOrgRegisterList()
  1505. }
  1506. },
  1507. //新增或编辑
  1508. "editTimes"(newVal, oldVal) {
  1509. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  1510. if (newVal != oldVal) {
  1511. this.initFormData()
  1512. }
  1513. },
  1514. //拍照触发
  1515. "patientRegister.photo"(newVal, oldVal) {
  1516. //console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  1517. if (newVal != oldVal) {
  1518. this.getPeoplePhoto(newVal)
  1519. }
  1520. },
  1521. },
  1522. };
  1523. </script>
  1524. <style scoped>
  1525. .btn {
  1526. margin-top: 5px;
  1527. }
  1528. .btnClass {
  1529. width: 100px;
  1530. }
  1531. .query {
  1532. margin-left: 10px;
  1533. }
  1534. .querySpan {
  1535. margin-right: 2px;
  1536. }
  1537. </style>