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.

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