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.

1274 lines
48 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
  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>
  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></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></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></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="请选择"
  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)"></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)"></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="" />
  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"></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="请选择"
  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"></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"></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"></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"></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;'">
  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"></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;'">
  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>
  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;'">
  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;'">
  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"></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"></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"></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"
  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"></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"
  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>
  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;'">
  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;'">
  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="请输入备注"></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>
  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></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></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></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></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 style="margin-top: -20px;">
  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="Onsubmit('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:40px;left:160px;display: flex; flex-wrap: wrap; height:60px;">
  375. <div class="query">
  376. <span>查找&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>档案号</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>姓名</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>手机号</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. <!-- 拍照openCamera 网页模式已废弃
  450. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600"
  451. :close-on-click-modal="false" :append-to-body="true">
  452. <Camera :id="form.id" />
  453. </el-dialog>
  454. -->
  455. <!-- 检验条码补打 -->
  456. <el-dialog title="检验条码补打" :visible.sync="patientRegister.lisRequestVisble" width="600px" height="400"
  457. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  458. <LisRequest :id="form.id" :brushTimes="brushTimes" />
  459. </el-dialog>
  460. <!-- 手动合并项目 -->
  461. <el-dialog title="手动合并项目" :visible.sync="patientRegister.mergeAsbitemVisble" width="600px" height="400"
  462. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  463. <MergeAsbitem :id="form.id" :organizationUnitId="form.organizationUnitId" :brushTimes="brushTimes" />
  464. </el-dialog>
  465. </div>
  466. </template>
  467. <script>
  468. import moment from "moment";
  469. import { mapState } from "vuex";
  470. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  471. import mm from "../../utlis/mm";
  472. import { objCopy, setNull, dddw, parseID, birthdayToAge, deepCopy, arrayFilter, parsIcCardtoLocal, photoParse, savePeoplePhoto } from "../../utlis/proFunc";
  473. import Camera from "./Camera.vue";
  474. import PatientRegisterItem from "./PatientRegisterItem.vue";
  475. import LisRequest from "./LisRequest.vue";
  476. import MergeAsbitem from "./MergeAsbitem.vue";
  477. export default {
  478. components: {
  479. Camera,
  480. LisRequest,
  481. MergeAsbitem,
  482. PatientRegisterItem,
  483. },
  484. props: ['formInitData', 'editTimes'],
  485. data() {
  486. return {
  487. apiurl: mm.apiurl,
  488. brushTimes: 0,
  489. payTypeFlag: '',
  490. peisid: null,
  491. peoplePhoto: '',
  492. query: {
  493. patientRegisterNo: '',
  494. patientNo: '',
  495. patientName: '',
  496. tel: ''
  497. },
  498. form: {
  499. id: "", //id
  500. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  501. patientNo: "", //档案号
  502. customerOrgId: null, //单位编号
  503. customerOrgGroupId: null, //分组
  504. medicalPackageId: null, //套餐
  505. patientName: "", //姓名
  506. birthDate: null, //日期型
  507. sexId: "U", //性别 默认未知U
  508. age: null, //年龄
  509. jobCardNo: "", //工卡号
  510. medicalCardNo: "", //体检卡号
  511. maritalStatusId: "9", //婚姻状况 默认未知
  512. medicalTypeId: null, //体检类别
  513. personnelTypeId: null, //人员类别
  514. jobPost: "", //职务
  515. jobTitle: "", //职称
  516. salesman: "", //介绍人
  517. sexHormoneTermId: null, //性激素期限
  518. isNameHide: "N", //隐藏姓名
  519. isPhoneFollow: "N", //电话随访
  520. isVip: "N", //vip客户
  521. remark: "", //
  522. isLock: "N", //是否锁住
  523. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  524. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  525. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  526. medicalTimes: 1, //条码号 【创建编辑时不操作】
  527. organizationUnitId: null, //体检中心
  528. address: "", //地址
  529. email: "", //email
  530. idNo: "", //身份证号
  531. telephone: "", //电话
  532. mobileTelephone: "", //手机号
  533. nationId: null, //民族编号
  534. birthPlaceId: null, //籍惯(出生地)
  535. postalCode: "", //邮编
  536. creatorId: null,
  537. creationTime: "",
  538. lastModificationTime: "",
  539. lastModifierId: null,
  540. isVipBox: false, //vip客户
  541. isNameHideBox: false, //隐藏姓名
  542. isPhoneFollowBox: false, //电话随访
  543. isLockBox: false, //是否锁住
  544. customerOrgRegisterId: null,
  545. isMaxMedicalTimes: 'N',
  546. }, //单位 记录 目前新增与更新是一致
  547. customerOrgRegisterList: [], //单位体检次数列表
  548. defaultNull: [
  549. "customerOrgId",
  550. "customerOrgGroupId",
  551. "medicalPackageId",
  552. "age",
  553. "medicalTypeId",
  554. "personnelTypeId",
  555. "sexHormoneTermId",
  556. "organizationUnitId",
  557. "nationId",
  558. "birthPlaceId",
  559. ], //一般uuid字段为空时,需设置为null值
  560. rules: {
  561. patientName: [
  562. { required: true, message: "请输入姓名", trigger: "blur" },
  563. ],
  564. organizationUnitId: [
  565. { required: true, message: "请填写体检中心", trigger: "blur" },
  566. ],
  567. },
  568. dialogVisible: false,
  569. patientList: [], //人员列表(用于判断人员多次体检)
  570. patientChoosed: {}, //查重选中的人员
  571. dialogCamera: false, //拍照组件
  572. };
  573. },
  574. created() {
  575. this.peisid = window.sessionStorage.getItem('peisid');
  576. if (!this.form.id) {
  577. this.form.organizationUnitId = this.peisid;
  578. }
  579. },
  580. //挂载完成
  581. mounted() {
  582. objCopy(this.formInitData, this.form);
  583. this.initBox();
  584. this.getCustomerOrgRegisterList()
  585. this.getPeoplePhoto(this.patientRegister.photo)
  586. },
  587. computed: {
  588. ...mapState(["window", "dict", "patientRegister", "customerOrg", "projPriv"]),
  589. },
  590. methods: {
  591. //快速查找个人数据
  592. quickQuery(type) {
  593. let url = '/api/app/patient-register/patient-register-or-patient?SType='
  594. switch (type) {
  595. case 'patientNo':
  596. url += `2&PatientNo=${this.query.patientNo}`
  597. break;
  598. case 'patientRegisterNo':
  599. url += `1&PatientRegisterNo=${this.query.patientRegisterNo}`
  600. break;
  601. case 'tel':
  602. url += `3&Phone=${this.query.tel}`
  603. break;
  604. case 'patientName':
  605. url += `4&PatientName=${this.query.patientName}`
  606. break;
  607. default:
  608. return;
  609. }
  610. console.log(url)
  611. getapi(url)
  612. .then((res) => {
  613. console.log('按条码号查个人数据', res)
  614. if (res.code == 1) {
  615. objCopy(res.data, this.form)
  616. this.patientRegister.photo = res.data.photo
  617. }else if(res.code == 0){
  618. this.$message.info("未找到相关信息")
  619. }
  620. });
  621. },
  622. //读取身份证信息
  623. peopleIcCard() {
  624. this.$peisAPI.peopleIcCard().then(res => {
  625. //console.log('peopleIcCard',res)
  626. let lres = JSON.parse(res)
  627. if (lres.Code && lres.Code.toLowerCase() == 'success') {
  628. this.projPriv.idNos = lres
  629. let idNos = parsIcCardtoLocal(this.projPriv.idNos, this.dict.sex, this.dict.nation)
  630. this.form.patientName = idNos.Name
  631. this.form.birthDate = idNos.birthDate
  632. this.form.sexId = idNos.sexId
  633. this.form.age = idNos.age
  634. this.form.nationId = idNos.nationId
  635. this.form.idNo = idNos.IDCode
  636. this.form.address = idNos.Address
  637. this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
  638. }
  639. })
  640. },
  641. //获取单位体检次数列表,并默认赋最后一次体检次数
  642. async getCustomerOrgRegisterList() {
  643. this.customerOrgRegisterList = []
  644. if (this.form.customerOrgId == this.dict.personOrgId) {
  645. this.form.customerOrgRegisterId = null
  646. return
  647. }
  648. try {
  649. let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`);
  650. let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`);
  651. this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N')
  652. //要把已完成体检的次数去掉
  653. if (this.customerOrgRegisterList.length > 0) {
  654. this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id
  655. //this.changeCustomerOrgGroupId()
  656. this.changeMedicalTimes()
  657. }
  658. } catch (error) {
  659. console.log(error)
  660. }
  661. },
  662. //修改单位体检次数
  663. changeMedicalTimes() {
  664. this.form.customerOrgGroupId = null
  665. this.changeCustomerOrgGroupId()
  666. //获取体检次数下的分组
  667. this.getCustomerOrgGroup(this.form.customerOrgRegisterId)
  668. },
  669. //获取体检次数下的分组
  670. getCustomerOrgGroup(customerOrgRegisterId) {
  671. this.patientRegister.customerOrgGroup = []
  672. getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => {
  673. if (res.code != - 1) {
  674. this.patientRegister.customerOrgGroup = res.data.items;
  675. }
  676. })
  677. },
  678. //修改出生日期
  679. changeBirthDate() {
  680. this.form.age = birthdayToAge(this.form.birthDate)
  681. },
  682. //修改身份证,生成年龄、出生、性别
  683. changeIdNo() {
  684. let ret = parseID(this.form.idNo)
  685. if (ret.age != -1) {
  686. this.form.birthDate = new Date(ret.birthday)
  687. this.form.age = ret.age
  688. this.form.sexId = ret.sex
  689. }
  690. },
  691. //分组改变时触发
  692. changeCustomerOrgGroupId() {
  693. this.patientRegister.customerOrgGroupChange++;
  694. if (this.form.id) this.Onsubmit('form', false);
  695. },
  696. //套餐改变时触发
  697. changeMedicalPackageId() {
  698. this.patientRegister.medicalPackageChange++;
  699. if (this.form.id) this.Onsubmit('form', false);
  700. },
  701. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  702. query(param) {
  703. //编辑的时候不查重
  704. if (this.form.id || !param) return;
  705. //console.log(param)
  706. getapi(`/api/app/patient/in-filter?Filter=${param}`).then((res) => {
  707. if (res.code == 1) {
  708. console.log("查重 ", res); //有数据才显示
  709. if (res.data.items && res.data.items.length > 0) {
  710. this.patientList = res.data.items;
  711. this.dialogVisible = true;
  712. }
  713. }
  714. });
  715. },
  716. //列表选中
  717. rowick(row) {
  718. this.patientChoosed = row;
  719. },
  720. //确定选择人员
  721. choosePatient() {
  722. if (!this.patientChoosed) {
  723. alert("请选中人员档案信息");
  724. return;
  725. }
  726. this.dialogVisible = false;
  727. this.form.patientId = this.patientChoosed.id;
  728. this.form.patientName = this.patientChoosed.displayName;
  729. this.form.sexId = this.patientChoosed.sexId;
  730. this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  731. this.form.birthDate = new Date(this.patientChoosed.birthDate);
  732. this.form.nationId = this.patientChoosed.nationId;
  733. this.form.idNo = this.patientChoosed.idNo;
  734. this.form.telephone = this.patientChoosed.telephone;
  735. this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  736. this.form.patientNo = this.patientChoosed.patientNo;
  737. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  738. if (this.form.birthDate) {
  739. this.form.age = birthdayToAge(this.form.birthDate)
  740. }
  741. if (this.form.idNo) {
  742. let ret = parseID(this.form.idNo)
  743. if (!this.form.birthDate) this.form.birthDate = new Date(ret.birthday)
  744. if (!this.form.age) this.form.age = ret.age
  745. if (!this.form.sexId) this.form.age = ret.sex
  746. }
  747. },
  748. ldddw(arrayData, key, value, display) {
  749. return dddw(arrayData, key, value, display);
  750. },
  751. lmoment(date, forMat) {
  752. return moment(new Date(date)).format(forMat);
  753. },
  754. changeBox(type) {
  755. //赋值
  756. if (this.form[type + 'Box']) {
  757. this.form[type] = 'Y';
  758. } else {
  759. this.form[type] = 'N';
  760. }
  761. },
  762. initBox() {
  763. if (this.form.isVip == 'Y') {
  764. this.form.isVipBox = true;
  765. } else {
  766. this.form.isVipBox = false;
  767. }
  768. if (this.form.isNameHide == 'Y') {
  769. this.form.isNameHideBox = true;
  770. } else {
  771. this.form.isNameHideBox = false;
  772. }
  773. if (this.form.isPhoneFollow == 'Y') {
  774. this.form.isPhoneFollowBox = true;
  775. } else {
  776. this.form.isPhoneFollowBox = false;
  777. }
  778. if (this.form.isLock == 'Y') {
  779. this.form.isLockBox = true;
  780. } else {
  781. this.form.isLockBox = false;
  782. }
  783. if (!this.form.id) {
  784. this.form.organizationUnitId = this.peisid;
  785. }
  786. },
  787. //提交
  788. Onsubmit(formName, msgTip) {
  789. this.$refs[formName].validate((valid) => {
  790. if (valid) {
  791. //赋值
  792. let body = deepCopy(this.form);
  793. if (this.form.birthDate) {
  794. body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD")
  795. }
  796. delete body.id;
  797. delete body.patientRegisterNo;
  798. delete body.medicalTimes;
  799. delete body.completeFlag;
  800. delete body.isMedicalStart;
  801. delete body.patientNo;
  802. delete body.creatorId;
  803. delete body.creationTime;
  804. delete body.lastModificationTime;
  805. delete body.lastModifierId;
  806. delete body.isVipBox;
  807. delete body.isNameHideBox;
  808. delete body.isPhoneFollowBox;
  809. delete body.isLockBox;
  810. delete body.photo;
  811. setNull(body, this.defaultNull);
  812. //日期转换 日期控件增加格式
  813. // console.log("body.birthDate", body.birthDate);
  814. // if (body.birthDate) {
  815. // body.birthDate = moment(new Date(body.birthDate)).format(
  816. // "yyyy-MM-DD"
  817. // );
  818. // }
  819. if (this.form.id.length < 1) {
  820. //id为空则新增
  821. console.log(`/api/patientregister/createreturninfo`, body);
  822. postapi(`/api/patientregister/createreturninfo`, body).then(
  823. (res) => {
  824. if (res.code == 1) {
  825. //console.log('res',res)
  826. if (msgTip) this.$message.success("创健 操作成功");
  827. //一般读身份证照片时,会出现这种情况
  828. if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo);
  829. objCopy(res.data, this.form);
  830. // this.patientRegister.prList.push(res.data); //列表添加记录
  831. this.patientRegister.patientRegisterId = res.data.id;
  832. this.patientRegister.patientRegisterAbs.forEach(e => {
  833. e.patientRegisterId = res.data.id;
  834. return e;
  835. });
  836. this.patientRegister.patientRegisterRd = res.data;
  837. this.patientRegister.query.times++;
  838. this.patientRegister.saveTimes++;
  839. }
  840. }
  841. );
  842. } else {
  843. //id不为空则编辑 api/patientregister/updatepatientregister
  844. console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body);
  845. postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => {
  846. if (res.code == 1) {
  847. if (msgTip) this.$message.success("更新 操作成功");
  848. //一般读身份证照片时,会出现这种情况
  849. if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
  850. this.patientRegister.query.times++;
  851. //this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存
  852. }
  853. });
  854. }
  855. } else {
  856. alert("未通过数据校验");
  857. return false;
  858. }
  859. });
  860. },
  861. //将现有的数据,复制并展现,但未保存
  862. rdCopy() {
  863. if (!this.patientRegister.patientRegisterId) {
  864. this.$message.info("该信息尚未保存,不可执行此操作!");
  865. return;
  866. }
  867. this.patientRegister.patientRegisterId = '';
  868. this.form.id = '';
  869. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  870. this.form.patientRegisterNo = '';
  871. this.form.patientNo = '';
  872. this.form.medicalTimes = 1;
  873. this.form.patientName = '';
  874. this.form.photo = '';
  875. this.patientRegister.patientRegisterAbs.forEach(e => {
  876. e.patientRegisterId = '';
  877. e.id = '';
  878. return e;
  879. });
  880. // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  881. this.$message.info("操作成功,确定请记得点保存");
  882. },
  883. //删除
  884. del() {
  885. deletapi(
  886. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  887. ).then((res) => {
  888. this.$message.success("删除 操作成功");
  889. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  890. this.getCustomerOrgTree();
  891. });
  892. },
  893. //拍照(已废弃)
  894. openCamera() {
  895. if (!this.form.id) {
  896. alert("请先保存人员信息");
  897. return;
  898. }
  899. this.patientRegister.cameraVisble = true;
  900. },
  901. //拍照(调壳程序)
  902. photoGrah() {
  903. if (!this.form.id) {
  904. alert("请先保存人员信息");
  905. return;
  906. }
  907. this.$peisAPI.photoGrah()
  908. .then(res => {
  909. console.log(res)
  910. //alert(res)
  911. let lres = JSON.parse(res)
  912. if (lres.Code && lres.Code.toLowerCase() == 'success') {
  913. let uploadPhoto = {
  914. patientRegisterId: this.form.id,
  915. photo: lres.Photo,
  916. };
  917. this.patientRegister.photo = `data:image/${lres.PhotoFormat};base64,${lres.Photo}`
  918. return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
  919. } else {
  920. this.$message.error("上传照片错误" + lres.Code)
  921. }
  922. }).then(res => {
  923. if (res.code == 1) {
  924. let body = {
  925. patientRegisterId: this.form.id,
  926. photo: res.data,
  927. };
  928. console.log(body);
  929. return postapi(`/api/app/patient-register/update-photo`, body);
  930. }
  931. }).then(res => {
  932. if (res.code != -1) {
  933. //console.log('拍照',res.data)
  934. this.patientRegister.patientRegisterRd.photo = res.data.photo
  935. this.$message.success("操作成功");
  936. }
  937. }).catch(err => {
  938. console.log('this.$peisAPI.photoGrah', err)
  939. })
  940. },
  941. getPeoplePhoto(photo) {
  942. this.peoplePhoto = photoParse(photo)
  943. },
  944. // 打印指引单(isPreview)
  945. async guidePrint(ReportCode, isPreview) {
  946. if (this.form.id.length < 1) {
  947. this.$message.info("人员信息尚未保存,不可执行此操作!");
  948. return;
  949. }
  950. let token = localStorage.getItem('token');
  951. let user = localStorage.getItem('user');
  952. let toOutShell = {
  953. ReportCode, token,
  954. preViewCanPrint: 'N',
  955. Parameters: [
  956. { Name: 'printer', Value: user },
  957. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  958. ],
  959. };
  960. if (isPreview) {
  961. //
  962. //this.multipleSelection.forEach((item,index) =>{
  963. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  964. .then((res) => {
  965. if (res.code != -1) {
  966. toOutShell.ReportTable = res.data;
  967. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  968. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  969. }
  970. })
  971. .catch(err => {
  972. this.$message.warning(err);
  973. });
  974. // });
  975. } else {
  976. postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  977. .then((res) => {
  978. if (res.code != -1) {
  979. toOutShell.ReportTable = res.data;
  980. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  981. return this.$peisAPI.print(JSON.stringify(toOutShell));
  982. }
  983. })
  984. .then(res => {
  985. if (res.toLowerCase() == 'success') {
  986. //更新打印次数
  987. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  988. }
  989. })
  990. .then(res => {
  991. if (res.code != -1) {
  992. lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  993. if (lfind > -1) {
  994. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  995. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  996. } else {
  997. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  998. }
  999. }
  1000. }
  1001. })
  1002. .catch(err => {
  1003. this.$message.warning(err);
  1004. });
  1005. }
  1006. },
  1007. //检验申请
  1008. async lisRequest() {
  1009. let isPrintLisRequest = false
  1010. let res = null
  1011. if (this.form.id.length < 1) {
  1012. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1013. return;
  1014. }
  1015. try {
  1016. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  1017. console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  1018. } catch (error) {
  1019. return;
  1020. }
  1021. if (res.Code != -1) {
  1022. this.$message.info("发送检验申请成功!");
  1023. isPrintLisRequest = true;
  1024. }
  1025. //重复申请,重打
  1026. if (res.Code == -1 && res.Message.indexOf('已申请') > -1) {
  1027. isPrintLisRequest = true;
  1028. }
  1029. if (!isPrintLisRequest) return;
  1030. try {
  1031. await this.$confirm("是否打印检验申请单?", "提示", {
  1032. confirmButtonText: "是",
  1033. cancelButtonText: "否",
  1034. type: "info",
  1035. showClose: false,
  1036. closeOnClickModal: false,
  1037. closeOnPressEscape: false,
  1038. });
  1039. } catch (error) {
  1040. return;
  1041. }
  1042. //打印检验申请单
  1043. this.lisPrint('0003', false);
  1044. },
  1045. //条码打印
  1046. lisPrint(ReportCode, isPreview) {
  1047. if (this.form.id.length < 1) {
  1048. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1049. return;
  1050. }
  1051. let token = localStorage.getItem('token');
  1052. let user = localStorage.getItem('user');
  1053. let toOutShell = {
  1054. ReportCode, token,
  1055. Parameters: [
  1056. { Name: 'printer', Value: user },
  1057. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  1058. ],
  1059. };
  1060. if (isPreview) {
  1061. //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
  1062. //this.multipleSelection.forEach((item,index) =>{
  1063. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  1064. .then((res) => {
  1065. if (res.code != -1) {
  1066. toOutShell.ReportTable = { lisRequest: res.data };
  1067. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1068. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1069. }
  1070. })
  1071. .catch(err => {
  1072. this.$message.warning(err);
  1073. });
  1074. // });
  1075. } else {
  1076. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  1077. .then((res) => {
  1078. if (res.code != -1) {
  1079. toOutShell.ReportTable = { lisRequest: res.data };
  1080. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  1081. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1082. }
  1083. })
  1084. .then(res => {
  1085. if (res.toLowerCase() == 'success') {
  1086. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  1087. // {
  1088. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  1089. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1090. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1091. // }
  1092. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  1093. }
  1094. })
  1095. .catch(err => {
  1096. this.$message.warning(err);
  1097. });
  1098. }
  1099. },
  1100. //补打条码
  1101. reLisRequest() {
  1102. if (this.form.id.length < 1) {
  1103. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1104. return;
  1105. }
  1106. this.brushTimes++;
  1107. this.patientRegister.lisRequestVisble = true;
  1108. },
  1109. //手动合并项目
  1110. reMergeAsbitem() {
  1111. if (this.form.id.length < 1) {
  1112. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1113. return;
  1114. }
  1115. this.brushTimes++;
  1116. this.patientRegister.mergeAsbitemVisble = true;
  1117. },
  1118. toCharge(patientRegisterNo) {
  1119. this.patientRegister.patientRegisterRd.patientRegisterNo = patientRegisterNo;
  1120. this.$router.push({ path: "/charge" });
  1121. },
  1122. },
  1123. //监听事件
  1124. watch: {
  1125. "form.customerOrgId"(newVal, oldVal) {
  1126. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  1127. if (newVal != oldVal) {
  1128. this.getCustomerOrgRegisterList()
  1129. }
  1130. },
  1131. //新增或编辑
  1132. "editTimes"(newVal, oldVal) {
  1133. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  1134. if (newVal != oldVal) {
  1135. console.log('this.editTimes', this.editTimes)
  1136. objCopy(this.formInitData, this.form);
  1137. this.initBox();
  1138. //console.log('this.form',this.form)
  1139. }
  1140. },
  1141. //拍照触发
  1142. "patientRegister.photo"(newVal, oldVal) {
  1143. //console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  1144. if (newVal != oldVal) {
  1145. this.getPeoplePhoto(newVal)
  1146. }
  1147. },
  1148. },
  1149. };
  1150. </script>
  1151. <style scoped>
  1152. ::v-deep .el-button {
  1153. padding: 10px 5px;
  1154. /* 原值:12px 20px; */
  1155. }
  1156. ::v-deep .el-form-item {
  1157. margin-bottom: 0px;
  1158. }
  1159. ::v-deep .el-table--small .el-table__cell {
  1160. padding: 0px 0;
  1161. }
  1162. ::v-deep .el-input__inner {
  1163. text-align: left;
  1164. padding-left: 5px;
  1165. padding-right: 15px;
  1166. }
  1167. ::v-deep .el-icon-date:before {
  1168. content: ""
  1169. }
  1170. .btn {
  1171. margin-top: 5px;
  1172. }
  1173. .btnClass {
  1174. width: 110px;
  1175. }
  1176. .query {
  1177. margin-left: 10px;
  1178. }
  1179. </style>