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.

1953 lines
74 KiB

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