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.

1776 lines
67 KiB

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