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.

948 lines
36 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <div style="display: flex">
  4. <div :style="'width:' + (window.pageWidth - 120 - 30) + 'px;'">
  5. <div>
  6. <el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium">
  7. <el-row>
  8. <el-col :span="5">
  9. <el-form-item label="单位名称" prop="customerOrgId">
  10. <el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll"
  11. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'"
  12. :props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
  13. :show-all-levels="false" disabled>
  14. </el-cascader>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="5">
  18. <el-form-item label="条码号" prop="patientRegisterNo">
  19. <el-input v-model="form.patientRegisterNo" disabled></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="5">
  23. <el-form-item label="档案号" prop="patientNo">
  24. <el-input v-model="form.patientNo" disabled></el-input>
  25. </el-form-item>
  26. </el-col>
  27. <el-col :span="5">
  28. <el-form-item label="体检次数" prop="medicalTimes">
  29. <el-input v-model="form.medicalTimes" disabled></el-input>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="4">
  33. </el-col>
  34. </el-row>
  35. <el-row>
  36. <el-col :span="5">
  37. <el-form-item label="姓名" prop="patientName">
  38. <el-input v-model="form.patientName" @blur="query(form.patientName)"></el-input>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="5">
  42. <el-form-item label="性别" prop="sexId">
  43. <el-select v-model="form.sexId" placeholder="请选择"
  44. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
  45. <el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id">
  46. </el-option>
  47. </el-select>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="5">
  51. <el-form-item label="出生日期" prop="birthDate">
  52. <el-date-picker v-model="form.birthDate" type="date" value-format="yyyy-MM-dd" placeholder="出生日期"
  53. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'" @change="changeBirthDate"
  54. prefix-icon="" />
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="5">
  58. <el-form-item label="年龄" prop="age">
  59. <el-input v-model="form.age"></el-input>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="4" />
  63. </el-row>
  64. <el-row>
  65. <el-col :span="5">
  66. <el-form-item label="身份证号" prop="idNo">
  67. <el-input v-model="form.idNo" @change="changeIdNo" @blur="query(form.idNo)"></el-input>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :span="5">
  71. <el-form-item label="手机号" prop="mobileTelephone">
  72. <el-input v-model="form.mobileTelephone"></el-input>
  73. </el-form-item>
  74. </el-col>
  75. <el-col :span="5">
  76. <el-form-item label="电话" prop="telephone">
  77. <el-input v-model="form.telephone"></el-input>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="5">
  81. <el-form-item label="婚姻状况" prop="maritalStatusId">
  82. <el-select v-model="form.maritalStatusId" placeholder="请选择"
  83. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
  84. <el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName"
  85. :value="item.id">
  86. </el-option>
  87. </el-select>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="4" />
  91. </el-row>
  92. <el-row>
  93. <el-col :span="10">
  94. <el-form-item label="地址" prop="address">
  95. <el-input v-model="form.address"></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"></el-input>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :span="5">
  104. <el-form-item label="邮政编码" prop="postalCode">
  105. <el-input v-model="form.postalCode"></el-input>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="4" />
  109. </el-row>
  110. <el-row>
  111. <el-col :span="5">
  112. <el-form-item label="民族" prop="nationId">
  113. <el-select v-model="form.nationId" placeholder="请选择" filterable clearable
  114. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
  115. <el-option v-for="item in dict.nation" :key="item.nationId" :label="item.displayName"
  116. :value="item.nationId" />
  117. </el-select>
  118. </el-form-item>
  119. </el-col>
  120. <el-col :span="5">
  121. <el-form-item label="籍贯" prop="birthPlaceId">
  122. <el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
  123. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
  124. <el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
  125. :value="item.id" />
  126. </el-select>
  127. </el-form-item>
  128. </el-col>
  129. <el-col :span="5">
  130. <el-form-item label="体检类别" prop="medicalTypeId">
  131. <el-select v-model="form.medicalTypeId" placeholder="请选择" filterable clearable
  132. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
  133. <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName"
  134. :value="item.id" />
  135. </el-select>
  136. </el-form-item>
  137. </el-col>
  138. <el-col :span="5">
  139. <el-form-item label="人员类别" prop="personnelTypeId">
  140. <el-select v-model="form.personnelTypeId" placeholder="请选择" filterable clearable
  141. :style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
  142. <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName"
  143. :value="item.id" />
  144. </el-select>
  145. </el-form-item>
  146. </el-col>
  147. <el-col :span="4">
  148. <el-form-item label="性激素期" prop="sexHormoneTermId">
  149. <el-select v-model="form.sexHormoneTermId" placeholder="请选择" filterable clearable
  150. :style="'width:' + Math.floor((window.pageWidth - 630) / 6) + 'px;'">
  151. <el-option v-for="item in dict.sexHormoneTerm" :key="item.id" :label="item.displayName"
  152. :value="item.id">
  153. </el-option>
  154. </el-select>
  155. </el-form-item>
  156. </el-col>
  157. </el-row>
  158. <el-row>
  159. <el-col :span="5">
  160. <el-form-item label="工卡号" prop="jobCardNo">
  161. <el-input v-model="form.jobCardNo"></el-input>
  162. </el-form-item>
  163. </el-col>
  164. <el-col :span="5">
  165. <el-form-item label="体检卡号" prop="medicalCardNo">
  166. <el-input v-model="form.medicalCardNo"></el-input>
  167. </el-form-item>
  168. </el-col>
  169. <el-col :span="5">
  170. <el-form-item label="职务" prop="jobPost">
  171. <el-input v-model="form.jobPost"></el-input>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="5">
  175. <el-form-item label="职称" prop="jobTitle">
  176. <el-input v-model="form.jobTitle"></el-input>
  177. </el-form-item>
  178. </el-col>
  179. <el-col :span="4">
  180. <el-form-item label="介绍人" prop="salesman">
  181. <el-input v-model="form.salesman"></el-input>
  182. </el-form-item>
  183. </el-col>
  184. </el-row>
  185. <el-row>
  186. <el-col :span="5">
  187. <el-form-item label="是否VIP" prop="isVip">
  188. <el-radio v-model="form.isVip" label="Y"></el-radio>
  189. <el-radio v-model="form.isVip" label="N"></el-radio>
  190. </el-form-item>
  191. </el-col>
  192. <el-col :span="5" style="margin-bottom: -15px; line-height: 40px">
  193. <el-form-item label="电话随访" prop="isPhoneFollow">
  194. <el-radio v-model="form.isPhoneFollow" label="Y"></el-radio>
  195. <el-radio v-model="form.isPhoneFollow" label="N"></el-radio>
  196. </el-form-item>
  197. </el-col>
  198. <el-col :span="5">
  199. <el-form-item label="隐藏姓名" prop="isNameHide">
  200. <el-radio v-model="form.isNameHide" label="Y"></el-radio>
  201. <el-radio v-model="form.isNameHide" label="N"></el-radio>
  202. </el-form-item>
  203. </el-col>
  204. <el-col :span="5">
  205. <el-form-item label="是否锁住" prop="isLock">
  206. <el-radio v-model="form.isLock" label="Y"></el-radio>
  207. <el-radio v-model="form.isLock" label="N"></el-radio>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="4">
  211. <el-form-item label="体检开始" prop="isMedicalStart">
  212. <el-select v-model="form.isMedicalStart" placeholder="请选择" disabled
  213. :style="'width:' + Math.floor((window.pageWidth - 630) / 6) + 'px;'">
  214. <el-option label="是" value="Y" />
  215. <el-option label="否" value="N" />
  216. </el-select>
  217. </el-form-item>
  218. </el-col>
  219. </el-row>
  220. <el-row>
  221. <el-col :span="6">
  222. <el-form-item label="体检中心" prop="organizationUnitId">
  223. <el-select v-model="form.organizationUnitId" placeholder="请选择" filterable
  224. :style="'width:' + Math.floor((window.pageWidth - 470) / 4) + 'px;'">
  225. <el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName"
  226. :value="item.id">
  227. </el-option>
  228. </el-select>
  229. </el-form-item>
  230. </el-col>
  231. <el-col :span="6">
  232. <el-form-item label="分组" prop="customerOrgGroupId">
  233. <el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable
  234. @change="changeCustomerOrgGroupId" :disabled="form.customerOrgId === dict.personOrgId ? true : false"
  235. :style="'width:' + Math.floor((window.pageWidth - 470) / 4) + 'px;'">
  236. <el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
  237. :value="item.id" />
  238. </el-select>
  239. </el-form-item>
  240. </el-col>
  241. <el-col :span="6">
  242. <el-form-item label="套餐" prop="medicalPackageId">
  243. <el-select v-model="form.medicalPackageId" placeholder="请选择" filterable clearable
  244. @change="changeMedicalPackageId" :disabled="form.customerOrgId === dict.personOrgId ? false : true"
  245. :style="'width:' + Math.floor((window.pageWidth - 470) / 4) + 'px;'">
  246. <el-option v-for="item in dict.medicalPackage" :key="item.id" :label="item.displayName"
  247. :value="item.id" />
  248. </el-select>
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="6">
  252. <el-form-item label="完成标志" prop="completeFlag">
  253. <el-select v-model="form.completeFlag" placeholder="请选择" disabled
  254. :style="'width:' + Math.floor((window.pageWidth - 470) / 4) + 'px;'">
  255. <el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName"
  256. :value="item.id">
  257. </el-option>
  258. </el-select>
  259. </el-form-item>
  260. </el-col>
  261. <el-col :span="24">
  262. <el-form-item label="备注" prop="remark">
  263. <el-input v-model="form.remark" type="textarea" :rows="1" placeholder="请输入备注"></el-input>
  264. </el-form-item>
  265. </el-col>
  266. </el-row>
  267. <el-row>
  268. <el-col :span="6">
  269. <el-form-item label="创建者">
  270. <el-input v-model="form.creatorId" disabled></el-input>
  271. </el-form-item>
  272. </el-col>
  273. <el-col :span="6">
  274. <el-form-item label="创建时间">
  275. <el-input :value="form.creationTime
  276. ? lmoment(form.creationTime, 'yyyy-MM-DD')
  277. : ''
  278. " disabled></el-input>
  279. </el-form-item>
  280. </el-col>
  281. <el-col :span="6">
  282. <el-form-item label="修改者">
  283. <el-input v-model="form.lastModifierId" disabled></el-input>
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="6">
  287. <el-form-item label="修改时间">
  288. <el-input :value="form.lastModificationTime
  289. ? lmoment(form.lastModificationTime, 'yyyy-MM-DD')
  290. : ''
  291. " disabled></el-input>
  292. </el-form-item>
  293. </el-col>
  294. </el-row>
  295. </el-form>
  296. <el-image
  297. :style="'position: absolute;top:65px;right:' + (110 + Math.floor((window.pageWidth - 360) / 25)) + 'px; width: 150px; height: 160px;'"
  298. :src="form.photo ? (apiurl + '/' + form.photo) : ''">
  299. <div slot="placeholder" class="image-slot">
  300. 加载中<span class="dot">...</span>
  301. </div>
  302. </el-image>
  303. </div>
  304. <div>
  305. <PatientRegisterItem :patientRegisterForm="form" />
  306. </div>
  307. </div>
  308. <div style="margin-left: 10px;width:110px;">
  309. <div class="btn">
  310. <el-button type="primary" class="btnClass" @click="openCamera" icon="el-icon-camera">拍照</el-button>
  311. </div>
  312. <div class="btn">
  313. <el-button @click="readIdCard" class="btnClass">读身份证</el-button>
  314. </div>
  315. <div class="btn">
  316. <el-button type="primary" class="btnClass" @click="rdCopy">复制新增</el-button>
  317. </div>
  318. <div class="btn">
  319. <el-button type="success" class="btnClass" @click="Onsubmit('form', true)">保存</el-button>
  320. </div>
  321. <div class="btn">
  322. <el-button type="primary" class="btnClass" @click="lisRequest">检验单申请</el-button>
  323. </div>
  324. <div class="btn">
  325. <el-button type="primary" class="btnClass" @click="lisPrint('0002', false)">条码打印</el-button>
  326. </div>
  327. <div class="btn">
  328. <el-button type="danger" class="btnClass" @click="reLisRequest">条码补打</el-button>
  329. </div>
  330. <div class="btn">
  331. <el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单打印</el-button>
  332. </div>
  333. <div class="btn">
  334. <el-button type="primary" class="btnClass" @click="guidePrint('0001', false)">指引单预览</el-button>
  335. </div>
  336. </div>
  337. </div>
  338. <!-- 人员档案列表 -->
  339. <el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800" :show-close="false" :close-on-click-modal="false"
  340. :append-to-body="true">
  341. <el-table :data="patientList" border width="800" height="480" row-key="id" size="small"
  342. class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="patientList">
  343. <el-table-column type="index" width="30" />
  344. <el-table-column prop="patientNo" label="档案号" />
  345. <el-table-column prop="lastTime" label="末次体检" width="100">
  346. <template slot-scope="scope">
  347. <div v-if="scope.row.lastTime">
  348. {{ lmoment(scope.row.lastTime, "yyyy-MM-DD") }}
  349. </div>
  350. </template>
  351. </el-table-column>
  352. <el-table-column prop="medicalTimes" label="体检次数" />
  353. <el-table-column prop="displayName" label="姓名" />
  354. <el-table-column prop="sexId" label="性别">
  355. <template slot-scope="scope">
  356. <div>
  357. {{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}
  358. </div>
  359. </template>
  360. </el-table-column>
  361. <el-table-column prop="maritalStatusId" label="婚姻">
  362. <template slot-scope="scope">
  363. <div>
  364. {{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  365. </div>
  366. </template>
  367. </el-table-column>
  368. <el-table-column prop="birthDate" label="出生日期" width="100">
  369. <template slot-scope="scope">
  370. <div v-if="scope.row.birthDate">
  371. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  372. </div>
  373. </template>
  374. </el-table-column>
  375. <el-table-column prop="nationId" label="民族">
  376. <template slot-scope="scope">
  377. <div>
  378. {{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
  379. </div>
  380. </template>
  381. </el-table-column>
  382. <el-table-column prop="idNo" label="身份证号" />
  383. <el-table-column prop="telephone" label="电话" />
  384. <el-table-column prop="mobileTelephone" label="手机号" />
  385. </el-table>
  386. <span slot="footer" class="dialog-footer">
  387. <el-button @click="dialogVisible = false"> </el-button>
  388. <el-button type="primary" @click="choosePatient"> </el-button>
  389. </span>
  390. </el-dialog>
  391. <!-- 拍照 -->
  392. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600" :show-close="false"
  393. :close-on-click-modal="false" :append-to-body="true">
  394. <Camera :id="form.id" />
  395. </el-dialog>
  396. <!-- 检验条码补打 -->
  397. <el-dialog title="检验条码补打" :visible.sync="patientRegister.lisRequestVisble" width="600px" height="400"
  398. :show-close="false" :close-on-click-modal="false" :append-to-body="true">
  399. <LisRequest :id="form.id" :brushTimes="brushTimes" />
  400. </el-dialog>
  401. </div>
  402. </template>
  403. <script>
  404. import moment from "moment";
  405. import { mapState } from "vuex";
  406. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  407. import mm from "../../utlis/mm";
  408. import { objCopy, setNull, dddw, parseID, birthdayToAge } from "../../utlis/proFunc";
  409. import Camera from "./Camera.vue";
  410. import LisRequest from "./LisRequest.vue";
  411. import PatientRegisterItem from "./PatientRegisterItem.vue";
  412. export default {
  413. components: {
  414. Camera,
  415. LisRequest,
  416. PatientRegisterItem,
  417. },
  418. props: ['formInitData', 'editTimes'],
  419. data() {
  420. return {
  421. apiurl: mm.apiurl,
  422. brushTimes: 0,
  423. form: {
  424. id: "", //id
  425. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  426. patientNo: "", //档案号
  427. customerOrgId: null, //单位编号
  428. customerOrgGroupId: null, //分组
  429. medicalPackageId: null, //套餐
  430. patientName: "", //姓名
  431. birthDate: "", //字符串 如:2012-01-29
  432. sexId: "U", //性别 默认未知U
  433. age: null, //年龄
  434. jobCardNo: "", //工卡号
  435. medicalCardNo: "", //体检卡号
  436. maritalStatusId: "9", //婚姻状况 默认未知
  437. medicalTypeId: null, //体检类别
  438. personnelTypeId: null, //人员类别
  439. jobPost: "", //职务
  440. jobTitle: "", //职称
  441. photo: "", //照片
  442. salesman: "", //介绍人
  443. sexHormoneTermId: null, //性激素期限
  444. isNameHide: "N", //隐藏姓名
  445. isPhoneFollow: "N", //电话随访
  446. isVip: "N", //vip客户
  447. remark: "", //
  448. isLock: "N", //是否锁住
  449. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  450. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  451. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  452. medicalTimes: 1, //条码号 【创建编辑时不操作】
  453. organizationUnitId: null, //体检中心
  454. address: "", //地址
  455. email: "", //email
  456. idNo: "", //身份证号
  457. telephone: "", //电话
  458. mobileTelephone: "", //手机号
  459. nationId: null, //民族编号
  460. birthPlaceId: null, //籍惯(出生地)
  461. postalCode: "", //邮编
  462. creatorId: null,
  463. creationTime: "",
  464. lastModificationTime: "",
  465. lastModifierId: null,
  466. }, //单位 记录 目前新增与更新是一致
  467. defaultNull: [
  468. "customerOrgId",
  469. "customerOrgGroupId",
  470. "medicalPackageId",
  471. "age",
  472. "medicalTypeId",
  473. "personnelTypeId",
  474. "sexHormoneTermId",
  475. "organizationUnitId",
  476. "nationId",
  477. "birthPlaceId",
  478. ], //一般uuid字段为空时,需设置为null值
  479. rules: {
  480. patientName: [
  481. { required: true, message: "请输入姓名", trigger: "blur" },
  482. ],
  483. organizationUnitId: [
  484. { required: true, message: "请填写体检中心", trigger: "blur" },
  485. ],
  486. },
  487. dialogVisible: false,
  488. patientList: [], //人员列表(用于判断人员多次体检)
  489. patientChoosed: {}, //查重选中的人员
  490. dialogCamera: false, //拍照组件
  491. };
  492. },
  493. created() { },
  494. //挂载完成
  495. mounted() {
  496. objCopy(this.formInitData, this.form);
  497. },
  498. computed: {
  499. ...mapState(["window", "dict", "patientRegister", "customerOrg"]),
  500. },
  501. methods: {
  502. readIdCard() {
  503. console.log("this.form1", this.form);
  504. },
  505. //修改出生日期
  506. changeBirthDate() {
  507. this.form.age = birthdayToAge(this.form.birthDate)
  508. },
  509. //修改身份证,生成年龄、出生、性别
  510. changeIdNo() {
  511. let ret = parseID(this.form.idNo)
  512. if (ret.age != -1) {
  513. this.form.birthDate = ret.birthday
  514. this.form.age = ret.age
  515. this.form.sexId = ret.sex
  516. }
  517. },
  518. //分组改变时触发
  519. changeCustomerOrgGroupId() {
  520. this.patientRegister.customerOrgGroupChange++;
  521. if (this.form.id) this.Onsubmit('form', false);
  522. },
  523. //套餐改变时触发
  524. changeMedicalPackageId() {
  525. this.patientRegister.medicalPackageChange++;
  526. if (this.form.id) this.Onsubmit('form', false);
  527. },
  528. //根据姓名,身份证号 查询档案信息,用于判断人员多次体检
  529. query(param) {
  530. //编辑的时候不查重
  531. if (this.form.id || !param) return;
  532. //console.log(param)
  533. getapi(`/api/app/patient/in-filter?Filter=${param}`).then((res) => {
  534. if (res.code == 1) {
  535. console.log("查重 ", res); //有数据才显示
  536. if (res.data.items && res.data.items.length > 0) {
  537. this.patientList = res.data.items;
  538. this.dialogVisible = true;
  539. }
  540. }
  541. });
  542. },
  543. //列表选中
  544. rowick(row) {
  545. this.patientChoosed = row;
  546. },
  547. //确定选择人员
  548. choosePatient() {
  549. if (!this.patientChoosed) {
  550. alert("请选中人员档案信息");
  551. return;
  552. }
  553. this.dialogVisible = false;
  554. this.form.patientId = this.patientChoosed.id;
  555. this.form.patientName = this.patientChoosed.displayName;
  556. this.form.sexId = this.patientChoosed.sexId;
  557. this.form.maritalStatusId = this.patientChoosed.maritalStatusId;
  558. this.form.birthDate = this.patientChoosed.birthDate;
  559. this.form.nationId = this.patientChoosed.nationId;
  560. this.form.idNo = this.patientChoosed.idNo;
  561. this.form.telephone = this.patientChoosed.telephone;
  562. this.form.mobileTelephone = this.patientChoosed.mobileTelephone;
  563. this.form.patientNo = this.patientChoosed.patientNo;
  564. this.form.medicalTimes = this.patientChoosed.medicalTimes + 1;
  565. },
  566. ldddw(arrayData, key, value, display) {
  567. return dddw(arrayData, key, value, display);
  568. },
  569. lmoment(date, forMat) {
  570. return moment(new Date(date)).format(forMat);
  571. },
  572. //提交
  573. Onsubmit(formName, msgTip) {
  574. this.$refs[formName].validate((valid) => {
  575. if (valid) {
  576. //赋值
  577. let body = { ...this.form };
  578. delete body.id;
  579. delete body.patientRegisterNo;
  580. delete body.medicalTimes;
  581. delete body.completeFlag;
  582. delete body.isMedicalStart;
  583. delete body.patientNo;
  584. delete body.creatorId;
  585. delete body.creationTime;
  586. delete body.lastModificationTime;
  587. delete body.lastModifierId;
  588. setNull(body, this.defaultNull);
  589. //日期转换 日期控件增加格式
  590. // console.log("body.birthDate", body.birthDate);
  591. // if (body.birthDate) {
  592. // body.birthDate = moment(new Date(body.birthDate)).format(
  593. // "yyyy-MM-DD"
  594. // );
  595. // }
  596. if (this.form.id.length < 1) {
  597. //id为空则新增
  598. console.log(`/api/app/patient-register/return-info`, body);
  599. postapi(`/api/app/patient-register/return-info`, body).then(
  600. (res) => {
  601. if (res.code == 1) {
  602. //console.log('res',res)
  603. if (msgTip) this.$message.success("创健 操作成功");
  604. objCopy(res.data, this.form);
  605. // this.patientRegister.prList.push(res.data); //列表添加记录
  606. this.patientRegister.patientRegisterId = res.data.id;
  607. this.patientRegister.patientRegisterAbs.forEach(e => {
  608. e.patientRegisterId = res.data.id;
  609. return e;
  610. });
  611. this.patientRegister.patientRegisterRd = res.data;
  612. this.patientRegister.query.times++;
  613. this.patientRegister.saveTimes++;
  614. }
  615. }
  616. );
  617. } else {
  618. //id不为空则编辑
  619. console.log(`/api/app/patient-register?PatientRegisterId=${this.form.id}`, body);
  620. putapi(`/api/app/patient-register?PatientRegisterId=${this.form.id}`, body).then((res) => {
  621. if (res.code == 1) {
  622. if (msgTip) this.$message.success("更新 操作成功");
  623. this.patientRegister.query.times++;
  624. //this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存
  625. }
  626. });
  627. }
  628. } else {
  629. alert("未通过数据校验");
  630. return false;
  631. }
  632. });
  633. },
  634. //将现有的数据,复制并展现,但未保存
  635. rdCopy() {
  636. if (!this.patientRegister.patientRegisterId) {
  637. this.$message.info("该信息尚未保存,不可执行此操作!");
  638. return;
  639. }
  640. this.patientRegister.patientRegisterId = '';
  641. this.form.id = '';
  642. this.form.patientId = '00000000-0000-0000-0000-000000000000';
  643. this.form.patientRegisterNo = '';
  644. this.form.patientNo = '';
  645. this.form.medicalTimes = 1;
  646. this.form.patientName = '';
  647. this.form.photo = '';
  648. this.patientRegister.patientRegisterAbs.forEach(e => {
  649. e.patientRegisterId = '';
  650. e.id = '';
  651. return e;
  652. });
  653. // console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs)
  654. this.$message.info("操作成功,确定请记得点保存");
  655. },
  656. //删除
  657. del() {
  658. deletapi(
  659. `/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`
  660. ).then((res) => {
  661. this.$message.success("删除 操作成功");
  662. this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } });
  663. this.getCustomerOrgTree();
  664. });
  665. },
  666. //拍照
  667. openCamera() {
  668. if (!this.form.id) {
  669. alert("请先保存人员信息");
  670. return;
  671. }
  672. this.patientRegister.cameraVisble = true;
  673. },
  674. // 打印指引单(isPreview)
  675. async guidePrint(ReportCode, isPreview) {
  676. if (this.form.id.length < 1) {
  677. this.$message.info("人员信息尚未保存,不可执行此操作!");
  678. return;
  679. }
  680. let token = localStorage.getItem('token');
  681. let user = localStorage.getItem('user');
  682. let toOutShell = {
  683. ReportCode, token,
  684. Parameters: [
  685. { Name: 'printer', Value: user },
  686. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  687. ],
  688. };
  689. if (isPreview) {
  690. //
  691. //this.multipleSelection.forEach((item,index) =>{
  692. getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  693. .then((res) => {
  694. if (res.code != -1) {
  695. toOutShell.ReportTable = res.data;
  696. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  697. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  698. }
  699. })
  700. .catch(err => {
  701. this.$message.warning(err);
  702. });
  703. // });
  704. } else {
  705. getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.form.id}`)
  706. .then((res) => {
  707. if (res.code != -1) {
  708. toOutShell.ReportTable = res.data;
  709. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  710. return this.$peisAPI.print(JSON.stringify(toOutShell));
  711. }
  712. })
  713. .then(res => {
  714. if (res.toLowerCase() == 'success') {
  715. //更新打印次数
  716. return postapi('/api/app/patientregister/updatepatientregisterguideprinttimesmany', [this.form.id])
  717. }
  718. })
  719. .then(res => {
  720. if (res.code != -1) {
  721. lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id)
  722. if (lfind > -1) {
  723. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  724. this.patientRegister.prList[lfind].guidePrintTimes = Number(this.patientRegister.prList[lfind].guidePrintTimes) + 1;
  725. } else {
  726. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  727. }
  728. }
  729. }
  730. })
  731. .catch(err => {
  732. this.$message.warning(err);
  733. });
  734. }
  735. },
  736. //检验申请
  737. async lisRequest() {
  738. let isPrintLisRequest = false
  739. let res = null
  740. if (this.form.id.length < 1) {
  741. this.$message.info("人员信息尚未保存,不可执行此操作!");
  742. return;
  743. }
  744. try {
  745. res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`);
  746. console.log(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${this.form.id}`, res)
  747. } catch (error) {
  748. return;
  749. }
  750. if (res.Code != -1) {
  751. this.$message.info("发送检验申请成功!");
  752. isPrintLisRequest = true;
  753. }
  754. //重复申请,重打
  755. if (res.Code == -1 && res.Message.indexOf('已申请') > -1) {
  756. isPrintLisRequest = true;
  757. }
  758. if (!isPrintLisRequest) return;
  759. try {
  760. await this.$confirm("是否打印检验申请单?", "提示", {
  761. confirmButtonText: "是",
  762. cancelButtonText: "否",
  763. type: "info",
  764. showClose: false,
  765. closeOnClickModal: false,
  766. closeOnPressEscape: false,
  767. });
  768. } catch (error) {
  769. return;
  770. }
  771. //打印检验申请单
  772. this.lisPrint('0003', false);
  773. },
  774. //条码打印
  775. lisPrint(ReportCode, isPreview) {
  776. if (this.form.id.length < 1) {
  777. this.$message.info("人员信息尚未保存,不可执行此操作!");
  778. return;
  779. }
  780. let token = localStorage.getItem('token');
  781. let user = localStorage.getItem('user');
  782. let toOutShell = {
  783. ReportCode, token,
  784. Parameters: [
  785. { Name: 'printer', Value: user },
  786. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  787. ],
  788. };
  789. if (isPreview) {
  790. //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
  791. //this.multipleSelection.forEach((item,index) =>{
  792. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  793. .then((res) => {
  794. if (res.code != -1) {
  795. toOutShell.ReportTable = { lisRequest: res.data };
  796. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  797. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  798. }
  799. })
  800. .catch(err => {
  801. this.$message.warning(err);
  802. });
  803. // });
  804. } else {
  805. postapi(`/api/app/printreport/getlisrequestreport?PatientRegisterId=${this.form.id}`)
  806. .then((res) => {
  807. if (res.code != -1) {
  808. toOutShell.ReportTable = { lisRequest: res.data };
  809. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  810. return this.$peisAPI.print(JSON.stringify(toOutShell));
  811. }
  812. })
  813. .then(res => {
  814. if (res.toLowerCase() == 'success') {
  815. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  816. // {
  817. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  818. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  819. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  820. // }
  821. return postapi('/api/app/lisrequest/updatelisrequestisprint', { operateType: 1, patientRegisterId: this.form.id })
  822. }
  823. })
  824. .catch(err => {
  825. this.$message.warning(err);
  826. });
  827. }
  828. },
  829. reLisRequest() {
  830. if (this.form.id.length < 1) {
  831. this.$message.info("人员信息尚未保存,不可执行此操作!");
  832. return;
  833. }
  834. this.brushTimes++;
  835. this.patientRegister.lisRequestVisble = true;
  836. },
  837. },
  838. //监听事件
  839. watch: {
  840. //新增或编辑
  841. "editTimes"(newVal, oldVal) {
  842. //console.log('editTimes newVal:',newVal,' oldVal:',oldVal)
  843. if (newVal != oldVal) {
  844. console.log('this.editTimes', this.editTimes)
  845. objCopy(this.formInitData, this.form);
  846. //console.log('this.form',this.form)
  847. }
  848. },
  849. //拍照触发
  850. "patientRegister.photo"(newVal, oldVal) {
  851. //console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
  852. if (newVal != oldVal) {
  853. //console.log('newVal:',newVal)
  854. this.form.photo = newVal;
  855. }
  856. },
  857. },
  858. };
  859. </script>
  860. <style scoped>
  861. ::v-deep .el-form-item {
  862. margin-bottom: -15px;
  863. }
  864. .btn {
  865. margin-top: 10px;
  866. }
  867. .btnClass {
  868. width: 110px;
  869. }
  870. .photo {
  871. position: absolute;
  872. top: 65px;
  873. right: 150px;
  874. /* width: 150px;
  875. height: 150px; */
  876. width: 150px;
  877. height: 160px;
  878. }
  879. ::v-deep .el-table--small .el-table__cell {
  880. padding: 0px 0;
  881. }
  882. ::v-deep .el-input__inner {
  883. text-align: left;
  884. padding-left: 5px;
  885. padding-right: 15px;
  886. }
  887. </style>