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.

1046 lines
39 KiB

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